summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/Makefile.in3
-rw-r--r--Build/source/aclocal.m41
-rw-r--r--Build/source/auxdir/auxsub/aclocal.m44
-rwxr-xr-xBuild/source/auxdir/auxsub/configure2
-rwxr-xr-xBuild/source/configure88
-rw-r--r--Build/source/libs/Makefile.in2
-rw-r--r--Build/source/libs/README4
-rw-r--r--Build/source/libs/aclocal.m41
-rwxr-xr-xBuild/source/libs/configure44
-rw-r--r--Build/source/libs/freetype/aclocal.m44
-rwxr-xr-xBuild/source/libs/freetype/configure4
-rwxr-xr-xBuild/source/libs/freetype2/configure4
-rwxr-xr-xBuild/source/libs/gd/configure9
-rw-r--r--Build/source/libs/graphite/aclocal.m44
-rwxr-xr-xBuild/source/libs/graphite/configure10
-rwxr-xr-xBuild/source/libs/icu/configure2
-rwxr-xr-xBuild/source/libs/libpng/configure9
-rw-r--r--Build/source/libs/obsdcompat/aclocal.m44
-rwxr-xr-xBuild/source/libs/obsdcompat/configure9
-rw-r--r--Build/source/libs/poppler/Makefile.am123
-rw-r--r--Build/source/libs/poppler/Makefile.in1835
-rw-r--r--Build/source/libs/poppler/ac/poppler.ac9
-rw-r--r--Build/source/libs/poppler/ac/withenable.ac7
-rw-r--r--Build/source/libs/poppler/aclocal.m4991
-rw-r--r--Build/source/libs/poppler/aconf.h.in116
-rwxr-xr-xBuild/source/libs/poppler/configure6549
-rw-r--r--Build/source/libs/poppler/configure.ac88
-rw-r--r--Build/source/libs/poppler/fofi/Makefile.am12
-rw-r--r--Build/source/libs/poppler/fofi/Makefile.in335
-rw-r--r--Build/source/libs/poppler/goo/Makefile.am12
-rw-r--r--Build/source/libs/poppler/goo/Makefile.in335
-rw-r--r--Build/source/libs/poppler/hdrs.am19
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4-PATCH171
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/AUTHORS5
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/CMakeLists.txt465
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/COPYING339
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/ChangeLog24069
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/ConfigureChecks.cmake47
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/INSTALL236
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/Makefile.am92
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/Makefile.in906
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/NEWS822
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/README37
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/README-XPDF376
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/TODO40
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/aclocal.m41159
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/COPYING-CMAKE-SCRIPTS22
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindCairo.cmake44
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindFontconfig.cmake47
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindGTK.cmake78
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLCMS.cmake84
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLIBOPENJPEG.cmake37
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt3.cmake319
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt4.cmake1295
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroBoolTo01.cmake20
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroEnsureVersion.cmake117
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroOptionalFindPackage.cmake28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroPushRequiredVars.cmake47
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerDefaults.cmake10
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerMacros.cmake117
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/config.guess1561
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/config.h.cmake162
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/config.h.in199
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/config.sub1686
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/configure24105
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/configure.ac595
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/depcomp630
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.cc180
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.h55
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.cc994
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.h34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.cc2403
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.h200
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.cc287
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.h57
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.cc2618
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.h245
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.am26
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.in649
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/CMakeLists.txt117
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.am110
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.in978
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/CMakeLists.txt23
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.am51
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.in665
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.c675
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.c358
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.c282
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.c276
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.c491
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.c342
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.cc228
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.c511
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.c289
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/main.c247
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.c218
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.c335
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.c531
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.c175
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.c321
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.h31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.c260
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.cc418
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.h162
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.cc839
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.h176
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.cc274
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.h70
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.cc66
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.h30
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.cc1960
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.h192
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c607
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c.template44
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h74
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h.template25
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.cmake33
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.in34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.cc579
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.h107
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.cc203
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.cc2006
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.h227
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler-private.h135
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler.cc64
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/poppler.h130
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.am88
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.in698
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/ch01.html63
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/home.pngbin0 -> 654 bytes
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.html59
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.sgml309
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/left.pngbin0 -> 459 bytes
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-action.html386
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-annot.html854
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-attachment.html205
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-document.html1122
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-enums.html412
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-features.html143
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-form-field.html871
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-layer.html214
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-page.html1258
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler.html483
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp281
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp2281
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/right.pngbin0 -> 472 bytes
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/style.css167
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/up.pngbin0 -> 406 bytes
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-docs.sgml22
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-overrides.txt0
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-sections.txt320
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler.types6
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-action.sgml207
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-annot.sgml333
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml65
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml.sgml67
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-document.sgml405
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-enums.sgml229
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-features.sgml80
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-form-field.sgml315
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-layer.sgml79
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-page.sgml470
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-private.sgml145
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-unused.sgml31
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler.sgml279
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/stamp-poppler-enums.sgml19
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-deprecated.xml5
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-full.xml266
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-action.xml295
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-annot.xml511
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-attachment.xml143
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-document.xml722
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-enums.xml275
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-features.xml114
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-form-field.xml546
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-layer.xml140
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-page.xml819
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-private.xml196
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler.xml362
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/glib/test-poppler-glib.cc665
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.cc120
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.h155
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.cc380
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.h76
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooList.cc97
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooList.h94
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooMutex.h63
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooString.cc804
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooString.h176
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.cc94
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/goo/GooTimer.h54
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/GooVector.h113
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.am35
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.in647
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.cc110
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gfile.cc723
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gfile.h158
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gmem.cc346
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gmem.h108
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gmempp.cc32
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.cc147
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/goo/gtypes.h29
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/gtk-doc.make196
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/install-sh519
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/ltmain.sh8413
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/acx_pthread.m4280
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/define-dir.m434
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/gtk-doc.m439
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/libjpeg.m4108
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/libpng.m499
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/libtool.m47376
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/ltoptions.m4368
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/ltsugar.m4123
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/ltversion.m423
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/lt~obsolete.m492
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/m4/qt.m4101
-rwxr-xr-xBuild/source/libs/poppler/poppler-0.12.4/missing376
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.cmake9
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.in9
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-config.h.cmake90
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.cmake13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.in13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.cmake13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.in13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.cmake13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.in13
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.cmake9
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.in9
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler.pc.cmake11
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler.pc.in11
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.cc1179
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.h141
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.cc4508
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.h1329
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Array.cc102
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Array.h71
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.cc819
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.h159
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.cc65
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.h55
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.cc4284
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.h23
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.cc469
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.h126
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.cc780
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.h126
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.cc2312
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.h469
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.cc739
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.h252
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.cc617
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.h136
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CharTypes.h24
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/CompactFontTables.h464
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.cc195
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.h79
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.cc118
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.h35
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.cc805
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.h111
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.cc176
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.h98
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Error.cc72
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Error.h40
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ErrorCodes.h36
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.cc140
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.h24
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.cc125
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.h69
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.cc1824
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.h20
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.cc262
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.h98
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Form.cc1293
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Form.h480
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Function.cc1704
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Function.h244
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.cc4750
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.h358
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.cc2143
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.h391
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.cc5078
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.h1335
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState_helpers.h80
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.cc1890
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.h374
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParamsWin.cc284
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.cc322
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.h107
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.cc3730
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.h162
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.cc187
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.h48
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.cc3158
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.h349
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.cc578
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.h105
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Link.cc923
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Link.h485
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.am284
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.in1049
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.cc461
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.h177
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.cc116
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.h40
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/NameToUnicodeTable.h1097
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Object.cc247
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Object.h351
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.cc321
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.h93
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.cc188
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.h89
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.cc183
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.h313
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.cc914
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.h254
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.cc69
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.h34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.cc6595
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.h452
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.cc159
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.h54
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Page.cc706
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Page.h254
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.cc390
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.h51
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.cc137
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.h104
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.cc265
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.h71
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.cc102
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.h61
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.cc272
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.h145
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.cc44
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.h41
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.cc390
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.h162
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.cc145
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.h74
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.cc3114
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.h282
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Stream-CCITT.h473
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.cc4810
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.h972
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.cc4923
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.h788
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UTF8.h84
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCClassTables.h1827
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCompTables.h665
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeDecompTables.h8526
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.cc293
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.h122
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMapTables.h361
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.cc1200
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.h34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.cc1199
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.h167
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.cc273
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.h341
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/gen-unicode-tables.py38
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h91
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h.in90
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/CMakeLists.txt34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.am48
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.in742
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-document.cc332
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-fontinfo.cc83
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link-qt3.h188
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link.cc267
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition-private.h28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.cc95
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.h146
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page.cc361
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.cc147
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.h92
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/poppler-qt.h310
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt/test-poppler-qt.cpp122
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/CMakeLists.txt3
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.am1
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.in628
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/CMakeLists.txt28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.am68
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.in656
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.cpp57
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.h48
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.cpp50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.h50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.cpp82
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.h44
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.cpp72
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.cpp72
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/main_viewer.cpp33
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.cpp50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.cpp129
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.h61
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.cpp69
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.h47
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.cpp79
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.h50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.cpp66
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.cpp84
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.h48
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.cpp88
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.h43
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.cpp317
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.h73
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/CMakeLists.txt52
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.am73
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.in737
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-helper.h208
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-private.h49
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.cc2062
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.h685
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-base-converter.cc105
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-converter-private.h49
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-document.cc619
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-embeddedfile.cc113
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-export.h17
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-fontinfo.cc149
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.cc371
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.h322
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor-private.h57
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor.cc83
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.cc584
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.h489
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-movie.cc88
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent-private.h121
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.cc428
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.h76
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-private.h49
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition-private.h28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.cc95
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.h148
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page.cc1325
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-pdf-converter.cc115
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.cc220
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.h325
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-ps-converter.cc238
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream-private.h46
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream.cc63
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qt4.h1573
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-sound.cc132
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-textbox.cc63
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/CMakeLists.txt56
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.am127
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.in961
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_actualtext.cpp33
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_attachments.cpp157
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_dateConversion.cpp142
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_fonts.cpp246
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_links.cpp96
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_metadata.cpp226
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_optcontent.cpp479
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagelayout.cpp49
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagemode.cpp73
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_password.cpp88
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_permissions.cpp44
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_search.cpp91
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-attachments.cpp39
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-fonts.cpp89
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-dir.cpp66
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-qt4.cpp73
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-password-qt4.cpp134
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-poppler-qt4.cpp234
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.am57
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.in687
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/Splash.cc3573
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/Splash.h306
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.cc376
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.h80
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.cc382
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.h105
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashErrorCodes.h50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.cc428
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.h76
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.cc213
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.h75
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.cc139
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.h85
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.cc215
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.h121
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.cc327
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.h101
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.cc124
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.h93
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.cc23
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.h28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashGlyphBitmap.h24
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashMath.h88
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.cc184
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.h121
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.cc40
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.h63
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.cc383
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.h53
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.cc182
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.h101
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.cc306
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.h69
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.cc138
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.h50
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.cc134
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.h70
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashTypes.h153
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.cc443
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.h98
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.cc443
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.h85
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/CMakeLists.txt52
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/Makefile.am97
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/Makefile.in682
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/gtk-cairo-test.cc190
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/gtk-splash-test.cc309
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/pdf-fullrewrite.cc46
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.cc373
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.ui416
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/pdf-operators.c81
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/perf-test-preview-dummy.cc22
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/test/perf-test.cc1277
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt84
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc360
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h97
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc156
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h61
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc1672
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h329
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc246
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h106
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am101
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in876
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c208
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h85
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd28
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1110
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc320
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.182
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc171
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1137
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc410
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc193
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.185
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc442
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1128
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc325
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1211
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc382
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1126
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc398
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc34
-rw-r--r--Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h24
-rw-r--r--Build/source/libs/poppler/poppler/Makefile.am12
-rw-r--r--Build/source/libs/poppler/poppler/Makefile.in335
-rw-r--r--Build/source/libs/t1lib/aclocal.m44
-rwxr-xr-xBuild/source/libs/t1lib/configure11
-rwxr-xr-xBuild/source/libs/teckit/configure13
-rw-r--r--Build/source/libs/xpdf/aclocal.m44
-rwxr-xr-xBuild/source/libs/xpdf/configure11
-rwxr-xr-xBuild/source/libs/zlib/configure9
-rwxr-xr-xBuild/source/libs/zziplib/configure9
-rw-r--r--Build/source/m4/kpse-pkgs.m42
-rw-r--r--Build/source/m4/kpse-poppler-flags.m444
-rw-r--r--Build/source/texk/Makefile.in2
-rw-r--r--Build/source/texk/aclocal.m41
-rwxr-xr-xBuild/source/texk/afm2pl/configure9
-rwxr-xr-xBuild/source/texk/bibtex8/configure9
-rwxr-xr-xBuild/source/texk/bibtexu/configure11
-rwxr-xr-xBuild/source/texk/cjkutils/configure9
-rwxr-xr-xBuild/source/texk/configure30
-rwxr-xr-xBuild/source/texk/detex/configure9
-rwxr-xr-xBuild/source/texk/devnag/configure9
-rwxr-xr-xBuild/source/texk/dtl/configure9
-rwxr-xr-xBuild/source/texk/dvi2tty/configure9
-rwxr-xr-xBuild/source/texk/dvidvi/configure9
-rwxr-xr-xBuild/source/texk/dviljk/configure9
-rwxr-xr-xBuild/source/texk/dvipdfmx/configure6
-rwxr-xr-xBuild/source/texk/dvipng/configure9
-rwxr-xr-xBuild/source/texk/dvipos/configure9
-rwxr-xr-xBuild/source/texk/dvipsk/configure9
-rwxr-xr-xBuild/source/texk/dvipsk/squeeze/configure4
-rwxr-xr-xBuild/source/texk/dvisvgm/configure11
-rwxr-xr-xBuild/source/texk/gsftopk/configure9
-rwxr-xr-xBuild/source/texk/kpathsea/configure9
-rwxr-xr-xBuild/source/texk/lacheck/configure9
-rwxr-xr-xBuild/source/texk/lcdf-typetools/configure13
-rwxr-xr-xBuild/source/texk/makeindexk/configure9
-rwxr-xr-xBuild/source/texk/makejvf/configure9
-rwxr-xr-xBuild/source/texk/mendexk/configure9
-rwxr-xr-xBuild/source/texk/musixflx/configure6
-rwxr-xr-xBuild/source/texk/ps2pkm/configure9
-rwxr-xr-xBuild/source/texk/ptexenc/configure9
-rwxr-xr-xBuild/source/texk/seetexk/configure9
-rwxr-xr-xBuild/source/texk/tetex/configure4
-rwxr-xr-xBuild/source/texk/tex4htk/configure9
-rwxr-xr-xBuild/source/texk/texlive/configure4
-rwxr-xr-xBuild/source/texk/ttf2pk/configure9
-rwxr-xr-xBuild/source/texk/ttfdump/configure9
-rw-r--r--Build/source/texk/web2c/Makefile.am3
-rw-r--r--Build/source/texk/web2c/Makefile.in354
-rw-r--r--Build/source/texk/web2c/ac/web2c.ac2
-rw-r--r--Build/source/texk/web2c/aclocal.m4108
-rwxr-xr-xBuild/source/texk/web2c/configure195
-rw-r--r--Build/source/texk/web2c/configure.ac18
-rw-r--r--Build/source/texk/web2c/doc/Makefile.in5
-rw-r--r--Build/source/texk/web2c/lib/Makefile.in5
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/NEWS350
-rw-r--r--Build/source/texk/web2c/luatexdir/am/liblua51.am2
-rw-r--r--Build/source/texk/web2c/luatexdir/am/libluatex.am55
-rw-r--r--Build/source/texk/web2c/luatexdir/am/luafontforge.am3
-rw-r--r--Build/source/texk/web2c/luatexdir/am/luamisc.am2
-rw-r--r--Build/source/texk/web2c/luatexdir/am/luasocket.am2
-rw-r--r--Build/source/texk/web2c/luatexdir/am/luatex.am6
-rw-r--r--Build/source/texk/web2c/luatexdir/am/txt2zlib.am19
-rw-r--r--Build/source/texk/web2c/luatexdir/dvi/dvigen.w7
-rw-r--r--Build/source/texk/web2c/luatexdir/font/dofont.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/luafont.w93
-rw-r--r--Build/source/texk/web2c/luatexdir/font/luatexfont.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/font/mapfile.w10
-rw-r--r--Build/source/texk/web2c/luatexdir/font/pkin.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/sfnt.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/sfnt.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/font/subfont.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/font/texfont.h12
-rw-r--r--Build/source/texk/web2c/luatexdir/font/texfont.w14
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tfmofm.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tounicode.w14
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tt_glyf.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tt_table.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/vfovf.w135
-rw-r--r--Build/source/texk/web2c/luatexdir/font/vfpacket.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writecff.w51
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writeenc.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writefont.w18
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writet1.w57
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writet3.w7
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writettf.w16
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writetype0.w10
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writetype2.w45
-rw-r--r--Build/source/texk/web2c/luatexdir/image/epdf.h47
-rw-r--r--Build/source/texk/web2c/luatexdir/image/image.h14
-rw-r--r--Build/source/texk/web2c/luatexdir/image/pdftoepdf.cc328
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writeimg.w30
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writejbig2.h5
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writejbig2.w27
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writejp2.h31
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writejp2.w282
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writejpg.w42
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writepng.w61
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/hyphen.w12
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/texlang.w119
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c11
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lepdflib.cc2684
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lfontlib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/limglib.c14
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/liolib.c25
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lkpselib.c8
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llanglib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llfslibext.c173
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llualib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lnodelib.c299
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/loslibext.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lpdflib.c162
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lstatslib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/ltexiolib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/ltexlib.c368
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/ltokenlib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luagen.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.w16
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luanode.w108
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luastuff.w39
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luatex-api.h15
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luatoken.w13
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/texluac.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua51/lauxlib.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua51/luaconf.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/Makefile4
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/README60
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html27
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html22
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c334
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.def2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/tests/test.lua17
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/nouiutil.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c8
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c10
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c1164
-rw-r--r--Build/source/texk/web2c/luatexdir/luapeg/lpeg.c3
-rw-r--r--Build/source/texk/web2c/luatexdir/luascripts/pdflua.h34
-rw-r--r--Build/source/texk/web2c/luatexdir/luascripts/pdflua.lua25
-rw-r--r--Build/source/texk/web2c/luatexdir/luascripts/txt2zlib.w145
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.c147
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex_svnversion.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pagetree.w10
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfaction.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfaction.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfannot.w19
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.h5
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w19
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfdest.w15
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdffont.w25
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.h49
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w688
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w17
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfimage.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdflink.w19
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdflistout.w16
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfliteral.w28
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.h30
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.w115
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfobj.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfobj.w44
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w25
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfpage.w9
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfrule.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w10
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfshipout.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfshipout.w41
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdftables.h33
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdftables.w89
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfthread.h3
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfthread.w29
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdftypes.h32
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfxform.w11
-rw-r--r--Build/source/texk/web2c/luatexdir/ptexlib.h25
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/align.w16
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/arithmetic.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/arithmetic.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/buildpage.w42
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/commands.h17
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/commands.w30
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/conditional.w6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/directions.h30
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/directions.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/dumpdata.h8
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/dumpdata.w19
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/equivalents.h21
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/equivalents.w6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/errors.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/expand.w6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/extensions.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/filename.w6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/inputstack.h8
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/inputstack.w15
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/linebreak.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/linebreak.w27
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/mainbody.h18
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/mainbody.w14
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/maincontrol.h3
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/maincontrol.w1460
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/mathcodes.w19
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/memoryword.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/mlist.w91
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/nesting.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/packaging.h12
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/packaging.w12
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/postlinebreak.w32
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/primitive.w18
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/printing.w24
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/scanning.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/scanning.w5
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/stringpool.h3
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/stringpool.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texdeffont.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texfileio.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texfileio.w247
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texmath.w90
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texnodes.h18
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texnodes.w65
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textcodes.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textoken.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textoken.w72
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/avlstuff.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/managed-sa.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h13
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/synctex.c52
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w21
-rw-r--r--Build/source/texk/web2c/man/ChangeLog4
-rw-r--r--Build/source/texk/web2c/man/Makefile.in5
-rw-r--r--Build/source/texk/web2c/man/luatex.man2
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.in5
-rw-r--r--Build/source/texk/web2c/otps/Makefile.in5
-rw-r--r--Build/source/texk/web2c/window/Makefile.in5
-rwxr-xr-xBuild/source/texk/xdv2pdf/configure16
-rwxr-xr-xBuild/source/texk/xdvik/configure7
-rwxr-xr-xBuild/source/texk/xdvik/squeeze/configure4
-rwxr-xr-xBuild/source/texk/xdvipdfmx/configure9
-rw-r--r--Build/source/utils/Makefile.in2
-rw-r--r--Build/source/utils/aclocal.m41
-rwxr-xr-xBuild/source/utils/biber/configure4
-rwxr-xr-xBuild/source/utils/chktex/configure6
-rwxr-xr-xBuild/source/utils/configure30
-rwxr-xr-xBuild/source/utils/dialog/configure4
-rwxr-xr-xBuild/source/utils/ps2eps/configure4
-rwxr-xr-xBuild/source/utils/psutils/configure4
-rw-r--r--Build/source/utils/t1utils/aclocal.m44
-rwxr-xr-xBuild/source/utils/t1utils/configure9
-rwxr-xr-xBuild/source/utils/tpic2pdftex/configure4
-rw-r--r--Build/source/utils/vlna/aclocal.m44
-rwxr-xr-xBuild/source/utils/vlna/configure4
-rwxr-xr-xBuild/source/utils/xindy/configure4
-rw-r--r--Build/source/utils/xpdfopen/aclocal.m44
-rwxr-xr-xBuild/source/utils/xpdfopen/configure7
-rw-r--r--Master/texmf-dist/doc/luatex/base/fdata.lua4554
-rw-r--r--Master/texmf-dist/doc/luatex/base/fdata_epdf.lua2276
-rw-r--r--Master/texmf-dist/doc/luatex/base/fdata_img.lua156
-rw-r--r--Master/texmf-dist/doc/luatex/base/functionref.pdfbin0 -> 108015 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/base/functionref.tex1088
-rw-r--r--Master/texmf-dist/doc/luatex/base/luatex.man266
-rw-r--r--Master/texmf-dist/doc/luatex/base/luatexref-env.tex25
-rw-r--r--Master/texmf-dist/doc/luatex/base/luatexref-t.pdfbin707177 -> 778873 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/base/luatexref-t.tex2114
836 files changed, 299320 insertions, 4448 deletions
diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in
index f43a4e9ee43..2e9d1e9cf92 100644
--- a/Build/source/Makefile.in
+++ b/Build/source/Makefile.in
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-common.m4 \
$(top_srcdir)/m4/kpse-libpng-flags.m4 \
$(top_srcdir)/m4/kpse-lt-hack.m4 \
$(top_srcdir)/m4/kpse-options.m4 $(top_srcdir)/m4/kpse-pkgs.m4 \
+ $(top_srcdir)/m4/kpse-poppler-flags.m4 \
$(top_srcdir)/m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/m4/kpse-setup.m4 \
$(top_srcdir)/m4/kpse-t1lib-flags.m4 \
@@ -120,6 +121,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-common.m4 \
$(top_srcdir)/libs/graphite/ac/withenable.ac \
$(top_srcdir)/libs/zziplib/ac/withenable.ac \
$(top_srcdir)/libs/xpdf/ac/withenable.ac \
+ $(top_srcdir)/libs/poppler/ac/withenable.ac \
$(top_srcdir)/libs/gd/ac/withenable.ac \
$(top_srcdir)/libs/freetype2/ac/withenable.ac \
$(top_srcdir)/libs/freetype/ac/withenable.ac \
@@ -138,6 +140,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-common.m4 \
$(top_srcdir)/libs/freetype/ac/freetype.ac \
$(top_srcdir)/libs/freetype2/ac/freetype2.ac \
$(top_srcdir)/libs/gd/ac/gd.ac \
+ $(top_srcdir)/libs/poppler/ac/poppler.ac \
$(top_srcdir)/libs/xpdf/ac/xpdf.ac \
$(top_srcdir)/libs/zziplib/ac/zziplib.ac \
$(top_srcdir)/libs/graphite/ac/graphite.ac \
diff --git a/Build/source/aclocal.m4 b/Build/source/aclocal.m4
index d0e3b94f7ea..3cc8c1b8c91 100644
--- a/Build/source/aclocal.m4
+++ b/Build/source/aclocal.m4
@@ -1001,6 +1001,7 @@ m4_include([m4/kpse-libpng-flags.m4])
m4_include([m4/kpse-lt-hack.m4])
m4_include([m4/kpse-options.m4])
m4_include([m4/kpse-pkgs.m4])
+m4_include([m4/kpse-poppler-flags.m4])
m4_include([m4/kpse-ptexenc-flags.m4])
m4_include([m4/kpse-setup.m4])
m4_include([m4/kpse-t1lib-flags.m4])
diff --git a/Build/source/auxdir/auxsub/aclocal.m4 b/Build/source/auxdir/auxsub/aclocal.m4
index fced0e9c15d..edea2ec2632 100644
--- a/Build/source/auxdir/auxsub/aclocal.m4
+++ b/Build/source/auxdir/auxsub/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/auxdir/auxsub/configure b/Build/source/auxdir/auxsub/configure
index 2444c81d29a..c72f49b1e89 100755
--- a/Build/source/auxdir/auxsub/configure
+++ b/Build/source/auxdir/auxsub/configure
@@ -2807,7 +2807,7 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
+config_files="`echo $ac_config_files`"
_ACEOF
diff --git a/Build/source/configure b/Build/source/configure
index 396f805d1e8..97549fe6922 100755
--- a/Build/source/configure
+++ b/Build/source/configure
@@ -860,6 +860,7 @@ with_graphite
with_system_graphite
with_system_zziplib
with_system_xpdf
+with_system_poppler
with_system_gd
with_gd_includes
with_gd_libdir
@@ -1699,6 +1700,8 @@ Optional Packages:
pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
+ --with-system-poppler use installed poppler headers and library instead of
+ poppler (requires pkg-config)
--with-system-gd use installed gd headers and library
--with-gd-includes=DIR gd headers installed in DIR
--with-gd-libdir=DIR gd library installed in DIR
@@ -4216,7 +4219,7 @@ case $enable_luatex in #(
esac
test "x$enable_web2c:$enable_luatex" = xyes:yes && {
- need_xpdf=yes
+ need_poppler=yes
need_libpng=yes
need_obsdcompat=yes
need_zziplib=yes
@@ -5356,6 +5359,37 @@ $as_echo "$as_me: Using \`xpdf' headers and library from TL tree" >&6;}
fi
+## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+## configure options and TL libraries required for poppler
+
+# Check whether --with-system-poppler was given.
+if test "${with_system_poppler+set}" = set; then :
+ withval=$with_system_poppler;
+fi
+if test "x$with_system_poppler" = x; then
+ if test -f $srcdir/libs/poppler/configure; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5
+$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;}
+ with_system_poppler=no
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5
+$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;}
+ with_system_poppler=yes
+ fi
+ ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'"
+elif test "x$with_system_poppler" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`poppler' headers and library" >&5
+$as_echo "$as_me: Using installed \`poppler' headers and library" >&6;}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`poppler' headers and library from TL tree" >&5
+$as_echo "$as_me: Using \`poppler' headers and library from TL tree" >&6;}
+ if test "x$with_system_poppler" != xno; then
+ with_system_poppler=no
+ ac_configure_args="$ac_configure_args '--without-system-poppler'"
+ fi
+fi
+
+
## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/
## configure options and TL libraries required for gd
@@ -19766,6 +19800,14 @@ elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
as_fn_error $? "did not find poppler-0.10 or better" "$LINENO" 5
fi
+if $PKG_CONFIG poppler --atleast-version=0.10; then
+ POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+ POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
+ as_fn_error $? "did not find poppler-0.10 or better" "$LINENO" 5
+fi
+
if $PKG_CONFIG zziplib --atleast-version=0.12; then
ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs`
@@ -20141,6 +20183,46 @@ $as_echo "$kpse_res" >&6; }
fi
+## libs/poppler/ac/poppler.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+## basic check of system poppler (poppler)
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test "x$need_poppler:$with_system_poppler" = xyes:yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`poppler' library" >&5
+$as_echo_n "checking requested system \`poppler' library... " >&6; }
+ CPPFLAGS="$POPPLER_INCLUDES $CPPFLAGS"
+ LIBS="$POPPLER_LIBS $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <GfxFont.h>
+int
+main ()
+{
+GfxFont *gfxFont; gfxFont->decRefCnt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ syslib_used=yes kpse_res=ok
+else
+ syslib_status=no kpse_res=failed
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5
+$as_echo "$kpse_res" >&6; }
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
## libs/xpdf/ac/xpdf.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/
## basic check of system xpdf (poppler)
ac_ext=cpp
@@ -20963,8 +21045,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/Makefile.in b/Build/source/libs/Makefile.in
index d6110b06e34..206149cce31 100644
--- a/Build/source/libs/Makefile.in
+++ b/Build/source/libs/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../m4/kpse-options.m4 \
$(top_srcdir)/../m4/kpse-pkgs.m4 \
+ $(top_srcdir)/../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../m4/kpse-setup.m4 \
$(top_srcdir)/../m4/kpse-t1lib-flags.m4 \
@@ -122,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../libs/graphite/ac/withenable.ac \
$(top_srcdir)/../libs/zziplib/ac/withenable.ac \
$(top_srcdir)/../libs/xpdf/ac/withenable.ac \
+ $(top_srcdir)/../libs/poppler/ac/withenable.ac \
$(top_srcdir)/../libs/gd/ac/withenable.ac \
$(top_srcdir)/../libs/freetype2/ac/withenable.ac \
$(top_srcdir)/../libs/freetype/ac/withenable.ac \
diff --git a/Build/source/libs/README b/Build/source/libs/README
index c6b6c5f4e9e..d119babfaa3 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -25,12 +25,14 @@ libpng 1.4.4 - http://www.libpng.org/ - used by many
obsdcompat - used by pdftex and luatex
+poppler 0.12.4 - http://poppler.freedesktop.org/ - used by luatex
+
t1lib 5.1.2 - ftp://sunsite.unc.edu/pub/Linux/libs/graphics/
teckit 2.5.1 - http://scripts.sil.org/svn-view/teckit/
xpdf 3.02pl4 - http://www.foolabs.com/xpdf/
- with modifications for pdftex, luatex, and xetex
+ with modifications for pdftex and xetex
zlib 1.2.5 - http://www.zlib.net/ - used by many
diff --git a/Build/source/libs/aclocal.m4 b/Build/source/libs/aclocal.m4
index 9eb7b6d1a8d..86d2a2ce443 100644
--- a/Build/source/libs/aclocal.m4
+++ b/Build/source/libs/aclocal.m4
@@ -1001,6 +1001,7 @@ m4_include([../m4/kpse-libpng-flags.m4])
m4_include([../m4/kpse-lt-hack.m4])
m4_include([../m4/kpse-options.m4])
m4_include([../m4/kpse-pkgs.m4])
+m4_include([../m4/kpse-poppler-flags.m4])
m4_include([../m4/kpse-ptexenc-flags.m4])
m4_include([../m4/kpse-setup.m4])
m4_include([../m4/kpse-t1lib-flags.m4])
diff --git a/Build/source/libs/configure b/Build/source/libs/configure
index 09536f423cf..fdf7464781e 100755
--- a/Build/source/libs/configure
+++ b/Build/source/libs/configure
@@ -771,6 +771,7 @@ with_graphite
with_system_graphite
with_system_zziplib
with_system_xpdf
+with_system_poppler
with_system_gd
with_gd_includes
with_gd_libdir
@@ -814,6 +815,7 @@ teckit
graphite
zziplib
xpdf
+poppler
gd
freetype2
freetype
@@ -1589,6 +1591,8 @@ Optional Packages:
pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
+ --with-system-poppler use installed poppler headers and library instead of
+ poppler (requires pkg-config)
--with-system-gd use installed gd headers and library
--with-gd-includes=DIR gd headers installed in DIR
--with-gd-libdir=DIR gd library installed in DIR
@@ -3548,7 +3552,7 @@ case $enable_luatex in #(
esac
test "x$enable_web2c:$enable_luatex" = xyes:yes && {
- need_xpdf=yes
+ need_poppler=yes
need_libpng=yes
need_obsdcompat=yes
need_zziplib=yes
@@ -4638,6 +4642,27 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;}
fi
+## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+## configure options and TL libraries required for poppler
+
+# Check whether --with-system-poppler was given.
+if test "${with_system_poppler+set}" = set; then :
+ withval=$with_system_poppler;
+fi
+if test "x$with_system_poppler" = x; then
+ if test -f $srcdir/../libs/poppler/configure; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5
+$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;}
+ with_system_poppler=no
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5
+$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;}
+ with_system_poppler=yes
+ fi
+ ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'"
+fi
+
+
## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/
## configure options and TL libraries required for gd
@@ -5779,6 +5804,19 @@ if test -x $srcdir/xpdf/configure; then
fi
+if test -x $srcdir/poppler/configure; then
+ if test "x$with_system_poppler" != xyes && \
+ test "x$need_poppler" = xyes; then
+ SUBLIBS="poppler $SUBLIBS"
+ fi
+ DIST_SUBLIBS="poppler $DIST_SUBLIBS"
+ if false; then
+ subdirs="$subdirs poppler"
+
+ fi
+fi
+
+
if test -x $srcdir/gd/configure; then
if test "x$with_system_gd" != xyes && \
test "x$need_gd" = xyes; then
@@ -6474,8 +6512,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/freetype/aclocal.m4 b/Build/source/libs/freetype/aclocal.m4
index 76a153698ad..a1fa316dd97 100644
--- a/Build/source/libs/freetype/aclocal.m4
+++ b/Build/source/libs/freetype/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/libs/freetype/configure b/Build/source/libs/freetype/configure
index 08cc1046e1f..e56136d2e9a 100755
--- a/Build/source/libs/freetype/configure
+++ b/Build/source/libs/freetype/configure
@@ -3906,8 +3906,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/freetype2/configure b/Build/source/libs/freetype2/configure
index a4dbf215efe..19c8cb36d32 100755
--- a/Build/source/libs/freetype2/configure
+++ b/Build/source/libs/freetype2/configure
@@ -3906,8 +3906,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/gd/configure b/Build/source/libs/gd/configure
index 23b3745a23f..c47503d0a8e 100755
--- a/Build/source/libs/gd/configure
+++ b/Build/source/libs/gd/configure
@@ -769,8 +769,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14078,9 +14077,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/graphite/aclocal.m4 b/Build/source/libs/graphite/aclocal.m4
index 8cd538d37dc..f004a0e2d53 100644
--- a/Build/source/libs/graphite/aclocal.m4
+++ b/Build/source/libs/graphite/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/libs/graphite/configure b/Build/source/libs/graphite/configure
index 8e1f1f643e8..16ff227cc41 100755
--- a/Build/source/libs/graphite/configure
+++ b/Build/source/libs/graphite/configure
@@ -729,11 +729,7 @@ CPPFLAGS
CCC
CC
CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -5863,8 +5859,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/icu/configure b/Build/source/libs/icu/configure
index 09fe62f7dcf..9a823d843c6 100755
--- a/Build/source/libs/icu/configure
+++ b/Build/source/libs/icu/configure
@@ -2989,7 +2989,7 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
+config_files="`echo $ac_config_files`"
_ACEOF
diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure
index f8bb2785e07..2c80450c5b1 100755
--- a/Build/source/libs/libpng/configure
+++ b/Build/source/libs/libpng/configure
@@ -719,8 +719,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -5268,9 +5267,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/obsdcompat/aclocal.m4 b/Build/source/libs/obsdcompat/aclocal.m4
index 76a153698ad..a1fa316dd97 100644
--- a/Build/source/libs/obsdcompat/aclocal.m4
+++ b/Build/source/libs/obsdcompat/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/libs/obsdcompat/configure b/Build/source/libs/obsdcompat/configure
index 48921ee1cdb..e604d9f950a 100755
--- a/Build/source/libs/obsdcompat/configure
+++ b/Build/source/libs/obsdcompat/configure
@@ -729,8 +729,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -7609,9 +7608,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/poppler/Makefile.am b/Build/source/libs/poppler/Makefile.am
new file mode 100644
index 00000000000..4bdad1a0248
--- /dev/null
+++ b/Build/source/libs/poppler/Makefile.am
@@ -0,0 +1,123 @@
+## Proxy Makefile.am to build poppler for TeX Live.
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+##
+## This file is free software; the copyright holder
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+##
+#========================================================================
+##
+## Main poppler Makefile.
+## Goo library Makefile
+## FoFi library Makefile
+## poppler Makefile
+##
+## Copyright 1996-2003 Glyph & Cog, LLC
+##
+#========================================================================
+##
+ACLOCAL_AMFLAGS = -I ../../m4
+
+# Rebuild
+.PHONY: rebuild
+rebuild: all
+
+## We want to re-distribute the whole original poppler source tree.
+##
+## With current automake (1.10.2) 'make distcheck' fails when
+## DISTFILES contains a directory and files in that directory.
+## Thus nodist_* for all files in $(POPPLER_TREE).
+EXTRA_DIST = $(POPPLER_TREE)
+
+# in case of an SVN repository
+dist-hook:
+ rm -rf `find $(distdir) -name .svn`
+ rm -f $(distdir)/$(POPPLER_TREE)/install-sh
+
+SUBDIRS = goo fofi poppler
+
+GOO_SRC = $(top_srcdir)/$(POPPLER_TREE)/goo
+FOFI_SRC = $(top_srcdir)/$(POPPLER_TREE)/fofi
+POPPLER_SRC = $(top_srcdir)/$(POPPLER_TREE)/poppler
+
+INCLUDES = -Igoo -Ifofi -Ipoppler -I$(GOO_SRC) -I$(FOFI_SRC) -I$(POPPLER_SRC)
+AM_CPPFLAGS = -DPDF_PARSER_ONLY -DPOPPLER_DATADIR='"."'
+
+noinst_LIBRARIES = libpoppler.a
+
+nodist_libpoppler_a_SOURCES = \
+ $(goo_libGoo_a_sources) \
+ $(fofi_libfofi_a_sources) \
+ $(poppler_libpoppler_a_sources)
+
+goo_libGoo_a_sources = \
+ $(GOO_SRC)/FixedPoint.cc \
+ $(GOO_SRC)/gfile.cc \
+ $(GOO_SRC)/gmem.cc \
+ $(GOO_SRC)/gmempp.cc \
+ $(GOO_SRC)/GooHash.cc \
+ $(GOO_SRC)/GooList.cc \
+ $(GOO_SRC)/GooString.cc \
+ $(GOO_SRC)/GooTimer.cc \
+ $(GOO_SRC)/gstrtod.cc \
+ $(GOO_SRC)/PNGWriter.cc
+
+
+fofi_libfofi_a_sources = \
+ $(FOFI_SRC)/FoFiBase.cc \
+ $(FOFI_SRC)/FoFiEncodings.cc \
+ $(FOFI_SRC)/FoFiTrueType.cc \
+ $(FOFI_SRC)/FoFiType1.cc \
+ $(FOFI_SRC)/FoFiType1C.cc
+
+poppler_libpoppler_a_sources = \
+ $(POPPLER_SRC)/Annot.cc \
+ $(POPPLER_SRC)/Array.cc \
+ $(POPPLER_SRC)/BuiltinFont.cc \
+ $(POPPLER_SRC)/BuiltinFontTables.cc \
+ $(POPPLER_SRC)/CMap.cc \
+ $(POPPLER_SRC)/Catalog.cc \
+ $(POPPLER_SRC)/CharCodeToUnicode.cc \
+ $(POPPLER_SRC)/DateInfo.cc \
+ $(POPPLER_SRC)/Decrypt.cc \
+ $(POPPLER_SRC)/Dict.cc \
+ $(POPPLER_SRC)/Error.cc \
+ $(POPPLER_SRC)/FileSpec.cc \
+ $(POPPLER_SRC)/FontEncodingTables.cc \
+ $(POPPLER_SRC)/FontInfo.cc \
+ $(POPPLER_SRC)/Form.cc \
+ $(POPPLER_SRC)/Function.cc \
+ $(POPPLER_SRC)/Gfx.cc \
+ $(POPPLER_SRC)/GfxFont.cc \
+ $(POPPLER_SRC)/GfxState.cc \
+ $(POPPLER_SRC)/GlobalParams.cc \
+ $(POPPLER_SRC)/JArithmeticDecoder.cc \
+ $(POPPLER_SRC)/JBIG2Stream.cc \
+ $(POPPLER_SRC)/JPXStream.cc \
+ $(POPPLER_SRC)/Lexer.cc \
+ $(POPPLER_SRC)/Link.cc \
+ $(POPPLER_SRC)/Movie.cc \
+ $(POPPLER_SRC)/NameToCharCode.cc \
+ $(POPPLER_SRC)/Object.cc \
+ $(POPPLER_SRC)/OptionalContent.cc \
+ $(POPPLER_SRC)/Outline.cc \
+ $(POPPLER_SRC)/OutputDev.cc \
+ $(POPPLER_SRC)/PDFDoc.cc \
+ $(POPPLER_SRC)/PDFDocEncoding.cc \
+ $(POPPLER_SRC)/PSOutputDev.cc \
+ $(POPPLER_SRC)/PSTokenizer.cc \
+ $(POPPLER_SRC)/Page.cc \
+ $(POPPLER_SRC)/PageLabelInfo.cc \
+ $(POPPLER_SRC)/PageTransition.cc \
+ $(POPPLER_SRC)/Parser.cc \
+ $(POPPLER_SRC)/PopplerCache.cc \
+ $(POPPLER_SRC)/PreScanOutputDev.cc \
+ $(POPPLER_SRC)/ProfileData.cc \
+ $(POPPLER_SRC)/SecurityHandler.cc \
+ $(POPPLER_SRC)/Sound.cc \
+ $(POPPLER_SRC)/Stream.cc \
+ $(POPPLER_SRC)/UnicodeMap.cc \
+ $(POPPLER_SRC)/UnicodeTypeTable.cc \
+ $(POPPLER_SRC)/XRef.cc \
+ $(POPPLER_SRC)/XpdfPluginAPI.cc
diff --git a/Build/source/libs/poppler/Makefile.in b/Build/source/libs/poppler/Makefile.in
new file mode 100644
index 00000000000..d44c1c4dfcf
--- /dev/null
+++ b/Build/source/libs/poppler/Makefile.in
@@ -0,0 +1,1835 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(srcdir)/../../build-aux/depcomp \
+ $(srcdir)/../../build-aux/install-sh \
+ $(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/aconf.h.in \
+ $(top_srcdir)/configure \
+ $(top_srcdir)/poppler-0.12.4/config.h.in \
+ ../../build-aux/config.guess ../../build-aux/config.sub \
+ ../../build-aux/depcomp ../../build-aux/install-sh \
+ ../../build-aux/ltmain.sh ../../build-aux/missing \
+ ../../build-aux/texinfo.tex ../../build-aux/ylwrap
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = aconf.h $(top_builddir)/poppler-0.12.4/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libpoppler_a_AR = $(AR) $(ARFLAGS)
+libpoppler_a_LIBADD =
+am__objects_1 = FixedPoint.$(OBJEXT) gfile.$(OBJEXT) gmem.$(OBJEXT) \
+ gmempp.$(OBJEXT) GooHash.$(OBJEXT) GooList.$(OBJEXT) \
+ GooString.$(OBJEXT) GooTimer.$(OBJEXT) gstrtod.$(OBJEXT) \
+ PNGWriter.$(OBJEXT)
+am__objects_2 = FoFiBase.$(OBJEXT) FoFiEncodings.$(OBJEXT) \
+ FoFiTrueType.$(OBJEXT) FoFiType1.$(OBJEXT) \
+ FoFiType1C.$(OBJEXT)
+am__objects_3 = Annot.$(OBJEXT) Array.$(OBJEXT) BuiltinFont.$(OBJEXT) \
+ BuiltinFontTables.$(OBJEXT) CMap.$(OBJEXT) Catalog.$(OBJEXT) \
+ CharCodeToUnicode.$(OBJEXT) DateInfo.$(OBJEXT) \
+ Decrypt.$(OBJEXT) Dict.$(OBJEXT) Error.$(OBJEXT) \
+ FileSpec.$(OBJEXT) FontEncodingTables.$(OBJEXT) \
+ FontInfo.$(OBJEXT) Form.$(OBJEXT) Function.$(OBJEXT) \
+ Gfx.$(OBJEXT) GfxFont.$(OBJEXT) GfxState.$(OBJEXT) \
+ GlobalParams.$(OBJEXT) JArithmeticDecoder.$(OBJEXT) \
+ JBIG2Stream.$(OBJEXT) JPXStream.$(OBJEXT) Lexer.$(OBJEXT) \
+ Link.$(OBJEXT) Movie.$(OBJEXT) NameToCharCode.$(OBJEXT) \
+ Object.$(OBJEXT) OptionalContent.$(OBJEXT) Outline.$(OBJEXT) \
+ OutputDev.$(OBJEXT) PDFDoc.$(OBJEXT) PDFDocEncoding.$(OBJEXT) \
+ PSOutputDev.$(OBJEXT) PSTokenizer.$(OBJEXT) Page.$(OBJEXT) \
+ PageLabelInfo.$(OBJEXT) PageTransition.$(OBJEXT) \
+ Parser.$(OBJEXT) PopplerCache.$(OBJEXT) \
+ PreScanOutputDev.$(OBJEXT) ProfileData.$(OBJEXT) \
+ SecurityHandler.$(OBJEXT) Sound.$(OBJEXT) Stream.$(OBJEXT) \
+ UnicodeMap.$(OBJEXT) UnicodeTypeTable.$(OBJEXT) XRef.$(OBJEXT) \
+ XpdfPluginAPI.$(OBJEXT)
+nodist_libpoppler_a_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3)
+libpoppler_a_OBJECTS = $(nodist_libpoppler_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/poppler-0.12.4
+depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+SOURCES = $(nodist_libpoppler_a_SOURCES)
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POPPLER_TREE = @POPPLER_TREE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#========================================================================
+#========================================================================
+ACLOCAL_AMFLAGS = -I ../../m4
+EXTRA_DIST = $(POPPLER_TREE)
+SUBDIRS = goo fofi poppler
+GOO_SRC = $(top_srcdir)/$(POPPLER_TREE)/goo
+FOFI_SRC = $(top_srcdir)/$(POPPLER_TREE)/fofi
+POPPLER_SRC = $(top_srcdir)/$(POPPLER_TREE)/poppler
+INCLUDES = -Igoo -Ifofi -Ipoppler -I$(GOO_SRC) -I$(FOFI_SRC) -I$(POPPLER_SRC)
+AM_CPPFLAGS = -DPDF_PARSER_ONLY -DPOPPLER_DATADIR='"."'
+noinst_LIBRARIES = libpoppler.a
+nodist_libpoppler_a_SOURCES = \
+ $(goo_libGoo_a_sources) \
+ $(fofi_libfofi_a_sources) \
+ $(poppler_libpoppler_a_sources)
+
+goo_libGoo_a_sources = \
+ $(GOO_SRC)/FixedPoint.cc \
+ $(GOO_SRC)/gfile.cc \
+ $(GOO_SRC)/gmem.cc \
+ $(GOO_SRC)/gmempp.cc \
+ $(GOO_SRC)/GooHash.cc \
+ $(GOO_SRC)/GooList.cc \
+ $(GOO_SRC)/GooString.cc \
+ $(GOO_SRC)/GooTimer.cc \
+ $(GOO_SRC)/gstrtod.cc \
+ $(GOO_SRC)/PNGWriter.cc
+
+fofi_libfofi_a_sources = \
+ $(FOFI_SRC)/FoFiBase.cc \
+ $(FOFI_SRC)/FoFiEncodings.cc \
+ $(FOFI_SRC)/FoFiTrueType.cc \
+ $(FOFI_SRC)/FoFiType1.cc \
+ $(FOFI_SRC)/FoFiType1C.cc
+
+poppler_libpoppler_a_sources = \
+ $(POPPLER_SRC)/Annot.cc \
+ $(POPPLER_SRC)/Array.cc \
+ $(POPPLER_SRC)/BuiltinFont.cc \
+ $(POPPLER_SRC)/BuiltinFontTables.cc \
+ $(POPPLER_SRC)/CMap.cc \
+ $(POPPLER_SRC)/Catalog.cc \
+ $(POPPLER_SRC)/CharCodeToUnicode.cc \
+ $(POPPLER_SRC)/DateInfo.cc \
+ $(POPPLER_SRC)/Decrypt.cc \
+ $(POPPLER_SRC)/Dict.cc \
+ $(POPPLER_SRC)/Error.cc \
+ $(POPPLER_SRC)/FileSpec.cc \
+ $(POPPLER_SRC)/FontEncodingTables.cc \
+ $(POPPLER_SRC)/FontInfo.cc \
+ $(POPPLER_SRC)/Form.cc \
+ $(POPPLER_SRC)/Function.cc \
+ $(POPPLER_SRC)/Gfx.cc \
+ $(POPPLER_SRC)/GfxFont.cc \
+ $(POPPLER_SRC)/GfxState.cc \
+ $(POPPLER_SRC)/GlobalParams.cc \
+ $(POPPLER_SRC)/JArithmeticDecoder.cc \
+ $(POPPLER_SRC)/JBIG2Stream.cc \
+ $(POPPLER_SRC)/JPXStream.cc \
+ $(POPPLER_SRC)/Lexer.cc \
+ $(POPPLER_SRC)/Link.cc \
+ $(POPPLER_SRC)/Movie.cc \
+ $(POPPLER_SRC)/NameToCharCode.cc \
+ $(POPPLER_SRC)/Object.cc \
+ $(POPPLER_SRC)/OptionalContent.cc \
+ $(POPPLER_SRC)/Outline.cc \
+ $(POPPLER_SRC)/OutputDev.cc \
+ $(POPPLER_SRC)/PDFDoc.cc \
+ $(POPPLER_SRC)/PDFDocEncoding.cc \
+ $(POPPLER_SRC)/PSOutputDev.cc \
+ $(POPPLER_SRC)/PSTokenizer.cc \
+ $(POPPLER_SRC)/Page.cc \
+ $(POPPLER_SRC)/PageLabelInfo.cc \
+ $(POPPLER_SRC)/PageTransition.cc \
+ $(POPPLER_SRC)/Parser.cc \
+ $(POPPLER_SRC)/PopplerCache.cc \
+ $(POPPLER_SRC)/PreScanOutputDev.cc \
+ $(POPPLER_SRC)/ProfileData.cc \
+ $(POPPLER_SRC)/SecurityHandler.cc \
+ $(POPPLER_SRC)/Sound.cc \
+ $(POPPLER_SRC)/Stream.cc \
+ $(POPPLER_SRC)/UnicodeMap.cc \
+ $(POPPLER_SRC)/UnicodeTypeTable.cc \
+ $(POPPLER_SRC)/XRef.cc \
+ $(POPPLER_SRC)/XpdfPluginAPI.cc
+
+all: aconf.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+aconf.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/aconf.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status aconf.h
+$(srcdir)/aconf.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+poppler-0.12.4/config.h: poppler-0.12.4/stamp-h2
+ @if test ! -f $@; then \
+ rm -f poppler-0.12.4/stamp-h2; \
+ $(MAKE) $(AM_MAKEFLAGS) poppler-0.12.4/stamp-h2; \
+ else :; fi
+
+poppler-0.12.4/stamp-h2: $(top_srcdir)/poppler-0.12.4/config.h.in $(top_builddir)/config.status
+ @rm -f poppler-0.12.4/stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status poppler-0.12.4/config.h
+
+distclean-hdr:
+ -rm -f aconf.h stamp-h1 poppler-0.12.4/config.h poppler-0.12.4/stamp-h2
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libpoppler.a: $(libpoppler_a_OBJECTS) $(libpoppler_a_DEPENDENCIES)
+ -rm -f libpoppler.a
+ $(libpoppler_a_AR) libpoppler.a $(libpoppler_a_OBJECTS) $(libpoppler_a_LIBADD)
+ $(RANLIB) libpoppler.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Annot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Array.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BuiltinFont.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BuiltinFontTables.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Catalog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CharCodeToUnicode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DateInfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Decrypt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dict.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileSpec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FixedPoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiBase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiEncodings.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiTrueType.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1C.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FontEncodingTables.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FontInfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Form.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Function.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Gfx.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GfxFont.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GfxState.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GlobalParams.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooHash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooList.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooString.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooTimer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JArithmeticDecoder.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JBIG2Stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JPXStream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lexer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Link.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Movie.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameToCharCode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionalContent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Outline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFDoc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFDocEncoding.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PNGWriter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSOutputDev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSTokenizer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Page.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageLabelInfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageTransition.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PopplerCache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PreScanOutputDev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProfileData.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SecurityHandler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sound.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnicodeMap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnicodeTypeTable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XRef.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XpdfPluginAPI.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmempp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstrtod.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+FixedPoint.o: $(GOO_SRC)/FixedPoint.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FixedPoint.o -MD -MP -MF $(DEPDIR)/FixedPoint.Tpo -c -o FixedPoint.o `test -f '$(GOO_SRC)/FixedPoint.cc' || echo '$(srcdir)/'`$(GOO_SRC)/FixedPoint.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FixedPoint.Tpo $(DEPDIR)/FixedPoint.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/FixedPoint.cc' object='FixedPoint.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FixedPoint.o `test -f '$(GOO_SRC)/FixedPoint.cc' || echo '$(srcdir)/'`$(GOO_SRC)/FixedPoint.cc
+
+FixedPoint.obj: $(GOO_SRC)/FixedPoint.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FixedPoint.obj -MD -MP -MF $(DEPDIR)/FixedPoint.Tpo -c -o FixedPoint.obj `if test -f '$(GOO_SRC)/FixedPoint.cc'; then $(CYGPATH_W) '$(GOO_SRC)/FixedPoint.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/FixedPoint.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FixedPoint.Tpo $(DEPDIR)/FixedPoint.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/FixedPoint.cc' object='FixedPoint.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FixedPoint.obj `if test -f '$(GOO_SRC)/FixedPoint.cc'; then $(CYGPATH_W) '$(GOO_SRC)/FixedPoint.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/FixedPoint.cc'; fi`
+
+gfile.o: $(GOO_SRC)/gfile.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gfile.o -MD -MP -MF $(DEPDIR)/gfile.Tpo -c -o gfile.o `test -f '$(GOO_SRC)/gfile.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gfile.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gfile.Tpo $(DEPDIR)/gfile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gfile.cc' object='gfile.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gfile.o `test -f '$(GOO_SRC)/gfile.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gfile.cc
+
+gfile.obj: $(GOO_SRC)/gfile.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gfile.obj -MD -MP -MF $(DEPDIR)/gfile.Tpo -c -o gfile.obj `if test -f '$(GOO_SRC)/gfile.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gfile.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gfile.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gfile.Tpo $(DEPDIR)/gfile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gfile.cc' object='gfile.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gfile.obj `if test -f '$(GOO_SRC)/gfile.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gfile.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gfile.cc'; fi`
+
+gmem.o: $(GOO_SRC)/gmem.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gmem.o -MD -MP -MF $(DEPDIR)/gmem.Tpo -c -o gmem.o `test -f '$(GOO_SRC)/gmem.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gmem.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gmem.Tpo $(DEPDIR)/gmem.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gmem.cc' object='gmem.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gmem.o `test -f '$(GOO_SRC)/gmem.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gmem.cc
+
+gmem.obj: $(GOO_SRC)/gmem.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gmem.obj -MD -MP -MF $(DEPDIR)/gmem.Tpo -c -o gmem.obj `if test -f '$(GOO_SRC)/gmem.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gmem.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gmem.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gmem.Tpo $(DEPDIR)/gmem.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gmem.cc' object='gmem.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gmem.obj `if test -f '$(GOO_SRC)/gmem.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gmem.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gmem.cc'; fi`
+
+gmempp.o: $(GOO_SRC)/gmempp.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gmempp.o -MD -MP -MF $(DEPDIR)/gmempp.Tpo -c -o gmempp.o `test -f '$(GOO_SRC)/gmempp.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gmempp.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gmempp.Tpo $(DEPDIR)/gmempp.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gmempp.cc' object='gmempp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gmempp.o `test -f '$(GOO_SRC)/gmempp.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gmempp.cc
+
+gmempp.obj: $(GOO_SRC)/gmempp.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gmempp.obj -MD -MP -MF $(DEPDIR)/gmempp.Tpo -c -o gmempp.obj `if test -f '$(GOO_SRC)/gmempp.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gmempp.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gmempp.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gmempp.Tpo $(DEPDIR)/gmempp.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gmempp.cc' object='gmempp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gmempp.obj `if test -f '$(GOO_SRC)/gmempp.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gmempp.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gmempp.cc'; fi`
+
+GooHash.o: $(GOO_SRC)/GooHash.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooHash.o -MD -MP -MF $(DEPDIR)/GooHash.Tpo -c -o GooHash.o `test -f '$(GOO_SRC)/GooHash.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooHash.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooHash.Tpo $(DEPDIR)/GooHash.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooHash.cc' object='GooHash.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooHash.o `test -f '$(GOO_SRC)/GooHash.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooHash.cc
+
+GooHash.obj: $(GOO_SRC)/GooHash.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooHash.obj -MD -MP -MF $(DEPDIR)/GooHash.Tpo -c -o GooHash.obj `if test -f '$(GOO_SRC)/GooHash.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooHash.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooHash.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooHash.Tpo $(DEPDIR)/GooHash.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooHash.cc' object='GooHash.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooHash.obj `if test -f '$(GOO_SRC)/GooHash.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooHash.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooHash.cc'; fi`
+
+GooList.o: $(GOO_SRC)/GooList.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooList.o -MD -MP -MF $(DEPDIR)/GooList.Tpo -c -o GooList.o `test -f '$(GOO_SRC)/GooList.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooList.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooList.Tpo $(DEPDIR)/GooList.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooList.cc' object='GooList.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooList.o `test -f '$(GOO_SRC)/GooList.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooList.cc
+
+GooList.obj: $(GOO_SRC)/GooList.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooList.obj -MD -MP -MF $(DEPDIR)/GooList.Tpo -c -o GooList.obj `if test -f '$(GOO_SRC)/GooList.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooList.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooList.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooList.Tpo $(DEPDIR)/GooList.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooList.cc' object='GooList.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooList.obj `if test -f '$(GOO_SRC)/GooList.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooList.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooList.cc'; fi`
+
+GooString.o: $(GOO_SRC)/GooString.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooString.o -MD -MP -MF $(DEPDIR)/GooString.Tpo -c -o GooString.o `test -f '$(GOO_SRC)/GooString.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooString.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooString.Tpo $(DEPDIR)/GooString.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooString.cc' object='GooString.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooString.o `test -f '$(GOO_SRC)/GooString.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooString.cc
+
+GooString.obj: $(GOO_SRC)/GooString.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooString.obj -MD -MP -MF $(DEPDIR)/GooString.Tpo -c -o GooString.obj `if test -f '$(GOO_SRC)/GooString.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooString.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooString.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooString.Tpo $(DEPDIR)/GooString.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooString.cc' object='GooString.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooString.obj `if test -f '$(GOO_SRC)/GooString.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooString.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooString.cc'; fi`
+
+GooTimer.o: $(GOO_SRC)/GooTimer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooTimer.o -MD -MP -MF $(DEPDIR)/GooTimer.Tpo -c -o GooTimer.o `test -f '$(GOO_SRC)/GooTimer.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooTimer.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooTimer.Tpo $(DEPDIR)/GooTimer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooTimer.cc' object='GooTimer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooTimer.o `test -f '$(GOO_SRC)/GooTimer.cc' || echo '$(srcdir)/'`$(GOO_SRC)/GooTimer.cc
+
+GooTimer.obj: $(GOO_SRC)/GooTimer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GooTimer.obj -MD -MP -MF $(DEPDIR)/GooTimer.Tpo -c -o GooTimer.obj `if test -f '$(GOO_SRC)/GooTimer.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooTimer.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooTimer.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GooTimer.Tpo $(DEPDIR)/GooTimer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/GooTimer.cc' object='GooTimer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GooTimer.obj `if test -f '$(GOO_SRC)/GooTimer.cc'; then $(CYGPATH_W) '$(GOO_SRC)/GooTimer.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/GooTimer.cc'; fi`
+
+gstrtod.o: $(GOO_SRC)/gstrtod.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gstrtod.o -MD -MP -MF $(DEPDIR)/gstrtod.Tpo -c -o gstrtod.o `test -f '$(GOO_SRC)/gstrtod.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gstrtod.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gstrtod.Tpo $(DEPDIR)/gstrtod.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gstrtod.cc' object='gstrtod.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gstrtod.o `test -f '$(GOO_SRC)/gstrtod.cc' || echo '$(srcdir)/'`$(GOO_SRC)/gstrtod.cc
+
+gstrtod.obj: $(GOO_SRC)/gstrtod.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gstrtod.obj -MD -MP -MF $(DEPDIR)/gstrtod.Tpo -c -o gstrtod.obj `if test -f '$(GOO_SRC)/gstrtod.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gstrtod.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gstrtod.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gstrtod.Tpo $(DEPDIR)/gstrtod.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/gstrtod.cc' object='gstrtod.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gstrtod.obj `if test -f '$(GOO_SRC)/gstrtod.cc'; then $(CYGPATH_W) '$(GOO_SRC)/gstrtod.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/gstrtod.cc'; fi`
+
+PNGWriter.o: $(GOO_SRC)/PNGWriter.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PNGWriter.o -MD -MP -MF $(DEPDIR)/PNGWriter.Tpo -c -o PNGWriter.o `test -f '$(GOO_SRC)/PNGWriter.cc' || echo '$(srcdir)/'`$(GOO_SRC)/PNGWriter.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PNGWriter.Tpo $(DEPDIR)/PNGWriter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/PNGWriter.cc' object='PNGWriter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PNGWriter.o `test -f '$(GOO_SRC)/PNGWriter.cc' || echo '$(srcdir)/'`$(GOO_SRC)/PNGWriter.cc
+
+PNGWriter.obj: $(GOO_SRC)/PNGWriter.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PNGWriter.obj -MD -MP -MF $(DEPDIR)/PNGWriter.Tpo -c -o PNGWriter.obj `if test -f '$(GOO_SRC)/PNGWriter.cc'; then $(CYGPATH_W) '$(GOO_SRC)/PNGWriter.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/PNGWriter.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PNGWriter.Tpo $(DEPDIR)/PNGWriter.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GOO_SRC)/PNGWriter.cc' object='PNGWriter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PNGWriter.obj `if test -f '$(GOO_SRC)/PNGWriter.cc'; then $(CYGPATH_W) '$(GOO_SRC)/PNGWriter.cc'; else $(CYGPATH_W) '$(srcdir)/$(GOO_SRC)/PNGWriter.cc'; fi`
+
+FoFiBase.o: $(FOFI_SRC)/FoFiBase.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiBase.o -MD -MP -MF $(DEPDIR)/FoFiBase.Tpo -c -o FoFiBase.o `test -f '$(FOFI_SRC)/FoFiBase.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiBase.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiBase.Tpo $(DEPDIR)/FoFiBase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiBase.cc' object='FoFiBase.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiBase.o `test -f '$(FOFI_SRC)/FoFiBase.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiBase.cc
+
+FoFiBase.obj: $(FOFI_SRC)/FoFiBase.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiBase.obj -MD -MP -MF $(DEPDIR)/FoFiBase.Tpo -c -o FoFiBase.obj `if test -f '$(FOFI_SRC)/FoFiBase.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiBase.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiBase.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiBase.Tpo $(DEPDIR)/FoFiBase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiBase.cc' object='FoFiBase.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiBase.obj `if test -f '$(FOFI_SRC)/FoFiBase.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiBase.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiBase.cc'; fi`
+
+FoFiEncodings.o: $(FOFI_SRC)/FoFiEncodings.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiEncodings.o -MD -MP -MF $(DEPDIR)/FoFiEncodings.Tpo -c -o FoFiEncodings.o `test -f '$(FOFI_SRC)/FoFiEncodings.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiEncodings.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiEncodings.Tpo $(DEPDIR)/FoFiEncodings.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiEncodings.cc' object='FoFiEncodings.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiEncodings.o `test -f '$(FOFI_SRC)/FoFiEncodings.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiEncodings.cc
+
+FoFiEncodings.obj: $(FOFI_SRC)/FoFiEncodings.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiEncodings.obj -MD -MP -MF $(DEPDIR)/FoFiEncodings.Tpo -c -o FoFiEncodings.obj `if test -f '$(FOFI_SRC)/FoFiEncodings.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiEncodings.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiEncodings.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiEncodings.Tpo $(DEPDIR)/FoFiEncodings.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiEncodings.cc' object='FoFiEncodings.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiEncodings.obj `if test -f '$(FOFI_SRC)/FoFiEncodings.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiEncodings.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiEncodings.cc'; fi`
+
+FoFiTrueType.o: $(FOFI_SRC)/FoFiTrueType.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiTrueType.o -MD -MP -MF $(DEPDIR)/FoFiTrueType.Tpo -c -o FoFiTrueType.o `test -f '$(FOFI_SRC)/FoFiTrueType.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiTrueType.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiTrueType.Tpo $(DEPDIR)/FoFiTrueType.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiTrueType.cc' object='FoFiTrueType.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiTrueType.o `test -f '$(FOFI_SRC)/FoFiTrueType.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiTrueType.cc
+
+FoFiTrueType.obj: $(FOFI_SRC)/FoFiTrueType.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiTrueType.obj -MD -MP -MF $(DEPDIR)/FoFiTrueType.Tpo -c -o FoFiTrueType.obj `if test -f '$(FOFI_SRC)/FoFiTrueType.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiTrueType.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiTrueType.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiTrueType.Tpo $(DEPDIR)/FoFiTrueType.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiTrueType.cc' object='FoFiTrueType.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiTrueType.obj `if test -f '$(FOFI_SRC)/FoFiTrueType.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiTrueType.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiTrueType.cc'; fi`
+
+FoFiType1.o: $(FOFI_SRC)/FoFiType1.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiType1.o -MD -MP -MF $(DEPDIR)/FoFiType1.Tpo -c -o FoFiType1.o `test -f '$(FOFI_SRC)/FoFiType1.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiType1.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiType1.Tpo $(DEPDIR)/FoFiType1.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiType1.cc' object='FoFiType1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiType1.o `test -f '$(FOFI_SRC)/FoFiType1.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiType1.cc
+
+FoFiType1.obj: $(FOFI_SRC)/FoFiType1.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiType1.obj -MD -MP -MF $(DEPDIR)/FoFiType1.Tpo -c -o FoFiType1.obj `if test -f '$(FOFI_SRC)/FoFiType1.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiType1.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiType1.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiType1.Tpo $(DEPDIR)/FoFiType1.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiType1.cc' object='FoFiType1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiType1.obj `if test -f '$(FOFI_SRC)/FoFiType1.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiType1.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiType1.cc'; fi`
+
+FoFiType1C.o: $(FOFI_SRC)/FoFiType1C.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiType1C.o -MD -MP -MF $(DEPDIR)/FoFiType1C.Tpo -c -o FoFiType1C.o `test -f '$(FOFI_SRC)/FoFiType1C.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiType1C.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiType1C.Tpo $(DEPDIR)/FoFiType1C.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiType1C.cc' object='FoFiType1C.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiType1C.o `test -f '$(FOFI_SRC)/FoFiType1C.cc' || echo '$(srcdir)/'`$(FOFI_SRC)/FoFiType1C.cc
+
+FoFiType1C.obj: $(FOFI_SRC)/FoFiType1C.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FoFiType1C.obj -MD -MP -MF $(DEPDIR)/FoFiType1C.Tpo -c -o FoFiType1C.obj `if test -f '$(FOFI_SRC)/FoFiType1C.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiType1C.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiType1C.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FoFiType1C.Tpo $(DEPDIR)/FoFiType1C.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(FOFI_SRC)/FoFiType1C.cc' object='FoFiType1C.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FoFiType1C.obj `if test -f '$(FOFI_SRC)/FoFiType1C.cc'; then $(CYGPATH_W) '$(FOFI_SRC)/FoFiType1C.cc'; else $(CYGPATH_W) '$(srcdir)/$(FOFI_SRC)/FoFiType1C.cc'; fi`
+
+Annot.o: $(POPPLER_SRC)/Annot.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Annot.o -MD -MP -MF $(DEPDIR)/Annot.Tpo -c -o Annot.o `test -f '$(POPPLER_SRC)/Annot.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Annot.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Annot.Tpo $(DEPDIR)/Annot.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Annot.cc' object='Annot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Annot.o `test -f '$(POPPLER_SRC)/Annot.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Annot.cc
+
+Annot.obj: $(POPPLER_SRC)/Annot.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Annot.obj -MD -MP -MF $(DEPDIR)/Annot.Tpo -c -o Annot.obj `if test -f '$(POPPLER_SRC)/Annot.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Annot.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Annot.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Annot.Tpo $(DEPDIR)/Annot.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Annot.cc' object='Annot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Annot.obj `if test -f '$(POPPLER_SRC)/Annot.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Annot.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Annot.cc'; fi`
+
+Array.o: $(POPPLER_SRC)/Array.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Array.o -MD -MP -MF $(DEPDIR)/Array.Tpo -c -o Array.o `test -f '$(POPPLER_SRC)/Array.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Array.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Array.Tpo $(DEPDIR)/Array.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Array.cc' object='Array.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Array.o `test -f '$(POPPLER_SRC)/Array.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Array.cc
+
+Array.obj: $(POPPLER_SRC)/Array.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Array.obj -MD -MP -MF $(DEPDIR)/Array.Tpo -c -o Array.obj `if test -f '$(POPPLER_SRC)/Array.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Array.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Array.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Array.Tpo $(DEPDIR)/Array.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Array.cc' object='Array.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Array.obj `if test -f '$(POPPLER_SRC)/Array.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Array.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Array.cc'; fi`
+
+BuiltinFont.o: $(POPPLER_SRC)/BuiltinFont.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BuiltinFont.o -MD -MP -MF $(DEPDIR)/BuiltinFont.Tpo -c -o BuiltinFont.o `test -f '$(POPPLER_SRC)/BuiltinFont.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/BuiltinFont.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BuiltinFont.Tpo $(DEPDIR)/BuiltinFont.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/BuiltinFont.cc' object='BuiltinFont.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BuiltinFont.o `test -f '$(POPPLER_SRC)/BuiltinFont.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/BuiltinFont.cc
+
+BuiltinFont.obj: $(POPPLER_SRC)/BuiltinFont.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BuiltinFont.obj -MD -MP -MF $(DEPDIR)/BuiltinFont.Tpo -c -o BuiltinFont.obj `if test -f '$(POPPLER_SRC)/BuiltinFont.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/BuiltinFont.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/BuiltinFont.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BuiltinFont.Tpo $(DEPDIR)/BuiltinFont.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/BuiltinFont.cc' object='BuiltinFont.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BuiltinFont.obj `if test -f '$(POPPLER_SRC)/BuiltinFont.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/BuiltinFont.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/BuiltinFont.cc'; fi`
+
+BuiltinFontTables.o: $(POPPLER_SRC)/BuiltinFontTables.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BuiltinFontTables.o -MD -MP -MF $(DEPDIR)/BuiltinFontTables.Tpo -c -o BuiltinFontTables.o `test -f '$(POPPLER_SRC)/BuiltinFontTables.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/BuiltinFontTables.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BuiltinFontTables.Tpo $(DEPDIR)/BuiltinFontTables.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/BuiltinFontTables.cc' object='BuiltinFontTables.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BuiltinFontTables.o `test -f '$(POPPLER_SRC)/BuiltinFontTables.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/BuiltinFontTables.cc
+
+BuiltinFontTables.obj: $(POPPLER_SRC)/BuiltinFontTables.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BuiltinFontTables.obj -MD -MP -MF $(DEPDIR)/BuiltinFontTables.Tpo -c -o BuiltinFontTables.obj `if test -f '$(POPPLER_SRC)/BuiltinFontTables.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/BuiltinFontTables.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/BuiltinFontTables.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BuiltinFontTables.Tpo $(DEPDIR)/BuiltinFontTables.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/BuiltinFontTables.cc' object='BuiltinFontTables.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BuiltinFontTables.obj `if test -f '$(POPPLER_SRC)/BuiltinFontTables.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/BuiltinFontTables.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/BuiltinFontTables.cc'; fi`
+
+CMap.o: $(POPPLER_SRC)/CMap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CMap.o -MD -MP -MF $(DEPDIR)/CMap.Tpo -c -o CMap.o `test -f '$(POPPLER_SRC)/CMap.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/CMap.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CMap.Tpo $(DEPDIR)/CMap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/CMap.cc' object='CMap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CMap.o `test -f '$(POPPLER_SRC)/CMap.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/CMap.cc
+
+CMap.obj: $(POPPLER_SRC)/CMap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CMap.obj -MD -MP -MF $(DEPDIR)/CMap.Tpo -c -o CMap.obj `if test -f '$(POPPLER_SRC)/CMap.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/CMap.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/CMap.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CMap.Tpo $(DEPDIR)/CMap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/CMap.cc' object='CMap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CMap.obj `if test -f '$(POPPLER_SRC)/CMap.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/CMap.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/CMap.cc'; fi`
+
+Catalog.o: $(POPPLER_SRC)/Catalog.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Catalog.o -MD -MP -MF $(DEPDIR)/Catalog.Tpo -c -o Catalog.o `test -f '$(POPPLER_SRC)/Catalog.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Catalog.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Catalog.Tpo $(DEPDIR)/Catalog.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Catalog.cc' object='Catalog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Catalog.o `test -f '$(POPPLER_SRC)/Catalog.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Catalog.cc
+
+Catalog.obj: $(POPPLER_SRC)/Catalog.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Catalog.obj -MD -MP -MF $(DEPDIR)/Catalog.Tpo -c -o Catalog.obj `if test -f '$(POPPLER_SRC)/Catalog.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Catalog.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Catalog.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Catalog.Tpo $(DEPDIR)/Catalog.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Catalog.cc' object='Catalog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Catalog.obj `if test -f '$(POPPLER_SRC)/Catalog.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Catalog.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Catalog.cc'; fi`
+
+CharCodeToUnicode.o: $(POPPLER_SRC)/CharCodeToUnicode.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CharCodeToUnicode.o -MD -MP -MF $(DEPDIR)/CharCodeToUnicode.Tpo -c -o CharCodeToUnicode.o `test -f '$(POPPLER_SRC)/CharCodeToUnicode.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/CharCodeToUnicode.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CharCodeToUnicode.Tpo $(DEPDIR)/CharCodeToUnicode.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/CharCodeToUnicode.cc' object='CharCodeToUnicode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CharCodeToUnicode.o `test -f '$(POPPLER_SRC)/CharCodeToUnicode.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/CharCodeToUnicode.cc
+
+CharCodeToUnicode.obj: $(POPPLER_SRC)/CharCodeToUnicode.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CharCodeToUnicode.obj -MD -MP -MF $(DEPDIR)/CharCodeToUnicode.Tpo -c -o CharCodeToUnicode.obj `if test -f '$(POPPLER_SRC)/CharCodeToUnicode.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/CharCodeToUnicode.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/CharCodeToUnicode.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CharCodeToUnicode.Tpo $(DEPDIR)/CharCodeToUnicode.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/CharCodeToUnicode.cc' object='CharCodeToUnicode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CharCodeToUnicode.obj `if test -f '$(POPPLER_SRC)/CharCodeToUnicode.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/CharCodeToUnicode.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/CharCodeToUnicode.cc'; fi`
+
+DateInfo.o: $(POPPLER_SRC)/DateInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DateInfo.o -MD -MP -MF $(DEPDIR)/DateInfo.Tpo -c -o DateInfo.o `test -f '$(POPPLER_SRC)/DateInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/DateInfo.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DateInfo.Tpo $(DEPDIR)/DateInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/DateInfo.cc' object='DateInfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DateInfo.o `test -f '$(POPPLER_SRC)/DateInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/DateInfo.cc
+
+DateInfo.obj: $(POPPLER_SRC)/DateInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DateInfo.obj -MD -MP -MF $(DEPDIR)/DateInfo.Tpo -c -o DateInfo.obj `if test -f '$(POPPLER_SRC)/DateInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/DateInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/DateInfo.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DateInfo.Tpo $(DEPDIR)/DateInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/DateInfo.cc' object='DateInfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DateInfo.obj `if test -f '$(POPPLER_SRC)/DateInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/DateInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/DateInfo.cc'; fi`
+
+Decrypt.o: $(POPPLER_SRC)/Decrypt.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Decrypt.o -MD -MP -MF $(DEPDIR)/Decrypt.Tpo -c -o Decrypt.o `test -f '$(POPPLER_SRC)/Decrypt.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Decrypt.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Decrypt.Tpo $(DEPDIR)/Decrypt.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Decrypt.cc' object='Decrypt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Decrypt.o `test -f '$(POPPLER_SRC)/Decrypt.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Decrypt.cc
+
+Decrypt.obj: $(POPPLER_SRC)/Decrypt.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Decrypt.obj -MD -MP -MF $(DEPDIR)/Decrypt.Tpo -c -o Decrypt.obj `if test -f '$(POPPLER_SRC)/Decrypt.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Decrypt.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Decrypt.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Decrypt.Tpo $(DEPDIR)/Decrypt.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Decrypt.cc' object='Decrypt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Decrypt.obj `if test -f '$(POPPLER_SRC)/Decrypt.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Decrypt.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Decrypt.cc'; fi`
+
+Dict.o: $(POPPLER_SRC)/Dict.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dict.o -MD -MP -MF $(DEPDIR)/Dict.Tpo -c -o Dict.o `test -f '$(POPPLER_SRC)/Dict.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Dict.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Dict.Tpo $(DEPDIR)/Dict.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Dict.cc' object='Dict.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dict.o `test -f '$(POPPLER_SRC)/Dict.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Dict.cc
+
+Dict.obj: $(POPPLER_SRC)/Dict.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dict.obj -MD -MP -MF $(DEPDIR)/Dict.Tpo -c -o Dict.obj `if test -f '$(POPPLER_SRC)/Dict.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Dict.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Dict.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Dict.Tpo $(DEPDIR)/Dict.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Dict.cc' object='Dict.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dict.obj `if test -f '$(POPPLER_SRC)/Dict.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Dict.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Dict.cc'; fi`
+
+Error.o: $(POPPLER_SRC)/Error.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Error.o -MD -MP -MF $(DEPDIR)/Error.Tpo -c -o Error.o `test -f '$(POPPLER_SRC)/Error.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Error.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Error.Tpo $(DEPDIR)/Error.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Error.cc' object='Error.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Error.o `test -f '$(POPPLER_SRC)/Error.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Error.cc
+
+Error.obj: $(POPPLER_SRC)/Error.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Error.obj -MD -MP -MF $(DEPDIR)/Error.Tpo -c -o Error.obj `if test -f '$(POPPLER_SRC)/Error.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Error.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Error.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Error.Tpo $(DEPDIR)/Error.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Error.cc' object='Error.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Error.obj `if test -f '$(POPPLER_SRC)/Error.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Error.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Error.cc'; fi`
+
+FileSpec.o: $(POPPLER_SRC)/FileSpec.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileSpec.o -MD -MP -MF $(DEPDIR)/FileSpec.Tpo -c -o FileSpec.o `test -f '$(POPPLER_SRC)/FileSpec.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FileSpec.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileSpec.Tpo $(DEPDIR)/FileSpec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FileSpec.cc' object='FileSpec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileSpec.o `test -f '$(POPPLER_SRC)/FileSpec.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FileSpec.cc
+
+FileSpec.obj: $(POPPLER_SRC)/FileSpec.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileSpec.obj -MD -MP -MF $(DEPDIR)/FileSpec.Tpo -c -o FileSpec.obj `if test -f '$(POPPLER_SRC)/FileSpec.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FileSpec.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FileSpec.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileSpec.Tpo $(DEPDIR)/FileSpec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FileSpec.cc' object='FileSpec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileSpec.obj `if test -f '$(POPPLER_SRC)/FileSpec.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FileSpec.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FileSpec.cc'; fi`
+
+FontEncodingTables.o: $(POPPLER_SRC)/FontEncodingTables.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FontEncodingTables.o -MD -MP -MF $(DEPDIR)/FontEncodingTables.Tpo -c -o FontEncodingTables.o `test -f '$(POPPLER_SRC)/FontEncodingTables.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FontEncodingTables.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FontEncodingTables.Tpo $(DEPDIR)/FontEncodingTables.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FontEncodingTables.cc' object='FontEncodingTables.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FontEncodingTables.o `test -f '$(POPPLER_SRC)/FontEncodingTables.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FontEncodingTables.cc
+
+FontEncodingTables.obj: $(POPPLER_SRC)/FontEncodingTables.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FontEncodingTables.obj -MD -MP -MF $(DEPDIR)/FontEncodingTables.Tpo -c -o FontEncodingTables.obj `if test -f '$(POPPLER_SRC)/FontEncodingTables.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FontEncodingTables.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FontEncodingTables.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FontEncodingTables.Tpo $(DEPDIR)/FontEncodingTables.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FontEncodingTables.cc' object='FontEncodingTables.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FontEncodingTables.obj `if test -f '$(POPPLER_SRC)/FontEncodingTables.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FontEncodingTables.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FontEncodingTables.cc'; fi`
+
+FontInfo.o: $(POPPLER_SRC)/FontInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FontInfo.o -MD -MP -MF $(DEPDIR)/FontInfo.Tpo -c -o FontInfo.o `test -f '$(POPPLER_SRC)/FontInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FontInfo.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FontInfo.Tpo $(DEPDIR)/FontInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FontInfo.cc' object='FontInfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FontInfo.o `test -f '$(POPPLER_SRC)/FontInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/FontInfo.cc
+
+FontInfo.obj: $(POPPLER_SRC)/FontInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FontInfo.obj -MD -MP -MF $(DEPDIR)/FontInfo.Tpo -c -o FontInfo.obj `if test -f '$(POPPLER_SRC)/FontInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FontInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FontInfo.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FontInfo.Tpo $(DEPDIR)/FontInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/FontInfo.cc' object='FontInfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FontInfo.obj `if test -f '$(POPPLER_SRC)/FontInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/FontInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/FontInfo.cc'; fi`
+
+Form.o: $(POPPLER_SRC)/Form.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Form.o -MD -MP -MF $(DEPDIR)/Form.Tpo -c -o Form.o `test -f '$(POPPLER_SRC)/Form.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Form.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Form.Tpo $(DEPDIR)/Form.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Form.cc' object='Form.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Form.o `test -f '$(POPPLER_SRC)/Form.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Form.cc
+
+Form.obj: $(POPPLER_SRC)/Form.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Form.obj -MD -MP -MF $(DEPDIR)/Form.Tpo -c -o Form.obj `if test -f '$(POPPLER_SRC)/Form.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Form.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Form.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Form.Tpo $(DEPDIR)/Form.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Form.cc' object='Form.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Form.obj `if test -f '$(POPPLER_SRC)/Form.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Form.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Form.cc'; fi`
+
+Function.o: $(POPPLER_SRC)/Function.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Function.o -MD -MP -MF $(DEPDIR)/Function.Tpo -c -o Function.o `test -f '$(POPPLER_SRC)/Function.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Function.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Function.Tpo $(DEPDIR)/Function.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Function.cc' object='Function.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Function.o `test -f '$(POPPLER_SRC)/Function.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Function.cc
+
+Function.obj: $(POPPLER_SRC)/Function.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Function.obj -MD -MP -MF $(DEPDIR)/Function.Tpo -c -o Function.obj `if test -f '$(POPPLER_SRC)/Function.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Function.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Function.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Function.Tpo $(DEPDIR)/Function.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Function.cc' object='Function.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Function.obj `if test -f '$(POPPLER_SRC)/Function.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Function.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Function.cc'; fi`
+
+Gfx.o: $(POPPLER_SRC)/Gfx.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Gfx.o -MD -MP -MF $(DEPDIR)/Gfx.Tpo -c -o Gfx.o `test -f '$(POPPLER_SRC)/Gfx.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Gfx.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Gfx.Tpo $(DEPDIR)/Gfx.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Gfx.cc' object='Gfx.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Gfx.o `test -f '$(POPPLER_SRC)/Gfx.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Gfx.cc
+
+Gfx.obj: $(POPPLER_SRC)/Gfx.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Gfx.obj -MD -MP -MF $(DEPDIR)/Gfx.Tpo -c -o Gfx.obj `if test -f '$(POPPLER_SRC)/Gfx.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Gfx.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Gfx.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Gfx.Tpo $(DEPDIR)/Gfx.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Gfx.cc' object='Gfx.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Gfx.obj `if test -f '$(POPPLER_SRC)/Gfx.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Gfx.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Gfx.cc'; fi`
+
+GfxFont.o: $(POPPLER_SRC)/GfxFont.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GfxFont.o -MD -MP -MF $(DEPDIR)/GfxFont.Tpo -c -o GfxFont.o `test -f '$(POPPLER_SRC)/GfxFont.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GfxFont.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GfxFont.Tpo $(DEPDIR)/GfxFont.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GfxFont.cc' object='GfxFont.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GfxFont.o `test -f '$(POPPLER_SRC)/GfxFont.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GfxFont.cc
+
+GfxFont.obj: $(POPPLER_SRC)/GfxFont.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GfxFont.obj -MD -MP -MF $(DEPDIR)/GfxFont.Tpo -c -o GfxFont.obj `if test -f '$(POPPLER_SRC)/GfxFont.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GfxFont.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GfxFont.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GfxFont.Tpo $(DEPDIR)/GfxFont.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GfxFont.cc' object='GfxFont.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GfxFont.obj `if test -f '$(POPPLER_SRC)/GfxFont.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GfxFont.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GfxFont.cc'; fi`
+
+GfxState.o: $(POPPLER_SRC)/GfxState.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GfxState.o -MD -MP -MF $(DEPDIR)/GfxState.Tpo -c -o GfxState.o `test -f '$(POPPLER_SRC)/GfxState.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GfxState.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GfxState.Tpo $(DEPDIR)/GfxState.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GfxState.cc' object='GfxState.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GfxState.o `test -f '$(POPPLER_SRC)/GfxState.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GfxState.cc
+
+GfxState.obj: $(POPPLER_SRC)/GfxState.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GfxState.obj -MD -MP -MF $(DEPDIR)/GfxState.Tpo -c -o GfxState.obj `if test -f '$(POPPLER_SRC)/GfxState.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GfxState.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GfxState.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GfxState.Tpo $(DEPDIR)/GfxState.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GfxState.cc' object='GfxState.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GfxState.obj `if test -f '$(POPPLER_SRC)/GfxState.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GfxState.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GfxState.cc'; fi`
+
+GlobalParams.o: $(POPPLER_SRC)/GlobalParams.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlobalParams.o -MD -MP -MF $(DEPDIR)/GlobalParams.Tpo -c -o GlobalParams.o `test -f '$(POPPLER_SRC)/GlobalParams.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GlobalParams.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlobalParams.Tpo $(DEPDIR)/GlobalParams.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GlobalParams.cc' object='GlobalParams.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlobalParams.o `test -f '$(POPPLER_SRC)/GlobalParams.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/GlobalParams.cc
+
+GlobalParams.obj: $(POPPLER_SRC)/GlobalParams.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlobalParams.obj -MD -MP -MF $(DEPDIR)/GlobalParams.Tpo -c -o GlobalParams.obj `if test -f '$(POPPLER_SRC)/GlobalParams.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GlobalParams.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GlobalParams.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlobalParams.Tpo $(DEPDIR)/GlobalParams.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/GlobalParams.cc' object='GlobalParams.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlobalParams.obj `if test -f '$(POPPLER_SRC)/GlobalParams.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/GlobalParams.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/GlobalParams.cc'; fi`
+
+JArithmeticDecoder.o: $(POPPLER_SRC)/JArithmeticDecoder.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JArithmeticDecoder.o -MD -MP -MF $(DEPDIR)/JArithmeticDecoder.Tpo -c -o JArithmeticDecoder.o `test -f '$(POPPLER_SRC)/JArithmeticDecoder.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JArithmeticDecoder.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JArithmeticDecoder.Tpo $(DEPDIR)/JArithmeticDecoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JArithmeticDecoder.cc' object='JArithmeticDecoder.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JArithmeticDecoder.o `test -f '$(POPPLER_SRC)/JArithmeticDecoder.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JArithmeticDecoder.cc
+
+JArithmeticDecoder.obj: $(POPPLER_SRC)/JArithmeticDecoder.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JArithmeticDecoder.obj -MD -MP -MF $(DEPDIR)/JArithmeticDecoder.Tpo -c -o JArithmeticDecoder.obj `if test -f '$(POPPLER_SRC)/JArithmeticDecoder.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JArithmeticDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JArithmeticDecoder.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JArithmeticDecoder.Tpo $(DEPDIR)/JArithmeticDecoder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JArithmeticDecoder.cc' object='JArithmeticDecoder.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JArithmeticDecoder.obj `if test -f '$(POPPLER_SRC)/JArithmeticDecoder.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JArithmeticDecoder.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JArithmeticDecoder.cc'; fi`
+
+JBIG2Stream.o: $(POPPLER_SRC)/JBIG2Stream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JBIG2Stream.o -MD -MP -MF $(DEPDIR)/JBIG2Stream.Tpo -c -o JBIG2Stream.o `test -f '$(POPPLER_SRC)/JBIG2Stream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JBIG2Stream.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JBIG2Stream.Tpo $(DEPDIR)/JBIG2Stream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JBIG2Stream.cc' object='JBIG2Stream.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JBIG2Stream.o `test -f '$(POPPLER_SRC)/JBIG2Stream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JBIG2Stream.cc
+
+JBIG2Stream.obj: $(POPPLER_SRC)/JBIG2Stream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JBIG2Stream.obj -MD -MP -MF $(DEPDIR)/JBIG2Stream.Tpo -c -o JBIG2Stream.obj `if test -f '$(POPPLER_SRC)/JBIG2Stream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JBIG2Stream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JBIG2Stream.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JBIG2Stream.Tpo $(DEPDIR)/JBIG2Stream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JBIG2Stream.cc' object='JBIG2Stream.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JBIG2Stream.obj `if test -f '$(POPPLER_SRC)/JBIG2Stream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JBIG2Stream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JBIG2Stream.cc'; fi`
+
+JPXStream.o: $(POPPLER_SRC)/JPXStream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JPXStream.o -MD -MP -MF $(DEPDIR)/JPXStream.Tpo -c -o JPXStream.o `test -f '$(POPPLER_SRC)/JPXStream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JPXStream.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JPXStream.Tpo $(DEPDIR)/JPXStream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JPXStream.cc' object='JPXStream.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JPXStream.o `test -f '$(POPPLER_SRC)/JPXStream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/JPXStream.cc
+
+JPXStream.obj: $(POPPLER_SRC)/JPXStream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JPXStream.obj -MD -MP -MF $(DEPDIR)/JPXStream.Tpo -c -o JPXStream.obj `if test -f '$(POPPLER_SRC)/JPXStream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JPXStream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JPXStream.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/JPXStream.Tpo $(DEPDIR)/JPXStream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/JPXStream.cc' object='JPXStream.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JPXStream.obj `if test -f '$(POPPLER_SRC)/JPXStream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/JPXStream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/JPXStream.cc'; fi`
+
+Lexer.o: $(POPPLER_SRC)/Lexer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Lexer.o -MD -MP -MF $(DEPDIR)/Lexer.Tpo -c -o Lexer.o `test -f '$(POPPLER_SRC)/Lexer.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Lexer.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Lexer.Tpo $(DEPDIR)/Lexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Lexer.cc' object='Lexer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Lexer.o `test -f '$(POPPLER_SRC)/Lexer.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Lexer.cc
+
+Lexer.obj: $(POPPLER_SRC)/Lexer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Lexer.obj -MD -MP -MF $(DEPDIR)/Lexer.Tpo -c -o Lexer.obj `if test -f '$(POPPLER_SRC)/Lexer.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Lexer.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Lexer.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Lexer.Tpo $(DEPDIR)/Lexer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Lexer.cc' object='Lexer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Lexer.obj `if test -f '$(POPPLER_SRC)/Lexer.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Lexer.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Lexer.cc'; fi`
+
+Link.o: $(POPPLER_SRC)/Link.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Link.o -MD -MP -MF $(DEPDIR)/Link.Tpo -c -o Link.o `test -f '$(POPPLER_SRC)/Link.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Link.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Link.Tpo $(DEPDIR)/Link.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Link.cc' object='Link.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Link.o `test -f '$(POPPLER_SRC)/Link.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Link.cc
+
+Link.obj: $(POPPLER_SRC)/Link.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Link.obj -MD -MP -MF $(DEPDIR)/Link.Tpo -c -o Link.obj `if test -f '$(POPPLER_SRC)/Link.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Link.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Link.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Link.Tpo $(DEPDIR)/Link.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Link.cc' object='Link.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Link.obj `if test -f '$(POPPLER_SRC)/Link.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Link.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Link.cc'; fi`
+
+Movie.o: $(POPPLER_SRC)/Movie.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Movie.o -MD -MP -MF $(DEPDIR)/Movie.Tpo -c -o Movie.o `test -f '$(POPPLER_SRC)/Movie.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Movie.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Movie.Tpo $(DEPDIR)/Movie.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Movie.cc' object='Movie.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Movie.o `test -f '$(POPPLER_SRC)/Movie.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Movie.cc
+
+Movie.obj: $(POPPLER_SRC)/Movie.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Movie.obj -MD -MP -MF $(DEPDIR)/Movie.Tpo -c -o Movie.obj `if test -f '$(POPPLER_SRC)/Movie.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Movie.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Movie.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Movie.Tpo $(DEPDIR)/Movie.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Movie.cc' object='Movie.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Movie.obj `if test -f '$(POPPLER_SRC)/Movie.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Movie.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Movie.cc'; fi`
+
+NameToCharCode.o: $(POPPLER_SRC)/NameToCharCode.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NameToCharCode.o -MD -MP -MF $(DEPDIR)/NameToCharCode.Tpo -c -o NameToCharCode.o `test -f '$(POPPLER_SRC)/NameToCharCode.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/NameToCharCode.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NameToCharCode.Tpo $(DEPDIR)/NameToCharCode.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/NameToCharCode.cc' object='NameToCharCode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameToCharCode.o `test -f '$(POPPLER_SRC)/NameToCharCode.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/NameToCharCode.cc
+
+NameToCharCode.obj: $(POPPLER_SRC)/NameToCharCode.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NameToCharCode.obj -MD -MP -MF $(DEPDIR)/NameToCharCode.Tpo -c -o NameToCharCode.obj `if test -f '$(POPPLER_SRC)/NameToCharCode.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/NameToCharCode.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/NameToCharCode.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NameToCharCode.Tpo $(DEPDIR)/NameToCharCode.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/NameToCharCode.cc' object='NameToCharCode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameToCharCode.obj `if test -f '$(POPPLER_SRC)/NameToCharCode.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/NameToCharCode.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/NameToCharCode.cc'; fi`
+
+Object.o: $(POPPLER_SRC)/Object.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Object.o -MD -MP -MF $(DEPDIR)/Object.Tpo -c -o Object.o `test -f '$(POPPLER_SRC)/Object.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Object.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Object.Tpo $(DEPDIR)/Object.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Object.cc' object='Object.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Object.o `test -f '$(POPPLER_SRC)/Object.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Object.cc
+
+Object.obj: $(POPPLER_SRC)/Object.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Object.obj -MD -MP -MF $(DEPDIR)/Object.Tpo -c -o Object.obj `if test -f '$(POPPLER_SRC)/Object.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Object.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Object.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Object.Tpo $(DEPDIR)/Object.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Object.cc' object='Object.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Object.obj `if test -f '$(POPPLER_SRC)/Object.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Object.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Object.cc'; fi`
+
+OptionalContent.o: $(POPPLER_SRC)/OptionalContent.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OptionalContent.o -MD -MP -MF $(DEPDIR)/OptionalContent.Tpo -c -o OptionalContent.o `test -f '$(POPPLER_SRC)/OptionalContent.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/OptionalContent.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OptionalContent.Tpo $(DEPDIR)/OptionalContent.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/OptionalContent.cc' object='OptionalContent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OptionalContent.o `test -f '$(POPPLER_SRC)/OptionalContent.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/OptionalContent.cc
+
+OptionalContent.obj: $(POPPLER_SRC)/OptionalContent.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OptionalContent.obj -MD -MP -MF $(DEPDIR)/OptionalContent.Tpo -c -o OptionalContent.obj `if test -f '$(POPPLER_SRC)/OptionalContent.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/OptionalContent.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/OptionalContent.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OptionalContent.Tpo $(DEPDIR)/OptionalContent.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/OptionalContent.cc' object='OptionalContent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OptionalContent.obj `if test -f '$(POPPLER_SRC)/OptionalContent.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/OptionalContent.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/OptionalContent.cc'; fi`
+
+Outline.o: $(POPPLER_SRC)/Outline.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Outline.o -MD -MP -MF $(DEPDIR)/Outline.Tpo -c -o Outline.o `test -f '$(POPPLER_SRC)/Outline.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Outline.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Outline.Tpo $(DEPDIR)/Outline.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Outline.cc' object='Outline.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Outline.o `test -f '$(POPPLER_SRC)/Outline.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Outline.cc
+
+Outline.obj: $(POPPLER_SRC)/Outline.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Outline.obj -MD -MP -MF $(DEPDIR)/Outline.Tpo -c -o Outline.obj `if test -f '$(POPPLER_SRC)/Outline.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Outline.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Outline.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Outline.Tpo $(DEPDIR)/Outline.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Outline.cc' object='Outline.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Outline.obj `if test -f '$(POPPLER_SRC)/Outline.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Outline.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Outline.cc'; fi`
+
+OutputDev.o: $(POPPLER_SRC)/OutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OutputDev.o -MD -MP -MF $(DEPDIR)/OutputDev.Tpo -c -o OutputDev.o `test -f '$(POPPLER_SRC)/OutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/OutputDev.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OutputDev.Tpo $(DEPDIR)/OutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/OutputDev.cc' object='OutputDev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OutputDev.o `test -f '$(POPPLER_SRC)/OutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/OutputDev.cc
+
+OutputDev.obj: $(POPPLER_SRC)/OutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OutputDev.obj -MD -MP -MF $(DEPDIR)/OutputDev.Tpo -c -o OutputDev.obj `if test -f '$(POPPLER_SRC)/OutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/OutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/OutputDev.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OutputDev.Tpo $(DEPDIR)/OutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/OutputDev.cc' object='OutputDev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OutputDev.obj `if test -f '$(POPPLER_SRC)/OutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/OutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/OutputDev.cc'; fi`
+
+PDFDoc.o: $(POPPLER_SRC)/PDFDoc.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PDFDoc.o -MD -MP -MF $(DEPDIR)/PDFDoc.Tpo -c -o PDFDoc.o `test -f '$(POPPLER_SRC)/PDFDoc.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PDFDoc.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PDFDoc.Tpo $(DEPDIR)/PDFDoc.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PDFDoc.cc' object='PDFDoc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PDFDoc.o `test -f '$(POPPLER_SRC)/PDFDoc.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PDFDoc.cc
+
+PDFDoc.obj: $(POPPLER_SRC)/PDFDoc.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PDFDoc.obj -MD -MP -MF $(DEPDIR)/PDFDoc.Tpo -c -o PDFDoc.obj `if test -f '$(POPPLER_SRC)/PDFDoc.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PDFDoc.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PDFDoc.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PDFDoc.Tpo $(DEPDIR)/PDFDoc.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PDFDoc.cc' object='PDFDoc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PDFDoc.obj `if test -f '$(POPPLER_SRC)/PDFDoc.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PDFDoc.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PDFDoc.cc'; fi`
+
+PDFDocEncoding.o: $(POPPLER_SRC)/PDFDocEncoding.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PDFDocEncoding.o -MD -MP -MF $(DEPDIR)/PDFDocEncoding.Tpo -c -o PDFDocEncoding.o `test -f '$(POPPLER_SRC)/PDFDocEncoding.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PDFDocEncoding.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PDFDocEncoding.Tpo $(DEPDIR)/PDFDocEncoding.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PDFDocEncoding.cc' object='PDFDocEncoding.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PDFDocEncoding.o `test -f '$(POPPLER_SRC)/PDFDocEncoding.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PDFDocEncoding.cc
+
+PDFDocEncoding.obj: $(POPPLER_SRC)/PDFDocEncoding.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PDFDocEncoding.obj -MD -MP -MF $(DEPDIR)/PDFDocEncoding.Tpo -c -o PDFDocEncoding.obj `if test -f '$(POPPLER_SRC)/PDFDocEncoding.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PDFDocEncoding.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PDFDocEncoding.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PDFDocEncoding.Tpo $(DEPDIR)/PDFDocEncoding.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PDFDocEncoding.cc' object='PDFDocEncoding.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PDFDocEncoding.obj `if test -f '$(POPPLER_SRC)/PDFDocEncoding.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PDFDocEncoding.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PDFDocEncoding.cc'; fi`
+
+PSOutputDev.o: $(POPPLER_SRC)/PSOutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PSOutputDev.o -MD -MP -MF $(DEPDIR)/PSOutputDev.Tpo -c -o PSOutputDev.o `test -f '$(POPPLER_SRC)/PSOutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PSOutputDev.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PSOutputDev.Tpo $(DEPDIR)/PSOutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PSOutputDev.cc' object='PSOutputDev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PSOutputDev.o `test -f '$(POPPLER_SRC)/PSOutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PSOutputDev.cc
+
+PSOutputDev.obj: $(POPPLER_SRC)/PSOutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PSOutputDev.obj -MD -MP -MF $(DEPDIR)/PSOutputDev.Tpo -c -o PSOutputDev.obj `if test -f '$(POPPLER_SRC)/PSOutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PSOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PSOutputDev.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PSOutputDev.Tpo $(DEPDIR)/PSOutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PSOutputDev.cc' object='PSOutputDev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PSOutputDev.obj `if test -f '$(POPPLER_SRC)/PSOutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PSOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PSOutputDev.cc'; fi`
+
+PSTokenizer.o: $(POPPLER_SRC)/PSTokenizer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PSTokenizer.o -MD -MP -MF $(DEPDIR)/PSTokenizer.Tpo -c -o PSTokenizer.o `test -f '$(POPPLER_SRC)/PSTokenizer.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PSTokenizer.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PSTokenizer.Tpo $(DEPDIR)/PSTokenizer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PSTokenizer.cc' object='PSTokenizer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PSTokenizer.o `test -f '$(POPPLER_SRC)/PSTokenizer.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PSTokenizer.cc
+
+PSTokenizer.obj: $(POPPLER_SRC)/PSTokenizer.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PSTokenizer.obj -MD -MP -MF $(DEPDIR)/PSTokenizer.Tpo -c -o PSTokenizer.obj `if test -f '$(POPPLER_SRC)/PSTokenizer.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PSTokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PSTokenizer.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PSTokenizer.Tpo $(DEPDIR)/PSTokenizer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PSTokenizer.cc' object='PSTokenizer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PSTokenizer.obj `if test -f '$(POPPLER_SRC)/PSTokenizer.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PSTokenizer.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PSTokenizer.cc'; fi`
+
+Page.o: $(POPPLER_SRC)/Page.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Page.o -MD -MP -MF $(DEPDIR)/Page.Tpo -c -o Page.o `test -f '$(POPPLER_SRC)/Page.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Page.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Page.Tpo $(DEPDIR)/Page.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Page.cc' object='Page.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Page.o `test -f '$(POPPLER_SRC)/Page.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Page.cc
+
+Page.obj: $(POPPLER_SRC)/Page.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Page.obj -MD -MP -MF $(DEPDIR)/Page.Tpo -c -o Page.obj `if test -f '$(POPPLER_SRC)/Page.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Page.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Page.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Page.Tpo $(DEPDIR)/Page.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Page.cc' object='Page.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Page.obj `if test -f '$(POPPLER_SRC)/Page.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Page.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Page.cc'; fi`
+
+PageLabelInfo.o: $(POPPLER_SRC)/PageLabelInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PageLabelInfo.o -MD -MP -MF $(DEPDIR)/PageLabelInfo.Tpo -c -o PageLabelInfo.o `test -f '$(POPPLER_SRC)/PageLabelInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PageLabelInfo.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PageLabelInfo.Tpo $(DEPDIR)/PageLabelInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PageLabelInfo.cc' object='PageLabelInfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PageLabelInfo.o `test -f '$(POPPLER_SRC)/PageLabelInfo.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PageLabelInfo.cc
+
+PageLabelInfo.obj: $(POPPLER_SRC)/PageLabelInfo.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PageLabelInfo.obj -MD -MP -MF $(DEPDIR)/PageLabelInfo.Tpo -c -o PageLabelInfo.obj `if test -f '$(POPPLER_SRC)/PageLabelInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PageLabelInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PageLabelInfo.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PageLabelInfo.Tpo $(DEPDIR)/PageLabelInfo.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PageLabelInfo.cc' object='PageLabelInfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PageLabelInfo.obj `if test -f '$(POPPLER_SRC)/PageLabelInfo.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PageLabelInfo.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PageLabelInfo.cc'; fi`
+
+PageTransition.o: $(POPPLER_SRC)/PageTransition.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PageTransition.o -MD -MP -MF $(DEPDIR)/PageTransition.Tpo -c -o PageTransition.o `test -f '$(POPPLER_SRC)/PageTransition.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PageTransition.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PageTransition.Tpo $(DEPDIR)/PageTransition.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PageTransition.cc' object='PageTransition.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PageTransition.o `test -f '$(POPPLER_SRC)/PageTransition.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PageTransition.cc
+
+PageTransition.obj: $(POPPLER_SRC)/PageTransition.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PageTransition.obj -MD -MP -MF $(DEPDIR)/PageTransition.Tpo -c -o PageTransition.obj `if test -f '$(POPPLER_SRC)/PageTransition.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PageTransition.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PageTransition.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PageTransition.Tpo $(DEPDIR)/PageTransition.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PageTransition.cc' object='PageTransition.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PageTransition.obj `if test -f '$(POPPLER_SRC)/PageTransition.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PageTransition.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PageTransition.cc'; fi`
+
+Parser.o: $(POPPLER_SRC)/Parser.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Parser.o -MD -MP -MF $(DEPDIR)/Parser.Tpo -c -o Parser.o `test -f '$(POPPLER_SRC)/Parser.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Parser.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Parser.Tpo $(DEPDIR)/Parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Parser.cc' object='Parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Parser.o `test -f '$(POPPLER_SRC)/Parser.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Parser.cc
+
+Parser.obj: $(POPPLER_SRC)/Parser.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Parser.obj -MD -MP -MF $(DEPDIR)/Parser.Tpo -c -o Parser.obj `if test -f '$(POPPLER_SRC)/Parser.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Parser.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Parser.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Parser.Tpo $(DEPDIR)/Parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Parser.cc' object='Parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Parser.obj `if test -f '$(POPPLER_SRC)/Parser.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Parser.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Parser.cc'; fi`
+
+PopplerCache.o: $(POPPLER_SRC)/PopplerCache.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PopplerCache.o -MD -MP -MF $(DEPDIR)/PopplerCache.Tpo -c -o PopplerCache.o `test -f '$(POPPLER_SRC)/PopplerCache.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PopplerCache.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PopplerCache.Tpo $(DEPDIR)/PopplerCache.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PopplerCache.cc' object='PopplerCache.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PopplerCache.o `test -f '$(POPPLER_SRC)/PopplerCache.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PopplerCache.cc
+
+PopplerCache.obj: $(POPPLER_SRC)/PopplerCache.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PopplerCache.obj -MD -MP -MF $(DEPDIR)/PopplerCache.Tpo -c -o PopplerCache.obj `if test -f '$(POPPLER_SRC)/PopplerCache.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PopplerCache.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PopplerCache.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PopplerCache.Tpo $(DEPDIR)/PopplerCache.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PopplerCache.cc' object='PopplerCache.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PopplerCache.obj `if test -f '$(POPPLER_SRC)/PopplerCache.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PopplerCache.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PopplerCache.cc'; fi`
+
+PreScanOutputDev.o: $(POPPLER_SRC)/PreScanOutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PreScanOutputDev.o -MD -MP -MF $(DEPDIR)/PreScanOutputDev.Tpo -c -o PreScanOutputDev.o `test -f '$(POPPLER_SRC)/PreScanOutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PreScanOutputDev.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PreScanOutputDev.Tpo $(DEPDIR)/PreScanOutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PreScanOutputDev.cc' object='PreScanOutputDev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PreScanOutputDev.o `test -f '$(POPPLER_SRC)/PreScanOutputDev.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/PreScanOutputDev.cc
+
+PreScanOutputDev.obj: $(POPPLER_SRC)/PreScanOutputDev.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PreScanOutputDev.obj -MD -MP -MF $(DEPDIR)/PreScanOutputDev.Tpo -c -o PreScanOutputDev.obj `if test -f '$(POPPLER_SRC)/PreScanOutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PreScanOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PreScanOutputDev.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PreScanOutputDev.Tpo $(DEPDIR)/PreScanOutputDev.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/PreScanOutputDev.cc' object='PreScanOutputDev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PreScanOutputDev.obj `if test -f '$(POPPLER_SRC)/PreScanOutputDev.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/PreScanOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/PreScanOutputDev.cc'; fi`
+
+ProfileData.o: $(POPPLER_SRC)/ProfileData.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ProfileData.o -MD -MP -MF $(DEPDIR)/ProfileData.Tpo -c -o ProfileData.o `test -f '$(POPPLER_SRC)/ProfileData.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/ProfileData.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ProfileData.Tpo $(DEPDIR)/ProfileData.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/ProfileData.cc' object='ProfileData.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ProfileData.o `test -f '$(POPPLER_SRC)/ProfileData.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/ProfileData.cc
+
+ProfileData.obj: $(POPPLER_SRC)/ProfileData.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ProfileData.obj -MD -MP -MF $(DEPDIR)/ProfileData.Tpo -c -o ProfileData.obj `if test -f '$(POPPLER_SRC)/ProfileData.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/ProfileData.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/ProfileData.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ProfileData.Tpo $(DEPDIR)/ProfileData.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/ProfileData.cc' object='ProfileData.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ProfileData.obj `if test -f '$(POPPLER_SRC)/ProfileData.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/ProfileData.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/ProfileData.cc'; fi`
+
+SecurityHandler.o: $(POPPLER_SRC)/SecurityHandler.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SecurityHandler.o -MD -MP -MF $(DEPDIR)/SecurityHandler.Tpo -c -o SecurityHandler.o `test -f '$(POPPLER_SRC)/SecurityHandler.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/SecurityHandler.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SecurityHandler.Tpo $(DEPDIR)/SecurityHandler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/SecurityHandler.cc' object='SecurityHandler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SecurityHandler.o `test -f '$(POPPLER_SRC)/SecurityHandler.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/SecurityHandler.cc
+
+SecurityHandler.obj: $(POPPLER_SRC)/SecurityHandler.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SecurityHandler.obj -MD -MP -MF $(DEPDIR)/SecurityHandler.Tpo -c -o SecurityHandler.obj `if test -f '$(POPPLER_SRC)/SecurityHandler.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/SecurityHandler.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/SecurityHandler.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SecurityHandler.Tpo $(DEPDIR)/SecurityHandler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/SecurityHandler.cc' object='SecurityHandler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SecurityHandler.obj `if test -f '$(POPPLER_SRC)/SecurityHandler.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/SecurityHandler.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/SecurityHandler.cc'; fi`
+
+Sound.o: $(POPPLER_SRC)/Sound.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Sound.o -MD -MP -MF $(DEPDIR)/Sound.Tpo -c -o Sound.o `test -f '$(POPPLER_SRC)/Sound.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Sound.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Sound.Tpo $(DEPDIR)/Sound.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Sound.cc' object='Sound.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Sound.o `test -f '$(POPPLER_SRC)/Sound.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Sound.cc
+
+Sound.obj: $(POPPLER_SRC)/Sound.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Sound.obj -MD -MP -MF $(DEPDIR)/Sound.Tpo -c -o Sound.obj `if test -f '$(POPPLER_SRC)/Sound.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Sound.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Sound.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Sound.Tpo $(DEPDIR)/Sound.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Sound.cc' object='Sound.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Sound.obj `if test -f '$(POPPLER_SRC)/Sound.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Sound.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Sound.cc'; fi`
+
+Stream.o: $(POPPLER_SRC)/Stream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Stream.o -MD -MP -MF $(DEPDIR)/Stream.Tpo -c -o Stream.o `test -f '$(POPPLER_SRC)/Stream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Stream.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Stream.Tpo $(DEPDIR)/Stream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Stream.cc' object='Stream.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Stream.o `test -f '$(POPPLER_SRC)/Stream.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/Stream.cc
+
+Stream.obj: $(POPPLER_SRC)/Stream.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Stream.obj -MD -MP -MF $(DEPDIR)/Stream.Tpo -c -o Stream.obj `if test -f '$(POPPLER_SRC)/Stream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Stream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Stream.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Stream.Tpo $(DEPDIR)/Stream.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/Stream.cc' object='Stream.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Stream.obj `if test -f '$(POPPLER_SRC)/Stream.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/Stream.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/Stream.cc'; fi`
+
+UnicodeMap.o: $(POPPLER_SRC)/UnicodeMap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UnicodeMap.o -MD -MP -MF $(DEPDIR)/UnicodeMap.Tpo -c -o UnicodeMap.o `test -f '$(POPPLER_SRC)/UnicodeMap.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/UnicodeMap.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UnicodeMap.Tpo $(DEPDIR)/UnicodeMap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/UnicodeMap.cc' object='UnicodeMap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UnicodeMap.o `test -f '$(POPPLER_SRC)/UnicodeMap.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/UnicodeMap.cc
+
+UnicodeMap.obj: $(POPPLER_SRC)/UnicodeMap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UnicodeMap.obj -MD -MP -MF $(DEPDIR)/UnicodeMap.Tpo -c -o UnicodeMap.obj `if test -f '$(POPPLER_SRC)/UnicodeMap.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/UnicodeMap.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/UnicodeMap.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UnicodeMap.Tpo $(DEPDIR)/UnicodeMap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/UnicodeMap.cc' object='UnicodeMap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UnicodeMap.obj `if test -f '$(POPPLER_SRC)/UnicodeMap.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/UnicodeMap.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/UnicodeMap.cc'; fi`
+
+UnicodeTypeTable.o: $(POPPLER_SRC)/UnicodeTypeTable.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UnicodeTypeTable.o -MD -MP -MF $(DEPDIR)/UnicodeTypeTable.Tpo -c -o UnicodeTypeTable.o `test -f '$(POPPLER_SRC)/UnicodeTypeTable.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/UnicodeTypeTable.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UnicodeTypeTable.Tpo $(DEPDIR)/UnicodeTypeTable.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/UnicodeTypeTable.cc' object='UnicodeTypeTable.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UnicodeTypeTable.o `test -f '$(POPPLER_SRC)/UnicodeTypeTable.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/UnicodeTypeTable.cc
+
+UnicodeTypeTable.obj: $(POPPLER_SRC)/UnicodeTypeTable.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UnicodeTypeTable.obj -MD -MP -MF $(DEPDIR)/UnicodeTypeTable.Tpo -c -o UnicodeTypeTable.obj `if test -f '$(POPPLER_SRC)/UnicodeTypeTable.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/UnicodeTypeTable.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/UnicodeTypeTable.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UnicodeTypeTable.Tpo $(DEPDIR)/UnicodeTypeTable.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/UnicodeTypeTable.cc' object='UnicodeTypeTable.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UnicodeTypeTable.obj `if test -f '$(POPPLER_SRC)/UnicodeTypeTable.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/UnicodeTypeTable.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/UnicodeTypeTable.cc'; fi`
+
+XRef.o: $(POPPLER_SRC)/XRef.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XRef.o -MD -MP -MF $(DEPDIR)/XRef.Tpo -c -o XRef.o `test -f '$(POPPLER_SRC)/XRef.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/XRef.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XRef.Tpo $(DEPDIR)/XRef.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/XRef.cc' object='XRef.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XRef.o `test -f '$(POPPLER_SRC)/XRef.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/XRef.cc
+
+XRef.obj: $(POPPLER_SRC)/XRef.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XRef.obj -MD -MP -MF $(DEPDIR)/XRef.Tpo -c -o XRef.obj `if test -f '$(POPPLER_SRC)/XRef.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/XRef.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/XRef.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XRef.Tpo $(DEPDIR)/XRef.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/XRef.cc' object='XRef.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XRef.obj `if test -f '$(POPPLER_SRC)/XRef.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/XRef.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/XRef.cc'; fi`
+
+XpdfPluginAPI.o: $(POPPLER_SRC)/XpdfPluginAPI.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XpdfPluginAPI.o -MD -MP -MF $(DEPDIR)/XpdfPluginAPI.Tpo -c -o XpdfPluginAPI.o `test -f '$(POPPLER_SRC)/XpdfPluginAPI.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/XpdfPluginAPI.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XpdfPluginAPI.Tpo $(DEPDIR)/XpdfPluginAPI.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/XpdfPluginAPI.cc' object='XpdfPluginAPI.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XpdfPluginAPI.o `test -f '$(POPPLER_SRC)/XpdfPluginAPI.cc' || echo '$(srcdir)/'`$(POPPLER_SRC)/XpdfPluginAPI.cc
+
+XpdfPluginAPI.obj: $(POPPLER_SRC)/XpdfPluginAPI.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XpdfPluginAPI.obj -MD -MP -MF $(DEPDIR)/XpdfPluginAPI.Tpo -c -o XpdfPluginAPI.obj `if test -f '$(POPPLER_SRC)/XpdfPluginAPI.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/XpdfPluginAPI.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/XpdfPluginAPI.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XpdfPluginAPI.Tpo $(DEPDIR)/XpdfPluginAPI.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(POPPLER_SRC)/XpdfPluginAPI.cc' object='XpdfPluginAPI.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XpdfPluginAPI.obj `if test -f '$(POPPLER_SRC)/XpdfPluginAPI.cc'; then $(CYGPATH_W) '$(POPPLER_SRC)/XpdfPluginAPI.cc'; else $(CYGPATH_W) '$(srcdir)/$(POPPLER_SRC)/XpdfPluginAPI.cc'; fi`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) aconf.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) aconf.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) aconf.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) aconf.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LIBRARIES) aconf.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-noinstLIBRARIES ctags ctags-recursive dist dist-all \
+ dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+# Rebuild
+.PHONY: rebuild
+rebuild: all
+
+# in case of an SVN repository
+dist-hook:
+ rm -rf `find $(distdir) -name .svn`
+ rm -f $(distdir)/$(POPPLER_TREE)/install-sh
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/ac/poppler.ac b/Build/source/libs/poppler/ac/poppler.ac
new file mode 100644
index 00000000000..197e4d12dad
--- /dev/null
+++ b/Build/source/libs/poppler/ac/poppler.ac
@@ -0,0 +1,9 @@
+## libs/poppler/ac/poppler.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## basic check of system poppler (poppler)
+KPSE_TRY_LIBXX([poppler],
+ [#include <GfxFont.h>],
+ [GfxFont *gfxFont; gfxFont->decRefCnt();])
diff --git a/Build/source/libs/poppler/ac/withenable.ac b/Build/source/libs/poppler/ac/withenable.ac
new file mode 100644
index 00000000000..1e5b3a42c5e
--- /dev/null
+++ b/Build/source/libs/poppler/ac/withenable.ac
@@ -0,0 +1,7 @@
+## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## configure options and TL libraries required for poppler
+KPSE_WITH_LIB([poppler])
diff --git a/Build/source/libs/poppler/aclocal.m4 b/Build/source/libs/poppler/aclocal.m4
new file mode 100644
index 00000000000..76a153698ad
--- /dev/null
+++ b/Build/source/libs/poppler/aclocal.m4
@@ -0,0 +1,991 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/Build/source/libs/poppler/aconf.h.in b/Build/source/libs/poppler/aconf.h.in
new file mode 100644
index 00000000000..ac9fba5dc28
--- /dev/null
+++ b/Build/source/libs/poppler/aconf.h.in
@@ -0,0 +1,116 @@
+/* aconf.h.in. Generated from configure.ac by autoheader. */
+
+/*
+ * aconf.h
+ *
+ * Copyright 2002-2003 Glyph & Cog, LLC
+ */
+
+#ifndef ACONF_H
+#define ACONF_H
+
+/*
+ * Enable C++ exceptions.
+ */
+#undef USE_EXCEPTIONS
+
+/* Use A4 paper size instead of Letter for PostScript output */
+#undef A4_PAPER
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the `mkstemps' function. */
+#undef HAVE_MKSTEMPS
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the `popen' function. */
+#undef HAVE_POPEN
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Enable multithreading support */
+#undef MULTITHREADED
+
+/* Include support for OPI comments */
+#undef OPI_SUPPORT
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+#endif
diff --git a/Build/source/libs/poppler/configure b/Build/source/libs/poppler/configure
new file mode 100755
index 00000000000..f41238daee5
--- /dev/null
+++ b/Build/source/libs/poppler/configure
@@ -0,0 +1,6549 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for poppler for TeX Live 0.12.4.
+#
+# Report bugs to <tex-k@tug.org>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='poppler for TeX Live'
+PACKAGE_TARNAME='poppler-for-tex-live'
+PACKAGE_VERSION='0.12.4'
+PACKAGE_STRING='poppler for TeX Live 0.12.4'
+PACKAGE_BUGREPORT='tex-k@tug.org'
+PACKAGE_URL=''
+
+ac_unique_file="poppler-0.12.4/poppler/Array.cc"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+POPPLER_TREE
+EGREP
+GREP
+CPP
+LN_S
+RANLIB
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_a4_paper
+enable_opi
+enable_multithreaded
+enable_dependency_tracking
+enable_largefile
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures poppler for TeX Live 0.12.4 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root
+ [DATAROOTDIR/doc/poppler-for-tex-live]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of poppler for TeX Live 0.12.4:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-a4-paper use A4 paper size instead of Letter for PostScript
+ output
+ --enable-opi include support for OPI comments
+ --enable-multithreaded include support for multithreading
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-largefile omit support for large files
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <tex-k@tug.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+poppler for TeX Live configure 0.12.4
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ---------------------------- ##
+## Report this to tex-k@tug.org ##
+## ---------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by poppler for TeX Live $as_me 0.12.4, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../build-aux "$srcdir"/../../build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='poppler-for-tex-live'
+ VERSION='0.12.4'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Check whether --enable-a4-paper was given.
+if test "${enable_a4_paper+set}" = set; then :
+ enableval=$enable_a4_paper; if test "x$enableval" = xyes; then
+
+$as_echo "#define A4_PAPER 1" >>confdefs.h
+
+fi
+
+fi
+
+
+# Check whether --enable-opi was given.
+if test "${enable_opi+set}" = set; then :
+ enableval=$enable_opi; if test "x$enableval" = xyes; then
+
+$as_echo "#define OPI_SUPPORT 1" >>confdefs.h
+
+fi
+
+fi
+
+
+# Check whether --enable-multithreaded was given.
+if test "${enable_multithreaded+set}" = set; then :
+ enableval=$enable_multithreaded; if test "x$enableval" = xyes; then
+
+$as_echo "#define MULTITHREADED 1" >>confdefs.h
+
+fi
+
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in strings.h sys/select.h time.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+
+
+for ac_func in popen mkstemp mkstemps
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if ${ac_cv_sys_file_offset_bits+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if ${ac_cv_sys_large_files+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_source+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+ac_config_headers="$ac_config_headers aconf.h"
+
+
+
+
+
+POPPLER_TREE=poppler-0.12.4
+
+
+ac_config_files="$ac_config_files Makefile poppler/Makefile goo/Makefile fofi/Makefile"
+
+
+ac_config_headers="$ac_config_headers poppler-0.12.4/config.h"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by poppler for TeX Live $as_me 0.12.4, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <tex-k@tug.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+poppler for TeX Live config.status 0.12.4
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "aconf.h") CONFIG_HEADERS="$CONFIG_HEADERS aconf.h" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "poppler/Makefile") CONFIG_FILES="$CONFIG_FILES poppler/Makefile" ;;
+ "goo/Makefile") CONFIG_FILES="$CONFIG_FILES goo/Makefile" ;;
+ "fofi/Makefile") CONFIG_FILES="$CONFIG_FILES fofi/Makefile" ;;
+ "poppler-0.12.4/config.h") CONFIG_HEADERS="$CONFIG_HEADERS poppler-0.12.4/config.h" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "aconf.h":H) sed -e 's/^#define PACKAGE/#define POPPLER_PACKAGE/' \
+ -e 's/^#define VERSION/#define POPPLER_VERSION/' aconf.h >aconf.tmp && mv -f aconf.tmp aconf.h ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/Build/source/libs/poppler/configure.ac b/Build/source/libs/poppler/configure.ac
new file mode 100644
index 00000000000..774d54afe4c
--- /dev/null
+++ b/Build/source/libs/poppler/configure.ac
@@ -0,0 +1,88 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+m4_define([poppler_version], [0.12.4])[]dnl using unmodified poppler-0.12.4 source tree
+AC_INIT([poppler for TeX Live], poppler_version, [tex-k@tug.org])
+AC_PREREQ([2.65])
+AC_CONFIG_SRCDIR([poppler-]poppler_version[/poppler/Array.cc])
+AC_CONFIG_AUX_DIR([../../build-aux])
+AC_CONFIG_MACRO_DIR([../../m4])
+
+AM_INIT_AUTOMAKE([foreign no-define])
+AM_MAINTAINER_MODE
+
+dnl ##### Optional features.
+AC_ARG_ENABLE([a4-paper],
+ AS_HELP_STRING([--enable-a4-paper],
+ [use A4 paper size instead of Letter for PostScript output]),
+ [if test "x$enableval" = xyes; then
+AC_DEFINE([A4_PAPER], 1, [Use A4 paper size instead of Letter for PostScript output])
+fi
+])
+
+AC_ARG_ENABLE([opi],
+ AS_HELP_STRING([--enable-opi],
+ [include support for OPI comments]),
+ [if test "x$enableval" = xyes; then
+AC_DEFINE([OPI_SUPPORT], 1, [Include support for OPI comments])
+fi
+])
+
+AC_ARG_ENABLE([multithreaded],
+ AS_HELP_STRING([--enable-multithreaded],
+ [include support for multithreading]),
+ [if test "x$enableval" = xyes; then
+AC_DEFINE([MULTITHREADED], 1, [Enable multithreading support])
+fi
+])
+
+dnl **** Check for some programs and libraries ****
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_PROG_LN_S
+
+dnl **** Checks for header files ****
+
+AC_CHECK_HEADERS([strings.h sys/select.h time.h])
+AC_HEADER_DIRENT
+
+dnl **** Checks for library functions ****
+
+AC_CHECK_FUNCS([popen mkstemp mkstemps])
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+
+AC_CONFIG_HEADERS([aconf.h],
+ [sed -e 's/^#define PACKAGE/#define POPPLER_PACKAGE/' \
+ -e 's/^#define VERSION/#define POPPLER_VERSION/' aconf.h >aconf.tmp && mv -f aconf.tmp aconf.h])
+
+AH_TOP([/*
+ * aconf.h
+ *
+ * Copyright 2002-2003 Glyph & Cog, LLC
+ */
+
+#ifndef ACONF_H
+#define ACONF_H
+
+/*
+ * Enable C++ exceptions.
+ */
+#undef USE_EXCEPTIONS])
+AH_BOTTOM([#endif])
+
+POPPLER_TREE=poppler-[]poppler_version
+AC_SUBST([POPPLER_TREE])
+
+AC_CONFIG_FILES([Makefile poppler/Makefile goo/Makefile fofi/Makefile])
+
+AC_CONFIG_HEADERS([poppler-]poppler_version[/config.h])
+
+AC_OUTPUT
diff --git a/Build/source/libs/poppler/fofi/Makefile.am b/Build/source/libs/poppler/fofi/Makefile.am
new file mode 100644
index 00000000000..701514ef26c
--- /dev/null
+++ b/Build/source/libs/poppler/fofi/Makefile.am
@@ -0,0 +1,12 @@
+## Proxy Makefile.am to build xpdf FoFi library for TeX Live.
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+##
+## This file is free software; the copyright holder
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+##
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/fofi
+
+include $(top_srcdir)/hdrs.am
+
diff --git a/Build/source/libs/poppler/fofi/Makefile.in b/Build/source/libs/poppler/fofi/Makefile.in
new file mode 100644
index 00000000000..2391e491e24
--- /dev/null
+++ b/Build/source/libs/poppler/fofi/Makefile.in
@@ -0,0 +1,335 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/hdrs.am
+subdir = fofi
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/aconf.h \
+ $(top_builddir)/poppler-0.12.4/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POPPLER_TREE = @POPPLER_TREE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/fofi
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/hdrs.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fofi/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fofi/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+ distclean distclean-generic distclean-local distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am
+
+all-local:
+ @for file in $(SRCDIR)/*.h; do \
+ inst=`echo $$file | sed -e 's/^.*\///'`; \
+ test -f $$inst || { \
+ echo "$(LN_S) $$file $$inst"; \
+ $(LN_S) $$file $$inst; } || exit 1; \
+ done
+
+distclean-local:
+ rm -f *.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/goo/Makefile.am b/Build/source/libs/poppler/goo/Makefile.am
new file mode 100644
index 00000000000..0c526796be7
--- /dev/null
+++ b/Build/source/libs/poppler/goo/Makefile.am
@@ -0,0 +1,12 @@
+## Proxy Makefile.am to build poppler Goo library for TeX Live.
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+##
+## This file is free software; the copyright holder
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+##
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/goo
+
+include $(top_srcdir)/hdrs.am
+
diff --git a/Build/source/libs/poppler/goo/Makefile.in b/Build/source/libs/poppler/goo/Makefile.in
new file mode 100644
index 00000000000..ade60a4abf2
--- /dev/null
+++ b/Build/source/libs/poppler/goo/Makefile.in
@@ -0,0 +1,335 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/hdrs.am
+subdir = goo
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/aconf.h \
+ $(top_builddir)/poppler-0.12.4/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POPPLER_TREE = @POPPLER_TREE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/goo
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/hdrs.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign goo/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign goo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+ distclean distclean-generic distclean-local distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am
+
+all-local:
+ @for file in $(SRCDIR)/*.h; do \
+ inst=`echo $$file | sed -e 's/^.*\///'`; \
+ test -f $$inst || { \
+ echo "$(LN_S) $$file $$inst"; \
+ $(LN_S) $$file $$inst; } || exit 1; \
+ done
+
+distclean-local:
+ rm -f *.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/hdrs.am b/Build/source/libs/poppler/hdrs.am
new file mode 100644
index 00000000000..80876177a35
--- /dev/null
+++ b/Build/source/libs/poppler/hdrs.am
@@ -0,0 +1,19 @@
+## libs/xpdf/hdrs.am: Makefile fragment to create header symlinks.
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+##
+## This file is free software; the copyright holder
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+##
+all-local:
+ @for file in $(SRCDIR)/*.h; do \
+ inst=`echo $$file | sed -e 's/^.*\///'`; \
+ test -f $$inst || { \
+ echo "$(LN_S) $$file $$inst"; \
+ $(LN_S) $$file $$inst; } || exit 1; \
+ done
+
+distclean-local:
+ rm -f *.h
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4-PATCH1 b/Build/source/libs/poppler/poppler-0.12.4-PATCH1
new file mode 100644
index 00000000000..6cf240174b0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4-PATCH1
@@ -0,0 +1,71 @@
+Index: poppler-0.12.4/poppler/Page.cc
+===================================================================
+--- poppler-0.12.4/poppler/Page.cc (revision 3771)
++++ poppler-0.12.4/poppler/Page.cc (working copy)
+@@ -45,13 +45,11 @@
+ #include "XRef.h"
+ #include "Link.h"
+ #include "OutputDev.h"
+-#ifndef PDF_PARSER_ONLY
+ #include "Gfx.h"
+ #include "GfxState.h"
+ #include "Annot.h"
+ #include "TextOutputDev.h"
+ #include "Form.h"
+-#endif
+ #include "Error.h"
+ #include "Page.h"
+ #include "Catalog.h"
+Index: poppler-0.12.4/poppler/GlobalParams.cc
+===================================================================
+--- poppler-0.12.4/poppler/GlobalParams.cc (revision 3771)
++++ poppler-0.12.4/poppler/GlobalParams.cc (working copy)
+@@ -140,6 +140,7 @@
+ }
+ }
+
++#ifndef PDF_PARSER_ONLY
+ #ifdef _WIN32
+
+ //------------------------------------------------------------------------
+@@ -384,6 +385,7 @@
+ }
+
+ #endif // _WIN32
++#endif // PDF_PARSER_ONLY
+
+ //------------------------------------------------------------------------
+ // PSFontParam
+@@ -557,10 +559,12 @@
+ UnicodeMap *map;
+ int i;
+
++#ifndef PDF_PARSER_ONLY
+ #ifndef _MSC_VER
+ FcInit();
+ FCcfg = FcConfigGetCurrent();
+ #endif
++#endif
+
+ #if MULTITHREADED
+ gInitMutex(&mutex);
+@@ -1110,6 +1114,11 @@
+ /* if you can't or don't want to use Fontconfig, you need to implement
+ this function for your platform. For Windows, it's in GlobalParamsWin.cc
+ */
++#ifdef PDF_PARSER_ONLY
++DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
++ return (DisplayFontParam * )NULL;
++}
++#else
+ #ifndef _MSC_VER
+ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
+ DisplayFontParam *dfp;
+@@ -1170,6 +1179,7 @@
+ return dfp;
+ }
+ #endif
++#endif
+
+ GBool GlobalParams::getPSExpandSmaller() {
+ GBool f;
diff --git a/Build/source/libs/poppler/poppler-0.12.4/AUTHORS b/Build/source/libs/poppler/poppler-0.12.4/AUTHORS
new file mode 100644
index 00000000000..a785e403211
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/AUTHORS
@@ -0,0 +1,5 @@
+xpdf is written by Derek Noonburg <derekn@foolabs.com>
+
+libpoppler is a fork of xpdf-3.00
+
+Current Maintainer: Albert Astals Cid <aacid@kde.org>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/CMakeLists.txt
new file mode 100644
index 00000000000..cb78bb53cb1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/CMakeLists.txt
@@ -0,0 +1,465 @@
+project(poppler)
+
+cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+
+include(PopplerDefaults)
+include(PopplerMacros)
+include(MacroOptionalFindPackage)
+find_package(PkgConfig)
+include(MacroEnsureVersion)
+include(MacroBoolTo01)
+
+set(POPPLER_MAJOR_VERSION "0")
+set(POPPLER_MINOR_VERSION "12")
+set(POPPLER_MICRO_VERSION "4")
+set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
+
+# command line switches
+option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
+option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON)
+option(BUILD_QT3_TESTS "Whether compile the Qt3 test programs." ON)
+option(BUILD_QT4_TESTS "Whether compile the Qt4 test programs." ON)
+option(ENABLE_SPLASH "Build the Splash graphics backend." ON)
+option(ENABLE_UTILS "Compile poppler command line utils." ON)
+option(ENABLE_ABIWORD "Build the Abiword backend." ON)
+option(ENABLE_LIBOPENJPEG "Use libopenjpeg for JPX streams." ON)
+option(ENABLE_LCMS "Use liblcms for color management." ON)
+option(ENABLE_ZLIB "TODO" OFF)
+option(USE_EXCEPTIONS "Throw exceptions to deal with not enough memory and similar problems." OFF)
+option(USE_FIXEDPOINT "Use fixed point arithmetic" OFF)
+
+set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+
+# Enable these unconditionally.
+set(MULTITHREADED ON)
+set(OPI_SUPPORT ON)
+set(TEXTOUT_WORD_LIST ON)
+
+# setting the minimum required versions for some components
+set(QT3_MIN_VERSION "3.3.0")
+set(QT4_MIN_VERSION "4.4.0")
+set(CAIRO_VERSION "1.8.4")
+
+macro_bool_to_01(ENABLE_SPLASH HAVE_SPLASH)
+find_package(Freetype REQUIRED)
+find_package(Fontconfig REQUIRED)
+macro_optional_find_package(JPEG)
+macro_optional_find_package(PNG)
+if(JPEG_FOUND)
+ set(ENABLE_LIBJPEG ${JPEG_FOUND})
+endif(JPEG_FOUND)
+macro_optional_find_package(Qt3)
+macro_optional_find_package(Qt4)
+macro_optional_find_package(GTK)
+if(GLIB_FOUND)
+ macro_optional_find_package(Cairo)
+ set(HAVE_CAIRO ${CAIRO_FOUND})
+ set(POPPLER_WITH_GDK ${GDK_FOUND})
+ if(CAIRO_FOUND)
+ set(CAIRO_REQ "cairo")
+ endif(CAIRO_FOUND)
+endif(GLIB_FOUND)
+if(ENABLE_ZLIB)
+ find_package(ZLIB)
+ if(ZLIB_FOUND)
+ set(HAVE_LIBZ ${ZLIB_FOUND})
+ endif(ZLIB_FOUND)
+ set(ENABLE_ZLIB ${ZLIB_FOUND})
+endif(ENABLE_ZLIB)
+if(ENABLE_ABIWORD)
+ find_package(LibXml2)
+ set(ENABLE_ABIWORD ${LIBXML2_FOUND})
+endif(ENABLE_ABIWORD)
+if(ENABLE_LIBOPENJPEG)
+ find_package(LIBOPENJPEG)
+ set(ENABLE_LIBOPENJPEG ${LIBOPENJPEG_FOUND})
+endif(ENABLE_LIBOPENJPEG)
+if(ENABLE_LCMS)
+ find_package(LCMS)
+ set(USE_CMS ${LCMS_FOUND})
+endif(ENABLE_LCMS)
+
+add_definitions(-DHAVE_CONFIG_H=1 ${FONTCONFIG_DEFINITIONS})
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/fofi
+ ${CMAKE_CURRENT_SOURCE_DIR}/goo
+ ${CMAKE_CURRENT_SOURCE_DIR}/poppler
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/poppler
+ ${FREETYPE_INCLUDE_DIRS}
+)
+set(HAVE_FREETYPE_H ON)
+
+if(ENABLE_ZLIB)
+ include_directories(${ZLIB_INCLUDE_DIR})
+endif(ENABLE_ZLIB)
+if(JPEG_FOUND)
+ include_directories(${JPEG_INCLUDE_DIR})
+ set(ENABLE_LIBJPEG ON)
+endif(JPEG_FOUND)
+if(PNG_FOUND)
+ include_directories(${PNG_INCLUDE_DIR})
+ set(ENABLE_LIBPNG ON)
+endif(PNG_FOUND)
+if(ENABLE_ABIWORD)
+ include_directories(${LIBXML2_INCLUDE_DIR})
+ add_definitions(${LIBXML2_DEFINITIONS})
+endif(ENABLE_ABIWORD)
+if(LIBOPENJPEG_FOUND)
+ include_directories(${LIBOPENJPEG_INCLUDE_DIR})
+endif(LIBOPENJPEG_FOUND)
+if(LCMS_FOUND)
+ include_directories(${LCMS_INCLUDE_DIR})
+endif(LCMS_FOUND)
+
+if(DEFINED COMPILE_WARNINGS)
+else(DEFINED COMPILE_WARNINGS)
+ set(COMPILE_WARNINGS "yes")
+endif(DEFINED COMPILE_WARNINGS)
+string(TOLOWER "${COMPILE_WARNINGS}" _comp_warnings)
+if(_comp_warnings STREQUAL "no")
+ add_definitions(${DEFAULT_COMPILE_WARNINGS_NO})
+endif(_comp_warnings STREQUAL "no")
+if(_comp_warnings STREQUAL "yes")
+ add_definitions(${DEFAULT_COMPILE_WARNINGS_YES})
+endif(_comp_warnings STREQUAL "yes")
+if(_comp_warnings STREQUAL "kde")
+ set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_KDE} ${CMAKE_CXX_FLAGS}")
+endif(_comp_warnings STREQUAL "kde")
+
+
+include(ConfigureChecks.cmake)
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+configure_file(poppler-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h)
+
+
+set(poppler_SRCS
+ goo/gfile.cc
+ goo/gmempp.cc
+ goo/GooHash.cc
+ goo/GooList.cc
+ goo/GooTimer.cc
+ goo/GooString.cc
+ goo/gmem.cc
+ goo/FixedPoint.cc
+ goo/PNGWriter.cc
+ goo/gstrtod.cc
+ fofi/FoFiBase.cc
+ fofi/FoFiEncodings.cc
+ fofi/FoFiTrueType.cc
+ fofi/FoFiType1.cc
+ fofi/FoFiType1C.cc
+ poppler/Annot.cc
+ poppler/Array.cc
+ poppler/BuiltinFont.cc
+ poppler/BuiltinFontTables.cc
+ poppler/Catalog.cc
+ poppler/CharCodeToUnicode.cc
+ poppler/CMap.cc
+ poppler/DateInfo.cc
+ poppler/Decrypt.cc
+ poppler/Dict.cc
+ poppler/Error.cc
+ poppler/FileSpec.cc
+ poppler/FontEncodingTables.cc
+ poppler/Form.cc
+ poppler/FontInfo.cc
+ poppler/Function.cc
+ poppler/Gfx.cc
+ poppler/GfxFont.cc
+ poppler/GfxState.cc
+ poppler/GlobalParams.cc
+ poppler/JArithmeticDecoder.cc
+ poppler/JBIG2Stream.cc
+ poppler/Lexer.cc
+ poppler/Link.cc
+ poppler/NameToCharCode.cc
+ poppler/Object.cc
+ poppler/OptionalContent.cc
+ poppler/Outline.cc
+ poppler/OutputDev.cc
+ poppler/Page.cc
+ poppler/PageTransition.cc
+ poppler/Parser.cc
+ poppler/PDFDoc.cc
+ poppler/PDFDocEncoding.cc
+ poppler/PopplerCache.cc
+ poppler/ProfileData.cc
+ poppler/PreScanOutputDev.cc
+ poppler/PSTokenizer.cc
+ poppler/Stream.cc
+ poppler/UnicodeMap.cc
+ poppler/UnicodeTypeTable.cc
+ poppler/XRef.cc
+ poppler/PSOutputDev.cc
+ poppler/TextOutputDev.cc
+ poppler/PageLabelInfo.cc
+ poppler/SecurityHandler.cc
+ poppler/Sound.cc
+ poppler/XpdfPluginAPI.cc
+ poppler/Movie.cc
+)
+set(poppler_LIBS ${FREETYPE_LIBRARIES} ${FONTCONFIG_LIBRARIES})
+if(ENABLE_SPLASH)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/SplashOutputDev.cc
+ splash/Splash.cc
+ splash/SplashBitmap.cc
+ splash/SplashClip.cc
+ splash/SplashFTFont.cc
+ splash/SplashFTFontEngine.cc
+ splash/SplashFTFontFile.cc
+ splash/SplashFont.cc
+ splash/SplashFontEngine.cc
+ splash/SplashFontFile.cc
+ splash/SplashFontFileID.cc
+ splash/SplashPath.cc
+ splash/SplashPattern.cc
+ splash/SplashScreen.cc
+ splash/SplashState.cc
+ splash/SplashT1Font.cc
+ splash/SplashT1FontEngine.cc
+ splash/SplashT1FontFile.cc
+ splash/SplashXPath.cc
+ splash/SplashXPathScanner.cc
+ )
+endif(ENABLE_SPLASH)
+if(JPEG_FOUND)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/DCTStream.cc
+ )
+ set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES})
+endif(JPEG_FOUND)
+if(ENABLE_ZLIB)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/FlateStream.cc
+ )
+ set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES})
+endif(ENABLE_ZLIB)
+if(LIBOPENJPEG_FOUND)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/JPEG2000Stream.cc
+ )
+ set(poppler_LIBS ${poppler_LIBS} ${LIBOPENJPEG_LIBRARIES})
+else (LIBOPENJPEG_FOUND)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/JPXStream.cc
+ )
+endif(LIBOPENJPEG_FOUND)
+if(USE_CMS)
+ set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES})
+endif(USE_CMS)
+if(ENABLE_ABIWORD)
+ set(poppler_SRCS ${poppler_SRCS}
+ poppler/ABWOutputDev.cc
+ )
+ set(poppler_LIBS ${poppler_LIBS} ${LIBXML2_LIBRARIES})
+endif(ENABLE_ABIWORD)
+if(WIN32)
+ # gdi32 is needed under win32
+ set(poppler_LIBS ${poppler_LIBS} gdi32)
+endif(WIN32)
+
+if(MSVC)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+set(poppler_SRCS ${poppler_SRCS} poppler/GlobalParamsWin.cc)
+add_library(poppler STATIC ${poppler_SRCS})
+else(MSVC)
+add_library(poppler SHARED ${poppler_SRCS})
+endif(MSVC)
+set_target_properties(poppler PROPERTIES VERSION 5.0.0 SOVERSION 5)
+if (ENABLE_LIBPNG)
+target_link_libraries(poppler ${poppler_LIBS} ${PNG_LIBRARIES})
+else (ENABLE_LIBPNG)
+target_link_libraries(poppler ${poppler_LIBS})
+endif (ENABLE_LIBPNG)
+install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+if(ENABLE_XPDF_HEADERS)
+ install(FILES
+ poppler/Annot.h
+ poppler/Array.h
+ poppler/BuiltinFont.h
+ poppler/BuiltinFontTables.h
+ poppler/Catalog.h
+ poppler/CharCodeToUnicode.h
+ poppler/CMap.h
+ poppler/DateInfo.h
+ poppler/Decrypt.h
+ poppler/Dict.h
+ poppler/Error.h
+ poppler/FileSpec.h
+ poppler/FontEncodingTables.h
+ poppler/FontInfo.h
+ poppler/Form.h
+ poppler/Function.cc
+ poppler/Function.h
+ poppler/Gfx.h
+ poppler/GfxFont.h
+ poppler/GfxState.h
+ poppler/GfxState_helpers.h
+ poppler/GlobalParams.h
+ poppler/JArithmeticDecoder.h
+ poppler/JBIG2Stream.h
+ poppler/Lexer.h
+ poppler/Link.h
+ poppler/Movie.h
+ poppler/NameToCharCode.h
+ poppler/Object.h
+ poppler/OptionalContent.h
+ poppler/Outline.h
+ poppler/OutputDev.h
+ poppler/Page.h
+ poppler/PageTransition.h
+ poppler/Parser.h
+ poppler/PDFDoc.h
+ poppler/PDFDocEncoding.h
+ poppler/PopplerCache.h
+ poppler/ProfileData.h
+ poppler/PreScanOutputDev.h
+ poppler/PSTokenizer.h
+ poppler/Stream-CCITT.h
+ poppler/Stream.h
+ poppler/UnicodeMap.h
+ poppler/UnicodeMapTables.h
+ poppler/UnicodeTypeTable.h
+ poppler/UnicodeCClassTables.h
+ poppler/UnicodeCompTables.h
+ poppler/UnicodeDecompTables.h
+ poppler/XRef.h
+ poppler/CharTypes.h
+ poppler/CompactFontTables.h
+ poppler/ErrorCodes.h
+ poppler/NameToUnicodeTable.h
+ poppler/PSOutputDev.h
+ poppler/TextOutputDev.h
+ poppler/SecurityHandler.h
+ poppler/UTF8.h
+ poppler/XpdfPluginAPI.h
+ poppler/Sound.h
+ ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h
+ DESTINATION include/poppler)
+ install(FILES
+ goo/GooHash.h
+ goo/GooList.h
+ goo/GooTimer.h
+ goo/GooMutex.h
+ goo/GooString.h
+ goo/GooVector.h
+ goo/gtypes.h
+ goo/gmem.h
+ goo/gfile.h
+ goo/FixedPoint.h
+ goo/gstrtod.h
+ DESTINATION include/poppler/goo)
+ install(FILES
+ fofi/FoFiBase.h
+ fofi/FoFiEncodings.h
+ fofi/FoFiTrueType.h
+ fofi/FoFiType1.h
+ fofi/FoFiType1C.h
+ DESTINATION include/poppler/fofi)
+ if(LIBOPENJPEG_FOUND)
+ install(FILES
+ poppler/JPEG2000Stream.h
+ DESTINATION include/poppler)
+ else(LIBOPENJPEG_FOUND)
+ install(FILES
+ poppler/JPXStream.h
+ DESTINATION include/poppler)
+ endif(LIBOPENJPEG_FOUND)
+ if(ENABLE_SPLASH)
+ install(FILES
+ poppler/SplashOutputDev.h
+ DESTINATION include/poppler)
+ install(FILES
+ splash/Splash.h
+ splash/SplashBitmap.h
+ splash/SplashClip.h
+ splash/SplashErrorCodes.h
+ splash/SplashFTFont.h
+ splash/SplashFTFontEngine.h
+ splash/SplashFTFontFile.h
+ splash/SplashFont.h
+ splash/SplashFontEngine.h
+ splash/SplashFontFile.h
+ splash/SplashFontFileID.h
+ splash/SplashGlyphBitmap.h
+ splash/SplashMath.h
+ splash/SplashPath.h
+ splash/SplashPattern.h
+ splash/SplashScreen.h
+ splash/SplashState.h
+ splash/SplashT1Font.h
+ splash/SplashT1FontEngine.h
+ splash/SplashT1FontFile.h
+ splash/SplashTypes.h
+ splash/SplashXPath.h
+ splash/SplashXPathScanner.h
+ DESTINATION include/poppler/splash)
+ endif(ENABLE_SPLASH)
+endif(ENABLE_XPDF_HEADERS)
+
+
+if(ENABLE_UTILS)
+ add_subdirectory(utils)
+endif(ENABLE_UTILS)
+if(GLIB_FOUND)
+ add_subdirectory(glib)
+endif(GLIB_FOUND)
+if(QT3_FOUND)
+ add_subdirectory(qt)
+endif(QT3_FOUND)
+add_subdirectory(test)
+if(QT4_FOUND)
+ add_subdirectory(qt4)
+endif(QT4_FOUND)
+
+set(PKG_CONFIG_VERSION_0_18 TRUE)
+if(PKGCONFIG_EXECUTABLE)
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _output_VAR)
+ macro_ensure_version("0.18" "${_output_VAR}" PKG_CONFIG_VERSION_0_18)
+endif(PKGCONFIG_EXECUTABLE)
+if(PKG_CONFIG_VERSION_0_18)
+ set(PC_REQUIRES "")
+ set(PC_REQUIRES_PRIVATE "Requires.private: poppler = ${POPPLER_VERSION}")
+else(PKG_CONFIG_VERSION_0_18)
+ set(PC_REQUIRES "poppler = ${POPPLER_VERSION}")
+ set(PC_REQUIRES_PRIVATE "")
+endif(PKG_CONFIG_VERSION_0_18)
+
+poppler_create_install_pkgconfig(poppler.pc lib${LIB_SUFFIX}/pkgconfig)
+if(ENABLE_SPLASH)
+ poppler_create_install_pkgconfig(poppler-splash.pc lib${LIB_SUFFIX}/pkgconfig)
+endif(ENABLE_SPLASH)
+if(QT3_FOUND)
+ poppler_create_install_pkgconfig(poppler-qt.pc lib${LIB_SUFFIX}/pkgconfig)
+endif(QT3_FOUND)
+if(QT4_FOUND)
+ poppler_create_install_pkgconfig(poppler-qt4.pc lib${LIB_SUFFIX}/pkgconfig)
+endif(QT4_FOUND)
+if(GLIB_FOUND)
+ poppler_create_install_pkgconfig(poppler-glib.pc lib${LIB_SUFFIX}/pkgconfig)
+endif(GLIB_FOUND)
+if(CAIRO_FOUND)
+ poppler_create_install_pkgconfig(poppler-cairo.pc lib${LIB_SUFFIX}/pkgconfig)
+endif(CAIRO_FOUND)
+
+
+message("Building Poppler with support for:")
+show_end_message("splash output" ENABLE_SPLASH)
+show_end_message("cairo output" CAIRO_FOUND)
+show_end_message("abiword output" ENABLE_ABIWORD)
+show_end_message("qt wrapper" QT3_FOUND)
+show_end_message("qt4 wrapper" QT4_FOUND)
+show_end_message("glib wrapper" GLIB_FOUND)
+# message(" use gtk-doc: $enable_gtk_doc") # TODO
+show_end_message("use libjpeg" ENABLE_LIBJPEG)
+show_end_message("use libpng" ENABLE_LIBPNG)
+show_end_message("use zlib" ENABLE_ZLIB)
+show_end_message("use libopenjpeg" LIBOPENJPEG_FOUND)
+show_end_message("use cms" USE_CMS)
+show_end_message("command line utils" ENABLE_UTILS)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/COPYING b/Build/source/libs/poppler/poppler-0.12.4/COPYING
new file mode 100644
index 00000000000..d511905c164
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/Build/source/libs/poppler/poppler-0.12.4/ChangeLog b/Build/source/libs/poppler/poppler-0.12.4/ChangeLog
new file mode 100644
index 00000000000..7258b8059bf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/ChangeLog
@@ -0,0 +1,24069 @@
+commit dfc43459df669a757faca07b2b44bde59766468e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 17 21:54:31 2010 +0000
+
+ if malloc failed return false
+
+ splash/SplashFTFont.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit ef7339eb26d76714250ed25bd826d737283cc1a4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 16 23:31:05 2010 +0000
+
+ Only assume the OC is not visible if it exists and is set to no
+
+ Fixes bug 26532 and a small line that was not drawn in 15899
+
+ poppler/OptionalContent.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b60a5d415e74ff69a6356e3f864f44d3a9b0895b
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 10 23:16:27 2010 +0100
+
+ [CMake] fix typo: "MULTITHREAD" -> "MULTITHREADED"
+
+ CMakeLists.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6203d1d98ad44f0fac55198504a959d494ac5a0c
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jan 26 20:49:17 2010 +0100
+
+ [cairo] Use the right matrix for the mask in drawMaskedImage()
+
+ Fixes bug #16906.
+
+ poppler/CairoOutputDev.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit e25e4fd2e76619dd42715a1e9d78088850d8fe7e
+Author: mpsuzuki <mpsuzuki@hiroshima-u.ac.jp>
+Date: Sun Jan 24 13:34:41 2010 +0100
+
+ [cairo] Fix memory leak
+
+ poppler/CairoFontEngine.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 941ec1ca4f7110765f4c48409c0e6c3f6625cf5c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 24 12:20:25 2009 +0100
+
+ 0.12.3
+
+ CMakeLists.txt | 2 +-
+ NEWS | 16 ++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 22 insertions(+), 6 deletions(-)
+
+commit b526edc439a19970aa5efb47993ebddc80af0f05
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 20 21:59:05 2010 +0000
+
+ Fix GfxRadialShading::GfxRadialShading
+
+ Fixes crash in KDE bug 223359
+
+ poppler/GfxState.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 44833844c6208039a3dd3c427aa97e47dc3d497a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 14 08:43:11 2010 +0000
+
+ Fix Uncover and Fade to return correct values
+
+ Bug 26034
+
+ poppler/PageTransition.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 2bd99c5a48782bcd85be8801221446038ec35c2d
+Author: Hib Eris <hib@hiberis.nl>
+Date: Thu Dec 31 17:52:33 2009 +0100
+
+ [glib] Use PDFDoc(wchar_t *, ...) on Windows
+
+ Fixes bug #25032
+
+ glib/poppler-document.cc | 22 +++++++++++++++++++---
+ 1 files changed, 19 insertions(+), 3 deletions(-)
+
+commit 42359d6f75ca33f1d04a9f129b61725958686879
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jan 4 18:36:01 2010 +0000
+
+ Require Qt 4.4
+
+ This updates the requirement to real requirement
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit ec36133e2d3693a05836aadb96a722262d48fd39
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Dec 12 17:22:08 2009 +0100
+
+ Initialize profileCommands in Gfx constructor
+
+ poppler/Gfx.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 36abc88231e3d62b12a98afcb0a3c4ed5f07a1e6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Dec 9 19:45:40 2009 +0100
+
+ [cairo] Update font of TextPage in CairoOutputDev::updateAll()
+
+ Fixes a crash with some documents, see Evince bug
+ https://bugzilla.gnome.org/show_bug.cgi?id=603934
+
+ poppler/CairoOutputDev.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c9ee556ab8b9bab3107a5cb3489354b3d6187a8b
+Author: Axel Struebing <axel.struebing@freenet.de>
+Date: Sat Dec 5 22:31:29 2009 +0000
+
+ Add a empty space after null
+
+ Fixes bug 25465
+
+ poppler/PDFDoc.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a6cdeb7be296b14d74cf1d2f22729dc7d0b9e31c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 4 14:59:41 2009 +0100
+
+ Make the code a bit more resilient
+
+ By checking the GooString we are going to use really exists
+
+ poppler/PSOutputDev.cc | 24 ++++++++++++++++--------
+ 1 files changed, 16 insertions(+), 8 deletions(-)
+
+commit 4eaf44cdf4e6006b70712c055a97ab152c41d26f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 4 14:57:10 2009 +0100
+
+ Accept Fontname if FontName is not present
+
+ Fixes KDE bug 217013
+
+ poppler/GfxFont.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 59853762c541539ca99bdab610c7649a2d3d6c3c
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Nov 27 15:23:11 2009 +0100
+
+ [cairo] Revert commit 119071cb9a6144b6268a7ff9b6341ad0cc75d9ae
+
+ And fix bug #24575 jut by checking pointer is not null before using it.
+
+ poppler/CairoOutputDev.cc | 12 +++++-------
+ 1 files changed, 5 insertions(+), 7 deletions(-)
+
+commit e0bdffb6ab9e313f7b2c9155c0f1d4059d7bcc61
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 22 20:26:40 2009 +0100
+
+ Update copyrights
+
+ poppler/CairoFontEngine.cc | 2 +-
+ poppler/CairoOutputDev.cc | 4 ++--
+ poppler/CairoOutputDev.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 119071cb9a6144b6268a7ff9b6341ad0cc75d9ae
+Author: David Benjamin <davidben@mit.edu>
+Date: Sun Nov 22 20:19:29 2009 +0100
+
+ Do not crash on malformed files
+
+ bug 24575
+
+ poppler/CairoOutputDev.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit ac1e46da77e03ca193af75ca03d5e0a05c16200e
+Author: Ilya Gorenbein <igorenbein@finjan.com>
+Date: Sun Nov 22 19:51:54 2009 +0100
+
+ Improve the reconstruction of the XRef
+
+ Makes load a file Ilya can't share
+
+ poppler/XRef.cc | 165 +++++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 95 insertions(+), 70 deletions(-)
+
+commit 8ffd9753eaebdb2b738f80ee25584dacdeccb28b
+Author: Ilya Gorenbein <igorenbein@finjan.com>
+Date: Sun Nov 22 15:16:02 2009 +0100
+
+ Correctly initialize fileName
+
+ Bug 25221
+
+ poppler/Link.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 74353b77ec6fe258ac493dc0a10f6956b3dd5300
+Author: David Benjamin <davidben@mit.edu>
+Date: Sat Nov 21 02:43:21 2009 +0100
+
+ Be more lenient with /Decode key on images
+
+ The spec requires the field be [1 0] or [0 1]. Adobe accepts floating point
+ values as well. This fixes bug #17439.
+
+ poppler/Gfx.cc | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 26f58fea334fd975e23cfda0b2d00e14940f0358
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 20 22:09:44 2009 +0100
+
+ Check for openjpeg in the C++ part as it uses bool in the header
+
+ Bug 25103
+
+ configure.ac | 61 ++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 30 insertions(+), 31 deletions(-)
+
+commit 524ebbd9f5b3e1cf992cee779055ec1716685a51
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 18 22:06:39 2009 +0100
+
+ poppler 0.12.2
+
+ CMakeLists.txt | 2 +-
+ NEWS | 18 ++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 24 insertions(+), 6 deletions(-)
+
+commit 781e1bfb5eeb6b41b0bcb0eea5e595f02c66b035
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Nov 17 20:45:42 2009 +0100
+
+ i didn't want to commit this
+
+ configure.ac | 60 ++++++++++++++++++++++++-----------------------
+ splash/SplashMath.h | 5 +--
+ splash/SplashScreen.cc | 21 +---------------
+ splash/SplashScreen.h | 3 --
+ utils/pdftoppm.cc | 8 ------
+ 5 files changed, 35 insertions(+), 62 deletions(-)
+
+commit 3e59f5666c0521db85b3a8a6f05ecb07e45c1b87
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Nov 17 20:34:24 2009 +0100
+
+ do not use setAttribute with doubles
+
+ it is evil and locale dependant, we do NOT want that so use QString::number
+
+ configure.ac | 60 ++++++++++++++---------------
+ qt4/src/poppler-annotation.cc | 82 ++++++++++++++++++++--------------------
+ splash/SplashMath.h | 5 +-
+ splash/SplashScreen.cc | 21 +++++++++-
+ splash/SplashScreen.h | 2 +
+ utils/pdftoppm.cc | 8 ++++
+ 6 files changed, 102 insertions(+), 76 deletions(-)
+
+commit f385ca47a2e6da332e7c216db439296993361556
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 13 00:55:37 2009 +0100
+
+ jpeg_start_decompress can fail, check it
+
+ Fixes KDE bug #214317
+
+ poppler/DCTStream.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 701af67b5988b6cff800f123ced7570ecbadf668
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Nov 9 11:25:24 2009 +0100
+
+ Transitions dictionary can be a Ref too
+
+ poppler/Page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c00e4f10cd214c105813448415630fec68e094ef
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue Aug 11 19:17:52 2009 +0100
+
+ [cairo] Mark images dirty
+
+ After directly manipulating the pixel values we need to mark the surface
+ as dirty. This means that cairo will refresh any caches it may have taken
+ of the surface will the new data.
+ (cherry picked from commit 32ea667ec8f18311539123c7b80c7ab4767070cb)
+
+ poppler/CairoOutputDev.cc | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit af6a212234e20252c78fd615a8906d529b1821e6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Oct 29 18:38:22 2009 +0100
+
+ [cairo] Don't render patterns when using CairoImageOutputDev
+
+ poppler/CairoOutputDev.h | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 2b1ccee4be6cfe2eeaad6ee200506b0722037da6
+Author: Ilya Gorenbein <igorenbein@finjan.com>
+Date: Wed Oct 28 19:20:41 2009 +0100
+
+ There are some pdf where Aspect values are reals, use getNum
+
+ Fixes bug 24733
+
+ poppler/Annot.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 726c7b8c112460f1762de4fe0b986e979f362771
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 25 21:55:55 2009 +0100
+
+ do not accept negative interval lengths in the page labels tree
+
+ See bug 24721
+
+ poppler/PageLabelInfo.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit cb19a40f1507a87a53b60134d09b42fad686f692
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 23 21:57:42 2009 +0200
+
+ Move the iccColorSpaceCache from a static in GfxState to a member of Gfx
+
+ Fixes the problem that the keys are per document but we had a static
+ that lived as much as the library. Now the cache only lives the rendering
+ of a page so it's a bit slower but at least it's correct. Fixes bug 24686
+
+ poppler/Gfx.cc | 49 +++++++++++++++++---------
+ poppler/Gfx.h | 13 ++++++-
+ poppler/GfxState.cc | 94 +++++++++++++++++++++++++--------------------------
+ poppler/GfxState.h | 33 +++++++++---------
+ poppler/Page.cc | 4 +-
+ 5 files changed, 107 insertions(+), 86 deletions(-)
+
+commit c53e611cfbb2b027d2cbddb6d8fce8d84319566a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Oct 22 21:26:29 2009 +0200
+
+ initialize len at 0 when reading the font fails
+
+ See bug 24525 for more info
+
+ poppler/GfxFont.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7313dd1018a9028f40e0e511a4e34d793a0ae605
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Oct 20 10:09:13 2009 +0200
+
+ [glib] Fix CVE-2009-3607
+
+ glib/poppler-page.cc | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 4fb3e9c090bd973c7d9123f8c258c7925166f078
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Oct 19 23:33:58 2009 +0200
+
+ fix memory leak
+
+ poppler/PSOutputDev.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 57982aaec95f0def1d30dce5f77492b0d88d851d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 18 01:50:02 2009 +0200
+
+ poppler 0.12.1
+
+ CMakeLists.txt | 2 +-
+ NEWS | 27 +++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 33 insertions(+), 6 deletions(-)
+
+commit d9fd61976dd6b85fdfa7b2cb7ec1979afbd272dd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 18 01:22:16 2009 +0200
+
+ This include is needed as this file uses Ref
+
+ poppler/OutputDev.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 55e7692501646aab5075974b8a49b51fb248cac1
+Author: Michael Jansen <kde@michael-jansen.biz>
+Date: Sat Oct 17 01:30:40 2009 +0200
+
+ CMake: add the possibility to pass LIB_SUFFIX.
+
+ This allows to tune the installation libdir by adding a suffix for it
+ (making it eg lib, lib32, or lib64)
+
+ CMakeLists.txt | 16 +++++++++-------
+ glib/CMakeLists.txt | 2 +-
+ poppler-cairo.pc.cmake | 2 +-
+ poppler-glib.pc.cmake | 2 +-
+ poppler-qt.pc.cmake | 2 +-
+ poppler-qt4.pc.cmake | 2 +-
+ poppler-splash.pc.cmake | 2 +-
+ poppler.pc.cmake | 2 +-
+ qt/CMakeLists.txt | 2 +-
+ qt4/src/CMakeLists.txt | 2 +-
+ 10 files changed, 18 insertions(+), 16 deletions(-)
+
+commit f530bc721bd23a2461b0cb765a8a6dad88ed3459
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 17 00:48:58 2009 +0200
+
+ check the document is not locked when printing
+
+ qt4/src/poppler-ps-converter.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 65cb34b7c77b95f036306460bcea6681e386afaf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 17 00:48:27 2009 +0200
+
+ fix file name comment
+
+ qt4/src/poppler-ps-converter.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit dbd5ba680d846d6a57e3fb7618a64202441c6e76
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 17 00:47:34 2009 +0200
+
+ Add a way for converters to return more exact errors they had when converting
+
+ qt4/src/poppler-base-converter.cc | 8 +++++++-
+ qt4/src/poppler-converter-private.h | 3 ++-
+ qt4/src/poppler-pdf-converter.cc | 11 ++++++++++-
+ qt4/src/poppler-ps-converter.cc | 6 +++++-
+ qt4/src/poppler-qt4.h | 14 ++++++++++++++
+ 5 files changed, 38 insertions(+), 4 deletions(-)
+
+commit bb21f825fcaa49e149cc7a7eb9c68f15f11fff1d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 16 23:17:22 2009 +0200
+
+ Some "security" fixes based on newly released Xpdf 3.02pl4
+
+ poppler/Stream.cc | 4 ++++
+ poppler/XRef.cc | 19 +++++++++++++++----
+ splash/Splash.cc | 7 +++++++
+ splash/SplashBitmap.cc | 37 ++++++++++++++++++++++++++++++-------
+ splash/SplashErrorCodes.h | 4 +++-
+ 5 files changed, 59 insertions(+), 12 deletions(-)
+
+commit 910c1c6f52b095be6ff0835519ad061c32201e80
+Author: Glenn Ganz <glenn.ganz@uptime.ch>
+Date: Fri Oct 16 20:54:32 2009 +0200
+
+ fix constructor of DCTStream
+
+ poppler/Stream.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 0f317ac8d7271354c90f0341eb432cafb0d5f27f
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Fri Oct 9 16:09:46 2009 +0200
+
+ MSVC: add _CRT_SECURE_NO_WARNINGS to the define's
+
+ CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit a90248a81cb0f3fdd8405a441b94dce448208d3f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Oct 6 00:52:10 2009 +0200
+
+ Forgot to update the year here
+
+ qt4/src/poppler-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8db50841a28f58551c91716530bc07f862af0be0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Oct 6 00:42:52 2009 +0200
+
+ Add the possibility of enabling hinting
+
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-private.h | 1 +
+ qt4/src/poppler-qt4.h | 3 ++-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 8b478281f20637b52c109decae13c6a29ec33ad4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Oct 6 00:41:57 2009 +0200
+
+ rework how hinting is used in the splash backend
+
+ Basically we default to no hinting now with the possibility to enable it
+
+ poppler/ArthurOutputDev.cc | 2 +-
+ poppler/GlobalParams.cc | 19 ------------
+ poppler/GlobalParams.h | 3 --
+ poppler/SplashOutputDev.cc | 8 ++++-
+ poppler/SplashOutputDev.h | 3 ++
+ splash/SplashFTFont.cc | 64 +++++++++--------------------------------
+ splash/SplashFTFont.h | 4 +-
+ splash/SplashFTFontEngine.cc | 8 ++--
+ splash/SplashFTFontEngine.h | 7 ++--
+ splash/SplashFontEngine.cc | 5 ++-
+ splash/SplashFontEngine.h | 3 +-
+ 11 files changed, 40 insertions(+), 86 deletions(-)
+
+commit df5b37cfb38c86111d6393cc5401719c3b510734
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Oct 5 00:55:55 2009 +0200
+
+ Fix includes for those using internal headers
+
+ goo/FixedPoint.h | 2 +-
+ goo/gmem.h | 2 +-
+ poppler/OutputDev.h | 2 +-
+ poppler/PSOutputDev.h | 2 +-
+ poppler/PageLabelInfo.h | 2 +-
+ utils/ImageOutputDev.h | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+commit a6d61f68f13bb4a90f09479ccca01fa979e36d05
+Author: Kovid Goyal <kovid@kovidgoyal.net>
+Date: Mon Oct 5 00:39:36 2009 +0200
+
+ Use _WIN32 instead of WIN32
+
+ More info at http://bugs.freedesktop.org/show_bug.cgi?id=24259
+
+ goo/GooMutex.h | 16 +++++++++++++++-
+ goo/gfile.cc | 33 +++++++++++++++++----------------
+ goo/gfile.h | 5 +++--
+ msvc/poppler/poppler-config.h | 2 +-
+ poppler-config.h.cmake | 2 +-
+ poppler/ABWOutputDev.h | 3 ++-
+ poppler/FileSpec.cc | 7 ++++---
+ poppler/GlobalParams.cc | 37 +++++++++++++++++++------------------
+ poppler/GlobalParams.h | 4 ++--
+ poppler/Link.cc | 3 ++-
+ poppler/PDFDoc.cc | 4 ++--
+ poppler/PDFDoc.h | 3 ++-
+ poppler/PSOutputDev.cc | 5 +++--
+ poppler/TextOutputDev.cc | 5 +++--
+ poppler/XpdfPluginAPI.cc | 13 ++++++++++++-
+ poppler/poppler-config.h.in | 2 +-
+ splash/SplashFontEngine.cc | 9 +++++----
+ test/perf-test.cc | 24 ++++++++++++------------
+ utils/HtmlOutputDev.h | 3 ++-
+ 19 files changed, 108 insertions(+), 72 deletions(-)
+
+commit 60ccf3170ca8ee531cd7bb223757b16286cf5de6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Oct 5 00:21:15 2009 +0200
+
+ Remove spurious ;
+
+ Found by -Wextra i think we should add more warnings to our default flags
+
+ qt4/src/poppler-annotation.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0137b0f0dc0dac6f92b076c0aa9210f842991bd5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:04:46 2009 +0200
+
+ Strings can have 0 inside so use the length
+
+ Fixes saving some files
+
+ poppler/PDFDoc.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 05be1252cd551ad6e9bad0cebe27c40b48f9e45f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:04:03 2009 +0200
+
+ Increase decimals from 5 to 10, a double has that precision
+
+ Makes saving more faithful for some files
+
+ poppler/PDFDoc.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 456020775e7c322abd2bcc6c9fd3ec6e594afc93
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:03:40 2009 +0200
+
+ If the stream was wrongly formed save the correct length
+
+ Fixes saving of some files
+
+ poppler/PDFDoc.cc | 12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 8bcac03940cb401df98649f52835043da8a8d4c2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:02:13 2009 +0200
+
+ Return the save status as program status
+
+ test/pdf-fullrewrite.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a9db687d598e75f0046b9b27f9b0c4718f25b248
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:01:45 2009 +0200
+
+ If the Length entry of the stream is wrong, fix it
+
+ Fixes saving some files
+
+ poppler/Parser.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 0712c2e37066813805d321d78c3ac5facbe2a092
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 2 22:00:12 2009 +0200
+
+ increase the range of characters we sanitize
+
+ Fixes saving of some files
+
+ goo/GooString.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 119c1ec73644ac7b90ba404b93e94bf673d18888
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date: Sun Sep 27 17:17:32 2009 +0200
+
+ Fix the linking not to use the .so directly but the lib
+
+ Fixes check on cygwin
+
+ m4/qt.m4 | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 25a54786f553e92a534e778575f32b6ec4bb6774
+Author: Kovid Goyal <kovid@kovidgoyal.net>
+Date: Sat Sep 26 19:26:19 2009 +0200
+
+ Do not crash when saving files that come from a stream without name
+
+ Bug 24090
+
+ poppler/PDFDoc.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 871564f39f98b863fef8155d00f68eda58949821
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 26 18:30:41 2009 +0200
+
+ Write the Info into the trailer dict if there is one
+
+ Bug 24091
+
+ poppler/PDFDoc.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 57fad0a254d363d6003f7376a46a8111489d4ad1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 26 18:28:40 2009 +0200
+
+ Plug leak
+
+ test/pdf-fullrewrite.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7255a49b2adebdd33ca08a3be7e259c1b1d02555
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date: Sat Sep 26 15:01:35 2009 +0200
+
+ Patch to make poppler work on Cygwin
+
+ Bug 4195
+
+ configure.ac | 3 +++
+ qt/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 17368c4933a51d6155683ab37f7d425e40ac8b18
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 26 14:56:38 2009 +0200
+
+ Improve realibility for Streams with broken Length
+
+ Fixes bug 6841
+
+ poppler/Parser.cc | 17 +++++++++++++----
+ 1 files changed, 13 insertions(+), 4 deletions(-)
+
+commit 5e9d056f184c4637cb1dc949a17e5ad4ddd3ade5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 21 21:58:26 2009 +0200
+
+ Print with a . and not with a , in all locales
+
+ This is a regression after the removal of setting LC_NUMERIC
+
+ poppler/PDFDoc.cc | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 5df1e583a2349868a0060138d3a184a9a6eb1b58
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 20 17:21:13 2009 +0200
+
+ CharCodeToUnicode is not mandatory in fonts, don't crash one fonts that do not have it
+
+ Fixes bug #24036
+
+ poppler/Annot.cc | 33 ++++++++++++++++++++-------------
+ 1 files changed, 20 insertions(+), 13 deletions(-)
+
+commit 4b22a958339619cb0f54e9d82e08d9fc6b3a3fbf
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Sep 17 20:12:20 2009 +0200
+
+ Windows32/MSVC: initialize the font list once per GlobalParams, instead of once at all
+
+ this fixes the font list being empty at the second (and following) GlobalParams creation
+ thanks for Christian Ehrlicher for reporting the bug and testing its fix
+
+ poppler/GlobalParams.cc | 1 +
+ poppler/GlobalParams.h | 1 +
+ poppler/GlobalParamsWin.cc | 1 -
+ 3 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 3083720d3e9f628c1fb963ee83c17a0ff7e80117
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 9 23:24:22 2009 +0200
+
+ uint -> Guint
+
+ some compilers don't know about uint
+
+ poppler/Gfx.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 943a13c9354dec18cb023642aebbe5d3bb920ed7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 9 20:04:06 2009 +0200
+
+ poppler 0.12.0
+
+ CMakeLists.txt | 4 ++--
+ NEWS | 18 ++++++++++++++++++
+ configure.ac | 4 ++--
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 26 insertions(+), 8 deletions(-)
+
+commit e8ed7210346cb18f6e4588ad557f993c6d42f4a3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 9 19:21:21 2009 +0200
+
+ increase library to 3.2.0
+
+ qt4/src/CMakeLists.txt | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e950107006a3b1889646d3705323c1b3d41eaa49
+Author: David Benjamin <davidben@mit.edu>
+Date: Wed Sep 9 01:19:38 2009 +0200
+
+ Fix infinite loop in JBIG2Decoder
+
+ Bug 23025
+ Also fixes problems in bug-poppler6881-2.pdf and bug-poppler6500.pdf
+
+ poppler/JBIG2Stream.cc | 13 ++++++++-----
+ 1 files changed, 8 insertions(+), 5 deletions(-)
+
+commit 1cb25a4adaaf3e2da50724312a3db6928991f425
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Sep 6 10:45:56 2009 +0200
+
+ [glib] Ignore attachments with an invalid embedded file
+
+ Fixes bug #10386
+
+ glib/poppler-document.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 842e00f3114666609ef4dec6fa613d46f330a40c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 5 15:20:35 2009 +0200
+
+ Add EmbeddedFile::isValid
+
+ Also do not crash if data() is called on an invalid file
+
+ qt4/src/poppler-embeddedfile.cc | 10 +++++++++-
+ qt4/src/poppler-qt4.h | 9 ++++++++-
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+commit 9d40b268f5a9a9a0fb79da0e1627dd8eebc4db6a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 5 15:19:27 2009 +0200
+
+ Add EmbFile::isOk
+
+ At the moment returns false if the object stream is not really a stream
+
+ poppler/Catalog.h | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 642650b6f70425c8fff2df978ae71249a5ae07f3
+Author: David Benjamin <davidben@mit.edu>
+Date: Sat Sep 5 01:12:49 2009 +0200
+
+ Better fallback when there's a type mismatch
+
+ Bug #17252
+
+ poppler/GfxFont.cc | 38 ++++++++++++++++++++++++++++++++------
+ 1 files changed, 32 insertions(+), 6 deletions(-)
+
+commit bf5811f5331292ccf30f1b0f089fe43d351d96be
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 26 00:43:46 2009 +0200
+
+ Improve shading color rendering
+
+ Shading is not necessarily lineal so require another bisection to
+ assume all the area in between have the same color. Fixes bug #20238
+
+ poppler/Gfx.cc | 17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+commit e94430b790fde6ce7b7cb163c2e0adf2d071c81d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 26 00:42:49 2009 +0200
+
+ Make code a bit more readable
+
+ poppler/Gfx.cc | 23 +++++++++++------------
+ 1 files changed, 11 insertions(+), 12 deletions(-)
+
+commit 465212780557705fd939dfe54f96913505bfc96e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 25 21:55:45 2009 +0200
+
+ forgot to update my copyright
+
+ poppler/JPEG2000Stream.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4f6016d01ced32002bef22b9b5d5426a74e55842
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 25 21:10:07 2009 +0200
+
+ Fix format security warnings
+
+ Don't just directly print strings of unknown content; use "%s".
+
+ poppler/JPEG2000Stream.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4616b23382b5d155f8b2f1942733037cf5730844
+Author: Christian Persch <chpe@gnome.org>
+Date: Tue Aug 25 21:09:40 2009 +0200
+
+ Fix format security warnings
+
+ Don't just directly print strings of unknown content; use "%s".
+
+ poppler/GfxState.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 6c5c8d008456d1e4f3d60bc182209747c2a175dc
+Author: Christian Persch <chpe@gnome.org>
+Date: Tue Aug 25 21:03:16 2009 +0200
+
+ Support AM_SILENT_RULES
+
+ When using automake 1.11, should support silent build rules.
+
+ Makefile.am | 2 +-
+ configure.ac | 1 +
+ glib/Makefile.am | 4 ++--
+ qt4/demos/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ qt4/tests/Makefile.am | 2 +-
+ 6 files changed, 7 insertions(+), 6 deletions(-)
+
+commit e7dd1c47b01d8f31599ee686eafbe7c54d7c023a
+Author: Christian Persch <chpe@gnome.org>
+Date: Tue Aug 25 21:01:13 2009 +0200
+
+ Fix automake check, and add automake 1.11 support
+
+ Fix the automake checks to take the *newest* version available, not the
+ oldest one. Add support for automake 1.11. FDO#23473.
+
+ autogen.sh | 13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 493d2c5aa78a3241e70108c5d7eccba9ac72f834
+Author: Rex Dieter <rdieter@math.unl.edu>
+Date: Mon Aug 24 20:08:46 2009 +0200
+
+ Use Requires.private if available
+
+ The following patch minimizes pkg-config deps similar to how the
+ glib-related pkg-config deps are done.
+
+ poppler-qt.pc.cmake | 3 ++-
+ poppler-qt.pc.in | 3 ++-
+ poppler-qt4.pc.cmake | 3 ++-
+ poppler-qt4.pc.in | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 341cd3ecd08a39cd146c1c57f356b50a2881c03f
+Author: Jakub Wilk <ubanus@users.sf.net>
+Date: Mon Aug 24 19:51:34 2009 +0200
+
+ common options for pdftoabw
+
+ The attached patch fixes command line handling for pdftoabw and implements some
+ common options (e.g., --help) that are already found in other pdftosomething
+ utilities.
+
+ utils/pdftoabw.cc | 39 ++++++++++++++++++++++++++++++++-------
+ 1 files changed, 32 insertions(+), 7 deletions(-)
+
+commit 365683d5faea6e0a7570b139d1f3366c22271f8e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 18 21:18:13 2009 +0200
+
+ 0.11.3
+
+ CMakeLists.txt | 2 +-
+ NEWS | 22 ++++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 28 insertions(+), 6 deletions(-)
+
+commit cb28bc8a637d300664b3c7569263445275333878
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Aug 17 14:14:03 2009 +0200
+
+ [glib] Add FORMAT_MAJOR/MINOR properties to get the PDF version
+
+ See bug #23076.
+
+ glib/poppler-document.cc | 26 ++++++++++++++++++++++++++
+ 1 files changed, 26 insertions(+), 0 deletions(-)
+
+commit 1b5612841b0c663f6d391d4581f65f68a2975db0
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Aug 17 01:04:04 2009 +0200
+
+ [Qt] add Document::getPdfVersion(int *major, int *minor) for the document PDF version numbers
+
+ This new function reads the version of the PDF specification of the document, putting major and minor numbers in own variables.
+
+ qt/poppler-document.cc | 8 ++++++++
+ qt/poppler-qt.h | 12 ++++++++++++
+ 2 files changed, 20 insertions(+), 0 deletions(-)
+
+commit aef8ecda1e80b921228f415a53c9c5a52df87d94
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Aug 17 00:57:08 2009 +0200
+
+ [Qt4] deprecate Document::pdfVersion()
+
+ ... in favour of getPdfVersion()
+
+ qt4/src/poppler-qt4.h | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 830140f70e48e8033ad4411b6bd405d5ad7358a3
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Aug 17 00:51:13 2009 +0200
+
+ [Qt4] add Document::getPdfVersion(int *major, int *minor) for the document PDF version numbers
+
+ This new function reads the version of the PDF specification of the document, putting major and minor numbers in own variables.
+ Add them to the relative unit test.
+
+ qt4/src/poppler-document.cc | 8 ++++++++
+ qt4/src/poppler-qt4.h | 13 +++++++++++++
+ qt4/tests/check_metadata.cpp | 4 ++++
+ 3 files changed, 25 insertions(+), 0 deletions(-)
+
+commit 5491d16dfbd73f0256c62e49d02622dc3185012e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 17 00:24:41 2009 +0200
+
+ Move poppler core away from using a double as PDF file version
+
+ Frontends are yet to come
+
+ glib/poppler-document.cc | 2 +-
+ poppler/PDFDoc.cc | 7 ++++---
+ poppler/PDFDoc.h | 8 +++++---
+ qt/poppler-document.cc | 4 ++--
+ qt4/src/poppler-document.cc | 4 ++--
+ utils/pdfinfo.cc | 4 ++--
+ 6 files changed, 16 insertions(+), 13 deletions(-)
+
+commit efd5dd63a5b08249529d9a9f5906aefe806fb3aa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 17 00:21:22 2009 +0200
+
+ Forgot to update copyright info
+
+ fofi/FoFiType1C.cc | 14 ++++++++++++++
+ poppler/PDFDoc.cc | 2 +-
+ utils/parseargs.c | 2 +-
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 25ff4be0b4521cc3d2de386cdeb589beb245d435
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 17 00:15:10 2009 +0200
+
+ No need to change the locale since we use gatof that does the right thing
+
+ poppler/PDFDoc.cc | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+commit a6f698b4edc42c0414dd4690e1e037088321db2c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 17 00:14:35 2009 +0200
+
+ Use gatof instead of atof
+
+ fofi/FoFiType1C.cc | 3 ++-
+ poppler/Annot.cc | 5 +++--
+ poppler/Function.cc | 3 ++-
+ poppler/PDFDoc.cc | 3 ++-
+ utils/parseargs.c | 4 +++-
+ 5 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 807b121cae45832d2e5832bad19c31e77420bfec
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 17 00:10:30 2009 +0200
+
+ Add a custom strtod that comes from libspectre
+
+ Works over C locale integers without changing locale settings
+
+ CMakeLists.txt | 2 +
+ goo/Makefile.am | 6 ++-
+ goo/gstrtod.cc | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ goo/gstrtod.h | 43 ++++++++++++++++
+ 4 files changed, 196 insertions(+), 2 deletions(-)
+
+commit 914bf7677a14494b69857b1d8070092a9999fe79
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 16 20:50:02 2009 +0200
+
+ When writing the cm matrix write 4 significant digits not 4 decimals
+
+ This fixes bug 23332
+ Maybe we want to make this the default behaviour of 'g' instead of
+ a new 'gs' case, but i prefer to be on the safe side for the moment
+
+ goo/GooString.cc | 27 +++++++++++++++++++++++++--
+ goo/GooString.h | 4 +++-
+ poppler/PSOutputDev.cc | 4 ++--
+ 3 files changed, 30 insertions(+), 5 deletions(-)
+
+commit b7dfca1aa52b825eb3b8f1cc0470398c31615b30
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Aug 16 19:28:37 2009 +0200
+
+ [cairo] CairoImageOutputDev doesn't implement patterns
+
+ poppler/CairoOutputDev.h | 13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit d20d65111aee2ee4b8cdea2962ed1bb149122ba9
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Aug 16 17:36:14 2009 +0200
+
+ [cairo] Implement tiling patterns in cairo backend
+
+ Fixes bug #13518 for the cairo backend.
+
+ poppler/CairoOutputDev.cc | 56 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 10 ++++++++
+ 2 files changed, 66 insertions(+), 0 deletions(-)
+
+commit e965d0686d979c775b64a93f8e2f775f81885417
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 13 14:48:10 2009 +0200
+
+ Change OutputDev::tilingPatternFill to return a GBool
+
+ It allows outputdevs to decide whether render the pattern or not depending
+ on the parameters, like shaded patterns currently do.
+
+ poppler/Gfx.cc | 37 +++++++++++++++++++------------------
+ poppler/OutputDev.h | 11 ++++++-----
+ poppler/PSOutputDev.cc | 12 +++++++-----
+ poppler/PSOutputDev.h | 10 +++++-----
+ 4 files changed, 37 insertions(+), 33 deletions(-)
+
+commit ce70ef7d6afc800e24031dae43da301e9e542f0e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 15 17:45:57 2009 +0200
+
+ Fix backwards search
+
+ qt4/src/poppler-page.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5b7b1cdc5c3b8652d3ae583b4d7b8b6de625adc2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 15 17:45:05 2009 +0200
+
+ Add an autotest showing previousresult fails
+
+ qt4/tests/check_search.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 51 insertions(+), 0 deletions(-)
+
+commit 2484b0dcb8eb62f8e2c147498c58871ec04630b5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 14 11:47:11 2009 +0200
+
+ Implement the alpha path
+
+ I wonder if this is the correct fix why it was not implemented
+ but if fixes rendering of files in KDE bug 145868, KDE bug 193657,
+ poppler bug 17473.pdf, poppler bug 21651, poppler bug 22143 and
+ poppler bug 22152 and causes no regression in all the other files
+ i have in my test dir so i'm commiting it
+
+ poppler/SplashOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 03970d8b6d7624444664320470baa6d1b1299622
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Aug 11 12:01:07 2009 +0200
+
+ [build] Fix build with autotools
+
+ utils/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 15752b7cd5c94620e3ad3b6afd9c70ccc754c9b3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Aug 10 20:02:13 2009 +0200
+
+ [cairo] Add empty updateBlendMode to CairoImageOutputDev
+
+ Fixes a crash when using CairoImageOutputDev with a document with blend
+ modes.
+
+ poppler/CairoOutputDev.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 45dae4e66b2b833f95656850b5f1b0ffd1d96f1d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Aug 10 20:00:04 2009 +0200
+
+ [cairo] Use current fill_opacity when drawing images
+
+ Fixes launchpad bug #342282 (page 2 of the attached document)
+
+ poppler/CairoOutputDev.cc | 16 +++++++++++++---
+ 1 files changed, 13 insertions(+), 3 deletions(-)
+
+commit b1cd54546844f2f7cd6bf7cc14b7584c84c3fc14
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Aug 10 19:55:44 2009 +0200
+
+ [cairo] Do not save the font file twice for FreeType fonts
+
+ Fixes bug #20491.
+
+ poppler/CairoFontEngine.cc | 19 ++-----------------
+ 1 files changed, 2 insertions(+), 17 deletions(-)
+
+commit 4181a0ff11195eb7a56d76be23994b843e20b483
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 10 19:58:09 2009 +0200
+
+ this branch is unlikely to happen
+
+ poppler/Lexer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2a3025f32951ce7b7343aeef111902615d71595e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 10 19:55:40 2009 +0200
+
+ fix overflow calculation not to depend on the variable overflowing
+
+ poppler/Lexer.cc | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit a38001f724f78231c2fdadd28e647a35b41bab74
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 9 23:26:02 2009 +0200
+
+ Check for overflow when parsing integers
+
+ Fixes bug 23078
+
+ poppler/Lexer.cc | 28 ++++++++++++++++++++++------
+ 1 files changed, 22 insertions(+), 6 deletions(-)
+
+commit 4c4c0e44452d07bea88d98b7df0c01fadd7693cc
+Author: Jakub Wilk <ubanus@users.sf.net>
+Date: Sat Aug 8 17:26:14 2009 +0200
+
+ Silence some warnings when using internal headers and not compiling with -Wno-write-strings
+
+ People should not be using internal headers but it's just two lines
+
+ poppler/Object.h | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit e2c319ba18ab473fd969db9519a9231be67538c3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 8 00:48:18 2009 +0200
+
+ Also implement mono so that -mono in pdftoppm -png works
+
+ Totally not optimized
+
+ splash/SplashBitmap.cc | 23 ++++++++++++++++++++++-
+ 1 files changed, 22 insertions(+), 1 deletions(-)
+
+commit c669e7f3ca421265e78161cc3fdecd2a0c7510c9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 8 00:38:50 2009 +0200
+
+ Support splashModeMono8 in writePNGFile
+
+ Works though is non optimal
+
+ splash/SplashBitmap.cc | 55 ++++++++++++++++++++++++++++++++++--------------
+ 1 files changed, 39 insertions(+), 16 deletions(-)
+
+commit 92744b72df9084fd2d69ba78406898378884aed8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 8 00:20:52 2009 +0200
+
+ Add the -png flag to pdftoppm to output to PNG
+
+ Based on a patch by Shen Liang <shenzhuxi@gmail.com>
+ Also factored common PNG code from HtmlOutputDev to PNGWriter
+
+ CMakeLists.txt | 5 ++
+ goo/Makefile.am | 9 +++-
+ goo/PNGWriter.cc | 110 +++++++++++++++++++++++++++++++++++++++++++++
+ goo/PNGWriter.h | 43 +++++++++++++++++
+ poppler/Makefile.am | 8 +++
+ splash/SplashBitmap.cc | 70 ++++++++++++++++++++++++++++
+ splash/SplashBitmap.h | 5 ++
+ splash/SplashErrorCodes.h | 4 +-
+ utils/CMakeLists.txt | 4 --
+ utils/HtmlOutputDev.cc | 66 +++++----------------------
+ utils/Makefile.am | 4 --
+ utils/pdftoppm.1 | 3 +
+ utils/pdftoppm.cc | 21 +++++++--
+ 13 files changed, 283 insertions(+), 69 deletions(-)
+
+commit e4439ff527bb202d0239f78e647452983b733411
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Aug 7 15:23:57 2009 +0200
+
+ [cairo] Don't apply masks when fill color space mode is csPattern
+
+ In that case the mask is used for clipping when drawing images. Fixes
+ bug #22216.
+
+ poppler/CairoOutputDev.cc | 59 +++++++++++++++++++++++++++++----------------
+ 1 files changed, 38 insertions(+), 21 deletions(-)
+
+commit 7194f59a18e4f6997ae560af3db1bd101d6f726e
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu Aug 6 11:24:22 2009 +0100
+
+ [cairo] Use FT_New_Memory_Face() for mmapped fonts
+
+ If we hold a mapping for the font, then we can pass that memory to
+ FreeType for it to use as well. This saves on FreeType having to read the
+ file into a fresh block of memory.
+
+ poppler/CairoFontEngine.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 7e2bbcf6f85111d1006b0d5bc1503cadaba83c9f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 4 00:10:58 2009 +0200
+
+ Set KDAB via gamaral copyright
+
+ poppler/Form.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ed5918e16dafebc9ecf6db8ce0186f407ecbf7d5
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 1 20:00:22 2009 +0200
+
+ [Qt4 apidox] make example for FontIterator... not leak ;)
+
+ qt4/src/poppler-qt4.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit f3b36d9c992491e614e88dbf1a84b5433a7647f4
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 1 19:54:52 2009 +0200
+
+ [Qt4] Add color management API.
+
+ Add few wrapper functions to get/set color profiles.
+ Add a function to know whether the color management functions actually do anything (ie support compiled or not).
+ Add few basic API docs for the new functions.
+ Based on an initial patch by Hal V. Engel <hvengel@astound.net>, heavily reindented, polished and massaged in its API by me.
+
+ qt4/src/poppler-document.cc | 52 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 50 +++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 102 insertions(+), 0 deletions(-)
+
+commit 78a1969d040018c0c2bb74c94f5507f786e4666e
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 1 18:00:06 2009 +0200
+
+ [Qt] add unhandled cases and remove unused code
+
+ qt/poppler-page.cc | 12 ++----------
+ 1 files changed, 2 insertions(+), 10 deletions(-)
+
+commit bddebec0712e92e13b57d3d05d652673fe737866
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 1 17:12:22 2009 +0200
+
+ 0.11.2
+
+ CMakeLists.txt | 2 +-
+ NEWS | 30 ++++++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 36 insertions(+), 6 deletions(-)
+
+commit 87e2af3454348f5568d155c15af5d85268e47f1b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Aug 1 15:48:02 2009 +0200
+
+ [glib-demo] Add cast to make sure the comparison is always valid
+
+ glib/demo/attachments.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 464e95ef451103daddc9a30cd26b986291f02176
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Aug 1 15:47:25 2009 +0200
+
+ [glib-demo] Add missing return
+
+ glib/demo/attachments.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 7f48369e4d29b2a71abffa9e1966e3a2252de895
+Author: Guillermo Antonio Amaral Bastidas <gamaral@amaral.com.mx>
+Date: Sat Aug 1 15:41:34 2009 +0200
+
+ Call fillChildrenSiblingsID in fillChildrenSiblingsID instaed of loadChildrenDefaults
+
+ poppler/Form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e21a3e40bf6f4365064cea751ae186580d8f81f5
+Author: William Bader <williambader@hotmail.com>
+Date: Sat Aug 1 15:23:03 2009 +0200
+
+ Add the possibility of disabling font substitution in pdftops
+
+ Bug #23030
+
+ poppler/GlobalParams.cc | 17 +++++++++++++
+ poppler/GlobalParams.h | 4 +++
+ poppler/PSOutputDev.cc | 59 ++++++++++++++++++++++++++--------------------
+ poppler/PSOutputDev.h | 2 +
+ utils/pdftops.1 | 8 +++++-
+ utils/pdftops.cc | 7 +++++
+ 6 files changed, 70 insertions(+), 27 deletions(-)
+
+commit bd68c90338cbf16f468e5db59722610300a629e1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 1 15:19:48 2009 +0200
+
+ Forgot to add my copyright
+
+ poppler/GfxState.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 173451730948c320f16a0f5924a58302603eca0b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 1 15:13:35 2009 +0200
+
+ Try to workaround some incorrect PDF
+
+ Fixes rendering of PDF where forms/patterns have more q than Q. Fixes
+ rendering in splash of pdf in bugs #22835, #21899 and #16402
+
+ poppler/Gfx.cc | 13 +++++++++++++
+ poppler/GfxState.h | 1 +
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 35c408ca49be08144bcf14aa112505fd556725d2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:27:02 2009 +0200
+
+ add the overloaded virtual warning also the autotools based build
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1c32bd2d101e5dfb37e28276ecad699f121b27b7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:22:25 2009 +0200
+
+ Add my copyright to files i just edited
+
+ poppler/OutputDev.cc | 1 +
+ poppler/OutputDev.h | 1 +
+ utils/HtmlOutputDev.h | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 10717a48c85f1dbeff1c6bcd094006a9ecc92efc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:22:10 2009 +0200
+
+ Add -Woverloaded-virtual as default CXX flag
+
+ cmake/modules/PopplerMacros.cmake | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit db5f736655f01575ac5d7c524cbf131924ae91fa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:12:00 2009 +0200
+
+ rename the function
+
+ That way the name is different from the OutputDev function and does
+ not seem like a wrong overload
+
+ utils/HtmlOutputDev.cc | 4 ++--
+ utils/HtmlOutputDev.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 4be87f87509b93c4fe4025f9bd788e9412416663
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:11:32 2009 +0200
+
+ Remove Outputdev::beginMarkedContent as noone uses it
+
+ poppler/Gfx.cc | 2 --
+ poppler/OutputDev.cc | 3 ---
+ poppler/OutputDev.h | 1 -
+ 3 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 6ab2ec8a89519d2bd1576c8d62f8aec51b04479a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 31 23:10:56 2009 +0200
+
+ Warning--
+
+ poppler/PSOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 53c3d636ad645a350b576160e1498726238a7bd1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jul 31 18:23:57 2009 +0200
+
+ [cairo] Implement radialShadedFill in cairo backend using cairo gradients
+
+ Fixes bugs #10942, #14160
+
+ poppler/CairoOutputDev.cc | 28 +++++++++
+ poppler/CairoOutputDev.h | 2 +
+ poppler/Gfx.cc | 141 +++++++++++++++++++++++++++------------------
+ poppler/OutputDev.h | 2 +-
+ poppler/PSOutputDev.cc | 3 +-
+ poppler/PSOutputDev.h | 2 +-
+ 6 files changed, 117 insertions(+), 61 deletions(-)
+
+commit 2ba937545d1a2b9fa798f04fee755ccdf0e74ec7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jul 31 17:49:18 2009 +0200
+
+ [cairo] Use cairo_pattern_set_extend for linear gradients
+
+ poppler/CairoOutputDev.cc | 9 +++++++++
+ poppler/CairoOutputDev.h | 1 +
+ poppler/Gfx.cc | 34 ++++++++++++++++++++++++++++------
+ poppler/OutputDev.h | 4 ++++
+ 4 files changed, 42 insertions(+), 6 deletions(-)
+
+commit b054756113f0df6b59935823882f412486e96db5
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jun 17 11:10:15 2009 +0200
+
+ [cairo] Implement blend mdoes in cairo backend
+
+ It requires cairo from git master to work at the moment. Fixes bugs
+ #22384, #12979, #13603, #17919, #22255
+
+ configure.ac | 27 ++++++++++++++++++++
+ poppler/CairoOutputDev.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 1 +
+ 3 files changed, 87 insertions(+), 0 deletions(-)
+
+commit bf8964726c9311e7e82b1faf49cc2272e5c1e339
+Author: William Bader <williambader@hotmail.com>
+Date: Thu Jul 30 22:08:43 2009 +0200
+
+ Fix some double to int warnings by explicit casting
+
+ poppler/Gfx.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit fdbd0c548e963461b2bc4bdf1beaa1577cafcea7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jul 30 21:05:18 2009 +0200
+
+ Update gtk-doc build files
+
+ gtk-doc.make | 102 ++++++++++++++++++++++++++++++++++++++------------------
+ m4/gtk-doc.m4 | 74 +++++++++++++++++++++++------------------
+ 2 files changed, 110 insertions(+), 66 deletions(-)
+
+commit ae84dce5cea4d249526a6ed5b2feb2d3f241da1b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jul 30 20:45:39 2009 +0200
+
+ Revert "Remove unneeded files from repo"
+
+ This reverts commit 4cc9dee35e03d7b295a476f937ec0f2c43bb6592.
+
+ See bug #22697.
+
+ configure.ac | 2 +-
+ glib/reference/Makefile.am | 4 +-
+ gtk-doc.make | 155 ++++++++++++++++++++++++++++++++++++++++++++
+ m4/gtk-doc.m4 | 53 +++++++++++++++
+ 4 files changed, 211 insertions(+), 3 deletions(-)
+
+commit 7e14516a78b16453c747eb92b08665632e5f6844
+Author: Sanjoy Mahajan <sanjoy@mit.edu>
+Date: Mon Jul 27 23:20:50 2009 +0200
+
+ Fix displayPages call
+
+ Parameters are outputdev, first, last, dpi, dpi, rotate, usemediabox, crop, printing
+ and we were doing
+ usemediabox = !noCrop
+ crop = gFasle
+ the correct is
+ usemediabox = noCrop
+ crop = !noCrop
+
+ utils/pdftops.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 3d53a0eb14420d54c0ebf8590e34c018b8da105d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 19 16:02:33 2009 +0200
+
+ Copy byte_lookup in copy constructor
+
+ poppler/GfxState.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 8f7271acf17c46e663cd48d90c382b04a834fba2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 19 15:53:49 2009 +0200
+
+ Don't use byte_lookup table when color space doesn't support getLine methods
+
+ For color spaces that don't implement getRGBLine or getGrayLine methods,
+ getRGB or getGray are called for every pixel, however we were allocating
+ the byte_lookup table and converting colors in those cases too. Instead
+ of falling back to generic methods in the base class, the new methods
+ useGetRGBLine and useGetGrayLine have been added to he base class, so that
+ when they are not suopported in the current color space byte_lookup table is
+ not used at all.
+
+ Fixes bug #11027.
+
+ poppler/GfxState.cc | 125 ++++++++++++++++++++++++++++++---------------------
+ poppler/GfxState.h | 21 +++++++-
+ 2 files changed, 91 insertions(+), 55 deletions(-)
+
+commit 1bc737796bef1c65289a101b2d4c367267b9c974
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 19 15:51:43 2009 +0200
+
+ Remove unused variable
+
+ poppler/GfxState.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 512b2c654fd80c83b82e7adc828a478a18de17ab
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 26 19:35:06 2009 +0200
+
+ [cairo] Use CAIRO_EXTEND_PAD in drawImageMaskPrescaled too
+
+ poppler/CairoOutputDev.cc | 32 +++++++++++++++-----------------
+ 1 files changed, 15 insertions(+), 17 deletions(-)
+
+commit ad26e34bede53cb6300bc463cbdcc2b5adf101c2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 26 18:36:06 2009 +0200
+
+ [cairo] Use rectangle + clip instead of invert + tranform
+
+ This is just for consistency of drawImage methods
+
+ poppler/CairoOutputDev.cc | 30 ++++++++++++++----------------
+ 1 files changed, 14 insertions(+), 16 deletions(-)
+
+commit ee6b761a55baef4c3bbe4614b0c3b3d761a3111f
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sun Jul 26 16:19:15 2009 +0200
+
+ [cairo] Apply a clip for masked drawImage
+
+ In order to use EXTEND_PAD with a mask, we need to apply a clip (to
+ constrain the image to the appropriate region). The complicating factor for
+ drawSoftImage() is that mask size is independent of the image size, so we
+ need to compute the intersection of the mask with in the image in userspace.
+
+ poppler/CairoOutputDev.cc | 21 ++++++++++++++-------
+ 1 files changed, 14 insertions(+), 7 deletions(-)
+
+commit 499c6c972bac14936b5370276da723a6e98861b3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jul 26 11:30:08 2009 +0200
+
+ [cairo] Use CAIRO_EXTEND_PAD when drawing images
+
+ poppler/CairoOutputDev.cc | 306 +++++++++++++++++++++------------------------
+ 1 files changed, 140 insertions(+), 166 deletions(-)
+
+commit f91eb7d01cef0897727c63267db309bc92297d37
+Author: Koji Otani <sho@bbr.jp>
+Date: Sat Jul 25 16:34:12 2009 +0200
+
+ Fix generation of ps for some files
+
+ For example fixes second pdf in bug 18908
+
+ poppler/PSOutputDev.cc | 68 ++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 51 insertions(+), 17 deletions(-)
+
+commit f93f5e17d8f23f3e2862f3411f43a95b334e6c91
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jul 20 17:10:37 2009 +0200
+
+ [cairo] Improve performance when rendering one-channel images
+
+ It implements the same idea already used in SplashOutputDev, for
+ one-channel (monochrome/gray/separation) images we build a lookup table
+ so that we won't need to call colorMap->getRGBLine when filling the
+ image buffer. Fixes bug #18017.
+
+ poppler/CairoOutputDev.cc | 36 ++++++++++++++++++++++++++++++++++--
+ 1 files changed, 34 insertions(+), 2 deletions(-)
+
+commit e7475062b6ae5c495fa72faaf8fb3d97391f8544
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 14 17:22:52 2009 +0200
+
+ [cairo] Handle fontType1COT fonts in CairoFontEngine
+
+ poppler/CairoFontEngine.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit d42b9425fb2f98fa79e7a60e4f71ef14f5bacfe9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 12 19:55:14 2009 +0200
+
+ glade is not used anymore
+
+ cmake/modules/FindGTK.cmake | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+commit 454f7468c6a6a442a5064b5daa24d65ebf4fc6b6
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu Jul 9 10:43:00 2009 +0100
+
+ [cairo] Fix drawImage() for non-1x1 images
+
+ Carlos noticed a nasty bug with converting drawImage() to use PAD + fill,
+ instead of NONE + paint. That is the image was being padded out far beyond
+ the correct output extents. The cause is that the caller pre-scales the
+ context for the image, so the output rectangle was many times the true
+ image size - obliterating large amounts of the page. The temporary fix is
+ to counter-act the scaling on the context. Longer term, after fixing all
+ painters to use PAD correctly, we need to review the callers to remove
+ unnecessary pre-scaling.
+
+ poppler/CairoOutputDev.cc | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit f8d93eae3c7b9388feabac71f2380d0b42a855e7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 8 20:14:35 2009 +0200
+
+ Lookup UF and F entries before Unix, MAC and DOS in getFileSpec
+
+ poppler/FileSpec.cc | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 767c534f5fdf6ccbccfd85a0086d72c215c278f1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 8 19:13:54 2009 +0200
+
+ Use UF entry when present in dict in getFileSpecName() too
+
+ poppler/FileSpec.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 569627ac4d56ddd58e109ce2a37179a85e042030
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 8 13:02:16 2009 +0200
+
+ Implement axialShadedFill in cairo backend using cairo gradients
+
+ See bug #10942.
+
+ poppler/CairoOutputDev.cc | 29 +++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 10 ++++++++++
+ poppler/Gfx.cc | 29 ++++++++++++++++++++---------
+ poppler/OutputDev.h | 6 +++++-
+ poppler/PSOutputDev.cc | 2 +-
+ poppler/PSOutputDev.h | 2 +-
+ 6 files changed, 66 insertions(+), 12 deletions(-)
+
+commit 6ae0a6c0044713affa23eb1ee6a070785ed6c2f3
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed Jul 8 16:48:26 2009 +0100
+
+ [cairo] premultiply image mask
+
+ Cairo uses a premultiplied colour-space, so when creating the image mask
+ in drawImage() we need to remember to multiply by the alpha. In this case
+ it just requires zeroing out the masked pixels.
+
+ poppler/CairoOutputDev.cc | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 646e5884e748ecce7094c673400484aa1d902bdd
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed Jul 8 17:00:34 2009 +0100
+
+ [cairo] maskColors is an array of ints, no scaling required
+
+ drawImage() was erroneously scaling the maskColors from what it believed
+ to be [0:1] to [0:255]. However maskColors is already an integer array,
+ [0:255].
+
+ poppler/CairoOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d75feb1ee84385a9f94308cf47a43f4583092ddf
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed Jul 8 16:37:19 2009 +0100
+
+ [cairo] cleanse DrawImage()
+
+ Just a small bit of code rearrangement to reduce repetition and invalid checks.
+
+ poppler/CairoOutputDev.cc | 102 ++++++++++++++++++---------------------------
+ 1 files changed, 41 insertions(+), 61 deletions(-)
+
+commit 52f3704fed16cfc1e9dd85f72dde7922371e4099
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 8 11:40:52 2009 +0200
+
+ [TODO] Update TODO file
+
+ TODO | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit ef261f5f72d37a0aa2709611ee2bad7d55340ed8
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 7 10:57:31 2009 +0200
+
+ Do not use F and UF entries if Unix or DOS are present in FileSpec dict
+
+ poppler/FileSpec.cc | 114 +++++++++++++++++++++++----------------------------
+ 1 files changed, 51 insertions(+), 63 deletions(-)
+
+commit cafd4653dc6c7574214e80aa09489dcd24e347a6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 1 11:41:32 2009 +0200
+
+ [glib-demo] Fix a typo
+
+ glib/demo/utils.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a3c9c6d0c0ee55dccd2d03f20d5683ae300cdc6b
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jul 8 02:01:39 2009 +0200
+
+ start updating the TODO file
+
+ TODO file had quite some rust and dust in it, making quite "difficult" for others to understand what can be done for helping.
+ First step has been removing all the items done.
+ Next is grouping items by areas, so it is more clear what should be done in what area; current areas are:
+ - general items: for general stuff to be done, not specific to some area; an example could have been "use littlecms for color management?"
+ - core: stuff which is specific to the core library
+ - Qt4/Qt/glib/etc frontend: stuff specific for that frontend
+ - new frontends: ideas for possible new frontends
+
+ I was not sure about some items and Jeff Muizelaar's TODO, so I left them there.
+
+ TODO | 47 +++++++++++++++--------------------------------
+ 1 files changed, 15 insertions(+), 32 deletions(-)
+
+commit 92ad0ef89fe7690d83854b4821178dfdb2e22897
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Jul 4 00:19:23 2009 +0200
+
+ [Qt4 demo] hopefully fix the page size on zoom change
+
+ qt4/demos/pageview.cpp | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 97094d13bc0f144b25e13c1de7a5328608ab13e3
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Jul 4 00:07:12 2009 +0200
+
+ [Qt4 demo] show a list of checked/unchecked items for the document permissions
+
+ qt4/demos/permissions.cpp | 25 ++++++++-----------------
+ qt4/demos/permissions.h | 6 +++---
+ 2 files changed, 11 insertions(+), 20 deletions(-)
+
+commit 0d8f2ee0f03a14e7b8477c4b787c3441a758f26b
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jul 3 23:55:42 2009 +0200
+
+ [Qt4 demo] show page numbers in the toolbar as 1..n
+
+ qt4/demos/navigationtoolbar.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b0d48df9121c55f8162ddf0ee63832f9adebf37b
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jul 3 17:55:31 2009 +0200
+
+ [Qt4 demo] correctly use DPI values for the page sizes
+
+ qt4/demos/pageview.cpp | 12 +++++++++---
+ qt4/demos/pageview.h | 2 ++
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+commit dcc3c384919f1562b8f312ad3ac847e23f3e83ab
+Author: Sebastien Bacher <seb128@ubuntu.com>
+Date: Wed Jul 1 10:09:12 2009 +0200
+
+ [test] Use gtkbuilder rather than libglade
+
+ Fixes bug #21673
+
+ cmake/modules/FindGTK.cmake | 1 -
+ configure.ac | 4 +-
+ test/Makefile.am | 2 +-
+ test/pdf-inspector.cc | 34 ++--
+ test/pdf-inspector.glade | 434 -------------------------------------------
+ test/pdf-inspector.ui | 416 +++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 439 insertions(+), 452 deletions(-)
+
+commit 28208d1c9b8afbb769a5f4d9b0655b99fd4af16e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 1 09:52:12 2009 +0200
+
+ [glib-demo] Do not use gio if glib < 2.15
+
+ Fixes bug #22530.
+
+ glib/demo/main.c | 33 +++++++++++++++++++++++++++++++--
+ 1 files changed, 31 insertions(+), 2 deletions(-)
+
+commit 6ef83414ab55294cf46b6b05813927bb04066986
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 30 23:07:00 2009 +0200
+
+ Check getFileSpecNameForPlatform succeeded before using it's return value
+
+ Fixes crash on bug 22551
+
+ poppler/Annot.cc | 7 ++++---
+ poppler/Link.cc | 30 +++++++++++++++++-------------
+ poppler/Sound.cc | 8 +++++---
+ 3 files changed, 26 insertions(+), 19 deletions(-)
+
+commit 4b9db83841a8b97df1e0991c1b853897b7095777
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 30 11:24:29 2009 +0200
+
+ [glib-demo] Do not fill the surface before rendering
+
+ The surface is guaranteed to be cleared
+
+ glib/demo/render.c | 11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit 5deb6db5d340c08f337d2ba67aa1fd690e4eedd8
+Author: William Bader <williambader@hotmail.com>
+Date: Mon Jun 29 21:55:49 2009 +0200
+
+ Fix interpolate parameter position
+
+ poppler/SplashOutputDev.cc | 3 ++-
+ utils/ImageOutputDev.cc | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit e1e9ae2826eff1665d798b4b50b5c63e8282246b
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Jun 28 20:11:42 2009 +0200
+
+ [Qt4 demo] do not crash when changing the zoom with no document
+
+ qt4/demos/pageview.cpp | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit a98de97137cb343182bd03c443fc08ff4e0fd9a5
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Jun 28 19:08:02 2009 +0200
+
+ [Qt4 demo] add a zoom combobox
+
+ qt4/demos/navigationtoolbar.cpp | 33 ++++++++++++++++++++++++++++++++-
+ qt4/demos/navigationtoolbar.h | 7 ++++++-
+ qt4/demos/pageview.cpp | 14 ++++++++++++--
+ qt4/demos/pageview.h | 6 +++++-
+ qt4/demos/viewer.cpp | 2 ++
+ 5 files changed, 57 insertions(+), 5 deletions(-)
+
+commit 40002d2c765398869a3b7d8d92715f0608e39ab3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 28 16:45:19 2009 +0200
+
+ Make sure the array is big enough to read from it
+
+ poppler/Gfx.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0a1b41ff6de5a41e3450ecbcb1ba754dc06c29d9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 26 19:31:22 2009 +0200
+
+ Do not crash when we can't find onStr
+
+ Fixes crash in bug #22485
+ Not sure this is the best solution, but Adobe doesn't even open the file
+
+ poppler/Form.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6cb846664e57b02c99f1e6ad2b4e9128c9622e0a
+Author: Ilya Gorenbein <igorenbein@finjan.com>
+Date: Thu Jun 25 20:13:29 2009 +0200
+
+ Initilize AnnotColot properly when the Array is not correct
+
+ poppler/Annot.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5fdc3acb8dded2e7d08e6ef30f4c5ae1a4a11b5e
+Author: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Mon Jun 22 21:38:23 2009 +0200
+
+ Only change the page size when it really changes, otherwise duplex commands are lost
+
+ poppler/PSOutputDev.cc | 10 +++++++++-
+ poppler/PSOutputDev.h | 4 ++++
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+commit bf69beeb257cfd750c6ddc8b68aeb859b36380b2
+Author: David Benjamin <davidben@mit.edu>
+Date: Sat Jun 20 23:51:09 2009 +0200
+
+ Make DecryptStream return sane values for getPos()
+
+ Many streams (notably JBIG2Stream) expect wrapped streams to return correct
+ values for getPos(), i.e. increments by 1 when readChar() called, etc.
+ Fixes bug #19706.
+
+ poppler/Decrypt.cc | 8 ++++++++
+ poppler/Decrypt.h | 3 +++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 5ee4ff2aaf98e2eaa1ec2dc9f7e659b3b01ba7bf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jun 20 15:00:16 2009 +0200
+
+ [glib-demo] Allow using relative paths in demo application
+
+ glib/demo/main.c | 17 +++++------------
+ 1 files changed, 5 insertions(+), 12 deletions(-)
+
+commit a568248d3255407fcaa7368c4925c20e95619d20
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 19 21:07:39 2009 +0200
+
+ 0.11.1
+
+ CMakeLists.txt | 2 +-
+ NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 54 insertions(+), 8 deletions(-)
+
+commit ac99e239f2726db32617ff03174a6ce74361ea1b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 19 21:03:29 2009 +0200
+
+ ship PopplerCache.h
+
+ CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 84984d2aa25917d68c9971cefe636e626eada13d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 19 20:54:15 2009 +0200
+
+ Ship PopplerCache.h too
+
+ poppler/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3a52d46e5df8eb926b550d7f7a82f316dbf6808f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 19 17:45:44 2009 +0200
+
+ [glib-demo] Destroy pattern after using it
+
+ glib/demo/render.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2e97524e5d82a4c33a4e6410fead444681db6749
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 19 14:20:16 2009 +0200
+
+ [glib-demo] Use a transparent surface and fill it in white after rendering
+
+ glib/demo/render.c | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 009937842d5a8bfc12394e9e3ab71b7c33340a85
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 19 14:10:05 2009 +0200
+
+ [glib-demo] Use cairo_paint instead of rectangle + fill
+
+ glib/demo/render.c | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 7248da095f67d57c3999cee7d980e62fd8a7cf49
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 19 09:37:02 2009 +0200
+
+ Use Interpolate flag to decide whether applying image interpolation during rendering
+
+ Fixes bug #9860
+
+ poppler/ArthurOutputDev.cc | 4 +-
+ poppler/ArthurOutputDev.h | 5 +-
+ poppler/CairoOutputDev.cc | 92 +++++++++++++++++++++++++------------------
+ poppler/CairoOutputDev.h | 48 +++++++++++++----------
+ poppler/Gfx.cc | 49 +++++++++++++++++++---
+ poppler/OutputDev.cc | 17 +++++---
+ poppler/OutputDev.h | 13 ++++--
+ poppler/PSOutputDev.cc | 8 ++-
+ poppler/PSOutputDev.h | 8 ++-
+ poppler/PreScanOutputDev.cc | 25 ++++++++++--
+ poppler/PreScanOutputDev.h | 25 ++++++++++--
+ poppler/SplashOutputDev.cc | 16 +++++--
+ poppler/SplashOutputDev.h | 12 ++++--
+ utils/HtmlOutputDev.cc | 16 ++++----
+ utils/HtmlOutputDev.h | 7 ++-
+ utils/ImageOutputDev.cc | 20 +++++-----
+ utils/ImageOutputDev.h | 12 ++++--
+ 17 files changed, 248 insertions(+), 129 deletions(-)
+
+commit 37e3f877ee725648734ff41e1e83870a210bcbd7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 19 00:37:21 2009 +0200
+
+ Handle Streams in CMap definitions
+
+ Fixes bug 22334
+
+ poppler/CMap.cc | 50 +++++++++++++++++++++++++++++-----------------
+ poppler/CMap.h | 17 +++++++++++----
+ poppler/GfxFont.cc | 41 ++++++++++++++++++++++++++------------
+ poppler/GlobalParams.cc | 6 ++--
+ poppler/GlobalParams.h | 5 ++-
+ 5 files changed, 77 insertions(+), 42 deletions(-)
+
+commit 47de8eef46300832556ce5ed869e391e477fd843
+Author: David Benjamin <davidben@mit.edu>
+Date: Fri Jun 19 00:30:35 2009 +0200
+
+ Fix some bugs in JBIG2Stream handling
+
+ For more info see bug 12014 and [poppler] Bug in JBIG2Stream from 08-June-2009
+
+ poppler/JBIG2Stream.cc | 88 ++++++++++++++++++++++++++----------------------
+ poppler/JBIG2Stream.h | 15 ++++++++
+ 2 files changed, 63 insertions(+), 40 deletions(-)
+
+commit d30b1013ea3ce45b5ea942fe7357c0fd07ff47f4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 2 11:44:08 2009 +0200
+
+ Add setOpen() and setIcon() in AnnotText
+
+ poppler/Annot.cc | 25 +++++++++++++++++++++++++
+ poppler/Annot.h | 3 +++
+ 2 files changed, 28 insertions(+), 0 deletions(-)
+
+commit 287feffc1c1c0aa42a398fc071b489acef9ef22e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 2 11:26:40 2009 +0200
+
+ Add setLabel() and setPopup() to AnnotMarkup
+
+ poppler/Annot.cc | 36 ++++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 4 ++++
+ 2 files changed, 40 insertions(+), 0 deletions(-)
+
+commit 2a938af5624fbc79316dd6bee5e550f2b4270a76
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 2 10:59:44 2009 +0200
+
+ Add setParent() and setOpen() to AnnotPopup
+
+ poppler/Annot.cc | 19 +++++++++++++++++++
+ poppler/Annot.h | 4 ++++
+ 2 files changed, 23 insertions(+), 0 deletions(-)
+
+commit 0af5464352dfa51f0458c57a3590c847a45964c7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 2 10:37:49 2009 +0200
+
+ Save parent reference of popup annotations
+
+ poppler/Annot.cc | 16 +++++-----------
+ poppler/Annot.h | 4 ++--
+ 2 files changed, 7 insertions(+), 13 deletions(-)
+
+commit fc4bc43dcd6f6871a47b9198e8c2571a5d448c3e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jun 1 14:52:21 2009 +0200
+
+ Fix a crash in pdf-inspector
+
+ test/pdf-inspector.cc | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 3da7a2657892fde52b62e1f73476cb33d6c75e96
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 13:35:39 2009 +0200
+
+ Add Annot::setColor()
+
+ poppler/Annot.cc | 19 ++++++++++++++++++-
+ poppler/Annot.h | 6 +++++-
+ 2 files changed, 23 insertions(+), 2 deletions(-)
+
+commit 3eabdf57729852205855cf74ff2d2f9d7bc03f73
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 13:23:26 2009 +0200
+
+ Add construtors to create AnnotColor objects directly from color values
+
+ poppler/Annot.cc | 26 ++++++++++++++++++++++++++
+ poppler/Annot.h | 3 +++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+commit 8045e7a1a84a3d54a1c9415ac63b5b9df5ecc349
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 13:06:40 2009 +0200
+
+ Add Page::addAnnot() to add a new annotation to the page
+
+ poppler/Page.cc | 28 ++++++++++++++++++++++++++++
+ poppler/Page.h | 2 ++
+ 2 files changed, 30 insertions(+), 0 deletions(-)
+
+commit fe80eb84ec711b7400cef95e791a74c8fd259af7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 13:00:19 2009 +0200
+
+ Add getRef() to get the annotation reference
+
+ poppler/Annot.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1c92657be72c44dba7185808ffb00dd85c5ab289
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 12:14:02 2009 +0200
+
+ Save page object and ref in Page class
+
+ This is needed to be able to modify the page object.
+
+ poppler/Catalog.cc | 2 +-
+ poppler/Page.cc | 6 +++++-
+ poppler/Page.h | 4 +++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 4ad2d663262008e4b97342c4ed67c686ff5abd13
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 29 11:43:30 2009 +0200
+
+ Add annot constructors to create annot objects without a dict
+
+ This allows to create annotation objects to be added to the document.
+ Required fields on the annotation dictionary are constructor arguments,
+ setters will be added for the other fields.
+
+ poppler/Annot.cc | 300 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 22 ++++-
+ 2 files changed, 315 insertions(+), 7 deletions(-)
+
+commit e5c4862b0c1b08a0fab47070cb9c862026e93567
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 10 23:28:03 2009 +0200
+
+ ignore++
+
+ m4/.gitignore | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 572779f8037763c1e0ee64c47a3dad6df0d3b693
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Jun 10 22:55:26 2009 +0200
+
+ Fix dashed line in page 1 of bug 20011
+
+ poppler/Gfx.cc | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit b97591672e0d9c31a3d044fe52e34cc80a491221
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Jun 10 22:54:57 2009 +0200
+
+ Fix "Conditional jump or move depends on uninitialised value"
+
+ When stroking with a pattern, set strokeColor with a copy of fillColor.
+ This is wrong and the fillColor may be uninitialized.
+ See bug 20011
+
+ poppler/Gfx.cc | 13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+commit a92b38836b1e4475d5a7a1b9cb8f3e9429cef275
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 9 22:39:19 2009 +0200
+
+ Correctly duplicate the cache on PostScriptFunction(PostScriptFunction *func)
+
+ poppler/Function.cc | 28 ++++++++++++++++++++++++++++
+ poppler/PopplerCache.cc | 20 ++++++++++++++++++++
+ poppler/PopplerCache.h | 14 ++++++++++++++
+ 3 files changed, 62 insertions(+), 0 deletions(-)
+
+commit 2cecdf922f4c8178b0e55d3ddf86c31f8be3313a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jun 9 11:04:39 2009 +0200
+
+ [glib] Fix a crash when a destination points to an invalid page
+
+ glib/poppler-action.cc | 21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+commit 831288c13c3a7502bbccd1313c6e376283be367c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 18:37:20 2009 +0200
+
+ Optimize roll() a bit
+
+ If the number of times to roll is > than half the number of items
+ rotate in the reverse direction
+ Makes it be 33% of exec() instead of 42%
+
+ poppler/Function.cc | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 3d40dcad850a2bc0e28845a15722db0c79920135
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 13:38:50 2009 +0200
+
+ Move the GfxState cache to the new poppler cache class
+
+ poppler/GfxState.cc | 97 ++++++++++++++++++++++++---------------------------
+ poppler/GfxState.h | 19 ++--------
+ 2 files changed, 49 insertions(+), 67 deletions(-)
+
+commit 2619e09833f421fb3d8cc68d41d15081ae6824e4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 13:37:40 2009 +0200
+
+ Implement a cache for PostscriptFunction transforms
+
+ Makes time of rendering of bug 21562 go down from 24 to 8 seconds
+
+ poppler/Function.cc | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Function.h | 2 +
+ 2 files changed, 78 insertions(+), 0 deletions(-)
+
+commit 588bfe3c14f42be492066c2a98e30482475a6926
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 13:36:39 2009 +0200
+
+ Add a code to a generic cache based on Koji's code for GfxState cache
+
+ CMakeLists.txt | 1 +
+ poppler/Makefile.am | 1 +
+ poppler/PopplerCache.cc | 82 +++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/PopplerCache.h | 47 +++++++++++++++++++++++++++
+ 4 files changed, 131 insertions(+), 0 deletions(-)
+
+commit d09478fcc44b5c594f1803fc24654af5e10fa129
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 01:34:01 2009 +0200
+
+ Move index and pop to class definition too
+
+ poppler/Function.cc | 32 +++++++++++++++-----------------
+ 1 files changed, 15 insertions(+), 17 deletions(-)
+
+commit 2083264e8ab0fd9976294de08a18de615d5a1168
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 7 01:21:19 2009 +0200
+
+ Move the implementations to the class definition
+
+ Make gcc inline the functions and time to render a heavy PSFunction doc goes from 28 to 20 secs
+
+ poppler/Function.cc | 151 ++++++++++++++++++++++++---------------------------
+ 1 files changed, 71 insertions(+), 80 deletions(-)
+
+commit 24580fcd2be74db5f3140bdb2ebff8431b7d3f1e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 6 16:17:26 2009 +0200
+
+ Add a debug saying how much rendering took
+
+ qt4/tests/test-poppler-qt4.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 50cf7cffff760e41774957ad8f1f92803142438e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jun 6 16:04:54 2009 +0200
+
+ Use g_path_get_basename instead of g_basename in gtk-cairo-test
+
+ Fixes bug #21361.
+
+ test/gtk-cairo-test.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 4cc9dee35e03d7b295a476f937ec0f2c43bb6592
+Author: Christian Persch <chpe@gnome.org>
+Date: Sat Jun 6 12:13:48 2009 +0200
+
+ Remove unneeded files from repo
+
+ See bug #22094
+
+ configure.ac | 2 +-
+ glib/reference/Makefile.am | 4 +-
+ gtk-doc.make | 155 --------------------------------------------
+ m4/gtk-doc.m4 | 53 ---------------
+ 4 files changed, 3 insertions(+), 211 deletions(-)
+
+commit c94e476dbff9e527c72e52377d830f35f29ba3d6
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jun 5 11:09:44 2009 +0200
+
+ when showing the tooltip for a text rect, show also its index in the page text boxes list
+
+ qt4/tests/test-poppler-qt4.cpp | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 2298acac267257b1916c802bdb902428e69e683b
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jun 5 11:08:51 2009 +0200
+
+ [Qt4 apidox] FontInterator is new in 0.12
+
+ qt4/src/poppler-qt4.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 37c48c2521c623c485841472c4a174a1841aea33
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jun 5 10:54:30 2009 +0200
+
+ [CMake] Add poppler version defines and version check macro
+
+ Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and
+ POPPLER_CHECK_VERSION macro. FDO bug #22091.
+
+ CMakeLists.txt | 5 ++++-
+ glib/poppler-features.h.cmake | 9 +++++++++
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+commit 26f6fb1d79c2589829cd896d57da63d16641f307
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jun 5 10:51:26 2009 +0200
+
+ [CMake] switch poppler-features.h.cmake to a more autotools-like syntax
+
+ glib/CMakeLists.txt | 2 +-
+ glib/poppler-features.h.cmake | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 89704635b727db42f6c72ba101091eb7eddb967a
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jun 5 10:39:17 2009 +0200
+
+ [Qt4 demo] compile the new thumbnail module with autotools as well
+
+ qt4/demos/Makefile.am | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 291bafe64c8755fe5f85a51b184ac6e3d3170e1d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 5 10:07:16 2009 +0200
+
+ [glib] Use g_strerror instead of strerror
+
+ Fixes bug #22095.
+
+ glib/poppler-document.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0ca7e214fb5f9c9fb59792149bd23c1617d38cac
+Author: Christian Persch <chpe@gnome.org>
+Date: Thu Jun 4 22:35:40 2009 +0200
+
+ Add poppler version defines and version check macro
+
+ Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and
+ POPPLER_CHECK_VERSION macro. FDO bug #22091.
+
+ configure.ac | 11 ++++-
+ glib/poppler-features.h.in | 9 +++
+ glib/reference/poppler-docs.sgml | 1 +
+ glib/reference/poppler-sections.txt | 10 ++++
+ glib/reference/tmpl/poppler-features.sgml | 80 +++++++++++++++++++++++++++++
+ 5 files changed, 110 insertions(+), 1 deletions(-)
+
+commit 4ce04da0040e5a2626c110f94a128e2d272401b9
+Author: Matthias Drochner <M.Drochner@fz-juelich.de>
+Date: Thu Jun 4 23:05:22 2009 +0200
+
+ Use the correct value when creating the V field
+
+ PDF Spec says:
+ For items represented in the Opt array by a two-element array, the name string is the second of the two array elements.
+
+ poppler/Form.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 7e01e37a834bfdd75d739ea2b48e9127ca7f259e
+Author: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Thu Jun 4 20:25:55 2009 +0200
+
+ Add part of fix for bug 20420, the other part was checked in with Thomas patches
+
+ poppler/PSOutputDev.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 50a7b4bcaa6e5f56cc25fe6936f9dc537a1b4b37
+Author: Jeremy C. Reed <reed@reedmedia.net>
+Date: Thu Jun 4 20:19:03 2009 +0200
+
+ [glib] Hyphenate UTF-8 and UTF-16BE
+
+ Fixes bug #21953.
+
+ where iconv() is called to fill in a text field, use "UTF-8" and
+ "UTF-16BE" as encoding names rather than the less portable
+ "UTF8" and "UTF16BE" -- this makes it work on NetBSD.
+
+ glib/poppler-annot.cc | 2 +-
+ glib/poppler-form-field.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2cf9e6a2318b770ae62572944c687576d1801d31
+Author: Till Kamppeter <till.kamppeter@gmail.com>
+Date: Thu Jun 4 19:48:42 2009 +0200
+
+ Support multiple page sizes when converting to PS
+
+ Fixes byg #19777
+
+ poppler/PSOutputDev.cc | 31 +++++++++++++++++++++++++++++--
+ poppler/PSOutputDev.h | 4 +++-
+ utils/pdftops.1 | 26 +++++++++++++++++++++-----
+ utils/pdftops.cc | 17 ++++++++++++-----
+ 4 files changed, 65 insertions(+), 13 deletions(-)
+
+commit 30fb7cb7e47cf6a8008c5083c8d0978fdfdf8e62
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jun 4 19:25:22 2009 +0200
+
+ Add missing { }
+
+ poppler/Gfx.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 1beec21ed3a016998fee3849d460166895db9047
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 3 22:37:43 2009 +0200
+
+ Give an error when using level1sep without having CMYK support
+
+ Fixes bug #22026
+
+ poppler/PSOutputDev.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit e80d645c34c7d44d1f35da0a25669d1c4cde6e7f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 3 22:00:49 2009 +0200
+
+ Also accept tokens with to leading 00
+
+ Fixes bug 22025, based on a patch by William Bader
+
+ poppler/CharCodeToUnicode.cc | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit e521c1efaeba3f35d10e46bca3d9650dabd2d889
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed Jun 3 22:08:57 2009 +0930
+
+ Implement text in pattern colorspace for the cairo backend
+
+ poppler/CairoOutputDev.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 19 ++++++++++++++++++
+ 2 files changed, 66 insertions(+), 0 deletions(-)
+
+commit a87978b09a026b2db6b0f80271d87b44b336a121
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jun 3 13:49:56 2009 +0200
+
+ [Qt4 demo] show the checksum for embedded files
+
+ qt4/demos/embeddedfiles.cpp | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit db5102842494a124d813db1696bb60820db3442b
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jun 3 13:21:22 2009 +0200
+
+ [Qt4 demo] remove checks for Qt >= 4.2
+
+ poppler-qt4 requires Qt 4.3, so checking for 4.2 is no more needed
+
+ qt4/demos/embeddedfiles.cpp | 2 --
+ qt4/demos/fonts.cpp | 2 --
+ qt4/demos/info.cpp | 2 --
+ qt4/demos/optcontent.cpp | 2 --
+ qt4/demos/permissions.cpp | 2 --
+ qt4/demos/toc.cpp | 2 --
+ 6 files changed, 0 insertions(+), 12 deletions(-)
+
+commit e8d897581656ee4a20e9bb87dd999425663ace3b
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jun 3 02:54:29 2009 +0200
+
+ [Qt4 demo] simplier way to change page from the thumbnail view
+
+ qt4/demos/pageview.cpp | 5 -----
+ qt4/demos/pageview.h | 3 ---
+ qt4/demos/thumbnails.cpp | 2 +-
+ qt4/demos/thumbnails.h | 3 ---
+ qt4/demos/viewer.cpp | 1 -
+ 5 files changed, 1 insertions(+), 13 deletions(-)
+
+commit f69a4fe47d3478cccbc03e4ac0929c7eada681c0
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jun 3 01:24:21 2009 +0200
+
+ [Qt4 demo] Add a thumbnail dock widget
+
+ Useful to show the embedded page thumbnails in the document, if any.
+ Based on a patch by Shawn Rutledge <shawn.t.rutledge@gmail.com>, reworked by me to be a QListWidget showing the page items at their full size.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/thumbnails.cpp | 84 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/thumbnails.h | 51 ++++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 11 +++++-
+ 4 files changed, 146 insertions(+), 1 deletions(-)
+
+commit 2f24ac0f4bbd6de1c9f137110b3ac2bd3b23b0b9
+Author: Shawn Rutledge <shawn.t.rutledge@gmail.com>
+Date: Wed Jun 3 01:22:31 2009 +0200
+
+ [Qt4 demo] add a public slot to set the current page
+
+ qt4/demos/pageview.cpp | 5 +++++
+ qt4/demos/pageview.h | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 1f1baf186f9e37606765e51ec5b9893ddfbfa893
+Author: Shawn Rutledge <shawn.t.rutledge@gmail.com>
+Date: Wed Jun 3 01:19:16 2009 +0200
+
+ [Qt4] Add Page::thumbnail()
+
+ This function can be used to get the embedded thumbnail of the page, present in the document.
+ Reindented by me, and avoid a memory leak because of non-freed data.
+
+ qt4/src/poppler-page.cc | 21 ++++++++++++++++++++-
+ qt4/src/poppler-qt4.h | 11 +++++++++++
+ 2 files changed, 31 insertions(+), 1 deletions(-)
+
+commit 5cc24be1e9af0a27ab88ffa719bcabc2378868e4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 3 00:05:54 2009 +0200
+
+ Remove unused variables
+
+ poppler/SplashOutputDev.cc | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 45823bf8f4abacbbf257f6708264de074eda3cf4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 3 00:02:54 2009 +0200
+
+ Make it compile :-/
+
+ poppler/SplashOutputDev.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit f5ae14907261a46c121f3ed7aea9d7ad9b9c55de
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 2 23:52:59 2009 +0200
+
+ Really fix the typo
+
+ README | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5d4b1995cdd57db7cef3d88704850aaf66ed7fff
+Author: William Bader <williambader@hotmail.com>
+Date: Tue Jun 2 23:10:53 2009 +0200
+
+ Fix three typos in README
+
+ README | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 104f9286ceb5fcb5f4795bca7633029142d5f6a4
+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
+Date: Tue Jun 2 22:59:42 2009 +0200
+
+ Support colorizing text in pattern colorspace
+
+ This implements commits the final patches for bug 19670 and 19994
+ Also fixes bugs 15819 and 2807
+ Also implements blending for SPLASH_CMYK in Splash
+ It's a quite big change but i've done regression testing over my whole
+ pdf suite and did not fit anything that went worse, just improvements
+ Missing the Cairo support
+
+ CMakeLists.txt | 1 +
+ poppler/Gfx.cc | 135 ++++++++++++---
+ poppler/Gfx.h | 7 +
+ poppler/GfxState.cc | 58 +------
+ poppler/GfxState_helpers.h | 80 +++++++++
+ poppler/Makefile.am | 1 +
+ poppler/OutputDev.h | 14 ++
+ poppler/PSOutputDev.cc | 285 +++++++++++++++++++-------------
+ poppler/PSOutputDev.h | 18 ++
+ poppler/SplashOutputDev.cc | 404 +++++++++++++++++++++++++++++++++++++-------
+ poppler/SplashOutputDev.h | 19 ++
+ 11 files changed, 766 insertions(+), 256 deletions(-)
+
+commit d3e4563146cbff4cb507522783e60462461c7524
+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
+Date: Sun May 31 23:23:07 2009 +0200
+
+ Set memory to 0 after allocation, fixes problems on Sun machines, should not hurt for others
+
+ poppler/GfxState.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 78a58931b4347ecb505bad5a51104382ef5f91c7
+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
+Date: Sun May 31 22:52:23 2009 +0200
+
+ Add splashClearColor that assigns white to the given colorptr
+
+ splash/SplashTypes.h | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 47c26747b32c242ec8ac60e7b93150a67eb22e31
+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
+Date: Sun May 31 22:51:22 2009 +0200
+
+ Fix splashColorModeNComps to correctly include all values for each SplashColorMode
+
+ splash/SplashState.cc | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 41775d8c0b44bf591d8ff5ede7fad276e8fa9eef
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jun 1 15:24:24 2009 +0200
+
+ [glib-demo] Use poppler_annot_markup_has_popup()
+
+ glib/demo/annots.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit f542c5294394e837298cb7e7d1d94bb336bfd09d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jun 1 15:24:04 2009 +0200
+
+ [glib] Add poppler_annot_markup_has_popup()
+
+ glib/poppler-annot.cc | 20 ++++++++++++++++++++
+ glib/poppler-annot.h | 1 +
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit af32d56af779edcc539b680e634755941d1bf45c
+Author: Petr Gajdos <pgajdos@novell.com>
+Date: Thu May 21 00:37:18 2009 +0200
+
+ Add the possibility of forcing no hinting of fonts
+
+ poppler/ArthurOutputDev.cc | 2 +
+ poppler/GlobalParams.cc | 20 +++++++++++
+ poppler/GlobalParams.h | 4 ++
+ poppler/SplashOutputDev.cc | 2 +
+ splash/SplashFTFont.cc | 76 ++++++++++++++++++++++++++----------------
+ splash/SplashFTFont.h | 2 +
+ splash/SplashFTFontEngine.cc | 8 +++--
+ splash/SplashFTFontEngine.h | 6 ++-
+ splash/SplashFontEngine.cc | 4 ++-
+ splash/SplashFontEngine.h | 2 +
+ 10 files changed, 91 insertions(+), 35 deletions(-)
+
+commit 1a69d9638214943b3c2278f570694d9722a5de15
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 20 23:58:44 2009 +0200
+
+ Do not create the GfxColorTransform if the lcms could not be created
+
+ Fixes crash on pdf from bug 20108
+
+ poppler/GfxState.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 95246d39c1289111a4ba3eb2ffbec50d7702e5eb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 20 23:20:20 2009 +0200
+
+ Check Mask entries are int before using them, also if they are real cast to int and try to use them
+
+ Fixes bug #21841
+
+ poppler/Gfx.cc | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 0c3517bfb4e1e1a28962f8d490ad69ec5766b6a1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 20 23:08:41 2009 +0200
+
+ Fix pdftops crash on file from KDE bug 174899
+
+ Still does not generate a correct ps file, but at least the program does not crash now
+
+ fofi/FoFiTrueType.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 548c72600b8a5e076647041660ed5031feedc7cc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 20 22:43:11 2009 +0200
+
+ Do not exit(1) on a pdf i have lying around
+
+ PDF is 0f03b3539a436a9f18d7e4e29d410f89 6607907.pdf
+
+ poppler/JBIG2Stream.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit f78d3a7ff5ef4b500d76d84ebc45aac3be162dab
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 18 20:44:40 2009 +0200
+
+ Move lcms.h include to GfxState.cc, replace lcms typedefs by void *
+
+ poppler/GfxState.cc | 70 ++++++++++++++++++++++++++++++++++++++++++++------
+ poppler/GfxState.h | 64 ++++++++++------------------------------------
+ 2 files changed, 75 insertions(+), 59 deletions(-)
+
+commit ec2467f9981b7e7c23d5dcd8eabf2e7c8cdf8930
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 17 20:00:53 2009 +0200
+
+ Use the lcms include dir
+
+ CMakeLists.txt | 3 +++
+ poppler/Makefile.am | 2 ++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit e0fcf7055af480498a81a000dcd9f977a783df66
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 17 12:07:05 2009 +0200
+
+ Use pkgconfig for autotools cms check
+
+ configure.ac | 12 +++++++-----
+ poppler/Makefile.am | 2 +-
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 657734c19274ab281328cba9297eca45e48777aa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 17 12:06:47 2009 +0200
+
+ Better lcms check comming from kdelibs
+
+ cmake/modules/FindLCMS.cmake | 95 +++++++++++++++++++++++++++++++-----------
+ 1 files changed, 71 insertions(+), 24 deletions(-)
+
+commit 0974b7b4bfe3f8cf3a1408741ddf01c667c28044
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Thu May 14 16:15:22 2009 +0200
+
+ [Win32] Build fix for MSVC.
+
+ poppler-config.h.cmake | 2 +-
+ poppler/poppler-config.h.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d1c0e8a6c63361304cd453bb4c51e84a1aab7efa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu May 14 00:29:18 2009 +0200
+
+ Kill support for specifying extension in openTmpFile
+
+ We don't use it and it would not work anyway, see bug #21713
+
+ goo/gfile.cc | 58 +++++++++--------------------------------
+ goo/gfile.h | 3 +-
+ poppler/CairoFontEngine.cc | 6 ++--
+ splash/SplashFTFontEngine.cc | 3 +-
+ splash/SplashT1FontEngine.cc | 3 +-
+ splash/SplashT1FontFile.cc | 3 +-
+ 6 files changed, 24 insertions(+), 52 deletions(-)
+
+commit e237d8b5c2ae8805487a0790d9fb218263686712
+Author: Pino Toscano <pino@kde.org>
+Date: Wed May 13 18:37:07 2009 +0200
+
+ [Qt4] we don't need an output device anymore (since long, even) for resolving destinations
+
+ qt4/src/poppler-document.cc | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 9a2a851da93ef1a0c291fc9523a468e808ffd08e
+Author: Pino Toscano <pino@kde.org>
+Date: Wed May 13 18:19:11 2009 +0200
+
+ [Qt4] Do not try to resolve named destinations for GoTo links pointing to external documents.
+
+ In such cases, the named destination is a destination in the external document, so we would try to look up a destination which is not in the current document (thus the look up is unuseful).
+ It is task of the users of poppler-qt4 detect such situations, and resolve the named when necessary, using Document::linkDestination(QString).
+
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-link.cc | 2 +-
+ qt4/src/poppler-page.cc | 6 ++++--
+ qt4/src/poppler-private.cc | 4 ++--
+ qt4/src/poppler-private.h | 5 +++--
+ 5 files changed, 11 insertions(+), 8 deletions(-)
+
+commit 51f6cc26fc5fdccce1ba4d4816dec374ce85d67a
+Author: Pino Toscano <pino@kde.org>
+Date: Wed May 13 17:38:00 2009 +0200
+
+ [Qt4] start a (basic) unit test for links & destinations
+
+ qt4/tests/CMakeLists.txt | 1 +
+ qt4/tests/Makefile.am | 5 ++
+ qt4/tests/check_links.cpp | 96 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 102 insertions(+), 0 deletions(-)
+
+commit 174f8087f5e09c5d1915de128b7a15acf47c1e13
+Author: Pino Toscano <pino@kde.org>
+Date: Wed May 13 16:44:59 2009 +0200
+
+ [Qt4] set the destination name only when it is not resolved
+
+ qt4/src/poppler-link.cc | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit fb0cb2add9443992f166acdf744fbec875faaabf
+Author: Pino Toscano <pino@kde.org>
+Date: Tue May 12 01:53:43 2009 +0200
+
+ [Qt4] Add LinkDestination::destinationName() that returns the name of the current destination.
+
+ qt4/src/poppler-link.cc | 10 ++++++++++
+ qt4/src/poppler-link.h | 7 +++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit b8bd44f1302f7b6a6923d41c98ec74c118a5abb8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 11 20:49:34 2009 +0200
+
+ Poppler 0.11.0 aka 0.12 Alpha 1
+
+ CMakeLists.txt | 4 +-
+ NEWS | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +-
+ poppler/Makefile.am | 2 +-
+ qt4/src/Doxyfile | 2 +-
+ 6 files changed, 150 insertions(+), 8 deletions(-)
+
+commit 79bcedd5602729b959f21aed222445de621e7ecb
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon May 11 19:59:57 2009 +0200
+
+ Update copyright headers for previous patches
+
+ poppler/ArthurOutputDev.cc | 1 +
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/Page.cc | 2 +-
+ poppler/Stream.cc | 1 +
+ poppler/Stream.h | 1 +
+ utils/HtmlOutputDev.cc | 1 +
+ utils/ImageOutputDev.cc | 1 +
+ 7 files changed, 7 insertions(+), 2 deletions(-)
+
+commit f16e36df3a74e1adf14513a6340be2e8665f8d65
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun May 10 19:24:32 2009 +0200
+
+ Don't include popups annots with a parent in annots list
+
+ poppler/Annot.cc | 13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 5051ebed1477ff3f7721606f79d66d56a80c1145
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun May 10 19:10:51 2009 +0200
+
+ Make sure ImageStream::close() is called after ImageStream::reset()
+
+ poppler/ArthurOutputDev.cc | 1 +
+ poppler/CairoOutputDev.cc | 20 +++++++++++++++++---
+ poppler/Page.cc | 1 +
+ poppler/Stream.cc | 4 ++++
+ poppler/Stream.h | 3 +++
+ utils/HtmlOutputDev.cc | 1 +
+ utils/ImageOutputDev.cc | 1 +
+ 7 files changed, 28 insertions(+), 3 deletions(-)
+
+commit 829ed964374676ddfa4a9048c940dc20a309ca47
+Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
+Date: Sun May 10 23:39:11 2009 +0200
+
+ Fix axial shading fix to ensure the painting passes by the four edges of the bbox
+
+ When j and teoricalj are the same, just change the value of ta[] not the next[] ones
+
+ poppler/Gfx.cc | 23 ++++++++++++++++-------
+ 1 files changed, 16 insertions(+), 7 deletions(-)
+
+commit 68d9644499676ed1553b2bfcdbfc9a5677c75345
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 9 22:25:12 2009 +0200
+
+ Hidden property depends on parent being hidden, not only yourself
+
+ Fixes bug #16093
+
+ poppler/Gfx.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 810a71ea66f0e07d9849a5e9bf28911472482d1b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 8 09:36:31 2009 +0200
+
+ [glib] Add poppler_annot_markup_get_popup_rectangle
+
+ glib/demo/annots.c | 8 ++++++++
+ glib/poppler-annot.cc | 35 +++++++++++++++++++++++++++++++++++
+ glib/poppler-annot.h | 2 ++
+ 3 files changed, 45 insertions(+), 0 deletions(-)
+
+commit 5d328282da4713356fbe4283bd992ac2fc9010a2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu May 7 23:11:55 2009 +0200
+
+ bitmap->h can be 0, move to _checkoverflow variant, code already knows how to deal with NULL
+
+ splash/SplashFTFont.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5b0fb6f94d6d54b1b0c97762db61e2ab0dd07c85
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 6 22:59:55 2009 +0200
+
+ Fix format printing
+
+ poppler/JBIG2Stream.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c21b08a254f42f53d4b59ad4fb308c7c68c32d15
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed May 6 15:56:21 2009 +0200
+
+ [glib] Several fixes in poppler_annot_get_color()
+
+ PopplerColor is compatible with GdkColor where every component is in the
+ range of 0 to 65535, we were returning values between 0 and 1 but
+ converted to guint16.
+ We were also showing a warning when AnnotColor::colorTransparent is
+ used, but we decided to return a PopplerColor * to be able to represent
+ transparent color returning NULL, so it's actually supported.
+
+ glib/demo/annots.c | 25 +++++++++++--------------
+ glib/poppler-annot.cc | 36 +++++++++++++++++++++---------------
+ 2 files changed, 32 insertions(+), 29 deletions(-)
+
+commit 63cc40ec02498e1ec249d5f74e23f574c665872e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 2 14:08:23 2009 +0200
+
+ Link pdftoabw to abiword libs
+
+ Fixes bug #21520
+
+ utils/Makefile.am | 22 ++++++++++++----------
+ 1 files changed, 12 insertions(+), 10 deletions(-)
+
+commit 70e06e9ae28d08bb7495a7f2eb03b0b5714a1e54
+Author: Kouhei Sutou <kou@cozmixng.org>
+Date: Wed Apr 29 09:52:21 2009 +0900
+
+ PopplerAttachment refers its document.
+
+ glib/poppler-attachment.cc | 41 +++++++++++++++++++++++++++++++++++------
+ 1 files changed, 35 insertions(+), 6 deletions(-)
+
+commit 977a13f1091700bf7e7b31859e0e6632dc323462
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Apr 25 19:07:01 2009 +0200
+
+ [glib] Only create checksum string for valid checksums
+
+ glib/poppler-attachment.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit fb6e7141e3008ae230ae5819e2c7a0425296d8d2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Apr 24 10:13:53 2009 +0200
+
+ Update copyright headers
+
+ glib/poppler-annot.cc | 1 +
+ glib/poppler-annot.h | 1 +
+ poppler/Annot.cc | 2 +-
+ poppler/Annot.h | 2 +-
+ poppler/DateInfo.cc | 1 +
+ poppler/DateInfo.h | 1 +
+ 6 files changed, 6 insertions(+), 2 deletions(-)
+
+commit fc7e52fef0317f9c85ead2c4f8a0e9b688decca3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Apr 24 09:53:41 2009 +0200
+
+ Fix typos in Annot::setContents() documentation
+
+ poppler/Annot.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit df0032cf5f6e5dc44bad056c659180e4065d32e2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Apr 23 13:19:25 2009 +0200
+
+ Document Annot::setContents() method
+
+ poppler/Annot.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 86a37a8f3f93e3378b446f8d81d80571267c7660
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Apr 23 13:16:04 2009 +0200
+
+ Update the annotation last modified time when it's modified
+
+ poppler/Annot.cc | 26 ++++++++++++++++----------
+ poppler/Annot.h | 7 ++++---
+ 2 files changed, 20 insertions(+), 13 deletions(-)
+
+commit 9662bfa2b4b2282d0fc29d2a327b62d8bde56ff2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Apr 23 13:13:07 2009 +0200
+
+ Add timeToDateString() to DateInfo
+
+ This function converts a time_t into a string in PDF date format.
+
+ configure.ac | 1 +
+ poppler/DateInfo.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/DateInfo.h | 7 +++++++
+ 3 files changed, 55 insertions(+), 0 deletions(-)
+
+commit dc4cf0c29b53cda5c1c2badc5026af3429502e3a
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Apr 21 21:51:52 2009 +0200
+
+ add poppler-date.{cc,h}
+
+ glib/CMakeLists.txt | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 0750c6502faeabff571f5730b567097e793dca64
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 20:04:27 2009 +0200
+
+ [glib-demo] Fix dates handling in annots demo
+
+ glib/demo/annots.c | 69 ++++++++++-----------------------------------------
+ 1 files changed, 14 insertions(+), 55 deletions(-)
+
+commit fe73bf9771e8294af4c8a11ec4c2891ff8f8d859
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 20:02:25 2009 +0200
+
+ [glib-demo] GTime is deprecated, use time_t instead
+
+ glib/demo/utils.c | 2 +-
+ glib/demo/utils.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6d468cfa0cb89760e5d6cca43521cde6d99aa52e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 20:00:20 2009 +0200
+
+ [glib-demo] Use format_date from utils and remove duplicated code
+
+ glib/demo/info.cc | 27 ++-------------------------
+ 1 files changed, 2 insertions(+), 25 deletions(-)
+
+commit e5f5ea01d0da4c4d877b93755523dc2a7f2ec049
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 19:57:11 2009 +0200
+
+ [glib] Fix poppler_annot_markup_get_date()
+
+ Date field in Markup annots is also a PDF format date string, so it
+ should be parsed and the resulting time_t used to create a correct
+ GDate.
+
+ glib/poppler-annot.cc | 22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 876ad1bcc8a7b2f37656bf15cee7eb888fd46ed4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 19:36:33 2009 +0200
+
+ [glib] Add info about the return value in poppler_annot_get_modified() doc
+
+ glib/poppler-annot.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 8c54a15e1715721ee7af7e82c90b8dda3689c65f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 19:35:14 2009 +0200
+
+ [glib] Fix a typo in poppler_date_parse documentation
+
+ glib/poppler-date.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 39d09fa237d06fa93b02eb916d2c0242c4e8fe85
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 19:29:32 2009 +0200
+
+ [glib] Add poppler_date_parse to parse PDF format date strings
+
+ We need to make this public because the field M in the Annot dictionary
+ might be a Date string (in PDF date format) or a text string. According
+ to the PDF spec: "The preferred format is a date string as described in
+ Section 3.8.3, “Dates,†but viewer applications should be prepared to
+ accept and display a string in any format". The only way to know whether
+ it's a PDF date string or not, is by trying to parse it. For this reason
+ poppler_annot_get_modified() returns a gchar * instead of a time_t. So,
+ viewers should try to parse the string in order to convert it to a
+ time_t, and if it fails to parse, use the date string as provided by the
+ document.
+
+ glib/Makefile.am | 2 +
+ glib/poppler-attachment.cc | 4 +-
+ glib/poppler-date.cc | 66 ++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-date.h | 30 ++++++++++++++++++++
+ glib/poppler-document.cc | 45 +++++------------------------
+ glib/poppler-private.h | 2 +-
+ glib/poppler.h | 1 +
+ 7 files changed, 110 insertions(+), 40 deletions(-)
+
+commit 9c2714a3e1c02f445661618e24bcd27f1392b2b7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 18:08:06 2009 +0200
+
+ [glib] Implement poppler_annot_set_contents()
+
+ glib/poppler-annot.cc | 25 +++++++++++++++++++++++++
+ glib/poppler-annot.h | 2 ++
+ 2 files changed, 27 insertions(+), 0 deletions(-)
+
+commit eec550e8b3cf96aefed9b03a78d365c2848fb8f2
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Apr 21 18:06:34 2009 +0200
+
+ Add setContents() to modify the annot contents
+
+ poppler/Annot.cc | 26 +++++++++++++++++++++++++-
+ poppler/Annot.h | 4 ++++
+ 2 files changed, 29 insertions(+), 1 deletions(-)
+
+commit 047a8870a8cea9b680080e0d3bf68d0685431233
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Apr 20 23:38:53 2009 +0200
+
+ In case of err3 or err2 in readPageTree we need to free kidRef too
+
+ poppler/Catalog.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit cb61b555f2c4db8685dec5491ca86570c962aab6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Apr 18 18:30:04 2009 +0200
+
+ Extend test-poppler-glib to show more page annotations and actions
+
+ Based on path by Thomas Viehmann <tv@beamnet.de>
+
+ glib/test-poppler-glib.cc | 68 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 68 insertions(+), 0 deletions(-)
+
+commit 2221b8a9ae5e986c79ea3f6c9f3b0246d328c7ab
+Author: Matthias Franz <matthias@ktug.or.kr>
+Date: Sun Apr 19 23:29:18 2009 +0200
+
+ Fix decryption using owner password on some pdf
+
+ See bug #21270
+
+ poppler/Decrypt.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit e20efbf6cc676758b8ef7d2ad607560fcdbbf89e
+Author: Peter Kerzum <kerzum@yandex-team.ru>
+Date: Fri Apr 17 22:14:26 2009 +0200
+
+ Fix typo in GfxFont.cc
+
+ poppler/GfxFont.cc | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit b760debea03380280d72cd39d792cbc1a380a87c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Apr 17 21:04:26 2009 +0200
+
+ Fix rendering of axial shadings
+
+ Fixes bug #19896
+
+ poppler/Gfx.cc | 102 ++++++++++++++++++++++++++++++++++----------------------
+ 1 files changed, 62 insertions(+), 40 deletions(-)
+
+commit 9f1312f3d7dfa7e536606a7c7296b7c876b11c00
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Apr 16 22:13:26 2009 +0200
+
+ Fix problems that happen when parsing broken JBIG2 files
+
+ Fixes
+ CVE-2009-0799 xpdf OOB Read
+ CVE-2009-0800 xpdf Multiple Input Validation Flaws
+ CVE-2009-1179 xpdf Integer Overflow
+ CVE-2009-1180 xpdf Invalid free()
+ CVE-2009-1181 xpdf NULL dereference DoS
+ CVE-2009-1182 xpdf MMR Decoder Buffer Overflows
+ CVE-2009-1183 xpdf MMR Infinite Loop DoS
+
+ Patch based on a patch by Derek Noonburg
+ Some files still hit the exit(1) in goo.c but at least none is really crashing
+
+ poppler/JBIG2Stream.cc | 447 ++++++++++++++++++++++++++++++++++--------------
+ poppler/JBIG2Stream.h | 4 +
+ 2 files changed, 324 insertions(+), 127 deletions(-)
+
+commit 284a92899602daa4a7f429e61849e794569310b5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Apr 13 21:51:12 2009 +0200
+
+ Did a mistake in the gmalloc -> gmallocn commit, it's a 4 here not a 3
+
+ poppler/SplashOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9cf2325fb22f812b31858e519411f57747d39bd8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 11 00:31:57 2009 +0200
+
+ More gmalloc → gmallocn
+
+ glib/poppler-page.cc | 2 +-
+ splash/Splash.cc | 8 ++++----
+ splash/SplashBitmap.cc | 6 +++---
+ splash/SplashFTFont.cc | 2 +-
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+commit c399b2d512aa073b0d7cd8eb5413a4b43f0d6aef
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 11 00:26:23 2009 +0200
+
+ Revert part of last commit, i need more math classes :D
+
+ poppler/JBIG2Stream.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7b2d314a61fd0e12f47c62996cb49ec0d1ba747a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 11 00:23:04 2009 +0200
+
+ Be paranoid, use gmallocn or gmallocn3 in all gmalloc with *
+
+ poppler/ArthurOutputDev.cc | 4 ++--
+ poppler/CairoOutputDev.cc | 14 +++++++-------
+ poppler/GfxState.cc | 8 ++++----
+ poppler/JBIG2Stream.cc | 4 ++--
+ poppler/PSOutputDev.cc | 6 +++---
+ poppler/SplashOutputDev.cc | 20 ++++++++++----------
+ 6 files changed, 28 insertions(+), 28 deletions(-)
+
+commit 0131f0a01cba8691d10a18de1137a4744988b346
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 11 00:20:55 2009 +0200
+
+ Add gmallocn3 that does the same as gmallocn but with 3 arguments
+
+ goo/gmem.cc | 22 ++++++++++++++++++++++
+ goo/gmem.h | 2 ++
+ 2 files changed, 24 insertions(+), 0 deletions(-)
+
+commit 75c3466ba2e4980802e80b939495981240261cd5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Apr 10 18:05:54 2009 +0200
+
+ Make it compile in Solaris
+
+ See bug #21080
+
+ poppler/CairoFontEngine.cc | 14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 3210970dc1d6faf51bce59bb7ecb6b881f9c0fe6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Apr 10 13:09:37 2009 +0200
+
+ [glib] Print annotations with the print flag enabled
+
+ glib/poppler-page.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b0b9798c85c7c6d6f336f73135a98974897b9f60
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 30 23:26:39 2009 +0200
+
+ Fix clip test for fonts
+
+ Fixes bug 20950
+ I really don't remember why i put that -1 maybe i got mislead by SplashClip::testRect
+ having a +1, but the idea of the +1 is correct because it's ints vs floats
+
+ splash/SplashFTFont.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5c08f57aa80092954746d722bb13655aee3f162c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 29 23:52:31 2009 +0200
+
+ Forgot Ross copyright
+
+ poppler/TextOutputDev.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c6d3e7884010ebdcc961d81ca8c692870fc9b139
+Author: Ross Moore <ross@maths.mq.edu.au>
+Date: Sun Mar 29 23:46:09 2009 +0200
+
+ Fix extraction of some ActualText content
+
+ Fixes bug #20013
+
+ poppler/TextOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e4b3f7cbcb6ccdfa8b18d8da5f7074f4140b776a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 25 22:16:07 2009 +0100
+
+ Fix getGlyphAdvance to behave correctly on font size changes
+
+ Fixes bug #20769
+
+ splash/SplashFTFont.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 4acde05ac4d0b03466c949138321cc3445a14158
+Author: Eric Toombs <ewtoombs@uwaterloo.ca>
+Date: Wed Mar 25 21:11:03 2009 +0100
+
+ Remove case-insensitive matching of filenames in PDFDoc constructor
+
+ poppler/PDFDoc.cc | 39 ++++++++++-----------------------------
+ 1 files changed, 10 insertions(+), 29 deletions(-)
+
+commit 120c7f6697ed1edaff6e17ae1ed202c69f03a73c
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Mar 24 22:56:33 2009 +0100
+
+ declare the matrix at the beginning
+
+ poppler/ArthurOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 441a9cd56935bfe2d8fddc5d3bc2c0104aeffaca
+Author: Eric Toombs <ewtoombs@uwaterloo.ca>
+Date: Sun Mar 22 22:50:14 2009 +0100
+
+ Improved error reporting of ErrOpenFile errors
+
+ See bug #20660 for more information
+
+ glib/poppler-document.cc | 14 +++++++++--
+ poppler/PDFDoc.cc | 54 +++++++++++++++++++++++++++------------------
+ poppler/PDFDoc.h | 8 ++++++
+ 3 files changed, 51 insertions(+), 25 deletions(-)
+
+commit 16af0ced4a0762f2f538135bd8dd72b469f6fdca
+Author: Michael K. Johnson <a1237@danlj.org>
+Date: Sat Mar 21 16:14:06 2009 +0100
+
+ Support rendering non-square pixels in pdftoppm
+
+ Bug #20702
+
+ utils/pdftoppm.1 | 16 ++++++++++++++--
+ utils/pdftoppm.cc | 37 ++++++++++++++++++++++++++++++++-----
+ 2 files changed, 46 insertions(+), 7 deletions(-)
+
+commit a103c60abd5fe4c721b099c005daf22d6350c355
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 21 15:47:12 2009 +0100
+
+ Update version we need of Qt4
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit c4b1754fdd3a4649551556de2655c8291daafddf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 21 13:29:38 2009 +0100
+
+ Bump cairo dependency to 1.8.4
+
+ Cairo 1.8.4 fixes and important bug that affects the Type 3 font rendering
+
+ CMakeLists.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 50c4ee413929e5a70133839e3cde039da738fab2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 18 22:00:05 2009 +0100
+
+ Add more _checkoverflow variants, rework internals
+
+ goo/gmem.cc | 92 +++++++++++++++++++++++++++++------------------------------
+ goo/gmem.h | 4 ++-
+ 2 files changed, 48 insertions(+), 48 deletions(-)
+
+commit 121c44db0884f0d70ba1470a66aa78441257c421
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri Mar 20 23:25:19 2009 +1030
+
+ Fix cairo luminosity smask when cairo ctm != identity
+
+ poppler/CairoOutputDev.cc | 16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+commit 3f55aff56a1d2002ba79f3efba5eb77e94575439
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu Mar 19 22:34:23 2009 +1030
+
+ Fix bug in cairo backend with nested masks
+
+ The previous smask was not restored after a q/Q pair or form xobject.
+
+ poppler/CairoOutputDev.cc | 18 +++++++++++++++++-
+ poppler/CairoOutputDev.h | 5 +++++
+ 2 files changed, 22 insertions(+), 1 deletions(-)
+
+commit 4cc3cb8992ac554352d68e97563823b9bbd556ce
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Mar 20 12:38:28 2009 +0100
+
+ Bump cairo dependency to 1.8.4
+
+ Cairo 1.8.4 fixes and important bug that affects the Type 3 font
+ rendering
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit da94fe717a1ab60fb074fae61d582d1ee7151fc2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 16 22:54:27 2009 +0100
+
+ Fix parsing of border arrays
+
+ Fixes 19761
+
+ poppler/Annot.cc | 54 ++++++++++++++++++++++++++++++++++++------------------
+ 1 files changed, 36 insertions(+), 18 deletions(-)
+
+commit 8df0323f1ca4548a5d5824ece8736b356ce7ca42
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 12 00:09:03 2009 +0100
+
+ Really fix jpeg lib init order?
+
+ poppler/DCTStream.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 12aac6774fc6f92def3d5567051117951cc32223
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 11 23:00:37 2009 +0100
+
+ fontCIDType2OT fonts can also have a CIDToGIDMap
+
+ Fixes bug #20605
+
+ poppler/GfxFont.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0ca9ae2848808d15e7a2b00f5eb33bb8f990c887
+Author: Vincent Torri <vtorri@univ-evry.fr>
+Date: Wed Mar 11 00:39:59 2009 +0100
+
+ remove the fortran check during the initialisation of libtool
+
+ configure.ac | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 710e329a3a6a9ee2eed997c9eeaea21c44237423
+Author: Vincent Torri <vtorri@univ-evry.fr>
+Date: Wed Mar 11 00:37:11 2009 +0100
+
+ Add AC_CONFIG_MACRO_DIR([m4])
+
+ It is used by autoreconf to trace changes in m4 macros that are in the m4/ subdirectory.
+
+ configure.ac | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d15e47158ae31909212d3875159046afb208de97
+Author: Vincent Torri <vtorri@univ-evry.fr>
+Date: Wed Mar 11 00:36:27 2009 +0100
+
+ Better check for pkg-config
+
+ configure.ac | 5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit b3f569f9a6c117c097acac52ae6552209fcd2101
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 11 00:25:07 2009 +0100
+
+ Check there is an optional content config before using it
+
+ Fixes bug #20587
+
+ poppler/Gfx.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7a5d1e57b2757c986da17f7238415b927e73127f
+Author: Brian Ewins <Brian.Ewins@gmail.com>
+Date: Mon Mar 9 22:54:58 2009 +0100
+
+ Check for pkgconfig before using it
+
+ At the moment if pkgconfig is not installed, an unhelpful syntax
+ error appears when testing for freetype. Identify the problem
+ earlier on
+
+ configure.ac | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 8dc9e4d57a4759de2b56a87d9bace80d5d563fef
+Author: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Sun Mar 8 15:29:02 2009 +0100
+
+ use AC_CHECK_HEADER to find headers
+
+ The original m4/libjpeg.m4 used AC_FIND_FILE to look for jpeg header file.
+ This test is not cross-compiling save. This patch uses the autoconf function
+ AC_CHECK_HEADER to look for the jpeg header, which works in the native and
+ the cross compiling scenaria.
+ Bug #20538
+
+ m4/libjpeg.m4 | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit bf2e2f056cadbc488cd3e9576b44beb34689ec81
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 8 13:44:44 2009 +0100
+
+ Add the new croptting options explanations
+
+ utils/pdftotext.1 | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 663d9e5a448641421d290dd228be692a0f236b9c
+Author: Jan Jockusch <jan@jockusch.de>
+Date: Sun Mar 8 13:44:20 2009 +0100
+
+ Make pdftotext to accept cropping options like pdftoppm
+
+ Bug #20331
+
+ utils/pdftotext.cc | 29 ++++++++++++++++++++++++++++-
+ 1 files changed, 28 insertions(+), 1 deletions(-)
+
+commit cc4b61f19b69c31d9a73ae7361c4b6a94345d1c2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 8 12:55:45 2009 +0100
+
+ Fix the previous fix
+
+ I should stop listening to people without checking that what they say is
+ correct
+
+ poppler/DCTStream.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a4a73cd9f9ee9767d74fbb44ffe083d2057a9d61
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 8 12:44:06 2009 +0100
+
+ I should compile before commiting :-/
+
+ poppler/DCTStream.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6a6b3cc91053e771a67dffa979076d130f87ff11
+Author: Ryszard Trojnacki <rysiek@menel.com>
+Date: Sun Mar 8 12:38:42 2009 +0100
+
+ set up the error-manager before calling jpeg_create_decompress
+
+ Bug #20484
+
+ poppler/DCTStream.cc | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 4dfa7460ddc4b5684d5ef8db17efa50b95b7b735
+Author: Nick Jones <nick.jones@network-box.com>
+Date: Tue Mar 3 00:55:53 2009 +0100
+
+ Do not blindly follow loops parsing OutlineItem
+
+ More details in bug 18364
+
+ poppler/Outline.cc | 15 ++++++++++++++-
+ 1 files changed, 14 insertions(+), 1 deletions(-)
+
+commit de3131ae38fc9442b198d4d7b0c57c6939ad66ce
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Mar 2 15:20:07 2009 +0100
+
+ [Qt4] adapt to the new PDFDoc saving API
+
+ store the error code instead of the bool
+
+ qt4/src/poppler-pdf-converter.cc | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit dac0542eb793603090416f1b7712ca08253f1e7f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Mar 2 09:54:22 2009 +0100
+
+ [glib] Correctly handle doc->saveAs() error code.
+
+ Fixes bug #19915.
+
+ glib/poppler-document.cc | 37 +++++++++++++++++++++++++++++++++----
+ 1 files changed, 33 insertions(+), 4 deletions(-)
+
+commit bfc6572614727565d883b9545d4b6665f3c2fdfe
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 28 13:16:49 2009 +0100
+
+ Return an error code instead of a GBool when saving
+
+ poppler/PDFDoc.cc | 22 +++++++++++-----------
+ poppler/PDFDoc.h | 8 ++++----
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+commit f7c88148fdb671736d81dd5f01a3fb68f944510c
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Feb 25 23:38:35 2009 +0100
+
+ Fix cache shifting
+
+ poppler/GfxState.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 305af8cdb6822858e152e1f930bba2ce3904bf1b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 25 22:40:24 2009 +0100
+
+ Make JBIG2Stream not crash in 2009-41414141.pdf
+
+ poppler/JBIG2Stream.cc | 151 +++++++++++++++++++++++++++---------------------
+ 1 files changed, 85 insertions(+), 66 deletions(-)
+
+commit 26a8217160c1eaeeadb92023b27e68f402e38dd0
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Feb 22 18:14:15 2009 +0100
+
+ Check if cairo_shape is not NULL before using it.
+
+ We were checking shape instead. It fixes a crash with some documents.
+ See bug #17337.
+
+ poppler/CairoOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5e68e52da65b4d8c3817e5fbb6f1a937da321d48
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 21 18:03:15 2009 +0100
+
+ [Qt4] do not assume the destination file name for links is ASCII
+
+ qt4/src/poppler-page.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 439cb397fed33df627a09c70788d72bef20dc872
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 21 18:02:36 2009 +0100
+
+ [Qt] do not assume the destination file name for links is ASCII
+
+ qt/poppler-page.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3ea5f45ad3e5a55e577a2e45f61b55932ed17013
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 21 17:46:30 2009 +0100
+
+ [glib] Make sure filename is valid utf-8 for remote dests
+
+ glib/poppler-action.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit b5989e4ffece6c1831610ee163d05fd80386a001
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 21 17:45:18 2009 +0100
+
+ Use the UF entry when present in Filespec dictionary
+
+ poppler/FileSpec.cc | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 943fca42b5fa815fad650e42da4ad6e806adc3b1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 21 12:08:00 2009 +0100
+
+ [glib] Add a macro to define boxed types
+
+ glib/poppler-action.cc | 26 +-----------
+ glib/poppler-annot.cc | 15 +------
+ glib/poppler-document.cc | 44 ++++----------------
+ glib/poppler-page.cc | 99 +++++++++-------------------------------------
+ glib/poppler-private.h | 20 +++++++++
+ 5 files changed, 53 insertions(+), 151 deletions(-)
+
+commit 7406337ed2d38a86308f20f8273a152538e524de
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 21 11:11:20 2009 +0100
+
+ [glib] Use template files to create poppler-enums
+
+ glib/Makefile.am | 43 ++++++++++++---------------------------
+ glib/poppler-enums.c.template | 44 +++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-enums.h.template | 25 +++++++++++++++++++++++
+ 3 files changed, 82 insertions(+), 30 deletions(-)
+
+commit 29bc9d1dd115b5d400975533c3924993c3adae30
+Author: Thomas Viehmann <tv@beamnet.de>
+Date: Sat Jan 17 13:16:38 2009 +0100
+
+ glib small doc comment corrections
+
+ glib/poppler-attachment.cc | 2 +-
+ glib/poppler-layer.cc | 2 ++
+ glib/poppler.cc | 2 --
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit a06e715d89a99b909b8e7b73b733066c67b1ade3
+Author: Thomas Viehmann <tv@beamnet.de>
+Date: Sat Jan 17 12:58:20 2009 +0100
+
+ Make glib API reference more complete
+
+ glib/reference/poppler-docs.sgml | 2 +
+ glib/reference/poppler-sections.txt | 55 +++++
+ glib/reference/tmpl/poppler-action.sgml | 9 +-
+ glib/reference/tmpl/poppler-annot.sgml | 368 +++++++++++++++++++++++++++++++
+ glib/reference/tmpl/poppler-layer.sgml | 79 +++++++
+ 5 files changed, 511 insertions(+), 2 deletions(-)
+
+commit 3a21dafa46d42d86daec440a85b9d63b292a3c88
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 3 21:33:00 2009 +0100
+
+ Fix cache shifting
+
+ If we do
+ for (i = 0;i < GFX_ICCBASED_CACHE_SIZE-1 && cache[i].num > 0;i++) {
+ cache[i+1] = cache[i];
+ what we do at the end is copy position 0 to all others so
+ we need to do it in the reverse order
+
+ poppler/GfxState.cc | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 0ed3fd52bb2d3375ed302285b18f076721b8028e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Feb 1 10:37:25 2009 +0100
+
+ [glib-demo] Fix a typo in format string
+
+ glib/demo/page.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2df6d530cd9acd8648a6196031218ef10e7b3891
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 29 00:51:13 2009 +0100
+
+ Add line that for some reason was not imported from xpdf file
+
+ Fixes bug 19789
+
+ utils/ImageOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1fc342eadcbbb41302f190b215c5daf23c9ec9b1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 28 22:53:43 2009 +0100
+
+ Fix crash on unexepcted Form Opt value
+
+ Fixes crash on bug 19790
+
+ poppler/Form.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit b1d4efb082ac3dadd7752a557e5aeb6651e17471
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 27 00:26:08 2009 +0100
+
+ PostScriptFunction::transform optimization
+
+ Do not create and destroy a PSStack each time
+ PostScriptFunction::transform is called gives a 7% speedup on heavy
+ PostScriptFunction::transform pdf like nytimes firefox ad
+
+ poppler/Function.cc | 12 ++++++++----
+ poppler/Function.h | 15 +++++++++++++++
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 90f95127d8d89cfcadeb7d701437ab07ce4a8a61
+Author: Koji Otani <sho@bbr.jp>
+Date: Sun Jan 25 23:17:39 2009 +0100
+
+ Cache last 5 GfxICCBasedColorSpace
+
+ poppler/GfxState.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/GfxState.h | 15 ++++++++++++
+ 2 files changed, 75 insertions(+), 0 deletions(-)
+
+commit d3f04f537fb3e963c149a7e2d8d83c7cb19da8c0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jan 23 23:08:46 2009 +0100
+
+ Do not crash in some PDF we don't parse correctly
+
+ Fixes bug 19702
+
+ poppler/JBIG2Stream.cc | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 3990c9e52da7b17215506857c792c90a37ebac79
+Author: Koji Otani <sho@bbr.jp>
+Date: Mon Jan 19 09:53:00 2009 +0100
+
+ Fix a problem in cairo backend when using a CMYK Profile
+
+ poppler/GfxState.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6e51ae7fe8b9dc8ad52b735f2fe056f8ea8f1dcb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 15 22:33:04 2009 +0100
+
+ calculate the limit in a way that one does not access an invalid index of the matrix
+
+ poppler/DCTStream.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ea2aa7bd1ceb0e3282398f52683e4f52ef401f74
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 15 22:18:48 2009 +0100
+
+ Forgot my copyrights
+
+ poppler/DCTStream.cc | 2 +-
+ poppler/DCTStream.h | 2 +-
+ poppler/Stream.cc | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d65dd23752ec14635d0d224afa7dd605f98a10a4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 15 22:17:14 2009 +0100
+
+ Minor optimizations
+
+ poppler/DCTStream.cc | 17 ++++++++---------
+ poppler/DCTStream.h | 3 ++-
+ poppler/Stream.cc | 3 ++-
+ 3 files changed, 12 insertions(+), 11 deletions(-)
+
+commit d3d2910f757dfc3e141aed62aa970136f9d7186f
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Jan 11 00:40:46 2009 +0100
+
+ fix a (relatively small) memory leak when asking for a document-level JS
+
+ poppler/Catalog.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 869584a84eed507775ff1c3183fe484c14b6f77b
+Author: Jonathan Kew <jonathan_kew@sil.org>
+Date: Sat Jan 10 18:28:47 2009 +0100
+
+ Add the possibility of setting the datadir on runtime
+
+ poppler/GlobalParams.cc | 27 ++++++++++++++++++++-------
+ poppler/GlobalParams.h | 5 ++++-
+ 2 files changed, 24 insertions(+), 8 deletions(-)
+
+commit cf112dceb1d6653beae73ce2fac6fb5eee48ff33
+Author: Koji Otani <sho@bbr.jp>
+Date: Sat Jan 10 18:11:20 2009 +0100
+
+ Fix some problems with color management in CMYK Color Profile.
+
+ Fixes bug 19483
+
+ poppler/GfxState.cc | 106 +++++++++++++++++++++++++-------------------------
+ 1 files changed, 53 insertions(+), 53 deletions(-)
+
+commit 6dd77338d16f80760ae32ff9f3e2be9768fc0c49
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jan 8 11:49:45 2009 +0100
+
+ [Qt4] use the cropbox for the annotations coordinates
+
+ Fixes bug #18558.
+
+ qt4/src/poppler-page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 69c07c031159d36dde52609bffa6d48c3c56cef5
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jan 8 00:59:19 2009 +0100
+
+ update Poppler copyright to 2009
+
+ msvc/poppler/poppler-config.h | 2 +-
+ poppler-config.h.cmake | 2 +-
+ poppler/poppler-config.h.in | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 79e0eea85cf063c6323caafbec97f3d71fc04ca2
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jan 8 00:57:03 2009 +0100
+
+ remove old cmake modules, add a new one
+
+ Makefile.am | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 0e6420ece2d6fcc046d5814b48a2754fb86771e2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 7 23:33:02 2009 +0100
+
+ Require cmake 2.6.0, remove two cmake files provided upstream
+
+ CMakeLists.txt | 4 +-
+ cmake/modules/FindFreetype.cmake | 74 ---------------------
+ cmake/modules/FindPackageHandleStandardArgs.cmake | 58 ----------------
+ glib/CMakeLists.txt | 2 +-
+ 4 files changed, 3 insertions(+), 135 deletions(-)
+
+commit a69add73bf7bef17c677c735db77934ba67188a5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 7 19:06:13 2009 +0100
+
+ Update copyright notices
+
+ poppler/FontInfo.cc | 1 +
+ poppler/FontInfo.h | 1 +
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-fontinfo.cc | 2 +-
+ qt4/src/poppler-form.cc | 1 +
+ qt4/src/poppler-form.h | 1 +
+ qt4/src/poppler-private.h | 2 +-
+ qt4/src/poppler-qt4.h | 2 +-
+ 8 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 18d584158a781fecb4f696b01fb4d17803ce7d7a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 7 17:55:48 2009 +0100
+
+ Add lcms option to cmake buildsystem
+
+ CMakeLists.txt | 9 +++++++++
+ cmake/modules/FindLCMS.cmake | 37 +++++++++++++++++++++++++++++++++++++
+ config.h.cmake | 3 +++
+ 3 files changed, 49 insertions(+), 0 deletions(-)
+
+commit 140b8ed97416f9c2ec02eb749ca45ca50bd651a8
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Jan 7 17:43:44 2009 +0100
+
+ Add initial support for color management
+
+ configure.ac | 19 ++
+ poppler/GfxState.cc | 697 +++++++++++++++++++++++++++++++++++++++++++++++----
+ poppler/GfxState.h | 74 +++++-
+ poppler/Makefile.am | 5 +
+ 4 files changed, 738 insertions(+), 57 deletions(-)
+
+commit bdc76dc811a6e4d5fd929bbdc8cd3300aeaea31f
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Jan 6 15:45:37 2009 +0100
+
+ [Qt4] apidox improvements for the font functions of Document; mark scanForFonts() as deprecated
+
+ qt4/src/poppler-qt4.h | 22 ++++++++++++++++++----
+ 1 files changed, 18 insertions(+), 4 deletions(-)
+
+commit 6630e715714161cd803fc064f5d3cf880f42b0a5
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Jan 6 15:36:19 2009 +0100
+
+ tell Doxygen to consider Q_DECL_DEPRECATED as empty
+
+ qt4/src/Doxyfile | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d748d430b106580b8be29ca3ec75caf05b55812e
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Jan 6 15:24:25 2009 +0100
+
+ [Qt4] Add a FontIterator for iterating through the fonts of the document, page by page.
+
+ This new iterator class is the new preferred way for getting the fonts of a document in a page-by-page mode.
+ * Document::fonts() is adapted to use it, instead of relying on scanForFonts()
+ * scanForFonts() is ported to FontIterator, but keeping the old behaviour ("i can scan the document only once")
+ * added unit tests for fonts(), scanForFonts() and FontIterator
+
+ qt4/src/poppler-document.cc | 27 +++++---
+ qt4/src/poppler-fontinfo.cc | 36 ++++++++++
+ qt4/src/poppler-private.h | 27 +++++++-
+ qt4/src/poppler-qt4.h | 65 +++++++++++++++++++
+ qt4/tests/check_fonts.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 291 insertions(+), 13 deletions(-)
+
+commit b9804542bb50216786dc11ca16efd84304f4b832
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Jan 6 15:16:53 2009 +0100
+
+ Add the possibility to set the first page to scan.
+
+ The default value is 0 (= first page), so it should be compatible with any usage so far.
+
+ poppler/FontInfo.cc | 4 ++--
+ poppler/FontInfo.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit af74fef03bfbd79334da5612c63c7793952542f9
+Author: Warren Toomey <poppler@tuhs.org>
+Date: Tue Jan 6 01:36:31 2009 +0100
+
+ Add forgotten file to let the autotools based system build
+
+ m4/libpng.m4 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 99 insertions(+), 0 deletions(-)
+
+commit ae588500f62bab5666174ff3b1564c414c5a76c5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 6 01:35:38 2009 +0100
+
+ Fix the cmake buildsystem
+
+ CMakeLists.txt | 6 ++++++
+ config.h.cmake | 3 +++
+ utils/CMakeLists.txt | 4 ++++
+ 3 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 940d060a14712c09da427e2fac4ec579f7291b0f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 6 01:27:06 2009 +0100
+
+ do not leak fName if fopen fails
+
+ utils/HtmlOutputDev.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 7be9198adb940ad7c5fffc6db0158cf7042e1b8f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 6 01:24:15 2009 +0100
+
+ Do not leak pgNum and imgnum if fopen fails
+
+ utils/HtmlOutputDev.cc | 16 +++++++++-------
+ 1 files changed, 9 insertions(+), 7 deletions(-)
+
+commit dfba6c022b150553cb2b18b027e661b3b4625ce7
+Author: Warren Toomey <poppler@tuhs.org>
+Date: Tue Jan 6 01:16:31 2009 +0100
+
+ Make pdftohtml output png images when the image stream is not a jpeg
+
+ configure.ac | 14 +++++
+ utils/HtmlOutputDev.cc | 126 +++++++++++++++++++++++++++++++++++++++++++++--
+ utils/HtmlOutputDev.h | 3 +-
+ utils/Makefile.am | 4 ++
+ 4 files changed, 140 insertions(+), 7 deletions(-)
+
+commit 0963c276ba972a36c2895e4fe1c7475acd489738
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 4 16:54:32 2009 +0100
+
+ Fix some checked checkboxes not rendering correctly
+
+ If we are forcing ZaDb/ZapfDingbats to correctly draw a checkmark in the checkbox, but the file does not have such font defined we need to create a fake one so the system really renders it
+ Fixes bug 19359
+
+ poppler/Annot.cc | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
+ poppler/Annot.h | 2 ++
+ poppler/Gfx.h | 7 ++++---
+ 3 files changed, 53 insertions(+), 5 deletions(-)
+
+commit 46128cf83b322c112eb0c409c20052bdb2ea4a37
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 4 14:21:15 2009 +0100
+
+ Remove wrong and unused FormWidget(FormWidget *dest) contructor
+
+ poppler/Form.cc | 11 -----------
+ poppler/Form.h | 3 +--
+ 2 files changed, 1 insertions(+), 13 deletions(-)
+
+commit 5203aefc41fa47c461812cc46f28281edd226515
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 4 14:03:16 2009 +0100
+
+ Plug some memory leaks
+
+ poppler/Annot.cc | 5 ++++-
+ poppler/Form.cc | 4 +++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 5fb7ec7e6af4cfb2b256a5b9b9752e68330b4aec
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 30 23:46:59 2008 +0100
+
+ If Length2 is zero just write until we find EOF of the stream
+
+ Fixes exporting to PS of the two pdf i have that have fonts with Length2 set to 0
+
+ poppler/PSOutputDev.cc | 26 +++++++++++++++++++++-----
+ 1 files changed, 21 insertions(+), 5 deletions(-)
+
+commit ca35fdbc7c31dae432d775b6c087a83fa9b897fc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 30 23:03:57 2008 +0100
+
+ We need spaces here too to satify other consumer parsers
+
+ poppler/PDFDoc.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3c07c73e07a9cb59ee4c23ca60d2adce92de45f7
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Dec 30 22:21:27 2008 +0100
+
+ [Qt4-demo] load a document when passed via command line
+
+ qt4/demos/main_viewer.cpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit aba0aaa896d634a51fbb3a3e6eae411be462f930
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Dec 29 00:31:18 2008 +0100
+
+ More improvements in document writing
+
+ Dictionary keys are names so need to be sanitized
+ Add a space after num gen obj
+
+ poppler/PDFDoc.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit e5b93a847ae4e20a77fecef0938da4f14dfbe3eb
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 28 22:59:14 2008 +0100
+
+ Let compiler figure out CDECL
+
+ CDECL is a compiler specific macro to specify C calling convention.
+
+ On Windows, some functions must be forced to use this calling convention.
+ To do this, you can use the macro CDECL, which is defined in windef.h.
+
+ Poppler should not try to be smarter than the compiler and try to guess
+ the correct definition for CDECL. Instead it should rely on the
+ definitions in the windef.h file provided by the compiler.
+
+ On Unix, specifying a calling convention is not nescessary, so CDECL can
+ be an empty definition.
+
+ poppler-config.h.cmake | 8 ++------
+ poppler/poppler-config.h.in | 8 ++------
+ 2 files changed, 4 insertions(+), 12 deletions(-)
+
+commit de70c0aeb37d788f595b0574796844f51ddedec1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 28 21:21:12 2008 +0100
+
+ [qt4] improve doc a bit
+
+ qt4/src/poppler-form.h | 2 +-
+ qt4/src/poppler-qt4.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit effb32658019e09dc86c017e39154fd554fc94f8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 28 02:56:30 2008 +0100
+
+ Form Rects are against the cropbox, not the media box
+
+ Fixes second pdf at kde bug 161327
+
+ qt4/src/poppler-form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0f10561f3b1c90acc030d973399316bfca5f495e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 28 01:44:25 2008 +0100
+
+ Fix my last commit, copy&paste is really evil
+
+ goo/GooString.cc | 9 +++++----
+ goo/GooString.h | 2 +-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 217b46484ff56bfd5906b293ebee70b82cc0263d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 28 01:29:41 2008 +0100
+
+ Move PSOutputDev::filterPSName to GooString::sanitizedName so i can use it from PDFDoc::writeObject
+
+ goo/GooString.cc | 36 +++++++++++++++++++++++++++++++++++
+ goo/GooString.h | 7 ++++++
+ poppler/PDFDoc.cc | 7 +++++-
+ poppler/PSOutputDev.cc | 49 ++++++++---------------------------------------
+ poppler/PSOutputDev.h | 3 +-
+ 5 files changed, 59 insertions(+), 43 deletions(-)
+
+commit f41fa9ee71aef5539cf9976c79b32bf1713c8167
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 26 22:56:12 2008 +0100
+
+ Change the overflow check to the same used in gmem.cc, much more easy to understand
+
+ poppler/XRef.cc | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit b8ae7d91dedc9a75200b6050628ec2740af84b98
+Author: Hib Eris <hib@hiberis.nl>
+Date: Fri Dec 26 22:28:09 2008 +0100
+
+ Fix compile warnings on auto imports for mingw32
+
+ configure.ac | 3 +++
+ glib/Makefile.am | 2 +-
+ glib/demo/Makefile.am | 2 ++
+ test/Makefile.am | 2 ++
+ utils/Makefile.am | 2 ++
+ 5 files changed, 10 insertions(+), 1 deletions(-)
+
+commit ba47bd2ba05f883306606eda30bff17bd4a8eec6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 26 19:47:42 2008 +0100
+
+ BaseFile.h has never been used and it fact it's not part of xpdf sources
+
+ Fixes bug 19298
+
+ CMakeLists.txt | 1 -
+ poppler/BaseFile.h | 82 ---------------------------------------------------
+ poppler/Makefile.am | 1 -
+ 3 files changed, 0 insertions(+), 84 deletions(-)
+
+commit 84366d9e63b0d6a5ee1aae2463648cfc2ff5e1b8
+Author: Hib Eris <hib@hiberis.nl>
+Date: Wed Dec 24 19:27:19 2008 +0100
+
+ Let libtool build DLLs on windows too
+
+ configure.ac | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 08cef528f2e51cc62cff4125f179021ad9555317
+Author: Hib Eris <hib@hiberis.nl>
+Date: Wed Dec 24 17:48:46 2008 +0100
+
+ Fix compile warning on string literal format
+
+ test/pdf-inspector.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0606b4bba8e889204c7b7c9d376f63b659f83a4f
+Author: Hib Eris <hib@hiberis.nl>
+Date: Wed Dec 24 17:48:10 2008 +0100
+
+ Fix compile warnings on parentheses and/or
+
+ poppler/CairoOutputDev.cc | 13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+commit eba2232cabd5fb1e177db2a6053f0d1a0aee882b
+Author: Hib Eris <hib@hiberis.nl>
+Date: Wed Dec 24 17:46:32 2008 +0100
+
+ Fix some more warnings
+
+ test/gtk-cairo-test.cc | 11 -----------
+ test/pdf-inspector.cc | 9 +++++----
+ 2 files changed, 5 insertions(+), 15 deletions(-)
+
+commit c80431eb1626d89e7b615e5a5149d3436b554b66
+Author: Hib Eris <hib@hiberis.nl>
+Date: Mon Dec 22 09:28:47 2008 +0100
+
+ Fix compile warning on format type
+
+ glib/test-poppler-glib.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fda181c35b7c7500b6d3c6ca9d454addd54929c5
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Dec 22 00:53:44 2008 +0100
+
+ group condition within brackets
+
+ poppler/ArthurOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c1beeecbd6cbf82811d70c75cb24059b4b492abe
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Dec 22 00:46:49 2008 +0100
+
+ [demo] use the proper format field for gsize types
+
+ glib/demo/attachments.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bfb975466f0ff78e9e292b6af7cac66e4c331456
+Merge: 3e27892 ea3546f
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Dec 22 00:29:38 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 3e2789257f5fc4ae0573a0c62ea380d8e83a5bb5
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Dec 22 00:24:23 2008 +0100
+
+ [Qt] deserialize also the value of 'right'
+
+ qt/poppler-link.cc | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 7c053ab7623cea1ac650d3e960d2d91a1ef21557
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Dec 22 00:19:02 2008 +0100
+
+ [Qt] move in a .cc file the implementation of the QString<->GooString functions and DocumentData::addTocChildren()
+
+ qt/CMakeLists.txt | 1 +
+ qt/Makefile.am | 1 +
+ qt/poppler-document.cc | 10 ---
+ qt/poppler-page.cc | 1 +
+ qt/poppler-private.cc | 147 ++++++++++++++++++++++++++++++++++++++++++++++++
+ qt/poppler-private.h | 106 ++--------------------------------
+ 6 files changed, 157 insertions(+), 109 deletions(-)
+
+commit ea3546f84c5335c58cdb2906b1a1a4656be9c8ea
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 23:33:49 2008 +0100
+
+ Fix compile warnings on signed/unsigned comparison
+
+ goo/gfile.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ca672ae51d2c1fa59a891717b418ba86b5e7345c
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 23:33:00 2008 +0100
+
+ Fix compile warnings on ignored pragma with mingw compiler
+
+ poppler/Gfx.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 86cfe8ab2b4e0b600f3f6682701c2fcfbe5d0ca9
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 23:08:56 2008 +0100
+
+ Fix compile warnings on signed/unsigned comparison
+
+ poppler/GfxFont.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit e34af7ffe0a4024e2eb39314bdb09eb9a662e53e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 21 22:16:39 2008 +0100
+
+ Update copyright of last commits
+
+ poppler/TextOutputDev.cc | 1 +
+ poppler/TextOutputDev.h | 2 +-
+ qt4/src/poppler-page.cc | 1 +
+ 3 files changed, 3 insertions(+), 1 deletions(-)
+
+commit f6d84dcfc9cc587c7408af79b1ee7658d456f8d8
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 22:09:00 2008 +0100
+
+ Fix compile warning to suggest parentheses and/or
+
+ poppler/TextOutputDev.cc | 14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 15205403eaa95d6fba0e36983de993877dd3a983
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 21:59:45 2008 +0100
+
+ Fix warning to suggest parentheses inside shift
+
+ poppler/PSOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit cc24f37e582bfc0069faf286da97a48fe4794db1
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 21:35:29 2008 +0100
+
+ Fix compile warning on ambiguous else
+
+ test/perf-test.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a8cc4ad8c2da804f25db8cca1c85433d5a63307c
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 21:34:28 2008 +0100
+
+ Fix compile warning on format not a string literal
+
+ test/perf-test.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 3cbbf8226730aa7ee6273e154e4a9d58670a3cda
+Author: Hib Eris <hib@hiberis.nl>
+Date: Sun Dec 21 21:30:54 2008 +0100
+
+ Fix compile warning about uninitialized variable
+
+ poppler/ABWOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit f675916277cb76cd1293225a1271f835a02148fb
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Dec 20 23:23:10 2008 +0100
+
+ reset to NULL after being deleted
+
+ found with poppler-qt4 unit tests =)
+
+ poppler/TextOutputDev.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c976770c64e4c991fff27e413414473583b6fd86
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Dec 20 22:25:55 2008 +0100
+
+ [Qt4] use QHash instead of QMap where applicable
+
+ using a hash table instead of a map mapes lookup faster;
+ in these cases we don't need the sorting a map gives
+
+ qt4/src/poppler-page.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 944f6049a50eb3be9fb29174d67adc4ad1d0b9fe
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Dec 20 20:13:43 2008 +0100
+
+ add find.c and text.c
+
+ glib/demo/CMakeLists.txt | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ba91b889c3b50239e339938f3c9d31fffcd87d44
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Dec 20 19:29:40 2008 +0100
+
+ Make destructor private in TextPage
+
+ poppler/TextOutputDev.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 0da16537aa83f6ed6d8895c7e54266263a71c1cf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Dec 19 19:08:21 2008 +0100
+
+ Refactor actual text code adding a new ActualText class
+
+ It's used by both Text and Cairo ouput devices avoiding duplicated code
+ in such classes.
+
+ poppler/CairoOutputDev.cc | 108 +++---------------------
+ poppler/CairoOutputDev.h | 7 +--
+ poppler/TextOutputDev.cc | 206 ++++++++++++++++++++++++++-------------------
+ poppler/TextOutputDev.h | 34 ++++++--
+ 4 files changed, 160 insertions(+), 195 deletions(-)
+
+commit 0f8ab301c633133eea3dbd4f2254f31c50e3c4a9
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 14 13:12:34 2008 +0100
+
+ [glib-demo] Add find demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/find.c | 282 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/find.h | 31 ++++++
+ glib/demo/main.c | 4 +-
+ 4 files changed, 318 insertions(+), 1 deletions(-)
+
+commit 88df9e9aa9adb53f0a9714ea404d46f111495df3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 14 11:54:35 2008 +0100
+
+ [glib-demo] Add Text demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/main.c | 4 +-
+ glib/demo/text.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/text.h | 31 +++++++++
+ 4 files changed, 211 insertions(+), 1 deletions(-)
+
+commit 5b0f2355d55a5104820fd0bf16b4e76b25959de4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 14 11:49:00 2008 +0100
+
+ [glib] Use TextPage instead of TextOutputDev when cairo is enabled
+
+ glib/poppler-page.cc | 148 +++++++++++++++++++++++++++++++++---------------
+ glib/poppler-private.h | 4 +
+ 2 files changed, 107 insertions(+), 45 deletions(-)
+
+commit 3ced71fb68d62308db7b9535367eafefb55d1cde
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 14 11:18:00 2008 +0100
+
+ Add optionally text support to CairoOutputDev
+
+ If a TextPage is set, it'll be used when rendering so that we don't need
+ to use TextOutputDev and render again.
+
+ poppler/CairoOutputDev.cc | 144 +++++++++++++++++++++++++++++++++++++++++++--
+ poppler/CairoOutputDev.h | 19 +++++-
+ 2 files changed, 155 insertions(+), 8 deletions(-)
+
+commit 0bdad35cc4cfdb8da5acaf44678920b7a0025f99
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 14 11:14:12 2008 +0100
+
+ Add refcount support to TextPage
+
+ poppler/TextOutputDev.cc | 12 +++++++++++-
+ poppler/TextOutputDev.h | 5 +++++
+ qt4/src/poppler-page.cc | 2 +-
+ 3 files changed, 17 insertions(+), 2 deletions(-)
+
+commit f86514c3fbc867fc6457feacba23451e89993524
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Dec 17 00:36:39 2008 +0100
+
+ Fix wrong PS generation when a large image is in Patterns
+
+ Bug 18908
+
+ poppler/PSOutputDev.cc | 114 ++++++++++++++++++++++++++++++------------------
+ 1 files changed, 72 insertions(+), 42 deletions(-)
+
+commit fc395eb90b418e43453acefb42cd04baf0b7ad40
+Author: Richard Airlie <richard.airlie@maglabs.net>
+Date: Tue Dec 16 21:11:53 2008 +0100
+
+ Allow the use of cropbox in pdftoppm
+
+ utils/pdftoppm.cc | 16 +++++++++++++---
+ 1 files changed, 13 insertions(+), 3 deletions(-)
+
+commit 80f415176952635a485356cf36048eee53396c25
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 16 20:37:39 2008 +0100
+
+ Make destructors private/protected since you are not supposed to use them
+
+ poppler/GfxFont.cc | 2 +-
+ poppler/GfxFont.h | 11 +++++------
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+commit dbcebda953cb36a45a125aada68e85249fb73f43
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Dec 15 20:10:31 2008 +0100
+
+ Do not leak on AnnotScreen destructor
+
+ Fixes bug 19095
+
+ poppler/Annot.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit aaeb0d137232bf1cb11dc5e37b8b45b50c6f9c6a
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Dec 12 00:43:19 2008 +0100
+
+ update the xpdf headers installation
+
+ CMakeLists.txt | 32 +++++++++++++++++++++-----------
+ 1 files changed, 21 insertions(+), 11 deletions(-)
+
+commit 7c6527fa05389f705872aaaaff12e739b5d1577e
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Dec 12 00:41:21 2008 +0100
+
+ don't install Function.cc, as it is not an header
+
+ poppler/Makefile.am | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 0179e21b128ffccb5afd13203137ab8435197609
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 12 00:16:38 2008 +0100
+
+ Be more helpful with bad boys that want to use poppler core directly
+
+ fofi/Makefile.am | 10 ++++++++++
+ splash/SplashClip.h | 2 +-
+ splash/SplashPath.h | 2 +-
+ splash/SplashXPath.h | 2 +-
+ 4 files changed, 13 insertions(+), 3 deletions(-)
+
+commit 401632e4eeb4b10b1183a820f32461da77e8e4f2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 12 00:14:04 2008 +0100
+
+ Try harder to look for openjpeg
+
+ cmake/modules/FindLIBOPENJPEG.cmake | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ab539f46089702f60b96b1ba2b2bc1544173c264
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 11 23:15:45 2008 +0100
+
+ Fix crash when reading outline
+
+ Fixes bug 19024. Last as reference is required if the item has children (Table 8.4) so if there is no last reference, don't try to read children.
+
+ poppler/Outline.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit c9a755f9fd14511f43a2ca7fcda36bdd64bb1d87
+Author: Ilya Gorenbein <igorenbein@finjan.com>
+Date: Sun Dec 7 17:59:19 2008 +0100
+
+ Fix memory leak
+
+ Bug 18924
+
+ poppler/Page.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 4cd364c179ae91ed383a8237ba1ad263952fd7aa
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Nov 30 16:57:52 2008 +0100
+
+ add my copyright here
+
+ qt4/src/poppler-private.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6b1676deb773675d90469adc84c3de8dcdaf174c
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Nov 30 16:56:43 2008 +0100
+
+ [Qt4] support URI actions for TOC items
+
+ qt4/src/poppler-private.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit b5cd58b5565055fd0c13771461245ddcd80edfcf
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Nov 30 16:34:57 2008 +0100
+
+ extract the LinkAction "serialization" in an own function, and make it more safe
+
+ qt4/src/poppler-private.cc | 85 ++++++++++++++++++++++++++++++-------------
+ 1 files changed, 59 insertions(+), 26 deletions(-)
+
+commit ee191363e22940ae7b06945e68c4738b17c78348
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Nov 30 16:17:32 2008 +0100
+
+ move the addTocChildren() implementation in the cpp
+
+ qt4/src/poppler-form.cc | 1 +
+ qt4/src/poppler-page.cc | 1 +
+ qt4/src/poppler-private.cc | 65 ++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-private.h | 64 +-----------------------------------------
+ 4 files changed, 69 insertions(+), 62 deletions(-)
+
+commit f8eaabf1aa7e384619129a7509be85d0c3bfb825
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 30 13:33:12 2008 +0100
+
+ Update copyrights of the last commits
+
+ poppler/TextOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5f4fedfae6098e25644ffe5d4b1ed0bac043841d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Nov 29 19:51:27 2008 +0100
+
+ Use the Length specified in the Stream as initial bufSize
+
+ This is a optimization to save a few reallocations, if the Length value is incorrect it will still work
+
+ poppler/JPEG2000Stream.cc | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 12f6d6ba2052fbdc8ea4ba7c7c9277e75bf170a5
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Nov 23 18:20:14 2008 +0100
+
+ Fix a crash when the second argument of opMarkPoint is not a dictionary
+
+ According to the spec "If any of the values are indirect references to
+ objects outside the content stream, the property list dictionary must
+ instead be defined as a named resource.
+
+ poppler/Gfx.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 817e123a28e9f6b7e5be23f7ac2ba3bcec5e3f3f
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 22 21:48:37 2008 +1030
+
+ Don't compare print flag for non Type 3 fonts in cairo font cache
+
+ poppler/CairoFontEngine.cc | 7 ++++++-
+ poppler/CairoFontEngine.h | 4 +++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 68f8ade28764855d4f663607c50c8202b1268296
+Author: Albert Astals Cid <tsdgeos@samsung.localdomain>
+Date: Sun Nov 23 10:54:46 2008 +0100
+
+ Compile with -pedantic
+
+ Thanks to Bernard Leak for notifying
+
+ test/pdf-inspector.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4a4fa7ed44a87e47a6078a1f7bb6f41071672ea7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Nov 18 20:11:07 2008 +0100
+
+ Fix a crash when selecting text in word mode
+
+ poppler/TextOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a6f5032ab0d6edbf3879f39efff7916b1f7233da
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Nov 16 18:24:06 2008 +0100
+
+ optContentConfig is not actually stored in PDFDoc but in Catalog
+
+ poppler/PDFDoc.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit b843ac34c6c4ca1580f99fa2220c59dfcd91f026
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Nov 15 14:49:02 2008 +0100
+
+ [Qt4] deserialize the value of the 'right' coordinate, too
+
+ qt4/src/poppler-link.cc | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 03061fdae49842556c9ff48e61914fc88502e1d8
+Author: Tim Mooney <enchanter@users.sourceforge.net>
+Date: Thu Nov 13 22:32:22 2008 +0100
+
+ Fix build on Solaris 10 + Sun Studio 12.
+
+ Fixes bug 17496
+
+ configure.ac | 14 ++++++++++++++
+ test/Makefile.am | 6 ++++--
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+commit 17b18be4fd25f2ca2b4ed7382d9fda50410c44f1
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed Nov 12 20:40:57 2008 +1030
+
+ Ensure cairo font matrix is invertable
+
+ Fixes bugs #18254 and #18429
+
+ poppler/CairoOutputDev.cc | 15 ++++++++++++++-
+ 1 files changed, 14 insertions(+), 1 deletions(-)
+
+commit e2257e6916cd1067d43db9ed45f944413c61ed64
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 9 22:44:48 2008 +0100
+
+ Update copyrights of the last commits
+
+ poppler/CairoFontEngine.cc | 1 +
+ poppler/CairoFontEngine.h | 1 +
+ poppler/Form.cc | 2 +-
+ poppler/Gfx.h | 1 +
+ poppler/OptionalContent.h | 1 +
+ qt4/src/poppler-optcontent.cc | 1 +
+ 6 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 069f8ad9453e612e907b561aa50983c34400193d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 9 20:36:06 2008 +0100
+
+ MakeItBuild
+
+ glib/CMakeLists.txt | 1 +
+ glib/demo/CMakeLists.txt | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 04025c4f65bbb7e4330f6d17d917a035c0906f3d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Nov 9 17:03:20 2008 +0100
+
+ Fix a crash when initializing an Annot with a null catalog
+
+ Forms crate a temp annot just to get the font size of the form field
+ passing a NULL catalog.
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 471255c5a3850984997d91c7850759eb0c7e8a9c
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Nov 8 20:58:57 2008 +0100
+
+ [glib-demo] Add Optional Content demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/layers.c | 511 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/layers.h | 31 +++
+ glib/demo/main.c | 4 +-
+ 4 files changed, 547 insertions(+), 1 deletions(-)
+
+commit 7363c25e1d83332932d9b4fe16d7fb4e364da628
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Oct 26 19:47:35 2008 +0100
+
+ [glib] Add Optional Content support
+
+ glib/Makefile.am | 2 +
+ glib/poppler-document.cc | 377 +++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-document.h | 12 ++
+ glib/poppler-layer.cc | 201 ++++++++++++++++++++++++
+ glib/poppler-layer.h | 43 +++++
+ glib/poppler-private.h | 21 +++
+ glib/poppler.h | 3 +
+ glib/test-poppler-glib.cc | 52 ++++++-
+ 8 files changed, 710 insertions(+), 1 deletions(-)
+
+commit c674566f458b54097f21aae0d4bf8637146565c5
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Oct 26 19:42:53 2008 +0100
+
+ Fix memory leaks in OptionalContent
+
+ poppler/OptionalContent.cc | 13 +++----------
+ poppler/OptionalContent.h | 10 ++++++----
+ 2 files changed, 9 insertions(+), 14 deletions(-)
+
+commit 06ca313b8ecb8abb8dec3b418d118525b7bb0fdf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Oct 26 19:11:45 2008 +0100
+
+ Check annotation optional content properties before drawing it
+
+ poppler/Annot.cc | 20 ++++++++++++--------
+ poppler/Annot.h | 4 ++--
+ 2 files changed, 14 insertions(+), 10 deletions(-)
+
+commit a6d58927b048aa043cb6b6ed3ee9aeb213578924
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Nov 8 20:50:40 2008 +0100
+
+ Do not show hidden optional content
+
+ Before any draw operation we first check whether we are inside an
+ optional marked content element that is currently hidden.
+
+ poppler/Gfx.cc | 113 +++++++++++++++++++++++++++++++++++++++-----------------
+ poppler/Gfx.h | 7 ++-
+ 2 files changed, 84 insertions(+), 36 deletions(-)
+
+commit 5f168f991477e291290350a28f4a60a565e187b9
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Oct 20 17:56:11 2008 +0200
+
+ [glib] Show action titles when printing the index in test program
+
+ glib/test-poppler-glib.cc | 13 ++++++++-----
+ 1 files changed, 8 insertions(+), 5 deletions(-)
+
+commit a906d12e16748d9a40c0db4043a576fd3d004341
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Nov 8 20:20:00 2008 +0100
+
+ Minor code cleanup and consistency issues
+
+ poppler/OptionalContent.cc | 22 +++++++++++-----------
+ poppler/OptionalContent.h | 8 ++++----
+ qt4/src/poppler-optcontent.cc | 6 +++---
+ qt4/tests/check_optcontent.cpp | 8 ++++----
+ 4 files changed, 22 insertions(+), 22 deletions(-)
+
+commit e73c2ce906b7e1f06d641f7e0733aad6336b4091
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Oct 19 12:44:13 2008 +0200
+
+ Delete the optContent object if it's invalid
+
+ poppler/Catalog.cc | 4 ++++
+ poppler/OptionalContent.cc | 3 +++
+ poppler/OptionalContent.h | 5 +++++
+ 3 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 2900e7e4c920d735d5a727e9e39f71df97bd7b93
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Nov 8 18:12:47 2008 +0100
+
+ A new cairo is needed
+
+ CMakeLists.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit aaaecd2e86769d3a99e21577448a193711985958
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 22:47:30 2008 +0100
+
+ Do not abort if indexHighA is 'invalid', move it to the closest valid value and try with it
+
+ For the bug 18374 it works and does not seem a security problem
+
+ poppler/GfxState.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 82f4228a50efe6447c68f7f6d34a7805b7e4b75e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 20:57:17 2008 +0100
+
+ Add myself here
+
+ qt4/demos/viewer.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8df7d83439f0e9ab200840f912f1c08bbf44bd6e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 20:49:01 2008 +0100
+
+ [Qt4Demo] Fix leak
+
+ qt4/demos/viewer.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d3c424e0362f53bda5c4e2e415823d78ace76253
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 20:14:17 2008 +0100
+
+ Rename i to j so that code is more clear by not shadowing the function parameter
+
+ poppler/Catalog.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 9d12de9b59de4336eabb423f7bf0363b6a35e2a8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 20:00:01 2008 +0100
+
+ Fix crash in case indices is NULL
+
+ Putting more than one "logical line" per "real line" is evil, we think if will group it, but does not
+
+ poppler/UnicodeTypeTable.cc | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit fc61dad9daa15f83802ffa5c3cd9b59d80bb310b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 19:52:00 2008 +0100
+
+ [Qt] Fix leak
+
+ qt/poppler-link.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 981fb857b0afb1cda7836744dcf37906285512b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 19:49:18 2008 +0100
+
+ [Qt] Fix memory leak
+
+ qt/poppler-document.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit e925e92d5cbfc009c138ece117227a3b0894ead6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 5 19:44:40 2008 +0100
+
+ Do not leak uBuf in the error case
+
+ poppler/CharCodeToUnicode.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0741a402632ec5a8641ff11707142bf2731c1833
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 22:27:48 2008 +1030
+
+ Restore the cairo Type3 font image prescaling funtionality
+
+ poppler/CairoFontEngine.cc | 49 ++++++++++++++++++++++++++------------------
+ poppler/CairoFontEngine.h | 20 ++++++++++-------
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/CairoOutputDev.h | 2 +-
+ 4 files changed, 43 insertions(+), 30 deletions(-)
+
+commit 91a7c3fdd44f30b0b50ed05a3313bbb1b5c86e71
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 20:57:24 2008 +1030
+
+ Remove cairo font matrix y flip when inside a Type 3 char
+
+ Not sure why this was previously required but it now produces
+ incorrect results.
+
+ poppler/CairoOutputDev.cc | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 3bf4d7d75b455a9a0b5ee3a8c78b218e5af5185a
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 20:50:07 2008 +1030
+
+ Transform the glyph advance by the font matrix
+
+ poppler/CairoFontEngine.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4aa32bad61d008a854fdc9e902d6834bb1687d7e
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 20:49:04 2008 +1030
+
+ Use the font BBox, not the font matrix to set the Gfx BBox
+
+ poppler/CairoFontEngine.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 987955440c7711f440c3d2b5cc8c05ec07228a77
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 20:47:05 2008 +1030
+
+ Ensure both the font matrix and y-axis flip are in the matrix
+
+ we use for transforming the glyph metrics.
+
+ poppler/CairoFontEngine.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 5c051aa117477cba5d350adfc539acb4b5f2a56a
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 01:59:07 2008 +1030
+
+ Require cairo 1.8.2 for user-font support
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a3edfa30680864b95a5196c5619846de42980857
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 01:57:32 2008 +1030
+
+ Implement Type 3 fonts in cairo backend using cairo user-fonts
+
+ poppler/CairoFontEngine.cc | 174 ++++++++++++++++++++++++++++++++++++++++++--
+ poppler/CairoFontEngine.h | 18 +++++
+ poppler/CairoOutputDev.cc | 9 ++-
+ poppler/CairoOutputDev.h | 4 +-
+ 4 files changed, 194 insertions(+), 11 deletions(-)
+
+commit feab1e982a2ee39bb372d593633a06b6a499822f
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 01:21:39 2008 +1030
+
+ Add CairoOutputDev functions for getting Type 3 glyph metrics
+
+ poppler/CairoOutputDev.cc | 10 ++++++++++
+ poppler/CairoOutputDev.h | 7 +++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit a75efe208d899d4a23d5e2fcef200e4225721636
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sat Nov 1 00:26:40 2008 +1030
+
+ Make the catalog available to CairoFontEngine
+
+ glib/poppler-document.cc | 3 ++-
+ poppler/CairoFontEngine.cc | 2 +-
+ poppler/CairoFontEngine.h | 3 ++-
+ poppler/CairoOutputDev.cc | 7 +++++--
+ poppler/CairoOutputDev.h | 3 ++-
+ test/pdf-inspector.cc | 2 +-
+ 6 files changed, 13 insertions(+), 7 deletions(-)
+
+commit 941d3976c496b75a3c5a9d19b80044fc2b57bd98
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri Oct 31 22:44:41 2008 +1030
+
+ Allow multiple instances of CairoOutputDev to be created
+
+ for the same document that shares the same CairoFontEngine.
+
+ poppler/CairoOutputDev.cc | 16 +++++++++++-----
+ poppler/CairoOutputDev.h | 4 +++-
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+commit 94cff513d8589f51b243fcb078f82cb931bb6d35
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri Oct 31 21:11:01 2008 +1030
+
+ Use correct return type in _ft_new_face
+
+ poppler/CairoFontEngine.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0b5ee897a24ce1edfca19a3b843f9b7ee7026d07
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri Oct 31 20:55:14 2008 +1030
+
+ Refactor CairoFont
+
+ Create a CairoFreeType subclass and move the FreeType specific code
+ into it.
+
+ poppler/CairoFontEngine.cc | 197 +++++++++++++++++++++++++-------------------
+ poppler/CairoFontEngine.h | 26 +++++--
+ 2 files changed, 131 insertions(+), 92 deletions(-)
+
+commit a5865dae5b414de5f6dbda2a512101050c374e06
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Oct 28 10:30:59 2008 +0100
+
+ [glib] Add DISABLE_SINGLE_INCLUDES flags and fix glib-demo
+
+ configure.ac | 4 ++++
+ glib/Makefile.am | 3 ++-
+ glib/demo/Makefile.am | 3 ++-
+ glib/demo/annots.h | 2 +-
+ glib/demo/attachments.h | 2 +-
+ glib/demo/fonts.h | 2 +-
+ glib/demo/forms.h | 2 +-
+ glib/demo/images.h | 2 +-
+ glib/demo/info.h | 2 +-
+ glib/demo/links.h | 2 +-
+ glib/demo/outline.h | 2 +-
+ glib/demo/page.h | 2 +-
+ glib/demo/render.h | 2 +-
+ glib/demo/transitions.h | 2 +-
+ glib/demo/utils.h | 2 +-
+ 15 files changed, 20 insertions(+), 14 deletions(-)
+
+commit e07bfb54b77430e10e50c33151cf0afc9854006c
+Author: Christian Persch <chpe@gnome.org>
+Date: Tue Oct 28 10:29:51 2008 +0100
+
+ [glib] Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES
+
+ glib/poppler-page.h | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit a84d272ffd2b593ac98148e71b83fba299c60fea
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Oct 28 10:01:00 2008 +0100
+
+ [glib] Add disable deprecated compile flags and fix compile warnings
+
+ configure.ac | 6 ++++++
+ glib/Makefile.am | 3 ++-
+ glib/demo/Makefile.am | 4 +++-
+ glib/demo/attachments.c | 4 ++--
+ 4 files changed, 13 insertions(+), 4 deletions(-)
+
+commit 43f2b84a81625abee84c93cdced7fb92c99cd944
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Oct 21 23:00:55 2008 +0200
+
+ [Qt4] Small docu improvement
+
+ qt4/src/poppler-qt4.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 00f9995b4960575cd1f392474c585f2140c8e587
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 12 14:20:01 2008 +0200
+
+ Do not crash if there is not font
+
+ See bug 18023 for more info
+
+ poppler/TextOutputDev.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 084cc4335cfe2c0e66219eba4c1177ee7ff018c5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Oct 10 23:15:35 2008 +0200
+
+ obj4 should be the index 1 on the Array, not the 0, that's already obj3
+
+ poppler/Form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d7442c90206d4b7a8ebc58f995647eb87ac35f42
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Oct 9 22:53:00 2008 +0200
+
+ If Name is a Ref we want to get the String it references, not the Ref
+
+ poppler/OptionalContent.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 93f8dd9e837557bbfc0f058a664c356e3d6e82c0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Oct 9 21:28:27 2008 +0200
+
+ Poppler 0.10.0
+
+ CMakeLists.txt | 2 +-
+ NEWS | 16 ++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 22 insertions(+), 6 deletions(-)
+
+commit cdd9bf016de0d3f96b1d5e304c9d02f2bf71ff18
+Author: Mark Kaplan <mkaplan@finjan.com>
+Date: Wed Oct 8 22:29:11 2008 +0200
+
+ Initialize properly OptionalContentGroup::m_name
+
+ poppler/OptionalContent.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit c7b87f3b8cbbcca29a1974debc2233f621a2e33b
+Author: Carlo Bramini <carlo.bramix@libero.it>
+Date: Mon Oct 6 19:32:27 2008 +0200
+
+ Fix link on Mingw+Msys
+
+ test/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e92255296511cae9cbbac8de800d8b26e5f681f1
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Oct 5 15:57:06 2008 +0200
+
+ [Qt4] when the PDF exporting fails, delete the file if it was created by
+ the (failed) exporting
+
+ qt4/src/poppler-pdf-converter.cc | 13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 360f470b852e37d400949343763a18bf598820e8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 20:04:44 2008 +0200
+
+ Remove unused var
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit df7317f1320513b4f66cb6618d753b82042671f5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 19:48:57 2008 +0200
+
+ free the object
+
+ poppler/PDFDoc.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 9946d9af9dd5d5b96d5c777413a3e253dfd1f291
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 19:39:46 2008 +0200
+
+ If we try saving a document that was encrypted, we break everything, so just fail early
+
+ poppler/PDFDoc.cc | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 108959432af7714cb8ffe42d98d40c97f936a2e6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 19:39:24 2008 +0200
+
+ Correctly return wheter it was saved or not
+
+ qt4/src/poppler-pdf-converter.cc | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 4c6cb1c204d782e2ac2113b57f6d372b4716017d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 01:46:58 2008 +0200
+
+ Remove spurious //
+
+ fofi/FoFiType1.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e8e7809ab4b115cbe67251da12989fc024912514
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 01:43:02 2008 +0200
+
+ There are files that have more than one encoding definition per line, make them work
+
+ Fixes bug 17018, while at it, i've added some comments and some error() to make things a bit clearer
+
+ fofi/FoFiType1.cc | 28 ++++++++++++++++++++++++----
+ 1 files changed, 24 insertions(+), 4 deletions(-)
+
+commit 7604e025038fee24c2cb3001f2100d5d1e48efe1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Oct 4 00:35:46 2008 +0200
+
+ Fix Poppler::Link::linkArea for rotated pages
+
+ we suck :-( Fixes kde bug 172105
+
+ qt4/src/poppler-link-extractor.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 450b21e4528a8e890d3dda37ecb0a68602f8efaa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Oct 1 00:46:29 2008 +0200
+
+ I've changed these files this year too, update copyright
+
+ goo/gmem.cc | 2 +-
+ goo/gmem.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 98310ca24841789cf53b10d34e271ceb4e054001
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 30 23:59:43 2008 +0200
+
+ Fix StitchingFunction(StitchingFunction *func) and GfxAxialShading(GfxAxialShading *shading)
+
+ Fixes bug 17852
+
+ poppler/Function.cc | 2 ++
+ poppler/GfxState.cc | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit d12f5f4395eb18f8d29182e24acddd3e2b5cfe88
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 30 23:20:26 2008 +0200
+
+ 0.9.3
+
+ CMakeLists.txt | 2 +-
+ NEWS | 17 +++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 23 insertions(+), 6 deletions(-)
+
+commit d61e464754521555a06ed0901955f49be4def29a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 30 19:26:17 2008 +0200
+
+ Timothy also agreed, now Ed Catmur is the last one missing to answer
+
+ utils/ImageOutputDev.cc | 3 +++
+ utils/ImageOutputDev.h | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 3225f54fea7cbb6b25d7223268cdeccfdd823375
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 30 00:27:49 2008 +0200
+
+ And Marco said yes to GPLv2+
+
+ Only Timothy Lee and Ed Catmur left :-)
+
+ poppler/Catalog.cc | 3 +++
+ poppler/Outline.cc | 3 +++
+ poppler/Outline.h | 3 +++
+ splash/Splash.cc | 3 +++
+ splash/Splash.h | 3 +++
+ 5 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 268d803c9dd67b7f78f8dcdc3c7653c8b2c2d08f
+Author: Warren Toomey <wkt@tuhs.org>
+Date: Mon Sep 29 21:14:40 2008 +0200
+
+ Let HmtlOutputDev process images
+
+ utils/HtmlOutputDev.h | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a29984ab777c64a1cb286b667a6a91ad9b191f40
+Merge: f399afe 6865872
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 28 23:39:08 2008 +0200
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit f399afe6f6b9c250327d0e4c5b3f2839889d7095
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 28 23:38:34 2008 +0200
+
+ [Qt4] various apidox improvements
+
+ qt4/src/Mainpage.dox | 10 +---
+ qt4/src/poppler-link.h | 92 +++++++++++++++++++++++++++++++++---
+ qt4/src/poppler-qt4.h | 121 ++++++++++++++++++++++++++++++++---------------
+ 3 files changed, 168 insertions(+), 55 deletions(-)
+
+commit 68658721583b05ebacb1165ac36e91d49735bbd9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 28 19:29:06 2008 +0200
+
+ If tables is null, don't try to write to file as it'll crash, fixes crash on 17811 when using cairooutputdev
+
+ fofi/FoFiTrueType.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 3cb5b7fc5ae168ef58fd1905f61c1b9abe6cb86c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 28 19:25:53 2008 +0200
+
+ Introduce greallocn_checkoverflow and use it in FoFiTrueType::parse
+
+ Fixes the other part of bug 17811
+
+ fofi/FoFiTrueType.cc | 4 ++--
+ goo/gmem.cc | 21 +++++++++++++++++++++
+ goo/gmem.h | 1 +
+ 3 files changed, 24 insertions(+), 2 deletions(-)
+
+commit aa7ef03af49f74ed558dcbab8ad4c594bb2b7d53
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 28 19:24:43 2008 +0200
+
+ If libjpeg tells us to abort, let's abort :D
+
+ Fixes part of bug 17811
+
+ poppler/DCTStream.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e2461c9aa4d74b5511621d7222979948e31541ad
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 28 18:07:25 2008 +0200
+
+ [Qt4] Activate the 'printing' flag by default in the PSConverter.
+
+ qt4/src/poppler-ps-converter.cc | 2 +-
+ qt4/src/poppler-qt4.h | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 957d7acb66635e9748c6bc7a31cdbbcbb8da9011
+Author: Carlo Bramini <carlo.bramix@libero.it>
+Date: Sat Sep 27 17:23:20 2008 +0200
+
+ Misc mingw fixes
+
+ configure.ac | 2 +-
+ glib/Makefile.am | 2 +-
+ glib/demo/info.cc | 1 +
+ m4/libjpeg.m4 | 2 +-
+ 4 files changed, 4 insertions(+), 3 deletions(-)
+
+commit b3828203c4e594754957033ea826e8e22164fd5b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Sep 26 23:08:14 2008 +0200
+
+ Carl agreed too, so CairoOutputDev.cc is done
+
+ Only miss, Marco Pesenti Gritti, Timothy Lee and Ed Catmur
+
+ poppler/CairoOutputDev.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit a197a07728d19abc2708979c95b4ef53e88fcb55
+Author: Carlo Bramini <carlo.bramix@libero.it>
+Date: Fri Sep 26 18:42:05 2008 +0200
+
+ Compile where localtime_r is not available
+
+ glib/demo/info.cc | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 38884e1722ac7e15c62cece20035c5fb0020f4b3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 24 14:18:38 2008 +0200
+
+ Do what Jeff really want to do, mark the font as invalid if it matches any of the known collections that Identity is not a good fallback
+
+ Fixes pdf on KDE bug 171365
+
+ poppler/GfxFont.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0e080aaf44816e5d5b9008f3c2fb54868932f0ac
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 24 13:12:13 2008 +0200
+
+ Remove non-needed X includes
+
+ Spotted by Carlo Bramini
+
+ test/gtk-cairo-test.cc | 3 ---
+ test/pdf-inspector.cc | 3 ---
+ 2 files changed, 0 insertions(+), 6 deletions(-)
+
+commit 6888b023fdb199d3c5fb705bd928aedf68eeffdb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 23 23:28:04 2008 +0200
+
+ Only do the scale to 'm' size trick on non embedded fonts as it was meant to be
+
+ Fixes bug 17744
+
+ poppler/SplashOutputDev.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 539d29f4f3b24b98c9fc5f88d3477e427fbe409d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 23 22:39:50 2008 +0200
+
+ 0.9.2
+
+ CMakeLists.txt | 2 +-
+ NEWS | 19 +++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 25 insertions(+), 6 deletions(-)
+
+commit abd070a79d8345bda3853395a39e4e2882c4ff8a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 22 20:23:11 2008 +0200
+
+ Check the types here too
+
+ Benchmarking in release mode, both in "human feel" and callgrind the benefit/lost is almost inexistant
+
+ poppler/Object.h | 36 ++++++++++++++++++++++--------------
+ 1 files changed, 22 insertions(+), 14 deletions(-)
+
+commit df47e4c441e4ec79b1bb40de7044c9501f243b76
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue Sep 16 12:56:04 2008 +0100
+
+ Check for duplicate open fonts.
+
+ Before creating a new FT_Face for a font, check to see if there is a
+ duplicate amongst the list of open fonts, kept alive by either Poppler's
+ or Cairo's font cache .
+
+ A quick example of the benefit of this check is that it reduces the RSS of
+ the Poppler converter in the Cairo test suite from over 900 MiB to just 90
+ MiB.
+
+ configure.ac | 1 +
+ poppler/CairoFontEngine.cc | 214 ++++++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 190 insertions(+), 25 deletions(-)
+
+commit 41d1edddcf84ca23c0fc39c5f4f3a49e408a9f1a
+Author: Kouhei Sutou <kou@cozmixng.org>
+Date: Sun Sep 21 16:33:33 2008 +0200
+
+ [glib-demo] Fix a crash in forms demo
+
+ glib/demo/forms.c | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+commit fe26075353226be9a02c8cf1a6a29586de15ce86
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 21 12:03:21 2008 +0200
+
+ really use the key passed to it
+
+ poppler/Form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8aa531cb478d6ae838a94f9f31e6a0bbd0dd957c
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 21 11:18:22 2008 +0200
+
+ Read the 'readOnly' attribute directly in the FormField constructor.
+
+ poppler/Form.cc | 12 +++---------
+ 1 files changed, 3 insertions(+), 9 deletions(-)
+
+commit b56f64d676bdabd4a3ebe0eb2237f4c202a3707d
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 21 00:53:54 2008 +0200
+
+ Handle streams as entries for the catalog JS name tree.
+
+ poppler/Catalog.cc | 18 +++++++++++++-----
+ 1 files changed, 13 insertions(+), 5 deletions(-)
+
+commit 93386d67b3d7adbd87547e9742e4df1c10eadbc1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 20 16:20:03 2008 +0200
+
+ Compile with -pedantic
+
+ poppler/Form.h | 4 ++--
+ qt4/src/poppler-embeddedfile.cc | 4 ++--
+ qt4/src/poppler-movie.cc | 3 ++-
+ qt4/src/poppler-sound.cc | 3 ++-
+ qt4/src/poppler-textbox.cc | 2 +-
+ 5 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 6961fd8efe3db6ee7077dc2ed072498696dae31a
+Author: Tomas Are Haavet <tomasare@gmail.com>
+Date: Sat Sep 20 16:13:37 2008 +0200
+
+ Remove some warnings and errors when compiling with gcc and -pedantic
+
+ fofi/FoFiTrueType.cc | 3 ++-
+ glib/poppler-annot.cc | 8 ++++----
+ glib/poppler-attachment.cc | 2 +-
+ glib/poppler-document.cc | 6 +++---
+ glib/poppler-form-field.cc | 2 +-
+ glib/poppler-page.cc | 2 +-
+ poppler/Annot.h | 5 +++--
+ splash/SplashTypes.h | 3 ++-
+ 8 files changed, 17 insertions(+), 14 deletions(-)
+
+commit 4e9a04da358b1527a08102e601a52f07930532f2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 20 16:10:50 2008 +0200
+
+ Add mention of GPLv2 or later in poppler changes to all files except Splash.cc and Splash.h, i've still no answer from Marco :-(
+
+ splash/SplashBitmap.cc | 3 +++
+ splash/SplashBitmap.h | 3 +++
+ splash/SplashErrorCodes.h | 3 +++
+ splash/SplashFTFont.cc | 3 +++
+ splash/SplashFTFont.h | 3 +++
+ splash/SplashFTFontEngine.cc | 3 +++
+ splash/SplashFTFontEngine.h | 3 +++
+ splash/SplashFTFontFile.cc | 3 +++
+ splash/SplashFTFontFile.h | 3 +++
+ splash/SplashFont.cc | 3 +++
+ splash/SplashFont.h | 3 +++
+ splash/SplashFontEngine.cc | 3 +++
+ splash/SplashFontEngine.h | 3 +++
+ splash/SplashFontFile.cc | 3 +++
+ splash/SplashFontFile.h | 3 +++
+ splash/SplashT1Font.cc | 3 +++
+ splash/SplashT1Font.h | 3 +++
+ splash/SplashT1FontEngine.cc | 3 +++
+ splash/SplashT1FontFile.cc | 3 +++
+ splash/SplashT1FontFile.h | 3 +++
+ splash/SplashTypes.h | 3 +++
+ splash/SplashXPathScanner.cc | 3 +++
+ 22 files changed, 66 insertions(+), 0 deletions(-)
+
+commit beb87362072d5b480cf6b2c02445ec17c119ff56
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 20 15:47:25 2008 +0200
+
+ Add Tomas' Copyright
+
+ utils/HtmlFonts.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8ccb1bb651b129875ef802356c4a229b2ce31973
+Author: Tomas Are Haavet <tomasare@gmail.com>
+Date: Sat Sep 20 15:45:47 2008 +0200
+
+ Initialize pos the correct value to not have crashes
+
+ utils/HtmlFonts.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 77bf8ec94e36fef7e120f1dc4bb1390be71cfb97
+Author: Tomas Are Haavet <tomasare@gmail.com>
+Date: Sat Sep 20 14:17:06 2008 +0200
+
+ Fix memory leak
+
+ utils/HtmlOutputDev.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b22be54dc2205269974315ca748d835d0990d6da
+Author: Tomas Are Haavet <tomasare@gmail.com>
+Date: Sat Sep 20 14:16:26 2008 +0200
+
+ Fix mismatched free/delete
+
+ utils/HtmlOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ac16174da1d6f19445f78e7cd7c4a18cb9524dde
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 20 00:52:19 2008 +0200
+
+ make sure the image is setup before using it, otherwise some things don't print correctly like PDF from bug 17645
+
+ poppler/PSOutputDev.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit ffa4ffdf7fe83035c72addd8c4c8ee566621ba06
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 17 23:27:30 2008 +0200
+
+ 0.9.1
+
+ CMakeLists.txt | 2 +-
+ NEWS | 13 +++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 19 insertions(+), 6 deletions(-)
+
+commit f57cbe32bcde0808943b9be2456dd69fa5b6dd27
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 14 22:18:38 2008 +0200
+
+ If when looking for an object we get objSomeNumberAfter assume it was an int of SomeNumberAfter
+
+ Fixes bug 17568 and i don't see how it can break existing things because it's already on an error path
+
+ poppler/XRef.cc | 25 +++++++++++++++++++++++++
+ 1 files changed, 25 insertions(+), 0 deletions(-)
+
+commit 1a852064ff5a1a15bc315ddca472a0ad74292581
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Sep 13 12:11:41 2008 +0200
+
+ [glib-demo] Do not try to get info about remote destinations
+
+ glib/demo/utils.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 951cffeb2cbff4e179043033b5ac7f5eb764d6dc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Sep 12 12:05:53 2008 +0200
+
+ Make sure DecryptAESState::bufIdx is never bigger than 16, otherwise we crash
+
+ I am not sure this is the correct fix, but fixes crash on files of bugs 13972, 16092 and 17523 and they seem to work ok
+
+ poppler/Decrypt.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 491109edbe827860e764b5fcb67456867923858d
+Author: Haruyuki Kawabe <Haruyuki.Kawabe@unisys.co.jp>
+Date: Wed Sep 10 23:00:32 2008 +0200
+
+ Generate the outline file at the same place the other files are generated
+
+ Fixes bug 17504
+
+ utils/HtmlOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 7dfc1e4c9348d537896bda7b0f2ae591afc72866
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 10 00:03:50 2008 +0200
+
+ we want to distribute this file too
+
+ qt4/src/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ddb73e8dc1ccbddf3b170e12c7153ccaf716d7cc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 23:47:33 2008 +0200
+
+ We want to distribute cmake/modules/FindLIBOPENJPEG.cmake too
+
+ Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 646ccc2bb8563d411dc25bdbab53725ae08572ba
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 23:22:17 2008 +0200
+
+ m_doc->doc->getOptContentConfig() can be null, so check for it
+
+ qt4/src/poppler-document.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d7f0bce67101f37f8d3e69d7d701388bcdc7200f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 23:18:49 2008 +0200
+
+ Qt4 frontend had timezone parsing that got lost when moving to the common function, i suck
+
+ glib/poppler-document.cc | 6 ++++--
+ poppler/DateInfo.cc | 20 ++++++++++++++------
+ poppler/DateInfo.h | 2 +-
+ qt/poppler-document.cc | 6 ++++--
+ qt4/src/poppler-document.cc | 22 +++++++++++++++++++---
+ utils/pdfinfo.cc | 6 ++++--
+ utils/pdftohtml.cc | 6 ++++--
+ 7 files changed, 50 insertions(+), 18 deletions(-)
+
+commit 0af8609e6c932de2d85168cc9147854ee84b3a1b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 20:55:27 2008 +0200
+
+ i want this packaged too
+
+ utils/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit dd0f4c1510382e17cf33d3fe163e384da1d6d289
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 20:48:04 2008 +0200
+
+ Fix includepath
+
+ fofi/FoFiTrueType.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 16c0842c3e01608a72709af55cc5cb8b567efedf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 9 20:36:18 2008 +0200
+
+ API changed, so increase soname
+
+ glib/CMakeLists.txt | 2 +-
+ glib/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 217c0d1f80a78713977a7bfbe680fce90f1c6b36
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 8 23:56:28 2008 +0200
+
+ change version to 0.9.0
+
+ Now only need to wait for Carlos and Iñigo's answer to a BIC change in glib/ and we'll have 0.9.0 :-)
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+commit e34022a8fcfb9fe211dd6b561377d855972b2087
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 8 23:36:04 2008 +0200
+
+ Increase soname for libpoppler, i'm almost sure we broke BC there
+
+ CMakeLists.txt | 2 +-
+ poppler/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit bc275049d6ef083daf71a043ccf23fd0634f5c4d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 8 23:33:24 2008 +0200
+
+ soname 3.1.0 for qt4 libs, we are BC/SC but got new API
+
+ qt4/src/CMakeLists.txt | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 06743a25a73adc3fba95f7b4ad74a6dde1a54ead
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 8 23:23:06 2008 +0200
+
+ added news for 0.9.0
+
+ NEWS | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 115 insertions(+), 0 deletions(-)
+
+commit d35ca2ce5df12d40e295873e44b1f18ea40ba897
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Sep 7 01:13:33 2008 +0200
+
+ [Qt4] apidox improvements
+
+ qt4/src/poppler-annotation.h | 70 +++++++++++++++++++++++++++++++++++++++--
+ qt4/src/poppler-link.h | 12 +++++--
+ qt4/src/poppler-qt4.h | 22 +++++++++++--
+ 3 files changed, 93 insertions(+), 11 deletions(-)
+
+commit 796d4c002d47c85716775d173eddfb2ae8866eaf
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Sep 6 22:48:13 2008 +0200
+
+ no more need for including the qt3 paths
+
+ qt4/demos/CMakeLists.txt | 1 -
+ qt4/src/CMakeLists.txt | 1 -
+ qt4/tests/CMakeLists.txt | 1 -
+ 3 files changed, 0 insertions(+), 3 deletions(-)
+
+commit db7ee3b3ae0f42155f9245691e4bfdef98a8ed6f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 6 23:16:05 2008 +0200
+
+ [Qt4] Fix docu
+
+ qt4/src/poppler-qt4.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3366059a25611f19ab592cda18c5efe0b9359771
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Sep 6 16:34:58 2008 +0200
+
+ [Qt4] add option flags for the PS converter
+
+ - map the 'strictMargins' and 'forceRasterize' bool options as flags
+ - add a flag for setting the "printing" mode
+
+ qt4/src/poppler-ps-converter.cc | 34 ++++++++++++++++++++++++++--------
+ qt4/src/poppler-qt4.h | 26 ++++++++++++++++++++++++++
+ 2 files changed, 52 insertions(+), 8 deletions(-)
+
+commit afa26d5c9ac9feb61aad30eb65dc00c9854d7f2e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 6 15:46:12 2008 +0200
+
+ we are printing so pass the print flag as true
+
+ qt/poppler-document.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f5d1eb5eaabaf3ab4bb87b8b4b901bbf30b20b29
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 6 15:43:32 2008 +0200
+
+ We are pringint here, so pass the printing flag as true
+
+ Fixes KDE bug 170459, you'd wonder how many times i've made the same mistake...
+
+ qt4/src/poppler-ps-converter.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 58e828d732f06bae9133dd518d89fa4348f1cca8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Sep 5 18:45:23 2008 +0200
+
+ Only like QtTest to the tests, not to the lib itself
+
+ configure.ac | 13 +++++++++++--
+ qt4/tests/Makefile.am | 22 +++++++++++-----------
+ 2 files changed, 22 insertions(+), 13 deletions(-)
+
+commit 49b3e4560f62a9a7db350d94d50e229f5e1208bf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Sep 5 18:17:45 2008 +0200
+
+ Movie filename is not a string, but a File Specification
+
+ Fixes a crash when filename is a dictionary
+
+ poppler/Annot.cc | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 996d2e176057e22acbc374cff7a712ce6fd92d93
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Sep 5 18:17:25 2008 +0200
+
+ Unify multiple File Specification parsers
+
+ CMakeLists.txt | 2 +
+ poppler/FileSpec.cc | 146 ++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/FileSpec.h | 24 ++++++++
+ poppler/Link.cc | 104 +++++-----------------------------
+ poppler/Link.h | 4 -
+ poppler/Makefile.am | 2 +
+ poppler/PSOutputDev.cc | 35 +-----------
+ poppler/PSOutputDev.h | 1 -
+ poppler/Sound.cc | 7 ++-
+ 9 files changed, 197 insertions(+), 128 deletions(-)
+
+commit 31f3eb2d6b43f7fbf4d978730d109b08b1563989
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 3 21:49:23 2008 +0200
+
+ Only set the state to true if the AS value is the same as parent's V
+
+ Fixes bug 16121 and 15535
+
+ poppler/Form.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit c75abac7ba07990ef54a46fa0d429eea580a71ef
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 2 19:16:55 2008 +0200
+
+ Kjartan was missing and just agreed
+
+ utils/HtmlOutputDev.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 630aa133017d15ddc7bf96c79f43c5b60fa9749a
+Merge: b2bc9b3 de82255
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Sep 2 01:25:55 2008 +0200
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit b2bc9b3f59ef8e5fea18f0bc91b71fc9eb9a4157
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Sep 2 01:24:39 2008 +0200
+
+ [Qt4] small apidox improvements
+
+ mostly the start of the \since marker addition, plus few other
+ documentation addition/improvements
+
+ qt4/src/poppler-annotation.h | 9 ++++++
+ qt4/src/poppler-form.h | 8 +++++
+ qt4/src/poppler-link.h | 14 ++++++++--
+ qt4/src/poppler-optcontent.h | 11 ++++++++
+ qt4/src/poppler-qt4.h | 59 ++++++++++++++++++++++++++++++++++++-----
+ 5 files changed, 90 insertions(+), 11 deletions(-)
+
+commit 6bc4881477ea15d70d420e57b5663052f2f9df76
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Sep 2 00:47:56 2008 +0200
+
+ expand the macros, extract poppler-optcontent.h
+
+ enable the macro expansion and define POPPLER_QT4_EXPORT to be empty, so
+ we don't have it in the apidox
+
+ qt4/src/Doxyfile | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit de822554acdb1b2bc9e70c0668c43a10c0ec129a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 1 23:50:37 2008 +0200
+
+ Initialize widget to null before calling initialize not after :-(
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1a7b7199112d97e816a099cbc1a5672c83e64156
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 1 20:42:06 2008 +0200
+
+ Add my copyright
+
+ poppler/Dict.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1fef34782a003f46fceab0d3bed36212bbf32c4c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 1 20:35:37 2008 +0200
+
+ Find reverse way in Dict
+
+ This fixes Greg Stolze - Marriage Of Virtue & Viciousness.pdf
+ The issue with this pdf is that has a Dict with two entries with the same key
+ The pdf spec says if that happens, results are undefined, but Acroread uses the
+ second key while we were using the first, searching backwards we use the second now too and the pdf works
+
+ poppler/Dict.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bb7996eaaad6a70404891bb2ff530160737ea3d7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 1 20:29:25 2008 +0200
+
+ Do not crash on documents with no pages
+
+ qt4/tests/test-poppler-qt4.cpp | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 0c11d390e4b0e3765ae20968359c7562c9857db7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 1 20:13:33 2008 +0200
+
+ All poppler commiters to these files agreed to GPLv2+
+
+ Still missing to answer
+ Marco Pesenti Gritti
+ Catalog.cc
+ Outline.cc
+ Outline.h
+
+ Kjartan Maraas
+ HtmlOutputDev.cc
+
+ Timothy Lee
+ ImageOutputDev.h
+ ImageOutputDev.cc
+
+ Carl Worth
+ CairoOutputDev.cc
+
+ Ed Catmur
+ GfxFont.cc
+ GlobalParams.cc
+ TextOutputDev.cc
+ TextOutputDev.h
+ UnicodeTypeTable.cc
+ UnicodeTypeTable.h
+
+ poppler/Annot.cc | 3 +++
+ poppler/Annot.h | 3 +++
+ poppler/Array.cc | 3 +++
+ poppler/Array.h | 3 +++
+ poppler/ArthurOutputDev.cc | 3 +++
+ poppler/ArthurOutputDev.h | 3 +++
+ poppler/CMap.cc | 3 +++
+ poppler/CMap.h | 3 +++
+ poppler/CairoFontEngine.cc | 3 +++
+ poppler/CairoFontEngine.h | 3 +++
+ poppler/CairoOutputDev.h | 3 +++
+ poppler/Catalog.h | 3 +++
+ poppler/CharCodeToUnicode.cc | 3 +++
+ poppler/CharCodeToUnicode.h | 3 +++
+ poppler/Decrypt.cc | 3 +++
+ poppler/Decrypt.h | 3 +++
+ poppler/Dict.cc | 3 +++
+ poppler/Dict.h | 3 +++
+ poppler/Error.cc | 3 +++
+ poppler/Error.h | 3 +++
+ poppler/Function.cc | 3 +++
+ poppler/Gfx.cc | 3 +++
+ poppler/Gfx.h | 3 +++
+ poppler/GfxFont.h | 3 +++
+ poppler/GfxState.cc | 3 +++
+ poppler/GfxState.h | 3 +++
+ poppler/GlobalParams.h | 3 +++
+ poppler/JBIG2Stream.cc | 3 +++
+ poppler/JPXStream.cc | 3 +++
+ poppler/Lexer.cc | 3 +++
+ poppler/Lexer.h | 3 +++
+ poppler/Link.cc | 3 +++
+ poppler/Link.h | 3 +++
+ poppler/Object.cc | 3 +++
+ poppler/Object.h | 3 +++
+ poppler/OutputDev.cc | 3 +++
+ poppler/OutputDev.h | 3 +++
+ poppler/PDFDoc.cc | 3 +++
+ poppler/PDFDoc.h | 3 +++
+ poppler/PDFDocEncoding.cc | 3 +++
+ poppler/PDFDocEncoding.h | 3 +++
+ poppler/PSOutputDev.cc | 3 +++
+ poppler/PSOutputDev.h | 3 +++
+ poppler/PSTokenizer.cc | 3 +++
+ poppler/PSTokenizer.h | 3 +++
+ poppler/Page.cc | 3 +++
+ poppler/Page.h | 3 +++
+ poppler/Parser.cc | 3 +++
+ poppler/Parser.h | 3 +++
+ poppler/SplashOutputDev.cc | 3 +++
+ poppler/SplashOutputDev.h | 3 +++
+ poppler/Stream-CCITT.h | 3 +++
+ poppler/Stream.cc | 3 +++
+ poppler/Stream.h | 3 +++
+ poppler/UTF8.h | 3 +++
+ poppler/XRef.cc | 3 +++
+ poppler/XRef.h | 3 +++
+ utils/HtmlFonts.cc | 3 +++
+ utils/HtmlLinks.cc | 3 +++
+ utils/HtmlOutputDev.h | 3 +++
+ utils/parseargs.c | 3 +++
+ utils/parseargs.h | 3 +++
+ utils/pdffonts.cc | 3 +++
+ utils/pdfimages.cc | 3 +++
+ utils/pdfinfo.cc | 3 +++
+ utils/pdftohtml.cc | 3 +++
+ utils/pdftoppm.cc | 3 +++
+ utils/pdftops.cc | 3 +++
+ utils/pdftotext.cc | 3 +++
+ 69 files changed, 207 insertions(+), 0 deletions(-)
+
+commit 8670bfed7900586725b30e3af67f6849acc6efda
+Author: Vasile Gaburici <gaburici@cs.umd.edu>
+Date: Sat Aug 30 12:47:13 2008 +0200
+
+ Fix extraction of images
+
+ See bug 16999 for more info
+
+ utils/ImageOutputDev.cc | 12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 1c98f197664b1a2c06e2caf32116a8487f4054bf
+Author: Vasile Gaburici <gaburici@cs.umd.edu>
+Date: Sat Aug 30 12:44:02 2008 +0200
+
+ Read sMap reverse so CMap entries take precedence
+
+ See bug 17321 for a more in depth explanation
+
+ poppler/CharCodeToUnicode.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 8f1deb3f8000bdeb845a6c786a654bc7eb684f0a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 29 23:06:19 2008 +0200
+
+ Are we a lib or aren't we? Unify String to Date parsing so we all behave the same way
+
+ CMakeLists.txt | 2 +
+ glib/poppler-document.cc | 29 ++--------------
+ poppler/DateInfo.cc | 62 +++++++++++++++++++++++++++++++++++
+ poppler/DateInfo.h | 27 +++++++++++++++
+ poppler/Makefile.am | 2 +
+ qt/poppler-document.cc | 22 +-----------
+ qt4/src/poppler-annotation-helper.h | 16 +--------
+ qt4/src/poppler-document.cc | 52 +++--------------------------
+ utils/pdfinfo.cc | 16 ++-------
+ utils/pdftohtml.cc | 9 ++---
+ 10 files changed, 111 insertions(+), 126 deletions(-)
+
+commit c39f23dca98d3efe8d094c9a3e1bd460ba57d1ce
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 29 20:50:57 2008 +0200
+
+ Add a readme for contributors with licensing and misc info
+
+ README.contributors | 20 ++++++++++++++++++++
+ 1 files changed, 20 insertions(+), 0 deletions(-)
+
+commit 35a72590ffd3284e63601af79599e5fa025e567f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Aug 28 00:58:11 2008 +0200
+
+ Be more protective against huge font sizes in bogus documents like the one in http://bugs.freedesktop.org/show_bug.cgi?id=17326
+
+ 10 MB in size is a font of 3200x3200, huge enough to be discarted
+
+ poppler/SplashOutputDev.cc | 20 +++++++++++++++++++-
+ 1 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 33727cf6773b12d736ba245fdd146559ce93102d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 20:36:13 2008 +0200
+
+ fix location of the comment
+
+ fofi/FoFiType1.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit abe29b4fdb33f449649fdea5d7af2deeb702f0bb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 20:24:35 2008 +0200
+
+ All changes made to fofi/ files under the poppler project are by people that accepts to license the code under GPLv2+
+
+ fofi/FoFiBase.cc | 3 +++
+ fofi/FoFiTrueType.cc | 3 +++
+ fofi/FoFiTrueType.h | 3 +++
+ fofi/FoFiType1.cc | 3 +++
+ fofi/FoFiType1C.h | 3 +++
+ 5 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 6346d7050a03935c71336c65d5f8f0fe2860d321
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 20:23:50 2008 +0200
+
+ All changes made to goo/ files under the poppler project are by people that accepts to license the code under GPLv2+
+
+ goo/GooString.cc | 3 +++
+ goo/GooString.h | 3 +++
+ goo/gfile.cc | 3 +++
+ goo/gfile.h | 3 +++
+ goo/gmem.cc | 3 +++
+ goo/gmem.h | 3 +++
+ 6 files changed, 18 insertions(+), 0 deletions(-)
+
+commit d6e1f1fb4e83527d3ece51d98fa20262713b7da1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 20:22:06 2008 +0200
+
+ .cc -> .h
+
+ poppler/FontInfo.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9f0ac70f7ad806cadce379d4fabb90eff697ad52
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 19:25:27 2008 +0200
+
+ Add missing addresses
+
+ poppler/ABWOutputDev.cc | 4 ++--
+ poppler/ABWOutputDev.h | 2 +-
+ poppler/FlateStream.cc | 2 +-
+ poppler/FlateStream.h | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 22f6af73961686895f207fe13022a21333455862
+Merge: 12a9e42 6d6913a
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Aug 24 19:03:24 2008 +0200
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 12a9e427fb487165b1797f81d52d733c27bfa2e1
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Aug 24 18:57:52 2008 +0200
+
+ [Qt4] add showControl and playMode properties of MovieObject's
+
+ qt4/src/poppler-movie.cc | 14 ++++++++++++++
+ qt4/src/poppler-qt4.h | 20 ++++++++++++++++++++
+ 2 files changed, 34 insertions(+), 0 deletions(-)
+
+commit c444c652859b6e52160e5571e84f8eb1292d65f1
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Aug 24 18:47:58 2008 +0200
+
+ [Qt4] make the MovieObject ctor private, with only Page able to use it
+
+ qt4/src/poppler-qt4.h | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 6d6913a79779769ce0fe2f0b516a90a50e51b947
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 18:45:45 2008 +0200
+
+ fix Jeff's entry
+
+ poppler/DCTStream.cc | 2 +-
+ poppler/DCTStream.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 25bd5967f9f550a32e20eea91cd00cbeff98249e
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Aug 24 18:45:25 2008 +0200
+
+ [Qt4] initialize the MovieObject from an AnnotMovie
+
+ the annotation has all the data we need, so just init from that
+
+ qt4/src/poppler-movie.cc | 8 ++++----
+ qt4/src/poppler-page.cc | 4 +---
+ qt4/src/poppler-qt4.h | 4 ++--
+ 3 files changed, 7 insertions(+), 9 deletions(-)
+
+commit 47f54ad4de111f62a5b8c25520ef6b2bca6026d2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 24 18:18:13 2008 +0200
+
+ Add more correct copyright statements on fofi, goo, poppler and util directories to be more compliant with GPL that requires such modification statements to be present. Meanwhile i did that, i did qt and qt4 dirs too, glib is missing if someone wants to fix it, but it's not crucial as it's not a fork of some other GPL software
+
+ AUTHORS | 4 +++-
+ fofi/FoFiBase.cc | 11 +++++++++++
+ fofi/FoFiTrueType.cc | 14 ++++++++++++++
+ fofi/FoFiTrueType.h | 12 ++++++++++++
+ fofi/FoFiType1.cc | 12 ++++++++++++
+ fofi/FoFiType1C.h | 11 +++++++++++
+ goo/GooString.cc | 13 +++++++++++++
+ goo/GooString.h | 12 ++++++++++++
+ goo/GooTimer.cc | 3 +++
+ goo/GooTimer.h | 8 ++++++--
+ goo/GooVector.h | 12 ++++++++++++
+ goo/gfile.cc | 13 +++++++++++++
+ goo/gfile.h | 11 +++++++++++
+ goo/gmem.cc | 13 +++++++++++++
+ goo/gmem.h | 13 +++++++++++++
+ poppler/ABWOutputDev.cc | 3 ++-
+ poppler/ABWOutputDev.h | 2 +-
+ poppler/Annot.cc | 19 +++++++++++++++++++
+ poppler/Annot.h | 17 +++++++++++++++++
+ poppler/Array.cc | 11 +++++++++++
+ poppler/Array.h | 11 +++++++++++
+ poppler/ArthurOutputDev.cc | 14 +++++++++++++-
+ poppler/ArthurOutputDev.h | 13 ++++++++++++-
+ poppler/CMap.cc | 12 ++++++++++++
+ poppler/CMap.h | 11 +++++++++++
+ poppler/CairoFontEngine.cc | 17 +++++++++++++++++
+ poppler/CairoFontEngine.h | 17 +++++++++++++++++
+ poppler/CairoOutputDev.cc | 19 +++++++++++++++++++
+ poppler/CairoOutputDev.h | 16 ++++++++++++++++
+ poppler/Catalog.cc | 19 +++++++++++++++++++
+ poppler/Catalog.h | 16 ++++++++++++++++
+ poppler/CharCodeToUnicode.cc | 14 ++++++++++++++
+ poppler/CharCodeToUnicode.h | 13 +++++++++++++
+ poppler/DCTStream.cc | 5 ++++-
+ poppler/DCTStream.h | 6 +++++-
+ poppler/Decrypt.cc | 12 ++++++++++++
+ poppler/Decrypt.h | 11 +++++++++++
+ poppler/Dict.cc | 13 +++++++++++++
+ poppler/Dict.h | 13 +++++++++++++
+ poppler/Error.cc | 13 +++++++++++++
+ poppler/Error.h | 13 +++++++++++++
+ poppler/FlateStream.cc | 2 ++
+ poppler/FlateStream.h | 2 ++
+ poppler/FontInfo.cc | 22 ++++++++++++++++++++++
+ poppler/FontInfo.h | 21 +++++++++++++++++++++
+ poppler/Form.cc | 10 +++++++++-
+ poppler/Form.h | 6 +++++-
+ poppler/Function.cc | 12 ++++++++++++
+ poppler/Gfx.cc | 23 +++++++++++++++++++++++
+ poppler/Gfx.h | 13 +++++++++++++
+ poppler/GfxFont.cc | 19 +++++++++++++++++++
+ poppler/GfxFont.h | 16 ++++++++++++++++
+ poppler/GfxState.cc | 14 ++++++++++++++
+ poppler/GfxState.h | 13 +++++++++++++
+ poppler/GlobalParams.cc | 19 +++++++++++++++++++
+ poppler/GlobalParams.h | 15 +++++++++++++++
+ poppler/JBIG2Stream.cc | 13 +++++++++++++
+ poppler/JPXStream.cc | 11 +++++++++++
+ poppler/Lexer.cc | 12 ++++++++++++
+ poppler/Lexer.h | 12 ++++++++++++
+ poppler/Link.cc | 14 ++++++++++++++
+ poppler/Link.h | 12 ++++++++++++
+ poppler/Movie.cc | 17 ++++++++++++++++-
+ poppler/Object.cc | 11 +++++++++++
+ poppler/Object.h | 12 ++++++++++++
+ poppler/OptionalContent.cc | 5 ++++-
+ poppler/Outline.cc | 11 +++++++++++
+ poppler/Outline.h | 11 +++++++++++
+ poppler/OutputDev.cc | 13 +++++++++++++
+ poppler/OutputDev.h | 14 ++++++++++++++
+ poppler/PDFDoc.cc | 15 +++++++++++++++
+ poppler/PDFDoc.h | 15 +++++++++++++++
+ poppler/PDFDocEncoding.cc | 13 ++++++++++++-
+ poppler/PDFDocEncoding.h | 11 +++++++++++
+ poppler/PSOutputDev.cc | 15 +++++++++++++++
+ poppler/PSOutputDev.h | 14 ++++++++++++++
+ poppler/PSTokenizer.cc | 12 ++++++++++++
+ poppler/PSTokenizer.h | 11 +++++++++++
+ poppler/Page.cc | 20 ++++++++++++++++++++
+ poppler/Page.h | 16 ++++++++++++++++
+ poppler/PageLabelInfo.cc | 12 ++++++++++++
+ poppler/PageLabelInfo.h | 12 ++++++++++++
+ poppler/PageTransition.h | 18 ++++++++++++++++++
+ poppler/Parser.cc | 12 ++++++++++++
+ poppler/Parser.h | 11 +++++++++++
+ poppler/SplashOutputDev.cc | 16 ++++++++++++++++
+ poppler/SplashOutputDev.h | 11 +++++++++++
+ poppler/Stream-CCITT.h | 11 +++++++++++
+ poppler/Stream.cc | 14 ++++++++++++++
+ poppler/Stream.h | 13 +++++++++++++
+ poppler/TextOutputDev.cc | 18 ++++++++++++++++++
+ poppler/TextOutputDev.h | 15 +++++++++++++++
+ poppler/UTF8.h | 11 +++++++++++
+ poppler/UnicodeTypeTable.cc | 13 +++++++++++++
+ poppler/UnicodeTypeTable.h | 11 +++++++++++
+ poppler/XRef.cc | 17 ++++++++++++++++-
+ poppler/XRef.h | 14 ++++++++++++++
+ qt/poppler-document.cc | 3 +++
+ qt/poppler-fontinfo.cc | 3 +--
+ qt/poppler-page.cc | 7 ++++++-
+ qt/poppler-private.h | 4 ++++
+ qt/poppler-qt.h | 5 ++++-
+ qt4/src/poppler-annotation-helper.h | 1 +
+ qt4/src/poppler-annotation.cc | 3 ++-
+ qt4/src/poppler-annotation.h | 4 +++-
+ qt4/src/poppler-document.cc | 4 +++-
+ qt4/src/poppler-embeddedfile.cc | 1 +
+ qt4/src/poppler-fontinfo.cc | 5 ++++-
+ qt4/src/poppler-form.cc | 2 +-
+ qt4/src/poppler-form.h | 2 +-
+ qt4/src/poppler-link-extractor-private.h | 2 +-
+ qt4/src/poppler-link-extractor.cc | 2 +-
+ qt4/src/poppler-link.cc | 3 ++-
+ qt4/src/poppler-link.h | 1 +
+ qt4/src/poppler-optcontent-private.h | 1 +
+ qt4/src/poppler-optcontent.cc | 1 +
+ qt4/src/poppler-optcontent.h | 1 +
+ qt4/src/poppler-page-private.h | 2 ++
+ qt4/src/poppler-page.cc | 4 ++++
+ qt4/src/poppler-private.h | 4 +++-
+ qt4/src/poppler-ps-converter.cc | 1 +
+ qt4/src/poppler-qt4.h | 5 ++++-
+ qt4/src/poppler-textbox.cc | 2 ++
+ splash/Splash.cc | 12 ++++++++++++
+ splash/Splash.h | 12 ++++++++++++
+ splash/SplashBitmap.cc | 12 ++++++++++++
+ splash/SplashBitmap.h | 11 +++++++++++
+ splash/SplashErrorCodes.h | 11 +++++++++++
+ splash/SplashFTFont.cc | 12 ++++++++++++
+ splash/SplashFTFont.h | 11 +++++++++++
+ splash/SplashFTFontEngine.cc | 11 +++++++++++
+ splash/SplashFTFontEngine.h | 11 +++++++++++
+ splash/SplashFTFontFile.cc | 11 +++++++++++
+ splash/SplashFTFontFile.h | 11 +++++++++++
+ splash/SplashFont.cc | 11 +++++++++++
+ splash/SplashFont.h | 11 +++++++++++
+ splash/SplashFontEngine.cc | 11 +++++++++++
+ splash/SplashFontEngine.h | 11 +++++++++++
+ splash/SplashFontFile.cc | 12 ++++++++++++
+ splash/SplashFontFile.h | 12 ++++++++++++
+ splash/SplashT1Font.cc | 11 +++++++++++
+ splash/SplashT1Font.h | 11 +++++++++++
+ splash/SplashT1FontEngine.cc | 11 +++++++++++
+ splash/SplashT1FontFile.cc | 11 +++++++++++
+ splash/SplashT1FontFile.h | 11 +++++++++++
+ splash/SplashTypes.h | 11 +++++++++++
+ splash/SplashXPathScanner.cc | 11 +++++++++++
+ utils/HtmlFonts.cc | 24 ++++++++++++++++++++++++
+ utils/HtmlFonts.h | 12 ++++++++++++
+ utils/HtmlLinks.cc | 23 +++++++++++++++++++++++
+ utils/HtmlLinks.h | 12 ++++++++++++
+ utils/HtmlOutputDev.cc | 13 +++++++++++++
+ utils/HtmlOutputDev.h | 11 +++++++++++
+ utils/ImageOutputDev.cc | 13 +++++++++++++
+ utils/ImageOutputDev.h | 12 ++++++++++++
+ utils/parseargs.c | 13 +++++++++++++
+ utils/parseargs.h | 11 +++++++++++
+ utils/pdffonts.cc | 12 ++++++++++++
+ utils/pdfimages.cc | 11 +++++++++++
+ utils/pdfinfo.cc | 12 ++++++++++++
+ utils/pdftoabw.cc | 26 +++++++++++++++++++-------
+ utils/pdftohtml.cc | 11 +++++++++++
+ utils/pdftoppm.cc | 11 +++++++++++
+ utils/pdftops.cc | 12 ++++++++++++
+ utils/pdftotext.cc | 12 ++++++++++++
+ 165 files changed, 1795 insertions(+), 37 deletions(-)
+
+commit 0dfbb8996ee91aa044eb2bdf2859ef64005116f8
+Author: Loïc Minier <lool@dooz.org>
+Date: Wed Aug 20 22:10:07 2008 +0200
+
+ Fixes escaping of hyphens in man pages
+
+ utils/pdfinfo.1 | 2 +-
+ utils/pdftops.1 | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 6cfa0e598a81460e5d0a7d60d8584366d2a70165
+Author: Loïc Minier <lool@dooz.org>
+Date: Wed Aug 20 19:57:42 2008 +0200
+
+ Fix synopsis of pdftops in man page to clarify that a PDF file is required in all cases
+
+ utils/pdftops.1 | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 48a73cc709a8bed9d2d0f9cbd2a9d2b6c0dad05b
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 19:26:01 2008 +0200
+
+ [Qt4] convert the title of movie annotations
+
+ qt4/src/poppler-page.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 419ec15ac825f2e0052b411462f00ac57fed030e
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 19:25:04 2008 +0200
+
+ [Qt4] get/set the title for movie annotations
+
+ qt4/src/poppler-annotation.cc | 13 +++++++++++++
+ qt4/src/poppler-annotation.h | 3 +++
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 63bcaf113fcb5a4a9e5c120df2c3dafb2977c90a
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:58:30 2008 +0200
+
+ [Qt4] convert the movie annotation from the core type to the Qt4 one
+
+ qt4/src/poppler-page.cc | 18 +++++++++++++++---
+ 1 files changed, 15 insertions(+), 3 deletions(-)
+
+commit 5cc490de74af12726bdeb9b5a6a0f0d1d79383b5
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:55:41 2008 +0200
+
+ [Qt4] first version of a MovieAnnotation
+
+ right mow it just holds the movie object
+
+ qt4/src/poppler-annotation.cc | 74 +++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-annotation.h | 26 ++++++++++++++-
+ 2 files changed, 99 insertions(+), 1 deletions(-)
+
+commit 3d5c2e22d790d7c139e1cd28aebb21cfe76b8b6b
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:54:30 2008 +0200
+
+ compile the new poppler-movie.cc
+
+ qt4/src/CMakeLists.txt | 1 +
+ qt4/src/Makefile.am | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 599698a9b133999f1f0bb0548489111e9d7b6f05
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:52:58 2008 +0200
+
+ [Qt4] first version of a MovieObject object for movies
+
+ slightly differs from the version in core
+
+ qt4/src/poppler-movie.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 34 +++++++++++++++++++++
+ 2 files changed, 107 insertions(+), 0 deletions(-)
+
+commit 820f15009845870701e1f4e7f4fc4fb93312ab3e
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:45:07 2008 +0200
+
+ fix Movie::copy()
+
+ the default copy ctor already does the vertbatim copies, so no need to
+ do them on our own; what needs to be done is checking whether an object
+ is valid before either doing a "smart copy" or "postprocessing" it
+
+ poppler/Movie.cc | 14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+commit c3a006ae35250e9a5638c2ce713b7470380751c7
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Aug 23 01:04:34 2008 +0200
+
+ compile attachments.c in the demo with cmake as well
+
+ glib/demo/CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b5a7987a50b3d28fbfa219e2cef85b9e53aaf079
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 21 20:40:18 2008 +0200
+
+ [glib-demo] Fix attachments demo with documents that don't contain attachments
+
+ glib/demo/attachments.c | 27 ++++++++++++++++++++-------
+ 1 files changed, 20 insertions(+), 7 deletions(-)
+
+commit a2b0aefedbdb20ce0ef8398a700202021fcf00db
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 21 20:14:50 2008 +0200
+
+ [glib-demo] Fix typo
+
+ glib/demo/attachments.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9e563d6d877624b1caf82ac30c5ae30a1eb48f21
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 21 20:12:33 2008 +0200
+
+ [glib-demo] Add checksum validation to attachments demo
+
+ glib/demo/attachments.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 101 insertions(+), 0 deletions(-)
+
+commit e233325e6f13d8b232bf68a2812fe755e7fccd4d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 21 19:03:32 2008 +0200
+
+ [glib-demo] Add demo for attachments
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/attachments.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/attachments.h | 31 ++++++
+ glib/demo/main.c | 4 +-
+ glib/demo/utils.c | 23 +++++
+ glib/demo/utils.h | 1 +
+ 6 files changed, 302 insertions(+), 1 deletions(-)
+
+commit 0e2efa0fce5bf059ce85d3e3bec2293b405ec3c9
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 21 19:02:24 2008 +0200
+
+ [glib] Make sure name and descripction are valid utf8 strings
+
+ glib/poppler-attachment.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 15a73704ab6b009ca5e07c08f0b12d970adc387d
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue Aug 19 09:18:03 2008 +0100
+
+ Memleak and invalid free.
+
+ CairoOutputDev::setSoftMask() fails to free the cairo_t and mask it uses
+ to draw the opaque soft mask and attempts to destroy a reference to a
+ surface it does not own (this bug was masked by the fact that a reference
+ was still being held by the unfreed cairo_t).
+
+ poppler/CairoOutputDev.cc | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+commit d3110e392097db54e9ee59300213e490dee39126
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 19 19:19:09 2008 +0200
+
+ Fix include so it can be used in the unsupported way of installing internal poppler/ headers
+
+ Notified by Caolan McNamara <caolanm@redhat.com>
+
+ poppler/PreScanOutputDev.h | 2 +-
+ poppler/SecurityHandler.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 303249e5548bfbf6823e97850e498970d802b4a0
+Author: Albert Astals Cid <tsdgeos@samsung.localdomain>
+Date: Fri Aug 15 01:52:52 2008 +0200
+
+ Revert 123a87aff2e35b10efe6a1d715585b427e4a9afa it creates problems with some pdf files
+
+ poppler/Gfx.cc | 14 ++------------
+ poppler/Gfx.h | 3 ---
+ 2 files changed, 2 insertions(+), 15 deletions(-)
+
+commit 27ddf3c5e839358c8553d41743faa8ee304767bf
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Aug 13 13:55:57 2008 +0200
+
+ [Qt4] make sure to use the correct page width/height for form widgets coordinates
+
+ qt4/src/poppler-form.cc | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 2e7b0eb4af8cf5938833e5659d01b77096e7b7f7
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Aug 12 13:49:52 2008 +0200
+
+ [Qt4] add a method to get the activation action of a FormField
+
+ qt4/src/poppler-form.cc | 19 +++++++++++++++++++
+ qt4/src/poppler-form.h | 8 ++++++++
+ 2 files changed, 27 insertions(+), 0 deletions(-)
+
+commit f9e679adbd6830da26eb9909bcb16e3bdf0da6b4
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Aug 12 13:47:15 2008 +0200
+
+ create a static version of PageData::convertLinkActionToLink()
+
+ qt4/src/poppler-page-private.h | 2 ++
+ qt4/src/poppler-page.cc | 5 +++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit a6ecc864ea3e94d7232cff6a2e8f49919d8f24ff
+Author: Albert Astals Cid <tsdgeos@samsung.localdomain>
+Date: Tue Aug 12 01:23:21 2008 +0200
+
+ initialize widget, fixes crash on EC2006.pdf
+
+ poppler/Annot.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 123a87aff2e35b10efe6a1d715585b427e4a9afa
+Author: Albert Astals Cid <tsdgeos@samsung.localdomain>
+Date: Tue Aug 12 00:37:09 2008 +0200
+
+ Cache the last created GfxResource, very useful because some pdf created by pstopdf push and pop the same GfxResource all the time
+
+ This brings us a speedup of 16 times (from 11 seconds to about 600 msec) in kde bug 168663
+
+ poppler/Gfx.cc | 14 ++++++++++++--
+ poppler/Gfx.h | 3 +++
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+commit 5ad1a12183f4b8e328f32386a74b5616e7e59070
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 4 20:34:42 2008 +0200
+
+ Be less strict when parsing TTF tables
+
+ With this change and freetype from CVS i can render Bug 16940 using the splash renderer
+
+ fofi/FoFiTrueType.cc | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit d322720428fa416b7d5f23acc72d1d4b4f74d041
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 4 20:16:50 2008 +0200
+
+ Report an error when FoFiTrueType::load or FoFiTrueType::make fail
+
+ poppler/SplashOutputDev.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 901ebc84ff7c0872c3f9f5e6eaf418ba6400fa10
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Aug 3 10:54:09 2008 +0200
+
+ [Qt4] Make the paper color setting working as it should.
+
+ A BGR colorspace means that colors should be set as blue,green,red, and
+ not red,green,blue.
+
+ qt4/src/poppler-private.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 66b34c78943be598778a3ef438b0cefac668c6a2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 2 13:54:34 2008 +0200
+
+ This should not be here, breaks jpeg rendering when not using libjpeg
+
+ That was included erroneously when the file writing code was added
+
+ poppler/Stream.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit fd8d71ea8b12393201ece9c09372fd69c7573025
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 23:47:51 2008 +0200
+
+ These defines are unneeded too
+
+ msvc/poppler/poppler-config.h | 30 ------------------------------
+ poppler-config.h.cmake | 30 ------------------------------
+ poppler/poppler-config.h.in | 30 ------------------------------
+ 3 files changed, 0 insertions(+), 90 deletions(-)
+
+commit 391b5d5cdd9f63fe90229f88cdad628fb63c0206
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 23:36:09 2008 +0200
+
+ Get rid of more defines, say our version on command line tools, also say our copyright
+
+ Did not modify PSOutputDev.cc output as PS is too fragile
+
+ msvc/poppler/poppler-config.h | 9 +--------
+ poppler-config.h.cmake | 9 +--------
+ poppler/PSOutputDev.cc | 2 +-
+ poppler/poppler-config.h.in | 9 +--------
+ utils/pdffonts.cc | 3 ++-
+ utils/pdfimages.cc | 3 ++-
+ utils/pdfinfo.cc | 3 ++-
+ utils/pdftohtml.cc | 3 ++-
+ utils/pdftoppm.cc | 3 ++-
+ utils/pdftops.cc | 3 ++-
+ utils/pdftotext.cc | 3 ++-
+ 11 files changed, 18 insertions(+), 32 deletions(-)
+
+commit d14fb1513be045363f7edec21cee04fd4937ede2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 23:14:28 2008 +0200
+
+ Add GooList *getEncodingNames();
+
+ Forgot to commit this earlier :-(
+
+ poppler/GlobalParams.cc | 19 +++++++++++++++++++
+ poppler/GlobalParams.h | 2 ++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 9fd34443d765ccd61864d18bceadc049d905b957
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 23:09:39 2008 +0200
+
+ remove defines we don't use at all
+
+ msvc/poppler/poppler-config.h | 4 ----
+ poppler-config.h.cmake | 4 ----
+ poppler/poppler-config.h.in | 4 ----
+ 3 files changed, 0 insertions(+), 12 deletions(-)
+
+commit 0f13013dc3079915572b6b002dac8d01d2dbde04
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 23:06:50 2008 +0200
+
+ xpdfrc has been dead for a while
+
+ msvc/poppler/poppler-config.h | 25 -------------------------
+ poppler-config.h.cmake | 25 -------------------------
+ poppler/poppler-config.h.in | 25 -------------------------
+ 3 files changed, 0 insertions(+), 75 deletions(-)
+
+commit 96392667d1331d2f8750f27c116e34bbf9282dca
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 22:20:55 2008 +0200
+
+ Provide a default constructor for FontInfo so you can use it as metatype for qvariant
+
+ qt4/src/poppler-fontinfo.cc | 5 +++++
+ qt4/src/poppler-private.h | 7 +++++++
+ qt4/src/poppler-qt4.h | 5 +++++
+ 3 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 9fd1077e63d97a316380b8df4821bf4c9434fb52
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 17:47:51 2008 +0200
+
+ Build with cmake too
+
+ utils/CMakeLists.txt | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d8d6a3f46620d45c279b7ca1a4a2fa3a36285cde
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 1 17:44:07 2008 +0200
+
+ Improve manpages and add -listenc to pdfinfo and pdftotext in the way
+
+ Our manpages listed things like xpdfrc and -cfg options we don't support at all.
+ Also some options were missing from the man pages
+ Finally there was the -enc option you completely had to guess which string to pass,
+ so i've added the -listenc option to get the user the list of encodings he can use
+
+ utils/Makefile.am | 2 ++
+ utils/pdffonts.1 | 18 ------------------
+ utils/pdfimages.1 | 14 --------------
+ utils/pdfinfo.1 | 28 ++++------------------------
+ utils/pdfinfo.cc | 16 ++++++++++++++--
+ utils/pdftoppm.1 | 42 +++++++++++++++++++++---------------------
+ utils/pdftops.1 | 41 +++--------------------------------------
+ utils/pdftotext.1 | 32 ++++----------------------------
+ utils/pdftotext.cc | 16 ++++++++++++++--
+ utils/printencodings.cc | 34 ++++++++++++++++++++++++++++++++++
+ utils/printencodings.h | 24 ++++++++++++++++++++++++
+ 11 files changed, 120 insertions(+), 147 deletions(-)
+
+commit f5b0ca794b0879e3d239bf1d6138b15ead27d9ca
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Tue Jul 29 20:18:33 2008 +0930
+
+ Fix ActualText string length check in TextOutputDev.cc
+
+ poppler/TextOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 21bbdc9d663995336900f1ce97cf294f04464e01
+Author: Boris Toloknov <tlknv@yandex.ru>
+Date: Mon Jul 28 21:02:07 2008 +0200
+
+ make xml output valid xml
+
+ utils/HtmlLinks.cc | 33 +++++++++++++++++-
+ utils/HtmlOutputDev.cc | 85 ++++++++++++++++++++++++++++++-----------------
+ 2 files changed, 85 insertions(+), 33 deletions(-)
+
+commit dccfc4c2910b47a77cd7b6019d9365f1684ffd0c
+Author: Boris Toloknov <tlknv@yandex.ru>
+Date: Mon Jul 28 20:58:13 2008 +0200
+
+ Limit ascent and descent are to reasonable values.
+
+ See bug 16592 to cases where this helps
+
+ utils/HtmlOutputDev.cc | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+commit 0fd5a3db1ddad447d44b64eff9abfb077a7853a0
+Author: Boris Toloknov <tlknv@yandex.ru>
+Date: Mon Jul 28 20:52:19 2008 +0200
+
+ Make html output to keep all the spaces with &nbsp;
+
+ utils/HtmlFonts.cc | 2 ++
+ utils/HtmlOutputDev.cc | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 650c73fa0f570f699d907e33060fb23290940b42
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jul 28 20:44:13 2008 +0200
+
+ findDest crashes on null goostrings so rework the ifs a bit
+
+ utils/HtmlOutputDev.cc | 16 +++++++++-------
+ 1 files changed, 9 insertions(+), 7 deletions(-)
+
+commit adee9c0e9e8b2de20309b3ae6eb8e6d6ed05cf85
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jul 26 00:04:03 2008 +0200
+
+ We are not storing the ctu, so decref and leak-- :-)
+
+ poppler/Annot.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e7b3e3ae3080bd6f239f7d96761729ad30b075ae
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 23:52:28 2008 +0200
+
+ Fix leak
+
+ qt4/src/poppler-form.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 006b974d4faae53e6bd51a4281dd923ab1c2d4e8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 23:15:11 2008 +0200
+
+ Fix memory leak
+
+ poppler/Annot.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3a549d75acceedfa25dcf79074d0cdfb643c746e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 23:08:21 2008 +0200
+
+ Free the previous modified object in case it exists
+
+ poppler/XRef.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 040d244b97a554342061c777a286e99dbb9acabd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 21:31:55 2008 +0200
+
+ Need this or otherwise it crashes on complete overwrite
+
+ poppler/PDFDoc.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 11ebceeef938a7e6fa9b5437e65b5b4b822f3018
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 21:30:24 2008 +0200
+
+ Fix my last fix about saving, i think this is the correct one
+
+ - One incremental update only write the modified entries xref, not all
+ - Update gen to 0 when resizing entries
+ - On XRef::add correctly initialize all newly allocated entries
+
+ poppler/PDFDoc.cc | 4 +-
+ poppler/XRef.cc | 57 ++++++++++++++++++++++++++++++++++++++++++----------
+ poppler/XRef.h | 2 +-
+ 3 files changed, 49 insertions(+), 14 deletions(-)
+
+commit 03d445f485f90972ab1c05d79b2999b763ab7377
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 20:16:54 2008 +0200
+
+ Fix XRef::writeToFile after my change
+
+ poppler/XRef.cc | 10 +++-------
+ 1 files changed, 3 insertions(+), 7 deletions(-)
+
+commit 136fa97576f2df0d7a7563b34651ca222927ea57
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 25 20:12:51 2008 +0200
+
+ Fix XRef::add and XRef::addIndirectObject, also remove num from XRefEntry
+
+ Previous code was under some incorrect assumptions:
+ * our XRef does not maintain the free link list so if you want to
+ find a free entry you have to go though all of them
+ * our XRefEntry does not need a num because the index itself is the num
+
+ Conflicts:
+
+ poppler/XRef.cc
+
+ poppler/XRef.cc | 70 +++++++++++++++++++-----------------------------------
+ poppler/XRef.h | 1 -
+ 2 files changed, 25 insertions(+), 46 deletions(-)
+
+commit 55572b77da95c47393b78f3aff804ea9c5ae17e5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 22 22:50:00 2008 +0200
+
+ Really do what the comment says and also init changeLeft, changeTop and changeZoom
+
+ poppler/Link.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8dc7afaeea08183de331ecfd41ce1971e7772fd0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 22 21:05:03 2008 +0200
+
+ Some documents have loops in XObject dictionaries, make sure we don't get in an infinite loop while traversing them
+
+ Fixes infinite loop on http://bugs.kde.org/show_bug.cgi?id=166145
+
+ poppler/FontInfo.cc | 44 ++++++++++++++++++++++++++++++++++++--------
+ poppler/FontInfo.h | 4 ++++
+ 2 files changed, 40 insertions(+), 8 deletions(-)
+
+commit 9fb17c952dcff798e45280eeb9c718680147e766
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 20 13:47:11 2008 +0200
+
+ Fix condition, we want thumb to be a Stream, not to be non null
+
+ Fixes bug 16579
+
+ glib/poppler-page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3696025977fd345b12767f75a2de6ed7e9467365
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Jul 18 23:32:25 2008 +0200
+
+ initialize pageWidgets, otherwise it can be a rubbish pointer is Annots
+ is not a valid object
+
+ poppler/Page.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0189ff8b86de18486f7397076f7a0fbf133a1a33
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 1 20:16:50 2008 +0200
+
+ Fix condition, we want fetched_thumb to be a Stream, not to be non null
+
+ Fixes bug 16579
+
+ poppler/Page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5bd77dcdd5220d63934f4b3e78d85a936947a53d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 1 00:49:01 2008 +0200
+
+ forgot about we use autofoo too
+
+ qt4/tests/Makefile.am | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 5ed2503003d973b5461594af15485af49591451d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 1 00:43:26 2008 +0200
+
+ unittesting about ActualText
+
+ qt4/tests/CMakeLists.txt | 1 +
+ qt4/tests/check_actualtext.cpp | 33 +++++++++++++++++++++++++++++++++
+ 2 files changed, 34 insertions(+), 0 deletions(-)
+
+commit f3bb2eb556f5248242f6db85052ef045fcb697c6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 1 00:41:35 2008 +0200
+
+ Unbreak ActualText extraction
+
+ poppler/Gfx.cc | 10 +---------
+ 1 files changed, 1 insertions(+), 9 deletions(-)
+
+commit 9e9543b105b39f8b0048c00fc94741e43ad615e9
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jun 26 20:19:06 2008 +0200
+
+ use FindPackageHandleStandardArgs
+
+ cmake/modules/FindLIBOPENJPEG.cmake | 11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit fec41ceddebe194f139bcc5b2f3fa74e7d1ae502
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jun 26 20:18:27 2008 +0200
+
+ need to use LIBOPENJPEG_FOUND, as it really represents whether
+ libopenjpeg was found or not
+
+ CMakeLists.txt | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 5498d93e59a0b79e5add3dc6181d5e98ba689217
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Fri Jun 20 21:42:34 2008 -0700
+
+ Use a single global FT_Library in CairoOutputDev
+
+ Cairo may internally keep references to the FreeType fonts loaded in
+ CairoFontEngine even after poppler is done with them. Commit 42db4890e829
+ ("Do not call FT_Done_Face on a live cairo_font_face_t") introduced a fix
+ for one use-after-free bug, by delaying deleting an FT_Face objects until
+ cairo is done with it.
+
+ That fix doesn't correct all the bugs. An FT_Library object is created for
+ each CairoOutputDev object, and deleted when the CairoOutputDev goes away.
+ But the FT_Library object should not be deleted while fonts loaded using it
+ are still in use. And cairo can keep references to fonts around more or
+ less indefinitely.
+
+ To more fully fix the problem, we can either:
+ 1. Keep a count of not-yet-deleted fonts associated with each FT_Library,
+ and wait to call FT_Done_FreeType until it drops to zero.
+ 2. Never call FT_Done_FreeType.
+
+ The second option is the simplest. To avoid leaking memory FT_Library
+ objects, use a single global FT_Library instead of a per-CairoOutputDev
+ copy.
+
+ poppler/CairoOutputDev.cc | 18 +++++++++++++++---
+ poppler/CairoOutputDev.h | 4 +++-
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+commit c75632d62a052d3c3739b96f5586f97c68baf25b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 24 02:31:43 2008 +0200
+
+ Open in WriteOnly mode, fixes the fact that when writing to an existing file, the contents beyond what we wrote were still there
+
+ qt4/src/poppler-base-converter.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9810fdfc54aac80aa99561a9d820d11b062e4637
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 24 02:12:21 2008 +0200
+
+ the entry is not updated here either, fix uninitialized variable use
+
+ poppler/XRef.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2da15db4751d3cb93d40b48e348dbc51f6e7a29f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jun 20 11:39:08 2008 +0200
+
+ Do not create an OCGs object if there isn't an OCProperties dictionary in the Catalog
+
+ poppler/Catalog.cc | 5 +++--
+ poppler/Gfx.cc | 12 +++++++++++-
+ poppler/OptionalContent.cc | 25 +++++--------------------
+ 3 files changed, 19 insertions(+), 23 deletions(-)
+
+commit d6fb5dcb7b7596961800d9744d17b6adb8d9a2ad
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Wed Jun 18 11:24:05 2008 -0700
+
+ Fix a crash in the cairo backend with Type 3 glyphs
+
+ Commit 86b7e8a3bee7 ("Ensure cairo renders Type 3 glyphs with only the fill
+ color") introduced a bug into the Cairo backend, causing evince to crash
+ with the message
+ evince: cairo-pattern.c:679: cairo_pattern_destroy: Assertion
+ `((*&(&pattern->ref_count)->ref_count) > 0)' failed.
+ Fix this by updating reference counts to the fill and stroke patterns when
+ modifying them in beginType3Char.
+
+ Simplify the code as well by not saving the old stroke pattern before
+ overriding it; this is already done since beginType3Char/endType3Char is
+ wrapped by calls to saveState/restoreState in Gfx::doShowText.
+
+ poppler/CairoOutputDev.cc | 4 ++--
+ poppler/CairoOutputDev.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit c3a00c83f1d24c1f88e7ed3b3f772460e578f3cc
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Jun 15 02:39:31 2008 +0200
+
+ poppler-page-transition.h is here now
+
+ qt4/src/Doxyfile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2affed0fc97b958ae46f531c471a3cf0b04c0f55
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 14 01:24:49 2008 +0200
+
+ Give warnings if the build configuration for stream decoders is different from default one
+
+ configure.ac | 20 +++++++++++++++++---
+ 1 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 8e74bc612cb4102891324ffdbfcdb47293ecb95e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 14 01:13:53 2008 +0200
+
+ Warn the user if he does not have any enabled rendering backend
+
+ configure.ac | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 99d2361032cbaafd69bd796170757ed6482f208d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 14 00:53:38 2008 +0200
+
+ Add a JPEG2000 decoder based on OpenJPEG
+
+ Enabled by default since it's generally better than xpdf one
+ See http://lists.freedesktop.org/archives/poppler/2008-June/003874.html for more information
+
+ CMakeLists.txt | 30 ++++++-
+ cmake/modules/FindLIBOPENJPEG.cmake | 44 +++++++++
+ configure.ac | 33 +++++++
+ poppler/JPEG2000Stream.cc | 181 +++++++++++++++++++++++++++++++++++
+ poppler/JPEG2000Stream.h | 48 +++++++++
+ poppler/Makefile.am | 22 ++++-
+ poppler/Stream.cc | 7 +-
+ 7 files changed, 360 insertions(+), 5 deletions(-)
+
+commit e368838d7f9691c7b1adf7d7f62f65abed91eea7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 11 00:48:53 2008 +0200
+
+ [Qt4] Add the possibility of getting a QByteArray with the data of an embedded font
+
+ qt4/src/poppler-document.cc | 23 +++++++++++++++++++++++
+ qt4/src/poppler-private.h | 3 +++
+ qt4/src/poppler-qt4.h | 5 +++++
+ 3 files changed, 31 insertions(+), 0 deletions(-)
+
+commit 184292ffb8fef5aa5a72bdbfcc0c95b663f452bd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 10 23:00:11 2008 +0200
+
+ Make the fontRef and the embRef accessible to FontInfo users
+
+ poppler/FontInfo.cc | 2 +-
+ poppler/FontInfo.h | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 86b7e8a3bee74c5b89c451137cf9c2758ba6913f
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jun 8 18:00:05 2008 +0930
+
+ Ensure cairo renders Type 3 glyphs with only the fill color
+
+ poppler/CairoOutputDev.cc | 3 +++
+ poppler/CairoOutputDev.h | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 99e2d95728f41c91ab59a01c62d82b19a7a2e083
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Jun 1 00:49:32 2008 +0930
+
+ glib: save/restore cairo state when rendering a page
+
+ glib/poppler-page.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 6f40ee4af6b59f9d2c326adc8d2574e45f4d4d29
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 8 23:46:04 2008 +0200
+
+ Make sure we use Qt4 moc to generate moc files of the qt4 frontend
+
+ configure.ac | 20 ++++++++++++++++++++
+ qt4/demos/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ qt4/tests/Makefile.am | 2 +-
+ 4 files changed, 23 insertions(+), 3 deletions(-)
+
+commit 86aa8fc0708f7da4a907a8bdb1845e53d29892b7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jun 5 19:21:08 2008 +0200
+
+ Fix leak on ABWOutputDev.cc
+
+ poppler/ABWOutputDev.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 979ef1cafa968d776a2b804ce555b11212212397
+Author: Koji Otani <sho@bbr.jp>
+Date: Tue Jun 3 21:07:15 2008 +0200
+
+ Support for surrogates outside the BMP plane
+
+ poppler/TextOutputDev.cc | 19 ++++++++++++++++++-
+ poppler/UTF8.h | 14 ++++++++++++++
+ 2 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 1614ab3036cf25c9b94967163996678d386ce0ac
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 1 16:32:55 2008 +0200
+
+ Do not limit CharCodeToUnicodeString to 8 characters
+
+ poppler/Annot.cc | 10 ++++----
+ poppler/CharCodeToUnicode.cc | 37 ++++++++++++++++++++---------------
+ poppler/CharCodeToUnicode.h | 2 +-
+ poppler/Gfx.cc | 8 +++---
+ poppler/GfxFont.cc | 43 +++++++++++++++++++++++------------------
+ poppler/GfxFont.h | 6 ++--
+ poppler/PSOutputDev.cc | 4 +-
+ 7 files changed, 60 insertions(+), 50 deletions(-)
+
+commit bf95c6970dacaa62512de858cf60ff6cf0c1bf7c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 1 00:07:11 2008 +0200
+
+ [Qt] Fix leak when calling Poppler::Document::scanForFonts
+
+ qt/poppler-document.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d21d7271fc74ab78cd157549138d0027cf179471
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 31 23:57:31 2008 +0200
+
+ Make sure file exists before printing it
+
+ utils/HtmlOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0480a788c0f25af1bc09360b599debb37f831e10
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue May 27 23:20:32 2008 +0200
+
+ require gthread-2.0
+
+ cmake/modules/FindGTK.cmake | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 2e40ef652eb9fca7fe947acb2adfecc96ad3c50e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 26 22:13:38 2008 +0200
+
+ Do not shadow a paramer with a local variable name
+
+ qt4/src/poppler-page.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1fd856aa1fb48869111e5b86f263bfd94fa7af17
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 26 20:52:53 2008 +0200
+
+ Do not leak tSplash if transpGroupStack->blendingColorSpace is NULL
+
+ poppler/SplashOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 492209ec8648342a3a5447611f3f1ce63b63e8e9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 26 20:51:06 2008 +0200
+
+ Move variables only used inside the loop inside the loop, fix delete of uninitialized data due to my previous patch
+
+ poppler/Page.cc | 16 ++++++----------
+ 1 files changed, 6 insertions(+), 10 deletions(-)
+
+commit 79ab8cceb318f3bb5ebad431824e3ae593aea340
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 26 20:38:59 2008 +0200
+
+ Do not leak memory if data_out is NULL
+
+ poppler/Page.cc | 35 ++++++++++++++++++-----------------
+ 1 files changed, 18 insertions(+), 17 deletions(-)
+
+commit f44c33344d4af31ee008826179bcd92db445f35a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun May 25 19:16:12 2008 +0200
+
+ [glib] Init glib threads in demo app as required by g_timer
+
+ configure.ac | 4 ++--
+ glib/demo/main.c | 4 ++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 58d5b7b9ab9ac245481299c4765f3bd305580d2e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 21 22:18:29 2008 +0200
+
+ [Qt4] Fix text() method
+
+ I'm not sure this is the real and correct fix, but it works more than previous code so it's and improvement
+
+ qt4/src/poppler-page.cc | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+commit e3e4113c73128f49f99289b592446d4382b5d65c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 12 15:39:43 2008 +0200
+
+ Add getters to some TextBlock members.
+
+ Needed by some reader using poppler internals, bad you!
+
+ poppler/TextOutputDev.h | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit ff699e64bd1de78915aad4ddb79d6f529aef2b87
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 11 23:44:50 2008 +0200
+
+ Check the OC we found exists before using it
+
+ Fixes crash http://bugs.freedesktop.org/show_bug.cgi?id=15899
+
+ poppler/OptionalContent.cc | 33 ++++++++++++++++++---------------
+ 1 files changed, 18 insertions(+), 15 deletions(-)
+
+commit ac26ba5148b99a03a56e37ba201ad420b8619943
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 9 20:17:37 2008 +0200
+
+ Do not crash on unlock with wrong password
+
+ qt/poppler-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 19ec5a531cb03a7bee1cfcc9c7d5c4390fbd069d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu May 8 23:15:58 2008 +0200
+
+ Fix build with --enable-fixedpoint
+
+ splash/Splash.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 1cf5f0fda542efef575a123622637d81b9c42053
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 7 18:49:28 2008 +0200
+
+ [Qt] Fix Document::unlock
+
+ qt/poppler-document.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit b5041924eb023cc095f2445935ff713cf65dacce
+Author: Pino Toscano <pino@kde.org>
+Date: Wed May 7 16:44:03 2008 +0200
+
+ do not delete the GooString owned by an Object
+
+ poppler/Annot.cc | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 546a7b700862db00240de9fd50bdba1dd347765b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 4 15:26:26 2008 +0200
+
+ Fix leaks on error conditions
+
+ poppler/Annot.cc | 6 ++++++
+ poppler/ArthurOutputDev.cc | 1 +
+ poppler/JBIG2Stream.cc | 1 +
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 914f1b1d814ab3d958aa0ca21ad73ef5aed20b89
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 3 18:21:28 2008 +0200
+
+ A widget annot does not always belong to a form, so check before accessing the widget member
+
+ poppler/Annot.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c907e41ab18dda10cd3c9789bd0e7fe71b6402a8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 30 00:42:34 2008 +0200
+
+ findSegment can return NULL check for it
+
+ poppler/JBIG2Stream.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 8b7f29b577bca3295e99fea4a5cf4a6bb7ba2617
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 30 00:26:28 2008 +0200
+
+ new[] implies delete[]
+
+ poppler/ABWOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 926c13825d5f7364286975db8ffa507b92f4b3ab
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:44:51 2008 +0200
+
+ add lost return when adding kees patch
+
+ poppler/Object.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ba9283f6bc78e97006e52ef5de20c958ee9e1a37
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:42:00 2008 +0200
+
+ make the function static
+
+ utils/pdftoppm.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 931a8272f556ba8a35342f0c5bf53bdb57ea7a31
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:41:31 2008 +0200
+
+ make the variable static
+
+ utils/pdftoabw.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1887d2910d2006c7fc3ecc95db0150f1537e9d0a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:35:17 2008 +0200
+
+ constify some static arrays
+
+ poppler/CompactFontTables.h | 2 +-
+ poppler/Decrypt.cc | 8 ++++----
+ poppler/Function.cc | 2 +-
+ poppler/GfxFont.cc | 6 +++---
+ poppler/GfxState.cc | 4 ++--
+ poppler/JBIG2Stream.cc | 10 +++++-----
+ poppler/JPXStream.cc | 4 ++--
+ poppler/Lexer.cc | 2 +-
+ poppler/PSOutputDev.cc | 6 +++---
+ poppler/PSTokenizer.cc | 2 +-
+ poppler/SplashOutputDev.cc | 2 +-
+ poppler/Stream-CCITT.h | 12 ++++++------
+ poppler/Stream.cc | 10 +++++-----
+ poppler/UnicodeTypeTable.cc | 2 +-
+ 14 files changed, 36 insertions(+), 36 deletions(-)
+
+commit 51140e2d9490696d716f77d3225da0bfdfc212b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:14:59 2008 +0200
+
+ more static markers
+
+ poppler/Annot.cc | 2 +-
+ poppler/DCTStream.cc | 2 +-
+ poppler/Object.cc | 2 +-
+ poppler/SplashOutputDev.cc | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 893703cb9eee879f728db329f7ee1fc19e7f980e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:03:51 2008 +0200
+
+ add static
+
+ poppler/XRef.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7333bc913111e56ee241b7ef2bf6e9fea68b7da2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 23:01:13 2008 +0200
+
+ add static
+
+ poppler/JBIG2Stream.cc | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+commit 1ea36507f9c9f163b6772268046e7560d0c00dbc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 22:47:19 2008 +0200
+
+ make findModifier static
+
+ poppler/GlobalParams.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit be9961571dbfabb982e6f69abd3bbc98fa971864
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 21:48:09 2008 +0200
+
+ make variables not used outside static
+
+ utils/pdftohtml.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b157064a85350da6ea9c4f46e965e45ebc59d227
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 21:43:23 2008 +0200
+
+ constify setPSPaperSize
+
+ utils/pdftops.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ee57ead8a6f34fa8de044399e5912395e0f3a425
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 21:37:57 2008 +0200
+
+ constify argDesc arrays
+
+ Gives me binaries 2KB smaller (in total) in release build
+
+ utils/parseargs.c | 18 +++++++++---------
+ utils/parseargs.h | 4 ++--
+ utils/pdffonts.cc | 2 +-
+ utils/pdfimages.cc | 2 +-
+ utils/pdfinfo.cc | 2 +-
+ utils/pdftoabw.cc | 2 +-
+ utils/pdftohtml.cc | 2 +-
+ utils/pdftoppm.cc | 2 +-
+ utils/pdftops.cc | 2 +-
+ utils/pdftotext.cc | 2 +-
+ 10 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 9f93d9eb464877e0d23dcf205295da9162f03253
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 29 20:45:01 2008 +0200
+
+ make psOpNames static
+
+ Makes my release build 64 bytes smaller
+
+ poppler/Function.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 29e3e779c68371b7c4aadcf68ee0712046f39c6d
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 23:47:01 2008 +0200
+
+ remember to call the base implementation here
+
+ qt4/demos/optcontent.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit a188f3cd36775d78ace5b5d62c8ab7c059b3b2b1
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 23:42:09 2008 +0200
+
+ reset the current page to 0, when closing a document
+
+ qt4/demos/viewer.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7eca6da6436ffc1c41cfed1a07be4dafa1172463
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 23:41:45 2008 +0200
+
+ no need to manually disconnect from the model, as it will be deleted by the document anyway
+
+ qt4/demos/optcontent.cpp | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6cddda7f3c3b8ddb95e6aba1b234a27c4454c23d
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 22:41:59 2008 +0200
+
+ sync updateFont() with SplashOutputDev
+
+ poppler/ArthurOutputDev.cc | 75 ++++++++++++++++++++++++++++++++++---------
+ 1 files changed, 59 insertions(+), 16 deletions(-)
+
+commit ddc7c1f8c24762bae615e7dec92e92a58c827478
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 18:12:51 2008 +0200
+
+ construct AnnotPolygon for Polygon and PolyLine annotations
+
+ poppler/Annot.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f9c7e8037b7165b6271ce7aea0d315053c4d66a5
+Merge: 59d33d8 f5fec4f
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 18:09:59 2008 +0200
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 59d33d8e99673f73ccf2ad9a62bd25fca51f0eb8
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 17:56:42 2008 +0200
+
+ use the base implementation to update all the states
+
+ poppler/ArthurOutputDev.cc | 11 +----------
+ 1 files changed, 1 insertions(+), 10 deletions(-)
+
+commit 45d2a9529bf241554c59437118cb8c705554dc27
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 17:55:39 2008 +0200
+
+ Set the font antialiasing from the painter settings, instead of the global settings.
+
+ poppler/ArthurOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5faa72fd70e0d85268e807a8b870d80dda9189a9
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 26 17:53:28 2008 +0200
+
+ Get the font and painter matrices, and reenable the font drawing.
+
+ poppler/ArthurOutputDev.cc | 28 +++++++++++++++++++++-------
+ 1 files changed, 21 insertions(+), 7 deletions(-)
+
+commit f5fec4fdedd8d316b19968545e447e2036a1bb47
+Author: Kees Cook <kees@outflux.net>
+Date: Wed Apr 23 19:53:03 2008 +0200
+
+ provide type-checking for union pointer accesses
+
+ poppler/Object.h | 68 ++++++++++++++++++++++++++++++++++-------------------
+ 1 files changed, 43 insertions(+), 25 deletions(-)
+
+commit a567c921ce538616f4ba0b7933086ef5a8ab0f55
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Apr 22 23:09:10 2008 +0200
+
+ Little change to avoid AnnotWidget crashing when they aren't related to FormWidgets.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+commit 73798c95b8a4c0504e9246e6f73fd31f812ad6fa
+Author: Albert Astals Cid <tsdgeos@bluebox.(none)>
+Date: Mon Apr 21 19:56:52 2008 +0200
+
+ Link to pthread when needed
+
+ Should fix bug 15625
+
+ configure.ac | 2 +
+ m4/acx_pthread.m4 | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Makefile.am | 4 +
+ 3 files changed, 286 insertions(+), 0 deletions(-)
+
+commit 6c248bdad77235a45402d9693a0b822cc208b6b9
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 20 18:32:59 2008 +0200
+
+ the dtor should be virtual
+
+ qt4/src/poppler-converter-private.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 68dba1a452ca70add5b05ab8e2adab838bc2cb73
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 20 16:21:10 2008 +0200
+
+ if ncand is a Guint cand should be one too
+
+ poppler/CMap.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0b91eb19f5a3d07b625ee5188f1fcb4b4b1544ea
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 20 16:17:50 2008 +0200
+
+ Unused var--
+
+ poppler/GfxFont.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1ed3cc40987b691319fd9f1a30296d80de5732fd
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Apr 16 15:45:45 2008 +0200
+
+ fix border style conversion
+
+ qt4/src/poppler-page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7c8feb4e3627bde2052a7e536d2d49d1cbbce8ee
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 15 21:57:31 2008 +0200
+
+ Hack to "support" 16 bits images
+
+ Everywhere we assume a component fits in 8 bits, with this hack
+ we treat 16 bit images as 8 bit ones until it's fixed correctly.
+ Fixes http://bugs.kde.org/show_bug.cgi?id=158165
+
+ poppler/GfxState.cc | 6 ++++++
+ poppler/Stream.cc | 9 +++++++++
+ 2 files changed, 15 insertions(+), 0 deletions(-)
+
+commit f338a9ded5d42dd65853c5c7bbe27f6724096416
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 21:41:51 2008 +0200
+
+ [Qt4] convert the sound annotations
+
+ qt4/src/poppler-page.cc | 16 ++++++++++++++--
+ 1 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 733d51fca04ee682fed2242f868edd545f3755fa
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 21:38:25 2008 +0200
+
+ [Qt4] First version of a SoundAnnotation.
+
+ qt4/src/poppler-annotation.cc | 87 +++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-annotation.h | 30 ++++++++++++++-
+ 2 files changed, 116 insertions(+), 1 deletions(-)
+
+commit feb1ea091111bd7292879c465590acfd7671c876
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 21:36:26 2008 +0200
+
+ First version of AnnotSound.
+
+ poppler/Annot.cc | 37 ++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 26 ++++++++++++++++++++++++++
+ 2 files changed, 62 insertions(+), 1 deletions(-)
+
+commit ec2cf81edf1b2c6707de4d30316ff5f5e24534d4
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 18:31:21 2008 +0200
+
+ [Qt4] convert the file attachment annotations
+
+ qt4/src/poppler-page.cc | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 9fa2e96c96d365ae67859545ebd635d726784fca
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 18:29:00 2008 +0200
+
+ [Qt4] Initial version of FileAttachmentAnnotation
+
+ qt4/src/poppler-annotation.cc | 88 +++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-annotation.h | 29 +++++++++++++-
+ 2 files changed, 116 insertions(+), 1 deletions(-)
+
+commit 5899aff11f94e707654574e830e0757b1df558d4
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 10:50:39 2008 +0200
+
+ [Qt4] Read the annotations from the core, instead of own parsing.
+
+ Almost all the data are converted correctly, the results seem to be the same.
+ Added TODOs in the few parts (not essential) I was not able to figure out how to convert, yet.
+ Covert also the Caret annotations.
+
+ qt4/src/poppler-annotation-helper.h | 2 +-
+ qt4/src/poppler-page.cc | 851 ++++++++++++++++-------------------
+ 2 files changed, 393 insertions(+), 460 deletions(-)
+
+commit 40a12793c5ccea206d79e0c17e2f2d0cf74bb4f3
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 02:21:55 2008 +0200
+
+ add getters for the AnnotPolygon properties
+
+ poppler/Annot.h | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 9311f75d4c3da991efb8afd00701a0ce1cbae1b0
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Apr 13 01:52:36 2008 +0200
+
+ Almost full AnnotPolygon support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 37 ++++++++++++++++++++
+ 2 files changed, 136 insertions(+), 0 deletions(-)
+
+commit 01aa052ed761a4ada471d196985825986bb58627
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Apr 13 01:13:49 2008 +0200
+
+ Extend AnnotPath behaviour to include cooordinate array parsing.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 96 +++++++++++++++++++++++++++++------------------------
+ poppler/Annot.h | 4 ++-
+ 2 files changed, 55 insertions(+), 45 deletions(-)
+
+commit ca52830e9519ae7b778f98e5c2547daef7da5f09
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Apr 13 00:54:13 2008 +0200
+
+ Added OptionalContent support to Annots.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 9 +++------
+ poppler/Annot.h | 5 +++--
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+commit 4b87196b7829c87d15af4e8b4138ca97548fb519
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 00:18:24 2008 +0200
+
+ Isolate the embedded file reading logic into a new EmbFile constructor.
+
+ This way, it can be shared and reused in various places (Catalog, AnnotFileAttachment, etc).
+
+ poppler/Catalog.cc | 205 ++++++++++++++++++++++++++++------------------------
+ poppler/Catalog.h | 1 +
+ 2 files changed, 112 insertions(+), 94 deletions(-)
+
+commit 45b407e51905948690065749085a4af1cbb29a8e
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 13 00:14:38 2008 +0200
+
+ correctly get the FileSpec dictionary
+
+ poppler/Annot.cc | 4 +++-
+ poppler/Annot.h | 2 +-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit c3aa3a97d9c553ea7976741d798901352fb5381c
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 12 22:45:57 2008 +0200
+
+ properly initialize an AnnotPath
+
+ poppler/Annot.cc | 9 ++-------
+ 1 files changed, 2 insertions(+), 7 deletions(-)
+
+commit a3406fb2ace1390db1c181823a7bfc66c9174d98
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 12 22:40:42 2008 +0200
+
+ properly dispose the memory of the ink lists
+
+ poppler/Annot.cc | 13 ++++++++++++-
+ poppler/Annot.h | 1 +
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+commit 0dad70e2d12e8b587cab8ce2d914c81c6897a1d1
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 12 22:15:35 2008 +0200
+
+ make AnnotInk working.
+
+ - get the point indexes in the correct way
+ - dispose with free what you allocate with malloc
+ - fix logic when checking for an even number of points
+
+ poppler/Annot.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 77404e24ea1e175fc9b55097dc5b35cc34760659
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 12 21:08:54 2008 +0200
+
+ a length is an int
+
+ poppler/Annot.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bc2b2ffd2144f951c311e968fba4bc50b7c43ff3
+Merge: cd5afe6 bacc1dd
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Apr 12 17:40:49 2008 +0200
+
+ Fixed merging conflict.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+commit cd5afe6d9eca687ee224ff7680a8cba28d81a36d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 12 00:44:08 2008 +0200
+
+ Do not take into account Colorspace resource subdictionary for image XObjects
+
+ Fixes bug 15125
+ The motivation under that change is on section 4.5.2 of the spec:
+ Certain objects, such as image XObjects, specify a
+ color space as an explicit parameter, often associated with the key ColorSpace.
+ In this case, the color space array or name is always defined directly as a PDF
+ object, not by an entry in the ColorSpace resource subdictionary. This conven-
+ tion also applies when color spaces are defined in terms of other color spaces.
+
+ poppler/Gfx.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bacc1dd9f37ff19c5e54878a5b08e7d734584bbf
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 12 17:20:09 2008 +0200
+
+ Read the "in reply to" reference as such, without reading the associated annotation dictionary.
+
+ poppler/Annot.cc | 10 ++++------
+ poppler/Annot.h | 4 ++--
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+commit ffe09454a0948a6107bcc38f23ba2068151c547d
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Apr 12 17:17:59 2008 +0200
+
+ Initial Annot3D parsing a few general improvements.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++---
+ poppler/Annot.h | 84 +++++++++++++++++++++++++++++-----
+ 2 files changed, 193 insertions(+), 21 deletions(-)
+
+commit 8757c577241dda31bc59c7d1c208c159ad428877
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Apr 12 10:38:07 2008 +0200
+
+ AnnotFileAttachment support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 38 ++++++++++++++++++++++++++++++++++++--
+ poppler/Annot.h | 25 +++++++++++++++++++++++++
+ 2 files changed, 61 insertions(+), 2 deletions(-)
+
+commit 36989658149fc9e5e8a049ce070a102f35b7bddc
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Apr 12 09:55:26 2008 +0200
+
+ AnnotInk support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 45 +++++++++++++++++++++
+ 2 files changed, 158 insertions(+), 0 deletions(-)
+
+commit 464b171d0e9b989196c287f2ee4dfbbc14212aa9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 12 00:44:08 2008 +0200
+
+ Do not take into account Colorspace resource subdictionary for image XObjects
+
+ Fixes bug 15125
+ The motivation under that change is on section 4.5.2 of the spec:
+ Certain objects, such as image XObjects, specify a
+ color space as an explicit parameter, often associated with the key ColorSpace.
+ In this case, the color space array or name is always defined directly as a PDF
+ object, not by an entry in the ColorSpace resource subdictionary. This conven-
+ tion also applies when color spaces are defined in terms of other color spaces.
+
+ poppler/Gfx.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 42db4890e8295aaec5a1be12d1414fc0a9048550
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu Mar 27 10:52:22 2008 +0000
+
+ Do not call FT_Done_Face on a live cairo_font_face_t.
+
+ Currently CairoFont calls FT_Done_Face on its deletion, but the FT_Face
+ is usually still in use within cairo. This causes a failure later when
+ cairo tries to create a glyph from its cairo_font_face_t.
+
+ From http://bugs.freedesktop.org/show_bug.cgi?id=15216:
+ ==13745== Invalid read of size 4
+ ==13745== at 0x51BE572: FT_Load_Glyph (ftobjs.c:549)
+ ==13745== by 0x4A24921: _cairo_ft_scaled_glyph_init (cairo-ft-font.c:1922)
+ ==13745== by 0x4A117AB: _cairo_scaled_glyph_lookup
+ (cairo-scaled-font.c:1674)
+ ==13745== by 0x4A12A5A: _cairo_scaled_font_glyph_device_extents
+ (cairo-scaled-font.c:1124)
+ ==13745== by 0x4A21ECD: _cairo_analysis_surface_show_glyphs
+ (cairo-analysis-surface.c:516)
+ ==13745== by 0x4A144DC: _cairo_surface_show_glyphs (cairo-surface.c:2086)
+ ==13745== by 0x4A1FCC8: _cairo_meta_surface_replay_internal
+ (cairo-meta-surface.c:816)
+ ==13745== by 0x4A214B1: _paint_page (cairo-paginated-surface.c:299)
+ ==13745== by 0x4A2171E: _cairo_paginated_surface_show_page
+ (cairo-paginated-surface.c:445)
+ ==13745== by 0x4A14BDF: cairo_surface_show_page (cairo-surface.c:1702)
+ ==13745== by 0x49FF661: cairo_show_page (cairo.c:2155)
+ ==13745== by 0xA267D97:
+ pdf_document_file_exporter_end_page(_EvFileExporter*) (ev-poppler.cc:1753)
+ ==13745== Address 0x55c5630 is 88 bytes inside a block of size 552 free'd
+ ==13745== at 0x402269C: free (vg_replace_malloc.c:326)
+ ==13745== by 0x51B7ABC: ft_free (ftsystem.c:158)
+ ==13745== by 0x51BB319: ft_mem_free (ftutil.c:171)
+ ==13745== by 0x51BC318: destroy_face (ftobjs.c:856)
+ ==13745== by 0x51BC3B2: FT_Done_Face (ftobjs.c:1972)
+ ==13745== by 0x4363704: CairoFont::~CairoFont() (CairoFontEngine.cc:251)
+ ==13745== by 0x436401D: CairoFontEngine::getFont(GfxFont*, XRef*)
+ (CairoFontEngine.cc:335)
+ ==13745== by 0x4366915: CairoOutputDev::updateFont(GfxState*)
+ (CairoOutputDev.cc:318)
+ ==13745== by 0x5093BF1: Gfx::opShowText(Object*, int) (Gfx.cc:3073)
+ ==13745== by 0x508F901: Gfx::execOp(Object*, Object*, int) (Gfx.cc:726)
+ ==13745== by 0x50906FF: Gfx::go(int) (Gfx.cc:594)
+ ==13745== by 0x5090C96: Gfx::display(Object*, int) (Gfx.cc:557)
+
+ The solution is to release the reference to the cairo_font_face_t upon
+ destruction of the CairoFont, and then to release the FT_Face from the
+ destroy notify of the cairo_font_face_t.
+
+ poppler/CairoFontEngine.cc | 19 +++++++++----------
+ 1 files changed, 9 insertions(+), 10 deletions(-)
+
+commit 5f60843824582ece36d806508ec388330ddee854
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Apr 8 00:30:57 2008 +0200
+
+ Added AnnotCoord support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 64 +++++++++++++++++--------------------------------
+ poppler/Annot.h | 69 +++++++++++++++++++++++++-----------------------------
+ 2 files changed, 54 insertions(+), 79 deletions(-)
+
+commit a6f70f465a3e6719d63cefbe3c27bae015be43c1
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 6 13:12:01 2008 +0200
+
+ add getters for the coordinates in an AnnotLine
+
+ poppler/Annot.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 1d83d6edf9a843335e37a4d1e0e0dd71eb23d93b
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 6 12:24:42 2008 +0200
+
+ [Qt4] the caret symbol is an enum value, now
+
+ qt4/src/poppler-annotation.cc | 35 ++++++++++++++++++++++++++++-------
+ qt4/src/poppler-annotation.h | 7 +++++--
+ 2 files changed, 33 insertions(+), 9 deletions(-)
+
+commit 229d991a3258cb9b56f5e00f2deb3c976253cf68
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 6 12:23:04 2008 +0200
+
+ the caret symbol does not seem to allow additional values, so convert it to an enum
+
+ poppler/Annot.cc | 11 +++++++----
+ poppler/Annot.h | 9 +++++++--
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+commit fc24500ddd9182f97d23c46eaafc6be79a6721eb
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Apr 6 11:43:49 2008 +0200
+
+ propetly initialise a couple of members; leak less
+
+ poppler/ArthurOutputDev.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 9409de1e7c5b3770c7ef00c01ee376953dd532a5
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Apr 6 01:38:25 2008 +0200
+
+ Changed AnnotFreeText RD field to the new parseDiffRectangle.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 35 ++---------------------------------
+ 1 files changed, 2 insertions(+), 33 deletions(-)
+
+commit 28c5ee2e9fc2a24d2f2efb3d74d5cf882a106239
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 23:19:33 2008 +0200
+
+ typo fix
+
+ poppler/Annot.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ed02769688466ca72bf35d4223c3822a1245604b
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 19:36:21 2008 +0200
+
+ read the destination of a link annotation
+
+ poppler/Annot.cc | 5 ++++-
+ poppler/Annot.h | 4 ++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+commit ca31bf12a9d70bac88e457f7799e9935aba58640
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 16:48:53 2008 +0200
+
+ variable forgotten in the copy&paste...
+
+ qt4/src/poppler-annotation.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 4168daa141b76e5fcd07d046aca8dac2f3037ff9
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 16:34:12 2008 +0200
+
+ [Qt4] deserialize also CaretAnnotation's
+
+ qt4/src/poppler-annotation.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b55bcc2aa95825863bef23ab96364b350a49949d
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 16:31:31 2008 +0200
+
+ [Qt4] first version of a CaretAnnotation.
+
+ qt4/src/poppler-annotation.cc | 80 +++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-annotation.h | 25 ++++++++++++-
+ 2 files changed, 104 insertions(+), 1 deletions(-)
+
+commit 4c9a02b7e49666efe10fdc16e7a03d8d520b65ec
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 16:01:58 2008 +0200
+
+ First version of AnnotCaret.
+
+ poppler/Annot.cc | 36 +++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 22 ++++++++++++++++++++++
+ 2 files changed, 57 insertions(+), 1 deletions(-)
+
+commit d260fe9e514c667b66969b982119429cc922eb07
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 15:54:29 2008 +0200
+
+ isolate the code for parsing a "difference rectangle" in an own function
+
+ poppler/Annot.cc | 54 +++++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 31 insertions(+), 23 deletions(-)
+
+commit 760833e409c122c0a61f7c87fd3133eebc10b402
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 15:36:43 2008 +0200
+
+ First version of AnnotGeometry.
+
+ poppler/Annot.cc | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 24 +++++++++++++++++
+ 2 files changed, 99 insertions(+), 2 deletions(-)
+
+commit 95d9d2362534c0524ad0448818b2d69b0909d482
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 03:23:00 2008 +0200
+
+ finally, load the QuadPoints correctly
+
+ when checking the validity of the coordinate, do the comparison just with the proper one (either X or Y);
+ free the "point" object after each iteration
+
+ poppler/Annot.cc | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+commit af1ffcbcec1730332d11f8da4a7ddac833b22408
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 02:54:00 2008 +0200
+
+ More robust reading of QuadPoints (reset the allocated memory, use the heap)
+
+ poppler/Annot.cc | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 68fd98d69bac20282665cf6b824da30c3b310f0b
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 02:51:41 2008 +0200
+
+ Really implement AnnotTextMarkup.
+
+ poppler/Annot.cc | 29 +++++++++++++++++++++++++----
+ poppler/Annot.h | 2 +-
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+commit 69a2ecfaf8f8cffd3027db5c3cc88c41413e42f1
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Apr 5 01:38:28 2008 +0200
+
+ Add the Stamp annotation type.
+
+ poppler/Annot.cc | 28 +++++++++++++++++++++++++++-
+ poppler/Annot.h | 20 ++++++++++++++++++++
+ 2 files changed, 47 insertions(+), 1 deletions(-)
+
+commit 97be4332818bcf58461816be995d88926809a4e5
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Fri Apr 4 23:49:12 2008 +0200
+
+ Updated glib bindings.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/demo/annots.c | 32 +++++---------------------------
+ glib/poppler-annot.cc | 27 +++++----------------------
+ glib/poppler-annot.h | 13 +------------
+ 3 files changed, 11 insertions(+), 61 deletions(-)
+
+commit 5caac407cdaf58621ac27e5561b31a995404ccb3
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Fri Apr 4 23:36:46 2008 +0200
+
+ Fixed icon name in AnnotText.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 25 ++++++-------------------
+ poppler/Annot.h | 15 +++------------
+ 2 files changed, 9 insertions(+), 31 deletions(-)
+
+commit 0b714a61383da1b62daf2a60e3f6fcda09b4e9f2
+Author: Adam Batkin <adam@batkin.net>
+Date: Thu Apr 3 20:02:52 2008 +0200
+
+ FindFirstFile returns INVALID_HANDLE_VALUE and not NULL on error
+
+ goo/gfile.cc | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit be765f27cc5430d9bb2a3e113eb245d67c20a376
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Mar 31 12:37:33 2008 +0200
+
+ [glib] Fix a crash in outline demo due to page_num == dest_page_num - 1
+
+ glib/demo/utils.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e991e9ac6fcc0b6928b96fe8326eebcf3cb720ca
+Author: Albert Astals Cid <tsdgeos@localhost.(none)>
+Date: Sat Mar 29 13:25:52 2008 +0100
+
+ Add the export macro
+
+ qt4/src/poppler-page-transition.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit b70ca35dce6da6efdff254c11a63de4f44228278
+Author: Albert Astals Cid <tsdgeos@localhost.(none)>
+Date: Sat Mar 29 00:30:31 2008 +0100
+
+ Duplicate page-transition files on qt4
+
+ qt4/src/CMakeLists.txt | 4 +-
+ qt4/src/Makefile.am | 4 +-
+ qt4/src/poppler-page-transition-private.h | 28 ++++++
+ qt4/src/poppler-page-transition.cc | 95 +++++++++++++++++++
+ qt4/src/poppler-page-transition.h | 146 +++++++++++++++++++++++++++++
+ 5 files changed, 273 insertions(+), 4 deletions(-)
+
+commit b5312785063235cef7584ab6a5d198fb72de0988
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Wed Mar 26 23:56:49 2008 +0100
+
+ Improved glib annot demo.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/demo/annots.c | 314 +++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 289 insertions(+), 25 deletions(-)
+
+commit 7cc8fd70f68d2cdab7ab83a0ecf6c8896c971d62
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 21:03:34 2008 +0100
+
+ remove damn error
+
+ qt4/src/poppler-page.cc.orig | 1317 ------------------------------------------
+ 1 files changed, 0 insertions(+), 1317 deletions(-)
+
+commit 7a47ff3b54678a3de6964d25050e02186484f39a
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 21:00:32 2008 +0100
+
+ [Qt4] Add support for JavaScript links, and create them when present.
+
+ qt4/src/poppler-link.cc | 36 ++
+ qt4/src/poppler-link.h | 32 +-
+ qt4/src/poppler-page.cc | 7 +
+ qt4/src/poppler-page.cc.orig | 1317 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 1391 insertions(+), 1 deletions(-)
+
+commit a6f2c10ee01ee62ae945b50f6b6eae380377fe03
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 20:59:21 2008 +0100
+
+ [Qt4] Read the document-level JavaScript scripts.
+
+ qt4/src/poppler-document.cc | 15 +++++++++++++++
+ qt4/src/poppler-qt4.h | 8 ++++++++
+ 2 files changed, 23 insertions(+), 0 deletions(-)
+
+commit b8a471e55b998836c09c65ff736afdef8ac55189
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 20:56:01 2008 +0100
+
+ Add support for JavaScript actions, and read them when found.
+
+ poppler/Link.cc | 33 +++++++++++++++++++++++++++++++++
+ poppler/Link.h | 23 +++++++++++++++++++++++
+ 2 files changed, 56 insertions(+), 0 deletions(-)
+
+commit 2fd85dc1b8b2ababadfc60e285c08a844737e4bb
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 20:53:42 2008 +0100
+
+ Read the JavaScript codes in the NameTree of the Catalog.
+
+ poppler/Catalog.cc | 39 +++++++++++++++++++++++++++++++++++++++
+ poppler/Catalog.h | 7 +++++++
+ 2 files changed, 46 insertions(+), 0 deletions(-)
+
+commit 312f14f5b7be1f0d62620477222919423c3869e0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 26 20:05:31 2008 +0100
+
+ compile++
+
+ fofi/FoFiBase.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5bd750062e1fb136f77a55d1f35b2d6fabaad1b3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 26 19:42:43 2008 +0100
+
+ update version
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 10d4a8b9aed51902157c04d9deea0e99d829c4f6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 26 19:42:36 2008 +0100
+
+ fill news
+
+ NEWS | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 2069826d61ebd527768b6455689276c0a8288085
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 16:05:06 2008 +0100
+
+ missing break
+
+ qt4/src/poppler-page.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d6a0c6a6803a03f402c2dcde41c6195e951470ba
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Mar 26 15:50:39 2008 +0100
+
+ initialize posterStream to avoid crashing later
+
+ poppler/Movie.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0be811b3ad86b1cb14be94a017e70c65b8e64730
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 25 22:59:22 2008 +0100
+
+ Don't end up in an infinite recursive loop in case resObj dict is the same we are already in
+
+ poppler/FontInfo.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0222c6ceb0fcf1d7c4422691a68a035a558ad614
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 24 17:14:07 2008 +0100
+
+ fix build when using cmake, not sure it's completely ok, but at least i can compile
+
+ CMakeLists.txt | 1 +
+ cmake/modules/FindGTK.cmake | 23 ++++++++++++++++-------
+ config.h.cmake | 3 +++
+ glib/CMakeLists.txt | 17 +++++++++++------
+ glib/poppler-page.cc | 2 +-
+ glib/test-poppler-glib.cc | 2 +-
+ 6 files changed, 33 insertions(+), 15 deletions(-)
+
+commit 3e4164f2db69358adf07596195842dd00458b621
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 24 15:10:31 2008 +0100
+
+ fix some cmake HAVE_foo
+
+ CMakeLists.txt | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 22f615aee488cc363a078330861e80f389f47061
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Mar 23 13:22:07 2008 +0100
+
+ Fixed wrong functions.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/poppler-annot.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cccfe42ed9c53d27cf6a1403ae55bf34a053012d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 19:12:05 2008 +0100
+
+ Fix rm line not to error when no *moc file is present
+
+ qt4/src/Makefile.am | 2 +-
+ qt4/tests/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e60d39ba0e8b9742106a0c9b1385b1c907729c3f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 19:11:17 2008 +0100
+
+ Fix rm line not to error if no *moc file is present
+
+ qt4/demos/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d9d52e622c6b28a9941168bb73839ec335ca7232
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 19:10:40 2008 +0100
+
+ Fix configure to not require gdk when we are on try mode
+
+ configure.ac | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 9b8809298dd16cdbffcc12b6db8e274578934063
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 15:49:02 2008 +0100
+
+ It's really only an error if < 0
+
+ poppler/PDFDoc.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0fb1e697cc4100ce23298141c8b5829273872423
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 15:46:44 2008 +0100
+
+ remove unneeded variable
+
+ poppler/PDFDoc.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 3404cb626ee9b4520d6fe601e07560745a4cb42a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 15:44:50 2008 +0100
+
+ Remove OutStream::reset since noone uses it
+
+ This way we have a fseek less to care about if worked or not
+
+ poppler/Stream.cc | 5 -----
+ poppler/Stream.h | 5 -----
+ qt4/src/poppler-qiodeviceoutstream-private.h | 1 -
+ qt4/src/poppler-qiodeviceoutstream.cc | 5 -----
+ 4 files changed, 0 insertions(+), 16 deletions(-)
+
+commit 066595dd06c930997d5ec65a06c822616af9baa0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 22 15:43:07 2008 +0100
+
+ Check the document stream is seekable when opening it
+
+ Fixes bug 14126
+
+ poppler/PDFDoc.cc | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 23b6475463f8973b5ac83bb21a6b7b6000cc435b
+Author: Ed Avis <eda@waniasset.com>
+Date: Sat Mar 22 13:55:59 2008 +0100
+
+ Check for fseek return values
+
+ fofi/FoFiBase.cc | 14 ++++++++++++--
+ poppler/GfxFont.cc | 12 ++++++++++--
+ 2 files changed, 22 insertions(+), 4 deletions(-)
+
+commit b33bb282e45cf1a083cfbb13603ac465d386c28d
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Fri Mar 21 13:53:21 2008 +0100
+
+ Fixed poppler glib public api.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/poppler-annot.cc | 4 ++--
+ glib/poppler-annot.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 371932f413d570d7784c668f30834d3d92d7aa80
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Mar 20 11:44:32 2008 +0100
+
+ [glib] Remove unused variable.
+
+ glib/poppler-document.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 21fa476ac384256c15a954b708e009f2b336b06f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Mar 20 11:42:32 2008 +0100
+
+ [glib] Do not cache image_dev in poppler page.
+
+ Thanks to Kouhei Sutou who caught the problem.
+
+ glib/poppler-page.cc | 60 ++++++++++++++++++++++++++------------------
+ glib/poppler-private.h | 3 --
+ glib/test-poppler-glib.cc | 9 ++++++-
+ 3 files changed, 43 insertions(+), 29 deletions(-)
+
+commit 22cd70d8fc308fb8b19d36d0172014ba532230fb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 19 21:52:14 2008 +0100
+
+ poppler_annot_markup_get_opacity returns a double so use %f
+
+ glib/demo/annots.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b9a5fd4671638caa91f8a389be278d993391f499
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 19 21:28:49 2008 +0100
+
+ updated by gtk-doc
+
+ glib/reference/tmpl/poppler-action.sgml | 1 +
+ glib/reference/tmpl/poppler.sgml | 3 +++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit b7e0b740578ea1e84ac0ef850b5a03c66b2863e3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 19 21:28:01 2008 +0100
+
+ Fill 0.7.3 news
+
+ NEWS | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 3adaff1dad8127fdd06653cf49196027ad414a08
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 19 21:27:46 2008 +0100
+
+ Bump version to 0.7.3
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 52dd710b63911be2d8c960de0232c497c35ecac8
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Mar 19 18:35:35 2008 +0100
+
+ [glib] Update outline and links demos to the new POPPLER_ACTION_NONE
+
+ glib/demo/utils.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 6a22f0a20df38156c06e8ba10649e0828a1da102
+Author: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr>
+Date: Wed Mar 19 18:32:48 2008 +0100
+
+ [glib] Consider no action as an action of type None instead of Unknown
+
+ glib/poppler-action.cc | 2 +-
+ glib/poppler-action.h | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 185d5818fd546f85934b041d5b0cdcdf1849b1dc
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Mar 18 20:08:21 2008 +0100
+
+ Improve error handling when creating a document
+
+ glib/poppler-document.cc | 40 ++++++++++++++++++++++++++++------------
+ glib/poppler.h | 5 ++++-
+ 2 files changed, 32 insertions(+), 13 deletions(-)
+
+commit 9bba2748985049515bfd9c9b44f26b92fa704078
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Mar 15 01:11:39 2008 +0100
+
+ Some more free
+
+ poppler/OptionalContent.cc | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit bfc308935fa138e27c4d2ad0e1c1cad20eba8e8a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Mar 15 01:05:32 2008 +0100
+
+ Use error instead of printf
+
+ poppler/OptionalContent.cc | 15 ++++++++-------
+ 1 files changed, 8 insertions(+), 7 deletions(-)
+
+commit 998b1523ee653c1585f03b4a580e0d95ba694aca
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Mar 15 01:02:31 2008 +0100
+
+ Some free
+
+ poppler/OptionalContent.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit c65a66a82259f547927cbb918611bcf4a8e264b2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Mar 14 20:29:53 2008 +0100
+
+ xx0 is non exclusive so that should be < not <=
+
+ Fixes several warnings about writes on bad places
+
+ splash/SplashXPathScanner.cc | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit bd2272f3079319d1c05ca93f7fb6eb0a5370b938
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Mar 14 19:52:04 2008 +0100
+
+ Fix "Make sure we don't draw outside the bitmap on Splash::fillGlyph2" when painting with no aa
+
+ Fixes bug 15009
+
+ splash/Splash.cc | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 5bf8d864e68854f0855e07fb67aa124e06c739cd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 22:48:07 2008 +0100
+
+ fix build
+
+ glib/reference/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d0be5c86dcd3310062d820b3515c31e4720af2ca
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 22:40:59 2008 +0100
+
+ Update version to 0.7.2 and fill NEWS
+
+ CMakeLists.txt | 2 +-
+ NEWS | 20 ++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 26 insertions(+), 6 deletions(-)
+
+commit 0b2ecf39572821a99374e6acec7c1bd438911bbc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 22:38:57 2008 +0100
+
+ update soname here too
+
+ glib/CMakeLists.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f5065016b168e4896e2fe774cd22bbd900849b52
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Mar 12 22:06:53 2008 +0100
+
+ Make GDK dependency option for glib bindings
+
+ Fixes bug #13719.
+
+ configure.ac | 45 +++-
+ glib/Makefile.am | 7 +-
+ glib/demo/page.c | 88 ++++++-
+ glib/demo/render.c | 4 +
+ glib/poppler-action.h | 1 -
+ glib/poppler-annot.cc | 26 +-
+ glib/poppler-annot.h | 2 +-
+ glib/poppler-document.h | 2 -
+ glib/poppler-features.h.in | 1 +
+ glib/poppler-page.cc | 661 ++++++++++++++++++++++++++------------------
+ glib/poppler-page.h | 76 +++--
+ glib/poppler.h | 2 +-
+ glib/test-poppler-glib.cc | 2 +-
+ 13 files changed, 593 insertions(+), 324 deletions(-)
+
+commit 46d4fab82332e71d0b68c0a8deeac78f2201ed14
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 20:35:33 2008 +0100
+
+ Increment version of libpoppler and libpoppler-qt4
+
+ CMakeLists.txt | 2 +-
+ poppler/Makefile.am | 2 +-
+ qt4/src/CMakeLists.txt | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 550c1fc73a6d2af65728751fd0b59ccc7110fa8b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 20:34:48 2008 +0100
+
+ Init to false updated field of XRefEntries plus indenting fixes
+
+ poppler/XRef.cc | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit 6a671686c6265ecdb4c48f04392de9c56d4e0936
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed Mar 12 21:43:12 2008 +1030
+
+ Fix regression in cairo output when transforming ctm
+
+ The commit:
+ ec01926e5a9dc16e200060497c43e79a1623698d "Avoid setting a singular ctm"
+ introduced a regression in the output when using a ctm.
+
+ The check for an invertable matrix had the side effect of inverting
+ the matrix. Instead, make a copy of the matrix before testing if it is
+ invertable.
+
+ poppler/CairoOutputDev.cc | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 0b2c3bb25c908b07e760d824dbfe93c6051812aa
+Merge: 362fe01 9c472f7
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Wed Mar 12 00:23:58 2008 +0100
+
+ Merge branch 'master' of ssh://inigomartinez@git.freedesktop.org/git/poppler/poppler
+
+commit 362fe013c0d96698b52d70cf5226cddca7fe52d4
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Wed Mar 12 00:07:12 2008 +0100
+
+ Enabled back the AnnotWidget support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9c472f76d2462d0e775c851fdbac6ca2bc9812ea
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 12 00:00:20 2008 +0100
+
+ cmake build
+
+ glib/demo/CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 821858f5c36786955d9475044bfee57f5060ad2f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 11 23:58:05 2008 +0100
+
+ Return char bounding box instead of edge, it's much more useful for character positioning
+
+ qt4/src/poppler-page.cc | 8 ++++++--
+ qt4/src/poppler-private.h | 3 +--
+ qt4/src/poppler-qt4.h | 6 ++----
+ qt4/src/poppler-textbox.cc | 4 ++--
+ 4 files changed, 11 insertions(+), 10 deletions(-)
+
+commit d7e642732ced592362d9787bddadb7a110dcc5a5
+Merge: 3642f0c 2d6c605
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Mar 11 23:41:59 2008 +0100
+
+ Merge branch 'master' of ssh://inigomartinez@git.freedesktop.org/git/poppler/poppler
+
+commit 3642f0c48bc49cd4d698e769544c1d8604c6482f
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Mar 11 23:13:33 2008 +0100
+
+ glib annots demo.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/annots.c | 468 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/annots.h | 31 ++++
+ glib/demo/main.c | 4 +-
+ 4 files changed, 504 insertions(+), 1 deletions(-)
+
+commit 2d6c60537317bd3ac9e0582e0da09e7365729097
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Mar 11 22:54:44 2008 +0100
+
+ For now we cannot handle MovieLink's, so comment them out.
+
+ qt4/src/poppler-annotation.cc | 2 ++
+ qt4/src/poppler-link.cc | 4 ++++
+ qt4/src/poppler-link.h | 2 ++
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+
+commit a354f7198c493990613a1db131c662ec27948863
+Author: Hugo Mercier <hmercier31@gmail.com>
+Date: Tue Mar 11 22:49:00 2008 +0100
+
+ Initial Movie support (2)
+
+ Now with the forgotten files
+
+ poppler/Movie.cc | 443 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Movie.h | 177 ++++++++++++++++++++++
+ 2 files changed, 620 insertions(+), 0 deletions(-)
+
+commit 43e5dd941d4bc35c4eebbad66c13235639e0c1a0
+Merge: aab1768 4fdd254
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 11 22:31:22 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit 4fdd254370ea6055e95c8ebee51b69e06c501714
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Mar 11 22:31:00 2008 +0100
+
+ Fix build
+
+ glib/poppler-page.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit aab17684dc3f21ff2b1ee6eacdc0c565d368df78
+Author: Hugo Mercier <hmercier31@gmail.com>
+Date: Tue Mar 11 22:28:28 2008 +0100
+
+ Initial Movie support
+
+ CMakeLists.txt | 2 +
+ poppler/Annot.cc | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 125 ++++++++++++++++++++
+ poppler/Link.cc | 108 +++++++++++++++---
+ poppler/Link.h | 64 ++++++++++-
+ poppler/Makefile.am | 2 +
+ 6 files changed, 591 insertions(+), 26 deletions(-)
+
+commit 13a0d2390b9e4684af070c213f385485715353df
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 11 22:27:38 2008 +0100
+
+ Add poppler-annot to the cmake build system
+
+ glib/CMakeLists.txt | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 19f0e3b40bce4d8157d8c8bd04eaf6bacbef38b8
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Mar 11 22:09:04 2008 +0100
+
+ Add preliminary annotations support in the glib frontend
+
+ glib/Makefile.am | 2 +
+ glib/poppler-annot.cc | 776 ++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-annot.h | 181 +++++++++++
+ glib/poppler-page.cc | 166 +++++++++++
+ glib/poppler-page.h | 15 +
+ glib/poppler-private.h | 5 +-
+ glib/poppler.h | 7 +
+ 7 files changed, 1151 insertions(+), 1 deletions(-)
+
+commit 6fa3ab20fee311b4aff92be18870fd0e1730a81f
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Tue Mar 11 18:44:27 2008 +0100
+
+ Changed AnnotMarkup inheritance
+
+ poppler/Annot.cc | 9 +++++----
+ poppler/Annot.h | 10 +++++-----
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+commit 3111cfe2ccb32f9680baaad0c3f0678dd5969f8b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 10 22:12:36 2008 +0100
+
+ And free the memory
+
+ qt4/tests/test-poppler-qt4.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 58f88c23402ac2e678dc655f64d93d89bb1812be
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 10 22:08:43 2008 +0100
+
+ Add the -textRects option to the test app so we can check text rects are correct
+
+ qt4/tests/test-poppler-qt4.cpp | 45 +++++++++++++++++++++++++++++++++++----
+ 1 files changed, 40 insertions(+), 5 deletions(-)
+
+commit 94ceb3cae79dc7786fa59fd889a87160780ed5df
+Merge: 0f9e843 35f34bd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 9 23:34:11 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit 0f9e84302ac2108f05bdbb10e7e57ae19ad1e9f3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 9 23:33:11 2008 +0100
+
+ Do not force default values to fontconfig patterns as fontconfig already fills in default values for us
+
+ Fixes bug 14883
+
+ poppler/GlobalParams.cc | 17 +++++++++--------
+ 1 files changed, 9 insertions(+), 8 deletions(-)
+
+commit 35f34bd44c74eeb76a58b30acfbb0303d7285f06
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Mar 9 17:38:54 2008 +0100
+
+ Fix build when compiling without cairo support
+
+ glib/demo/images.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 32637db19dd80a9b8452f86eb677b10e77290627
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 9 00:57:08 2008 +0100
+
+ proper lib64 Qt detection
+
+ Fixes bug 14583
+
+ m4/qt.m4 | 15 ++++++++++++---
+ 1 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 65a88a95a5c54c890048e8a986df361585d601dd
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Mar 8 03:11:36 2008 +0100
+
+ Provide the mime type for an embedded file, if known.
+
+ Adapt the unit test for that.
+
+ qt4/src/poppler-embeddedfile.cc | 5 +++++
+ qt4/src/poppler-qt4.h | 5 +++++
+ qt4/tests/check_attachments.cpp | 7 +++++++
+ 3 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 23da27a229c8b3cc2a0a0dd6354c40723934390c
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Mar 8 03:10:58 2008 +0100
+
+ Optionally read the mimetype for the embedded files.
+
+ poppler/Catalog.cc | 17 +++++++++--------
+ poppler/Catalog.h | 7 ++++++-
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+commit 42c254b978c61e2ccfda083dfeffec9fc35a5fe7
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Mar 3 16:56:09 2008 +0100
+
+ be safe about out-of-range values
+
+ qt4/src/poppler-textbox.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5db75df77938eb7620867d0618058be52ed2d3cb
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Mar 3 16:53:39 2008 +0100
+
+ initialize nicely
+
+ qt4/src/poppler-private.h | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 3ad0ab7e4abd37528284269c69be3cdfb8d31d2e
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Mar 3 16:49:23 2008 +0100
+
+ apidox
+
+ qt4/src/poppler-link.h | 17 +++++++++++++++++
+ qt4/src/poppler-qt4.h | 23 ++++++++++++++++++++++-
+ 2 files changed, 39 insertions(+), 1 deletions(-)
+
+commit ec01926e5a9dc16e200060497c43e79a1623698d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Mar 2 20:15:20 2008 -0500
+
+ Avoid setting a singular ctm
+
+ Ignoring singular ctm's gives a better result than having
+ our cairo context error and turn off. Related to #14398.
+
+ poppler/CairoOutputDev.cc | 14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 4882d7a118b93fdb5c441d70757e485be7ee25d7
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 28 15:12:23 2008 +0100
+
+ printf -> qDebug
+
+ qt4/src/poppler-optcontent.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 31ce4049bf12c2716be7ec0fb8eda502d989f66e
+Author: Brad Hards <bradh@saxicola.cuneata.net>
+Date: Thu Feb 28 22:09:30 2008 +1100
+
+ Respect PageMode for optional content and embedded files.
+
+ This makes the PDF 1.7 spec open with the embedded files showing.
+
+ qt4/demos/embeddedfiles.cpp | 7 +++++++
+ qt4/demos/embeddedfiles.h | 1 +
+ qt4/demos/optcontent.cpp | 8 ++++++++
+ qt4/demos/optcontent.h | 1 +
+ 4 files changed, 17 insertions(+), 0 deletions(-)
+
+commit ff938c431799d49325c0f46f1e6cbe1033993a83
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 23:12:53 2008 +0100
+
+ do not forget to distribute GlobalParamsWin.cc next time
+
+ poppler/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 277382b8186d137a9f2a62bc2d22e9f0cda7d923
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 22:56:33 2008 +0100
+
+ fix typo
+
+ glib/demo/images.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5b2f8f21fca63508570a0c77c6f7221a322e6e57
+Merge: 7e65118 4254f12
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 22:10:12 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 7e651186f483976f9833de245b6c7add38e77a16
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 22:03:17 2008 +0100
+
+ Properly enable/disable the contents when their parents are changed.
+
+ Now, the children maintain the "checked state" they had, when their parent is unchecked;
+ but, they are really disabled, both in the possibility to be checked and in the drawing of their associated content [applying the same to their children, and so on].
+
+ qt4/src/poppler-optcontent-private.h | 8 ++++++-
+ qt4/src/poppler-optcontent.cc | 37 +++++++++++++++++++++++++++++----
+ 2 files changed, 39 insertions(+), 6 deletions(-)
+
+commit 4254f1237ebed09b8e1c85f935a20bde3d8f36ff
+Merge: ed6c0c2 0569ae7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 20:44:27 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit 8d384c06f96ba8cb3e73c275b3c708c64da4595d
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 20:39:09 2008 +0100
+
+ small header cleanup
+
+ qt4/src/poppler-optcontent-private.h | 9 +++++++--
+ qt4/src/poppler-optcontent.cc | 7 ++++---
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+commit ed6c0c260837a0025279765ef7778b83d6ee2209
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 20:43:45 2008 +0100
+
+ fix build and distcheck with autools
+
+ qt4/demos/Makefile.am | 3 +++
+ qt4/src/Makefile.am | 5 ++++-
+ qt4/tests/Makefile.am | 3 +++
+ 3 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 344d55539b1b6bcabec609fd828db372a07491b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 20:43:13 2008 +0100
+
+ fill the NEWS for 0.7.1
+
+ NEWS | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 1c47633ba782021978fa34d41a4ab0badf3af9d3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 27 20:42:55 2008 +0100
+
+ Increase version number to 0.7.1
+
+ CMakeLists.txt | 2 +-
+ configure.ac | 2 +-
+ msvc/config.h | 6 +++---
+ qt4/src/Doxyfile | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 0569ae76b6af1723b4606af189242a23199f387d
+Merge: f395531 d8eba8c
+Author: Brad Hards <bradh@kde.org>
+Date: Thu Feb 28 06:26:09 2008 +1100
+
+ Merge branch 'master' of ssh://bradh@git.freedesktop.org/git/poppler/poppler
+
+commit d8eba8c10834116b4f0f295375805172f5216993
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 19:07:46 2008 +0100
+
+ export the OptContentModel
+
+ qt4/src/poppler-optcontent.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 0445e64a4124af7c1b84673f237022e133eb8542
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 19:04:03 2008 +0100
+
+ make only the Document able to create OptContentsModel's
+
+ qt4/src/poppler-optcontent.h | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit c965437b67a4f97ee8365a217bd10406fba3767a
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 18:58:31 2008 +0100
+
+ setRootNode() is private (and unused) API
+
+ qt4/src/poppler-optcontent-private.h | 2 ++
+ qt4/src/poppler-optcontent.cc | 8 ++++----
+ qt4/src/poppler-optcontent.h | 4 ----
+ 3 files changed, 6 insertions(+), 8 deletions(-)
+
+commit e293bfc384e2dfc4ef04582053ce18d8c0bcb7b3
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 18:50:35 2008 +0100
+
+ small cleanup
+
+ qt4/src/poppler-optcontent.cc | 11 ++++-------
+ 1 files changed, 4 insertions(+), 7 deletions(-)
+
+commit f11aa0008585e845ce509172d76f72f941be497d
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 18:44:09 2008 +0100
+
+ adapt the tests to the new layout of the contents model
+
+ qt4/tests/check_optcontent.cpp | 66 ++++++++++++++--------------------------
+ 1 files changed, 23 insertions(+), 43 deletions(-)
+
+commit 4a324484b5c77ddc348746e7bcf6051ade28e389
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 18:04:52 2008 +0100
+
+ free some objects (thus leak less)
+
+ poppler/Gfx.cc | 2 ++
+ poppler/OptionalContent.cc | 2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 0f4e7791ab6884072a1aee56e9cec212d8cea263
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 15:58:21 2008 +0100
+
+ ignore any generated .moc here
+
+ qt4/src/.gitignore | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 136ae44f155b17d9e8b041b67f75531d8544337c
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 15:56:09 2008 +0100
+
+ keep track of the items changed when toggling an item, so we can update them properly
+
+ qt4/src/poppler-optcontent-private.h | 4 +-
+ qt4/src/poppler-optcontent.cc | 38 ++++++++++++++++++++++++++-------
+ 2 files changed, 32 insertions(+), 10 deletions(-)
+
+commit b73e2afef7e5e1b68d82a10c94bca3c201c5f8b3
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 15:52:06 2008 +0100
+
+ fix indexFromItem once again, and make parent() call it with the right node
+
+ qt4/src/poppler-optcontent-private.h | 2 +-
+ qt4/src/poppler-optcontent.cc | 19 +++++++++----------
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 803787f763578320aa5f405ed49c64e6b924bad3
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 15:30:18 2008 +0100
+
+ compile with the autotools
+
+ (second patch I forgot to apply with the first)
+
+ qt4/src/Makefile.am | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 0b527a8ed62677bb09df4587f072a310c2959750
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 14:34:13 2008 +0100
+
+ Extract the OptContentItem -> QModelIndex creation in an own function.
+
+ qt4/src/poppler-optcontent-private.h | 1 +
+ qt4/src/poppler-optcontent.cc | 7 ++++++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit c94d6cc95c6838f31e27832cb3090389bf4d8227
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 14:30:26 2008 +0100
+
+ Make index(), data() and setData() more safe.
+
+ Errors spotted using ModelTest.
+
+ qt4/src/poppler-optcontent-private.h | 2 +-
+ qt4/src/poppler-optcontent.cc | 15 +++++++++------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+commit b8e833733d84eaa93d6bae522710feb3075ca329
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 14:05:19 2008 +0100
+
+ fix build with the autotools
+
+ qt4/src/Makefile.am | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit f89ba474bae281f1cdeddb72ac8425dee1087e35
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 13:28:50 2008 +0100
+
+ Put the check states of the optional contents in the same column as the name.
+
+ This feels a bit more elegant than changing a value in a different column.
+ Cleanup data()/setData() so they can be extended easily.
+
+ qt4/src/poppler-optcontent.cc | 74 +++++++++++++++++++++--------------------
+ 1 files changed, 38 insertions(+), 36 deletions(-)
+
+commit defa0ecb2790402a4069fea3b3c285a50675682d
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 12:24:16 2008 +0100
+
+ Add a skeleton of OptContentModel::headerData().
+
+ It does nothing yet, but we can add stuff later on w/o breaking BC.
+
+ qt4/src/poppler-optcontent.cc | 5 +++++
+ qt4/src/poppler-optcontent.h | 2 ++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit f395531a3e8f71a46b3c942f8f437ade1d9fdb57
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Feb 27 22:22:51 2008 +1100
+
+ Minor cleanup.
+
+ qt4/src/poppler-optcontent.cc | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 0a19486cb4de57c0c987cc4ce2434a96bbd18338
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 12:15:44 2008 +0100
+
+ refresh the current page when the data of the content model change
+
+ qt4/demos/optcontent.cpp | 8 ++++++++
+ qt4/demos/optcontent.h | 3 +++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 09b7cc2efb7d21fa4dabd23d2d2de877cc7d86ee
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 12:15:18 2008 +0100
+
+ optional method to reload the current page
+
+ qt4/demos/documentobserver.cpp | 5 +++++
+ qt4/demos/documentobserver.h | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 39fe905be8f2ae79d9c26cd87547f3ea2608411e
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 12:00:29 2008 +0100
+
+ Add a dock for showing the optional content tree.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 3 ++
+ qt4/demos/optcontent.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/optcontent.h | 43 ++++++++++++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++++
+ 5 files changed, 109 insertions(+), 0 deletions(-)
+
+commit f17dd5539501a996479b903ac9b8aceb3c4cfafe
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 11:53:32 2008 +0100
+
+ cleanup
+
+ qt4/src/poppler-optcontent-private.h | 3 ++-
+ qt4/src/poppler-optcontent.h | 4 +---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+commit f3cc894559f10dbd4277fa9f30de9931ed69dfd4
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 11:43:34 2008 +0100
+
+ OptContentModel::itemFromRef() and OptContentItem are private API.
+
+ Hide them in the implementation.
+
+ qt4/src/poppler-optcontent-private.h | 43 ++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-optcontent.cc | 8 +++---
+ qt4/src/poppler-optcontent.h | 42 ---------------------------------
+ 3 files changed, 47 insertions(+), 46 deletions(-)
+
+commit 48e8b2105cf8f177ca655b969470e45e2407db82
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 11:28:16 2008 +0100
+
+ move all the private stuff of OptContentModel into its d-pointer
+
+ qt4/src/poppler-optcontent-private.h | 9 +++++++--
+ qt4/src/poppler-optcontent.cc | 29 +++++++++++++++--------------
+ qt4/src/poppler-optcontent.h | 4 ----
+ 3 files changed, 22 insertions(+), 20 deletions(-)
+
+commit b78a7f7a0e8d5a9c22014d34754090d863030e0d
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 27 11:06:57 2008 +0100
+
+ use a QPointer for the OptContentModel, so we are safe about ownership.
+
+ qt4/src/poppler-document.cc | 4 ++--
+ qt4/src/poppler-private.h | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 48557da71adb0fe6bd4da2fb32433796a96c3576
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Feb 27 19:39:18 2008 +1100
+
+ We need to install the optional content header.
+
+ qt4/src/CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6e2bb03b5ef256c03a8da1cbf9bbc87c593942ad
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Feb 27 19:23:49 2008 +1100
+
+ Partial d-pointer implementation.
+
+ qt4/src/poppler-optcontent-private.h | 57 ++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-optcontent.cc | 49 ++++++++++++++++++-----------
+ qt4/src/poppler-optcontent.h | 24 +++-----------
+ 3 files changed, 92 insertions(+), 38 deletions(-)
+
+commit c627b7aa10ae9cdceb78b751a7e826170f402af0
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Feb 27 16:12:38 2008 +1100
+
+ A couple of cleanups suggested by Pino.
+
+ qt4/src/poppler-document.cc | 6 +++---
+ qt4/src/poppler-qt4.h | 8 +++++---
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 81891667e18fcf164af02f5f366de07f78d67c8f
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Feb 27 15:47:03 2008 +1100
+
+ Add in the initial part of the optional content support.
+
+ To see this work, compare ClarityOCGs.pdf with and
+ without this change.
+
+ Right now we only handle optional content using
+ XObjects. Optional content using Marked Content has
+ infrastructure, but is not implemented. That will be
+ quite invasive in Gfx, and I'm not confident enough
+ to do it this late in the process.
+
+ CMakeLists.txt | 1 +
+ poppler/Catalog.cc | 9 +
+ poppler/Catalog.h | 4 +
+ poppler/Gfx.cc | 65 +++++-
+ poppler/Gfx.h | 12 +-
+ poppler/Makefile.am | 2 +
+ poppler/OptionalContent.cc | 322 ++++++++++++++++++++++++++
+ poppler/OptionalContent.h | 85 +++++++
+ poppler/PDFDoc.h | 5 +
+ poppler/PSOutputDev.cc | 6 +-
+ poppler/Page.cc | 2 +-
+ qt4/src/.gitignore | 1 +
+ qt4/src/CMakeLists.txt | 3 +
+ qt4/src/Makefile.am | 6 +
+ qt4/src/poppler-document.cc | 13 +
+ qt4/src/poppler-optcontent.cc | 354 ++++++++++++++++++++++++++++
+ qt4/src/poppler-optcontent.h | 122 ++++++++++
+ qt4/src/poppler-private.h | 4 +
+ qt4/src/poppler-qt4.h | 18 ++
+ qt4/tests/.gitignore | 1 +
+ qt4/tests/CMakeLists.txt | 1 +
+ qt4/tests/Makefile.am | 5 +
+ qt4/tests/check_optcontent.cpp | 499 ++++++++++++++++++++++++++++++++++++++++
+ 23 files changed, 1532 insertions(+), 8 deletions(-)
+
+commit 11b70bcda905e618c199a067db6b0246612e101d
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 26 23:01:27 2008 +0100
+
+ fixup the default export macro name (added by cmake); _WIN32 is defined only on win32 (remove a plethora of warnings)
+
+ qt4/src/poppler-export.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d4d6c14cd83d04c61daa6618c3148a0bb47dc292
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 26 22:57:02 2008 +0100
+
+ install the export header
+
+ qt4/src/CMakeLists.txt | 1 +
+ qt4/src/Makefile.am | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 4ba2e2d21710135656adbf93c5994cfb46502308
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 26 22:55:30 2008 +0100
+
+ no need to include the export header in private headers
+
+ qt4/src/poppler-annotation-helper.h | 1 -
+ qt4/src/poppler-annotation-private.h | 1 -
+ qt4/src/poppler-converter-private.h | 1 -
+ qt4/src/poppler-link-extractor-private.h | 1 -
+ qt4/src/poppler-page-private.h | 1 -
+ qt4/src/poppler-private.h | 1 -
+ qt4/src/poppler-qiodeviceoutstream-private.h | 1 -
+ 7 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 0a466c09fb70b92f39df19bc315b6575e419ad5b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 26 22:47:31 2008 +0100
+
+ We also need to distribute poppler-export.h
+
+ qt4/src/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2034d57c700049bc9a6565bbb818e1c9f4467784
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 26 22:46:29 2008 +0100
+
+ Now for real: Add special casing in cmake buildsystem for MSVC, also add Export markers to qt4 classes, although symbol visibility is only used on MSVC at the moment
+
+ CMakeLists.txt | 5 +++++
+ qt4/src/CMakeLists.txt | 3 +++
+ qt4/src/poppler-annotation-helper.h | 1 +
+ qt4/src/poppler-annotation-private.h | 1 +
+ qt4/src/poppler-annotation.h | 19 ++++++++++---------
+ qt4/src/poppler-converter-private.h | 1 +
+ qt4/src/poppler-export.h | 6 +++---
+ qt4/src/poppler-form.h | 9 +++++----
+ qt4/src/poppler-link-extractor-private.h | 1 +
+ qt4/src/poppler-link.h | 17 +++++++++--------
+ qt4/src/poppler-page-private.h | 1 +
+ qt4/src/poppler-private.h | 1 +
+ qt4/src/poppler-qiodeviceoutstream-private.h | 1 +
+ qt4/src/poppler-qt4.h | 21 +++++++++++----------
+ qt4/tests/CMakeLists.txt | 6 ++++++
+ 15 files changed, 59 insertions(+), 34 deletions(-)
+
+commit b931920f63f4276ec355118faa061bafa5ac5244
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 26 22:42:16 2008 +0100
+
+ Add special casing in cmake buildsystem for MSVC, also add Export markers to qt4 classes, although symbol visibility is only used on MSVC at the moment
+
+ qt4/src/poppler-export.h | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 1778fddb36d6cb2c7f7848bee06189158f69f16e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 24 23:02:08 2008 +0100
+
+ Add the cmake files to EXTRA_DIST so they get added when i do make dist to get the release tarball
+
+ Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 39 insertions(+), 0 deletions(-)
+
+commit 51f171e10a42d492c8c32a5e2578d05b73d89238
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 24 22:47:46 2008 +0100
+
+ ignore more
+
+ qt4/demos/.gitignore | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit adb1ccdb9265f0583cb348c456a39efac610aff1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 24 22:46:33 2008 +0100
+
+ ignore
+
+ qt4/demos/.gitignore | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 101e526c63175ffc1a75e1b68da7bb4fff9cd530
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Sun Feb 24 20:52:41 2008 +0100
+
+ define snprintf to _snprintf if we are building on MSVC
+
+ config.h.cmake | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f7f8ab488257c3979d20e5c0690ec5d7c2cd831b
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Sun Feb 24 20:43:11 2008 +0100
+
+ define M_PI in case it is not defined
+
+ poppler/Function.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f00436b63bf9a42dcb2728a07db9c20f1f23d0bc
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Sun Feb 24 20:39:42 2008 +0100
+
+ Add proper dirent.h guards
+
+ utils/pdftoabw.cc | 2 ++
+ utils/pdftohtml.cc | 2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit e1463451c584181f918265438cf6ddcb408bf731
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 21 20:43:56 2008 +0100
+
+ Code uses if USE_EXCEPTIONS, so we need to defined it to 1, not just define it
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 88d4bbbcf828e3247454c8ba3c2fb0fb58207b6a
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Thu Feb 21 19:53:03 2008 +0100
+
+ If a bitmap's dimensions are invalid, do not try to display it.
+
+ poppler/Gfx.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 452ae6f5674b00b43955952961f7ca0583f73e27
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 21 19:46:19 2008 +0100
+
+ Make sure we don't draw outside the bitmap on Splash::fillGlyph2
+
+ splash/Splash.cc | 76 ++++++++++++++++++++++++++++++++++-------------------
+ 1 files changed, 49 insertions(+), 27 deletions(-)
+
+commit 7f60fa806bd6d3d28917f349a2a19b52f97f593a
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Feb 21 13:00:05 2008 -0500
+
+ Fix typo
+
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+ qt4/demos/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 053ecae534a4522d152b0139b6aed6da2059d760
+Author: Carl Worth <cworth@cworth.org>
+Date: Wed Feb 20 17:21:27 2008 -0800
+
+ Keep cairo and cairo_shape consistent
+
+ The 'cairo_shape' state was not always being modified at the same
+ time as 'cairo'. In some cases this led to a sequence of ever
+ larger matrix scale factors until things just blew up.
+
+ poppler/CairoOutputDev.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit bf6dd890994150406b4464e45355a4a99870fc60
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 21 01:23:07 2008 +0100
+
+ Add a dock for showing the document metadata.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 3 ++
+ qt4/demos/metadata.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/metadata.h | 43 +++++++++++++++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++++
+ 5 files changed, 104 insertions(+), 0 deletions(-)
+
+commit b6f0c8f83924c08be20b602b128651bf018172a3
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 21 00:54:26 2008 +0100
+
+ Do not assign conflicting accelerators.
+
+ qt4/demos/viewer.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e0c27a968c7e7a0f6a89a050ddbfe328229f431d
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 21 00:53:24 2008 +0100
+
+ Apply the antialias settings w/o notify the observers.
+
+ qt4/demos/viewer.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 2c6149abcecda15c6f73a1dee537072240ddd545
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 21 00:51:21 2008 +0100
+
+ Add a settings menu to choose the render backend.
+
+ qt4/demos/viewer.cpp | 28 ++++++++++++++++++++++++++++
+ qt4/demos/viewer.h | 3 +++
+ 2 files changed, 31 insertions(+), 0 deletions(-)
+
+commit db2b0778dca364751a1d22294be29f8c7799e2e9
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 21 00:33:23 2008 +0100
+
+ Add a dock for showing the embedded files.
+
+ TODO: show the checksum in a pretty format.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 3 ++
+ qt4/demos/embeddedfiles.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/embeddedfiles.h | 43 ++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++
+ 5 files changed, 129 insertions(+), 0 deletions(-)
+
+commit 51fba47ccb12a66282769fc504bac4c9f5123f75
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 17 01:49:59 2008 +0100
+
+ clear the page label when the document is closed
+
+ qt4/demos/pageview.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit e964e2b9fbbe9b52b137ecd06729a06530835227
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Tue Feb 19 23:22:55 2008 +0100
+
+ Allow grouped checkboxes to be selected individually.
+
+ When checkboxes are in a group, they ought to behave like a collection of
+ radio buttons. However, when deciding whether to draw a checkbox as
+ selected or not, the checkbox-drawing code was looking up the value of the
+ V field in the form dictionary, which is shared among all checkboxes in the
+ group. Thus, checkboxes would either all be on or off in unison.
+
+ Instead, look up the AS (appearance state) value in each checkbox's
+ annotation dictionary, so that different checkboxes can be drawn
+ differently.
+
+ poppler/Annot.cc | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit 702fdd6c56b5369554c683d8c8e0e2c66e80886c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 19 00:18:04 2008 +0100
+
+ changes from gtk-doc
+
+ glib/reference/tmpl/poppler-document.sgml | 1 +
+ glib/reference/tmpl/poppler-page.sgml | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 9e13b91ba38c20989d283588e73490a1601f5bb0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Feb 19 00:10:24 2008 +0100
+
+ distribute the headers too
+
+ qt4/demos/Makefile.am | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 194e0ced7c38514ec3126666531862e3b29b4b77
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 18 23:34:06 2008 +0100
+
+ Fill NEWS and increase version number to 0.7
+
+ CMakeLists.txt | 2 +-
+ NEWS | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 2 +-
+ msvc/config.h | 6 ++--
+ qt4/src/Doxyfile | 2 +-
+ 5 files changed, 102 insertions(+), 6 deletions(-)
+
+commit 3c407efe9f1f0cc3f6366d3a2b6e9b687656cc95
+Merge: 51f0cea 7f4acb8
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 18 21:30:42 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 51f0cea0e3ba1acfc63877752e950fdd8c07e258
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 18 21:29:41 2008 +0100
+
+ make the poppler_qt4viewer compile with the auto"tools"
+
+ qt4/demos/Makefile.am | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 7f4acb879d300e18dfaff768027c88195d7d8f1b
+Author: Timothy Lee <timothy.lee@siriushk.com>
+Date: Mon Feb 18 20:56:35 2008 +0100
+
+ Implement ImageOutputDev::drawMaskedImage and ImageOutputDev::drawSoftMaskedImage so all images are exported when using pdfimages
+
+ utils/ImageOutputDev.cc | 19 +++++++++++++++++++
+ utils/ImageOutputDev.h | 11 +++++++++++
+ 2 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 064b316648e35416bb49336639da1d8d288d1ecf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 18 20:17:37 2008 +0100
+
+ xref can be null so check for it before checking we went out of bounds
+
+ Fixes bug 14549
+
+ poppler/Lexer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b287b611b1c7b7dd00e12518cee3a6c35044e161
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 17 01:21:07 2008 +0100
+
+ Really niptick: help menu with about dialog for us and Qt.
+
+ qt4/demos/viewer.cpp | 15 +++++++++++++++
+ qt4/demos/viewer.h | 2 ++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 6400254fdabf3d0d32f27ebd00faa6958be62019
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 17 01:12:27 2008 +0100
+
+ Add a title to the viewer :)
+
+ qt4/demos/viewer.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b363c0568c9c61e7ee8ed86d808f0eed0b93b525
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 17 01:09:57 2008 +0100
+
+ Add the possibility to save a copy of the file.
+
+ qt4/demos/viewer.cpp | 29 +++++++++++++++++++++++++++++
+ qt4/demos/viewer.h | 2 ++
+ 2 files changed, 31 insertions(+), 0 deletions(-)
+
+commit 42987dcdd8d7432145f78cfc550f0c099e6e7311
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 17 00:33:01 2008 +0100
+
+ Add a Permissions dock.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 1 +
+ qt4/demos/permissions.cpp | 77 +++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/permissions.h | 43 +++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++
+ 5 files changed, 129 insertions(+), 0 deletions(-)
+
+commit 9d1dda64de1d9e3f6fc81e40a0c2246a6270dfa8
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 23:56:17 2008 +0100
+
+ Add settings for antialias.
+
+ qt4/demos/viewer.cpp | 41 +++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/viewer.h | 4 ++++
+ 2 files changed, 45 insertions(+), 0 deletions(-)
+
+commit 3abb8703d7d8b7a5fbcbb3c19d8e84d640abe88c
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 22:25:11 2008 +0100
+
+ Add a TOC info dock.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 1 +
+ qt4/demos/toc.cpp | 90 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/toc.h | 43 ++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++
+ 5 files changed, 142 insertions(+), 0 deletions(-)
+
+commit 80925f06d125ebfc9909e36bdbe5d37fd0e48bdc
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 21:51:10 2008 +0100
+
+ Adapt the Fonts and Info docks to the new abstract info dock.
+
+ qt4/demos/fonts.cpp | 10 +++-------
+ qt4/demos/fonts.h | 11 +++++------
+ qt4/demos/info.cpp | 10 +++-------
+ qt4/demos/info.h | 11 +++++------
+ 4 files changed, 16 insertions(+), 26 deletions(-)
+
+commit c03531d691e56aba2b4c6538cf9e2463e1e0aa29
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 21:43:19 2008 +0100
+
+ Introduce a base info dock for handling the "dirty" work.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 1 +
+ qt4/demos/abstractinfodock.cpp | 57 ++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/abstractinfodock.h | 48 +++++++++++++++++++++++++++++++++
+ 4 files changed, 107 insertions(+), 0 deletions(-)
+
+commit 0f7d51c7fc2439ee9392c166576c341238f00f36
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 18:49:52 2008 +0100
+
+ Delete the poppler page after usage.
+
+ qt4/demos/pageview.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b41d069cdd1435ddb14b3de2986875069523c814
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 18:48:57 2008 +0100
+
+ Initialize the current page number correctly.
+
+ qt4/demos/viewer.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 75e516af0e72a2e3041660300e522ad00869372b
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 18:43:56 2008 +0100
+
+ Add a side dock for showing the fonts of the document.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 1 +
+ qt4/demos/fonts.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/fonts.h | 44 ++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 7 ++++
+ 5 files changed, 131 insertions(+), 0 deletions(-)
+
+commit 8e642d1cbd48d4790a6769287cbfd90c3bc9fc34
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 17:21:30 2008 +0100
+
+ Add a View menu where the dock widget toogle actions will be.
+
+ As start, put the Info dock there.
+
+ qt4/demos/viewer.cpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit c1feb7c2b5008cc04edb3c028f888072920ce4dc
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 17:14:00 2008 +0100
+
+ Add a side dock for showing the info keys.
+
+ qt4/demos/CMakeLists.txt | 1 +
+ qt4/demos/Makefile.am | 1 +
+ qt4/demos/info.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/info.h | 44 ++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 5 +++
+ 5 files changed, 129 insertions(+), 0 deletions(-)
+
+commit abc9b00c6470f9f6b66c280455f544ad0ee3aa8c
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 16:09:52 2008 +0100
+
+ Basic work in the demo PDF viewer, open documents and navigate into the pages.
+
+ An observer structure was introduced, so extra components can be easily added and made aware of the document/page changes.
+ Both the navigation toolbar and the page view are implemented as observers.
+
+ qt4/demos/CMakeLists.txt | 3 +
+ qt4/demos/Makefile.am | 3 +
+ qt4/demos/documentobserver.cpp | 45 ++++++++++++++++++
+ qt4/demos/documentobserver.h | 49 +++++++++++++++++++
+ qt4/demos/navigationtoolbar.cpp | 98 +++++++++++++++++++++++++++++++++++++++
+ qt4/demos/navigationtoolbar.h | 56 ++++++++++++++++++++++
+ qt4/demos/pageview.cpp | 60 ++++++++++++++++++++++++
+ qt4/demos/pageview.h | 44 +++++++++++++++++
+ qt4/demos/viewer.cpp | 98 +++++++++++++++++++++++++++++++++++++-
+ qt4/demos/viewer.h | 17 +++++++
+ 10 files changed, 470 insertions(+), 3 deletions(-)
+
+commit 14c88853a5675f40efb72f3ef01f49eb06ab846c
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 00:32:30 2008 +0100
+
+ Compile the poppler_qt4viewer.
+
+ qt4/demos/CMakeLists.txt | 7 +++++++
+ qt4/demos/Makefile.am | 12 ++++++++++--
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+commit aeb591f015d5e7a2643ed75d872358d2b1256b99
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 16 00:31:46 2008 +0100
+
+ Add a very minimal base PDF viewer.
+
+ So minimal that it does nothing at the moment...
+
+ qt4/demos/main_viewer.cpp | 29 ++++++++++++++++++++++++++++
+ qt4/demos/viewer.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++++
+ qt4/demos/viewer.h | 45 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 120 insertions(+), 0 deletions(-)
+
+commit 8da490b090487c4c37290b63bdc9abcfaf6d6940
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 15 23:59:39 2008 +0100
+
+ Add a skeleton of directory where PopplerQt4 demos will be.
+
+ configure.ac | 1 +
+ qt4/CMakeLists.txt | 1 +
+ qt4/Makefile.am | 2 +-
+ qt4/demos/CMakeLists.txt | 10 ++++++++++
+ qt4/demos/Makefile.am | 20 ++++++++++++++++++++
+ 5 files changed, 33 insertions(+), 1 deletions(-)
+
+commit e24b49d52a5c1716641695ee731dd49848a114d9
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 14 22:21:54 2008 +0100
+
+ do not print it as string
+
+ qt4/src/poppler-private.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2316455864e9c900c08d051c59b9508eddcb7c34
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 14 21:02:20 2008 +0100
+
+ Pipe the poppler error messages through the Qt debug system.
+
+ qt4/src/poppler-private.cc | 21 +++++++++++++++++++++
+ qt4/src/poppler-private.h | 8 +++++++-
+ 2 files changed, 28 insertions(+), 1 deletions(-)
+
+commit d985d3b0cdc57370137865add2a5f3a7802109c7
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 14 14:56:18 2008 +0100
+
+ Use what FormWidgetText give us.
+
+ qt4/src/poppler-form.cc | 13 +++----------
+ 1 files changed, 3 insertions(+), 10 deletions(-)
+
+commit a69bd442e52f4495f8d6bfd3bb58b3ebd1be1a63
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Thu Feb 14 12:52:22 2008 +0100
+
+ Provide Unicode mappings for some control characters in PDFDocEncoding.
+
+ Though they do not represent glyphs, values such as carriage return can be
+ found in text strings in PDFDocEncoding. Provide mappings for these bytes
+ to Unicode.
+
+ Additionally, map unknown characters to U+FFFD instead of U+0000, so that
+ unknown characters do not result in nulls (which can truncate strings
+ early, particularly if the string is later re-encoded into null-terminated
+ UTF-8).
+
+ poppler/PDFDocEncoding.cc | 23 +++++++++++++++++------
+ 1 files changed, 17 insertions(+), 6 deletions(-)
+
+commit ce17383e0ed21770b471e88f25046a64a23e7e45
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Feb 13 20:56:39 2008 +0100
+
+ Yet another fix for buggy documents, do not use the cache if the cache could not be created because it ought to be too big
+
+ Fixes http://bugs.kde.org/show_bug.cgi?id=157777
+
+ splash/SplashFont.cc | 48 ++++++++++++++++++++++++++++--------------------
+ 1 files changed, 28 insertions(+), 20 deletions(-)
+
+commit 15a61cac718ae8cbf83911e299b4cfdd24cdf178
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 13 20:55:18 2008 +0100
+
+ add images.c
+
+ glib/demo/CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9cfe10ab7f51d329647e102e446baaef043d8cc6
+Merge: e918729 7d65b4d
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 13 20:53:43 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 7d65b4da1bc060aeb94d67c2ff26912cef48c030
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Feb 13 20:32:43 2008 +0100
+
+ Add images demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/images.c | 338 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/images.h | 31 +++++
+ glib/demo/main.c | 4 +-
+ 4 files changed, 374 insertions(+), 1 deletions(-)
+
+commit e9187292701e72db1020f7701d0725d83eee4b00
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 13 19:41:57 2008 +0100
+
+ Do the one-time initialisation in initTestCase().
+
+ qt4/tests/check_dateConversion.cpp | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit fb996c46e3c6b56a2c67819620000bcd804aacd6
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Wed Feb 13 18:44:41 2008 +0100
+
+ Major rework of text display in form fields code.
+
+ This adds support for UTF-16 strings as input, and will recode them to the
+ appropriate character set for the font.
+
+ The method Annot::layoutText packs a lot of functionality together, but I
+ couldn't see a good way to split it apart. It will convert an input text
+ string from PDFDocEncoding or UTF-16 (encoding is autodetected) to the
+ appropriate encoding for the font which will be used to display the form
+ field. At the same time, it can compute the width of the resulting string,
+ and optionally break the string at a specified width to aid in wrapping
+ multi-line text. Text wrapping is integrated with encoding conversion
+ since wrapping is easiest with the original text (where spaces and newlines
+ are easily identified), but text widths can only be computed after
+ re-encoding.
+
+ Support for composite fonts is included, so long as those fonts use an
+ identity CMap, but this is still untested. Support for more complex CMaps
+ is missing.
+
+ The rewrite also includes a minor improvement to the formatting of comb
+ fields; characters are now centered in the comb cells.
+
+ poppler/Annot.cc | 507 ++++++++++++++++++++++++++++++++++--------------------
+ poppler/Annot.h | 9 +-
+ 2 files changed, 327 insertions(+), 189 deletions(-)
+
+commit 88c780aed4c9855f879e3c7a9f82500a859635a2
+Author: Michael Vrable <mvrable@cs.ucsd.edu>
+Date: Wed Feb 13 18:42:49 2008 +0100
+
+ Fix what look to be a few bugs in functions for mapping to/from Unicode.
+
+ - Endianness fix in pdfDocEncodingToUTF16 (previously looked to assume a
+ little-endian processor)
+ - Add support for CharCodeToUnicode::mapToCharCode for Unicode codepoints
+ above 255.
+
+ poppler/CharCodeToUnicode.cc | 4 ++--
+ poppler/Form.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 7574cb71f24ce5b32427f243c39b6029fb58ec81
+Merge: e798802 4e45e5c
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Feb 13 01:07:31 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 4e45e5ca4ab0ba2a6586505d80ed81f4b3426752
+Author: Patrick Spendrin <ps_ml@gmx.de>
+Date: Tue Feb 12 21:41:26 2008 +0100
+
+ Do the right thing with CDECL, that is, undefine it if it is defined so we can redefine it later
+
+ poppler-config.h.cmake | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e798802f00bff0a24ee6d1312d6c62624395865a
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 12 20:57:56 2008 +0100
+
+ Apidox fix: state which checksum is returned (if available).
+
+ qt4/src/poppler-qt4.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4e2ba70a88c40fef6775053b1cc5fa30e622cea7
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 12 11:25:34 2008 +0100
+
+ Free the Object after you use it.
+
+ poppler/Annot.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 039545fcd2c12631c7b8aea89c35f36cb387a17a
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 12 11:13:27 2008 +0100
+
+ Return the siblings even for checkboxes.
+
+ qt4/src/poppler-form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fe5ee75cdf3e11e314318af12edf9d5bc8986250
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 12 11:12:01 2008 +0100
+
+ Initialize correctly; free your memory.
+
+ poppler/Form.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit e0eff92c7067d43faa8e93baed1f061863111251
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Feb 11 20:32:41 2008 +0100
+
+ Update the field dict instead of the annot dict for non composed dicts
+
+ We were always updating the annot dictionary, adding or updating
+ the V field. While this is correct for composed dicts (annot + field)
+ it isn't for non composed ones since the annot dictionary doesn't
+ contain any V field because it's a field of the form field dictionary.
+ In these cases the form field is not correctly updated and if the
+ document is saved it will be wrong.
+
+ poppler/Form.cc | 44 +++++++++++++++++++++++++++++++-------------
+ poppler/Form.h | 2 ++
+ 2 files changed, 33 insertions(+), 13 deletions(-)
+
+commit 905e6da9795fee94329022c0cafbc229055fd4f6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Feb 10 19:22:50 2008 +0100
+
+ Move forms specific draw methods from Annot to AnnotWidget class
+
+ poppler/Annot.cc | 2345 +++++++++++++++++++++++++++---------------------------
+ poppler/Annot.h | 87 +-
+ poppler/Form.cc | 39 +-
+ poppler/Form.h | 2 +
+ poppler/Page.cc | 9 +-
+ 5 files changed, 1221 insertions(+), 1261 deletions(-)
+
+commit 78afbc4d7819654e8742d4457c9847ad02b73bf1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Feb 10 17:12:59 2008 +0100
+
+ Some code refactoring and cleanup
+
+ - Unused 'field' attribute in FormWidget class is now used and
+ getField() method has been added
+ - Method isReadOnly() in FormWidget class is not virtual anymore
+ but implemented in the base class
+ - Unused attribute 'catalog' in Form class has been removed and
+ 'acroForm' has been added instead with a getObj() method to get it.
+ - createFieldFromDict() method is now static
+
+ poppler/Form.cc | 128 ++++++++++++++++++++++++++++---------------------------
+ poppler/Form.h | 41 ++++++++---------
+ 2 files changed, 84 insertions(+), 85 deletions(-)
+
+commit 5f8e2f9140ee2ede841700726b974768ec863672
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 20:16:44 2008 +0100
+
+ Use QVarLengthArray instead of relying on gcc-ism.
+
+ qt4/src/poppler-page.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 7499764d382366823519aa13a38e1e44781c78af
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 11:57:50 2008 +0100
+
+ Add FormFieldButton::siblings().
+
+ This is needed for grouping together the radio buttons.
+
+ qt4/src/poppler-form.cc | 14 ++++++++++++++
+ qt4/src/poppler-form.h | 8 ++++++++
+ 2 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 85bfa4f499a90d45b13df4d0a8760a7da6fc1532
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 02:40:37 2008 +0100
+
+ Small apidox fix.
+
+ qt4/src/poppler-form.h | 11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit ada05055c91e967dc3e2af32a2176dd12cb7fe70
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 02:27:19 2008 +0100
+
+ Preliminary support for "button" form fields (ie, push buttons, check boxes, and radio buttons).
+
+ qt4/src/poppler-form.cc | 55 +++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-form.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-page.cc | 6 +++++
+ 3 files changed, 115 insertions(+), 0 deletions(-)
+
+commit 278b33f25df418ef12798100002845a3e2ceebd3
+Merge: c730b33 fdb0a4a
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 00:57:24 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit fdb0a4a2f1d86aec7a3b0fcd4b4d48455791ecad
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Feb 10 18:47:40 2008 -0500
+
+ Avoid prescaling images when printing.
+
+ Adds a function for letting the CairoOutputDev know whether it is targetting a
+ screen or not. It then uses this knowledge to avoid prescaling images. This way
+ cairo gets the full resolution image for use in the printed output.
+
+ glib/poppler-page.cc | 1 +
+ poppler/CairoOutputDev.cc | 3 ++-
+ poppler/CairoOutputDev.h | 2 ++
+ 3 files changed, 5 insertions(+), 1 deletions(-)
+
+commit c730b33f1ec2032c4b8c2660738448d954eb0f7d
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 11 00:46:20 2008 +0100
+
+ Keep the EmbFile object, and use this for getting the data.
+
+ qt4/src/poppler-embeddedfile.cc | 33 +++++++++++----------------------
+ qt4/src/poppler-private.h | 1 -
+ 2 files changed, 11 insertions(+), 23 deletions(-)
+
+commit 5915e57e7785370ce305cbbb3c2fedf36886689f
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 10 03:19:18 2008 +0100
+
+ const & in foreach
+
+ qt4/tests/poppler-fonts.cpp | 2 +-
+ qt4/tests/stress-poppler-dir.cpp | 2 +-
+ qt4/tests/stress-poppler-qt4.cpp | 2 +-
+ qt4/tests/test-password-qt4.cpp | 2 +-
+ qt4/tests/test-poppler-qt4.cpp | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+commit d8374e0c2eb3ba05be101687e20c5fcbc42c1ad0
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 10 01:32:24 2008 +0100
+
+ Include only what needed; remove extra includes.
+
+ qt4/tests/poppler-attachments.cpp | 4 +++-
+ qt4/tests/poppler-fonts.cpp | 4 +++-
+ qt4/tests/stress-poppler-dir.cpp | 9 ++++++---
+ qt4/tests/stress-poppler-qt4.cpp | 9 ++++++---
+ qt4/tests/test-password-qt4.cpp | 10 ++++++----
+ qt4/tests/test-poppler-qt4.cpp | 12 ++++++++----
+ 6 files changed, 32 insertions(+), 16 deletions(-)
+
+commit fa01a1115c4554b18c3462b568d76860d2fbe17b
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 10 01:09:57 2008 +0100
+
+ Comment out unused vars.
+
+ utils/pdftoabw.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d3275e4263372b534c276f81d0c997ecb6675487
+Merge: c2186c1 5347a97
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 9 23:57:03 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit c2186c1829c695c4ddb6c471ef8ad4ffa23c1b70
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 9 23:56:32 2008 +0100
+
+ Only check if we are out of bounds if the object we are searching for has a known id (0 also means not known)
+
+ Found by Michael Vrable
+
+ poppler/Lexer.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5347a97e39388ae38cf2ab9c67f953b0f7a02a13
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 18:26:41 2008 +0100
+
+ Add the operators for the flags we have.
+
+ qt4/src/poppler-qt4.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 329ade4f936bf063539cdc887aaf9a1722a5b8e0
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 18:23:59 2008 +0100
+
+ Add options for the PDF export; add the WithChanges flag for saving the changes to the document as well.
+
+ qt4/src/poppler-pdf-converter.cc | 25 +++++++++++++++++++++++--
+ qt4/src/poppler-qt4.h | 14 ++++++++++++++
+ 2 files changed, 37 insertions(+), 2 deletions(-)
+
+commit afb255366d56551bdc307766199bef9c5021d3ac
+Merge: 8c44b17 8cb0e75
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 17:58:49 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 8c44b175081983c492821858341109fee9e86b16
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 17:57:57 2008 +0100
+
+ Do not rely on GNU extensions, but at least use Qt.
+
+ qt4/src/poppler-qiodeviceoutstream.cc | 11 ++++-------
+ 1 files changed, 4 insertions(+), 7 deletions(-)
+
+commit 8cb0e75203daa01439413d1a775482b48e784baa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 9 17:56:13 2008 +0100
+
+ Domain order is x_min x_max y_min y_max and not x_min y_min x_max y_max
+
+ poppler/GfxState.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c8f734ba4258059fa4521a4d364f62ca1632840b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 9 13:37:04 2008 +0100
+
+ PS cos and sin input values are degrees so convert to radians so we can use the cos and sin cmath functions
+
+ poppler/Function.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5fb0c9d31c1abf2e6ad306c112fbd2a7c33d8772
+Merge: 2655663 2255c85
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 9 13:15:15 2008 +0100
+
+ Merge branch 'master' of ssh://carlosgc@git.freedesktop.org/git/poppler/poppler
+
+commit 26556636e71d5abcbfdd1373f5576d1233532cf8
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Feb 9 13:14:41 2008 +0100
+
+ Add saveWithoutChangesAs method to be able to save the document ignoring changes made in forms or annots
+
+ glib/poppler-document.cc | 41 ++++++++++++++++++++++++++++++++++++++++-
+ glib/poppler-document.h | 3 +++
+ poppler/PDFDoc.cc | 38 ++++++++++++++++++++++++++++++++------
+ poppler/PDFDoc.h | 4 ++++
+ 4 files changed, 79 insertions(+), 7 deletions(-)
+
+commit 2255c85e4939a0752083dca21984ff4398baf8d2
+Merge: 5ba9287 56c9246
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 12:49:45 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 5ba928762471e1ea8b81acd4644dfd3f58d18f77
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 12:48:04 2008 +0100
+
+ Fix placeholders in printf-like functions.
+
+ glib/demo/page.c | 2 +-
+ glib/test-poppler-glib.cc | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 56c924609223196c5c41b9e6d9102bc248bad947
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 9 12:26:06 2008 +0100
+
+ atan operator must yield a degrees result between 0 and 360
+
+ See testcase at http://bugs.kde.org/show_bug.cgi?id=157497
+
+ poppler/Function.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 2a39932ae35a2716842bd2a1c3d4f9ce6b1e3dd8
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 01:31:20 2008 +0100
+
+ Few improvements to the password test.
+
+ - QString::fromUtf8() instead of QFile::encodeName() to correctly pass the utf8 filenames
+ - QVERIFY(!foo) instead of QCOMPARE(foo, false)
+ - QVERIFY() also the return value of unlock()
+
+ qt4/tests/check_password.cpp | 31 ++++++++++++++++---------------
+ 1 files changed, 16 insertions(+), 15 deletions(-)
+
+commit cc9c124d4d859b845eebf4ca1e4397870a35fd4e
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Feb 9 01:09:02 2008 +0100
+
+ Add an unit test case for few invalid dates.
+
+ qt4/tests/check_dateConversion.cpp | 34 ++++++++++++++++++++++++++++++++++
+ 1 files changed, 34 insertions(+), 0 deletions(-)
+
+commit eca91761741de5b340f7a2160db5b33401feb935
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 18:42:14 2008 +0100
+
+ Remove unneeded headers.
+
+ qt4/src/poppler-page.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 899627505a4645fb1cc7d3599adbeec449c57041
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 18:41:13 2008 +0100
+
+ The return value is QString, so return QString's...
+
+ qt4/src/poppler-document.cc | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit a1606fa4ff438983e3a7f55dd2d10a66f72e6711
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 17:31:32 2008 +0100
+
+ Move checkDocument() inside the private class.
+
+ qt4/src/poppler-document.cc | 6 +++---
+ qt4/src/poppler-private.h | 2 ++
+ qt4/src/poppler-qt4.h | 2 +-
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+commit f1ec70a83f807493dab5118761df31c0f67decad
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 17:26:41 2008 +0100
+
+ Remove C-ism.
+
+ qt4/src/poppler-document.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3e994e8586fa1c87ef7e7f82af1cdacf2cd36310
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 12:21:56 2008 +0100
+
+ Add the missing font types.
+
+ qt4/src/poppler-fontinfo.cc | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+commit ba07963f85d777a441349e23d4c2f510e45c73be
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 12:19:04 2008 +0100
+
+ Be safe against self-assignment.
+
+ qt4/src/poppler-fontinfo.cc | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 834b86548e09f4b24cdb2f194299d053b9b55022
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 12:15:16 2008 +0100
+
+ Small apidox fix.
+
+ qt4/src/poppler-qt4.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 11a61eac5b8cde04bf762bbbe0deab5c0bd52951
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 02:21:32 2008 +0100
+
+ Pack few bools together.
+
+ qt4/src/poppler-annotation.cc | 8 ++++----
+ qt4/src/poppler-link.cc | 10 +++++-----
+ qt4/src/poppler-private.h | 4 ++--
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 1aeba15b5eb9b30943259824678ebc9e4f56e870
+Merge: a489063 22d10c1
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 01:39:16 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit a4890637a2c2ab1623311d9a6920e82131c2597c
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 01:36:56 2008 +0100
+
+ Move QStringToUnicodeGooString() and QStringToGooString() to the private module.
+
+ qt4/src/poppler-document.cc | 10 ----------
+ qt4/src/poppler-form.cc | 15 ---------------
+ qt4/src/poppler-private.cc | 25 +++++++++++++++++++++++++
+ qt4/src/poppler-private.h | 4 ++++
+ 4 files changed, 29 insertions(+), 25 deletions(-)
+
+commit 5e44241c4976b819f7be6badd2d183fbfb8ee6de
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 01:30:07 2008 +0100
+
+ Move the string functions implementation in a .cc file.
+
+ qt4/src/CMakeLists.txt | 1 +
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-private.cc | 70 ++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-private.h | 46 ++--------------------------
+ 4 files changed, 76 insertions(+), 42 deletions(-)
+
+commit 124d92139241ad95da559d22af48254b45ac4a2e
+Author: Pino Toscano <pino@kde.org>
+Date: Fri Feb 8 01:07:43 2008 +0100
+
+ Include own header first, remove extra includes.
+
+ qt4/src/poppler-document.cc | 1 -
+ qt4/src/poppler-embeddedfile.cc | 3 ++-
+ qt4/src/poppler-form.cc | 4 +++-
+ qt4/src/poppler-link-extractor-private.h | 2 ++
+ qt4/src/poppler-link-extractor.cc | 7 +++++--
+ qt4/src/poppler-page-private.h | 6 +++++-
+ qt4/src/poppler-private.h | 4 +++-
+ qt4/src/poppler-qt4.h | 2 --
+ qt4/src/poppler-sound.cc | 4 ++--
+ 9 files changed, 22 insertions(+), 11 deletions(-)
+
+commit 22d10c19e232dea143bda372c92aa12b999e4921
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 7 23:38:50 2008 +0100
+
+ PDF spec says name tokens have a maximum length of 127, but there are some docs in the wild with more than that and they work on acroread so increase the allowed length to 128+127
+
+ poppler/Lexer.cc | 25 +++++++++++++++++++++----
+ 1 files changed, 21 insertions(+), 4 deletions(-)
+
+commit ee9f85915feb86b54ace1a403baa13bbdd7c3966
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 7 18:07:53 2008 +0100
+
+ Having a PageData is mandatory.
+
+ Just assert when constructing instead of checking for it in each link iteration.
+
+ qt4/src/poppler-link-extractor.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ad4b1361f6c25359e6ddb38599bfc1e4e3e80408
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 7 18:03:30 2008 +0100
+
+ Precalc stuff we don't need to recalc in each link iteration.
+
+ qt4/src/poppler-link-extractor-private.h | 3 ++-
+ qt4/src/poppler-link-extractor.cc | 14 ++++++++------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+commit 82432dbc62a0879f4513640c2e0f594fda9347ad
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 7 17:51:50 2008 +0100
+
+ Store the ::Page internally, so we don't need to get it again everytime.
+
+ qt4/src/poppler-page-private.h | 3 +++
+ qt4/src/poppler-page.cc | 37 ++++++++++++++-----------------------
+ 2 files changed, 17 insertions(+), 23 deletions(-)
+
+commit 8ec51f7ca518aa6a4a69f30d373722d05f50cf07
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 7 16:48:16 2008 +0100
+
+ Compile the stress-poppler-dir test as well.
+
+ qt4/tests/CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8a946b76ae2e7c2c5238b4e580c1c226eb457dc9
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Feb 7 01:07:28 2008 +0100
+
+ Micro-touches to the debug messages.
+
+ qt4/src/poppler-page.cc | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+commit c31990dfe50c7a0e3999e6d967699fce5ccb3339
+Merge: 7701e2a 6d58cda
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 5 00:38:00 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 7701e2a5c7d18fdaa0fa40c190e6ee0524746046
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Feb 5 00:37:01 2008 +0100
+
+ Add a AnnotColor -> QColor conversion method.
+
+ qt4/src/poppler-annotation-helper.h | 6 ++++++
+ qt4/src/poppler-annotation.cc | 31 +++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 0 deletions(-)
+
+commit 6d58cda82b0181f2cca6e9d95b15877793be0812
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 4 23:33:51 2008 +0100
+
+ Protect us against weird dateString values
+
+ qt4/src/poppler-document.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit aa0435f1544fe1adcf10173e34eaeaf2a7a703c7
+Merge: b43f4e9 37600b5
+Author: Pino Toscano <pino@kde.org>
+Date: Mon Feb 4 20:56:53 2008 +0100
+
+ Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
+
+commit 37600b5e848386d2c92c3dff8219c9dda16b0dca
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Feb 3 22:42:51 2008 +0100
+
+ Minor changes to Annot related stuff.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 15 ++++-----------
+ poppler/Annot.h | 12 ++++++++++--
+ poppler/Gfx.cc | 7 ++++---
+ poppler/Page.cc | 9 +++++++++
+ poppler/Page.h | 3 +++
+ 5 files changed, 30 insertions(+), 16 deletions(-)
+
+commit b43f4e9a161a1fd7b827244dc21b1bd2a6df7054
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Feb 3 20:32:15 2008 +0100
+
+ Pass the DocumentData to the Page (simplify a bit some code).
+
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-link-extractor-private.h | 4 +-
+ qt4/src/poppler-link-extractor.cc | 8 ++--
+ qt4/src/poppler-page-private.h | 4 +-
+ qt4/src/poppler-page.cc | 64 +++++++++++++++---------------
+ qt4/src/poppler-qt4.h | 5 +-
+ 6 files changed, 42 insertions(+), 45 deletions(-)
+
+commit 4e0bb0307fccefc21f74a4c5a3a0d7e8e687b550
+Author: Pino Toscano <pino@draco.(none)>
+Date: Sat Feb 2 12:57:25 2008 +0100
+
+ Fix include guard.
+
+ poppler/ArthurOutputDev.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6f11ef660540fd13aad1350385beb90758ca86af
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Feb 1 23:55:37 2008 +0100
+
+ Fix for end condition, init ucode to 0
+
+ poppler/GfxFont.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 1da2091807ae7f7d4d3f446953c41b4c440d4b1b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 31 23:52:20 2008 +0100
+
+ Ensure we don't draw outside the main bitmap on SplashOutputDev::setSoftMask
+
+ Fixes crash on http://bugs.kde.org/show_bug.cgi?id=157000
+
+ poppler/SplashOutputDev.cc | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit ecabc9469b137e8251344e5502de1cbf875223b9
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jan 31 00:20:55 2008 +0100
+
+ Set RelWithDebInfo as default build type, if not specified.
+
+ cmake/modules/PopplerMacros.cmake | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 19da87a20b3906523a330e3c956903a58a3ede7f
+Author: Pino Toscano <pino@kde.org>
+Date: Thu Jan 31 00:11:58 2008 +0100
+
+ Support the different CMake build modes.
+
+ Now you can specify (using -DCMAKE_BUILD_TYPE=type) a CMake build type to have GCC or ICC w/ tuned C(XX)FLAGS.
+ The supported build types are: None (as in no type is specified on command line), RelWithDebInfo, Release, Debug, DebugFull, Profile.
+
+ CMakeLists.txt | 7 -------
+ cmake/modules/PopplerMacros.cmake | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 7 deletions(-)
+
+commit 37d2055137c310ceb217164a76814b188be3b1b2
+Author: Pino Toscano <pino@draco.(none)>
+Date: Wed Jan 30 23:12:03 2008 +0100
+
+ Introduce the CMake-based build system.
+
+ Mostly works nicely as the autotools, and it mimics (almost) all the autotools behaviours.
+ Copied some scripts from the KDE cmake scripts (BSD-licensed).
+ TODO: gtk-doc.
+
+ CMakeLists.txt | 390 +++++++
+ ConfigureChecks.cmake | 47 +
+ cmake/modules/COPYING-CMAKE-SCRIPTS | 22 +
+ cmake/modules/FindCairo.cmake | 44 +
+ cmake/modules/FindFontconfig.cmake | 47 +
+ cmake/modules/FindFreetype.cmake | 74 ++
+ cmake/modules/FindGTK.cmake | 70 ++
+ cmake/modules/FindPackageHandleStandardArgs.cmake | 58 +
+ cmake/modules/FindQt3.cmake | 319 +++++
+ cmake/modules/FindQt4.cmake | 1295 +++++++++++++++++++++
+ cmake/modules/MacroBoolTo01.cmake | 20 +
+ cmake/modules/MacroEnsureVersion.cmake | 117 ++
+ cmake/modules/MacroOptionalFindPackage.cmake | 28 +
+ cmake/modules/MacroPushRequiredVars.cmake | 47 +
+ cmake/modules/PopplerDefaults.cmake | 10 +
+ cmake/modules/PopplerMacros.cmake | 83 ++
+ config.h.cmake | 149 +++
+ glib/CMakeLists.txt | 107 ++
+ glib/demo/CMakeLists.txt | 17 +
+ glib/poppler-features.h.cmake | 24 +
+ poppler-cairo.pc.cmake | 9 +
+ poppler-config.h.cmake | 160 +++
+ poppler-glib.pc.cmake | 13 +
+ poppler-qt.pc.cmake | 12 +
+ poppler-qt4.pc.cmake | 12 +
+ poppler-splash.pc.cmake | 9 +
+ poppler.pc.cmake | 11 +
+ qt/CMakeLists.txt | 33 +
+ qt4/CMakeLists.txt | 2 +
+ qt4/src/CMakeLists.txt | 43 +
+ qt4/tests/CMakeLists.txt | 47 +
+ test/CMakeLists.txt | 52 +
+ utils/CMakeLists.txt | 84 ++
+ 33 files changed, 3455 insertions(+), 0 deletions(-)
+
+commit 1ea831d3eee6eda35fadfb3c75962a0c708e6c7b
+Author: Pino Toscano <pino@kde.org>
+Date: Wed Jan 30 22:17:38 2008 +0100
+
+ Preprocessor #warning is GCC-specific.
+
+ poppler/ArthurOutputDev.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 4c738cc6bd51f9d9e23ba83949c490c5c8691345
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 29 23:45:52 2008 +0100
+
+ Scale text to match 'm' size
+
+ Fixes bug 12304
+
+ poppler/SplashOutputDev.cc | 37 +++++++++++++++++++++++++++++
+ splash/SplashFTFont.cc | 55 +++++++++++++++++++++++++++++++++++++++++++-
+ splash/SplashFTFont.h | 4 +++
+ splash/SplashFont.h | 4 +++
+ splash/SplashFontFile.cc | 1 +
+ splash/SplashFontFile.h | 2 +
+ 6 files changed, 102 insertions(+), 1 deletions(-)
+
+commit 64f16cf6ebf2870852fe8d937b25be58869ad40a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 29 23:41:15 2008 +0100
+
+ Enable antialias by default on the test tool
+
+ qt4/tests/test-poppler-qt4.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 90f0e6bc1e96d9f1666cb8476a92e127f5b927d4
+Author: Jonathan Kew <jonathan_kew@sil.org>
+Date: Tue Jan 29 20:23:08 2008 +0100
+
+ Provide gstrndup as a portable substitue of strndup
+
+ configure.ac | 1 -
+ goo/gmem.cc | 7 +++++++
+ goo/gmem.h | 5 +++++
+ poppler/GfxFont.cc | 8 +-------
+ 4 files changed, 13 insertions(+), 8 deletions(-)
+
+commit 77b91c852ad3d5554afc03aee92a1d928f233401
+Merge: 0babb0e 0533696
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jan 28 20:44:34 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit 0babb0eb1afa343fb12a3fd037b98d2d1c794a1c
+Author: Jonathan Kew <jonathan_kew@sil.org>
+Date: Mon Jan 28 20:42:44 2008 +0100
+
+ Introduce a check for strndup and alternative for systems without it
+
+ configure.ac | 1 +
+ poppler/GfxFont.cc | 6 ++++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 053369678963206a4afa88a614de1994872c7c5a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jan 27 19:36:28 2008 +0100
+
+ Add ok_to_fill_form permission flag
+
+ glib/poppler-document.cc | 2 ++
+ glib/poppler-document.h | 3 ++-
+ glib/test-poppler-glib.cc | 21 +++++++++++++++++++--
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+
+commit 3085a9495ad87a54758da0024372610fdaf88d57
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Jan 27 19:15:34 2008 +0100
+
+ Fix slice rendering in poppler glib demo
+
+ glib/demo/render.c | 41 ++++++++++++++++++++++++-----------------
+ 1 files changed, 24 insertions(+), 17 deletions(-)
+
+commit 7ad6c4ba110b970516d5380444a03ae217496ddf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 24 21:14:44 2008 +0100
+
+ Incrementing the iterator would be a good idea
+
+ qt4/src/poppler-annotation.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 7c99ec4635a4971321bbead7d1bc723da59b755e
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Thu Jan 24 19:18:15 2008 +0100
+
+ Revert unwanted change on Dict, fix leak on writeTrailer
+
+ poppler/Dict.cc | 2 +-
+ poppler/PDFDoc.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2335fb6034d2e9ec304abba400119b88302b3160
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 23 23:26:20 2008 +0100
+
+ Draw underlined Links correctly
+
+ See http://bugs.kde.org/show_bug.cgi?id=151359 for an example
+
+ poppler/Gfx.cc | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 96c532ea4b56a147de1deb965126e31f87df588b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jan 23 13:30:12 2008 +0100
+
+ Fix memory leak
+
+ poppler/Form.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 6bca64407c675ca837f83a12c0f655f975f14407
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jan 23 13:27:45 2008 +0100
+
+ Make sure default values are not loaded more than once for the same widget.
+
+ poppler/Form.cc | 18 +++++++++++++++++-
+ poppler/Form.h | 1 +
+ 2 files changed, 18 insertions(+), 1 deletions(-)
+
+commit eccf84b51a1cf5d478c0ec84be3fc9be8e458f4f
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Jan 22 23:28:16 2008 +0100
+
+ Refactor the PSConverter and add a PDFConverter (for PDF export/save).
+
+ Add an OutStream subclass to redirect the output to a QIODevice.
+ Split the PSConverter in a base class (BaseConverter) w/ d_ptr structure.
+ Add a new PDFConverter that inherit BaseConverter, and do the actual export
+ making use of the new QIODeviceOutStream.
+ The BaseConverter now handles automatically file or QIODevice output.
+
+ qt4/src/Makefile.am | 5 +
+ qt4/src/poppler-base-converter.cc | 99 ++++++++++++++++
+ qt4/src/poppler-converter-private.h | 48 ++++++++
+ qt4/src/poppler-document.cc | 5 +
+ qt4/src/poppler-pdf-converter.cc | 68 +++++++++++
+ qt4/src/poppler-ps-converter.cc | 162 +++++++++++---------------
+ qt4/src/poppler-qiodeviceoutstream-private.h | 47 ++++++++
+ qt4/src/poppler-qiodeviceoutstream.cc | 71 +++++++++++
+ qt4/src/poppler-qt4.h | 85 +++++++++++---
+ 9 files changed, 483 insertions(+), 107 deletions(-)
+
+commit 547db8be1ab0b2987f0f06d8529eaaed2414028c
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jan 22 13:22:20 2008 +0100
+
+ Fix a crash when createAnnot returns NULL due to invalid annot dict.
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0d558841142587d66bd3b2025e5a9ca39f7a6159
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jan 21 21:43:39 2008 +0100
+
+ Fix another reversed comparison due to cmp
+
+ poppler/Annot.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cb6a87e39336e2e3893f3e5f577e4d176d237a9f
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Jan 21 10:07:35 2008 +0100
+
+ Fixed a few compare issues with Annots.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 24 ++++++++++++------------
+ 1 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 7cf85dc8d7c895a211684c7d36757063ed4f469b
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Jan 21 21:27:49 2008 +0100
+
+ The glade file needs to be distributed
+
+ test/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 46e93d31dd9b5909ecd8f7a8f8de23329444a7bc
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Sun Jan 20 19:56:51 2008 +0100
+
+ we need time.h if we use time()
+
+ poppler/PDFDoc.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit a0adb006c38ea07f010a01d9c0bb07ca0f48939d
+Author: Pino Toscano <pino@kde.org>
+Date: Sun Jan 20 19:55:55 2008 +0100
+
+ Added a saveAs() overload which takes a plain OutStream
+
+ poppler/PDFDoc.cc | 9 +++++++--
+ poppler/PDFDoc.h | 2 ++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit fcdd5c51f370d040ae57aa64801c9bd4dbe88752
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jan 19 18:00:10 2008 +0100
+
+ Do not render images when getting the image mapping, it can be done later on demand.
+
+ glib/poppler-page.cc | 81 +++++++++++++++------------
+ glib/poppler-page.h | 6 ++-
+ poppler/CairoOutputDev.cc | 131 ++++++++++++++++++++++++++-------------------
+ poppler/CairoOutputDev.h | 12 ++++-
+ 4 files changed, 135 insertions(+), 95 deletions(-)
+
+commit 37ae465775d9a53e7c06cf51aa215439214fd79c
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Sat Jan 19 14:00:31 2008 +0100
+
+ ignore pdf-fullrewrite binary
+
+ test/.gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1d160935ea4c1116b745c584ed7f1fd03fbbfb46
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Jan 19 13:59:46 2008 +0100
+
+ AnnotWidget support and few fixes
+
+ poppler/Annot.cc | 243 +++++++++++++++++++++++++++++++++++++++++++++++++++--
+ poppler/Annot.h | 142 +++++++++++++++++++++++++++++--
+ 2 files changed, 365 insertions(+), 20 deletions(-)
+
+commit 0e91a3973e525d65236d15930a8ea0e5bbb6a6cc
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Jan 19 13:59:25 2008 +0100
+
+ AnnotTextMarkup support and improved AnnotQuadrilaterals
+
+ poppler/Annot.cc | 356 +++++++++++++++++++++++++++++++++++++++++++-----------
+ poppler/Annot.h | 130 +++++++++++++++++---
+ 2 files changed, 400 insertions(+), 86 deletions(-)
+
+commit c13952cd56a40bad14a1bf28699b137f65162f10
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Jan 19 13:59:02 2008 +0100
+
+ Changed AnnotQuadrilateral parsing inside AnnotLink
+
+ poppler/Annot.cc | 246 +++++++++++++++++++++++++++++-------------------------
+ poppler/Annot.h | 19 ++--
+ 2 files changed, 144 insertions(+), 121 deletions(-)
+
+commit 2f821f10fbbba9363405201c86494cd861cec2b2
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sat Jan 19 13:49:43 2008 +0100
+
+ Add AnnotQuadPoints class
+
+ poppler/Annot.cc | 16 ++++++++++++++++
+ poppler/Annot.h | 23 +++++++++++++++++++++++
+ 2 files changed, 39 insertions(+), 0 deletions(-)
+
+commit de4c8fa6607e55c199bede1dc731227692ef4f53
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Dec 30 21:21:56 2007 +0100
+
+ AnnotFreeText support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 232 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 127 +++++++++++++++++++++++++++++
+ 2 files changed, 358 insertions(+), 1 deletions(-)
+
+commit c3504a87933ae1516b1ef05e527fd1c039091235
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Sun Dec 30 19:37:18 2007 +0100
+
+ Improved AnnotLink support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 51 ++++++++++++++++++++++++
+ 2 files changed, 167 insertions(+), 0 deletions(-)
+
+commit a20468cc38bb590124b2b028a08f364f90f2487f
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 13:02:17 2008 +0100
+
+ Adds a test application to test full rewrite functionnality.
+
+ test/Makefile.am | 11 ++++++++++-
+ test/pdf-fullrewrite.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 54 insertions(+), 1 deletions(-)
+
+commit 246294714c6011651fd0e5b3649bd65919058c72
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:59:03 2008 +0100
+
+ FormWidget's 'modified' member variable is now updated correctly each time an update is done.
+
+ Before, only text FormWidget had their 'modified' field set to 'true' if they had been updated.
+ It is now the case for the other type of FormWidgets.
+
+ poppler/Form.cc | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 6e0f297b8b17afb95779724b8618ca39016e664a
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:54:09 2008 +0100
+
+ Annot will save their generated appearance in their AP dict.
+
+ poppler/Annot.cc | 42 ++++++++++++++++++++++++++++++++++++++----
+ poppler/Annot.h | 1 +
+ 2 files changed, 39 insertions(+), 4 deletions(-)
+
+commit e20f6a8e9ac3936b4bc03710a71fe390dfc4c094
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:52:02 2008 +0100
+
+ Add deep copy constructor to Dict.
+
+ poppler/Dict.cc | 14 +++++++++++++-
+ poppler/Dict.h | 1 +
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+commit e8d46cab77c7167edb0896296118daafc0f13b6d
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:51:44 2008 +0100
+
+ Adds the ability to save PDF using either incremental update or by rewriting completly the PDF.
+
+ poppler/PDFDoc.cc | 379 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/PDFDoc.h | 18 +++-
+ poppler/XRef.cc | 12 ++-
+ poppler/XRef.h | 3 +-
+ 4 files changed, 402 insertions(+), 10 deletions(-)
+
+commit 742b0c3dec01d8672b84f56d5bb0e2890b178594
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:51:27 2008 +0100
+
+ Make the md5 method of Decrypt public so it can be used by other files.
+
+ poppler/Decrypt.cc | 5 ++---
+ poppler/Decrypt.h | 1 +
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit bb7867976740dea259d4110c072552fc5953910f
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:51:07 2008 +0100
+
+ Modify the writeToFile method of XRef so it uses OutStream instead of a C file descriptor.
+
+ poppler/XRef.cc | 10 +++++-----
+ poppler/XRef.h | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit d80736587fdbc0e163077f27bfd21c5e3a7fa4c7
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:50:49 2008 +0100
+
+ Adds addIndirectObject method to XRef. This method allow the creation of new indirect objects.
+
+ poppler/XRef.cc | 39 +++++++++++++++++++++++++++++++++++++++
+ poppler/XRef.h | 1 +
+ 2 files changed, 40 insertions(+), 0 deletions(-)
+
+commit 8bd00dd0872191b8806e9411d9a1adc441f08a47
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:50:16 2008 +0100
+
+ Add some unfiltered methods to input stream.
+
+ With these methods, it is possible to read the raw content from the stream, without any filtering (even not the headers).
+
+ poppler/Stream.cc | 41 ++++++++++++++++++++++++++++-------------
+ poppler/Stream.h | 26 ++++++++++++++++++++++++++
+ 2 files changed, 54 insertions(+), 13 deletions(-)
+
+commit 8bcda287ddd316f90b3e47a3a307fbe63a5c21f7
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:46:53 2008 +0100
+
+ Add setNeedFree method to MemStream so it is possible to choose if the stream should take care of deleting the buffer.
+
+ poppler/Stream.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 4fbd143de7e3a8ab386dd14b057e62b3b9fe04e4
+Author: Julien Rebetez <julien@fhtagn.net>
+Date: Sat Jan 19 12:45:54 2008 +0100
+
+ Add Outstream, a base class for output streams and FileOutStream, which implements OutStream for output to a file.
+
+ poppler/Stream.cc | 55 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Stream.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 119 insertions(+), 0 deletions(-)
+
+commit 696eaa47169fb063b7e6998c876926c578b6fbfa
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jan 17 15:56:59 2008 +0100
+
+ Fix a crash when editing text form fields
+
+ poppler/Annot.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9ec1b28dcdade12498b94b650c26483581294ee6
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jan 17 14:54:34 2008 +0100
+
+ Fix a crash when a form field contains reference to non existant children
+
+ poppler/Form.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f7ed40c465033bad26dfda008c5984954baa0607
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jan 16 21:01:50 2008 +0100
+
+ Add a cast to fix build
+
+ glib/demo/info.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1c0aa21e598b879ec49d96700e6438ccb8ac2283
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Fri Jan 11 20:28:49 2008 +0100
+
+ rename info.c to info.cc to fix bug 14024
+
+ glib/demo/Makefile.am | 2 +-
+ glib/demo/info.c | 243 -------------------------------------------------
+ glib/demo/info.cc | 243 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 244 insertions(+), 244 deletions(-)
+
+commit 88f8bf850b6c41d25b9576597b5fc5bd75a122f4
+Author: Kjartan Maraas <kmaraas@gnome.org>
+Date: Thu Jan 10 23:51:54 2008 +0100
+
+ Fix two use after free bugs in HtmlOutputDev.cc
+
+ utils/HtmlOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 348f4f9d9d5b0f91da6f46e0fcefec80255d4179
+Merge: 8a8a4f0 4eca2e0
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Sat Jan 5 23:03:06 2008 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit 8a8a4f01272fb86898fafbda07129c0cbc03d527
+Author: Pino Toscano <pino@kde.org>
+Date: Sat Jan 5 23:02:22 2008 +0100
+
+ Make Document::renderHints return the correct render hints
+
+ qt4/src/poppler-document.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4eca2e041c93349e0c4666e83ad1ca3caff91dee
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jan 1 14:34:00 2008 +0100
+
+ Add page transitions demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/main.c | 16 ++-
+ glib/demo/transitions.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/transitions.h | 31 +++++
+ 4 files changed, 363 insertions(+), 7 deletions(-)
+
+commit e92b50bbd3dfc8657b611e3c33129d7c5bae2319
+Author: Koji Otani <sho@bbr.jp>
+Date: Wed Dec 26 18:56:01 2007 +0100
+
+ Use getEmbeddedFontID instead of getEmbeddedFontName to check if a font is embedded or not
+
+ poppler/GfxFont.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 30e9bae97e3742913015f7ea46636b2b80937612
+Author: Ed Catmur <ed@catmur.co.uk>
+Date: Sat Dec 22 22:54:51 2007 +0100
+
+ Fixlets for Adobe Glyph Naming convention implementation
+
+ poppler/GfxFont.cc | 94 ++++++++++++++++++++++++++-------------------------
+ 1 files changed, 48 insertions(+), 46 deletions(-)
+
+commit 40551e616b007ceb15c9d6e3d77c24538ffec924
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Sat Dec 22 14:31:50 2007 +0100
+
+ Check the destination page of the link does exist
+
+ qt4/src/poppler-link.cc | 20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+commit c06d6f2236d854f05e7621be280109ff27dc73b9
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Thu Dec 20 20:13:08 2007 +0100
+
+ Use UnicodeParsedString that does exactly what this code does
+
+ qt4/src/poppler-document.cc | 28 +---------------------------
+ 1 files changed, 1 insertions(+), 27 deletions(-)
+
+commit 5f9f06a10fdb72a9d809ee1f779e1a8f549840e7
+Author: Koji Otani <sho@bbr.jp>
+Date: Thu Dec 20 19:59:26 2007 +0100
+
+ Fix for latest CJK code
+
+ See http://lists.freedesktop.org/archives/poppler/2007-December/003244.html for more information
+
+ poppler/GfxFont.cc | 14 ++++++++++----
+ 1 files changed, 10 insertions(+), 4 deletions(-)
+
+commit bb49e1e3909fc7392c197dc67d9b7f5312fd0dad
+Author: Ed Catmur <ed@catmur.co.uk>
+Date: Tue Dec 18 20:20:11 2007 +0100
+
+ Implement Adobe Glyph Naming convention
+
+ poppler/GfxFont.cc | 183 +++++++++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 154 insertions(+), 29 deletions(-)
+
+commit 5634d63abdd64d371f2e8687a1c172f55b052008
+Author: Koji Otani <sho@bbr.jp>
+Date: Mon Dec 17 20:43:41 2007 +0100
+
+ Allow seting some more Graphics States (Font, LW, LC, LJ, ML, D, RI, FL) by operator 'gs'
+
+ poppler/Gfx.cc | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 67 insertions(+), 0 deletions(-)
+
+commit 7a9e7fc96b47b9d833300233ac38bbd60097f425
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Dec 16 21:21:08 2007 +0100
+
+ Add AnnotLink class so that link annots are properly recognized
+
+ Right now, all of the annots except Text, are created using the
+ base class Annot which sets the type to unknown. For link annots this
+ causes the border never be drawn, since we are checking first whether the
+ annot is a Link and it's always false.
+
+ poppler/Annot.cc | 12 +++++++++++-
+ poppler/Annot.h | 10 ++++++++++
+ 2 files changed, 21 insertions(+), 1 deletions(-)
+
+commit 796d9cb9b188a8af69d7fbf9bccbb408cbf6a71a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Dec 15 15:21:49 2007 +0100
+
+ Fix a crash when trying to create a temp annot with catalog = NULL
+
+ poppler/Annot.cc | 7 +++++++
+ poppler/Annot.h | 1 +
+ poppler/Form.cc | 6 ++----
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 99f049f0dfbfd9c22bea56ae96253837ae421e23
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Dec 14 15:26:24 2007 +0100
+
+ Use the default dash array when it's not correct in AnnotBorderBS
+
+ poppler/Annot.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit cb2a997aa6f9dd5508ca8b04e63815da893497ef
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Dec 14 14:12:14 2007 +0100
+
+ Fix another crash due to uninitialized variables
+
+ poppler/Annot.cc | 18 ++++++++----------
+ poppler/Annot.h | 1 +
+ 2 files changed, 9 insertions(+), 10 deletions(-)
+
+commit f704e86d8c72bacbd9443c4d828cd284d3a11753
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Dec 14 12:58:12 2007 +0100
+
+ Fix several crashes due to uninitialized variables in Annots.
+
+ poppler/Annot.cc | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 0820a93ba1c0e893681024feb9f9bd120a9eeb4d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Dec 14 12:38:58 2007 +0100
+
+ Check whether top and left should be changed in FitH, FitV, FitBH and FitBV destinations
+
+ According to the spec, if a null value is specified for top or left parameter in such
+ destinations, the parameter should be retained unchanged.
+
+ poppler/Link.cc | 36 ++++++++++++++++++++++++++++--------
+ 1 files changed, 28 insertions(+), 8 deletions(-)
+
+commit 0fb42a2f557d5ec83b42326eb6b0be41622ca328
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Wed Dec 12 01:02:31 2007 +0100
+
+ Changed getters to const
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 28 ++++++++++----------
+ poppler/Annot.h | 72 +++++++++++++++++++++++++++---------------------------
+ 2 files changed, 50 insertions(+), 50 deletions(-)
+
+commit 29d39a8ae120e6045a16a7aa0944c36560b42508
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Dec 10 17:56:44 2007 +0100
+
+ AnnotText support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/Annot.h | 65 ++++++++++++++++++++++++----
+ 2 files changed, 177 insertions(+), 11 deletions(-)
+
+commit 2acecde458122bd67487cc302478befa78bf6fbe
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Dec 10 16:45:46 2007 +0100
+
+ AnnotMarkup support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 51 ++++++++++++++++++++++++
+ 2 files changed, 166 insertions(+), 0 deletions(-)
+
+commit 1f8c1fe34e04688d2ba200f1166cfdd1ffe563f0
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Dec 10 16:34:01 2007 +0100
+
+ AnnotPopup support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 34 ++++++++++++++++++++++++++++++++++
+ poppler/Annot.h | 21 +++++++++++++++++++++
+ 2 files changed, 55 insertions(+), 0 deletions(-)
+
+commit 6c83e06fb2eb77d0dbefd1ebfbcac3e5f0cbb622
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Dec 10 16:24:38 2007 +0100
+
+ Prepare code to Annotation Subtype support.
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ glib/poppler-page.cc | 11 +---
+ poppler/Annot.cc | 160 ++++++++++++++++++++++++++++++++++++--------------
+ poppler/Annot.h | 54 ++++++++++++++---
+ poppler/Form.cc | 6 ++-
+ 4 files changed, 167 insertions(+), 64 deletions(-)
+
+commit fa0bb5bbea5bf2769c8b3084f78770b7781002eb
+Author: Iñigo Martínez <inigomartinez@gmail.com>
+Date: Mon Dec 10 15:41:38 2007 +0100
+
+ Various Annot improvements
+
+ Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com>
+
+ poppler/Annot.cc | 613 +++++++++++++++++++++++++++++++++++-------------------
+ poppler/Annot.h | 140 +++++++++++-
+ poppler/Gfx.cc | 21 ++-
+ poppler/Gfx.h | 5 +-
+ 4 files changed, 543 insertions(+), 236 deletions(-)
+
+commit e0f49fd5aef3c798798ad7e7dba55857bde1b4c0
+Author: Koji Otani <sho@bbr.jp>
+Date: Thu Dec 13 23:40:46 2007 +0100
+
+ Some CJK charecters are displayed vertical glyphs incorrectly when horizontal mode
+
+ poppler/GfxFont.cc | 46 +++++++++++++++++++++++++---------------------
+ 1 files changed, 25 insertions(+), 21 deletions(-)
+
+commit 85901922bf354a1268037d0b6ec5cbf14da979a1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 13 23:30:59 2007 +0100
+
+ Yet another gmallocn to gmallocn_checkoverflow
+
+ Fixes http://bugs.kde.org/show_bug.cgi?id=153949
+
+ poppler/SplashOutputDev.cc | 23 ++++++++++++++++-------
+ 1 files changed, 16 insertions(+), 7 deletions(-)
+
+commit f24259cddb9c5e02cf9d2071bfa0106f3e88bd59
+Author: Koji Otani <sho@bbr.jp>
+Date: Mon Dec 10 23:24:14 2007 +0100
+
+ Display characters outside of unicode BMP with TT font
+
+ fofi/FoFiTrueType.cc | 33 +++++++++++++++++++--
+ fofi/FoFiTrueType.h | 2 +-
+ poppler/CMap.cc | 34 ++++++++++++++++++++++
+ poppler/CMap.h | 4 ++
+ poppler/GfxFont.cc | 75 +++++++++++++++++++++++++++++++------------------
+ 5 files changed, 115 insertions(+), 33 deletions(-)
+
+commit 7cbabbf378cf5a9c0411558ff02b44dec2040ea1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Dec 10 22:00:30 2007 +0100
+
+ Fix a crash when marked content properties operator is not a dict.
+
+ poppler/Gfx.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e807f9c72c7f0c5cc0655918f676f4af54739442
+Merge: bf57117 e2ea743
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 9 18:07:30 2007 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit bf57117df8786778faf31e5d843533004f867ff3
+Author: Adrian Johnson <ajohnson@redneon.com>
+Date: Sun Dec 9 18:07:00 2007 +0100
+
+ Add support for ActualText entries
+
+ Patch by Adrian Johnson with two minor changes by me (one fordward declaration and a leak fix)
+
+ poppler/Form.cc | 2 +-
+ poppler/Gfx.cc | 2 +-
+ poppler/OutputDev.cc | 2 +-
+ poppler/OutputDev.h | 2 +-
+ poppler/PDFDocEncoding.h | 4 ++
+ poppler/TextOutputDev.cc | 98 +++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/TextOutputDev.h | 11 +++++
+ 7 files changed, 116 insertions(+), 5 deletions(-)
+
+commit e2ea7430e7d6db50cbfdac34713915e5b0942a89
+Author: Albert Astals Cid <tsdgeos@localhost.(none)>
+Date: Sat Dec 8 23:21:34 2007 +0100
+
+ disable warnings about assigning const char * to char *
+
+ We have them all over the place and we are not going to fix it as that'll be too much overhead when re-merging xpdf changes
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit acf70c666d4f534cd97de64d4378bf6399e31fd4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 6 23:58:26 2007 +0100
+
+ Disable gtk tests if the user disabled glib frontend
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bb0ec68f21d355081ff75aad641bc3809141e398
+Merge: 5a34cdd b925ea2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 6 18:38:54 2007 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit b925ea232b6ed5028712600f9aebe453f3b2ba06
+Author: Brad Hards <bradh@kde.org>
+Date: Tue Dec 4 19:11:13 2007 +1100
+
+ Remove redundant check.
+
+ poppler/PSOutputDev.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 275afca4ef24020273df652ccfdf76c6994e9294
+Author: Brad Hards <bradh@kde.org>
+Date: Sun Dec 2 19:45:16 2007 +1100
+
+ Preserve PDF page labels when we output as postscript.
+
+ Resolves bug 13338.
+
+ poppler/PSOutputDev.cc | 81 +++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/PSOutputDev.h | 2 +
+ 2 files changed, 82 insertions(+), 1 deletions(-)
+
+commit 641edb83a457083c13f3e374f6ac6c570dd54d7f
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Nov 28 19:42:53 2007 +1100
+
+ Minor API documentation update
+
+ qt4/src/poppler-annotation.h | 81 ++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 79 insertions(+), 2 deletions(-)
+
+commit 3635ec6fcbc89daf633c03efb644df9031b80f59
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Nov 28 19:42:22 2007 +1100
+
+ Update doxygen configuration file to version 1.5.3
+
+ qt4/src/Doxyfile | 185 +++++++++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 141 insertions(+), 44 deletions(-)
+
+commit 02c7ea6e1fd3e225de1eda231813f4db0ffb9fdb
+Author: Brad Hards <bradh@kde.org>
+Date: Wed Nov 28 19:41:54 2007 +1100
+
+ Fix off-by-one in printCommands path.
+
+ poppler/Gfx.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 74af7c1209f47ed39addf7fde3ea106a7c77a408
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Nov 24 18:12:00 2007 +0100
+
+ Convert passwords from utf-8 to latin-1 when needed. Fixes bug #4557
+
+ glib/poppler-document.cc | 16 ++++++++++++++--
+ 1 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 5a34cddf043cb484549cb411e034786a7d8688a3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 23 23:13:57 2007 +0100
+
+ add a ignore
+
+ glib/demo/.gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 21a58562cc1e575ec3d81b6e34bfcb21306eb67f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 23 23:12:06 2007 +0100
+
+ sscanf does not like null strings, so don't call it on empty qstrings
+
+ qt/poppler-document.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6f8451cf9d19f57f658d1568643ecb0f953e1075
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Nov 11 21:29:40 2007 -0500
+
+ Add support for knockout groups to the cairo backend
+
+ This is sort of hacky because we need to keep track of shape and opacity
+ seperately. It is also probably not entirely correct. However, it should be
+ closer than previously.
+
+ poppler/CairoOutputDev.cc | 309 +++++++++++++++++++++++++++++++++++++++++++--
+ poppler/CairoOutputDev.h | 8 +-
+ 2 files changed, 303 insertions(+), 14 deletions(-)
+
+commit b0fbfb0ac366434d7e4c0350a9be83ddda7b03cf
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Nov 11 16:06:16 2007 -0500
+
+ Track the AlphaIsShape and TextKnockout state
+
+ Parse, store and notify the OutputDevices about these entries.
+
+ poppler/Gfx.cc | 14 ++++++++++++++
+ poppler/GfxState.h | 6 ++++++
+ poppler/OutputDev.h | 2 ++
+ 3 files changed, 22 insertions(+), 0 deletions(-)
+
+commit f6429b13a972f2deb25b3d3a9948dca024a54841
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Nov 10 14:08:09 2007 -0500
+
+ Fix accidental mode change.
+
+ 0 files changed, 0 insertions(+), 0 deletions(-)
+
+commit 5797f50a99d1494767edc5928f9c3e9d927b946d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Nov 10 01:52:00 2007 -0500
+
+ Scale text to match 'm' size
+
+ This adds back the hack that was removed when fontconfig support was added long
+ ago. It's not a great solution but lets us be at least as good as xpdf. Fixes
+ #12304 with the cairo backend. The problem persists with the splash backend.
+
+ poppler/CairoFontEngine.cc | 56 +++++++++++++++++++++++++++++++++++++++++--
+ poppler/CairoFontEngine.h | 7 ++++-
+ poppler/CairoOutputDev.cc | 8 ++++-
+ 3 files changed, 65 insertions(+), 6 deletions(-)
+
+commit 551212e55127c7e46d9aff3318015fd9b5385687
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Nov 10 11:56:15 2007 +0100
+
+ Fix uninitialized variable access
+
+ Supported by Derek B. Noonburg
+
+ poppler/GfxState.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 934a5ae45eb17bd0e2010be89f55510e8a69816b
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Nov 3 13:08:51 2007 -0400
+
+ Avoiding using floating point when converting to luminance.
+
+ The code now also does proper rounding instead of just truncating.
+
+ poppler/CairoOutputDev.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1b3f045a25e5d172357bc87c15ba591c8e1511a7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Nov 8 23:34:07 2007 +0100
+
+ Move another gmallocn to gmallocn_checkoverflow. Fixes crashes on incorrect pdf sent by Red Hat
+
+ poppler/Stream.cc | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+commit 944d327fd7036332a33b4ad6476ceca7a650ef6e
+Merge: fb1d1f4 c340255
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 7 23:52:47 2007 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit fb1d1f459784a6c19034212a617268f7f5a90e9c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 7 23:51:58 2007 +0100
+
+ merge ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch
+
+ poppler/Stream.cc | 417 ++++++++++++++++++++++++++++++-----------------------
+ poppler/Stream.h | 10 +-
+ 2 files changed, 245 insertions(+), 182 deletions(-)
+
+commit c340255f46bc95b5f850abcd3d9bcdc8594199bb
+Author: Brad Hards <bradh@kde.org>
+Date: Mon Nov 5 20:36:23 2007 +1100
+
+ Update .gitignore
+
+ Suppress the noise a bit.
+
+ qt4/.gitignore | 1 +
+ qt4/tests/.gitignore | 3 +++
+ test/.gitignore | 2 ++
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+commit cebf770379e7d71166e729aebf771a4ca291d48b
+Author: Brad Hards <bradh@kde.org>
+Date: Mon Nov 5 20:31:18 2007 +1100
+
+ Add a new unit test, for non-ASCII searching.
+
+ There is a bug report (bug:7063) about not being able
+ to find text that isn't ASCII. I think that the problem isn't
+ in poppler core code - this unit test shows we can find
+ characters as long as they are properly encoded (which the
+ Qt4 front end does).
+
+ qt4/tests/Makefile.am | 7 ++++++-
+ qt4/tests/check_search.cpp | 40 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 46 insertions(+), 1 deletions(-)
+
+commit 570fe464a2aae4f22d0b47cce73b8bc36b116e9f
+Merge: 1c7b7a0 7875067
+Author: Brad Hards <bradh@kde.org>
+Date: Mon Nov 5 15:55:39 2007 +1100
+
+ Merge branch 'minor-fixes'
+
+commit 78750679e213d7307cce38166b6af32562e871b8
+Author: Brad Hards <bradh@kde.org>
+Date: Mon Nov 5 15:54:36 2007 +1100
+
+ Additional check for password protected documents
+
+ We need to bail out on locked documents. In the future,
+ we could probably go interactive, and ask the user for
+ a password.
+
+ qt4/tests/test-poppler-qt4.cpp | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 1c7b7a0c581b542945cac257202bbb819d33694c
+Author: Brad Hards <bradh@kde.org>
+Date: Mon Nov 5 15:49:45 2007 +1100
+
+ Minor Qt4 API documentation fix
+
+ Also, this is a test of my git newbie-ness.
+
+ qt4/src/poppler-form.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit b86fc565d175835cf27e9c8632da47a5e0b50237
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 5 00:14:55 2007 +0100
+
+ Fix FSF address
+
+ glib/demo/fonts.c | 2 +-
+ glib/demo/fonts.h | 2 +-
+ glib/demo/forms.c | 2 +-
+ glib/demo/forms.h | 2 +-
+ glib/demo/info.c | 2 +-
+ glib/demo/info.h | 2 +-
+ glib/demo/links.c | 2 +-
+ glib/demo/links.h | 2 +-
+ glib/demo/main.c | 2 +-
+ glib/demo/outline.c | 2 +-
+ glib/demo/outline.h | 2 +-
+ glib/demo/page.c | 2 +-
+ glib/demo/page.h | 2 +-
+ glib/demo/render.c | 2 +-
+ glib/demo/render.h | 2 +-
+ glib/demo/utils.c | 2 +-
+ glib/demo/utils.h | 2 +-
+ glib/poppler-action.cc | 2 +-
+ glib/poppler-action.h | 2 +-
+ glib/poppler-attachment.cc | 2 +-
+ glib/poppler-attachment.h | 2 +-
+ glib/poppler-document.cc | 2 +-
+ glib/poppler-document.h | 2 +-
+ glib/poppler-features.h.in | 2 +-
+ glib/poppler-form-field.cc | 2 +-
+ glib/poppler-form-field.h | 2 +-
+ glib/poppler-page.cc | 2 +-
+ glib/poppler-page.h | 2 +-
+ glib/poppler.cc | 2 +-
+ glib/poppler.h | 2 +-
+ poppler/PageTransition.cc | 2 +-
+ poppler/Sound.cc | 2 +-
+ poppler/Sound.h | 2 +-
+ qt/poppler-document.cc | 2 +-
+ qt/poppler-fontinfo.cc | 2 +-
+ qt/poppler-link-qt3.h | 2 +-
+ qt/poppler-link.cc | 2 +-
+ qt/poppler-page-transition-private.h | 2 +-
+ qt/poppler-page-transition.cc | 2 +-
+ qt/poppler-page-transition.h | 2 +-
+ qt/poppler-page.cc | 2 +-
+ qt/poppler-private.h | 2 +-
+ qt/poppler-qt.h | 2 +-
+ qt4/src/poppler-annotation-helper.h | 2 +-
+ qt4/src/poppler-annotation-private.h | 2 +-
+ qt4/src/poppler-annotation.cc | 2 +-
+ qt4/src/poppler-annotation.h | 2 +-
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-embeddedfile.cc | 2 +-
+ qt4/src/poppler-fontinfo.cc | 2 +-
+ qt4/src/poppler-form.cc | 2 +-
+ qt4/src/poppler-form.h | 2 +-
+ qt4/src/poppler-link-extractor-private.h | 2 +-
+ qt4/src/poppler-link-extractor.cc | 2 +-
+ qt4/src/poppler-link.cc | 2 +-
+ qt4/src/poppler-link.h | 2 +-
+ qt4/src/poppler-page-private.h | 2 +-
+ qt4/src/poppler-page.cc | 2 +-
+ qt4/src/poppler-private.h | 2 +-
+ qt4/src/poppler-ps-converter.cc | 2 +-
+ qt4/src/poppler-qt4.h | 2 +-
+ qt4/src/poppler-sound.cc | 2 +-
+ qt4/src/poppler-textbox.cc | 2 +-
+ 63 files changed, 63 insertions(+), 63 deletions(-)
+
+commit 37776afc6f8a5733b41da6fb0f45e7ace4edf737
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 5 00:03:55 2007 +0100
+
+ Update from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+
+ COPYING | 27 +++++++++++++--------------
+ 1 files changed, 13 insertions(+), 14 deletions(-)
+
+commit 34a90b35998b65539cf1e8f09194d45db71064a1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 4 14:03:35 2007 +0100
+
+ Remove duplicate checking
+
+ poppler/JBIG2Stream.cc | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+commit d694e1dd042fb97fbc62046b69cafe30d6f9ea58
+Merge: ba5b31c 432e657
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 4 13:26:47 2007 +0100
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit ba5b31c6a8b2317332bfa148f6d80f66891fb9ce
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Nov 4 13:25:12 2007 +0100
+
+ Require fontconfig >= 2.0 Fixes bug 9020
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 432e657a49cb097638a79e38c141088039572816
+Author: Jeff Muizelaar <jeff@freiheit.infidigm.net>
+Date: Mon Sep 17 19:15:21 2007 -0400
+
+ Use realloc/free instead of new/delete when resizing GooStrings
+
+ This allows for a large performance improvement when appending a large number
+ of characters to a GooString. This is especially helpful for TextOutputDev on
+ large PDFs. For example, the following code has the potential to be O(n) instead of
+ O(n²) with a good implementation of realloc.
+
+ while (n) {
+ string.append(character);
+ n--;
+ }
+
+ goo/GooString.cc | 30 +++++++++++++++++-------------
+ 1 files changed, 17 insertions(+), 13 deletions(-)
+
+commit cb80112afed2c5b9642c3c43f1cc001ed88d08cb
+Author: Jonathan Kew <jonathan_kew@sil.org>
+Date: Thu Nov 1 20:53:05 2007 +0100
+
+ Do not try to parse directories when processing nameToUnicode dir. Fixes ugly warnings on mingw32
+
+ poppler/GlobalParams.cc | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit ad6b888edff7b30be72df948c4052b9934a37705
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Thu Nov 1 20:48:21 2007 +0100
+
+ Add some castings to make it compile
+
+ glib/test-poppler-glib.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a968dcc759379f48265c91bea63ca4cf987d94a9
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Wed Oct 31 23:53:39 2007 +0100
+
+ Tests for passwords
+
+ qt4/tests/Makefile.am | 13 +++++-
+ qt4/tests/check_password.cpp | 87 ++++++++++++++++++++++++++++++++++++++
+ qt4/tests/stress-poppler-dir.cpp | 63 +++++++++++++++++++++++++++
+ qt4/tests/test-poppler-qt4.cpp | 15 ++++++-
+ 4 files changed, 175 insertions(+), 3 deletions(-)
+
+commit 7b7a08863a8278dee7aa1fe7789cf72223c26b35
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Oct 31 23:53:27 2007 +0100
+
+ Improve documentation
+
+ qt4/src/poppler-qt4.h | 64 ++++++++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 56 insertions(+), 8 deletions(-)
+
+commit 96493c9409186a7e964e894c7f730962b6995fd7
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Wed Oct 31 23:51:25 2007 +0100
+
+ remove old file
+
+ glib/test-poppler-glib.c | 514 ----------------------------------------------
+ 1 files changed, 0 insertions(+), 514 deletions(-)
+
+commit 951a05f7a11af4a44e4cb85a015939d6a3e513f5
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Sat Oct 27 12:33:22 2007 +0200
+
+ Remove fordward declaration of a non-existant class
+
+ poppler/Form.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 289679405ab143bc2106cf269227c514a1602e56
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Oct 25 22:16:10 2007 -0400
+
+ Avoid drawing borders unless /W and /S are specified in /BS
+
+ Acroread doesn't sometimes doesn't draw borders when you'd
+ expect it to. Special case that behaviour so that we do the
+ same thing.
+
+ poppler/Annot.cc | 15 ++++++++++++---
+ 1 files changed, 12 insertions(+), 3 deletions(-)
+
+commit ab0a6c37faf9916edcd70e128d9f2654eb795ace
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Thu Oct 25 20:56:58 2007 +0200
+
+ Fix compilation on mingw. Bug 12493
+
+ Added a check for localtime_r in configure.ac
+ Moved test-poppler-glib.c to test-poppler-glib.cc to get the correct compiler
+
+ configure.ac | 1 +
+ glib/Makefile.am | 2 +-
+ glib/test-poppler-glib.cc | 520 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 522 insertions(+), 1 deletions(-)
+
+commit 6bd637dc135045b20abf024d394538d7a3160795
+Merge: c01ab71 25b273d
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Tue Oct 23 23:27:01 2007 +0200
+
+ Merge branch 'master' of ssh://aacid@git.freedesktop.org/git/poppler/poppler
+
+commit c01ab714ecd42e39ecb0be1c0c2504635251ac01
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Tue Oct 23 23:26:21 2007 +0200
+
+ Provide setters for some methods that only had getters. Fixes bug 12894
+
+ poppler/GlobalParams.cc | 49 +++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/GlobalParams.h | 7 ++++++
+ 2 files changed, 56 insertions(+), 0 deletions(-)
+
+commit 25b273db677815c8df11e52fe9df29fe857a8a88
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Oct 22 23:01:37 2007 -0400
+
+ Unset the font if it doesn't exist or we can not load it properly
+
+ Previously, the previous font stayed current and glyphs would be drawn using
+ it. This resulted in random glyphs being chosen unless the encodings happened
+ to match. Now, instead, we draw nothing which matches the behaviour of
+ acroread.
+
+ poppler/Gfx.cc | 4 ++++
+ poppler/GfxFont.cc | 4 ++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 57331767ed5306eba1f9bf60e48fc88debdc2198
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Oct 22 23:33:59 2007 +0200
+
+ builddir != srcdir fixes by Christian Persch <chpe gnome org>
+
+ autogen.sh | 7 ++++---
+ glib/demo/Makefile.am | 1 +
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 2a333e5a618b5c92f3c703816b950321f25d3aab
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Oct 22 22:14:43 2007 +0200
+
+ Splash rework, check if font is inside clip area before rendering it to a temporary bitmap. Fixes KDE bug 150693
+
+ This change is not trivial. What i did is:
+ It is getGlyph the one that does the intersection between clip area and rendering area of the font instead fillGlyph2
+ That means some clipRes = state->clip->testRect but we win more robustness against broken pdf that specify HUGE fonts
+
+ splash/Splash.cc | 207 ++++++++++++++++++++++++------------------------
+ splash/Splash.h | 4 +-
+ splash/SplashFTFont.cc | 23 +++++-
+ splash/SplashFTFont.h | 4 +-
+ splash/SplashFont.cc | 29 ++++++--
+ splash/SplashFont.h | 5 +-
+ splash/SplashT1Font.cc | 11 ++-
+ splash/SplashT1Font.h | 4 +-
+ 8 files changed, 162 insertions(+), 125 deletions(-)
+
+commit cf785cd12ae77e8dd778ed043584f8f26efe675f
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Oct 22 21:59:35 2007 +0200
+
+ Add gmallocn_checkoverflow, it's the same as gmallocn but returns NULL on overflow instead of doing exit()
+
+ goo/gmem.cc | 18 ++++++++++++++++++
+ goo/gmem.h | 3 +++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 37e16ac301a35ceca2e3535f8c6100d4cf723c82
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Oct 22 21:54:02 2007 +0200
+
+ exit(1) is bad in library code, use the src.abort method to describe failure
+
+ poppler/DCTStream.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit dbe975c129999a3efceb1c86518fa6fda74f685c
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Oct 22 11:25:37 2007 +0200
+
+ Fix a crash with invalid TrueType fonts
+
+ fofi/FoFiTrueType.cc | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 8bfe30a48fd7021591ab307bd51f86c06ff202b9
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Oct 19 15:46:50 2007 +0200
+
+ Do not generate appearance stream for radio button that are not active
+
+ poppler/Annot.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Oct 19 13:12:24 2007 +0200
+
+ Fix a crash with invalid embedded fonts
+
+ poppler/CairoFontEngine.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit e1740278457e512676b623bcdf9968193f0a8d7b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Oct 19 12:21:54 2007 +0200
+
+ Do not draw annotations when rendering for printing
+
+ glib/poppler-page.cc | 25 ++++++++++++++++++++++---
+ poppler/Annot.h | 2 ++
+ 2 files changed, 24 insertions(+), 3 deletions(-)
+
+commit a4d25f79dfc1a7e4998e2e113ef92312bd4af553
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Oct 16 15:24:08 2007 +0200
+
+ Detect form fields at any depth level
+
+ We were ignoring non root form fields that contain only a kids dictionary.
+ See evince bug: http://bugzilla.gnome.org/show_bug.cgi?id=486957
+
+ poppler/Form.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 03e1da99f7393fb1103643311b0b5af7b875e09c
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Oct 13 19:38:15 2007 -0400
+
+ Add an implementation of CairoOutputDev::startPage()
+
+ The implementation initializes fill_pattern and stroke_pattern
+ to black matching SplashOutputDev. This fixes #12504.
+
+ poppler/CairoOutputDev.cc | 9 +++++++++
+ poppler/CairoOutputDev.h | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 825c942d46e0c3e254028441015c5dd8440cc734
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Fri Oct 12 13:47:09 2007 +0200
+
+ Copy the embeddef file description string correctly
+
+ poppler/Catalog.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 5e60da78695eff44cc10dbce46ef170727f682b1
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Fri Oct 12 13:46:52 2007 +0200
+
+ Correctly delete the embedded file stream
+
+ qt4/src/poppler-embeddedfile.cc | 1 +
+ qt4/src/poppler-private.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1627fbbde8be01af3bdd2583f3439897a37d5215
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Oct 6 23:27:40 2007 -0400
+
+ Use maskWidth and maskHeight for reading from the mask image in CairoOutputDev::drawMaskedImage()
+
+ Previously, drawMaskedImage() was incorrectly using the image width and height which is
+ wrong when width != maskWidth or heigh != maskHeight. Fixes #12668.
+
+ poppler/CairoOutputDev.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3156d560c5eaf6970da422d0b09fd2e95bfe6d1d
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Oct 5 11:34:01 2007 +0200
+
+ Fix a crash when Form Fields array contains references
+ to non existent objects. Fixes bug #11865
+
+ poppler/Form.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit f0b5e6286e94c6153c8247b5fae63a18622c48d3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Oct 4 15:22:01 2007 +0200
+
+ Do not return unknown field type for signature form fields
+
+ glib/poppler-form-field.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 498fd7fb99b01a879d07e2ad12c0b9462a8fc438
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Oct 4 12:36:39 2007 +0200
+
+ Add poppler_page_render_for_printing() and poppler_page_render_to_pixbuf_for_printing()
+
+ We were unconditionally passing printing=gFalse to displaySlice. With these new
+ functions we can render to a pixbuf or cairo surface passing printing=gTrue to
+ displaySlice.
+
+ glib/poppler-page.cc | 135 ++++++++++++++++++++++++++++++++++++++++----------
+ glib/poppler-page.h | 10 ++++
+ 2 files changed, 119 insertions(+), 26 deletions(-)
+
+commit 56af69787c78c2edbb69266e86a5a5b639ca6d3e
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Oct 3 23:02:25 2007 -0400
+
+ Error out if we can't find a .cidToUnicode for a known character collection
+
+ This situation was caused by the fixes for bug #11413. I'm not sure
+ it's the best thing to do, but it seems better.
+
+ poppler/GfxFont.cc | 19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 3d0df46908379bce1d196b9dc41153b1adb5f725
+Author: Michael Wolf <maw@ximian.com>
+Date: Wed Oct 3 19:43:55 2007 +0200
+
+ Fix compile warning
+
+ glib/test-poppler-glib.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit aba29e12528025c2cc71bf46e02e76ac4db2b193
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Sep 28 21:01:50 2007 +0200
+
+ Add forms demo to glib poppler demo
+
+ glib/demo/Makefile.am | 2 +
+ glib/demo/forms.c | 489 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/forms.h | 31 +++
+ glib/demo/main.c | 8 +-
+ glib/demo/utils.c | 1 -
+ 5 files changed, 527 insertions(+), 4 deletions(-)
+
+commit d0c0f26d2c95232c216e3daa15e98a3aff14ac27
+Merge: 59d55f7 38d5bb1
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Tue Sep 25 03:33:52 2007 -0700
+
+ Merge branch 'master' of ssh://kjk@git.freedesktop.org/git/poppler/poppler
+
+commit 38d5bb150a5fe883da1d4256463d1f796d201283
+Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)>
+Date: Tue Sep 25 16:13:51 2007 -0700
+
+ Silence deprecation warnings - annoying with msvc 2005.
+
+ makefile.vc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 59d55f7371bee81c9392fa2d4174ceffaacde471
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Tue Sep 25 01:21:19 2007 -0700
+
+ Fix misleading comment.
+
+ goo/GooTimer.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c36d8afc984795aca0a12a94ec7668092067db82
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Tue Sep 25 00:32:29 2007 -0700
+
+ Revert "replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) != a' which, due to type promotions, if a is int, is equivalent to a < 0; fix problems revealed by the change"
+
+ This reverts commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec.
+
+ poppler/XRef.cc | 25 +++++++++++++++++++++----
+ 1 files changed, 21 insertions(+), 4 deletions(-)
+
+commit ff25e83abae1ca17e2e7dd6f20946026fca69fff
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 23:57:25 2007 -0700
+
+ Make perf-test compile on unix as well.
+
+ test/Makefile.am | 16 ++++++-
+ test/perf-test-preview-dummy.cc | 1 +
+ test/perf-test.cc | 104 ++++++++++++++++-----------------------
+ 3 files changed, 59 insertions(+), 62 deletions(-)
+
+commit 70f3bf42b3028d9a2e4aefdc2e1a458b3c77b0e7
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 21:26:54 2007 -0700
+
+ Let perf-test.cc manage lifetime of rendered bitmap.
+
+ test/perf-test-preview-win.cc | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit b622b252cba068a15eae77df5deb261dd98affaf
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 21:20:12 2007 -0700
+
+ Disable my_error for now - seems to corrupt memory.
+
+ test/perf-test.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit bde8c9669ca6b43cb6a664bd14df164a718041ea
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 21:08:58 2007 -0700
+
+ Con't copy the file unless COPY_FILE is defined.
+
+ test/perf-test.cc | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit bf9b46b012c64624818a2110af7c4b7e3b419728
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 20:13:54 2007 -0700
+
+ Respect -loadonly cmd-line arg.
+
+ test/perf-test.cc | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 2f664b654ca19135f0f8a0fe89872b9e0d526fa2
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 19:41:45 2007 -0700
+
+ Fix msvc debug build. Fix bitmap leak in perf-test.
+
+ makefile.vc | 6 ++++--
+ test/perf-test.cc | 1 +
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 05d41cd5aec39b4e3c8949445a9986e5ca8b50dd
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 08:10:37 2007 -0700
+
+ Use GooTimer instead of my own timer.
+
+ test/perf-test.cc | 98 ++++------------------------------------------------
+ 1 files changed, 8 insertions(+), 90 deletions(-)
+
+commit 05fbce5b6657e883ece9054c79576b25271a05a4
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Mon Sep 24 08:01:11 2007 -0700
+
+ Make GooTimer work for Windows/msvc build.
+
+ goo/GooTimer.cc | 69 +++++++++++++++++++++++++++++++++++++-----------------
+ goo/GooTimer.h | 28 +++++++++++++--------
+ poppler/Gfx.cc | 11 +-------
+ 3 files changed, 66 insertions(+), 42 deletions(-)
+
+commit 6347915085a487da08d39a859f4261fa812dab09
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 24 01:08:17 2007 -0700
+
+ Add Error.cc in msvc build and use setErrorFunction in perf-test.
+
+ makefile.vc | 3 +--
+ test/perf-test.cc | 10 +++++-----
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+commit ed01b3965c57ce2a4eabf9c46b5319ea627d3324
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 24 01:03:09 2007 -0700
+
+ Match declaration of setErrorFunction with its definition.
+
+ Also enable this code for Windows, since CDECL was what
+ was throwing msvc off.
+
+ poppler/Error.cc | 12 +++---------
+ 1 files changed, 3 insertions(+), 9 deletions(-)
+
+commit 71fb15f8bd131a13d8cf0f394fe601cfbb6e1772
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 24 00:38:29 2007 -0700
+
+ Even less compiler warnings.
+
+ poppler/CairoOutputDev.cc | 6 +++---
+ qt/poppler-page.cc | 3 +++
+ utils/HtmlOutputDev.cc | 10 ++++++----
+ 3 files changed, 12 insertions(+), 7 deletions(-)
+
+commit 7ba3f198a0651d2a7c91b7d9e10a5173dc3de0a3
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 24 00:32:37 2007 -0700
+
+ Even less compiler warnings.
+
+ qt/poppler-document.cc | 8 ++++++++
+ qt/poppler-private.h | 8 --------
+ qt4/src/poppler-document.cc | 10 ++++++++++
+ qt4/src/poppler-form.cc | 15 +++++++++++++++
+ qt4/src/poppler-private.h | 25 -------------------------
+ 5 files changed, 33 insertions(+), 33 deletions(-)
+
+commit ab1059f594cb9fccd8568ca2a535a363c7521daa
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 24 00:14:01 2007 -0700
+
+ Don't break aliasing.
+
+ poppler/GlobalParams.cc | 40 ++++++++++++++++++----------------------
+ 1 files changed, 18 insertions(+), 22 deletions(-)
+
+commit 71c47b30adf687a0bcece22834933267053360de
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 23:49:31 2007 -0700
+
+ Reduce compiler warnings.
+
+ poppler/JBIG2Stream.cc | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 8466d94929844c976bbad8bb7d1ea7f7f77cc196
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 23:34:52 2007 -0700
+
+ Reduce compiler warnings. Tabs to spaces.
+
+ fofi/FoFiType1C.cc | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+commit c53b8ccfba6fa4345086493f9e44212721c11d0a
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 23:23:34 2007 -0700
+
+ Reduce number of compiler warnings.
+
+ poppler/CharCodeToUnicode.cc | 2 +-
+ poppler/Gfx.cc | 6 ++----
+ poppler/PageLabelInfo.cc | 2 ++
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit abede2a06c5c9dc97b40479deda49621458f1171
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 23:03:36 2007 -0700
+
+ Reduce number of compiler warnings.
+
+ glib/poppler-action.cc | 1 -
+ glib/poppler-document.cc | 9 ++-------
+ glib/poppler-page.cc | 3 +--
+ qt/poppler-document.cc | 1 -
+ qt4/src/poppler-annotation.cc | 16 +++++++++++++---
+ 5 files changed, 16 insertions(+), 14 deletions(-)
+
+commit 60f5bcea4a920441e25ae11d677636242aabb2db
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 22:48:06 2007 -0700
+
+ Remove unused variables.
+
+ utils/pdftoppm.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3179eee44eb0afbc642675268b9a4abb16ccdde3
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 22:47:21 2007 -0700
+
+ Remove unused variables.
+
+ utils/HtmlOutputDev.cc | 23 -----------------------
+ 1 files changed, 0 insertions(+), 23 deletions(-)
+
+commit e9dc379190aa3166870d0b11a05ccc4e9dad2706
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 22:41:59 2007 -0700
+
+ Remove unused variables.
+
+ poppler/ArthurOutputDev.cc | 16 +++++-----------
+ 1 files changed, 5 insertions(+), 11 deletions(-)
+
+commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Sun Sep 23 22:28:16 2007 -0700
+
+ replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) != a' which, due to type promotions, if a is int, is equivalent to a < 0; fix problems revealed by the change
+
+ poppler/XRef.cc | 25 ++++---------------------
+ 1 files changed, 4 insertions(+), 21 deletions(-)
+
+commit 5a1f670a4d16affeed86cdf643ab22f481caa3a5
+Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)>
+Date: Sun Sep 23 20:42:59 2007 -0700
+
+ ignore *.o files
+
+ .gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c156aed7234f82dea4cb384c1b8a7acdd34545be
+Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)>
+Date: Sun Sep 23 20:41:19 2007 -0700
+
+ remove unused variables
+
+ poppler/ABWOutputDev.cc | 10 ++--------
+ 1 files changed, 2 insertions(+), 8 deletions(-)
+
+commit d0bdef4752be5fa609a0766ee87aa54d51611d9a
+Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)>
+Date: Sat Sep 22 13:38:03 2007 -0700
+
+ undo accidental changes to file permissions
+
+ 0 files changed, 0 insertions(+), 0 deletions(-)
+
+commit 6c69473f2f4a49757614ddd249e65bb7a13c63c1
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 08:09:53 2007 -0700
+
+ undo accidental mode change
+
+ 0 files changed, 0 insertions(+), 0 deletions(-)
+
+commit e7e386e7ce8cb8eb8a7037ebdaa601524d332ae7
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 08:08:53 2007 -0700
+
+ more simplification by removing unneded code
+
+ makefile.vc | 2 +-
+ test/perf-test.cc | 60 ++++++++---------------------------------------------
+ 2 files changed, 10 insertions(+), 52 deletions(-)
+
+commit 3e10604637ec193269a3155985476d3b83dc7d62
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 07:48:38 2007 -0700
+
+ for portability use bool/true/false instead of BOOL/TRUE/FALSE
+
+ test/perf-test.cc | 176 ++++++++++++++++++++++++++---------------------------
+ 1 files changed, 86 insertions(+), 90 deletions(-)
+
+commit 634718936f2a95fac2a9d12fcea483b3d0ca8fa6
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 07:41:14 2007 -0700
+
+ simplify perf-test
+
+ test/perf-test-pdf-engine.h | 78 -----------------------------------------
+ test/perf-test-preview-win.cc | 5 +--
+ test/perf-test.cc | 75 ++++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 75 insertions(+), 83 deletions(-)
+
+commit 617550199762fab42ca2e202e641e047b3efbac0
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 05:20:16 2007 -0700
+
+ simplify perf-test code
+
+ test/perf-test-pdf-engine.h | 67 +++--------------------
+ test/perf-test-preview-dummy.cc | 3 +-
+ test/perf-test-preview-win.cc | 80 +++++++++++++++++++++++----
+ test/perf-test.cc | 114 +++-----------------------------------
+ 4 files changed, 86 insertions(+), 178 deletions(-)
+
+commit fb5bf808b88992c1772a10e4ed9fe788fb618417
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 03:03:26 2007 -0700
+
+ more msvc build fixes
+
+ makefile.vc | 2 +-
+ test/perf-test.cc | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 60829b08a7440f36014f68ec54bee7a742412738
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Fri Sep 21 03:02:34 2007 -0700
+
+ msvc build fixes
+
+ msvc/poppler/poppler-config.h | 143 +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 143 insertions(+), 0 deletions(-)
+
+commit 853c22a174bae81139edc9aeded7f26ae2655cef
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 23:21:35 2007 -0700
+
+ add pre-made config.h for msvc build
+
+ msvc/config.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 62 insertions(+), 0 deletions(-)
+
+commit 31c43b118bd4372134018be6f6693f77d1f6a39b
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 22:10:09 2007 -0700
+
+ remove unused variables
+
+ poppler/CairoFontEngine.cc | 6 ++----
+ poppler/CairoOutputDev.cc | 14 ++------------
+ splash/SplashFTFontEngine.cc | 2 ++
+ 3 files changed, 6 insertions(+), 16 deletions(-)
+
+commit 01b99f60e36dd955817f23911ef38947360f61f7
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 21:14:17 2007 -0700
+
+ remove unused variables
+
+ poppler/GfxState.cc | 11 ++---------
+ poppler/SplashOutputDev.cc | 9 +++------
+ poppler/TextOutputDev.cc | 3 ---
+ 3 files changed, 5 insertions(+), 18 deletions(-)
+
+commit 7c406400532d68524a43cf963d894d3c4b269400
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 20:57:44 2007 -0700
+
+ remove unused variables
+
+ poppler/Catalog.cc | 1 -
+ poppler/Form.cc | 5 -----
+ poppler/GfxFont.cc | 6 ++----
+ poppler/Page.cc | 2 +-
+ splash/Splash.cc | 5 ++++-
+ 5 files changed, 7 insertions(+), 12 deletions(-)
+
+commit 70f23389c97b1870b7311d97322cdd16b580a79d
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 20:23:59 2007 -0700
+
+ don't silence warnings about unused variables/functions to keep programmers honest
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cdb6fcf98137473efd993e1374a6f010e9db67db
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Thu Sep 20 20:00:56 2007 -0700
+
+ Remove unused variables
+
+ poppler/Annot.cc | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 0e76b49ac852a5a7ebae4c1f67b153e0b7c9f905
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Tue Sep 18 01:04:50 2007 -0700
+
+ Explain how to compile on Windows using msvc makefile.
+
+ README.windows | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 63 insertions(+), 0 deletions(-)
+
+commit c002b4dc75b2688ffe8a734cf3e15f5891797842
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Tue Sep 18 00:04:47 2007 -0700
+
+ Add Windows/msvc makefile.
+
+ Add native msvc windows makefile and pre-made
+ config.h for windows in msvc directory.
+
+ makefile.vc | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 149 insertions(+), 0 deletions(-)
+
+commit 1f33fc58201c92120c587189d2e0e819f83167da
+Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>
+Date: Mon Sep 17 23:53:02 2007 -0700
+
+ Start on a test program.
+
+ Test program can be used for regression testing and
+ performance testing. It renders a page (or pages)
+ in a given PDF (or PDFs) and records rendering times.
+ For historical reasons the code is ugly and probably
+ only compiles on windows, but it'll get better.
+
+ test/perf-test-pdf-engine.h | 131 ++++
+ test/perf-test-preview-dummy.cc | 22 +
+ test/perf-test-preview-win.cc | 222 ++++++
+ test/perf-test.cc | 1428 +++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 1803 insertions(+), 0 deletions(-)
+
+commit b96db4ad27535c2666fccdfe0a3c04cc7c37792d
+Author: Jeff Muizelaar <jeff@freiheit.infidigm.net>
+Date: Mon Sep 17 20:28:38 2007 -0400
+
+ Avoid double free caused by 302 merge
+
+ The ownership of the the string returned by getKey() changed with the 302 merge
+ but this code was not updated. Found by Matthew Woehlke.
+
+ qt4/src/poppler-document.cc | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 2a495f19d4465e15fd2fa96656d904315c79a443
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Sep 17 16:52:45 2007 -0400
+
+ Simplify ChangeLog rule a bit.
+
+ ChangeLog.mk | 81 ----------------------------------------------------------
+ Makefile.am | 7 +++--
+ 2 files changed, 4 insertions(+), 84 deletions(-)
+
+commit 7d5abbeec55e4b90b139671d96cfdf58bdab70b8
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Sep 17 15:45:26 2007 -0400
+
+ Add dist hook to generate ChangeLog.
+
+ Taken from cairo. It still need some tweaking.
+
+ ChangeLog.mk | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Makefile.am | 4 +++
+ configure.ac | 2 +-
+ 3 files changed, 86 insertions(+), 1 deletions(-)
+
+commit 15ad81c64cd8b1cb438d41be402daa19a239db3d
+Author: Albert Astals Cid <tsdgeos@bluebox.localdomain>
+Date: Mon Sep 17 19:39:29 2007 +0200
+
+ Use = instead of == in qt.m4
+
+ m4/qt.m4 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 70fabcb96e207b9b889bb32c0cf5ea3fc0aa08f8
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Sep 16 20:40:53 2007 -0400
+
+ Rename .cvsignore files to .gitignore and drop ChangeLog file.
+
+ .cvsignore | 25 -
+ .gitignore | 25 +
+ ChangeLog | 4586 ---------------------------------------------
+ fofi/.cvsignore | 8 -
+ fofi/.gitignore | 8 +
+ glib/.cvsignore | 11 -
+ glib/.gitignore | 11 +
+ glib/reference/.cvsignore | 18 -
+ glib/reference/.gitignore | 18 +
+ goo/.cvsignore | 8 -
+ goo/.gitignore | 8 +
+ poppler/.cvsignore | 10 -
+ poppler/.gitignore | 10 +
+ qt/.cvsignore | 7 -
+ qt/.gitignore | 7 +
+ qt4/.cvsignore | 3 -
+ qt4/.gitignore | 3 +
+ qt4/src/.cvsignore | 8 -
+ qt4/src/.gitignore | 8 +
+ qt4/tests/.cvsignore | 20 -
+ qt4/tests/.gitignore | 20 +
+ splash/.cvsignore | 8 -
+ splash/.gitignore | 8 +
+ test/.cvsignore | 11 -
+ test/.gitignore | 11 +
+ utils/.cvsignore | 12 -
+ utils/.gitignore | 12 +
+ 27 files changed, 149 insertions(+), 4735 deletions(-)
+
+commit c9f9403ffc5b95ae790c3c81284c7786afe33f4d
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Fri Sep 14 20:50:07 2007 +0000
+
+ Windows implementation for matching fonts that doesn't use fontconfig
+
+ ChangeLog | 6 +
+ poppler/GlobalParamsWin.cc | 285 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 291 insertions(+), 0 deletions(-)
+
+commit d18b5361a0504458da805ed6be037c9d648f9372
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Fri Sep 14 20:47:11 2007 +0000
+
+ Update ChangeLog for previous checkin
+
+ ChangeLog | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 3330763ddca66b30d5ee60aab94d6fe0bbae9c8f
+Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+Date: Fri Sep 14 06:17:35 2007 +0000
+
+ windows/msvc compilation fixes
+
+ poppler/DCTStream.h | 2 +-
+ poppler/Error.cc | 6 ++++++
+ poppler/FlateStream.h | 2 +-
+ poppler/GlobalParams.cc | 12 ++++++++++--
+ poppler/GlobalParams.h | 17 +++++++++++++++++
+ poppler/Stream.cc | 2 +-
+ splash/SplashFTFontEngine.cc | 2 ++
+ splash/SplashFontEngine.cc | 2 +-
+ splash/SplashFontFile.cc | 2 ++
+ splash/SplashFontFile.h | 3 ++-
+ splash/SplashT1FontEngine.cc | 2 +-
+ 11 files changed, 44 insertions(+), 8 deletions(-)
+
+commit 6eb159ef34eb7e2fb8adcfc48afd84d5f50efbbd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 10 17:38:05 2007 +0000
+
+ * autogen.sh: Support automake-1.10.
+ Patch by Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ ChangeLog | 5 +++++
+ autogen.sh | 11 ++++++-----
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+commit 31bbc8c727cfecc79bd8da962ad8d99a0d1d3d33
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 8 10:40:17 2007 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-ps-converter.cc:
+ Add PSConverter::setOutputDevice() to set a QIODevice where
+ writing the resulting PS.
+
+ ChangeLog | 7 +++++
+ qt4/src/poppler-ps-converter.cc | 51 +++++++++++++++++++++++++++++++++++---
+ qt4/src/poppler-qt4.h | 5 +++-
+ 3 files changed, 58 insertions(+), 5 deletions(-)
+
+commit b3d63d03c310f01cc5b23d00ffd2103c6891fef2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 5 20:22:32 2007 +0000
+
+ * qt4/src/poppler-ps-converter.cc: Fix Right<->Left interchange
+
+ ChangeLog | 1 +
+ qt4/src/poppler-ps-converter.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 64368582d5ca4e28c236f440482c96f1dd3a8897
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 5 18:22:52 2007 +0000
+
+ * poppler/PSOutputDev.cc: Fix printing of second parameter
+
+ ChangeLog | 4 ++++
+ poppler/PSOutputDev.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit eaf9d06cf0d08ccdc183759e0331dc2439a6f10f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Sep 5 10:57:09 2007 +0000
+
+ 2007-09-05 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.cc:
+ * glib/demo/render.c: Fix build with --disable-cairo-output.
+
+ ChangeLog | 5 +++++
+ glib/demo/render.c | 31 +++++++++++++++++++++++++++----
+ glib/poppler-page.cc | 22 ++++++++++++----------
+ 3 files changed, 44 insertions(+), 14 deletions(-)
+
+commit c0f488c2b0e115be3e1b7e4dc7baa38db5837498
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 4 22:04:52 2007 +0000
+
+ did not want to commit this
+
+ gtk-doc.make | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3462851b4ea342651095f1803cd488bc3b3f5749
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 4 22:02:06 2007 +0000
+
+ * utils/pdftoppm.cc: Fix build on Sun Studio compiler.
+ Patch by Brian Cameron <brian.cameron@sun.com>
+
+ ChangeLog | 5 +++++
+ gtk-doc.make | 2 +-
+ utils/pdftoppm.cc | 2 +-
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+commit cdf3b9062cc54d558b8dbeefb3211a920ff2cb94
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 3 19:23:11 2007 +0000
+
+ write news
+ fix qt4 build
+
+ NEWS | 13 +++++++++++++
+ qt4/src/Makefile.am | 3 ++-
+ 2 files changed, 15 insertions(+), 1 deletions(-)
+
+commit c82208a44f3b09c27bc33831641e4f746dd4361f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 3 18:28:44 2007 +0000
+
+ * configure.ac: Bump version to 0.6
+ * glib/Makefile.am
+ * poppler/Makefile.am
+ * qt/Makefile.am
+ * qt4/src/Makefile.am: Bump sonames
+
+ ChangeLog | 8 ++++++++
+ configure.ac | 2 +-
+ glib/Makefile.am | 2 +-
+ poppler/Makefile.am | 2 +-
+ qt/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 6 files changed, 13 insertions(+), 5 deletions(-)
+
+commit 2a12409ebbf96ea3ca4556b71231a45ae37cb052
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 3 17:09:01 2007 +0000
+
+ * poppler/JBIG2Stream.cc:
+ * poppler/Stream.cc: Patch by Derek B. Noonburg <derekn@foolabs.com>
+ to fix some errors in CCITTFaxStream and JBIG2Stream.cc
+
+ ChangeLog | 6 ++++++
+ poppler/JBIG2Stream.cc | 7 ++++---
+ poppler/Stream.cc | 2 +-
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 0b483e71ef02b4040b665935c1018c8b30b9c1ca
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Sep 3 08:54:01 2007 +0000
+
+ 2007-09-03 Carlos Garcia Campos <carlosgc@gnome.org>
+ * gtk-doc.make:
+ * glib/poppler-document.cc:
+ * glib/poppler-form-field.cc:
+ * glib/poppler-page.cc:
+ * glib/reference/poppler-docs.sgml:
+ * glib/reference/poppler-sections.txt:
+ * glib/reference/poppler.types:
+ * glib/reference/tmpl/poppler-action.sgml:
+ * glib/reference/tmpl/poppler-attachment.sgml:
+ * glib/reference/tmpl/poppler-document.sgml:
+ * glib/reference/tmpl/poppler-enums.sgml:
+ * glib/reference/tmpl/poppler-form-field.sgml:
+ * glib/reference/tmpl/poppler-page.sgml:
+ * glib/reference/tmpl/poppler-private.sgml:
+ * glib/reference/tmpl/poppler.sgml: Update glib bindings API
+ documentation.
+
+ ChangeLog | 19 ++
+ glib/poppler-document.cc | 10 +
+ glib/poppler-form-field.cc | 205 +++++++++++++++++
+ glib/poppler-page.cc | 12 +-
+ glib/reference/poppler-docs.sgml | 2 +
+ glib/reference/poppler-sections.txt | 108 +++++++++-
+ glib/reference/poppler.types | 2 +
+ glib/reference/tmpl/poppler-action.sgml | 36 +++-
+ glib/reference/tmpl/poppler-attachment.sgml | 65 ++++++
+ glib/reference/tmpl/poppler-document.sgml | 50 +++++
+ glib/reference/tmpl/poppler-enums.sgml | 60 +++++
+ glib/reference/tmpl/poppler-form-field.sgml | 315 +++++++++++++++++++++++++++
+ glib/reference/tmpl/poppler-page.sgml | 236 ++++++++++++++++++++-
+ glib/reference/tmpl/poppler-private.sgml | 6 +
+ glib/reference/tmpl/poppler.sgml | 49 ++++
+ gtk-doc.make | 34 ++--
+ 16 files changed, 1181 insertions(+), 28 deletions(-)
+
+commit 289e3893cda45055951bb8d3b82a45644bc0b6c6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 2 17:02:55 2007 +0000
+
+ * poppler/GfxState.cc: Pad zeroes instead of aborting when rendering
+ 1-bit images and the stream is "too short" to mimic Acroread and
+ ghostscript behaviour. Patch by <darren.kenny@sun.com>. Fixes #12208
+
+ ChangeLog | 3 +++
+ poppler/GfxState.cc | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 6f6c2180aca2e26ea0e3c2f21f11bc8f457c19c0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 2 16:31:19 2007 +0000
+
+ * glib/demo/Makefile.am: Add $(top_builddir)/poppler/libpoppler.la
+ * poppler/TextOutputDev.cc: Patch from Ed Catmur <ed@catmur.co.uk> to
+ improve matching of half strings of decomposed characters/ligatures.
+
+ ChangeLog | 3 +++
+ glib/demo/Makefile.am | 1 +
+ poppler/TextOutputDev.cc | 21 +++++++++++++--------
+ 3 files changed, 17 insertions(+), 8 deletions(-)
+
+commit be1b5a0196cdfc78f74e08a023b477cac16eb0f3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 2 16:06:03 2007 +0000
+
+ poppler/PDFDoc.cc: Don't enforce %%EOF at the end of file
+
+ ChangeLog | 4 ++++
+ poppler/PDFDoc.cc | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 500a87af9240344806c18ebbd05a89f4f4c69955
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Sep 2 00:53:42 2007 +0000
+
+ 2007-09-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/Error.cc:
+ * poppler/Error.h: Report any cairo errors when destroying the cairo
+ context.
+
+ ChangeLog | 7 +++++++
+ poppler/CairoOutputDev.cc | 7 ++++++-
+ poppler/Error.cc | 7 +++++++
+ poppler/Error.h | 1 +
+ 4 files changed, 21 insertions(+), 1 deletions(-)
+
+commit 0c22556bf70ff67eb388cdcd9784603030397785
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Sep 1 23:38:04 2007 +0000
+
+ 2007-09-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/demo/Makefile.am: Only build the demo app if the cflags will be
+ appropriately set.
+
+ ChangeLog | 5 +++++
+ glib/demo/Makefile.am | 2 ++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit a23d45dd6cd8a2ac4181170a9ee924fe49a9781b
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Sep 1 23:00:59 2007 +0000
+
+ 2007-09-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-page.cc: Add note about clipping
+
+ ChangeLog | 4 ++++
+ glib/poppler-page.cc | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit bf489d5cebc467807f2b38f74f6a6e34a503a9ca
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Aug 30 18:39:51 2007 +0000
+
+ * poppler/Form.h: Remove unused methods. Fixes 12013
+
+ ChangeLog | 4 ++++
+ poppler/Form.h | 3 ---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit a81cc06c855385911dffa826b9e1407d6097e8c8
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 30 18:15:34 2007 +0000
+
+ 2007-08-30 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/TextOutputDev.cc:
+ * poppler/TextOutputDev.h:
+ * glib/poppler.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/test-poppler-glib.c: Add support for word and line
+ selections. Based on patch by Kristian Høgsberg.
+
+ ChangeLog | 10 ++++++
+ glib/poppler-page.cc | 81 ++++++++++++++++++++++++++++++++++++++++------
+ glib/poppler-page.h | 2 +
+ glib/poppler.h | 4 +-
+ glib/test-poppler-glib.c | 2 +-
+ poppler/TextOutputDev.cc | 74 +++++++++++++++++++++++++++++-------------
+ poppler/TextOutputDev.h | 34 +++++++++++++++----
+ 7 files changed, 163 insertions(+), 44 deletions(-)
+
+commit 59ddb5cc8bec54305b6d256ad9975e95ecdcb935
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 27 18:37:55 2007 +0000
+
+ * poppler/UnicodeTypeTable.cc: Fix error on the NFKC text matching
+ routine. Fixes bug #11775. Patch by Ed Catmur <ed@catmur.co.uk>
+
+ ChangeLog | 5 +++++
+ poppler/UnicodeTypeTable.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit a6e46ce61670679f368e66c1a98a7d5d1c960c5b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 27 17:56:29 2007 +0000
+
+ * qt4/src/Doxyfile:
+ * qt4/src/Mainpage.dox:
+ * qt4/src/poppler-annotation.h:
+ * qt4/src/poppler-form.h:
+ * qt4/src/poppler-link.h:
+ * qt4/src/poppler-qt4.h:
+ A few API documentation fixes and improvements.
+
+ ChangeLog | 10 ++++++
+ qt4/src/Doxyfile | 26 +++++------------
+ qt4/src/Mainpage.dox | 26 ++++++++++------
+ qt4/src/poppler-annotation.h | 34 ++++++++++++++++++++++
+ qt4/src/poppler-form.h | 18 ++++++------
+ qt4/src/poppler-link.h | 63 +++++++++++++++++++++++++++++++++++++++--
+ qt4/src/poppler-qt4.h | 44 ++++++++++++++++++++---------
+ 7 files changed, 166 insertions(+), 55 deletions(-)
+
+commit a7f8d92fba8c45d6ca83568c045d5e324158ee6b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 27 17:17:14 2007 +0000
+
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-link.h:
+ Initialise correctly, and missing empty destructor.
+ * qt4/src/poppler-annotation.cc:
+ Don't leak the private class.
+
+ ChangeLog | 9 +++++++++
+ qt4/src/poppler-annotation.cc | 4 ++--
+ qt4/src/poppler-link.cc | 8 ++++++--
+ qt4/src/poppler-link.h | 1 +
+ 4 files changed, 18 insertions(+), 4 deletions(-)
+
+commit 2b1ef8f06879eb0b79288d57540c238ea833db24
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 26 21:39:22 2007 +0000
+
+ Fix bug 12121
+
+ ChangeLog | 4 ++++
+ utils/ImageOutputDev.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 20bcac5ee1988befb9c590a0d16cb615f0c49901
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 26 21:28:34 2007 +0000
+
+ forgot to cvs add
+
+ qt4/src/poppler-annotation-private.h | 49 ++++++++++++++++++++++++++++++++++
+ 1 files changed, 49 insertions(+), 0 deletions(-)
+
+commit e48de657db0ef439457b4b5ca39b937da25d531e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 26 18:11:01 2007 +0000
+
+ * qt4/src/poppler-annotation.cc:
+ * qt4/src/poppler-annotation.h:
+ Move all the private members of the *Annotation classes into a common
+ shared private.
+
+ ChangeLog | 4 +
+ qt4/src/poppler-annotation.cc | 969 ++++++++++++++++++++++++++++++++++-------
+ qt4/src/poppler-annotation.h | 277 ++++++++----
+ qt4/src/poppler-page.cc | 249 +++++++----
+ 4 files changed, 1155 insertions(+), 344 deletions(-)
+
+commit 392f050f909b6a1250acf1971446a1849534482c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 26 16:42:46 2007 +0000
+
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-embeddedfile.cc:
+ * qt4/src/poppler-fontinfo.cc:
+ * qt4/src/poppler-form.cc:
+ * qt4/src/poppler-form.h:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-sound.cc:
+ * qt4/src/poppler-textbox.cc:
+ API work: remove 'const' and 'const&' from return values with Qt
+ classes; make the non-copiable classes really non-copiable;
+ uninline a Document::page() method; other related small changes.
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-link.h:
+ Make LinkDestination an implicitely shared class, with all the private
+ members into the private class; move all the private members of the
+ Link* classes into a common shared private.
+
+ ChangeLog | 23 +++-
+ qt4/src/poppler-document.cc | 7 +-
+ qt4/src/poppler-embeddedfile.cc | 12 --
+ qt4/src/poppler-fontinfo.cc | 12 +-
+ qt4/src/poppler-form.cc | 16 +-
+ qt4/src/poppler-form.h | 14 +-
+ qt4/src/poppler-link.cc | 373 ++++++++++++++++++++++++++++++---------
+ qt4/src/poppler-link.h | 67 +++++---
+ qt4/src/poppler-qt4.h | 32 +++--
+ qt4/src/poppler-sound.cc | 7 -
+ qt4/src/poppler-textbox.cc | 4 +-
+ 11 files changed, 404 insertions(+), 163 deletions(-)
+
+commit f215aca25fdd8fe287b717dde53f0be273d995e4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun Aug 26 10:52:19 2007 +0000
+
+ 2007-08-26 Carlos Garcia Campos <carlosgc@gnome.org>
+ * configure.ac:
+ * glib/Makefile.am:
+ * glib/demo/Makefile.am:
+ * glib/demo/fonts.[ch]:
+ * glib/demo/info.[ch]:
+ * glib/demo/links.[ch]:
+ * glib/demo/main.c:
+ * glib/demo/outline.[ch]:
+ * glib/demo/page.[ch]:
+ * glib/demo/render.[ch]:
+ * glib/demo/utils.[ch]: Add poppler glib demo tool.
+
+ ChangeLog | 14 ++
+ configure.ac | 1 +
+ glib/Makefile.am | 2 +-
+ glib/demo/Makefile.am | 26 +++
+ glib/demo/fonts.c | 276 +++++++++++++++++++++++++++
+ glib/demo/fonts.h | 31 +++
+ glib/demo/info.c | 243 ++++++++++++++++++++++++
+ glib/demo/info.h | 31 +++
+ glib/demo/links.c | 289 ++++++++++++++++++++++++++++
+ glib/demo/links.h | 31 +++
+ glib/demo/main.c | 205 ++++++++++++++++++++
+ glib/demo/outline.c | 218 +++++++++++++++++++++
+ glib/demo/outline.h | 31 +++
+ glib/demo/page.c | 249 ++++++++++++++++++++++++
+ glib/demo/page.h | 31 +++
+ glib/demo/render.c | 498 +++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/demo/render.h | 31 +++
+ glib/demo/utils.c | 234 +++++++++++++++++++++++
+ glib/demo/utils.h | 42 ++++
+ 19 files changed, 2482 insertions(+), 1 deletions(-)
+
+commit 7c9529b70dc44bb001d21a3b47fc65916813dec1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Aug 23 20:39:31 2007 +0000
+
+ 2007-08-23 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.cc: Add missing comma.
+
+ ChangeLog | 4 ++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 3c4a85503261ee81a829a1683f1f5fa85d41f8ee
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Aug 23 20:15:46 2007 +0000
+
+ 2007-08-23 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-page.cc: pass in -1 to displaySlice so that it sets up
+ the slice size for us. This fixes the case of the wrong values being
+ used when the pdf was rotated on its side.
+ Fixes #11913.
+
+ ChangeLog | 7 +++++++
+ glib/poppler-page.cc | 5 ++---
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 3ba088d8caee3c40c2aba0cd85adcf9195ae88a3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 22 21:29:32 2007 +0000
+
+ * splash/SplashBitmap.cc:
+ * splash/SplashBitmap.h:
+ * utils/pdftoppm.cc: Add the following features to pdftoppm
+ - if omitting input filename or using - for input filename
+ reads pdf from stdin
+ - if omitting output filename, prints output to stdout
+ - create image of a cropped rectangle of the pdf
+ - scale pdf to fit in a square of wanted size
+ Patch by Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
+
+ ChangeLog | 12 +++++
+ splash/SplashBitmap.cc | 18 ++++++--
+ splash/SplashBitmap.h | 2 +
+ utils/pdftoppm.cc | 107 ++++++++++++++++++++++++++++++++++++++++-------
+ 4 files changed, 119 insertions(+), 20 deletions(-)
+
+commit 567e82c13aace4f40c7a555a62a3a4d223a46d92
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Aug 22 19:34:02 2007 +0000
+
+ 2007-08-22 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc: Fix debug spew. Patch from Matthias Clasen.
+
+ ChangeLog | 4 ++++
+ poppler/GlobalParams.cc | 1 -
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit bc499987074d046baf29deafe4a29d57039c0c5e
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Aug 22 19:28:24 2007 +0000
+
+ 2007-08-22 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Fix the computation of the padding in the
+ image scaling code.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 6 ++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit d9719233447cb4f85f2bf9d9ec6ef089caa21140
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Aug 19 16:20:21 2007 +0000
+
+ 2007-08-19 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Avoid allocating the glyph array if
+ currentFont is not set in beginString. This closes a possible
+ memory leak.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 3 +++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 099eb56896046e020f4ef0365e1ee382f85ec1ab
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 15 18:52:20 2007 +0000
+
+ * poppler/JBIG2Stream.cc: Quick fix for bug #12014
+
+ ChangeLog | 4 ++++
+ poppler/JBIG2Stream.cc | 16 +++++++++++-----
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+commit 3b7e3645c85c7a3d341457f105835b58c935bd67
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 15 00:04:48 2007 +0000
+
+ RC2 is out! (0.5.91)
+
+ ChangeLog | 1 +
+ NEWS | 18 ++++++++++++++++++
+ configure.ac | 2 +-
+ 3 files changed, 20 insertions(+), 1 deletions(-)
+
+commit c240daefe660ac3456dc0c5f5dc82aa53ebc3313
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 14 23:10:37 2007 +0000
+
+ * poppler/Stream.cc: Fix CVE-2007-3387 by merging xpdf-3.02pl1.patch
+
+ ChangeLog | 1 +
+ poppler/Stream.cc | 12 +++++-------
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+commit 1ba884b6b98ac8d755c9adc9f23a7a68d8b17b54
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 14 22:47:30 2007 +0000
+
+ * configure.ac:
+ * pòppler/Makefile.am: Patch by Vincent Torri <vtorri@univ-evry.fr> to
+ fix linking under MinGW
+
+ ChangeLog | 6 ++++++
+ configure.ac | 13 +++++++++++++
+ poppler/Makefile.am | 5 +++--
+ 3 files changed, 22 insertions(+), 2 deletions(-)
+
+commit 3c31f923fcf1aeb361910eb1e9445cc28aa5b3ca
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Aug 7 16:22:12 2007 +0000
+
+ 2007-08-07 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Don't use the prescaleMethod
+ when we have a rotation as that case has not been tested.
+ Also make sure that scaledHeight is at least 1.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 7 ++++++-
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+commit af97e5f8e0f3beeb43acde92a0788c02d9718adf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Aug 6 17:41:17 2007 +0000
+
+ 2007-08-06 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Annot.cc:
+ * poppler/Annot.h:
+ * poppler/Form.cc:
+ * poppler/Form.h:
+ * poppler/Page.cc: Do not always regenerate appearance stream for
+ every form widget, but only when it's actually needed.
+
+ ChangeLog | 9 +++++
+ poppler/Annot.cc | 86 ++++++++++++++++++++++++++++++++---------------------
+ poppler/Annot.h | 8 ++--
+ poppler/Form.cc | 25 ++-------------
+ poppler/Form.h | 4 ++-
+ poppler/Page.cc | 8 +----
+ 6 files changed, 74 insertions(+), 66 deletions(-)
+
+commit 74627e71388ca0a4c0938a472c291ef87186f370
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 31 21:40:19 2007 +0000
+
+ 2007-07-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc: s/GList/GooList/ some Windows code.
+
+ ChangeLog | 4 ++++
+ poppler/GlobalParams.cc | 8 ++++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit f421e2151345ac855b75e819e19343a90789b3bf
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 31 16:50:06 2007 +0000
+
+ 2007-07-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h: Add poppler_fonts_iter_get_file_name.
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 16 ++++++++++++++++
+ glib/poppler-document.h | 1 +
+ 3 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 4d57b8a12b845d5d5ac321d7a4bca980d60d429f
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 31 16:48:35 2007 +0000
+
+ 2007-07-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.h: Add comment about CairoImageOutputDevice's
+ implementation.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.h | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit f04a67006abdb5843ab481aa1e25b51abd1b1b64
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 31 11:41:53 2007 +0000
+
+ 2007-07-31 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Form.cc:
+ * poppler/Form.h: Fix memory leak.
+
+ ChangeLog | 5 +++++
+ poppler/Form.cc | 9 +++++----
+ poppler/Form.h | 4 ++--
+ 3 files changed, 12 insertions(+), 6 deletions(-)
+
+commit ee9d556a8b413160911a535a0e9089b919ca29f5
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 31 11:40:22 2007 +0000
+
+ 2007-07-31 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/CairoOutputDev.h: Empty implementation of transparency
+ groups and soft masks in CairoImageOutputDev. Fixes a crash in
+ poppler_page_get_image_mapping.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.h | 11 +++++++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit e08779856c801b9968dc2d47e28e86abc1ec7110
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 31 05:29:57 2007 +0000
+
+ 2007-07-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GfxFont.cc: Fix the case where the Encoding is "Identity"
+ and ToUnicode exists. GfxCIDFont::getCodeToGIDMap makes CIDTOGID map
+ from ToUnicde map, but when encoding is Identity, it should not use
+ ToUnicode map to get GID. If encoding is Identity, No CIDTOGID map is
+ needed.
+ Patch by Koji Otani.
+ Fixes #11413.
+
+ ChangeLog | 10 ++++++++++
+ poppler/GfxFont.cc | 1 +
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 86fc9a6f343be920f5159e745947401227e41a37
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Jul 30 19:28:17 2007 +0000
+
+ 2007-07-30 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Prescale image masks before giving them
+ to cairo to improve the quality of the scaled image. Improves #5589.
+
+ ChangeLog | 6 +
+ poppler/CairoOutputDev.cc | 300 +++++++++++++++++++++++++++++++++++++++++++--
+ poppler/CairoOutputDev.h | 10 ++-
+ 3 files changed, 303 insertions(+), 13 deletions(-)
+
+commit f754246e47161e9bf99887201e283c1419ade4f1
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Jul 30 19:07:45 2007 +0000
+
+ 2007-07-30 Jeff Muizelaar <jeff@infidigm.net>
+
+ * configure.ac: Update require cairo version to 1.4
+
+ ChangeLog | 4 ++++
+ configure.ac | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit bb20249ac676995725b617ef442f5feb01f78205
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Jul 30 18:44:41 2007 +0000
+
+ 2007-07-30 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Add transparency group support.
+ Fixes #7856.
+
+ ChangeLog | 6 ++
+ poppler/CairoOutputDev.cc | 133 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 21 +++++++-
+ 3 files changed, 159 insertions(+), 1 deletions(-)
+
+commit a85acecaeb0d122becbc52a385d918561e995eca
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Jul 30 00:22:35 2007 +0000
+
+ 2007-07-29 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: transform the original matrix for type3 fonts
+ instead of using set_matrix()
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 20 +++++++++++++++++---
+ poppler/CairoOutputDev.h | 1 +
+ 3 files changed, 24 insertions(+), 3 deletions(-)
+
+commit a81a082169de32d01c36c969616a5c2279f1bac7
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Jul 30 00:18:59 2007 +0000
+
+ 2007-07-29 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/test-poppler-glib.c: include <time.h> to fix compilation.
+
+ ChangeLog | 4 ++++
+ glib/test-poppler-glib.c | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 81393cb30f6287caf5195265cdc039555f2767d3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 28 08:22:40 2007 +0000
+
+ 2007-07-28 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Annot.cc:
+ * poppler/Annot.h:
+ * poppler/Form.cc:
+ * poppler/Form.h: Make fieldLookup static in Form and use it from
+ both Form and Annot.
+
+ ChangeLog | 8 ++++++
+ poppler/Annot.cc | 43 +++++++++-------------------------
+ poppler/Annot.h | 1 -
+ poppler/Form.cc | 66 ++++++++++++++++++++++++++---------------------------
+ poppler/Form.h | 2 +
+ 5 files changed, 54 insertions(+), 66 deletions(-)
+
+commit 81b669dcb14bf821a49c9879f8d4129075647f5f
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 28 08:05:11 2007 +0000
+
+ 2007-07-28 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.h: Remove unneeded declarations. Fixes bug
+ #11744. Patch by Kouhei Sutou <kou@cozmixng.org>.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.h | 2 --
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit f2c4e5305009f1da770c99d3e2e3371ff37c75f3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri Jul 27 09:17:40 2007 +0000
+
+ 2007-07-27 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-private.h:
+ * glib/test-poppler-glib.c: Make PopplerFontInfo GObject. Patch by
+ Kouhei Sutou <kou@cozmixng.org>.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-document.cc | 44 ++++++++++++++++++++++++++++++++++++++++----
+ glib/poppler-document.h | 6 +++++-
+ glib/poppler-private.h | 1 +
+ glib/test-poppler-glib.c | 2 +-
+ 5 files changed, 55 insertions(+), 6 deletions(-)
+
+commit 975c7cff10d9b00359e147329ae2c7a93f8a3833
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 25 17:20:06 2007 +0000
+
+ micro optimization
+
+ qt4/src/poppler-page.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 525a7f49dd95f2644870a1c59ca15124e30026b4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 24 16:45:25 2007 +0000
+
+ 2007-07-24 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Annot.cc:
+ * poppler/Form.cc: Several fixes in forms. Generate appearance for
+ field buttons that don't have an AP dict. Do not remove the first
+ character of the second and following lines in multiline text
+ fields. Fix a crash with pdf documents created by ooo which have
+ radio buttons. Look for some inheritable attributes in the
+ parent when needed.
+
+ ChangeLog | 10 +++++++
+ poppler/Annot.cc | 27 ++++++++++---------
+ poppler/Form.cc | 77 +++++++++++++++++++++++++++++++++++++----------------
+ 3 files changed, 78 insertions(+), 36 deletions(-)
+
+commit 633a1cde65f86ee6577a68f4f8d36de43d14c714
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 15 21:03:50 2007 +0000
+
+ * utils/HtmlOutputDev.cc:
+ * utils/HtmlOutputDev.h: Create the html files in the correct place,
+ not in the invocation dir. Fixes bug #11610
+
+ ChangeLog | 6 ++++++
+ utils/HtmlOutputDev.cc | 37 ++++++++++---------------------------
+ utils/HtmlOutputDev.h | 4 ----
+ 3 files changed, 16 insertions(+), 31 deletions(-)
+
+commit ccb2d420ca8d818aa9ba1d64f08f5e94ab313a72
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 15 17:09:29 2007 +0000
+
+ * poppler/DCTStream.cc
+ * poppler/DCTStream.h: Implement less evil error handling. On a
+ error_exit level error we don't want to actually exit the program. See
+ http://bugs.kde.org/show_bug.cgi?id=147878 for a pdf with this
+ problem. libjpeg was printing "Bogus Huffman table definition" and
+ exiting the program.
+ * poppler/Stream.cc: Remove bogus #warning
+
+ ChangeLog | 10 ++++++++++
+ poppler/DCTStream.cc | 17 ++++++++++++++++-
+ poppler/DCTStream.h | 1 +
+ poppler/Stream.cc | 1 -
+ 4 files changed, 27 insertions(+), 2 deletions(-)
+
+commit f9d82dfd299ae23a1baf3e35e2c3cd351129c525
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jul 14 18:23:42 2007 +0000
+
+ * utils/pdftops.cc: init width/height to -1 so it is calculated if not
+ specified
+
+ ChangeLog | 5 +++++
+ utils/pdftops.cc | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 1c04136e9538ccfaa2d6b968861682ca3b69ffb3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 14 15:23:31 2007 +0000
+
+ 2007-07-14 Pino Toscano <pino@kde.org>
+ * glib/poppler-action.h:
+ * glib/poppler-document.h: Remove trailing comma from the last
+ item of enums.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-action.h | 2 +-
+ glib/poppler-document.h | 8 ++++----
+ 3 files changed, 11 insertions(+), 5 deletions(-)
+
+commit b9b68cabce19a5e23911e5432ace8c13bd237391
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 14 15:15:57 2007 +0000
+
+ 2007-07-14 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c: Make is_password a property instead of
+ a text form field type, since a text field could be multiline and
+ password at the same time.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-form-field.cc | 10 ++++++++--
+ glib/poppler-form-field.h | 2 +-
+ glib/test-poppler-glib.c | 4 ++--
+ 4 files changed, 19 insertions(+), 5 deletions(-)
+
+commit 14a8361039d708661b8699b2e7c4496135021a85
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 13 22:18:05 2007 +0000
+
+ * fofi/FoFiTrueType.cc
+ * fofi/FoFiTrueType.h
+ * poppler/CairoFontEngine.cc
+ * poppler/CharCodeToUnicode.cc
+ * poppler/CharCodeToUnicode.h
+ * poppler/GfxFont.cc
+ * poppler/GfxFont.h
+ * poppler/SplashOutputDev.cc: Patch by
+ Koji Otani <sho@bbr.jp> to fix several problems with Japanese fonts.
+ Fixes bug 11413
+
+ ChangeLog | 13 ++
+ fofi/FoFiTrueType.cc | 305 ++++++++++++++++++++++++++++++++++++++++++
+ fofi/FoFiTrueType.h | 12 ++
+ poppler/CairoFontEngine.cc | 47 ++-----
+ poppler/CharCodeToUnicode.cc | 16 +++
+ poppler/CharCodeToUnicode.h | 1 +
+ poppler/GfxFont.cc | 232 ++++++++++++++++++++++++++++----
+ poppler/GfxFont.h | 2 +
+ poppler/SplashOutputDev.cc | 53 ++------
+ 9 files changed, 578 insertions(+), 103 deletions(-)
+
+commit 8389099d8e8940e3f8920b14a83075d69bcd8e6c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 13 18:21:02 2007 +0000
+
+ * poppler/FontInfo.cc: Fix the FontInfoScanner::scan method to
+ actually scan the number of requested pages
+
+ ChangeLog | 6 ++++++
+ poppler/FontInfo.cc | 12 ++++++------
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 9ced4442372d08375e0ded62f79052d8a3ec9cd6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 13 18:08:44 2007 +0000
+
+ * poppler/GlobalParams.cc: Remove dead unused code from Win32 ifdef
+
+ ChangeLog | 4 ++++
+ poppler/GlobalParams.cc | 6 ------
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+commit fb89fdb8de608ff94082e16819f042cddabf2bcc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 11 18:52:12 2007 +0000
+
+ * poppler/PSOutputDev.cc
+ * poppler/PSOutputDev.h
+ * utils/pdftohtml.cc: Fix bug 9746. pdftohtml complex mode had text
+ twice
+
+ ChangeLog | 7 +++++++
+ poppler/PSOutputDev.cc | 5 +++++
+ poppler/PSOutputDev.h | 2 ++
+ utils/pdftohtml.cc | 3 +--
+ 4 files changed, 15 insertions(+), 2 deletions(-)
+
+commit 0c9fa59bf5edf3cfcca1792da51b904a7c7f7615
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 11 18:30:19 2007 +0000
+
+ 2007-07-11 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Form.cc:
+ * poppler/XRef.cc:
+ * poppler/XRef.h: Fix memory leak.
+
+ ChangeLog | 6 ++++++
+ poppler/Form.cc | 49 ++++++++++++++++++++++++-------------------------
+ poppler/XRef.cc | 22 ++++++++++------------
+ poppler/XRef.h | 2 +-
+ 4 files changed, 41 insertions(+), 38 deletions(-)
+
+commit 4ae7d43bd54c5b3e2f08c48441f741d3099e228f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 11 18:12:26 2007 +0000
+
+ * goo/GooVector.h: Rename guard from _VECTOR_H to GOO_VECTOR_H
+ * goo/gfile.cc: GString -> GooString in Windows code
+ * poppler/GlobalParams.cc: GString -> GooString in Windows code
+ * splash/SplashT1FontEngine.cc
+ * splash/SplashT1FontEngine.h
+ * splash/SplashT1FontFile.cc
+ * splash/SplashT1FontFile.h: T1 code is not supported, but at least
+ make it compile :-D
+
+ ChangeLog | 11 +++++++++++
+ goo/GooVector.h | 4 ++--
+ goo/gfile.cc | 6 +++---
+ poppler/GlobalParams.cc | 26 +++++++++++++-------------
+ splash/SplashFontEngine.cc | 2 +-
+ splash/SplashT1FontEngine.cc | 8 ++++----
+ splash/SplashT1FontEngine.h | 7 +++----
+ splash/SplashT1FontFile.cc | 8 +++++---
+ splash/SplashT1FontFile.h | 4 ++--
+ 9 files changed, 44 insertions(+), 32 deletions(-)
+
+commit 7bd125ce96c603fd5cf42d7c6a29b542e82dd4ec
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 11 18:08:07 2007 +0000
+
+ 2007-07-11 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Form.cc:
+ * poppler/Form.h:
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c: Add a method to get the max length
+ allowed in text form fields.
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-form-field.cc | 8 ++++++++
+ glib/poppler-form-field.h | 1 +
+ glib/test-poppler-glib.c | 1 +
+ poppler/Form.cc | 11 +++++++++++
+ poppler/Form.h | 4 ++++
+ 6 files changed, 34 insertions(+), 0 deletions(-)
+
+commit 8a68855735e9d295d71685e82de39204d639ea7a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jul 9 08:52:58 2007 +0000
+
+ 2007-07-09 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Annot.cc:
+ * poppler/Annot.h: Render '*' instead of the actual content in
+ password form fields. Patch by Julien Rebetez <julien@fhtagn.net>
+
+ ChangeLog | 6 ++++++
+ poppler/Annot.cc | 52 +++++++++++++++++++++++++++++-----------------------
+ poppler/Annot.h | 5 +++--
+ 3 files changed, 38 insertions(+), 25 deletions(-)
+
+commit 53cf7d7084dc03a28239f11c94f2095bb02d6108
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 7 16:23:56 2007 +0000
+
+ 2007-07-07 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Form.cc:
+ * poppler/Form.h:
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c: Add a method to get the type of a Form
+ Field Button.
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-form-field.cc | 18 ++++++++++++++++++
+ glib/poppler-form-field.h | 8 ++++++++
+ glib/test-poppler-glib.c | 26 +++++++++++++++++++++++---
+ poppler/Form.cc | 5 +++++
+ poppler/Form.h | 2 ++
+ 6 files changed, 65 insertions(+), 3 deletions(-)
+
+commit de0a40181e5832a0dc263d40ed0a269867764623
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jul 7 15:28:29 2007 +0000
+
+ 2007-07-07 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Form.cc: Fix a crash when setting state on buttons that
+ don't have state.
+
+ ChangeLog | 5 +++++
+ poppler/Form.cc | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit a33518a3283ff25aa5517bc535ddb61383b1cfdc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 6 09:08:44 2007 +0000
+
+ * poppler/Form.cc: Fix a bug with FormField's destructor which was not
+ checking if the FormField is terminal to determine wether it needs to
+ delete children or widgets. Patch by
+ Julien Rebetez <julien@fhtagn.net>
+
+ ChangeLog | 4 ++++
+ poppler/Form.cc | 17 +++++++++++------
+ 2 files changed, 15 insertions(+), 6 deletions(-)
+
+commit 43f0d5b9bb198cdcbc2f7111f294c6f947105314
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 6 08:47:11 2007 +0000
+
+ * goo/GooString.cc:
+ * poppler/ABWOutputDev.cc: Build on Sun Force compiler, patch by
+ Darren Kenny <darren.kenny@sun.com>
+
+ ChangeLog | 6 ++++++
+ goo/GooString.cc | 2 +-
+ poppler/ABWOutputDev.cc | 4 +++-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+commit 4e7405071b69889362e4d49de3f881f0e3e261e3
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jul 5 13:04:01 2007 +0000
+
+ 2007-07-05 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc: Allow to set NULL in form fields
+ that can contain text.
+
+ ChangeLog | 5 +++++
+ glib/poppler-form-field.cc | 30 ++++++++++++------------------
+ 2 files changed, 17 insertions(+), 18 deletions(-)
+
+commit 625510797c528257527003477fe28adbacfe80e7
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Thu Jul 5 08:13:51 2007 +0000
+
+ 2007-07-05 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-attachment.cc:
+ * glib/poppler-attachment.h:
+ * glib/test-poppler-glib.c: Rename cdate and mdate again to ctime
+ and mtime, since they are public attributes and we don't want to
+ break the API.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-attachment.cc | 4 ++--
+ glib/poppler-attachment.h | 4 ++--
+ glib/test-poppler-glib.c | 4 ++--
+ 4 files changed, 14 insertions(+), 6 deletions(-)
+
+commit 9b2640f156f24b07c797d9461f84e64d550efa1a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 4 13:57:31 2007 +0000
+
+ * qt4/src/poppler-form.cc: QStringToGooString ->
+ QStringToUnicodeGooString has FormWidgetText::setContent wants to have
+ the unicode formated string
+ * qt4/src/poppler-private.h: create QStringToUnicodeGooString
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-form.cc | 2 +-
+ qt4/src/poppler-private.h | 15 +++++++++++++++
+ 3 files changed, 23 insertions(+), 1 deletions(-)
+
+commit b70115cf979b29f75c644518ae0e9c0dd9892ebf
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 4 13:06:38 2007 +0000
+
+ 2007-07-04 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc: Convert strings from UTF8 to UTF16BE
+ before setting them.
+
+ ChangeLog | 5 +++++
+ glib/poppler-form-field.cc | 34 ++++++++++++++++++++++++----------
+ 2 files changed, 29 insertions(+), 10 deletions(-)
+
+commit d37843877a6f93a9f27502d07ad82cba79e9aa73
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Wed Jul 4 08:26:52 2007 +0000
+
+ 2007-07-04 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-attachment.cc:
+ * glib/poppler-attachment.h: Add size, creation and modification
+ date and checksum properties to attachments. Fix memory leaks.
+ * glib/test-poppler-glib.c:
+ * glib/poppler.h:
+ * glib/poppler-private.h:
+ * glib/poppler-document.cc: Add a function to convert a pdf date
+ into a GTime that is used by attachments and document
+ properties. Fix memory leak in attachments.
+
+ ChangeLog | 12 ++++
+ glib/poppler-attachment.cc | 25 +++++++-
+ glib/poppler-attachment.h | 16 +++--
+ glib/poppler-document.cc | 142 +++++++++++++++++++++++---------------------
+ glib/poppler-private.h | 6 +-
+ glib/poppler.h | 1 +
+ glib/test-poppler-glib.c | 56 +++++++++++++++--
+ 7 files changed, 171 insertions(+), 87 deletions(-)
+
+commit d933f47d4af0992059148259a189373b42499bbe
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 3 20:31:20 2007 +0000
+
+ * qt4/tests/poppler-fonts.cpp: For the sake of completeness, add all
+ the enums
+
+ ChangeLog | 2 ++
+ qt4/tests/poppler-fonts.cpp | 28 ++++++++++++++++++++--------
+ 2 files changed, 22 insertions(+), 8 deletions(-)
+
+commit d90b166cfbdc4857351baa627d158d5e0b6652b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 3 16:46:51 2007 +0000
+
+ * poppler/Catalog.cc: Fix crash, embeddedFileNameTree.getName(i)
+ returns a reference to its own data so does not have to be deleted
+ * qt4/tests/poppler-attachments.cpp: Delete the doc, just for sake of
+ correctness
+
+ ChangeLog | 7 +++++++
+ poppler/Catalog.cc | 1 -
+ qt4/tests/poppler-attachments.cpp | 1 +
+ 3 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 7fa87eb2b093770271bc3a72de5b0b9dc228aa1b
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 3 14:01:40 2007 +0000
+
+ 2007-07-03 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c: Add choice_commit_on_change function
+ to glib bindings.
+
+ ChangeLog | 7 +++++++
+ glib/poppler-form-field.cc | 8 ++++++++
+ glib/poppler-form-field.h | 1 +
+ glib/test-poppler-glib.c | 2 ++
+ 4 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 8b67e0403f6eaab6770cc0b7861074ae0b6d85bb
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Tue Jul 3 13:49:18 2007 +0000
+
+ 2007-07-03 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c: Fix a typo.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-form-field.cc | 2 +-
+ glib/poppler-form-field.h | 2 +-
+ glib/test-poppler-glib.c | 2 +-
+ 4 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 33a5765eb404a4b321b09c26af74c1ed64a5d474
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 3 13:22:54 2007 +0000
+
+ * poppler/Catalog.cc:
+ * poppler/Catalog.h: Add size and checksum properties to the embeded
+ files
+ * qt4/src/poppler-embeddedfile.cc:
+ * qt4/src/poppler-qt4.h: Add size and checksum properties to the qt4
+ frontend
+
+ ChangeLog | 9 +++++++++
+ poppler/Catalog.cc | 19 ++++++++++++++++---
+ poppler/Catalog.h | 13 +++++++++++--
+ qt4/src/poppler-embeddedfile.cc | 16 ++++++++++++++++
+ qt4/src/poppler-qt4.h | 14 ++++++++++++++
+ 5 files changed, 66 insertions(+), 5 deletions(-)
+
+commit c7d21f9354bbe090cce6459124dcaadf1e46639e
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jul 2 13:39:32 2007 +0000
+
+ 2007-07-02 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c:
+ Use FILE_SELECT instead of FILESELECT and fix a typo. Patch by
+ Kouhei Sutou
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-form-field.cc | 2 +-
+ glib/poppler-form-field.h | 2 +-
+ glib/test-poppler-glib.c | 2 +-
+ 4 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 5e301064c62c6d58f488839d7bf804af912a3de1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Mon Jul 2 13:34:26 2007 +0000
+
+ 2007-07-02 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/test-poppler-glib.c:
+ Add poppler_form_field_is_read_only to glib bindings. Patch by
+ Kouhei Sutou
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-form-field.cc | 8 ++++++++
+ glib/poppler-form-field.h | 1 +
+ glib/test-poppler-glib.c | 6 +++++-
+ 4 files changed, 23 insertions(+), 1 deletions(-)
+
+commit 11875746ce28e8999bcad46167fcfea131cd267a
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jun 30 08:33:30 2007 +0000
+
+ 2007-06-30 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.cc: Use poppler_page_transition_get_type
+ instead of poppler_page_transition which doesn't exist. Patch by
+ Kouhei Sutou
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 0a5acaae3b9bfcd731bc4e072f35f9433aa773da
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jun 30 08:25:15 2007 +0000
+
+ 2007-06-30 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/Makefile.am:
+ * glib/poppler-form-field.cc:
+ * glib/poppler-form-field.h:
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c: Improve forms API in the glib bindings
+ in order to make it more consistent with the current API and
+ easier to use.
+
+ ChangeLog | 15 ++
+ glib/Makefile.am | 2 +
+ glib/poppler-document.cc | 197 ++-------------------------
+ glib/poppler-document.h | 55 +--------
+ glib/poppler-form-field.cc | 316 ++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-form-field.h | 96 +++++++++++++
+ glib/poppler-page.cc | 210 ++++++++++++-----------------
+ glib/poppler-page.h | 55 ++-------
+ glib/poppler-private.h | 11 +-
+ glib/poppler.h | 40 ++----
+ glib/test-poppler-glib.c | 119 ++++++++++++++---
+ 11 files changed, 662 insertions(+), 454 deletions(-)
+
+commit 2212874e57a6eb9db733b2e9a98f0cfcb88a8fc1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 26 21:31:07 2007 +0000
+
+ * poppler/Form.cc: Don't crash on documents with AcroForm but no
+ AcroForm->Fields (it's mandatory but...)
+
+ ChangeLog | 5 +++++
+ poppler/Form.cc | 54 +++++++++++++++++++++++++++++-------------------------
+ 2 files changed, 34 insertions(+), 25 deletions(-)
+
+commit e48ee9c4af6bf98b6988c51dcab9ee9ef6e3cafe
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sat Jun 23 18:06:07 2007 +0000
+
+ 2007-06-23 Carlos Garcia Campos <carlosgc@gnome.org>
+ * poppler/Annot.cc:
+ * poppler/Form.cc: Fix memory leaks.
+
+ ChangeLog | 5 +++++
+ poppler/Annot.cc | 2 +-
+ poppler/Form.cc | 13 +++++++++----
+ 3 files changed, 15 insertions(+), 5 deletions(-)
+
+commit d874a2753e3ac51b6f539dfdf980435c8c381b4f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 20 20:07:15 2007 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-document.cc: Allow access to a document's metadata contents
+ from the qt4 binding. Based on patch by Jason Kivlighn
+ * qt4/tests/test-poppler-qt4.cpp: Print metadata if it exists
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-document.cc | 13 +++++++++++++
+ qt4/src/poppler-qt4.h | 5 +++++
+ qt4/tests/test-poppler-qt4.cpp | 1 +
+ 4 files changed, 24 insertions(+), 0 deletions(-)
+
+commit 08d4c437e735ac50a340c4ae17ee0eeccd00dc20
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 20 18:40:03 2007 +0000
+
+ * glib/poppler-document.cc: Allow access to a document's metadata stream
+ through the glib binding. Patch by Jason Kivlighn
+ <jkivlighn@gmail.com> Approved by Carlos
+
+ ChangeLog | 6 ++++++
+ glib/poppler-document.cc | 21 +++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 0 deletions(-)
+
+commit cdd2a49dc99aa16ded674c58dbb50298f06cf18a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 15 18:15:53 2007 +0000
+
+ * poppler/ABWOutputDev.cc: Replaces the getBiggestSeperator function
+ at the ABWoutputdev with one that is easier to read/debug
+ and less likely to contain bugs. Some cosmetic fixes at the
+ functions recursiveXYC and splitnodes. Patch by
+ Jauco Noordzij <jauco.noordzij@gmail.com>. More info at bug #11273
+
+ ChangeLog | 8 +
+ poppler/ABWOutputDev.cc | 384 ++++++++++++-----------------------------------
+ 2 files changed, 106 insertions(+), 286 deletions(-)
+
+commit 7f23383197b0e2fa24be7b4925ea6f39eb95bbc1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 13 20:39:21 2007 +0000
+
+ * poppler/ABWOutputDev.cc
+ * poppler/ABWOutputDev.h: Remove dependency on debugxml. Patch by
+ Jauco Noordzij <jauco.noordzij@gmail.com>. Fixes bug #11187
+
+ ChangeLog | 6 +++
+ poppler/ABWOutputDev.cc | 80 ++++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/ABWOutputDev.h | 1 +
+ 3 files changed, 86 insertions(+), 1 deletions(-)
+
+commit 948520cd529ce47d1970aae6a0b8058128e37c30
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 13 18:50:40 2007 +0000
+
+ * goo/FixedPoint.h
+ * goo/gmem.h
+ * poppler/SecurityHandler.h
+ * poppler/poppler-config.h.in
+ * utils/ImageOutputDev.h:
+ Patch by Axel Howind <Axel.Howind@htp-tel.de>
+ - include USE_EXCEPTIONS and USE_FIXEDPOINT in poppler-config.h.in
+ - fix typo (MULTITHREADED/MULTITHREADING) in poppler.config.h.in
+ - change installed headers to include poppler-config.h instead of
+ config.h
+ - use <poppler/poppler-config.h> instead of <poppler-config.h> so that
+ installed headers can be used without including .../include/poppler
+ in the include path
+
+ ChangeLog | 16 ++++++++++++++++
+ goo/FixedPoint.h | 2 +-
+ goo/gmem.h | 2 +-
+ poppler/SecurityHandler.h | 2 +-
+ poppler/poppler-config.h.in | 12 +++++++++++-
+ utils/ImageOutputDev.h | 2 +-
+ 6 files changed, 31 insertions(+), 5 deletions(-)
+
+commit 825461e47b05595805e87a0d2960b07197c8da8b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 13 18:24:56 2007 +0000
+
+ configure.ac: Fix detection of glib
+
+ ChangeLog | 4 ++++
+ configure.ac | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit a67a93fc6b4812a4f892b311c5b299e59283cd47
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jun 11 21:14:22 2007 +0000
+
+ * poppler/CMap.h:
+ * poppler/CharCodeToUnicode.h:
+ * poppler/GlobalParams.h:
+ * poppler/PageLabelInfo.h:
+ * poppler/UnicodeMap.h: Further include cleanup. Patch by Axel Howind
+ on bug #11228
+
+ ChangeLog | 9 +++++++++
+ poppler/CMap.h | 2 +-
+ poppler/CharCodeToUnicode.h | 2 +-
+ poppler/GlobalParams.h | 2 +-
+ poppler/PageLabelInfo.h | 6 +++---
+ poppler/UnicodeMap.h | 2 +-
+ 6 files changed, 16 insertions(+), 7 deletions(-)
+
+commit 051b31af053cac4727718169b79b25451a4bdd95
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jun 11 21:11:05 2007 +0000
+
+ * qt/poppler-qt.h
+ * qt4/src/poppler-qt4.h: Headers cleanup
+
+ ChangeLog | 5 +++++
+ qt/poppler-qt.h | 6 +++---
+ qt4/src/poppler-qt4.h | 8 ++++----
+ 3 files changed, 12 insertions(+), 7 deletions(-)
+
+commit 3e1597b80fc6750f1ec3269f9819aa8225879524
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 8 22:39:23 2007 +0000
+
+ poppler/Annot.cc: Fix leak
+
+ ChangeLog | 4 ++++
+ poppler/Annot.cc | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 49535c20b4f71d1c1381134233e2e1449cf560c0
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Jun 7 21:23:03 2007 +0000
+
+ 2007-06-07 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/ABWOutputDev.cc: Change "and", "or", "not" to "&&", "||",
+ "!" for consistency with the rest of the code. Patch by Jens Granseuer
+
+ ChangeLog | 5 +++
+ poppler/ABWOutputDev.cc | 93 ++++++++++++++++++++++++-----------------------
+ 2 files changed, 52 insertions(+), 46 deletions(-)
+
+commit dd8fa975bf51dd18120369d0ef2d8f1781e04d93
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 2 09:18:11 2007 +0000
+
+ correct form of patch 11102
+
+ utils/HtmlFonts.cc | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit cdf70857ece0748f13b11c923ccf9626094555b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 1 18:34:48 2007 +0000
+
+ * poppler/ArthurOutputDev.cc
+ * splash/SplashFTFont.cc
+ * splash/SplashMath.h: Make it compile with --enable-fixedpoint. Fixes
+ bug 11110
+
+ ChangeLog | 7 +++++++
+ poppler/ArthurOutputDev.cc | 8 ++++----
+ splash/SplashFTFont.cc | 8 ++++----
+ splash/SplashMath.h | 2 +-
+ 4 files changed, 16 insertions(+), 9 deletions(-)
+
+commit 90b1a404629a884cc32737a3a729c9a75f7a59c1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 30 18:33:24 2007 +0000
+
+ * configure.ac: Fix to check for glib-2.0 not glib that is 1.0. Patch
+ came though Pardus developers and they don't remember where they got
+ it from.
+
+ ChangeLog | 6 ++++++
+ configure.ac | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 03d766ea1ddd4ce6d938f96b53906a7dc8bd179a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 30 18:29:57 2007 +0000
+
+ make dist needs this
+
+ qt4/src/Makefile.am | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d540c04268047fdd125ad932ca05c7553a97c0fe
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 30 17:50:00 2007 +0000
+
+ * utils/HtmlFonts.cc: Make pdftohtml not pollute stdout. Patch by
+ Nanning Buitenhuis <nanning@elvenkind.com>
+
+ And some changes in glib/reference/tmpl
+
+ ChangeLog | 5 +
+ glib/reference/tmpl/poppler-document.sgml | 4 +
+ glib/reference/tmpl/poppler-enums.sgml | 150 +++++++++++++++++++++++++++++
+ glib/reference/tmpl/poppler-page.sgml | 5 +-
+ glib/reference/tmpl/poppler-unused.sgml | 130 -------------------------
+ utils/HtmlFonts.cc | 2 +-
+ 6 files changed, 162 insertions(+), 134 deletions(-)
+
+commit ce414f2a36f4d97a3bddfd42baabdc1e34bf9321
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue May 29 22:01:58 2007 +0000
+
+ 2007-05-29 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/gen-unicode-tables.py: Add this script to fix distcheck.
+
+ ChangeLog | 4 ++++
+ poppler/gen-unicode-tables.py | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 0 deletions(-)
+
+commit 97e602752b05f3690acb1821bdca31c5771361e1
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun May 27 11:24:40 2007 +0000
+
+ 2007-05-27 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/test-poppler-glib.c: Add forms test
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ Fix indentation, some code cleanups and memory leaks.
+
+ ChangeLog | 7 ++
+ glib/poppler-page.cc | 198 +++++++++++++++++++++++++++------------------
+ glib/poppler-page.h | 6 +-
+ glib/test-poppler-glib.c | 39 +++++++++
+ 4 files changed, 168 insertions(+), 82 deletions(-)
+
+commit 3d31c2b1ea913fc80211f1c6fed9b3666f124049
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Sun May 27 10:12:56 2007 +0000
+
+ 2007-05-27 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ Add missing image mapping type definition.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 48 +++++++++++++++++++++++++++++++++++++++++++++---
+ glib/poppler-page.h | 5 +++++
+ 3 files changed, 56 insertions(+), 3 deletions(-)
+
+commit 8284a769568322066a9d4626bd9b2cf3d18a6487
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 26 23:20:12 2007 +0000
+
+ * configure.ac:
+ * NEWS: Bump release to 0.5.9 (0.6 Release Candidate)
+
+ ChangeLog | 2 ++
+ NEWS | 15 +++++++++++++++
+ configure.ac | 2 +-
+ 3 files changed, 18 insertions(+), 1 deletions(-)
+
+commit e6ff9e0d95e058f6aff3c72d5f4d7d7ccf661999
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 26 22:33:21 2007 +0000
+
+ * poppler-qt.pc.in:
+ * poppler-qt4.pc.in:
+ * qt/Makefile.am:
+ * qt4/src/Makefile.am: Install qt3 and qt4 headers in separate dirs.
+ That way be can reuse poppler-page-transition.h and distros don't get
+ conflicts when making separate qt3 and qt4 packages
+
+ ChangeLog | 9 +++++++++
+ poppler-qt.pc.in | 2 +-
+ poppler-qt4.pc.in | 2 +-
+ qt/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 2 +-
+ 5 files changed, 13 insertions(+), 4 deletions(-)
+
+commit fefefe495a182c1745314186b99441b9e76ba5b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 25 23:17:58 2007 +0000
+
+ * qt4/src/poppler-link-extractor-private.cc:
+ * qt4/src/poppler-link-extractor-private.h:
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-link.h: Return link coordinates in 0..1 range
+ instead of 0..size, much more easier to do user<->dev transformations
+ * qt4/src/poppler-private.h: Fix indentation
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-link-extractor-private.h | 1 +
+ qt4/src/poppler-link-extractor.cc | 12 ++++++------
+ qt4/src/poppler-link.cc | 25 +++++++++++++++----------
+ qt4/src/poppler-link.h | 7 ++++++-
+ qt4/src/poppler-private.h | 15 ++++++++-------
+ 6 files changed, 42 insertions(+), 24 deletions(-)
+
+commit ecaeaa9512d1dae4a036703ea8739102a8e463f0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 25 22:30:20 2007 +0000
+
+ * qt4/src/poppler-link-extractor.cc: Use correct page box to extract
+ link clickable area
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-link-extractor.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 774a9456c668ef70b2e8f17d59f8f427aa97bad5
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri May 25 18:43:04 2007 +0000
+
+ 2007-05-25 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GfxFont.cc:
+ * poppler/GfxFont.h:
+ * poppler/GlobalParams.cc:
+ Don't cache DisplayFontParams by font name, instead cache them
+ in GfxFont. Fixes #8140.
+
+ ChangeLog | 8 ++++++++
+ poppler/GfxFont.cc | 2 ++
+ poppler/GfxFont.h | 6 ++++++
+ poppler/GlobalParams.cc | 4 ++--
+ 4 files changed, 18 insertions(+), 2 deletions(-)
+
+commit a88fadf0bb9af55c83c9c4f7d08deb17d6aa9ae4
+Author: Carlos Garcia Campos <carlosgc@gnome.org>
+Date: Fri May 25 17:33:37 2007 +0000
+
+ 2007-05-25 Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.h:
+ Add selection style parameter to render_selection in order to allow
+ requesting selections of words and paragraphs.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-page.cc | 30 ++++++++++++++++--------------
+ glib/poppler-page.h | 6 ++++--
+ glib/poppler.h | 7 +++++++
+ 4 files changed, 35 insertions(+), 16 deletions(-)
+
+commit bf195b489c22875695e202d6ca6659144ef57e61
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 23 21:20:58 2007 +0000
+
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h:
+ Better handle the setting of the vector antialiasing for Splash.
+ * qt4/src/Mainpage.dox:
+ * qt4/src/poppler-link.h:
+ * qt4/src/poppler-qt4.h:
+ A few of API documentation fixes and improvements.
+
+ ChangeLog | 10 +++++++
+ qt4/src/Mainpage.dox | 8 +----
+ qt4/src/poppler-document.cc | 5 ++-
+ qt4/src/poppler-link.h | 4 ++-
+ qt4/src/poppler-private.h | 1 +
+ qt4/src/poppler-qt4.h | 57 ++++++++++++++++++++++++++++--------------
+ 6 files changed, 57 insertions(+), 28 deletions(-)
+
+commit 36d1fe292778ba29990a389c50a0df0d51f11913
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 21 21:42:38 2007 +0000
+
+ Fix assert in bug 11023
+
+ ChangeLog | 4 ++++
+ glib/poppler-action.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 5b411246a2cce6ed3bb2d8c9e9d856227b6aba7f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 21 21:39:08 2007 +0000
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ poppler_page_render_section() for cairo. Bug 7023
+
+ ChangeLog | 6 +++
+ glib/poppler-page.cc | 88 ++++++++++++++++++++++++++++++++++++++++++++------
+ glib/poppler-page.h | 9 +++++
+ 3 files changed, 93 insertions(+), 10 deletions(-)
+
+commit 409f2a9cb31add29accb87011331c50dc08110cd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 21 21:35:10 2007 +0000
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c:
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Extend CairoOutputdev to do
+ image caching when rendering
+
+ ChangeLog | 11 +++
+ glib/poppler-page.cc | 161 ++++++++++++++++++++++++++++++++--
+ glib/poppler-page.h | 10 ++
+ glib/poppler-private.h | 3 +
+ glib/poppler.h | 9 +-
+ glib/test-poppler-glib.c | 27 ++++++-
+ poppler/CairoOutputDev.cc | 215 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 122 +++++++++++++++++++++++++
+ 8 files changed, 545 insertions(+), 13 deletions(-)
+
+commit afd11ec66430dae084b5a5560333e933460fc637
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 21 21:29:09 2007 +0000
+
+ * poppler/Annot.cc: avoid crashing if the font for the drawing methods
+ can not be found
+ * poppler/Form.cc: fix memory leak
+ * qt4/src/poppler-private.h: fix the UnicodeParsedString function to
+ really work and not crash
+ * splash/SplashTypes.h: RGB8X mode makes max number of components in
+ any SplashColor always be 4
+
+ ChangeLog | 11 +++++++++++
+ poppler/Annot.cc | 6 ++++++
+ poppler/Form.cc | 1 +
+ qt4/src/poppler-private.h | 5 ++++-
+ splash/SplashTypes.h | 6 +-----
+ 5 files changed, 23 insertions(+), 6 deletions(-)
+
+commit f019c8a8efde004e1663ea88cb48c0e46318d936
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu May 17 21:32:57 2007 +0000
+
+ 2007-05-17 Pino Toscano <pino@kde.org>
+
+ * qt4/src/poppler-link.cc:
+ Give some default values to LinkDestination
+ * qt4/src/poppler-private.h:
+ Fix memory leak when converting QString -> GooString
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-link.cc | 12 ++++++++++++
+ qt4/src/poppler-private.h | 4 +++-
+ 3 files changed, 22 insertions(+), 1 deletions(-)
+
+commit d68a4eb44b5390b3093774f39a6805ad2e95c146
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun May 13 00:53:43 2007 +0000
+
+ 2007-05-12 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Annot.cc: Only do appearance generation for text, choice or
+ other fields that contain text. Patch by Julien Rebetez.
+
+ ChangeLog | 5 +++++
+ poppler/Annot.cc | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 51 insertions(+), 6 deletions(-)
+
+commit 96f8731e90af1abce67d00a3febc11880c69ce62
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 7 18:41:09 2007 +0000
+
+ * Catalog.cc: Fix leak
+ * Form.cc: Fix leak, provide empty FormPageWidgets::~FormPageWidgets
+ implementation
+ * Page.cc: Fix leak
+
+ ChangeLog | 7 +++++++
+ poppler/Catalog.cc | 1 +
+ poppler/Form.cc | 5 +++++
+ poppler/Page.cc | 1 +
+ 4 files changed, 14 insertions(+), 0 deletions(-)
+
+commit d46553d696b2d7fe416ce8db40db54dd1d7c6733
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Apr 30 22:34:21 2007 +0000
+
+ * poppler/Makefile.am: Don't link cairo to all poppler, just to
+ poppler_cairo so when compiling the qt frontend and the glib frontend
+ the qt one does not end up depending on cairo
+
+ ChangeLog | 6 ++++++
+ poppler/Makefile.am | 1 -
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit d5c52409c532a126bcb8eb65f6f1390113a5f258
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 29 17:37:38 2007 +0000
+
+ jeff committed this line by mistake
+
+ ChangeLog | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 6ddc11ef4c534369ee104422bfb989603c466790
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Apr 29 17:33:58 2007 +0000
+
+ 2007-04-29 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/UnicodeTypeTable.cc: Make some of the unicode tables const
+ which gets rid of about 20k of data.
+
+ text data bss dec hex filename
+ before: 1415838 128864 8 1544710 179206 libpoppler.so
+ after: 1404574 140128 8 1544710 179206 libpoppler.so
+
+ ChangeLog | 10 ++++++++++
+ poppler/UnicodeTypeTable.cc | 24 ++++++++++++------------
+ 2 files changed, 22 insertions(+), 12 deletions(-)
+
+commit c5613ab5ce65fc84eb3a5584cee1454171173fa7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 23:25:59 2007 +0000
+
+ * poppler/SplashOutputDev.cc:
+ * qt/poppler-private.h:
+ * qt4/src/poppler-private.h:
+ * splash/Splash.cc:
+ * splash/SplashBitmap.cc:
+ * splash/SplashTypes.h: Rename splashModeRGBX8 to splashModeXBGR8 and
+ hopefully fix qt frontends image generation
+
+ ChangeLog | 10 ++++
+ poppler/SplashOutputDev.cc | 102 ++++++++++++++++++++++++++++++++------------
+ qt/poppler-private.h | 2 +-
+ qt4/src/poppler-private.h | 2 +-
+ splash/Splash.cc | 44 ++++++++++---------
+ splash/SplashBitmap.cc | 16 +++---
+ splash/SplashTypes.h | 4 +-
+ 7 files changed, 120 insertions(+), 60 deletions(-)
+
+commit 6479ce224f1393235ca9888dfe0710327fbfccd2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 22:12:22 2007 +0000
+
+ fix merging problems
+
+ splash/Splash.cc | 1 +
+ splash/SplashBitmap.cc | 1 -
+ 2 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e2ac4ada3e29139053871ff7f53772e1ccc7adc0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 15:39:36 2007 +0000
+
+ \n at the end of the printf
+ Although i'm not sure we want to printf this...
+
+ poppler/GlobalParams.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9b8133940638c95940edcb9b98126ca9a4f7b8d4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 12:00:38 2007 +0000
+
+ * qt4/src/Makefile.am:
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-ps-converter.cc:
+ * qt4/src/poppler-qt4.h: Replace Document::print function with lots of
+ arguments with a helper class with lots of functions. Will help
+ mantaining BC in case we decide to add more functionality to the
+ printing process.
+
+ ChangeLog | 10 ++
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-document.cc | 39 +-------
+ qt4/src/poppler-ps-converter.cc | 190 +++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 119 +++++++++++++++++++++----
+ 5 files changed, 307 insertions(+), 52 deletions(-)
+
+commit 26d5fefcd4c858e2ebd689d963a65773957ac808
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 11:35:34 2007 +0000
+
+ * qt4/src/poppler-page.cc:
+ Hopefully fix the calculation of the image size when rendering using
+ ArthurOutputDev.
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-page.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 218364bc4951682de8e63e1bd3f061636b08b615
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 11:34:14 2007 +0000
+
+ * glib/poppler-document.h:
+ * poppler/FontInfo.h:
+ * qt/poppler-qt.h:
+ * qt4/src/poppler-qt4.h: GfxFontType changed, adapt enums of the
+ frontends and helper classes. Forgot to do it before merging.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-document.h | 6 +++++-
+ poppler/FontInfo.h | 6 +++++-
+ qt/poppler-qt.h | 6 +++++-
+ qt4/src/poppler-qt4.h | 20 ++++++++++++--------
+ 5 files changed, 35 insertions(+), 11 deletions(-)
+
+commit c1a40d3b4e9b27e34c94c9477a0313534563a394
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 11:20:58 2007 +0000
+
+ * qt4/src/poppler-annotation.h:
+ Make the header clean.
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-annotation.h | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 3f4bf880b95e28a1ae7a38b18b341e089860780c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 28 11:16:49 2007 +0000
+
+ * qt4/src/Makefile.am:
+ * qt4/src/poppler-link-extractor-private.h:
+ * qt4/src/poppler-link-extractor.cc:
+ * qt4/src/poppler-page-private.h:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h:
+ Getting the links of a page now is not more dependant on the current
+ output device, and can be done anytime; thus, the doLinks parameter
+ of the Page::render() can be dropped.
+
+ ChangeLog | 13 +++++
+ qt4/src/Makefile.am | 3 +-
+ qt4/src/poppler-link-extractor-private.h | 55 ++++++++++++++++++++++
+ qt4/src/poppler-link-extractor.cc | 74 ++++++++++++++++++++++++++++++
+ qt4/src/poppler-page-private.h | 38 +++++++++++++++
+ qt4/src/poppler-page.cc | 52 +++------------------
+ qt4/src/poppler-private.h | 5 ++-
+ qt4/src/poppler-qt4.h | 4 +-
+ 8 files changed, 195 insertions(+), 49 deletions(-)
+
+commit 7f9eec9ef4e7dc895d2a3e38014b6368cc7564b6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Apr 27 22:41:10 2007 +0000
+
+ 2007-04-28 Albert Astals Cid <aacid@kde.org>
+
+ * qt4/*: Stop requyring users to declare UNSTABLE_POPPLER_QT4
+
+ ChangeLog | 4 ++++
+ qt4/src/Doxyfile | 2 +-
+ qt4/src/Mainpage.dox | 3 +--
+ qt4/src/poppler-document.cc | 2 --
+ qt4/src/poppler-embeddedfile.cc | 2 --
+ qt4/src/poppler-fontinfo.cc | 2 --
+ qt4/src/poppler-form.cc | 1 -
+ qt4/src/poppler-link.cc | 2 --
+ qt4/src/poppler-page.cc | 1 -
+ qt4/src/poppler-qt4.h | 3 ---
+ qt4/src/poppler-sound.cc | 2 --
+ qt4/src/poppler-textbox.cc | 2 --
+ qt4/tests/check_attachments.cpp | 1 -
+ qt4/tests/check_dateConversion.cpp | 1 -
+ qt4/tests/check_fonts.cpp | 1 -
+ qt4/tests/check_metadata.cpp | 1 -
+ qt4/tests/check_pagelayout.cpp | 1 -
+ qt4/tests/check_pagemode.cpp | 1 -
+ qt4/tests/check_permissions.cpp | 1 -
+ qt4/tests/poppler-attachments.cpp | 1 -
+ qt4/tests/poppler-fonts.cpp | 1 -
+ qt4/tests/stress-poppler-qt4.cpp | 1 -
+ qt4/tests/test-password-qt4.cpp | 1 -
+ qt4/tests/test-poppler-qt4.cpp | 1 -
+ 24 files changed, 6 insertions(+), 32 deletions(-)
+
+commit 45993a6faafd7646075bc6630d5d2ad7a44f7e20
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Apr 27 22:26:09 2007 +0000
+
+ 2007-04-28 Carlos Garcia Campos <carlosgc@gnome.org>
+ reviewed and some code by: Albert Astals Cid <aacid@kde.org>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c:
+ * poppler/Makefile.am:
+ * poppler/PageTransition.cc:
+ * poppler/PageTransition.h:
+ * qt/poppler-page-transition.cc:
+ * qt/poppler-page-transition.h: Move Page Transition parsing from qt
+ frontends to poppler core. Expose Page transitions on the glib
+ frontend.
+
+ ChangeLog | 15 +++
+ glib/poppler-page.cc | 122 +++++++++++++++++++++++++
+ glib/poppler-page.h | 111 ++++++++++++++----------
+ glib/poppler.h | 58 +++++++++---
+ glib/test-poppler-glib.c | 60 +++++++++++++
+ poppler/Makefile.am | 2 +
+ poppler/PageTransition.cc | 197 +++++++++++++++--------------------------
+ poppler/PageTransition.h | 86 ++++++++++++++++++
+ qt/poppler-page-transition.cc | 145 ++++++-------------------------
+ qt/poppler-page-transition.h | 9 ++-
+ 10 files changed, 497 insertions(+), 308 deletions(-)
+
+commit 877d6b202a75eb12119b16e740f85cc8b477d589
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Apr 27 21:25:30 2007 +0000
+
+ * glib/poppler-page.cc:
+ * poppler/PSOutputDev.cc:
+ * poppler/PSOutputDev.h:
+ * qt/poppler-document.cc:
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-qt4.h:
+ * utils/pdftohtml.cc:
+ * utils/pdftops.cc:
+ Add option to force rasterizing the pages when printing them
+ Add functionality to output the title field on the PS file
+ Only Qt4 frontend exposes the functionality
+
+ Bringing this features from KPDF 3.5.7 to poppler
+ Testers welcome
+ Patches for other frontends more than welcome
+ Comments and suggestions even more than welcome :-)
+
+ ChangeLog | 14 ++++++++++++
+ glib/poppler-page.cc | 3 +-
+ poppler/PSOutputDev.cc | 48 +++++++++++++++++++++++++++++-------------
+ poppler/PSOutputDev.h | 17 +++++++++-----
+ qt/poppler-document.cc | 2 +-
+ qt4/src/poppler-document.cc | 9 ++++++-
+ qt4/src/poppler-qt4.h | 2 +-
+ utils/pdftohtml.cc | 2 +-
+ utils/pdftops.cc | 2 +-
+ 9 files changed, 71 insertions(+), 28 deletions(-)
+
+commit 99053be5357235c47a87775985646ef8d9880ed9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Apr 26 17:57:01 2007 +0000
+
+ * goo/Makefile.am: Remove duplicate gmem.h
+
+ ChangeLog | 4 ++++
+ goo/Makefile.am | 1 -
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit f6adb46cd88d23b34f1918d3be31c05b68b6a443
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 25 21:31:17 2007 +0000
+
+ ignore pdftoabw binary
+
+ utils/.cvsignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e09f231ac6c03ac2c3606f1bf20ba1bde3d85abd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 25 21:25:06 2007 +0000
+
+ 2007-04-25 Albert Astals Cid <aacid@kde.org>
+
+ * qt4/src/poppler-document.cc: remove a delete[] no longer needed
+ * qt4/src/poppler-private: initilize m_hints
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-document.cc | 1 -
+ qt4/src/poppler-private.h | 1 +
+ 3 files changed, 6 insertions(+), 1 deletions(-)
+
+commit bf7e0e980bf29994021cb1228f89f582adddf284
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 25 19:59:09 2007 +0000
+
+ Merge xpdf302branch in HEAD as noone vetoed it.
+ Testing more than welcome
+
+ ChangeLog | 140 ++
+ configure.ac | 4 +
+ fofi/FoFiTrueType.cc | 458 +++-
+ fofi/FoFiTrueType.h | 42 +-
+ fofi/FoFiType1.cc | 65 +-
+ fofi/FoFiType1C.cc | 590 +++--
+ fofi/FoFiType1C.h | 7 +-
+ glib/poppler-action.cc | 12 +-
+ glib/poppler-document.cc | 5 +-
+ glib/poppler-page.cc | 8 +-
+ goo/FixedPoint.cc | 31 +-
+ goo/FixedPoint.h | 5 +
+ goo/GooString.cc | 444 ++++-
+ goo/GooString.h | 41 +-
+ goo/Makefile.am | 2 +-
+ goo/gfile.cc | 54 +-
+ goo/gmem.c | 238 --
+ goo/gmem.cc | 264 +++
+ goo/gmem.h | 27 +-
+ poppler/ABWOutputDev.cc | 1 -
+ poppler/ABWOutputDev.h | 1 -
+ poppler/Annot.cc | 1685 +++++++++++---
+ poppler/Annot.h | 83 +-
+ poppler/ArthurOutputDev.cc | 13 +-
+ poppler/Catalog.cc | 79 +-
+ poppler/Catalog.h | 16 +-
+ poppler/CharCodeToUnicode.cc | 31 +-
+ poppler/DCTStream.cc | 2 +-
+ poppler/DCTStream.h | 4 +-
+ poppler/Decrypt.cc | 427 ++++-
+ poppler/Decrypt.h | 54 +-
+ poppler/Dict.cc | 23 +-
+ poppler/Dict.h | 27 +-
+ poppler/FontInfo.cc | 1 -
+ poppler/Form.cc | 19 +-
+ poppler/Form.h | 2 +-
+ poppler/Function.cc | 65 +-
+ poppler/Function.h | 8 +-
+ poppler/Gfx.cc | 1247 ++++++++---
+ poppler/Gfx.h | 39 +-
+ poppler/GfxFont.cc | 45 +-
+ poppler/GfxFont.h | 7 +-
+ poppler/GfxState.cc | 209 ++-
+ poppler/GfxState.h | 42 +-
+ poppler/GlobalParams.cc | 399 ++++-
+ poppler/GlobalParams.h | 41 +-
+ poppler/JBIG2Stream.cc | 96 +-
+ poppler/JBIG2Stream.h | 4 +-
+ poppler/JPXStream.cc | 246 ++-
+ poppler/JPXStream.h | 8 +-
+ poppler/Lexer.cc | 18 +-
+ poppler/Link.cc | 150 +--
+ poppler/Link.h | 49 +-
+ poppler/Makefile.am | 4 +-
+ poppler/Object.cc | 5 +-
+ poppler/Object.h | 29 +-
+ poppler/Outline.cc | 1 -
+ poppler/OutputDev.cc | 2 +
+ poppler/OutputDev.h | 62 +-
+ poppler/PDFDoc.cc | 100 +-
+ poppler/PDFDoc.h | 21 +-
+ poppler/PSOutputDev.cc | 2407 +++++++++++++++----
+ poppler/PSOutputDev.h | 58 +-
+ poppler/PSTokenizer.cc | 2 +-
+ poppler/Page.cc | 227 ++-
+ poppler/Page.h | 22 +-
+ poppler/PageLabelInfo.cc | 1 -
+ poppler/Parser.cc | 66 +-
+ poppler/Parser.h | 11 +-
+ poppler/PreScanOutputDev.cc | 255 ++
+ poppler/PreScanOutputDev.h | 128 +
+ poppler/SecurityHandler.cc | 17 +-
+ poppler/SecurityHandler.h | 5 +
+ poppler/SplashOutputDev.cc | 1480 +++++++-----
+ poppler/SplashOutputDev.h | 41 +-
+ poppler/Stream.cc | 338 ++--
+ poppler/Stream.h | 39 +-
+ poppler/TextOutputDev.cc | 537 ++++-
+ poppler/TextOutputDev.h | 77 +-
+ poppler/UGooString.cc | 182 --
+ poppler/UGooString.h | 79 -
+ poppler/XRef.cc | 29 +-
+ poppler/XRef.h | 6 +-
+ qt/poppler-document.cc | 15 +-
+ qt/poppler-page-transition.cc | 1 -
+ qt/poppler-page.cc | 4 +-
+ qt/poppler-private.h | 72 +-
+ qt4/src/poppler-annotation-helper.h | 38 +-
+ qt4/src/poppler-document.cc | 7 +-
+ qt4/src/poppler-embeddedfile.cc | 6 +-
+ qt4/src/poppler-form.cc | 12 +-
+ qt4/src/poppler-page.cc | 8 +-
+ qt4/src/poppler-private.h | 76 +-
+ splash/Splash.cc | 4402 ++++++++++++++++++-----------------
+ splash/Splash.h | 137 +-
+ splash/SplashBitmap.cc | 110 +-
+ splash/SplashBitmap.h | 10 +-
+ splash/SplashClip.cc | 276 ++-
+ splash/SplashClip.h | 28 +-
+ splash/SplashFTFont.cc | 104 +-
+ splash/SplashFTFont.h | 5 +-
+ splash/SplashFTFontEngine.cc | 54 +-
+ splash/SplashFTFontEngine.h | 9 +-
+ splash/SplashFTFontFile.cc | 19 +-
+ splash/SplashFTFontFile.h | 9 +-
+ splash/SplashFont.cc | 6 +-
+ splash/SplashFont.h | 13 +-
+ splash/SplashFontEngine.cc | 72 +-
+ splash/SplashFontEngine.h | 11 +-
+ splash/SplashFontFile.cc | 1 -
+ splash/SplashFontFile.h | 2 +-
+ splash/SplashMath.h | 15 +-
+ splash/SplashPath.cc | 42 +-
+ splash/SplashPath.h | 31 +-
+ splash/SplashPattern.cc | 28 -
+ splash/SplashPattern.h | 25 -
+ splash/SplashScreen.cc | 304 +++-
+ splash/SplashScreen.h | 18 +-
+ splash/SplashState.cc | 63 +-
+ splash/SplashState.h | 14 +-
+ splash/SplashT1Font.cc | 101 +-
+ splash/SplashT1Font.h | 6 +-
+ splash/SplashT1FontEngine.cc | 4 +-
+ splash/SplashT1FontFile.cc | 9 +-
+ splash/SplashT1FontFile.h | 7 +-
+ splash/SplashTypes.h | 72 +-
+ splash/SplashXPath.cc | 353 ++--
+ splash/SplashXPath.h | 26 +-
+ splash/SplashXPathScanner.cc | 143 ++
+ splash/SplashXPathScanner.h | 13 +
+ utils/HtmlOutputDev.cc | 15 +-
+ utils/HtmlOutputDev.h | 15 +-
+ utils/pdffonts.cc | 15 +-
+ utils/pdfinfo.cc | 21 +-
+ utils/pdftoabw.cc | 1 -
+ utils/pdftohtml.cc | 3 +-
+ utils/pdftoppm.cc | 8 +
+ utils/pdftops.cc | 8 +-
+ utils/pdftotext.cc | 1 -
+ 139 files changed, 14088 insertions(+), 6589 deletions(-)
+
+commit ba74bb3b0632593d1937911d73709fc870480efd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Apr 16 21:25:46 2007 +0000
+
+ * qt4/src/poppler-private.h:
+ Add the information about the open/close item in the DOM tree
+ of the TOC.
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-private.h | 5 ++++-
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 6c7969f37c85f326327aca98e0346f2ebc86ffda
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 14 23:19:46 2007 +0000
+
+ * utils/HtmlFonts.cc: Fix rendering of text colors on complex mode.
+ * utils/pdftohtml.cc: Fix rendering of links.
+
+ ChangeLog | 5 +++++
+ utils/HtmlFonts.cc | 8 ++++----
+ utils/pdftohtml.cc | 2 +-
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+commit add8515d7b3fba59c20ed1bbb058cea9e138c1a8
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Apr 14 07:29:04 2007 +0000
+
+ Not sure what this was intended to do, but it triggers a lot of
+ problems with the unit tests (essentially, duplicate delete's).
+
+ CCMAIL: aacid@kde.org
+
+ qt4/src/poppler-embeddedfile.cc | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit f3ded10305f6ac682640c37c21f569db0f830756
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Apr 7 21:12:35 2007 +0000
+
+ 2007-04-07 Jeff Muizelaar <jeff@infidigm.net>
+
+ * utils/pdftoabw.cc: Fixing passing the wrong type
+ to fprintf. Patch by Kouhei Sutou. Fixes #10554.
+
+ ChangeLog | 5 +++++
+ utils/pdftoabw.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 2fcb76df955c143153fe4b273d0388fcb7f67d8a
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri Apr 6 15:27:52 2007 +0000
+
+ 2007-04-06 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/ABWOutputDev.cc:
+ * utils/pdftoabw.cc: Fix a number of issues with the new AbiWord code:
+ *) Allows you to save to a file other than stdout
+ *) Checks for error conditions when reading the PDF doc and
+ writing the ABW doc
+ *) Removes dead code in pdftoabw.cc
+ *) Fixes a SEGV I encountered when converting my new home's floor plan
+ *) Returns proper error conditions should the conversion fail for any reason
+ Patch by Dominic Lachowicz
+
+ ChangeLog | 12 ++++++
+ poppler/ABWOutputDev.cc | 3 +
+ utils/pdftoabw.cc | 101 +++++++++++++++++++++++++++-------------------
+ 3 files changed, 74 insertions(+), 42 deletions(-)
+
+commit 29da65ec48b5ba91139084e197ce457d3cff3732
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Apr 5 12:13:51 2007 +0000
+
+ * poppler/PSOutputDev.cc: Readd code wrongly removed when doing the GlobalParams cleaning
+
+ ChangeLog | 5 +++++
+ poppler/PSOutputDev.cc | 5 +++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 722b2bd86f58f2d7a914571cccfa195485a70c47
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 4 02:42:29 2007 +0000
+
+ 2007-04-03 Jeff Muizelaar <jeff@infidigm.net>
+
+ * configure.ac:
+ * poppler/ABWOutputDev.cc:
+ * poppler/ABWOutputDev.h:
+ * poppler/Makefile.am:
+ * utils/Makefile.am:
+ * utils/pdftoabw.cc: Add AbiWord output device and pdftoabw program.
+ Patch by Jauco Noordzij. Autotools stuff by Dominic Lachowicz.
+
+ ChangeLog | 10 +
+ configure.ac | 15 +
+ poppler/ABWOutputDev.cc | 1286 +++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/ABWOutputDev.h | 140 +++++
+ poppler/Makefile.am | 17 +
+ utils/Makefile.am | 16 +-
+ utils/pdftoabw.cc | 138 +++++
+ 7 files changed, 1620 insertions(+), 2 deletions(-)
+
+commit c9b467da290476da5ebbe8dc25699cd25e589b57
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 22 20:56:24 2007 +0000
+
+ * poppler/Gfx.cc: Accept reals for width and height of images. Fixes
+ KDE bug 143322
+
+ ChangeLog | 5 +++++
+ poppler/Gfx.cc | 14 ++++++++++----
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+commit ff8f8d44ef47a98f7dbdfaa4d27a720b1f37015f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 15 20:16:13 2007 +0000
+
+ * glib/Makefile.am: Make it build with BSD/Make. Patch by
+ Henry Precheur <henry@precheur.org>
+
+ ChangeLog | 5 +++++
+ glib/Makefile.am | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit bbf7e78b6b2509ecdc476d7f55151ef327470d9d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Mar 7 19:15:32 2007 +0000
+
+ 2007-03-07 Carlos Garcia Campos <carlosgc@gnome.org>
+ reviewed by: Albert Astals Cid <aacid@kde.org>
+
+ * poppler/Page.cc: Consider 0x0 boxes as invalid. Fixes
+ http://bugzilla.gnome.org/show_bug.cgi?id=408682
+
+ 2007-03-06 Pino Toscano <pino@kde.org>
+ reviewed by: Albert Astals Cid <aacid@kde.org>
+
+ * configure.ac:
+ * qt/Makefile.am:
+ * qt/poppler-link.cc:
+ * qt/poppler-page.cc:
+ * qt/poppler-private.h:
+ * qt4/poppler-link.cc:
+ Make the Qt4 frontend compilable again with no Splash.
+ Make the Qt3 frontend compilable with no Splash.
+
+ ChangeLog | 18 ++++++++++++++++++
+ configure.ac | 12 +-----------
+ poppler/Page.cc | 7 ++++++-
+ qt/Makefile.am | 1 -
+ qt/poppler-link.cc | 4 +++-
+ qt/poppler-page.cc | 16 +++++++++++++++-
+ qt/poppler-private.h | 11 ++++++++++-
+ qt4/src/poppler-link.cc | 10 ++++++----
+ 8 files changed, 59 insertions(+), 20 deletions(-)
+
+commit 08dcc7121450cbfa163254001e73bb6a2670e055
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 6 22:27:18 2007 +0000
+
+ * poppler/Annot.cc:
+ * poppler/Form.cc:
+ Fix uninitialized variables.
+ Properly escape parenthesis and slash in text field
+
+ ChangeLog | 9 ++++++++-
+ poppler/Annot.cc | 3 +++
+ poppler/Form.cc | 1 +
+ 3 files changed, 12 insertions(+), 1 deletions(-)
+
+commit e8d3b21d08a59ec8b62503b48504fe046d746bfa
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Mar 4 07:30:31 2007 +0000
+
+ Switch to using pkg-config to find Qt4.
+
+ ChangeLog | 9 +++
+ configure.ac | 36 +++++------
+ m4/qt.m4 | 165 -------------------------------------------------
+ poppler/Makefile.am | 2 +-
+ qt4/src/Makefile.am | 3 +-
+ qt4/tests/Makefile.am | 21 +++----
+ 6 files changed, 36 insertions(+), 200 deletions(-)
+
+commit bd99616b9c06f96beadb68e015d2904b7fe2df1d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 25 00:34:21 2007 +0000
+
+ 007-02-25 Julien Rebetez <julienr@svn.gnome.org>
+
+ reviewed by: Albert Astals Cid <aacid@kde.org>
+
+ * poppler/Annot.cc:
+ * poppler/Annot.h:
+ * poppler/Form.cc:
+ * poppler/Form.h:
+ Fix compilation warnings.
+
+ ChangeLog | 10 ++++++++++
+ poppler/Annot.cc | 30 +++++++++++++++++-------------
+ poppler/Annot.h | 5 ++++-
+ poppler/Form.cc | 37 ++++++++++++++-----------------------
+ poppler/Form.h | 13 ++++++-------
+ 5 files changed, 51 insertions(+), 44 deletions(-)
+
+commit d8d23b56332618d8c7d8198f55ec6efafd24187e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 25 00:00:20 2007 +0000
+
+ forgot to commit these
+
+ qt4/src/poppler-form.cc | 284 +++++++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-form.h | 247 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 531 insertions(+), 0 deletions(-)
+
+commit 984ce7f919aec27d5f4225376550cd6b58d4ae52
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 24 23:58:31 2007 +0000
+
+ 2007-02-25 Pino Toscano <pino@kde.org>
+ reviewed by: Albert Astals Cid <aacid@kde.org>
+
+ * qt4/src/Doxyfile:
+ * qt4/src/Makefile.am:
+ * qt4/src/poppler-annotation-helper.h:
+ * qt4/src/poppler-form.cc:
+ * qt4/src/poppler-form.h:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h:
+ Beginning of interactive forms support, first implementation in the
+ Qt4 frontend. It supports text and choice fields in a basic way.
+
+ ChangeLog | 14 +++++++++
+ qt4/src/Doxyfile | 1 +
+ qt4/src/Makefile.am | 2 +
+ qt4/src/poppler-annotation-helper.h | 18 ++++++------
+ qt4/src/poppler-page.cc | 36 ++++++++++++++++++++++++
+ qt4/src/poppler-private.h | 52 ++++++++++++++++++++++++++++++++++-
+ qt4/src/poppler-qt4.h | 7 +++++
+ 7 files changed, 120 insertions(+), 10 deletions(-)
+
+commit de7a90fc724de14151ec994d18f860ada3be2ac8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 24 23:43:34 2007 +0000
+
+ 2007-02-25 Albert Astals Cid <aacid@kde.org>
+
+ * configure.ac:
+ * glib/poppler-document.cc:
+ * poppler/GlobalParams.cc:
+ * poppler/GlobalParams.h:
+ * poppler/PSOutputDev.cc:
+ * qt/poppler-document.cc:
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h:
+ * test/gtk-splash-test.cc:
+ * test/pdf-inspector.cc:
+ * utils/pdffonts.cc:
+ * utils/pdfimages.cc:
+ * utils/pdfinfo.cc:
+ * utils/pdftohtml.cc:
+ * utils/pdftoppm.cc:
+ * utils/pdftops.cc:
+ * utils/pdftotext.cc: Remove dependency on xpdfrc file and cleanup
+ GlobalParams accordingly
+
+ ChangeLog | 22 ++
+ configure.ac | 1 -
+ glib/poppler-document.cc | 4 +-
+ poppler/GlobalParams.cc | 666 +------------------------------------------
+ poppler/GlobalParams.h | 59 +----
+ poppler/PSOutputDev.cc | 8 -
+ qt/poppler-document.cc | 4 +-
+ qt4/src/poppler-document.cc | 2 +-
+ qt4/src/poppler-private.h | 2 +-
+ qt4/src/poppler-qt4.h | 6 +-
+ test/gtk-splash-test.cc | 2 +-
+ test/pdf-inspector.cc | 2 +-
+ utils/pdffonts.cc | 5 +-
+ utils/pdfimages.cc | 5 +-
+ utils/pdfinfo.cc | 5 +-
+ utils/pdftohtml.cc | 2 +-
+ utils/pdftoppm.cc | 15 +-
+ utils/pdftops.cc | 50 ++--
+ utils/pdftotext.cc | 5 +-
+ 19 files changed, 72 insertions(+), 793 deletions(-)
+
+commit 74e70386b759a3cd9864d11eb4ca210010136aa5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 24 23:32:22 2007 +0000
+
+ 2007-02-25 Julien Rebetez <julienr@svn.gnome.org>
+ reviewed by: <aacid@kde.org>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ * poppler/Annot.cc:
+ * poppler/Annot.h:
+ * poppler/Catalog.cc:
+ * poppler/Catalog.h:
+ * poppler/CharCodeToUnicode.cc:
+ * poppler/CharCodeToUnicode.h:
+ * poppler/Dict.cc:
+ * poppler/Dict.h:
+ * poppler/Form.cc:
+ * poppler/Form.h:
+ * poppler/GfxFont.cc:
+ * poppler/GfxFont.h:
+ * poppler/Makefile.am:
+ * poppler/Object.h:
+ * poppler/Page.cc:
+ * poppler/Page.h:
+ * poppler/XRef.cc:
+ * poppler/XRef.h:
+ Beginning of Interactive Form support:
+ Add a bunch of new classes (FormWidget / FormField) to deal with form
+ fields.
+ Add support for object modification through XRef::setModifiedObject, as
+ well as a function to write the Xref to a file, which will be used
+ to implement PDF writing.
+ Add some functions to glib wrapper to expose the new form features.
+
+ ChangeLog | 35 ++
+ glib/poppler-document.cc | 192 +++++++
+ glib/poppler-document.h | 55 ++
+ glib/poppler-page.cc | 120 +++++
+ glib/poppler-page.h | 55 ++
+ glib/poppler-private.h | 4 +
+ glib/poppler.h | 15 +-
+ poppler/Annot.cc | 344 ++++++++++---
+ poppler/Annot.h | 21 +-
+ poppler/Catalog.cc | 17 +-
+ poppler/Catalog.h | 4 +
+ poppler/CharCodeToUnicode.cc | 34 ++
+ poppler/CharCodeToUnicode.h | 3 +
+ poppler/Dict.cc | 32 ++
+ poppler/Dict.h | 4 +
+ poppler/Form.cc | 1187 ++++++++++++++++++++++++++++++++++++++++++
+ poppler/Form.h | 470 +++++++++++++++++
+ poppler/GfxFont.cc | 27 +
+ poppler/GfxFont.h | 5 +
+ poppler/Makefile.am | 2 +
+ poppler/Object.h | 4 +
+ poppler/Page.cc | 11 +-
+ poppler/Page.h | 8 +-
+ poppler/XRef.cc | 87 +++
+ poppler/XRef.h | 9 +
+ 25 files changed, 2666 insertions(+), 79 deletions(-)
+
+commit 5c4ea446f33248964431e79b14592b30362634fe
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 18 21:44:24 2007 +0000
+
+ * configure.ac: Change {datadir}/poppler to {datarootdir}/poppler so
+ that i get /usr/local/share/poppler in config.h instead of
+ ${prefix}/poppler Better fixes are welcome.
+
+ ChangeLog | 6 ++++++
+ configure.ac | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit dd140dd63de661303b578863af4d515d82117cca
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 4 00:19:25 2007 +0000
+
+ fix date
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3c1ed68bf4ee49b27275f7f65d49f42933b1cfa0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 4 00:16:43 2007 +0000
+
+ * poppler/Lexer.cc:
+ * poppler/Lexer.h: Patch to fix regression introduced by optimizations
+ in bugzilla issue 7808
+
+ ChangeLog | 6 ++++++
+ poppler/Lexer.cc | 30 ++++++++++++++++++++----------
+ poppler/Lexer.h | 2 +-
+ 3 files changed, 27 insertions(+), 11 deletions(-)
+
+commit 672408839de0deac4c6006b54df723336ee4be2d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 31 22:05:09 2007 +0000
+
+ * qt4/src/poppler-page.cc:
+ Patch by Pino Toscano <pino@kde.org> to remove a nonsense done by him.
+
+ * qt4/tests/test-poppler-qt4.cpp:
+ Simply a bit. Patch by Pino Toscano <pino@kde.org>.
+
+ ChangeLog | 8 ++++++++
+ qt4/src/poppler-page.cc | 2 --
+ qt4/tests/test-poppler-qt4.cpp | 24 ++++++++++++------------
+ 3 files changed, 20 insertions(+), 14 deletions(-)
+
+commit 9c64b8c754e09ff2858af56ce38ef013002bf8e4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 31 18:48:16 2007 +0000
+
+ * m4/qt.m4: Fix Qt4 detection on Mac. Patch by Benjamin Reed <ranger@befunk.com>
+
+ ChangeLog | 5 +++++
+ m4/qt.m4 | 26 +++++++++++++++++++++++---
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+commit 1b81192ff2bb9fae4a7bbc685fafe1718f303a7b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 28 15:55:11 2007 +0000
+
+ * glib/poppler-page.cc: Make link mapping coordinates follow page
+ rotation. Patch by Carlos Garcia Campos <carlosgc@gnome.org>
+ * glib/poppler-action.cc: Fix link destination coordinates. Patch by
+ Carlos Garcia Campos <carlosgc@gnome.org>
+
+ ChangeLog | 4 ++
+ glib/poppler-action.cc | 15 +++++-
+ glib/poppler-page.cc | 124 ++++++++++++++++++++++++++++++-----------------
+ 3 files changed, 97 insertions(+), 46 deletions(-)
+
+commit 75dcf94f53c2d7241111f0d527ee4d3a2ef0b0cf
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 28 15:36:08 2007 +0000
+
+ * glib/poppler-document.cc: Plug memory leak in poppler-document. Patch by Carlos Garcia Campos <carlosgc@gnome.org>
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 30 ++++++++++++++----------------
+ 2 files changed, 19 insertions(+), 16 deletions(-)
+
+commit 682a15fc38a2c569d9b1f9871e3e949b62b33cf8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 21 22:35:23 2007 +0000
+
+ * poppler-document.cc:
+ * poppler-page.cc:
+ * poppler-private.h:
+ * poppler-qt4.h:
+ No need to destroy the Splash output device to change its paper color.
+ Add the possibility to set flags that affect the rendering (some
+ backends supports only some of them, though).
+ Add a Page::label to get the label associated with a page.
+ Patches by Pino Toscano <pino@kde.org>.
+
+ ChangeLog | 12 ++++++++++++
+ qt4/src/poppler-document.cc | 20 ++++++++++++++++++++
+ qt4/src/poppler-page.cc | 14 +++++++++++++-
+ qt4/src/poppler-private.h | 29 ++++++++++++++++++++++++-----
+ qt4/src/poppler-qt4.h | 25 +++++++++++++++++++++++++
+ 5 files changed, 94 insertions(+), 6 deletions(-)
+
+commit 7331bc46c1cb323316501f05ae1740bea5655596
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 17 20:06:29 2007 +0000
+
+ * poppler/Sound.h:
+ * poppler/Sound.cc:
+ * qt4/src/poppler-sound.cc: Move most of the sound reading code
+ into the Sound class, so frontends can use it easily.
+ Patch by Pino Toscano <pino@kde.org>.
+
+ ChangeLog | 10 +++-
+ poppler/Sound.cc | 80 ++++++++++++++++++++++++-
+ poppler/Sound.h | 32 ++++++++++-
+ qt4/src/poppler-sound.cc | 144 ++++++++++++++++-----------------------------
+ 4 files changed, 167 insertions(+), 99 deletions(-)
+
+commit 841bee94da7b6376d2e1fb3daaf8b727b90e42d8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jan 13 23:19:21 2007 +0000
+
+ * poppler/Stream.h:
+ * poppler/Stream.cc: Remove MemStream::setNeedFree method i really did
+ not need it
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-private.h: Make Document::loadFromData work on
+ documents with a password and don't need to do a malloc and a memcpy.
+
+ ChangeLog | 11 ++++++
+ poppler/Stream.cc | 5 ---
+ poppler/Stream.h | 1 -
+ qt4/src/poppler-document.cc | 74 ++++++++++++++++++++++--------------------
+ qt4/src/poppler-link.cc | 4 +-
+ qt4/src/poppler-page.cc | 34 ++++++++++----------
+ qt4/src/poppler-private.h | 24 +++++++++-----
+ 7 files changed, 84 insertions(+), 69 deletions(-)
+
+commit e1432fd7c4a6a2386789f450d39c6d954fd4e656
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jan 13 18:29:39 2007 +0000
+
+ * configure.ac
+ * poppler/Makefile.am
+ * qt4/src/Makefile.am
+ * qt4/src/poppler-document.cc
+ * qt4/src/poppler-link.cc
+ * qt4/src/poppler-page.cc
+ * qt4/src/poppler-private.h
+ * qt4/src/poppler-qt4.h: Make the Qt4 backend compilable even with
+ no Splash backend. Patch by Pino Toscano <pino@kde.org>.
+
+ ChangeLog | 12 ++++++++++++
+ configure.ac | 5 -----
+ poppler/Makefile.am | 5 +++--
+ qt4/src/Makefile.am | 6 +++++-
+ qt4/src/poppler-document.cc | 16 ++++++++++++++--
+ qt4/src/poppler-link.cc | 1 +
+ qt4/src/poppler-page.cc | 15 ++++++++++++---
+ qt4/src/poppler-private.h | 8 +++++++-
+ qt4/src/poppler-qt4.h | 6 ++++++
+ 9 files changed, 60 insertions(+), 14 deletions(-)
+
+commit 457038e97325720615c4390ffa075dd8283966ee
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jan 13 17:56:07 2007 +0000
+
+ * poppler/Stream.h:
+ * poppler/Stream.cc: Add MemStream::setNeedFree method
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h: Add Document::loadFromData method
+
+ ChangeLog | 8 ++++++++
+ poppler/Stream.cc | 5 +++++
+ poppler/Stream.h | 1 +
+ qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++
+ qt4/src/poppler-private.h | 17 +++++++++++++++--
+ qt4/src/poppler-qt4.h | 16 ++++++++++++++++
+ 6 files changed, 67 insertions(+), 2 deletions(-)
+
+commit 4e2a9c49ecab00b1f5d175570165cd490afdd31e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 11 22:28:03 2007 +0000
+
+ goo/gmem.c: Merge change from xpdf-3.01pl2
+
+ ChangeLog | 4 ++++
+ goo/gmem.c | 13 +++++++++++--
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+commit bce14b274fd788d728116950d6464a85e33a9966
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 11 22:12:11 2007 +0000
+
+ * poppler/Catalog.h:
+ * poppler/Catalog.cc: Limit max depth of recursive calls on
+ readPageTree to fix MOAB-06-01-2007
+
+ ChangeLog | 6 ++++++
+ poppler/Catalog.cc | 20 +++++++++++++++-----
+ poppler/Catalog.h | 2 +-
+ 3 files changed, 22 insertions(+), 6 deletions(-)
+
+commit 3f0679a336ffaf2aff149f8526fa11f8f8cbda59
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jan 6 21:53:08 2007 +0000
+
+ Patch by Pino Toscano <pino@kde.org> to fix some memory leaks when dealing with sounds.
+
+ ChangeLog | 9 +++++++++
+ poppler/Sound.cc | 1 +
+ qt4/src/poppler-link.cc | 5 +++++
+ qt4/src/poppler-link.h | 1 +
+ qt4/src/poppler-page.cc | 4 ++++
+ qt4/src/poppler-sound.cc | 7 ++++++-
+ 6 files changed, 26 insertions(+), 1 deletions(-)
+
+commit d41cd2f567a955031cb7498d9089e70e14df4a42
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 4 19:10:16 2007 +0000
+
+ qt4/src/poppler-private.h: gmallocn -> new[]
+
+ ChangeLog | 4 ++++
+ qt4/src/poppler-private.h | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit f8edfb6832144cbbd1b234f6b35e33325269255c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 4 18:56:13 2007 +0000
+
+ qt/poppler-page-transition.cc: Fix memory leak. Patch by Tobias Koenig <tokoe@kde.org>
+
+ ChangeLog | 5 +++++
+ qt/poppler-page-transition.cc | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 250a9f4b429344e0968c7bd0c0cebe7af373ae0a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 30 14:50:25 2006 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-document.cc: Add const & to some parameters. Patch by Pino Toscano <pino@kde.org>
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-document.cc | 4 ++--
+ qt4/src/poppler-qt4.h | 4 ++--
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 250c1f94cc9a53f980fd08364d6cce29db9fd067
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 29 14:08:35 2006 +0000
+
+ * poppler/UGooString.cc: Patch by Pino Toscano <pino@kde.org> so that QStringToUGooString does not crash.
+
+ ChangeLog | 5 +++++
+ poppler/UGooString.cc | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 42770e5f07407b03dce31c73fd6956f9c8fc9a06
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri Dec 29 04:12:40 2006 +0000
+
+ 2006-12-28 Brad Taylor <brad@getcoded.net>
+
+ * poppler/glib/poppler-document.h:
+ * poppler/glib/poppler-document.cc: Add poppler_document_new_from_data
+ to allow loading PDFs out of memory.
+
+ ChangeLog | 6 +++
+ glib/poppler-document.cc | 113 +++++++++++++++++++++++++++++++++------------
+ glib/poppler-document.h | 4 ++
+ 3 files changed, 93 insertions(+), 30 deletions(-)
+
+commit 6fedd991b584e300b5710630fa7942d357fe7aaa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 28 17:22:36 2006 +0000
+
+ * qt4/src/poppler-embeddedfile.cc:
+ * qt4/src/poppler-document.cc:
+ * qt/poppler-document.cc: Fix memory leaks
+
+ ChangeLog | 6 ++++++
+ qt/poppler-document.cc | 4 ++++
+ qt4/src/poppler-document.cc | 4 +++-
+ qt4/src/poppler-embeddedfile.cc | 4 +++-
+ 4 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 7da5885e45c33382060276c95d9a3bd117ae55c7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 28 15:51:44 2006 +0000
+
+ * goo/GooString.cc
+ * goo/GooString.h
+ * goo/gmem.c
+ * goo/gmem.h
+ * poppler/Lexer.cc
+ * poppler/Lexer.h
+ * poppler/PageLabelInfo.cc
+ * poppler/Parser.cc
+ * poppler/UGooString.cc
+ * poppler/UGooString.h: Patch by Krzysztof Kowalczyk <kkowalczyk@gmail.com> to improve performance. See bug 7808 for details.
+
+ ChangeLog | 15 ++++
+ goo/GooString.cc | 186 +++++++++++++++++++++++-----------------------
+ goo/GooString.h | 28 ++++++--
+ goo/gmem.c | 3 +-
+ goo/gmem.h | 2 +-
+ poppler/Lexer.cc | 19 ++++-
+ poppler/Lexer.h | 10 +++
+ poppler/PageLabelInfo.cc | 1 +
+ poppler/Parser.cc | 17 +++--
+ poppler/UGooString.cc | 137 ++++++++++++++++++++++++++++------
+ poppler/UGooString.h | 40 ++++++++--
+ 11 files changed, 313 insertions(+), 145 deletions(-)
+
+commit fbc05a6791fc28ee26a9d9188722ea3453c65ddc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Dec 27 23:15:06 2006 +0000
+
+ * poppler/Annot.cc:
+ * poppler/Annot.h: Add type checking to processing of "Rect". Patch by Scott Turner <scotty1024@mac.com>
+
+ ChangeLog | 6 ++++++
+ poppler/Annot.cc | 48 +++++++++++++++++++++++++++++-------------------
+ poppler/Annot.h | 1 +
+ 3 files changed, 36 insertions(+), 19 deletions(-)
+
+commit dc6b372358ac629c43aa2faabd644942cb0ed98b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Dec 27 15:23:04 2006 +0000
+
+ Remove , after last value of enum. Thanks to André Wöbbeking
+
+ ChangeLog | 1 +
+ poppler/Catalog.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit c7d19539a95927eb277966a521f13393c9e116bb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Dec 27 12:38:58 2006 +0000
+
+ qt4/src/poppler-qt4.h: Remove , after last value of enum. Thanks to André Wöbbeking
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-qt4.h | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit b29429c702e6540b9f35689b0a164f30e747d5d9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 26 20:07:03 2006 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc: Add Page::duration() function to the qt4 frontend.
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-page.cc | 8 ++++++++
+ qt4/src/poppler-qt4.h | 9 ++++++++-
+ 3 files changed, 22 insertions(+), 1 deletions(-)
+
+commit 62dfc58903b496c4cc720c8b2c759c6fb82fb443
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 26 19:56:28 2006 +0000
+
+ * glib/test-poppler-glib.c:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * poppler/Page.cc:
+ * poppler/Page.h: Implement /Dur entry in page object. Patch by Carlos
+ Garcia Campos <carlosgc@gnome.org>
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-page.cc | 16 ++++++++++++++++
+ glib/poppler-page.h | 1 +
+ glib/test-poppler-glib.c | 7 +++++++
+ poppler/Page.cc | 13 +++++++++++++
+ poppler/Page.h | 6 ++++++
+ 6 files changed, 52 insertions(+), 0 deletions(-)
+
+commit 34e5aa62f4d3ba7a2d94a68a91c11a48277a4119
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 23 13:12:13 2006 +0000
+
+ * poppler/PSTokenizer.cc: Enhance PSTokenizer::getToken performance.
+ Patch by Scott Turner <scotty1024@mac.com>. In a random pdf i tested
+ the patchs improves PSTokenizer::getToken performance by 15%
+
+ ChangeLog | 6 ++++++
+ poppler/PSTokenizer.cc | 33 +++++++++++++++++++++------------
+ poppler/PSTokenizer.h | 1 +
+ 3 files changed, 28 insertions(+), 12 deletions(-)
+
+commit 1a5fa1d2ced62e7d027e085663e987cff625ce0b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 22 23:39:41 2006 +0000
+
+ poppler/Page.cc: Fix memory leak when reading a wrong color map in a thumbnail. Patch by Scott Turner <scotty1024@mac.com>
+
+ ChangeLog | 3 +++
+ poppler/Page.cc | 1 +
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit dd1c134dcf085338a85188c7f205fc300396dc86
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 22 23:27:53 2006 +0000
+
+ qt/poppler-page.cc: Fix memory leak in Page::textList. Patch by Jerry Epplin <jepplin@globalvelocity.com>
+
+ ChangeLog | 5 +++++
+ qt/poppler-page.cc | 4 +++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 87e474a018c4808d6251fd79f9e9640e0f733551
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Dec 21 01:01:30 2006 +0000
+
+ 2006-12-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Fix scaling of maskedImage masks. They
+ should be scaled to the size of the image not the size of the mask.
+ Fixes #9403.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 8 ++------
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 769a89623c680f51690db1751522b016b02b83a8
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Dec 20 19:55:55 2006 +0000
+
+ 2006-12-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc: Try to make zero-width lines as close to
+ one pixel wide as we can. Fixes #9393.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 10 ++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 5c4bca18373528f293bd5e080efca572977fc1ff
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Dec 19 20:27:55 2006 +0000
+
+ poppler/SplashOutputDev.cc: Fix gray calculation. Patch by Scott Turner <scotty1024@mac.com>
+
+ ChangeLog | 5 +++++
+ poppler/SplashOutputDev.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit fba99578f6001ae0c0df0442bb73040b55109b1d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Dec 12 05:23:59 2006 +0000
+
+ 2006-12-12 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Change a cairo_set_matrix to
+ cairo_transform so that we don't blindly clobber the existing matrix.
+ Patch by Daniel Colascione.
+ Fixes #9190.
+
+ ChangeLog | 7 +++++++
+ poppler/CairoOutputDev.cc | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 9a6ffa1c6e009f8606a055f873efdcd5829fcfa2
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Dec 10 05:24:56 2006 +0000
+
+ 2006-12-09 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Function.cc: Initialize PostScriptFunction::codeString to
+ NULL so that it can safely deleted if initialization fails.
+ Fixes #9263.
+
+ ChangeLog | 6 ++++++
+ poppler/Function.cc | 1 +
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit e92d63a179ae022270156da4e396c15ff9236d89
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Nov 23 19:01:44 2006 +0000
+
+ * m4/libjpeg.m4: Make JPEG library header search work under MSYS. Patch by Alexis Wilke
+
+ ChangeLog | 5 +++++
+ m4/libjpeg.m4 | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 3913110f698fd006b394a395b5b0adfde30af31b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 22 21:55:27 2006 +0000
+
+ there should not be any whitespace after the \
+
+ qt4/src/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c3ab7addec5a7990872949b813c2b727b1614d64
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 19 18:51:23 2006 +0000
+
+ Another leak fix on qt4/src/poppler-page.cc the previous changelog is enough for this one ;-)
+
+ qt4/src/poppler-page.cc | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 9e9b82da91abacb916b05302d40bf822af6ac7f1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Nov 19 12:59:48 2006 +0000
+
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-textbox.cc: Fix memory leaks
+ * splash/Splash.cc: Initialize the values of nClipRes
+
+ ChangeLog | 8 ++++++++
+ qt4/src/poppler-link.cc | 6 ++++++
+ qt4/src/poppler-page.cc | 4 +++-
+ qt4/src/poppler-qt4.h | 1 +
+ qt4/src/poppler-textbox.cc | 5 +++++
+ splash/Splash.cc | 2 +-
+ 6 files changed, 24 insertions(+), 2 deletions(-)
+
+commit b9faacc62182efcbc84df2471e4c5dcf2b03bda8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Nov 18 17:08:04 2006 +0000
+
+ * qt4/src/poppler-document.cc
+ * qt4/src/poppler-qt4.h: Add int marginRight, int marginBottom, int
+ marginLeft, int marginTop, bool strictMargins to Document::print()
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-document.cc | 11 +++++++++--
+ qt4/src/poppler-qt4.h | 6 +++++-
+ 3 files changed, 20 insertions(+), 3 deletions(-)
+
+commit da8e6d4c3e0afdaa031413649ae20545c8a1f845
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Nov 16 21:03:27 2006 +0000
+
+ really commit pino's patch :-S
+
+ qt4/src/Doxyfile | 11 +++-
+ qt4/src/Mainpage.dox | 26 ++++-----
+ qt4/src/poppler-annotation.h | 33 +++++++-----
+ qt4/src/poppler-link.h | 68 +++++++++++++++++++++----
+ qt4/src/poppler-qt4.h | 115 ++++++++++++++++++++++++++---------------
+ 5 files changed, 171 insertions(+), 82 deletions(-)
+
+commit 4f26e65096e3133a39fc0c9e82084c90cf77dda9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Nov 16 21:00:10 2006 +0000
+
+ * qt4/src/Mainpage.dox:
+ * qt4/src/Doxyfile:
+ * qt4/src/poppler-annotation.h:
+ * qt4/src/poppler-link.h:
+ * qt4/src/poppler-qt4.h: Improve API documentation. Patch by
+ Pino Toscano.
+
+ Generated docu at http://people.freedesktop.org/~aacid/docs/qt4/
+
+ ChangeLog | 9 +++++++++
+ qt4/src/Mainpage.dox | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit e68b6f3f8fea1e4f036eba0f19bb7e0c423d408c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Nov 15 21:07:50 2006 +0000
+
+ 2006-11-15 Albert Astals Cid <aacid@kde.org>
+
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h: Generalize the way we render the pages:
+ merge all the Page::renderTo* functions in only one that renders on
+ a QImage, taking into account the currently chosen backend.
+ It is possible to switch rendering backend using the Document.
+ Patch by Pino Toscano.
+
+ * qt4/tests/stress-poppler-qt4.cpp:
+ * qt4/tests/test-password-qt4.cpp:
+ * qt4/tests/test-poppler-qt4.cpp: Adapt the tests to the changes in
+ the rendering API of Page. Patch by Pino Toscano.
+
+ ChangeLog | 17 +++++
+ qt4/src/poppler-document.cc | 14 ++++
+ qt4/src/poppler-link.cc | 2 +-
+ qt4/src/poppler-page.cc | 125 ++++++++++++++++++++------------------
+ qt4/src/poppler-private.h | 32 +++++++---
+ qt4/src/poppler-qt4.h | 75 ++++++-----------------
+ qt4/tests/stress-poppler-qt4.cpp | 3 +-
+ qt4/tests/test-password-qt4.cpp | 12 ++--
+ qt4/tests/test-poppler-qt4.cpp | 17 ++---
+ 9 files changed, 153 insertions(+), 144 deletions(-)
+
+commit 37088dd3335be6e7641c47bea9b1ddd689b07372
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 13 19:16:44 2006 +0000
+
+ * poppler/ArthurOutputDev.cc: Small fix to get colors right
+
+ ChangeLog | 4 ++++
+ poppler/ArthurOutputDev.cc | 8 ++++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 302e2cab9fd626222c69ad40f7e40be2e65d34a9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Nov 11 15:41:27 2006 +0000
+
+ Fix typo when outputing PS scale
+
+ ChangeLog | 4 ++++
+ poppler/PSOutputDev.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit e3550fb286dae98992b30edbf4a9300fa58d2e77
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Nov 7 23:53:31 2006 +0000
+
+ 2006-11-07 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: take horizontal scaling into account
+ when updating the font. Also, cleanup some unused code. Fixes #8924.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 9 ++-------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit f020b64a72ad5c82c3e7bdcf15039bb0037b1f22
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Oct 18 18:43:59 2006 +0000
+
+ 2006-10-18 Albert Astals Cid <aacid@kde.org>
+
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h: Do not crash when opening a
+ encrypted document. Do not crash when unlocking a locked
+ document.
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-document.cc | 41 ++++++++++++++++-------------------------
+ qt4/src/poppler-private.h | 14 ++++++++++++++
+ 3 files changed, 37 insertions(+), 25 deletions(-)
+
+commit 577330ee1d4d1021174cf1bd59557a83a017e06f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Oct 11 23:09:24 2006 +0000
+
+ * splash/Splash.cc:
+ * splash/SplashErrorCodes.h: Do not crash on documents that report a
+ 0x0 mask for an image, like
+ http://bugs.kde.org/attachment.cgi?id=18083&action=view
+
+ ChangeLog | 7 +++++++
+ splash/Splash.cc | 2 ++
+ splash/SplashErrorCodes.h | 2 ++
+ 3 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 42c016c6d3c6de65fd92b51b9d6cc96d52404689
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 8 20:38:47 2006 +0000
+
+ * poppler/Link.cc:
+ * poppler/Link.h:
+ * poppler/Makefile.am:
+ * poppler/Page.cc:
+ * poppler/Page.h:
+ * poppler/Sound.cc:
+ * poppler/Sound.h: Make poppler able to read Sound objects, Sound
+ actions and Opening/Closing page actions. Patch by Pino Toscano.
+
+ * qt4/src/Makefile.am:
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-link.h:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-sound.cc: Support for sounds, sound links and page
+ actions in the Qt4 backend. Patch by Pino Toscano.
+
+ ChangeLog | 19 +++++
+ poppler/Link.cc | 53 ++++++++++++++
+ poppler/Link.h | 32 ++++++++
+ poppler/Makefile.am | 2 +
+ poppler/Page.cc | 8 ++
+ poppler/Page.h | 4 +
+ poppler/Sound.cc | 65 +++++++++++++++++
+ poppler/Sound.h | 46 ++++++++++++
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-link.cc | 35 +++++++++
+ qt4/src/poppler-link.h | 26 +++++++-
+ qt4/src/poppler-page.cc | 32 ++++++++
+ qt4/src/poppler-qt4.h | 87 ++++++++++++++++++++++
+ qt4/src/poppler-sound.cc | 177 ++++++++++++++++++++++++++++++++++++++++++++++
+ 14 files changed, 586 insertions(+), 1 deletions(-)
+
+commit 1da064d7e7403ec7111eecb2b9613e27a2c4bb5d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Sep 30 16:28:35 2006 +0000
+
+ * qt4/src/poppler-page.cc: PA is optional, H is a name not a string
+
+ ChangeLog | 4 ++++
+ qt4/src/poppler-page.cc | 15 +++++++++------
+ 2 files changed, 13 insertions(+), 6 deletions(-)
+
+commit 29366d8e470ab2207cdfdab115c2fa9618c4c74e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 25 20:43:18 2006 +0000
+
+ * glib/Makefile.am
+ * qt/Makefile.am
+ * qt4/src/Makefile.am
+ * qt4/tests/Makefile.am
+ * test/Makefile.am
+ * utils/Makefile.am: Add FONTCONFIG_CFLAGS FONTCONFIG_LIBS for people
+ that need them. Patch by morfoh@opensde.org. Fixes bug #8415
+
+ ChangeLog | 10 ++++++++++
+ glib/Makefile.am | 2 ++
+ qt/Makefile.am | 6 ++++--
+ qt4/src/Makefile.am | 2 ++
+ qt4/tests/Makefile.am | 2 ++
+ test/Makefile.am | 6 ++++--
+ utils/Makefile.am | 6 ++++--
+ 7 files changed, 28 insertions(+), 6 deletions(-)
+
+commit 957c1e59df213a01ca87f03d067a8dab5dc09fb6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 25 20:05:28 2006 +0000
+
+ ignore poppler-features.h
+
+ glib/.cvsignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3158b54375bdfdc82779362cc9442aade87f84f6
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Sep 22 00:55:54 2006 +0000
+
+ 2006-09-21 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Update list of bugs fixes, release 0.5.4.
+
+ ChangeLog | 2 ++
+ NEWS | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 17dd1f60f9328ae68fbe262ae0745be976ff9f95
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 23:28:14 2006 +0000
+
+ 2006-09-21 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Check for gtk+ 2.8 for the gtk+ test case, invert
+ help text for zlib option (#7788, #7661).
+
+ ChangeLog | 3 +++
+ configure.ac | 12 +++++-------
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+commit ddbbd697424b9122ce1f0541ddada3fe8bb38fb1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 22:58:31 2006 +0000
+
+ 2006-09-21 Kristian Høgsberg <krh@redhat.com>
+
+ * utils/pdftops.cc: Get duplex setting from GlobalParams.
+
+ ChangeLog | 2 ++
+ utils/pdftops.cc | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 0d25592a1a5811ee8fffbd70307c7bcaaaacadf3
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 22:40:52 2006 +0000
+
+ 2006-09-21 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (_poppler_page_new): Make PopplerPage
+ reference its document throughout the lifetime of the page (#7005).
+
+ ChangeLog | 3 +++
+ glib/poppler-page.cc | 5 ++++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit b834755c7ae45eb4020e9cdbc3852eac0151fcdc
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 22:37:00 2006 +0000
+
+ 2006-09-21 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Gfx.cc: Remove the right out->updateAll() call.
+
+ ChangeLog | 4 ++++
+ poppler/Gfx.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 181e2af1edf2cbc3c8edadad0dce215a64a990dd
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 01:05:23 2006 +0000
+
+ 2006-09-20 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Sum up changes.
+
+ * configure.ac: Bump release to 0.5.4.
+
+ ChangeLog | 4 ++++
+ NEWS | 10 ++++++++++
+ configure.ac | 2 +-
+ 3 files changed, 15 insertions(+), 1 deletions(-)
+
+commit cc9c17a6730422be99ebcd69991fcf5d7b569640
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Sep 21 00:56:33 2006 +0000
+
+ 2006-09-20 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Gfx.cc: Remove last remnant of erroneous type3 commit a
+ while back, fixing #8182.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 1 -
+ poppler/Gfx.cc | 1 -
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 83be722b56d9266b89946fe994023351e47eb4fd
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Sep 20 20:22:19 2006 +0000
+
+ 2006-09-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/TextOutputDev.cc: TextFontInfo stores a copy of a pointer
+ to a GfxFont but does not increment the reference count. Fix the
+ problem by calling incRefCnt and decRefCnt appropriately. Fixes #4649
+
+ ChangeLog | 6 ++++++
+ poppler/TextOutputDev.cc | 4 ++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 1cf60015d7d78668c83737be6015dc880fd04ebf
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Sep 19 04:39:07 2006 +0000
+
+ 2006-09-19 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GlobalParams.cc: Add scanEncodingDirs() to automatically
+ scan in any encodings found under ${datadir}/poppler.
+
+ * m4/define-dir.m4: New file, adds AC_DEFINE_DIR macro.
+
+ ChangeLog | 7 +++
+ configure.ac | 16 +------
+ goo/gfile.cc | 16 +++----
+ goo/gfile.h | 2 +
+ m4/define-dir.m4 | 34 ++++++++++++++
+ poppler/GlobalParams.cc | 116 +++++++++++++++++++++++++++++++---------------
+ poppler/GlobalParams.h | 7 +++-
+ 7 files changed, 136 insertions(+), 62 deletions(-)
+
+commit 821c883f9df9cc0e5b81aa2e070727996cf3bc4e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Sep 18 15:40:50 2006 +0000
+
+ 2006-09-13 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Makefile.am (libpoppler_la_LIBADD): Add cairo libs to
+ link if configured.
+
+ ChangeLog | 3 +++
+ poppler/Makefile.am | 4 ++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit d8ab8ebc94c32d32ad17ed54cede453de25d7dd5
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Sep 13 20:25:03 2006 +0000
+
+ 2006-09-13 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Tighten glib check (#7906), add check for C++
+ compiler (#8048).
+
+ ChangeLog | 5 +++++
+ configure.ac | 3 ++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 7c748075e18cfe95be6a56adf09ce7f2f032b86f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 12 19:48:47 2006 +0000
+
+ sorry Jeff
+
+ ChangeLog | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 6cdcfae0e1c6fbec07ee5273e6ad97ef04110868
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Sep 11 21:20:56 2006 +0000
+
+ 2006-09-11 Albert Astals Cid <aacid@kde.org>
+
+ * qt4/src/poppler-annotation.cc:
+ * qt4/src/poppler-annotation.h:
+ * qt4/src/poppler-page.cc: Add support for LinkAnnotation. Patch by
+ Pino Toscano
+
+ ChangeLog | 10 +-
+ qt4/src/poppler-annotation.cc | 230 ++++++++++++++++++++++++++++++++++++++-
+ qt4/src/poppler-annotation.h | 22 ++++-
+ qt4/src/poppler-page.cc | 237 +++++++++++++++++++++++++----------------
+ 4 files changed, 392 insertions(+), 107 deletions(-)
+
+commit 8335c7eea2aa62a580170f47323d8674bd89e412
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri Sep 8 23:28:22 2006 +0000
+
+ 2006-09-08 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: The work-around for 1x1 imagemasks was not
+ calling cairo_set_source causing the rectangles to be drawn the wrong
+ colour occasionally. Fix by moving the existing call to
+ cairo_set_source above the work-around. Fixes #7113.
+
+ ChangeLog | 7 +++++++
+ poppler/CairoOutputDev.cc | 8 ++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 02d505aa0176b6e5a54ee82426d8333a9ef8f000
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Sep 7 04:01:39 2006 +0000
+
+ 2006-09-06 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Avoid crashing in CairoOutputDev if
+ endString is called without a corresponding beginString. Fixes #4515.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 8 +++++++-
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 3ea0aada0434c9f815814253dd9d1374ae6643cc
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Sep 6 23:54:30 2006 +0000
+
+ 2006-09-06 Jeff Muizelaar <jeff@infidigm.net>
+
+ * configure.ac:
+ * poppler/FlateStream.cc:
+ * poppler/FlateStream.h: Fix FlateStream to not read more than it
+ needs. This has a performance impact because our input buffer is now
+ only 1 byte large, however correctness is better than performance.
+ This should fix #3948.
+
+ ChangeLog | 9 +++++++++
+ configure.ac | 2 +-
+ poppler/FlateStream.cc | 35 +++++++++++++++++++++++++----------
+ poppler/FlateStream.h | 3 ++-
+ 4 files changed, 37 insertions(+), 12 deletions(-)
+
+commit 1d2e6aedca0b8fcce6ac84ae2576ab067912886b
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Sep 5 01:21:50 2006 +0000
+
+ 2006-09-04 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Initialize currentFont to NULL before
+ use. Found by Pascal Terjan. Fixes #7924.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 7905adaa21f2347346927fa567c64be60e2bc69c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Sep 3 09:27:21 2006 +0000
+
+ * poppler/Dict.cc:
+ * poppler/Dict.h:
+ * poppler/Object.h:
+ * poppler/Parser.cc: Patch by Krzysztof Kowalczyk to increase speed by
+ means of doing less copies between objects. See bug 8112 for more
+ information.
+
+ ChangeLog | 9 +++++++++
+ poppler/Dict.cc | 4 ++--
+ poppler/Dict.h | 11 +++++++++--
+ poppler/Object.h | 12 ++++++++++++
+ poppler/Parser.cc | 15 +++++++++------
+ 5 files changed, 41 insertions(+), 10 deletions(-)
+
+commit 4da7c90a619002e54f436c4efee723b5bc42a112
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Aug 24 22:32:31 2006 +0000
+
+ * qt4/src/poppler-private.h: Init m_fontInfoScanner to NULL. Discovered by
+ Rafael Rodríguez <rafael.rodriguez.tf@gmail.com>
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-private.h | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 469202e117910beb4e0ad906d5c154a3bae5c98b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 16 14:35:14 2006 +0000
+
+ * qt/poppler-page.cc: Report correct page size. Backport from Qt4
+ frontend. Patch by Wilfried Huss
+
+ ChangeLog | 5 +++++
+ qt/poppler-page.cc | 10 ++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+commit b881844e4d31009c5d54c9321a6daaf0f354cf6b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Aug 16 09:18:04 2006 +0000
+
+ did not want to commit that, thanks Brad for noticing!
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f52380e6d569280839d7c37362bd7cc59f2573c3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Aug 15 22:27:31 2006 +0000
+
+ add a warning how nasty zlib can be, it can come and it your pdfs and make your readers crash when you are not looking at it, so be aware that if you enable it you are on your own ;-)
+
+ ChangeLog | 4 ++++
+ configure.ac | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 1caba84b1024f1fa7865deebbf70379855ce078d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 11 13:12:11 2006 +0000
+
+ 2006-08-11 Albert Astals Cid <aacid@kde.org>
+
+ * poppler/Catalog.cc: Fix leak
+
+ ChangeLog | 4 ++++
+ poppler/Catalog.cc | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 9b6455f6530e273afaa5f948b67ceeec8a06f976
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Aug 10 16:08:51 2006 +0000
+
+ 2006-08-10 Albert Astals Cid <aacid@kde.org>
+
+ * poppler/SplashOutputDev.cc: Try to fix refs to fonts yet again
+
+ ChangeLog | 4 ++++
+ poppler/SplashOutputDev.cc | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 305f60e0437dcfc5babd449123a1fe4cd062a219
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 5 17:10:07 2006 +0000
+
+ 2006-08-05 Albert Astals Cid <aacid@kde.org>
+
+ * poppler/Catalog.cc: The name array can contain references to strings
+ instead of stings themselves, or at least PDF of
+ https://bugs.freedesktop.org/show_bug.cgi?id=7780 does. This makes it
+ work with that file
+ * qt4/src/poppler-embeddedfile.cc: Use UGooString for description
+
+ ChangeLog | 8 ++++++++
+ poppler/Catalog.cc | 12 ++++++++++--
+ qt4/src/poppler-embeddedfile.cc | 3 ++-
+ 3 files changed, 20 insertions(+), 3 deletions(-)
+
+commit dd8758ea3f0f44e9f8362343f15b2064f428ad64
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Aug 4 22:48:09 2006 +0000
+
+ 2006-08-05 Albert Astals Cid <aacid@kde.org>
+
+ * utils/pdftotext.cc:
+ * utils/pdfinfo.cc:
+ * utils/pdffonts.cc: Add the posibility of reading a file from stdin.
+ Patch by Dom Lachowicz
+
+ ChangeLog | 7 +++++++
+ utils/pdffonts.cc | 11 ++++++++++-
+ utils/pdfinfo.cc | 11 ++++++++++-
+ utils/pdftotext.cc | 11 ++++++++++-
+ 4 files changed, 37 insertions(+), 3 deletions(-)
+
+commit a418d844cf6baa797919796ceadaf21ef9b2e5b9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Aug 3 10:34:52 2006 +0000
+
+ * configure.ac: Use the correct variable to output the utils status.
+ Patch by Dom Lachowic
+
+ ChangeLog | 5 +++++
+ configure.ac | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 1673b895656143a8a1f1a45e07f777f39995940d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 30 20:31:31 2006 +0000
+
+ * poppler/GfxState.cc: make nGfxBlendModeNames define return the
+ correct size of the gfxBlendModeNames array so it does not access
+ invalid memory areas when the blend mode is not found. Discovered by
+ Krzysztof Kowalczyk
+
+ ChangeLog | 7 +++++++
+ poppler/GfxState.cc | 12 +++++++-----
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+commit e4561568d14e7b3b2aec6ecaf3cc09078bdf7a46
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 30 09:38:28 2006 +0000
+
+ * splash/SplashFontEngine.cc:
+ * poppler/SplashOutputDev.cc: Fix memory leak when using embedded
+ fonts in the pdf file. Patch by Krzysztof Kowalczyk
+
+ ChangeLog | 6 ++++++
+ poppler/SplashOutputDev.cc | 8 ++++++--
+ splash/SplashFontEngine.cc | 12 ++++++++----
+ 3 files changed, 20 insertions(+), 6 deletions(-)
+
+commit 4a27502159a89992f54be2673b44bf7a8392b60d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jul 29 16:24:53 2006 +0000
+
+ push back thing i did not want to commit, sorry
+
+ configure.ac | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ba448afc0e97a9e779409ff228adcd4f627971f5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jul 29 16:22:52 2006 +0000
+
+ * configure.ac: Disable qt and qt4 frontends if splash backend is
+ disabled
+
+ ChangeLog | 5 +++++
+ configure.ac | 18 ++++++++++++++----
+ 2 files changed, 19 insertions(+), 4 deletions(-)
+
+commit 1e32d3baa5e8296caf55bd5853216a96618c74ac
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jul 28 18:17:45 2006 +0000
+
+ 2006-07-28 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc: Don't set font matrix translation
+ (fix from Behdad Esfahbod).
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 0bc1b0f35c28cb80dd27d24110367348e52c143b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 27 18:21:28 2006 +0000
+
+ fix date, i don't live in the past
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2f27c3a0218608568f6cd1c718ef51b9879023a3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 27 18:17:50 2006 +0000
+
+ * poppler/Stream.cc: If you are going to test a variable, better
+ initialize it first ;-) Fixes bug 7646
+
+ ChangeLog | 5 +++++
+ poppler/Stream.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit f39ab43ca824cb7e5db73137c4545b3e85134425
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 26 18:16:01 2006 +0000
+
+ 2006-07-26 Albert Astals Cid <aacid@kde.org>
+
+ * qt/poppler-document.cc:
+ * qt/poppler-private.h:
+ * qt/poppler-qt.h: Port the QDomDocument *Document::toc() const method
+ from the qt4 frontend to the qt frontend. Patch by Wilfried Huss
+
+ ChangeLog | 7 +++++
+ qt/poppler-document.cc | 18 +++++++++++++++
+ qt/poppler-private.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
+ qt/poppler-qt.h | 16 +++++++++++++
+ 4 files changed, 99 insertions(+), 0 deletions(-)
+
+commit c3a9fd546b853c85b6be5fc8f4e5a78d8a7e7437
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 25 18:39:57 2006 +0000
+
+ * qt4/src/poppler-document.cc: Obey kdeprint masters in that a library
+ should output as much device independent PS as posible, so disabling
+ duplex printing for default is a good idea.
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-document.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit edc0499644b8083600ced9a5087ec0b0189e615b
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jul 24 19:49:51 2006 +0000
+
+ 2006-07-24 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac:
+ * poppler/Makefile.am: Move fontconfig dependency to libpoppler.
+
+ ChangeLog | 5 +++++
+ configure.ac | 18 +++++++-----------
+ poppler/Makefile.am | 6 ++++--
+ 3 files changed, 16 insertions(+), 13 deletions(-)
+
+commit 24b5a68a3f4cdba63fbcd01dc178a330b5f604a7
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 18 21:32:11 2006 +0000
+
+ 2006-07-18 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Gfx.cc: fix opCloseStroke to match the behaviour of
+ a separate opClose and opStroke. Previously, opCloseStroke only
+ closes if there is a path however opClose closes unconditionally.
+
+ ChangeLog | 6 ++++++
+ poppler/Gfx.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit c57ebd40fcf85432b2e5045086d158a63af12525
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jul 18 21:26:57 2006 +0000
+
+ 2006-07-18 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/TextOutputDev.cc: call setDefaultCTM() after start page
+ like in Gfx.cc. This fixes a regression caused by the fix to #6948.
+
+ ChangeLog | 5 +++++
+ poppler/TextOutputDev.cc | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 640d5d5a9d9e53f3f677eb05f3d18e6bfc74e95a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jul 16 18:22:23 2006 +0000
+
+ 2006-07-16 Albert Astals Cid <aacid@kde.org>
+
+ * poppler/GfxState.cc: Do not crash when we can not
+ parse a GfxImageColorMap
+ Fixes crash on pdf that can be found at
+
+ ChangeLog | 7 +++++++
+ poppler/GfxState.cc | 4 ++++
+ qt4/src/Doxyfile | 4 ++--
+ 3 files changed, 13 insertions(+), 2 deletions(-)
+
+commit c6926d1d8ab04468f56f4687cdd3f06af206226b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jun 28 19:23:52 2006 +0000
+
+ * poppler/DCTStream.cc:
+ * poppler/DCTStream.h: Reset jpeg structures on reset.
+ Fixes crash while printing pdf at
+ http://bugs.kde.org/attachment.cgi?id=16818&action=view
+
+ ChangeLog | 7 +++++++
+ poppler/DCTStream.cc | 25 ++++++++++++++++++-------
+ poppler/DCTStream.h | 2 ++
+ 3 files changed, 27 insertions(+), 7 deletions(-)
+
+commit 96ac8dec591a0325a822c1f7b7bc7e78b867e3a0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 25 16:59:31 2006 +0000
+
+ Ask for paper size width and height to pass it to PSOutputDev in both qt frontends (qt got abi mantained, qt4 changed as you still have to define UNSTABLE_POPPLER_QT4 to be able of using it, one day we'll have to think of removing it)
+
+ ChangeLog | 8 ++++++++
+ qt/poppler-document.cc | 9 +++++++--
+ qt/poppler-qt.h | 9 +++++++++
+ qt4/src/poppler-document.cc | 4 ++--
+ qt4/src/poppler-qt4.h | 10 +++++++++-
+ 5 files changed, 35 insertions(+), 5 deletions(-)
+
+commit 965011f2001fb1ea36857995d5555266f82b8d96
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 25 16:20:50 2006 +0000
+
+ put back a change that was not meant to be commited
+
+ qt/poppler-qt.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4995d09c91173d34a435112828aff21a63b147e9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 25 16:19:32 2006 +0000
+
+ rename poppler-link.h to poppler-link-qt3.h to not get conflicts on install
+
+ qt/Makefile.am | 2 +-
+ qt/poppler-link-qt3.h | 188 +++++++++++++++++++++++++++++++++++
+ qt/poppler-link.cc | 258 +++++++++++++++++++++++++++++++++++++++++++++++++
+ qt/poppler-qt.h | 4 +-
+ 4 files changed, 449 insertions(+), 3 deletions(-)
+
+commit 087921b134c2646e6d41960f471a1819c7c8790a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 25 10:29:22 2006 +0000
+
+ add link support to qt3 frontend.
+ Patch by Wilfried Huss based on Qt4 code
+
+ ChangeLog | 11 ++++
+ qt/Makefile.am | 4 +-
+ qt/poppler-document.cc | 19 +++----
+ qt/poppler-page.cc | 136 +++++++++++++++++++++++++++++++++++++++++++++--
+ qt/poppler-private.h | 33 +++++++++++-
+ qt/poppler-qt.h | 14 ++++-
+ 6 files changed, 196 insertions(+), 21 deletions(-)
+
+commit 831bd8942ef3224354b128d5e14e68fdfc57168b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 11 16:14:32 2006 +0000
+
+ optimization by Mario Teijeiro Otero
+
+ poppler/UGooString.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1223fd4b200f6c13996f8299f3563c818af0c21d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 10 22:23:19 2006 +0000
+
+ * poppler/UGooString.cc: When any of the chars that we
+ are passing to the UGooString is not pdfencodable, do not
+ encode the string, because we loose information if we do,
+ this fixes rendering of
+ http://publikationen.ub.uni-frankfurt.de/volltexte/2005/890/pdf/TR_abs_g.pdf
+ and other docs with type3 fonts and ligatures
+
+ ChangeLog | 9 +++++++++
+ poppler/UGooString.cc | 8 ++++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit b85a39ddfc7de8c0621e995c114885ecd08fcdc2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jun 1 21:03:38 2006 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc: Add Rotation parameter that is passed
+ to the respective output devs
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-page.cc | 22 ++++++++++++++--------
+ qt4/src/poppler-qt4.h | 14 +++++++++-----
+ 3 files changed, 29 insertions(+), 13 deletions(-)
+
+commit 2b5d3277f36864ff1ef44f1942f22de247d67ab6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jun 1 17:23:45 2006 +0000
+
+ * qt/poppler-document.cc:
+ * qt/poppler-qt.h: Add printing support, patch by
+ Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+
+ ChangeLog | 6 ++++++
+ qt/poppler-document.cc | 18 ++++++++++++++++++
+ qt/poppler-qt.h | 2 ++
+ 3 files changed, 26 insertions(+), 0 deletions(-)
+
+commit 5380d005b7b54cc6587ce6e8c3bbb358da5cd9a5
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Jun 1 06:42:25 2006 +0000
+
+ 2006-06-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/PSOutputDev.cc:
+ * poppler/PSOutputDev.h: Change filename parameter to PSOutputDev
+ constructor from char * to const char *.
+
+ ChangeLog | 6 ++++++
+ poppler/PSOutputDev.cc | 2 +-
+ poppler/PSOutputDev.h | 2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+commit c2a81ea8b01f3943a2eb737cf957acc0d05f7eed
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed May 31 20:14:04 2006 +0000
+
+ * poppler/SplashOutputDev.cc:
+ * splash/Splash.cc: Fix no splashModeRGB8Qt mode, that is, make it
+ show images
+
+ I'm sorry, really, i'll try to do better
+
+ ChangeLog | 6 ++++++
+ poppler/SplashOutputDev.cc | 10 ++++++++++
+ splash/Splash.cc | 3 +++
+ 3 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 643b310cf51474b6dfc077fe086ea121e807f6e1
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed May 31 19:18:28 2006 +0000
+
+ 2006-05-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * TODO: Remove items's from my list that are done.
+
+ ChangeLog | 4 ++++
+ TODO | 3 ---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 96e582721dcb15ea258b989c7c500084bff9f56d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed May 31 17:31:49 2006 +0000
+
+ 2006-05-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Change the cairo backend to use the
+ transformation in cairo instead of doing all of the transformations in
+ the OutputDevice. Fixes #6948.
+
+ ChangeLog | 7 ++
+ poppler/CairoOutputDev.cc | 200 ++++++++++++++++++++-------------------------
+ poppler/CairoOutputDev.h | 1 +
+ 3 files changed, 96 insertions(+), 112 deletions(-)
+
+commit 00ffb9bf50b6b3b2e8eaa8af593aaa01d4a62a34
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 31 04:53:27 2006 +0000
+
+ 2006-05-31 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Sum up changes.
+
+ * configure.ac: Bump release to 0.5.3.
+
+ ChangeLog | 6 ++++++
+ NEWS | 8 ++++++++
+ configure.ac | 2 +-
+ 3 files changed, 15 insertions(+), 1 deletions(-)
+
+commit 223a4bf3a679f666b6c963a8787cf5b5ac75c4b6
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 31 02:02:54 2006 +0000
+
+ 2006-05-30 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler-glib.pc.in:
+ * configure.ac: Add poppler as a private requires if pkg-config
+ supports it.
+
+ ChangeLog | 6 ++++++
+ configure.ac | 11 +++++++++++
+ poppler-glib.pc.in | 3 ++-
+ 3 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 7aaa4d3fbdb8ea2534d3cb80e68b2759b2e8fd2f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue May 30 21:46:06 2006 +0000
+
+ 2006-05-30 Kristian Høgsberg <krh@redhat.com>
+
+ * test/gtk-cairo-test.cc: Add --page option to gtk-cairo-test.
+
+ ChangeLog | 4 ++++
+ test/gtk-cairo-test.cc | 21 ++++++++++++++++++---
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+commit f7c1d519b9695ad8adfdcf3af696de746cdcf375
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon May 29 18:44:17 2006 +0000
+
+ 2006-05-29 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoFontEngine.cc:
+ * poppler/CairoFontEngine.h:
+ * poppler/CairoOutputDev.cc: Allow CairoFont creation to fail more
+ gracefully. Fixes #4030.
+
+ ChangeLog | 7 +++++++
+ poppler/CairoFontEngine.cc | 27 +++++++++++++++++++++------
+ poppler/CairoFontEngine.h | 4 +++-
+ poppler/CairoOutputDev.cc | 5 +++++
+ 4 files changed, 36 insertions(+), 7 deletions(-)
+
+commit 84861800dad3649d4757d5c5539b9e86e2b2c644
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat May 27 17:27:37 2006 +0000
+
+ 2006-05-27 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Back out the rest of krh's type3
+ font work. This fixes type3 fonts in CairoOutputDevice.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 3 +++
+ poppler/CairoOutputDev.h | 2 +-
+ 3 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 6f5a89a0a2cf17d45d1c31ce105829be8c7ac456
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue May 23 20:49:16 2006 +0000
+
+ * poppler/SplashOutputDev.cc:
+ * qt4/src/poppler-private.h:
+ * splash/Splash.cc:
+ * splash/SplashBitmap.cc:
+ * splash/SplashTypes.h: bring splashModeRGB8 back to the old code
+ (before Frank's patch), create splashModeRGB8Qt that has Frank's
+ codepath and is used by Qt frontends. Fixes corruption on
+ other programs expecting the old behaviour.
+
+ Remember dude we are now a lib! you can not change behaviour from one day to another!
+
+ /me hits himself
+
+ ChangeLog | 11 +++
+ poppler/SplashOutputDev.cc | 8 ++
+ qt/poppler-private.h | 2 +-
+ qt4/src/poppler-private.h | 2 +-
+ splash/Splash.cc | 169 ++++++++++++++++++++++++++++++++++++++++++++
+ splash/SplashBitmap.cc | 26 ++++++-
+ splash/SplashTypes.h | 2 +
+ 7 files changed, 216 insertions(+), 4 deletions(-)
+
+commit 495d592c3ba7fe81e03774f5b2ed677e5aa560c7
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue May 23 19:16:37 2006 +0000
+
+ 2006-05-23 Kristian Høgsberg <krh@redhat.com>
+
+ * qt4/src/Makefile.am (libpoppler_qt4_la_SOURCES): Add missing
+
+ ChangeLog | 5 +++++
+ qt4/src/Makefile.am | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit eecd06c86585bca05c99cd2e9a1b1ff3bbae3c72
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 22 20:19:35 2006 +0000
+
+ 2006-05-22 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Bump release.
+ * NEWS: Sum up changes.
+
+ ChangeLog | 5 +++++
+ NEWS | 11 ++++++++++-
+ configure.ac | 2 +-
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 680f20dfd1cf0342d49516b3848a2aef5d2a3883
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 22 19:58:41 2006 +0000
+
+ 2006-05-22 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Rainer Keller to fix the ImageOutputDev (#6984).
+
+ * utils/ImageOutputDev.cc (drawImage): Upate to work with new
+ 16-bit color representation.
+
+ * utils/ImageOutputDev.h: Return gTrue for needNonText().
+
+ ChangeLog | 9 +++++++++
+ NEWS | 4 ++++
+ utils/ImageOutputDev.cc | 6 +++---
+ utils/ImageOutputDev.h | 2 +-
+ 4 files changed, 17 insertions(+), 4 deletions(-)
+
+commit e43a06bf6e953fa9af18476e2c9f27106398c09c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun May 21 23:26:45 2006 +0000
+
+ 2006-05-21 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc:
+ * poppler/CairoFontEngine.h: Back out type3 font work committed by
+ accident.
+
+ ChangeLog | 6 +
+ poppler/CairoFontEngine.cc | 347 +++++---------------------------------------
+ poppler/CairoFontEngine.h | 17 +--
+ 3 files changed, 47 insertions(+), 323 deletions(-)
+
+commit 7d4bb0533f88f06449ebd64c1220d0b75001937d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 21 18:14:15 2006 +0000
+
+ fix all is blue issue on ppc machines
+
+ ChangeLog | 7 +++++++
+ qt/poppler-page.cc | 17 +++++++++++++++++
+ qt4/src/poppler-page.cc | 17 +++++++++++++++++
+ 3 files changed, 41 insertions(+), 0 deletions(-)
+
+commit 655af1e0126ca96d75c9c718d7d8f928c898b1f6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 21 17:19:53 2006 +0000
+
+ hope to fix really Kouhei's name now
+
+ ChangeLog | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit cc783a1ebe868ff75db5472775dabe0020ae501f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 21 11:54:30 2006 +0000
+
+ Fix Kouhei name
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e4b6ad3bb873a6f334934921e6d56e9d26e06a9a
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:55:49 2006 +0000
+
+ Add bug number to ChangeLog entry.
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 46f5f070cceb2c0f3b53537c8e33340b9f1bba38
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:26:03 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-action.h:
+ * glib/poppler-action.cc: Add poppler_dest_get_type(), patch from
+ Kouhei Souto (#6907).
+
+ ChangeLog | 4 ++++
+ glib/poppler-action.cc | 13 +++++++++++++
+ glib/poppler-action.h | 4 ++++
+ 3 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 875dc5b112dfe2d4a48a7567b1ff79257447cc0d
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:21:35 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler-glib.pc.in (Requires): Add gdk-2.0 dependency, from
+ Kouhei Souto (#6896).
+
+ ChangeLog | 3 +++
+ poppler-glib.pc.in | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit b66dda2640c088bbe205f698a0c4028144027922
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:19:21 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.h (POPPLER_TYPE_INDEX_ITER)
+ (POPPLER_TYPE_FONTS_ITER): Add these macros, patch from Kouhei
+ Souto (#6897).
+
+ ChangeLog | 4 ++++
+ glib/poppler-document.h | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 095730456c0d8312067af10dd55a3b9165a83736
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:16:25 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/Makefile.am (INCLUDES): Add define for G_LOG_DOMAIN, from
+ Kouhei Souto (#6899).
+
+ ChangeLog | 3 +++
+ glib/Makefile.am | 1 +
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit b8d77633899c1dec5f3b9c9a0f075f39afa98965
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:12:38 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc (poppler_document_save): Memleak patch
+ from Paolo Borelli (#6908).
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 2 ++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 488f77298fee9eebbca5983c1c9fb186b3b67aa3
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 22:04:17 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * TextOutputDev.h:
+ * TextOutputDev.cc:
+ * UnicodeTypeTable.h:
+ * UnicodeTypeTable.cc:
+ * UnicodeCClassTables.h:
+ * UnicodeCompTables.h:
+ * UnicodeDecompTables.h:
+ * gen-unicode-tables.py: Patch from Ed Catmur (#2929) to convert
+ search string and document text to unicode NFKC (compatibility
+ composition) before matching so ligatures match correctly.
+
+ ChangeLog | 13 +
+ poppler/Makefile.am | 5 +
+ poppler/TextOutputDev.cc | 41 +-
+ poppler/TextOutputDev.h | 3 +
+ poppler/UnicodeCClassTables.h | 1827 +++++++++
+ poppler/UnicodeCompTables.h | 665 ++++
+ poppler/UnicodeDecompTables.h | 8526 +++++++++++++++++++++++++++++++++++++++++
+ poppler/UnicodeTypeTable.cc | 235 ++
+ poppler/UnicodeTypeTable.h | 3 +
+ 9 files changed, 11303 insertions(+), 15 deletions(-)
+
+commit ecb942e54a1ab0f7eded91b7d1278f0ac62e2071
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 21:42:54 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix the
+ rotation bug for real.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 16 +++++++++-------
+ 2 files changed, 14 insertions(+), 7 deletions(-)
+
+commit 28ae789afe0625a641525e4a0768d51fa8bd667c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 20:54:13 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Kouhei Sutou (#6905).
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-private.h:
+ * glib/reference/tmpl/poppler-private.sgml:
+ * glib/reference/tmpl/poppler.sgml: Make PopplerPSOutput a proper
+ glib object.
+
+ ChangeLog | 11 ++++++
+ glib/poppler-document.cc | 51 ++++++++++++++++++++++++-----
+ glib/poppler-document.h | 4 ++
+ glib/poppler-private.h | 2 +
+ glib/reference/tmpl/poppler-private.sgml | 1 +
+ glib/reference/tmpl/poppler.sgml | 1 +
+ 6 files changed, 61 insertions(+), 9 deletions(-)
+
+commit 02cf7fd7df0b2d8c2b1c6f108e581bc1c7a973b1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 20:35:43 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix
+ rotation bug (#6913, #6926).
+
+ ChangeLog | 3 +++
+ glib/poppler-page.cc | 12 +++++++++++-
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+commit 78ae3efd9541d7b63ff5a2c4de3fde300806688f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 19 19:21:59 2006 +0000
+
+ 2006-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ Memory leak patch from Carlos Garcia Campos (#6947).
+
+ * glib/poppler-action.cc:
+ * glib/poppler-document.cc:
+ * glib/poppler-page.cc:
+ * poppler/CairoFontEngine.cc:
+ * poppler/CairoFontEngine.h:
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h:
+ * poppler/Gfx.cc:
+ * poppler/TextOutputDev.cc: Fix various memory leaks.
+
+ ChangeLog | 14 ++
+ glib/poppler-action.cc | 9 +-
+ glib/poppler-document.cc | 31 +++-
+ glib/poppler-page.cc | 2 +
+ poppler/CairoFontEngine.cc | 347 +++++++++++++++++++++++++++++++++++++++-----
+ poppler/CairoFontEngine.h | 17 ++-
+ poppler/CairoOutputDev.cc | 5 +-
+ poppler/CairoOutputDev.h | 2 +-
+ poppler/Gfx.cc | 1 +
+ poppler/TextOutputDev.cc | 9 +
+ 10 files changed, 381 insertions(+), 56 deletions(-)
+
+commit 354c1926b7181fd668f221e1d672974e04fda747
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 19 17:24:19 2006 +0000
+
+ * qt4/src/poppler-link.cc: Patch by Pino Toscano, ensure the
+ splashoutput is created when parsing the TOC.
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-link.cc | 5 +++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 3c9a5f37704781c9a51e72edd18451870452b9a7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun May 14 16:11:54 2006 +0000
+
+ * poppler/FontInfo.cc: Fix possible crash, half patch
+ by Kouhei Sutou <kou@cozmixng.org>
+
+ ChangeLog | 5 +++++
+ poppler/FontInfo.cc | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 436f578fe762e8ceccce95a0f2003406527dde64
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 13 16:01:57 2006 +0000
+
+ * poppler/GfxState.cc:
+ * poppler/GfxState.h: Fix memleak, patch by
+ Carlos Garcia Campos <carlosgc@gnome.org>
+
+ ChangeLog | 6 ++++++
+ poppler/GfxState.cc | 8 ++++++++
+ poppler/GfxState.h | 3 +--
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+
+commit 906515769097f2e38f6b2c2aff598919b9d1ee0d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 13 15:58:37 2006 +0000
+
+ * qt4/src/poppler-document.cc: leak--
+ * qt4/src/poppler-private.h: Refcount globalparams
+ * qt4/tests/test-poppler-qt4.cpp: Some leaks less
+
+ ChangeLog | 6 ++++++
+ qt4/src/poppler-document.cc | 10 +++++-----
+ qt4/src/poppler-private.h | 8 ++++++++
+ qt4/tests/test-poppler-qt4.cpp | 6 ++++--
+ 4 files changed, 23 insertions(+), 7 deletions(-)
+
+commit 46fd63c44369c882d8dac473d4156001d9d4ed18
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 13 11:14:24 2006 +0000
+
+ numbers for easier casting
+
+ qt4/src/poppler-link.h | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+commit 35500375e3f790c444ab7e7d0a687d270c5a66b1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 12 21:02:01 2006 +0000
+
+ fixing compile problems for some people
+
+ qt4/src/poppler-page.cc | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 181f09829cf4831965059e3064114d83348c51b5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 12 20:40:05 2006 +0000
+
+ * qt4/src/Makefile.am
+ * qt4/src/poppler-annotation-helper.h
+ * qt4/src/poppler-annotation.cc
+ * qt4/src/poppler-annotation.h
+ * qt4/src/poppler-link.cc
+ * qt4/src/poppler-link.h
+ * qt4/src/poppler-page.cc
+ * qt4/src/poppler-qt4.h: Code for annotations stripped from oKular,
+ it's all based on Enrico's work, so ask him for details, the problem
+ is that he left KDE development a while ago.
+
+ ChangeLog | 14 +
+ qt4/src/Makefile.am | 2 +
+ qt4/src/poppler-annotation-helper.h | 213 ++++++++++
+ qt4/src/poppler-annotation.cc | 792 +++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-annotation.h | 257 ++++++++++++
+ qt4/src/poppler-link.cc | 4 +-
+ qt4/src/poppler-link.h | 2 +-
+ qt4/src/poppler-page.cc | 691 ++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 8 +-
+ 9 files changed, 1980 insertions(+), 3 deletions(-)
+
+commit 3a48e89dfbe54af73a68ed8e917938f14ad17f01
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue May 9 20:07:06 2006 +0000
+
+ * qt4/src/Makefile.am:
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-link.cc:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h: Adding links extraction code, should work as
+ it is basically stripped out from kpdf, but comments are obviously welcome as always
+
+ ChangeLog | 10 +++
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-document.cc | 13 +--
+ qt4/src/poppler-link.cc | 129 ++++++++++++++++++++++++++++++-
+ qt4/src/poppler-link.h | 178 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-page.cc | 139 ++++++++++++++++++++++++++++++----
+ qt4/src/poppler-private.h | 9 +-
+ qt4/src/poppler-qt4.h | 56 +++-----------
+ 8 files changed, 456 insertions(+), 79 deletions(-)
+
+commit f628e1506e576a8553a9699c1d7f05ef55c24fa2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 8 19:03:51 2006 +0000
+
+ memleak-- by carlos
+
+ ChangeLog | 5 +++++
+ poppler/Catalog.cc | 5 ++++-
+ 2 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 1fce6266564583d356817a21f43c6b1ad8ce3716
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat May 6 10:57:07 2006 +0000
+
+ fix code, i suck
+
+ qt4/src/poppler-page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit be913b90d59da35a347498b86fdd3edb065aef23
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri May 5 20:51:01 2006 +0000
+
+ * poppler/Function.cc: quick fix for KDE bug #126760
+
+ Better solutions are of course accepted
+
+ ChangeLog | 4 ++++
+ poppler/Function.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 2b085293bd73b4e77da848b3fe63a7e82e9ba5e5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu May 4 19:10:55 2006 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc: Implement search functionality
+
+ more code to make oKular qt4popplered possible, probably not most quickest code around, feel free to comment/optimize
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-page.cc | 43 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 16 ++++++++++++++++
+ 3 files changed, 64 insertions(+), 0 deletions(-)
+
+commit a9b0c7977aba7bc85a8673c7f95187ff17ee4173
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue May 2 04:38:39 2006 +0000
+
+ 2006-05-02 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * poppler/Gfx.cc:
+ * poppler/GfxFont.cc:
+ * poppler/GfxFont.h:
+ * poppler/GfxState.cc:
+ * poppler/TextOutputDev.cc: Patch from Gary Coady to add reference
+ counting to GfxFont so we don't crash on text selection.
+
+ ChangeLog | 10 ++++++++++
+ glib/poppler-page.cc | 2 +-
+ poppler/Gfx.cc | 2 ++
+ poppler/GfxFont.cc | 14 +++++++++++++-
+ poppler/GfxFont.h | 4 ++++
+ poppler/GfxState.cc | 7 +++++++
+ poppler/TextOutputDev.cc | 1 +
+ 7 files changed, 38 insertions(+), 2 deletions(-)
+
+commit 57af0207334ff1a407899370281ebb90fe953a32
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 1 18:33:47 2006 +0000
+
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-textbox.cc: Add nextWord(), hasSpaceAfter() and
+ edge() to TextBox
+
+ More things to make poppler-qt4Okular nearer
+
+ ChangeLog | 8 ++++++++
+ qt4/src/poppler-page.cc | 14 ++++++++++++++
+ qt4/src/poppler-private.h | 11 +++++++++++
+ qt4/src/poppler-qt4.h | 8 ++++++++
+ qt4/src/poppler-textbox.cc | 23 ++++++++++++++++-------
+ 5 files changed, 57 insertions(+), 7 deletions(-)
+
+commit 61b126390f764fd38c79b6a64160a7dc7870bd4a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 1 13:41:14 2006 +0000
+
+ revert thing that should not have gone in
+
+ poppler/PageLabelInfo.cc | 43 +++++++++++++++++++++++++++++++++++++++++++
+ poppler/PageLabelInfo.h | 44 --------------------------------------------
+ 2 files changed, 43 insertions(+), 44 deletions(-)
+
+commit f2424ef63e86d82b2be277e2b268b48aae29601e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon May 1 13:32:31 2006 +0000
+
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h: Add the possibility of setting the paper
+ color
+
+ One step more to make oKular fully use the qt4 bindings
+
+ ChangeLog | 7 ++++++
+ poppler/PageLabelInfo.cc | 43 ------------------------------------------
+ poppler/PageLabelInfo.h | 44 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-document.cc | 10 +++++++++
+ qt4/src/poppler-private.h | 22 ++++++++++++++++----
+ qt4/src/poppler-qt4.h | 6 +++++
+ 6 files changed, 84 insertions(+), 48 deletions(-)
+
+commit 4147400e2b692df7f70c3772e8a4b576d4d85294
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 29 15:23:41 2006 +0000
+
+ Fix memory leak. Bug 6765
+
+ ChangeLog | 5 +++++
+ poppler/JBIG2Stream.cc | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 960d60467d62d28f20b127d07e8de1af42eec568
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Apr 27 17:26:36 2006 +0000
+
+ 2006-04-27 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: delete imgStr if some of the cairo
+ functions fail. Fixes coverty reports #2106, #2107, #2077 and
+ bug #6764. Patch by Kjartan Maraas.
+
+ ChangeLog | 6 ++++++
+ poppler/CairoOutputDev.cc | 34 +++++++++++++++++++++++++---------
+ 2 files changed, 31 insertions(+), 9 deletions(-)
+
+commit 155112131c6e25bfde752cf5daa80a6c9712cfed
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 23 15:50:52 2006 +0000
+
+ qt4/src/poppler-private.h: Protect us against a link not having
+ a destination or a namedDestination
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-private.h | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit c902a3a22bcceedc8ee8ca377064efcc8a9178ca
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Fri Apr 21 12:02:19 2006 +0000
+
+ Add another path to search for Qt4 libs and includes.
+
+ CCMAIL: montel@kde.org
+
+ m4/qt.m4 | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 18f8e1f1d213dbcda27cd0ec429273801f65e208
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 18 19:11:56 2006 +0000
+
+ * goo/GooVector.h: Fix typo that was preventing build with MSVC8
+ Discovered by Reece Dunn <msclrhd@hotmail.com>
+
+ ChangeLog | 5 +++++
+ goo/GooVector.h | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit cbbb28a5959343d20dffe945ea83272c0b2e287b
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Apr 16 22:59:44 2006 +0000
+
+ 2006-04-16 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * glib/poppler-action.cc:
+ * glib/poppler-action.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ Add support for named destinations and named actions.
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ Allow to find named destinations in document.
+
+ ChangeLog | 12 +++
+ glib/poppler-action.cc | 152 ++++++++++++++++++++++++-----
+ glib/poppler-action.h | 7 +-
+ glib/poppler-document.cc | 37 +++++++
+ glib/poppler-document.h | 4 +-
+ glib/poppler-private.h | 2 +
+ glib/poppler.h | 1 +
+ glib/reference/tmpl/poppler-action.sgml | 2 +
+ glib/reference/tmpl/poppler-document.sgml | 4 -
+ 9 files changed, 189 insertions(+), 32 deletions(-)
+
+commit 85687a1e0e4c6be2dbfb23ba00018b9c7c7454f5
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 12 06:52:07 2006 +0000
+
+ 2006-04-12 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Add support for masked images to the cairo
+ backend. CairoOutputDevice really should have been refactored before
+ committing this, but the results were so pretty I couldn't resist.
+ Fixes #6174.
+
+ ChangeLog | 8 +++
+ poppler/CairoOutputDev.cc | 118 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 8 +++
+ 3 files changed, 134 insertions(+), 0 deletions(-)
+
+commit 6039d4fc65cb25bef20efa29bc29d42086fc0854
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 12 05:46:44 2006 +0000
+
+ 2006-04-12 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Fix breakage by krh by only calling
+ cairo_destroy on non-null.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 4 +++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit d839a0bd78361930e5e2fe889df12e1e853ffed3
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Apr 12 02:07:07 2006 +0000
+
+ 2006-04-11 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac:
+ * poppler-glib.pc.in:
+ * glib/Makefile.am:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.h:
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h:
+ * glib/poppler-features.h.in:
+ Make the CairoOutputDev render to a cairo_t instead of a
+ cairo_surface_t and expose that functionality in the glib wrapper
+ (poppler_page_render).
+
+ * test/Makefile.am:
+ * test/gtk-cairo-test.cc:
+ Update gtk-cairo-test to use this new interface and add a spin
+ button for changing page (#5951).
+
+ * utils/Makefile.am (EXTRA_DIST): Fix warning where this was
+ assigned twice.
+
+ ChangeLog | 23 ++++
+ configure.ac | 8 ++
+ glib/Makefile.am | 10 +-
+ glib/poppler-features.h.in | 24 ++++
+ glib/poppler-page.cc | 63 +++++++---
+ glib/poppler-page.h | 10 ++
+ glib/poppler.h | 1 +
+ poppler-glib.pc.in | 2 +-
+ poppler/CairoOutputDev.cc | 23 ++--
+ poppler/CairoOutputDev.h | 6 +-
+ test/Makefile.am | 4 +-
+ test/gtk-cairo-test.cc | 286 +++++++++++++-------------------------------
+ utils/Makefile.am | 6 +-
+ 13 files changed, 221 insertions(+), 245 deletions(-)
+
+commit b198c9801c668014c0979c57033a0637e7e046e2
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Apr 10 18:12:44 2006 +0000
+
+ 2006-04-10 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: take originX and originY into account in
+ drawChar() to draw vertical text properly. Fixes #6551.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit fd251f52efc7748fda91cc77fb9d3966e0f02ac8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 9 11:05:51 2006 +0000
+
+ m4/qt.m4: Improve for systems that need -pthread to be linked when linking Qt. Patch by Diego Pettenò
+
+ ChangeLog | 5 +++++
+ m4/qt.m4 | 28 +++++++++++++++++++++++++++-
+ 2 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 36de9747153a2ea9b3cf86c41e75a521441a2e06
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 8 10:44:43 2006 +0000
+
+ * poppler/Makefile.am:
+ * qt4/src/Makefile.am: Don't link Qt4 in libpoppler when using Qt4 frontend
+ Patch by Stefan Schweizer
+
+ ChangeLog | 6 ++++++
+ poppler/Makefile.am | 11 +++++------
+ qt4/src/Makefile.am | 1 +
+ 3 files changed, 12 insertions(+), 6 deletions(-)
+
+commit bf7afe161d76c50fd1c480eb236607145782e59d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Apr 5 18:20:56 2006 +0000
+
+ poppler/JBIG2Stream.cc: Fix for some buggy JBIG2 documents, patch by Raj Kumar and Paul Walmsley. Fixes bug 6500
+
+ ChangeLog | 5 +++++
+ poppler/JBIG2Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 315f8e488d3db848f88a06c7568b6583bbf0e432
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 5 17:20:56 2006 +0000
+
+ 2006-04-05 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: use a separate matrix for the softmask.
+ fixes #6492.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 11 ++++++++++-
+ 2 files changed, 15 insertions(+), 1 deletions(-)
+
+commit 0d311518f678a479c1efeaec15011e0a34de80fc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 4 21:01:01 2006 +0000
+
+ * splash/Splash.cc:
+ * splash/SplashBitmap.cc: Make Splashbitmap RGB8 use 32bits internally
+ * qt/poppler-page.cc:
+ * qt4/src/poppler-page.cc: Adapt to splashbitmap change so copying to
+ QImage is faster.
+ Patch by Frank Meerkötter slightly modified by Albert Astals Cid
+
+ I'll leave adapting the glib frontend for you guys, i tried to adapt it but i got lost at gdk_pixbuf_get_n_channels (pixbuf);
+
+ ChangeLog | 9 +++++
+ qt/poppler-page.cc | 18 +++-------
+ qt4/src/poppler-page.cc | 15 +++-----
+ splash/Splash.cc | 81 ++++++++++++++++++++++++-----------------------
+ splash/SplashBitmap.cc | 10 +++---
+ 5 files changed, 67 insertions(+), 66 deletions(-)
+
+commit 888bd41b42507f0a1af55c55495d31d802ce7706
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Apr 4 20:42:08 2006 +0000
+
+ Fix crash when using fixedpoint math. Patch by Frank Meerkoetter
+
+ ChangeLog | 5 +++++
+ splash/SplashFTFont.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 56c98450160b639790931226a045ce4712e7d45e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Apr 2 18:07:59 2006 +0000
+
+ Improvements to the Qt4 frontend, comments welcome
+
+ ChangeLog | 7 ++
+ m4/qt.m4 | 4 +-
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-document.cc | 85 +++++++++++++++++++++------
+ qt4/src/poppler-link.cc | 138 +++++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-page.cc | 9 +++-
+ qt4/src/poppler-private.h | 95 +++++++++++++++++++++++++++++-
+ qt4/src/poppler-qt4.h | 86 ++++++++++++++++++++++++---
+ 8 files changed, 395 insertions(+), 30 deletions(-)
+
+commit c80ebf237e9c6232a1d0567a2688a294acfd481b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Apr 1 11:25:57 2006 +0000
+
+ Fix bug 6454
+
+ ChangeLog | 5 +++++
+ poppler/XRef.cc | 22 +++++++++++++---------
+ 2 files changed, 18 insertions(+), 9 deletions(-)
+
+commit fe8142fbc12127682b8024673fe1af57b47bb5c9
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Mar 21 04:25:53 2006 +0000
+
+ 2006-03-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-page.cc: Avoid strdup in poppler_page_get_property and
+ make code cleaner. Combined with the memleak fix closes #6187.
+ Patch by chpe.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 5 +----
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 4f961df2e6e91a0dc0a024ae5acdefa394179a05
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Mar 21 04:19:18 2006 +0000
+
+ 2006-03-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-page.cc: Fix memory leak in poppler_page_get_text
+ Patch by chpe.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit ff4febab0a519732972c21bf76d7693c98265e0f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Mar 20 20:07:36 2006 +0000
+
+ Use UGooString for dates, fixes KDE bug 123938
+
+ ChangeLog | 6 ++++++
+ qt/poppler-document.cc | 2 +-
+ qt4/src/poppler-document.cc | 2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 75ac6de8cd651b1cbe2d6a7ffa4574097088041f
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Mar 20 19:12:29 2006 +0000
+
+ 2006-03-20 Carlos Garcia Campos <calosgc@gnome.org>
+
+ reviewed by: Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-document.cc: Fix memory leak in poppler_font_info_free
+
+ ChangeLog | 6 ++++++
+ glib/poppler-document.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 784f6d9a0888dab34c586ffe14db8e55b8a11f51
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon Mar 20 19:02:10 2006 +0000
+
+ 2006-03-20 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoFontEngine.h: remove unused variables
+
+ ChangeLog | 4 ++++
+ poppler/CairoFontEngine.h | 1 -
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 847436779d7c82b428acfd6339130228bfadca24
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 19 19:19:42 2006 +0000
+
+ fix date
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 401bae69cc7ade676cacd89b483f0a93a653c7a1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Mar 19 17:01:05 2006 +0000
+
+ fix htmloutputdev
+
+ ChangeLog | 4 ++++
+ utils/HtmlOutputDev.cc | 2 +-
+ utils/HtmlOutputDev.h | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+commit d56330e688c0a40b4e206ed3bbddd06d7f3ee66c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 16 22:04:56 2006 +0000
+
+ * poppler/Page.cc: Remove a #ifdef that was never defined (nice to
+ have so sucky W args), probably came from gpdf (it's not on xpdf
+ sources) and was causing bugs 6079 and 6167
+
+ Might be worth backporting to the stable branch
+
+ ChangeLog | 8 +++++++-
+ poppler/Page.cc | 2 --
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 7ed6737b00ece7ca00cee1d148752b11700370e6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 16 19:21:11 2006 +0000
+
+ poppler/FontInfo.cc: Embedded fonts don't have a font file
+
+ ChangeLog | 4 ++++
+ poppler/FontInfo.cc | 20 ++++++++++++--------
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+commit a34688ee29e1cdfcbaca232cf005af55af87f796
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Mar 14 19:34:10 2006 +0000
+
+ * qt4/src/poppler-qt4.h: Fix compilation with gcc4.1, patch by Michael Olbrich
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-qt4.h | 10 +++++-----
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+commit 1a90b3aaf6be4ca3ebb47e904842b1e14a0e8dfc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Mar 11 15:19:02 2006 +0000
+
+ * poppler/FontInfo.cc:
+ * poppler/FontInfo.h: Add getFile() function that returns
+ the path of the font that is beign used in the system to
+ represent that font
+ * qt4/src/poppler-document.cc:
+ * qt4/src/poppler-fontinfo.cc:
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-qt4.h: Add the file() function
+ * qt4/tests/poppler-fonts.cpp: Show the path of the font
+ used to represent each font
+
+ May be interesting to have in the other frontends
+
+ ChangeLog | 13 +++++++++++++
+ poppler/FontInfo.cc | 10 ++++++++++
+ poppler/FontInfo.h | 2 ++
+ qt4/src/poppler-document.cc | 14 +-------------
+ qt4/src/poppler-fontinfo.cc | 29 +++++++++--------------------
+ qt4/src/poppler-private.h | 29 +++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 8 ++++++--
+ qt4/tests/poppler-fonts.cpp | 5 +++--
+ 8 files changed, 73 insertions(+), 37 deletions(-)
+
+commit 22b1618185ec70895ec644d9e590c266ff98c9db
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Mar 9 21:56:07 2006 +0000
+
+ Build with cairo disabled, patch by Eduardo de Barros Lima
+
+ ChangeLog | 5 +++++
+ glib/Makefile.am | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 50ecfadab36a9769b09e4c2c1670d86448a0e1ee
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Feb 28 23:24:59 2006 +0000
+
+ 2006-02-28 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Bump release to 0.5.1.
+
+ * NEWS: Sum up 0.5.1 changes so far.
+
+ * TextOutputDev.h: add getters for a couple of attributes.
+
+ * glib/Makefile.am:
+ * poppler/Makefile.am: Move cairo link dependency to glib bindings.
+
+ ChangeLog | 11 +++++++++++
+ NEWS | 10 ++++++++++
+ configure.ac | 2 +-
+ glib/Makefile.am | 11 ++++++-----
+ poppler/Makefile.am | 19 ++++++++-----------
+ poppler/TextOutputDev.h | 7 +++++--
+ qt/Makefile.am | 1 +
+ test/Makefile.am | 16 +++++++++-------
+ utils/Makefile.am | 29 +++++++++++++++++------------
+ 9 files changed, 68 insertions(+), 38 deletions(-)
+
+commit b9e951ac68b9977ab7217ad0346bcf46a3fa3dfe
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Feb 28 19:59:58 2006 +0000
+
+ 2006-02-28 Kristian Høgsberg <krh@redhat.com>
+
+ * goo/gmem.c: (gmalloc), (grealloc):
+ * poppler/JBIG2Stream.cc:
+ * poppler/Stream.cc:
+ * poppler/Stream.h:
+ * splash/SplashXPathScanner.cc:
+
+ More integer overflow fixes from Derek Noonburg (#5922).
+
+ ChangeLog | 10 ++++++++++
+ goo/gmem.c | 9 +++++----
+ poppler/JBIG2Stream.cc | 12 ++++++++++--
+ poppler/Stream.cc | 7 +++++++
+ poppler/Stream.h | 2 +-
+ 5 files changed, 33 insertions(+), 7 deletions(-)
+
+commit 46db73a142d65a0c944910388d5971debc06ecbf
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Feb 28 18:31:59 2006 +0000
+
+ 2006-02-28 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/PSOutputDev.cc: Make PSOutputDev constructor respect
+ passed in paper size (#5946, #5749).
+
+ ChangeLog | 5 +++++
+ poppler/PSOutputDev.cc | 14 ++++++++------
+ 2 files changed, 13 insertions(+), 6 deletions(-)
+
+commit 0f7f2182b2abe965b382937f5569b65a8828fc93
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Feb 28 18:25:00 2006 +0000
+
+ 2006-02-28 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc (info_dict_get_string): Refactor
+ _popper_goo_string_to_utf8() out into it's own function.
+
+ * glib/poppler-page.cc (poppler_page_get_property): Use
+ _popper_goo_string_to_utf8() here to convert ucs2 page labels.
+
+ * glib/poppler-page.cc (poppler_page_get_selection_region): Add
+ braces to fix warning.
+
+ * poppler/PageLabelInfo.cc: If the label prefix string has a ucs2
+ marker, append the number part of the label as ucs2 (#5952).
+
+ ChangeLog | 14 +++
+ glib/poppler-document.cc | 52 ++++++-----
+ glib/poppler-page.cc | 23 +++--
+ glib/poppler-private.h | 3 +
+ glib/reference/tmpl/poppler-enums.sgml | 150 -------------------------------
+ glib/reference/tmpl/poppler-unused.sgml | 130 ++++++++++++++++++++++++++
+ glib/test-poppler-glib.c | 2 +-
+ goo/GooString.cc | 5 +
+ goo/GooString.h | 4 +
+ poppler/PageLabelInfo.cc | 39 ++++++---
+ poppler/PageLabelInfo.h | 2 +-
+ 11 files changed, 228 insertions(+), 196 deletions(-)
+
+commit 1bf83cdc8b75e1c76956ae643ee273e0b558fd08
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 25 12:30:30 2006 +0000
+
+ fix warning
+
+ ChangeLog | 4 ++++
+ poppler/Object.cc | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit eb5642f396c8772c83b2cf27da437413b692c952
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 23 22:26:05 2006 +0000
+
+ Don't build pdftoppm when splashoutput is disabled as it does not link
+
+ ChangeLog | 5 +++++
+ utils/Makefile.am | 13 +++++++++++--
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+commit 7c5c1361045429a429a6f40d936f8c7c01fe0d07
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Feb 18 20:17:00 2006 +0000
+
+ 2006-02-18 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h:
+ * poppler/GfxState.cc:
+ * poppler/GfxState.h: Add support for drawSoftMaskedImage to
+ CairoOutputDev. Ugly but works.
+
+ ChangeLog | 8 ++++
+ poppler/CairoOutputDev.cc | 101 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/CairoOutputDev.h | 6 +++
+ poppler/GfxState.cc | 50 ++++++++++++++++++++++
+ poppler/GfxState.h | 2 +
+ 5 files changed, 167 insertions(+), 0 deletions(-)
+
+commit dcb748f68112bd5f99fea8a3da06666be6cff0c5
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Feb 16 19:41:17 2006 +0000
+
+ 2006-02-16 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Work around cairo bug when scaling
+ 1x1 bitmaps. Fixes #3387. Also gives a performance improvement.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 33 ++++++++++++++++++++++++---------
+ 2 files changed, 29 insertions(+), 9 deletions(-)
+
+commit ef1070f6ca2d1e74c5f94728f3aaae22f0990c17
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 16 19:28:54 2006 +0000
+
+ Update soname
+
+ ChangeLog | 8 ++++++++
+ glib/Makefile.am | 2 ++
+ poppler/Makefile.am | 2 ++
+ qt/Makefile.am | 2 ++
+ qt4/src/Makefile.am | 2 ++
+ 5 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 24b9f5c33fb00ff80a79b34444282a57288f636c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 13 23:04:54 2006 +0000
+
+ * poppler/ArthurOutputDev.cc: Make it compile after changing code so we did not pass files to freetype but buffers
+
+ ChangeLog | 5 ++++
+ poppler/ArthurOutputDev.cc | 53 +++++++++++++++----------------------------
+ 2 files changed, 24 insertions(+), 34 deletions(-)
+
+commit 0bda90310b267d3a4963096293eb2bd29b120768
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 13 22:38:44 2006 +0000
+
+ Probably the last of inner patches missing from kpdf
+ Everybody will we happy now, kpdf has been finally assimilated
+
+ ChangeLog | 5 ++
+ poppler/PSOutputDev.cc | 124 ++++++++++++++++++++++++++++++++++++++++++++----
+ poppler/PSOutputDev.h | 4 +-
+ 3 files changed, 123 insertions(+), 10 deletions(-)
+
+commit cf9867fbbee2468a955b5845016585eeedf2debe
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 6 20:49:21 2006 +0000
+
+ Various fixes from Frank Meerkötter to enable fixedpoint arithmetic
+
+ ChangeLog | 8 ++++++++
+ configure.ac | 2 +-
+ goo/FixedPoint.h | 2 +-
+ splash/Splash.cc | 4 ++--
+ splash/SplashTypes.h | 2 +-
+ 5 files changed, 13 insertions(+), 5 deletions(-)
+
+commit f04e2c4f20f821ff8cb9465a715ccbb22091d449
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Feb 6 18:50:10 2006 +0000
+
+ Jeff Muizelaar's improvements to my yesterday's small patches
+
+ ChangeLog | 6 ++++++
+ poppler/Annot.cc | 9 ++++-----
+ poppler/JBIG2Stream.cc | 2 +-
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+commit 33e98f81cdfda0935ac7ea79a691976465ec790b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Feb 5 15:46:10 2006 +0000
+
+ Some small fixes from kpdf
+
+ ChangeLog | 8 ++++++++
+ poppler/Gfx.cc | 1 +
+ poppler/GfxFont.cc | 1 +
+ poppler/JBIG2Stream.cc | 2 +-
+ poppler/SplashOutputDev.cc | 1 -
+ 5 files changed, 11 insertions(+), 2 deletions(-)
+
+commit 6d9e6489d24b3105204ff4233f6493136e9b5715
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Feb 4 21:10:41 2006 +0000
+
+ 2006-02-04 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Gfx.cc:
+ * poppler/OutputDev.cc:
+ * poppler/OutputDev.h: Let output devices know about pdf grouping
+ operators.
+ Patch by Thorkild Stray.
+
+ ChangeLog | 8 ++++++++
+ poppler/Gfx.cc | 14 ++++++++++++++
+ poppler/OutputDev.cc | 16 ++++++++++++++++
+ poppler/OutputDev.h | 10 ++++++++++
+ 4 files changed, 48 insertions(+), 0 deletions(-)
+
+commit b4e34d905cd0ca5815a450de35b4c2774f4887c9
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Feb 4 20:48:25 2006 +0000
+
+ 2006-02-04 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc: Check all fonts returned by fontconfig.
+ Discard the ones that are not truetype or type1. Fixes #5758.
+ Patch by Ed Catmur.
+
+ ChangeLog | 6 +++++
+ poppler/GlobalParams.cc | 51 +++++++++++++++++++++++++---------------------
+ 2 files changed, 34 insertions(+), 23 deletions(-)
+
+commit fd85a0afdd7b4cafc68df400d4f94fccaea18c76
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 4 20:34:13 2006 +0000
+
+ Remove bug from "do not use an external file to pass fonts to Freetype" patch, patch by Stefan Schweizer
+
+ ChangeLog | 3 +++
+ poppler/SplashOutputDev.cc | 14 ++++++++++----
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+commit 67ca9d01f8badcf542f60b23521c384c9840ca1b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 4 20:31:00 2006 +0000
+
+ Added a DTD of the xml pdftohtml creates patch by Stefan Schweizer
+
+ ChangeLog | 2 ++
+ utils/Makefile.am | 2 ++
+ utils/pdf2xml.dtd | 28 ++++++++++++++++++++++++++++
+ 3 files changed, 32 insertions(+), 0 deletions(-)
+
+commit f4df23ca7f396883a906f16dfc8db1ebd528e04a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 4 20:24:03 2006 +0000
+
+ ignore++
+
+ utils/.cvsignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 93ad488679f594e45547a67e2a7397f4c8bd2820
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Feb 4 20:07:07 2006 +0000
+
+ Actually create pdftoppm patch by Stefan Schweizer
+
+ ChangeLog | 44 +++++++++++++++++++++++++-------------------
+ utils/Makefile.am | 10 ++++++++--
+ utils/pdftoppm.cc | 9 +++++----
+ 3 files changed, 38 insertions(+), 25 deletions(-)
+
+commit 7d2be955e6345a052590b06b29a6d2fb2111e2e6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 2 23:06:20 2006 +0000
+
+ CVE-2006-0301 fix by Derek though KDE security team
+
+ ChangeLog | 5 +++++
+ splash/SplashXPathScanner.cc | 32 ++++++++++++++++++++------------
+ 2 files changed, 25 insertions(+), 12 deletions(-)
+
+commit c191e7d0f13ea429017e4d4f79ce803e84c72e40
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 2 22:54:27 2006 +0000
+
+ i should learn on which day i live
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1ddeed60d07c3a7e011f3f594fa9299379d0b000
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Feb 2 22:50:01 2006 +0000
+
+ don't use files to pass fonts to freetype
+
+ ChangeLog | 26 ++++++++++++
+ fofi/FoFiTrueType.cc | 43 ++++++++++++++++---
+ fofi/FoFiTrueType.h | 7 ++-
+ fofi/FoFiType1C.h | 2 +-
+ goo/gfile.cc | 8 ++++
+ poppler/GfxFont.cc | 49 +++++++++++++++++++++-
+ poppler/GfxFont.h | 2 +
+ poppler/GlobalParams.cc | 1 +
+ poppler/GlobalParams.h | 1 +
+ poppler/SplashOutputDev.cc | 94 +++++++++++++++++++++---------------------
+ splash/SplashFTFontEngine.cc | 44 ++++++++++++-------
+ splash/SplashFTFontEngine.h | 16 +++----
+ splash/SplashFTFontFile.cc | 47 +++++++++++++--------
+ splash/SplashFTFontFile.h | 18 ++++----
+ splash/SplashFontEngine.cc | 46 ++++++++------------
+ splash/SplashFontEngine.h | 16 +++----
+ splash/SplashFontFile.cc | 70 +++++++++++++++++++++++++++----
+ splash/SplashFontFile.h | 25 +++++++++--
+ splash/SplashT1FontEngine.cc | 29 ++++++-------
+ splash/SplashT1FontFile.cc | 30 +++++++++++--
+ splash/SplashT1FontFile.h | 4 +-
+ 21 files changed, 396 insertions(+), 182 deletions(-)
+
+commit 34df4cfa5cd8788ccf2ea698cbedd05b209041f5
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Feb 1 03:52:12 2006 +0000
+
+ 2006-01-31 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc (GlobalParams::getDisplayFont):
+ Allow ttc fonts to be used.
+
+ ChangeLog | 5 +++++
+ poppler/GlobalParams.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 0184e7c928ec60c0aa3f8634d96ae0cf0ad6d157
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Jan 29 05:16:31 2006 +0000
+
+ 2006-01-28 Jeff Muizelaar <jeff@infidigm.net>
+
+ * glib/poppler-attachment.h: fix compile by adding <time.h> include.
+ Acked-by: Jonathan Blanford <jrb@redhat.com>
+
+ ChangeLog | 5 +++++
+ glib/poppler-attachment.h | 1 +
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit c805e25f2f074640e4345f8b71eef8d7de677109
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jan 26 19:25:07 2006 +0000
+
+ 2006-01-26 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc: Patch from Christian Krause; handle
+ 0-width lines (#5545).
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDev.cc | 6 +++++-
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 4f48abcd4c21460d4c5b718a7ba18cdceb30c2d1
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Jan 24 06:21:39 2006 +0000
+
+ Tue Jan 24 01:19:40 2006 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/Makefile.am:
+ * glib/poppler-attachment.cc:
+ * glib/poppler-attachment.h:
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c:
+ * glib/reference/tmpl/poppler-enums.sgml:
+ * glib/reference/tmpl/poppler-unused.sgml: glib bindings for the
+ embedded file support. It doesn't support mtime and ctime yet,
+ but the rest works.
+
+ ChangeLog | 16 +++
+ glib/Makefile.am | 2 +
+ glib/poppler-attachment.cc | 223 +++++++++++++++++++++++++++++++
+ glib/poppler-attachment.h | 67 +++++++++
+ glib/poppler-document.cc | 63 +++++++++
+ glib/poppler-document.h | 6 +
+ glib/poppler-page.cc | 2 +-
+ glib/poppler-private.h | 6 +-
+ glib/poppler.h | 1 +
+ glib/reference/tmpl/poppler-enums.sgml | 150 +++++++++++++++++++++
+ glib/reference/tmpl/poppler-unused.sgml | 130 ------------------
+ glib/test-poppler-glib.c | 26 ++++-
+ 12 files changed, 559 insertions(+), 133 deletions(-)
+
+commit 052bf4b80c8a0dc45f6222617bfd8ae1b9c40410
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jan 23 18:52:48 2006 +0000
+
+ 2006-01-23 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac:
+ * poppler/GlobalParams.cc:
+ * poppler/poppler-config.h.in:
+ * utils/pdftohtml.cc:
+ * utils/pdftops.cc: Respect command line paper size settings (#5641).
+ Drop the built-in paper sizes.
+
+ ChangeLog | 9 +++++++++
+ configure.ac | 1 -
+ poppler/GlobalParams.cc | 23 ++---------------------
+ poppler/poppler-config.h.in | 5 -----
+ utils/pdftohtml.cc | 4 +---
+ utils/pdftops.cc | 4 +++-
+ 6 files changed, 15 insertions(+), 31 deletions(-)
+
+commit fb2054a5031d60aac3ccc9a36b3ed88a32188e33
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jan 23 15:40:54 2006 +0000
+
+ 2006-01-23 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/test-poppler-glib.c (print_document_info, print_index):
+ Move variable declarations to top (#5692).
+
+ * utils/*.cc: Move config.h #include to top of #include's (#5693).
+
+ ChangeLog | 5 +++++
+ glib/test-poppler-glib.c | 5 +++--
+ poppler/FontInfo.cc | 2 +-
+ utils/HtmlOutputDev.cc | 2 +-
+ utils/ImageOutputDev.cc | 2 +-
+ utils/pdffonts.cc | 2 +-
+ utils/pdfimages.cc | 2 +-
+ utils/pdfinfo.cc | 2 +-
+ utils/pdftohtml.cc | 4 ++--
+ utils/pdftoppm.cc | 2 +-
+ utils/pdftops.cc | 2 +-
+ utils/pdftotext.cc | 2 +-
+ 12 files changed, 19 insertions(+), 13 deletions(-)
+
+commit 836af3529e827e25f20cb4710cbbf9ed0371a42c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jan 23 14:45:30 2006 +0000
+
+ 2006-01-23 Kristian Høgsberg <krh@redhat.com>
+
+ * splash/SplashFTFont.cc: Don't use deprecated freetype include
+ files.
+
+ ChangeLog | 5 +++++
+ splash/SplashFTFont.cc | 3 ++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 60e13bf84e4f020a264811e4a5bf85d67e15d6df
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Jan 21 21:56:40 2006 +0000
+
+ 2006-01-21 Jeff Muizelaar <jeff@infidigm.net>
+
+ * TODO: Add my todo list.
+
+ ChangeLog | 4 ++++
+ TODO | 10 ++++++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit cebba06563d1b691a8bbb83828e47c9cc91e231a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 22:40:26 2006 +0000
+
+ ok, ok, lasts files, i promise :-/
+
+ qt4/tests/check_attachments.cpp | 151 +++++++++++++++++++++++++++++++++++++
+ qt4/tests/poppler-attachments.cpp | 37 +++++++++
+ 2 files changed, 188 insertions(+), 0 deletions(-)
+
+commit 0b12e7cce6c6633b1d07e2902a9fa13ff52079e7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 22:38:59 2006 +0000
+
+ YAMF = Yet Another Missing File
+
+ qt4/src/poppler-embeddedfile.cc | 106 +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 106 insertions(+), 0 deletions(-)
+
+commit 38c8f3a53b3eb2be1fbfa360f77285037d89b719
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 22:36:01 2006 +0000
+
+ as usual i foget some files
+
+ poppler/UGooString.cc | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/UGooString.h | 55 +++++++++++++++++++++++++++++++
+ 2 files changed, 141 insertions(+), 0 deletions(-)
+
+commit ad6e7d862c8fa6e10a7dbbb3391cbb0b6c922375
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 22:32:13 2006 +0000
+
+ Brad patch for embedded document extraction, only has Qt4 bindings for now, needs Qt3 and glib work
+
+ ChangeLog | 42 +++++++++++++
+ glib/poppler-action.cc | 2 +-
+ glib/poppler-document.cc | 1 +
+ poppler/Annot.cc | 1 +
+ poppler/Catalog.cc | 133 ++++++++++++++++++++++++++++++++++++++---
+ poppler/Catalog.h | 60 +++++++++++++++++--
+ poppler/Dict.cc | 17 +++---
+ poppler/Dict.h | 15 +++--
+ poppler/FontInfo.cc | 1 +
+ poppler/Function.cc | 1 +
+ poppler/Gfx.cc | 1 +
+ poppler/GfxFont.cc | 5 +-
+ poppler/GfxState.cc | 1 +
+ poppler/Link.cc | 9 ++-
+ poppler/Link.h | 9 ++-
+ poppler/Makefile.am | 2 +
+ poppler/Object.h | 17 +++---
+ poppler/Outline.cc | 1 +
+ poppler/PDFDoc.cc | 1 +
+ poppler/PDFDoc.h | 2 +-
+ poppler/PSOutputDev.cc | 5 +-
+ poppler/Page.cc | 1 +
+ poppler/PageLabelInfo.cc | 1 +
+ poppler/Parser.cc | 2 +
+ poppler/SecurityHandler.cc | 1 +
+ poppler/Stream.cc | 1 +
+ poppler/XRef.cc | 1 +
+ qt/poppler-document.cc | 1 +
+ qt/poppler-page-transition.cc | 1 +
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-document.cc | 26 +++++++-
+ qt4/src/poppler-private.h | 2 +
+ qt4/src/poppler-qt4.h | 68 +++++++++++++++++++++
+ qt4/tests/.cvsignore | 2 +
+ qt4/tests/Makefile.am | 16 ++++-
+ utils/HtmlOutputDev.cc | 1 +
+ utils/pdffonts.cc | 1 +
+ utils/pdfinfo.cc | 1 +
+ utils/pdftohtml.cc | 1 +
+ utils/pdftotext.cc | 1 +
+ 40 files changed, 401 insertions(+), 54 deletions(-)
+
+commit 550fb0b617ece7951ec39aec5fa5504cc90022fc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 21:22:12 2006 +0000
+
+ Add some more documentation to PageTransition, patch by Stefan Kebekus
+
+ ChangeLog | 6 ++++++
+ qt/poppler-page-transition.h | 40 +++++++++++++++++++++++++++++++++-------
+ qt4/src/Doxyfile | 2 +-
+ 3 files changed, 40 insertions(+), 8 deletions(-)
+
+commit d66f3647ff1c38318d4cd056cb4d4c7a32eb6603
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jan 18 18:54:12 2006 +0000
+
+ poppler/CharCodeToUnicode.cc: Fix check for length that was not
+ having into account that there could be \n or \r in tokens an that
+ those do not have to be took into account. Fixes
+ http://bugs.kde.org/show_bug.cgi?id=120310
+
+ ChangeLog | 9 ++++++++-
+ poppler/CharCodeToUnicode.cc | 31 +++++++++++++++++++++++++++----
+ 2 files changed, 35 insertions(+), 5 deletions(-)
+
+commit d78b670339c8f92a32ab5f0a574d0e21690806f8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 17 21:35:31 2006 +0000
+
+ When doing the parsing check with XREF we did not grow too much. Fixes serialata10a.pdf
+
+ ChangeLog | 10 ++++++++++
+ poppler/Lexer.cc | 22 +++++++++++++++++++---
+ poppler/Lexer.h | 8 +++++---
+ poppler/Parser.cc | 6 +++---
+ poppler/Parser.h | 2 +-
+ poppler/XRef.cc | 17 +++++++++++++++++
+ poppler/XRef.h | 3 +++
+ 7 files changed, 58 insertions(+), 10 deletions(-)
+
+commit f5db636af0cd6e05cd7ede37a8585001d51192a1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 17 20:33:08 2006 +0000
+
+ i suck
+ i suck
+ i suck
+ i suck
+ i suck
+ A file i forgot to add to make it compile :-/
+
+ qt/poppler-page-transition-private.h | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+commit 9cc97908ea67ab431e58129f589e00f41f40a143
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Jan 12 23:54:08 2006 +0000
+
+ 2006-01-12 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/GlobalParams.cc: Make buildFcPattern() static.
+
+ ChangeLog | 4 ++++
+ poppler/GlobalParams.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit c7ce134fb1dadb46e2b3773d0976ea31da0a046f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Jan 11 16:52:58 2006 +0000
+
+ 2006-01-11 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/JBIG2Stream.cc:
+ * poppler/Stream.cc: Merge patch to fix CVE-2005-3624,
+ CVE-2005-3625 and CVE-2005-3627 issues.
+
+ ChangeLog | 6 ++++++
+ poppler/JBIG2Stream.cc | 32 +++++++++++++++++++++++++++++++-
+ poppler/Stream.cc | 8 +++++---
+ 3 files changed, 42 insertions(+), 4 deletions(-)
+
+commit ec7fb41725c19bc7f2aad1073fe6397ea0a8da0d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jan 10 21:57:28 2006 +0000
+
+ * configure.ac:
+ * m4/qt.m4: Fix bugs created when splitting the code from
+ configure.ac, take QTDIR into account when looking for QtTestLib and
+ do not die if it is not found as it is not mandatory
+ * qt/poppler-page-transition.cc:
+ * qt/poppler-page.cc:
+ * qt/poppler-private.h:
+ * qt4/tests/Makefile.am:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/Makefile.am: Fix mess created my the moving and renaming of
+ PageTransition.cc
+
+ ChangeLog | 15 +++++++++++++++
+ configure.ac | 14 ++++----------
+ m4/qt.m4 | 5 +++++
+ qt/poppler-page-transition.cc | 2 +-
+ qt/poppler-page.cc | 1 +
+ qt/poppler-private.h | 5 -----
+ qt4/src/Makefile.am | 1 +
+ qt4/src/poppler-page.cc | 2 +-
+ qt4/src/poppler-qt4.h | 2 +-
+ qt4/tests/Makefile.am | 1 +
+ 10 files changed, 30 insertions(+), 18 deletions(-)
+
+commit d9bc53a741b3bbd2a202662c66fe70f49ac72a49
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Jan 10 17:59:51 2006 +0000
+
+ 2006-01-10 Kristian Høgsberg <krh@redhat.com>
+
+ * splash/Makefile.am: Only install splash headers if
+ --enable-xpdf-headers is given.
+
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Set this here.
+
+ ChangeLog | 7 +++++++
+ Makefile.am | 1 +
+ splash/Makefile.am | 4 ++++
+ 3 files changed, 12 insertions(+), 0 deletions(-)
+
+commit ea6d9b97cec6fabf8a5005c565bbdb378bed7f54
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Tue Jan 10 17:55:59 2006 +0000
+
+ 2006-01-10 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h:
+ Fix the following fixme in CairoOutputDevice.
+
+ // FIXME: This is quite right yet, we need to accumulate all
+ // glyphs within one text object before we clip. Right now this
+ // just add this one string.
+
+ The fix uses a strategy similar to the one the Splash backend.
+ textClipPath is used to store the appended path from each call to
+ endString(). The accumulated path is clipped in endTextObject.
+
+ ChangeLog | 14 ++++++++++++++
+ poppler/CairoOutputDev.cc | 27 +++++++++++++++++++++++----
+ poppler/CairoOutputDev.h | 1 +
+ 3 files changed, 38 insertions(+), 4 deletions(-)
+
+commit 9e8a655a2bd3ca8cff1a150dce0dd378aeca047b
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Jan 8 22:59:48 2006 +0000
+
+ 2006-01-08 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Don't try and load type3 fonts (#4030).
+
+ ChangeLog | 6 +++++-
+ poppler/CairoOutputDev.cc | 5 ++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 25fd8e1ea87c41855a4ee702fbe47f5661a54c22
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Jan 8 22:51:17 2006 +0000
+
+ 2006-01-08 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Page.cc: use colToByte for reading thumbnails (#5420).
+
+ Patch by Nickolay V. Shmyrev.
+
+ ChangeLog | 6 ++++++
+ poppler/Page.cc | 6 +++---
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+commit df73ee2ec4b65ccf611f0fd76fb456cc797693d4
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Jan 7 06:10:15 2006 +0000
+
+ 2006-01-07 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/CairoOutputDev.cc: Initialize (fill|stroke)_opacity.
+
+ ChangeLog | 4 ++++
+ poppler/CairoOutputDev.cc | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 18eb8de66749082e4aa65cc6d369a533826fab33
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jan 6 10:05:58 2006 +0000
+
+ 2006-01-06 Kristian Høgsberg <krh@redhat.com>
+
+ * qt/poppler-page.cc:
+ * qt/poppler-private.h:
+ * qt/poppler-qt.h:
+ * qt4/src/Makefile.am:
+ * qt/Makefile.am:
+ * poppler/Makefile.am: Move PageTransition to qt bindings, move
+ contents from Private.h to qt/poppler-private.h.
+
+ * poppler/TextOutputDev.cc (visitWord): Remove #warning.
+
+ * utils/Makefile.am (pdfimages_SOURCES): Add ImageOutputDev.h, use
+ dist_man1_MANS so we actually dist the man pages.
+
+ * goo/Makefile.am (poppler_goo_include_HEADERS): Add GooVector.h.
+
+ * glib/reference/Makefile.am: DOC_SOURCE_DIR must be relative to
+ $(srcdir), fix this to make distchek run.
+
+ * m4/qt.m4:
+ * m4/libjpeg.m4:
+ * acinclude.m4:
+ * configure.ac: Split out Qt and libjpeg checks from configure.ac
+ and acinclude.m4 to m4/qt.m4 and m4/libjpeg.m4.
+
+ ChangeLog | 26 ++++
+ acinclude.m4 | 112 ----------------
+ configure.ac | 223 +++----------------------------
+ glib/reference/Makefile.am | 2 +-
+ glib/reference/tmpl/poppler-enums.sgml | 150 ---------------------
+ glib/reference/tmpl/poppler-unused.sgml | 130 ++++++++++++++++++
+ goo/Makefile.am | 1 +
+ m4/libjpeg.m4 | 109 +++++++++++++++
+ m4/qt.m4 | 206 ++++++++++++++++++++++++++++
+ poppler/Makefile.am | 1 -
+ poppler/PageTransition.h | 118 ----------------
+ poppler/Private.h | 30 ----
+ poppler/TextOutputDev.cc | 2 -
+ qt/Makefile.am | 8 +-
+ qt/poppler-page-transition.cc | 187 ++++++++++++++++++++++++++
+ qt/poppler-page-transition.h | 117 ++++++++++++++++
+ qt/poppler-page.cc | 1 -
+ qt/poppler-private.h | 9 +-
+ qt/poppler-qt.h | 2 +-
+ qt4/src/Makefile.am | 8 +-
+ utils/Makefile.am | 54 ++++++--
+ 21 files changed, 857 insertions(+), 639 deletions(-)
+
+commit 93921e77115ebe4d527f98675e438de485e84507
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 5 23:53:33 2006 +0000
+
+ * poppler/DCTStream.cc: Fix handling of malformed jpeg streams like
+ the one at http://bugs.kde.org/show_bug.cgi?id=119569
+
+ Might be worth backporting to 0.4.x
+
+ ChangeLog | 5 +++++
+ poppler/DCTStream.cc | 26 ++++++++++++++++----------
+ 2 files changed, 21 insertions(+), 10 deletions(-)
+
+commit 0dc16af02071350a0dc11af4106799378c99cdad
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jan 5 13:53:58 2006 +0000
+
+ Introduce variants of renderTo that return a QImage and do not use a QPixmap so threading is possible.
+
+ ChangeLog | 8 ++++++
+ qt/poppler-page.cc | 18 +++++++++----
+ qt/poppler-qt.h | 30 ++++++++++++++++++++----
+ qt4/src/poppler-page.cc | 9 ++++++-
+ qt4/src/poppler-qt4.h | 59 +++++++++++++++++++++++++---------------------
+ 5 files changed, 85 insertions(+), 39 deletions(-)
+
+commit 5c2cbf5d327c6cc75c073b56c3ab1748c0d24387
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jan 2 14:24:31 2006 +0000
+
+ Use error() instead std::cerr in PageTranstion.cc
+
+ ChangeLog | 4 ++++
+ poppler/PageTransition.cc | 5 +++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit da5a4233498b56df611e1c7bca0090306cb5dbe0
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Mon Jan 2 00:06:45 2006 +0000
+
+ Sun Jan 1 18:50:51 2006 Jonathan Blandford <jrb@redhat.com>
+
+ * Makefile.am:
+ * autogen.sh:
+ * configure.ac:
+ * gtk-doc.make:
+ * glib/Makefile.am: enable gtk-doc support.
+
+ ChangeLog | 8 +++
+ Makefile.am | 2 +
+ autogen.sh | 14 +++++
+ configure.ac | 4 ++
+ glib/Makefile.am | 1 +
+ gtk-doc.make | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ m4/gtk-doc.m4 | 53 +++++++++++++++++++
+ 7 files changed, 235 insertions(+), 0 deletions(-)
+
+commit 372c34cc9728d7041bc4f6893c0bae50c9501c50
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 1 22:35:48 2006 +0000
+
+ * qt4/src/poppler-private.h:
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-document.cc: Don't create a SplashOutputDev for
+ every splashRenderToPixmap
+
+ ChangeLog | 4 ++++
+ qt4/src/poppler-document.cc | 1 -
+ qt4/src/poppler-page.cc | 18 +++++-------------
+ qt4/src/poppler-private.h | 24 +++++++++++++++++++++++-
+ 4 files changed, 32 insertions(+), 15 deletions(-)
+
+commit 6ff83474ac594368015334db9c6b33d3a552079f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jan 1 22:18:47 2006 +0000
+
+ * qt/poppler-page.cc:
+ * qt/poppler-private.h: Don't create a SplashOutputDev for every
+ renderToPixmap.
+
+ ChangeLog | 6 ++++++
+ qt/poppler-page.cc | 8 +-------
+ qt/poppler-private.h | 24 +++++++++++++++++++++++-
+ 3 files changed, 30 insertions(+), 8 deletions(-)
+
+commit 6942646d4c82327a80b021838a38aa55c1026883
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Sun Jan 1 20:34:36 2006 +0000
+
+ Sun Jan 1 15:32:08 2006 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/reference/*: More gtk-doc work. Not enabled for building
+ by default, but filled in.
+
+ .cvsignore | 1 +
+ ChangeLog | 5 +
+ glib/reference/.cvsignore | 18 ++
+ glib/reference/Makefile.am | 87 +++++++
+ glib/reference/poppler-docs.sgml | 17 ++
+ glib/reference/poppler-sections.txt | 151 +++++++++++
+ glib/reference/poppler.types | 4 +
+ glib/reference/tmpl/poppler-action.sgml | 172 +++++++++++++
+ glib/reference/tmpl/poppler-document.sgml | 354 ++++++++++++++++++++++++++
+ glib/reference/tmpl/poppler-enums.sgml | 169 ++++++++++++
+ glib/reference/tmpl/poppler-page.sgml | 243 ++++++++++++++++++
+ glib/reference/tmpl/poppler-private.sgml | 128 +++++++++
+ glib/reference/tmpl/poppler.sgml | 216 ++++++++++++++++
+ glib/reference/tmpl/stamp-poppler-enums.sgml | 19 ++
+ 14 files changed, 1584 insertions(+), 0 deletions(-)
+
+commit 0fab1b711f153859e113cb3b6d734ddcb58fb87a
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Sat Dec 31 02:10:33 2005 +0000
+
+ Fri Dec 30 21:08:33 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/*{cc,h}: Update inline doc comments. This is in
+ preparation for gtk-doc support.
+
+ ChangeLog | 5 ++
+ glib/poppler-action.cc | 14 ++++
+ glib/poppler-action.h | 2 -
+ glib/poppler-document.cc | 151 +++++++++++++++++++++++++++++++++++++++++++++-
+ glib/poppler-document.h | 4 +-
+ glib/poppler-page.cc | 28 +++++++++
+ glib/poppler.cc | 16 +++++
+ glib/test-poppler-glib.c | 29 +++++++++
+ 8 files changed, 243 insertions(+), 6 deletions(-)
+
+commit 313530036b204eaa5ddfa150730302e855560d6a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 30 22:54:46 2005 +0000
+
+ A delete that slipped from the last patch-commit
+
+ qt4/src/poppler-page.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit cf6f8123af19aca4200b58a454652f68ce8132e2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 30 22:31:32 2005 +0000
+
+ Puting PageTransition implementation into poppler "core", both Qt and Qt4 frontends use it.
+
+ poppler/Makefile.am | 1 +
+ poppler/PageTransition.cc | 188 +++++++++++++++++++++++++++++++++++++++++++++
+ poppler/PageTransition.h | 118 ++++++++++++++++++++++++++++
+ poppler/Private.h | 30 +++++++
+ qt/Makefile.am | 2 +-
+ qt/poppler-page.cc | 111 +-------------------------
+ qt/poppler-qt.h | 72 +-----------------
+ qt4/src/Makefile.am | 2 +-
+ qt4/src/poppler-page.cc | 17 ++++-
+ qt4/src/poppler-qt4.h | 14 +++-
+ 10 files changed, 374 insertions(+), 181 deletions(-)
+
+commit 56035ab199ac6deb5c1e07e745d120d1121a5960
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Dec 30 21:59:58 2005 +0000
+
+ * utils/HtmlOutputDev.cc:
+ * utils/ImageOutputDev.cc: Fix build when using --disable-libjpeg
+
+ ChangeLog | 5 +++++
+ utils/HtmlOutputDev.cc | 2 ++
+ utils/ImageOutputDev.cc | 2 ++
+ 3 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 8b64dafc7f1d198fb0052c0d6f0da6de97bbb48d
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Dec 28 09:23:43 2005 +0000
+
+ Plug a few memory leaks in the Qt4 bindings.
+
+ ChangeLog | 25 +++++++++++++++++++
+ qt4/src/poppler-document.cc | 3 ++
+ qt4/src/poppler-private.h | 7 ++++-
+ qt4/src/poppler-qt4.h | 3 ++
+ qt4/tests/check_fonts.cpp | 8 ++++++
+ qt4/tests/check_metadata.cpp | 50 +++++++++++++++++++++++++++++++++----
+ qt4/tests/check_pagelayout.cpp | 6 ++++
+ qt4/tests/check_pagemode.cpp | 10 +++++++
+ qt4/tests/check_permissions.cpp | 2 +
+ qt4/tests/check_version.cpp | 22 ----------------
+ qt4/tests/poppler-fonts.cpp | 1 +
+ qt4/tests/stress-poppler-qt4.cpp | 2 +
+ 12 files changed, 110 insertions(+), 29 deletions(-)
+
+commit 64c07a20a4ed844f3b3dd26e974f58d5877cf9fd
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Dec 27 06:10:01 2005 +0000
+
+ qt4/src/poppler-qt4.h and qt4/src/poppler-document.cc: add convertDate() function that
+ turns char* PDF date strings into QDateTime. This version handles
+ the timezone conversions. Refactored the existing date() method
+ to use it.
+
+ qt4/tests/check_dateConversion.cpp: unit tests for convertDate()
+ qt4/tests/check_metadata.cpp: update to reflect UTC.
+ qt4/tests/.cvsignore: suppress check_dateConversion
+
+ ChangeLog | 9 +++
+ qt4/src/poppler-document.cc | 89 ++++++++++++++++++++-----------
+ qt4/src/poppler-qt4.h | 5 ++
+ qt4/tests/.cvsignore | 1 +
+ qt4/tests/Makefile.am | 11 +++-
+ qt4/tests/check_dateConversion.cpp | 105 ++++++++++++++++++++++++++++++++++++
+ qt4/tests/check_metadata.cpp | 4 +-
+ 7 files changed, 188 insertions(+), 36 deletions(-)
+
+commit 4b2e3b5106b75f23c830837a886cd29beb1d1d1b
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Dec 27 05:08:34 2005 +0000
+
+ * qt4/src/Doxyfile (JAVADOC_AUTOBRIEF): Turned on automatic
+ \brief mode.
+
+ * qt4/src/poppler-qt4.h: Update API documentation. Patch from
+ Stefan Kebekus, with some changes. Removed \brief entries.
+
+ ChangeLog | 8 +++++
+ qt4/src/Doxyfile | 2 +-
+ qt4/src/poppler-qt4.h | 81 ++++++++++++++++++++++++++++++++++++++----------
+ 3 files changed, 73 insertions(+), 18 deletions(-)
+
+commit 8d9cf43aaa73d5012428a6a4c5d7e2cccbd3036e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Dec 21 22:09:47 2005 +0000
+
+ 2005-12-21 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Sum up 0.5 changes so far.
+
+ * acinclude.m4: Split jpeg macros out into this file.
+
+ * poppler/Stream.cc: Apply latest CVE-2005-3191 updates.
+
+ ChangeLog | 8 ++++
+ NEWS | 8 ++++
+ acinclude.m4 | 112 +++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac | 114 --------------------------------------------------
+ poppler/JPXStream.cc | 1 +
+ poppler/Stream.cc | 11 ++++-
+ 6 files changed, 137 insertions(+), 117 deletions(-)
+
+commit 97243286560cb4f264b875185c8768a6af09d554
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Dec 21 17:30:33 2005 +0000
+
+ 2005-12-21 Kristian Høgsberg <krh@redhat.com>
+
+ * utils/Makefile.am: Add parseargs.h to sources and add
+ -I$(top_srcdir)/poppler to INCLUDES.
+
+ * poppler/CairoFontEngine.cc: Apply patch from Hiroyuki Ikezoe to
+ man non-embedded CJK fonts work.
+
+ ChangeLog | 14 +++++++++--
+ configure.ac | 2 +-
+ poppler/CairoFontEngine.cc | 52 +++++++++++++++++++++++++++++++++++++++----
+ utils/Makefile.am | 15 +++++++-----
+ 4 files changed, 68 insertions(+), 15 deletions(-)
+
+commit cf887a9a9fae7272165d3aae05c85444ff5ca604
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 18 22:03:30 2005 +0000
+
+ * poppler/Page.cc: Only discard cropbox sizes one by one and not
+ completely. Jeff and Martin were right
+
+ ChangeLog | 2 ++
+ poppler/Page.cc | 13 ++++++++++---
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 495890b9cef9d5d61bb47e789add1cf2c3b8f83d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 18 21:56:15 2005 +0000
+
+ + .cvsignore
+
+ utils/.cvsignore | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 5dca860bba6918e06fab3aa56a2c75f0ac9ecdfb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 18 21:08:48 2005 +0000
+
+ Fix utils building on Slackware
+
+ ChangeLog | 3 +++
+ configure.ac | 3 +++
+ utils/Makefile.am | 3 ++-
+ 3 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 03e3d9164ffd71f03136b57a9941ea14fadb21aa
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 18 17:12:28 2005 +0000
+
+ 2005-12-18 Albert Astals Cid <aacid@kde.org>
+
+ * configure.ac: Better jpeg detection, refer to ml PCbsd problem
+
+ ChangeLog | 4 ++
+ configure.ac | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 118 insertions(+), 17 deletions(-)
+
+commit 888d76a29c9c5ea6c90cc4299b230ca0c2c2944f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Dec 12 20:21:08 2005 +0000
+
+ * poppler/Page.cc: Ignore cropBox if it seems incorrect
+
+ ChangeLog | 4 ++++
+ poppler/Page.cc | 7 +++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit bcc5e3afe27c8787ce7022a0701997c96eddb4fe
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Dec 12 20:15:11 2005 +0000
+
+ 2005-12-12 Kristian Høgsberg <krh@redhat.com>
+
+ * Makefile.am:
+ * configure.ac:
+ * goo/GooVector.h:
+ * utils/HtmlFonts.cc:
+ * utils/HtmlFonts.h:
+ * utils/HtmlLinks.cc:
+ * utils/HtmlLinks.h:
+ * utils/HtmlOutputDev.cc:
+ * utils/HtmlOutputDev.h:
+ * utils/ImageOutputDev.cc:
+ * utils/ImageOutputDev.h:
+ * utils/Makefile.am:
+ * utils/parseargs.c:
+ * utils/parseargs.h:
+ * utils/pdffonts.1:
+ * utils/pdffonts.cc:
+ * utils/pdfimages.1:
+ * utils/pdfimages.cc:
+ * utils/pdfinfo.1:
+ * utils/pdfinfo.cc:
+ * utils/pdftohtml.1:
+ * utils/pdftohtml.cc:
+ * utils/pdftoppm.1:
+ * utils/pdftoppm.cc:
+ * utils/pdftops.1:
+ * utils/pdftops.cc:
+ * utils/pdftotext.1:
+ * utils/pdftotext.cc: Add command line utilities from xpdf.
+
+ ChangeLog | 31 +
+ Makefile.am | 6 +-
+ configure.ac | 25 +-
+ goo/GooVector.h | 101 +++
+ utils/HtmlFonts.cc | 326 ++++++++++
+ utils/HtmlFonts.h | 85 +++
+ utils/HtmlLinks.cc | 101 +++
+ utils/HtmlLinks.h | 49 ++
+ utils/HtmlOutputDev.cc | 1569 +++++++++++++++++++++++++++++++++++++++++++++++
+ utils/HtmlOutputDev.h | 302 +++++++++
+ utils/ImageOutputDev.cc | 195 ++++++
+ utils/ImageOutputDev.h | 76 +++
+ utils/Makefile.am | 18 +
+ utils/parseargs.c | 190 ++++++
+ utils/parseargs.h | 71 +++
+ utils/pdffonts.1 | 128 ++++
+ utils/pdffonts.cc | 294 +++++++++
+ utils/pdfimages.1 | 96 +++
+ utils/pdfimages.cc | 159 +++++
+ utils/pdfinfo.1 | 157 +++++
+ utils/pdfinfo.cc | 376 ++++++++++++
+ utils/pdftohtml.1 | 85 +++
+ utils/pdftohtml.cc | 429 +++++++++++++
+ utils/pdftoppm.1 | 113 ++++
+ utils/pdftoppm.cc | 189 ++++++
+ utils/pdftops.1 | 224 +++++++
+ utils/pdftops.cc | 336 ++++++++++
+ utils/pdftotext.1 | 135 ++++
+ utils/pdftotext.cc | 337 ++++++++++
+ 29 files changed, 6194 insertions(+), 9 deletions(-)
+
+commit 5fbded32741acb5fac411189f80cb57aa11df517
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 10 10:52:15 2005 +0000
+
+ * qt4/src/poppler-page.cc:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/tests/test-poppler-qt4.cpp: The parameters x,y,w,h to the
+ method splashRenderToPixmap are now used. Convenient
+ defaults are provided. The test has been changed accordingly. Some
+ added documentation. Patch by Stefan Kebekus
+
+ ChangeLog | 9 +++++++++
+ qt4/src/poppler-page.cc | 4 ++--
+ qt4/src/poppler-qt4.h | 31 +++++++++++++++++++++++--------
+ qt4/tests/test-poppler-qt4.cpp | 2 +-
+ 4 files changed, 35 insertions(+), 11 deletions(-)
+
+commit bc6df8c41081c0c0107655cbf70ddb8b0c493c34
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Dec 9 20:49:59 2005 +0000
+
+ 2005-12-09 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GfxState.cc: Use colToByte() for converting GxfColorComp
+ to bytes (really fix #5117).
+
+ * poppler/Stream.cc: Remove duplicated check (#5243).
+
+ ChangeLog | 5 +++++
+ poppler/GfxState.cc | 6 +++---
+ poppler/Stream.cc | 4 ----
+ 3 files changed, 8 insertions(+), 7 deletions(-)
+
+commit 8a2464122455311c6d16ae62bb9ac9a0ae365a28
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Dec 9 19:40:40 2005 +0000
+
+ 2005-12-09 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac:
+ * poppler/Makefile.am (poppler_includedir):
+ * goo/Makefile.am (poppler_goo_include_HEADERS): Make installation
+ of xpdf header files optional.
+
+ ChangeLog | 10 +++++++++-
+ configure.ac | 8 ++++++++
+ goo/Makefile.am | 4 ++++
+ poppler/Makefile.am | 4 ++++
+ 4 files changed, 25 insertions(+), 1 deletions(-)
+
+commit 830b61bfd1c985fe14ec4d0f6724c8f70e924fc1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 8 18:17:42 2005 +0000
+
+ * configure.ac: Detect if gettimeofday is available, fixes for correct
+ linking to Qt4 on windows
+ * goo/GooTimer.[cc|h]: Only build if gettimeofday is available
+ * poppler/Gfx.cc: Only use the timer for profiling if gettimeofday is
+ available
+ * poppler/GlobalParams.cc: Remove extra unlockGlobalParams that was
+ making windows hang
+ * splash/SplashFTFontEngine.cc: i need unistd.h on windows also
+ * splash/SplashFontFile.cc: i need unistd.h on windows also
+
+ ChangeLog | 12 ++++++++++++
+ configure.ac | 14 +++++++++++++-
+ goo/GooTimer.cc | 3 +++
+ goo/GooTimer.h | 4 ++++
+ poppler/Gfx.cc | 6 ++++++
+ poppler/GlobalParams.cc | 1 -
+ splash/SplashFTFontEngine.cc | 4 +---
+ splash/SplashFontFile.cc | 4 +---
+ 8 files changed, 40 insertions(+), 8 deletions(-)
+
+commit 0a1c33ed17fd7053ed455da3444856a5dab3c9b4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 8 12:42:50 2005 +0000
+
+ Remove -DDATADIR we are not using if for anything and it shadows a windows typedef
+
+ ChangeLog | 8 ++++++++
+ glib/Makefile.am | 3 +--
+ poppler/Makefile.am | 3 +--
+ qt/Makefile.am | 3 +--
+ test/Makefile.am | 3 +--
+ 5 files changed, 12 insertions(+), 8 deletions(-)
+
+commit adca042e666fd932f16213d0a4daba08b5021901
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Dec 7 08:42:21 2005 +0000
+
+ Remove the version check. OK'd by krh.
+
+ ChangeLog | 2 ++
+ poppler/PDFDoc.cc | 6 +-----
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+commit bc57f8dd73eef9a74e4a6e248ed6985c360db838
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Dec 7 08:31:09 2005 +0000
+
+ Add infoKeys() - allows you to get a list of all the string names (keys)
+ for the metadata.
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 7 +++++++
+ qt4/tests/check_metadata.cpp | 18 ++++++++++++++++++
+ 4 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 7ec41df91e6dbf792e11676d929acc2f634bd382
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Dec 6 09:58:04 2005 +0000
+
+ Add more unit tests for better coverage.
+
+ ChangeLog | 6 ++++
+ qt4/tests/check_fonts.cpp | 24 +++++++++++++++
+ qt4/tests/check_metadata.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 96 insertions(+), 0 deletions(-)
+
+commit a92b10016306ac46775c9b95b52d249b233ff950
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Dec 5 20:46:22 2005 +0000
+
+ * poppler/CairoFontEngine.cc: Correct fix for #5149, i broke it when merging xpdf 3.01 patches
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 4 +---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+commit 66096477d1a86f13fcb07ae25caff1cc02b1e7cd
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Dec 4 19:48:25 2005 +0000
+
+ Add checking for Type3 fonts in the unit test.
+
+ ChangeLog | 5 +++++
+ qt4/tests/check_fonts.cpp | 24 ++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+commit 62345b0affed8e2e37728fca7f2b750879192c43
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 4 18:53:40 2005 +0000
+
+ Fix error in merging CAN-2005-3193 fix. Thanks Daniel Gryniewicz for notifying
+
+ ChangeLog | 5 +++++
+ poppler/JPXStream.cc | 2 --
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit ba4b3f88271892f197aa2ec076c80ff63a175887
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Dec 4 11:30:00 2005 +0000
+
+ * qt/poppler-qt.h:
+ * qt/poppler-fontinfo.h:
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-fontinfo.cc: Implement copy constructor of FontInfo needed
+ as Q[Value]List<FontInfo> uses it when appending
+
+ ChangeLog | 8 ++++++++
+ qt/poppler-fontinfo.cc | 9 +++++++++
+ qt/poppler-qt.h | 2 ++
+ qt4/src/poppler-fontinfo.cc | 9 +++++++++
+ qt4/src/poppler-qt4.h | 2 ++
+ 5 files changed, 30 insertions(+), 0 deletions(-)
+
+commit e091231d98d12c19b0098ffbaec6ecda28097dff
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Dec 4 10:45:25 2005 +0000
+
+ Add new unit test to .cvsignore suppressions.
+
+ ChangeLog | 2 ++
+ qt4/tests/.cvsignore | 1 +
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 6a7b1eaaedbfdd3a8e6b4d899477350f2b485641
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Dec 4 10:05:21 2005 +0000
+
+ * qt4/src/poppler-qt4.h:
+ qt4/src/fontinfo.cc: add implementation for FontInfo::typeName()
+
+ * qt4/tests/check_fonts.cpp:
+ * qt4/tests/Makefile.am: add unit test for fonts
+
+ * qt4/src/Mainpage.dox: Minor typo fixes.
+
+ ChangeLog | 11 +++++++++++
+ qt4/src/Mainpage.dox | 5 +++--
+ qt4/src/poppler-fontinfo.cc | 24 ++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 14 +++++++++++++-
+ qt4/tests/Makefile.am | 5 +++++
+ qt4/tests/check_fonts.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 98 insertions(+), 3 deletions(-)
+
+commit 31b28b4c59f7820901e9cf893197f381acbae8ce
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Dec 4 02:24:25 2005 +0000
+
+ 2005-12-03 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_set_selection_alpha): Use
+ Nickolays original fix instead of trying to be clever with
+ gdk_pixbuf_fill().
+
+ * poppler/CairoFontEngine.cc: Fix text corruption bug (#5149),
+ a rerun of an old classic (#3340).
+
+ ChangeLog | 7 +++++++
+ glib/poppler-page.cc | 8 +++++++-
+ poppler/CairoFontEngine.cc | 2 ++
+ 3 files changed, 16 insertions(+), 1 deletions(-)
+
+commit 4d169c5c345cdac84a39026e759b928977643417
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Dec 4 01:42:29 2005 +0000
+
+ 2005-12-03 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GfxState.cc: Fixing another problem with new GfxRGB
+ representation causing images to show up as random pixels (#5117).
+
+ ChangeLog | 5 +++++
+ poppler/GfxState.cc | 6 +++---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+commit 58de0458e17b1639ce0bcae45a4b09b2c0a56618
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Dec 3 23:23:53 2005 +0000
+
+ 2005-12-03 Kristian Høgsberg <krh@redhat.com>
+
+ * qt/Makefile.am (noinst_PROGRAMS): Only build qt test program if
+ splash is enabled.
+
+ * poppler/CairoOutputDev.cc: Remove unused grid snapping code,
+ sidestepping #4507.
+
+ * glib/poppler-document.h (PopplerPermissions): Breaking enum
+ definition over multiple lines confuses glib-mkenums (#4600).
+
+ * poppler/Makefile.am (libpoppler_la_LIBADD): Add FREETYPE_LIBS
+ (#4515).
+
+ * poppler/TextOutputDev.cc:
+ * qt/poppler-qt.h: GCC-4.1 fixes (#5031).
+
+ ChangeLog | 17 +++++++++++++++++
+ glib/poppler-document.h | 5 +----
+ poppler/CairoOutputDev.cc | 35 +++++++++--------------------------
+ poppler/CairoOutputDev.h | 2 +-
+ poppler/Makefile.am | 3 ++-
+ poppler/TextOutputDev.cc | 2 +-
+ qt/Makefile.am | 4 ++++
+ qt/poppler-qt.h | 6 +++---
+ 8 files changed, 38 insertions(+), 36 deletions(-)
+
+commit df45483f1437d8a96519e1428d1f4b3ffc08c2cd
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 3 22:39:06 2005 +0000
+
+ remove another chagne should not have gone in
+
+ test/pdf-inspector.cc | 9 ++-------
+ 1 files changed, 2 insertions(+), 7 deletions(-)
+
+commit 7dfe02ee112dee51346525b62d877e6591135761
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 3 22:28:46 2005 +0000
+
+ Add the font retrieveing on the qt3 backend also, based on a patch by Wilfried Huss
+
+ ChangeLog | 3 ++
+ qt/poppler-fontinfo.cc | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 78 insertions(+), 0 deletions(-)
+
+commit 655b9dd195ac9faf2f7ea0255880b8c83b249a06
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 3 22:26:07 2005 +0000
+
+ this should have not went in
+
+ poppler/TextOutputDev.h | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit ab45eb562159d5b006e658ec66723a0a47908f65
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 3 22:20:54 2005 +0000
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-fontinfo.cc:
+ * qt4/src/poppler-textbox.cc: Remove implementation of that classes from the header, use pimpl
+
+ ChangeLog | 9 ++++-
+ poppler/TextOutputDev.h | 10 +++---
+ qt/Makefile.am | 1 +
+ qt/poppler-document.cc | 29 +++++++++++++++
+ qt/poppler-private.h | 2 +
+ qt/poppler-qt.h | 80 ++++++++++++++++++++++++++++++++++++++++++-
+ qt4/src/Makefile.am | 2 +
+ qt4/src/poppler-fontinfo.cc | 69 +++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 43 +++++++++--------------
+ qt4/src/poppler-textbox.cc | 49 ++++++++++++++++++++++++++
+ test/pdf-inspector.cc | 9 ++++-
+ 11 files changed, 268 insertions(+), 35 deletions(-)
+
+commit 64079ad81caf6d2cf66b1f3a3de9454146e15c6c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Dec 3 21:55:36 2005 +0000
+
+ 2005-12-03 Kristian Høgsberg <krh@redhat.com>
+
+ Fixes from Nickolay V. Shmyrev:
+
+ * poppler/TextOutputDev.cc (TextLine::visitSelection,
+ TextBlock::visitSelection): Fix selection crash with zero-width
+ word boxes or zero-height line boxes (#4402).
+
+ * poppler/CairoOutputDev.h: Fix wrong cairo-ft.h include (#4413).
+
+ * poppler/CairoOutputDev.cc (eoFill, fill):
+ * glib/poppler-page.cc (poppler_page_render_selection): Update to
+ work with new GfxColor definition and use
+ cairo_pattern_create_rgba() to cache cairo_pattern_t's for the
+ fill and stroke colors.
+
+ * glib/poppler-page.cc (poppler_page_set_selection_alpha): Zero
+ out pixbuf first.
+
+ ChangeLog | 21 ++++++++++++++++
+ glib/poppler-page.cc | 18 ++++++++-----
+ poppler/CairoOutputDev.cc | 59 ++++++++++++++++++++++++++++++++------------
+ poppler/CairoOutputDev.h | 6 ++--
+ poppler/TextOutputDev.cc | 8 +++---
+ 5 files changed, 82 insertions(+), 30 deletions(-)
+
+commit f3da21a3ecdd2694290e64af86c8e35fcb61371b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Dec 3 21:35:45 2005 +0000
+
+ More docs for the Qt4 frontend, patch by Stefan Kebekus
+
+ ChangeLog | 8 ++++
+ qt4/src/.cvsignore | 3 +-
+ qt4/src/Doxyfile | 4 +-
+ qt4/src/Mainpage.dox | 91 ++++++++++++++++++++++++++++++++++++++++
+ qt4/src/poppler-page.cc | 20 ++-------
+ qt4/src/poppler-qt4.h | 57 +++++++++++++++++-------
+ qt4/tests/test-poppler-qt4.cpp | 5 +-
+ 7 files changed, 151 insertions(+), 37 deletions(-)
+
+commit 7b2c6e92611db9350ca5dcaf3fd730fe5e69afea
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Dec 1 22:45:10 2005 +0000
+
+ Fix CAN-2005-3193 related bugs
+ Thanks Leonard for reporting
+
+ ChangeLog | 6 ++++++
+ poppler/JPXStream.cc | 9 ++++++++-
+ poppler/Stream.cc | 33 ++++++++++++++++++++++++++++++++-
+ poppler/Stream.h | 3 +++
+ 4 files changed, 49 insertions(+), 2 deletions(-)
+
+commit a90f076af9ebb188895e7b223bcb7e5c3f4309c4
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 28 22:50:19 2005 +0000
+
+ Fix QPixmap contents generation messed when doing the xpdf 3.01 transition in qt4 frontend
+ Use Splash backend by default in the qt4 test, added -arthur option to use the Arthur backend
+
+ ChangeLog | 12 +++++++-
+ qt4/src/poppler-page.cc | 45 ++++++++++++++++++++++++++-------
+ qt4/src/poppler-qt4.h | 17 +++++++++----
+ qt4/tests/test-poppler-qt4.cpp | 53 +++++++++++++++++++++++++---------------
+ 4 files changed, 90 insertions(+), 37 deletions(-)
+
+commit b7e4f0e7d175abde7fafb1fcc7ba129468bc8c1a
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Nov 27 01:33:51 2005 +0000
+
+ Convert Qt4 unit tests to use the new Qt4.1 QTestlib framework.
+ Add a little more API documentation
+
+ ChangeLog | 7 +++++
+ qt4/src/poppler-qt4.h | 11 +++++---
+ qt4/tests/Makefile.am | 12 +++++---
+ qt4/tests/check_metadata.cpp | 58 +++++++++++++++++++-------------------
+ qt4/tests/check_pagelayout.cpp | 14 +++++-----
+ qt4/tests/check_pagemode.cpp | 22 +++++++-------
+ qt4/tests/check_permissions.cpp | 18 ++++++------
+ 7 files changed, 78 insertions(+), 64 deletions(-)
+
+commit d036fa022dbb6f4421ccc8b12b8f9e4f0c8d7406
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 25 22:52:56 2005 +0000
+
+ patch from kebekus to add to the qt4 binding the same functions we added to the qt3 one
+
+ ChangeLog | 5 +++++
+ qt4/src/poppler-page.cc | 44 ++++++++++++++++++++++++++++++++++++++++++--
+ qt4/src/poppler-qt4.h | 22 ++++++++++++++++++++++
+ 3 files changed, 69 insertions(+), 2 deletions(-)
+
+commit 3c9f09d76dc70e4ba766930facee8b6f30bcd2da
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Nov 22 21:50:44 2005 +0000
+
+ Fix page range in the inspector
+
+ ChangeLog | 4 ++++
+ test/pdf-inspector.cc | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit e64f63416dbce497cb2167272b95491664f213e8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 21 22:12:15 2005 +0000
+
+ PAtch to add some more functions to the qt binding by Stefan Kebekus
+
+ ChangeLog | 5 ++++
+ qt/poppler-page.cc | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++-
+ qt/poppler-qt.h | 41 +++++++++++++++++++++++++++++++
+ 3 files changed, 114 insertions(+), 1 deletions(-)
+
+commit 8bd8cb4160b73da69d058783750352fbface66dc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Nov 21 19:44:09 2005 +0000
+
+ Fix a possible build problem
+
+ ChangeLog | 4 ++++
+ qt/Makefile.am | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit fc59b79dc375544681032a1618e96c458515d724
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Nov 20 23:17:32 2005 +0000
+
+ 2005-11-20 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GfxState.cc: Fix the byte_lookup initialization broken
+ by the merges (#4350). Modify GfxColorSpace::getRGBLine() to work
+ with new GfXColor type.
+
+ ChangeLog | 13 ++++++++++-
+ poppler/GfxState.cc | 59 ++++++++++++++++++++++++++++++--------------------
+ 2 files changed, 47 insertions(+), 25 deletions(-)
+
+commit 6fe2cb0fcd53211143dcd0c47bf8c8c7a8c11a39
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Nov 17 21:37:34 2005 +0000
+
+ make it compile with freetype 2.2.0 preversions
+
+ ChangeLog | 4 ++++
+ splash/SplashFTFont.cc | 42 +++++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 41 insertions(+), 5 deletions(-)
+
+commit 429d3521d788be702a3944bc290569f90ae04892
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Nov 4 19:03:55 2005 +0000
+
+ Make it compile using --disable-cairo-output
+
+ ChangeLog | 4 ++++
+ glib/poppler-document.cc | 6 ++++--
+ glib/poppler-page.cc | 27 +++++++++++++--------------
+ 3 files changed, 21 insertions(+), 16 deletions(-)
+
+commit b96c118eb08d478914c2981204d749a95957cbb3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Nov 1 15:29:32 2005 +0000
+
+ Comment some unused parameters to calm down compiler warnings when using these heders on external projects with higher warning verbosity
+
+ ChangeLog | 5 ++
+ poppler/OutputDev.h | 125 ++++++++++++++++++++++++++-------------------------
+ poppler/Stream.h | 24 +++++-----
+ 3 files changed, 80 insertions(+), 74 deletions(-)
+
+commit 51670972777510a3ec64a56649716b31167b9d0e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 30 20:29:05 2005 +0000
+
+ Last xpdf 3.01 merge (at least from my side)
+ It's very big, but noone has opposed in the 2 weeks time i gave on the ml so either poppler is dead or people agree with the patch
+
+ ChangeLog | 39 +
+ glib/poppler-page.cc | 32 +-
+ poppler/ArthurOutputDev.cc | 2 +-
+ poppler/ArthurOutputDev.h | 2 +-
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/CairoOutputDev.h | 2 +-
+ poppler/Gfx.cc | 645 ++++++++++--
+ poppler/Gfx.h | 17 +-
+ poppler/GfxState.cc | 1410 ++++++++++++++++++++++---
+ poppler/GfxState.h | 196 +++-
+ poppler/OutputDev.cc | 25 +
+ poppler/OutputDev.h | 46 +-
+ poppler/PDFDoc.cc | 98 ++-
+ poppler/PDFDoc.h | 24 +-
+ poppler/PSOutputDev.cc | 1461 +++++++++++++++++++++----
+ poppler/PSOutputDev.h | 48 +-
+ poppler/Page.cc | 115 ++-
+ poppler/Page.h | 23 +-
+ poppler/SplashOutputDev.cc | 1525 ++++++++++++++++++++++++---
+ poppler/SplashOutputDev.h | 59 +-
+ poppler/TextOutputDev.cc | 230 +++--
+ poppler/TextOutputDev.h | 16 +-
+ qt/poppler-page.cc | 34 +-
+ qt4/src/poppler-page.cc | 31 +-
+ splash/Splash.cc | 2598 ++++++++++++++++++++++++++++++++++----------
+ splash/Splash.h | 75 +-
+ splash/SplashBitmap.cc | 216 +++--
+ splash/SplashBitmap.h | 13 +-
+ splash/SplashPattern.cc | 22 +-
+ splash/SplashPattern.h | 19 +-
+ splash/SplashState.cc | 11 +
+ splash/SplashState.h | 3 +
+ splash/SplashTypes.h | 145 ++-
+ test/gtk-cairo-test.cc | 2 +-
+ test/gtk-splash-test.cc | 23 +-
+ test/pdf-inspector.cc | 2 +-
+ 36 files changed, 7656 insertions(+), 1555 deletions(-)
+
+commit 10dfa2254dafb9de93692def2bfb3133d9a39989
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Oct 17 02:17:51 2005 +0000
+
+ 2005-10-05 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_render_to_ps): Fix another
+ off-by-one page number error (#4555).
+
+ ChangeLog | 6 +++++-
+ poppler/poppler-config.h.in | 2 +-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 9830f0ea41f09fefada740e9429c491e067a5082
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 15:11:32 2005 +0000
+
+ GfxFont merges from xpdf 3.01
+
+ ChangeLog | 1 +
+ poppler/GfxFont.cc | 109 +++++++++++++++++++++++++++++++++++-----------------
+ 2 files changed, 75 insertions(+), 35 deletions(-)
+
+commit 62b5ba221aca8c320e964916b0c0329efc8da572
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 15:04:39 2005 +0000
+
+ Stream[cc|h] merges from xpdf 3.01
+
+ ChangeLog | 1 +
+ poppler/Stream.cc | 714 ++++++++++++++++++++++++++++++++++++++++++++++++-----
+ poppler/Stream.h | 19 +-
+ 3 files changed, 658 insertions(+), 76 deletions(-)
+
+commit b9fab51179f38e9798b10366be672f0432c874da
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 14:58:14 2005 +0000
+
+ Function.cc|h merges from xpdf 3.01
+
+ ChangeLog | 1 +
+ poppler/Function.cc | 76 +++++++++++++++++++++++++++++----------------------
+ poppler/Function.h | 42 ++++++++++++++++++++++++++++
+ 3 files changed, 86 insertions(+), 33 deletions(-)
+
+commit c6e0242200f818c67508041763ff317e79daadd6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 14:54:17 2005 +0000
+
+ Annot.[cc|h] and related merges from xpdf 3.01
+
+ ChangeLog | 7 ++-
+ poppler/Annot.cc | 234 ++++++++++++++++++++++++++++++++++++++++++------
+ poppler/Annot.h | 20 ++---
+ poppler/FontInfo.cc | 2 +-
+ poppler/PSOutputDev.cc | 2 +-
+ poppler/Page.cc | 2 +-
+ 6 files changed, 221 insertions(+), 46 deletions(-)
+
+commit 65d574fdc009e45ad66d1d402d5e805e4e94f427
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 14:30:16 2005 +0000
+
+ Merge SplashFTFont.cc with xpdf 3.01 changes
+
+ ChangeLog | 1 +
+ splash/SplashFTFont.cc | 64 +++++++++++++++++++++++++++++++++---------------
+ 2 files changed, 45 insertions(+), 20 deletions(-)
+
+commit f9d208e86433b213b21a75089f82fd00dcd746fc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 14:25:32 2005 +0000
+
+ Merge SplashScreen.[cc|h] from xpdf 3.01
+
+ ChangeLog | 4 ++
+ splash/SplashScreen.cc | 110 +++++++++++++++++++++++++++++++----------------
+ splash/SplashScreen.h | 12 +++++-
+ 3 files changed, 87 insertions(+), 39 deletions(-)
+
+commit 7d46ac000316566503a27b5e5c68621be9c081d0
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Oct 16 14:19:47 2005 +0000
+
+ Merging SplashXPathScanner.cc changes from xpdf 3.01
+
+ splash/SplashXPathScanner.cc | 80 ++++++++++++++++++++++-------------------
+ 1 files changed, 43 insertions(+), 37 deletions(-)
+
+commit e34713a2187e05358f98e749ec2923210a40a862
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Oct 5 15:57:17 2005 +0000
+
+ 2005-10-05 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_render_to_ps): Fix another
+ off-by-one page number error (#4555).
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit fdd0934430ed251f9aeb45158b6ec95684b3e7b4
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Mon Sep 26 19:29:45 2005 +0000
+
+ 2005-09-26 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * glib/poppler-action.cc:
+
+ Initialize window title even if the action is unknown
+
+ ChangeLog | 6 ++++++
+ glib/poppler-action.cc | 5 +++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit e9753049ddfbdf28df7a222d35eccdbcbcbc848d
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Mon Sep 26 10:42:38 2005 +0000
+
+ 2005-09-26 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * glib/poppler-action.cc:
+ * glib/poppler-action.h:
+
+ Implement launch action
+
+ ChangeLog | 7 +++++++
+ glib/poppler-action.cc | 11 ++++++++---
+ glib/poppler-action.h | 1 +
+ 3 files changed, 16 insertions(+), 3 deletions(-)
+
+commit ab18b2cb6d1c62bb91173d105e8631fe4ef1bcfb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 15:27:31 2005 +0000
+
+ Parser.cc merges from xpdf 3.01
+
+ ChangeLog | 1 +
+ poppler/Parser.cc | 19 +++++++++++--------
+ 2 files changed, 12 insertions(+), 8 deletions(-)
+
+commit cf6723caaed24615c3b8965cee9c433007f80d77
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 15:08:52 2005 +0000
+
+ TextPage *TextOutpudDev::takeText() from xpdf 3.01
+
+ ChangeLog | 1 +
+ poppler/TextOutputDev.cc | 8 ++++++++
+ poppler/TextOutputDev.h | 4 ++++
+ 3 files changed, 13 insertions(+), 0 deletions(-)
+
+commit e0cbb0ca2c611ad5ac0267e46279c9d61450902a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 14:59:43 2005 +0000
+
+ more 3.00 -> 3.01 merging
+
+ ChangeLog | 1 +
+ poppler/XRef.cc | 1 -
+ 2 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9c7adb318d395ff674c6febf6406a8d47e9e5bf6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 14:43:15 2005 +0000
+
+ * poppler/UnicodeMap.cc: More grealloc -> greallocn
+ * poppler/UnicodeTypeTable.cc: Merge from xpdf 3.01
+
+ ChangeLog | 2 ++
+ poppler/UnicodeMap.cc | 4 ++--
+ poppler/UnicodeTypeTable.cc | 4 ++--
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 2c4c9b855b0df1dc0836d4f44e9471215a419ea6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 14:34:31 2005 +0000
+
+ Merge link.cc changes from xpdf 3.00 -> 3.01
+
+ ChangeLog | 1 +
+ poppler/Link.cc | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 62 insertions(+), 3 deletions(-)
+
+commit 4e9490c0219dd9c99ba0e5533c96663b8570a87b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Sep 20 14:00:43 2005 +0000
+
+ Merge GlobalParam.* changes, they are worthless for us as poppler but this way we are nearer to have the 3.01 sources merged, then we can remove them if we decide we don't need this options.
+ Remove a setEncryption from the Xref.h marco probably forgot to remove when merging
+
+ ChangeLog | 3 +++
+ poppler/GlobalParams.cc | 41 +++++++++++++++++++++++++++++++++++++++++
+ poppler/GlobalParams.h | 22 ++++++++++++++++------
+ poppler/XRef.h | 4 ----
+ 4 files changed, 60 insertions(+), 10 deletions(-)
+
+commit 22da021bf69d83d641e3f30cc0e1bd62394e56a4
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Tue Sep 20 13:23:08 2005 +0000
+
+ 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/XRef.cc:
+
+ Remove duplicated initialization
+
+ ChangeLog | 6 ++++++
+ poppler/XRef.cc | 4 ----
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+commit 2a8778147938e3ed2af177226a9c35655f898c95
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Tue Sep 20 10:18:57 2005 +0000
+
+ 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/GlobalParams.cc:
+
+ s/G/Goo in not yet compiled plugins code
+
+ ChangeLog | 6 ++++++
+ poppler/GlobalParams.cc | 8 ++++----
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 16f720b87cfc491db585dbdc99236cf492ffe85b
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Tue Sep 20 09:57:41 2005 +0000
+
+ 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/Makefile.am:
+
+ Add XPDFPlugin*. Thanks to TSDgeos that noticed this.
+
+ * poppler/XpdfPluginAPI.cc:
+
+ Fixup
+
+ ChangeLog | 10 ++++++++++
+ poppler/Makefile.am | 4 +++-
+ poppler/XpdfPluginAPI.cc | 2 +-
+ 3 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 5f30791c3d87315ad1f742de64d2c1351ca70cb7
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 19:33:28 2005 +0000
+
+ *** empty log message ***
+
+ ChangeLog | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit db62e07fcf57f45951b21f8aab44b0d943efe5d0
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 19:33:05 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/PDFDoc.cc:
+ * poppler/PDFDoc.h:
+ * poppler/XRef.cc:
+ * poppler/XRef.h:
+
+ Merge more from 3.01
+
+ poppler/PDFDoc.cc | 20 ++++++++++++++++----
+ poppler/PDFDoc.h | 19 +++++++++----------
+ poppler/XRef.cc | 13 +++++++++++--
+ poppler/XRef.h | 7 +++++--
+ 4 files changed, 41 insertions(+), 18 deletions(-)
+
+commit 3acc7be594712fd0ce7ac07b7188d5b38b382782
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 19:05:00 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/XRef.cc:
+
+ Merge some initialization that I lost before
+
+ ChangeLog | 6 ++++++
+ poppler/XRef.cc | 4 ++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 3badd82b72b2768be27e309b048cd8dcb1c80038
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:46:37 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/XRef.cc:
+
+ Merge change from 3.01
+
+ ChangeLog | 6 ++++++
+ poppler/XRef.cc | 8 --------
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+commit 5474583e20ca773befa17242d4ad7b8f81d5bf99
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:38:58 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/CharCodeToUnicode.cc:
+ * poppler/CharCodeToUnicode.h:
+
+ Improvements from xpdf 3.01
+
+ ChangeLog | 7 +++++++
+ poppler/CharCodeToUnicode.cc | 31 +++++++++++++++++++------------
+ poppler/CharCodeToUnicode.h | 4 ++++
+ 3 files changed, 30 insertions(+), 12 deletions(-)
+
+commit b2a6eab113fecd3823885c64f3302bea4f372a9f
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:37:29 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/CMap.cc:
+
+ Improvements from xpdf 3.01
+
+ ChangeLog | 6 ++++++
+ poppler/CMap.cc | 30 +++++++++++++++++++++++++++---
+ 2 files changed, 33 insertions(+), 3 deletions(-)
+
+commit 3f69f2158453b9dab9efc280ed1578ac3d0cebe8
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:35:29 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/NameToUnicodeTable.h:
+ * poppler/UnicodeTypeTable.cc:
+ * poppler/UnicodeTypeTable.h:
+
+ Merge some unicode table changes from xpdf 3.01
+
+ ChangeLog | 8 +
+ poppler/NameToUnicodeTable.h | 168 +++++-----
+ poppler/UnicodeTypeTable.cc | 690 ++++++++++++++++++++++++++++++++++++++++--
+ poppler/UnicodeTypeTable.h | 2 +
+ 4 files changed, 764 insertions(+), 104 deletions(-)
+
+commit 6cbe76bc55d557fe5fca0f8f1b33bda95acdc0e9
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:32:29 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/SplashOutputDev.h:
+ * splash/Splash.cc:
+ * splash/Splash.h:
+
+ Modified region support from xpdf 3.01
+
+ ChangeLog | 8 ++++++++
+ poppler/SplashOutputDev.h | 5 +++++
+ splash/Splash.cc | 31 +++++++++++++++++++++++++++++++
+ splash/Splash.h | 11 +++++++++++
+ 4 files changed, 55 insertions(+), 0 deletions(-)
+
+commit a9df3f3203c14161e5d6bc6048ec7e123536e6d3
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:29:18 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * goo/Makefile.am:
+ * poppler/DCTStream.h:
+ * poppler/Decrypt.cc:
+ * poppler/Decrypt.h:
+ * poppler/FlateStream.h:
+ * poppler/GlobalParams.cc:
+ * poppler/GlobalParams.h:
+ * poppler/Makefile.am:
+ * poppler/PDFDoc.cc:
+ * poppler/PDFDoc.h:
+ * poppler/Parser.cc:
+ * poppler/Parser.h:
+ * poppler/Stream.cc:
+ * poppler/Stream.h:
+ * poppler/XRef.cc:
+ * poppler/XRef.h:
+ * poppler/poppler-config.h.in:
+
+ Merge security plugins support from xpdf 3.01
+
+ ChangeLog | 24 +++
+ goo/FixedPoint.cc | 95 +++++++++++
+ goo/FixedPoint.h | 150 +++++++++++++++++
+ goo/Makefile.am | 6 +-
+ poppler/DCTStream.h | 2 -
+ poppler/Decrypt.cc | 23 ++-
+ poppler/Decrypt.h | 6 +-
+ poppler/FlateStream.h | 2 -
+ poppler/GlobalParams.cc | 229 ++++++++++++++++++++++++++
+ poppler/GlobalParams.h | 16 ++
+ poppler/Makefile.am | 5 +-
+ poppler/PDFDoc.cc | 36 ++++
+ poppler/PDFDoc.h | 1 +
+ poppler/Parser.cc | 20 ---
+ poppler/Parser.h | 4 -
+ poppler/SecurityHandler.cc | 376 +++++++++++++++++++++++++++++++++++++++++++
+ poppler/SecurityHandler.h | 157 ++++++++++++++++++
+ poppler/Stream.cc | 18 --
+ poppler/Stream.h | 8 -
+ poppler/XRef.cc | 162 ++-----------------
+ poppler/XRef.h | 13 +-
+ poppler/XpdfPluginAPI.cc | 262 ++++++++++++++++++++++++++++++
+ poppler/XpdfPluginAPI.h | 341 +++++++++++++++++++++++++++++++++++++++
+ poppler/poppler-config.h.in | 2 -
+ 24 files changed, 1737 insertions(+), 221 deletions(-)
+
+commit a777e5c26483b90d0910e85c2be666640835d0bf
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:21:38 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * configure.ac:
+ * goo/Makefile.am:
+ * splash/Makefile.am:
+ * splash/SplashFTFont.cc:
+ * splash/SplashMath.h:
+ * splash/SplashTypes.h:
+
+ Merge support for fixed point
+
+ ChangeLog | 11 +++++++++++
+ configure.ac | 4 ++++
+ splash/Makefile.am | 1 +
+ splash/SplashFTFont.cc | 7 +++++++
+ splash/SplashMath.h | 34 +++++++++++++++++++++++++++++++++-
+ splash/SplashTypes.h | 5 +++++
+ 6 files changed, 61 insertions(+), 1 deletions(-)
+
+commit 00457c5f44a246c9f867a114a72be9f7b2dc1cf5
+Author: Marco Pesenti Gritti <mpg@redhat.com>
+Date: Fri Sep 16 18:11:14 2005 +0000
+
+ 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * poppler/ArthurOutputDev.cc:
+ * poppler/CairoFontEngine.cc:
+ * poppler/TextOutputDev.cc:
+ * poppler/UnicodeMap.cc:
+
+ Use mallocn when possible
+
+ ChangeLog | 9 +++++++++
+ poppler/ArthurOutputDev.cc | 2 +-
+ poppler/CairoFontEngine.cc | 4 ++--
+ poppler/TextOutputDev.cc | 2 +-
+ poppler/UnicodeMap.cc | 2 +-
+ 5 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 09c9ff67ceae5753811a2f625e3ad810628c782e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Sep 16 18:00:43 2005 +0000
+
+ SplashXPath.cc merges from xpdf 3.00 -> 3.01
+
+ ChangeLog | 3 ++
+ splash/SplashXPath.cc | 81 +++++++++++++++++++++++-------------------------
+ 2 files changed, 42 insertions(+), 42 deletions(-)
+
+commit 0555ba861d3b84d88c80da4fa247274338ff7817
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Sep 16 17:42:56 2005 +0000
+
+ SplashFontEngine.cc merge from xpdf 3.00 -> 3.01
+
+ splash/SplashFontEngine.cc | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit ddc72bd8354168d992631d1ef8cd0939b428966c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 22:24:55 2005 +0000
+
+ Merge xpdf 3.00 -> 3.01 changes in SplashT1Font.* files
+
+ splash/SplashT1Font.cc | 23 ++++++++++++++++++-----
+ splash/SplashT1Font.h | 2 ++
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+commit ba409db3157105f326b4bbc342ca7af859a44ce9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 22:20:37 2005 +0000
+
+ Merge xpdf 3.00 -> 3.01 changes in SplashPath.* files
+
+ splash/SplashPath.cc | 3 ++-
+ splash/SplashPath.h | 5 +++++
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 3ea00e853049d8c26ee88aaef8ea6c47c8d46956
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 22:15:47 2005 +0000
+
+ Merge xpdf 3.00 -> 3.01 changes in SplashFont.* files
+
+ splash/SplashFont.cc | 6 ++++++
+ splash/SplashFont.h | 10 +++++++++-
+ 2 files changed, 15 insertions(+), 1 deletions(-)
+
+commit e571dcbfd0c77a28e41710577859f632cc989de5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 22:09:50 2005 +0000
+
+ Merge the xpdf 3.01 change that uses runtime detection of freetype version
+
+ ChangeLog | 6 ++++++
+ configure.ac | 14 +++-----------
+ poppler/CairoFontEngine.cc | 21 ++++++++++++++-------
+ poppler/CairoFontEngine.h | 3 ++-
+ splash/SplashFTFontEngine.cc | 19 +++++++++++--------
+ splash/SplashFTFontEngine.h | 1 +
+ 6 files changed, 37 insertions(+), 27 deletions(-)
+
+commit 59fe2937db192dc7b59bf28c3f29909faf11aae3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 21:51:16 2005 +0000
+
+ Merge xpdf 3.00 -> 3.01 changes for that file
+
+ splash/SplashClip.h | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit b2f94635249f2c5f0c876a1005826fe4c6eb6025
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 12:52:36 2005 +0000
+
+ Merge xpdf 3.00 -> xpdf 3.01 changes for Catalog.[cc|h]
+
+ poppler/Catalog.cc | 5 ++++-
+ poppler/Catalog.h | 3 +++
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 0fc2e70576b1c48cf47a686e8aa7e202a802bc9d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 12:32:25 2005 +0000
+
+ Another small merge from xpdf 3.01
+
+ ChangeLog | 3 +++
+ poppler/Outline.cc | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+commit f8983ceb3c55df72c94870806d71db139c11bdeb
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 12:28:34 2005 +0000
+
+ Another small xpdf 3.00 -> xpdf 3.01 merge
+
+ poppler/Object.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 52efe9845cf3eb1dd836f90bfa203760baa2f87c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Sep 15 11:46:56 2005 +0000
+
+ bradh forgot to remove the two returns when merging xpdf 3.00 -> xpdf 3.01 changes of this file
+
+ poppler/JPXStream.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 4b4fc5c017bf147c9069bbce32fc14467bd2a81a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Sep 14 21:20:36 2005 +0000
+
+ Merge all the fofi/ changes from xpdf 3.01, there is only one api change that affects PSOutputDev (also has been updated the part that uses this api not the whole file). All our fixes in that dir are included in the upgrade.
+
+ ChangeLog | 4 +
+ fofi/FoFiTrueType.cc | 406 ++++++++++++++++++++++++++++++++++++++++++------
+ fofi/FoFiTrueType.h | 15 ++-
+ fofi/FoFiType1.cc | 25 ++--
+ fofi/FoFiType1C.cc | 134 ++++++++++++++---
+ fofi/FoFiType1C.h | 6 +
+ poppler/PSOutputDev.cc | 7 +-
+ poppler/PSOutputDev.h | 3 +-
+ 8 files changed, 515 insertions(+), 85 deletions(-)
+
+commit a68e8e6330418b1f623867973b9c128a9a139c0c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Sep 7 03:00:36 2005 +0000
+
+ 2005-09-06 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Enable A4_PAPER and OPI_SUPPORT by default. There
+ is no reason to not enable OPI and the paper size should be
+ controlled by the application.
+
+ * test/Makefile.am (EXTRA_DIST): Add pdf-operators.c
+
+ ChangeLog | 8 ++++++++
+ configure.ac | 17 ++---------------
+ test/Makefile.am | 3 +++
+ 3 files changed, 13 insertions(+), 15 deletions(-)
+
+commit b6490944c081ff53f623acea7ab7a600c3e54816
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Sep 3 11:53:44 2005 +0000
+
+ Switch the qt4/tests unittests to use QtTestLib.
+
+ ChangeLog | 6 ++
+ configure.ac | 66 ++++++++++++++++++++
+ qt4/tests/.cvsignore | 17 ++----
+ qt4/tests/Makefile.am | 71 +++++++---------------
+ qt4/tests/README.unittest | 23 +++++++
+ qt4/tests/check_author.cpp | 25 --------
+ qt4/tests/check_linearised.cpp | 23 -------
+ qt4/tests/check_metadata.cpp | 101 +++++++++++++++++++++++++++++++
+ qt4/tests/check_orientation.cpp | 40 ------------
+ qt4/tests/check_pagelayout.cpp | 44 +++++++++++++
+ qt4/tests/check_pagelayout_facing.cpp | 22 -------
+ qt4/tests/check_pagelayout_none.cpp | 22 -------
+ qt4/tests/check_pagelayout_single.cpp | 22 -------
+ qt4/tests/check_pagemode.cpp | 64 +++++++++++++++++++
+ qt4/tests/check_pagemode_attach.cpp | 22 -------
+ qt4/tests/check_pagemode_fullscreen.cpp | 22 -------
+ qt4/tests/check_pagemode_none.cpp | 22 -------
+ qt4/tests/check_pagemode_oc.cpp | 22 -------
+ qt4/tests/check_pagemode_thumbs.cpp | 22 -------
+ qt4/tests/check_permissions.cpp | 60 +++++++------------
+ 20 files changed, 354 insertions(+), 362 deletions(-)
+
+commit 3725841417871d1051772068833dc908ca70b7ce
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Sep 2 14:47:24 2005 +0000
+
+ 2005-09-02 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc: Apply Marcos rotation fix.
+
+ ChangeLog | 4 ++++
+ glib/poppler-page.cc | 5 ++++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit ecf3dcadb948013cbc987e464952933daf78e4bf
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Aug 31 15:28:46 2005 +0000
+
+ Merge some missing parts of previous patches, and some other minor
+ cleanups from xpdf 3.0.1
+
+ poppler/Catalog.cc | 16 +--
+ poppler/JPXStream.cc | 380 ++++++++++++++++++++++++++++++++----------------
+ poppler/JPXStream.h | 25 ++-
+ poppler/Lexer.cc | 11 ++
+ poppler/Lexer.h | 3 +
+ poppler/PSOutputDev.cc | 31 ++--
+ poppler/Stream.h | 7 +
+ 7 files changed, 309 insertions(+), 164 deletions(-)
+
+commit de78738164319b733e54a9abfb5957870facd6cd
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Aug 31 09:51:41 2005 +0000
+
+ poppler/JArithmeticDecoder.cc
+ poppler/JArithmeticDecoder.h
+ poppler/JBIG2Stream.cc
+ poppler/JBIG2Stream.h: merge in some of the JBIG2 changes from xpdf 3.0.1.
+
+ ChangeLog | 9 ++
+ poppler/JArithmeticDecoder.cc | 42 ++++++--
+ poppler/JArithmeticDecoder.h | 22 ++++-
+ poppler/JBIG2Stream.cc | 227 +++++++++++++++++++++++++----------------
+ poppler/JBIG2Stream.h | 4 +-
+ 5 files changed, 201 insertions(+), 103 deletions(-)
+
+commit 55952feb637e300b073691ae95d68e766521a769
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Aug 29 15:24:32 2005 +0000
+
+ 2005-08-29 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac (HAVE_FREETYPE_H): Patch from Hiroyuki Ikezoe: Set
+ HAVE_FREETYPE_217_OR_OLDER to 0 if we found freetype using
+ pkg-config (#4223).
+
+ ChangeLog | 6 ++++++
+ configure.ac | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 244e5c1f8f65da41ba6314028766dfe5973f6132
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Aug 28 09:43:18 2005 +0000
+
+ Merge the Goo* improvements from xpdf 3.0.1. This change is based on
+ martink's work (7-xpdf-3.01-goo-improvements.patch), with some tweaking
+ by me.
+
+ ChangeLog | 13 ++++++++
+ fofi/FoFiTrueType.cc | 1 +
+ goo/GooHash.cc | 24 ++++++++++++++
+ goo/GooHash.h | 2 +
+ goo/GooList.cc | 5 +++
+ goo/GooList.h | 5 +++
+ goo/GooString.cc | 85 +++++++++++++++++++++++++++++++++++++++++++++++++-
+ goo/GooString.h | 11 ++----
+ goo/gmem.c | 3 ++
+ poppler/Decrypt.cc | 1 +
+ 10 files changed, 142 insertions(+), 8 deletions(-)
+
+commit eb91b274245b4f5f5389bc9ddfde2c2806557665
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Aug 28 09:31:53 2005 +0000
+
+ This part of my previous gmallocn merge patch was missing.
+
+ goo/GooHash.cc | 4 ++--
+ goo/GooList.cc | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit b3474fd5e0efc96b5814d86e0cdedf39387e7ae3
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Aug 28 03:26:53 2005 +0000
+
+ add note about related bug
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ace2eb6ba518b970b96f30f61c4795c161e0cb79
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Aug 28 03:22:04 2005 +0000
+
+ 2005-08-27 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/FlateStream.cc: Fix predictor leak.
+
+ ChangeLog | 4 ++++
+ poppler/FlateStream.cc | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 96657c5480bf2ecf445ad5a105b8e7393ae53c8b
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Aug 28 03:19:55 2005 +0000
+
+ 2005-08-27 Jeff Muizelaar <jeff@infidigm.net>
+
+ * configure.ac: Disable the zlib-based decoder by default.
+
+ ChangeLog | 4 ++++
+ configure.ac | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit d1d715158223c7ca3ae279cea420a948cfdb0428
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Aug 27 08:43:42 2005 +0000
+
+ Merge the gmalloc -> gmallocn changes from xpdf 3.0.1. This change is
+ based on martink's work (13-xpdf-3.01-goo-allocn.patch) with some
+ tweaking by me. There may be some residual gmallocn changes still to
+ be merged.
+
+ ChangeLog | 7 +++++
+ fofi/FoFiTrueType.cc | 12 ++++----
+ fofi/FoFiType1.cc | 2 +-
+ fofi/FoFiType1C.cc | 14 +++++-----
+ goo/gmem.c | 22 ++++++++++++++++
+ goo/gmem.h | 9 +++++++
+ poppler/Annot.cc | 2 +-
+ poppler/Array.cc | 2 +-
+ poppler/BuiltinFont.cc | 2 +-
+ poppler/CMap.cc | 6 ++--
+ poppler/Catalog.cc | 8 +++---
+ poppler/CharCodeToUnicode.cc | 22 ++++++++--------
+ poppler/Dict.cc | 2 +-
+ poppler/Function.cc | 20 +++++++-------
+ poppler/Gfx.cc | 2 +-
+ poppler/GfxFont.cc | 24 +++++++++---------
+ poppler/GfxState.cc | 54 ++++++++++++++++++++--------------------
+ poppler/JArithmeticDecoder.cc | 2 +-
+ poppler/JBIG2Stream.cc | 30 +++++++++++-----------
+ poppler/Link.cc | 6 ++--
+ poppler/NameToCharCode.cc | 4 +-
+ poppler/Outline.cc | 4 +-
+ poppler/SplashOutputDev.cc | 8 +++---
+ poppler/Stream.cc | 12 ++++----
+ poppler/TextOutputDev.cc | 48 ++++++++++++++++++------------------
+ poppler/XRef.cc | 18 +++++++-------
+ splash/SplashClip.cc | 12 ++++----
+ splash/SplashFTFontFile.cc | 2 +-
+ splash/SplashFont.cc | 6 ++--
+ splash/SplashPath.cc | 8 +++---
+ splash/SplashScreen.cc | 4 +-
+ splash/SplashState.cc | 4 +-
+ splash/SplashT1FontFile.cc | 4 +-
+ splash/SplashXPath.cc | 4 +-
+ splash/SplashXPathScanner.cc | 4 +-
+ 35 files changed, 214 insertions(+), 176 deletions(-)
+
+commit feb82c60b1f86a9d1260db57534d98c54ee615c4
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Wed Aug 24 19:41:27 2005 +0000
+
+ * configure.ac: add /usr/include/qt4 to qt4_incdirs. That's what
+ Debian and Ubuntu use. Maybe we should just use pkg-config. If
+ it's usable with qt4.
+
+ * test/.cvsignore: ignore pdf_inspector binary.
+
+ ChangeLog | 8 ++++++++
+ configure.ac | 2 +-
+ test/.cvsignore | 7 ++++---
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+commit 8dce80eb74f24f07ac7668905f1631e04a9c5841
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Aug 24 18:57:46 2005 +0000
+
+ 2005-08-24 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.cc: Push rotation argument down to
+ GfxState constructor. This is still not completely functional yet.
+
+ * glib/poppler-page.cc (poppler_page_render_selection): Add
+ rotation argument so API is useful. Not yet implemented.
+ (poppler_page_prepare_output_dev): Patch from Marco to fix
+ rotation using the cairo backend.
+
+ ChangeLog | 10 ++++++++++
+ glib/poppler-page.cc | 22 ++++++++++++++++------
+ glib/poppler-page.h | 1 +
+ poppler/TextOutputDev.cc | 11 ++++++++---
+ poppler/TextOutputDev.h | 4 +++-
+ 5 files changed, 38 insertions(+), 10 deletions(-)
+
+commit b909b5ae98bc3e557ef6e658e2b9120e82951259
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed Aug 24 03:21:20 2005 +0000
+
+ Tue Aug 23 17:21:02 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * test/Makefile.am (gtk_cairo_test_LDADD): add
+ FREETYPE_{CFLAGS,LIBS} to the cairo deps
+
+ ChangeLog | 5 +++++
+ test/Makefile.am | 4 +++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit da3aac379f07ffedd6078707ec9923800fc0c0a5
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Aug 23 18:20:45 2005 +0000
+
+ Tue Aug 23 13:38:01 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * configure.ac:
+ * poppler/Gfx.cc:
+ * poppler/Gfx.h:
+ * poppler/GlobalParams.cc:
+ * poppler/GlobalParams.h:
+ * poppler/Makefile.am:
+ * poppler/OutputDev.cc:
+ * poppler/OutputDev.h:
+ * poppler/ProfileData.cc:
+ * poppler/ProfileData.h:
+ * test/Makefile.am:
+ * test/pdf-inspector.cc:
+ * test/pdf-inspector.glade:
+ * test/pdf-operators.c: Initial cut at a pdf inspector. This
+ should help us look at PDF files.
+
+ ChangeLog | 18 ++
+ configure.ac | 4 +-
+ poppler/Gfx.cc | 30 ++++
+ poppler/Gfx.h | 1 +
+ poppler/GlobalParams.cc | 16 ++
+ poppler/GlobalParams.h | 3 +
+ poppler/Makefile.am | 2 +
+ poppler/OutputDev.cc | 17 ++
+ poppler/OutputDev.h | 10 +-
+ poppler/ProfileData.cc | 44 +++++
+ poppler/ProfileData.h | 41 +++++
+ test/Makefile.am | 13 ++-
+ test/pdf-inspector.cc | 358 ++++++++++++++++++++++++++++++++++++++
+ test/pdf-inspector.glade | 434 ++++++++++++++++++++++++++++++++++++++++++++++
+ test/pdf-operators.c | 81 +++++++++
+ 15 files changed, 1068 insertions(+), 4 deletions(-)
+
+commit 1aad886c6c19a964a3fc9e18f31acc8e115478e0
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Aug 22 18:20:12 2005 +0000
+
+ 2005-08-22 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/test-poppler-glib.c: Patch from Marco to simplify the glib
+ rotation API.
+
+ ChangeLog | 8 +++
+ glib/poppler-page.cc | 136 ++++++----------------------------------------
+ glib/poppler-page.h | 4 +-
+ glib/poppler-private.h | 1 -
+ glib/test-poppler-glib.c | 2 +-
+ 5 files changed, 28 insertions(+), 123 deletions(-)
+
+commit 6070b1dc4b76c236f3100fbd255c2d906e61c3c2
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Aug 21 23:14:04 2005 +0000
+
+ 2005-08-21 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Makefile.am (INCLUDES): Add FREETYPE_CFLAGS.
+
+ * configure.ac: Make freetype check use pkg-config if possible.
+
+ ChangeLog | 6 ++++++
+ configure.ac | 34 ++++++++++++++++++++++++----------
+ poppler/Makefile.am | 1 +
+ 3 files changed, 31 insertions(+), 10 deletions(-)
+
+commit 2698ca6fa107ea91dc01eb8cfb0c93383fbca125
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Aug 17 16:54:01 2005 +0000
+
+ 2005-08-17 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GfxFont.cc: Add fix discussed in #3131 to only use the
+ MacRoman char map if the font has one or the font dicts specifies
+ /MacRoman.
+
+ ChangeLog | 6 ++++++
+ poppler/GfxFont.cc | 1 -
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 5dc9b14b99f2efa2fe018e9267dd363d1bcd78b1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Aug 7 23:58:12 2005 +0000
+
+ Fix EOF checking
+
+ ChangeLog | 4 ++++
+ poppler/PDFDoc.cc | 10 +++++++++-
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+commit 155d019d7b474f244a3e4bf64d192015f6a266c4
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Aug 6 18:09:51 2005 +0000
+
+ 2005-08-06 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h: Use GdkColor for specifying selection
+ colors, we alreay depend on GDK anyway.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 20 +++++++++-----------
+ glib/poppler-page.h | 5 +++--
+ 3 files changed, 18 insertions(+), 13 deletions(-)
+
+commit c710b645c8297d356c101b13a9889bcaba691176
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 6 11:58:59 2005 +0000
+
+ Update comment
+
+ poppler/PDFDoc.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit de7953c8a8360d8bfc99298906c5fc1094684fc3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Aug 6 11:47:37 2005 +0000
+
+ Increase EOF searching up to last 1024 characters
+
+ ChangeLog | 7 +++++++
+ poppler/PDFDoc.cc | 23 +++++++++++++----------
+ 2 files changed, 20 insertions(+), 10 deletions(-)
+
+commit 5dd72618688763b50d5f5738d857c9294ef1b1c2
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Aug 6 02:15:58 2005 +0000
+
+ Add password arguments to document constructor.
+
+ ChangeLog | 4 ++++
+ qt4/src/poppler-document.cc | 8 ++++++--
+ qt4/src/poppler-qt4.h | 4 +++-
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+commit edbd7957b393eb63f48df7db6b220b355d4fc461
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Aug 6 02:07:55 2005 +0000
+
+ Make API extraction work again.
+
+ ChangeLog | 3 +++
+ qt4/src/Doxyfile | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit f43a6f1d1c27c042f5736746c94430083baa4c1d
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sat Aug 6 01:53:06 2005 +0000
+
+ Add new test code for encrypted files.
+
+ ChangeLog | 5 ++
+ qt4/tests/.cvsignore | 1 +
+ qt4/tests/Makefile.am | 7 ++-
+ qt4/tests/test-password-qt4.cpp | 135 +++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 147 insertions(+), 1 deletions(-)
+
+commit 2ec26afaf80864b023899b890b8e229448da9bed
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Aug 5 22:30:20 2005 +0000
+
+ 2005-08-05 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.cc (visitLine): Round selection
+ coordinates in device space, so selection isn't fuzzy.
+
+ * poppler/GfxState.cc:
+ * poppler/GfxState.h: Add simple Matrix class.
+
+ ChangeLog | 8 ++++++++
+ poppler/CairoOutputDev.cc | 6 +++---
+ poppler/GfxState.cc | 26 ++++++++++++++++++++++++++
+ poppler/GfxState.h | 10 ++++++++++
+ poppler/TextOutputDev.cc | 14 ++++++++++++++
+ 5 files changed, 61 insertions(+), 3 deletions(-)
+
+commit ccba4f0773047eea5e4ad0ac736450160dd97664
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Aug 5 19:04:36 2005 +0000
+
+ 2005-08-05 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * poppler/TextOutputDev.cc:
+ * poppler/TextOutputDev.h: Propagate selection colors to the glib API.
+
+ ChangeLog | 7 +++++
+ glib/poppler-page.cc | 63 ++++++++++++++++++++++++++++++++++++++++------
+ glib/poppler-page.h | 4 ++-
+ poppler/TextOutputDev.cc | 25 ++++++++---------
+ poppler/TextOutputDev.h | 7 +++-
+ 5 files changed, 82 insertions(+), 24 deletions(-)
+
+commit 43e97129393f403c41f191ceae9a54793ece005f
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Thu Aug 4 10:15:23 2005 +0000
+
+ Fix problem with drawing filled objects that was introduced in Rev 1.4.
+
+ ChangeLog | 5 +++++
+ poppler/ArthurOutputDev.cc | 13 +++++++++++--
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+commit a75d80333a70d2e1ac7c9032d316034eebed9dd6
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Aug 3 11:44:55 2005 +0000
+
+ Implement paging ability for Qt4, more than a little based
+ on Albert's work for Qt3.
+ Up arrow -> previous page
+ Down arrow -> next page
+ q -> quit.
+
+ What more could you want from a PDF viewer :-)
+
+ ChangeLog | 6 +++++
+ qt4/tests/test-poppler-qt4.cpp | 47 +++++++++++++++++++++++++++++++--------
+ 2 files changed, 43 insertions(+), 10 deletions(-)
+
+commit f3e0a163b098da1cc389c2c4f47e28358b1bec77
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Aug 1 19:15:40 2005 +0000
+
+ Fix problem in the patch to fix #3299
+
+ ChangeLog | 4 ++++
+ poppler/DCTStream.cc | 15 ++++++++++-----
+ poppler/DCTStream.h | 1 +
+ 3 files changed, 15 insertions(+), 5 deletions(-)
+
+commit 5f7bd81bedd8c90e3312190256488ff0c15502e1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Aug 1 15:21:19 2005 +0000
+
+ 2005-08-01 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Dan Winship <danw@novell.com>
+
+ * glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Set alpha to
+ 0xff (opaque), not 0x00.
+
+ ChangeLog | 7 +++++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 22f509e60f60ccaea1f91d9ec1ef7ba8200bee8a
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Aug 1 08:09:00 2005 +0000
+
+ Fix up the fill problem with drawing text, where the "middle" of glyphs
+ with a "hole" (like d, o, p, b, g) got filled. Also remove some debugging
+ code. The glyphs are still ugly though.
+
+ ChangeLog | 7 +++++++
+ poppler/ArthurOutputDev.cc | 13 +------------
+ 2 files changed, 8 insertions(+), 12 deletions(-)
+
+commit 7bf5d10c1f6edd538769c3a83a3b3d5df56d604b
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Jul 31 09:54:04 2005 +0000
+
+ An initial version of proper font handling, heavily based on work by
+ Albert Astals Cid. I changed it to stroke the glyphs based on the
+ SplashPath. In the longer term, Arthur should use FreeType paths
+ directly - hopefully that will be less ugly, and not fill everything.
+
+ ChangeLog | 8 +
+ poppler/ArthurOutputDev.cc | 407 +++++++++++++++++++++++++++++++------------
+ poppler/ArthurOutputDev.h | 15 ++-
+ qt4/src/poppler-page.cc | 2 +-
+ splash/SplashPath.h | 2 +
+ 5 files changed, 317 insertions(+), 117 deletions(-)
+
+commit 8567b794628786b82e8db2a7daf75e4ad2398960
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Fri Jul 29 12:15:19 2005 +0000
+
+ Add some more test cases.
+
+ ChangeLog | 4 ++++
+ qt4/tests/.cvsignore | 4 ++++
+ qt4/tests/Makefile.am | 10 +++++++++-
+ qt4/tests/check_pagelayout_facing.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_version.cpp | 22 ++++++++++++++++++++++
+ 5 files changed, 61 insertions(+), 1 deletions(-)
+
+commit 59d660cf4d614fdea09d6a62b8889f7682c2b4f9
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Fri Jul 29 11:41:14 2005 +0000
+
+ Compile fix associated with last change.
+
+ poppler/ArthurOutputDev.cc | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit 88c57c73f57820d6a57e26825093fbc688845e67
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Fri Jul 29 11:24:42 2005 +0000
+
+ A couple of minor changes to the Arthur backend.
+
+ ChangeLog | 9 +++++++++
+ poppler/ArthurOutputDev.cc | 18 ++++++++++++++----
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 481db9d9eae5ea16e5b382f4ad21e6e624a70dcf
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jul 29 05:48:33 2005 +0000
+
+ 2005-07-29 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.cc: Finish TextSelectionDumper class for
+ extracting the text from a selection. Add
+ TextPage::getSelectionText() and TextOutputDev::getSelectionText()
+ methods to expose the new functionality.
+
+ * glib/poppler-page.cc (poppler_page_get_text): Use
+ TextOutputDev::getSelectionText() to get the text from the
+ selection.
+
+ * glib/poppler-document.cc (poppler_document_new_from_file):
+ * glib/poppler-page.cc (_poppler_page_new): Add extra NULL to
+ g_object_new() constructor to silence gcc warning about missing
+ sentinel.
+
+ ChangeLog | 16 +++++
+ glib/poppler-document.cc | 2 +-
+ glib/poppler-page.cc | 31 ++++-----
+ poppler/TextOutputDev.cc | 164 ++++++++++++++++++++++++++++++++++-----------
+ poppler/TextOutputDev.h | 8 ++
+ 5 files changed, 164 insertions(+), 57 deletions(-)
+
+commit ad312dbded4e8f70c3a2eac9a0964fa00ecb6b2c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 28 22:56:17 2005 +0000
+
+ Fix memory leaks in PageLabelInfo.cc
+
+ ChangeLog | 4 ++++
+ poppler/PageLabelInfo.cc | 11 +++++++++++
+ poppler/PageLabelInfo.h | 2 ++
+ 3 files changed, 17 insertions(+), 0 deletions(-)
+
+commit b45ad9f3409d7b1ed147135a70553e5255913c61
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 28 20:53:36 2005 +0000
+
+ - delete family;
+ + delete[] family;
+ as family is new[]'ed
+
+ When assigning family if the font had "the proper info" and family had to be deleted, do it.
+
+ poppler/GlobalParams.cc | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit f93dfc5c5133e0b1bd9f4786cfe18bd796cbac2a
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 28 18:51:17 2005 +0000
+
+ Remove the debugging
+
+ poppler/GlobalParams.cc | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 8022315004e1623c0be320f7671fcd72c15c0de3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 28 18:37:17 2005 +0000
+
+ Wonder how that slipped here
+
+ poppler/GlobalParams.cc | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 82638babe89e402c0348619ec3205059b977c7e9
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 28 17:34:19 2005 +0000
+
+ Fontconfig patch is here, rejoice
+
+ ChangeLog | 15 ++-
+ glib/poppler-document.cc | 1 -
+ poppler/CairoFontEngine.cc | 95 +---------
+ poppler/CairoFontEngine.h | 2 -
+ poppler/CairoOutputDev.cc | 4 -
+ poppler/GlobalParams.cc | 473 ++++++++++++++++++++-----------------------
+ poppler/GlobalParams.h | 17 +--
+ poppler/SplashOutputDev.cc | 132 +------------
+ poppler/SplashOutputDev.h | 3 -
+ qt/poppler-document.cc | 1 -
+ qt4/src/poppler-document.cc | 1 -
+ test/gtk-cairo-test.cc | 1 -
+ test/gtk-splash-test.cc | 1 -
+ 13 files changed, 241 insertions(+), 505 deletions(-)
+
+commit e9015531b1d0e5f2c8d8ca2bc50d5f14aaf954bc
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jul 28 06:31:57 2005 +0000
+
+ 2005-07-28 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/poppler-config.h.in: Add GCC_PRINTF_FORMAT macro to
+ annotate printf-like functions (#3638).
+
+ * poppler/Error.h: Add GCC_PRINTF_FORMAT to error().
+
+ * poppler/PSOutputDev.h: Add GCC_PRINTF_FORMAT to
+ PSOutputDev::writePSFmt().
+
+ * poppler/PSOutputDev.cc, poppler/GlobalParams.cc: Quiet new
+ printf warnings.
+
+ ChangeLog | 11 +++++++++++
+ poppler/Error.h | 2 +-
+ poppler/GlobalParams.cc | 3 ++-
+ poppler/PSOutputDev.cc | 3 +--
+ poppler/PSOutputDev.h | 2 +-
+ poppler/TextOutputDev.cc | 13 ++++++++++++-
+ poppler/poppler-config.h.in | 12 ++++++++++++
+ 7 files changed, 40 insertions(+), 6 deletions(-)
+
+commit 9df89c495683e229b771b3d008ed25d478465c35
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jul 28 05:52:43 2005 +0000
+
+ 2005-07-28 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.cc (TextBlock::visitSelection): Assign
+ start and stop coordinates in one place so we don't assign the
+ same point to both in some corner cases.
+ (TextWord::visitSelection): Initialize begin to len, not len + 1
+ to fix crash.
+
+ (TextWord::visitSelection, TextLine::visitSelection): Change
+ selection trigger; now midpoint of glyph must be included in
+ selection area for glyph to be in selection.
+
+ ChangeLog | 12 +++++
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/TextOutputDev.cc | 113 +++++++++++++++++++++-----------------------
+ 3 files changed, 67 insertions(+), 60 deletions(-)
+
+commit a3d9b5849cedf1316c6fc5859872e957f3f7b593
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Wed Jul 27 19:21:08 2005 +0000
+
+ * poppler/PSOutputDev.cc (PSOutputDev): change the constructor to
+ take paper size and duplex setting parameters.
+ (init): add paper size and duplex parameters.
+ (writeDocSetup): add duplex parameter.
+
+ * poppler/PSOutputDev.h: update declarations.
+
+ * glib/poppler-private.h (struct _PopplerPSFile): store necessary
+ information to eventually construct a PSOutputDev.
+
+ * glib/poppler-page.cc (poppler_page_render_to_ps): initialize the
+ output dev if it doesn't exist yet.
+
+ * glib/poppler-document.cc (poppler_ps_file_new): don't create the
+ PSOutputDev here, just store filename and page range.
+ (poppler_ps_file_set_paper_size, poppler_ps_file_set_duplex): new
+ functions.
+ (poppler_ps_file_free): free the filename which we strdup now.
+
+ * glib/poppler-document.h: add prototypes.
+
+ ChangeLog | 23 +++++++++++++++++++++
+ glib/poppler-document.cc | 49 +++++++++++++++++++++++++++++++++++++++------
+ glib/poppler-document.h | 15 +++++++++----
+ glib/poppler-page.cc | 10 +++++++++
+ glib/poppler-private.h | 6 +++++
+ poppler/PSOutputDev.cc | 23 +++++++++++++--------
+ poppler/PSOutputDev.h | 9 ++++++-
+ 7 files changed, 112 insertions(+), 23 deletions(-)
+
+commit 7be920ecf13698c3cf4ab8df09c8c67f1a04bfa2
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 26 21:52:09 2005 +0000
+
+ Fix mem leak in qt test app
+
+ ChangeLog | 4 ++++
+ qt/test-poppler-qt.cpp | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 2bc26dffd9f296799617d319055648c20f748c8a
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Jul 26 20:34:13 2005 +0000
+
+ 2005-07-26 Kristian Høgsberg <krh@redhat.com>
+
+ * fofi/FoFiType1.cc: Make check for end of encoding array a bit
+ more liberal so we don't crash on complex encoding arrays (#3344).
+
+ ChangeLog | 5 +++++
+ fofi/FoFiType1.cc | 21 +++++++--------------
+ 2 files changed, 12 insertions(+), 14 deletions(-)
+
+commit 07911274e4e850a628b1e587cafc2a73c05f93fe
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jul 25 20:40:37 2005 +0000
+
+ Work on bad jpeg data that have garbage before the start marker. Fixes bug #3299
+
+ ChangeLog | 5 +++++
+ poppler/DCTStream.cc | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 43 insertions(+), 0 deletions(-)
+
+commit a1869eca39172fcb42f036a5846b19548be53568
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 22 11:01:25 2005 +0000
+
+ Fix bug #3586
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 2 ++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 95529b41272484f08fb54393e1886bf7ff3e02c8
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 22 10:45:19 2005 +0000
+
+ Make it possible to browse pages in test-poppler-qt
+
+ ChangeLog | 13 ++++++++---
+ qt/test-poppler-qt.cpp | 49 +++++++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 49 insertions(+), 13 deletions(-)
+
+commit 2d52650864eab0e9385ed1fe8fb594daac9d8322
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Fri Jul 22 10:35:56 2005 +0000
+
+ * glib/poppler-document.cc (poppler_fonts_iter_get_name): if the
+ font is a subset, strip the ABCDEF+ tag.
+ (poppler_fonts_iter_get_full_name): does what the old get_name did.
+ (poppler_fonts_iter_get_font_type, poppler_fonts_iter_is_embedded)
+ (poppler_fonts_iter_is_subset): new wrappers.
+
+ * glib/poppler-document.h (PopplerFontType): new enum.
+ Update prototypes.
+
+ ChangeLog | 11 +++++++++
+ glib/poppler-document.cc | 54 +++++++++++++++++++++++++++++++++++++++++++++-
+ glib/poppler-document.h | 38 +++++++++++++++++++++++---------
+ 3 files changed, 91 insertions(+), 12 deletions(-)
+
+commit 43bed4aafcf1d291dc96fa5070efbd7936a6122f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 22 10:33:54 2005 +0000
+
+ Fix bugs #3728 and #3750
+
+ ChangeLog | 4 ++++
+ splash/Splash.cc | 10 ++++++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit c7bcef87493d354a077dd223d76f86640acc0ce3
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Fri Jul 15 19:55:30 2005 +0000
+
+ update for 2005-06-27 change to actually display something again.
+
+ ChangeLog | 5 +++++
+ test/gtk-cairo-test.cc | 10 ++++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 6623711d2d50dc52454904ee16b25337f0aab130
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Sun Jul 10 09:34:03 2005 +0000
+
+ A general cleanup of the Arthur output renderer.
+
+ ChangeLog | 5 ++
+ poppler/ArthurOutputDev.cc | 105 +++++++++++++++-----------------------------
+ 2 files changed, 41 insertions(+), 69 deletions(-)
+
+commit ea1cc9a7b12db9c44b89896c41d07e3ba932d054
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jul 8 04:59:41 2005 +0000
+
+ 2005-07-08 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_set_selection_alpha): Add
+ this function to initialize the alpha channel when using the
+ splash backend.
+
+ * poppler/TextOutputDev.cc (visitLine): Add missing scaling of
+ intra-line selection edges.
+
+ ChangeLog | 9 +++++++
+ glib/poppler-page.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/TextOutputDev.cc | 17 +++++++-----
+ 3 files changed, 77 insertions(+), 8 deletions(-)
+
+commit 1cd915397c9532ed80b4f905b6ed9c0126aa38f2
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Thu Jul 7 21:15:09 2005 +0000
+
+ Add support for page layout to the Qt4 bindings, plus
+ test cases.
+
+ ChangeLog | 8 ++++++++
+ qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 26 ++++++++++++++++++++++++--
+ qt4/tests/Makefile.am | 10 +++++++++-
+ qt4/tests/check_pagelayout_none.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_pagelayout_single.cpp | 22 ++++++++++++++++++++++
+ 6 files changed, 107 insertions(+), 3 deletions(-)
+
+commit 4e050aef7ba132900f84205be221fd48808848c3
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jul 7 17:19:36 2005 +0000
+
+ 2005-07-07 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_prepare_output_dev): Account
+ for page rotation when creating the cairo surface.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 17 +++++++++++++++--
+ 2 files changed, 20 insertions(+), 2 deletions(-)
+
+commit 2eeab0b8afeb4897806df2de6e496889c25dda5e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jul 7 15:58:43 2005 +0000
+
+ 2005-07-06 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Add out of
+ bounds checking (from Marco).
+
+ ChangeLog | 6 +++++-
+ glib/poppler-page.cc | 5 +++++
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit b1015f6bdbd93b2a2574a9f0e0e1cd7dbae9af78
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Thu Jul 7 11:13:24 2005 +0000
+
+ At least try to fix glib issues. If you care about glib,
+ then you should review this.
+
+ ChangeLog | 4 ++++
+ glib/poppler-document.cc | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 8bf787031e7a2e93b4e1202918bd1aee86675082
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Thu Jul 7 11:04:08 2005 +0000
+
+ Update for page mode - new mode from PDF-1.6, API docs fixes
+ and some tests.
+
+ ChangeLog | 15 +++++++++++++++
+ poppler/Catalog.cc | 2 ++
+ poppler/Catalog.h | 3 ++-
+ qt4/src/poppler-document.cc | 2 ++
+ qt4/src/poppler-qt4.h | 14 +++++++++-----
+ qt4/tests/Makefile.am | 22 +++++++++++++++++++++-
+ qt4/tests/check_pagemode_attach.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_pagemode_fullscreen.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_pagemode_none.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_pagemode_oc.cpp | 22 ++++++++++++++++++++++
+ qt4/tests/check_pagemode_thumbs.cpp | 22 ++++++++++++++++++++++
+ 11 files changed, 161 insertions(+), 7 deletions(-)
+
+commit 695e27fb4d6fcc3466e2c9c95b4f02821b07e823
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Thu Jul 7 11:01:27 2005 +0000
+
+ Suppress noise from new test files.
+
+ qt4/tests/.cvsignore | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 8a8d57bdcf11ed2903913d938b9711053b9bb9f1
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 6 17:12:36 2005 +0000
+
+ Extract family, stretch and weight from the font descriptor
+
+ ChangeLog | 2 ++
+ poppler/GfxFont.cc | 41 +++++++++++++++++++++++++++++++++++++++++
+ poppler/GfxFont.h | 36 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 79 insertions(+), 0 deletions(-)
+
+commit 3a1646c2f776f5a07b0e830fcb8e1b0a80efb41c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 6 13:29:00 2005 +0000
+
+ Add checkFooter to check the document ends with %%EOF
+
+ ChangeLog | 5 +++++
+ poppler/PDFDoc.cc | 28 ++++++++++++++++++++++++++++
+ poppler/PDFDoc.h | 1 +
+ 3 files changed, 34 insertions(+), 0 deletions(-)
+
+commit 377c023d31cf74d8240aa5be9dba8e3838459a8c
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Jul 6 11:15:16 2005 +0000
+
+ Add unit tests for the isLinearized() property.
+
+ ChangeLog | 4 ++++
+ qt4/tests/Makefile.am | 6 +++++-
+ qt4/tests/check_linearised.cpp | 23 +++++++++++++++++++++++
+ 3 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 5fa869887a840a585340993718df0841010666cf
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Jul 6 09:52:30 2005 +0000
+
+ Remove boolean for unicode table lookup from Font
+
+ ChangeLog | 14 ++++++++++++++
+ qt4/src/poppler-document.cc | 2 --
+ qt4/src/poppler-qt4.h | 14 +-------------
+ qt4/tests/poppler-fonts.cpp | 16 +++++++---------
+ 4 files changed, 22 insertions(+), 24 deletions(-)
+
+commit 40469c5883e17e734f3d54872c59e76b95bc0f95
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Wed Jul 6 09:00:39 2005 +0000
+
+ Update to reflect recent changes.
+
+ qt4/tests/.cvsignore | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 6cea437208f913085a6a8c7183b0826a107cefb5
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 5 21:15:48 2005 +0000
+
+ Don't crash with files that have fonts with no name
+
+ ChangeLog | 7 +++++++
+ qt4/src/poppler-document.cc | 13 ++++++++++---
+ qt4/src/poppler-qt4.h | 2 +-
+ 3 files changed, 18 insertions(+), 4 deletions(-)
+
+commit 1323c74479848f5b87a3a13fa26e8b9e096e9f6a
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Jul 5 12:31:59 2005 +0000
+
+ Check in a couple more test apps
+
+ qt4/tests/Makefile.am | 10 ++++++-
+ qt4/tests/check_author.cpp | 25 ++++++++++++++++
+ qt4/tests/check_permissions.cpp | 59 +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 93 insertions(+), 1 deletions(-)
+
+commit 839a798ec3725427185de5a48c58ac448596b25d
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Jul 5 12:25:00 2005 +0000
+
+ Add Qt4 bindings for new user permission properties.
+
+ ChangeLog | 4 +++
+ qt4/src/poppler-document.cc | 25 +++++++++++++++++++++
+ qt4/src/poppler-qt4.h | 51 ++++++++++++++++++++++++++++++++++++++----
+ 3 files changed, 75 insertions(+), 5 deletions(-)
+
+commit e10f6990d3339e3a7adeaa50b1754cf7ecf82f87
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Jul 5 12:15:04 2005 +0000
+
+ Add some more user permissions properties - high resolution
+ printing, document assembly, extraction for accessibility
+ and form completion.
+
+ ChangeLog | 8 +++++++
+ poppler/PDFDoc.h | 9 ++++++++
+ poppler/XRef.cc | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++---
+ poppler/XRef.h | 4 +++
+ 4 files changed, 72 insertions(+), 4 deletions(-)
+
+commit 3a8e1ba03cdec6412dd0b79f0cc59a4cd97dd4e7
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 11:38:22 2005 +0000
+
+ A couple more little changes.
+
+ ChangeLog | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit a44bd0b45bb89f29ddca5d0e8986a8de50f9db39
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 11:37:21 2005 +0000
+
+ Change path to sample file to point to test module
+
+ qt4/tests/check_orientation.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2a7079087c35651c242d3843c94703a3199e61ca
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 11:36:13 2005 +0000
+
+ Fix typo causing failure to pick up upside down pages.
+
+ qt4/src/poppler-page.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 529a548044ae721a414c5b8e768c0498b1e6830b
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 08:30:29 2005 +0000
+
+ Update to reflect recent changes
+
+ ChangeLog | 30 +++++++++++++++++++++++++++++-
+ qt4/tests/.cvsignore | 2 ++
+ 2 files changed, 31 insertions(+), 1 deletions(-)
+
+commit 08cca4670f8ae65333beacda85834112e76489d1
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 08:21:27 2005 +0000
+
+ Add in a simple demo/test application, similar to the pdffonts
+ application in xpdf.
+
+ qt4/tests/Makefile.am | 9 ++++-
+ qt4/tests/poppler-fonts.cpp | 76 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 84 insertions(+), 1 deletions(-)
+
+commit 52af89d8303b50c45d5e4584d19ec8b7d7ebcf9b
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 08:18:52 2005 +0000
+
+ Update to reflect changes to rendering API.
+
+ qt4/tests/stress-poppler-qt4.cpp | 4 ++--
+ qt4/tests/test-poppler-qt4.cpp | 3 ++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit d42998d0fc32b1e21a2aeef1311e0baf508ade3f
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 08:16:17 2005 +0000
+
+ Qt4 update.
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-document.cc complete Qt4 font metadata handling
+
+ * qt4/src/poppler-qt4.h:
+ * qt4/src/poppler-page.cc: change the render API to make it more
+ Qt-like.
+
+ qt4/src/poppler-document.cc | 7 +++-
+ qt4/src/poppler-page.cc | 5 +--
+ qt4/src/poppler-qt4.h | 73 ++++++++++++++++++++++++++++++++++++++++--
+ 3 files changed, 77 insertions(+), 8 deletions(-)
+
+commit 5d194b926d1ed642ed4bbd3304befa073d389cd4
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 08:10:16 2005 +0000
+
+ Change FontInfo::type() to return an enumerated value,
+ rather than a GooString.
+
+ poppler/FontInfo.cc | 16 ++--------------
+ poppler/FontInfo.h | 16 +++++++++++++---
+ 2 files changed, 15 insertions(+), 17 deletions(-)
+
+commit 1303020b2e97bc110ccf045cd2811daf59ec72ce
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Mon Jul 4 07:42:32 2005 +0000
+
+ Fix up the unit test, now that I have a real sample
+ file.
+
+ qt4/tests/check_orientation.cpp | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 96fc0ea3fc6c9c7d933e9e0c02a622b2aeef7617
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jul 1 04:57:49 2005 +0000
+
+ 2005-07-01 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.cc: Make selection also work when dragging
+ backwards in the text flow. Currently this is a big pile of
+ if-statements, and there is certainly room for improvement.
+
+ ChangeLog | 6 ++
+ poppler/TextOutputDev.cc | 129 +++++++++++++++++++++++++++++++++++++---------
+ 2 files changed, 111 insertions(+), 24 deletions(-)
+
+commit 06c49c496f28aba608101adcecd8cec34937ac78
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jun 30 19:44:33 2005 +0000
+
+ 2005-06-30 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.h: * glib/poppler-page.cc
+ (poppler_page_copy_to_pixbuf): Fix splash compilation (patch from
+ Marco).
+ (poppler_page_render_to_pixbuf): Drop dest_x and dest_y
+ coordinates from this function. This functionality can be
+ achieved using a sub-GdkPixbuf.
+
+ * glib/test-poppler-glib.c (main): Update test case.
+
+ ChangeLog | 11 +++++++++++
+ NEWS | 6 ++++++
+ glib/poppler-page.cc | 27 ++++++++++-----------------
+ glib/poppler-page.h | 4 +---
+ glib/test-poppler-glib.c | 2 +-
+ 5 files changed, 29 insertions(+), 21 deletions(-)
+
+commit b126785aeda6b5576a13fc3f3853b027bd7dd306
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jun 30 00:36:01 2005 +0000
+
+ 2005-06-29 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-private.h: Move TextOutputDev.h include here from
+ poppler-page.cc
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 1 -
+ glib/poppler-private.h | 1 +
+ 3 files changed, 6 insertions(+), 1 deletions(-)
+
+commit b15a8caf003d7d0631d4f78db5ab54e55a5a000a
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Jun 29 21:24:48 2005 +0000
+
+ 2005-06-29 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h:
+ * poppler/Page.cc:
+ * poppler/Page.h:
+ * poppler/TextOutputDev.cc:
+ * poppler/TextOutputDev.h: Add support for rendering real
+ selection (based on text flow).
+
+ ChangeLog | 20 ++-
+ configure.ac | 4 +-
+ glib/poppler-page.cc | 224 +++++++++++++++++++------
+ glib/poppler-page.h | 65 ++++---
+ glib/poppler-private.h | 3 +
+ poppler/CairoOutputDev.cc | 13 +-
+ poppler/CairoOutputDev.h | 2 +-
+ poppler/Page.cc | 59 +++++--
+ poppler/Page.h | 12 ++
+ poppler/TextOutputDev.cc | 414 ++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/TextOutputDev.h | 38 ++++-
+ 11 files changed, 743 insertions(+), 111 deletions(-)
+
+commit 3b5e20465e482eb0e75a106697ee94d60aea2fdc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 28 22:51:29 2005 +0000
+
+ Forgot assigning type on copy constructor
+
+ poppler/FontInfo.cc | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e512cd1832a0e6d15149e12e8e67a39d335efc86
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 28 22:49:14 2005 +0000
+
+ Add FontInfo::getType()
+
+ ChangeLog | 3 +++
+ poppler/FontInfo.cc | 4 ++++
+ poppler/FontInfo.h | 2 ++
+ 3 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 8aeb5205f2876a9dc36eb1dc1e361bb87adf4e31
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 28 22:00:05 2005 +0000
+
+ use transformation matrix for image rendering in Arthur backend
+
+ ChangeLog | 4 ++++
+ poppler/ArthurOutputDev.cc | 12 +++++++-----
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+commit a221d06fdc7b0688ca0744a1d6ad49d472c7f12c
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Jun 28 10:59:14 2005 +0000
+
+ Reduce cvs up noise
+
+ .cvsignore | 1 +
+ ChangeLog | 7 +++++++
+ qt4/.cvsignore | 3 +++
+ qt4/src/.cvsignore | 7 +++++++
+ qt4/tests/.cvsignore | 8 ++++++++
+ 5 files changed, 26 insertions(+), 0 deletions(-)
+
+commit ea58a20bbcf450a1ecb8fe00e8162cfdf76105f1
+Author: Brad Hards <bradh@frogmouth.net>
+Date: Tue Jun 28 10:00:09 2005 +0000
+
+ Initial import of Qt4 bindings, and for a Qt4 "Arthur" (QPainter)
+ backend renderer.
+
+ The bindings are currently unstable - you can expect substantial change
+ in both source and binary interfaces.
+
+ The Arthur renderer currently does a reasonable job of rendering path
+ and fill, but the image rendering doesn't work (for reasons that aren't
+ clear to me) and text rendering doesn't use the right glyphs - it just
+ draws with the current font. There is a lot of work to do on this
+ too. Help is, of coure, welcome.
+
+ ChangeLog | 12 +
+ Makefile.am | 10 +-
+ configure.ac | 94 +++-
+ poppler-qt4.pc.in | 12 +
+ poppler/ArthurOutputDev.cc | 604 +++++++++++++++++++
+ poppler/ArthurOutputDev.h | 133 +++++
+ poppler/Makefile.am | 20 +
+ qt4/Makefile.am | 1 +
+ qt4/src/Doxyfile | 1212 ++++++++++++++++++++++++++++++++++++++
+ qt4/src/Makefile.am | 22 +
+ qt4/src/poppler-document.cc | 309 ++++++++++
+ qt4/src/poppler-page.cc | 170 ++++++
+ qt4/src/poppler-private.h | 36 ++
+ qt4/src/poppler-qt4.h | 286 +++++++++
+ qt4/tests/Makefile.am | 34 ++
+ qt4/tests/check_orientation.cpp | 40 ++
+ qt4/tests/stress-poppler-qt4.cpp | 70 +++
+ qt4/tests/test-poppler-qt4.cpp | 121 ++++
+ 18 files changed, 3183 insertions(+), 3 deletions(-)
+
+commit 61e9bc76eb2fcb0b4b899ebfad1cc71c59fc8274
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Jun 28 03:44:12 2005 +0000
+
+ 2005-06-27 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Change CairoOutputDev to render to a
+ given surface and let the user create that surface.
+
+ * glib/poppler-document.cc:
+ * glib/poppler-page.cc:
+ * glib/poppler-private.h: Create the cairo image surface here
+ instead and pass it to the CairoOutputDev for rendering.
+
+ * poppler/CairoOutputDevImage.cc:
+ * poppler/CairoOutputDevImage.h:
+ * poppler/CairoOutputDevX.cc:
+ * poppler/CairoOutputDevX.h:
+ * poppler/Makefile.am: Remove specialized cairo output devices.
+
+ ChangeLog | 17 +++
+ glib/poppler-document.cc | 2 +-
+ glib/poppler-page.cc | 21 +++-
+ glib/poppler-private.h | 4 +-
+ poppler/CairoOutputDev.cc | 24 ++---
+ poppler/CairoOutputDev.h | 8 +-
+ poppler/CairoOutputDevImage.cc | 80 ---------------
+ poppler/CairoOutputDevImage.h | 44 --------
+ poppler/CairoOutputDevX.cc | 216 ----------------------------------------
+ poppler/CairoOutputDevX.h | 117 ----------------------
+ poppler/Makefile.am | 8 +-
+ 11 files changed, 54 insertions(+), 487 deletions(-)
+
+commit 8079dce3f0ed91dd531465f45c6d3c568ab4ecd1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 27 01:04:32 2005 +0000
+
+ 2005-06-26 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDev.h: Switch back to using drawChar() for
+ text, but utilize the beginString() and endString() hooks so we
+ can use cairo_show_glyphs() efficiently.
+
+ ChangeLog | 7 +++
+ poppler/CairoOutputDev.cc | 107 +++++++++++++--------------------------------
+ poppler/CairoOutputDev.h | 12 ++++-
+ 3 files changed, 48 insertions(+), 78 deletions(-)
+
+commit 1aa48d6b7907a1d53830f0cf28085041f685368d
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 26 23:35:26 2005 +0000
+
+ Add PageTransition class and PageTransition* Page::getTransition() const; to the qt frontend. Code almost 100% copied from xpdf code inside kpdf
+
+ ChangeLog | 5 ++
+ qt/poppler-page.cc | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ qt/poppler-qt.h | 78 +++++++++++++++++++++++++++++++++
+ 3 files changed, 204 insertions(+), 0 deletions(-)
+
+commit 9d4327eecd94299a3629b0814e84f981a4be1dfb
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Sun Jun 26 15:54:16 2005 +0000
+
+ add poppler-enums.[ch].
+
+ ChangeLog | 2 ++
+ glib/.cvsignore | 8 +++++---
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 768186514b9fc175cf330344408bb89ab4c909f3
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Sun Jun 26 11:40:35 2005 +0000
+
+ require glib 2.4+ for g_value_take_string and G_DEFINE_TYPE.
+
+ ChangeLog | 5 +++++
+ configure.ac | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 5d40e34a367212c39af06332879f26824d6d62d2
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Jun 26 00:01:39 2005 +0000
+
+ 2005-06-25 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Error.h: Maybe fix build on Solaris.
+
+ ChangeLog | 4 ++++
+ poppler/Error.h | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit c2780a3b3f4615bb28bfe394d649b388db4ccf4d
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 20 21:33:09 2005 +0000
+
+ 2005-06-20 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS:
+ * configure.ac: Bump version to 0.3.3 and sum up changes since
+ last release.
+
+ * glib/poppler-page.cc (poppler_page_find_text): Initialize xMin
+ and yMin to avoid referencing unintialized memory (#3582).
+
+ ChangeLog | 9 +++++++++
+ NEWS | 10 ++++++++++
+ configure.ac | 2 +-
+ glib/poppler-page.cc | 2 ++
+ 4 files changed, 22 insertions(+), 1 deletions(-)
+
+commit 9023891f314ac37811b5c973be2e36b6de353cf2
+Author: Martin Kretzschmar <martink@gnome.org>
+Date: Mon Jun 20 18:45:41 2005 +0000
+
+ (info_dict_get_string): convert from PDFDocEncoding to UTF-8.
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 16 +++++++++++++++-
+ 2 files changed, 20 insertions(+), 1 deletions(-)
+
+commit bbf2fe757f0fd08d0e90e3810709ab7152c779c0
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 20 17:58:38 2005 +0000
+
+ 2005-06-20 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.h: Clean up glib rotation implementation and add a
+ getter for rotation. Patch from Marco.
+
+ ChangeLog | 7 +++++
+ glib/poppler-page.cc | 69 ++++++++++++++++++++++++++++---------------------
+ glib/poppler-page.h | 57 +++++++++++++++++++++--------------------
+ glib/poppler.h | 1 -
+ 4 files changed, 75 insertions(+), 59 deletions(-)
+
+commit c264d8a9f84587cd0f2ef67683a01fc8dd9395af
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 20 17:38:27 2005 +0000
+
+ 2005-06-20 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+ * poppler/FontInfo.cc: Fixes from Marco to handle fonts without
+ name (typically type 3 fonts) and fix an iterator bug.
+
+ ChangeLog | 6 ++++++
+ glib/poppler-document.cc | 8 +++++++-
+ poppler/FontInfo.cc | 13 ++++++++++---
+ 3 files changed, 23 insertions(+), 4 deletions(-)
+
+commit 4746e63a793a2881e904ac54d58b7d3e48b07dcf
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 20 17:22:35 2005 +0000
+
+ 2005-06-20 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_get_link_mapping): Adjust
+ link coordinates so they're relative to bounding box lower left
+ corner (#3396).
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 6 ++++++
+ 2 files changed, 12 insertions(+), 0 deletions(-)
+
+commit bada3d03583ef6ed34d2aa743de8fd9ca4a5c748
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Jun 17 05:30:56 2005 +0000
+
+ 2005-06-17 Kristian Høgsberg <krh@redhat.com>
+
+ * autogen.sh: Patch from Emil Soleyman-Zomalan to enable checks
+ for automake >= 1.7 (#3554).
+
+ ChangeLog | 5 +++
+ autogen.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 109 insertions(+), 0 deletions(-)
+
+commit 25db42831ddde500697126352458e092a9b0ab9b
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Jun 15 15:02:46 2005 +0000
+
+ 2005-06-15 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h: Patch from Marco to get initial status
+ (open or closed) for bookmark subtrees.
+ -----------------------------------------------------------
+
+ ChangeLog | 6 ++++++
+ glib/poppler-document.cc | 9 +++++++++
+ glib/poppler-document.h | 1 +
+ 3 files changed, 16 insertions(+), 0 deletions(-)
+
+commit e54e306ac5d603001fefda3b9ecd81821e4bd09e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 13 17:18:32 2005 +0000
+
+ Forgot to add new files.
+
+ poppler/FontInfo.cc | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/FontInfo.h | 51 +++++++++++++
+ 2 files changed, 248 insertions(+), 0 deletions(-)
+
+commit 23e8ed5cbf4d7d999a8a1dcf714aaddaf339ceff
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Jun 13 16:09:33 2005 +0000
+
+ 2005-06-13 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c:
+ * poppler/Makefile.am: Patch from Marco to extract font info from
+ document.
+
+ ChangeLog | 10 ++++
+ glib/poppler-document.cc | 131 ++++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-document.h | 13 +++++
+ glib/poppler-private.h | 7 +++
+ glib/poppler.h | 2 +
+ glib/test-poppler-glib.c | 14 +++++
+ poppler/Makefile.am | 2 +
+ 7 files changed, 179 insertions(+), 0 deletions(-)
+
+commit fbb86d2983a28ad2c46b8c5d475a2df1f0f0e4b9
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Jun 8 14:35:46 2005 +0000
+
+ 2005-06-08 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc: Remember to delete tmpFileName.
+ Patch from Nikolai Weibull (#3491).
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 37 +++++++++++++++++++------------------
+ 2 files changed, 24 insertions(+), 18 deletions(-)
+
+commit 699b03025c1d38a42a49e39017097c5d0315fd6f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Jun 7 20:25:48 2005 +0000
+
+ 2005-06-07 Kristian Høgsberg <krh@redhat.com>
+
+ * qt/test-poppler-qt.cpp: Add stdlib.h include for exit().
+
+ ChangeLog | 4 ++++
+ qt/test-poppler-qt.cpp | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 0017b1a72c58e2d016d22451079c466abdfff15c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jun 2 19:14:45 2005 +0000
+
+ 2005-06-02 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/TextOutputDev.h:
+ * qt/poppler-qt.h: Patch from Stanislav Brabec <sbrabec@suse.cz>
+ to fix gcc 4.0.1 warnings on undeclared friend classes.
+
+ * test/gtk-splash-test.cc: Fix from Martin Kretzschmar
+ <martink@gnome.org> to compile with OPI enabled (#2911).
+
+ ChangeLog | 9 +++++++++
+ poppler/TextOutputDev.h | 3 +++
+ qt/poppler-qt.h | 2 ++
+ test/gtk-splash-test.cc | 2 +-
+ 4 files changed, 15 insertions(+), 1 deletions(-)
+
+commit 47c3b4ec2c7691e44f5100b1f5956df0005467c8
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Jun 2 18:49:55 2005 +0000
+
+ 2005-06-02 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Stanislav Brabec <sbrabec@suse.cz>:
+
+ * configure.ac:
+ * poppler-cairo.pc.in:
+ * poppler-glib.pc.in:
+ * poppler-qt.pc.in:
+ * poppler-splash.pc.in: Misc fixes to pkg-config files.
+
+ ChangeLog | 10 ++++++++++
+ configure.ac | 6 ++++--
+ poppler-cairo.pc.in | 3 +--
+ poppler-glib.pc.in | 4 ++--
+ poppler-qt.pc.in | 1 +
+ poppler-splash.pc.in | 3 +--
+ 6 files changed, 19 insertions(+), 8 deletions(-)
+
+commit 9f0da96dd005defd5d82dd05b627ff1925430215
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Jun 2 00:35:44 2005 +0000
+
+ 2005-06-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * poppler/Error.cc:
+ * poppler/Error.h: Make error handling function setable through
+ setErrorFunction.
+
+ Based on a patch by Albert Astals Cid.
+
+ ChangeLog | 8 ++++++++
+ poppler/Error.cc | 29 ++++++++++++++++++++---------
+ poppler/Error.h | 2 ++
+ 3 files changed, 30 insertions(+), 9 deletions(-)
+
+commit f688aa11d066f1c6f4115cbdb604ac61fb8b5146
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun May 29 14:59:34 2005 +0000
+
+ 2005-05-29 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/*: Add more meta data properties to poppler document.
+ Patch by Emil Soleyman-Zomalan (#3359).
+
+ ChangeLog | 5 ++
+ glib/poppler-document.cc | 155 +++++++++++++++++++++++++++++++++++++++++++++-
+ glib/poppler.gidl | 5 ++
+ glib/test-poppler-glib.c | 46 ++++++++++----
+ 4 files changed, 194 insertions(+), 17 deletions(-)
+
+commit 9e6eeec574d48d2341ee620e16360d3b21c40103
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu May 26 13:03:35 2005 +0000
+
+ 2005-05-26 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc (clip): Remove snapToGrid so clip()
+ prototype matches what Gfx actually calls (fixes clipping).
+
+ * poppler/CairoOutputDev.cc: Update fill color, stroke color, fill
+ opacity and stroke opacity from GfxState on restore, since they
+ aren't handled by cairo_restore() (#3362).
+
+ * poppler/CairoOutputDev.cc: Comment out tolerance setting until
+ we figure out how cairo settings relate to pdf settings.
+
+ * poppler/CairoOutputDev.cc: Support fill and stroke opacity.
+
+ ChangeLog | 12 ++++++++++++
+ poppler/CairoOutputDev.cc | 41 ++++++++++++++++++++++++++++++-----------
+ poppler/CairoOutputDev.h | 6 +++++-
+ 3 files changed, 47 insertions(+), 12 deletions(-)
+
+commit 89a633edd860e3c6ded1e468edf6f28cfcb43d0e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu May 26 12:52:38 2005 +0000
+
+ 2005-05-26 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/GfxState.cc:
+ * poppler/GfxState.h: Add GfxColorSpace::getRGBLine here and
+ implement in subclasses.
+
+ * poppler/CairoOutputDev.cc (drawImage): Use getRGBLine here.
+
+ ChangeLog | 8 ++
+ poppler/CairoOutputDev.cc | 66 +++++++++----------
+ poppler/GfxState.cc | 160 ++++++++++++++++++++++++++++++++++++++++++++-
+ poppler/GfxState.h | 14 ++++
+ 4 files changed, 212 insertions(+), 36 deletions(-)
+
+commit 4d8224819da7a85e4d99f96c9bbb047ece58130a
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Mon May 23 04:23:53 2005 +0000
+
+ Mon May 23 00:22:41 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-document.h: Add a permissions flag to the glib
+ bindings.
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 24 ++++++++++++++++++++++++
+ glib/poppler-document.h | 16 +++++++++-------
+ 3 files changed, 38 insertions(+), 7 deletions(-)
+
+commit 1f677e2f60634a7d0c5e0e0d2125ab15c2722979
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat May 21 21:33:06 2005 +0000
+
+ 2005-05-21 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc (poppler_ps_file_new): Fix off-by-one
+ error spotted by Jürg Billeter.
+ -----------------------------------------------------
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 0bbf2f08173866cde9b097eeeb1f4218a396588d
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 20 20:48:52 2005 +0000
+
+ 2005-05-20 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc: Account for different row vs. column
+ vector conventions between cairo and poppler.
+
+ ChangeLog | 3 +++
+ poppler/CairoOutputDev.cc | 18 +++++++++---------
+ 2 files changed, 12 insertions(+), 9 deletions(-)
+
+commit da44ec7e8de58e55e55b1f780bc3f4bc8307874f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 20 18:38:10 2005 +0000
+
+ 2005-05-20 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc: Only get the code to gid map if
+ we're using freetype 2.1.7 or older (#3340).
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 13 ++++++++-----
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+commit 6fe29cf0a7e54b8d294471a0f94eb9e989ad1d7f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu May 19 05:18:04 2005 +0000
+
+ Add bugzilla number.
+
+ ChangeLog | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 42de1348622cf86a87bc22941bd48bffa943dac9
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu May 19 05:16:22 2005 +0000
+
+ 2005-05-19 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc: Only cast to Gfx8BitFont when we
+ know for sure we have a truetype font.
+ GfxCIDFont::getCIDToGIDLen() can return 0 in which case codeToGID
+ will be NULL, and we end up casting it to a Gfx8BitFont.
+
+ ChangeLog | 7 +++++++
+ poppler/CairoFontEngine.cc | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit afc05387c94a76ff0ed69b3f5d9a69ddd1448e83
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 18 17:39:59 2005 +0000
+
+ 2005-05-18 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Require cairo 0.5.0, bump release to 0.3.2.
+
+ * NEWS: Sum up latest changes.
+
+ * glib/poppler-document.cc (poppler_ps_file_new): Take a page
+ range here instead of just number of pages.
+
+ ChangeLog | 9 +++++++++
+ NEWS | 7 +++++++
+ configure.ac | 6 +++---
+ glib/poppler-document.cc | 15 ++++++++++-----
+ glib/poppler-document.h | 1 +
+ 5 files changed, 30 insertions(+), 8 deletions(-)
+
+commit 420134a194af9161282ccfe329d17adef8d325f2
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue May 17 23:38:27 2005 +0000
+
+ 2005-05-17 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDevX.cc:
+ * test/gtk-cairo-test.cc: Chase the cairo xlib constructor again.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDevX.cc | 5 +++--
+ test/gtk-cairo-test.cc | 5 +++--
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 6fd62953a910dcfb4abd9de5ea18285b8fa5d202
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 16 23:16:15 2005 +0000
+
+ Add bug number and attribution to ChangeLog entry.
+
+ ChangeLog | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 6d7f624c13e8a9a8251ac97388cd80e418c70250
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 16 21:56:31 2005 +0000
+
+ 2005-05-16 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Check for glib-mkenums.
+
+ * glib/Makefile.am (poppler-enums.h): Generate glib enums at
+ compile time.
+
+ * glib/poppler-enums.c:
+ * glib/poppler-enums.h: Removed.
+
+ ChangeLog | 8 ++
+ configure.ac | 3 +
+ glib/.cvsignore | 1 +
+ glib/Makefile.am | 67 ++++++++++++------
+ glib/poppler-enums.c | 189 --------------------------------------------------
+ glib/poppler-enums.h | 49 -------------
+ 6 files changed, 57 insertions(+), 260 deletions(-)
+
+commit 2801b54a944fc9e1072c5dcb9f1153a0c9f42de5
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 16 20:27:51 2005 +0000
+
+ 2005-05-16 Kristian Høgsberg <krh@redhat.com>
+
+ * test/gtk-cairo-test.cc: Update this test case also.
+
+ ChangeLog | 2 ++
+ test/gtk-cairo-test.cc | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 8753ae8ba20fcceaef3ef1dda89129f0456fccf6
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 16 19:06:00 2005 +0000
+
+ 2005-05-16 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDevX.cc: Track changes to cairo Xlib surface
+ constructors.
+
+ * poppler/CairoFontEngine.cc (cairo_font_face_destroy): Make this
+ static.
+
+ ChangeLog | 8 ++++++++
+ poppler/CairoFontEngine.cc | 2 +-
+ poppler/CairoOutputDevX.cc | 5 +++--
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 2e17106ef4711097104a561d5be49980f8b2f5ab
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Fri May 13 03:47:36 2005 +0000
+
+ whoops! commit the right file.
+
+ glib/poppler.gidl | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ glib/test.gidl | 23 ------
+ 2 files changed, 212 insertions(+), 23 deletions(-)
+
+commit 19b62e1c8ea8ce042ac089defe94f756dcaf194e
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Fri May 13 03:25:32 2005 +0000
+
+ Thu May 12 23:10:45 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler.gidl: add metadata file.
+
+ ChangeLog | 4 ++++
+ glib/test.gidl | 23 +++++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 0 deletions(-)
+
+commit bef5a548f3b21e7220079155e9b5054fb0c6c3c7
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu May 12 21:26:25 2005 +0000
+
+ 2005-05-12 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc:
+ * poppler/CairoOutputDevX.cc:
+ * poppler/CairoOutputDevImage.cc:
+ * test/gtk-cairo-test.cc: Update to latest cairo changes, patch
+ from Jens Taprogge (#3281)
+
+ ChangeLog | 8 ++++++++
+ poppler/CairoOutputDev.cc | 22 +++++++++++-----------
+ poppler/CairoOutputDevImage.cc | 11 ++++++-----
+ poppler/CairoOutputDevX.cc | 7 +++++--
+ test/gtk-cairo-test.cc | 8 +++++---
+ 5 files changed, 35 insertions(+), 21 deletions(-)
+
+commit c10ea2dd9bffaf9af023612ef196bab2b204d3e1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 11 20:01:43 2005 +0000
+
+ 2005-05-11 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler.cc (poppler_get_backend, poppler_get_version): Add
+ these functions so it's easy to tell if poppler is using cairo or
+ splash and what version.
+
+ * glib/test-poppler-glib.c (main): Print out version and backend.
+
+ ChangeLog | 8 ++++++++
+ glib/poppler-enums.c | 26 ++++++++++++++++++++++++++
+ glib/poppler-enums.h | 15 +++++++++++++++
+ glib/poppler.cc | 21 +++++++++++++++++++++
+ glib/poppler.h | 11 +++++++++++
+ glib/test-poppler-glib.c | 9 ++++++++-
+ 6 files changed, 89 insertions(+), 1 deletions(-)
+
+commit 7d189e33cfa68e722561e9398ad85a77b538ab14
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri May 6 16:38:57 2005 +0000
+
+ 2005-05-06 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/Makefile.am (libpoppler_glib_la_LIBADD): Link poppler-glib
+ against poppler.
+
+ * qt/Makefile.am (libpoppler_qt_la_LIBADD): Ditto for qt.
+
+ * poppler-glib.pc (Libs): Drop -lpoppler from link.
+
+ * poppler-qt.pc (Libs): Ditto for qt.
+
+ * configure.ac: Test for both libqt-mt.la and libqt-mt.so in that
+ order.
+
+ ChangeLog | 14 ++++++++++++++
+ configure.ac | 8 +++++++-
+ glib/Makefile.am | 1 +
+ poppler-glib.pc.in | 2 +-
+ poppler-qt.pc.in | 2 +-
+ qt/Makefile.am | 1 +
+ qt/test-poppler-qt.cpp | 1 +
+ 7 files changed, 26 insertions(+), 3 deletions(-)
+
+commit c937e63f17a096b94a554103476ecb9ab1b71b90
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 4 20:08:41 2005 +0000
+
+ 2005-05-04 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask,
+ CairoOutputDev::drawImage): Track cairo cvs API changes; use
+ cairo_mask() and cairo_paint() for drawing image masks and images.
+
+ ChangeLog | 6 +++
+ poppler/CairoOutputDev.cc | 98 +++++++++++++++++++++++---------------------
+ 2 files changed, 57 insertions(+), 47 deletions(-)
+
+commit c142773ad30b409d8169a53921e731305de46e50
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 4 19:28:07 2005 +0000
+
+ 2005-05-04 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoOutputDev.cc: Fix matrix convention confusion.
+
+ ChangeLog | 4 ++++
+ poppler/CairoOutputDev.cc | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 28760927d724231d0137ca7ecc66c6c2250dff0d
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed May 4 19:11:11 2005 +0000
+
+ 2005-05-04 Kristian Høgsberg <krh@redhat.com>
+
+ Patches from Albert Astals Cid:
+
+ * qt/poppler-page.cc (getText): Use QString::fromUtf8() instead of
+ implicit latin1 cast constructor.
+
+ * qt/test-poppler-qt.cpp (main): Use a QLabel for showing text
+ instead of qDebug.
+
+ ChangeLog | 10 ++++++++++
+ qt/poppler-page.cc | 5 ++---
+ qt/test-poppler-qt.cpp | 6 +++++-
+ 3 files changed, 17 insertions(+), 4 deletions(-)
+
+commit fd36522375bcf436639b8731acb3ad22c03c03f4
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed May 4 06:32:38 2005 +0000
+
+ Wed May 4 02:31:05 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-enums.c: (poppler_permissions_get_type):
+ * glib/poppler-enums.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.h:
+
+ Register a bunch of boxed types to test introspection, and for
+ LBs. Also, remove unused 'popper_document_save()' (-:
+
+ ChangeLog | 13 +++++++
+ glib/poppler-document.cc | 48 +++++++++++++++-----------
+ glib/poppler-document.h | 18 +++++++++-
+ glib/poppler-enums.c | 19 ++++++++++
+ glib/poppler-enums.h | 2 +
+ glib/poppler-page.cc | 83 ++++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-page.h | 36 ++++++++++++++------
+ glib/poppler.h | 12 ++++---
+ 8 files changed, 193 insertions(+), 38 deletions(-)
+
+commit 132647f8311c07b1f95ee4fca185e9774aae4913
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon May 2 05:39:11 2005 +0000
+
+ 2005-05-01 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc:
+ * poppler/CairoFontEngine.h:
+ * poppler/CairoOutputDev.cc: Back out workaround for cairo 0.4.0
+ font API and port to new cairo head.
+
+ ChangeLog | 7 ++++
+ configure.ac | 4 +-
+ poppler/CairoFontEngine.cc | 67 ++++++++++++++++------------------------
+ poppler/CairoFontEngine.h | 12 +++----
+ poppler/CairoOutputDev.cc | 39 ++++++++++++++---------
+ poppler/CairoOutputDevImage.cc | 2 +-
+ 6 files changed, 66 insertions(+), 65 deletions(-)
+
+commit 595c18c038f8dcef73fe58612fc8b93f891e65a1
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Mon May 2 00:44:26 2005 +0000
+
+ 2005-05-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * splash/SplashFTFont.cc (SplashFTFont::getGlyphPath):
+ Use FT_LOAD_NO_BITMAP to make sure we get outlines loaded instead
+ of bitmaps for use in FT_Outline_Decompose.
+
+ Patch from Albert Astals Cid.
+
+ ChangeLog | 8 ++++++++
+ splash/SplashFTFont.cc | 2 +-
+ 2 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 49d89ca0ed3986bec7468f6c0ed295e84ba67239
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun May 1 21:54:55 2005 +0000
+
+ 2005-05-01 Jeff Muizelaar <jeff@infidigm.net>
+
+ * goo/gmem.c: (gmalloc), (grealloc), (gfree):
+ * goo/gmem.h: make memory functions use size_t instead of int.
+
+ Patch from Takashi Iwai through Albert Astals Cid.
+
+ ChangeLog | 7 +++++++
+ goo/gmem.c | 10 +++++-----
+ goo/gmem.h | 4 ++--
+ 3 files changed, 14 insertions(+), 7 deletions(-)
+
+commit 14d618bece894e4c6bed0f179a8fda4db5a67c9d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Apr 30 19:53:57 2005 +0000
+
+ 2005-04-30 Jeff Muizelaar <jeff@infidigm.net>
+
+ * qt/poppler-document.cc (Document::unlock) :
+ * qt/poppler-qt.h (Document::unlock):
+ Add const to the password argument.
+
+ Patch from Albert Astals Cid.
+
+ ChangeLog | 8 ++++++++
+ qt/poppler-document.cc | 2 +-
+ qt/poppler-qt.h | 2 +-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+commit 1e66da32964cc76c6ed3773574f422b4608cb0e1
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Apr 30 17:31:47 2005 +0000
+
+ 2005-04-30 Jeff Muizelaar <jeff@infidigm.net>
+
+ * fofi/FoFiType1.cc (FoFiType1::parse):
+ Don't assume Encoding array of Type1 fonts end in "foo def".
+ http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF says
+ "This sequence of assignments must be followed by an instance of the
+ token def or readonly; such a token may not occur within the sequence
+ of assignments." so it must end with "readonly" "def" "readonly def"
+ (That is what most fonts are using and this is why it was not
+ crashing)
+
+ Patch from Albert Astals Cid.
+
+ ChangeLog | 13 +++++++++++++
+ fofi/FoFiType1.cc | 14 +++++++++++---
+ 2 files changed, 24 insertions(+), 3 deletions(-)
+
+commit 0b532db77ef41937dd5be30d15c96557d81eceb2
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Fri Apr 29 19:37:07 2005 +0000
+
+ Fri Apr 29 14:54:44 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * goo/GooTimer.h: New class to do simple timing checks.
+
+ * glib/poppler-document.c: Patch from Martin Kretzschmar to really
+ set the PDF version correct. Third time's the charm.
+
+ ChangeLog | 7 +++++
+ glib/poppler-document.cc | 4 ++-
+ goo/GooTimer.cc | 63 ++++++++++++++++++++++++++++++++++++++++++++++
+ goo/GooTimer.h | 40 +++++++++++++++++++++++++++++
+ goo/Makefile.am | 2 +
+ 5 files changed, 115 insertions(+), 1 deletions(-)
+
+commit 38948ea6f9ef76dae9b8a7156fe1ef32a0457380
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 29 03:57:16 2005 +0000
+
+ 2005-04-29 Kristian Høgsberg <krh@bitplanet.net>
+
+ * configure.ac: Bump release to 0.3.1.
+
+ * NEWS: Write up news for 0.3.1 release.
+
+ ChangeLog | 6 ++++++
+ NEWS | 6 ++++++
+ configure.ac | 2 +-
+ 3 files changed, 13 insertions(+), 1 deletions(-)
+
+commit af65146c92682a3af06e9d3147426445c78309de
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Apr 28 23:03:06 2005 +0000
+
+ 2005-04-28 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Martin Kretzschmar:
+
+ * poppler/GlobalParams.cc: use UTF-8 as the default text encoding.
+ Fixes Bug 2934.
+
+ ChangeLog | 7 +++++++
+ poppler/GlobalParams.cc | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit c2db3e1b297a9dc0accd0d8a1366970d45705c8f
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 27 20:56:18 2005 +0000
+
+ 2005-04-27 Jeff Muizelaar <jeff@infidigm.net>
+
+ * configure.ac:
+ * poppler/FlateStream.cc:
+ * poppler/FlateStream.h:
+ * poppler/Makefile.am:
+ * poppler/Stream.cc:
+ * poppler/Stream.h: Add a reimplementation of FlateStream using
+ zlib.
+
+ ChangeLog | 10 ++++
+ configure.ac | 29 +++++++++++++
+ poppler/FlateStream.cc | 107 ++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/FlateStream.h | 68 ++++++++++++++++++++++++++++++
+ poppler/Makefile.am | 17 +++++++-
+ poppler/Stream.cc | 6 +++
+ poppler/Stream.h | 2 +
+ 7 files changed, 237 insertions(+), 2 deletions(-)
+
+commit bc0afe524c2b87af191d83fc9e9bcdc8a6ce4042
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Apr 27 18:53:20 2005 +0000
+
+ 2005-04-27 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Catalog.cc (NameTree::lookup): Fix bsearch return value
+ NULL check. Found by Albert Astals Cid.
+
+ ChangeLog | 5 +++++
+ poppler/Catalog.cc | 8 ++++----
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+commit 3c37dc350d54e5a1035aecfba5bfa394f931cf51
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Apr 26 17:17:05 2005 +0000
+
+ Tue Apr 26 13:13:42 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/test-poppler-glib.c (main): add a quick dump-to-text test.
+
+ ChangeLog | 4 ++++
+ glib/test-poppler-glib.c | 20 ++++++++++++++++++++
+ 2 files changed, 24 insertions(+), 0 deletions(-)
+
+commit 44b800d520f90ffd143255d2c23835ea357c195b
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Apr 25 18:04:32 2005 +0000
+
+ Actually commit the qt/Makefile.am change advertised in the ChangeLog.
+
+ qt/Makefile.am | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 437bec03dd2ab3cdf6215f9ad443b7f21ce84e18
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Apr 24 19:56:17 2005 +0000
+
+ 2005-04-24 Kristian Høgsberg <krh@redhat.com>
+
+ * qt/Makefile.am (libpoppler_qt_la_SOURCES): Add poppler-private.h
+ to SOURCES.
+
+ ChangeLog | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 9b2b1244ed5f30a99120aaee49c72f7cb6a4f556
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Apr 23 20:16:02 2005 +0000
+
+ 2005-04-23 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc: Use the right fileName for loading
+ CID fonts (#3114).
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 11 +++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+commit e4516d728a4d1bc85831d5d00b6d6b8d49c79308
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Apr 23 00:09:05 2005 +0000
+
+ 2005-04-22 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Actually commit version number bump.
+
+ ChangeLog | 4 ++++
+ NEWS | 2 +-
+ configure.ac | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+commit c20448cb26fa1c309d726f272ddf1227f5a0e6ea
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 22 17:29:49 2005 +0000
+
+ 2005-04-22 Martin Kretzschmar <martink@gnome.org>
+
+ * poppler/CairoFontEngine.cc: declare matrix variable before the
+ first goto. Fixes build with gcc 3.3.
+
+ ChangeLog | 5 +++++
+ poppler/CairoFontEngine.cc | 3 ++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 42ecccf9b454893797e3d62f0f1c0a3276689e51
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 22 04:09:23 2005 +0000
+
+ Fri Apr 22 00:01:40 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc: Hack around semi-broken cairo-0.4.0
+ font API to fix the problem where some glyphs would show up at the
+ wrong sizes. We now create an FT_Face for each size and font
+ combination we encounter, since an FT_Face can't be shared between
+ several cairo_font_t.
+
+ ChangeLog | 8 ++++
+ poppler/CairoFontEngine.cc | 79 +++++++++++++++++++------------------------
+ poppler/CairoFontEngine.h | 23 +++++--------
+ poppler/CairoOutputDev.cc | 18 +++++-----
+ 4 files changed, 61 insertions(+), 67 deletions(-)
+
+commit 7a703616d9497eba4d7d318da9918dae9cbe8f12
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Apr 21 19:50:45 2005 +0000
+
+ Thu Apr 21 15:43:52 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Outline.cc:
+ * poppler/Outline.h: Implement the documented behaviour for
+ Outline::getItems() and OutlineItem::getKids() and make
+ documentation more precise (Patch from Marco).
+
+ ChangeLog | 7 +++++++
+ poppler/Outline.cc | 6 ++++++
+ poppler/Outline.h | 7 ++++---
+ 3 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 5c89902c5ee2cf13536225c141768b29505815ce
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Apr 21 06:35:33 2005 +0000
+
+ Thu Apr 21 02:25:20 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/CairoFontEngine.cc (CairoFont::getFont): Cache
+ cairo_font_t's for a given CairoFont. With this patch cairo will
+ recognize glyphs coming from the same font as such and the glyph
+ cache will actually work.
+
+ * glib/poppler-document.cc (poppler_document_new_from_file): Add
+ output device (cairo or splash) to PopplerDocument and initialize
+ it in the constructor.
+
+ * glib/poppler-page.cc (splash_render_to_pixbuf,
+ cairo_render_to_pixbuf): Use output device from associated poppler
+ document instead of creating a new one.
+
+ * poppler-glib.pc.in (Requires): Add Requires: field.
+
+ * poppler/Page.cc (loadThumb): Remove unecessary and buggy call to
+ Stream::addFilters(), reported by Ryan Lortie (#3046).
+
+ ChangeLog | 7 +++++-
+ NEWS | 12 ++--------
+ poppler/CairoFontEngine.cc | 45 ++++++++++++++++++++++++++++++++++++++-----
+ poppler/CairoFontEngine.h | 9 +++++++-
+ poppler/CairoOutputDev.cc | 9 +-------
+ 5 files changed, 57 insertions(+), 25 deletions(-)
+
+commit 71c1563bb0462154cb7caa4356d8f8d049073ac4
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Apr 21 05:20:24 2005 +0000
+
+ Thu Apr 21 00:15:30 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc (poppler_document_new_from_file): Add
+ output device (cairo or splash) to PopplerDocument and initialize
+ it in the constructor.
+
+ * glib/poppler-page.cc (splash_render_to_pixbuf,
+ cairo_render_to_pixbuf): Use output device from associated poppler
+ document instead of creating a new one.
+
+ * poppler-glib.pc.in (Requires): Add Requires: field.
+
+ * poppler/Page.cc (loadThumb): Remove unecessary and buggy call to
+ Stream::addFilters(), reported by Ryan Lortie (#3046).
+
+ ChangeLog | 15 +++++++++++++++
+ NEWS | 15 +++++++++++++++
+ glib/poppler-document.cc | 10 ++++++++++
+ glib/poppler-page.cc | 22 ++--------------------
+ glib/poppler-private.h | 13 +++++++++++++
+ poppler-glib.pc.in | 1 +
+ poppler/CairoFontEngine.cc | 2 +-
+ poppler/Page.cc | 2 --
+ 8 files changed, 57 insertions(+), 23 deletions(-)
+
+commit c6328cbc6cea05890b52a8302f8deba443959c03
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 20 22:48:52 2005 +0000
+
+ 2005-04-13 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * qt/poppler-page.cc (Page::getText):
+ * qt/poppler-qt.h: add a getText method for getting
+ the text on a page
+
+ * qt/test-poppler-qt.c (PDFDisplay::PDFDisplay):
+ add the option to display the text on a page
+
+ Patch from Albert Astals Cid.
+
+ ChangeLog | 11 +++++++++++
+ qt/poppler-page.cc | 37 +++++++++++++++++++++++++++++++++++++
+ qt/poppler-qt.h | 20 ++++++++++++++++++++
+ qt/test-poppler-qt.cpp | 40 ++++++++++++++++++++++++++++++----------
+ 4 files changed, 98 insertions(+), 10 deletions(-)
+
+commit 86a32b65100a5baedd18ce0135703289839a317c
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Apr 19 21:22:26 2005 +0000
+
+ Tue Apr 19 17:21:19 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-document.cc (poppler_document_get_property): Use
+ %.2g instead.
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 4e81624dcc2d5218f2f8bb4eaa992e724014a853
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Apr 19 21:13:22 2005 +0000
+
+ Tue Apr 19 17:11:52 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-document.cc (poppler_document_get_property): Use %g
+ instead of %f to avoid versioning like PDF-1.50000
+
+ ChangeLog | 5 +++++
+ glib/poppler-document.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 6ef9d30f06be2bd8a9e1470d70f49843a7e432ac
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 19 19:48:49 2005 +0000
+
+ Tue Apr 19 15:43:35 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-action.cc (_poppler_action_new): Handle NULL links
+ gracefully (fix from Jeff).
+
+ ChangeLog | 5 +++++
+ glib/poppler-action.cc | 7 ++++++-
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 770b7310ce8b07f95960c2014bf3f6040c060ac4
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 19 04:28:15 2005 +0000
+
+ Tue Apr 19 00:20:08 2005 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Catalog.cc: Fix from Marco to make sure we always
+ initialize Catalog::pageLabelInfo.
+
+ ChangeLog | 5 +++++
+ poppler/Catalog.cc | 3 +--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 49c10d9f2c4e0cef031f96929e38a14d7ce5af19
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Sat Apr 16 18:57:43 2005 +0000
+
+ Sat Apr 16 14:53:15 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/Makefile.am: Create poppler-enums.[ch]
+
+ * glib/poppler.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-action.h: Try to clean up the headers a bit
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h: Add support for document data.
+ Implemented as a lot of GObject properties.
+
+ * glib/poppler-enums.c:
+ * glib/poppler-enums.h: New autogenerated files.
+
+ * glib/test-poppler-glib.c: Test the new document metadata. Seems
+ to work nicely, other than the PDF string and View Prefs.
+
+ * poppler/Catalog.cc:
+ * poppler/Catalog.h: Extend to support PageLayout.
+
+ ChangeLog | 22 +++++
+ glib/Makefile.am | 32 +++++++-
+ glib/poppler-action.h | 15 ++--
+ glib/poppler-document.cc | 196 +++++++++++++++++++++++++++++++++++++++++-----
+ glib/poppler-document.h | 43 +++++++++--
+ glib/poppler-enums.c | 144 ++++++++++++++++++++++++++++++++++
+ glib/poppler-enums.h | 32 ++++++++
+ glib/poppler-page.cc | 3 -
+ glib/poppler-page.h | 1 +
+ glib/poppler.h | 7 ++
+ glib/test-poppler-glib.c | 48 ++++++++++-
+ poppler/Catalog.cc | 17 ++++
+ poppler/Catalog.h | 11 +++
+ 13 files changed, 529 insertions(+), 42 deletions(-)
+
+commit f35c76cd3528f1e1de594e85e734ca23624b3a62
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 15 02:25:10 2005 +0000
+
+ 2005-04-14 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/poppler.h: Patch from Marco Pesenti Gritti to set page
+ orientaton.
+
+ ChangeLog | 8 ++++
+ glib/poppler-page.cc | 109 ++++++++++++++++++++++++++++++++++++++++++++----
+ glib/poppler-page.h | 45 ++++++++++----------
+ glib/poppler-private.h | 1 +
+ glib/poppler.h | 9 ++++
+ 5 files changed, 142 insertions(+), 30 deletions(-)
+
+commit 538408a8845e167cc2d796ac8b8129d0a2e6a894
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Apr 14 01:34:38 2005 +0000
+
+ 2005-04-13 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler/CairoOutputDevImage.cc (getBitmap): remove unused
+ SplashBitmap. Patch from Albert Astals Cid.
+
+ ChangeLog | 5 +++++
+ poppler/CairoOutputDevImage.cc | 2 --
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 2903530492c24f3c7cb3bf3b993500694aaa27a8
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 12 15:37:39 2005 +0000
+
+ 2005-04-12 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Add fontconfig to PKG_CHECK_MODULES for the cairo
+ backend too, since we shouldn't depend on cairo.pc to pull that in
+ for us.
+
+ * poppler/Makefile.am (INCLUDES): Add $(splash_includes) to
+ INCLUDES to make sure the fontconfig include path is added when
+ using the splash backend.
+
+ ChangeLog | 10 ++++++++++
+ configure.ac | 4 ++--
+ poppler/Makefile.am | 1 +
+ 3 files changed, 13 insertions(+), 2 deletions(-)
+
+commit 0f7dd9a0512ff97293ee3f8a762b0049393b3cc1
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Apr 9 18:14:39 2005 +0000
+
+ 2005-04-09 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler-qt.h:
+ * poppler-document.cc (okToPrint, okToChange, okToCopy):
+ Patch from Albert Astals Cid adding more metadata exports
+
+ ChangeLog | 6 ++++++
+ qt/poppler-document.cc | 20 ++++++++++++++++++++
+ qt/poppler-qt.h | 4 ++++
+ 3 files changed, 30 insertions(+), 0 deletions(-)
+
+commit dee72b531dab83a29c7675ae06ffe376e4498a4e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 8 21:09:27 2005 +0000
+
+ 2005-04-08 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler-qt.pc.in (Libs): Add -lpoppler to Libs.
+
+ ChangeLog | 4 ++++
+ poppler-qt.pc.in | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit df59ce3b1d5ca8cd46aaf5f189bc78953e21e1a9
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri Apr 8 03:30:33 2005 +0000
+
+ 2005-04-07 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * configure.ac: redo the qt tests from Albert Astals Cid
+
+ ChangeLog | 4 +++
+ configure.ac | 78 +++++++++++++++++++++++++++++++++++-----------------------
+ 2 files changed, 51 insertions(+), 31 deletions(-)
+
+commit 3f9dde10e4778255c468895942e45d1a2637af3a
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Fri Apr 8 03:11:00 2005 +0000
+
+ 2005-04-07 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * qt/poppler-document.cc:
+ * qt/poppler-page.cc:
+ * qt/poppler-qt.h:
+ Patch from Albert Astals Cid adding consts and exporting some more
+ metadata.
+
+ ChangeLog | 8 ++++++++
+ qt/poppler-document.cc | 21 ++++++++++++++++++---
+ qt/poppler-page.cc | 6 +++---
+ qt/poppler-qt.h | 15 +++++++++------
+ 4 files changed, 38 insertions(+), 12 deletions(-)
+
+commit e79a8b946e0d04b32da0b4ceea1649efd203cb07
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Apr 7 22:01:51 2005 +0000
+
+ 2005-04-07 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h: Print to PS support from Marco Pesenti
+ Gritti.
+
+ ChangeLog | 9 +++++++++
+ glib/poppler-document.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-document.h | 8 ++++++--
+ glib/poppler-page.cc | 19 +++++++++++++++++++
+ glib/poppler-page.h | 40 +++++++++++++++++++++-------------------
+ glib/poppler-private.h | 7 +++++++
+ 6 files changed, 107 insertions(+), 21 deletions(-)
+
+commit 7319b66eb64e735ae8b811306eb76755f088385b
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Thu Apr 7 16:26:15 2005 +0000
+
+ Thu Apr 7 12:25:39 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * configure.ac: check for qt, not glib, when enabling the qt
+ subdir
+
+ ChangeLog | 5 +++++
+ configure.ac | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit e258ed0cb42d524ee39451f680ad4c067e7721da
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 6 20:49:19 2005 +0000
+
+ 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * .cvsignore, glib/.cvsignore, qt/.cvsignore:
+ Add more things to .cvsignore.
+ Patch from Martin Kretzschmar.
+
+ .cvsignore | 2 ++
+ ChangeLog | 6 ++++++
+ glib/.cvsignore | 7 +++++++
+ qt/.cvsignore | 7 +++++++
+ 4 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 2a5624a81aa84677a57e098d7d4045f44e3b6f3a
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 6 20:35:03 2005 +0000
+
+ 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler-page.cc (Page::Page, Page::~Page):
+ Construct and deconstruct the PageData object.
+ Patch from Albert Astals Cid.
+
+ ChangeLog | 6 ++++++
+ qt/poppler-page.cc | 6 ++++++
+ qt/poppler-qt.h | 1 +
+ 3 files changed, 13 insertions(+), 0 deletions(-)
+
+commit f983e3d317660653f2bfc56f9b06e2cec675beca
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Apr 6 14:39:40 2005 +0000
+
+ 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * Makefile.am, configure.ac: Add configuration for qt wrapper.
+
+ * poppler-qt.pc.in:
+ * qt/Makefile.am:
+ * qt/poppler-document.cc:
+ * qt/poppler-page.cc:
+ * qt/poppler-private.h:
+ * qt/poppler-qt.h:
+ * qt/test-poppler-qt.cpp:
+ New files.
+
+ ChangeLog | 13 +++
+ Makefile.am | 13 ++-
+ configure.ac | 64 +++++++++++++-
+ poppler-qt.pc.in | 11 +++
+ qt/Makefile.am | 32 +++++++
+ qt/poppler-document.cc | 232 ++++++++++++++++++++++++++++++++++++++++++++++++
+ qt/poppler-page.cc | 66 ++++++++++++++
+ qt/poppler-private.h | 32 +++++++
+ qt/poppler-qt.h | 75 ++++++++++++++++
+ qt/test-poppler-qt.cpp | 63 +++++++++++++
+ 10 files changed, 597 insertions(+), 4 deletions(-)
+
+commit d91dd69a7a0dd581c26728d2640e4d36a7ffe75f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 5 17:46:44 2005 +0000
+
+ 2005-04-05 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Attempt to sum up changes since 0.1.2.
+
+ * configure.ac: Bump release to 0.2.0, add AC_DEFINEs for cairo
+ and splash availability.
+
+ * poppler/CairoFontEngine.cc: Disable hinting.
+
+ * glib/poppler-page.cc (poppler_page_render_to_pixbuf): Choose
+ either splash or cairo rendering, based on configure choice.
+ (cairo_render_to_pixbuf): New function to render using the cairo
+ backend.
+ (splash_render_to_pixbuf): Split out the splash code to this
+ function.
+
+ ChangeLog | 16 ++++
+ NEWS | 6 +-
+ configure.ac | 16 +++-
+ glib/Makefile.am | 17 ++++-
+ glib/poppler-page.cc | 152 ++++++++++++++++++++++++++++++++--------
+ poppler/CairoFontEngine.cc | 2 +-
+ poppler/CairoOutputDevImage.cc | 20 ++----
+ poppler/CairoOutputDevImage.h | 3 +-
+ 8 files changed, 179 insertions(+), 53 deletions(-)
+
+commit b62b0cec2335d987b31fbb0043cb33db29cc6a13
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 5 02:56:32 2005 +0000
+
+ 2005-04-04 Kristian Høgsberg <krh@redhat.com>
+
+ * ChangeLog: Add this entry to test commit mailer script.
+
+ ChangeLog | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 50b494266ce197fe88468ca2917b9910d77e5f98
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Apr 5 02:49:18 2005 +0000
+
+ 2005-04-04 Kristian Høgsberg <krh@redhat.com>
+
+ * TODO: Add reminder about using PDF font descriptors with
+ fontconfig.
+
+ ChangeLog | 3 +++
+ TODO | 2 ++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit d3d12235bf4de48363571b3d992ea3bfc29e6529
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Apr 4 21:50:56 2005 +0000
+
+ 2005-04-04 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Add checks for mkstemp() and mkstemps().
+
+ * glib/poppler-page.cc (poppler_page_find_text): Reverse
+ y-coordinates so we return PDF style coordinates.
+
+ From Maro Pesenti Gritti <mpgritti@gmail.com>:
+
+ * configure.ac, poppler/Makefile.am: Check for fontconfig when
+ we're building the splash backend.
+
+ * glib/poppler-page.cc (poppler_page_get_text): New function to
+ select text on page.
+
+ ChangeLog | 15 +++++++++++++++
+ configure.ac | 5 ++++-
+ glib/poppler-page.cc | 48 +++++++++++++++++++++++++++++++++++++++++++++---
+ glib/poppler-page.h | 3 +++
+ poppler/Makefile.am | 4 ++++
+ 5 files changed, 71 insertions(+), 4 deletions(-)
+
+commit 2cb9d70678e33504246cbfbe0525c33f5e3b7736
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Apr 4 05:56:29 2005 +0000
+
+ 2005-04-04 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_find_text): Reverse list of
+ matches so we get them in the right order.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 8c2a5ffb73c0f2d84adebcfbd43f8347ae8c8bbc
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sun Apr 3 18:17:55 2005 +0000
+
+ 2005-04-03 Martin Kretzschmar <martink@gnome.org>
+
+ * poppler/DCTStream.h: Wrap #include <jpeglib.h> in extern "C"
+ Fixes build with unpatched libjpeg.
+
+ ChangeLog | 5 +++++
+ poppler/DCTStream.h | 2 ++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 1879d82d9088aa36ef5e677f4bae44c84f90caa6
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Sat Apr 2 22:16:38 2005 +0000
+
+ 2005-04-02 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler/Page.h:
+ * poppler/Page.cc (Page::Page):
+ Some initial infrastructure for supporting transitions.
+
+ ChangeLog | 6 ++++++
+ poppler/Page.cc | 10 ++++++++++
+ poppler/Page.h | 4 ++++
+ 3 files changed, 20 insertions(+), 0 deletions(-)
+
+commit fa4efbed51e12811070798a7cfb6b1f9e8d57abc
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Apr 1 00:32:34 2005 +0000
+
+ 2005-03-31 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_render_to_pixbuf): Clip
+ output to destination pixbuf and fix RGB order.
+
+ ChangeLog | 5 +++++
+ glib/poppler-page.cc | 38 +++++++++++++++++++++++---------------
+ 2 files changed, 28 insertions(+), 15 deletions(-)
+
+commit bb508ded0b8c5806a9db1ec73e57b14268896911
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Mar 31 22:45:05 2005 +0000
+
+ 2005-03-31 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc (poppler_page_find_text): New function to
+ seach a page for occurrences of a given text string.
+
+ * glib/poppler-page.cc: Add g_return_if_fail() checks to a couple
+ of functions.
+
+ ChangeLog | 8 ++++
+ glib/poppler-page.cc | 82 ++++++++++++++++++++++++++++++++++++++++------
+ glib/poppler-page.h | 18 +++++++---
+ glib/test-poppler-glib.c | 19 +++++++++--
+ 4 files changed, 109 insertions(+), 18 deletions(-)
+
+commit 0b4d481e9c79cb18cf41b503970801bbf4b95b3c
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Thu Mar 31 05:29:42 2005 +0000
+
+ Thu Mar 31 00:26:20 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h (poppler_page_get_link_mapping,
+ poppler_page_free_link_mapping): New functions to get a mapping of
+ links to locations on the current document.
+ :s
+
+ ChangeLog | 7 ++++
+ glib/poppler-page.cc | 85 +++++++++++++++++++++++++++++++++++++++++++++++---
+ glib/poppler-page.h | 15 +++++++++
+ 3 files changed, 102 insertions(+), 5 deletions(-)
+
+commit c4e18f5a454794bd5e226f1106a54ccf807c6c3d
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Thu Mar 31 02:28:46 2005 +0000
+
+ 2005-03-30 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler/DCTStream.h: change x to unsigned int to eliminate
+ comparision warning
+
+ ChangeLog | 5 +++++
+ poppler/DCTStream.h | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit e6a2a588305b4797af901599eb6854028f2be476
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Mar 30 18:43:44 2005 +0000
+
+ 2005-03-30 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ * poppler/Catalog.cc: delete pageLabelInfo on deconstruction
+
+ ChangeLog | 4 ++++
+ poppler/Catalog.cc | 1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit a52905c0f0bf4d10d2103b80924a4de204d03836
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed Mar 30 04:08:26 2005 +0000
+
+ add this
+
+ glib/poppler-action.cc | 285 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 285 insertions(+), 0 deletions(-)
+
+commit 9542860a74076020b5727d4b761c08cdab42d69e
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed Mar 30 04:07:57 2005 +0000
+
+ add these
+
+ glib/poppler-action.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 157 insertions(+), 0 deletions(-)
+
+commit 07720f98eca8736695f7d0d8e98465d301e6b7cf
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed Mar 30 04:07:39 2005 +0000
+
+ Tue Mar 29 23:07:17 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-page.h: Reformat.
+
+ ChangeLog | 4 ++++
+ glib/poppler-page.h | 34 +++++++++++++++++-----------------
+ 2 files changed, 21 insertions(+), 17 deletions(-)
+
+commit 3437b9e122aa05f4ede24664ee5a9b2d423ef9c4
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Wed Mar 30 04:04:53 2005 +0000
+
+ Tue Mar 29 22:49:15 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-action.[ch]: New item to encapsulate links.
+ * glib/poppler-document.[ch] (poppler_index_iter_get_action): New
+ function to get the action. Also, fix some warnings.
+ * glib/poppler-private.h (_poppler_action_new): New function.
+ * glib/test-poppler-glib.c: Fix warnings.
+
+ ChangeLog | 8 ++++++
+ glib/Makefile.am | 2 +
+ glib/poppler-document.cc | 57 ++++++++++-----------------------------------
+ glib/poppler-document.h | 7 +----
+ glib/poppler-private.h | 12 ++++++++-
+ glib/poppler.h | 1 +
+ glib/test-poppler-glib.c | 4 ++-
+ 7 files changed, 39 insertions(+), 52 deletions(-)
+
+commit cab0ec4d011c34b571050a446c6e3286cc8749c8
+Author: Jonathan Blandford <jrb@redhat.com>
+Date: Tue Mar 29 18:49:26 2005 +0000
+
+ Tue Mar 29 02:36:00 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-document.[ch] (PopplerIndexIter): Add an iter to
+ extract the index from the doc. Includes a bad hack, for now.
+
+ Mon Mar 28 22:02:07 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h (poppler_page_get_thumbnail_size): New
+ function.
+ * poppler-glib.pc.in: add -lpoppler-glib to the libs line.
+
+ ChangeLog | 12 ++++
+ glib/poppler-document.cc | 160 +++++++++++++++++++++++++++++++++++++++++++++-
+ glib/poppler-document.h | 15 ++++
+ glib/poppler-page.cc | 48 ++++++++++++++-
+ glib/poppler-page.h | 3 +
+ poppler-glib.pc.in | 2 +-
+ 6 files changed, 236 insertions(+), 4 deletions(-)
+
+commit 2de98f3871bc4ea3e361ca4fe37f5b6561918c77
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Mar 28 07:49:54 2005 +0000
+
+ 2005-03-28 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Page.cc (loadThumb): Backend agnostic method for
+ extracting an embedded thumbnail iamge.
+
+ * poppler/Dict.cc (lookupInt): New convenience method.
+
+ * glib/poppler-page.cc (poppler_page_get_thumbnail): New glib
+ function for getting the embedded thumbnail image for a page.
+
+ ChangeLog | 10 ++++
+ glib/poppler-page.cc | 23 ++++++++++
+ glib/poppler-page.h | 32 ++++++-------
+ glib/test-poppler-glib.c | 24 +++++++---
+ poppler/Dict.cc | 20 ++++++++
+ poppler/Dict.h | 1 +
+ poppler/Page.cc | 109 ++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/Page.h | 1 +
+ 8 files changed, 196 insertions(+), 24 deletions(-)
+
+commit 591055d1fbcd0b9c2bb11f14040568051c5976d1
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Mar 26 00:34:21 2005 +0000
+
+ 2005-03-25 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/Makefile.am (libpoppler_glib_la_SOURCES): Add
+
+ * configure.ac: Check for fontconfig for glib bindings.
+
+ ChangeLog | 4 ++++
+ configure.ac | 4 ++--
+ glib/Makefile.am | 7 +++++--
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 1e30abe94a96b91df05716ea079c58782d767951
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Mar 24 22:24:41 2005 +0000
+
+ 2005-03-24 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/Makefile.am: Use POPPLER_GLIB_CFLAGS and POPPLER_GLIB_LIBS
+ instead of GTK_TEST_*. Reported by Adam Jackson <ajax@nwnk.net>.
+
+ ChangeLog | 5 +++++
+ glib/Makefile.am | 7 +++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 1d9fcaa34222b2ccd53280148561917dbb8d95d9
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 23 05:53:08 2005 +0000
+
+ File Edit Options Buffers Tools Help
+ 2005-03-23 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Catalog.cc (indexToLabel, labelToIndex): Add stricter
+ checking of incoming labels and indices.
+
+ * glib/test-poppler-glib.c (main): Change test program to take the
+ page label from the command line.
+
+ ChangeLog | 6 ++++++
+ glib/test-poppler-glib.c | 5 ++++-
+ poppler/Catalog.cc | 31 +++++++++++++++++++++++++++++--
+ 3 files changed, 39 insertions(+), 3 deletions(-)
+
+commit a9bbb465a0ee6ab320f76d322a3f575327ad1148
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 23 05:38:34 2005 +0000
+
+ 2005-03-23 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h: Add poppler_page_get_index() and rename
+ popper_page_get_dimension() to popper_page_get_size()
+
+ ChangeLog | 6 ++++++
+ glib/poppler-page.cc | 12 +++++++++---
+ glib/poppler-page.h | 32 +++++++++++++++++---------------
+ glib/test-poppler-glib.c | 5 ++---
+ 4 files changed, 34 insertions(+), 21 deletions(-)
+
+commit 178bff27d09d1e18d1fc00c975fa235b0e9f93d3
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 23 04:14:28 2005 +0000
+
+ 2005-03-22 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc: Implement poppler_document_save().
+
+ * glib/poppler-document.h: Add prototype and format headers
+ properly.
+
+ ChangeLog | 7 +++++++
+ glib/poppler-document.cc | 20 ++++++++++++++++++++
+ glib/poppler-document.h | 30 +++++++++++++-----------------
+ 3 files changed, 40 insertions(+), 17 deletions(-)
+
+commit e40c6f69c9466df4cc70840b959f72cb0809c777
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 23 01:30:04 2005 +0000
+
+ 2005-03-22 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Fix --disable-popper typo reported by Albert.
+ Require exactly cairo 0.4 since CVS cairo has API changes.
+
+ ChangeLog | 5 +++++
+ configure.ac | 6 +++---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+commit 2a1e4f6f6dd87dc59b3579175a87215fd7350ee0
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Mar 22 22:46:37 2005 +0000
+
+ 2005-03-22 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/Array.cc:
+ * poppler/Array.h: Add getString() convenience method.
+
+ * poppler/Catalog.cc:
+ * poppler/Catalog.h: Optimize lookup of named destinations.
+
+ ChangeLog | 8 +++
+ poppler/Array.cc | 15 ++++++
+ poppler/Array.h | 1 +
+ poppler/Catalog.cc | 142 +++++++++++++++++++++++++++++++++-------------------
+ poppler/Catalog.h | 32 +++++++++++-
+ 5 files changed, 146 insertions(+), 52 deletions(-)
+
+commit 4dfe0ce4a1ca09d632943f0f6315e31135957ada
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Tue Mar 22 01:50:05 2005 +0000
+
+ 2005-03-21 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS, TODO: Update these.
+
+ ChangeLog | 4 ++++
+ NEWS | 1 +
+ TODO | 29 ++++++++++++++++++++---------
+ 3 files changed, 25 insertions(+), 9 deletions(-)
+
+commit c158de90a5a8c6514d8aa22efa0b891a1801e822
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Mar 21 07:53:19 2005 +0000
+
+ 2005-03-21 Kristian Høgsberg <krh@redhat.com>
+
+ From Albert Astals Cid <tsdgeos@yahoo.es>:
+
+ * poppler/Catalog.cc, poppler/Catalog.h: Parse PageMode setting
+ from the Catalog dict and expose it through getPageMode() method.
+
+ ChangeLog | 10 ++++++++--
+ poppler/Catalog.cc | 16 ++++++++++++++++
+ poppler/Catalog.h | 12 ++++++++++++
+ 3 files changed, 36 insertions(+), 2 deletions(-)
+
+commit 9887679ca195714d71cbedde9297e9dcea04eb13
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Mon Mar 21 07:36:11 2005 +0000
+
+ 2005-03-21 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+
+ * glib/poppler-document.h: Expose the documenttitle as a GObject
+ property.
+
+ * glib/poppler-page.cc: Expose the page label as a GObject
+ property.
+
+ * glib/poppler-private.h: Add the page index to PopplerPage.
+
+ * glib/test-poppler-glib.c: Print out page label and document
+ title.
+
+ * poppler/Catalog.cc:
+ * poppler/Catalog.h: Add page label accessors.
+
+ * poppler/PageLabelInfo.cc:
+ * poppler/PageLabelInfo.h: New files.
+
+ * poppler/Makefile.am: Add new files to sources.
+
+ ChangeLog | 23 +++
+ glib/poppler-document.cc | 95 ++++++++++++-
+ glib/poppler-document.h | 3 +
+ glib/poppler-page.cc | 37 +++++-
+ glib/poppler-private.h | 3 +-
+ glib/test-poppler-glib.c | 13 ++-
+ poppler/Catalog.cc | 15 ++
+ poppler/Catalog.h | 6 +
+ poppler/Makefile.am | 4 +-
+ poppler/PageLabelInfo.cc | 346 ++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/PageLabelInfo.h | 37 +++++
+ 11 files changed, 573 insertions(+), 9 deletions(-)
+
+commit 2cfe917de909254bc3a114a6add68a14b5885fd0
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Mar 20 05:44:06 2005 +0000
+
+ 2005-03-20 Kristian Høgsberg <krh@redhat.com>
+
+ * glib/poppler-document.cc:
+ * glib/poppler-page.h:
+ * glib/poppler.cc:
+ * poppler/Array.cc:
+ * poppler/Array.h:
+ * poppler/Catalog.cc: Fix up filenames in #include statements and
+ comments.
+
+ ChangeLog | 10 ++++++++++
+ glib/poppler-document.cc | 2 +-
+ glib/poppler-document.h | 2 +-
+ glib/poppler-page.cc | 2 +-
+ glib/poppler-page.h | 2 +-
+ glib/poppler.cc | 2 +-
+ glib/poppler.h | 2 +-
+ 7 files changed, 16 insertions(+), 6 deletions(-)
+
+commit f9b6017cfaf8f814ae2fc027927477c29f24af71
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sun Mar 20 00:35:21 2005 +0000
+
+ 2005-03-19 Kristian Høgsberg <krh@redhat.com>
+
+ Land the first bits of the glib wrapper.
+
+ * Makefile.am:
+ * configure.ac: Add new glib subdirectory and configure options
+ for glib wrapper.
+
+ * glib/Makefile.am:
+ * glib/poppler-document.cc:
+ * glib/poppler-document.h:
+ * glib/poppler-page.cc:
+ * glib/poppler-page.h:
+ * glib/poppler-private.h:
+ * glib/poppler.cc:
+ * glib/poppler.h:
+ * glib/test-poppler-glib.c:
+ * poppler-glib.pc.in: New files.
+
+ ChangeLog | 19 +++++
+ Makefile.am | 27 ++++----
+ NEWS | 4 +
+ configure.ac | 25 ++++++-
+ glib/Makefile.am | 33 +++++++++
+ glib/poppler-document.cc | 165 ++++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-document.h | 52 ++++++++++++++
+ glib/poppler-page.cc | 158 ++++++++++++++++++++++++++++++++++++++++++++
+ glib/poppler-page.h | 50 ++++++++++++++
+ glib/poppler-private.h | 20 ++++++
+ glib/poppler.cc | 29 ++++++++
+ glib/poppler.h | 42 ++++++++++++
+ glib/test-poppler-glib.c | 43 ++++++++++++
+ poppler-glib.pc.in | 11 +++
+ 14 files changed, 661 insertions(+), 17 deletions(-)
+
+commit 2a31446b227b5cdc8334e672a71835b6ea14713a
+Author: Jeff Muizelaar <jeff@infidigm.net>
+Date: Wed Mar 16 15:51:36 2005 +0000
+
+ 2005-03-16 Jeff Muizelaar <jrmuizel@nit.ca>
+
+ From Dan Sheridan <dan.sheridan@postman.org.uk>
+
+ * poppler/XRef.cc (XRef::checkEncrypted):
+ The key length should be 5 for revision 2 documents.
+
+ ChangeLog | 7 +++++++
+ poppler/XRef.cc | 6 ++++++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit e632a1d4b2f685993bda407458c34ef8e6b74136
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 11 22:43:29 2005 +0000
+
+ 2005-03-11 Kristian Høgsberg <krh@redhat.com>
+
+ From Jeff Muizelaar <jrmuizel@nit.ca>:
+
+ * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask): Use
+ getLine instead of getPixel.
+
+ ChangeLog | 3 +++
+ poppler/CairoOutputDev.cc | 18 ++++++++----------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+commit 83e904452f205a2c0cd2723cb12b7fd4640ce342
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 11 21:42:52 2005 +0000
+
+ 2005-03-11 Kristian Høgsberg <krh@redhat.com>
+
+ From Jeff Muizelaar <jrmuizel@nit.ca>:
+
+ * configure.ac: Add checks for libjpeg.
+
+ * DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am:
+ Conditionally use libjpeg instead of xpdf jpeg decoder.
+
+ ChangeLog | 9 ++++
+ configure.ac | 34 +++++++++++++++-
+ poppler/DCTStream.cc | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ poppler/DCTStream.h | 70 ++++++++++++++++++++++++++++++++
+ poppler/Makefile.am | 14 ++++++-
+ poppler/Stream.cc | 8 ++++
+ poppler/Stream.h | 2 +
+ 7 files changed, 245 insertions(+), 2 deletions(-)
+
+commit e2af71338fd89760c4ac76999985efc5eb92817f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 11 16:42:20 2005 +0000
+
+ 2005-03-10 Kristian Høgsberg <krh@redhat.com>
+
+ From Jeff Muizelaar <jrmuizel@nit.ca>:
+
+ * poppler/CairoFontEngine.cc (CairoFontEngine::getFont):
+ Don't print "Type 3 font!" message.
+
+ * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask):
+ Enable image mask drawing and do it properly, albeit slowly.
+
+ * poppler/CairoOutputDev.h
+ (CairoOutputDev::interpretType3Chars): Return true so that
+ Gfx.cc turns type3 characters into calls to drawImageMask
+
+ ChangeLog | 14 ++++++++++++++
+ poppler/CairoFontEngine.cc | 1 -
+ poppler/CairoOutputDev.cc | 25 ++++++++++---------------
+ poppler/CairoOutputDev.h | 2 +-
+ 4 files changed, 25 insertions(+), 17 deletions(-)
+
+commit 3dc52373346e448077d2539163e873eef6406ed7
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 9 15:47:00 2005 +0000
+
+ 2005-03-09 Kristian Høgsberg <krh@redhat.com>
+
+ * NEWS: Describe 0.1.2 (and 0.1.1) release.
+
+ * configure.ac: Bump poppler version to 0.1.2
+
+ ChangeLog | 6 ++++++
+ NEWS | 12 ++++++++++++
+ configure.ac | 2 +-
+ 3 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 5c6a2d34fc25df28ca5326e6910d7cf664f0c3d7
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Wed Mar 9 15:35:31 2005 +0000
+
+ 2005-03-09 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Bump cairo requirement to 0.4.
+
+ ChangeLog | 4 ++++
+ configure.ac | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 5b2d9a61e79cefd819888c8c89231a5fafccd114
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Mar 5 04:57:49 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Jeff Muizelaar <jrmuizel@nit.ca>. Changed to allocate
+ glyphs using gmalloc.
+
+ * poppler/CairoOutputDev.cc (CairoOutputDev::drawString):
+ Implement drawString instead of drawChar. This change should
+ make clipping to a text path work and has a performance
+ improvement. Currently the code is a little ugly because we
+ can't concat matrices to cairo without losing our current font.
+
+ * poppler/CairoOutputDev.h (CairoOutputDev::useDrawChar):
+ Tell Gfx.cc that it should use drawString instead of drawChar.
+
+ ChangeLog | 14 ++++++
+ TODO | 3 +
+ poppler/CairoOutputDev.cc | 110 ++++++++++++++++++++++++++++++++++-----------
+ poppler/CairoOutputDev.h | 7 +--
+ 4 files changed, 102 insertions(+), 32 deletions(-)
+
+commit 60d190ef80a0dcd9cc3a67306e2c65c5dd482f24
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Mar 5 04:37:14 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ * test/gtk-cairo-test.cc (view_load):
+ * test/gtk-splash-test.cc (view_load): Fix missing return
+ statement, and remove unused variables.
+
+ * configure.ac: Add configure option to enable the default KDE
+ flags as described by Albert Astals Cid <tsdgeos@yahoo.es>.
+
+ * TODO: Update with Jeff's items.
+
+ * .cvsignore:
+ * */.cvsignore: Add these to silence CVS.
+
+ ChangeLog | 9 +++++++++
+ TODO | 15 +++++++++++----
+ configure.ac | 21 +++++++++++++++++++++
+ test/gtk-cairo-test.cc | 6 ++----
+ test/gtk-splash-test.cc | 5 ++---
+ 5 files changed, 45 insertions(+), 11 deletions(-)
+
+commit e6706e505c1675724c8870f7c58079932661db5f
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Sat Mar 5 02:19:50 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ * .cvsignore:
+ * */.cvsignore: Add these to silence CVS.
+
+ .cvsignore | 21 +++++++++++++++++++++
+ ChangeLog | 3 +++
+ fofi/.cvsignore | 8 ++++++++
+ goo/.cvsignore | 8 ++++++++
+ poppler/.cvsignore | 10 ++++++++++
+ splash/.cvsignore | 8 ++++++++
+ test/.cvsignore | 10 ++++++++++
+ 7 files changed, 68 insertions(+), 0 deletions(-)
+
+commit 932edfc3c5c61e3b3e98957b717abbf8055e1c5e
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 4 19:47:13 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Implement same check for gtk+-2.0 tests as for
+ cairo.
+
+ ChangeLog | 5 +++++
+ configure.ac | 11 ++++++++---
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+commit c632b35ad9345f280d78c268f84ae3fd5a3921b9
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 4 16:33:43 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ * configure.ac: Only fail hard in check for cairo if the user
+ specified --enable-cairo-output (from Brad Hards
+ <bradh@frogmouth.net>). Print summary of configure results at the
+ end of configure script.
+
+ * poppler/poppler-config.h: Remove this file (noticed by Brad
+ Hards <bradh@frogmouth.net>).
+
+ ChangeLog | 5 +++++
+ configure.ac | 17 ++++++++++++++---
+ 2 files changed, 19 insertions(+), 3 deletions(-)
+
+commit 80f9c90273eb31ac349c46bf86dedff7daf21db4
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 4 15:32:32 2005 +0000
+
+ 2005-03-04 Kristian Høgsberg <krh@redhat.com>
+
+ * poppler/poppler-config.h: Remove this file (noticed by Brad
+ Hards <bradh@frogmouth.net>).
+
+ ChangeLog | 5 ++
+ poppler/poppler-config.h | 146 ----------------------------------------------
+ 2 files changed, 5 insertions(+), 146 deletions(-)
+
+commit 338b83b6f08a7212fdde2bbce94385e9a71a3d23
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Fri Mar 4 02:46:44 2005 +0000
+
+ 2005-03-03 Kristian Høgsberg <krh@redhat.com>
+
+ Patch from Jeff Muizelaar <jrmuizel@nit.ca>:
+
+ * poppler/CairoOutputDev.cc (CairoOutputDev::drawImage,
+ CairoOutputDev::drawImageMask): destroy the image surface and
+ free the image buffer.
+
+ ChangeLog | 10 ++++++++++
+ autogen.sh | 2 +-
+ poppler/CairoOutputDev.cc | 8 +++++---
+ 3 files changed, 16 insertions(+), 4 deletions(-)
+
+commit 062aa51487f539406b54458885b4c9501da3c44d
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Mar 3 20:01:14 2005 +0000
+
+ 2005-03-03 Kristian Høgsberg <krh@redhat.com>
+
+ * autogen.sh: Add to CVS.
+
+ ChangeLog | 4 ++++
+ autogen.sh | 4 ++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit cb02d5d0e770e2a8cbe5a8ac810820a2ce5fec0c
+Author: Kristian Høgsberg <krh@redhat.com>
+Date: Thu Mar 3 19:45:58 2005 +0000
+
+ Initial revision
+
+ AUTHORS | 3 +
+ COPYING | 340 ++++
+ ChangeLog | 33 +
+ INSTALL | 236 +++
+ Makefile.am | 29 +
+ NEWS | 4 +
+ README | 37 +
+ README-XPDF | 376 ++++
+ TODO | 21 +
+ configure.ac | 139 ++
+ fofi/FoFiBase.cc | 156 ++
+ fofi/FoFiBase.h | 55 +
+ fofi/FoFiEncodings.cc | 994 ++++++++++
+ fofi/FoFiEncodings.h | 34 +
+ fofi/FoFiTrueType.cc | 1438 ++++++++++++++
+ fofi/FoFiTrueType.h | 131 ++
+ fofi/FoFiType1.cc | 207 ++
+ fofi/FoFiType1.h | 57 +
+ fofi/FoFiType1C.cc | 2385 ++++++++++++++++++++++
+ fofi/FoFiType1C.h | 224 +++
+ fofi/Makefile.am | 16 +
+ goo/GooHash.cc | 356 ++++
+ goo/GooHash.h | 74 +
+ goo/GooList.cc | 92 +
+ goo/GooList.h | 89 +
+ goo/GooMutex.h | 49 +
+ goo/GooString.cc | 236 +++
+ goo/GooString.h | 98 +
+ goo/Makefile.am | 20 +
+ goo/gfile.cc | 705 +++++++
+ goo/gfile.h | 140 ++
+ goo/gmem.c | 204 ++
+ goo/gmem.h | 53 +
+ goo/gmempp.cc | 32 +
+ goo/gtypes.h | 29 +
+ poppler-cairo.pc.in | 10 +
+ poppler-splash.pc.in | 10 +
+ poppler.pc.in | 11 +
+ poppler/Annot.cc | 137 ++
+ poppler/Annot.h | 79 +
+ poppler/Array.cc | 73 +
+ poppler/Array.h | 56 +
+ poppler/BaseFile.h | 82 +
+ poppler/BuiltinFont.cc | 65 +
+ poppler/BuiltinFont.h | 55 +
+ poppler/BuiltinFontTables.cc | 4284 ++++++++++++++++++++++++++++++++++++++++
+ poppler/BuiltinFontTables.h | 23 +
+ poppler/CMap.cc | 384 ++++
+ poppler/CMap.h | 101 +
+ poppler/CairoFontEngine.cc | 367 ++++
+ poppler/CairoFontEngine.h | 61 +
+ poppler/CairoOutputDev.cc | 569 ++++++
+ poppler/CairoOutputDev.h | 146 ++
+ poppler/CairoOutputDevImage.cc | 87 +
+ poppler/CairoOutputDevImage.h | 43 +
+ poppler/CairoOutputDevX.cc | 211 ++
+ poppler/CairoOutputDevX.h | 117 ++
+ poppler/Catalog.cc | 364 ++++
+ poppler/Catalog.h | 87 +
+ poppler/CharCodeToUnicode.cc | 533 +++++
+ poppler/CharCodeToUnicode.h | 112 ++
+ poppler/CharTypes.h | 24 +
+ poppler/CompactFontTables.h | 464 +++++
+ poppler/Decrypt.cc | 399 ++++
+ poppler/Decrypt.h | 59 +
+ poppler/Dict.cc | 95 +
+ poppler/Dict.h | 75 +
+ poppler/Error.cc | 38 +
+ poppler/Error.h | 21 +
+ poppler/ErrorCodes.h | 36 +
+ poppler/FontEncodingTables.cc | 1824 +++++++++++++++++
+ poppler/FontEncodingTables.h | 20 +
+ poppler/Function.cc | 1525 ++++++++++++++
+ poppler/Function.h | 181 ++
+ poppler/Gfx.cc | 3079 +++++++++++++++++++++++++++++
+ poppler/Gfx.h | 279 +++
+ poppler/GfxFont.cc | 1508 ++++++++++++++
+ poppler/GfxFont.h | 313 +++
+ poppler/GfxState.cc | 2782 ++++++++++++++++++++++++++
+ poppler/GfxState.h | 1053 ++++++++++
+ poppler/GlobalParams.cc | 1764 +++++++++++++++++
+ poppler/GlobalParams.h | 312 +++
+ poppler/JArithmeticDecoder.cc | 300 +++
+ poppler/JArithmeticDecoder.h | 89 +
+ poppler/JBIG2Stream.cc | 3337 +++++++++++++++++++++++++++++++
+ poppler/JBIG2Stream.h | 141 ++
+ poppler/JPXStream.cc | 2822 ++++++++++++++++++++++++++
+ poppler/JPXStream.h | 338 ++++
+ poppler/Lexer.cc | 474 +++++
+ poppler/Lexer.h | 75 +
+ poppler/Link.cc | 851 ++++++++
+ poppler/Link.h | 407 ++++
+ poppler/Makefile.am | 140 ++
+ poppler/NameToCharCode.cc | 116 ++
+ poppler/NameToCharCode.h | 40 +
+ poppler/NameToUnicodeTable.h | 1097 ++++++++++
+ poppler/Object.cc | 231 +++
+ poppler/Object.h | 301 +++
+ poppler/Outline.cc | 151 ++
+ poppler/Outline.h | 74 +
+ poppler/OutputDev.cc | 104 +
+ poppler/OutputDev.h | 162 ++
+ poppler/PDFDoc.cc | 322 +++
+ poppler/PDFDoc.h | 176 ++
+ poppler/PDFDocEncoding.cc | 44 +
+ poppler/PDFDocEncoding.h | 16 +
+ poppler/PSOutputDev.cc | 3803 +++++++++++++++++++++++++++++++++++
+ poppler/PSOutputDev.h | 312 +++
+ poppler/PSTokenizer.cc | 135 ++
+ poppler/PSTokenizer.h | 39 +
+ poppler/Page.cc | 370 ++++
+ poppler/Page.h | 176 ++
+ poppler/Parser.cc | 231 +++
+ poppler/Parser.h | 58 +
+ poppler/SplashOutputDev.cc | 1348 +++++++++++++
+ poppler/SplashOutputDev.h | 194 ++
+ poppler/Stream-CCITT.h | 459 +++++
+ poppler/Stream.cc | 3979 +++++++++++++++++++++++++++++++++++++
+ poppler/Stream.h | 841 ++++++++
+ poppler/TextOutputDev.cc | 3529 +++++++++++++++++++++++++++++++++
+ poppler/TextOutputDev.h | 569 ++++++
+ poppler/UTF8.h | 56 +
+ poppler/UnicodeMap.cc | 293 +++
+ poppler/UnicodeMap.h | 122 ++
+ poppler/UnicodeMapTables.h | 361 ++++
+ poppler/UnicodeTypeTable.cc | 299 +++
+ poppler/UnicodeTypeTable.h | 18 +
+ poppler/XRef.cc | 1026 ++++++++++
+ poppler/XRef.h | 133 ++
+ poppler/poppler-config.h | 146 ++
+ poppler/poppler-config.h.in | 145 ++
+ splash/Makefile.am | 52 +
+ splash/Splash.cc | 1732 ++++++++++++++++
+ splash/Splash.h | 174 ++
+ splash/SplashBitmap.cc | 157 ++
+ splash/SplashBitmap.h | 46 +
+ splash/SplashClip.cc | 270 +++
+ splash/SplashClip.h | 86 +
+ splash/SplashErrorCodes.h | 30 +
+ splash/SplashFTFont.cc | 289 +++
+ splash/SplashFTFont.h | 53 +
+ splash/SplashFTFontEngine.cc | 141 ++
+ splash/SplashFTFontEngine.h | 58 +
+ splash/SplashFTFontFile.cc | 111 ++
+ splash/SplashFTFontFile.h | 68 +
+ splash/SplashFont.cc | 166 ++
+ splash/SplashFont.h | 87 +
+ splash/SplashFontEngine.cc | 245 +++
+ splash/SplashFontEngine.h | 83 +
+ splash/SplashFontFile.cc | 55 +
+ splash/SplashFontFile.h | 58 +
+ splash/SplashFontFileID.cc | 23 +
+ splash/SplashFontFileID.h | 28 +
+ splash/SplashGlyphBitmap.h | 24 +
+ splash/SplashMath.h | 45 +
+ splash/SplashPath.cc | 177 ++
+ splash/SplashPath.h | 105 +
+ splash/SplashPattern.cc | 64 +
+ splash/SplashPattern.h | 79 +
+ splash/SplashScreen.cc | 107 +
+ splash/SplashScreen.h | 38 +
+ splash/SplashState.cc | 99 +
+ splash/SplashState.h | 86 +
+ splash/SplashT1Font.cc | 251 +++
+ splash/SplashT1Font.h | 49 +
+ splash/SplashT1FontEngine.cc | 124 ++
+ splash/SplashT1FontEngine.h | 51 +
+ splash/SplashT1FontFile.cc | 96 +
+ splash/SplashT1FontFile.h | 55 +
+ splash/SplashTypes.h | 80 +
+ splash/SplashXPath.cc | 417 ++++
+ splash/SplashXPath.h | 90 +
+ splash/SplashXPathScanner.cc | 271 +++
+ splash/SplashXPathScanner.h | 72 +
+ test/Makefile.am | 48 +
+ test/gtk-cairo-test.cc | 298 +++
+ test/gtk-splash-test.cc | 314 +++
+ 177 files changed, 70512 insertions(+), 0 deletions(-)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/ConfigureChecks.cmake b/Build/source/libs/poppler/poppler-0.12.4/ConfigureChecks.cmake
new file mode 100644
index 00000000000..1ba656aa4c9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/ConfigureChecks.cmake
@@ -0,0 +1,47 @@
+# Copyright 2008 Pino Toscano, <pino@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckSymbolExists)
+include(CheckFunctionExists)
+include(CheckLibraryExists)
+include(CheckTypeSize)
+include(CheckCSourceCompiles)
+
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+
+check_function_exists(fseek64 HAVE_FSEEK64)
+check_function_exists(fseeko HAVE_FSEEKO)
+check_function_exists(ftell64 HAVE_FTELL64)
+check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
+check_function_exists(popen HAVE_POPEN)
+check_function_exists(mkstemp HAVE_MKSTEMP)
+check_function_exists(mkstemps HAVE_MKSTEMPS)
+
+macro(CHECK_FOR_DIR include var)
+ check_c_source_compiles(
+ "#include <${include}>
+
+int main(int argc, char *argv[])
+{
+ DIR* d = 0;
+ return 0;
+}
+" ${var})
+endmacro(CHECK_FOR_DIR)
+check_for_dir("dirent.h" HAVE_DIRENT_H)
+check_for_dir("ndir.h" HAVE_NDIR_H)
+check_for_dir("sys/dir.h" HAVE_SYS_DIR_H)
+check_for_dir("sys/ndir.h" HAVE_SYS_NDIR_H)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/INSTALL b/Build/source/libs/poppler/poppler-0.12.4/INSTALL
new file mode 100644
index 00000000000..56b077d6a0b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/Makefile.am
new file mode 100644
index 00000000000..2a752622b9e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/Makefile.am
@@ -0,0 +1,92 @@
+ACLOCAL_AMFLAGS = -I m4
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
+if BUILD_SPLASH_OUTPUT
+splash_subdir = splash
+splash_pc_file = poppler-splash.pc
+endif
+
+if BUILD_CAIRO_OUTPUT
+cairo_pc_file = poppler-cairo.pc
+endif
+
+if BUILD_POPPLER_GLIB
+glib_subdir = glib
+glib_pc_file = poppler-glib.pc
+endif
+
+if BUILD_POPPLER_QT
+qt_subdir = qt
+qt_pc_file = poppler-qt.pc
+endif
+
+if BUILD_POPPLER_QT4
+qt4_subdir = qt4
+qt4_pc_file = poppler-qt4.pc
+endif
+
+if BUILD_UTILS
+utils_subdir = utils
+endif
+
+SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) $(qt_subdir) test $(qt4_subdir)
+
+EXTRA_DIST = \
+ README-XPDF \
+ poppler.pc.in \
+ poppler-cairo.pc.in \
+ poppler-splash.pc.in \
+ poppler-qt.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ poppler.pc \
+ $(cairo_pc_file) \
+ $(splash_pc_file) \
+ $(glib_pc_file) \
+ $(qt_pc_file) \
+ $(qt4_pc_file)
+
+# Add CMake buildsystem files here so they get added on make dist
+EXTRA_DIST += \
+ glib/demo/CMakeLists.txt \
+ glib/CMakeLists.txt \
+ glib/poppler-features.h.cmake \
+ qt/CMakeLists.txt \
+ qt4/src/CMakeLists.txt \
+ qt4/tests/CMakeLists.txt \
+ qt4/CMakeLists.txt \
+ qt4/demos/CMakeLists.txt \
+ test/CMakeLists.txt \
+ utils/CMakeLists.txt \
+ CMakeLists.txt \
+ ConfigureChecks.cmake \
+ cmake/modules/COPYING-CMAKE-SCRIPTS \
+ cmake/modules/FindCairo.cmake \
+ cmake/modules/FindFontconfig.cmake \
+ cmake/modules/FindGTK.cmake \
+ cmake/modules/FindLCMS.cmake \
+ cmake/modules/FindQt3.cmake \
+ cmake/modules/FindQt4.cmake \
+ cmake/modules/MacroBoolTo01.cmake \
+ cmake/modules/MacroEnsureVersion.cmake \
+ cmake/modules/MacroOptionalFindPackage.cmake \
+ cmake/modules/MacroPushRequiredVars.cmake \
+ cmake/modules/PopplerDefaults.cmake \
+ cmake/modules/PopplerMacros.cmake \
+ cmake/modules/FindLIBOPENJPEG.cmake \
+ config.h.cmake \
+ poppler-cairo.pc.cmake \
+ poppler-config.h.cmake \
+ poppler-glib.pc.cmake \
+ poppler-qt.pc.cmake \
+ poppler-qt4.pc.cmake \
+ poppler-splash.pc.cmake \
+ poppler.pc.cmake
+
+
+
+dist-hook: ChangeLog
+
+ChangeLog : .git/HEAD
+ $(AM_V_GEN) git log --stat > ChangeLog
diff --git a/Build/source/libs/poppler/poppler-0.12.4/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/Makefile.in
new file mode 100644
index 00000000000..5b9a487ee04
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/Makefile.in
@@ -0,0 +1,906 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/poppler-cairo.pc.in $(srcdir)/poppler-glib.pc.in \
+ $(srcdir)/poppler-qt.pc.in $(srcdir)/poppler-qt4.pc.in \
+ $(srcdir)/poppler-splash.pc.in $(srcdir)/poppler.pc.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ TODO config.guess config.sub depcomp install-sh ltmain.sh \
+ missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES = poppler.pc poppler-cairo.pc poppler-splash.pc \
+ poppler-glib.pc poppler-qt.pc poppler-qt4.pc
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = goo fofi splash poppler utils glib qt test qt4
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+ACLOCAL_AMFLAGS = -I m4
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+@BUILD_SPLASH_OUTPUT_TRUE@splash_subdir = splash
+@BUILD_SPLASH_OUTPUT_TRUE@splash_pc_file = poppler-splash.pc
+@BUILD_CAIRO_OUTPUT_TRUE@cairo_pc_file = poppler-cairo.pc
+@BUILD_POPPLER_GLIB_TRUE@glib_subdir = glib
+@BUILD_POPPLER_GLIB_TRUE@glib_pc_file = poppler-glib.pc
+@BUILD_POPPLER_QT_TRUE@qt_subdir = qt
+@BUILD_POPPLER_QT_TRUE@qt_pc_file = poppler-qt.pc
+@BUILD_POPPLER_QT4_TRUE@qt4_subdir = qt4
+@BUILD_POPPLER_QT4_TRUE@qt4_pc_file = poppler-qt4.pc
+@BUILD_UTILS_TRUE@utils_subdir = utils
+SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) $(qt_subdir) test $(qt4_subdir)
+
+# Add CMake buildsystem files here so they get added on make dist
+EXTRA_DIST = README-XPDF poppler.pc.in poppler-cairo.pc.in \
+ poppler-splash.pc.in poppler-qt.pc.in glib/demo/CMakeLists.txt \
+ glib/CMakeLists.txt glib/poppler-features.h.cmake \
+ qt/CMakeLists.txt qt4/src/CMakeLists.txt \
+ qt4/tests/CMakeLists.txt qt4/CMakeLists.txt \
+ qt4/demos/CMakeLists.txt test/CMakeLists.txt \
+ utils/CMakeLists.txt CMakeLists.txt ConfigureChecks.cmake \
+ cmake/modules/COPYING-CMAKE-SCRIPTS \
+ cmake/modules/FindCairo.cmake \
+ cmake/modules/FindFontconfig.cmake cmake/modules/FindGTK.cmake \
+ cmake/modules/FindLCMS.cmake cmake/modules/FindQt3.cmake \
+ cmake/modules/FindQt4.cmake cmake/modules/MacroBoolTo01.cmake \
+ cmake/modules/MacroEnsureVersion.cmake \
+ cmake/modules/MacroOptionalFindPackage.cmake \
+ cmake/modules/MacroPushRequiredVars.cmake \
+ cmake/modules/PopplerDefaults.cmake \
+ cmake/modules/PopplerMacros.cmake \
+ cmake/modules/FindLIBOPENJPEG.cmake config.h.cmake \
+ poppler-cairo.pc.cmake poppler-config.h.cmake \
+ poppler-glib.pc.cmake poppler-qt.pc.cmake poppler-qt4.pc.cmake \
+ poppler-splash.pc.cmake poppler.pc.cmake
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ poppler.pc \
+ $(cairo_pc_file) \
+ $(splash_pc_file) \
+ $(glib_pc_file) \
+ $(qt_pc_file) \
+ $(qt4_pc_file)
+
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+poppler.pc: $(top_builddir)/config.status $(srcdir)/poppler.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+poppler-cairo.pc: $(top_builddir)/config.status $(srcdir)/poppler-cairo.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+poppler-splash.pc: $(top_builddir)/config.status $(srcdir)/poppler-splash.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+poppler-glib.pc: $(top_builddir)/config.status $(srcdir)/poppler-glib.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+poppler-qt.pc: $(top_builddir)/config.status $(srcdir)/poppler-qt.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+poppler-qt4.pc: $(top_builddir)/config.status $(srcdir)/poppler-qt4.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-pkgconfigDATA
+
+
+dist-hook: ChangeLog
+
+ChangeLog : .git/HEAD
+ $(AM_V_GEN) git log --stat > ChangeLog
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/NEWS b/Build/source/libs/poppler/poppler-0.12.4/NEWS
new file mode 100644
index 00000000000..5e39ba006a1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/NEWS
@@ -0,0 +1,822 @@
+Release 0.12.4
+
+ core:
+ * Fix Uncover and Fade transition parsing. Bug #26034
+ * Fix GfxRadialShading::GfxRadialShading. KDE bug #223359
+ * Fix a memory leak in CairoFontEngine
+ * Use the right matrix for the mask in drawMaskedImage() in CairoOutputDev. Bug #16906
+ * Only assume a OC is not visible if it exists and is set to no. Bug #26532
+ * Guard agains malloc returning NULL in SplashFTFont
+
+ qt4:
+ * Update requirement to Qt 4.4
+
+ glib:
+ * Use PDFDoc(wchar_t *, ...) on Windows. Bug #25032
+
+ build system:
+ * fix typo: "MULTITHREAD" -> "MULTITHREADED" in CMake
+
+Release 0.12.3
+
+ core:
+ * Be more lenient with /Decode key on images. Bug #17439
+ * Correctly initialize fileName in LinkGoToR. Bug #25221
+ * Improve the reconstruction of the XRef for broken files
+ * [Cairo backend] Do not crash on malformed files. Bug #24575
+ * Accept Fontname if FontName is not present. KDE bug #217013
+ * Make PSOutputDev code a bit more resilient
+ * Fix writing of null objects. Bug #25465
+ * [Cairo backend] Fix crash in some documents. GNOME bug #603934
+ * Correctly initialize profileCommands in Gfx constructor
+
+ build system:
+ * Check for openjpeg in the C++ part as it uses bool in the header. Bug #25103
+
+Release 0.12.2
+
+ core:
+ * Fix a memory leak when converting to PostScript
+ * Fix crash when reading a font fails. Bug #24525
+ * Make the ICC cache per page instead of global. Bug #24686
+ * Do not accept negative interval lengths in the page labels tree. Bug #24721
+ * Do not crash on files Aspect of Movie objects are reals instead of integers. Bug #24733
+ * Do not render patterns when using CairoImageOutputDev
+ * Allow Transitions dictionary to be a Ref
+ * Do not crash if jpeg_start_decompress fails. KDE bug #214317
+
+ glib:
+ * Fix CVE-2009-3607
+
+ qt4:
+ * Use '.' in the annotations XML instead of the decimal separator of the current locale
+
+Release 0.12.1
+
+ core:
+ * Fix compilation on some compilers
+ * Only initialize the font list once in Windows32/MSVC
+ * Do not crash on fonts without CharCodeToUnicode. Bug #24036
+ * Fix regression due to not setting LC_NUMERIC anymore
+ * Improve realibility for Streams with broken Length. Bug #6841
+ * Write the Info into the trailer dict if there is one. Bug #24091
+ * Do not crash when saving files that come from a stream without name. Bug #24090
+ * Improve relability of the save function
+ * Fix the Length value if it was wrong when saving
+ * Fix includes for those using internal headers
+ * Rework how hinting is used in the splash backend. It is disabled by default now
+ * fix constructor of DCTStream when using internal decoder
+ * Security fixes based xpdf 3.02pl4
+
+ qt4:
+ * Add the possibility of setting wheter to use or not font hinting
+ * Add a way for converters to return more exact errors they had when converting
+ * Check the document is not locked when converting to PS
+
+ build system:
+ * Compile on Cygwin
+ * Use _WIN32 instead of WIN32. Bug #24259
+ * Add the possibility to pass LIB_SUFFIX when using CMake
+
+Release 0.12.0
+
+ core:
+ * Fix printf format security warnings
+ * Improve rendering of radial shadings. Bug #20238
+ * Better fallback when there's a font type mismatch. Bug #17252
+ * Do not crash on attachments without data stream. Bug #10386
+ * Fix infinite loop in JBIG2Decoder. Bug #23025
+
+ build system:
+ * Minimizes pkg-config dependencies for Qt frontends
+ * Add automake 1.11 support
+ * Use the newest automake found and not the oldest
+ * Support AM_SILENT_RULES when using automake 1.11
+
+ utils:
+ * Add common options to pdftoabw
+
+Release 0.11.3 (0.12 RC 1)
+
+ core:
+ * Optimization in the Cairo renderer for some fonts
+ * Do not apply masks when fill color space mode is csPattern in the Cairo renderer. Bug #22216
+ * Check for overflow when parsing integers. Bug #23078
+ * Do not save the font file twice for FreeType fonts in the Cairo renderer. Bug #20491
+ * Use current fill_opacity when drawing images in the Cairo renderer
+ * Fix alpha rendering in some files in the Splash renderer. Bug #22143, #22152
+ * Implement tiling patterns in the Cairo renderer
+ * When converting a cm matrix to PS write 4 significant digits for numbers < 1 not 4 decimals. Bug #23332
+ * Fix changing of locale, now poppler no longer changes LC_NUMERIC to "C"
+ * Return PDF version as two integers instead of as a double
+
+ Qt4:
+ * Addition of the Color Management API
+ * Small fix to documentation
+ * Fix backwards text search
+
+ utils:
+ * Add the -png flag to pdftoppm to output to PNG
+
+Release 0.11.2 (0.12 Beta 2)
+
+ core:
+ * Make DecryptStream return sane values for getPos(). Bug #19706
+ * Fix bug when printing pdf with multiple page sizes in duplex mode
+ * Initilize AnnotColot properly when the Array is not correct
+ * Fix crash on some files with forms. Bug #22485
+ * Fix crash in files with invalid embedded files. Bug #22551
+ * Improve FileSpec attribute parsing
+ * Cairo output device improvements. Bugs #10942, #18017, #14160
+ * Implement blend modes in cairo backend
+ * Handle fontType1COT fonts in CairoFontEngine
+ * Fix generation of PS for some files. Bug #18908
+ * Don't use byte_lookup table when color space doesn't support getLine methods. Bug #11027
+ * Fix rendering of PDF files with malformed patterns. Bug #22835
+ * Add the possibility of disabling font substitution in pdftops. Bug #23030
+ * Fix some radio buttons not being detected as such
+
+ glib:
+ * Improvements to the demo
+
+ Qt4:
+ * Improvements to the demo
+
+ build system:
+ * Use gtkbuilder rather than libglade for some tests
+
+ utils:
+ * Fix bug with noCrop parameter in pdftops
+
+Release 0.11.1 (0.12 Beta 1)
+
+ core:
+ * Support colorizing text in pattern colorspace. Bug #19670 and #19994
+ * Add the possibility of forcing no hinting of fonts in the Splash backend
+ * Support multiple page sizes when converting to PS. Bug #19777
+ * Also tokens with leading 00 when parsing the char to unicode map. Bug #22025
+ * Improvements of rendering speed in documents using PS transformations a lot. Bug #21562
+ * More work on Annotations support
+ * Use Interpolate flag to decide whether applying image interpolation during rendering. Bug #9860
+ * Handle Streams in CMap definitions. Bug #22334
+ * Fix some bugs in JBIG2Stream handling
+ * Fix dashed line in page 1 of bug 20011
+ * Fix exit(1) when rendering a file
+ * Fix pdftops crash on file from KDE bug #174899
+ * Fix PS generation in some files. Bug #20420
+ * Do not create the GfxColorTransform if the lcms could not be created. Bug #20108
+ * Check Mask entries are int before using them, if they are real cast to int and try to use them. Bug #21841
+ * Use the correct value when creating the V field for form combo boxes
+ * Give an error when using level1sep in pdftops without having CMYK support. Bug #22026
+ * Don't include lcms.h in GfxState.h
+ * Fix splashColorModeNComps to correctly include all values for each SplashColorMode
+ * Add splashClearColor that assigns white to the given colorptr
+ * Kill support for specifying extension in openTmpFile. Bug #21713
+ * Fix "Conditional jump or move depends on uninitialised value". Bug #20011
+
+ glib:
+ * Add poppler_annot_markup_has_popup()
+ * Hyphenate UTF-8 and UTF-16BE. Bug #21953
+ * Use g_strerror instead of strerror. Bug #22095
+ * Fix a crash when a destination points to an invalid page
+ * Improvements to the demo
+
+ Qt4:
+ * Add LinkDestination::destinationName()
+ * Do not try to resolve named destinations for GoTo links pointing to external documents
+ * Add Page::thumbnail()
+ * Improvements to the demo
+ * Improvements to the documentation
+
+ build system:
+ * Build fix for MSVC
+ * Better lcms cmake check comming from kdelibs
+ * Use pkgconfig for autotools lcms check
+ * Remove unneeded files from repo. Bug #22094
+
+Release 0.11.0 (0.12 Alpha)
+
+ core:
+ * Add initial support for color management
+ * Remove case-insensitive matching of filenames in PDFDoc constructor
+ * Fix extraction of some ActualText content
+ * More work on Annotations support
+ * Improve font rendering in Cairo output device
+ * Fix bug in cairo backend with nested masks
+ * Fix cairo luminosity smask rendering
+ * Add optionally text support to Cairo output device
+ * Add the possibility of setting the datadir on runtime
+ * Return an error code instead of a boolean when saving
+ * Make the font scanner more versatile
+ * Small opimization in documents that use PostScriptFunction transforms
+ * Minor optimization to Stream handling
+ * Fix some compile warnings
+
+ glib:
+ * Optional content support
+ * More work on Annotations support
+ * Improvements to the demo
+ * Documentation improvements
+ * Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES
+
+ Qt4:
+ * Support URI actions for Table Of Contents items
+ * Documentation improvements
+ * Improvements to the demo
+ * Add a FontIterator for iterating through the fonts of the document
+
+ utils:
+ * Allow the use of cropbox in pdftoppm
+ * Make pdftohtml output png images when the image stream is not a jpeg
+ * Make pdftotext accept cropping options like pdftoppm
+ * Support rendering non-square pixels in pdftoppm
+
+ build system:
+ * Require Cairo 1.8.4 for the Cairo output device
+ * Require CMake 2.6 when using the CMake build system
+ * Optionally require libpng for pdftohtml
+ * Optionally require libcms for color management
+
+Release 0.10.6
+
+ core:
+ * Fix problems that happen when parsing broken JBIG2 files.
+ CVE-2009-0799, CVE-2009-0800, CVE-2009-1179, CVE-2009-1180
+ CVE-2009-1181, CVE-2009-1182, CVE-2009-1183, CVE-2009-1187, CVE-2009-1188
+ * Fix parsing of incorrect border arrays. Bug #19761
+ * Fix clip test for fonts. Bug #20950
+ * Fix getGlyphAdvance to behave correctly on font size changes. Bug #20769
+ * Misc build fixes
+
+ build system:
+ * Fix the Qt4 version we need
+
+Release 0.10.5
+
+ core:
+ * Read the UF entry if present and prefer it over F in Filespec dictionary
+ * Fix typo that was making CairoOutputDev crash on some files. Bug #17337
+ * Make JBIG2Stream more robust to corrupt input data
+ * Do not blindly follow loops parsing OutlineItem. Bug #18364
+ * Set up the error manager before calling jpeg_create_decompress. Bug #20484
+ * Check there is an optional content config before using it. Bug #20587
+ * Fix rendering of some PDF with OpenType fonts. Bug #20605
+
+ build system:
+ * Yet more support for build on windows
+ * Use AC_CHECK_HEADER to find headers. Bug #20538
+ * Check for pkgconfig before using it
+ * General autotools improvements
+
+Release 0.10.4
+
+ core:
+ * Fix a memory leak when asking for a document-level JS
+ * Do not crash in some PDF we do not parse correctly. Bug #19702
+ * Fix crash on unexepcted form Opt value. Bug #19790
+
+ utils:
+ * Fix pdfimages to extract i color components per pixel jpeg images. Bug #19789
+
+Release 0.10.3
+
+ core:
+ * Fix a crash on documents with malformed outline. Bug #19024
+ * Fix leak on AnnotScreen destructor. Bug #19095
+ * Fix wrong PS generation when a large image is in Patterns. Bug #18908
+ * Remove BaseFile.h it was never used. Bug #19298
+ * Improve document saving
+ * Fix PS generation of PDF with malformed font Length2 definition
+ * Fix a leak while parsing annotations
+ * Fix rendering of some checkboxes
+
+ Qt4:
+ * Fix positioning of Form rects on PDF with cropbox
+ * Fix positioning of Annotation rects on PDF with cropbox. Bug #18558.
+ * Small documentation improvements
+ * Make Document::fonts() work when called more than once. Bug #19405
+
+ build system:
+ * CMake: look harder for openjpeg
+ * CMake: update the poppler core headers installation
+ * Autotools: do not install Function.cc as it's not a header
+
+ Qt:
+ * Fix deserialization of links right coordinate
+
+Release 0.10.2
+
+ core:
+ * Fix a crash when selecting text in word mode
+ * Fix a crash in some malformed documents (second argument of opMarkPoint is not a dictionary)
+ * Ensure cairo font matrix is invertable. Fixes bugs #18254 and #18429
+ * Fix a memory leak (Bug #18924)
+
+ Qt4:
+ * Fix deserization of links right coordinate
+
+ misc:
+ * Fix build on Solaris 10 + Sun Studio 12
+ * Compile with -pedantic
+
+Release 0.10.1
+
+ core:
+ * Improvements in Optional Content support
+ * Small fix in Form support
+ * Fix memory leak in case of error
+ * Fix potential crash on text search
+ * Try render documents with invalid indexed color space parameters. Bug #18374
+ * Fix crash on text extraction when poppler-data is not installed. Bug #18023
+
+ Qt:
+ * Fix two memory leaks
+
+ Qt4:
+ * Small documentation improvement
+ * Fix memory leak in the demo code
+
+Release 0.10.0
+
+ core:
+ * Fix crashes on PDF using Stitching or Axial Shading painting
+ * Fix rendering of PDF with Type1 fonts that have more than
+ one encoding definition per line
+ * Do not try to save documents that have Encryption as we
+ do not support that and the user ended with a broken file
+ * Fix crash on files with OptionalContentGroup but no Name
+
+ Qt4:
+ * Fix the area of the links to be correctly reported on rotated documents
+
+ misc:
+ * Mingw+Msys should work
+
+Release 0.9.3 (0.10 RC 2)
+
+ core:
+ * Fix rendering regression on some embedded fonts
+ * Fix rendering regression of some special fonts
+ * Fix crash on documents with bogus jpeg data
+
+ Qt4:
+ * The printing flag defaults to true on PSConverter
+ * Documentation improvement
+
+ utils:
+ * Fix regression that made HmtlOutputDev ignore jpeg images
+
+ misc:
+ * Improve compilation on mingw
+
+Release 0.9.2 (0.10 RC 1)
+
+ core:
+ * Fix conversion to PS some files (bug #17645)
+ * Small Form fixes
+ * Small JS fixes
+ * Improve memory usage of the cairo renderer
+
+ utils:
+ * Fix mismatched free/delete in pdftohtml
+ * Fix memory leak in pdftohtml
+ * Fix crash in pdftohtml
+
+ glib:
+ * Fix a crash in forms demo
+
+ misc:
+ * Compile with -pedantic
+
+Release 0.9.1 (0.10 Beta 2)
+
+ Core:
+ * Fix crash on some AESv2 encrypted files (bugs #13972, #16092, #17523)
+ * Improve parsing of broken files (bug #17568)
+
+ glib frontend:
+ * Minor improvements to the demo application
+
+ utils:
+ * pdftohtml: Generate the outline file in the same place
+ of the other generated files (bug #17504)
+
+Release 0.9.0 (0.10 Beta 1)
+
+ Core:
+ * Initial JavaScript support
+ * Annotation improvements
+ * Improvements in the Arthur based renderer
+ * Improvements in the Cairo based renderer
+ * Added a JPEG2000 decoder based on OpenJPEG
+ * Small fixes in ActualText implementation
+ * Fix jpeg rendering when not using the libjpeg based decoder
+ * Movie fixes
+ * Do not get out of memory on documents that specify huge fonts
+ * Emulate Adobe Reader behaviour on documents with duplicate keys in Dictionaries
+ * Forms improvements
+
+ Qt4 frontend:
+ * Annotation improvements
+ * Forms improvements
+ * Add the possibility of extracting embedded fonts
+ * Initial Movie support
+ * Documentation improvements
+ * Small improvements in the PS exporter
+
+ glib frontend:
+ * Annotation improvements
+ * Attachment fixes
+
+ utils:
+ * updated man pages
+ * Added -listenc to pdfinfo and pdftotext
+
+Release 0.8.7
+
+ Core:
+ * Fix regression in Form rendering
+ * Fix memory leak in the cairo backend
+
+Release 0.8.6
+
+ Core:
+ * Call error() when font loading fails
+ * Be less strict parsing TTF tables (bug #16940)
+ * Fix crash due to uninitialized variable
+
+ Qt 4 frontend:
+ * Make the paper color setting working as it should
+ * Make sure to use the correct page width/height for form widgets coordinates
+
+Release 0.8.5
+
+ Core:
+ * Fix crash on PDF that define a page thumbnail but it's not a Stream
+ * Fix crash when Annots object is not of the desired type
+ * Fix crash when obtaining fonts in PDF where XObjects link themselves in loops
+ * Fix crash on documents with an IRT object
+ * Saving should work much better now
+ * Plug some memory leaks in Annotation handling
+
+ Utils:
+ * pdftohtml: Don't crash on documents that specify an invalid named dest for a link
+ * pdftohtml: Make html output to keep all the spaces with &nbsp;
+ * pdftohtml: Improve a bit text layout
+ * pdftohtml: Make xml output valid xml
+
+Release 0.8.4
+
+ Core:
+ * Fix leak in ABWOutputDev.cc
+ * Fix uninitialized variable that broke file saving in some cases
+ * Use a single global FT_Library in CairoOutputDev.
+ Fixes some crashes in CairoOutputDev.
+
+ Qt 4 frontend:
+ * Fix saving over existing files
+
+ build system:
+ * Make sure Qt4 moc is used to generate moc files in Qt4 frontend
+
+Release 0.8.3
+
+ Core:
+ * Fix crash when reading some PDF with annotations
+ * Fix crash on PDF that reference Optional Content elements that don't exist
+ * Fix leaks on error conditions
+ * Do not limit CharCodeToUnicodeString to 8 characters
+ * Support for surrogates outside the BMP plane
+
+ Qt 3 frontend:
+ * Fix crash when reading PDF with password
+ * Fix leak when calling scanForFonts()
+
+ Qt 4 frontend:
+ * Fix the text() method
+
+ Splash renderer:
+ * Fix compilation with --enable-fixedpoint
+
+Release 0.8.2
+
+ core:
+ * Fix call broken by a fix introduced in 0.8.1
+
+Release 0.8.1
+
+ core:
+ * Do not call FT_Done_Face on a live cairo_font_face_t as it might cause crashes
+ * Do not take into account Colorspace resource subdictionary for image XObjects
+ * Downsample 16 bit per component images to 8 bit per component so they render
+
+ build system:
+ * Link to pthread when the system needs it
+
+ windows:
+ * Fix comparing against NULL instead against INVALID_HANDLE_VALUE when calling FindFirstFile
+
+Release 0.8.0
+
+ * Fix caching of members in the glib frontend causing issues with rendering
+ * Change glib public api to have a correct naming
+ * Some better error handling on corner cases
+ * Check the document stream is seekable when opening it
+ * Build fixes with autotools and with cmake
+ * Fix infinite recursion on some malformed documents when consulting the fonts
+ * Fix possible crash when asking for Movie contents
+
+Release 0.7.3 (0.8 RC 2)
+
+ * Fix regression in Splash renderer
+ * Fix off-by-one write in Splash
+ * Plug some minor leaks in Optional Content code
+ * Improve error handling when creating a document in the glib frontend
+
+Release 0.7.2 (0.8 RC 1)
+
+ Major Changes:
+ * Improve font matching not forcing default values onto Fontconfig
+ * Add preliminary annotations support in the glib frontend
+ * Initial Movie support in the core
+ * Make GDK dependency optional in glib bindings
+
+ Minor Changes:
+ * Make the core able to read mime types of embedded files
+ * Qt4 API for accessing mime types of embedded files
+ * Handle correctly check state of optional content groups
+ regarding parents state
+ * Avoid setting singular CTM matrices on the Cairo backend
+ * Improved Qt4 API to get character position
+ * Qt4 api documentation improvements
+ * Qt4 minor stability fixes
+ * Proper lib64 Qt detection
+ * Fix build when compiling without cairo support
+
+Release 0.7.1 (0.8 Beta 2)
+
+ Major Changes:
+ * Really distribute CMake files as optional build tool
+ * Initial Optional Content support in core and in the Qt4 frontend
+
+ Minor Changes:
+ * Allow grouped checkboxes to be selected individually
+ * Qt4 demo program improvements
+ * Keep cairo and cairo_shape consistent
+ * Safety checks on Splash renderer so that it does not draw outside the allocated bitmap
+ * Do not try to display bitmaps of invalid size
+ * Fix building with exceptions
+ * Improvements for building with MSVC and CMake
+
+Release 0.7.0 (0.8 Beta 1)
+
+ * Saving support
+ * Partial annotation support
+ * Forms improvements
+ * Add support for ActualText entries
+ * Display characters outside of unicode BMP with TT font
+ * CJK rendering fixes
+ * Implement Adobe Glyph Naming convention for fonts
+ * CMake as optional build tool
+ * Better font scaling for non embedded fonts
+ * Preserve PDF page labels when we output as postscript
+
+Release 0.6.4
+
+ Qt4 frontend:
+ * Fix crash on links that point to a non existant page
+ * Make Document::renderHints return the correct render hints
+ * Fix infinite loop when parsing LineAnnotation
+
+ core:
+ * Fix crash in the Splash renderer when T3 fonts are badly defined
+ * Draw underlined Links correctly
+
+ utils:
+ * Fix two use after free bugs in HtmlOutputDev.cc
+
+ build system:
+ * Fix build on mingw32
+
+ tests:
+ * Distribute the glade file of pdf-inspector
+
+Release 0.6.3
+
+ core:
+ * Fix crash in extra debug code
+
+ glib frontend:
+ * Make sure passwords are passed correctly to poppler core
+
+ Qt frontend:
+ * Fix crash on documents that specify an empty date
+
+ build system:
+ * Disable gtk tests if the user disabled glib frontend
+
+Release 0.6.2
+
+ poppler core:
+ * Fix CVE-2007-4352, CVE-2007-5392 and CVE-2007-5393
+ * Fix a crash on documents with wrong CCITTFaxStream
+ * Fix a crash in the Cairo renderer with invalid embedded fonts
+ * Fix a crash with invalid TrueType fonts
+ * Check if font is inside the clip area before rendering
+ it to a temporary bitmap in the Splash renderer. Fixes crashes on
+ incorrect documents
+ * Do not use exit(1) on DCTStream errors
+ * Detect form fields at any depth level
+ * Do not generate appearance stream for radio buttons that are not active
+ * mingw fixes
+
+ build system:
+ * Require fontconfig >= 2.0
+ * builddir != srcdir fixes
+
+ Qt4 frontend:
+ * Improved documentation
+
+ misc:
+ * Fix FSF address
+
+Release 0.6.1
+
+ poppler core:
+ * Fix printing with different x and y scale
+ * Fix crash when Form Fields array contains references to non existent objects
+ * Fix crash in CairoOutputDev::drawMaskedImage()
+ * Fix embedded file description not working on some cases
+
+ Qt4 frontend:
+ * Fix printing issue
+ * Avoid double free
+ * Fix memory leak when dealing with embedded files
+
+ glib frontend:
+ * Fix build with --disable-cairo-output
+ * Do not return unknown field type for signature form fields
+
+ build system:
+ * Support automake-1.10
+ * More compatible sh code in qt.m4
+
+ utils:
+ * Fix build on Sun Studio compiler
+
+Release 0.6
+
+ - CairoOutputDev fixes
+ - Allow pdftoppm to read/write from stdin/stdout
+ - API work on Qt4 frontend
+ - Fix pdfimages produces inverted image for black & white image
+ - Fix error on the NFKC text matching routine
+ - Add support for word and line selections
+ - Do not enforce %%EOF at the end of file
+ - Pad zeroes instead of aborting when rendering 1-bit images
+ and the stream is too short
+ - Update glib bindings documentation
+
+Release 0.5.91 (0.6 Release Candidate 2)
+
+ - Various memory leaks fixed
+ - Compile with --enable-fixedpoint. Bug #11110
+ - Header cleanup
+ - Remove dependency on debugxml. Bug #11187
+ - Allow access to document metadata in glib and qt4 frontends
+ - Several glib API frontend improvements
+ - Fix crash on accessing embedded files
+ - Build on Sun Force compiler
+ - Render '*' instead of the actual content in password form fields
+ - Fix pdftohtml complex output. Bug #9746 and #11610
+ - Windows build fixes
+ - Improve Japanese font support. Bug #11413
+ - Do not exit the program on files that confuse libjpeg
+ - Update required cairo version to 1.4
+ - Fix CVE-2007-3387
+
+Release 0.5.9 (0.6 Release Candidate)
+
+ - Merge xpdf 3.02 changes
+ - Qt4 frontend is not marked anymore as unstable
+ - Support for Sound objects
+ - Support for Opening/Closing page actions
+ - Support for page duration
+ - Improve PS Tokenizer performance thanks to Scott Turner
+ - Various speed ups by Krzysztof Kowalczyk
+ - Beginning of Interactive Form support by Julien Rebetez
+ - xpdfrc is no longer used for anything
+ - Add AbiWord output device and pdftoabw program by Jauco Noordzij
+ - Fix security issue MOAB-06-01-2007
+ - Lots of bugs fixed
+
+Release 0.5.4
+
+ - Automatically read in CJK encoding files if they're
+ installed (#2984, #7105, #7093). This works with the new
+ poppler-data package.
+ - Speed ups by Krzysztof Kowalczyk (#8112)
+ - Patch from Dom Lachowicz to let the utils take input on stdin.
+ - Bugs fixed (#8182, #4649, #7906, #8048, #7113, #4515, #3948,
+ #7924, #7780, #7646, #6948, #7788, #7661, #7005)
+
+Release 0.5.3
+
+ - Add poppler as a private requires of poppler-glib.
+ - Allow CairoFont creation to fail more gracefully (#4030).
+ - Back out the rest of krh's type3 font work.
+ - Revert splashModeRGB8 changes.
+ - Add missing poppler-annotation-helper.h.
+
+Release 0.5.2
+
+ - Much improved Qt bindings (Albert Astals Cid).
+ - Cairo backend now supports masked images (Jeff Muizelaar, #6174).
+ - Patches from Kouhei Sutou to make glib bindings more
+ language binding friendly (#6907, #6897, #6899, #6905).
+ - Search now works with ligatures (Ed Catmull, #2929).
+ - The glib bindings now has an entry point to render to a cairo_t.
+ - GCC 4.1 and MSVC compilation fixes.
+ - Memory leaks plugged: #6908, #6947, #6765, #6764, #6187
+ - Misc bug fixes: #6984, #6896, #6913, #6926, #4481, #5951,
+ #6551, #6500, #6492, #6454, #6079, #6167.
+
+Release 0.5.1
+
+ - Support for embedded files.
+ - Handle 0-width lines correctly.
+ - Avoid external file use when opening fonts.
+ - Only use vector fonts returned from fontconfig (#5758).
+ - Fix scaled 1x1 pixmaps use for drawing lines (#3387).
+ - drawSoftMaskedImage support in cairo backend.
+ - Misc bug fixes: #5922, #5946, #5749, #5952, #4030, #5420.
+
+Release 0.5.0
+
+ - Font matching code for non embedded fonts now use fontconfig
+ instead of hard coded list of fonts.
+ - Merge in Xpdf 3.01 changes.
+ - Add command line tools from Xpdf.
+ - Make install of Xpdf header files ./configure'able.
+
+Release 0.4.0
+
+ - Real text selection.
+ - API breakage in glib wrapper: dropping dest_x and dest_y
+ arguments from poppler_page_render_to_pixbuf().
+
+Release 0.3.3
+
+ - New glib API to get document font information (Marco).
+ - More document properties available as glib properties (Emil
+ Soleyman-Zomalan, #3359)
+ - Optimize color conversion for images.
+ - Support for constant opacity.
+ - Fix problems with pkg-config files.
+ - Bugs fixes: #3491, #2911, #3362, #3340, #3265, #3239, #3396.
+
+Release 0.3.2
+
+ - New API to get poppler version and backend type.
+ - Various font fixes from Albert Astals Cid.
+ - Update to cairo 0.5.0 API, including better font support.
+ - Meta data for the glib binding.
+
+Release 0.3.1
+
+ - Add qt/poppler-private.h to SOURCES
+ - Jeff's path to use zlib instead of builtin decompression.
+ - Bug fixes: #2934, segfault on invalid links, #3114
+
+Release 0.3.0
+
+ - First cut at qt wrapper, including a getText() method for
+ getting text from a page.
+ - More glib functionality: meta data, set page orientation,
+ print to PS
+ - Performance fixes for glib cairo
+ - Bug fixes
+
+Release 0.2.0 (Tue Apr 5 12:32:10 EDT 2005)
+
+ - Add glib wrapper for poppler, which will use cairo rendering
+ if available
+ - Support for page labels
+ - configure and build fixes.
+
+Release 0.1.2 (Wed Mar 9 10:45:58 EST 2005)
+
+ - cairo optimizations and fixes from Jeff Muizelaar
+ - Bump cairo requirement to 0.4
+ - Make cairo and gtk checks fail gracefully
+
+Release 0.1.1
+
+ - Fix issues with installed header files including config.h
+ - Fix a couple of typos in pkg-config files
+ - Install splash and cairo header files when necessary
+
+Release 0.1 - no date yet
+
+ - First release
+ - More NEWS here
diff --git a/Build/source/libs/poppler/poppler-0.12.4/README b/Build/source/libs/poppler/poppler-0.12.4/README
new file mode 100644
index 00000000000..e5b30a6d9ca
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/README
@@ -0,0 +1,37 @@
+This is poppler, a PDF rendering library.
+
+Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg
+of Glyph and Cog, LLC. The purpose of forking xpdf is twofold.
+First, we want to provide PDF rendering functionality as a shared
+library, to centralize the maintenance effort. Today a number of
+applications incorporate the xpdf code base, and whenever a security
+issue is discovered, all these applications exchange patches and put
+out new releases. In turn, all distributions must package and release
+new version of these xpdf based viewers. It's safe to say that
+there's a lot of duplicated effort with the current situation. Even if
+poppler in the short term introduces yet another xpdf derived code
+base to the world, we hope that over time these applications will
+adopt poppler. After all, we only need one application to use poppler
+to break even.
+
+Second, we would like to move libpoppler forward in a number of areas
+that don't fit within the goals of xpdf. By design, xpdf depends on
+very few libraries and runs a wide range of X based platforms. This
+is a strong feature and reasonable design goal. However, with poppler
+we would like to replace parts of xpdf that are now available as
+standard components of modern Unix desktop environments. One such
+example is fontconfig, which solves the problem of matching and
+locating fonts on the system, in a standardized and well understood
+way. Another example is cairo, which provides high quality 2D
+rendering. See the file TODO for a list of planned changes.
+
+Please note that xpdf, and thus poppler, is licensed under the GPL,
+not the LGPL. Consequently, any application using poppler must also
+be licensed under the GPL. If you want to incorporate Xpdf based PDF
+rendering in a closed source product, please contact Glyph & Cog
+(www.glyphandcog.com) for commercial licensing options.
+
+ Kristian Høgsberg, Feb. 27, 2005
+
+
+See the README-XPDF for the original xpdf-3.00 README.
diff --git a/Build/source/libs/poppler/poppler-0.12.4/README-XPDF b/Build/source/libs/poppler/poppler-0.12.4/README-XPDF
new file mode 100644
index 00000000000..ff674a2a7b7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/README-XPDF
@@ -0,0 +1,376 @@
+Xpdf
+====
+
+version 3.00
+2004-jan-22
+
+The Xpdf software and documentation are
+copyright 1996-2004 Glyph & Cog, LLC.
+
+Email: derekn@foolabs.com
+WWW: http://www.foolabs.com/xpdf/
+
+The PDF data structures, operators, and specification are
+copyright 1985-2003 Adobe Systems Inc.
+
+
+What is Xpdf?
+-------------
+
+Xpdf is an open source viewer for Portable Document Format (PDF)
+files. (These are also sometimes also called 'Acrobat' files, from
+the name of Adobe's PDF software.) The Xpdf project also includes a
+PDF text extractor, PDF-to-PostScript converter, and various other
+utilities.
+
+Xpdf runs under the X Window System on UNIX, VMS, and OS/2. The non-X
+components (pdftops, pdftotext, etc.) also run on Win32 systems and
+should run on pretty much any system with a decent C++ compiler.
+
+Xpdf is designed to be small and efficient. It can use Type 1 or
+TrueType fonts.
+
+
+Distribution
+------------
+
+Xpdf is licensed under the GNU General Public License (GPL), version
+2. In my opinion, the GPL is a convoluted, confusing, ambiguous mess.
+But it's also pervasive, and I'm sick of arguing. And even if it is
+confusing, the basic idea is good.
+
+In order to cut down on the confusion a little bit, here are some
+informal clarifications:
+
+- I don't mind if you redistribute Xpdf in source and/or binary form,
+ as long as you include all of the documentation: README, man pages
+ (or help files), and COPYING. (Note that the README file contains a
+ pointer to a web page with the source code.)
+
+- Selling a CD-ROM that contains Xpdf is fine with me, as long as it
+ includes the documentation. I wouldn't mind receiving a sample
+ copy, but it's not necessary.
+
+- If you make useful changes to Xpdf, please make the source code
+ available -- post it on a web site, email it to me, whatever.
+
+If you're interested in commercial licensing, please see the Glyph &
+Cog web site:
+
+ http://www.glyphandcog.com/
+
+
+Compatibility
+-------------
+
+Xpdf is developed and tested on a Linux 2.4 x86 system.
+
+In addition, it has been compiled by others on Solaris, AIX, HP-UX,
+Digital Unix, Irix, and numerous other Unix implementations, as well
+as VMS and OS/2. It should work on pretty much any system which runs
+X11 and has Unix-like libraries. You'll need ANSI C++ and C compilers
+to compile it.
+
+The non-X components of Xpdf (pdftops, pdftotext, pdfinfo, pdffonts,
+pdftoppm, and pdfimages) can also be compiled on Win32 systems. See
+the Xpdf web page for details.
+
+If you compile Xpdf for a system not listed on the web page, please
+let me know. If you're willing to make your binary available by ftp
+or on the web, I'll be happy to add a link from the Xpdf web page. I
+have decided not to host any binaries I didn't compile myself (for
+disk space and support reasons).
+
+If you can't get Xpdf to compile on your system, send me email and
+I'll try to help.
+
+Xpdf has been ported to the Acorn, Amiga, BeOS, and EPOC. See the
+Xpdf web page for links.
+
+
+Getting Xpdf
+------------
+
+The latest version is available from:
+
+ http://www.foolabs.com/xpdf/
+
+or:
+
+ ftp://ftp.foolabs.com/pub/xpdf/
+
+Source code and several precompiled executables are available.
+
+Announcements of new versions are posted to several newsgroups
+(comp.text.pdf, comp.os.linux.announce, and others) and emailed to a
+list of people. If you'd like to receive email notification of new
+versions, just let me know.
+
+
+Running Xpdf
+------------
+
+To run xpdf, simply type:
+
+ xpdf file.pdf
+
+To generate a PostScript file, hit the "print" button in xpdf, or run
+pdftops:
+
+ pdftops file.pdf
+
+To generate a plain text file, run pdftotext:
+
+ pdftotext file.pdf
+
+There are four additional utilities (which are fully described in
+their man pages):
+
+ pdfinfo -- dumps a PDF file's Info dictionary (plus some other
+ useful information)
+ pdffonts -- lists the fonts used in a PDF file along with various
+ information for each font
+ pdftoppm -- converts a PDF file to a series of PPM/PGM/PBM-format
+ bitmaps
+ pdfimages -- extracts the images from a PDF file
+
+Command line options and many other details are described in the man
+pages (xpdf.1, etc.) and the VMS help files (xpdf.hlp, etc.).
+
+
+Upgrading from Xpdf 2.xx
+------------------------
+
+WARNING: Xpdf 3.00 switched to a new PDF rasterizer, which no longer
+uses X fonts. You'll need a set of Base-14 fonts -- the URW fonts
+distributed with ghostscript can be used for this. Xpdf will search
+for the URW fonts, but if you have them installed in a non-standard
+directory, you'll need to set up an xpdfrc config file to point to
+them. For full details, please see the xpdfrc(5) man page.
+
+
+Compiling Xpdf
+--------------
+
+See the separate file, INSTALL.
+
+
+Bugs
+----
+
+If you find a bug in Xpdf, i.e., if it prints an error message,
+crashes, or incorrectly displays a document, and you don't see that
+bug listed here, please send me email, with a pointer (URL, ftp site,
+etc.) to the PDF file.
+
+
+Acknowledgments
+---------------
+
+Thanks to:
+
+* Patrick Voigt for help with the remote server code.
+* Patrick Moreau, Martin P.J. Zinser, and David Mathog for the VMS
+ port.
+* David Boldt and Rick Rodgers for sample man pages.
+* Brendan Miller for the icon idea.
+* Olly Betts for help testing pdftotext.
+* Peter Ganten for the OS/2 port.
+* Michael Richmond for the Win32 port of pdftops and pdftotext and the
+ xpdf/cygwin/XFree86 build instructions.
+* Frank M. Siegert for improvements in the PostScript code.
+* Leo Smiers for the decryption patches.
+* Rainer Menzner for creating t1lib, and for helping me adapt it to
+ xpdf.
+* Pine Tree Systems A/S for funding the OPI and EPS support in
+ pdftops.
+* Easy Software Products for funding the "sh" operator support.
+* Tom Kacvinsky for help with FreeType and for being my interface to
+ the FreeType team.
+* Theppitak Karoonboonyanan for help with Thai support.
+* Leonard Rosenthol for help and contributions on a bunch of things.
+* Alexandros Diamantidis and Maria Adaloglou for help with Greek
+ support.
+* Lawrence Lai for help with the CJK Unicode maps.
+
+Various people have contributed modifications made for use by the
+pdftex project:
+
+* Han The Thanh
+* Martin Schröder of ArtCom GmbH
+
+
+References
+----------
+
+Adobe Systems Inc., _PDF Reference: Adobe Portable Document Format
+Version 1.5_.
+http://partners.adobe.com/asn/tech/pdf/specifications.jsp
+[The manual for PDF version 1.5.]
+
+Adobe Systems Inc., _PostScript Language Reference_, 3rd ed.
+Addison-Wesley, 1999, ISBN 0-201-37922-8.
+[The official PostScript manual.]
+
+Adobe Systems, Inc., _The Type 42 Font Format Specification_,
+Adobe Developer Support Technical Specification #5012. 1998.
+http://partners.adobe.com/asn/developer/pdfs/tn/5012.Type42_Spec.pdf
+[Type 42 is the format used to embed TrueType fonts in PostScript
+files.]
+
+Adobe Systems, Inc., _Adobe CMap and CIDFont Files Specification_,
+Adobe Developer Support Technical Specification #5014. 1995.
+http://www.adobe.com/supportservice/devrelations/PDFS/TN/5014.CIDFont_Spec.pdf
+[CMap file format needed for Japanese and Chinese font support.]
+
+Adobe Systems, Inc., _Adobe-Japan1-4 Character Collection for
+CID-Keyed Fonts_, Adobe Developer Support Technical Note #5078.
+2000.
+http://partners.adobe.com/asn/developer/PDFS/TN/5078.CID_Glyph.pdf
+[The Adobe Japanese character set.]
+
+Adobe Systems, Inc., _Adobe-GB1-4 Character Collection for
+CID-Keyed Fonts_, Adobe Developer Support Technical Note #5079.
+2000.
+http://partners.adobe.com/asn/developer/pdfs/tn/5079.Adobe-GB1-4.pdf
+[The Adobe Chinese GB (simplified) character set.]
+
+Adobe Systems, Inc., _Adobe-CNS1-3 Character Collection for
+CID-Keyed Fonts_, Adobe Developer Support Technical Note #5080.
+2000.
+http://partners.adobe.com/asn/developer/PDFS/TN/5080.CNS_CharColl.pdf
+[The Adobe Chinese CNS (traditional) character set.]
+
+Adobe Systems Inc., _Supporting the DCT Filters in PostScript Level
+2_, Adobe Developer Support Technical Note #5116. 1992.
+http://www.adobe.com/supportservice/devrelations/PDFS/TN/5116.PS2_DCT.PDF
+[Description of the DCTDecode filter parameters.]
+
+Adobe Systems Inc., _Open Prepress Interface (OPI) Specification -
+Version 2.0_, Adobe Developer Support Technical Note #5660. 2000.
+http://partners.adobe.com/asn/developer/PDFS/TN/5660.OPI_2.0.pdf
+
+Adobe Systems Inc., CMap files.
+ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/
+[The actual CMap files for the 16-bit CJK encodings.]
+
+Adobe Systems Inc., Unicode glyph lists.
+http://partners.adobe.com/asn/developer/type/unicodegn.html
+http://partners.adobe.com/asn/developer/type/glyphlist.txt
+http://partners.adobe.com/asn/developer/type/corporateuse.txt
+http://partners.adobe.com/asn/developer/type/zapfdingbats.txt
+[Mappings between character names to Unicode.]
+
+Aldus Corp., _OPI: Open Prepress Interface Specification 1.3_. 1993.
+http://partners.adobe.com/asn/developer/PDFS/TN/OPI_13.pdf
+
+Anonymous, RC4 source code.
+ftp://ftp.ox.ac.uk/pub/crypto/misc/rc4.tar.gz
+ftp://idea.sec.dsi.unimi.it/pub/crypt/code/rc4.tar.gz
+[This is the algorithm used to encrypt PDF files.]
+
+T. Boutell, et al., "PNG (Portable Network Graphics) Specification,
+Version 1.0. RFC 2083.
+[PDF uses the PNG filter algorithms.]
+
+CCITT, "Information Technology - Digital Compression and Coding of
+Continuous-tone Still Images - Requirements and Guidelines", CCITT
+Recommendation T.81.
+http://www.w3.org/Graphics/JPEG/
+[The official JPEG spec.]
+
+A. Chernov, "Registration of a Cyrillic Character Set". RFC 1489.
+[Documentation for the KOI8-R Cyrillic encoding.]
+
+Roman Czyborra, "The ISO 8859 Alphabet Soup".
+http://czyborra.com/charsets/iso8859.html
+[Documentation on the various ISO 859 encodings.]
+
+L. Peter Deutsch, "ZLIB Compressed Data Format Specification version
+3.3". RFC 1950.
+[Information on the general format used in FlateDecode streams.]
+
+L. Peter Deutsch, "DEFLATE Compressed Data Format Specification
+version 1.3". RFC 1951.
+[The definition of the compression algorithm used in FlateDecode
+streams.]
+
+Jim Flowers, "X Logical Font Description Conventions", Version 1.5, X
+Consortium Standard, X Version 11, Release 6.1.
+ftp://ftp.x.org/pub/R6.1/xc/doc/hardcopy/XLFD/xlfd.PS.Z
+[The official specification of X font descriptors, including font
+transformation matrices.]
+
+Foley, van Dam, Feiner, and Hughes, _Computer Graphics: Principles and
+Practice_, 2nd ed. Addison-Wesley, 1990, ISBN 0-201-12110-7.
+[Colorspace conversion functions, Bezier spline math.]
+
+Robert L. Hummel, _Programmer's Technical Reference: Data and Fax
+Communications_. Ziff-Davis Press, 1993, ISBN 1-56276-077-7.
+[CCITT Group 3 and 4 fax decoding.]
+
+ISO/IEC, _Information technology -- Lossy/lossless coding of bi-level
+images_. ISO/IEC 14492, First edition (2001-12-15).
+http://webstore.ansi.org/
+[The official JBIG2 standard. The final draft of this spec is
+available from http://www.jpeg.org/jbighomepage.html.]
+
+ISO/IEC, _Information technology -- JPEG 2000 image coding system --
+Part 1: Core coding system_. ISO/IEC 15444-1, First edition
+(2000-12-15).
+http://webstore.ansi.org/
+[The official JPEG 2000 standard. The final committee draft of this
+spec is available from http://www.jpeg.org/JPEG2000.html, but there
+were changes made to the bitstream format between that draft and the
+published spec.]
+
+ITU, "Standardization of Group 3 facsimile terminals for document
+transmission", ITU-T Recommendation T.4, 1999.
+ITU, "Facsimile coding schemes and coding control functions for Group 4
+facsimile apparatus", ITU-T Recommendation T.6, 1993.
+http://www.itu.int/
+[The official Group 3 and 4 fax standards - used by the CCITTFaxDecode
+stream, as well as the JBIG2Decode stream.]
+
+Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, "Practical
+Fast 1-D DCT Algorithms with 11 Multiplications". IEEE Intl. Conf. on
+Acoustics, Speech & Signal Processing, 1989, 988-991.
+[The fast IDCT algorithm used in the DCTDecode filter.]
+
+Microsoft, _TrueType 1.0 Font Files_, rev. 1.66. 1995.
+http://www.microsoft.com/typography/tt/tt.htm
+[The TrueType font spec (in MS Word format, naturally).]
+
+Thai Industrial Standard, "Standard for Thai Character Codes for
+Computers", TIS-620-2533 (1990).
+http://www.nectec.or.th/it-standards/std620/std620.htm
+[The TIS-620 Thai encoding.]
+
+P. Peterlin, "ISO 8859-2 (Latin 2) Resources".
+http://sizif.mf.uni-lj.si/linux/cee/iso8859-2.html
+[This is a web page with all sorts of useful Latin-2 character set and
+font information.]
+
+Charles Poynton, "Color FAQ".
+http://www.inforamp.net/~poynton/ColorFAQ.html
+[The mapping from the CIE 1931 (XYZ) color space to RGB.]
+
+R. Rivest, "The MD5 Message-Digest Algorithm". RFC 1321.
+[MD5 is used in PDF document encryption.]
+
+Unicode Consortium, "Unicode Home Page".
+http://www.unicode.org/
+[Online copy of the Unicode spec.]
+
+W3C Recommendation, "PNG (Portable Network Graphics) Specification
+Version 1.0".
+http://www.w3.org/Graphics/PNG/
+[Defines the PNG image predictor.]
+
+Gregory K. Wallace, "The JPEG Still Picture Compression Standard".
+ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz
+[Good description of the JPEG standard. Also published in CACM, April
+1991, and submitted to IEEE Transactions on Consumer Electronics.]
+
+F. Yergeau, "UTF-8, a transformation format of ISO 10646". RFC 2279.
+[A commonly used Unicode encoding.]
diff --git a/Build/source/libs/poppler/poppler-0.12.4/TODO b/Build/source/libs/poppler/poppler-0.12.4/TODO
new file mode 100644
index 00000000000..2991be7e060
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/TODO
@@ -0,0 +1,40 @@
+* general items:
+ - Investigate better (that is, normal) text selection.
+ - Use PDF font descriptors to create an FcPattern.
+ - Add simle performance benchmark that takes a pdf and renders
+ every page 100 times or so. Start keeping track of
+ performance.
+ - make color space conversion stuff more sane (right now we
+ hack around some of it in the cairo backend)
+ - move away from getChar to a more read(2) like interface
+
+* core:
+ - use libtiff for ccitt decoding?
+
+* Qt4 frontend:
+ - expose Rendition media through the MovieObject API
+ - use Q_GLOBAL_STATIC for GlobalParams?
+ - use QSettings or another system for loading/saving Document/global settings?
+ - expose API for lcms/color management system
+
+* glib frontend:
+ - Sound/Movie actions support
+ - API to create annotations
+
+* new frontends:
+ - toolkit-agnostic C or C++ frontend
+ - Java/JNI-based frontend for Android
+
+* cairo backend:
+ - Implement linear/radial gradients with cairo gradients
+ - PDF Blend Modes
+ - Make the cairo backend feature complete and optimize the
+ heck out of it.
+
+Jeff Muizelaar's TODO:
+ Short Term:
+ - factor out some of the color conversion code from CairoOutputDev and ArthurOutputDev.
+ - fix patterned text fills.
+ Long Term:
+ - use cairo glyph cache for type3 fonts.
+ - try to use cairo pattern support.
diff --git a/Build/source/libs/poppler/poppler-0.12.4/aclocal.m4 b/Build/source/libs/poppler/poppler-0.12.4/aclocal.m4
new file mode 100644
index 00000000000..b0838c29290
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/aclocal.m4
@@ -0,0 +1,1159 @@
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
+[m4_warning([this file was generated for autoconf 2.64.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/acx_pthread.m4])
+m4_include([m4/define-dir.m4])
+m4_include([m4/gtk-doc.m4])
+m4_include([m4/libjpeg.m4])
+m4_include([m4/libpng.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/qt.m4])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/COPYING-CMAKE-SCRIPTS b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 00000000000..4b417765f3a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindCairo.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindCairo.cmake
new file mode 100644
index 00000000000..a0a8400d32c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindCairo.cmake
@@ -0,0 +1,44 @@
+# - try to find Cairo
+# Once done this will define
+#
+# CAIRO_FOUND - system has Cairo
+# CAIRO_CFLAGS - the Cairo CFlags
+# CAIRO_LIBRARIES - Link these to use Cairo
+#
+# Copyright (c) 2007, Pino Toscano, <pino@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if (NOT WIN32)
+ include(UsePkgConfig)
+
+ pkgconfig(cairo _LibCairoIncDir _LibCairoLinkDir _CairoLinkFlags _CairoCflags)
+ set (CAIRO_FOUND FALSE)
+ if (_LibCairoIncDir)
+
+ if (CAIRO_VERSION)
+
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${CAIRO_VERSION} cairo RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
+ if(_return_VALUE STREQUAL "0")
+ set (CAIRO_CFLAGS ${_CairoCflags})
+ set (CAIRO_LIBRARIES ${_CairoLinkFlags})
+ endif(_return_VALUE STREQUAL "0")
+
+ else (CAIRO_VERSION)
+ set (CAIRO_CFLAGS ${_CairoCflags})
+ set (CAIRO_LIBRARIES ${_CairoLinkFlags})
+ endif (CAIRO_VERSION)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Cairo DEFAULT_MSG CAIRO_LIBRARIES CAIRO_CFLAGS)
+
+ endif (_LibCairoIncDir)
+
+endif(NOT WIN32)
+
+mark_as_advanced(
+ CAIRO_CFLAGS
+ CAIRO_LIBRARIES
+)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindFontconfig.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindFontconfig.cmake
new file mode 100644
index 00000000000..c6a8c6ab12f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindFontconfig.cmake
@@ -0,0 +1,47 @@
+# - Try to find the Fontconfig
+# Once done this will define
+#
+# FONTCONFIG_FOUND - system has Fontconfig
+# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
+# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
+
+# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+
+ # in cache already
+ set(FONTCONFIG_FOUND TRUE)
+
+else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+
+ if (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ include(UsePkgConfig)
+
+ pkgconfig(fontconfig _FONTCONFIGIncDir _FONTCONFIGLinkDir _FONTCONFIGLinkFlags _FONTCONFIGCflags)
+
+ set(FONTCONFIG_DEFINITIONS ${_FONTCONFIGCflags} CACHE INTERNAL "The compilation flags for fontconfig")
+ endif (NOT WIN32)
+
+ find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
+ PATHS
+ ${_FONTCONFIGIncDir}
+ /usr/X11/include
+ )
+
+ find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
+ PATHS
+ ${_FONTCONFIGLinkDir}
+ )
+
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
+
+ mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
+
+endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindGTK.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindGTK.cmake
new file mode 100644
index 00000000000..c751d3aad86
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindGTK.cmake
@@ -0,0 +1,78 @@
+# - try to find GTK (and glib)
+# Once done this will define
+#
+# GLIB_FOUND - system has GLib
+# GLIB_CFLAGS - the GLib CFlags
+# GLIB_LIBRARIES - Link these to use GLib
+#
+# Copyright 2008 Pino Toscano, <pino@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+include(FindPackageHandleStandardArgs)
+
+if (NOT WIN32)
+ include(UsePkgConfig)
+
+ pkgconfig(glib-2.0 _LibGLIB2IncDir _LibGLIB2LinkDir GLIB2LinkFlags GLIB2Cflags)
+ pkgconfig(gdk-2.0 _LibGDK2IncDir _LibGDK2LinkDir GDK2LinkFlags GDK2Cflags)
+ set (GLIB_FOUND FALSE)
+ if (_LibGLIB2IncDir)
+
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.6 glib-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
+ if(_return_VALUE STREQUAL "0")
+ set(_glib_FOUND TRUE)
+ endif(_return_VALUE STREQUAL "0")
+ endif (_LibGLIB2IncDir)
+
+ if (_LibGDK2IncDir)
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.4.0 gdk-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
+ if(_return_VALUE STREQUAL "0")
+ set(_gdk_FOUND TRUE)
+ endif(_return_VALUE STREQUAL "0")
+ endif (_LibGDK2IncDir)
+
+ if (_glib_FOUND)
+ set (GLIB2_CFLAGS ${GLIB2Cflags})
+ set (GLIB2_LIBRARIES ${GLIB2LinkFlags})
+ endif (_glib_FOUND)
+
+ if (_gdk_FOUND)
+ set (GDK2_CFLAGS ${GDK2Cflags})
+ set (GDK2_LIBRARIES ${GDK2LinkFlags})
+ endif (_gdk_FOUND)
+
+ find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS)
+ find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS)
+
+ pkgconfig(gtk+-2.0 _LibGTK2IncDir _LibGTK2LinkDir GTK2LinkFlags GTK2Cflags)
+ pkgconfig(gdk-pixbuf-2.0 _LibGDK2PixbufIncDir _LibGDK2PixbufLinkDir GDK2PixbufLinkFlags GDK2PixbufCflags)
+ pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags)
+
+ if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir)
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.8.0 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
+ if(_return_VALUE STREQUAL "0")
+ set(_gtk_FOUND TRUE)
+ endif(_return_VALUE STREQUAL "0")
+
+ if (_gtk_FOUND)
+ set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GThread2Cflags})
+ set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GThread2LinkFlags})
+ endif (_gtk_FOUND)
+
+ find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS)
+
+ endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir)
+
+endif(NOT WIN32)
+
+mark_as_advanced(
+ GLIB2_CFLAGS
+ GLIB2_LIBRARIES
+ GDK2_CFLAGS
+ GDK2_LIBRARIES
+ GTK2_CFLAGS
+ GTK2_LIBRARIES
+)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLCMS.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLCMS.cmake
new file mode 100644
index 00000000000..9d162d2cfdd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLCMS.cmake
@@ -0,0 +1,84 @@
+# - Find LCMS
+# Find the LCMS includes and library
+# This module defines
+# LCMS_INCLUDE_DIR, where to find lcms.h
+# LCMS_LIBRARIES, the libraries needed to use LCMS.
+# LCMS_VERSION, The value of LCMS_VERSION defined in lcms.h
+# LCMS_FOUND, If false, do not try to use LCMS.
+
+
+# Copyright (c) 2008, Adrian Page, <adrian@pagenet.plus.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+if(NOT WIN32)
+ find_package(PkgConfig)
+ pkg_check_modules(PC_LCMS lcms)
+ set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER})
+endif(NOT WIN32)
+
+find_path(LCMS_INCLUDE_DIR lcms.h
+ PATHS
+ ${PC_LCMS_INCLUDEDIR}
+ ${PC_LCMS_INCLUDE_DIRS}
+ PATH_SUFFIXES lcms liblcms1
+)
+
+find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1
+ PATHS
+ ${PC_LCMS_LIBDIR}
+ ${PC_LCMS_LIBRARY_DIRS}
+ PATH_SUFFIXES lcms
+)
+
+if(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
+ set(LCMS_FOUND TRUE)
+else(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
+ set(LCMS_FOUND FALSE)
+endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
+
+if(LCMS_FOUND)
+ set(FIND_LCMS_VERSION_SOURCE
+ "#include <lcms.h>\n int main()\n {\n return LCMS_VERSION;\n }\n")
+ set(FIND_LCMS_VERSION_SOURCE_FILE ${CMAKE_BINARY_DIR}/CMakeTmp/FindLCMS.cxx)
+ file(WRITE "${FIND_LCMS_VERSION_SOURCE_FILE}" "${FIND_LCMS_VERSION_SOURCE}")
+
+ set(FIND_LCMS_VERSION_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${LCMS_INCLUDE_DIR}")
+
+ try_run(LCMS_VERSION LCMS_COMPILE_RESULT
+ ${CMAKE_BINARY_DIR}
+ ${FIND_LCMS_VERSION_SOURCE_FILE}
+ CMAKE_FLAGS "${FIND_LCMS_VERSION_ADD_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+
+ if(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
+ if(NOT LCMS_FIND_QUIETLY)
+ string(SUBSTRING ${LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION)
+ string(SUBSTRING ${LCMS_VERSION} 1 2 LCMS_MINOR_VERSION)
+ message(STATUS "Found lcms version ${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}, ${LCMS_LIBRARIES}")
+ endif(NOT LCMS_FIND_QUIETLY)
+ else(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
+ if(NOT LCMS_FIND_QUIETLY)
+ message(STATUS "Found lcms but failed to find version ${LCMS_LIBRARIES}")
+ file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Find lcms version failed with the following output:\n${OUTPUT}\nFindLCMS.cxx:\n${FIND_LCMS_VERSION_SOURCE}\n\n")
+ endif(NOT LCMS_FIND_QUIETLY)
+ set(LCMS_VERSION NOTFOUND)
+ endif(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN)
+else(LCMS_FOUND)
+ if(NOT LCMS_FIND_QUIETLY)
+ if(LCMS_FIND_REQUIRED)
+ message(FATAL_ERROR "Required package lcms NOT found")
+ else(LCMS_FIND_REQUIRED)
+ message(STATUS "lcms NOT found")
+ endif(LCMS_FIND_REQUIRED)
+ endif(NOT LCMS_FIND_QUIETLY)
+endif(LCMS_FOUND)
+
+mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLIBOPENJPEG.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLIBOPENJPEG.cmake
new file mode 100644
index 00000000000..978ee7d93fc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindLIBOPENJPEG.cmake
@@ -0,0 +1,37 @@
+# - Try to find the libopenjpeg library
+# Once done this will define
+#
+# LIBOPENJPEG_FOUND - system has libopenjpeg
+# LIBOPENJPEG_INCLUDE_DIRS - the libopenjpeg include directories
+# LIBOPENJPEG_LIBRARIES - Link these to use libopenjpeg
+# LIBOPENJPEG_INCLUDE_DIR is internal and deprecated for use
+
+# Copyright (c) 2008, Albert Astals Cid, <aacid@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
+
+ # in cache already
+ set(LIBOPENJPEG_FOUND TRUE)
+
+else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
+
+ #reset vars
+ set(LIBOPENJPEG_LIBRARIES)
+ set(LIBOPENJPEG_INCLUDE_DIR)
+
+ find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
+ find_library(LIBOPENJPEG_LIBRARIES openjpeg)
+ if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+ set(LIBOPENJPEG_FOUND TRUE)
+ endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
+
+endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
+
+set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR})
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt3.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt3.cmake
new file mode 100644
index 00000000000..06ff94014be
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt3.cmake
@@ -0,0 +1,319 @@
+# - Locate Qt include paths and libraries
+# This module defines:
+# QT3_INCLUDE_DIR - where to find qt.h, etc.
+# QT3_LIBRARIES - the libraries to link against to use Qt.
+# QT3_DEFINITIONS - definitions to use when
+# compiling code that uses Qt.
+# QT3_FOUND - If false, don't try to use Qt.
+#
+# If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE
+#
+# Also defined, but not for general use are:
+# QT3_MOC_EXECUTABLE, where to find the moc tool.
+# QT3_UIC_EXECUTABLE, where to find the uic tool.
+# QT3_QT_LIBRARY, where to find the Qt library.
+# QT3_QTMAIN_LIBRARY, where to find the qtmain
+# library. This is only required by Qt3 on Windows.
+
+# These are around for backwards compatibility
+# they will be set
+# QT_WRAP_CPP, set true if QT3_MOC_EXECUTABLE is found
+# QT_WRAP_UI set true if QT3_UIC_EXECUTABLE is found
+
+FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
+FIND_PATH(QT3_INCLUDE_DIR qt.h
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
+ $ENV{QTDIR}/include
+ ${GLOB_PATHS_BIN}
+ /usr/local/qt/include
+ /usr/lib/qt/include
+ /usr/lib/qt3/include
+ /usr/include/qt
+ /usr/share/qt3/include
+ C:/Progra~1/qt/include
+ /usr/include/qt3
+ /usr/X11R6/include
+ )
+
+# if qglobal.h is not in the qt_include_dir then set
+# QT3_INCLUDE_DIR to NOTFOUND
+IF(NOT EXISTS ${QT3_INCLUDE_DIR}/qglobal.h)
+ SET(QT3_INCLUDE_DIR QT3_INCLUDE_DIR-NOTFOUND CACHE PATH "path to qt3 include directory" FORCE)
+ENDIF(NOT EXISTS ${QT3_INCLUDE_DIR}/qglobal.h)
+
+IF(QT3_INCLUDE_DIR)
+ #extract the version string from qglobal.h
+ FILE(READ ${QT3_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
+ STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}")
+ STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
+
+ # Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
+ # version X.Y.Z, so we need to remove the dots from version
+ STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
+ELSE(QT3_INCLUDE_DIR)
+ENDIF(QT3_INCLUDE_DIR)
+
+FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
+IF (QT_MT_REQUIRED)
+ FIND_LIBRARY(QT3_QT_LIBRARY
+ NAMES
+ qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
+ qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
+ PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
+ $ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
+ /usr/local/qt/lib
+ /usr/lib/qt/lib
+ /usr/lib/qt3/lib
+ /usr/lib/qt3/lib64
+ /usr/share/qt3/lib
+ C:/Progra~1/qt/lib
+ /usr/X11R6/lib
+ )
+
+ELSE (QT_MT_REQUIRED)
+ FIND_LIBRARY(QT3_QT_LIBRARY
+ NAMES
+ qt qt-${qt_version_str_lib} qt-edu${qt_version_str_lib}
+ qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
+ qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
+ PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
+ $ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
+ /usr/local/qt/lib
+ /usr/lib/qt/lib
+ /usr/lib/qt3/lib
+ /usr/lib/qt3/lib64
+ /usr/share/qt3/lib
+ C:/Progra~1/qt/lib
+ /usr/X11R6/lib
+ )
+ENDIF (QT_MT_REQUIRED)
+
+IF(QT3_QT_LIBRARY)
+ELSE(QT3_QT_LIBRARY)
+ENDIF(QT3_QT_LIBRARY)
+
+
+FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
+ NAMES qassistantclient
+ PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
+ $ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
+ /usr/local/qt/lib
+ /usr/lib/qt3/lib
+ /usr/lib/qt3/lib64
+ /usr/share/qt3/lib
+ C:/Progra~1/qt/lib
+ /usr/X11R6/lib
+ )
+
+# qt 3 should prefer QTDIR over the PATH
+FIND_PROGRAM(QT3_MOC_EXECUTABLE
+ NAMES moc moc-qt3
+ PATHS
+ $ENV{QTDIR}/bin
+ NO_DEFAULT_PATH
+)
+
+FIND_PROGRAM(QT3_MOC_EXECUTABLE
+ NAMES moc moc-qt3
+ PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
+ $ENV{QTDIR}/bin
+ ${GLOB_PATHS_BIN}
+ /usr/local/qt/bin
+ /usr/lib/qt/bin
+ /usr/lib/qt3/bin
+ /usr/share/qt3/bin
+ C:/Progra~1/qt/bin
+ /usr/X11R6/bin
+ )
+
+IF(QT3_MOC_EXECUTABLE)
+ SET ( QT_WRAP_CPP "YES")
+ELSE(QT3_MOC_EXECUTABLE)
+ENDIF(QT3_MOC_EXECUTABLE)
+
+# qt 3 should prefer QTDIR over the PATH
+FIND_PROGRAM(QT3_UIC_EXECUTABLE uic
+ PATHS
+ $ENV{QTDIR}/bin
+ NO_DEFAULT_PATH
+)
+FIND_PROGRAM(QT3_UIC_EXECUTABLE uic
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
+ $ENV{QTDIR}/bin
+ ${GLOB_PATHS_BIN}
+ /usr/local/qt/bin
+ /usr/lib/qt/bin
+ /usr/lib/qt3/bin
+ /usr/share/qt3/bin
+ C:/Progra~1/qt/bin
+ /usr/X11R6/bin
+ )
+
+IF(QT3_UIC_EXECUTABLE)
+ SET ( QT_WRAP_UI "YES")
+ELSE(QT3_UIC_EXECUTABLE)
+ENDIF(QT3_UIC_EXECUTABLE)
+
+IF (WIN32)
+ FIND_LIBRARY(QT3_QTMAIN_LIBRARY qtmain
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
+ "$ENV{ProgramFiles}/qt/lib"
+ $ENV{QTDIR}/lib "C:/Program Files/qt/lib"
+ DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
+ )
+ENDIF (WIN32)
+
+
+IF (QT3_MIN_VERSION)
+
+ STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}")
+ STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers "${qt_version_str}")
+ STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers "${qt_version_str}")
+
+ #now parse the parts of the user given version string into variables
+ STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" req_qt_major_vers "${QT3_MIN_VERSION}")
+ IF (NOT req_qt_major_vers)
+ MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT3_MIN_VERSION}\", expected e.g. \"3.1.5\"")
+ ENDIF (NOT req_qt_major_vers)
+
+ STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT3_MIN_VERSION}")
+ STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT3_MIN_VERSION}")
+ STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT3_MIN_VERSION}")
+
+ # req = "6.5.4", qt = "3.2.1"
+
+ IF (req_qt_major_vers GREATER qt_major_vers) # (6 > 3) ?
+ MESSAGE( FATAL_ERROR "Qt major version not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})") # yes
+ ELSE (req_qt_major_vers GREATER qt_major_vers) # no
+ IF (req_qt_major_vers LESS qt_major_vers) # (6 < 3) ?
+ SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
+ ELSE (req_qt_major_vers LESS qt_major_vers) # ( 6==3) ?
+ IF (req_qt_minor_vers GREATER qt_minor_vers) # (5>2) ?
+ MESSAGE( FATAL_ERROR "Qt minor version not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})") # yes
+ ELSE (req_qt_minor_vers GREATER qt_minor_vers) # no
+ IF (req_qt_minor_vers LESS qt_minor_vers) # (5<2) ?
+ SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
+ ELSE (req_qt_minor_vers LESS qt_minor_vers) # (5==2)
+ IF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
+ MESSAGE( FATAL_ERROR "Qt patch level not matched (required: ${QT3_MIN_VERSION}, found: ${qt_version_str})") # yes
+ ELSE (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
+ SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
+ ENDIF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
+ ENDIF (req_qt_minor_vers LESS qt_minor_vers)
+ ENDIF (req_qt_minor_vers GREATER qt_minor_vers)
+ ENDIF (req_qt_major_vers LESS qt_major_vers)
+ ENDIF (req_qt_major_vers GREATER qt_major_vers)
+ENDIF (QT3_MIN_VERSION)
+
+# if the include a library are found then we have it
+IF(QT3_INCLUDE_DIR)
+ IF(QT3_QT_LIBRARY)
+ SET( QT3_FOUND "YES" )
+ ENDIF(QT3_QT_LIBRARY)
+ENDIF(QT3_INCLUDE_DIR)
+
+IF(QT3_FOUND)
+ SET( QT3_LIBRARIES ${QT3_LIBRARIES} ${QT3_QT_LIBRARY} )
+ SET( QT3_DEFINITIONS "")
+
+ IF (WIN32 AND NOT CYGWIN)
+ IF (QT3_QTMAIN_LIBRARY)
+ # for version 3
+ SET (QT3_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG)
+ SET (QT3_LIBRARIES imm32.lib ${QT3_QT_LIBRARY} ${QT3_QTMAIN_LIBRARY} )
+ SET (QT3_LIBRARIES ${QT3_LIBRARIES} winmm wsock32)
+ ELSE (QT3_QTMAIN_LIBRARY)
+ # for version 2
+ SET (QT3_LIBRARIES imm32.lib ws2_32.lib ${QT3_QT_LIBRARY} )
+ ENDIF (QT3_QTMAIN_LIBRARY)
+ ELSE (WIN32 AND NOT CYGWIN)
+ SET (QT3_LIBRARIES ${QT3_QT_LIBRARY} )
+
+ SET (QT3_DEFINITIONS -DQT_SHARED -DQT_NO_DEBUG)
+ IF(QT3_QT_LIBRARY MATCHES "qt-mt")
+ SET (QT3_DEFINITIONS ${QT3_DEFINITIONS} -DQT_THREAD_SUPPORT -D_REENTRANT)
+ ENDIF(QT3_QT_LIBRARY MATCHES "qt-mt")
+
+ ENDIF (WIN32 AND NOT CYGWIN)
+
+ IF (QT_QASSISTANTCLIENT_LIBRARY)
+ SET (QT3_LIBRARIES ${QT_QASSISTANTCLIENT_LIBRARY} ${QT3_LIBRARIES})
+ ENDIF (QT_QASSISTANTCLIENT_LIBRARY)
+
+ # Backwards compatibility for CMake1.4 and 1.2
+ SET (QT_MOC_EXE ${QT3_MOC_EXECUTABLE} )
+ SET (QT_UIC_EXE ${QT3_UIC_EXECUTABLE} )
+ # for unix add X11 stuff
+ IF(UNIX)
+ FIND_PACKAGE(X11)
+ IF (X11_FOUND)
+ SET (QT3_LIBRARIES ${QT3_LIBRARIES} ${X11_LIBRARIES})
+ ENDIF (X11_FOUND)
+ IF (CMAKE_DL_LIBS)
+ SET (QT3_LIBRARIES ${QT3_LIBRARIES} ${CMAKE_DL_LIBS})
+ ENDIF (CMAKE_DL_LIBS)
+ ENDIF(UNIX)
+ IF(QT3_QT_LIBRARY MATCHES "qt-mt")
+ FIND_PACKAGE(Threads)
+ SET(QT3_LIBRARIES ${QT3_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ ENDIF(QT3_QT_LIBRARY MATCHES "qt-mt")
+ENDIF(QT3_FOUND)
+
+EXEC_PROGRAM(${QT3_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
+EXEC_PROGRAM(${QT3_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UI)
+
+SET(_QT_UIC_VERSION_3 FALSE)
+IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
+ SET(_QT_UIC_VERSION_3 TRUE)
+ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*")
+
+SET(_QT_MOC_VERSION_3 FALSE)
+IF("${QTVERSION_MOC}" MATCHES ".* 3..*")
+ SET(_QT_MOC_VERSION_3 TRUE)
+ENDIF("${QTVERSION_MOC}" MATCHES ".* 3..*")
+
+SET(QT_WRAP_CPP FALSE)
+IF (QT3_MOC_EXECUTABLE)
+ IF(_QT_MOC_VERSION_3)
+ SET ( QT_WRAP_CPP TRUE)
+ ENDIF(_QT_MOC_VERSION_3)
+ENDIF (QT3_MOC_EXECUTABLE)
+
+SET(QT_WRAP_UI FALSE)
+IF (QT3_UIC_EXECUTABLE)
+ IF(_QT_UIC_VERSION_3)
+ SET ( QT_WRAP_UI TRUE)
+ ENDIF(_QT_UIC_VERSION_3)
+ENDIF (QT3_UIC_EXECUTABLE)
+
+MARK_AS_ADVANCED(
+ QT3_INCLUDE_DIR
+ QT3_QT_LIBRARY
+ QT3_QTMAIN_LIBRARY
+ QT_QASSISTANTCLIENT_LIBRARY
+ QT3_UIC_EXECUTABLE
+ QT3_MOC_EXECUTABLE
+ QT_WRAP_CPP
+ QT_WRAP_UI
+ )
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt4.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt4.cmake
new file mode 100644
index 00000000000..9122bb33f6d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/FindQt4.cmake
@@ -0,0 +1,1295 @@
+# - Find QT 4
+# This module can be used to find Qt4.
+# The most important issue is that the Qt4 qmake is available via the system path.
+# This qmake is then used to detect basically everything else.
+# This module defines a number of key variables and macros. First is
+# QT_USE_FILE which is the path to a CMake file that can be included to compile
+# Qt 4 applications and libraries. By default, the QtCore and QtGui
+# libraries are loaded. This behavior can be changed by setting one or more
+# of the following variables to true:
+# QT_DONT_USE_QTCORE
+# QT_DONT_USE_QTGUI
+# QT_USE_QT3SUPPORT
+# QT_USE_QTASSISTANT
+# QT_USE_QTDESIGNER
+# QT_USE_QTMOTIF
+# QT_USE_QTMAIN
+# QT_USE_QTNETWORK
+# QT_USE_QTNSPLUGIN
+# QT_USE_QTOPENGL
+# QT_USE_QTSQL
+# QT_USE_QTXML
+# QT_USE_QTSVG
+# QT_USE_QTTEST
+# QT_USE_QTUITOOLS
+# QT_USE_QTDBUS
+# QT_USE_QTSCRIPT
+#
+# All the libraries required are stored in a variable called QT_LIBRARIES.
+# Add this variable to your TARGET_LINK_LIBRARIES.
+#
+# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
+# create moc code from a list of files containing Qt class with
+# the Q_OBJECT declaration. Options may be given to moc, such as those found
+# when executing "moc -help"
+#
+# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
+# create code from a list of Qt designer ui files.
+# Options may be given to uic, such as those found
+# when executing "uic -help"
+#
+# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
+# create code from a list of Qt resource files.
+# Options may be given to rcc, such as those found
+# when executing "rcc -help"
+#
+# macro QT4_AUTOMOC(inputfile ... )
+# macro QT4_GENERATE_MOC(inputfile outputfile )
+#
+# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
+# create a the interface header and implementation files with the
+# given basename from the given interface xml file and add it to
+# the list of sources.
+# To disable generating a namespace header, set the source file property
+# NO_NAMESPACE to TRUE on the interface file.
+#
+# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
+# create the interface header and implementation files
+# for all listed interface xml files
+# the name will be automatically determined from the name of the xml file
+# To disable generating namespace headers, set the source file property
+# NO_NAMESPACE to TRUE for these inputfiles.
+#
+# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
+# create a dbus adaptor (header and implementation file) from the xml file
+# describing the interface, and add it to the list of sources. The adaptor
+# forwards the calls to a parent class, defined in parentheader and named
+# parentclassname. The name of the generated files will be
+# <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
+# If <classname> is provided, then it will be used as the classname of the
+# adaptor itself.
+#
+# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
+# generate the xml interface file from the given header.
+# If the optional argument interfacename is omitted, the name of the
+# interface file is constructed from the basename of the header with
+# the suffix .xml appended.
+# Options may be given to uic, such as those found when executing "qdbuscpp2xml --help"
+#
+# QT_FOUND If false, don't try to use Qt.
+# QT4_FOUND If false, don't try to use Qt 4.
+#
+# QT4_QTCORE_FOUND True if QtCore was found.
+# QT4_QTGUI_FOUND True if QtGui was found.
+# QT4_QT3SUPPORT_FOUND True if Qt3Support was found.
+# QT4_QTASSISTANT_FOUND True if QtAssistant was found.
+# QT4_QTDBUS_FOUND True if QtDBus was found.
+# QT4_QTDESIGNER_FOUND True if QtDesigner was found.
+# QT4_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
+# QT4_QTMOTIF_FOUND True if QtMotif was found.
+# QT4_QTNETWORK_FOUND True if QtNetwork was found.
+# QT4_QTNSPLUGIN_FOUND True if QtNsPlugin was found.
+# QT4_QTOPENGL_FOUND True if QtOpenGL was found.
+# QT4_QTSQL_FOUND True if QtSql was found.
+# QT4_QTXML_FOUND True if QtXml was found.
+# QT4_QTSVG_FOUND True if QtSvg was found.
+# QT4_QTSCRIPT_FOUND True if QtScript was found.
+# QT4_QTTEST_FOUND True if QtTest was found.
+# QT4_QTUITOOLS_FOUND True if QtUiTools was found.
+#
+# QT4_DEFINITIONS Definitions to use when compiling code that uses Qt.
+#
+# QT4_INCLUDES List of paths to all include directories of
+# Qt4 QT4_INCLUDE_DIR and QT4_QTCORE_INCLUDE_DIR are
+# always in this variable even if NOTFOUND,
+# all other INCLUDE_DIRS are
+# only added if they are found.
+#
+# QT4_INCLUDE_DIR Path to "include" of Qt4
+# QT4_QT4_INCLUDE_DIR Path to "include/Qt"
+# QT4_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
+# QT4_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
+# QT4_QTCORE_INCLUDE_DIR Path to "include/QtCore"
+# QT4_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
+# QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
+# QT4_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
+# QT4_QTGUI_INCLUDE_DIR Path to "include/QtGui"
+# QT4_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif"
+# QT4_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork"
+# QT4_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin"
+# QT4_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL"
+# QT4_QTSQL_INCLUDE_DIR Path to "include/QtSql"
+# QT4_QTXML_INCLUDE_DIR Path to "include/QtXml"
+# QT4_QTSVG_INCLUDE_DIR Path to "include/QtSvg"
+# QT4_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript"
+# QT4_QTTEST_INCLUDE_DIR Path to "include/QtTest"
+#
+# QT4_LIBRARY_DIR Path to "lib" of Qt4
+#
+# QT4_PLUGINS_DIR Path to "plugins" for Qt4
+#
+# For every library of Qt, a QT4_QTFOO_LIBRARY variable is defined, with the full path to the library.
+#
+# So there are the following variables:
+# The Qt3Support library: QT4_QT3SUPPORT_LIBRARY
+#
+# The QtAssistant library: QT4_QTASSISTANT_LIBRARY
+#
+# The QtCore library: QT4_QTCORE_LIBRARY
+#
+# The QtDBus library: QT4_QTDBUS_LIBRARY
+#
+# The QtDesigner library: QT4_QTDESIGNER_LIBRARY
+#
+# The QtDesignerComponents library: QT4_QTDESIGNERCOMPONENTS_LIBRARY
+#
+# The QtGui library: QT4_QTGUI_LIBRARY
+#
+# The QtMotif library: QT4_QTMOTIF_LIBRARY
+#
+# The QtNetwork library: QT4_QTNETWORK_LIBRARY
+#
+# The QtNsPLugin library: QT4_QTNSPLUGIN_LIBRARY
+#
+# The QtOpenGL library: QT4_QTOPENGL_LIBRARY
+#
+# The QtSql library: QT4_QTSQL_LIBRARY
+#
+# The QtXml library: QT4_QTXML_LIBRARY
+#
+# The QtSvg library: QT4_QTSVG_LIBRARY
+#
+# The QtScript library: QT4_QTSCRIPT_LIBRARY
+#
+# The QtTest library: QT4_QTTEST_LIBRARY
+#
+# The qtmain library for Windows QT4_QTMAIN_LIBRARY
+#
+# The QtUiTools library: QT4_QTUITOOLS_LIBRARY
+#
+# also defined, but NOT for general use are
+# QT4_MOC_EXECUTABLE Where to find the moc tool.
+# QT4_UIC_EXECUTABLE Where to find the uic tool.
+# QT_UIC3_EXECUTABLE Where to find the uic3 tool.
+# QT_RCC_EXECUTABLE Where to find the rcc tool
+# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool.
+# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool.
+#
+# QT_DOC_DIR Path to "doc" of Qt4
+# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
+#
+#
+# These are around for backwards compatibility
+# they will be set
+# QT_WRAP_CPP Set true if QT4_MOC_EXECUTABLE is found
+# QT_WRAP_UI Set true if QT4_UIC_EXECUTABLE is found
+#
+# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
+# QT_MT_REQUIRED Qt4 is now always multithreaded
+#
+# These variables are set to "" Because Qt structure changed
+# (They make no sense in Qt4)
+# QT4_QT_LIBRARY Qt-Library is now split
+
+# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+if (QT4_QMAKE_FOUND)
+ # Check already done in this cmake run, nothing more to do
+
+else (QT4_QMAKE_FOUND)
+
+# check that QT_NO_DEBUG is defined for release configurations
+MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
+ IF(NOT ${VAR} MATCHES "${FLAG}")
+ SET(${VAR} "${${VAR}} ${FLAG}"
+ CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
+ ENDIF(NOT ${VAR} MATCHES "${FLAG}")
+ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
+
+INCLUDE(CheckSymbolExists)
+INCLUDE(MacroAddFileDependencies)
+INCLUDE(MacroPushRequiredVars)
+
+SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
+
+SET( QT4_DEFINITIONS "")
+
+IF (WIN32)
+ SET(QT4_DEFINITIONS -DQT_DLL)
+ENDIF(WIN32)
+
+SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+
+# macro for asking qmake to process pro files
+MACRO(QT_QUERY_QMAKE outvar invar)
+ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
+ "message(CMAKE_MESSAGE<$$${invar}>)")
+
+ # Invoke qmake with the tmp.pro program to get the desired
+ # information. Use the same variable for both stdout and stderr
+ # to make sure we get the output on all platforms.
+ EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
+ WORKING_DIRECTORY
+ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
+ OUTPUT_VARIABLE _qmake_query_output
+ RESULT_VARIABLE _qmake_result
+ ERROR_VARIABLE _qmake_query_output )
+
+ FILE(REMOVE_RECURSE
+ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
+
+ IF(_qmake_result)
+ MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}")
+ ELSE(_qmake_result)
+ STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
+ ENDIF(_qmake_result)
+
+ENDMACRO(QT_QUERY_QMAKE)
+
+GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
+# check for qmake
+FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
+ $ENV{QTDIR}/bin
+)
+
+IF (QT_QMAKE_EXECUTABLE)
+
+ SET(QT4_QMAKE_FOUND FALSE)
+
+ EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+
+ # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
+ IF("${QTVERSION}" MATCHES "Unknown")
+ SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
+ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+ $ENV{QTDIR}/bin
+ )
+ IF(QT_QMAKE_EXECUTABLE)
+ EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+ ENDIF(QT_QMAKE_EXECUTABLE)
+ ENDIF("${QTVERSION}" MATCHES "Unknown")
+
+ # check that we found the Qt4 qmake, Qt3 qmake output won't match here
+ STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
+ IF (qt_version_tmp)
+
+ # we need at least version 4.0.0
+ IF (NOT QT4_MIN_VERSION)
+ SET(QT4_MIN_VERSION "4.0.0")
+ ENDIF (NOT QT4_MIN_VERSION)
+
+ #now parse the parts of the user given version string into variables
+ STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT4_MIN_VERSION}")
+ IF (NOT req_qt_major_vers)
+ MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT4_MIN_VERSION}\", expected e.g. \"4.0.1\"")
+ ENDIF (NOT req_qt_major_vers)
+
+ # now parse the parts of the user given version string into variables
+ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT4_MIN_VERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT4_MIN_VERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT4_MIN_VERSION}")
+
+ IF (NOT req_qt_major_vers EQUAL 4)
+ MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT4_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
+ ENDIF (NOT req_qt_major_vers EQUAL 4)
+
+ # and now the version string given by qmake
+ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" found_qt_major_vers "${QTVERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" found_qt_minor_vers "${QTVERSION}")
+ STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" found_qt_patch_vers "${QTVERSION}")
+
+ # compute an overall version number which can be compared at once
+ MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
+ MATH(EXPR found_vers "${found_qt_major_vers}*10000 + ${found_qt_minor_vers}*100 + ${found_qt_patch_vers}")
+
+ IF (found_vers LESS req_vers)
+ SET(QT4_QMAKE_FOUND FALSE)
+ SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
+ ELSE (found_vers LESS req_vers)
+ SET(QT4_QMAKE_FOUND TRUE)
+ ENDIF (found_vers LESS req_vers)
+ ENDIF (qt_version_tmp)
+
+ENDIF (QT_QMAKE_EXECUTABLE)
+
+IF (QT4_QMAKE_FOUND)
+
+ if (WIN32)
+ # get qt install dir
+ get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH )
+ get_filename_component(QT_INSTALL_DIR ${_DIR} PATH )
+ endif (WIN32)
+
+ # ask qmake for the library dir
+ # Set QT4_LIBRARY_DIR
+ IF (NOT QT4_LIBRARY_DIR)
+ EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_INSTALL_LIBS"
+ OUTPUT_VARIABLE QT4_LIBRARY_DIR_TMP )
+ IF(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+ SET(QT4_LIBRARY_DIR ${QT4_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir")
+ ELSE(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+ MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT4_LIBRARY_DIR_TMP}")
+ MESSAGE("Warning: ${QT4_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
+ ENDIF(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+ ENDIF(NOT QT4_LIBRARY_DIR)
+
+ IF (APPLE)
+ IF (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+ SET(QT_USE_FRAMEWORKS ON
+ CACHE BOOL "Set to ON if Qt build uses frameworks.")
+ ELSE (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+ SET(QT_USE_FRAMEWORKS OFF
+ CACHE BOOL "Set to ON if Qt build uses frameworks.")
+ ENDIF (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+
+ MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
+ ENDIF (APPLE)
+
+ # ask qmake for the binary dir
+ IF (NOT QT_BINARY_DIR)
+ EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_INSTALL_BINS"
+ OUTPUT_VARIABLE qt_bins )
+ SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "")
+ ENDIF (NOT QT_BINARY_DIR)
+
+ # ask qmake for the include dir
+ IF (NOT QT_HEADERS_DIR)
+ EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_INSTALL_HEADERS"
+ OUTPUT_VARIABLE qt_headers )
+ SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "")
+ ENDIF(NOT QT_HEADERS_DIR)
+
+
+ # ask qmake for the documentation directory
+ IF (NOT QT_DOC_DIR)
+ EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_INSTALL_DOCS"
+ OUTPUT_VARIABLE qt_doc_dir )
+ SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs")
+ ENDIF (NOT QT_DOC_DIR)
+
+ # ask qmake for the mkspecs directory
+ IF (NOT QT_MKSPECS_DIR)
+ EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QMAKE_MKSPECS"
+ OUTPUT_VARIABLE qt_mkspecs_dirs )
+ STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
+ FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
+ DOC "The location of the Qt mkspecs containing qconfig.pri"
+ NO_DEFAULT_PATH )
+ ENDIF (NOT QT_MKSPECS_DIR)
+
+ # ask qmake for the plugins directory
+ IF (NOT QT4_PLUGINS_DIR)
+ EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+ ARGS "-query QT_INSTALL_PLUGINS"
+ OUTPUT_VARIABLE qt_plugins_dir )
+ SET(QT4_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins")
+ ENDIF (NOT QT4_PLUGINS_DIR)
+ ########################################
+ #
+ # Setting the INCLUDE-Variables
+ #
+ ########################################
+
+ FIND_PATH(QT4_QTCORE_INCLUDE_DIR QtGlobal
+ ${QT_HEADERS_DIR}/QtCore
+ ${QT4_LIBRARY_DIR}/QtCore.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_INCLUDE_DIR by removine "/QtCore" in the string ${QT4_QTCORE_INCLUDE_DIR}
+ IF( QT4_QTCORE_INCLUDE_DIR AND NOT QT4_INCLUDE_DIR)
+ IF (QT_USE_FRAMEWORKS)
+ SET(QT4_INCLUDE_DIR ${QT_HEADERS_DIR})
+ ELSE (QT_USE_FRAMEWORKS)
+ STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT4_QTCORE_INCLUDE_DIR})
+ SET( QT4_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
+ ENDIF (QT_USE_FRAMEWORKS)
+ ENDIF( QT4_QTCORE_INCLUDE_DIR AND NOT QT4_INCLUDE_DIR)
+
+ IF( NOT QT4_INCLUDE_DIR)
+ IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
+ ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+ ENDIF( NOT QT4_INCLUDE_DIR)
+
+ #############################################
+ #
+ # Find out what window system we're using
+ #
+ #############################################
+ # Save required includes and required_flags variables
+ macro_push_required_vars()
+ # Add QT4_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
+ SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT4_INCLUDE_DIR}")
+ # On Mac OS X when Qt has framework support, also add the framework path
+ IF( QT_USE_FRAMEWORKS )
+ SET(CMAKE_REQUIRED_FLAGS "-F${QT4_LIBRARY_DIR} ")
+ ENDIF( QT_USE_FRAMEWORKS )
+ # Check for Window system symbols (note: only one should end up being set)
+ CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
+ CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
+ CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
+ CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
+
+ IF (QT4_QTCOPY_REQUIRED)
+ CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
+ IF (NOT QT_IS_QTCOPY)
+ MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
+ ENDIF (NOT QT_IS_QTCOPY)
+ ENDIF (QT4_QTCOPY_REQUIRED)
+
+ # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables
+ macro_pop_required_vars()
+ #
+ #############################################
+
+ IF (QT_USE_FRAMEWORKS)
+ SET(QT4_DEFINITIONS ${QT4_DEFINITIONS} -F${QT4_LIBRARY_DIR} -L${QT4_LIBRARY_DIR} )
+ ENDIF (QT_USE_FRAMEWORKS)
+
+ # Set QT4_QT3SUPPORT_INCLUDE_DIR
+ FIND_PATH(QT4_QT3SUPPORT_INCLUDE_DIR Qt3Support
+ PATHS
+ ${QT4_INCLUDE_DIR}/Qt3Support
+ ${QT4_LIBRARY_DIR}/Qt3Support.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QT4_INCLUDE_DIR
+ FIND_PATH(QT4_QT4_INCLUDE_DIR qglobal.h
+ PATHS
+ ${QT4_INCLUDE_DIR}/Qt
+ ${QT4_LIBRARY_DIR}/QtCore.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTGUI_INCLUDE_DIR
+ FIND_PATH(QT4_QTGUI_INCLUDE_DIR QtGui
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtGui
+ ${QT4_LIBRARY_DIR}/QtGui.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTSVG_INCLUDE_DIR
+ FIND_PATH(QT4_QTSVG_INCLUDE_DIR QtSvg
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtSvg
+ ${QT4_LIBRARY_DIR}/QtSvg.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTSCRIPT_INCLUDE_DIR
+ FIND_PATH(QT4_QTSCRIPT_INCLUDE_DIR QtScript
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtScript
+ ${QT4_LIBRARY_DIR}/QtScript.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTTEST_INCLUDE_DIR
+ FIND_PATH(QT4_QTTEST_INCLUDE_DIR QtTest
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtTest
+ ${QT4_LIBRARY_DIR}/QtTest.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTUITOOLS_INCLUDE_DIR
+ FIND_PATH(QT4_QTUITOOLS_INCLUDE_DIR QtUiTools
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtUiTools
+ ${QT4_LIBRARY_DIR}/QtUiTools.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+
+
+ # Set QT4_QTMOTIF_INCLUDE_DIR
+ IF(Q_WS_X11)
+ FIND_PATH(QT4_QTMOTIF_INCLUDE_DIR QtMotif PATHS ${QT4_INCLUDE_DIR}/QtMotif NO_DEFAULT_PATH )
+ ENDIF(Q_WS_X11)
+
+ # Set QT4_QTNETWORK_INCLUDE_DIR
+ FIND_PATH(QT4_QTNETWORK_INCLUDE_DIR QtNetwork
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtNetwork
+ ${QT4_LIBRARY_DIR}/QtNetwork.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTNSPLUGIN_INCLUDE_DIR
+ FIND_PATH(QT4_QTNSPLUGIN_INCLUDE_DIR QtNsPlugin
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtNsPlugin
+ ${QT4_LIBRARY_DIR}/QtNsPlugin.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTOPENGL_INCLUDE_DIR
+ FIND_PATH(QT4_QTOPENGL_INCLUDE_DIR QtOpenGL
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtOpenGL
+ ${QT4_LIBRARY_DIR}/QtOpenGL.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTSQL_INCLUDE_DIR
+ FIND_PATH(QT4_QTSQL_INCLUDE_DIR QtSql
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtSql
+ ${QT4_LIBRARY_DIR}/QtSql.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTXML_INCLUDE_DIR
+ FIND_PATH(QT4_QTXML_INCLUDE_DIR QtXml
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtXml
+ ${QT4_LIBRARY_DIR}/QtXml.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTASSISTANT_INCLUDE_DIR
+ FIND_PATH(QT4_QTASSISTANT_INCLUDE_DIR QtAssistant
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtAssistant
+ ${QT_HEADERS_DIR}/QtAssistant
+ ${QT4_LIBRARY_DIR}/QtAssistant.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTDESIGNER_INCLUDE_DIR
+ FIND_PATH(QT4_QTDESIGNER_INCLUDE_DIR QDesignerComponents
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtDesigner
+ ${QT_HEADERS_DIR}/QtDesigner
+ ${QT4_LIBRARY_DIR}/QtDesigner.framework/Headers
+ NO_DEFAULT_PATH
+ )
+
+ # Set QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR
+ FIND_PATH(QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtDesigner
+ ${QT_HEADERS_DIR}/QtDesigner
+ NO_DEFAULT_PATH
+ )
+
+
+ # Set QT4_QTDBUS_INCLUDE_DIR
+ FIND_PATH(QT4_QTDBUS_INCLUDE_DIR QtDBus
+ PATHS
+ ${QT4_INCLUDE_DIR}/QtDBus
+ ${QT_HEADERS_DIR}/QtDBus
+ NO_DEFAULT_PATH
+ )
+
+ # Make variables changeble to the advanced user
+ MARK_AS_ADVANCED( QT4_LIBRARY_DIR QT4_INCLUDE_DIR QT4_QT4_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT4_PLUGINS_DIR)
+
+ # Set QT4_INCLUDES
+ SET( QT4_INCLUDES ${QT4_QT4_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT4_INCLUDE_DIR})
+
+
+ ########################################
+ #
+ # Setting the LIBRARY-Variables
+ #
+ ########################################
+
+ IF (QT_USE_FRAMEWORKS)
+ # If FIND_LIBRARY found libraries in Apple frameworks, we would NOT have
+ # to jump through these hoops.
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+ SET(QT4_QTCORE_FOUND TRUE)
+ SET(QT4_QTCORE_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtCore" CACHE STRING "The QtCore library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+ SET(QT4_QTCORE_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+ SET(QT4_QTGUI_FOUND TRUE)
+ SET(QT4_QTGUI_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtGui" CACHE STRING "The QtGui library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+ SET(QT4_QTGUI_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+ SET(QT4_QT3SUPPORT_FOUND TRUE)
+ SET(QT4_QT3SUPPORT_LIBRARY "-F${QT4_LIBRARY_DIR} -framework Qt3Support" CACHE STRING "The Qt3Support library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+ SET(QT4_QT3SUPPORT_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+ SET(QT4_QTNETWORK_FOUND TRUE)
+ SET(QT4_QTNETWORK_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtNetwork" CACHE STRING "The QtNetwork library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+ SET(QT4_QTNETWORK_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+ SET(QT4_QTOPENGL_FOUND TRUE)
+ SET(QT4_QTOPENGL_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtOpenGL" CACHE STRING "The QtOpenGL library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+ SET(QT4_QTOPENGL_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+ SET(QT4_QTSQL_FOUND TRUE)
+ SET(QT4_QTSQL_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtSql" CACHE STRING "The QtSql library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+ SET(QT4_QTSQL_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+ SET(QT4_QTXML_FOUND TRUE)
+ SET(QT4_QTXML_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtXml" CACHE STRING "The QtXml library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+ SET(QT4_QTXML_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+ SET(QT4_QTSVG_FOUND TRUE)
+ SET(QT4_QTSVG_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtSvg" CACHE STRING "The QtSvg library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+ SET(QT4_QTSVG_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+ SET(QT4_QTDBUS_FOUND TRUE)
+ SET(QT4_QTDBUS_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtDBus" CACHE STRING "The QtDBus library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+ SET(QT4_QTDBUS_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+
+ IF(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+ SET(QT4_QTTEST_FOUND TRUE)
+ SET(QT4_QTTEST_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtTest" CACHE STRING "The QtTest library.")
+ ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+ SET(QT4_QTTEST_FOUND FALSE)
+ ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+
+ # WTF? why don't we have frameworks? :P
+ # Set QT4_QTUITOOLS_LIBRARY
+ FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT4_LIBRARY_DIR} )
+ # Set QT4_QTSCRIPT_LIBRARY
+ FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 PATHS ${QT4_LIBRARY_DIR} )
+
+ ELSE (QT_USE_FRAMEWORKS)
+
+ # Set QT4_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename
+ FIND_LIBRARY(QT4_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH )
+
+ # Set QT4_QT3SUPPORT_LIBRARY
+ FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support4 Qt3Supportd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTGUI_LIBRARY
+ FIND_LIBRARY(QT4_QTGUI_LIBRARY NAMES QtGui QtGui4 QtGuid4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTMOTIF_LIBRARY
+ IF(Q_WS_X11)
+ FIND_LIBRARY(QT4_QTMOTIF_LIBRARY NAMES QtMotif PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ ENDIF(Q_WS_X11)
+
+ # Set QT4_QTNETWORK_LIBRARY
+ FIND_LIBRARY(QT4_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork4 QtNetworkd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTNSPLUGIN_LIBRARY
+ FIND_LIBRARY(QT4_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTOPENGL_LIBRARY
+ FIND_LIBRARY(QT4_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL4 QtOpenGLd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTSQL_LIBRARY
+ FIND_LIBRARY(QT4_QTSQL_LIBRARY NAMES QtSql QtSql4 QtSqld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTXML_LIBRARY
+ FIND_LIBRARY(QT4_QTXML_LIBRARY NAMES QtXml QtXml4 QtXmld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTSVG_LIBRARY
+ FIND_LIBRARY(QT4_QTSVG_LIBRARY NAMES QtSvg QtSvg4 QtSvgd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTSCRIPT_LIBRARY
+ FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 QtScriptd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTUITOOLS_LIBRARY
+ FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 QtUiToolsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTTEST_LIBRARY
+ FIND_LIBRARY(QT4_QTTEST_LIBRARY NAMES QtTest QtTest4 QtTestd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ FIND_LIBRARY(QT4_QTDBUS_LIBRARY NAMES QtDBus QtDBus4 QtDBusd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ IF(MSVC)
+ FIND_LIBRARY(QT4_QTCORE_LIBRARY_RELEASE NAMES QtCore4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTCORE_LIBRARY_DEBUG NAMES QtCored4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Supportd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTGUI_LIBRARY_RELEASE NAMES QtGui4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTGUI_LIBRARY_DEBUG NAMES QtGuid4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTNETWORK_LIBRARY_DEBUG NAMES QtNetworkd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGLd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSQL_LIBRARY_RELEASE NAMES QtSql4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSQL_LIBRARY_DEBUG NAMES QtSqld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTXML_LIBRARY_RELEASE NAMES QtXml4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTXML_LIBRARY_DEBUG NAMES QtXmld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSVG_LIBRARY_RELEASE NAMES QtSvg4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSVG_LIBRARY_DEBUG NAMES QtSvgd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY_DEBUG NAMES QtScriptd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY_DEBUG NAMES QtUiToolsd QtUiToolsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTTEST_LIBRARY_RELEASE NAMES QtTest4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTTEST_LIBRARY_DEBUG NAMES QtTestd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDBUS_LIBRARY_RELEASE NAMES QtDBus4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDBUS_LIBRARY_DEBUG NAMES QtDBusd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClientd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesignerd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponentsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTMAIN_LIBRARY_RELEASE NAMES qtmain PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ FIND_LIBRARY(QT4_QTMAIN_LIBRARY_DEBUG NAMES qtmaind PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ ENDIF(MSVC)
+ ENDIF (QT_USE_FRAMEWORKS)
+
+ IF( NOT QT4_QTCORE_LIBRARY )
+ IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
+ ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+ ENDIF( NOT QT4_QTCORE_LIBRARY )
+
+ # Set QT4_QTASSISTANT_LIBRARY
+ FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 QtAssistantd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTDESIGNER_LIBRARY
+ FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner4 QtDesignerd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTDESIGNERCOMPONENTS_LIBRARY
+ FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+ # Set QT4_QTMAIN_LIBRARY
+ IF(WIN32)
+ FIND_LIBRARY(QT4_QTMAIN_LIBRARY NAMES qtmain qtmaind PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+ ENDIF(WIN32)
+
+ ############################################
+ #
+ # Check the existence of the libraries.
+ #
+ ############################################
+
+ MACRO (_QT4_ADJUST_LIB_VARS basename)
+ IF (QT4_${basename}_LIBRARY OR QT4_${basename}_LIBRARY_DEBUG)
+
+ IF(MSVC)
+ # Both set
+ IF (QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+ SET(QT4_${basename}_LIBRARY optimized ${QT4_${basename}_LIBRARY_RELEASE} debug ${QT4_${basename}_LIBRARY_DEBUG})
+ ENDIF (QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+
+ # Only debug was found
+ IF (NOT QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+ SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY_DEBUG})
+ ENDIF (NOT QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+
+ # Only release was found
+ IF (QT4_${basename}_LIBRARY_RELEASE AND NOT QT4_${basename}_LIBRARY_DEBUG)
+ SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY_RELEASE})
+ ENDIF (QT4_${basename}_LIBRARY_RELEASE AND NOT QT4_${basename}_LIBRARY_DEBUG)
+
+ # Hmm, is this used anywhere ? Yes, in UseQt4.cmake. We are currently incompatible :-(
+ SET(QT4_${basename}_LIBRARIES optimized ${QT4_${basename}_LIBRARY} debug ${QT4_${basename}_LIBRARY_DEBUG})
+
+ ENDIF(MSVC)
+
+ SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY} CACHE FILEPATH "The Qt4 ${basename} library")
+
+ IF (QT4_${basename}_LIBRARY)
+ SET(QT4_${basename}_FOUND 1)
+ ENDIF (QT4_${basename}_LIBRARY)
+
+ ENDIF (QT4_${basename}_LIBRARY OR QT4_${basename}_LIBRARY_DEBUG)
+
+ IF (QT4_${basename}_INCLUDE_DIR)
+ #add the include directory to QT4_INCLUDES
+ SET(QT4_INCLUDES "${QT4_${basename}_INCLUDE_DIR}" ${QT4_INCLUDES})
+ ENDIF (QT4_${basename}_INCLUDE_DIR)
+
+ # Make variables changeble to the advanced user
+ MARK_AS_ADVANCED(QT4_${basename}_LIBRARY QT4_${basename}_INCLUDE_DIR)
+ ENDMACRO (_QT4_ADJUST_LIB_VARS)
+
+
+ # Set QT_xyz_LIBRARY variable and add
+ # library include path to QT4_INCLUDES
+ _QT4_ADJUST_LIB_VARS(QTCORE)
+ _QT4_ADJUST_LIB_VARS(QTGUI)
+ _QT4_ADJUST_LIB_VARS(QT3SUPPORT)
+ _QT4_ADJUST_LIB_VARS(QTASSISTANT)
+ _QT4_ADJUST_LIB_VARS(QTDESIGNER)
+ _QT4_ADJUST_LIB_VARS(QTDESIGNERCOMPONENTS)
+ _QT4_ADJUST_LIB_VARS(QTNETWORK)
+ _QT4_ADJUST_LIB_VARS(QTNSPLUGIN)
+ _QT4_ADJUST_LIB_VARS(QTOPENGL)
+ _QT4_ADJUST_LIB_VARS(QTSQL)
+ _QT4_ADJUST_LIB_VARS(QTXML)
+ _QT4_ADJUST_LIB_VARS(QTSVG)
+ _QT4_ADJUST_LIB_VARS(QTSCRIPT)
+ _QT4_ADJUST_LIB_VARS(QTUITOOLS)
+ _QT4_ADJUST_LIB_VARS(QTTEST)
+ _QT4_ADJUST_LIB_VARS(QTDBUS)
+
+ # platform dependent libraries
+ IF(Q_WS_X11)
+ _QT4_ADJUST_LIB_VARS(QTMOTIF)
+ ENDIF(Q_WS_X11)
+ IF(WIN32)
+ _QT4_ADJUST_LIB_VARS(QTMAIN)
+ ENDIF(WIN32)
+
+
+ #######################################
+ #
+ # Check the executables of Qt
+ # ( moc, uic, rcc )
+ #
+ #######################################
+
+
+ # find moc and uic using qmake
+ QT_QUERY_QMAKE(QT4_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC")
+ QT_QUERY_QMAKE(QT4_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC")
+
+ FILE(TO_CMAKE_PATH
+ "${QT4_MOC_EXECUTABLE_INTERNAL}" QT4_MOC_EXECUTABLE_INTERNAL)
+ FILE(TO_CMAKE_PATH
+ "${QT4_UIC_EXECUTABLE_INTERNAL}" QT4_UIC_EXECUTABLE_INTERNAL)
+
+ SET(QT4_MOC_EXECUTABLE
+ ${QT4_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
+ SET(QT4_UIC_EXECUTABLE
+ ${QT4_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
+
+ FIND_PROGRAM(QT_UIC3_EXECUTABLE
+ NAMES uic3
+ PATHS ${QT_BINARY_DIR}
+ NO_DEFAULT_PATH
+ )
+
+ FIND_PROGRAM(QT_RCC_EXECUTABLE
+ NAMES rcc
+ PATHS ${QT_BINARY_DIR}
+ NO_DEFAULT_PATH
+ )
+
+ FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
+ NAMES qdbuscpp2xml
+ PATHS ${QT_BINARY_DIR}
+ NO_DEFAULT_PATH
+ )
+
+ FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
+ NAMES qdbusxml2cpp
+ PATHS ${QT_BINARY_DIR}
+ NO_DEFAULT_PATH
+ )
+
+ IF (QT4_MOC_EXECUTABLE)
+ SET(QT_WRAP_CPP "YES")
+ ENDIF (QT4_MOC_EXECUTABLE)
+
+ IF (QT4_UIC_EXECUTABLE)
+ SET(QT_WRAP_UI "YES")
+ ENDIF (QT4_UIC_EXECUTABLE)
+
+
+
+ MARK_AS_ADVANCED( QT4_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT4_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE)
+
+ ######################################
+ #
+ # Macros for building Qt files
+ #
+ ######################################
+ MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
+ SET(${_qt4_files})
+ SET(${_qt4_options})
+ SET(_QT4_DOING_OPTIONS FALSE)
+ FOREACH(_currentArg ${ARGN})
+ IF ("${_currentArg}" STREQUAL "OPTIONS")
+ SET(_QT4_DOING_OPTIONS TRUE)
+ ELSE ("${_currentArg}" STREQUAL "OPTIONS")
+ IF(_QT4_DOING_OPTIONS)
+ LIST(APPEND ${_qt4_options} "${_currentArg}")
+ ELSE(_QT4_DOING_OPTIONS)
+ LIST(APPEND ${_qt4_files} "${_currentArg}")
+ ENDIF(_QT4_DOING_OPTIONS)
+ ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
+ ENDFOREACH(_currentArg)
+ ENDMACRO (QT4_EXTRACT_OPTIONS)
+
+ MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS)
+ SET(${_moc_INC_DIRS})
+ GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
+
+ FOREACH(_current ${_inc_DIRS})
+ SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current})
+ ENDFOREACH(_current ${_inc_DIRS})
+
+ ENDMACRO(QT4_GET_MOC_INC_DIRS)
+
+
+ MACRO (QT4_GENERATE_MOC infile outfile )
+ # get include dirs
+ QT4_GET_MOC_INC_DIRS(moc_includes)
+
+ GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
+
+ IF (MSVC_IDE)
+ SET (_moc_parameter_file ${outfile}_parameters)
+ SET (_moc_param "${moc_includes} \n-o${outfile} \n${abs_infile}")
+ STRING(REGEX REPLACE ";-I;" "\\n-I" _moc_param "${_moc_param}")
+ FILE (WRITE ${_moc_parameter_file} "${_moc_param}")
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT4_MOC_EXECUTABLE}
+ ARGS @"${_moc_parameter_file}"
+ DEPENDS ${abs_infile})
+ ELSE (MSVC_IDE)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT4_MOC_EXECUTABLE}
+ ARGS ${moc_includes} -o ${outfile} ${abs_infile}
+ DEPENDS ${abs_infile})
+ ENDIF (MSVC_IDE)
+
+ SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
+
+ MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile})
+ ENDMACRO (QT4_GENERATE_MOC)
+
+
+ # QT4_WRAP_CPP(outfiles inputfile ... )
+ # TODO perhaps add support for -D, -U and other minor options
+
+ MACRO (QT4_WRAP_CPP outfiles )
+ # get include dirs
+ QT4_GET_MOC_INC_DIRS(moc_includes)
+ QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
+
+ FOREACH (it ${moc_files})
+ GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+
+ SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT4_MOC_EXECUTABLE}
+ ARGS ${moc_includes} ${moc_options} -o ${outfile} ${it}
+ DEPENDS ${it})
+ SET(${outfiles} ${${outfiles}} ${outfile})
+ ENDFOREACH(it)
+
+ ENDMACRO (QT4_WRAP_CPP)
+
+
+ # QT4_WRAP_UI(outfiles inputfile ... )
+
+ MACRO (QT4_WRAP_UI outfiles )
+ QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
+
+ FOREACH (it ${ui_files})
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+ SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT4_UIC_EXECUTABLE}
+ ARGS ${ui_options} -o ${outfile} ${infile}
+ MAIN_DEPENDENCY ${infile})
+ SET(${outfiles} ${${outfiles}} ${outfile})
+ ENDFOREACH (it)
+
+ ENDMACRO (QT4_WRAP_UI)
+
+
+ # QT4_ADD_RESOURCES(outfiles inputfile ... )
+ # TODO perhaps consider adding support for compression and root options to rcc
+
+ MACRO (QT4_ADD_RESOURCES outfiles )
+ QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+
+ FOREACH (it ${rcc_files})
+ GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+ GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
+ SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
+ # parse file for dependencies
+ # all files are absolute paths or relative to the location of the qrc file
+ FILE(READ "${infile}" _RC_FILE_CONTENTS)
+ STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+ SET(_RC_DEPENDS)
+ FOREACH(_RC_FILE ${_RC_FILES})
+ STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+ STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+ IF(NOT _ABS_PATH_INDICATOR)
+ SET(_RC_FILE "${rc_path}/${_RC_FILE}")
+ ENDIF(NOT _ABS_PATH_INDICATOR)
+ SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+ ENDFOREACH(_RC_FILE)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT_RCC_EXECUTABLE}
+ ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+ MAIN_DEPENDENCY ${infile}
+ DEPENDS ${_RC_DEPENDS})
+ SET(${outfiles} ${${outfiles}} ${outfile})
+ ENDFOREACH (it)
+
+ ENDMACRO (QT4_ADD_RESOURCES)
+
+ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
+ GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
+ SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+ SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+ SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+
+ GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
+ IF ( _nonamespace )
+ SET(_params -N -m)
+ ELSE ( _nonamespace )
+ SET(_params -m)
+ ENDIF ( _nonamespace )
+
+ GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
+ IF ( _include )
+ SET(_params ${_params} -i ${_include})
+ ENDIF ( _include )
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
+ DEPENDS ${_infile})
+
+ SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
+
+ QT4_GENERATE_MOC(${_header} ${_moc})
+
+ SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
+ MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+
+ ENDMACRO(QT4_ADD_DBUS_INTERFACE)
+
+
+ MACRO(QT4_ADD_DBUS_INTERFACES _sources)
+ FOREACH (_current_FILE ${ARGN})
+ GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
+ # get the part before the ".xml" suffix
+ STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
+ STRING(TOLOWER ${_basename} _basename)
+ QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
+ ENDFOREACH (_current_FILE)
+ ENDMACRO(QT4_ADD_DBUS_INTERFACES)
+
+
+ MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
+ QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
+
+ GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
+ GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
+
+ IF (_customName)
+ SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
+ ELSE (_customName)
+ SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
+ ENDIF (_customName)
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${_target}
+ COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} > ${_target}
+ DEPENDS ${_in_file}
+ )
+ ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
+
+
+ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
+ GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
+
+ SET(_optionalBasename "${ARGV4}")
+ IF (_optionalBasename)
+ SET(_basename ${_optionalBasename} )
+ ELSE (_optionalBasename)
+ STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
+ STRING(TOLOWER ${_basename} _basename)
+ ENDIF (_optionalBasename)
+
+ SET(_optionalClassName "${ARGV5}")
+ SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+ SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+ SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+
+ IF(_optionalClassName)
+ ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
+ DEPENDS ${_infile}
+ )
+ ELSE(_optionalClassName)
+ ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
+ DEPENDS ${_infile}
+ )
+ ENDIF(_optionalClassName)
+
+ QT4_GENERATE_MOC(${_header} ${_moc})
+ SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
+ MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+
+ SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
+ ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
+
+ MACRO(QT4_AUTOMOC)
+ QT4_GET_MOC_INC_DIRS(_moc_INCS)
+
+ SET(_matching_FILES )
+ FOREACH (_current_FILE ${ARGN})
+
+ GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
+ # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
+ # here. this is required to make bouic work correctly:
+ # we need to add generated .cpp files to the sources (to compile them),
+ # but we cannot let automoc handle them, as the .cpp files don't exist yet when
+ # cmake is run for the very first time on them -> however the .cpp files might
+ # exist at a later run. at that time we need to skip them, so that we don't add two
+ # different rules for the same moc file
+ GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
+
+ IF ( NOT _skip AND EXISTS ${_abs_FILE} )
+
+ FILE(READ ${_abs_FILE} _contents)
+
+ GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
+
+ STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
+ IF(_match)
+ FOREACH (_current_MOC_INC ${_match})
+ STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
+
+ GET_filename_component(_basename ${_current_MOC} NAME_WE)
+ # SET(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
+ IF (EXISTS ${_abs_PATH}/${_basename}.h)
+ SET(_header ${_abs_PATH}/${_basename}.h)
+ ELSE (EXISTS ${_abs_PATH}/${_basename}.h)
+ SET(_header ${_abs_FILE})
+ ENDIF (EXISTS ${_abs_PATH}/${_basename}.h)
+ SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
+ ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
+ COMMAND ${QT4_MOC_EXECUTABLE}
+ ARGS ${_moc_INCS} ${_header} -o ${_moc}
+ DEPENDS ${_header}
+ )
+
+ MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
+ ENDFOREACH (_current_MOC_INC)
+ ENDIF(_match)
+ ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
+ ENDFOREACH (_current_FILE)
+ ENDMACRO(QT4_AUTOMOC)
+
+
+
+ ######################################
+ #
+ # decide if Qt got found
+ #
+ ######################################
+
+ # if the includes,libraries,moc,uic and rcc are found then we have it
+ IF( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+ SET( QT4_FOUND "YES" )
+ IF( NOT Qt4_FIND_QUIETLY)
+ MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})")
+ ENDIF( NOT Qt4_FIND_QUIETLY)
+ ELSE( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+ SET( QT4_FOUND "NO")
+ SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
+ IF( Qt4_FIND_REQUIRED)
+ IF ( NOT QT4_LIBRARY_DIR )
+ MESSAGE(STATUS "Qt libraries NOT found!")
+ ENDIF(NOT QT4_LIBRARY_DIR )
+ IF ( NOT QT4_INCLUDE_DIR )
+ MESSAGE(STATUS "Qt includes NOT found!")
+ ENDIF( NOT QT4_INCLUDE_DIR )
+ IF ( NOT QT4_MOC_EXECUTABLE )
+ MESSAGE(STATUS "Qt's moc NOT found!")
+ ENDIF( NOT QT4_MOC_EXECUTABLE )
+ IF ( NOT QT4_UIC_EXECUTABLE )
+ MESSAGE(STATUS "Qt's uic NOT found!")
+ ENDIF( NOT QT4_UIC_EXECUTABLE )
+ IF ( NOT QT_RCC_EXECUTABLE )
+ MESSAGE(STATUS "Qt's rcc NOT found!")
+ ENDIF( NOT QT_RCC_EXECUTABLE )
+ MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
+ ENDIF( Qt4_FIND_REQUIRED)
+ ENDIF( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+ SET(QT_FOUND ${QT4_FOUND})
+
+
+ #######################################
+ #
+ # System dependent settings
+ #
+ #######################################
+ # for unix add X11 stuff
+ IF(UNIX)
+ # on OS X X11 may not be required
+ IF (Q_WS_X11)
+ FIND_PACKAGE(X11 REQUIRED)
+ ENDIF (Q_WS_X11)
+ FIND_PACKAGE(Threads)
+ SET(QT4_QTCORE_LIBRARY ${QT4_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+ ENDIF(UNIX)
+
+
+ #######################################
+ #
+ # compatibility settings
+ #
+ #######################################
+ # Backwards compatibility for CMake1.4 and 1.2
+ SET (QT_MOC_EXE ${QT4_MOC_EXECUTABLE} )
+ SET (QT_UIC_EXE ${QT4_UIC_EXECUTABLE} )
+
+ SET( QT4_QT_LIBRARY "")
+
+ELSE(QT4_QMAKE_FOUND)
+
+ SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
+ IF(Qt4_FIND_REQUIRED)
+ IF(QT4_INSTALLED_VERSION_TOO_OLD)
+ MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT4_MIN_VERSION} is required")
+ ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
+ MESSAGE( FATAL_ERROR "Qt qmake not found!")
+ ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
+ ELSE(Qt4_FIND_REQUIRED)
+ IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+ MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT4_MIN_VERSION} is required")
+ ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+ ENDIF(Qt4_FIND_REQUIRED)
+
+ENDIF (QT4_QMAKE_FOUND)
+ENDIF (QT4_QMAKE_FOUND)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroBoolTo01.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroBoolTo01.cmake
new file mode 100644
index 00000000000..63b9852660d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroBoolTo01.cmake
@@ -0,0 +1,20 @@
+# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
+# This macro evaluates its first argument
+# and sets all the given vaiables either to 0 or 1
+# depending on the value of the first one
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
+ FOREACH (_current_VAR ${ARGN})
+ IF(${FOUND_VAR})
+ SET(${_current_VAR} 1)
+ ELSE(${FOUND_VAR})
+ SET(${_current_VAR} 0)
+ ENDIF(${FOUND_VAR})
+ ENDFOREACH(_current_VAR)
+ENDMACRO(MACRO_BOOL_TO_01)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroEnsureVersion.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroEnsureVersion.cmake
new file mode 100644
index 00000000000..6797e5b7dbb
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroEnsureVersion.cmake
@@ -0,0 +1,117 @@
+# This file defines the following macros for developers to use in ensuring
+# that installed software is of the right version:
+#
+# MACRO_ENSURE_VERSION - test that a version number is greater than
+# or equal to some minimum
+# MACRO_ENSURE_VERSION_RANGE - test that a version number is greater than
+# or equal to some minimum and less than some
+# maximum
+# MACRO_ENSURE_VERSION2 - deprecated, do not use in new code
+#
+
+# MACRO_ENSURE_VERSION
+# This macro compares version numbers of the form "x.y.z" or "x.y"
+# MACRO_ENSURE_VERSION( FOO_MIN_VERSION FOO_VERSION_FOUND FOO_VERSION_OK)
+# will set FOO_VERSION_OK to true if FOO_VERSION_FOUND >= FOO_MIN_VERSION
+# Leading and trailing text is ok, e.g.
+# MACRO_ENSURE_VERSION( "2.5.31" "flex 2.5.4a" VERSION_OK)
+# which means 2.5.31 is required and "flex 2.5.4a" is what was found on the system
+
+# Copyright (c) 2006, David Faure, <faure@kde.org>
+# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+# MACRO_ENSURE_VERSION_RANGE
+# This macro ensures that a version number of the form
+# "x.y.z" or "x.y" falls within a range defined by
+# min_version <= found_version < max_version.
+# If this expression holds, FOO_VERSION_OK will be set TRUE
+#
+# Example: MACRO_ENSURE_VERSION_RANGE3( "0.1.0" ${FOOCODE_VERSION} "0.7.0" FOO_VERSION_OK )
+#
+# This macro will break silently if any of x,y,z are greater than 100.
+#
+# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+# NORMALIZE_VERSION
+# Helper macro to convert version numbers of the form "x.y.z"
+# to an integer equal to 10^4 * x + 10^2 * y + z
+#
+# This macro will break silently if any of x,y,z are greater than 100.
+#
+# Copyright (c) 2006, David Faure, <faure@kde.org>
+# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+# CHECK_RANGE_INCLUSIVE_LOWER
+# Helper macro to check whether x <= y < z
+#
+# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+MACRO(NORMALIZE_VERSION _requested_version _normalized_version)
+ STRING(REGEX MATCH "[^0-9]*[0-9]+\\.[0-9]+\\.[0-9]+.*" _threePartMatch "${_requested_version}")
+ if (_threePartMatch)
+ # parse the parts of the version string
+ STRING(REGEX REPLACE "[^0-9]*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" _major_vers "${_requested_version}")
+ STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" _minor_vers "${_requested_version}")
+ STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" _patch_vers "${_requested_version}")
+ else (_threePartMatch)
+ STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+" "\\1" _major_vers "${_requested_version}")
+ STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)" "\\1" _minor_vers "${_requested_version}")
+ set(_patch_vers "0")
+ endif (_threePartMatch)
+
+ # compute an overall version number which can be compared at once
+ MATH(EXPR ${_normalized_version} "${_major_vers}*10000 + ${_minor_vers}*100 + ${_patch_vers}")
+ENDMACRO(NORMALIZE_VERSION)
+
+MACRO(MACRO_CHECK_RANGE_INCLUSIVE_LOWER _lower_limit _value _upper_limit _ok)
+ if (${_value} LESS ${_lower_limit})
+ set( ${_ok} FALSE )
+ elseif (${_value} EQUAL ${_lower_limit})
+ set( ${_ok} TRUE )
+ elseif (${_value} EQUAL ${_upper_limit})
+ set( ${_ok} FALSE )
+ elseif (${_value} GREATER ${_upper_limit})
+ set( ${_ok} FALSE )
+ else (${_value} LESS ${_lower_limit})
+ set( ${_ok} TRUE )
+ endif (${_value} LESS ${_lower_limit})
+ENDMACRO(MACRO_CHECK_RANGE_INCLUSIVE_LOWER)
+
+MACRO(MACRO_ENSURE_VERSION requested_version found_version var_too_old)
+ NORMALIZE_VERSION( ${requested_version} req_vers_num )
+ NORMALIZE_VERSION( ${found_version} found_vers_num )
+
+ if (found_vers_num LESS req_vers_num)
+ set( ${var_too_old} FALSE )
+ else (found_vers_num LESS req_vers_num)
+ set( ${var_too_old} TRUE )
+ endif (found_vers_num LESS req_vers_num)
+
+ENDMACRO(MACRO_ENSURE_VERSION)
+
+MACRO(MACRO_ENSURE_VERSION2 requested_version2 found_version2 var_too_old2)
+ MACRO_ENSURE_VERSION( ${requested_version2} ${found_version2} ${var_too_old2})
+ENDMACRO(MACRO_ENSURE_VERSION2)
+
+MACRO(MACRO_ENSURE_VERSION_RANGE min_version found_version max_version var_ok)
+ NORMALIZE_VERSION( ${min_version} req_vers_num )
+ NORMALIZE_VERSION( ${found_version} found_vers_num )
+ NORMALIZE_VERSION( ${max_version} max_vers_num )
+
+ MACRO_CHECK_RANGE_INCLUSIVE_LOWER( ${req_vers_num} ${found_vers_num} ${max_vers_num} ${var_ok})
+ENDMACRO(MACRO_ENSURE_VERSION_RANGE)
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroOptionalFindPackage.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroOptionalFindPackage.cmake
new file mode 100644
index 00000000000..816cdb7e872
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroOptionalFindPackage.cmake
@@ -0,0 +1,28 @@
+# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
+# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
+# This macro is a combination of OPTION() and FIND_PACKAGE(), it
+# works like FIND_PACKAGE(), but additionally it automatically creates
+# an option name WITH_<name>, which can be disabled via the cmake GUI.
+# or via -DWITH_<name>=OFF
+# The standard <name>_FOUND variables can be used in the same way
+# as when using the normal FIND_PACKAGE()
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+MACRO (MACRO_OPTIONAL_FIND_PACKAGE _name )
+ OPTION(WITH_${_name} "Search for ${_name} package" ON)
+ if (WITH_${_name})
+ FIND_PACKAGE(${_name} ${ARGN})
+ else (WITH_${_name})
+ set(${_name}_FOUND)
+ set(${_name}_INCLUDE_DIR)
+ set(${_name}_INCLUDES)
+ set(${_name}_LIBRARY)
+ set(${_name}_LIBRARIES)
+ endif (WITH_${_name})
+ENDMACRO (MACRO_OPTIONAL_FIND_PACKAGE)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroPushRequiredVars.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroPushRequiredVars.cmake
new file mode 100644
index 00000000000..650b566eedf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/MacroPushRequiredVars.cmake
@@ -0,0 +1,47 @@
+# this module defines two macros:
+# MACRO_PUSH_REQUIRED_VARS()
+# and
+# MACRO_POP_REQUIRED_VARS()
+# use these if you call cmake macros which use
+# any of the CMAKE_REQUIRED_XXX variables
+#
+# Usage:
+# MACRO_PUSH_REQUIRED_VARS()
+# SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF)
+# CHECK_FUNCTION_EXISTS(...)
+# MACRO_POP_REQUIRED_VARS()
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+MACRO(MACRO_PUSH_REQUIRED_VARS)
+
+ IF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)
+ SET(_PUSH_REQUIRED_VARS_COUNTER 0)
+ ENDIF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)
+
+ MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}+1")
+
+ SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
+ SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
+ SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
+ SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_FLAGS})
+ENDMACRO(MACRO_PUSH_REQUIRED_VARS)
+
+MACRO(MACRO_POP_REQUIRED_VARS)
+
+# don't pop more than we pushed
+ IF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")
+
+ SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
+ SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
+ SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
+ SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
+
+ MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}-1")
+ ENDIF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")
+
+ENDMACRO(MACRO_POP_REQUIRED_VARS)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerDefaults.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerDefaults.cmake
new file mode 100644
index 00000000000..6ffac472d53
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerDefaults.cmake
@@ -0,0 +1,10 @@
+# enable the testing facilities
+enable_testing()
+
+# put the include directories of the sources before other include paths
+# (eg, system includes)
+set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
+# colored output
+set(CMAKE_COLOR_MAKEFILE ON)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerMacros.cmake b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerMacros.cmake
new file mode 100644
index 00000000000..5b0555f89c8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/cmake/modules/PopplerMacros.cmake
@@ -0,0 +1,117 @@
+# Copyright 2008 Pino Toscano, <pino@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+macro(POPPLER_ADD_TEST exe build_flag)
+ set(build_test ${${build_flag}})
+ if(NOT build_test)
+ set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL)
+ endif(NOT build_test)
+
+ add_executable(${exe} ${_add_executable_param} ${ARGN})
+
+ # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
+ if(NOT build_test)
+ get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
+ if(NOT _buildtestsAdded)
+ add_custom_target(buildtests)
+ set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
+ endif(NOT _buildtestsAdded)
+ add_dependencies(buildtests ${exe})
+ endif(NOT build_test)
+endmacro(POPPLER_ADD_TEST)
+
+macro(POPPLER_ADD_UNITTEST exe build_flag)
+ set(build_test ${${build_flag}})
+ if(NOT build_test)
+ set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL)
+ endif(NOT build_test)
+
+ add_executable(${exe} ${_add_executable_param} ${ARGN})
+ add_test(${exe} ${EXECUTABLE_OUTPUT_PATH}/${exe})
+
+ # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
+ if(NOT build_test)
+ get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
+ if(NOT _buildtestsAdded)
+ add_custom_target(buildtests)
+ set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
+ endif(NOT _buildtestsAdded)
+ add_dependencies(buildtests ${exe})
+ endif(NOT build_test)
+endmacro(POPPLER_ADD_UNITTEST)
+
+macro(POPPLER_CREATE_INSTALL_PKGCONFIG generated_file install_location)
+ if(NOT WIN32)
+ configure_file(${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location})
+ endif(NOT WIN32)
+endmacro(POPPLER_CREATE_INSTALL_PKGCONFIG)
+
+macro(SHOW_END_MESSAGE what enabled)
+ string(LENGTH ${what} length_what)
+ math(EXPR left_char "20 - ${length_what}")
+ set(blanks)
+ foreach(_i RANGE 1 ${left_char})
+ set(blanks "${blanks} ")
+ endforeach(_i)
+ if(${enabled})
+ set(enabled_string "yes")
+ else(${enabled})
+ set(enabled_string "no")
+ endif(${enabled})
+
+ message(" ${what}:${blanks} ${enabled_string}")
+endmacro(SHOW_END_MESSAGE)
+
+
+set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
+ "${CMAKE_INSTALL_PREFIX}/include" )
+
+set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
+ "${CMAKE_INSTALL_PREFIX}/bin" )
+
+set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
+ "${CMAKE_INSTALL_PREFIX}/lib" )
+
+# under Windows dlls may be also installed in bin/
+if(WIN32)
+ set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
+ "${CMAKE_INSTALL_PREFIX}/bin" )
+endif(WIN32)
+
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_TYPE RelWithDebInfo)
+endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+ # set the default compile warnings
+ set(DEFAULT_COMPILE_WARNINGS_NO)
+ set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings")
+ set(DEFAULT_COMPILE_WARNINGS_KDE "-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
+
+ set(CMAKE_CXX_FLAGS "-Woverloaded-virtual")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
+ set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline")
+ set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+ set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
+ set(CMAKE_C_FLAGS_DEBUGFULL "-g3 -fno-inline")
+ set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+endif (CMAKE_COMPILER_IS_GNUCXX)
+
+if(CMAKE_C_COMPILER MATCHES "icc")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+ set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -0b0 -noalign")
+ set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+ set(CMAKE_C_FLAGS_DEBUG "-O2 -g -Ob0 -noalign")
+ set(CMAKE_C_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+endif(CMAKE_C_COMPILER MATCHES "icc")
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/config.guess b/Build/source/libs/poppler/poppler-0.12.4/config.guess
new file mode 100755
index 00000000000..da833146088
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/config.guess
@@ -0,0 +1,1561 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+timestamp='2009-04-27'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/config.h.cmake b/Build/source/libs/poppler/poppler-0.12.4/config.h.cmake
new file mode 100644
index 00000000000..7b57de094f9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/config.h.cmake
@@ -0,0 +1,162 @@
+/* config.h. Generated from config.h.cmake by cmake. */
+
+/* Use libjpeg instead of builtin jpeg decoder. */
+#cmakedefine ENABLE_LIBJPEG 1
+
+/* Use zlib instead of builtin zlib decoder. */
+#cmakedefine ENABLE_ZLIB 1
+
+/* Use libpng to export images in pdftohtml. */
+#cmakedefine ENABLE_LIBPNG 1
+
+/* Use liblcms for color management. */
+#cmakedefine USE_CMS 1
+
+/* Use cairo for rendering. */
+#cmakedefine HAVE_CAIRO 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */
+#cmakedefine HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H 1
+
+/* Have FreeType2 include files */
+#cmakedefine HAVE_FREETYPE_H 1
+
+/* Define to 1 if you have the `fseek64' function. */
+#cmakedefine HAVE_FSEEK64 1
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#cmakedefine HAVE_FSEEKO 1
+
+/* Define to 1 if you have the `ftell64' function. */
+#cmakedefine HAVE_FTELL64 1
+
+/* Defines if gettimeofday is available on your system */
+#cmakedefine HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `z' library (-lz). */
+#cmakedefine HAVE_LIBZ 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+#cmakedefine HAVE_MKSTEMP 1
+
+/* Define to 1 if you have the `mkstemps' function. */
+#cmakedefine HAVE_MKSTEMPS 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#cmakedefine HAVE_NDIR_H 1
+
+/* Define to 1 if you have the `popen' function. */
+#cmakedefine HAVE_POPEN 1
+
+/* Use splash for rendering. */
+#cmakedefine HAVE_SPLASH 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. */
+#cmakedefine HAVE_SYS_DIR_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. */
+#cmakedefine HAVE_SYS_NDIR_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#cmakedefine HAVE_ZLIB_H 1
+
+/* Define to 1 if gdk was found */
+#cmakedefine POPPLER_WITH_GDK 1
+
+/* Enable multithreading support. */
+#cmakedefine MULTITHREADED 1
+
+/* Generate OPI comments in PS output. */
+#cmakedefine OPI_SUPPORT 1
+
+/* Name of package */
+#define PACKAGE "poppler"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "poppler ${POPPLER_VERSION}"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "${POPPLER_VERSION}"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "${CMAKE_INSTALL_PREFIX}/share/poppler"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable word list support. */
+#cmakedefine TEXTOUT_WORD_LIST 1
+
+/* Throw exceptions to deal with not enough memory and similar problems */
+#cmakedefine USE_EXCEPTIONS 1
+
+/* Use fixed point arithmetic */
+#cmakedefine USE_FIXEDPOINT 1
+
+/* Version number of package */
+#define VERSION "${POPPLER_VERSION}"
+
+/* Define to 1 if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+
+/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+
+/* MS has defined snprintf as deprecated */
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+/* #undef _LARGEFILE_SOURCE */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/config.h.in b/Build/source/libs/poppler/poppler-0.12.4/config.h.in
new file mode 100644
index 00000000000..4eca14d88b9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/config.h.in
@@ -0,0 +1,199 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Whether cairo has blend modes support */
+#undef CAIRO_HAS_BLEND_MODES
+
+/* Use libjpeg instead of builtin jpeg decoder. */
+#undef ENABLE_LIBJPEG
+
+/* Use libopenjpeg instead of builtin jpeg2000 decoder. */
+#undef ENABLE_LIBOPENJPEG
+
+/* Build against libpng. */
+#undef ENABLE_LIBPNG
+
+/* Use zlib instead of builtin zlib decoder. */
+#undef ENABLE_ZLIB
+
+/* Use cairo for rendering. */
+#undef HAVE_CAIRO
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Have FreeType2 include files */
+#undef HAVE_FREETYPE_H
+
+/* Define to 1 if you have the `fseek64' function. */
+#undef HAVE_FSEEK64
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `ftell64' function. */
+#undef HAVE_FTELL64
+
+/* Defines if gettimeofday is available on your system */
+#undef HAVE_GETTIMEOFDAY
+
+/* Defines if gmtime_r is available on your system */
+#undef HAVE_GMTIME_R
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `openjpeg' library (-lopenjpeg). */
+#undef HAVE_LIBOPENJPEG
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Defines if localtime_r is available on your system */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the `mkstemps' function. */
+#undef HAVE_MKSTEMPS
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <openjpeg.h> header file. */
+#undef HAVE_OPENJPEG_H
+
+/* Define to 1 if you have the `popen' function. */
+#undef HAVE_POPEN
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Use splash for rendering. */
+#undef HAVE_SPLASH
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Enable multithreading support. */
+#undef MULTITHREADED
+
+/* Generate OPI comments in PS output. */
+#undef OPI_SUPPORT
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Poppler data dir */
+#undef POPPLER_DATADIR
+
+/* Have GDK */
+#undef POPPLER_WITH_GDK
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Enable word list support. */
+#undef TEXTOUT_WORD_LIST
+
+/* Defines if use cms */
+#undef USE_CMS
+
+/* Throw exceptions to deal with not enough memory and similar problems */
+#undef USE_EXCEPTIONS
+
+/* Use fixed point arithmetic */
+#undef USE_FIXEDPOINT
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
diff --git a/Build/source/libs/poppler/poppler-0.12.4/config.sub b/Build/source/libs/poppler/poppler-0.12.4/config.sub
new file mode 100755
index 00000000000..a39437d0158
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/config.sub
@@ -0,0 +1,1686 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+timestamp='2009-04-17'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/configure b/Build/source/libs/poppler/poppler-0.12.4/configure
new file mode 100755
index 00000000000..b2cd9bf9d4b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/configure
@@ -0,0 +1,24105 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.64 for poppler 0.12.4.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=poppler>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=poppler
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='poppler'
+PACKAGE_TARNAME='poppler'
+PACKAGE_VERSION='0.12.4'
+PACKAGE_STRING='poppler 0.12.4'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=poppler'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+POPPLER_MICRO_VERSION
+POPPLER_MINOR_VERSION
+POPPLER_MAJOR_VERSION
+PC_REQUIRES_PRIVATE
+PC_REQUIRES
+USE_CMS_FALSE
+USE_CMS_TRUE
+LCMS_LIBS
+LCMS_CFLAGS
+BUILD_UTILS_FALSE
+BUILD_UTILS_TRUE
+BUILD_ABIWORD_OUTPUT_FALSE
+BUILD_ABIWORD_OUTPUT_TRUE
+ABIWORD_LIBS
+ABIWORD_CFLAGS
+BUILD_GTK_TEST_FALSE
+BUILD_GTK_TEST_TRUE
+GTK_TEST_LIBS
+GTK_TEST_CFLAGS
+BUILD_POPPLER_QT4_FALSE
+BUILD_POPPLER_QT4_TRUE
+MOCQT4
+POPPLER_QT4_CXXFLAGS
+POPPLER_QT4_TEST_LIBS
+POPPLER_QT4_TEST_CFLAGS
+POPPLER_QT4_LIBS
+POPPLER_QT4_CFLAGS
+BUILD_POPPLER_QT_FALSE
+BUILD_POPPLER_QT_TRUE
+POPPLER_QT_LIBS
+POPPLER_QT_CXXFLAGS
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES
+POPPLER_GLIB_DISABLE_DEPRECATED
+GDK_FEATURE
+BUILD_WITH_GDK_FALSE
+BUILD_WITH_GDK_TRUE
+GDK_LIBS
+GDK_CFLAGS
+GTK_DOC_USE_LIBTOOL_FALSE
+GTK_DOC_USE_LIBTOOL_TRUE
+ENABLE_GTK_DOC_FALSE
+ENABLE_GTK_DOC_TRUE
+GTKDOC_CHECK
+HTML_DIR
+BUILD_POPPLER_GLIB_FALSE
+BUILD_POPPLER_GLIB_TRUE
+GLIB_MKENUMS
+POPPLER_GLIB_LIBS
+POPPLER_GLIB_CFLAGS
+CAIRO_REQ
+CAIRO_FEATURE
+BUILD_CAIRO_OUTPUT_FALSE
+BUILD_CAIRO_OUTPUT_TRUE
+CAIRO_LIBS
+CAIRO_CFLAGS
+CAIRO_VERSION
+BUILD_SPLASH_OUTPUT_FALSE
+BUILD_SPLASH_OUTPUT_TRUE
+FONTCONFIG_LIBS
+FONTCONFIG_CFLAGS
+FREETYPE_CONFIG
+FREETYPE_LIBS
+FREETYPE_CFLAGS
+BUILD_LIBPNG_FALSE
+BUILD_LIBPNG_TRUE
+LIBPNG_LIBS
+BUILD_LIBJPEG_FALSE
+BUILD_LIBJPEG_TRUE
+LIBJPEG_LIBS
+BUILD_ZLIB_FALSE
+BUILD_ZLIB_TRUE
+ZLIB_LIBS
+BUILD_LIBOPENJPEG_FALSE
+BUILD_LIBOPENJPEG_TRUE
+LIBOPENJPEG_LIBS
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+POPPLER_DATADIR
+ENABLE_XPDF_HEADERS_FALSE
+ENABLE_XPDF_HEADERS_TRUE
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+acx_pthread_config
+auto_import_flags
+create_shared_lib
+win32_libs
+PKG_CONFIG
+CXXCPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+enable_libtool_lock
+enable_xpdf_headers
+enable_fixedpoint
+with_x
+enable_exceptions
+enable_libopenjpeg
+enable_largefile
+enable_zlib
+enable_libjpeg
+enable_libpng
+enable_splash_output
+enable_cairo_output
+enable_poppler_glib
+with_html_dir
+enable_gtk_doc
+enable_gdk
+enable_poppler_qt
+enable_poppler_qt4
+enable_gtk_test
+enable_abiword_output
+enable_utils
+enable_compile_warnings
+enable_cms
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+PKG_CONFIG
+XMKMF
+FREETYPE_CFLAGS
+FREETYPE_LIBS
+FONTCONFIG_CFLAGS
+FONTCONFIG_LIBS
+CAIRO_CFLAGS
+CAIRO_LIBS
+POPPLER_GLIB_CFLAGS
+POPPLER_GLIB_LIBS
+GDK_CFLAGS
+GDK_LIBS
+POPPLER_QT4_CFLAGS
+POPPLER_QT4_LIBS
+POPPLER_QT4_TEST_CFLAGS
+POPPLER_QT4_TEST_LIBS
+GTK_TEST_CFLAGS
+GTK_TEST_LIBS
+ABIWORD_CFLAGS
+ABIWORD_LIBS
+LCMS_CFLAGS
+LCMS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures poppler 0.12.4 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/poppler]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of poppler 0.12.4:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-xpdf-headers Install unsupported xpdf headers.
+ --enable-fixedpoint use fixed point (instead of floating point) arithmetic
+ --enable-exceptions use C++ exceptions
+ --disable-libopenjpeg Don't build against libopenjpeg.
+ --disable-largefile omit support for large files
+ --enable-zlib Build with zlib
+ --disable-libjpeg Don't build against libjpeg.
+ --disable-libpng Don't build against libpng.
+ --disable-splash-output Don't build the Splash graphics backend.
+ --disable-cairo-output Don't build the cairo graphics backend.
+ --disable-poppler-glib Don't compile poppler glib wrapper.
+ --enable-gtk-doc use gtk-doc to build documentation [default=no]
+ --disable-gdk Compile without gdk.
+ --disable-poppler-qt Don't compile poppler qt wrapper.
+ --disable-poppler-qt4 Don't compile poppler Qt4 wrapper.
+ --disable-gtk-test Don't compile GTK+ test program.
+ --disable-abiword-output
+ Don't build the abiword backend.
+ --disable-utils Don't compile poppler command line utils.
+ --enable-compile-warnings=[no/yes/kde]
+ Turn on compiler warnings.
+
+ --disable-cms Don't use color management system.
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-x use the X Window System
+ --with-html-dir=PATH path to installed docs
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+ PKG_CONFIG path to pkg-config utility
+ XMKMF Path to xmkmf, Makefile generator for X Window System
+ FREETYPE_CFLAGS
+ C compiler flags for FREETYPE, overriding pkg-config
+ FREETYPE_LIBS
+ linker flags for FREETYPE, overriding pkg-config
+ FONTCONFIG_CFLAGS
+ C compiler flags for FONTCONFIG, overriding pkg-config
+ FONTCONFIG_LIBS
+ linker flags for FONTCONFIG, overriding pkg-config
+ CAIRO_CFLAGS
+ C compiler flags for CAIRO, overriding pkg-config
+ CAIRO_LIBS linker flags for CAIRO, overriding pkg-config
+ POPPLER_GLIB_CFLAGS
+ C compiler flags for POPPLER_GLIB, overriding pkg-config
+ POPPLER_GLIB_LIBS
+ linker flags for POPPLER_GLIB, overriding pkg-config
+ GDK_CFLAGS C compiler flags for GDK, overriding pkg-config
+ GDK_LIBS linker flags for GDK, overriding pkg-config
+ POPPLER_QT4_CFLAGS
+ C compiler flags for POPPLER_QT4, overriding pkg-config
+ POPPLER_QT4_LIBS
+ linker flags for POPPLER_QT4, overriding pkg-config
+ POPPLER_QT4_TEST_CFLAGS
+ C compiler flags for POPPLER_QT4_TEST, overriding pkg-config
+ POPPLER_QT4_TEST_LIBS
+ linker flags for POPPLER_QT4_TEST, overriding pkg-config
+ GTK_TEST_CFLAGS
+ C compiler flags for GTK_TEST, overriding pkg-config
+ GTK_TEST_LIBS
+ linker flags for GTK_TEST, overriding pkg-config
+ ABIWORD_CFLAGS
+ C compiler flags for ABIWORD, overriding pkg-config
+ ABIWORD_LIBS
+ linker flags for ABIWORD, overriding pkg-config
+ LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
+ LCMS_LIBS linker flags for LCMS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=poppler>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+poppler configure 0.12.4
+generated by GNU Autoconf 2.64
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ return $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_cxx_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_func
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## ------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=poppler ##
+## ------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## ------------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=poppler ##
+## ------------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by poppler $as_me 0.12.4, which was
+generated by GNU Autoconf 2.64. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ for ac_t in install-sh install.sh shtool; do
+ if test -f "$ac_dir/$ac_t"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/$ac_t -c"
+ break 2
+ fi
+ done
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='poppler'
+ VERSION='0.12.4'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
+ac_config_headers="$ac_config_headers config.h"
+
+ac_config_headers="$ac_config_headers poppler/poppler-config.h"
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6'
+macro_revision='1.3012'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ rm -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then :
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
+fi
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:5262: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5265: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5268: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 6471 "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7999: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8003: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8338: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8342: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8443: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8447: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8498: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8502: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10881 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10977 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ rm -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ rm -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ rm -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX=''
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14531: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:14535: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14630: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14634: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14682: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14686: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs_CXX=no
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc_CXX=no
+ else
+ archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+$as_echo_n "checking for library containing strerror... " >&6; }
+if test "${ac_cv_search_strerror+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_strerror=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_strerror+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_strerror+set}" = set; then :
+
+else
+ ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
+$as_echo "$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_cv_prog_cc_stdc=no
+fi
+
+fi
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+ if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; #(
+ '') :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+#if test -z "$CXX" -a "$CC" = "gcc"; then
+# CXX="gcc"
+#fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ rm -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = x""yes; then :
+
+$as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
+if test "x$ac_cv_func_localtime_r" = x""yes; then :
+
+$as_echo "#define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
+if test "x$ac_cv_func_gmtime_r" = x""yes; then :
+
+$as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
+
+fi
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+
+$as_echo "#define OPI_SUPPORT 1" >>confdefs.h
+
+
+$as_echo "#define MULTITHREADED 1" >>confdefs.h
+
+
+$as_echo "#define TEXTOUT_WORD_LIST 1" >>confdefs.h
+
+
+win32_libs=""
+create_shared_lib=""
+auto_import_flags=""
+case "$host_os" in
+ cygwin*)
+ create_shared_lib="-no-undefined"
+ ;;
+ mingw*)
+ win32_libs="-lgdi32"
+ create_shared_lib="-no-undefined"
+ auto_import_flags="-Wl,--enable-auto-import"
+ ;;
+esac
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ -*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$acx_pthread_config"; then
+ ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_acx_pthread_config="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int attr=$attr; return attr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ attr_name=$attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ for ac_prog in xlc_r cc_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
+
+ else
+ PTHREAD_CC=$CC
+ fi
+else
+ PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
+
+ :
+else
+ acx_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --enable-xpdf-headers was given.
+if test "${enable_xpdf_headers+set}" = set; then :
+ enableval=$enable_xpdf_headers; enable_xpdf_headers=$enableval
+else
+ enable_xpdf_headers="no"
+fi
+
+ if test x$enable_xpdf_headers = xyes; then
+ ENABLE_XPDF_HEADERS_TRUE=
+ ENABLE_XPDF_HEADERS_FALSE='#'
+else
+ ENABLE_XPDF_HEADERS_TRUE='#'
+ ENABLE_XPDF_HEADERS_FALSE=
+fi
+
+
+# Check whether --enable-fixedpoint was given.
+if test "${enable_fixedpoint+set}" = set; then :
+ enableval=$enable_fixedpoint;
+$as_echo "#define USE_FIXEDPOINT 1" >>confdefs.h
+
+fi
+
+
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ac_define_dir="\"$"{datarootdir}/poppler"\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ POPPLER_DATADIR="$ac_define_dir"
+
+
+cat >>confdefs.h <<_ACEOF
+#define POPPLER_DATADIR "$ac_define_dir"
+_ACEOF
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+ withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ case $x_includes,$x_libraries in #(
+ *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lX11 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+ *) have_x=yes;;
+ esac
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+
+$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ ac_xsave_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ X_LIBS="$X_LIBS -R$x_libraries"
+else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ X_LIBS="$X_LIBS -R $x_libraries"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_c_werror_flag=$ac_xsave_c_werror_flag
+ LIBS=$ac_xsave_LIBS
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn Johnson says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And Karl Berry says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_xsave_LIBS"
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to T.E. Dickey.
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+ fi
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says Simon Leinen: it contains gethostby*
+ # variants that don't use the name server (or something). -lsocket
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_socket_connect=yes
+else
+ ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
+if test "x$ac_cv_func_remove" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_posix_remove=yes
+else
+ ac_cv_lib_posix_remove=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+if test "x$ac_cv_func_shmat" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ipc_shmat=yes
+else
+ ac_cv_lib_ipc_shmat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS=$LDFLAGS
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+ LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+
+# Check whether --enable-exceptions was given.
+if test "${enable_exceptions+set}" = set; then :
+ enableval=$enable_exceptions;
+$as_echo "#define USE_EXCEPTIONS 1" >>confdefs.h
+
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+fi
+
+ac_fn_cxx_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = x""yes; then :
+
+fi
+
+if test x$ac_cv_func_nanosleep = xno
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
+$as_echo_n "checking for nanosleep in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_nanosleep+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_rt_nanosleep=yes
+else
+ ac_cv_lib_rt_nanosleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
+$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
+if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lrt"
+fi
+
+fi
+
+if test x$ac_cv_func_nanosleep = xno && test x$ac_cv_lib_rt_nanosleep = xno
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lposix4" >&5
+$as_echo_n "checking for nanosleep in -lposix4... " >&6; }
+if test "${ac_cv_lib_posix4_nanosleep+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_posix4_nanosleep=yes
+else
+ ac_cv_lib_posix4_nanosleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_nanosleep" >&5
+$as_echo "$ac_cv_lib_posix4_nanosleep" >&6; }
+if test "x$ac_cv_lib_posix4_nanosleep" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix4"
+fi
+
+fi
+
+
+# Check whether --enable-libopenjpeg was given.
+if test "${enable_libopenjpeg+set}" = set; then :
+ enableval=$enable_libopenjpeg; enable_libopenjpeg=$enableval
+else
+ enable_libopenjpeg="try"
+fi
+
+if test x$enable_libopenjpeg = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5
+$as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; }
+if test "${ac_cv_lib_openjpeg_opj_cio_open+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopenjpeg $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opj_cio_open ();
+int
+main ()
+{
+return opj_cio_open ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_openjpeg_opj_cio_open=yes
+else
+ ac_cv_lib_openjpeg_opj_cio_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5
+$as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; }
+if test "x$ac_cv_lib_openjpeg_opj_cio_open" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBOPENJPEG 1
+_ACEOF
+
+ LIBS="-lopenjpeg $LIBS"
+
+else
+ as_fn_error "\"*** libopenjpeg library not found ***\"" "$LINENO" 5
+fi
+
+
+for ac_header in openjpeg.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default"
+if test "x$ac_cv_header_openjpeg_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENJPEG_H 1
+_ACEOF
+
+else
+ as_fn_error "\"*** libopenjpeg headers not found ***\"" "$LINENO" 5
+fi
+
+done
+
+elif test x$enable_libopenjpeg = xtry; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5
+$as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; }
+if test "${ac_cv_lib_openjpeg_opj_cio_open+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopenjpeg $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opj_cio_open ();
+int
+main ()
+{
+return opj_cio_open ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_openjpeg_opj_cio_open=yes
+else
+ ac_cv_lib_openjpeg_opj_cio_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5
+$as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; }
+if test "x$ac_cv_lib_openjpeg_opj_cio_open" = x""yes; then :
+ enable_libopenjpeg="yes"
+else
+ enable_libopenjpeg="no"
+fi
+
+ for ac_header in openjpeg.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default"
+if test "x$ac_cv_header_openjpeg_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENJPEG_H 1
+_ACEOF
+
+else
+ enable_libopenjpeg="no"
+fi
+
+done
+
+fi
+
+if test x$enable_libopenjpeg = xyes; then
+ LIBOPENJPEG_LIBS="-lopenjpeg"
+
+ $as_echo "#define ENABLE_LIBOPENJPEG 1" >>confdefs.h
+
+fi
+
+ if test x$enable_libopenjpeg = xyes; then
+ BUILD_LIBOPENJPEG_TRUE=
+ BUILD_LIBOPENJPEG_FALSE='#'
+else
+ BUILD_LIBOPENJPEG_TRUE='#'
+ BUILD_LIBOPENJPEG_FALSE=
+fi
+
+
+
+
+for ac_func in popen mkstemp mkstemps
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+for ac_func in fseek64
+do :
+ ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
+if test "x$ac_cv_func_fseek64" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FSEEK64 1
+_ACEOF
+ xpdf_cv_func_fseek64=yes
+else
+ xpdf_cv_func_fseek64=no
+fi
+done
+
+for ac_func in ftell64
+do :
+ ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64"
+if test "x$ac_cv_func_ftell64" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FTELL64 1
+_ACEOF
+ xpdf_cv_func_ftell64=yes
+else
+ xpdf_cv_func_ftell64=no
+fi
+done
+
+if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
+ $as_echo "#define HAVE_FSEEK64 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-zlib was given.
+if test "${enable_zlib+set}" = set; then :
+ enableval=$enable_zlib;
+else
+ enable_zlib="no"
+fi
+
+if test x$enable_zlib = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
+$as_echo_n "checking for inflate in -lz... " >&6; }
+if test "${ac_cv_lib_z_inflate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflate ();
+int
+main ()
+{
+return inflate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_inflate=yes
+else
+ ac_cv_lib_z_inflate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
+$as_echo "$ac_cv_lib_z_inflate" >&6; }
+if test "x$ac_cv_lib_z_inflate" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+else
+ as_fn_error "\"*** zlib library not found ***\"" "$LINENO" 5
+fi
+
+ for ac_header in zlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+
+else
+ as_fn_error "\"*** zlib headers not found ***\"" "$LINENO" 5
+fi
+
+done
+
+elif test x$enable_zlib = xtry; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
+$as_echo_n "checking for inflate in -lz... " >&6; }
+if test "${ac_cv_lib_z_inflate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflate ();
+int
+main ()
+{
+return inflate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_inflate=yes
+else
+ ac_cv_lib_z_inflate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
+$as_echo "$ac_cv_lib_z_inflate" >&6; }
+if test "x$ac_cv_lib_z_inflate" = x""yes; then :
+ enable_zlib="yes"
+else
+ enable_zlib="no"
+fi
+
+ for ac_header in zlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+
+else
+ enable_zlib="no"
+fi
+
+done
+
+fi
+
+if test x$enable_zlib = xyes; then
+ ZLIB_LIBS="-lz"
+
+ $as_echo "#define ENABLE_ZLIB 1" >>confdefs.h
+
+fi
+
+ if test x$enable_zlib = xyes; then
+ BUILD_ZLIB_TRUE=
+ BUILD_ZLIB_FALSE='#'
+else
+ BUILD_ZLIB_TRUE='#'
+ BUILD_ZLIB_FALSE=
+fi
+
+
+
+
+# Check whether --enable-libjpeg was given.
+if test "${enable_libjpeg+set}" = set; then :
+ enableval=$enable_libjpeg; enable_libjpeg=$enableval
+else
+ enable_libjpeg="try"
+fi
+
+if test x$enable_libjpeg != xno; then
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjpeg6b" >&5
+$as_echo_n "checking for libjpeg6b... " >&6; }
+if test "${ac_cv_lib_jpeg_6b+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg6b -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+jpeg_CreateDecompress();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "ac_cv_lib_jpeg_6b=-ljpeg6b"
+else
+ eval "ac_cv_lib_jpeg_6b=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_6b`\" = no"; then
+ enable_libjpeg=yes
+ LIBJPEG_LIBS="$ac_cv_lib_jpeg_6b"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_6b" >&5
+$as_echo "$ac_cv_lib_jpeg_6b" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjpeg" >&5
+$as_echo_n "checking for libjpeg... " >&6; }
+if test "${ac_cv_lib_jpeg_normal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+jpeg_CreateDecompress();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "ac_cv_lib_jpeg_normal=-ljpeg"
+else
+ eval "ac_cv_lib_jpeg_normal=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_normal`\" = no"; then
+ enable_libjpeg=yes
+ LIBJPEG_LIBS="$ac_cv_lib_jpeg_normal"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_normal" >&5
+$as_echo "$ac_cv_lib_jpeg_normal" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+ LIBJPEG_LIBS=
+
+
+fi
+
+
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
+if test "x$ac_cv_header_jpeglib_h" = x""yes; then :
+ jpeg_incdir=yes
+else
+ jpeg_incdir=NO
+fi
+
+
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG_LIBS" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_LIBJPEG 1
+_ACEOF
+
+else
+ if test -n "$jpeg_incdir" || test -n "$LIBJPEG_LIBS" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&5
+$as_echo "$as_me: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&2;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg not found. disable JPEG support." >&5
+$as_echo "$as_me: WARNING: libjpeg not found. disable JPEG support." >&2;}
+ fi
+ jpeg_incdir=
+ enable_libjpeg=no
+ LIBJPEG_LIBS=
+fi
+
+
+
+
+fi
+
+ if test x$enable_libjpeg = xyes; then
+ BUILD_LIBJPEG_TRUE=
+ BUILD_LIBJPEG_FALSE='#'
+else
+ BUILD_LIBJPEG_TRUE='#'
+ BUILD_LIBJPEG_FALSE=
+fi
+
+
+
+# Check whether --enable-libpng was given.
+if test "${enable_libpng+set}" = set; then :
+ enableval=$enable_libpng; enable_libpng=$enableval
+else
+ enable_libpng="try"
+fi
+
+if test x$enable_libpng != xno; then
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5
+$as_echo_n "checking for libpng... " >&6; }
+if test "${ac_cv_lib_png+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lpng -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void png_access_version_number();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+png_access_version_number();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "ac_cv_lib_png=-lpng"
+else
+ eval "ac_cv_lib_png=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+ enable_libpng=yes
+ LIBPNG_LIBS="$ac_cv_lib_png"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png" >&5
+$as_echo "$ac_cv_lib_png" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng" >&5
+$as_echo_n "checking for libpng... " >&6; }
+if test "${ac_cv_lib_png+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lpng -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void png_access_version_number();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+png_access_version_number();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "ac_cv_lib_png=-lpng"
+else
+ eval "ac_cv_lib_png=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+ enable_libpng=yes
+ LIBPNG_LIBS="$ac_cv_lib_png"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png" >&5
+$as_echo "$ac_cv_lib_png" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ normal
+fi
+
+
+fi
+
+
+png_incdirs="`eval echo $includedir` /usr/include /usr/local/include "
+
+png_incdir=NO
+for i in $png_incdirs;
+do
+ for j in png.h;
+ do
+ echo "configure: 18836: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ png_incdir=$i
+ break 2
+ fi
+ done
+done
+
+test "x$png_incdir" = xNO && png_incdir=
+
+if test -n "$png_incdir" && test -n "$LIBPNG_LIBS" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_LIBPNG 1
+_ACEOF
+
+else
+ if test -n "$png_incdir" || test -n "$LIBPNG_LIBS" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+There is an installation error in png support. You seem to have only one of
+either the headers _or_ the libraries installed. You may need to either provide
+correct --with-extra-... options, or the development package of libpng. You
+can get a source package of libpng from http://www.libpng.org/pub/png/libpng.html
+Disabling PNG support.
+" >&5
+$as_echo "$as_me: WARNING:
+There is an installation error in png support. You seem to have only one of
+either the headers _or_ the libraries installed. You may need to either provide
+correct --with-extra-... options, or the development package of libpng. You
+can get a source package of libpng from http://www.libpng.org/pub/png/libpng.html
+Disabling PNG support.
+" >&2;}
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libpng not found. disable PNG support." >&5
+$as_echo "$as_me: WARNING: libpng not found. disable PNG support." >&2;}
+ fi
+ png_incdir=
+ enable_libpng=no
+ LIBPNG_LIBS=
+fi
+
+
+
+fi
+
+ if test x$enable_libpng = xyes; then
+ BUILD_LIBPNG_TRUE=
+ BUILD_LIBPNG_FALSE='#'
+else
+ BUILD_LIBPNG_TRUE='#'
+ BUILD_LIBPNG_FALSE=
+fi
+
+
+
+FREETYPE_LIBS=
+FREETYPE_CFLAGS=
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
+$as_echo_n "checking for FREETYPE... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FREETYPE_CFLAGS"; then
+ pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FREETYPE_LIBS"; then
+ pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2"`
+ else
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FREETYPE_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ freetype_pkgconfig=no
+elif test $pkg_failed = untried; then
+ freetype_pkgconfig=no
+else
+ FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
+ FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ freetype_pkgconfig=yes
+fi
+
+if test "x$freetype_pkgconfig" = "xyes"; then
+
+
+$as_echo "#define HAVE_FREETYPE_H 1" >>confdefs.h
+
+
+else
+
+ # Extract the first word of "freetype-config", so it can be a program name with args.
+set dummy freetype-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $FREETYPE_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="no"
+ ;;
+esac
+fi
+FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
+if test -n "$FREETYPE_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CONFIG" >&5
+$as_echo "$FREETYPE_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$FREETYPE_CONFIG" != "xno" ; then
+
+ FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+
+$as_echo "#define HAVE_FREETYPE_H 1" >>confdefs.h
+
+
+ fi
+
+fi
+
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FONTCONFIG" >&5
+$as_echo_n "checking for FONTCONFIG... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FONTCONFIG_CFLAGS"; then
+ pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.0.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$FONTCONFIG_LIBS"; then
+ pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.0.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fontconfig >= 2.0.0"`
+ else
+ FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.0.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FONTCONFIG_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (fontconfig >= 2.0.0) were not met:
+
+$FONTCONFIG_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables FONTCONFIG_CFLAGS
+and FONTCONFIG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables FONTCONFIG_CFLAGS
+and FONTCONFIG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS
+ FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+
+# Check whether --enable-splash-output was given.
+if test "${enable_splash_output+set}" = set; then :
+ enableval=$enable_splash_output;
+else
+ enable_splash_output="yes"
+fi
+
+ if test x$enable_splash_output = xyes; then
+ BUILD_SPLASH_OUTPUT_TRUE=
+ BUILD_SPLASH_OUTPUT_FALSE='#'
+else
+ BUILD_SPLASH_OUTPUT_TRUE='#'
+ BUILD_SPLASH_OUTPUT_FALSE=
+fi
+
+
+if test x$enable_splash_output = xyes; then
+ $as_echo "#define HAVE_SPLASH 1" >>confdefs.h
+
+fi
+
+CAIRO_VERSION="1.8.4"
+
+# Check whether --enable-cairo-output was given.
+if test "${enable_cairo_output+set}" = set; then :
+ enableval=$enable_cairo_output; enable_cairo_output=$enableval
+else
+ enable_cairo_output="try"
+fi
+
+if test x$enable_cairo_output = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5
+$as_echo_n "checking for CAIRO... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_CFLAGS"; then
+ pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= \$CAIRO_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= $CAIRO_VERSION") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_LIBS"; then
+ pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= \$CAIRO_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= $CAIRO_VERSION") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= $CAIRO_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
+ else
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (cairo >= $CAIRO_VERSION) were not met:
+
+$CAIRO_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables CAIRO_CFLAGS
+and CAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables CAIRO_CFLAGS
+and CAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+ CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_cairo_output = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5
+$as_echo_n "checking for CAIRO... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_CFLAGS"; then
+ pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= \$CAIRO_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= $CAIRO_VERSION") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_LIBS"; then
+ pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= \$CAIRO_VERSION\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo >= $CAIRO_VERSION") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= $CAIRO_VERSION" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
+ else
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_cairo_output="no"
+elif test $pkg_failed = untried; then
+ enable_cairo_output="no"
+else
+ CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+ CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_cairo_output="yes"
+fi
+fi
+
+
+
+
+ if test x$enable_cairo_output = xyes; then
+ BUILD_CAIRO_OUTPUT_TRUE=
+ BUILD_CAIRO_OUTPUT_FALSE='#'
+else
+ BUILD_CAIRO_OUTPUT_TRUE='#'
+ BUILD_CAIRO_OUTPUT_FALSE=
+fi
+
+
+if test x$enable_cairo_output = xyes; then
+ $as_echo "#define HAVE_CAIRO 1" >>confdefs.h
+
+ CAIRO_FEATURE="#define POPPLER_HAS_CAIRO 1"
+ CAIRO_REQ="cairo"
+ for ac_header in fcntl.h sys/mman.h sys/stat.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ _SAVE_CFLAGS=$CFLAGS
+ _SAVE_LIBS=$LIBS
+ CFLAGS="$CFLAGS $CAIRO_CFLAGS"
+ LIBS="$LIBS $CAIRO_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo blend modes support" >&5
+$as_echo_n "checking for cairo blend modes support... " >&6; }
+if test "${ac_cv_cairo_has_blend_modes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <cairo.h>
+int main() {
+ cairo_t *cr;
+ cairo_set_operator(cr, CAIRO_OPERATOR_MULTIPLY);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_cairo_has_blend_modes="yes"
+else
+ ac_cv_cairo_has_blend_modes="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cairo_has_blend_modes" >&5
+$as_echo "$ac_cv_cairo_has_blend_modes" >&6; }
+ CFLAGS=$_SAVE_CFLAGS
+ LIBS=$_SAVE_LIBS
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ if test "$ac_cv_cairo_has_blend_modes" = "yes"; then
+
+$as_echo "#define CAIRO_HAS_BLEND_MODES 1" >>confdefs.h
+
+ fi
+else
+ CAIRO_FEATURE="#undef POPPLER_HAS_CAIRO"
+ CAIRO_REQ=""
+fi
+
+
+
+POPPLER_GLIB_DISABLE_DEPRECATED=""
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""
+
+GLIB_REQUIRED=2.6
+# Check whether --enable-poppler-glib was given.
+if test "${enable_poppler_glib+set}" = set; then :
+ enableval=$enable_poppler_glib; enable_poppler_glib=$enableval
+else
+ enable_poppler_glib="try"
+fi
+
+if test x$enable_poppler_glib = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_GLIB" >&5
+$as_echo_n "checking for POPPLER_GLIB... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_GLIB_CFLAGS"; then
+ pkg_cv_POPPLER_GLIB_CFLAGS="$POPPLER_GLIB_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_GLIB_LIBS"; then
+ pkg_cv_POPPLER_GLIB_LIBS="$POPPLER_GLIB_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED"`
+ else
+ POPPLER_GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_GLIB_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED) were not met:
+
+$POPPLER_GLIB_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables POPPLER_GLIB_CFLAGS
+and POPPLER_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables POPPLER_GLIB_CFLAGS
+and POPPLER_GLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ POPPLER_GLIB_CFLAGS=$pkg_cv_POPPLER_GLIB_CFLAGS
+ POPPLER_GLIB_LIBS=$pkg_cv_POPPLER_GLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_poppler_glib = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_GLIB" >&5
+$as_echo_n "checking for POPPLER_GLIB... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_GLIB_CFLAGS"; then
+ pkg_cv_POPPLER_GLIB_CFLAGS="$POPPLER_GLIB_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_GLIB_LIBS"; then
+ pkg_cv_POPPLER_GLIB_LIBS="$POPPLER_GLIB_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED"`
+ else
+ POPPLER_GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_GLIB_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_poppler_glib="no"
+elif test $pkg_failed = untried; then
+ enable_poppler_glib="no"
+else
+ POPPLER_GLIB_CFLAGS=$pkg_cv_POPPLER_GLIB_CFLAGS
+ POPPLER_GLIB_LIBS=$pkg_cv_POPPLER_GLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_poppler_glib="yes"
+fi
+fi
+if test x$enable_poppler_glib = xyes; then
+ # Extract the first word of "glib-mkenums", so it can be a program name with args.
+set dummy glib-mkenums; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GLIB_MKENUMS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GLIB_MKENUMS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GLIB_MKENUMS="$GLIB_MKENUMS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GLIB_MKENUMS="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GLIB_MKENUMS=$ac_cv_path_GLIB_MKENUMS
+if test -n "$GLIB_MKENUMS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_MKENUMS" >&5
+$as_echo "$GLIB_MKENUMS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
+ POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DG_DISABLE_SINGLE_INCLUDES"
+fi
+ if test x$enable_poppler_glib = xyes; then
+ BUILD_POPPLER_GLIB_TRUE=
+ BUILD_POPPLER_GLIB_FALSE='#'
+else
+ BUILD_POPPLER_GLIB_TRUE='#'
+ BUILD_POPPLER_GLIB_FALSE=
+fi
+
+
+
+
+# Check whether --with-html-dir was given.
+if test "${with_html_dir+set}" = set; then :
+ withval=$with_html_dir;
+else
+ with_html_dir='${datadir}/gtk-doc/html'
+fi
+
+ HTML_DIR="$with_html_dir"
+
+
+ # Check whether --enable-gtk-doc was given.
+if test "${enable_gtk_doc+set}" = set; then :
+ enableval=$enable_gtk_doc;
+else
+ enable_gtk_doc=no
+fi
+
+
+ if test x$enable_gtk_doc = xyes; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ :
+else
+ as_fn_error "You need to have gtk-doc >= 1.0 installed to build gtk-doc" "$LINENO" 5
+fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5
+$as_echo_n "checking whether to build gtk-doc documentation... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5
+$as_echo "$enable_gtk_doc" >&6; }
+
+ for ac_prog in gtkdoc-check
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GTKDOC_CHECK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK
+if test -n "$GTKDOC_CHECK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5
+$as_echo "$GTKDOC_CHECK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GTKDOC_CHECK" && break
+done
+
+
+ if test x$enable_gtk_doc = xyes; then
+ ENABLE_GTK_DOC_TRUE=
+ ENABLE_GTK_DOC_FALSE='#'
+else
+ ENABLE_GTK_DOC_TRUE='#'
+ ENABLE_GTK_DOC_FALSE=
+fi
+
+ if test -n "$LIBTOOL"; then
+ GTK_DOC_USE_LIBTOOL_TRUE=
+ GTK_DOC_USE_LIBTOOL_FALSE='#'
+else
+ GTK_DOC_USE_LIBTOOL_TRUE='#'
+ GTK_DOC_USE_LIBTOOL_FALSE=
+fi
+
+
+
+# Check whether --enable-gdk was given.
+if test "${enable_gdk+set}" = set; then :
+ enableval=$enable_gdk; enable_gdk=$enableval
+else
+ enable_gdk="try"
+fi
+
+
+if test x$enable_poppler_glib = xyes; then
+ if test x$enable_gdk = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK" >&5
+$as_echo_n "checking for GDK... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_CFLAGS"; then
+ pkg_cv_GDK_CFLAGS="$GDK_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_CFLAGS=`$PKG_CONFIG --cflags "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_LIBS"; then
+ pkg_cv_GDK_LIBS="$GDK_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_LIBS=`$PKG_CONFIG --libs "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-2.0"`
+ else
+ GDK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GDK_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (gdk-2.0) were not met:
+
+$GDK_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GDK_CFLAGS
+and GDK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GDK_CFLAGS
+and GDK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ GDK_CFLAGS=$pkg_cv_GDK_CFLAGS
+ GDK_LIBS=$pkg_cv_GDK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+ elif test x$enable_gdk = xtry; then
+ if test x$enable_splash_output = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK" >&5
+$as_echo_n "checking for GDK... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_CFLAGS"; then
+ pkg_cv_GDK_CFLAGS="$GDK_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_CFLAGS=`$PKG_CONFIG --cflags "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_LIBS"; then
+ pkg_cv_GDK_LIBS="$GDK_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_LIBS=`$PKG_CONFIG --libs "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-2.0"`
+ else
+ GDK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GDK_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_gdk="no"
+elif test $pkg_failed = untried; then
+ enable_gdk="no"
+else
+ GDK_CFLAGS=$pkg_cv_GDK_CFLAGS
+ GDK_LIBS=$pkg_cv_GDK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_gdk="yes"
+fi
+ elif test x$enable_cairo_output = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK" >&5
+$as_echo_n "checking for GDK... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_CFLAGS"; then
+ pkg_cv_GDK_CFLAGS="$GDK_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_CFLAGS=`$PKG_CONFIG --cflags "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_LIBS"; then
+ pkg_cv_GDK_LIBS="$GDK_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_LIBS=`$PKG_CONFIG --libs "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-2.0"`
+ else
+ GDK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GDK_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_gdk="no"
+elif test $pkg_failed = untried; then
+ enable_gdk="no"
+else
+ GDK_CFLAGS=$pkg_cv_GDK_CFLAGS
+ GDK_LIBS=$pkg_cv_GDK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_gdk="yes"
+fi
+ fi
+ elif test x$enable_splash_output = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK" >&5
+$as_echo_n "checking for GDK... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_CFLAGS"; then
+ pkg_cv_GDK_CFLAGS="$GDK_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_CFLAGS=`$PKG_CONFIG --cflags "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GDK_LIBS"; then
+ pkg_cv_GDK_LIBS="$GDK_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gdk-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GDK_LIBS=`$PKG_CONFIG --libs "gdk-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gdk-2.0"`
+ else
+ GDK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GDK_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (gdk-2.0) were not met:
+
+$GDK_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GDK_CFLAGS
+and GDK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GDK_CFLAGS
+and GDK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ GDK_CFLAGS=$pkg_cv_GDK_CFLAGS
+ GDK_LIBS=$pkg_cv_GDK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"GDK is required by the glib wrapper when splash output device is
+ enabled. If you want to comppile popler without GDK use --disable-splash-output too\"" >&5
+$as_echo "$as_me: WARNING: \"GDK is required by the glib wrapper when splash output device is
+ enabled. If you want to comppile popler without GDK use --disable-splash-output too\"" >&2;}
+ enable_gdk=yes
+ fi
+ if test x$enable_gdk = xyes; then
+
+$as_echo "#define POPPLER_WITH_GDK 1" >>confdefs.h
+
+ GDK_FEATURE="#define POPPLER_WITH_GDK 1"
+ POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
+ POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+ else
+ GDK_FEATURE=""
+ fi
+fi
+ if test x$enable_gdk = xyes; then
+ BUILD_WITH_GDK_TRUE=
+ BUILD_WITH_GDK_FALSE='#'
+else
+ BUILD_WITH_GDK_TRUE='#'
+ BUILD_WITH_GDK_FALSE=
+fi
+
+
+
+
+
+
+
+
+# Check whether --enable-poppler-qt was given.
+if test "${enable_poppler_qt+set}" = set; then :
+ enableval=$enable_poppler_qt; enable_poppler_qt=$enableval
+else
+ enable_poppler_qt="try"
+fi
+
+
+if test x$enable_poppler_qt = xyes; then
+
+if test "$build_cpu" != "x86_64" ; then
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+else
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+fi
+if test -n "$QTDIR" ; then
+ qt_incdirs="$QTDIR/include $qt_incdirs"
+ if test "$build_cpu" != "x86_64" ; then
+ qt_libdirs="$QTDIR/lib $qt_libdirs"
+ else
+ qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
+ fi
+fi
+
+qt_test_include="qstyle.h"
+qt_test_la_library="libqt-mt.la"
+qt_test_library="libqt-mt.so"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt headers" >&5
+$as_echo_n "checking for Qt headers... " >&6; }
+qt_incdir="no"
+for it in $qt_incdirs ; do
+ if test -r "$it/$qt_test_include" ; then
+ qt_incdir="$it"
+ break
+ fi
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_incdir" >&5
+$as_echo "$qt_incdir" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt libraries" >&5
+$as_echo_n "checking for Qt libraries... " >&6; }
+qt_libdir="no"
+for qt_check in $qt_libdirs ; do
+ if test -r "$qt_check/$qt_test_la_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+
+ if test -r "$qt_check/$qt_test_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_libdir" >&5
+$as_echo "$qt_libdir" >&6; }
+
+if test "x$qt_libdir" != "xno" ; then
+ if test "x$qt_incdir" != "xno" ; then
+ have_qt=yes
+ fi
+fi
+
+if test "x$have_qt" = "xyes"; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ pthread_needed=no
+
+ save_LDFLAGS=$LDFLAGS
+ save_CXXFLAGS=$CXXFLAGS
+ save_LIBS=$LIBS
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+ LIBS="$LIBS -L$qt_libdir -lqt-mt"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Qt needs -pthread" >&5
+$as_echo_n "checking if Qt needs -pthread... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <qt.h>
+int
+main ()
+{
+QString s;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ pthread_needed=no
+else
+ pthread_needed=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "x$pthread_needed" = "xyes"; then
+ LDFLAGS="$LDFLAGS -pthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <qt.h>
+int
+main ()
+{
+QString s;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ pthread_needed=yes
+else
+ pthread_needed=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_needed" >&5
+$as_echo "$pthread_needed" >&6; }
+ LDFLAGS=$save_LDFLAGS
+ CXXFLAGS=$save_CXXFLAGS
+ LIBS=$save_LIBS
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ qtpthread=''
+ if test "x$pthread_needed" = "xyes"; then
+ qtpthread="-pthread"
+ fi
+
+ POPPLER_QT_CXXFLAGS="-I$qt_incdir"
+ POPPLER_QT_LIBS="$qtpthread -L$qt_libdir -lqt-mt"
+ :
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "Qt development libraries not found
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+elif test x$enable_poppler_qt = xtry; then
+
+if test "$build_cpu" != "x86_64" ; then
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+else
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+fi
+if test -n "$QTDIR" ; then
+ qt_incdirs="$QTDIR/include $qt_incdirs"
+ if test "$build_cpu" != "x86_64" ; then
+ qt_libdirs="$QTDIR/lib $qt_libdirs"
+ else
+ qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
+ fi
+fi
+
+qt_test_include="qstyle.h"
+qt_test_la_library="libqt-mt.la"
+qt_test_library="libqt-mt.so"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt headers" >&5
+$as_echo_n "checking for Qt headers... " >&6; }
+qt_incdir="no"
+for it in $qt_incdirs ; do
+ if test -r "$it/$qt_test_include" ; then
+ qt_incdir="$it"
+ break
+ fi
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_incdir" >&5
+$as_echo "$qt_incdir" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt libraries" >&5
+$as_echo_n "checking for Qt libraries... " >&6; }
+qt_libdir="no"
+for qt_check in $qt_libdirs ; do
+ if test -r "$qt_check/$qt_test_la_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+
+ if test -r "$qt_check/$qt_test_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_libdir" >&5
+$as_echo "$qt_libdir" >&6; }
+
+if test "x$qt_libdir" != "xno" ; then
+ if test "x$qt_incdir" != "xno" ; then
+ have_qt=yes
+ fi
+fi
+
+if test "x$have_qt" = "xyes"; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ pthread_needed=no
+
+ save_LDFLAGS=$LDFLAGS
+ save_CXXFLAGS=$CXXFLAGS
+ save_LIBS=$LIBS
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+ LIBS="$LIBS -L$qt_libdir -lqt-mt"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Qt needs -pthread" >&5
+$as_echo_n "checking if Qt needs -pthread... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <qt.h>
+int
+main ()
+{
+QString s;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ pthread_needed=no
+else
+ pthread_needed=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "x$pthread_needed" = "xyes"; then
+ LDFLAGS="$LDFLAGS -pthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <qt.h>
+int
+main ()
+{
+QString s;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ pthread_needed=yes
+else
+ pthread_needed=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_needed" >&5
+$as_echo "$pthread_needed" >&6; }
+ LDFLAGS=$save_LDFLAGS
+ CXXFLAGS=$save_CXXFLAGS
+ LIBS=$save_LIBS
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ qtpthread=''
+ if test "x$pthread_needed" = "xyes"; then
+ qtpthread="-pthread"
+ fi
+
+ POPPLER_QT_CXXFLAGS="-I$qt_incdir"
+ POPPLER_QT_LIBS="$qtpthread -L$qt_libdir -lqt-mt"
+ enable_poppler_qt="yes"
+else
+ enable_poppler_qt="no"
+fi
+
+fi
+
+
+
+ if test "x$enable_poppler_qt" = "xyes"; then
+ BUILD_POPPLER_QT_TRUE=
+ BUILD_POPPLER_QT_FALSE='#'
+else
+ BUILD_POPPLER_QT_TRUE='#'
+ BUILD_POPPLER_QT_FALSE=
+fi
+
+
+
+# Check whether --enable-poppler-qt4 was given.
+if test "${enable_poppler_qt4+set}" = set; then :
+ enableval=$enable_poppler_qt4; enable_poppler_qt4=$enableval
+else
+ enable_poppler_qt4="try"
+fi
+
+if test x$enable_poppler_qt4 = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_QT4" >&5
+$as_echo_n "checking for POPPLER_QT4... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_CFLAGS"; then
+ pkg_cv_POPPLER_QT4_CFLAGS="$POPPLER_QT4_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_CFLAGS=`$PKG_CONFIG --cflags "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_LIBS"; then
+ pkg_cv_POPPLER_QT4_LIBS="$POPPLER_QT4_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_LIBS=`$PKG_CONFIG --libs "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_QT4_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0"`
+ else
+ POPPLER_QT4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_QT4_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0) were not met:
+
+$POPPLER_QT4_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables POPPLER_QT4_CFLAGS
+and POPPLER_QT4_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables POPPLER_QT4_CFLAGS
+and POPPLER_QT4_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ POPPLER_QT4_CFLAGS=$pkg_cv_POPPLER_QT4_CFLAGS
+ POPPLER_QT4_LIBS=$pkg_cv_POPPLER_QT4_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_QT4_TEST" >&5
+$as_echo_n "checking for POPPLER_QT4_TEST... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_TEST_CFLAGS"; then
+ pkg_cv_POPPLER_QT4_TEST_CFLAGS="$POPPLER_QT4_TEST_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtTest >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtTest >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_TEST_CFLAGS=`$PKG_CONFIG --cflags "QtTest >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_TEST_LIBS"; then
+ pkg_cv_POPPLER_QT4_TEST_LIBS="$POPPLER_QT4_TEST_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtTest >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtTest >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_TEST_LIBS=`$PKG_CONFIG --libs "QtTest >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_QT4_TEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "QtTest >= 4.4.0"`
+ else
+ POPPLER_QT4_TEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtTest >= 4.4.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_QT4_TEST_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (QtTest >= 4.4.0) were not met:
+
+$POPPLER_QT4_TEST_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables POPPLER_QT4_TEST_CFLAGS
+and POPPLER_QT4_TEST_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables POPPLER_QT4_TEST_CFLAGS
+and POPPLER_QT4_TEST_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ POPPLER_QT4_TEST_CFLAGS=$pkg_cv_POPPLER_QT4_TEST_CFLAGS
+ POPPLER_QT4_TEST_LIBS=$pkg_cv_POPPLER_QT4_TEST_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_poppler_qt4 = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_QT4" >&5
+$as_echo_n "checking for POPPLER_QT4... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_CFLAGS"; then
+ pkg_cv_POPPLER_QT4_CFLAGS="$POPPLER_QT4_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_CFLAGS=`$PKG_CONFIG --cflags "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_LIBS"; then
+ pkg_cv_POPPLER_QT4_LIBS="$POPPLER_QT4_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_LIBS=`$PKG_CONFIG --libs "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_QT4_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0"`
+ else
+ POPPLER_QT4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_QT4_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_poppler_qt4="no"
+elif test $pkg_failed = untried; then
+ enable_poppler_qt4="no"
+else
+ POPPLER_QT4_CFLAGS=$pkg_cv_POPPLER_QT4_CFLAGS
+ POPPLER_QT4_LIBS=$pkg_cv_POPPLER_QT4_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_poppler_qt4="yes"
+fi
+ if test x$enable_poppler_qt4 = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER_QT4_TEST" >&5
+$as_echo_n "checking for POPPLER_QT4_TEST... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_TEST_CFLAGS"; then
+ pkg_cv_POPPLER_QT4_TEST_CFLAGS="$POPPLER_QT4_TEST_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtTest >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtTest >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_TEST_CFLAGS=`$PKG_CONFIG --cflags "QtTest >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$POPPLER_QT4_TEST_LIBS"; then
+ pkg_cv_POPPLER_QT4_TEST_LIBS="$POPPLER_QT4_TEST_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtTest >= 4.4.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "QtTest >= 4.4.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_POPPLER_QT4_TEST_LIBS=`$PKG_CONFIG --libs "QtTest >= 4.4.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ POPPLER_QT4_TEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "QtTest >= 4.4.0"`
+ else
+ POPPLER_QT4_TEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtTest >= 4.4.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$POPPLER_QT4_TEST_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_poppler_qt4="no"
+elif test $pkg_failed = untried; then
+ enable_poppler_qt4="no"
+else
+ POPPLER_QT4_TEST_CFLAGS=$pkg_cv_POPPLER_QT4_TEST_CFLAGS
+ POPPLER_QT4_TEST_LIBS=$pkg_cv_POPPLER_QT4_TEST_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_poppler_qt4="yes"
+fi
+ fi
+fi
+
+
+
+
+
+if test x$enable_poppler_qt4 = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 moc" >&5
+$as_echo_n "checking for Qt4 moc... " >&6; }
+ MOCQT4=`which moc`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # moc was not the qt4 one, try with moc-qt4
+ MOCQT4=`which moc-qt4`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # no valid moc found
+ enable_poppler_qt4=no;
+ MOCQT4="not found"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOCQT4" >&5
+$as_echo "$MOCQT4" >&6; }
+fi
+
+ if test "x$enable_poppler_qt4" = "xyes"; then
+ BUILD_POPPLER_QT4_TRUE=
+ BUILD_POPPLER_QT4_FALSE='#'
+else
+ BUILD_POPPLER_QT4_TRUE='#'
+ BUILD_POPPLER_QT4_FALSE=
+fi
+
+
+# Check whether --enable-gtk-test was given.
+if test "${enable_gtk_test+set}" = set; then :
+ enableval=$enable_gtk_test; enable_gtk_test=$enableval
+else
+ enable_gtk_test="try"
+fi
+
+if test x$enable_gtk_test = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK_TEST" >&5
+$as_echo_n "checking for GTK_TEST... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTK_TEST_CFLAGS"; then
+ pkg_cv_GTK_TEST_CFLAGS="$GTK_TEST_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_TEST_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTK_TEST_LIBS"; then
+ pkg_cv_GTK_TEST_LIBS="$GTK_TEST_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_TEST_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTK_TEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0"`
+ else
+ GTK_TEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTK_TEST_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0) were not met:
+
+$GTK_TEST_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GTK_TEST_CFLAGS
+and GTK_TEST_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GTK_TEST_CFLAGS
+and GTK_TEST_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ GTK_TEST_CFLAGS=$pkg_cv_GTK_TEST_CFLAGS
+ GTK_TEST_LIBS=$pkg_cv_GTK_TEST_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_gtk_test = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK_TEST" >&5
+$as_echo_n "checking for GTK_TEST... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTK_TEST_CFLAGS"; then
+ pkg_cv_GTK_TEST_CFLAGS="$GTK_TEST_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_TEST_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GTK_TEST_LIBS"; then
+ pkg_cv_GTK_TEST_LIBS="$GTK_TEST_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_TEST_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTK_TEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0"`
+ else
+ GTK_TEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTK_TEST_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_gtk_test="no"
+elif test $pkg_failed = untried; then
+ enable_gtk_test="no"
+else
+ GTK_TEST_CFLAGS=$pkg_cv_GTK_TEST_CFLAGS
+ GTK_TEST_LIBS=$pkg_cv_GTK_TEST_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_gtk_test="yes"
+fi
+fi
+ if test x$enable_gtk_test = xyes -a x$enable_poppler_glib = xyes; then
+ BUILD_GTK_TEST_TRUE=
+ BUILD_GTK_TEST_FALSE='#'
+else
+ BUILD_GTK_TEST_TRUE='#'
+ BUILD_GTK_TEST_FALSE=
+fi
+
+
+# Check whether --enable-abiword-output was given.
+if test "${enable_abiword_output+set}" = set; then :
+ enableval=$enable_abiword_output; enable_abiword_output=$enableval
+else
+ enable_abiword_output="try"
+fi
+
+if test x$enable_abiword_output = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABIWORD" >&5
+$as_echo_n "checking for ABIWORD... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ABIWORD_CFLAGS"; then
+ pkg_cv_ABIWORD_CFLAGS="$ABIWORD_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ABIWORD_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ABIWORD_LIBS"; then
+ pkg_cv_ABIWORD_LIBS="$ABIWORD_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ABIWORD_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ABIWORD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
+ else
+ ABIWORD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ABIWORD_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (libxml-2.0) were not met:
+
+$ABIWORD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables ABIWORD_CFLAGS
+and ABIWORD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables ABIWORD_CFLAGS
+and ABIWORD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ ABIWORD_CFLAGS=$pkg_cv_ABIWORD_CFLAGS
+ ABIWORD_LIBS=$pkg_cv_ABIWORD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_abiword_output = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABIWORD" >&5
+$as_echo_n "checking for ABIWORD... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ABIWORD_CFLAGS"; then
+ pkg_cv_ABIWORD_CFLAGS="$ABIWORD_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ABIWORD_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$ABIWORD_LIBS"; then
+ pkg_cv_ABIWORD_LIBS="$ABIWORD_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ABIWORD_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ABIWORD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
+ else
+ ABIWORD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ABIWORD_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_abiword_output="no"
+elif test $pkg_failed = untried; then
+ enable_abiword_output="no"
+else
+ ABIWORD_CFLAGS=$pkg_cv_ABIWORD_CFLAGS
+ ABIWORD_LIBS=$pkg_cv_ABIWORD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_abiword_output="yes"
+fi
+fi
+
+ if test x$enable_abiword_output = xyes; then
+ BUILD_ABIWORD_OUTPUT_TRUE=
+ BUILD_ABIWORD_OUTPUT_FALSE='#'
+else
+ BUILD_ABIWORD_OUTPUT_TRUE='#'
+ BUILD_ABIWORD_OUTPUT_FALSE=
+fi
+
+
+# Check whether --enable-utils was given.
+if test "${enable_utils+set}" = set; then :
+ enableval=$enable_utils; enable_utils=$enableval
+else
+ enable_utils="yes"
+fi
+
+ if test x$enable_utils = xyes; then
+ BUILD_UTILS_TRUE=
+ BUILD_UTILS_FALSE='#'
+else
+ BUILD_UTILS_TRUE='#'
+ BUILD_UTILS_FALSE=
+fi
+
+
+# Check whether --enable-compile-warnings was given.
+if test "${enable_compile_warnings+set}" = set; then :
+ enableval=$enable_compile_warnings;
+else
+ enable_compile_warnings="yes"
+fi
+
+
+
+# Check whether --enable-cms was given.
+if test "${enable_cms+set}" = set; then :
+ enableval=$enable_cms; enable_cms=$enableval
+else
+ enable_cms="try"
+fi
+
+if test x$enable_cms = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
+$as_echo_n "checking for LCMS... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LCMS_CFLAGS"; then
+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LCMS_LIBS"; then
+ pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lcms"`
+ else
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lcms"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LCMS_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (lcms) were not met:
+
+$LCMS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LCMS_CFLAGS
+and LCMS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LCMS_CFLAGS
+and LCMS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
+ LCMS_LIBS=$pkg_cv_LCMS_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+elif test x$enable_cms = xtry; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
+$as_echo_n "checking for LCMS... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LCMS_CFLAGS"; then
+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LCMS_LIBS"; then
+ pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lcms"`
+ else
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lcms"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LCMS_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ enable_cms=no
+elif test $pkg_failed = untried; then
+ enable_cms=no
+else
+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
+ LCMS_LIBS=$pkg_cv_LCMS_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ enable_cms=yes
+fi
+fi
+
+if test "x$enable_cms" = "xyes"; then
+
+$as_echo "#define USE_CMS 1" >>confdefs.h
+
+fi
+ if test x$enable_cms = xyes; then
+ USE_CMS_TRUE=
+ USE_CMS_FALSE='#'
+else
+ USE_CMS_TRUE='#'
+ USE_CMS_FALSE=
+fi
+
+
+if test "x$GCC" != xyes; then
+ enable_compile_warnings=no
+fi
+case "$enable_compile_warnings" in
+ no) ;;
+ yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual $CXXFLAGS" ;;
+ kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi \
+ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align \
+ -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith \
+ -Wwrite-strings -O2 -Wformat-security \
+ -Wmissing-format-attribute -fno-exceptions -fno-check-new \
+ -fno-common $CXXFLAGS" ;;
+esac
+
+case $($PKG_CONFIG --version) in
+ 0.?|0.10-7)
+ PC_REQUIRES_PRIVATE="";
+ PC_REQUIRES="poppler = $VERSION";;
+ *)
+ PC_REQUIRES_PRIVATE="Requires.private: poppler = $VERSION";
+ PC_REQUIRES="";;
+esac
+
+
+
+
+POPPLER_MAJOR_VERSION=0
+
+POPPLER_MINOR_VERSION=12
+
+POPPLER_MICRO_VERSION=4
+
+
+ac_config_files="$ac_config_files Makefile goo/Makefile fofi/Makefile splash/Makefile poppler/Makefile utils/Makefile glib/Makefile glib/poppler-features.h glib/reference/Makefile glib/demo/Makefile test/Makefile qt/Makefile qt4/Makefile qt4/src/Makefile qt4/tests/Makefile qt4/demos/Makefile poppler.pc poppler-cairo.pc poppler-splash.pc poppler-glib.pc poppler-qt.pc poppler-qt4.pc"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_XPDF_HEADERS_TRUE}" && test -z "${ENABLE_XPDF_HEADERS_FALSE}"; then
+ as_fn_error "conditional \"ENABLE_XPDF_HEADERS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_LIBOPENJPEG_TRUE}" && test -z "${BUILD_LIBOPENJPEG_FALSE}"; then
+ as_fn_error "conditional \"BUILD_LIBOPENJPEG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_ZLIB_TRUE}" && test -z "${BUILD_ZLIB_FALSE}"; then
+ as_fn_error "conditional \"BUILD_ZLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_LIBJPEG_TRUE}" && test -z "${BUILD_LIBJPEG_FALSE}"; then
+ as_fn_error "conditional \"BUILD_LIBJPEG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_LIBPNG_TRUE}" && test -z "${BUILD_LIBPNG_FALSE}"; then
+ as_fn_error "conditional \"BUILD_LIBPNG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_SPLASH_OUTPUT_TRUE}" && test -z "${BUILD_SPLASH_OUTPUT_FALSE}"; then
+ as_fn_error "conditional \"BUILD_SPLASH_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_CAIRO_OUTPUT_TRUE}" && test -z "${BUILD_CAIRO_OUTPUT_FALSE}"; then
+ as_fn_error "conditional \"BUILD_CAIRO_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_POPPLER_GLIB_TRUE}" && test -z "${BUILD_POPPLER_GLIB_FALSE}"; then
+ as_fn_error "conditional \"BUILD_POPPLER_GLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then
+ as_fn_error "conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then
+ as_fn_error "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_WITH_GDK_TRUE}" && test -z "${BUILD_WITH_GDK_FALSE}"; then
+ as_fn_error "conditional \"BUILD_WITH_GDK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_POPPLER_QT_TRUE}" && test -z "${BUILD_POPPLER_QT_FALSE}"; then
+ as_fn_error "conditional \"BUILD_POPPLER_QT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_POPPLER_QT4_TRUE}" && test -z "${BUILD_POPPLER_QT4_FALSE}"; then
+ as_fn_error "conditional \"BUILD_POPPLER_QT4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_GTK_TEST_TRUE}" && test -z "${BUILD_GTK_TEST_FALSE}"; then
+ as_fn_error "conditional \"BUILD_GTK_TEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_ABIWORD_OUTPUT_TRUE}" && test -z "${BUILD_ABIWORD_OUTPUT_FALSE}"; then
+ as_fn_error "conditional \"BUILD_ABIWORD_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_UTILS_TRUE}" && test -z "${BUILD_UTILS_FALSE}"; then
+ as_fn_error "conditional \"BUILD_UTILS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_CMS_TRUE}" && test -z "${USE_CMS_FALSE}"; then
+ as_fn_error "conditional \"USE_CMS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$?; test $as_status -eq 0 && as_status=1
+ if test "$3"; then
+ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ fi
+ $as_echo "$as_me: error: $1" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by poppler $as_me 0.12.4, which was
+generated by GNU Autoconf 2.64. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=poppler>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+poppler config.status 0.12.4
+configured by $0, generated by GNU Autoconf 2.64,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "poppler/poppler-config.h") CONFIG_HEADERS="$CONFIG_HEADERS poppler/poppler-config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "goo/Makefile") CONFIG_FILES="$CONFIG_FILES goo/Makefile" ;;
+ "fofi/Makefile") CONFIG_FILES="$CONFIG_FILES fofi/Makefile" ;;
+ "splash/Makefile") CONFIG_FILES="$CONFIG_FILES splash/Makefile" ;;
+ "poppler/Makefile") CONFIG_FILES="$CONFIG_FILES poppler/Makefile" ;;
+ "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+ "glib/Makefile") CONFIG_FILES="$CONFIG_FILES glib/Makefile" ;;
+ "glib/poppler-features.h") CONFIG_FILES="$CONFIG_FILES glib/poppler-features.h" ;;
+ "glib/reference/Makefile") CONFIG_FILES="$CONFIG_FILES glib/reference/Makefile" ;;
+ "glib/demo/Makefile") CONFIG_FILES="$CONFIG_FILES glib/demo/Makefile" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+ "qt/Makefile") CONFIG_FILES="$CONFIG_FILES qt/Makefile" ;;
+ "qt4/Makefile") CONFIG_FILES="$CONFIG_FILES qt4/Makefile" ;;
+ "qt4/src/Makefile") CONFIG_FILES="$CONFIG_FILES qt4/src/Makefile" ;;
+ "qt4/tests/Makefile") CONFIG_FILES="$CONFIG_FILES qt4/tests/Makefile" ;;
+ "qt4/demos/Makefile") CONFIG_FILES="$CONFIG_FILES qt4/demos/Makefile" ;;
+ "poppler.pc") CONFIG_FILES="$CONFIG_FILES poppler.pc" ;;
+ "poppler-cairo.pc") CONFIG_FILES="$CONFIG_FILES poppler-cairo.pc" ;;
+ "poppler-splash.pc") CONFIG_FILES="$CONFIG_FILES poppler-splash.pc" ;;
+ "poppler-glib.pc") CONFIG_FILES="$CONFIG_FILES poppler-glib.pc" ;;
+ "poppler-qt.pc") CONFIG_FILES="$CONFIG_FILES poppler-qt.pc" ;;
+ "poppler-qt4.pc") CONFIG_FILES="$CONFIG_FILES poppler-qt4.pc" ;;
+
+ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit $?
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+
+echo ""
+echo "Building poppler with support for:"
+echo " splash output: $enable_splash_output"
+echo " cairo output: $enable_cairo_output"
+echo " abiword output: $enable_abiword_output"
+echo " qt wrapper: $enable_poppler_qt"
+echo " qt4 wrapper: $enable_poppler_qt4"
+echo " glib wrapper: $enable_poppler_glib"
+echo " use GDK: $enable_gdk"
+echo " use gtk-doc: $enable_gtk_doc"
+echo " use libjpeg: $enable_libjpeg"
+echo " use libpng: $enable_libpng"
+echo " use zlib: $enable_zlib"
+echo " use libopenjpeg: $enable_libopenjpeg"
+echo " use cms: $enable_cms"
+echo " command line utils: $enable_utils"
+echo ""
+
+if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then
+ echo " Warning: There is no rendering backend enabled"
+fi
+
+if test x$enable_libjpeg != xyes; then
+ echo " Warning: Using libjpeg is recommended"
+fi
+
+if test x$enable_zlib != xno; then
+ echo " Warning: Using zlib is not totally safe"
+fi
+
+if test x$enable_libopenjpeg != xyes; then
+ echo " Warning: Using libopenjpeg is recommended"
+fi
diff --git a/Build/source/libs/poppler/poppler-0.12.4/configure.ac b/Build/source/libs/poppler/poppler-0.12.4/configure.ac
new file mode 100644
index 00000000000..9315973c01e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/configure.ac
@@ -0,0 +1,595 @@
+m4_define([poppler_version_major],[0])
+m4_define([poppler_version_minor],[12])
+m4_define([poppler_version_micro],[4])
+m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
+
+AC_PREREQ(2.59)
+AC_INIT([poppler],[poppler_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=poppler])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([no])])
+AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(poppler/poppler-config.h)
+
+dnl ##### Initialize libtool.
+AC_LIBTOOL_WIN32_DLL
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
+AC_PROG_LIBTOOL
+
+dnl ##### Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_ISC_POSIX
+AC_PROG_CC_STDC
+#if test -z "$CXX" -a "$CC" = "gcc"; then
+# CXX="gcc"
+#fi
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defines if gettimeofday is available on your system]))
+AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your system]))
+AC_CHECK_FUNC(gmtime_r, AC_DEFINE(HAVE_GMTIME_R, 1, [Defines if gmtime_r is available on your system]))
+
+dnl ##### Check for pkgconfig
+PKG_PROG_PKG_CONFIG
+
+dnl Enable these unconditionally.
+AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.])
+AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
+AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])
+
+dnl Check for OS specific flags
+win32_libs=""
+create_shared_lib=""
+auto_import_flags=""
+case "$host_os" in
+ cygwin*)
+ create_shared_lib="-no-undefined"
+ ;;
+ mingw*)
+ win32_libs="-lgdi32"
+ create_shared_lib="-no-undefined"
+ auto_import_flags="-Wl,--enable-auto-import"
+ ;;
+esac
+
+AC_SUBST(win32_libs)
+AC_SUBST(create_shared_lib)
+AC_SUBST(auto_import_flags)
+
+ACX_PTHREAD()
+
+dnl Install xpdf headers
+AC_ARG_ENABLE(xpdf-headers,
+ AC_HELP_STRING([--enable-xpdf-headers],
+ [Install unsupported xpdf headers.]),
+ enable_xpdf_headers=$enableval,
+ enable_xpdf_headers="no")
+AM_CONDITIONAL(ENABLE_XPDF_HEADERS, test x$enable_xpdf_headers = xyes)
+
+AC_ARG_ENABLE(fixedpoint,
+[ --enable-fixedpoint use fixed point (instead of floating point) arithmetic],
+AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic]))
+
+AC_DEFINE_DIR(POPPLER_DATADIR, "{datarootdir}/poppler", [Poppler data dir])
+
+dnl ##### Checks for header files.
+AC_PATH_XTRA
+AC_HEADER_DIRENT
+
+AC_ARG_ENABLE(exceptions,
+ [ --enable-exceptions use C++ exceptions],
+ AC_DEFINE([USE_EXCEPTIONS], [1], [Throw exceptions to deal with not enough memory and similar problems]))
+
+dnl ##### Switch over to C++. This will make the checks below a little
+dnl ##### bit stricter (requiring function prototypes in include files).
+dnl ##### (99% of xpdf is written in C++.)
+AC_LANG_CPLUSPLUS
+
+dnl ##### Check for extra libraries needed by X. (LynxOS needs this.)
+AC_CHECK_FUNC(gethostbyname)
+if test $ac_cv_func_gethostbyname = no; then
+ AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd")
+fi
+
+AC_CHECK_FUNC(nanosleep,,)
+dnl try in librt if not found in current LIBS
+if test x$ac_cv_func_nanosleep = xno
+then
+ AC_CHECK_LIB(rt,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lrt")
+fi
+
+dnl try in libposix4, if not found so far
+if test x$ac_cv_func_nanosleep = xno && test x$ac_cv_lib_rt_nanosleep = xno
+then
+ AC_CHECK_LIB(posix4,nanosleep, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix4")
+fi
+
+
+dnl Test for libopenjpeg
+AC_ARG_ENABLE(libopenjpeg,
+ AC_HELP_STRING([--disable-libopenjpeg],
+ [Don't build against libopenjpeg.]),
+ enable_libopenjpeg=$enableval,
+ enable_libopenjpeg="try")
+if test x$enable_libopenjpeg = xyes; then
+ AC_CHECK_LIB([openjpeg], [opj_cio_open],,
+ AC_MSG_ERROR("*** libopenjpeg library not found ***"))
+ AC_CHECK_HEADERS([openjpeg.h],,
+ AC_MSG_ERROR("*** libopenjpeg headers not found ***"))
+elif test x$enable_libopenjpeg = xtry; then
+ AC_CHECK_LIB([openjpeg], [opj_cio_open],
+ [enable_libopenjpeg="yes"],
+ [enable_libopenjpeg="no"])
+ AC_CHECK_HEADERS([openjpeg.h],,
+ [enable_libopenjpeg="no"])
+fi
+
+if test x$enable_libopenjpeg = xyes; then
+ LIBOPENJPEG_LIBS="-lopenjpeg"
+ AC_SUBST(LIBOPENJPEG_LIBS)
+ AC_DEFINE(ENABLE_LIBOPENJPEG)
+fi
+
+AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes)
+AH_TEMPLATE([ENABLE_LIBOPENJPEG],
+ [Use libopenjpeg instead of builtin jpeg2000 decoder.])
+
+
+dnl ##### Checks for library functions.
+AC_CHECK_FUNCS(popen mkstemp mkstemps)
+
+dnl ##### Back to C for the library tests.
+AC_LANG_C
+
+dnl ##### Check for fseeko/ftello or fseek64/ftell64
+dnl The LARGEFILE and FSEEKO macros have to be called in C, not C++, mode.
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+AC_CHECK_FUNCS(fseek64, xpdf_cv_func_fseek64=yes, xpdf_cv_func_fseek64=no)
+AC_CHECK_FUNCS(ftell64, xpdf_cv_func_ftell64=yes, xpdf_cv_func_ftell64=no)
+if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
+ AC_DEFINE(HAVE_FSEEK64)
+fi
+
+dnl Test for zlib
+AC_ARG_ENABLE([zlib],
+ [AS_HELP_STRING([--enable-zlib],[Build with zlib])],
+ [],[enable_zlib="no"])
+if test x$enable_zlib = xyes; then
+ AC_CHECK_LIB([z], [inflate],,
+ AC_MSG_ERROR("*** zlib library not found ***"))
+ AC_CHECK_HEADERS([zlib.h],,
+ AC_MSG_ERROR("*** zlib headers not found ***"))
+elif test x$enable_zlib = xtry; then
+ AC_CHECK_LIB([z], [inflate],
+ [enable_zlib="yes"],
+ [enable_zlib="no"])
+ AC_CHECK_HEADERS([zlib.h],,
+ [enable_zlib="no"])
+fi
+
+if test x$enable_zlib = xyes; then
+ ZLIB_LIBS="-lz"
+ AC_SUBST(ZLIB_LIBS)
+ AC_DEFINE(ENABLE_ZLIB)
+fi
+
+AM_CONDITIONAL(BUILD_ZLIB, test x$enable_zlib = xyes)
+AH_TEMPLATE([ENABLE_ZLIB],
+ [Use zlib instead of builtin zlib decoder.])
+
+
+dnl Test for libjpeg
+AC_ARG_ENABLE(libjpeg,
+ AC_HELP_STRING([--disable-libjpeg],
+ [Don't build against libjpeg.]),
+ enable_libjpeg=$enableval,
+ enable_libjpeg="try")
+if test x$enable_libjpeg != xno; then
+ POPPLER_FIND_JPEG
+fi
+
+AM_CONDITIONAL(BUILD_LIBJPEG, test x$enable_libjpeg = xyes)
+AH_TEMPLATE([ENABLE_LIBJPEG],
+ [Use libjpeg instead of builtin jpeg decoder.])
+
+dnl Test for libpng
+AC_ARG_ENABLE(libpng,
+ AC_HELP_STRING([--disable-libpng],
+ [Don't build against libpng.]),
+ enable_libpng=$enableval,
+ enable_libpng="try")
+if test x$enable_libpng != xno; then
+ POPPLER_FIND_PNG
+fi
+
+AM_CONDITIONAL(BUILD_LIBPNG, test x$enable_libpng = xyes)
+AH_TEMPLATE([ENABLE_LIBPNG],
+ [Build against libpng.])
+
+dnl Check for freetype headers
+FREETYPE_LIBS=
+FREETYPE_CFLAGS=
+
+PKG_CHECK_MODULES(FREETYPE, freetype2,
+ [freetype_pkgconfig=yes], [freetype_pkgconfig=no])
+
+if test "x$freetype_pkgconfig" = "xyes"; then
+
+ AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files])
+
+else
+
+ AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ if test "x$FREETYPE_CONFIG" != "xno" ; then
+
+ FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+ AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include files])
+
+ fi
+
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.0.0)
+
+AC_ARG_ENABLE(splash-output,
+ AC_HELP_STRING([--disable-splash-output],
+ [Don't build the Splash graphics backend.]),,
+ enable_splash_output="yes")
+AM_CONDITIONAL(BUILD_SPLASH_OUTPUT, test x$enable_splash_output = xyes)
+AH_TEMPLATE([HAVE_SPLASH], [Use splash for rendering.])
+if test x$enable_splash_output = xyes; then
+ AC_DEFINE(HAVE_SPLASH)
+fi
+
+CAIRO_VERSION="1.8.4"
+AC_SUBST(CAIRO_VERSION)
+AC_ARG_ENABLE(cairo-output,
+ AC_HELP_STRING([--disable-cairo-output],
+ [Don't build the cairo graphics backend.]),
+ enable_cairo_output=$enableval,
+ enable_cairo_output="try")
+if test x$enable_cairo_output = xyes; then
+ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION)
+elif test x$enable_cairo_output = xtry; then
+ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION,
+ [enable_cairo_output="yes"],
+ [enable_cairo_output="no"])
+fi
+
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(CAIRO_LIBS)
+
+AM_CONDITIONAL(BUILD_CAIRO_OUTPUT, test x$enable_cairo_output = xyes)
+AH_TEMPLATE([HAVE_CAIRO], [Use cairo for rendering.])
+if test x$enable_cairo_output = xyes; then
+ AC_DEFINE(HAVE_CAIRO)
+ CAIRO_FEATURE="#define POPPLER_HAS_CAIRO 1"
+ CAIRO_REQ="cairo"
+ AC_CHECK_HEADERS(fcntl.h sys/mman.h sys/stat.h)
+ AC_LANG_PUSH([C])
+ _SAVE_CFLAGS=$CFLAGS
+ _SAVE_LIBS=$LIBS
+ CFLAGS="$CFLAGS $CAIRO_CFLAGS"
+ LIBS="$LIBS $CAIRO_LIBS"
+ AC_CACHE_CHECK([for cairo blend modes support],
+ ac_cv_cairo_has_blend_modes,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <cairo.h>
+int main() {
+ cairo_t *cr;
+ cairo_set_operator(cr, CAIRO_OPERATOR_MULTIPLY);
+ return 0;
+}
+ ]])],
+ [ac_cv_cairo_has_blend_modes="yes"],
+ [ac_cv_cairo_has_blend_modes="no"])])
+ CFLAGS=$_SAVE_CFLAGS
+ LIBS=$_SAVE_LIBS
+ AC_LANG_POP([C])
+ if test "$ac_cv_cairo_has_blend_modes" = "yes"; then
+ AC_DEFINE(CAIRO_HAS_BLEND_MODES, [1], [Whether cairo has blend modes support])
+ fi
+else
+ CAIRO_FEATURE="#undef POPPLER_HAS_CAIRO"
+ CAIRO_REQ=""
+fi
+AC_SUBST(CAIRO_FEATURE)
+AC_SUBST(CAIRO_REQ)
+
+POPPLER_GLIB_DISABLE_DEPRECATED=""
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""
+
+GLIB_REQUIRED=2.6
+AC_ARG_ENABLE(poppler-glib,
+ AC_HELP_STRING([--disable-poppler-glib],
+ [Don't compile poppler glib wrapper.]),
+ enable_poppler_glib=$enableval,
+ enable_poppler_glib="try")
+if test x$enable_poppler_glib = xyes; then
+ PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
+elif test x$enable_poppler_glib = xtry; then
+ PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED,
+ [enable_poppler_glib="yes"],
+ [enable_poppler_glib="no"])
+fi
+if test x$enable_poppler_glib = xyes; then
+ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
+ POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
+ POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DG_DISABLE_SINGLE_INCLUDES"
+fi
+AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes)
+
+GTK_DOC_CHECK([1.0])
+
+dnl
+dnl GDK
+dnl
+AC_ARG_ENABLE(gdk,
+ AC_HELP_STRING([--disable-gdk],
+ [Compile without gdk.]),
+ enable_gdk=$enableval,
+ enable_gdk="try")
+
+if test x$enable_poppler_glib = xyes; then
+ if test x$enable_gdk = xyes; then
+ PKG_CHECK_MODULES(GDK, gdk-2.0)
+ elif test x$enable_gdk = xtry; then
+ if test x$enable_splash_output = xyes; then
+ PKG_CHECK_MODULES(GDK, gdk-2.0,
+ [enable_gdk="yes"],
+ [enable_gdk="no"])
+ elif test x$enable_cairo_output = xyes; then
+ PKG_CHECK_MODULES(GDK, gdk-2.0,
+ [enable_gdk="yes"],
+ [enable_gdk="no"])
+ fi
+ elif test x$enable_splash_output = xyes; then
+ PKG_CHECK_MODULES(GDK, gdk-2.0)
+ AC_MSG_WARN("GDK is required by the glib wrapper when splash output device is
+ enabled. If you want to comppile popler without GDK use --disable-splash-output too")
+ enable_gdk=yes
+ fi
+ if test x$enable_gdk = xyes; then
+ AC_DEFINE(POPPLER_WITH_GDK,[1], [Have GDK])
+ GDK_FEATURE="#define POPPLER_WITH_GDK 1"
+ POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
+ POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+ else
+ GDK_FEATURE=""
+ fi
+fi
+AM_CONDITIONAL(BUILD_WITH_GDK, test x$enable_gdk = xyes)
+AC_SUBST(GDK_CFLAGS)
+AC_SUBST(GDK_LIBS)
+AC_SUBST(GDK_FEATURE)
+
+AC_SUBST(POPPLER_GLIB_DISABLE_DEPRECATED)
+AC_SUBST(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+
+AC_ARG_ENABLE(poppler-qt,
+ AC_HELP_STRING([--disable-poppler-qt],
+ [Don't compile poppler qt wrapper.]),
+ enable_poppler_qt=$enableval,
+ enable_poppler_qt="try")
+
+if test x$enable_poppler_qt = xyes; then
+ POPPLER_FIND_QT(POPPLER_QT,,)
+elif test x$enable_poppler_qt = xtry; then
+ POPPLER_FIND_QT(POPPLER_QT,
+ [enable_poppler_qt="yes"],
+ [enable_poppler_qt="no"])
+fi
+AC_SUBST(POPPLER_QT_CXXFLAGS)
+AC_SUBST(POPPLER_QT_LIBS)
+
+AM_CONDITIONAL(BUILD_POPPLER_QT, test "x$enable_poppler_qt" = "xyes")
+
+dnl
+dnl Try Qt4
+dnl
+
+AC_ARG_ENABLE(poppler-qt4,
+ AC_HELP_STRING([--disable-poppler-qt4],
+ [Don't compile poppler Qt4 wrapper.]),
+ enable_poppler_qt4=$enableval,
+ enable_poppler_qt4="try")
+if test x$enable_poppler_qt4 = xyes; then
+ PKG_CHECK_MODULES(POPPLER_QT4,
+ QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0)
+ PKG_CHECK_MODULES(POPPLER_QT4_TEST,
+ QtTest >= 4.4.0)
+elif test x$enable_poppler_qt4 = xtry; then
+ PKG_CHECK_MODULES(POPPLER_QT4,
+ QtCore >= 4.4.0 QtGui >= 4.4.0 QtXml >= 4.4.0,
+ [enable_poppler_qt4="yes"],
+ [enable_poppler_qt4="no"])
+ if test x$enable_poppler_qt4 = xyes; then
+ PKG_CHECK_MODULES(POPPLER_QT4_TEST,
+ QtTest >= 4.4.0,
+ [enable_poppler_qt4="yes"],
+ [enable_poppler_qt4="no"])
+ fi
+fi
+
+AC_SUBST(POPPLER_QT4_CXXFLAGS)
+AC_SUBST(POPPLER_QT4_LIBS)
+AC_SUBST(POPPLER_QT4_TEST_LIBS)
+
+if test x$enable_poppler_qt4 = xyes; then
+ AC_MSG_CHECKING([for Qt4 moc])
+ MOCQT4=`which moc`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # moc was not the qt4 one, try with moc-qt4
+ MOCQT4=`which moc-qt4`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # no valid moc found
+ enable_poppler_qt4=no;
+ MOCQT4="not found"
+ fi
+ fi
+ AC_SUBST(MOCQT4)
+ AC_MSG_RESULT([$MOCQT4])
+fi
+
+AM_CONDITIONAL(BUILD_POPPLER_QT4, test "x$enable_poppler_qt4" = "xyes")
+
+AC_ARG_ENABLE(gtk-test,
+ AC_HELP_STRING([--disable-gtk-test],
+ [Don't compile GTK+ test program.]),
+ enable_gtk_test=$enableval,
+ enable_gtk_test="try")
+if test x$enable_gtk_test = xyes; then
+ PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0)
+elif test x$enable_gtk_test = xtry; then
+ PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0,
+ [enable_gtk_test="yes"],
+ [enable_gtk_test="no"])
+fi
+AM_CONDITIONAL(BUILD_GTK_TEST, test x$enable_gtk_test = xyes -a x$enable_poppler_glib = xyes)
+
+AC_ARG_ENABLE(abiword-output,
+ AC_HELP_STRING([--disable-abiword-output],
+ [Don't build the abiword backend.]),
+ enable_abiword_output=$enableval,
+ enable_abiword_output="try")
+if test x$enable_abiword_output = xyes; then
+ PKG_CHECK_MODULES(ABIWORD, libxml-2.0)
+elif test x$enable_abiword_output = xtry; then
+ PKG_CHECK_MODULES(ABIWORD, libxml-2.0,
+ [enable_abiword_output="yes"],
+ [enable_abiword_output="no"])
+fi
+
+AM_CONDITIONAL(BUILD_ABIWORD_OUTPUT, test x$enable_abiword_output = xyes)
+
+AC_ARG_ENABLE(utils,
+ AC_HELP_STRING([--disable-utils],
+ [Don't compile poppler command line utils.]),
+ enable_utils=$enableval,
+ enable_utils="yes")
+AM_CONDITIONAL(BUILD_UTILS, test x$enable_utils = xyes)
+
+AC_ARG_ENABLE(compile-warnings,
+ AC_HELP_STRING([--enable-compile-warnings=@<:@no/yes/kde@:>@]
+ [Turn on compiler warnings.]),,
+ [enable_compile_warnings="yes"])
+
+dnl
+dnl Color Management
+dnl
+
+AC_ARG_ENABLE(cms,
+ AC_HELP_STRING([--disable-cms],
+ [Don't use color management system.]),
+ enable_cms=$enableval,
+ enable_cms="try")
+if test x$enable_cms = xyes; then
+ PKG_CHECK_MODULES(LCMS, lcms)
+elif test x$enable_cms = xtry; then
+ PKG_CHECK_MODULES(LCMS, lcms, [enable_cms=yes], [enable_cms=no])
+fi
+
+if test "x$enable_cms" = "xyes"; then
+ AC_DEFINE(USE_CMS, 1, [Defines if use cms])
+fi
+AM_CONDITIONAL(USE_CMS, test x$enable_cms = xyes)
+
+if test "x$GCC" != xyes; then
+ enable_compile_warnings=no
+fi
+case "$enable_compile_warnings" in
+ no) ;;
+ yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual $CXXFLAGS" ;;
+ kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi \
+ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align \
+ -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith \
+ -Wwrite-strings -O2 -Wformat-security \
+ -Wmissing-format-attribute -fno-exceptions -fno-check-new \
+ -fno-common $CXXFLAGS" ;;
+esac
+
+case $($PKG_CONFIG --version) in
+ 0.?|0.1[0-7])
+ PC_REQUIRES_PRIVATE="";
+ PC_REQUIRES="poppler = $VERSION";;
+ *)
+ PC_REQUIRES_PRIVATE="Requires.private: poppler = $VERSION";
+ PC_REQUIRES="";;
+esac
+
+AC_SUBST(PC_REQUIRES)
+AC_SUBST(PC_REQUIRES_PRIVATE)
+
+AC_SUBST([POPPLER_MAJOR_VERSION],[poppler_version_major])
+AC_SUBST([POPPLER_MINOR_VERSION],[poppler_version_minor])
+AC_SUBST([POPPLER_MICRO_VERSION],[poppler_version_micro])
+
+AC_OUTPUT([
+Makefile
+goo/Makefile
+fofi/Makefile
+splash/Makefile
+poppler/Makefile
+utils/Makefile
+glib/Makefile
+glib/poppler-features.h
+glib/reference/Makefile
+glib/demo/Makefile
+test/Makefile
+qt/Makefile
+qt4/Makefile
+qt4/src/Makefile
+qt4/tests/Makefile
+qt4/demos/Makefile
+poppler.pc
+poppler-cairo.pc
+poppler-splash.pc
+poppler-glib.pc
+poppler-qt.pc
+poppler-qt4.pc])
+
+
+echo ""
+echo "Building poppler with support for:"
+echo " splash output: $enable_splash_output"
+echo " cairo output: $enable_cairo_output"
+echo " abiword output: $enable_abiword_output"
+echo " qt wrapper: $enable_poppler_qt"
+echo " qt4 wrapper: $enable_poppler_qt4"
+echo " glib wrapper: $enable_poppler_glib"
+echo " use GDK: $enable_gdk"
+echo " use gtk-doc: $enable_gtk_doc"
+echo " use libjpeg: $enable_libjpeg"
+echo " use libpng: $enable_libpng"
+echo " use zlib: $enable_zlib"
+echo " use libopenjpeg: $enable_libopenjpeg"
+echo " use cms: $enable_cms"
+echo " command line utils: $enable_utils"
+echo ""
+
+if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then
+ echo " Warning: There is no rendering backend enabled"
+fi
+
+if test x$enable_libjpeg != xyes; then
+ echo " Warning: Using libjpeg is recommended"
+fi
+
+if test x$enable_zlib != xno; then
+ echo " Warning: Using zlib is not totally safe"
+fi
+
+if test x$enable_libopenjpeg != xyes; then
+ echo " Warning: Using libopenjpeg is recommended"
+fi
diff --git a/Build/source/libs/poppler/poppler-0.12.4/depcomp b/Build/source/libs/poppler/poppler-0.12.4/depcomp
new file mode 100755
index 00000000000..df8eea7e4ce
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.cc b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.cc
new file mode 100644
index 00000000000..fe0b92e6546
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.cc
@@ -0,0 +1,180 @@
+//========================================================================
+//
+// FoFiBase.cc
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Ed Avis <eda@waniasset.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include "goo/gmem.h"
+#include "poppler/Error.h"
+#include "FoFiBase.h"
+
+//------------------------------------------------------------------------
+// FoFiBase
+//------------------------------------------------------------------------
+
+FoFiBase::FoFiBase(char *fileA, int lenA, GBool freeFileDataA) {
+ fileData = file = (Guchar *)fileA;
+ len = lenA;
+ freeFileData = freeFileDataA;
+}
+
+FoFiBase::~FoFiBase() {
+ if (freeFileData) {
+ gfree(fileData);
+ }
+}
+
+char *FoFiBase::readFile(char *fileName, int *fileLen) {
+ FILE *f;
+ char *buf;
+ int n;
+
+ if (!(f = fopen(fileName, "rb"))) {
+ error(-1, "Cannot open '%s'", fileName);
+ return NULL;
+ }
+ if (fseek(f, 0, SEEK_END) != 0) {
+ error(-1, "Cannot seek to end of '%s'", fileName);
+ fclose(f);
+ return NULL;
+ }
+ n = (int)ftell(f);
+ if (fseek(f, 0, SEEK_SET) != 0) {
+ error(-1, "Cannot seek to start of '%s'", fileName);
+ fclose(f);
+ return NULL;
+ }
+ buf = (char *)gmalloc(n);
+ if ((int)fread(buf, 1, n, f) != n) {
+ gfree(buf);
+ fclose(f);
+ return NULL;
+ }
+ fclose(f);
+ *fileLen = n;
+ return buf;
+}
+
+int FoFiBase::getS8(int pos, GBool *ok) {
+ int x;
+
+ if (pos < 0 || pos >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = file[pos];
+ if (x & 0x80) {
+ x |= ~0xff;
+ }
+ return x;
+}
+
+int FoFiBase::getU8(int pos, GBool *ok) {
+ if (pos < 0 || pos >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ return file[pos];
+}
+
+int FoFiBase::getS16BE(int pos, GBool *ok) {
+ int x;
+
+ if (pos < 0 || pos+1 >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = file[pos];
+ x = (x << 8) + file[pos+1];
+ if (x & 0x8000) {
+ x |= ~0xffff;
+ }
+ return x;
+}
+
+int FoFiBase::getU16BE(int pos, GBool *ok) {
+ int x;
+
+ if (pos < 0 || pos+1 >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = file[pos];
+ x = (x << 8) + file[pos+1];
+ return x;
+}
+
+int FoFiBase::getS32BE(int pos, GBool *ok) {
+ int x;
+
+ if (pos < 0 || pos+3 >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = file[pos];
+ x = (x << 8) + file[pos+1];
+ x = (x << 8) + file[pos+2];
+ x = (x << 8) + file[pos+3];
+ if (x & 0x80000000) {
+ x |= ~0xffffffff;
+ }
+ return x;
+}
+
+Guint FoFiBase::getU32BE(int pos, GBool *ok) {
+ Guint x;
+
+ if (pos < 0 || pos+3 >= len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = file[pos];
+ x = (x << 8) + file[pos+1];
+ x = (x << 8) + file[pos+2];
+ x = (x << 8) + file[pos+3];
+ return x;
+}
+
+Guint FoFiBase::getUVarBE(int pos, int size, GBool *ok) {
+ Guint x;
+ int i;
+
+ if (pos < 0 || pos + size > len) {
+ *ok = gFalse;
+ return 0;
+ }
+ x = 0;
+ for (i = 0; i < size; ++i) {
+ x = (x << 8) + file[pos + i];
+ }
+ return x;
+}
+
+GBool FoFiBase::checkRegion(int pos, int size) {
+ return pos >= 0 &&
+ pos + size >= pos &&
+ pos + size <= len;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.h b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.h
new file mode 100644
index 00000000000..e2550017aac
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiBase.h
@@ -0,0 +1,55 @@
+//========================================================================
+//
+// FoFiBase.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FOFIBASE_H
+#define FOFIBASE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+
+typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
+
+//------------------------------------------------------------------------
+// FoFiBase
+//------------------------------------------------------------------------
+
+class FoFiBase {
+public:
+
+ virtual ~FoFiBase();
+
+protected:
+
+ FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
+ static char *readFile(char *fileName, int *fileLen);
+
+ // S = signed / U = unsigned
+ // 8/16/32/Var = word length, in bytes
+ // BE = big endian
+ int getS8(int pos, GBool *ok);
+ int getU8(int pos, GBool *ok);
+ int getS16BE(int pos, GBool *ok);
+ int getU16BE(int pos, GBool *ok);
+ int getS32BE(int pos, GBool *ok);
+ Guint getU32BE(int pos, GBool *ok);
+ Guint getUVarBE(int pos, int size, GBool *ok);
+
+ GBool checkRegion(int pos, int size);
+
+ Guchar *fileData;
+ Guchar *file;
+ int len;
+ GBool freeFileData;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.cc b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.cc
new file mode 100644
index 00000000000..946b56c19d0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.cc
@@ -0,0 +1,994 @@
+//========================================================================
+//
+// FoFiEncodings.cc
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include "FoFiEncodings.h"
+
+//------------------------------------------------------------------------
+// Type 1 and 1C font data
+//------------------------------------------------------------------------
+
+char *fofiType1StandardEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ NULL,
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ NULL,
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ NULL,
+ "questiondown",
+ NULL,
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ NULL,
+ "ring",
+ "cedilla",
+ NULL,
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "AE",
+ NULL,
+ "ordfeminine",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "ae",
+ NULL,
+ NULL,
+ NULL,
+ "dotlessi",
+ NULL,
+ NULL,
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+char *fofiType1ExpertEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ NULL,
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "comma",
+ "hyphen",
+ "period",
+ "fraction",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "colon",
+ "semicolon",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ NULL,
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ NULL,
+ NULL,
+ NULL,
+ "isuperior",
+ NULL,
+ NULL,
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ NULL,
+ NULL,
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ NULL,
+ "ff",
+ "fi",
+ "fl",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ NULL,
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ NULL,
+ NULL,
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ NULL,
+ "Dotaccentsmall",
+ NULL,
+ NULL,
+ "Macronsmall",
+ NULL,
+ NULL,
+ "figuredash",
+ "hypheninferior",
+ NULL,
+ NULL,
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ NULL,
+ NULL,
+ NULL,
+ "onequarter",
+ "onehalf",
+ "threequarters",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ NULL,
+ NULL,
+ "zerosuperior",
+ "onesuperior",
+ "twosuperior",
+ "threesuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall"
+};
+
+//------------------------------------------------------------------------
+// Type 1C font data
+//------------------------------------------------------------------------
+
+char *fofiType1CStdStrings[391] = {
+ ".notdef",
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ "questiondown",
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ "ring",
+ "cedilla",
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ "AE",
+ "ordfeminine",
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ "ae",
+ "dotlessi",
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ "onesuperior",
+ "logicalnot",
+ "mu",
+ "trademark",
+ "Eth",
+ "onehalf",
+ "plusminus",
+ "Thorn",
+ "onequarter",
+ "divide",
+ "brokenbar",
+ "degree",
+ "thorn",
+ "threequarters",
+ "twosuperior",
+ "registered",
+ "minus",
+ "eth",
+ "multiply",
+ "threesuperior",
+ "copyright",
+ "Aacute",
+ "Acircumflex",
+ "Adieresis",
+ "Agrave",
+ "Aring",
+ "Atilde",
+ "Ccedilla",
+ "Eacute",
+ "Ecircumflex",
+ "Edieresis",
+ "Egrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Igrave",
+ "Ntilde",
+ "Oacute",
+ "Ocircumflex",
+ "Odieresis",
+ "Ograve",
+ "Otilde",
+ "Scaron",
+ "Uacute",
+ "Ucircumflex",
+ "Udieresis",
+ "Ugrave",
+ "Yacute",
+ "Ydieresis",
+ "Zcaron",
+ "aacute",
+ "acircumflex",
+ "adieresis",
+ "agrave",
+ "aring",
+ "atilde",
+ "ccedilla",
+ "eacute",
+ "ecircumflex",
+ "edieresis",
+ "egrave",
+ "iacute",
+ "icircumflex",
+ "idieresis",
+ "igrave",
+ "ntilde",
+ "oacute",
+ "ocircumflex",
+ "odieresis",
+ "ograve",
+ "otilde",
+ "scaron",
+ "uacute",
+ "ucircumflex",
+ "udieresis",
+ "ugrave",
+ "yacute",
+ "ydieresis",
+ "zcaron",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ "isuperior",
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ "ff",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ "Dotaccentsmall",
+ "Macronsmall",
+ "figuredash",
+ "hypheninferior",
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ "zerosuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall",
+ "001.000",
+ "001.001",
+ "001.002",
+ "001.003",
+ "Black",
+ "Bold",
+ "Book",
+ "Light",
+ "Medium",
+ "Regular",
+ "Roman",
+ "Semibold"
+};
+
+Gushort fofiType1CISOAdobeCharset[229] = {
+ 0, 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, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228
+};
+
+Gushort fofiType1CExpertCharset[166] = {
+ 0, 1, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 13, 14, 15, 99, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 27, 28, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 109, 110, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 158, 155, 163, 319, 320, 321, 322, 323, 324, 325,
+ 326, 150, 164, 169, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378
+};
+
+Gushort fofiType1CExpertSubsetCharset[87] = {
+ 0, 1, 231, 232, 235, 236, 237, 238, 13, 14,
+ 15, 99, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 27, 28, 249, 250, 251, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 109, 110, 267, 268, 269, 270, 272, 300, 301,
+ 302, 305, 314, 315, 158, 155, 163, 320, 321, 322,
+ 323, 324, 325, 326, 150, 164, 169, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.h b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.h
new file mode 100644
index 00000000000..fb4eca86d9f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiEncodings.h
@@ -0,0 +1,34 @@
+//========================================================================
+//
+// FoFiEncodings.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FOFIENCODINGS_H
+#define FOFIENCODINGS_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+// Type 1 and 1C font data
+//------------------------------------------------------------------------
+
+extern char *fofiType1StandardEncoding[256];
+extern char *fofiType1ExpertEncoding[256];
+
+//------------------------------------------------------------------------
+// Type 1C font data
+//------------------------------------------------------------------------
+
+extern char *fofiType1CStdStrings[391];
+extern Gushort fofiType1CISOAdobeCharset[229];
+extern Gushort fofiType1CExpertCharset[166];
+extern Gushort fofiType1CExpertSubsetCharset[87];
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.cc b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.cc
new file mode 100644
index 00000000000..d716638c7ec
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.cc
@@ -0,0 +1,2403 @@
+//========================================================================
+//
+// FoFiTrueType.cc
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gtypes.h"
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooHash.h"
+#include "FoFiType1C.h"
+#include "FoFiTrueType.h"
+#include "poppler/Error.h"
+
+//
+// Terminology
+// -----------
+//
+// character code = number used as an element of a text string
+//
+// character name = glyph name = name for a particular glyph within a
+// font
+//
+// glyph index = GID = position (within some internal table in the font)
+// where the instructions to draw a particular glyph are
+// stored
+//
+// Type 1 fonts
+// ------------
+//
+// Type 1 fonts contain:
+//
+// Encoding: array of glyph names, maps char codes to glyph names
+//
+// Encoding[charCode] = charName
+//
+// CharStrings: dictionary of instructions, keyed by character names,
+// maps character name to glyph data
+//
+// CharStrings[charName] = glyphData
+//
+// TrueType fonts
+// --------------
+//
+// TrueType fonts contain:
+//
+// 'cmap' table: mapping from character code to glyph index; there may
+// be multiple cmaps in a TrueType font
+//
+// cmap[charCode] = gid
+//
+// 'post' table: mapping from glyph index to glyph name
+//
+// post[gid] = glyphName
+//
+// Type 42 fonts
+// -------------
+//
+// Type 42 fonts contain:
+//
+// Encoding: array of glyph names, maps char codes to glyph names
+//
+// Encoding[charCode] = charName
+//
+// CharStrings: dictionary of glyph indexes, keyed by character names,
+// maps character name to glyph index
+//
+// CharStrings[charName] = gid
+//
+
+//------------------------------------------------------------------------
+
+#define ttcfTag 0x74746366
+
+//------------------------------------------------------------------------
+
+struct TrueTypeTable {
+ Guint tag;
+ Guint checksum;
+ int offset;
+ int origOffset;
+ int len;
+};
+
+struct TrueTypeCmap {
+ int platform;
+ int encoding;
+ int offset;
+ int len;
+ int fmt;
+};
+
+struct TrueTypeLoca {
+ int idx;
+ int origOffset;
+ int newOffset;
+ int len;
+};
+
+#define cmapTag 0x636d6170
+#define glyfTag 0x676c7966
+#define headTag 0x68656164
+#define hheaTag 0x68686561
+#define hmtxTag 0x686d7478
+#define locaTag 0x6c6f6361
+#define nameTag 0x6e616d65
+#define os2Tag 0x4f532f32
+#define postTag 0x706f7374
+#define vrt2Tag 0x76727432
+#define vertTag 0x76657274
+
+static int cmpTrueTypeLocaOffset(const void *p1, const void *p2) {
+ TrueTypeLoca *loca1 = (TrueTypeLoca *)p1;
+ TrueTypeLoca *loca2 = (TrueTypeLoca *)p2;
+
+ if (loca1->origOffset == loca2->origOffset) {
+ return loca1->idx - loca2->idx;
+ }
+ return loca1->origOffset - loca2->origOffset;
+}
+
+static int cmpTrueTypeLocaIdx(const void *p1, const void *p2) {
+ TrueTypeLoca *loca1 = (TrueTypeLoca *)p1;
+ TrueTypeLoca *loca2 = (TrueTypeLoca *)p2;
+
+ return loca1->idx - loca2->idx;
+}
+
+static int cmpTrueTypeTableTag(const void *p1, const void *p2) {
+ TrueTypeTable *tab1 = (TrueTypeTable *)p1;
+ TrueTypeTable *tab2 = (TrueTypeTable *)p2;
+
+ return (int)tab1->tag - (int)tab2->tag;
+}
+
+//------------------------------------------------------------------------
+
+struct T42Table {
+ char *tag; // 4-byte tag
+ GBool required; // required by the TrueType spec?
+};
+
+// TrueType tables to be embedded in Type 42 fonts.
+// NB: the table names must be in alphabetical order here.
+#define nT42Tables 11
+static T42Table t42Tables[nT42Tables] = {
+ { "cvt ", gTrue },
+ { "fpgm", gTrue },
+ { "glyf", gTrue },
+ { "head", gTrue },
+ { "hhea", gTrue },
+ { "hmtx", gTrue },
+ { "loca", gTrue },
+ { "maxp", gTrue },
+ { "prep", gTrue },
+ { "vhea", gFalse },
+ { "vmtx", gFalse }
+};
+#define t42HeadTable 3
+#define t42LocaTable 6
+#define t42GlyfTable 2
+#define t42VheaTable 9
+#define t42VmtxTable 10
+
+//------------------------------------------------------------------------
+
+// Glyph names in some arbitrary standard order that Apple uses for
+// their TrueType fonts.
+static char *macGlyphNames[258] = {
+ ".notdef", "null", "CR", "space",
+ "exclam", "quotedbl", "numbersign", "dollar",
+ "percent", "ampersand", "quotesingle", "parenleft",
+ "parenright", "asterisk", "plus", "comma",
+ "hyphen", "period", "slash", "zero",
+ "one", "two", "three", "four",
+ "five", "six", "seven", "eight",
+ "nine", "colon", "semicolon", "less",
+ "equal", "greater", "question", "at",
+ "A", "B", "C", "D",
+ "E", "F", "G", "H",
+ "I", "J", "K", "L",
+ "M", "N", "O", "P",
+ "Q", "R", "S", "T",
+ "U", "V", "W", "X",
+ "Y", "Z", "bracketleft", "backslash",
+ "bracketright", "asciicircum", "underscore", "grave",
+ "a", "b", "c", "d",
+ "e", "f", "g", "h",
+ "i", "j", "k", "l",
+ "m", "n", "o", "p",
+ "q", "r", "s", "t",
+ "u", "v", "w", "x",
+ "y", "z", "braceleft", "bar",
+ "braceright", "asciitilde", "Adieresis", "Aring",
+ "Ccedilla", "Eacute", "Ntilde", "Odieresis",
+ "Udieresis", "aacute", "agrave", "acircumflex",
+ "adieresis", "atilde", "aring", "ccedilla",
+ "eacute", "egrave", "ecircumflex", "edieresis",
+ "iacute", "igrave", "icircumflex", "idieresis",
+ "ntilde", "oacute", "ograve", "ocircumflex",
+ "odieresis", "otilde", "uacute", "ugrave",
+ "ucircumflex", "udieresis", "dagger", "degree",
+ "cent", "sterling", "section", "bullet",
+ "paragraph", "germandbls", "registered", "copyright",
+ "trademark", "acute", "dieresis", "notequal",
+ "AE", "Oslash", "infinity", "plusminus",
+ "lessequal", "greaterequal", "yen", "mu1",
+ "partialdiff", "summation", "product", "pi",
+ "integral", "ordfeminine", "ordmasculine", "Ohm",
+ "ae", "oslash", "questiondown", "exclamdown",
+ "logicalnot", "radical", "florin", "approxequal",
+ "increment", "guillemotleft", "guillemotright", "ellipsis",
+ "nbspace", "Agrave", "Atilde", "Otilde",
+ "OE", "oe", "endash", "emdash",
+ "quotedblleft", "quotedblright", "quoteleft", "quoteright",
+ "divide", "lozenge", "ydieresis", "Ydieresis",
+ "fraction", "currency", "guilsinglleft", "guilsinglright",
+ "fi", "fl", "daggerdbl", "periodcentered",
+ "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex",
+ "Ecircumflex", "Aacute", "Edieresis", "Egrave",
+ "Iacute", "Icircumflex", "Idieresis", "Igrave",
+ "Oacute", "Ocircumflex", "applelogo", "Ograve",
+ "Uacute", "Ucircumflex", "Ugrave", "dotlessi",
+ "circumflex", "tilde", "overscore", "breve",
+ "dotaccent", "ring", "cedilla", "hungarumlaut",
+ "ogonek", "caron", "Lslash", "lslash",
+ "Scaron", "scaron", "Zcaron", "zcaron",
+ "brokenbar", "Eth", "eth", "Yacute",
+ "yacute", "Thorn", "thorn", "minus",
+ "multiply", "onesuperior", "twosuperior", "threesuperior",
+ "onehalf", "onequarter", "threequarters", "franc",
+ "Gbreve", "gbreve", "Idot", "Scedilla",
+ "scedilla", "Cacute", "cacute", "Ccaron",
+ "ccaron", "dmacron"
+};
+
+//------------------------------------------------------------------------
+// FoFiTrueType
+//------------------------------------------------------------------------
+
+FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA, int faceIndexA) {
+ FoFiTrueType *ff;
+
+ ff = new FoFiTrueType(fileA, lenA, gFalse, faceIndexA);
+ if (!ff->parsedOk) {
+ delete ff;
+ return NULL;
+ }
+ return ff;
+}
+
+FoFiTrueType *FoFiTrueType::load(char *fileName, int faceIndexA) {
+ FoFiTrueType *ff;
+ char *fileA;
+ int lenA;
+
+ if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
+ return NULL;
+ }
+ ff = new FoFiTrueType(fileA, lenA, gTrue, faceIndexA);
+ if (!ff->parsedOk) {
+ delete ff;
+ return NULL;
+ }
+ return ff;
+}
+
+FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA):
+ FoFiBase(fileA, lenA, freeFileDataA)
+{
+ tables = NULL;
+ nTables = 0;
+ cmaps = NULL;
+ nCmaps = 0;
+ nameToGID = NULL;
+ parsedOk = gFalse;
+ faceIndex = faceIndexA;
+ gsubFeatureTable = 0;
+ gsubLookupList = 0;
+
+ parse();
+}
+
+FoFiTrueType::~FoFiTrueType() {
+ gfree(tables);
+ gfree(cmaps);
+ if (nameToGID) {
+ delete nameToGID;
+ }
+}
+
+int FoFiTrueType::getNumCmaps() {
+ return nCmaps;
+}
+
+int FoFiTrueType::getCmapPlatform(int i) {
+ return cmaps[i].platform;
+}
+
+int FoFiTrueType::getCmapEncoding(int i) {
+ return cmaps[i].encoding;
+}
+
+int FoFiTrueType::findCmap(int platform, int encoding) {
+ int i;
+
+ for (i = 0; i < nCmaps; ++i) {
+ if (cmaps[i].platform == platform && cmaps[i].encoding == encoding) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+Gushort FoFiTrueType::mapCodeToGID(int i, Guint c) {
+ Gushort gid;
+ Guint segCnt, segEnd, segStart, segDelta, segOffset;
+ Guint cmapFirst, cmapLen;
+ int pos, a, b, m;
+ GBool ok;
+
+ if (i < 0 || i >= nCmaps) {
+ return 0;
+ }
+ ok = gTrue;
+ pos = cmaps[i].offset;
+ switch (cmaps[i].fmt) {
+ case 0:
+ if (c + 6 >= (Guint)cmaps[i].len) {
+ return 0;
+ }
+ gid = getU8(cmaps[i].offset + 6 + c, &ok);
+ break;
+ case 4:
+ segCnt = getU16BE(pos + 6, &ok) / 2;
+ a = -1;
+ b = segCnt - 1;
+ segEnd = getU16BE(pos + 14 + 2*b, &ok);
+ if (c > segEnd) {
+ // malformed font -- the TrueType spec requires the last segEnd
+ // to be 0xffff
+ return 0;
+ }
+ // invariant: seg[a].end < code <= seg[b].end
+ while (b - a > 1 && ok) {
+ m = (a + b) / 2;
+ segEnd = getU16BE(pos + 14 + 2*m, &ok);
+ if (segEnd < c) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ segStart = getU16BE(pos + 16 + 2*segCnt + 2*b, &ok);
+ segDelta = getU16BE(pos + 16 + 4*segCnt + 2*b, &ok);
+ segOffset = getU16BE(pos + 16 + 6*segCnt + 2*b, &ok);
+ if (c < segStart) {
+ return 0;
+ }
+ if (segOffset == 0) {
+ gid = (c + segDelta) & 0xffff;
+ } else {
+ gid = getU16BE(pos + 16 + 6*segCnt + 2*b +
+ segOffset + 2 * (c - segStart), &ok);
+ if (gid != 0) {
+ gid = (gid + segDelta) & 0xffff;
+ }
+ }
+ break;
+ case 6:
+ cmapFirst = getU16BE(pos + 6, &ok);
+ cmapLen = getU16BE(pos + 8, &ok);
+ if (c < cmapFirst || c >= cmapFirst + cmapLen) {
+ return 0;
+ }
+ gid = getU16BE(pos + 10 + 2 * (c - cmapFirst), &ok);
+ break;
+ case 12:
+ segCnt = getU32BE(pos + 12, &ok);
+ a = -1;
+ b = segCnt - 1;
+ segEnd = getU32BE(pos + 16 + 12*b+4, &ok);
+ if (c > segEnd) {
+ return 0;
+ }
+ // invariant: seg[a].end < code <= seg[b].end
+ while (b - a > 1 && ok) {
+ m = (a + b) / 2;
+ segEnd = getU32BE(pos + 16 + 12*m+4, &ok);
+ if (segEnd < c) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ segStart = getU32BE(pos + 16 + 12*b, &ok);
+ segDelta = getU32BE(pos + 16 + 12*b+8, &ok);
+ if (c < segStart) {
+ return 0;
+ }
+ gid = segDelta + (c-segStart);
+ break;
+ default:
+ return 0;
+ }
+ if (!ok) {
+ return 0;
+ }
+ return gid;
+}
+
+int FoFiTrueType::mapNameToGID(char *name) {
+ if (!nameToGID) {
+ return 0;
+ }
+ return nameToGID->lookupInt(name);
+}
+
+Gushort *FoFiTrueType::getCIDToGIDMap(int *nCIDs) {
+ FoFiType1C *ff;
+ Gushort *map;
+ int i;
+
+ *nCIDs = 0;
+ if (!openTypeCFF) {
+ return NULL;
+ }
+ i = seekTable("CFF ");
+ if (!checkRegion(tables[i].offset, tables[i].len)) {
+ return NULL;
+ }
+ if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
+ tables[i].len))) {
+ return NULL;
+ }
+ map = ff->getCIDToGIDMap(nCIDs);
+ delete ff;
+ return map;
+}
+
+int FoFiTrueType::getEmbeddingRights() {
+ int i, fsType;
+ GBool ok;
+
+ if ((i = seekTable("OS/2")) < 0) {
+ return 4;
+ }
+ ok = gTrue;
+ fsType = getU16BE(tables[i].offset + 8, &ok);
+ if (!ok) {
+ return 4;
+ }
+ if (fsType & 0x0008) {
+ return 2;
+ }
+ if (fsType & 0x0004) {
+ return 1;
+ }
+ if (fsType & 0x0002) {
+ return 0;
+ }
+ return 3;
+}
+
+void FoFiTrueType::convertToType42(char *psName, char **encoding,
+ Gushort *codeToGID,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ GooString *buf;
+ GBool ok;
+
+ if (openTypeCFF) {
+ return;
+ }
+
+ // write the header
+ ok = gTrue;
+ buf = GooString::format("%!PS-TrueTypeFont-{0:2g}\n",
+ (double)getS32BE(0, &ok) / 65536.0);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+
+ // begin the font dictionary
+ (*outputFunc)(outputStream, "10 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, " def\n", 5);
+ (*outputFunc)(outputStream, "/FontType 42 def\n", 17);
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n",
+ bbox[0], bbox[1], bbox[2], bbox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/PaintType 0 def\n", 17);
+
+ // write the guts of the dictionary
+ cvtEncoding(encoding, outputFunc, outputStream);
+ cvtCharStrings(encoding, codeToGID, outputFunc, outputStream);
+ cvtSfnts(outputFunc, outputStream, NULL, gFalse);
+
+ // end the dictionary and define the font
+ (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
+}
+
+void FoFiTrueType::convertToType1(char *psName, char **newEncoding,
+ GBool ascii, FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ FoFiType1C *ff;
+ int i;
+
+ if (!openTypeCFF) {
+ return;
+ }
+ i = seekTable("CFF ");
+ if (!checkRegion(tables[i].offset, tables[i].len)) {
+ return;
+ }
+ if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
+ tables[i].len))) {
+ return;
+ }
+ ff->convertToType1(psName, newEncoding, ascii, outputFunc, outputStream);
+ delete ff;
+}
+
+void FoFiTrueType::convertToCIDType2(char *psName,
+ Gushort *cidMap, int nCIDs,
+ GBool needVerticalMetrics,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ GooString *buf;
+ Gushort cid;
+ GBool ok;
+ int i, j, k;
+
+ if (openTypeCFF) {
+ return;
+ }
+
+ // write the header
+ ok = gTrue;
+ buf = GooString::format("%!PS-TrueTypeFont-{0:2g}\n",
+ (double)getS32BE(0, &ok) / 65536.0);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+
+ // begin the font dictionary
+ (*outputFunc)(outputStream, "20 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/CIDFontName /", 14);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, " def\n", 5);
+ (*outputFunc)(outputStream, "/CIDFontType 2 def\n", 19);
+ (*outputFunc)(outputStream, "/FontType 42 def\n", 17);
+ (*outputFunc)(outputStream, "/CIDSystemInfo 3 dict dup begin\n", 32);
+ (*outputFunc)(outputStream, " /Registry (Adobe) def\n", 24);
+ (*outputFunc)(outputStream, " /Ordering (Identity) def\n", 27);
+ (*outputFunc)(outputStream, " /Supplement 0 def\n", 20);
+ (*outputFunc)(outputStream, " end def\n", 10);
+ (*outputFunc)(outputStream, "/GDBytes 2 def\n", 15);
+ if (cidMap) {
+ buf = GooString::format("/CIDCount {0:d} def\n", nCIDs);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ if (nCIDs > 32767) {
+ (*outputFunc)(outputStream, "/CIDMap [", 9);
+ for (i = 0; i < nCIDs; i += 32768 - 16) {
+ (*outputFunc)(outputStream, "<\n", 2);
+ for (j = 0; j < 32768 - 16 && i+j < nCIDs; j += 16) {
+ (*outputFunc)(outputStream, " ", 2);
+ for (k = 0; k < 16 && i+j+k < nCIDs; ++k) {
+ cid = cidMap[i+j+k];
+ buf = GooString::format("{0:02x}{1:02x}",
+ (cid >> 8) & 0xff, cid & 0xff);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+ (*outputFunc)(outputStream, " >", 3);
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ (*outputFunc)(outputStream, "] def\n", 6);
+ } else {
+ (*outputFunc)(outputStream, "/CIDMap <\n", 10);
+ for (i = 0; i < nCIDs; i += 16) {
+ (*outputFunc)(outputStream, " ", 2);
+ for (j = 0; j < 16 && i+j < nCIDs; ++j) {
+ cid = cidMap[i+j];
+ buf = GooString::format("{0:02x}{1:02x}",
+ (cid >> 8) & 0xff, cid & 0xff);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+ (*outputFunc)(outputStream, "> def\n", 6);
+ }
+ } else {
+ // direct mapping - just fill the string(s) with s[i]=i
+ buf = GooString::format("/CIDCount {0:d} def\n", nGlyphs);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ if (nGlyphs > 32767) {
+ (*outputFunc)(outputStream, "/CIDMap [\n", 10);
+ for (i = 0; i < nGlyphs; i += 32767) {
+ j = nGlyphs - i < 32767 ? nGlyphs - i : 32767;
+ buf = GooString::format(" {0:d} string 0 1 {1:d} {{\n", 2 * j, j - 1);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format(" 2 copy dup 2 mul exch {0:d} add -8 bitshift put\n",
+ i);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format(" 1 index exch dup 2 mul 1 add exch {0:d} add"
+ " 255 and put\n", i);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, " } for\n", 8);
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ } else {
+ buf = GooString::format("/CIDMap {0:d} string\n", 2 * nGlyphs);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format(" 0 1 {0:d} {{\n", nGlyphs - 1);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream,
+ " 2 copy dup 2 mul exch -8 bitshift put\n", 42);
+ (*outputFunc)(outputStream,
+ " 1 index exch dup 2 mul 1 add exch 255 and put\n", 50);
+ (*outputFunc)(outputStream, " } for\n", 8);
+ (*outputFunc)(outputStream, "def\n", 4);
+ }
+ }
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n",
+ bbox[0], bbox[1], bbox[2], bbox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/PaintType 0 def\n", 17);
+ (*outputFunc)(outputStream, "/Encoding [] readonly def\n", 26);
+ (*outputFunc)(outputStream, "/CharStrings 1 dict dup begin\n", 30);
+ (*outputFunc)(outputStream, " /.notdef 0 def\n", 17);
+ (*outputFunc)(outputStream, " end readonly def\n", 19);
+
+ // write the guts of the dictionary
+ cvtSfnts(outputFunc, outputStream, NULL, needVerticalMetrics);
+
+ // end the dictionary and define the font
+ (*outputFunc)(outputStream,
+ "CIDFontName currentdict end /CIDFont defineresource pop\n",
+ 56);
+}
+
+void FoFiTrueType::convertToCIDType0(char *psName,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ FoFiType1C *ff;
+ int i;
+
+ if (!openTypeCFF) {
+ return;
+ }
+ i = seekTable("CFF ");
+ if (!checkRegion(tables[i].offset, tables[i].len)) {
+ return;
+ }
+ if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
+ tables[i].len))) {
+ return;
+ }
+ ff->convertToCIDType0(psName, outputFunc, outputStream);
+ delete ff;
+}
+
+void FoFiTrueType::convertToType0(char *psName, Gushort *cidMap, int nCIDs,
+ GBool needVerticalMetrics,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ GooString *buf;
+ GooString *sfntsName;
+ int n, i, j;
+
+ if (openTypeCFF) {
+ return;
+ }
+
+ // write the Type 42 sfnts array
+ sfntsName = (new GooString(psName))->append("_sfnts");
+ cvtSfnts(outputFunc, outputStream, sfntsName, needVerticalMetrics);
+ delete sfntsName;
+
+ // write the descendant Type 42 fonts
+ n = cidMap ? nCIDs : nGlyphs;
+ for (i = 0; i < n; i += 256) {
+ (*outputFunc)(outputStream, "10 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ buf = GooString::format("_{0:02x} def\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FontType 42 def\n", 17);
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n",
+ bbox[0], bbox[1], bbox[2], bbox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/PaintType 0 def\n", 17);
+ (*outputFunc)(outputStream, "/sfnts ", 7);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, "_sfnts def\n", 11);
+ (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
+ for (j = 0; j < 256 && i+j < n; ++j) {
+ buf = GooString::format("dup {0:d} /c{1:02x} put\n", j, j);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "readonly def\n", 13);
+ (*outputFunc)(outputStream, "/CharStrings 257 dict dup begin\n", 32);
+ (*outputFunc)(outputStream, "/.notdef 0 def\n", 15);
+ for (j = 0; j < 256 && i+j < n; ++j) {
+ buf = GooString::format("/c{0:02x} {1:d} def\n",
+ j, cidMap ? cidMap[i+j] : i+j);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "end readonly def\n", 17);
+ (*outputFunc)(outputStream,
+ "FontName currentdict end definefont pop\n", 40);
+ }
+
+ // write the Type 0 parent font
+ (*outputFunc)(outputStream, "16 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, " def\n", 5);
+ (*outputFunc)(outputStream, "/FontType 0 def\n", 16);
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ (*outputFunc)(outputStream, "/FMapType 2 def\n", 16);
+ (*outputFunc)(outputStream, "/Encoding [\n", 12);
+ for (i = 0; i < n; i += 256) {
+ buf = GooString::format("{0:d}\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ (*outputFunc)(outputStream, "/FDepVector [\n", 14);
+ for (i = 0; i < n; i += 256) {
+ (*outputFunc)(outputStream, "/", 1);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ buf = GooString::format("_{0:02x} findfont\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
+}
+
+void FoFiTrueType::convertToType0(char *psName,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ FoFiType1C *ff;
+ int i;
+
+ if (!openTypeCFF) {
+ return;
+ }
+ i = seekTable("CFF ");
+ if (!checkRegion(tables[i].offset, tables[i].len)) {
+ return;
+ }
+ if (!(ff = FoFiType1C::make((char *)file + tables[i].offset,
+ tables[i].len))) {
+ return;
+ }
+ ff->convertToType0(psName, outputFunc, outputStream);
+ delete ff;
+}
+
+void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc,
+ void *outputStream, char *name,
+ Gushort *codeToGID) {
+ // this substitute cmap table maps char codes 0000-ffff directly to
+ // glyphs 0000-ffff
+ static char cmapTab[36] = {
+ 0, 0, // table version number
+ 0, 1, // number of encoding tables
+ 0, 1, // platform ID
+ 0, 0, // encoding ID
+ 0, 0, 0, 12, // offset of subtable
+ 0, 4, // subtable format
+ 0, 24, // subtable length
+ 0, 0, // subtable version
+ 0, 2, // segment count * 2
+ 0, 2, // 2 * 2 ^ floor(log2(segCount))
+ 0, 0, // floor(log2(segCount))
+ 0, 0, // 2*segCount - 2*2^floor(log2(segCount))
+ (char)0xff, (char)0xff, // endCount[0]
+ 0, 0, // reserved
+ 0, 0, // startCount[0]
+ 0, 0, // idDelta[0]
+ 0, 0 // pad to a mulitple of four bytes
+ };
+ static char nameTab[8] = {
+ 0, 0, // format
+ 0, 0, // number of name records
+ 0, 6, // offset to start of string storage
+ 0, 0 // pad to multiple of four bytes
+ };
+ static char postTab[32] = {
+ 0, 1, 0, 0, // format
+ 0, 0, 0, 0, // italic angle
+ 0, 0, // underline position
+ 0, 0, // underline thickness
+ 0, 0, 0, 0, // fixed pitch
+ 0, 0, 0, 0, // min Type 42 memory
+ 0, 0, 0, 0, // max Type 42 memory
+ 0, 0, 0, 0, // min Type 1 memory
+ 0, 0, 0, 0 // max Type 1 memory
+ };
+ static char os2Tab[86] = {
+ 0, 1, // version
+ 0, 1, // xAvgCharWidth
+ 0, 0, // usWeightClass
+ 0, 0, // usWidthClass
+ 0, 0, // fsType
+ 0, 0, // ySubscriptXSize
+ 0, 0, // ySubscriptYSize
+ 0, 0, // ySubscriptXOffset
+ 0, 0, // ySubscriptYOffset
+ 0, 0, // ySuperscriptXSize
+ 0, 0, // ySuperscriptYSize
+ 0, 0, // ySuperscriptXOffset
+ 0, 0, // ySuperscriptYOffset
+ 0, 0, // yStrikeoutSize
+ 0, 0, // yStrikeoutPosition
+ 0, 0, // sFamilyClass
+ 0, 0, 0, 0, 0, // panose
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, // ulUnicodeRange1
+ 0, 0, 0, 0, // ulUnicodeRange2
+ 0, 0, 0, 0, // ulUnicodeRange3
+ 0, 0, 0, 0, // ulUnicodeRange4
+ 0, 0, 0, 0, // achVendID
+ 0, 0, // fsSelection
+ 0, 0, // usFirstCharIndex
+ 0, 0, // usLastCharIndex
+ 0, 0, // sTypoAscender
+ 0, 0, // sTypoDescender
+ 0, 0, // sTypoLineGap
+ 0, 0, // usWinAscent
+ 0, 0, // usWinDescent
+ 0, 0, 0, 0, // ulCodePageRange1
+ 0, 0, 0, 0 // ulCodePageRange2
+ };
+ GBool missingCmap, missingName, missingPost, missingOS2;
+ GBool unsortedLoca, badCmapLen, abbrevHMTX;
+ int nZeroLengthTables;
+ int nHMetrics, advWidth, lsb;
+ TrueTypeLoca *locaTable;
+ TrueTypeTable *newTables;
+ char *newNameTab, *newCmapTab, *newHHEATab, *newHMTXTab;
+ int nNewTables, cmapIdx, cmapLen, glyfLen, newNameLen, newCmapLen, next;
+ int newHHEALen, newHMTXLen;
+ Guint locaChecksum, glyfChecksum, fileChecksum;
+ char *tableDir;
+ char locaBuf[4], checksumBuf[4];
+ GBool ok;
+ Guint t;
+ int pos, i, j, k, n;
+
+ if (openTypeCFF) {
+ return;
+ }
+
+ if (tables == NULL) {
+ return;
+ }
+
+ // check for missing tables
+ // (Note: if the OS/2 table is missing, the Microsoft PCL5 driver
+ // will embed a PCL TrueType font with the pitch field set to zero,
+ // which apparently causes divide-by-zero errors. As far as I can
+ // tell, the only important field in the OS/2 table is
+ // xAvgCharWidth.)
+ missingCmap = (cmapIdx = seekTable("cmap")) < 0;
+ missingName = seekTable("name") < 0;
+ missingPost = seekTable("post") < 0;
+ missingOS2 = seekTable("OS/2") < 0;
+
+ // read the loca table, check to see if it's sorted
+ locaTable = (TrueTypeLoca *)gmallocn(nGlyphs + 1, sizeof(TrueTypeLoca));
+ unsortedLoca = gFalse;
+ i = seekTable("loca");
+ pos = tables[i].offset;
+ ok = gTrue;
+ for (i = 0; i <= nGlyphs; ++i) {
+ if (locaFmt) {
+ locaTable[i].origOffset = (int)getU32BE(pos + i*4, &ok);
+ } else {
+ locaTable[i].origOffset = 2 * getU16BE(pos + i*2, &ok);
+ }
+ if (i > 0 && locaTable[i].origOffset < locaTable[i-1].origOffset) {
+ unsortedLoca = gTrue;
+ }
+ // glyph descriptions must be at least 12 bytes long (nContours,
+ // xMin, yMin, xMax, yMax, instructionLength - two bytes each);
+ // invalid glyph descriptions (even if they're never used) make
+ // Windows choke, so we work around that problem here (ideally,
+ // this would parse the glyph descriptions in the glyf table and
+ // remove any that were invalid, but this quick test is a decent
+ // start)
+ if (i > 0 &&
+ locaTable[i].origOffset - locaTable[i-1].origOffset > 0 &&
+ locaTable[i].origOffset - locaTable[i-1].origOffset < 12) {
+ locaTable[i-1].origOffset = locaTable[i].origOffset;
+ unsortedLoca = gTrue;
+ }
+ locaTable[i].idx = i;
+ }
+
+ // check for zero-length tables
+ nZeroLengthTables = 0;
+ for (i = 0; i < nTables; ++i) {
+ if (tables[i].len == 0) {
+ ++nZeroLengthTables;
+ }
+ }
+
+ // check for an incorrect cmap table length
+ badCmapLen = gFalse;
+ cmapLen = 0; // make gcc happy
+ if (!missingCmap) {
+ if (nCmaps > 0) {
+ cmapLen = cmaps[0].offset + cmaps[0].len;
+ for (i = 1; i < nCmaps; ++i) {
+ if (cmaps[i].offset + cmaps[i].len > cmapLen) {
+ cmapLen = cmaps[i].offset + cmaps[i].len;
+ }
+ }
+ }
+ cmapLen -= tables[cmapIdx].offset;
+ if (cmapLen > tables[cmapIdx].len) {
+ badCmapLen = gTrue;
+ }
+ }
+
+ // check for an abbreviated hmtx table (this is completely legal,
+ // but confuses the Microsoft PCL5 printer driver, which generates
+ // embedded fonts with the pitch field set to zero)
+ i = seekTable("hhea");
+ nHMetrics = getU16BE(tables[i].offset + 34, &ok);
+ abbrevHMTX = nHMetrics < nGlyphs;
+
+ // if nothing is broken, just write the TTF file as is
+ if (!missingCmap && !missingName && !missingPost && !missingOS2 &&
+ !unsortedLoca && !badCmapLen && !abbrevHMTX && nZeroLengthTables == 0 &&
+ !name && !codeToGID) {
+ (*outputFunc)(outputStream, (char *)file, len);
+ goto done1;
+ }
+
+ // sort the 'loca' table: some (non-compliant) fonts have
+ // out-of-order loca tables; in order to correctly handle the case
+ // where (compliant) fonts have empty entries in the middle of the
+ // table, cmpTrueTypeLocaOffset uses offset as its primary sort key,
+ // and idx as its secondary key (ensuring that adjacent entries with
+ // the same pos value remain in the same order)
+ glyfLen = 0; // make gcc happy
+ if (unsortedLoca) {
+ qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca),
+ &cmpTrueTypeLocaOffset);
+ for (i = 0; i < nGlyphs; ++i) {
+ locaTable[i].len = locaTable[i+1].origOffset - locaTable[i].origOffset;
+ }
+ locaTable[nGlyphs].len = 0;
+ qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca),
+ &cmpTrueTypeLocaIdx);
+ pos = 0;
+ for (i = 0; i <= nGlyphs; ++i) {
+ locaTable[i].newOffset = pos;
+ pos += locaTable[i].len;
+ if (pos & 3) {
+ pos += 4 - (pos & 3);
+ }
+ }
+ glyfLen = pos;
+ }
+
+ // compute checksums for the loca and glyf tables
+ locaChecksum = glyfChecksum = 0;
+ if (unsortedLoca) {
+ if (locaFmt) {
+ for (j = 0; j <= nGlyphs; ++j) {
+ locaChecksum += locaTable[j].newOffset;
+ }
+ } else {
+ for (j = 0; j <= nGlyphs; j += 2) {
+ locaChecksum += locaTable[j].newOffset << 16;
+ if (j + 1 <= nGlyphs) {
+ locaChecksum += locaTable[j+1].newOffset;
+ }
+ }
+ }
+ pos = tables[seekTable("glyf")].offset;
+ for (j = 0; j < nGlyphs; ++j) {
+ n = locaTable[j].len;
+ if (n > 0) {
+ k = locaTable[j].origOffset;
+ if (checkRegion(pos + k, n)) {
+ glyfChecksum += computeTableChecksum(file + pos + k, n);
+ }
+ }
+ }
+ }
+
+ // construct the new name table
+ if (name) {
+ n = strlen(name);
+ newNameLen = (6 + 4*12 + 2 * (3*n + 7) + 3) & ~3;
+ newNameTab = (char *)gmalloc(newNameLen);
+ memset(newNameTab, 0, newNameLen);
+ newNameTab[0] = 0; // format selector
+ newNameTab[1] = 0;
+ newNameTab[2] = 0; // number of name records
+ newNameTab[3] = 4;
+ newNameTab[4] = 0; // offset to start of string storage
+ newNameTab[5] = 6 + 4*12;
+ next = 0;
+ for (i = 0; i < 4; ++i) {
+ newNameTab[6 + i*12 + 0] = 0; // platform ID = Microsoft
+ newNameTab[6 + i*12 + 1] = 3;
+ newNameTab[6 + i*12 + 2] = 0; // encoding ID = Unicode
+ newNameTab[6 + i*12 + 3] = 1;
+ newNameTab[6 + i*12 + 4] = 0x04; // language ID = American English
+ newNameTab[6 + i*12 + 5] = 0x09;
+ newNameTab[6 + i*12 + 6] = 0; // name ID
+ newNameTab[6 + i*12 + 7] = i + 1;
+ newNameTab[6 + i*12 + 8] = i+1 == 2 ? 0 : ((2*n) >> 8); // string length
+ newNameTab[6 + i*12 + 9] = i+1 == 2 ? 14 : ((2*n) & 0xff);
+ newNameTab[6 + i*12 + 10] = next >> 8; // string offset
+ newNameTab[6 + i*12 + 11] = next & 0xff;
+ if (i+1 == 2) {
+ memcpy(newNameTab + 6 + 4*12 + next, "\0R\0e\0g\0u\0l\0a\0r", 14);
+ next += 14;
+ } else {
+ for (j = 0; j < n; ++j) {
+ newNameTab[6 + 4*12 + next + 2*j] = 0;
+ newNameTab[6 + 4*12 + next + 2*j + 1] = name[j];
+ }
+ next += 2*n;
+ }
+ }
+ } else {
+ newNameLen = 0;
+ newNameTab = NULL;
+ }
+
+ // construct the new cmap table
+ if (codeToGID) {
+ newCmapLen = 44 + 256 * 2;
+ newCmapTab = (char *)gmalloc(newCmapLen);
+ newCmapTab[0] = 0; // table version number = 0
+ newCmapTab[1] = 0;
+ newCmapTab[2] = 0; // number of encoding tables = 1
+ newCmapTab[3] = 1;
+ newCmapTab[4] = 0; // platform ID = Microsoft
+ newCmapTab[5] = 3;
+ newCmapTab[6] = 0; // encoding ID = Unicode
+ newCmapTab[7] = 1;
+ newCmapTab[8] = 0; // offset of subtable
+ newCmapTab[9] = 0;
+ newCmapTab[10] = 0;
+ newCmapTab[11] = 12;
+ newCmapTab[12] = 0; // subtable format = 4
+ newCmapTab[13] = 4;
+ newCmapTab[14] = 0x02; // subtable length
+ newCmapTab[15] = 0x20;
+ newCmapTab[16] = 0; // subtable version = 0
+ newCmapTab[17] = 0;
+ newCmapTab[18] = 0; // segment count * 2
+ newCmapTab[19] = 4;
+ newCmapTab[20] = 0; // 2 * 2 ^ floor(log2(segCount))
+ newCmapTab[21] = 4;
+ newCmapTab[22] = 0; // floor(log2(segCount))
+ newCmapTab[23] = 1;
+ newCmapTab[24] = 0; // 2*segCount - 2*2^floor(log2(segCount))
+ newCmapTab[25] = 0;
+ newCmapTab[26] = 0x00; // endCount[0]
+ newCmapTab[27] = (char)0xff;
+ newCmapTab[28] = (char)0xff; // endCount[1]
+ newCmapTab[29] = (char)0xff;
+ newCmapTab[30] = 0; // reserved
+ newCmapTab[31] = 0;
+ newCmapTab[32] = 0x00; // startCount[0]
+ newCmapTab[33] = 0x00;
+ newCmapTab[34] = (char)0xff; // startCount[1]
+ newCmapTab[35] = (char)0xff;
+ newCmapTab[36] = 0; // idDelta[0]
+ newCmapTab[37] = 0;
+ newCmapTab[38] = 0; // idDelta[1]
+ newCmapTab[39] = 1;
+ newCmapTab[40] = 0; // idRangeOffset[0]
+ newCmapTab[41] = 4;
+ newCmapTab[42] = 0; // idRangeOffset[1]
+ newCmapTab[43] = 0;
+ for (i = 0; i < 256; ++i) {
+ newCmapTab[44 + 2*i] = codeToGID[i] >> 8;
+ newCmapTab[44 + 2*i + 1] = codeToGID[i] & 0xff;
+ }
+ } else {
+ newCmapLen = 0;
+ newCmapTab = NULL;
+ }
+
+ // generate the new hmtx table and the updated hhea table
+ if (abbrevHMTX) {
+ i = seekTable("hhea");
+ pos = tables[i].offset;
+ newHHEALen = 36;
+ newHHEATab = (char *)gmalloc(newHHEALen);
+ for (i = 0; i < newHHEALen; ++i) {
+ newHHEATab[i] = getU8(pos++, &ok);
+ }
+ newHHEATab[34] = nGlyphs >> 8;
+ newHHEATab[35] = nGlyphs & 0xff;
+ i = seekTable("hmtx");
+ pos = tables[i].offset;
+ newHMTXLen = 4 * nGlyphs;
+ newHMTXTab = (char *)gmalloc(newHMTXLen);
+ advWidth = 0;
+ for (i = 0; i < nHMetrics; ++i) {
+ advWidth = getU16BE(pos, &ok);
+ lsb = getU16BE(pos + 2, &ok);
+ pos += 4;
+ newHMTXTab[4*i ] = advWidth >> 8;
+ newHMTXTab[4*i + 1] = advWidth & 0xff;
+ newHMTXTab[4*i + 2] = lsb >> 8;
+ newHMTXTab[4*i + 3] = lsb & 0xff;
+ }
+ for (; i < nGlyphs; ++i) {
+ lsb = getU16BE(pos, &ok);
+ pos += 2;
+ newHMTXTab[4*i ] = advWidth >> 8;
+ newHMTXTab[4*i + 1] = advWidth & 0xff;
+ newHMTXTab[4*i + 2] = lsb >> 8;
+ newHMTXTab[4*i + 3] = lsb & 0xff;
+ }
+ } else {
+ newHHEATab = newHMTXTab = NULL;
+ newHHEALen = newHMTXLen = 0; // make gcc happy
+ }
+
+ // construct the new table directory:
+ // - keep all original tables with non-zero length
+ // - fix the cmap table's length, if necessary
+ // - add missing tables
+ // - sort the table by tag
+ // - compute new table positions, including 4-byte alignment
+ // - (re)compute table checksums
+ nNewTables = nTables - nZeroLengthTables +
+ (missingCmap ? 1 : 0) + (missingName ? 1 : 0) +
+ (missingPost ? 1 : 0) + (missingOS2 ? 1 : 0);
+ newTables = (TrueTypeTable *)gmallocn(nNewTables, sizeof(TrueTypeTable));
+ j = 0;
+ for (i = 0; i < nTables; ++i) {
+ if (tables[i].len > 0) {
+ newTables[j] = tables[i];
+ newTables[j].origOffset = tables[i].offset;
+ if (checkRegion(tables[i].offset, newTables[i].len)) {
+ newTables[j].checksum =
+ computeTableChecksum(file + tables[i].offset, tables[i].len);
+ if (tables[i].tag == headTag) {
+ // don't include the file checksum
+ newTables[j].checksum -= getU32BE(tables[i].offset + 8, &ok);
+ }
+ }
+ if (newTables[j].tag == cmapTag && codeToGID) {
+ newTables[j].len = newCmapLen;
+ newTables[j].checksum = computeTableChecksum((Guchar *)newCmapTab,
+ newCmapLen);
+ } else if (newTables[j].tag == cmapTag && badCmapLen) {
+ newTables[j].len = cmapLen;
+ } else if (newTables[j].tag == locaTag && unsortedLoca) {
+ newTables[j].len = (nGlyphs + 1) * (locaFmt ? 4 : 2);
+ newTables[j].checksum = locaChecksum;
+ } else if (newTables[j].tag == glyfTag && unsortedLoca) {
+ newTables[j].len = glyfLen;
+ newTables[j].checksum = glyfChecksum;
+ } else if (newTables[j].tag == nameTag && name) {
+ newTables[j].len = newNameLen;
+ newTables[j].checksum = computeTableChecksum((Guchar *)newNameTab,
+ newNameLen);
+ } else if (newTables[j].tag == hheaTag && abbrevHMTX) {
+ newTables[j].len = newHHEALen;
+ newTables[j].checksum = computeTableChecksum((Guchar *)newHHEATab,
+ newHHEALen);
+ } else if (newTables[j].tag == hmtxTag && abbrevHMTX) {
+ newTables[j].len = newHMTXLen;
+ newTables[j].checksum = computeTableChecksum((Guchar *)newHMTXTab,
+ newHMTXLen);
+ }
+ ++j;
+ }
+ }
+ if (missingCmap) {
+ newTables[j].tag = cmapTag;
+ if (codeToGID) {
+ newTables[j].checksum = computeTableChecksum((Guchar *)newCmapTab,
+ newCmapLen);
+ newTables[j].len = newCmapLen;
+ } else {
+ newTables[j].checksum = computeTableChecksum((Guchar *)cmapTab,
+ sizeof(cmapTab));
+ newTables[j].len = sizeof(cmapTab);
+ }
+ ++j;
+ }
+ if (missingName) {
+ newTables[j].tag = nameTag;
+ if (name) {
+ newTables[j].checksum = computeTableChecksum((Guchar *)newNameTab,
+ newNameLen);
+ newTables[j].len = newNameLen;
+ } else {
+ newTables[j].checksum = computeTableChecksum((Guchar *)nameTab,
+ sizeof(nameTab));
+ newTables[j].len = sizeof(nameTab);
+ }
+ ++j;
+ }
+ if (missingPost) {
+ newTables[j].tag = postTag;
+ newTables[j].checksum = computeTableChecksum((Guchar *)postTab,
+ sizeof(postTab));
+ newTables[j].len = sizeof(postTab);
+ ++j;
+ }
+ if (missingOS2) {
+ newTables[j].tag = os2Tag;
+ newTables[j].checksum = computeTableChecksum((Guchar *)os2Tab,
+ sizeof(os2Tab));
+ newTables[j].len = sizeof(os2Tab);
+ ++j;
+ }
+ qsort(newTables, nNewTables, sizeof(TrueTypeTable),
+ &cmpTrueTypeTableTag);
+ pos = 12 + nNewTables * 16;
+ for (i = 0; i < nNewTables; ++i) {
+ newTables[i].offset = pos;
+ pos += newTables[i].len;
+ if (pos & 3) {
+ pos += 4 - (pos & 3);
+ }
+ }
+
+ // write the table directory
+ tableDir = (char *)gmalloc(12 + nNewTables * 16);
+ tableDir[0] = 0x00; // sfnt version
+ tableDir[1] = 0x01;
+ tableDir[2] = 0x00;
+ tableDir[3] = 0x00;
+ tableDir[4] = (char)((nNewTables >> 8) & 0xff); // numTables
+ tableDir[5] = (char)(nNewTables & 0xff);
+ for (i = -1, t = (Guint)nNewTables; t; ++i, t >>= 1) ;
+ t = 1 << (4 + i);
+ tableDir[6] = (char)((t >> 8) & 0xff); // searchRange
+ tableDir[7] = (char)(t & 0xff);
+ tableDir[8] = (char)((i >> 8) & 0xff); // entrySelector
+ tableDir[9] = (char)(i & 0xff);
+ t = nNewTables * 16 - t;
+ tableDir[10] = (char)((t >> 8) & 0xff); // rangeShift
+ tableDir[11] = (char)(t & 0xff);
+ pos = 12;
+ for (i = 0; i < nNewTables; ++i) {
+ tableDir[pos ] = (char)(newTables[i].tag >> 24);
+ tableDir[pos+ 1] = (char)(newTables[i].tag >> 16);
+ tableDir[pos+ 2] = (char)(newTables[i].tag >> 8);
+ tableDir[pos+ 3] = (char) newTables[i].tag;
+ tableDir[pos+ 4] = (char)(newTables[i].checksum >> 24);
+ tableDir[pos+ 5] = (char)(newTables[i].checksum >> 16);
+ tableDir[pos+ 6] = (char)(newTables[i].checksum >> 8);
+ tableDir[pos+ 7] = (char) newTables[i].checksum;
+ tableDir[pos+ 8] = (char)(newTables[i].offset >> 24);
+ tableDir[pos+ 9] = (char)(newTables[i].offset >> 16);
+ tableDir[pos+10] = (char)(newTables[i].offset >> 8);
+ tableDir[pos+11] = (char) newTables[i].offset;
+ tableDir[pos+12] = (char)(newTables[i].len >> 24);
+ tableDir[pos+13] = (char)(newTables[i].len >> 16);
+ tableDir[pos+14] = (char)(newTables[i].len >> 8);
+ tableDir[pos+15] = (char) newTables[i].len;
+ pos += 16;
+ }
+ (*outputFunc)(outputStream, tableDir, 12 + nNewTables * 16);
+
+ // compute the file checksum
+ fileChecksum = computeTableChecksum((Guchar *)tableDir,
+ 12 + nNewTables * 16);
+ for (i = 0; i < nNewTables; ++i) {
+ fileChecksum += newTables[i].checksum;
+ }
+ fileChecksum = 0xb1b0afba - fileChecksum;
+
+ // write the tables
+ for (i = 0; i < nNewTables; ++i) {
+ if (newTables[i].tag == headTag) {
+ if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
+ (*outputFunc)(outputStream, (char *)file + newTables[i].origOffset, 8);
+ checksumBuf[0] = fileChecksum >> 24;
+ checksumBuf[1] = fileChecksum >> 16;
+ checksumBuf[2] = fileChecksum >> 8;
+ checksumBuf[3] = fileChecksum;
+ (*outputFunc)(outputStream, checksumBuf, 4);
+ (*outputFunc)(outputStream,
+ (char *)file + newTables[i].origOffset + 12,
+ newTables[i].len - 12);
+ } else {
+ for (j = 0; j < newTables[i].len; ++j) {
+ (*outputFunc)(outputStream, "\0", 1);
+ }
+ }
+ } else if (newTables[i].tag == cmapTag && codeToGID) {
+ (*outputFunc)(outputStream, newCmapTab, newTables[i].len);
+ } else if (newTables[i].tag == cmapTag && missingCmap) {
+ (*outputFunc)(outputStream, cmapTab, newTables[i].len);
+ } else if (newTables[i].tag == nameTag && name) {
+ (*outputFunc)(outputStream, newNameTab, newTables[i].len);
+ } else if (newTables[i].tag == nameTag && missingName) {
+ (*outputFunc)(outputStream, nameTab, newTables[i].len);
+ } else if (newTables[i].tag == postTag && missingPost) {
+ (*outputFunc)(outputStream, postTab, newTables[i].len);
+ } else if (newTables[i].tag == os2Tag && missingOS2) {
+ (*outputFunc)(outputStream, os2Tab, newTables[i].len);
+ } else if (newTables[i].tag == hheaTag && abbrevHMTX) {
+ (*outputFunc)(outputStream, newHHEATab, newTables[i].len);
+ } else if (newTables[i].tag == hmtxTag && abbrevHMTX) {
+ (*outputFunc)(outputStream, newHMTXTab, newTables[i].len);
+ } else if (newTables[i].tag == locaTag && unsortedLoca) {
+ for (j = 0; j <= nGlyphs; ++j) {
+ if (locaFmt) {
+ locaBuf[0] = (char)(locaTable[j].newOffset >> 24);
+ locaBuf[1] = (char)(locaTable[j].newOffset >> 16);
+ locaBuf[2] = (char)(locaTable[j].newOffset >> 8);
+ locaBuf[3] = (char) locaTable[j].newOffset;
+ (*outputFunc)(outputStream, locaBuf, 4);
+ } else {
+ locaBuf[0] = (char)(locaTable[j].newOffset >> 9);
+ locaBuf[1] = (char)(locaTable[j].newOffset >> 1);
+ (*outputFunc)(outputStream, locaBuf, 2);
+ }
+ }
+ } else if (newTables[i].tag == glyfTag && unsortedLoca) {
+ pos = tables[seekTable("glyf")].offset;
+ for (j = 0; j < nGlyphs; ++j) {
+ n = locaTable[j].len;
+ if (n > 0) {
+ k = locaTable[j].origOffset;
+ if (checkRegion(pos + k, n)) {
+ (*outputFunc)(outputStream, (char *)file + pos + k, n);
+ } else {
+ for (k = 0; k < n; ++k) {
+ (*outputFunc)(outputStream, "\0", 1);
+ }
+ }
+ if ((k = locaTable[j].len & 3)) {
+ (*outputFunc)(outputStream, "\0\0\0\0", 4 - k);
+ }
+ }
+ }
+ } else {
+ if (checkRegion(newTables[i].origOffset, newTables[i].len)) {
+ (*outputFunc)(outputStream, (char *)file + newTables[i].origOffset,
+ newTables[i].len);
+ } else {
+ for (j = 0; j < newTables[i].len; ++j) {
+ (*outputFunc)(outputStream, "\0", 1);
+ }
+ }
+ }
+ if (newTables[i].len & 3) {
+ (*outputFunc)(outputStream, "\0\0\0", 4 - (newTables[i].len & 3));
+ }
+ }
+
+ gfree(newHMTXTab);
+ gfree(newHHEATab);
+ gfree(newCmapTab);
+ gfree(newNameTab);
+ gfree(tableDir);
+ gfree(newTables);
+ done1:
+ gfree(locaTable);
+}
+
+void FoFiTrueType::cvtEncoding(char **encoding,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ char *name;
+ GooString *buf;
+ int i;
+
+ (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
+ if (encoding) {
+ for (i = 0; i < 256; ++i) {
+ if (!(name = encoding[i])) {
+ name = ".notdef";
+ }
+ buf = GooString::format("dup {0:d} /", i);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, name, strlen(name));
+ (*outputFunc)(outputStream, " put\n", 5);
+ }
+ } else {
+ for (i = 0; i < 256; ++i) {
+ buf = GooString::format("dup {0:d} /c{1:02x} put\n", i, i);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ }
+ (*outputFunc)(outputStream, "readonly def\n", 13);
+}
+
+void FoFiTrueType::cvtCharStrings(char **encoding,
+ Gushort *codeToGID,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ char *name;
+ GooString *buf;
+ char buf2[16];
+ int i, k;
+
+ // always define '.notdef'
+ (*outputFunc)(outputStream, "/CharStrings 256 dict dup begin\n", 32);
+ (*outputFunc)(outputStream, "/.notdef 0 def\n", 15);
+
+ // if there's no 'cmap' table, punt
+ if (nCmaps == 0) {
+ goto err;
+ }
+
+ // map char name to glyph index:
+ // 1. use encoding to map name to char code
+ // 2. use codeToGID to map char code to glyph index
+ // N.B. We do this in reverse order because font subsets can have
+ // weird encodings that use the same character name twice, and
+ // the first definition is probably the one we want.
+ k = 0; // make gcc happy
+ for (i = 255; i >= 0; --i) {
+ if (encoding) {
+ name = encoding[i];
+ } else {
+ sprintf(buf2, "c%02x", i);
+ name = buf2;
+ }
+ if (name && strcmp(name, ".notdef")) {
+ k = codeToGID[i];
+ // note: Distiller (maybe Adobe's PS interpreter in general)
+ // doesn't like TrueType fonts that have CharStrings entries
+ // which point to nonexistent glyphs, hence the (k < nGlyphs)
+ // test
+ if (k > 0 && k < nGlyphs) {
+ (*outputFunc)(outputStream, "/", 1);
+ (*outputFunc)(outputStream, name, strlen(name));
+ buf = GooString::format(" {0:d} def\n", k);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ }
+ }
+
+ err:
+ (*outputFunc)(outputStream, "end readonly def\n", 17);
+}
+
+void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc,
+ void *outputStream, GooString *name,
+ GBool needVerticalMetrics) {
+ Guchar headData[54];
+ TrueTypeLoca *locaTable;
+ Guchar *locaData;
+ TrueTypeTable newTables[nT42Tables];
+ Guchar tableDir[12 + nT42Tables*16];
+ GBool ok;
+ Guint checksum;
+ int nNewTables;
+ int length, pos, glyfPos, i, j, k;
+ Guchar vheaTab[36] = {
+ 0, 1, 0, 0, // table version number
+ 0, 0, // ascent
+ 0, 0, // descent
+ 0, 0, // reserved
+ 0, 0, // max advance height
+ 0, 0, // min top side bearing
+ 0, 0, // min bottom side bearing
+ 0, 0, // y max extent
+ 0, 0, // caret slope rise
+ 0, 1, // caret slope run
+ 0, 0, // caret offset
+ 0, 0, // reserved
+ 0, 0, // reserved
+ 0, 0, // reserved
+ 0, 0, // reserved
+ 0, 0, // metric data format
+ 0, 1 // number of advance heights in vmtx table
+ };
+ Guchar *vmtxTab;
+ GBool needVhea, needVmtx;
+ int advance;
+
+ // construct the 'head' table, zero out the font checksum
+ i = seekTable("head");
+ if (i < 0 || i >= nTables) {
+ return;
+ }
+ pos = tables[i].offset;
+ if (!checkRegion(pos, 54)) {
+ return;
+ }
+ memcpy(headData, file + pos, 54);
+ headData[8] = headData[9] = headData[10] = headData[11] = (Guchar)0;
+
+ // read the original 'loca' table, pad entries out to 4 bytes, and
+ // sort it into proper order -- some (non-compliant) fonts have
+ // out-of-order loca tables; in order to correctly handle the case
+ // where (compliant) fonts have empty entries in the middle of the
+ // table, cmpTrueTypeLocaPos uses offset as its primary sort key,
+ // and idx as its secondary key (ensuring that adjacent entries with
+ // the same pos value remain in the same order)
+ locaTable = (TrueTypeLoca *)gmallocn(nGlyphs + 1, sizeof(TrueTypeLoca));
+ i = seekTable("loca");
+ pos = tables[i].offset;
+ ok = gTrue;
+ for (i = 0; i <= nGlyphs; ++i) {
+ locaTable[i].idx = i;
+ if (locaFmt) {
+ locaTable[i].origOffset = (int)getU32BE(pos + i*4, &ok);
+ } else {
+ locaTable[i].origOffset = 2 * getU16BE(pos + i*2, &ok);
+ }
+ }
+ qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca),
+ &cmpTrueTypeLocaOffset);
+ for (i = 0; i < nGlyphs; ++i) {
+ locaTable[i].len = locaTable[i+1].origOffset - locaTable[i].origOffset;
+ }
+ locaTable[nGlyphs].len = 0;
+ qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca),
+ &cmpTrueTypeLocaIdx);
+ pos = 0;
+ for (i = 0; i <= nGlyphs; ++i) {
+ locaTable[i].newOffset = pos;
+ pos += locaTable[i].len;
+ if (pos & 3) {
+ pos += 4 - (pos & 3);
+ }
+ }
+
+ // construct the new 'loca' table
+ locaData = (Guchar *)gmallocn(nGlyphs + 1, (locaFmt ? 4 : 2));
+ for (i = 0; i <= nGlyphs; ++i) {
+ pos = locaTable[i].newOffset;
+ if (locaFmt) {
+ locaData[4*i ] = (Guchar)(pos >> 24);
+ locaData[4*i+1] = (Guchar)(pos >> 16);
+ locaData[4*i+2] = (Guchar)(pos >> 8);
+ locaData[4*i+3] = (Guchar) pos;
+ } else {
+ locaData[2*i ] = (Guchar)(pos >> 9);
+ locaData[2*i+1] = (Guchar)(pos >> 1);
+ }
+ }
+
+ // count the number of tables
+ nNewTables = 0;
+ for (i = 0; i < nT42Tables; ++i) {
+ if (t42Tables[i].required ||
+ seekTable(t42Tables[i].tag) >= 0) {
+ ++nNewTables;
+ }
+ }
+ vmtxTab = NULL; // make gcc happy
+ advance = 0; // make gcc happy
+ if (needVerticalMetrics) {
+ needVhea = seekTable("vhea") < 0;
+ needVmtx = seekTable("vmtx") < 0;
+ if (needVhea || needVmtx) {
+ i = seekTable("head");
+ advance = getU16BE(tables[i].offset + 18, &ok); // units per em
+ if (needVhea) {
+ ++nNewTables;
+ }
+ if (needVmtx) {
+ ++nNewTables;
+ }
+ }
+ }
+
+ // construct the new table headers, including table checksums
+ // (pad each table out to a multiple of 4 bytes)
+ pos = 12 + nNewTables*16;
+ k = 0;
+ for (i = 0; i < nT42Tables; ++i) {
+ length = -1;
+ checksum = 0; // make gcc happy
+ if (i == t42HeadTable) {
+ length = 54;
+ checksum = computeTableChecksum(headData, 54);
+ } else if (i == t42LocaTable) {
+ length = (nGlyphs + 1) * (locaFmt ? 4 : 2);
+ checksum = computeTableChecksum(locaData, length);
+ } else if (i == t42GlyfTable) {
+ length = 0;
+ checksum = 0;
+ glyfPos = tables[seekTable("glyf")].offset;
+ for (j = 0; j < nGlyphs; ++j) {
+ length += locaTable[j].len;
+ if (length & 3) {
+ length += 4 - (length & 3);
+ }
+ if (checkRegion(glyfPos + locaTable[j].origOffset, locaTable[j].len)) {
+ checksum +=
+ computeTableChecksum(file + glyfPos + locaTable[j].origOffset,
+ locaTable[j].len);
+ }
+ }
+ } else {
+ if ((j = seekTable(t42Tables[i].tag)) >= 0) {
+ length = tables[j].len;
+ if (checkRegion(tables[j].offset, length)) {
+ checksum = computeTableChecksum(file + tables[j].offset, length);
+ }
+ } else if (needVerticalMetrics && i == t42VheaTable) {
+ vheaTab[10] = advance / 256; // max advance height
+ vheaTab[11] = advance % 256;
+ length = sizeof(vheaTab);
+ checksum = computeTableChecksum(vheaTab, length);
+ } else if (needVerticalMetrics && i == t42VmtxTable) {
+ length = 4 + (nGlyphs - 1) * 4;
+ vmtxTab = (Guchar *)gmalloc(length);
+ vmtxTab[0] = advance / 256;
+ vmtxTab[1] = advance % 256;
+ for (j = 2; j < length; j += 2) {
+ vmtxTab[j] = 0;
+ vmtxTab[j+1] = 0;
+ }
+ checksum = computeTableChecksum(vmtxTab, length);
+ } else if (t42Tables[i].required) {
+ //~ error(-1, "Embedded TrueType font is missing a required table ('%s')",
+ //~ t42Tables[i].tag);
+ length = 0;
+ checksum = 0;
+ }
+ }
+ if (length >= 0) {
+ newTables[k].tag = ((t42Tables[i].tag[0] & 0xff) << 24) |
+ ((t42Tables[i].tag[1] & 0xff) << 16) |
+ ((t42Tables[i].tag[2] & 0xff) << 8) |
+ (t42Tables[i].tag[3] & 0xff);
+ newTables[k].checksum = checksum;
+ newTables[k].offset = pos;
+ newTables[k].len = length;
+ pos += length;
+ if (pos & 3) {
+ pos += 4 - (length & 3);
+ }
+ ++k;
+ }
+ }
+
+ // construct the table directory
+ tableDir[0] = 0x00; // sfnt version
+ tableDir[1] = 0x01;
+ tableDir[2] = 0x00;
+ tableDir[3] = 0x00;
+ tableDir[4] = 0; // numTables
+ tableDir[5] = nNewTables;
+ tableDir[6] = 0; // searchRange
+ tableDir[7] = (Guchar)128;
+ tableDir[8] = 0; // entrySelector
+ tableDir[9] = 3;
+ tableDir[10] = 0; // rangeShift
+ tableDir[11] = (Guchar)(16 * nNewTables - 128);
+ pos = 12;
+ for (i = 0; i < nNewTables; ++i) {
+ tableDir[pos ] = (Guchar)(newTables[i].tag >> 24);
+ tableDir[pos+ 1] = (Guchar)(newTables[i].tag >> 16);
+ tableDir[pos+ 2] = (Guchar)(newTables[i].tag >> 8);
+ tableDir[pos+ 3] = (Guchar) newTables[i].tag;
+ tableDir[pos+ 4] = (Guchar)(newTables[i].checksum >> 24);
+ tableDir[pos+ 5] = (Guchar)(newTables[i].checksum >> 16);
+ tableDir[pos+ 6] = (Guchar)(newTables[i].checksum >> 8);
+ tableDir[pos+ 7] = (Guchar) newTables[i].checksum;
+ tableDir[pos+ 8] = (Guchar)(newTables[i].offset >> 24);
+ tableDir[pos+ 9] = (Guchar)(newTables[i].offset >> 16);
+ tableDir[pos+10] = (Guchar)(newTables[i].offset >> 8);
+ tableDir[pos+11] = (Guchar) newTables[i].offset;
+ tableDir[pos+12] = (Guchar)(newTables[i].len >> 24);
+ tableDir[pos+13] = (Guchar)(newTables[i].len >> 16);
+ tableDir[pos+14] = (Guchar)(newTables[i].len >> 8);
+ tableDir[pos+15] = (Guchar) newTables[i].len;
+ pos += 16;
+ }
+
+ // compute the font checksum and store it in the head table
+ checksum = computeTableChecksum(tableDir, 12 + nNewTables*16);
+ for (i = 0; i < nNewTables; ++i) {
+ checksum += newTables[i].checksum;
+ }
+ checksum = 0xb1b0afba - checksum; // because the TrueType spec says so
+ headData[ 8] = (Guchar)(checksum >> 24);
+ headData[ 9] = (Guchar)(checksum >> 16);
+ headData[10] = (Guchar)(checksum >> 8);
+ headData[11] = (Guchar) checksum;
+
+ // start the sfnts array
+ if (name) {
+ (*outputFunc)(outputStream, "/", 1);
+ (*outputFunc)(outputStream, name->getCString(), name->getLength());
+ (*outputFunc)(outputStream, " [\n", 3);
+ } else {
+ (*outputFunc)(outputStream, "/sfnts [\n", 9);
+ }
+
+ // write the table directory
+ dumpString(tableDir, 12 + nNewTables*16, outputFunc, outputStream);
+
+ // write the tables
+ for (i = 0; i < nNewTables; ++i) {
+ if (i == t42HeadTable) {
+ dumpString(headData, 54, outputFunc, outputStream);
+ } else if (i == t42LocaTable) {
+ length = (nGlyphs + 1) * (locaFmt ? 4 : 2);
+ dumpString(locaData, length, outputFunc, outputStream);
+ } else if (i == t42GlyfTable) {
+ glyfPos = tables[seekTable("glyf")].offset;
+ for (j = 0; j < nGlyphs; ++j) {
+ if (locaTable[j].len > 0 &&
+ checkRegion(glyfPos + locaTable[j].origOffset, locaTable[j].len)) {
+ dumpString(file + glyfPos + locaTable[j].origOffset,
+ locaTable[j].len, outputFunc, outputStream);
+ }
+ }
+ } else {
+ // length == 0 means the table is missing and the error was
+ // already reported during the construction of the table
+ // headers
+ if ((length = newTables[i].len) > 0) {
+ if ((j = seekTable(t42Tables[i].tag)) >= 0 &&
+ checkRegion(tables[j].offset, tables[j].len)) {
+ dumpString(file + tables[j].offset, tables[j].len,
+ outputFunc, outputStream);
+ } else if (needVerticalMetrics && i == t42VheaTable) {
+ dumpString(vheaTab, length, outputFunc, outputStream);
+ } else if (needVerticalMetrics && i == t42VmtxTable) {
+ dumpString(vmtxTab, length, outputFunc, outputStream);
+ gfree(vmtxTab);
+ }
+ }
+ }
+ }
+
+ // end the sfnts array
+ (*outputFunc)(outputStream, "] def\n", 6);
+
+ gfree(locaData);
+ gfree(locaTable);
+}
+
+void FoFiTrueType::dumpString(Guchar *s, int length,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ GooString *buf;
+ int pad, i, j;
+
+ (*outputFunc)(outputStream, "<", 1);
+ for (i = 0; i < length; i += 32) {
+ for (j = 0; j < 32 && i+j < length; ++j) {
+ buf = GooString::format("{0:02x}", s[i+j] & 0xff);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (i % (65536 - 32) == 65536 - 64) {
+ (*outputFunc)(outputStream, ">\n<", 3);
+ } else if (i+32 < length) {
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+ }
+ if (length & 3) {
+ pad = 4 - (length & 3);
+ for (i = 0; i < pad; ++i) {
+ (*outputFunc)(outputStream, "00", 2);
+ }
+ }
+ // add an extra zero byte because the Adobe Type 42 spec says so
+ (*outputFunc)(outputStream, "00>\n", 4);
+}
+
+Guint FoFiTrueType::computeTableChecksum(Guchar *data, int length) {
+ Guint checksum, word;
+ int i;
+
+ checksum = 0;
+ for (i = 0; i+3 < length; i += 4) {
+ word = ((data[i ] & 0xff) << 24) +
+ ((data[i+1] & 0xff) << 16) +
+ ((data[i+2] & 0xff) << 8) +
+ (data[i+3] & 0xff);
+ checksum += word;
+ }
+ if (length & 3) {
+ word = 0;
+ i = length & ~3;
+ switch (length & 3) {
+ case 3:
+ word |= (data[i+2] & 0xff) << 8;
+ case 2:
+ word |= (data[i+1] & 0xff) << 16;
+ case 1:
+ word |= (data[i ] & 0xff) << 24;
+ break;
+ }
+ checksum += word;
+ }
+ return checksum;
+}
+
+void FoFiTrueType::parse() {
+ Guint topTag;
+ int pos, ver, i, j;
+
+ parsedOk = gTrue;
+
+ // look for a collection (TTC)
+ topTag = getU32BE(0, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if (topTag == ttcfTag) {
+ /* TTC font */
+ int dircount;
+
+ dircount = getU32BE(8, &parsedOk);
+ if (!parsedOk)
+ return;
+ if (! dircount) {
+ parsedOk = gFalse;
+ return;
+ }
+
+ if (faceIndex >= dircount)
+ faceIndex = 0;
+ pos = getU32BE(12 + faceIndex * 4, &parsedOk);
+ if (! parsedOk)
+ return;
+ } else {
+ pos = 0;
+ }
+
+ // check the sfnt version
+ ver = getU32BE(pos, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ openTypeCFF = ver == 0x4f54544f; // 'OTTO'
+
+ // read the table directory
+ nTables = getU16BE(pos + 4, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ tables = (TrueTypeTable *)gmallocn(nTables, sizeof(TrueTypeTable));
+ pos += 12;
+ int wrongTables = 0;
+ for (i = 0; i < nTables; ++i) {
+ tables[i].tag = getU32BE(pos, &parsedOk);
+ tables[i].checksum = getU32BE(pos + 4, &parsedOk);
+ tables[i].offset = (int)getU32BE(pos + 8, &parsedOk);
+ tables[i].len = (int)getU32BE(pos + 12, &parsedOk);
+ if (tables[i].offset + tables[i].len < tables[i].offset ||
+ tables[i].offset + tables[i].len > len) {
+ i--;
+ wrongTables++;
+ error(-1, "Found a bad table definition on true type definition, trying to continue...");
+ }
+ pos += 16;
+ }
+ nTables -= wrongTables;
+ tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable));
+ if (!parsedOk || tables == NULL) {
+ return;
+ }
+
+ // check for tables that are required by both the TrueType spec and
+ // the Type 42 spec
+ if (seekTable("head") < 0 ||
+ seekTable("hhea") < 0 ||
+ seekTable("maxp") < 0 ||
+ seekTable("hmtx") < 0 ||
+ (!openTypeCFF && seekTable("loca") < 0) ||
+ (!openTypeCFF && seekTable("glyf") < 0) ||
+ (openTypeCFF && seekTable("CFF ") < 0)) {
+ parsedOk = gFalse;
+ return;
+ }
+
+ // read the cmaps
+ if ((i = seekTable("cmap")) >= 0) {
+ pos = tables[i].offset + 2;
+ nCmaps = getU16BE(pos, &parsedOk);
+ pos += 2;
+ if (!parsedOk) {
+ return;
+ }
+ cmaps = (TrueTypeCmap *)gmallocn(nCmaps, sizeof(TrueTypeCmap));
+ for (j = 0; j < nCmaps; ++j) {
+ cmaps[j].platform = getU16BE(pos, &parsedOk);
+ cmaps[j].encoding = getU16BE(pos + 2, &parsedOk);
+ cmaps[j].offset = tables[i].offset + getU32BE(pos + 4, &parsedOk);
+ pos += 8;
+ cmaps[j].fmt = getU16BE(cmaps[j].offset, &parsedOk);
+ cmaps[j].len = getU16BE(cmaps[j].offset + 2, &parsedOk);
+ }
+ if (!parsedOk) {
+ return;
+ }
+ } else {
+ nCmaps = 0;
+ }
+
+ // get the number of glyphs from the maxp table
+ i = seekTable("maxp");
+ nGlyphs = getU16BE(tables[i].offset + 4, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+
+ // get the bbox and loca table format from the head table
+ i = seekTable("head");
+ bbox[0] = getS16BE(tables[i].offset + 36, &parsedOk);
+ bbox[1] = getS16BE(tables[i].offset + 38, &parsedOk);
+ bbox[2] = getS16BE(tables[i].offset + 40, &parsedOk);
+ bbox[3] = getS16BE(tables[i].offset + 42, &parsedOk);
+ locaFmt = getS16BE(tables[i].offset + 50, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+
+ // make sure the loca table is sane (correct length and entries are
+ // in bounds)
+ if (!openTypeCFF) {
+ i = seekTable("loca");
+ if (tables[i].len < 0) {
+ parsedOk = gFalse;
+ return;
+ }
+ if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) {
+ nGlyphs = tables[i].len / (locaFmt ? 4 : 2) - 1;
+ }
+ for (j = 0; j <= nGlyphs; ++j) {
+ if (locaFmt) {
+ pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk);
+ } else {
+ pos = getU16BE(tables[i].offset + j*2, &parsedOk);
+ }
+ if (pos < 0 || pos > len) {
+ parsedOk = gFalse;
+ }
+ }
+ if (!parsedOk) {
+ return;
+ }
+ }
+
+ // read the post table
+ readPostTable();
+}
+
+void FoFiTrueType::readPostTable() {
+ GooString *name;
+ int tablePos, postFmt, stringIdx, stringPos;
+ GBool ok;
+ int i, j, n, m;
+
+ ok = gTrue;
+ if ((i = seekTable("post")) < 0) {
+ return;
+ }
+ tablePos = tables[i].offset;
+ postFmt = getU32BE(tablePos, &ok);
+ if (!ok) {
+ goto err;
+ }
+ if (postFmt == 0x00010000) {
+ nameToGID = new GooHash(gTrue);
+ for (i = 0; i < 258; ++i) {
+ nameToGID->add(new GooString(macGlyphNames[i]), i);
+ }
+ } else if (postFmt == 0x00020000) {
+ nameToGID = new GooHash(gTrue);
+ n = getU16BE(tablePos + 32, &ok);
+ if (!ok) {
+ goto err;
+ }
+ if (n > nGlyphs) {
+ n = nGlyphs;
+ }
+ stringIdx = 0;
+ stringPos = tablePos + 34 + 2*n;
+ for (i = 0; i < n; ++i) {
+ j = getU16BE(tablePos + 34 + 2*i, &ok);
+ if (j < 258) {
+ nameToGID->removeInt(macGlyphNames[j]);
+ nameToGID->add(new GooString(macGlyphNames[j]), i);
+ } else {
+ j -= 258;
+ if (j != stringIdx) {
+ for (stringIdx = 0, stringPos = tablePos + 34 + 2*n;
+ stringIdx < j;
+ ++stringIdx, stringPos += 1 + getU8(stringPos, &ok)) ;
+ if (!ok) {
+ goto err;
+ }
+ }
+ m = getU8(stringPos, &ok);
+ if (!ok || !checkRegion(stringPos + 1, m)) {
+ goto err;
+ }
+ name = new GooString((char *)&file[stringPos + 1], m);
+ nameToGID->removeInt(name);
+ nameToGID->add(name, i);
+ ++stringIdx;
+ stringPos += 1 + m;
+ }
+ }
+ } else if (postFmt == 0x00028000) {
+ nameToGID = new GooHash(gTrue);
+ for (i = 0; i < nGlyphs; ++i) {
+ j = getU8(tablePos + 32 + i, &ok);
+ if (!ok) {
+ goto err;
+ }
+ if (j < 258) {
+ nameToGID->removeInt(macGlyphNames[j]);
+ nameToGID->add(new GooString(macGlyphNames[j]), i);
+ }
+ }
+ }
+
+ return;
+
+ err:
+ if (nameToGID) {
+ delete nameToGID;
+ nameToGID = NULL;
+ }
+}
+
+int FoFiTrueType::seekTable(char *tag) {
+ Guint tagI;
+ int i;
+
+ tagI = ((tag[0] & 0xff) << 24) |
+ ((tag[1] & 0xff) << 16) |
+ ((tag[2] & 0xff) << 8) |
+ (tag[3] & 0xff);
+ for (i = 0; i < nTables; ++i) {
+ if (tables[i].tag == tagI) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+Guint FoFiTrueType::charToTag(const char *tagName)
+{
+ int n = strlen(tagName);
+ Guint tag = 0;
+ int i;
+
+ if (n > 4) n = 4;
+ for (i = 0;i < n;i++) {
+ tag <<= 8;
+ tag |= tagName[i] & 0xff;
+ }
+ for (;i < 4;i++) {
+ tag <<= 8;
+ tag |= ' ';
+ }
+ return tag;
+}
+
+/*
+ setup GSUB table data
+ Only supporting vertical text substitution.
+*/
+int FoFiTrueType::setupGSUB(const char *tagName)
+{
+ Guint gsubTable;
+ unsigned int i;
+ Guint scriptList, featureList;
+ Guint scriptCount;
+ Guint tag;
+ Guint scriptTable = 0;
+ Guint langSys;
+ Guint featureCount;
+ Guint featureIndex;
+ Guint ftable = 0;
+ Guint llist;
+ Guint scriptTag;
+ int x;
+ Guint pos;
+
+ if (tagName == 0) {
+ gsubFeatureTable = 0;
+ return 0;
+ }
+ scriptTag = charToTag(tagName);
+ /* read GSUB Header */
+ if ((x = seekTable("GSUB")) < 0) {
+ return 0; /* GSUB table not found */
+ }
+ gsubTable = tables[x].offset;
+ pos = gsubTable+4;
+ scriptList = getU16BE(pos,&parsedOk);
+ pos += 2;
+ featureList = getU16BE(pos,&parsedOk);
+ pos += 2;
+ llist = getU16BE(pos,&parsedOk);
+
+ gsubLookupList = llist+gsubTable; /* change to offset from top of file */
+ /* read script list table */
+ pos = gsubTable+scriptList;
+ scriptCount = getU16BE(pos,&parsedOk);
+ pos += 2;
+ /* find script */
+ for (i = 0;i < scriptCount;i++) {
+ tag = getU32BE(pos,&parsedOk);
+ pos += 4;
+ scriptTable = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if (tag == scriptTag) {
+ /* found */
+ break;
+ }
+ }
+ if (i >= scriptCount) {
+ /* not found */
+ return 0;
+ }
+
+ /* read script table */
+ /* use default language system */
+ pos = gsubTable+scriptList+scriptTable;
+ langSys = getU16BE(pos,&parsedOk);/* default language system */
+
+ /* read LangSys table */
+ if (langSys == 0) {
+ /* no ldefault LangSys */
+ return 0;
+ }
+
+ pos = gsubTable+scriptList+scriptTable+langSys+2;
+ featureIndex = getU16BE(pos,&parsedOk); /* ReqFeatureIndex */
+ pos += 2;
+
+ if (featureIndex != 0xffff) {
+ Guint tpos;
+ /* read feature record */
+ tpos = gsubTable+featureList;
+ featureCount = getU16BE(tpos,&parsedOk);
+ tpos = gsubTable+featureList+2+featureIndex*(4+2);
+ tag = getU32BE(tpos,&parsedOk);
+ tpos += 4;
+ if (tag == vrt2Tag) {
+ /* vrt2 is preferred, overwrite vert */
+ ftable = getU16BE(tpos,&parsedOk);
+ /* convert to offset from file top */
+ gsubFeatureTable = ftable+gsubTable+featureList;
+ return 0;
+ } else if (tag == vertTag) {
+ ftable = getU16BE(tpos,&parsedOk);
+ }
+ }
+ featureCount = getU16BE(pos,&parsedOk);
+ pos += 2;
+ /* find 'vrt2' or 'vert' feature */
+ for (i = 0;i < featureCount;i++) {
+ Guint oldPos;
+
+ featureIndex = getU16BE(pos,&parsedOk);
+ pos += 2;
+ oldPos = pos; /* save position */
+ /* read feature record */
+ pos = gsubTable+featureList+2+featureIndex*(4+2);
+ tag = getU32BE(pos,&parsedOk);
+ pos += 4;
+ if (tag == vrt2Tag) {
+ /* vrt2 is preferred, overwrite vert */
+ ftable = getU16BE(pos,&parsedOk);
+ break;
+ } else if (ftable == 0 && tag == vertTag) {
+ ftable = getU16BE(pos,&parsedOk);
+ }
+ pos = oldPos; /* restore old position */
+ }
+ if (ftable == 0) {
+ /* vert nor vrt2 are not found */
+ return 0;
+ }
+ /* convert to offset from file top */
+ gsubFeatureTable = ftable+gsubTable+featureList;
+ return 0;
+}
+
+Guint FoFiTrueType::doMapToVertGID(Guint orgGID)
+{
+ Guint lookupCount;
+ Guint lookupListIndex;
+ Guint i;
+ Guint gid = 0;
+ Guint pos;
+
+ pos = gsubFeatureTable+2;
+ lookupCount = getU16BE(pos,&parsedOk);
+ pos += 2;
+ for (i = 0;i < lookupCount;i++) {
+ lookupListIndex = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if ((gid = scanLookupList(lookupListIndex,orgGID)) != 0) {
+ break;
+ }
+ }
+ return gid;
+}
+
+Guint FoFiTrueType::mapToVertGID(Guint orgGID)
+{
+ Guint mapped;
+
+ if (gsubFeatureTable == 0) return orgGID;
+ if ((mapped = doMapToVertGID(orgGID)) != 0) {
+ return mapped;
+ }
+ return orgGID;
+}
+
+Guint FoFiTrueType::scanLookupList(Guint listIndex, Guint orgGID)
+{
+ Guint lookupTable;
+ Guint subTableCount;
+ Guint subTable;
+ Guint i;
+ Guint gid = 0;
+ Guint pos;
+
+ if (gsubLookupList == 0) return 0; /* no lookup list */
+ pos = gsubLookupList+2+listIndex*2;
+ lookupTable = getU16BE(pos,&parsedOk);
+ /* read lookup table */
+ pos = gsubLookupList+lookupTable+4;
+ subTableCount = getU16BE(pos,&parsedOk);
+ pos += 2;;
+ for (i = 0;i < subTableCount;i++) {
+ subTable = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if ((gid = scanLookupSubTable(gsubLookupList+lookupTable+subTable,orgGID))
+ != 0) break;
+ }
+ return gid;
+}
+
+Guint FoFiTrueType::scanLookupSubTable(Guint subTable, Guint orgGID)
+{
+ Guint format;
+ Guint coverage;
+ int delta;
+ int glyphCount;
+ Guint substitute;
+ Guint gid = 0;
+ int coverageIndex;
+ int pos;
+
+ pos = subTable;
+ format = getU16BE(pos,&parsedOk);
+ pos += 2;
+ coverage = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if ((coverageIndex =
+ checkGIDInCoverage(subTable+coverage,orgGID)) >= 0) {
+ switch (format) {
+ case 1:
+ /* format 1 */
+ delta = getS16BE(pos,&parsedOk);
+ pos += 2;
+ gid = orgGID+delta;
+ break;
+ case 2:
+ /* format 2 */
+ glyphCount = getS16BE(pos,&parsedOk);
+ pos += 2;
+ if (glyphCount > coverageIndex) {
+ pos += coverageIndex*2;
+ substitute = getU16BE(pos,&parsedOk);
+ gid = substitute;
+ }
+ break;
+ default:
+ /* unknown format */
+ break;
+ }
+ }
+ return gid;
+}
+
+int FoFiTrueType::checkGIDInCoverage(Guint coverage, Guint orgGID)
+{
+ int index = -1;
+ Guint format;
+ Guint count;
+ Guint i;
+ Guint pos;
+
+ pos = coverage;
+ format = getU16BE(pos,&parsedOk);
+ pos += 2;
+ switch (format) {
+ case 1:
+ count = getU16BE(pos,&parsedOk);
+ pos += 2;
+ for (i = 0;i < count;i++) {
+ Guint gid;
+
+ gid = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if (gid == orgGID) {
+ /* found */
+ index = i;
+ break;
+ } else if (gid > orgGID) {
+ /* not found */
+ break;
+ }
+ }
+ break;
+ case 2:
+ count = getU16BE(pos,&parsedOk);
+ pos += 2;
+ for (i = 0;i < count;i++) {
+ Guint startGID, endGID;
+ Guint startIndex;
+
+ startGID = getU16BE(pos,&parsedOk);
+ pos += 2;
+ endGID = getU16BE(pos,&parsedOk);
+ pos += 2;
+ startIndex = getU16BE(pos,&parsedOk);
+ pos += 2;
+ if (startGID <= orgGID && orgGID <= endGID) {
+ /* found */
+ index = startIndex+orgGID-startGID;
+ break;
+ } else if (orgGID <= endGID) {
+ /* not found */
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ return index;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.h b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.h
new file mode 100644
index 00000000000..4213f02b5f4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiTrueType.h
@@ -0,0 +1,200 @@
+//========================================================================
+//
+// FoFiTrueType.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef FOFITRUETYPE_H
+#define FOFITRUETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "FoFiBase.h"
+
+class GooString;
+class GooHash;
+struct TrueTypeTable;
+struct TrueTypeCmap;
+
+//------------------------------------------------------------------------
+// FoFiTrueType
+//------------------------------------------------------------------------
+
+class FoFiTrueType: public FoFiBase {
+public:
+
+ // Create a FoFiTrueType object from a memory buffer.
+ static FoFiTrueType *make(char *fileA, int lenA, int faceIndexA=0);
+
+ // Create a FoFiTrueType object from a file on disk.
+ static FoFiTrueType *load(char *fileName, int faceIndexA=0);
+
+ virtual ~FoFiTrueType();
+
+ // Returns true if this an OpenType font containing CFF data, false
+ // if it's a TrueType font (or OpenType font with TrueType data).
+ GBool isOpenTypeCFF() { return openTypeCFF; }
+
+ // Return the number of cmaps defined by this font.
+ int getNumCmaps();
+
+ // Return the platform ID of the <i>th cmap.
+ int getCmapPlatform(int i);
+
+ // Return the encoding ID of the <i>th cmap.
+ int getCmapEncoding(int i);
+
+ // Return the index of the cmap for <platform>, <encoding>. Returns
+ // -1 if there is no corresponding cmap.
+ int findCmap(int platform, int encoding);
+
+ // Return the GID corresponding to <c> according to the <i>th cmap.
+ Gushort mapCodeToGID(int i, Guint c);
+
+ // map gid to vertical glyph gid if exist.
+ // if not exist return original gid
+ Guint mapToVertGID(Guint orgGID);
+
+ // Returns the GID corresponding to <name> according to the post
+ // table. Returns 0 if there is no mapping for <name> or if the
+ // font does not have a post table.
+ int mapNameToGID(char *name);
+
+ // Return the mapping from CIDs to GIDs, and return the number of
+ // CIDs in *<nCIDs>. This is only useful for CID fonts. (Only
+ // useful for OpenType CFF fonts.)
+ Gushort *getCIDToGIDMap(int *nCIDs);
+
+ // Returns the least restrictive embedding licensing right (as
+ // defined by the TrueType spec):
+ // * 4: OS/2 table is missing or invalid
+ // * 3: installable embedding
+ // * 2: editable embedding
+ // * 1: preview & print embedding
+ // * 0: restricted license embedding
+ int getEmbeddingRights();
+
+ // Convert to a Type 42 font, suitable for embedding in a PostScript
+ // file. <psName> will be used as the PostScript font name (so we
+ // don't need to depend on the 'name' table in the font). The
+ // <encoding> array specifies the mapping from char codes to names.
+ // If <encoding> is NULL, the encoding is unknown or undefined. The
+ // <codeToGID> array specifies the mapping from char codes to GIDs.
+ // (Not useful for OpenType CFF fonts.)
+ void convertToType42(char *psName, char **encoding,
+ Gushort *codeToGID,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 1 font, suitable for embedding in a PostScript
+ // file. This is only useful with 8-bit fonts. If <newEncoding> is
+ // not NULL, it will be used in place of the encoding in the Type 1C
+ // font. If <ascii> is true the eexec section will be hex-encoded,
+ // otherwise it will be left as binary data. If <psName> is
+ // non-NULL, it will be used as the PostScript font name. (Only
+ // useful for OpenType CFF fonts.)
+ void convertToType1(char *psName, char **newEncoding, GBool ascii,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 2 CIDFont, suitable for embedding in a
+ // PostScript file. <psName> will be used as the PostScript font
+ // name (so we don't need to depend on the 'name' table in the
+ // font). The <cidMap> array maps CIDs to GIDs; it has <nCIDs>
+ // entries. (Not useful for OpenType CFF fonts.)
+ void convertToCIDType2(char *psName, Gushort *cidMap, int nCIDs,
+ GBool needVerticalMetrics,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 0 CIDFont, suitable for embedding in a
+ // PostScript file. <psName> will be used as the PostScript font
+ // name. (Only useful for OpenType CFF fonts.)
+ void convertToCIDType0(char *psName,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 0 (but non-CID) composite font, suitable for
+ // embedding in a PostScript file. <psName> will be used as the
+ // PostScript font name (so we don't need to depend on the 'name'
+ // table in the font). The <cidMap> array maps CIDs to GIDs; it has
+ // <nCIDs> entries. (Not useful for OpenType CFF fonts.)
+ void convertToType0(char *psName, Gushort *cidMap, int nCIDs,
+ GBool needVerticalMetrics,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 0 (but non-CID) composite font, suitable for
+ // embedding in a PostScript file. <psName> will be used as the
+ // PostScript font name. (Only useful for OpenType CFF fonts.)
+ void convertToType0(char *psName,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Write a clean TTF file, filling in missing tables and correcting
+ // various other errors. If <name> is non-NULL, the font is renamed
+ // to <name>. If <codeToGID> is non-NULL, the font is re-encoded,
+ // using a Windows Unicode cmap. If <name> is NULL and the font is
+ // complete and correct, it will be written unmodified. (Not useful
+ // for OpenType CFF fonts.)
+ void writeTTF(FoFiOutputFunc outputFunc, void *outputStream,
+ char *name = NULL, Gushort *codeToGID = NULL);
+
+ int setupGSUB(const char *tagName);
+private:
+
+ FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA);
+ void cvtEncoding(char **encoding,
+ FoFiOutputFunc outputFunc,
+ void *outputStream);
+ void cvtCharStrings(char **encoding,
+ Gushort *codeToGID,
+ FoFiOutputFunc outputFunc,
+ void *outputStream);
+ void cvtSfnts(FoFiOutputFunc outputFunc,
+ void *outputStream, GooString *name,
+ GBool needVerticalMetrics);
+ void dumpString(Guchar *s, int length,
+ FoFiOutputFunc outputFunc,
+ void *outputStream);
+ Guint computeTableChecksum(Guchar *data, int length);
+ void parse();
+ void readPostTable();
+ int seekTable(char *tag);
+ Guint charToTag(const char *tagName);
+ Guint doMapToVertGID(Guint orgGID);
+ Guint scanLookupList(Guint listIndex, Guint orgGID);
+ Guint scanLookupSubTable(Guint subTable, Guint orgGID);
+ int checkGIDInCoverage(Guint coverage, Guint orgGID);
+
+ TrueTypeTable *tables;
+ int nTables;
+ TrueTypeCmap *cmaps;
+ int nCmaps;
+ int nGlyphs;
+ int locaFmt;
+ int bbox[4];
+ GooHash *nameToGID;
+ GBool openTypeCFF;
+
+ GBool parsedOk;
+ int faceIndex;
+ Guint gsubFeatureTable;
+ Guint gsubLookupList;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.cc b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.cc
new file mode 100644
index 00000000000..5bfeaedbf37
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.cc
@@ -0,0 +1,287 @@
+//========================================================================
+//
+// FoFiType1.cc
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "FoFiEncodings.h"
+#include "FoFiType1.h"
+#include "poppler/Error.h"
+
+//------------------------------------------------------------------------
+// FoFiType1
+//------------------------------------------------------------------------
+
+FoFiType1 *FoFiType1::make(char *fileA, int lenA) {
+ return new FoFiType1(fileA, lenA, gFalse);
+}
+
+FoFiType1 *FoFiType1::load(char *fileName) {
+ char *fileA;
+ int lenA;
+
+ if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
+ return NULL;
+ }
+ return new FoFiType1(fileA, lenA, gTrue);
+}
+
+FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA):
+ FoFiBase(fileA, lenA, freeFileDataA)
+{
+ name = NULL;
+ encoding = NULL;
+ parsed = gFalse;
+}
+
+FoFiType1::~FoFiType1() {
+ int i;
+
+ if (name) {
+ gfree(name);
+ }
+ if (encoding && encoding != fofiType1StandardEncoding) {
+ for (i = 0; i < 256; ++i) {
+ gfree(encoding[i]);
+ }
+ gfree(encoding);
+ }
+}
+
+char *FoFiType1::getName() {
+ if (!parsed) {
+ parse();
+ }
+ return name;
+}
+
+char **FoFiType1::getEncoding() {
+ if (!parsed) {
+ parse();
+ }
+ return encoding;
+}
+
+void FoFiType1::writeEncoded(char **newEncoding,
+ FoFiOutputFunc outputFunc, void *outputStream) {
+ char buf[512];
+ char *line, *line2, *p;
+ int i;
+
+ // copy everything up to the encoding
+ for (line = (char *)file;
+ line && strncmp(line, "/Encoding", 9);
+ line = getNextLine(line)) ;
+ if (!line) {
+ // no encoding - just copy the whole font file
+ (*outputFunc)(outputStream, (char *)file, len);
+ return;
+ }
+ (*outputFunc)(outputStream, (char *)file, line - (char *)file);
+
+ // write the new encoding
+ (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
+ (*outputFunc)(outputStream,
+ "0 1 255 {1 index exch /.notdef put} for\n", 40);
+ for (i = 0; i < 256; ++i) {
+ if (newEncoding[i]) {
+ sprintf(buf, "dup %d /%s put\n", i, newEncoding[i]);
+ (*outputFunc)(outputStream, buf, strlen(buf));
+ }
+ }
+ (*outputFunc)(outputStream, "readonly def\n", 13);
+
+ // find the end of the encoding data
+ //~ this ought to parse PostScript tokens
+ if (!strncmp(line, "/Encoding StandardEncoding def", 30)) {
+ line = getNextLine(line);
+ } else {
+ // skip "/Encoding" + one whitespace char,
+ // then look for 'def' preceded by PostScript whitespace
+ p = line + 10;
+ line = NULL;
+ for (; p < (char *)file + len; ++p) {
+ if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
+ *p == '\x0d' || *p == '\x0c' || *p == '\0') &&
+ p + 4 <= (char *)file + len &&
+ !strncmp(p + 1, "def", 3)) {
+ line = p + 4;
+ break;
+ }
+ }
+ }
+
+ // some fonts have two /Encoding entries in their dictionary, so we
+ // check for a second one here
+ if (line) {
+ for (line2 = line, i = 0;
+ i < 20 && line2 && strncmp(line2, "/Encoding", 9);
+ line2 = getNextLine(line2), ++i) ;
+ if (i < 20 && line2) {
+ (*outputFunc)(outputStream, line, line2 - line);
+ if (!strncmp(line2, "/Encoding StandardEncoding def", 30)) {
+ line = getNextLine(line2);
+ } else {
+ // skip "/Encoding" + one whitespace char,
+ // then look for 'def' preceded by PostScript whitespace
+ p = line2 + 10;
+ line = NULL;
+ for (; p < (char *)file + len; ++p) {
+ if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
+ *p == '\x0d' || *p == '\x0c' || *p == '\0') &&
+ p + 4 <= (char *)file + len &&
+ !strncmp(p + 1, "def", 3)) {
+ line = p + 4;
+ break;
+ }
+ }
+ }
+ }
+
+ // copy everything after the encoding
+ if (line) {
+ (*outputFunc)(outputStream, line, ((char *)file + len) - line);
+ }
+ }
+}
+
+char *FoFiType1::getNextLine(char *line) {
+ while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') {
+ ++line;
+ }
+ if (line < (char *)file + len && *line == '\x0d') {
+ ++line;
+ }
+ if (line < (char *)file + len && *line == '\x0a') {
+ ++line;
+ }
+ if (line >= (char *)file + len) {
+ return NULL;
+ }
+ return line;
+}
+
+void FoFiType1::parse() {
+ char *line, *line1, *p, *p2;
+ char buf[256];
+ char c;
+ int n, code, i, j;
+
+ for (i = 1, line = (char *)file;
+ i <= 100 && line && (!name || !encoding);
+ ++i) {
+
+ // get font name
+ if (!name && !strncmp(line, "/FontName", 9)) {
+ strncpy(buf, line, 255);
+ buf[255] = '\0';
+ if ((p = strchr(buf+9, '/')) &&
+ (p = strtok(p+1, " \t\n\r"))) {
+ name = copyString(p);
+ }
+ line = getNextLine(line);
+
+ // get encoding
+ } else if (!encoding &&
+ !strncmp(line, "/Encoding StandardEncoding def", 30)) {
+ encoding = fofiType1StandardEncoding;
+ } else if (!encoding &&
+ !strncmp(line, "/Encoding 256 array", 19)) {
+ encoding = (char **)gmallocn(256, sizeof(char *));
+ for (j = 0; j < 256; ++j) {
+ encoding[j] = NULL;
+ }
+ for (j = 0, line = getNextLine(line);
+ j < 300 && line && (line1 = getNextLine(line));
+ ++j, line = line1) {
+ if ((n = line1 - line) > 255) {
+ error(-1, "FoFiType1::parse a line has more than 255 characters, we don't support this");
+ n = 255;
+ }
+ strncpy(buf, line, n);
+ buf[n] = '\0';
+ for (p = buf; *p == ' ' || *p == '\t'; ++p) ;
+ if (!strncmp(p, "dup", 3)) {
+ for (p += 3; *p == ' ' || *p == '\t'; ++p) ;
+ for (p2 = p; *p2 >= '0' && *p2 <= '9'; ++p2) ;
+ if (*p2) {
+ c = *p2; // store it so we can recover it after atoi
+ *p2 = '\0'; // terminate p so atoi works
+ code = atoi(p);
+ *p2 = c;
+ if (code == 8 && *p2 == '#') {
+ code = 0;
+ for (++p2; *p2 >= '0' && *p2 <= '7'; ++p2) {
+ code = code * 8 + (*p2 - '0');
+ }
+ }
+ if (code < 256) {
+ for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
+ if (*p == '/') {
+ ++p;
+ for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ;
+ c = *p2; // store it so we can recover it after copyString
+ *p2 = '\0'; // terminate p so copyString works
+ encoding[code] = copyString(p);
+ *p2 = c;
+ p = p2;
+ for (; *p == ' ' || *p == '\t'; ++p); // eat spaces between string and put
+ if (!strncmp(p, "put", 3)) {
+ // eat put and spaces and newlines after put
+ for (p += 3; *p == ' ' || *p == '\t' || *p == '\n' || *p == '\r'; ++p);
+ if (*p)
+ {
+ // there is still something after the definition
+ // there might be another definition in this line
+ // so move line1 to the end of our parsing
+ // so we start in the potential next definition in the next loop
+ line1 = &line[p - buf];
+ }
+ } else {
+ error(-1, "FoFiType1::parse no put after dup");
+ }
+ }
+ }
+ }
+ } else {
+ if (strtok(buf, " \t") &&
+ (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
+ break;
+ }
+ }
+ }
+ //~ check for getinterval/putinterval junk
+
+ } else {
+ line = getNextLine(line);
+ }
+ }
+
+ parsed = gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.h b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.h
new file mode 100644
index 00000000000..85e67b1c82b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1.h
@@ -0,0 +1,57 @@
+//========================================================================
+//
+// FoFiType1.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FOFITYPE1_H
+#define FOFITYPE1_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "FoFiBase.h"
+
+//------------------------------------------------------------------------
+// FoFiType1
+//------------------------------------------------------------------------
+
+class FoFiType1: public FoFiBase {
+public:
+
+ // Create a FoFiType1 object from a memory buffer.
+ static FoFiType1 *make(char *fileA, int lenA);
+
+ // Create a FoFiType1 object from a file on disk.
+ static FoFiType1 *load(char *fileName);
+
+ virtual ~FoFiType1();
+
+ // Return the font name.
+ char *getName();
+
+ // Return the encoding, as an array of 256 names (any of which may
+ // be NULL).
+ char **getEncoding();
+
+ // Write a version of the Type 1 font file with a new encoding.
+ void writeEncoded(char **newEncoding,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+private:
+
+ FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
+
+ char *getNextLine(char *line);
+ void parse();
+
+ char *name;
+ char **encoding;
+ GBool parsed;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.cc b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.cc
new file mode 100644
index 00000000000..43deb19a2a0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.cc
@@ -0,0 +1,2618 @@
+//========================================================================
+//
+// FoFiType1C.cc
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "goo/gmem.h"
+#include "goo/gstrtod.h"
+#include "goo/GooString.h"
+#include "FoFiEncodings.h"
+#include "FoFiType1C.h"
+
+//------------------------------------------------------------------------
+
+static char hexChars[17] = "0123456789ABCDEF";
+
+//------------------------------------------------------------------------
+// FoFiType1C
+//------------------------------------------------------------------------
+
+FoFiType1C *FoFiType1C::make(char *fileA, int lenA) {
+ FoFiType1C *ff;
+
+ ff = new FoFiType1C(fileA, lenA, gFalse);
+ if (!ff->parse()) {
+ delete ff;
+ return NULL;
+ }
+ return ff;
+}
+
+FoFiType1C *FoFiType1C::load(char *fileName) {
+ FoFiType1C *ff;
+ char *fileA;
+ int lenA;
+
+ if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
+ return NULL;
+ }
+ ff = new FoFiType1C(fileA, lenA, gTrue);
+ if (!ff->parse()) {
+ delete ff;
+ return NULL;
+ }
+ return ff;
+}
+
+FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA):
+ FoFiBase(fileA, lenA, freeFileDataA)
+{
+ name = NULL;
+ encoding = NULL;
+ privateDicts = NULL;
+ fdSelect = NULL;
+ charset = NULL;
+}
+
+FoFiType1C::~FoFiType1C() {
+ int i;
+
+ if (name) {
+ delete name;
+ }
+ if (encoding &&
+ encoding != fofiType1StandardEncoding &&
+ encoding != fofiType1ExpertEncoding) {
+ for (i = 0; i < 256; ++i) {
+ gfree(encoding[i]);
+ }
+ gfree(encoding);
+ }
+ if (privateDicts) {
+ gfree(privateDicts);
+ }
+ if (fdSelect) {
+ gfree(fdSelect);
+ }
+ if (charset &&
+ charset != fofiType1CISOAdobeCharset &&
+ charset != fofiType1CExpertCharset &&
+ charset != fofiType1CExpertSubsetCharset) {
+ gfree(charset);
+ }
+}
+
+char *FoFiType1C::getName() {
+ return name ? name->getCString() : (char *)NULL;
+}
+
+char **FoFiType1C::getEncoding() {
+ return encoding;
+}
+
+Gushort *FoFiType1C::getCIDToGIDMap(int *nCIDs) {
+ Gushort *map;
+ int n, i;
+
+ // a CID font's top dict has ROS as the first operator
+ if (topDict.firstOp != 0x0c1e) {
+ *nCIDs = 0;
+ return NULL;
+ }
+
+ // in a CID font, the charset data is the GID-to-CID mapping, so all
+ // we have to do is reverse it
+ n = 0;
+ for (i = 0; i < nGlyphs; ++i) {
+ if (charset[i] > n) {
+ n = charset[i];
+ }
+ }
+ ++n;
+ map = (Gushort *)gmallocn(n, sizeof(Gushort));
+ memset(map, 0, n * sizeof(Gushort));
+ for (i = 0; i < nGlyphs; ++i) {
+ map[charset[i]] = i;
+ }
+ *nCIDs = n;
+ return map;
+}
+
+void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ int psNameLen;
+ Type1CEexecBuf eb;
+ Type1CIndex subrIdx;
+ Type1CIndexVal val;
+ GooString *buf;
+ char buf2[256];
+ char **enc;
+ GBool ok;
+ int i;
+
+ if (psName) {
+ psNameLen = strlen(psName);
+ } else {
+ psName = name->getCString();
+ psNameLen = name->getLength();
+ }
+
+ // write header and font dictionary, up to encoding
+ ok = gTrue;
+ (*outputFunc)(outputStream, "%!FontType1-1.0: ", 17);
+ (*outputFunc)(outputStream, psName, psNameLen);
+ if (topDict.versionSID != 0) {
+ getString(topDict.versionSID, buf2, &ok);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ // the dictionary needs room for 12 entries: the following 9, plus
+ // Private and CharStrings (in the eexec section) and FID (which is
+ // added by definefont)
+ (*outputFunc)(outputStream, "12 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontInfo 10 dict dup begin\n", 28);
+ if (topDict.versionSID != 0) {
+ (*outputFunc)(outputStream, "/version (", 10);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.noticeSID != 0) {
+ getString(topDict.noticeSID, buf2, &ok);
+ (*outputFunc)(outputStream, "/Notice (", 9);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.copyrightSID != 0) {
+ getString(topDict.copyrightSID, buf2, &ok);
+ (*outputFunc)(outputStream, "/Copyright (", 12);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.fullNameSID != 0) {
+ getString(topDict.fullNameSID, buf2, &ok);
+ (*outputFunc)(outputStream, "/FullName (", 11);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.familyNameSID != 0) {
+ getString(topDict.familyNameSID, buf2, &ok);
+ (*outputFunc)(outputStream, "/FamilyName (", 13);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.weightSID != 0) {
+ getString(topDict.weightSID, buf2, &ok);
+ (*outputFunc)(outputStream, "/Weight (", 9);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") readonly def\n", 15);
+ }
+ if (topDict.isFixedPitch) {
+ (*outputFunc)(outputStream, "/isFixedPitch true def\n", 23);
+ } else {
+ (*outputFunc)(outputStream, "/isFixedPitch false def\n", 24);
+ }
+ buf = GooString::format("/ItalicAngle {0:.4g} def\n", topDict.italicAngle);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/UnderlinePosition {0:.4g} def\n",
+ topDict.underlinePosition);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/UnderlineThickness {0:.4g} def\n",
+ topDict.underlineThickness);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "end readonly def\n", 17);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, psNameLen);
+ (*outputFunc)(outputStream, " def\n", 5);
+ buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FontType 1 def\n", 16);
+ buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] readonly def\n",
+ topDict.fontMatrix[0], topDict.fontMatrix[1],
+ topDict.fontMatrix[2], topDict.fontMatrix[3],
+ topDict.fontMatrix[4], topDict.fontMatrix[5]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] readonly def\n",
+ topDict.fontBBox[0], topDict.fontBBox[1],
+ topDict.fontBBox[2], topDict.fontBBox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ if (topDict.uniqueID != 0) {
+ buf = GooString::format("/UniqueID {0:d} def\n", topDict.uniqueID);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+
+ // write the encoding
+ (*outputFunc)(outputStream, "/Encoding ", 10);
+ if (!newEncoding && encoding == fofiType1StandardEncoding) {
+ (*outputFunc)(outputStream, "StandardEncoding def\n", 21);
+ } else {
+ (*outputFunc)(outputStream, "256 array\n", 10);
+ (*outputFunc)(outputStream,
+ "0 1 255 {1 index exch /.notdef put} for\n", 40);
+ enc = newEncoding ? newEncoding : encoding;
+ for (i = 0; i < 256; ++i) {
+ if (enc[i]) {
+ buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ }
+ (*outputFunc)(outputStream, "readonly def\n", 13);
+ }
+ (*outputFunc)(outputStream, "currentdict end\n", 16);
+
+ // start the binary section
+ (*outputFunc)(outputStream, "currentfile eexec\n", 18);
+ eb.outputFunc = outputFunc;
+ eb.outputStream = outputStream;
+ eb.ascii = ascii;
+ eb.r1 = 55665;
+ eb.line = 0;
+
+ // write the private dictionary
+ eexecWrite(&eb, "\x83\xca\x73\xd5");
+ eexecWrite(&eb, "dup /Private 32 dict dup begin\n");
+ eexecWrite(&eb, "/RD {string currentfile exch readstring pop}"
+ " executeonly def\n");
+ eexecWrite(&eb, "/ND {noaccess def} executeonly def\n");
+ eexecWrite(&eb, "/NP {noaccess put} executeonly def\n");
+ eexecWrite(&eb, "/MinFeature {16 16} def\n");
+ eexecWrite(&eb, "/password 5839 def\n");
+ if (privateDicts[0].nBlueValues) {
+ eexecWrite(&eb, "/BlueValues [");
+ for (i = 0; i < privateDicts[0].nBlueValues; ++i) {
+ buf = GooString::format("{0:s}{1:d}",
+ i > 0 ? " " : "", privateDicts[0].blueValues[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].nOtherBlues) {
+ eexecWrite(&eb, "/OtherBlues [");
+ for (i = 0; i < privateDicts[0].nOtherBlues; ++i) {
+ buf = GooString::format("{0:s}{1:d}",
+ i > 0 ? " " : "", privateDicts[0].otherBlues[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].nFamilyBlues) {
+ eexecWrite(&eb, "/FamilyBlues [");
+ for (i = 0; i < privateDicts[0].nFamilyBlues; ++i) {
+ buf = GooString::format("{0:s}{1:d}",
+ i > 0 ? " " : "", privateDicts[0].familyBlues[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].nFamilyOtherBlues) {
+ eexecWrite(&eb, "/FamilyOtherBlues [");
+ for (i = 0; i < privateDicts[0].nFamilyOtherBlues; ++i) {
+ buf = GooString::format("{0:s}{1:d}", i > 0 ? " " : "",
+ privateDicts[0].familyOtherBlues[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].blueScale != 0.039625) {
+ buf = GooString::format("/BlueScale {0:.4g} def\n",
+ privateDicts[0].blueScale);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].blueShift != 7) {
+ buf = GooString::format("/BlueShift {0:d} def\n", privateDicts[0].blueShift);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].blueFuzz != 1) {
+ buf = GooString::format("/BlueFuzz {0:d} def\n", privateDicts[0].blueFuzz);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].hasStdHW) {
+ buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[0].stdHW);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].hasStdVW) {
+ buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[0].stdVW);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].nStemSnapH) {
+ eexecWrite(&eb, "/StemSnapH [");
+ for (i = 0; i < privateDicts[0].nStemSnapH; ++i) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ i > 0 ? " " : "", privateDicts[0].stemSnapH[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].nStemSnapV) {
+ eexecWrite(&eb, "/StemSnapV [");
+ for (i = 0; i < privateDicts[0].nStemSnapV; ++i) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ i > 0 ? " " : "", privateDicts[0].stemSnapV[i]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[0].hasForceBold) {
+ buf = GooString::format("/ForceBold {0:s} def\n",
+ privateDicts[0].forceBold ? "true" : "false");
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].forceBoldThreshold != 0) {
+ buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n",
+ privateDicts[0].forceBoldThreshold);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].languageGroup != 0) {
+ buf = GooString::format("/LanguageGroup {0:d} def\n",
+ privateDicts[0].languageGroup);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[0].expansionFactor != 0.06) {
+ buf = GooString::format("/ExpansionFactor {0:.4g} def\n",
+ privateDicts[0].expansionFactor);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+
+ // set up subroutines
+ ok = gTrue;
+ getIndex(privateDicts[0].subrsOffset, &subrIdx, &ok);
+ if (!ok) {
+ subrIdx.pos = -1;
+ }
+
+ // write the CharStrings
+ buf = GooString::format("2 index /CharStrings {0:d} dict dup begin\n",
+ nGlyphs);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ for (i = 0; i < nGlyphs; ++i) {
+ ok = gTrue;
+ getIndexVal(&charStringsIdx, i, &val, &ok);
+ if (ok) {
+ getString(charset[i], buf2, &ok);
+ if (ok) {
+ eexecCvtGlyph(&eb, buf2, val.pos, val.len, &subrIdx, &privateDicts[0]);
+ }
+ }
+ }
+ eexecWrite(&eb, "end\n");
+ eexecWrite(&eb, "end\n");
+ eexecWrite(&eb, "readonly put\n");
+ eexecWrite(&eb, "noaccess put\n");
+ eexecWrite(&eb, "dup /FontName get exch definefont pop\n");
+ eexecWrite(&eb, "mark currentfile closefile\n");
+
+ // trailer
+ if (ascii && eb.line > 0) {
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+ for (i = 0; i < 8; ++i) {
+ (*outputFunc)(outputStream, "0000000000000000000000000000000000000000000000000000000000000000\n", 65);
+ }
+ (*outputFunc)(outputStream, "cleartomark\n", 12);
+}
+
+void FoFiType1C::convertToCIDType0(char *psName,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ int *cidMap;
+ GooString *charStrings;
+ int *charStringOffsets;
+ Type1CIndex subrIdx;
+ Type1CIndexVal val;
+ int nCIDs, gdBytes;
+ GooString *buf;
+ char buf2[256];
+ GBool ok;
+ int gid, offset, n, i, j, k;
+
+ // compute the CID count and build the CID-to-GID mapping
+ nCIDs = 0;
+ for (i = 0; i < nGlyphs; ++i) {
+ if (charset[i] >= nCIDs) {
+ nCIDs = charset[i] + 1;
+ }
+ }
+ cidMap = (int *)gmallocn(nCIDs, sizeof(int));
+ for (i = 0; i < nCIDs; ++i) {
+ cidMap[i] = -1;
+ }
+ for (i = 0; i < nGlyphs; ++i) {
+ cidMap[charset[i]] = i;
+ }
+
+ // build the charstrings
+ charStrings = new GooString();
+ charStringOffsets = (int *)gmallocn(nCIDs + 1, sizeof(int));
+ for (i = 0; i < nCIDs; ++i) {
+ charStringOffsets[i] = charStrings->getLength();
+ if ((gid = cidMap[i]) >= 0) {
+ ok = gTrue;
+ getIndexVal(&charStringsIdx, gid, &val, &ok);
+ if (ok) {
+ getIndex(privateDicts[fdSelect[gid]].subrsOffset, &subrIdx, &ok);
+ if (!ok) {
+ subrIdx.pos = -1;
+ }
+ cvtGlyph(val.pos, val.len, charStrings,
+ &subrIdx, &privateDicts[fdSelect[gid]], gTrue);
+ }
+ }
+ }
+ charStringOffsets[nCIDs] = charStrings->getLength();
+
+ // compute gdBytes = number of bytes needed for charstring offsets
+ // (offset size needs to account for the charstring offset table,
+ // with a worst case of five bytes per entry, plus the charstrings
+ // themselves)
+ i = (nCIDs + 1) * 5 + charStrings->getLength();
+ if (i < 0x100) {
+ gdBytes = 1;
+ } else if (i < 0x10000) {
+ gdBytes = 2;
+ } else if (i < 0x1000000) {
+ gdBytes = 3;
+ } else {
+ gdBytes = 4;
+ }
+
+ // begin the font dictionary
+ (*outputFunc)(outputStream, "/CIDInit /ProcSet findresource begin\n", 37);
+ (*outputFunc)(outputStream, "20 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/CIDFontName /", 14);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, " def\n", 5);
+ (*outputFunc)(outputStream, "/CIDFontType 0 def\n", 19);
+ (*outputFunc)(outputStream, "/CIDSystemInfo 3 dict dup begin\n", 32);
+ if (topDict.registrySID > 0 && topDict.orderingSID > 0) {
+ ok = gTrue;
+ getString(topDict.registrySID, buf2, &ok);
+ if (ok) {
+ (*outputFunc)(outputStream, " /Registry (", 13);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") def\n", 6);
+ }
+ ok = gTrue;
+ getString(topDict.orderingSID, buf2, &ok);
+ if (ok) {
+ (*outputFunc)(outputStream, " /Ordering (", 13);
+ (*outputFunc)(outputStream, buf2, strlen(buf2));
+ (*outputFunc)(outputStream, ") def\n", 6);
+ }
+ } else {
+ (*outputFunc)(outputStream, " /Registry (Adobe) def\n", 24);
+ (*outputFunc)(outputStream, " /Ordering (Identity) def\n", 27);
+ }
+ buf = GooString::format(" /Supplement {0:d} def\n", topDict.supplement);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "end def\n", 8);
+ if (topDict.hasFontMatrix) {
+ buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n",
+ topDict.fontMatrix[0], topDict.fontMatrix[1],
+ topDict.fontMatrix[2], topDict.fontMatrix[3],
+ topDict.fontMatrix[4], topDict.fontMatrix[5]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ } else if (privateDicts[0].hasFontMatrix) {
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ } else {
+ (*outputFunc)(outputStream,
+ "/FontMatrix [0.001 0 0 0.001 0 0] def\n", 38);
+ }
+ buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n",
+ topDict.fontBBox[0], topDict.fontBBox[1],
+ topDict.fontBBox[2], topDict.fontBBox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FontInfo 1 dict dup begin\n", 27);
+ (*outputFunc)(outputStream, " /FSType 8 def\n", 16);
+ (*outputFunc)(outputStream, "end def\n", 8);
+
+ // CIDFont-specific entries
+ buf = GooString::format("/CIDCount {0:d} def\n", nCIDs);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FDBytes 1 def\n", 15);
+ buf = GooString::format("/GDBytes {0:d} def\n", gdBytes);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/CIDMapOffset 0 def\n", 20);
+ if (topDict.paintType != 0) {
+ buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+
+ // FDArray entry
+ buf = GooString::format("/FDArray {0:d} array\n", nFDs);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ for (i = 0; i < nFDs; ++i) {
+ buf = GooString::format("dup {0:d} 10 dict begin\n", i);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FontType 1 def\n", 16);
+ if (privateDicts[i].hasFontMatrix) {
+ buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n",
+ privateDicts[i].fontMatrix[0],
+ privateDicts[i].fontMatrix[1],
+ privateDicts[i].fontMatrix[2],
+ privateDicts[i].fontMatrix[3],
+ privateDicts[i].fontMatrix[4],
+ privateDicts[i].fontMatrix[5]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ } else {
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ }
+ buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/Private 32 dict begin\n", 23);
+ if (privateDicts[i].nBlueValues) {
+ (*outputFunc)(outputStream, "/BlueValues [", 13);
+ for (j = 0; j < privateDicts[i].nBlueValues; ++j) {
+ buf = GooString::format("{0:s}{1:d}",
+ j > 0 ? " " : "", privateDicts[i].blueValues[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].nOtherBlues) {
+ (*outputFunc)(outputStream, "/OtherBlues [", 13);
+ for (j = 0; j < privateDicts[i].nOtherBlues; ++j) {
+ buf = GooString::format("{0:s}{1:d}",
+ j > 0 ? " " : "", privateDicts[i].otherBlues[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].nFamilyBlues) {
+ (*outputFunc)(outputStream, "/FamilyBlues [", 14);
+ for (j = 0; j < privateDicts[i].nFamilyBlues; ++j) {
+ buf = GooString::format("{0:s}{1:d}",
+ j > 0 ? " " : "",
+ privateDicts[i].familyBlues[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].nFamilyOtherBlues) {
+ (*outputFunc)(outputStream, "/FamilyOtherBlues [", 19);
+ for (j = 0; j < privateDicts[i].nFamilyOtherBlues; ++j) {
+ buf = GooString::format("{0:s}{1:d}", j > 0 ? " " : "",
+ privateDicts[i].familyOtherBlues[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].blueScale != 0.039625) {
+ buf = GooString::format("/BlueScale {0:.4g} def\n",
+ privateDicts[i].blueScale);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].blueShift != 7) {
+ buf = GooString::format("/BlueShift {0:d} def\n",
+ privateDicts[i].blueShift);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].blueFuzz != 1) {
+ buf = GooString::format("/BlueFuzz {0:d} def\n", privateDicts[i].blueFuzz);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].hasStdHW) {
+ buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[i].stdHW);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].hasStdVW) {
+ buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[i].stdVW);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].nStemSnapH) {
+ (*outputFunc)(outputStream, "/StemSnapH [", 12);
+ for (j = 0; j < privateDicts[i].nStemSnapH; ++j) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ j > 0 ? " " : "", privateDicts[i].stemSnapH[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].nStemSnapV) {
+ (*outputFunc)(outputStream, "/StemSnapV [", 12);
+ for (j = 0; j < privateDicts[i].nStemSnapV; ++j) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ j > 0 ? " " : "", privateDicts[i].stemSnapV[j]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ }
+ if (privateDicts[i].hasForceBold) {
+ buf = GooString::format("/ForceBold {0:s} def\n",
+ privateDicts[i].forceBold ? "true" : "false");
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].forceBoldThreshold != 0) {
+ buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n",
+ privateDicts[i].forceBoldThreshold);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].languageGroup != 0) {
+ buf = GooString::format("/LanguageGroup {0:d} def\n",
+ privateDicts[i].languageGroup);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (privateDicts[i].expansionFactor != 0.06) {
+ buf = GooString::format("/ExpansionFactor {0:.4g} def\n",
+ privateDicts[i].expansionFactor);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "currentdict end def\n", 20);
+ (*outputFunc)(outputStream, "currentdict end put\n", 20);
+ }
+ (*outputFunc)(outputStream, "def\n", 4);
+
+ // start the binary section
+ offset = (nCIDs + 1) * (1 + gdBytes);
+ buf = GooString::format("(Hex) {0:d} StartData\n",
+ offset + charStrings->getLength());
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+
+ // write the charstring offset (CIDMap) table
+ for (i = 0; i <= nCIDs; i += 6) {
+ for (j = 0; j < 6 && i+j <= nCIDs; ++j) {
+ if (i+j < nCIDs && cidMap[i+j] >= 0) {
+ buf2[0] = (char)fdSelect[cidMap[i+j]];
+ } else {
+ buf2[0] = (char)0;
+ }
+ n = offset + charStringOffsets[i+j];
+ for (k = gdBytes; k >= 1; --k) {
+ buf2[k] = (char)(n & 0xff);
+ n >>= 8;
+ }
+ for (k = 0; k <= gdBytes; ++k) {
+ buf = GooString::format("{0:02x}", buf2[k] & 0xff);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+
+ // write the charstring data
+ n = charStrings->getLength();
+ for (i = 0; i < n; i += 32) {
+ for (j = 0; j < 32 && i+j < n; ++j) {
+ buf = GooString::format("{0:02x}", charStrings->getChar(i+j) & 0xff);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (i + 32 >= n) {
+ (*outputFunc)(outputStream, ">", 1);
+ }
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+
+ gfree(charStringOffsets);
+ delete charStrings;
+ gfree(cidMap);
+}
+
+void FoFiType1C::convertToType0(char *psName,
+ FoFiOutputFunc outputFunc,
+ void *outputStream) {
+ int *cidMap;
+ Type1CIndex subrIdx;
+ Type1CIndexVal val;
+ int nCIDs;
+ GooString *buf;
+ Type1CEexecBuf eb;
+ GBool ok;
+ int fd, i, j, k;
+
+ // compute the CID count and build the CID-to-GID mapping
+ nCIDs = 0;
+ for (i = 0; i < nGlyphs; ++i) {
+ if (charset[i] >= nCIDs) {
+ nCIDs = charset[i] + 1;
+ }
+ }
+ cidMap = (int *)gmallocn(nCIDs, sizeof(int));
+ for (i = 0; i < nCIDs; ++i) {
+ cidMap[i] = -1;
+ }
+ for (i = 0; i < nGlyphs; ++i) {
+ cidMap[charset[i]] = i;
+ }
+
+ // write the descendant Type 1 fonts
+ for (i = 0; i < nCIDs; i += 256) {
+
+ //~ this assumes that all CIDs in this block have the same FD --
+ //~ to handle multiple FDs correctly, need to somehow divide the
+ //~ font up by FD; as a kludge we ignore CID 0, which is .notdef
+ fd = 0;
+ for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) {
+ if (cidMap[i+j] >= 0) {
+ fd = fdSelect[cidMap[i+j]];
+ break;
+ }
+ }
+
+ // font dictionary (unencrypted section)
+ (*outputFunc)(outputStream, "16 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ buf = GooString::format("_{0:02x} def\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, "/FontType 1 def\n", 16);
+ if (privateDicts[fd].hasFontMatrix) {
+ buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n",
+ privateDicts[fd].fontMatrix[0],
+ privateDicts[fd].fontMatrix[1],
+ privateDicts[fd].fontMatrix[2],
+ privateDicts[fd].fontMatrix[3],
+ privateDicts[fd].fontMatrix[4],
+ privateDicts[fd].fontMatrix[5]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ } else if (topDict.hasFontMatrix) {
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ } else {
+ (*outputFunc)(outputStream,
+ "/FontMatrix [0.001 0 0 0.001 0 0] def\n", 38);
+ }
+ buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n",
+ topDict.fontBBox[0], topDict.fontBBox[1],
+ topDict.fontBBox[2], topDict.fontBBox[3]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ if (topDict.paintType != 0) {
+ buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "/Encoding 256 array\n", 20);
+ for (j = 0; j < 256 && i+j < nCIDs; ++j) {
+ buf = GooString::format("dup {0:d} /c{1:02x} put\n", j, j);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ if (j < 256) {
+ buf = GooString::format("{0:d} 1 255 {{ 1 index exch /.notdef put }} for\n",
+ j);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "readonly def\n", 13);
+ (*outputFunc)(outputStream, "currentdict end\n", 16);
+
+ // start the binary section
+ (*outputFunc)(outputStream, "currentfile eexec\n", 18);
+ eb.outputFunc = outputFunc;
+ eb.outputStream = outputStream;
+ eb.ascii = gTrue;
+ eb.r1 = 55665;
+ eb.line = 0;
+
+ // start the private dictionary
+ eexecWrite(&eb, "\x83\xca\x73\xd5");
+ eexecWrite(&eb, "dup /Private 32 dict dup begin\n");
+ eexecWrite(&eb, "/RD {string currentfile exch readstring pop}"
+ " executeonly def\n");
+ eexecWrite(&eb, "/ND {noaccess def} executeonly def\n");
+ eexecWrite(&eb, "/NP {noaccess put} executeonly def\n");
+ eexecWrite(&eb, "/MinFeature {16 16} def\n");
+ eexecWrite(&eb, "/password 5839 def\n");
+ if (privateDicts[fd].nBlueValues) {
+ eexecWrite(&eb, "/BlueValues [");
+ for (k = 0; k < privateDicts[fd].nBlueValues; ++k) {
+ buf = GooString::format("{0:s}{1:d}",
+ k > 0 ? " " : "",
+ privateDicts[fd].blueValues[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].nOtherBlues) {
+ eexecWrite(&eb, "/OtherBlues [");
+ for (k = 0; k < privateDicts[fd].nOtherBlues; ++k) {
+ buf = GooString::format("{0:s}{1:d}",
+ k > 0 ? " " : "",
+ privateDicts[fd].otherBlues[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].nFamilyBlues) {
+ eexecWrite(&eb, "/FamilyBlues [");
+ for (k = 0; k < privateDicts[fd].nFamilyBlues; ++k) {
+ buf = GooString::format("{0:s}{1:d}", k > 0 ? " " : "",
+ privateDicts[fd].familyBlues[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].nFamilyOtherBlues) {
+ eexecWrite(&eb, "/FamilyOtherBlues [");
+ for (k = 0; k < privateDicts[fd].nFamilyOtherBlues; ++k) {
+ buf = GooString::format("{0:s}{1:d}", k > 0 ? " " : "",
+ privateDicts[fd].familyOtherBlues[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].blueScale != 0.039625) {
+ buf = GooString::format("/BlueScale {0:.4g} def\n",
+ privateDicts[fd].blueScale);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].blueShift != 7) {
+ buf = GooString::format("/BlueShift {0:d} def\n",
+ privateDicts[fd].blueShift);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].blueFuzz != 1) {
+ buf = GooString::format("/BlueFuzz {0:d} def\n",
+ privateDicts[fd].blueFuzz);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].hasStdHW) {
+ buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[fd].stdHW);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].hasStdVW) {
+ buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[fd].stdVW);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].nStemSnapH) {
+ eexecWrite(&eb, "/StemSnapH [");
+ for (k = 0; k < privateDicts[fd].nStemSnapH; ++k) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ k > 0 ? " " : "", privateDicts[fd].stemSnapH[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].nStemSnapV) {
+ eexecWrite(&eb, "/StemSnapV [");
+ for (k = 0; k < privateDicts[fd].nStemSnapV; ++k) {
+ buf = GooString::format("{0:s}{1:.4g}",
+ k > 0 ? " " : "", privateDicts[fd].stemSnapV[k]);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ eexecWrite(&eb, "] def\n");
+ }
+ if (privateDicts[fd].hasForceBold) {
+ buf = GooString::format("/ForceBold {0:s} def\n",
+ privateDicts[fd].forceBold ? "true" : "false");
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].forceBoldThreshold != 0) {
+ buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n",
+ privateDicts[fd].forceBoldThreshold);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].languageGroup != 0) {
+ buf = GooString::format("/LanguageGroup {0:d} def\n",
+ privateDicts[fd].languageGroup);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+ if (privateDicts[fd].expansionFactor != 0.06) {
+ buf = GooString::format("/ExpansionFactor {0:.4g} def\n",
+ privateDicts[fd].expansionFactor);
+ eexecWrite(&eb, buf->getCString());
+ delete buf;
+ }
+
+ // set up the subroutines
+ ok = gTrue;
+ getIndex(privateDicts[fd].subrsOffset, &subrIdx, &ok);
+ if (!ok) {
+ subrIdx.pos = -1;
+ }
+
+ // start the CharStrings
+ eexecWrite(&eb, "2 index /CharStrings 256 dict dup begin\n");
+
+ // write the .notdef CharString
+ ok = gTrue;
+ getIndexVal(&charStringsIdx, 0, &val, &ok);
+ if (ok) {
+ eexecCvtGlyph(&eb, ".notdef", val.pos, val.len,
+ &subrIdx, &privateDicts[fd]);
+ }
+
+ // write the CharStrings
+ for (j = 0; j < 256 && i+j < nCIDs; ++j) {
+ if (cidMap[i+j] >= 0) {
+ ok = gTrue;
+ getIndexVal(&charStringsIdx, cidMap[i+j], &val, &ok);
+ if (ok) {
+ buf = GooString::format("c{0:02x}", j);
+ eexecCvtGlyph(&eb, buf->getCString(), val.pos, val.len,
+ &subrIdx, &privateDicts[fd]);
+ delete buf;
+ }
+ }
+ }
+ eexecWrite(&eb, "end\n");
+ eexecWrite(&eb, "end\n");
+ eexecWrite(&eb, "readonly put\n");
+ eexecWrite(&eb, "noaccess put\n");
+ eexecWrite(&eb, "dup /FontName get exch definefont pop\n");
+ eexecWrite(&eb, "mark currentfile closefile\n");
+
+ // trailer
+ if (eb.line > 0) {
+ (*outputFunc)(outputStream, "\n", 1);
+ }
+ for (j = 0; j < 8; ++j) {
+ (*outputFunc)(outputStream, "0000000000000000000000000000000000000000000000000000000000000000\n", 65);
+ }
+ (*outputFunc)(outputStream, "cleartomark\n", 12);
+ }
+
+ // write the Type 0 parent font
+ (*outputFunc)(outputStream, "16 dict begin\n", 14);
+ (*outputFunc)(outputStream, "/FontName /", 11);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ (*outputFunc)(outputStream, " def\n", 5);
+ (*outputFunc)(outputStream, "/FontType 0 def\n", 16);
+ if (topDict.hasFontMatrix) {
+ buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n",
+ topDict.fontMatrix[0], topDict.fontMatrix[1],
+ topDict.fontMatrix[2], topDict.fontMatrix[3],
+ topDict.fontMatrix[4], topDict.fontMatrix[5]);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ } else {
+ (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30);
+ }
+ (*outputFunc)(outputStream, "/FMapType 2 def\n", 16);
+ (*outputFunc)(outputStream, "/Encoding [\n", 12);
+ for (i = 0; i < nCIDs; i += 256) {
+ buf = GooString::format("{0:d}\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ (*outputFunc)(outputStream, "/FDepVector [\n", 14);
+ for (i = 0; i < nCIDs; i += 256) {
+ (*outputFunc)(outputStream, "/", 1);
+ (*outputFunc)(outputStream, psName, strlen(psName));
+ buf = GooString::format("_{0:02x} findfont\n", i >> 8);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ (*outputFunc)(outputStream, "] def\n", 6);
+ (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
+
+ gfree(cidMap);
+}
+
+void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
+ int offset, int nBytes,
+ Type1CIndex *subrIdx,
+ Type1CPrivateDict *pDict) {
+ GooString *buf;
+ GooString *charBuf;
+
+ // generate the charstring
+ charBuf = new GooString();
+ cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, gTrue);
+
+ buf = GooString::format("/{0:s} {1:d} RD ", glyphName, charBuf->getLength());
+ eexecWrite(eb, buf->getCString());
+ delete buf;
+ eexecWriteCharstring(eb, (Guchar *)charBuf->getCString(),
+ charBuf->getLength());
+ eexecWrite(eb, " ND\n");
+
+ delete charBuf;
+}
+
+void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
+ Type1CIndex *subrIdx, Type1CPrivateDict *pDict,
+ GBool top) {
+ Type1CIndexVal val;
+ GBool ok, dFP;
+ double d, dx, dy;
+ Gushort r2;
+ Guchar byte;
+ int pos, subrBias, start, i, k;
+
+ start = charBuf->getLength();
+ if (top) {
+ charBuf->append((char)73);
+ charBuf->append((char)58);
+ charBuf->append((char)147);
+ charBuf->append((char)134);
+ nOps = 0;
+ nHints = 0;
+ firstOp = gTrue;
+ openPath = gFalse;
+ }
+
+ pos = offset;
+ while (pos < offset + nBytes) {
+ ok = gTrue;
+ pos = getOp(pos, gTrue, &ok);
+ if (!ok) {
+ break;
+ }
+ if (!ops[nOps - 1].isNum) {
+ --nOps; // drop the operator
+ switch (ops[nOps].op) {
+ case 0x0001: // hstem
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hstem", nOps);
+ }
+ d = 0;
+ dFP = gFalse;
+ for (k = 0; k < nOps; k += 2) {
+ // convert Type 2 edge hints (-20 or -21) to Type 1 ghost hints
+ if (ops[k+1].num < 0) {
+ d += ops[k].num + ops[k+1].num;
+ dFP |= ops[k].isFP | ops[k+1].isFP;
+ cvtNum(d, dFP, charBuf);
+ cvtNum(-ops[k+1].num, ops[k+1].isFP, charBuf);
+ } else {
+ d += ops[k].num;
+ dFP |= ops[k].isFP;
+ cvtNum(d, dFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ d += ops[k+1].num;
+ dFP |= ops[k+1].isFP;
+ }
+ charBuf->append((char)1);
+ }
+ nHints += nOps / 2;
+ nOps = 0;
+ break;
+ case 0x0003: // vstem
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vstem", nOps);
+ }
+ d = 0;
+ dFP = gFalse;
+ for (k = 0; k < nOps; k += 2) {
+ // convert Type 2 edge hints (-20 or -21) to Type 1 ghost hints
+ if (ops[k+1].num < 0) {
+ d += ops[k].num + ops[k+1].num;
+ dFP |= ops[k].isFP | ops[k+1].isFP;
+ cvtNum(d, dFP, charBuf);
+ cvtNum(-ops[k+1].num, ops[k+1].isFP, charBuf);
+ } else {
+ d += ops[k].num;
+ dFP |= ops[k].isFP;
+ cvtNum(d, dFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ d += ops[k+1].num;
+ dFP |= ops[k+1].isFP;
+ }
+ charBuf->append((char)3);
+ }
+ nHints += nOps / 2;
+ nOps = 0;
+ break;
+ case 0x0004: // vmoveto
+ if (firstOp) {
+ cvtGlyphWidth(nOps == 2, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (openPath) {
+ charBuf->append((char)9);
+ openPath = gFalse;
+ }
+ if (nOps != 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vmoveto", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ charBuf->append((char)4);
+ nOps = 0;
+ break;
+ case 0x0005: // rlineto
+ if (nOps < 2 || nOps % 2 != 0) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 rlineto", nOps);
+ }
+ for (k = 0; k < nOps; k += 2) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ charBuf->append((char)5);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0006: // hlineto
+ if (nOps < 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hlineto", nOps);
+ }
+ for (k = 0; k < nOps; ++k) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ charBuf->append((char)((k & 1) ? 7 : 6));
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0007: // vlineto
+ if (nOps < 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vlineto", nOps);
+ }
+ for (k = 0; k < nOps; ++k) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ charBuf->append((char)((k & 1) ? 6 : 7));
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0008: // rrcurveto
+ if (nOps < 6 || nOps % 6 != 0) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 rrcurveto", nOps);
+ }
+ for (k = 0; k < nOps; k += 6) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf);
+ charBuf->append((char)8);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x000a: // callsubr
+ if (nOps >= 1) {
+ subrBias = (subrIdx->len < 1240)
+ ? 107 : (subrIdx->len < 33900) ? 1131 : 32768;
+ k = subrBias + (int)ops[nOps - 1].num;
+ --nOps;
+ ok = gTrue;
+ getIndexVal(subrIdx, k, &val, &ok);
+ if (ok) {
+ cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, gFalse);
+ }
+ } else {
+ //~ error(-1, "Too few args to Type 2 callsubr");
+ }
+ // don't clear the stack
+ break;
+ case 0x000b: // return
+ // don't clear the stack
+ break;
+ case 0x000e: // endchar / seac
+ if (firstOp) {
+ cvtGlyphWidth(nOps == 1 || nOps == 5, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (openPath) {
+ charBuf->append((char)9);
+ openPath = gFalse;
+ }
+ if (nOps == 4) {
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ charBuf->append((char)12)->append((char)6);
+ } else if (nOps == 0) {
+ charBuf->append((char)14);
+ } else {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 endchar", nOps);
+ }
+ nOps = 0;
+ break;
+ case 0x000f: // (obsolete)
+ // this op is ignored, but we need the glyph width
+ if (firstOp) {
+ cvtGlyphWidth(nOps > 0, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ nOps = 0;
+ break;
+ case 0x0010: // blend
+ //~ error(-1, "Unimplemented Type 2 charstring op: %d", file[i]);
+ nOps = 0;
+ break;
+ case 0x0012: // hstemhm
+ // ignored
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hstemhm", nOps);
+ }
+ nHints += nOps / 2;
+ nOps = 0;
+ break;
+ case 0x0013: // hintmask
+ // ignored
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps > 0) {
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hintmask/vstemhm",
+ //~ nOps);
+ }
+ nHints += nOps / 2;
+ }
+ pos += (nHints + 7) >> 3;
+ nOps = 0;
+ break;
+ case 0x0014: // cntrmask
+ // ignored
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps > 0) {
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 cntrmask/vstemhm",
+ //~ nOps);
+ }
+ nHints += nOps / 2;
+ }
+ pos += (nHints + 7) >> 3;
+ nOps = 0;
+ break;
+ case 0x0015: // rmoveto
+ if (firstOp) {
+ cvtGlyphWidth(nOps == 3, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (openPath) {
+ charBuf->append((char)9);
+ openPath = gFalse;
+ }
+ if (nOps != 2) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 rmoveto", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ charBuf->append((char)21);
+ nOps = 0;
+ break;
+ case 0x0016: // hmoveto
+ if (firstOp) {
+ cvtGlyphWidth(nOps == 2, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (openPath) {
+ charBuf->append((char)9);
+ openPath = gFalse;
+ }
+ if (nOps != 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hmoveto", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ charBuf->append((char)22);
+ nOps = 0;
+ break;
+ case 0x0017: // vstemhm
+ // ignored
+ if (firstOp) {
+ cvtGlyphWidth(nOps & 1, charBuf, pDict);
+ firstOp = gFalse;
+ }
+ if (nOps & 1) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vstemhm", nOps);
+ }
+ nHints += nOps / 2;
+ nOps = 0;
+ break;
+ case 0x0018: // rcurveline
+ if (nOps < 8 || (nOps - 2) % 6 != 0) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 rcurveline", nOps);
+ }
+ for (k = 0; k < nOps - 2; k += 6) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf);
+ charBuf->append((char)8);
+ }
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k].isFP, charBuf);
+ charBuf->append((char)5);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0019: // rlinecurve
+ if (nOps < 8 || (nOps - 6) % 2 != 0) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 rlinecurve", nOps);
+ }
+ for (k = 0; k < nOps - 6; k += 2) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k].isFP, charBuf);
+ charBuf->append((char)5);
+ }
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf);
+ charBuf->append((char)8);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x001a: // vvcurveto
+ if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vvcurveto", nOps);
+ }
+ if (nOps % 2 == 1) {
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ charBuf->append((char)8);
+ k = 5;
+ } else {
+ k = 0;
+ }
+ for (; k < nOps; k += 4) {
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ charBuf->append((char)8);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x001b: // hhcurveto
+ if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hhcurveto", nOps);
+ }
+ if (nOps % 2 == 1) {
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ charBuf->append((char)8);
+ k = 5;
+ } else {
+ k = 0;
+ }
+ for (; k < nOps; k += 4) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ charBuf->append((char)8);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x001d: // callgsubr
+ if (nOps >= 1) {
+ k = gsubrBias + (int)ops[nOps - 1].num;
+ --nOps;
+ ok = gTrue;
+ getIndexVal(&gsubrIdx, k, &val, &ok);
+ if (ok) {
+ cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, gFalse);
+ }
+ } else {
+ //~ error(-1, "Too few args to Type 2 callgsubr");
+ }
+ // don't clear the stack
+ break;
+ case 0x001e: // vhcurveto
+ if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 vhcurveto", nOps);
+ }
+ for (k = 0; k < nOps && k != nOps-5; k += 4) {
+ if (k % 8 == 0) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ charBuf->append((char)30);
+ } else {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ charBuf->append((char)31);
+ }
+ }
+ if (k == nOps-5) {
+ if (k % 8 == 0) {
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ } else {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ }
+ charBuf->append((char)8);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x001f: // hvcurveto
+ if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hvcurveto", nOps);
+ }
+ for (k = 0; k < nOps && k != nOps-5; k += 4) {
+ if (k % 8 == 0) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ charBuf->append((char)31);
+ } else {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ charBuf->append((char)30);
+ }
+ }
+ if (k == nOps-5) {
+ if (k % 8 == 0) {
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ } else {
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[k].num, ops[k].isFP, charBuf);
+ cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf);
+ cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf);
+ cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf);
+ cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf);
+ }
+ charBuf->append((char)8);
+ }
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0c00: // dotsection (should be Type 1 only?)
+ // ignored
+ nOps = 0;
+ break;
+ case 0x0c03: // and
+ case 0x0c04: // or
+ case 0x0c05: // not
+ case 0x0c08: // store
+ case 0x0c09: // abs
+ case 0x0c0a: // add
+ case 0x0c0b: // sub
+ case 0x0c0c: // div
+ case 0x0c0d: // load
+ case 0x0c0e: // neg
+ case 0x0c0f: // eq
+ case 0x0c12: // drop
+ case 0x0c14: // put
+ case 0x0c15: // get
+ case 0x0c16: // ifelse
+ case 0x0c17: // random
+ case 0x0c18: // mul
+ case 0x0c1a: // sqrt
+ case 0x0c1b: // dup
+ case 0x0c1c: // exch
+ case 0x0c1d: // index
+ case 0x0c1e: // roll
+ //~ error(-1, "Unimplemented Type 2 charstring op: 12.%d", file[i+1]);
+ nOps = 0;
+ break;
+ case 0x0c22: // hflex
+ if (nOps != 7) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hflex", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ charBuf->append((char)8);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[5].num, ops[5].isFP, charBuf);
+ cvtNum(-ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[6].num, ops[6].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ charBuf->append((char)8);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0c23: // flex
+ if (nOps != 13) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 flex", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ cvtNum(ops[5].num, ops[5].isFP, charBuf);
+ charBuf->append((char)8);
+ cvtNum(ops[6].num, ops[6].isFP, charBuf);
+ cvtNum(ops[7].num, ops[7].isFP, charBuf);
+ cvtNum(ops[8].num, ops[8].isFP, charBuf);
+ cvtNum(ops[9].num, ops[9].isFP, charBuf);
+ cvtNum(ops[10].num, ops[10].isFP, charBuf);
+ cvtNum(ops[11].num, ops[11].isFP, charBuf);
+ charBuf->append((char)8);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0c24: // hflex1
+ if (nOps != 9) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 hflex1", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ charBuf->append((char)8);
+ cvtNum(ops[5].num, ops[5].isFP, charBuf);
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(ops[6].num, ops[6].isFP, charBuf);
+ cvtNum(ops[7].num, ops[7].isFP, charBuf);
+ cvtNum(ops[8].num, ops[8].isFP, charBuf);
+ cvtNum(-(ops[1].num + ops[3].num + ops[7].num),
+ ops[1].isFP | ops[3].isFP | ops[7].isFP, charBuf);
+ charBuf->append((char)8);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ case 0x0c25: // flex1
+ if (nOps != 11) {
+ //~ error(-1, "Wrong number of args (%d) to Type 2 flex1", nOps);
+ }
+ cvtNum(ops[0].num, ops[0].isFP, charBuf);
+ cvtNum(ops[1].num, ops[1].isFP, charBuf);
+ cvtNum(ops[2].num, ops[2].isFP, charBuf);
+ cvtNum(ops[3].num, ops[3].isFP, charBuf);
+ cvtNum(ops[4].num, ops[4].isFP, charBuf);
+ cvtNum(ops[5].num, ops[5].isFP, charBuf);
+ charBuf->append((char)8);
+ cvtNum(ops[6].num, ops[6].isFP, charBuf);
+ cvtNum(ops[7].num, ops[7].isFP, charBuf);
+ cvtNum(ops[8].num, ops[8].isFP, charBuf);
+ cvtNum(ops[9].num, ops[9].isFP, charBuf);
+ dx = ops[0].num + ops[2].num + ops[4].num + ops[6].num + ops[8].num;
+ dy = ops[1].num + ops[3].num + ops[5].num + ops[7].num + ops[9].num;
+ if (fabs(dx) > fabs(dy)) {
+ cvtNum(ops[10].num, ops[10].isFP, charBuf);
+ cvtNum(-dy, ops[1].isFP | ops[3].isFP | ops[5].isFP |
+ ops[7].isFP | ops[9].isFP, charBuf);
+ } else {
+ cvtNum(-dx, ops[0].isFP | ops[2].isFP | ops[4].isFP |
+ ops[6].isFP | ops[8].isFP, charBuf);
+ cvtNum(ops[10].num, ops[10].isFP, charBuf);
+ }
+ charBuf->append((char)8);
+ nOps = 0;
+ openPath = gTrue;
+ break;
+ default:
+ //~ error(-1, "Illegal Type 2 charstring op: %04x",
+ //~ ops[nOps].op);
+ nOps = 0;
+ break;
+ }
+ }
+ }
+
+ // charstring encryption
+ if (top) {
+ r2 = 4330;
+ for (i = start; i < charBuf->getLength(); ++i) {
+ byte = charBuf->getChar(i) ^ (r2 >> 8);
+ charBuf->setChar(i, byte);
+ r2 = (byte + r2) * 52845 + 22719;
+ }
+ }
+}
+
+void FoFiType1C::cvtGlyphWidth(GBool useOp, GooString *charBuf,
+ Type1CPrivateDict *pDict) {
+ double w;
+ GBool wFP;
+ int i;
+
+ if (useOp) {
+ w = pDict->nominalWidthX + ops[0].num;
+ wFP = pDict->nominalWidthXFP | ops[0].isFP;
+ for (i = 1; i < nOps; ++i) {
+ ops[i-1] = ops[i];
+ }
+ --nOps;
+ } else {
+ w = pDict->defaultWidthX;
+ wFP = pDict->defaultWidthXFP;
+ }
+ cvtNum(0, gFalse, charBuf);
+ cvtNum(w, wFP, charBuf);
+ charBuf->append((char)13);
+}
+
+void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) {
+ Guchar buf[12];
+ int y, n;
+
+ n = 0;
+ if (isFP) {
+ if (x >= -32768 && x < 32768) {
+ y = (int)(x * 256.0);
+ buf[0] = 255;
+ buf[1] = (Guchar)(y >> 24);
+ buf[2] = (Guchar)(y >> 16);
+ buf[3] = (Guchar)(y >> 8);
+ buf[4] = (Guchar)y;
+ buf[5] = 255;
+ buf[6] = 0;
+ buf[7] = 0;
+ buf[8] = 1;
+ buf[9] = 0;
+ buf[10] = 12;
+ buf[11] = 12;
+ n = 12;
+ } else {
+ //~ error(-1, "Type 2 fixed point constant out of range");
+ }
+ } else {
+ y = (int)x;
+ if (y >= -107 && y <= 107) {
+ buf[0] = (Guchar)(y + 139);
+ n = 1;
+ } else if (y > 107 && y <= 1131) {
+ y -= 108;
+ buf[0] = (Guchar)((y >> 8) + 247);
+ buf[1] = (Guchar)(y & 0xff);
+ n = 2;
+ } else if (y < -107 && y >= -1131) {
+ y = -y - 108;
+ buf[0] = (Guchar)((y >> 8) + 251);
+ buf[1] = (Guchar)(y & 0xff);
+ n = 2;
+ } else {
+ buf[0] = 255;
+ buf[1] = (Guchar)(y >> 24);
+ buf[2] = (Guchar)(y >> 16);
+ buf[3] = (Guchar)(y >> 8);
+ buf[4] = (Guchar)y;
+ n = 5;
+ }
+ }
+ charBuf->append((char *)buf, n);
+}
+
+void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, char *s) {
+ Guchar *p;
+ Guchar x;
+
+ for (p = (Guchar *)s; *p; ++p) {
+ x = *p ^ (eb->r1 >> 8);
+ eb->r1 = (x + eb->r1) * 52845 + 22719;
+ if (eb->ascii) {
+ (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1);
+ (*eb->outputFunc)(eb->outputStream, &hexChars[x & 0x0f], 1);
+ eb->line += 2;
+ if (eb->line == 64) {
+ (*eb->outputFunc)(eb->outputStream, "\n", 1);
+ eb->line = 0;
+ }
+ } else {
+ (*eb->outputFunc)(eb->outputStream, (char *)&x, 1);
+ }
+ }
+}
+
+void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb,
+ Guchar *s, int n) {
+ Guchar x;
+ int i;
+
+ // eexec encryption
+ for (i = 0; i < n; ++i) {
+ x = s[i] ^ (eb->r1 >> 8);
+ eb->r1 = (x + eb->r1) * 52845 + 22719;
+ if (eb->ascii) {
+ (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1);
+ (*eb->outputFunc)(eb->outputStream, &hexChars[x & 0x0f], 1);
+ eb->line += 2;
+ if (eb->line == 64) {
+ (*eb->outputFunc)(eb->outputStream, "\n", 1);
+ eb->line = 0;
+ }
+ } else {
+ (*eb->outputFunc)(eb->outputStream, (char *)&x, 1);
+ }
+ }
+}
+
+GBool FoFiType1C::parse() {
+ Type1CIndex fdIdx;
+ Type1CIndexVal val;
+ int i;
+
+ parsedOk = gTrue;
+
+ // some tools embed Type 1C fonts with an extra whitespace char at
+ // the beginning
+ if (len > 0 && file[0] != '\x01') {
+ ++file;
+ --len;
+ }
+
+ // find the indexes
+ getIndex(getU8(2, &parsedOk), &nameIdx, &parsedOk);
+ getIndex(nameIdx.endPos, &topDictIdx, &parsedOk);
+ getIndex(topDictIdx.endPos, &stringIdx, &parsedOk);
+ getIndex(stringIdx.endPos, &gsubrIdx, &parsedOk);
+ if (!parsedOk) {
+ return gFalse;
+ }
+ gsubrBias = (gsubrIdx.len < 1240) ? 107
+ : (gsubrIdx.len < 33900) ? 1131 : 32768;
+
+ // read the first font name
+ getIndexVal(&nameIdx, 0, &val, &parsedOk);
+ if (!parsedOk) {
+ return gFalse;
+ }
+ name = new GooString((char *)&file[val.pos], val.len);
+
+ // read the top dict for the first font
+ readTopDict();
+
+ // for CID fonts: read the FDArray dicts and private dicts
+ if (topDict.firstOp == 0x0c1e) {
+ if (topDict.fdArrayOffset == 0) {
+ nFDs = 1;
+ privateDicts = (Type1CPrivateDict *)gmalloc(sizeof(Type1CPrivateDict));
+ readPrivateDict(0, 0, &privateDicts[0]);
+ } else {
+ getIndex(topDict.fdArrayOffset, &fdIdx, &parsedOk);
+ if (!parsedOk) {
+ return gFalse;
+ }
+ nFDs = fdIdx.len;
+ privateDicts = (Type1CPrivateDict *)
+ gmallocn(nFDs, sizeof(Type1CPrivateDict));
+ for (i = 0; i < nFDs; ++i) {
+ getIndexVal(&fdIdx, i, &val, &parsedOk);
+ if (!parsedOk) {
+ return gFalse;
+ }
+ readFD(val.pos, val.len, &privateDicts[i]);
+ }
+ }
+
+ // for 8-bit fonts: read the private dict
+ } else {
+ privateDicts = (Type1CPrivateDict *)gmalloc(sizeof(Type1CPrivateDict));
+ readPrivateDict(topDict.privateOffset, topDict.privateSize,
+ &privateDicts[0]);
+ }
+
+ // check for parse errors in the private dict(s)
+ if (!parsedOk) {
+ return gFalse;
+ }
+
+ // get the charstrings index
+ if (topDict.charStringsOffset <= 0) {
+ parsedOk = gFalse;
+ return gFalse;
+ }
+ getIndex(topDict.charStringsOffset, &charStringsIdx, &parsedOk);
+ if (!parsedOk) {
+ return gFalse;
+ }
+ nGlyphs = charStringsIdx.len;
+
+ // for CID fonts: read the FDSelect table
+ if (topDict.firstOp == 0x0c1e) {
+ readFDSelect();
+ if (!parsedOk) {
+ return gFalse;
+ }
+ }
+
+ // read the charset
+ if (!readCharset()) {
+ parsedOk = gFalse;
+ return gFalse;
+ }
+
+ // for 8-bit fonts: build the encoding
+ if (topDict.firstOp != 0x0c14 && topDict.firstOp != 0x0c1e) {
+ buildEncoding();
+ if (!parsedOk) {
+ return gFalse;
+ }
+ }
+
+ return parsedOk;
+}
+
+void FoFiType1C::readTopDict() {
+ Type1CIndexVal topDictPtr;
+ int pos;
+
+ topDict.firstOp = -1;
+ topDict.versionSID = 0;
+ topDict.noticeSID = 0;
+ topDict.copyrightSID = 0;
+ topDict.fullNameSID = 0;
+ topDict.familyNameSID = 0;
+ topDict.weightSID = 0;
+ topDict.isFixedPitch = 0;
+ topDict.italicAngle = 0;
+ topDict.underlinePosition = -100;
+ topDict.underlineThickness = 50;
+ topDict.paintType = 0;
+ topDict.charstringType = 2;
+ topDict.fontMatrix[0] = 0.001;
+ topDict.fontMatrix[1] = 0;
+ topDict.fontMatrix[2] = 0;
+ topDict.fontMatrix[3] = 0.001;
+ topDict.fontMatrix[4] = 0;
+ topDict.fontMatrix[5] = 0;
+ topDict.hasFontMatrix = gFalse;
+ topDict.uniqueID = 0;
+ topDict.fontBBox[0] = 0;
+ topDict.fontBBox[1] = 0;
+ topDict.fontBBox[2] = 0;
+ topDict.fontBBox[3] = 0;
+ topDict.strokeWidth = 0;
+ topDict.charsetOffset = 0;
+ topDict.encodingOffset = 0;
+ topDict.charStringsOffset = 0;
+ topDict.privateSize = 0;
+ topDict.privateOffset = 0;
+ topDict.registrySID = 0;
+ topDict.orderingSID = 0;
+ topDict.supplement = 0;
+ topDict.fdArrayOffset = 0;
+ topDict.fdSelectOffset = 0;
+
+ getIndexVal(&topDictIdx, 0, &topDictPtr, &parsedOk);
+ pos = topDictPtr.pos;
+ nOps = 0;
+ while (pos < topDictPtr.pos + topDictPtr.len) {
+ pos = getOp(pos, gFalse, &parsedOk);
+ if (!parsedOk) {
+ break;
+ }
+ if (!ops[nOps - 1].isNum) {
+ --nOps; // drop the operator
+ if (topDict.firstOp < 0) {
+ topDict.firstOp = ops[nOps].op;
+ }
+ switch (ops[nOps].op) {
+ case 0x0000: topDict.versionSID = (int)ops[0].num; break;
+ case 0x0001: topDict.noticeSID = (int)ops[0].num; break;
+ case 0x0c00: topDict.copyrightSID = (int)ops[0].num; break;
+ case 0x0002: topDict.fullNameSID = (int)ops[0].num; break;
+ case 0x0003: topDict.familyNameSID = (int)ops[0].num; break;
+ case 0x0004: topDict.weightSID = (int)ops[0].num; break;
+ case 0x0c01: topDict.isFixedPitch = (int)ops[0].num; break;
+ case 0x0c02: topDict.italicAngle = ops[0].num; break;
+ case 0x0c03: topDict.underlinePosition = ops[0].num; break;
+ case 0x0c04: topDict.underlineThickness = ops[0].num; break;
+ case 0x0c05: topDict.paintType = (int)ops[0].num; break;
+ case 0x0c06: topDict.charstringType = (int)ops[0].num; break;
+ case 0x0c07: topDict.fontMatrix[0] = ops[0].num;
+ topDict.fontMatrix[1] = ops[1].num;
+ topDict.fontMatrix[2] = ops[2].num;
+ topDict.fontMatrix[3] = ops[3].num;
+ topDict.fontMatrix[4] = ops[4].num;
+ topDict.fontMatrix[5] = ops[5].num;
+ topDict.hasFontMatrix = gTrue; break;
+ case 0x000d: topDict.uniqueID = (int)ops[0].num; break;
+ case 0x0005: topDict.fontBBox[0] = ops[0].num;
+ topDict.fontBBox[1] = ops[1].num;
+ topDict.fontBBox[2] = ops[2].num;
+ topDict.fontBBox[3] = ops[3].num; break;
+ case 0x0c08: topDict.strokeWidth = ops[0].num; break;
+ case 0x000f: topDict.charsetOffset = (int)ops[0].num; break;
+ case 0x0010: topDict.encodingOffset = (int)ops[0].num; break;
+ case 0x0011: topDict.charStringsOffset = (int)ops[0].num; break;
+ case 0x0012: topDict.privateSize = (int)ops[0].num;
+ topDict.privateOffset = (int)ops[1].num; break;
+ case 0x0c1e: topDict.registrySID = (int)ops[0].num;
+ topDict.orderingSID = (int)ops[1].num;
+ topDict.supplement = (int)ops[2].num; break;
+ case 0x0c24: topDict.fdArrayOffset = (int)ops[0].num; break;
+ case 0x0c25: topDict.fdSelectOffset = (int)ops[0].num; break;
+ }
+ nOps = 0;
+ }
+ }
+}
+
+// Read a CID font dict (FD) - this pulls out the private dict
+// pointer, and reads the private dict. It also pulls the FontMatrix
+// (if any) out of the FD.
+void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) {
+ int pos, pSize, pOffset;
+ double fontMatrix[6] = {0};
+ GBool hasFontMatrix;
+
+ hasFontMatrix = gFalse;
+ pSize = pOffset = 0;
+ pos = offset;
+ nOps = 0;
+ while (pos < offset + length) {
+ pos = getOp(pos, gFalse, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if (!ops[nOps - 1].isNum) {
+ if (ops[nOps - 1].op == 0x0012) {
+ if (nOps < 3) {
+ parsedOk = gFalse;
+ return;
+ }
+ pSize = (int)ops[0].num;
+ pOffset = (int)ops[1].num;
+ break;
+ } else if (ops[nOps - 1].op == 0x0c07) {
+ fontMatrix[0] = ops[0].num;
+ fontMatrix[1] = ops[1].num;
+ fontMatrix[2] = ops[2].num;
+ fontMatrix[3] = ops[3].num;
+ fontMatrix[4] = ops[4].num;
+ fontMatrix[5] = ops[5].num;
+ hasFontMatrix = gTrue;
+ }
+ nOps = 0;
+ }
+ }
+ readPrivateDict(pOffset, pSize, pDict);
+ if (hasFontMatrix) {
+ pDict->fontMatrix[0] = fontMatrix[0];
+ pDict->fontMatrix[1] = fontMatrix[1];
+ pDict->fontMatrix[2] = fontMatrix[2];
+ pDict->fontMatrix[3] = fontMatrix[3];
+ pDict->fontMatrix[4] = fontMatrix[4];
+ pDict->fontMatrix[5] = fontMatrix[5];
+ pDict->hasFontMatrix = gTrue;
+ }
+}
+
+void FoFiType1C::readPrivateDict(int offset, int length,
+ Type1CPrivateDict *pDict) {
+ int pos;
+
+ pDict->hasFontMatrix = gFalse;
+ pDict->nBlueValues = 0;
+ pDict->nOtherBlues = 0;
+ pDict->nFamilyBlues = 0;
+ pDict->nFamilyOtherBlues = 0;
+ pDict->blueScale = 0.039625;
+ pDict->blueShift = 7;
+ pDict->blueFuzz = 1;
+ pDict->hasStdHW = gFalse;
+ pDict->hasStdVW = gFalse;
+ pDict->nStemSnapH = 0;
+ pDict->nStemSnapV = 0;
+ pDict->hasForceBold = gFalse;
+ pDict->forceBoldThreshold = 0;
+ pDict->languageGroup = 0;
+ pDict->expansionFactor = 0.06;
+ pDict->initialRandomSeed = 0;
+ pDict->subrsOffset = 0;
+ pDict->defaultWidthX = 0;
+ pDict->defaultWidthXFP = gFalse;
+ pDict->nominalWidthX = 0;
+ pDict->nominalWidthXFP = gFalse;
+
+ // no dictionary
+ if (offset == 0 || length == 0) {
+ return;
+ }
+
+ pos = offset;
+ nOps = 0;
+ while (pos < offset + length) {
+ pos = getOp(pos, gFalse, &parsedOk);
+ if (!parsedOk) {
+ break;
+ }
+ if (!ops[nOps - 1].isNum) {
+ --nOps; // drop the operator
+ switch (ops[nOps].op) {
+ case 0x0006:
+ pDict->nBlueValues = getDeltaIntArray(pDict->blueValues,
+ type1CMaxBlueValues);
+ break;
+ case 0x0007:
+ pDict->nOtherBlues = getDeltaIntArray(pDict->otherBlues,
+ type1CMaxOtherBlues);
+ break;
+ case 0x0008:
+ pDict->nFamilyBlues = getDeltaIntArray(pDict->familyBlues,
+ type1CMaxBlueValues);
+ break;
+ case 0x0009:
+ pDict->nFamilyOtherBlues = getDeltaIntArray(pDict->familyOtherBlues,
+ type1CMaxOtherBlues);
+ break;
+ case 0x0c09:
+ pDict->blueScale = ops[0].num;
+ break;
+ case 0x0c0a:
+ pDict->blueShift = (int)ops[0].num;
+ break;
+ case 0x0c0b:
+ pDict->blueFuzz = (int)ops[0].num;
+ break;
+ case 0x000a:
+ pDict->stdHW = ops[0].num;
+ pDict->hasStdHW = gTrue;
+ break;
+ case 0x000b:
+ pDict->stdVW = ops[0].num;
+ pDict->hasStdVW = gTrue;
+ break;
+ case 0x0c0c:
+ pDict->nStemSnapH = getDeltaFPArray(pDict->stemSnapH,
+ type1CMaxStemSnap);
+ break;
+ case 0x0c0d:
+ pDict->nStemSnapV = getDeltaFPArray(pDict->stemSnapV,
+ type1CMaxStemSnap);
+ break;
+ case 0x0c0e:
+ pDict->forceBold = ops[0].num != 0;
+ pDict->hasForceBold = gTrue;
+ break;
+ case 0x0c0f:
+ pDict->forceBoldThreshold = ops[0].num;
+ break;
+ case 0x0c11:
+ pDict->languageGroup = (int)ops[0].num;
+ break;
+ case 0x0c12:
+ pDict->expansionFactor = ops[0].num;
+ break;
+ case 0x0c13:
+ pDict->initialRandomSeed = (int)ops[0].num;
+ break;
+ case 0x0013:
+ pDict->subrsOffset = offset + (int)ops[0].num;
+ break;
+ case 0x0014:
+ pDict->defaultWidthX = ops[0].num;
+ pDict->defaultWidthXFP = ops[0].isFP;
+ break;
+ case 0x0015:
+ pDict->nominalWidthX = ops[0].num;
+ pDict->nominalWidthXFP = ops[0].isFP;
+ break;
+ }
+ nOps = 0;
+ }
+ }
+}
+
+void FoFiType1C::readFDSelect() {
+ int fdSelectFmt, pos, nRanges, gid0, gid1, fd, i, j;
+
+ fdSelect = (Guchar *)gmalloc(nGlyphs);
+ if (topDict.fdSelectOffset == 0) {
+ for (i = 0; i < nGlyphs; ++i) {
+ fdSelect[i] = 0;
+ }
+ } else {
+ pos = topDict.fdSelectOffset;
+ fdSelectFmt = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if (fdSelectFmt == 0) {
+ if (!checkRegion(pos, nGlyphs)) {
+ parsedOk = gFalse;
+ return;
+ }
+ memcpy(fdSelect, file + pos, nGlyphs);
+ } else if (fdSelectFmt == 3) {
+ nRanges = getU16BE(pos, &parsedOk);
+ pos += 2;
+ gid0 = getU16BE(pos, &parsedOk);
+ pos += 2;
+ for (i = 1; i <= nRanges; ++i) {
+ fd = getU8(pos++, &parsedOk);
+ gid1 = getU16BE(pos, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ pos += 2;
+ if (gid0 > gid1 || gid1 > nGlyphs) {
+ //~ error(-1, "Bad FDSelect table in CID font");
+ parsedOk = gFalse;
+ return;
+ }
+ for (j = gid0; j < gid1; ++j) {
+ fdSelect[j] = fd;
+ }
+ gid0 = gid1;
+ }
+ } else {
+ //~ error(-1, "Unknown FDSelect table format in CID font");
+ for (i = 0; i < nGlyphs; ++i) {
+ fdSelect[i] = 0;
+ }
+ }
+ }
+}
+
+void FoFiType1C::buildEncoding() {
+ char buf[256];
+ int nCodes, nRanges, encFormat;
+ int pos, c, sid, nLeft, nSups, i, j;
+
+ if (topDict.encodingOffset == 0) {
+ encoding = fofiType1StandardEncoding;
+
+ } else if (topDict.encodingOffset == 1) {
+ encoding = fofiType1ExpertEncoding;
+
+ } else {
+ encoding = (char **)gmallocn(256, sizeof(char *));
+ for (i = 0; i < 256; ++i) {
+ encoding[i] = NULL;
+ }
+ pos = topDict.encodingOffset;
+ encFormat = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if ((encFormat & 0x7f) == 0) {
+ nCodes = 1 + getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if (nCodes > nGlyphs) {
+ nCodes = nGlyphs;
+ }
+ for (i = 1; i < nCodes; ++i) {
+ c = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ if (encoding[c]) {
+ gfree(encoding[c]);
+ }
+ encoding[c] = copyString(getString(charset[i], buf, &parsedOk));
+ }
+ } else if ((encFormat & 0x7f) == 1) {
+ nRanges = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ nCodes = 1;
+ for (i = 0; i < nRanges; ++i) {
+ c = getU8(pos++, &parsedOk);
+ nLeft = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ for (j = 0; j <= nLeft && nCodes < nGlyphs; ++j) {
+ if (c < 256) {
+ if (encoding[c]) {
+ gfree(encoding[c]);
+ }
+ encoding[c] = copyString(getString(charset[nCodes], buf,
+ &parsedOk));
+ }
+ ++nCodes;
+ ++c;
+ }
+ }
+ }
+ if (encFormat & 0x80) {
+ nSups = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ return;
+ }
+ for (i = 0; i < nSups; ++i) {
+ c = getU8(pos++, &parsedOk);;
+ if (!parsedOk) {
+ return;;
+ }
+ sid = getU16BE(pos, &parsedOk);
+ pos += 2;
+ if (!parsedOk) {
+ return;
+ }
+ if (encoding[c]) {
+ gfree(encoding[c]);
+ }
+ encoding[c] = copyString(getString(sid, buf, &parsedOk));
+ }
+ }
+ }
+}
+
+GBool FoFiType1C::readCharset() {
+ int charsetFormat, c, pos;
+ int nLeft, i, j;
+
+ if (topDict.charsetOffset == 0) {
+ charset = fofiType1CISOAdobeCharset;
+ } else if (topDict.charsetOffset == 1) {
+ charset = fofiType1CExpertCharset;
+ } else if (topDict.charsetOffset == 2) {
+ charset = fofiType1CExpertSubsetCharset;
+ } else {
+ charset = (Gushort *)gmallocn(nGlyphs, sizeof(Gushort));
+ for (i = 0; i < nGlyphs; ++i) {
+ charset[i] = 0;
+ }
+ pos = topDict.charsetOffset;
+ charsetFormat = getU8(pos++, &parsedOk);
+ if (charsetFormat == 0) {
+ for (i = 1; i < nGlyphs; ++i) {
+ charset[i] = (Gushort)getU16BE(pos, &parsedOk);
+ pos += 2;
+ if (!parsedOk) {
+ break;
+ }
+ }
+ } else if (charsetFormat == 1) {
+ i = 1;
+ while (i < nGlyphs) {
+ c = getU16BE(pos, &parsedOk);
+ pos += 2;
+ nLeft = getU8(pos++, &parsedOk);
+ if (!parsedOk) {
+ break;
+ }
+ for (j = 0; j <= nLeft && i < nGlyphs; ++j) {
+ charset[i++] = (Gushort)c++;
+ }
+ }
+ } else if (charsetFormat == 2) {
+ i = 1;
+ while (i < nGlyphs) {
+ c = getU16BE(pos, &parsedOk);
+ pos += 2;
+ nLeft = getU16BE(pos, &parsedOk);
+ pos += 2;
+ if (!parsedOk) {
+ break;
+ }
+ for (j = 0; j <= nLeft && i < nGlyphs; ++j) {
+ charset[i++] = (Gushort)c++;
+ }
+ }
+ }
+ if (!parsedOk) {
+ gfree(charset);
+ charset = NULL;
+ return gFalse;
+ }
+ }
+ return gTrue;
+}
+
+int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) {
+ static char nybChars[16] = "0123456789.ee -";
+ Type1COp op;
+ char buf[65];
+ int b0, b1, nyb0, nyb1, x, i;
+
+ b0 = getU8(pos++, ok);
+ op.isNum = gTrue;
+ op.isFP = gFalse;
+
+ if (b0 == 28) {
+ x = getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ if (x & 0x8000) {
+ x |= ~0xffff;
+ }
+ op.num = x;
+
+ } else if (!charstring && b0 == 29) {
+ x = getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ if (x & 0x80000000) {
+ x |= ~0xffffffff;
+ }
+ op.num = x;
+
+ } else if (!charstring && b0 == 30) {
+ i = 0;
+ do {
+ b1 = getU8(pos++, ok);
+ nyb0 = b1 >> 4;
+ nyb1 = b1 & 0x0f;
+ if (nyb0 == 0xf) {
+ break;
+ }
+ buf[i++] = nybChars[nyb0];
+ if (i == 64) {
+ break;
+ }
+ if (nyb0 == 0xc) {
+ buf[i++] = '-';
+ }
+ if (i == 64) {
+ break;
+ }
+ if (nyb1 == 0xf) {
+ break;
+ }
+ buf[i++] = nybChars[nyb1];
+ if (i == 64) {
+ break;
+ }
+ if (nyb1 == 0xc) {
+ buf[i++] = '-';
+ }
+ } while (i < 64);
+ buf[i] = '\0';
+ op.num = gatof(buf);
+ op.isFP = gTrue;
+
+ } else if (b0 >= 32 && b0 <= 246) {
+ op.num = b0 - 139;
+
+ } else if (b0 >= 247 && b0 <= 250) {
+ op.num = ((b0 - 247) << 8) + getU8(pos++, ok) + 108;
+
+ } else if (b0 >= 251 && b0 <= 254) {
+ op.num = -((b0 - 251) << 8) - getU8(pos++, ok) - 108;
+
+ } else if (charstring && b0 == 255) {
+ x = getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ x = (x << 8) | getU8(pos++, ok);
+ if (x & 0x80000000) {
+ x |= ~0xffffffff;
+ }
+ op.num = (double)x / 65536.0;
+ op.isFP = gTrue;
+
+ } else if (b0 == 12) {
+ op.isNum = gFalse;
+ op.op = 0x0c00 + getU8(pos++, ok);
+
+ } else {
+ op.isNum = gFalse;
+ op.op = b0;
+ }
+
+ if (nOps < 49) {
+ ops[nOps++] = op;
+ }
+
+ return pos;
+}
+
+// Convert the delta-encoded ops array to an array of ints.
+int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) {
+ int x;
+ int n, i;
+
+ if ((n = nOps) > maxLen) {
+ n = maxLen;
+ }
+ x = 0;
+ for (i = 0; i < n; ++i) {
+ x += (int)ops[i].num;
+ arr[i] = x;
+ }
+ return n;
+}
+
+// Convert the delta-encoded ops array to an array of doubles.
+int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) {
+ double x;
+ int n, i;
+
+ if ((n = nOps) > maxLen) {
+ n = maxLen;
+ }
+ x = 0;
+ for (i = 0; i < n; ++i) {
+ x += ops[i].num;
+ arr[i] = x;
+ }
+ return n;
+}
+
+void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) {
+ idx->pos = pos;
+ idx->len = getU16BE(pos, ok);
+ if (idx->len == 0) {
+ // empty indexes are legal and contain just the length field
+ idx->offSize = 0;
+ idx->startPos = idx->endPos = pos + 2;
+ } else {
+ idx->offSize = getU8(pos + 2, ok);
+ if (idx->offSize < 1 || idx->offSize > 4) {
+ *ok = gFalse;
+ }
+ idx->startPos = pos + 3 + (idx->len + 1) * idx->offSize - 1;
+ if (idx->startPos < 0 || idx->startPos >= len) {
+ *ok = gFalse;
+ }
+ idx->endPos = idx->startPos + getUVarBE(pos + 3 + idx->len * idx->offSize,
+ idx->offSize, ok);
+ if (idx->endPos < idx->startPos || idx->endPos > len) {
+ *ok = gFalse;
+ }
+ }
+}
+
+void FoFiType1C::getIndexVal(Type1CIndex *idx, int i,
+ Type1CIndexVal *val, GBool *ok) {
+ int pos0, pos1;
+
+ if (i < 0 || i >= idx->len) {
+ *ok = gFalse;
+ return;
+ }
+ pos0 = idx->startPos + getUVarBE(idx->pos + 3 + i * idx->offSize,
+ idx->offSize, ok);
+ pos1 = idx->startPos + getUVarBE(idx->pos + 3 + (i + 1) * idx->offSize,
+ idx->offSize, ok);
+ if (pos0 < idx->startPos || pos0 > idx->endPos ||
+ pos1 <= idx->startPos || pos1 > idx->endPos ||
+ pos1 < pos0) {
+ *ok = gFalse;
+ }
+ val->pos = pos0;
+ val->len = pos1 - pos0;
+}
+
+char *FoFiType1C::getString(int sid, char *buf, GBool *ok) {
+ Type1CIndexVal val;
+ int n;
+
+ if (sid < 391) {
+ strcpy(buf, fofiType1CStdStrings[sid]);
+ } else {
+ sid -= 391;
+ getIndexVal(&stringIdx, sid, &val, ok);
+ if (*ok) {
+ if ((n = val.len) > 255) {
+ n = 255;
+ }
+ strncpy(buf, (char *)&file[val.pos], n);
+ buf[n] = '\0';
+ } else {
+ buf[0] = '\0';
+ }
+ }
+ return buf;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.h b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.h
new file mode 100644
index 00000000000..694d5cc7a30
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/FoFiType1C.h
@@ -0,0 +1,245 @@
+//========================================================================
+//
+// FoFiType1C.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef FOFITYPE1C_H
+#define FOFITYPE1C_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "FoFiBase.h"
+
+class GooString;
+
+//------------------------------------------------------------------------
+
+struct Type1CIndex {
+ int pos; // absolute position in file
+ int len; // length (number of entries)
+ int offSize; // offset size
+ int startPos; // position of start of index data - 1
+ int endPos; // position one byte past end of the index
+};
+
+struct Type1CIndexVal {
+ int pos; // absolute position in file
+ int len; // length, in bytes
+};
+
+struct Type1CTopDict {
+ int firstOp;
+
+ int versionSID;
+ int noticeSID;
+ int copyrightSID;
+ int fullNameSID;
+ int familyNameSID;
+ int weightSID;
+ int isFixedPitch;
+ double italicAngle;
+ double underlinePosition;
+ double underlineThickness;
+ int paintType;
+ int charstringType;
+ double fontMatrix[6];
+ GBool hasFontMatrix; // CID fonts are allowed to put their
+ // FontMatrix in the FD instead of the
+ // top dict
+ int uniqueID;
+ double fontBBox[4];
+ double strokeWidth;
+ int charsetOffset;
+ int encodingOffset;
+ int charStringsOffset;
+ int privateSize;
+ int privateOffset;
+
+ // CIDFont entries
+ int registrySID;
+ int orderingSID;
+ int supplement;
+ int fdArrayOffset;
+ int fdSelectOffset;
+};
+
+#define type1CMaxBlueValues 14
+#define type1CMaxOtherBlues 10
+#define type1CMaxStemSnap 12
+
+struct Type1CPrivateDict {
+ double fontMatrix[6];
+ GBool hasFontMatrix;
+ int blueValues[type1CMaxBlueValues];
+ int nBlueValues;
+ int otherBlues[type1CMaxOtherBlues];
+ int nOtherBlues;
+ int familyBlues[type1CMaxBlueValues];
+ int nFamilyBlues;
+ int familyOtherBlues[type1CMaxOtherBlues];
+ int nFamilyOtherBlues;
+ double blueScale;
+ int blueShift;
+ int blueFuzz;
+ double stdHW;
+ GBool hasStdHW;
+ double stdVW;
+ GBool hasStdVW;
+ double stemSnapH[type1CMaxStemSnap];
+ int nStemSnapH;
+ double stemSnapV[type1CMaxStemSnap];
+ int nStemSnapV;
+ GBool forceBold;
+ GBool hasForceBold;
+ double forceBoldThreshold;
+ int languageGroup;
+ double expansionFactor;
+ int initialRandomSeed;
+ int subrsOffset;
+ double defaultWidthX;
+ GBool defaultWidthXFP;
+ double nominalWidthX;
+ GBool nominalWidthXFP;
+};
+
+struct Type1COp {
+ GBool isNum; // true -> number, false -> operator
+ GBool isFP; // true -> floating point number, false -> int
+ union {
+ double num; // if num is true
+ int op; // if num is false
+ };
+};
+
+struct Type1CEexecBuf {
+ FoFiOutputFunc outputFunc;
+ void *outputStream;
+ GBool ascii; // ASCII encoding?
+ Gushort r1; // eexec encryption key
+ int line; // number of eexec chars left on current line
+};
+
+//------------------------------------------------------------------------
+// FoFiType1C
+//------------------------------------------------------------------------
+
+class FoFiType1C: public FoFiBase {
+public:
+
+ // Create a FoFiType1C object from a memory buffer.
+ static FoFiType1C *make(char *fileA, int lenA);
+
+ // Create a FoFiType1C object from a file on disk.
+ static FoFiType1C *load(char *fileName);
+
+ virtual ~FoFiType1C();
+
+ // Return the font name.
+ char *getName();
+
+ // Return the encoding, as an array of 256 names (any of which may
+ // be NULL). This is only useful with 8-bit fonts.
+ char **getEncoding();
+
+ // Return the mapping from CIDs to GIDs, and return the number of
+ // CIDs in *<nCIDs>. This is only useful for CID fonts.
+ Gushort *getCIDToGIDMap(int *nCIDs);
+
+ // Convert to a Type 1 font, suitable for embedding in a PostScript
+ // file. This is only useful with 8-bit fonts. If <newEncoding> is
+ // not NULL, it will be used in place of the encoding in the Type 1C
+ // font. If <ascii> is true the eexec section will be hex-encoded,
+ // otherwise it will be left as binary data. If <psName> is non-NULL,
+ // it will be used as the PostScript font name.
+ void convertToType1(char *psName, char **newEncoding, GBool ascii,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 0 CIDFont, suitable for embedding in a
+ // PostScript file. <psName> will be used as the PostScript font
+ // name.
+ void convertToCIDType0(char *psName,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+ // Convert to a Type 0 (but non-CID) composite font, suitable for
+ // embedding in a PostScript file. <psName> will be used as the
+ // PostScript font name.
+ void convertToType0(char *psName,
+ FoFiOutputFunc outputFunc, void *outputStream);
+
+private:
+
+ FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
+ void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
+ int offset, int nBytes,
+ Type1CIndex *subrIdx,
+ Type1CPrivateDict *pDict);
+ void cvtGlyph(int offset, int nBytes, GooString *charBuf,
+ Type1CIndex *subrIdx, Type1CPrivateDict *pDict,
+ GBool top);
+ void cvtGlyphWidth(GBool useOp, GooString *charBuf,
+ Type1CPrivateDict *pDict);
+ void cvtNum(double x, GBool isFP, GooString *charBuf);
+ void eexecWrite(Type1CEexecBuf *eb, char *s);
+ void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n);
+ GBool parse();
+ void readTopDict();
+ void readFD(int offset, int length, Type1CPrivateDict *pDict);
+ void readPrivateDict(int offset, int length, Type1CPrivateDict *pDict);
+ void readFDSelect();
+ void buildEncoding();
+ GBool readCharset();
+ int getOp(int pos, GBool charstring, GBool *ok);
+ int getDeltaIntArray(int *arr, int maxLen);
+ int getDeltaFPArray(double *arr, int maxLen);
+ void getIndex(int pos, Type1CIndex *idx, GBool *ok);
+ void getIndexVal(Type1CIndex *idx, int i, Type1CIndexVal *val, GBool *ok);
+ char *getString(int sid, char *buf, GBool *ok);
+
+ GooString *name;
+ char **encoding;
+
+ Type1CIndex nameIdx;
+ Type1CIndex topDictIdx;
+ Type1CIndex stringIdx;
+ Type1CIndex gsubrIdx;
+ Type1CIndex charStringsIdx;
+
+ Type1CTopDict topDict;
+ Type1CPrivateDict *privateDicts;
+
+ int nGlyphs;
+ int nFDs;
+ Guchar *fdSelect;
+ Gushort *charset;
+ int gsubrBias;
+
+ GBool parsedOk;
+
+ Type1COp ops[49]; // operands and operator
+ int nOps; // number of operands
+ int nHints; // number of hints for the current glyph
+ GBool firstOp; // true if we haven't hit the first op yet
+ GBool openPath; // true if there is an unclosed path
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.am
new file mode 100644
index 00000000000..7a302486505
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.am
@@ -0,0 +1,26 @@
+INCLUDES = \
+ -I$(top_srcdir)
+
+noinst_LTLIBRARIES = libfofi.la
+
+if ENABLE_XPDF_HEADERS
+poppler_fofi_includedir = $(includedir)/poppler/fofi
+poppler_fofi_include_HEADERS = \
+ FoFiBase.h \
+ FoFiEncodings.h \
+ FoFiTrueType.h \
+ FoFiType1.h \
+ FoFiType1C.h
+endif
+
+libfofi_la_SOURCES = \
+ FoFiBase.cc \
+ FoFiBase.h \
+ FoFiEncodings.cc \
+ FoFiEncodings.h \
+ FoFiTrueType.cc \
+ FoFiTrueType.h \
+ FoFiType1.cc \
+ FoFiType1.h \
+ FoFiType1C.cc \
+ FoFiType1C.h
diff --git a/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.in
new file mode 100644
index 00000000000..3c7c55fd70c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/fofi/Makefile.in
@@ -0,0 +1,649 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = fofi
+DIST_COMMON = $(am__poppler_fofi_include_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libfofi_la_LIBADD =
+am_libfofi_la_OBJECTS = FoFiBase.lo FoFiEncodings.lo FoFiTrueType.lo \
+ FoFiType1.lo FoFiType1C.lo
+libfofi_la_OBJECTS = $(am_libfofi_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libfofi_la_SOURCES)
+DIST_SOURCES = $(libfofi_la_SOURCES)
+am__poppler_fofi_include_HEADERS_DIST = FoFiBase.h FoFiEncodings.h \
+ FoFiTrueType.h FoFiType1.h FoFiType1C.h
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(poppler_fofi_includedir)"
+HEADERS = $(poppler_fofi_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir)
+
+noinst_LTLIBRARIES = libfofi.la
+@ENABLE_XPDF_HEADERS_TRUE@poppler_fofi_includedir = $(includedir)/poppler/fofi
+@ENABLE_XPDF_HEADERS_TRUE@poppler_fofi_include_HEADERS = \
+@ENABLE_XPDF_HEADERS_TRUE@ FoFiBase.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FoFiEncodings.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FoFiTrueType.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FoFiType1.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FoFiType1C.h
+
+libfofi_la_SOURCES = \
+ FoFiBase.cc \
+ FoFiBase.h \
+ FoFiEncodings.cc \
+ FoFiEncodings.h \
+ FoFiTrueType.cc \
+ FoFiTrueType.h \
+ FoFiType1.cc \
+ FoFiType1.h \
+ FoFiType1C.cc \
+ FoFiType1C.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fofi/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign fofi/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libfofi.la: $(libfofi_la_OBJECTS) $(libfofi_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(libfofi_la_OBJECTS) $(libfofi_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiBase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiEncodings.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiTrueType.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1C.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_fofi_includeHEADERS: $(poppler_fofi_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_fofi_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_fofi_includedir)"
+ @list='$(poppler_fofi_include_HEADERS)'; test -n "$(poppler_fofi_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_fofi_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_fofi_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_fofi_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_fofi_include_HEADERS)'; test -n "$(poppler_fofi_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_fofi_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_fofi_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(poppler_fofi_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_fofi_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-poppler_fofi_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-poppler_fofi_includeHEADERS \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am \
+ uninstall-poppler_fofi_includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/glib/CMakeLists.txt
new file mode 100644
index 00000000000..6ed95230104
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/CMakeLists.txt
@@ -0,0 +1,117 @@
+add_definitions(-DG_LOG_DOMAIN=\"Poppler\" ${GLIB2_CFLAGS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+if (CAIRO_FOUND)
+ include_directories(${CAIRO_INCLUDES})
+ set (CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
+ add_definitions(${CAIRO_CFLAGS})
+else (CAIRO_FOUND)
+ set (CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
+endif (CAIRO_FOUND)
+
+if (GDK_FOUND)
+ add_definitions(${GDK2_CFLAGS})
+endif (GDK_FOUND)
+
+configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h @ONLY)
+
+if (GTK_FOUND)
+ add_subdirectory(demo)
+endif (GTK_FOUND)
+
+set(poppler_glib_public_headers
+ poppler-action.h
+ poppler-date.h
+ poppler-document.h
+ poppler-page.h
+ poppler-attachment.h
+ poppler-form-field.h
+ poppler-annot.h
+ poppler.h
+)
+
+find_program(GLIB2_MKENUMS glib-mkenums)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
+ COMMAND ${GLIB2_MKENUMS}
+ ARGS
+ --fhead \"\#ifndef __POPPLER_TYPE_ENUMS_H__\\n\"
+ --fhead \"\#define __POPPLER_TYPE_ENUMS_H__ 1\\n\\n\"
+ --fhead \"\#include <glib-object.h>\\n\\n\"
+ --fhead \"G_BEGIN_DECLS\\n\\n\"
+ --ftail \"G_END_DECLS\\n\\n\"
+ --ftail \"\#endif /* __POPPLER_TYPE_ENUMS_H__ */\\n\"
+ --fprod \"\\n/* --- @filename@ --- */\"
+ --eprod \"\#define POPPLER_TYPE_@ENUMSHORT@ \(@enum_name@_get_type\(\)\)\\n\"
+ --eprod \"GType @enum_name@_get_type \(void\) G_GNUC_CONST\;\\n\"
+ ${poppler_glib_public_headers} > ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${poppler_glib_public_headers}
+)
+
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
+ COMMAND ${GLIB2_MKENUMS}
+ ARGS
+ --fhead \"\#include \\"poppler-enums.h\\"\\n\\n\"
+ --fprod \"\\n/* enumerations from \\"@filename@\\" */\"
+ --fprod \"\\n\#include \\"@filename@\\"\"
+ --vhead \"static const G@Type@Value _@enum_name@_values[] = {\"
+ --vprod \" { @VALUENAME@, \\"@VALUENAME@\\", \\"@valuenick@\\" },\"
+ --vtail \" { 0, NULL, NULL }\\n}\;\\n\\n\"
+ --vtail \"GType\\n@enum_name@_get_type \(void\)\\n{\\n\"
+ --vtail \" static GType type = 0\;\\n\\n\"
+ --vtail \" if \(G_UNLIKELY \(type == 0\)\)\\n\"
+ --vtail \" type = g_\@type\@_register_static \(\\"@EnumName@\\", _@enum_name@_values\)\;\\n\\n\"
+ --vtail \" return type\;\\n}\\n\\n\"
+ ${poppler_glib_public_headers} > ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${poppler_glib_public_headers} ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
+)
+
+
+set(poppler_glib_SRCS
+ poppler-action.cc
+ poppler-date.cc
+ poppler-document.cc
+ poppler-page.cc
+ poppler-attachment.cc
+ poppler-form-field.cc
+ poppler-annot.cc
+ poppler-layer.cc
+ poppler.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
+)
+if (CAIRO_FOUND)
+ set(poppler_glib_SRCS ${poppler_glib_SRCS}
+ ${CMAKE_SOURCE_DIR}/poppler/CairoFontEngine.cc
+ ${CMAKE_SOURCE_DIR}/poppler/CairoOutputDev.cc
+ )
+endif (CAIRO_FOUND)
+add_library(poppler-glib SHARED ${poppler_glib_SRCS})
+set_target_properties(poppler-glib PROPERTIES VERSION 4.0.0 SOVERSION 4)
+target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES})
+if (CAIRO_FOUND)
+ target_link_libraries(poppler-glib ${CAIRO_LIBRARIES})
+endif (CAIRO_FOUND)
+install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+install(FILES
+ ${poppler_glib_public_headers}
+ ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
+ ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h
+ DESTINATION include/poppler/glib)
+
+
+if (GDK_FOUND)
+ set(test_poppler_glib_SRCS
+ test-poppler-glib.cc
+ )
+ poppler_add_test(test-poppler-glib BUILD_GTK_TESTS ${test_poppler_glib_SRCS})
+ target_link_libraries(test-poppler-glib poppler-glib ${GDK2_LIBRARIES})
+endif (GDK_FOUND)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.am
new file mode 100644
index 00000000000..3c065fe267a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.am
@@ -0,0 +1,110 @@
+if BUILD_CAIRO_OUTPUT
+
+cairo_includes = \
+ $(CAIRO_CFLAGS)
+
+cairo_libs = \
+ $(top_builddir)/poppler/libpoppler-cairo.la \
+ $(CAIRO_LIBS)
+
+endif
+
+SUBDIRS = . reference demo
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"Poppler\" \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ $(cairo_includes) \
+ $(POPPLER_GLIB_CFLAGS) \
+ $(GDK_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
+ $(cairo_includes) \
+ $(POPPLER_GLIB_DISABLE_DEPRECATED) \
+ $(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+
+stamp_files = stamp-poppler-enums.h
+
+poppler-enums.h: stamp-poppler-enums.h
+ @true
+
+stamp-poppler-enums.h: poppler-enums.h.template $(poppler_glib_public_headers)
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
+ && (cmp -s xgen-etbh poppler-enums.h || cp xgen-etbh poppler-enums.h ) \
+ && rm -f xgen-etbh \
+ && echo timestamp > $(@F)
+
+poppler-enums.c: poppler-enums.c.template $(poppler_glib_public_headers)
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
+ && (cmp -s xgen-etbc poppler-enums.c || cp xgen-etbc poppler-enums.c ) \
+ && rm -f xgen-etbc
+
+EXTRA_DIST = \
+ poppler-enums.h.template \
+ poppler-enums.c.template
+
+poppler_glib_public_headers = \
+ poppler-action.h \
+ poppler-date.h \
+ poppler-document.h \
+ poppler-page.h \
+ poppler-attachment.h \
+ poppler-form-field.h \
+ poppler-annot.h \
+ poppler-layer.h \
+ poppler.h
+
+poppler_glib_includedir = $(includedir)/poppler/glib
+
+poppler_glib_include_HEADERS = \
+ $(poppler_glib_public_headers) \
+ poppler-enums.h \
+ poppler-features.h
+
+lib_LTLIBRARIES = libpoppler-glib.la
+libpoppler_glib_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ poppler-action.cc \
+ poppler-date.cc \
+ poppler-document.cc \
+ poppler-page.cc \
+ poppler-attachment.cc \
+ poppler-form-field.cc \
+ poppler-annot.cc \
+ poppler-layer.cc \
+ poppler.cc \
+ poppler-private.h
+
+libpoppler_glib_la_LIBADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(POPPLER_GLIB_LIBS) \
+ $(GDK_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(cairo_libs)
+
+libpoppler_glib_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
+
+if BUILD_WITH_GDK
+noinst_PROGRAMS = test-poppler-glib
+
+test_poppler_glib_SOURCES = \
+ test-poppler-glib.cc
+
+test_poppler_glib_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ libpoppler-glib.la \
+ $(POPPLER_GLIB_LIBS) \
+ $(GDK_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(cairo_libs)
+endif
+
+BUILT_SOURCES = \
+ poppler-enums.c \
+ poppler-enums.h \
+ poppler-features.h
+
+CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.in
new file mode 100644
index 00000000000..256d8c927dd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/Makefile.in
@@ -0,0 +1,978 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_WITH_GDK_TRUE@noinst_PROGRAMS = test-poppler-glib$(EXEEXT)
+subdir = glib
+DIST_COMMON = $(poppler_glib_include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/poppler-features.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES = poppler-features.h
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(poppler_glib_includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@BUILD_CAIRO_OUTPUT_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler-cairo.la \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(am__DEPENDENCIES_1)
+libpoppler_glib_la_DEPENDENCIES = \
+ $(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+am__objects_1 = poppler-enums.lo
+am_libpoppler_glib_la_OBJECTS = $(am__objects_1) poppler-action.lo \
+ poppler-date.lo poppler-document.lo poppler-page.lo \
+ poppler-attachment.lo poppler-form-field.lo poppler-annot.lo \
+ poppler-layer.lo poppler.lo
+libpoppler_glib_la_OBJECTS = $(am_libpoppler_glib_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libpoppler_glib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libpoppler_glib_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+PROGRAMS = $(noinst_PROGRAMS)
+am__test_poppler_glib_SOURCES_DIST = test-poppler-glib.cc
+@BUILD_WITH_GDK_TRUE@am_test_poppler_glib_OBJECTS = \
+@BUILD_WITH_GDK_TRUE@ test-poppler-glib.$(OBJEXT)
+test_poppler_glib_OBJECTS = $(am_test_poppler_glib_OBJECTS)
+@BUILD_WITH_GDK_TRUE@test_poppler_glib_DEPENDENCIES = \
+@BUILD_WITH_GDK_TRUE@ $(top_builddir)/poppler/libpoppler.la \
+@BUILD_WITH_GDK_TRUE@ libpoppler-glib.la $(am__DEPENDENCIES_1) \
+@BUILD_WITH_GDK_TRUE@ $(am__DEPENDENCIES_1) \
+@BUILD_WITH_GDK_TRUE@ $(am__DEPENDENCIES_1) \
+@BUILD_WITH_GDK_TRUE@ $(am__DEPENDENCIES_2)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libpoppler_glib_la_SOURCES) $(test_poppler_glib_SOURCES)
+DIST_SOURCES = $(libpoppler_glib_la_SOURCES) \
+ $(am__test_poppler_glib_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+HEADERS = $(poppler_glib_include_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+@BUILD_CAIRO_OUTPUT_TRUE@cairo_includes = \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(CAIRO_CFLAGS)
+
+@BUILD_CAIRO_OUTPUT_TRUE@cairo_libs = \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(top_builddir)/poppler/libpoppler-cairo.la \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(CAIRO_LIBS)
+
+SUBDIRS = . reference demo
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"Poppler\" \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ $(cairo_includes) \
+ $(POPPLER_GLIB_CFLAGS) \
+ $(GDK_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
+ $(cairo_includes) \
+ $(POPPLER_GLIB_DISABLE_DEPRECATED) \
+ $(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+
+stamp_files = stamp-poppler-enums.h
+EXTRA_DIST = \
+ poppler-enums.h.template \
+ poppler-enums.c.template
+
+poppler_glib_public_headers = \
+ poppler-action.h \
+ poppler-date.h \
+ poppler-document.h \
+ poppler-page.h \
+ poppler-attachment.h \
+ poppler-form-field.h \
+ poppler-annot.h \
+ poppler-layer.h \
+ poppler.h
+
+poppler_glib_includedir = $(includedir)/poppler/glib
+poppler_glib_include_HEADERS = \
+ $(poppler_glib_public_headers) \
+ poppler-enums.h \
+ poppler-features.h
+
+lib_LTLIBRARIES = libpoppler-glib.la
+libpoppler_glib_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ poppler-action.cc \
+ poppler-date.cc \
+ poppler-document.cc \
+ poppler-page.cc \
+ poppler-attachment.cc \
+ poppler-form-field.cc \
+ poppler-annot.cc \
+ poppler-layer.cc \
+ poppler.cc \
+ poppler-private.h
+
+libpoppler_glib_la_LIBADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(POPPLER_GLIB_LIBS) \
+ $(GDK_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(cairo_libs)
+
+libpoppler_glib_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
+@BUILD_WITH_GDK_TRUE@test_poppler_glib_SOURCES = \
+@BUILD_WITH_GDK_TRUE@ test-poppler-glib.cc
+
+@BUILD_WITH_GDK_TRUE@test_poppler_glib_LDADD = \
+@BUILD_WITH_GDK_TRUE@ $(top_builddir)/poppler/libpoppler.la \
+@BUILD_WITH_GDK_TRUE@ libpoppler-glib.la \
+@BUILD_WITH_GDK_TRUE@ $(POPPLER_GLIB_LIBS) \
+@BUILD_WITH_GDK_TRUE@ $(GDK_LIBS) \
+@BUILD_WITH_GDK_TRUE@ $(FREETYPE_LIBS) \
+@BUILD_WITH_GDK_TRUE@ $(cairo_libs)
+
+BUILT_SOURCES = \
+ poppler-enums.c \
+ poppler-enums.h \
+ poppler-features.h
+
+CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign glib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+poppler-features.h: $(top_builddir)/config.status $(srcdir)/poppler-features.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libpoppler-glib.la: $(libpoppler_glib_la_OBJECTS) $(libpoppler_glib_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libpoppler_glib_la_LINK) -rpath $(libdir) $(libpoppler_glib_la_OBJECTS) $(libpoppler_glib_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test-poppler-glib$(EXEEXT): $(test_poppler_glib_OBJECTS) $(test_poppler_glib_DEPENDENCIES)
+ @rm -f test-poppler-glib$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_poppler_glib_OBJECTS) $(test_poppler_glib_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-action.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-annot.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-attachment.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-date.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-document.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-enums.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-form-field.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-layer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-page.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-poppler-glib.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_glib_includeHEADERS: $(poppler_glib_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_glib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_glib_includedir)"
+ @list='$(poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_glib_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_glib_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_glib_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_glib_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_glib_includedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_glib_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-poppler_glib_includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-poppler_glib_includeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-poppler_glib_includeHEADERS install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-libLTLIBRARIES uninstall-poppler_glib_includeHEADERS
+
+
+poppler-enums.h: stamp-poppler-enums.h
+ @true
+
+stamp-poppler-enums.h: poppler-enums.h.template $(poppler_glib_public_headers)
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
+ && (cmp -s xgen-etbh poppler-enums.h || cp xgen-etbh poppler-enums.h ) \
+ && rm -f xgen-etbh \
+ && echo timestamp > $(@F)
+
+poppler-enums.c: poppler-enums.c.template $(poppler_glib_public_headers)
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
+ && (cmp -s xgen-etbc poppler-enums.c || cp xgen-etbc poppler-enums.c ) \
+ && rm -f xgen-etbc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/CMakeLists.txt
new file mode 100644
index 00000000000..2187e7900cf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+add_definitions(${GTK2_CFLAGS})
+
+set(poppler_glib_demo_SRCS
+ main.c
+ find.c
+ fonts.c
+ forms.c
+ info.cc
+ images.c
+ links.c
+ outline.c
+ page.c
+ render.c
+ text.c
+ transitions.c
+ utils.c
+ annots.c
+ attachments.c
+ layers.c
+)
+poppler_add_test(poppler-glib-demo BUILD_GTK_TESTS ${poppler_glib_demo_SRCS})
+target_link_libraries(poppler-glib-demo poppler-glib ${GTK2_LIBRARIES})
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.am
new file mode 100644
index 00000000000..4c301de525e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.am
@@ -0,0 +1,51 @@
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_builddir)/glib \
+ $(GTK_TEST_CFLAGS) \
+ $(POPPLER_GLIB_DISABLE_DEPRECATED) \
+ -DGTK_DISABLE_DEPRECATED \
+ $(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+
+AM_LDFLAGS = @auto_import_flags@
+
+if BUILD_GTK_TEST
+noinst_PROGRAMS = poppler-glib-demo
+endif
+
+poppler_glib_demo_SOURCES = \
+ main.c \
+ annots.h \
+ annots.c \
+ attachments.c \
+ attachments.h \
+ find.h \
+ find.c \
+ fonts.h \
+ fonts.c \
+ forms.h \
+ forms.c \
+ images.h \
+ images.c \
+ info.h \
+ info.cc \
+ layers.h \
+ layers.c \
+ links.h \
+ links.c \
+ outline.h \
+ outline.c \
+ page.h \
+ page.c \
+ render.h \
+ render.c \
+ text.h \
+ text.c \
+ transitions.h \
+ transitions.c \
+ utils.h \
+ utils.c
+
+LDADD = \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(GTK_TEST_LIBS)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.in
new file mode 100644
index 00000000000..b75e5766ae5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/Makefile.in
@@ -0,0 +1,665 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_GTK_TEST_TRUE@noinst_PROGRAMS = poppler-glib-demo$(EXEEXT)
+subdir = glib/demo
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_poppler_glib_demo_OBJECTS = main.$(OBJEXT) annots.$(OBJEXT) \
+ attachments.$(OBJEXT) find.$(OBJEXT) fonts.$(OBJEXT) \
+ forms.$(OBJEXT) images.$(OBJEXT) info.$(OBJEXT) \
+ layers.$(OBJEXT) links.$(OBJEXT) outline.$(OBJEXT) \
+ page.$(OBJEXT) render.$(OBJEXT) text.$(OBJEXT) \
+ transitions.$(OBJEXT) utils.$(OBJEXT)
+poppler_glib_demo_OBJECTS = $(am_poppler_glib_demo_OBJECTS)
+poppler_glib_demo_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+poppler_glib_demo_DEPENDENCIES = \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(poppler_glib_demo_SOURCES)
+DIST_SOURCES = $(poppler_glib_demo_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_builddir)/glib \
+ $(GTK_TEST_CFLAGS) \
+ $(POPPLER_GLIB_DISABLE_DEPRECATED) \
+ -DGTK_DISABLE_DEPRECATED \
+ $(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
+
+AM_LDFLAGS = @auto_import_flags@
+poppler_glib_demo_SOURCES = \
+ main.c \
+ annots.h \
+ annots.c \
+ attachments.c \
+ attachments.h \
+ find.h \
+ find.c \
+ fonts.h \
+ fonts.c \
+ forms.h \
+ forms.c \
+ images.h \
+ images.c \
+ info.h \
+ info.cc \
+ layers.h \
+ layers.c \
+ links.h \
+ links.c \
+ outline.h \
+ outline.c \
+ page.h \
+ page.c \
+ render.h \
+ render.c \
+ text.h \
+ text.c \
+ transitions.h \
+ transitions.c \
+ utils.h \
+ utils.c
+
+LDADD = \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(GTK_TEST_LIBS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glib/demo/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign glib/demo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+poppler-glib-demo$(EXEEXT): $(poppler_glib_demo_OBJECTS) $(poppler_glib_demo_DEPENDENCIES)
+ @rm -f poppler-glib-demo$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(poppler_glib_demo_OBJECTS) $(poppler_glib_demo_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/annots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attachments.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/forms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/images.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/links.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/page.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transitions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.c
new file mode 100644
index 00000000000..7865f1d41e9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.c
@@ -0,0 +1,675 @@
+/*
+ * Copyright (C) 2008 Inigo Martinez <inigomartinez@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "annots.h"
+#include "utils.h"
+
+enum {
+ ANNOTS_X1_COLUMN,
+ ANNOTS_Y1_COLUMN,
+ ANNOTS_X2_COLUMN,
+ ANNOTS_Y2_COLUMN,
+ ANNOTS_TYPE_COLUMN,
+ ANNOTS_COLOR_COLUMN,
+ ANNOTS_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+ PopplerPage *page;
+
+ GtkListStore *model;
+ GtkWidget *annot_view;
+ GtkWidget *timer_label;
+
+ gint num_page;
+} PgdAnnotsDemo;
+
+static void
+pgd_annots_free (PgdAnnotsDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->page) {
+ g_object_unref (demo->page);
+ demo->page = NULL;
+ }
+
+ if (demo->model) {
+ g_object_unref (demo->model);
+ demo->model = NULL;
+ }
+
+ g_free (demo);
+}
+
+static GtkWidget *
+pgd_annot_view_new (void)
+{
+ GtkWidget *frame, *label;
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Annot Properties</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ return frame;
+}
+
+const gchar *
+get_annot_type (PopplerAnnot *poppler_annot)
+{
+ switch (poppler_annot_get_annot_type (poppler_annot))
+ {
+ case POPPLER_ANNOT_TEXT:
+ return "Text";
+ case POPPLER_ANNOT_LINK:
+ return "Link";
+ case POPPLER_ANNOT_FREE_TEXT:
+ return "Free Text";
+ case POPPLER_ANNOT_LINE:
+ return "Line";
+ case POPPLER_ANNOT_SQUARE:
+ return "Square";
+ case POPPLER_ANNOT_CIRCLE:
+ return "Circle";
+ case POPPLER_ANNOT_POLYGON:
+ return "Polygon";
+ case POPPLER_ANNOT_POLY_LINE:
+ return "Poly Line";
+ case POPPLER_ANNOT_HIGHLIGHT:
+ return "Highlight";
+ case POPPLER_ANNOT_UNDERLINE:
+ return "Underline";
+ case POPPLER_ANNOT_SQUIGGLY:
+ return "Squiggly";
+ case POPPLER_ANNOT_STRIKE_OUT:
+ return "Strike Out";
+ case POPPLER_ANNOT_STAMP:
+ return "Stamp";
+ case POPPLER_ANNOT_CARET:
+ return "Caret";
+ case POPPLER_ANNOT_INK:
+ return "Ink";
+ case POPPLER_ANNOT_POPUP:
+ return "Popup";
+ case POPPLER_ANNOT_FILE_ATTACHMENT:
+ return "File Attachment";
+ case POPPLER_ANNOT_SOUND:
+ return "Sound";
+ case POPPLER_ANNOT_MOVIE:
+ return "Movie";
+ case POPPLER_ANNOT_WIDGET:
+ return "Widget";
+ case POPPLER_ANNOT_SCREEN:
+ return "Screen";
+ case POPPLER_ANNOT_PRINTER_MARK:
+ return "Printer Mark";
+ case POPPLER_ANNOT_TRAP_NET:
+ return "Trap Net";
+ case POPPLER_ANNOT_WATERMARK:
+ return "Watermark";
+ case POPPLER_ANNOT_3D:
+ return "3D";
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+GdkPixbuf *
+get_annot_color (PopplerAnnot *poppler_annot)
+{
+ PopplerColor *poppler_color;
+
+ if ((poppler_color = poppler_annot_get_color (poppler_annot))) {
+ GdkPixbuf *pixbuf;
+ gint rowstride, num, x;
+ guchar *pixels;
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ FALSE, 8,
+ 64, 16);
+
+ rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixels = gdk_pixbuf_get_pixels (pixbuf);
+
+ num = gdk_pixbuf_get_width (pixbuf) *
+ gdk_pixbuf_get_height (pixbuf);
+
+ for (x = 0; x < num; x++) {
+ pixels[0] = poppler_color->red;
+ pixels[1] = poppler_color->green;
+ pixels[2] = poppler_color->blue;
+ pixels += 3;
+ }
+
+ g_free (poppler_color);
+
+ return pixbuf;
+ }
+
+ return NULL;
+}
+
+gchar *
+get_markup_date (PopplerAnnotMarkup *poppler_annot)
+{
+ GDate *date;
+ struct tm t;
+ time_t timet;
+
+ date = poppler_annot_markup_get_date (poppler_annot);
+ if (!date)
+ return NULL;
+
+ g_date_to_struct_tm (date, &t);
+ g_date_free (date);
+
+ timet = mktime (&t);
+ return timet == (time_t) - 1 ? NULL : pgd_format_date (timet);
+}
+
+const gchar *
+get_markup_reply_to (PopplerAnnotMarkup *poppler_annot)
+{
+ switch (poppler_annot_markup_get_reply_to (poppler_annot))
+ {
+ case POPPLER_ANNOT_MARKUP_REPLY_TYPE_R:
+ return "Type R";
+ case POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP:
+ return "Type Group";
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+const gchar *
+get_markup_external_data (PopplerAnnotMarkup *poppler_annot)
+{
+ switch (poppler_annot_markup_get_external_data (poppler_annot))
+ {
+ case POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D:
+ return "Markup 3D";
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+const gchar *
+get_text_state (PopplerAnnotText *poppler_annot)
+{
+ switch (poppler_annot_text_get_state (poppler_annot))
+ {
+ case POPPLER_ANNOT_TEXT_STATE_MARKED:
+ return "Marked";
+ case POPPLER_ANNOT_TEXT_STATE_UNMARKED:
+ return "Unmarked";
+ case POPPLER_ANNOT_TEXT_STATE_ACCEPTED:
+ return "Accepted";
+ case POPPLER_ANNOT_TEXT_STATE_REJECTED:
+ return "Rejected";
+ case POPPLER_ANNOT_TEXT_STATE_CANCELLED:
+ return "Cancelled";
+ case POPPLER_ANNOT_TEXT_STATE_COMPLETED:
+ return "Completed";
+ case POPPLER_ANNOT_TEXT_STATE_NONE:
+ return "None";
+ case POPPLER_ANNOT_TEXT_STATE_UNKNOWN:
+ return "Unknown";
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+const gchar *
+get_free_text_quadding (PopplerAnnotFreeText *poppler_annot)
+{
+ switch (poppler_annot_free_text_get_quadding (poppler_annot))
+ {
+ case POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED:
+ return "Left Justified";
+ case POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED:
+ return "Centered";
+ case POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED:
+ return "Right Justified";
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+gchar *
+get_free_text_callout_line (PopplerAnnotFreeText *poppler_annot)
+{
+ PopplerAnnotCalloutLine *callout;
+ gdouble x1, y1, x2, y2;
+ gchar *text;
+
+ if ((callout = poppler_annot_free_text_get_callout_line (poppler_annot))) {
+ text = g_strdup_printf ("%f,%f,%f,%f", callout->x1,
+ callout->y1,
+ callout->x2,
+ callout->y2);
+ if (callout->multiline)
+ text = g_strdup_printf ("%s,%f,%f", text,
+ callout->x3,
+ callout->y3);
+
+ return text;
+ }
+
+ return NULL;
+}
+
+static void
+pgd_annot_view_set_annot_markup (GtkWidget *table,
+ PopplerAnnotMarkup *markup,
+ gint *row)
+{
+ gchar *text;
+ PopplerRectangle rect;
+
+ text = poppler_annot_markup_get_label (markup);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Label:</b>", text, row);
+ g_free (text);
+
+ if (poppler_annot_markup_has_popup (markup)) {
+ pgd_table_add_property (GTK_TABLE (table), "<b>Popup is open:</b>",
+ poppler_annot_markup_get_popup_is_open (markup) ? "Yes" : "No", row);
+
+ poppler_annot_markup_get_popup_rectangle (markup, &rect);
+ text = g_strdup_printf ("X1: %.2f, Y1: %.2f, X2: %.2f, Y2: %.2f",
+ rect.x1, rect.y1, rect.x2, rect.y2);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Popup Rectangle:</b>", text, row);
+ g_free (text);
+ }
+
+ text = g_strdup_printf ("%f", poppler_annot_markup_get_opacity (markup));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Opacity:</b>", text, row);
+ g_free (text);
+
+ text = get_markup_date (markup);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Date:</b>", text, row);
+ g_free (text);
+
+ text = poppler_annot_markup_get_subject (markup);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Subject:</b>", text, row);
+ g_free (text);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Reply To:</b>", get_markup_reply_to (markup), row);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>External Data:</b>", get_markup_external_data (markup), row);
+}
+
+static void
+pgd_annot_view_set_annot_text (GtkWidget *table,
+ PopplerAnnotText *annot,
+ gint *row)
+{
+ gchar *text;
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Is open:</b>",
+ poppler_annot_text_get_is_open (annot) ? "Yes" : "No", row);
+
+ text = poppler_annot_text_get_icon (annot);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Icon:</b>", text, row);
+ g_free (text);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>State:</b>", get_text_state (annot), row);
+}
+
+static void
+pgd_annot_view_set_annot_free_text (GtkWidget *table,
+ PopplerAnnotFreeText *annot,
+ gint *row)
+{
+ gchar *text;
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Quadding:</b>", get_free_text_quadding (annot), row);
+
+ text = get_free_text_callout_line (annot);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Callout:</b>", text, row);
+ g_free (text);
+}
+
+static void
+pgd_annot_view_set_annot (GtkWidget *annot_view,
+ PopplerAnnot *annot)
+{
+ GtkWidget *alignment;
+ GtkWidget *table;
+ GEnumValue *enum_value;
+ gint row = 0;
+ gchar *text, *warning;
+ time_t timet;
+
+ alignment = gtk_bin_get_child (GTK_BIN (annot_view));
+ if (alignment) {
+ gtk_container_remove (GTK_CONTAINER (annot_view), alignment);
+ }
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (annot_view), alignment);
+ gtk_widget_show (alignment);
+
+ if (!annot)
+ return;
+
+ table = gtk_table_new (10, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+ text = poppler_annot_get_contents (annot);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Contents:</b>", text, &row);
+ g_free (text);
+
+ text = poppler_annot_get_name (annot);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Name:</b>", text, &row);
+ g_free (text);
+
+ text = poppler_annot_get_modified (annot);
+ if (poppler_date_parse (text, &timet)) {
+ g_free (text);
+ text = pgd_format_date (timet);
+ }
+ pgd_table_add_property (GTK_TABLE (table), "<b>Modified:</b>", text, &row);
+ g_free (text);
+
+ text = g_strdup_printf ("%d", poppler_annot_get_flags (annot));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Flags:</b>", text, &row);
+ g_free (text);
+
+ if (POPPLER_IS_ANNOT_MARKUP (annot))
+ pgd_annot_view_set_annot_markup (table, POPPLER_ANNOT_MARKUP (annot), &row);
+
+ switch (poppler_annot_get_annot_type (annot))
+ {
+ case POPPLER_ANNOT_TEXT:
+ pgd_annot_view_set_annot_text (table, POPPLER_ANNOT_TEXT (annot), &row);
+ break;
+ case POPPLER_ANNOT_FREE_TEXT:
+ pgd_annot_view_set_annot_free_text (table, POPPLER_ANNOT_FREE_TEXT (annot), &row);
+ break;
+ default:
+ break;
+ }
+
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ gtk_widget_show (table);
+}
+
+static void
+pgd_annots_get_annots (GtkWidget *button,
+ PgdAnnotsDemo *demo)
+{
+ GList *mapping, *l;
+ gint n_fields;
+ GTimer *timer;
+
+ gtk_list_store_clear (demo->model);
+ pgd_annot_view_set_annot (demo->annot_view, NULL);
+
+ if (demo->page) {
+ g_object_unref (demo->page);
+ demo->page = NULL;
+ }
+
+ demo->page = poppler_document_get_page (demo->doc, demo->num_page);
+ if (!demo->page)
+ return;
+
+ timer = g_timer_new ();
+ mapping = poppler_page_get_annot_mapping (demo->page);
+ g_timer_stop (timer);
+
+ n_fields = g_list_length (mapping);
+ if (n_fields > 0) {
+ gchar *str;
+
+ str = g_strdup_printf ("<i>%d annots found in %.4f seconds</i>",
+ n_fields, g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No annots found</i>");
+ }
+
+ g_timer_destroy (timer);
+
+ for (l = mapping; l; l = g_list_next (l)) {
+ PopplerAnnotMapping *amapping;
+ GtkTreeIter iter;
+ gchar *x1, *y1, *x2, *y2;
+ GdkPixbuf *pixbuf;
+
+ amapping = (PopplerAnnotMapping *) l->data;
+
+ x1 = g_strdup_printf ("%.2f", amapping->area.x1);
+ y1 = g_strdup_printf ("%.2f", amapping->area.y1);
+ x2 = g_strdup_printf ("%.2f", amapping->area.x2);
+ y2 = g_strdup_printf ("%.2f", amapping->area.y2);
+
+ pixbuf = get_annot_color (amapping->annot);
+
+ gtk_list_store_append (demo->model, &iter);
+ gtk_list_store_set (demo->model, &iter,
+ ANNOTS_X1_COLUMN, x1,
+ ANNOTS_Y1_COLUMN, y1,
+ ANNOTS_X2_COLUMN, x2,
+ ANNOTS_Y2_COLUMN, y2,
+ ANNOTS_TYPE_COLUMN, get_annot_type (amapping->annot),
+ ANNOTS_COLOR_COLUMN, pixbuf,
+ ANNOTS_COLUMN, amapping->annot,
+ -1);
+
+ if (pixbuf)
+ g_object_unref (pixbuf);
+
+ g_free (x1);
+ g_free (y1);
+ g_free (x2);
+ g_free (y2);
+ }
+
+ poppler_page_free_annot_mapping (mapping);
+}
+
+static void
+pgd_annots_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdAnnotsDemo *demo)
+{
+ demo->num_page = (gint) gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+static void
+pgd_annots_selection_changed (GtkTreeSelection *treeselection,
+ PgdAnnotsDemo *demo)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+ PopplerAnnot *annot;
+
+ gtk_tree_model_get (model, &iter,
+ ANNOTS_COLUMN, &annot,
+ -1);
+ pgd_annot_view_set_annot (demo->annot_view, annot);
+ g_object_unref (annot);
+ }
+}
+
+GtkWidget *
+pgd_annots_create_widget (PopplerDocument *document)
+{
+ PgdAnnotsDemo *demo;
+ GtkWidget *label;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *hpaned;
+ GtkWidget *swindow, *treeview;
+ GtkTreeSelection *selection;
+ GtkCellRenderer *renderer;
+ gchar *str;
+ gint n_pages;
+
+ demo = g_new0 (PgdAnnotsDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_annots_page_selector_value_changed),
+ (gpointer) demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Annots");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_annots_get_annots),
+ (gpointer) demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No annots found</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ hpaned = gtk_hpaned_new ();
+
+ demo->annot_view = pgd_annot_view_new ();
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ demo->model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ GDK_TYPE_PIXBUF, G_TYPE_OBJECT);
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_X1_COLUMN, "X1",
+ renderer,
+ "text", ANNOTS_X1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_Y1_COLUMN, "Y1",
+ renderer,
+ "text", ANNOTS_Y1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_X2_COLUMN, "X2",
+ renderer,
+ "text", ANNOTS_X2_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_Y2_COLUMN, "Y2",
+ renderer,
+ "text", ANNOTS_Y2_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_TYPE_COLUMN, "Type",
+ renderer,
+ "text", ANNOTS_TYPE_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ ANNOTS_COLOR_COLUMN, "Color",
+ renderer,
+ "pixbuf", ANNOTS_COLOR_COLUMN,
+ NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_annots_selection_changed),
+ (gpointer) demo);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), demo->annot_view);
+ gtk_widget_show (demo->annot_view);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+ gtk_widget_show (hpaned);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_annots_free,
+ demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.h
new file mode 100644
index 00000000000..844e4f52baf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/annots.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Inigo Martinez <inigomartinez@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _ANNOTS_H_
+#define _ANNOTS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_annots_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _ANNOTS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.c
new file mode 100644
index 00000000000..28eb62ed305
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.c
@@ -0,0 +1,358 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "attachments.h"
+#include "utils.h"
+
+enum {
+ ATTACHMENTS_NAME_COLUMN,
+ ATTACHMENTS_DESCRIPTION_COLUMN,
+ ATTACHMENTS_SIZE_COLUMN,
+ ATTACHMENTS_CTIME_COLUMN,
+ ATTACHMENTS_MTIME_COLUMN,
+ ATTACHMENTS_ATTACHMENT_COLUMN,
+ N_COLUMNS
+};
+
+static void
+pgd_attachments_fill_model (GtkListStore *model,
+ PopplerDocument *document)
+{
+ GList *list, *l;
+
+ list = poppler_document_get_attachments (document);
+
+ for (l = list; l && l->data; l = g_list_next (l)) {
+ PopplerAttachment *attachment = POPPLER_ATTACHMENT (l->data);
+ GtkTreeIter iter;
+ gchar *size;
+ gchar *ctime, *mtime;
+
+ size = g_strdup_printf ("%" G_GSIZE_FORMAT, attachment->size);
+ ctime = pgd_format_date (attachment->ctime);
+ mtime = pgd_format_date (attachment->mtime);
+
+ gtk_list_store_append (model, &iter);
+ gtk_list_store_set (model, &iter,
+ ATTACHMENTS_NAME_COLUMN,
+ attachment->name ? attachment->name : "Unknown",
+ ATTACHMENTS_DESCRIPTION_COLUMN,
+ attachment->description ? attachment->description : "Unknown",
+ ATTACHMENTS_SIZE_COLUMN,
+ size ? size : "Unknown",
+ ATTACHMENTS_CTIME_COLUMN,
+ ctime ? ctime : "Unknown",
+ ATTACHMENTS_MTIME_COLUMN,
+ mtime ? mtime : "Unknown",
+ ATTACHMENTS_ATTACHMENT_COLUMN, attachment,
+ -1);
+
+ g_free (size);
+ g_free (ctime);
+ g_free (mtime);
+
+ g_object_unref (attachment);
+ }
+
+ g_list_free (list);
+}
+
+static GtkWidget *
+pgd_attachments_create_list (GtkTreeModel *model)
+{
+ GtkWidget *treeview;
+ GtkCellRenderer *renderer;
+
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Name",
+ renderer,
+ "text", ATTACHMENTS_NAME_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "Description",
+ renderer,
+ "text", ATTACHMENTS_DESCRIPTION_COLUMN,
+ NULL);
+ g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ g_object_set (G_OBJECT (gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 1)),
+ "expand", TRUE, NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 2, "Size",
+ renderer,
+ "text", ATTACHMENTS_SIZE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 3, "Creation Date",
+ renderer,
+ "text", ATTACHMENTS_CTIME_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 4, "Modification Date",
+ renderer,
+ "text", ATTACHMENTS_MTIME_COLUMN,
+ NULL);
+ return treeview;
+}
+
+static void
+pgd_attachments_save_dialog_response (GtkFileChooser *file_chooser,
+ gint response,
+ PopplerAttachment *attachment)
+{
+ gchar *filename;
+ GError *error = NULL;
+
+ if (response != GTK_RESPONSE_ACCEPT) {
+ g_object_unref (attachment);
+ gtk_widget_destroy (GTK_WIDGET (file_chooser));
+ return;
+ }
+
+ filename = gtk_file_chooser_get_filename (file_chooser);
+ if (!poppler_attachment_save (attachment, filename, &error)) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
+ g_free (filename);
+ g_object_unref (attachment);
+ gtk_widget_destroy (GTK_WIDGET (file_chooser));
+}
+
+static void
+pgd_attachments_save_button_clicked (GtkButton *button,
+ GtkTreeView *treeview)
+{
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkWidget *file_chooser;
+ PopplerAttachment *attachment;
+
+ selection = gtk_tree_view_get_selection (treeview);
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
+
+ gtk_tree_model_get (model, &iter,
+ ATTACHMENTS_ATTACHMENT_COLUMN, &attachment,
+ -1);
+
+ if (!attachment)
+ return;
+
+ file_chooser = gtk_file_chooser_dialog_new ("Save attachment",
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (treeview))),
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ NULL);
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), attachment->name);
+ g_signal_connect (G_OBJECT (file_chooser), "response",
+ G_CALLBACK (pgd_attachments_save_dialog_response),
+ (gpointer) attachment);
+ gtk_widget_show (file_chooser);
+
+}
+
+#if GLIB_CHECK_VERSION(2, 16, 0)
+static gboolean
+attachment_save_callback (const gchar *buf,
+ gsize count,
+ gpointer data,
+ GError **error)
+{
+ GChecksum *cs = (GChecksum *)data;
+
+ g_checksum_update (cs, buf, count);
+
+ return TRUE;
+}
+
+static void
+message_dialog_run (GtkWindow *parent,
+ const gchar *message)
+{
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (parent,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ "%s", message);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+}
+
+static void
+pgd_attachments_validate_button_clicked (GtkButton *button,
+ GtkTreeView *treeview)
+{
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GChecksum *cs;
+ guint8 *digest;
+ gsize digest_len;
+ PopplerAttachment *attachment;
+ gboolean valid = TRUE;
+
+ selection = gtk_tree_view_get_selection (treeview);
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
+
+ gtk_tree_model_get (model, &iter,
+ ATTACHMENTS_ATTACHMENT_COLUMN, &attachment,
+ -1);
+
+ if (!attachment)
+ return;
+
+ if (attachment->checksum->len == 0) {
+ message_dialog_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (treeview))),
+ "Impossible to validate attachment: checksum is not available");
+ g_object_unref (attachment);
+
+ return;
+ }
+
+ cs = g_checksum_new (G_CHECKSUM_MD5);
+ poppler_attachment_save_to_callback (attachment, attachment_save_callback,
+ (gpointer)cs, NULL);
+ digest_len = g_checksum_type_get_length (G_CHECKSUM_MD5);
+ digest = (guint8 *) g_malloc (digest_len);
+ g_checksum_get_digest (cs, digest, &digest_len);
+ g_checksum_free (cs);
+
+ if (attachment->checksum->len == digest_len) {
+ gint i;
+
+ for (i = 0; i < digest_len; i++) {
+ if ((guint8)attachment->checksum->str[i] != digest[i]) {
+ valid = FALSE;
+ break;
+ }
+ }
+ }
+
+ if (valid) {
+ message_dialog_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (treeview))),
+ "Attachment is valid");
+ } else {
+ message_dialog_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (treeview))),
+ "Attachment is not valid: the checksum does not match");
+ }
+
+ g_free (digest);
+ g_object_unref (attachment);
+}
+#endif
+
+GtkWidget *
+pgd_attachments_create_widget (PopplerDocument *document)
+{
+ GtkWidget *vbox;
+ GtkWidget *treeview;
+ GtkListStore *model;
+ GtkWidget *swindow;
+ GtkWidget *hbox, *button;
+ gboolean has_attachments;
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ has_attachments = poppler_document_has_attachments (document);
+ if (has_attachments) {
+ model = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_OBJECT);
+ pgd_attachments_fill_model (model, document);
+ treeview = pgd_attachments_create_list (GTK_TREE_MODEL (model));
+ } else {
+ GtkCellRenderer *renderer;
+ GtkTreeIter iter;
+ gchar *markup;
+
+ model = gtk_list_store_new (1, G_TYPE_STRING);
+ gtk_list_store_append (model, &iter);
+ markup = g_strdup_printf ("<span size=\"larger\" style=\"italic\">%s</span>",
+ "The document doesn't contain attachments");
+ gtk_list_store_set (model, &iter, 0, markup, -1);
+ g_free (markup);
+
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Name",
+ renderer,
+ "markup", 0,
+ NULL);
+ }
+ g_object_unref (model);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ if (!has_attachments)
+ return vbox;
+
+ hbox = gtk_hbutton_box_new ();
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_SPREAD);
+
+ button = gtk_button_new_with_label ("Save");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_attachments_save_button_clicked),
+ (gpointer)treeview);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+#if GLIB_CHECK_VERSION(2, 16, 0)
+ button = gtk_button_new_with_label ("Validate");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_attachments_validate_button_clicked),
+ (gpointer)treeview);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+#endif
+
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+ gtk_widget_show (hbox);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.h
new file mode 100644
index 00000000000..36dab828061
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/attachments.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _ATTACHMENTS_H_
+#define _ATTACHMENTS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_attachments_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _ATTACHMENTS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.c
new file mode 100644
index 00000000000..08e41e24d3d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.c
@@ -0,0 +1,282 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "find.h"
+
+enum {
+ TITLE_COLUMN,
+ X1_COLUMN,
+ Y1_COLUMN,
+ X2_COLUMN,
+ Y2_COLUMN,
+
+ VISIBLE_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkTreeModel *model;
+ GtkWidget *entry;
+ GtkWidget *progress;
+
+ gint n_pages;
+ gint page_index;
+
+ guint idle_id;
+} PgdFindDemo;
+
+static void
+pgd_find_free (PgdFindDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->idle_id > 0) {
+ g_source_remove (demo->idle_id);
+ demo->idle_id = 0;
+ }
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->model) {
+ g_object_unref (demo->model);
+ demo->model = NULL;
+ }
+
+ g_free (demo);
+}
+
+static void
+pgd_find_update_progress (PgdFindDemo *demo,
+ gint scanned)
+{
+ gchar *str;
+
+ str = g_strdup_printf ("Searching ... (%d%%)",
+ MIN (scanned * 100 / demo->n_pages, 100));
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (demo->progress), str);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (demo->progress),
+ MIN ((gdouble)scanned / demo->n_pages, 1.0));
+ g_free (str);
+}
+
+static gboolean
+pgd_find_find_text (PgdFindDemo *demo)
+{
+ PopplerPage *page;
+ GList *matches;
+ GTimer *timer;
+
+ page = poppler_document_get_page (demo->doc, demo->page_index);
+ if (!page) {
+ demo->page_index++;
+ return demo->page_index < demo->n_pages;
+ }
+
+ timer = g_timer_new ();
+ matches = poppler_page_find_text (page, gtk_entry_get_text (GTK_ENTRY (demo->entry)));
+ g_timer_stop (timer);
+ if (matches) {
+ GtkTreeIter iter;
+ gchar *str;
+ GList *l;
+ gint n_match = 0;
+
+ str = g_strdup_printf ("%d matches found on page %d in %.4f seconds",
+ g_list_length (matches), demo->page_index + 1,
+ g_timer_elapsed (timer, NULL));
+
+ gtk_tree_store_append (GTK_TREE_STORE (demo->model), &iter, NULL);
+ gtk_tree_store_set (GTK_TREE_STORE (demo->model), &iter,
+ TITLE_COLUMN, str,
+ VISIBLE_COLUMN, FALSE,
+ -1);
+ g_free (str);
+
+ for (l = matches; l && l->data; l = g_list_next (l)) {
+ PopplerRectangle *rect = (PopplerRectangle *)l->data;
+ GtkTreeIter iter_child;
+ gchar *x1, *y1, *x2, *y2;
+
+ str = g_strdup_printf ("Match %d", ++n_match);
+ x1 = g_strdup_printf ("%.2f", rect->x1);
+ y1 = g_strdup_printf ("%.2f", rect->y1);
+ x2 = g_strdup_printf ("%.2f", rect->x2);
+ y2 = g_strdup_printf ("%.2f", rect->y2);
+
+ gtk_tree_store_append (GTK_TREE_STORE (demo->model), &iter_child, &iter);
+ gtk_tree_store_set (GTK_TREE_STORE (demo->model), &iter_child,
+ TITLE_COLUMN, str,
+ X1_COLUMN, x1,
+ Y1_COLUMN, y1,
+ X2_COLUMN, x2,
+ Y2_COLUMN, y2,
+ VISIBLE_COLUMN, TRUE,
+ -1);
+ g_free (str);
+ g_free (x1);
+ g_free (y1);
+ g_free (x2);
+ g_free (y2);
+ g_free (rect);
+ }
+ g_list_free (matches);
+ }
+
+ g_timer_destroy (timer);
+ g_object_unref (page);
+
+ demo->page_index++;
+ pgd_find_update_progress (demo, demo->page_index);
+
+ return demo->page_index < demo->n_pages;
+}
+
+static void
+pgd_find_button_clicked (GtkButton *button,
+ PgdFindDemo *demo)
+{
+ gtk_tree_store_clear (GTK_TREE_STORE (demo->model));
+ demo->page_index = 0;
+ pgd_find_update_progress (demo, demo->page_index);
+ if (demo->idle_id > 0)
+ g_source_remove (demo->idle_id);
+ demo->idle_id = g_idle_add ((GSourceFunc)pgd_find_find_text, demo);
+}
+
+static void
+pgd_find_button_sensitivity_cb (GtkWidget *button,
+ GtkEntry *entry)
+{
+ const gchar *text;
+
+ text = gtk_entry_get_text (entry);
+ gtk_widget_set_sensitive (button, text != NULL && text[0] != '\0');
+}
+
+GtkWidget *
+pgd_find_create_widget (PopplerDocument *document)
+{
+ PgdFindDemo *demo;
+ GtkWidget *vbox, *hbox;
+ GtkWidget *button;
+ GtkWidget *swindow;
+ GtkWidget *treeview;
+ GtkCellRenderer *renderer;
+
+ demo = g_new0 (PgdFindDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ demo->n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ demo->entry = gtk_entry_new ();
+ gtk_box_pack_start (GTK_BOX (hbox), demo->entry, FALSE, TRUE, 0);
+ gtk_widget_show (demo->entry);
+
+ demo->progress = gtk_progress_bar_new ();
+ gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (demo->progress),
+ PANGO_ELLIPSIZE_END);
+ gtk_box_pack_start (GTK_BOX (hbox), demo->progress, TRUE, TRUE, 0);
+ gtk_widget_show (demo->progress);
+
+ button = gtk_button_new_with_label ("Find");
+ gtk_widget_set_sensitive (button, FALSE);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_find_button_clicked),
+ (gpointer)demo);
+ g_signal_connect_swapped (G_OBJECT (demo->entry), "changed",
+ G_CALLBACK (pgd_find_button_sensitivity_cb),
+ (gpointer)button);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+ gtk_widget_show (hbox);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ demo->model = GTK_TREE_MODEL (
+ gtk_tree_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_BOOLEAN));
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_NONE);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ TITLE_COLUMN, "Matches",
+ renderer,
+ "text", TITLE_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ X1_COLUMN, "X1",
+ renderer,
+ "text", X1_COLUMN,
+ "visible", VISIBLE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ Y1_COLUMN, "Y1",
+ renderer,
+ "text", Y1_COLUMN,
+ "visible", VISIBLE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ X2_COLUMN, "X2",
+ renderer,
+ "text", X2_COLUMN,
+ "visible", VISIBLE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ Y2_COLUMN, "Y2",
+ renderer,
+ "text", Y2_COLUMN,
+ "visible", VISIBLE_COLUMN,
+ NULL);
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_find_free,
+ (gpointer)demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.h
new file mode 100644
index 00000000000..36f95c1d54d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/find.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _FIND_H_
+#define _FIND_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_find_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _FIND_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.c
new file mode 100644
index 00000000000..07ea58993b9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.c
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "fonts.h"
+
+enum {
+ FONTS_NAME_COLUMN,
+ FONTS_DETAILS_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkWidget *treeview;
+ GtkWidget *progress;
+
+ guint idle_id;
+} PgdFontsDemo;
+
+static void
+pgd_fonts_free (PgdFontsDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->idle_id > 0) {
+ g_source_remove (demo->idle_id);
+ demo->idle_id = 0;
+ }
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ g_free (demo);
+}
+
+static void
+pdg_fonts_cell_data_func (GtkTreeViewColumn *col,
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer user_data)
+{
+ char *name;
+ char *details;
+ char *markup;
+
+ gtk_tree_model_get (model, iter,
+ FONTS_NAME_COLUMN, &name,
+ FONTS_DETAILS_COLUMN, &details,
+ -1);
+
+ if (details) {
+ markup = g_strdup_printf ("<b><big>%s</big></b>\n<small>%s</small>",
+ name, details);
+ } else {
+ markup = g_strdup_printf ("<b><big>%s</big></b>", name);
+ }
+
+ g_object_set (renderer, "markup", markup, NULL);
+
+ g_free (markup);
+ g_free (details);
+ g_free (name);
+}
+
+static const gchar *
+font_type_to_string (PopplerFontType type)
+{
+ switch (type) {
+ case POPPLER_FONT_TYPE_TYPE1:
+ return "Type 1";
+ case POPPLER_FONT_TYPE_TYPE1C:
+ return "Type 1C";
+ case POPPLER_FONT_TYPE_TYPE3:
+ return "Type 3";
+ case POPPLER_FONT_TYPE_TRUETYPE:
+ return "TrueType";
+ case POPPLER_FONT_TYPE_CID_TYPE0:
+ return "Type 1 (CID)";
+ case POPPLER_FONT_TYPE_CID_TYPE0C:
+ return "Type 1C (CID)";
+ case POPPLER_FONT_TYPE_CID_TYPE2:
+ return "TrueType (CID)";
+ default:
+ return "Unknown font type";
+ }
+}
+
+static void
+pgd_fonts_update_progress (PgdFontsDemo *demo,
+ gint n_pages,
+ gint scanned)
+{
+ gchar *str;
+
+ str = g_strdup_printf ("Scanning fonts (%d%%)",
+ MIN (scanned * 100 / n_pages, 100));
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (demo->progress), str);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (demo->progress),
+ MIN ((gdouble)scanned / n_pages, 1.0));
+ g_free (str);
+}
+
+static gboolean
+pgd_fonts_fill_model (PgdFontsDemo *demo)
+{
+ GtkTreeModel *model;
+ PopplerFontInfo *font_info;
+ PopplerFontsIter *fonts_iter;
+ gint n_pages, scanned = 0;
+
+ n_pages = poppler_document_get_n_pages (demo->doc);
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (demo->treeview));
+ g_object_ref (model);
+
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+
+ font_info = poppler_font_info_new (demo->doc);
+
+ while (poppler_font_info_scan (font_info, 20, &fonts_iter)) {
+ pgd_fonts_update_progress (demo, n_pages, scanned);
+
+ while (gtk_events_pending ())
+ gtk_main_iteration ();
+
+ scanned += 20;
+
+ if (!fonts_iter)
+ continue;
+
+ do {
+ GtkTreeIter iter;
+ const gchar *name;
+ const gchar *type;
+ const gchar *embedded;
+ const gchar *filename;
+ gchar *details;
+
+ name = poppler_fonts_iter_get_name (fonts_iter);
+ if (!name)
+ name = "No name";
+
+ type = font_type_to_string (poppler_fonts_iter_get_font_type (fonts_iter));
+
+ if (poppler_fonts_iter_is_embedded (fonts_iter)) {
+ if (poppler_fonts_iter_is_subset (fonts_iter))
+ embedded = "Embedded subset";
+ else
+ embedded = "Embedded";
+ } else {
+ embedded = "Not embedded";
+ }
+
+ filename = poppler_fonts_iter_get_file_name (fonts_iter);
+
+ if (filename)
+ details = g_markup_printf_escaped ("%s\n%s (%s)", type, embedded, filename);
+ else
+ details = g_markup_printf_escaped ("%s\n%s", type, embedded);
+
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ FONTS_NAME_COLUMN, name,
+ FONTS_DETAILS_COLUMN, details,
+ -1);
+
+ g_free (details);
+ } while (poppler_fonts_iter_next (fonts_iter));
+ poppler_fonts_iter_free (fonts_iter);
+ }
+
+ pgd_fonts_update_progress (demo, n_pages, scanned);
+
+ g_object_unref (font_info);
+ g_object_unref (model);
+
+ return FALSE;
+}
+
+static void
+pgd_fonts_scan_button_clicked (GtkButton *button,
+ PgdFontsDemo *demo)
+{
+ demo->idle_id = g_idle_add ((GSourceFunc)pgd_fonts_fill_model, demo);
+}
+
+GtkWidget *
+pgd_fonts_create_widget (PopplerDocument *document)
+{
+ PgdFontsDemo *demo;
+ GtkWidget *vbox;
+ GtkListStore *model;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ GtkWidget *swindow;
+ GtkWidget *hbox, *button;
+
+ demo = g_new0 (PgdFontsDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ demo->progress = gtk_progress_bar_new ();
+ gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (demo->progress),
+ PANGO_ELLIPSIZE_END);
+ gtk_box_pack_start (GTK_BOX (hbox), demo->progress, TRUE, TRUE, 0);
+ gtk_widget_show (demo->progress);
+
+ button = gtk_button_new_with_label ("Scan");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_fonts_scan_button_clicked),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+ gtk_widget_show (hbox);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
+ demo->treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (demo->treeview), FALSE);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (demo->treeview), TRUE);
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (demo->treeview)),
+ GTK_SELECTION_NONE);
+ g_object_unref (model);
+
+ column = gtk_tree_view_column_new ();
+ gtk_tree_view_append_column (GTK_TREE_VIEW (demo->treeview), column);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (GTK_TREE_VIEW_COLUMN (column), renderer, FALSE);
+ gtk_tree_view_column_set_cell_data_func (column, renderer,
+ pdg_fonts_cell_data_func,
+ NULL, NULL);
+
+ gtk_container_add (GTK_CONTAINER (swindow), demo->treeview);
+ gtk_widget_show (demo->treeview);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ g_object_weak_ref (G_OBJECT (swindow),
+ (GWeakNotify)pgd_fonts_free,
+ (gpointer)demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.h
new file mode 100644
index 00000000000..b13447c383f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/fonts.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _FONTS_H_
+#define _FONTS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_fonts_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _FONTS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.c
new file mode 100644
index 00000000000..e4b1fd8cbf9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.c
@@ -0,0 +1,491 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "forms.h"
+#include "utils.h"
+
+enum {
+ FORMS_FIELD_TYPE_COLUMN,
+ FORMS_ID_COLUMN,
+ FORMS_READ_ONLY_COLUMN,
+ FORMS_X1_COLUMN,
+ FORMS_Y1_COLUMN,
+ FORMS_X2_COLUMN,
+ FORMS_Y2_COLUMN,
+ FORMS_FIELD_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkListStore *model;
+ GtkWidget *field_view;
+ GtkWidget *timer_label;
+
+ gint page;
+} PgdFormsDemo;
+
+static void
+pgd_forms_free (PgdFormsDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->model) {
+ g_object_unref (demo->model);
+ demo->model = NULL;
+ }
+
+ g_free (demo);
+}
+
+static GtkWidget *
+pgd_form_field_view_new (void)
+{
+ GtkWidget *frame, *label;
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Form Field Properties</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ return frame;
+}
+
+static void
+pgd_form_field_view_add_choice_items (GtkTable *table,
+ PopplerFormField *field,
+ gint *selected,
+ gint *row)
+{
+ GtkWidget *label;
+ GtkWidget *textview, *swindow;
+ GtkTextBuffer *buffer;
+ gint i;
+
+ label = gtk_label_new (NULL);
+ g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Items:</b>");
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ textview = gtk_text_view_new ();
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+
+ for (i = 0; i < poppler_form_field_choice_get_n_items (field); i++) {
+ gchar *item;
+
+ item = poppler_form_field_choice_get_item (field, i);
+ gtk_text_buffer_insert_at_cursor (buffer, item, strlen (item));
+ gtk_text_buffer_insert_at_cursor (buffer, "\n", strlen ("\n"));
+ g_free (item);
+
+ if (poppler_form_field_choice_is_item_selected (field, i))
+ *selected = i;
+ }
+
+ gtk_container_add (GTK_CONTAINER (swindow), textview);
+ gtk_widget_show (textview);
+
+ gtk_table_attach (GTK_TABLE (table), swindow, 1, 2, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (swindow);
+
+ *row += 1;
+}
+
+static void
+pgd_form_field_view_set_field (GtkWidget *field_view,
+ PopplerFormField *field)
+{
+ GtkWidget *alignment;
+ GtkWidget *table;
+ GEnumValue *enum_value;
+ gint row = 0;
+
+ alignment = gtk_bin_get_child (GTK_BIN (field_view));
+ if (alignment) {
+ gtk_container_remove (GTK_CONTAINER (field_view), alignment);
+ }
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (field_view), alignment);
+ gtk_widget_show (alignment);
+
+ if (!field)
+ return;
+
+ table = gtk_table_new (10, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+ switch (poppler_form_field_get_field_type (field)) {
+ case POPPLER_FORM_FIELD_BUTTON:
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_BUTTON_TYPE),
+ poppler_form_field_button_get_button_type (field));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Button Type:</b>", enum_value->value_name, &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Button State:</b>",
+ poppler_form_field_button_get_state (field) ? "Active" : "Inactive", &row);
+ break;
+ case POPPLER_FORM_FIELD_TEXT: {
+ gchar *text;
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_TEXT_TYPE),
+ poppler_form_field_text_get_text_type (field));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Text Type:</b>", enum_value->value_name, &row);
+
+ text = poppler_form_field_text_get_text (field);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Contents:</b>", text, &row);
+ g_free (text);
+
+ text = g_strdup_printf ("%d", poppler_form_field_text_get_max_len (field));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Max Length:</b>", text, &row);
+ g_free (text);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Do spellcheck:</b>",
+ poppler_form_field_text_do_spell_check (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Do scroll:</b>",
+ poppler_form_field_text_do_scroll (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Rich Text:</b>",
+ poppler_form_field_text_is_rich_text (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Pasword type:</b>",
+ poppler_form_field_text_is_password (field) ? "Yes" : "No", &row);
+ }
+ break;
+ case POPPLER_FORM_FIELD_CHOICE: {
+ gchar *text, *item;
+ gint selected;
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_FORM_CHOICE_TYPE),
+ poppler_form_field_choice_get_choice_type (field));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Choice Type:</b>", enum_value->value_name, &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Editable:</b>",
+ poppler_form_field_choice_is_editable (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Multiple Selection:</b>",
+ poppler_form_field_choice_can_select_multiple (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Do spellcheck:</b>",
+ poppler_form_field_choice_do_spell_check (field) ? "Yes" : "No", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Commit on Change:</b>",
+ poppler_form_field_choice_commit_on_change (field) ? "Yes" : "No", &row);
+
+ text = g_strdup_printf ("%d", poppler_form_field_choice_get_n_items (field));
+ pgd_table_add_property (GTK_TABLE (table), "<b>Number of items:</b>", text, &row);
+ g_free (text);
+
+ pgd_form_field_view_add_choice_items (GTK_TABLE (table), field, &selected, &row);
+
+ if (poppler_form_field_choice_get_n_items (field) > selected) {
+ item = poppler_form_field_choice_get_item (field, selected);
+ text = g_strdup_printf ("%d (%s)", selected, item);
+ g_free (item);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Selected item:</b>", text, &row);
+ g_free (text);
+ }
+
+ text = poppler_form_field_choice_get_text (field);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Contents:</b>", text, &row);
+ g_free (text);
+ }
+ break;
+ case POPPLER_FORM_FIELD_SIGNATURE:
+ case POPPLER_FORM_FIELD_UNKNOWN:
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ gtk_widget_show (table);
+}
+
+const gchar *
+get_form_field_type (PopplerFormField *field)
+{
+ switch (poppler_form_field_get_field_type (field)) {
+ case POPPLER_FORM_FIELD_TEXT:
+ return "Text";
+ case POPPLER_FORM_FIELD_BUTTON:
+ return "Button";
+ case POPPLER_FORM_FIELD_CHOICE:
+ return "Choice";
+ case POPPLER_FORM_FIELD_SIGNATURE:
+ return "Signature";
+ case POPPLER_FORM_FIELD_UNKNOWN:
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+static void
+pgd_forms_get_form_fields (GtkWidget *button,
+ PgdFormsDemo *demo)
+{
+ PopplerPage *page;
+ GList *mapping, *l;
+ gint n_fields;
+ GTimer *timer;
+
+ gtk_list_store_clear (demo->model);
+ pgd_form_field_view_set_field (demo->field_view, NULL);
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+ timer = g_timer_new ();
+ mapping = poppler_page_get_form_field_mapping (page);
+ g_timer_stop (timer);
+
+ n_fields = g_list_length (mapping);
+ if (n_fields > 0) {
+ gchar *str;
+
+ str = g_strdup_printf ("<i>%d form fields found in %.4f seconds</i>",
+ n_fields, g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No form fields found</i>");
+ }
+
+ g_timer_destroy (timer);
+
+ for (l = mapping; l; l = g_list_next (l)) {
+ PopplerFormFieldMapping *fmapping;
+ GtkTreeIter iter;
+ gchar *x1, *y1, *x2, *y2;
+
+ fmapping = (PopplerFormFieldMapping *)l->data;
+
+ x1 = g_strdup_printf ("%.2f", fmapping->area.x1);
+ y1 = g_strdup_printf ("%.2f", fmapping->area.y1);
+ x2 = g_strdup_printf ("%.2f", fmapping->area.x2);
+ y2 = g_strdup_printf ("%.2f", fmapping->area.y2);
+
+ gtk_list_store_append (demo->model, &iter);
+ gtk_list_store_set (demo->model, &iter,
+ FORMS_FIELD_TYPE_COLUMN, get_form_field_type (fmapping->field),
+ FORMS_ID_COLUMN, poppler_form_field_get_id (fmapping->field),
+ FORMS_READ_ONLY_COLUMN, poppler_form_field_is_read_only (fmapping->field),
+ FORMS_X1_COLUMN, x1,
+ FORMS_Y1_COLUMN, y1,
+ FORMS_X2_COLUMN, x2,
+ FORMS_Y2_COLUMN, y2,
+ FORMS_FIELD_COLUMN, fmapping->field,
+ -1);
+ g_free (x1);
+ g_free (y1);
+ g_free (x2);
+ g_free (y2);
+ }
+
+ poppler_page_free_form_field_mapping (mapping);
+ g_object_unref (page);
+}
+
+static void
+pgd_forms_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdFormsDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+static void
+pgd_forms_selection_changed (GtkTreeSelection *treeselection,
+ PgdFormsDemo *demo)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+ PopplerFormField *field;
+
+ gtk_tree_model_get (model, &iter,
+ FORMS_FIELD_COLUMN, &field,
+ -1);
+ pgd_form_field_view_set_field (demo->field_view, field);
+ g_object_unref (field);
+ }
+}
+
+GtkWidget *
+pgd_forms_create_widget (PopplerDocument *document)
+{
+ PgdFormsDemo *demo;
+ GtkWidget *label;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *hpaned;
+ GtkWidget *swindow, *treeview;
+ GtkTreeSelection *selection;
+ GtkCellRenderer *renderer;
+ gchar *str;
+ gint n_pages;
+
+ demo = g_new0 (PgdFormsDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_forms_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Forms Fields");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_forms_get_form_fields),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No form fields found</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ hpaned = gtk_hpaned_new ();
+
+ demo->field_view = pgd_form_field_view_new ();
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ demo->model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING,
+ G_TYPE_INT, G_TYPE_BOOLEAN,
+ G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_OBJECT);
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Form Field Type",
+ renderer,
+ "text", FORMS_FIELD_TYPE_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "Form Field Id",
+ renderer,
+ "text", FORMS_ID_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_toggle_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 2, "Read Only",
+ renderer,
+ "active", FORMS_READ_ONLY_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 3, "X1",
+ renderer,
+ "text", FORMS_X1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 4, "Y1",
+ renderer,
+ "text", FORMS_Y1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 5, "X2",
+ renderer,
+ "text", FORMS_X2_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 6, "Y2",
+ renderer,
+ "text", FORMS_Y2_COLUMN,
+ NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_forms_selection_changed),
+ (gpointer)demo);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), demo->field_view);
+ gtk_widget_show (demo->field_view);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+ gtk_widget_show (hpaned);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_forms_free,
+ demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.h
new file mode 100644
index 00000000000..5b793bd1158
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/forms.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _FORMS_H_
+#define _FORMS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_forms_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _FORMS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.c
new file mode 100644
index 00000000000..76cfed20846
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.c
@@ -0,0 +1,342 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "images.h"
+
+enum {
+ IMAGES_ID_COLUMN,
+ IMAGES_X1_COLUMN,
+ IMAGES_Y1_COLUMN,
+ IMAGES_X2_COLUMN,
+ IMAGES_Y2_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkListStore *model;
+ GtkWidget *timer_label;
+ GtkWidget *image_view;
+
+ gint page;
+} PgdImagesDemo;
+
+static void
+pgd_images_free (PgdImagesDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->model) {
+ g_object_unref (demo->model);
+ demo->model = NULL;
+ }
+
+ g_free (demo);
+}
+
+static gboolean
+pgd_image_view_drawing_area_expose (GtkWidget *area,
+ GdkEventExpose *event,
+ GtkWidget *image_view)
+{
+ cairo_t *cr;
+ cairo_surface_t *image;
+
+ image = g_object_get_data (G_OBJECT (image_view), "image-surface");
+ if (!image)
+ return FALSE;
+
+ gtk_widget_set_size_request (area,
+ cairo_image_surface_get_width (image),
+ cairo_image_surface_get_height (image));
+
+ cr = gdk_cairo_create (area->window);
+ cairo_set_source_surface (cr, image, 0, 0);
+ cairo_paint (cr);
+ cairo_destroy (cr);
+
+ return TRUE;
+}
+
+static GtkWidget *
+pgd_image_view_new ()
+{
+ GtkWidget *swindow;
+ GtkWidget *darea;
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+
+ darea = gtk_drawing_area_new ();
+ g_signal_connect (G_OBJECT (darea), "expose_event",
+ G_CALLBACK (pgd_image_view_drawing_area_expose),
+ (gpointer)swindow);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow),
+ darea);
+ gtk_widget_show (darea);
+
+ return swindow;
+}
+
+static void
+pgd_image_view_set_image (GtkWidget *image_view,
+ cairo_surface_t *image)
+{
+ g_object_set_data_full (G_OBJECT (image_view), "image-surface",
+ image,
+ (GDestroyNotify)cairo_surface_destroy);
+ gtk_widget_queue_draw (image_view);
+}
+
+static void
+pgd_images_get_images (GtkWidget *button,
+ PgdImagesDemo *demo)
+{
+ PopplerPage *page;
+ GList *mapping, *l;
+ gint n_images;
+ GTimer *timer;
+
+ gtk_list_store_clear (demo->model);
+ pgd_image_view_set_image (demo->image_view, NULL);
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+ timer = g_timer_new ();
+ mapping = poppler_page_get_image_mapping (page);
+ g_timer_stop (timer);
+
+ n_images = g_list_length (mapping);
+ if (n_images > 0) {
+ gchar *str;
+
+ str = g_strdup_printf ("<i>%d images found in %.4f seconds</i>",
+ n_images, g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No images found</i>");
+ }
+
+ g_timer_destroy (timer);
+
+ for (l = mapping; l; l = g_list_next (l)) {
+ PopplerImageMapping *imapping;
+ GtkTreeIter iter;
+ gchar *x1, *y1, *x2, *y2;
+
+ imapping = (PopplerImageMapping *)l->data;
+
+ x1 = g_strdup_printf ("%.2f", imapping->area.x1);
+ y1 = g_strdup_printf ("%.2f", imapping->area.y1);
+ x2 = g_strdup_printf ("%.2f", imapping->area.x2);
+ y2 = g_strdup_printf ("%.2f", imapping->area.y2);
+
+ gtk_list_store_append (demo->model, &iter);
+ gtk_list_store_set (demo->model, &iter,
+ IMAGES_ID_COLUMN, imapping->image_id,
+ IMAGES_X1_COLUMN, x1,
+ IMAGES_Y1_COLUMN, y1,
+ IMAGES_X2_COLUMN, x2,
+ IMAGES_Y2_COLUMN, y2,
+ -1);
+ g_free (x1);
+ g_free (y1);
+ g_free (x2);
+ g_free (y2);
+ }
+
+ poppler_page_free_image_mapping (mapping);
+ g_object_unref (page);
+}
+
+static void
+pgd_images_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdImagesDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+static void
+pgd_images_selection_changed (GtkTreeSelection *treeselection,
+ PgdImagesDemo *demo)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+ PopplerPage *page;
+ gint image_id;
+
+ gtk_tree_model_get (model, &iter,
+ IMAGES_ID_COLUMN, &image_id,
+ -1);
+ page = poppler_document_get_page (demo->doc, demo->page);
+#if defined (HAVE_CAIRO)
+ pgd_image_view_set_image (demo->image_view,
+ poppler_page_get_image (page, image_id));
+#endif
+ g_object_unref (page);
+
+ }
+}
+
+GtkWidget *
+pgd_images_create_widget (PopplerDocument *document)
+{
+ PgdImagesDemo *demo;
+ GtkWidget *label;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *hpaned;
+ GtkWidget *swindow, *treeview;
+ GtkTreeSelection *selection;
+ GtkCellRenderer *renderer;
+ gchar *str;
+ gint n_pages;
+
+ demo = g_new0 (PgdImagesDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_images_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Images");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_images_get_images),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No images found</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ hpaned = gtk_hpaned_new ();
+
+ demo->image_view = pgd_image_view_new ();
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ demo->model = gtk_list_store_new (N_COLUMNS, G_TYPE_INT,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING);
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Image",
+ renderer,
+ "text", IMAGES_ID_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "X1",
+ renderer,
+ "text", IMAGES_X1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 2, "Y1",
+ renderer,
+ "text", IMAGES_Y1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 3, "X2",
+ renderer,
+ "text", IMAGES_X2_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 4, "Y2",
+ renderer,
+ "text", IMAGES_Y2_COLUMN,
+ NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_images_selection_changed),
+ (gpointer)demo);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), demo->image_view);
+ gtk_widget_show (demo->image_view);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+ gtk_widget_show (hpaned);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_images_free,
+ demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.h
new file mode 100644
index 00000000000..6180c3b2ac6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/images.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _IMAGES_H_
+#define _IMAGES_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_images_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _IMAGES_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.cc
new file mode 100644
index 00000000000..87be8eaa773
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.cc
@@ -0,0 +1,228 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "config.h"
+#include "info.h"
+#include "utils.h"
+
+static void
+pgd_info_add_permissions (GtkTable *table,
+ PopplerPermissions permissions,
+ gint *row)
+{
+ GtkWidget *label, *hbox;
+ GtkWidget *checkbox;
+
+ label = gtk_label_new (NULL);
+ g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Permissions:</b>");
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ checkbox = gtk_check_button_new_with_label ("Print");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox),
+ (permissions & POPPLER_PERMISSIONS_OK_TO_PRINT));
+ gtk_box_pack_start (GTK_BOX (hbox), checkbox, FALSE, TRUE, 0);
+ gtk_widget_show (checkbox);
+
+ checkbox = gtk_check_button_new_with_label ("Copy");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox),
+ (permissions & POPPLER_PERMISSIONS_OK_TO_COPY));
+ gtk_box_pack_start (GTK_BOX (hbox), checkbox, FALSE, TRUE, 0);
+ gtk_widget_show (checkbox);
+
+ checkbox = gtk_check_button_new_with_label ("Modify");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox),
+ (permissions & POPPLER_PERMISSIONS_OK_TO_MODIFY));
+ gtk_box_pack_start (GTK_BOX (hbox), checkbox, FALSE, TRUE, 0);
+ gtk_widget_show (checkbox);
+
+ checkbox = gtk_check_button_new_with_label ("Add notes");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox),
+ (permissions & POPPLER_PERMISSIONS_OK_TO_ADD_NOTES));
+ gtk_box_pack_start (GTK_BOX (hbox), checkbox, FALSE, TRUE, 0);
+ gtk_widget_show (checkbox);
+
+ gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (hbox);
+
+ *row += 1;
+}
+
+static void
+pgd_info_add_metadata (GtkTable *table,
+ const gchar *metadata,
+ gint *row)
+{
+ GtkWidget *label;
+ GtkWidget *textview, *swindow;
+ GtkTextBuffer *buffer;
+
+ label = gtk_label_new (NULL);
+ g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Metadata:</b>");
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ textview = gtk_text_view_new ();
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+ if (metadata)
+ gtk_text_buffer_set_text (buffer, metadata, -1);
+
+ gtk_container_add (GTK_CONTAINER (swindow), textview);
+ gtk_widget_show (textview);
+
+ gtk_table_attach (GTK_TABLE (table), swindow, 1, 2, *row, *row + 1,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_widget_show (swindow);
+
+ *row += 1;
+}
+
+GtkWidget *
+pgd_info_create_widget (PopplerDocument *document)
+{
+ GtkWidget *vbox;
+ GtkWidget *label;
+ GtkWidget *frame, *alignment, *table;
+ gchar *str;
+ gchar *title, *format, *author, *subject;
+ gchar *keywords, *creator, *producer, *linearized;
+ gchar *metadata;
+ GTime creation_date, mod_date;
+ GEnumValue *enum_value;
+ PopplerBackend backend;
+ PopplerPageLayout layout;
+ PopplerPageMode mode;
+ PopplerPermissions permissions;
+ PopplerViewerPreferences view_prefs;
+ gint row = 0;
+
+ g_object_get (document,
+ "title", &title,
+ "format", &format,
+ "author", &author,
+ "subject", &subject,
+ "keywords", &keywords,
+ "creation-date", &creation_date,
+ "mod-date", &mod_date,
+ "creator", &creator,
+ "producer", &producer,
+ "linearized", &linearized,
+ "page-mode", &mode,
+ "page-layout", &layout,
+ "permissions", &permissions,
+ "viewer-preferences", &view_prefs,
+ "metadata", &metadata,
+ NULL);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ backend = poppler_get_backend ();
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_BACKEND), backend);
+ str = g_strdup_printf ("<span weight='bold' size='larger'>Poppler %s (%s)</span>",
+ poppler_get_version (), enum_value->value_name);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), str);
+ g_free (str);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 12);
+ gtk_widget_show (label);
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Document properties</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (frame), alignment);
+ gtk_widget_show (alignment);
+
+ table = gtk_table_new (14, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Format:</b>", format, &row);
+ g_free (format);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Title:</b>", title, &row);
+ g_free (title);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Author:</b>", author, &row);
+ g_free (author);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Subject:</b>", subject, &row);
+ g_free (subject);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Keywords:</b>", keywords, &row);
+ g_free (keywords);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Creator:</b>", creator, &row);
+ g_free (creator);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Producer:</b>", producer, &row);
+ g_free (producer);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Linearized:</b>", linearized, &row);
+ g_free (linearized);
+
+ str = pgd_format_date (creation_date);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Creation Date:</b>", str, &row);
+ g_free (str);
+
+ str = pgd_format_date (mod_date);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Modification Date:</b>", str, &row);
+ g_free (str);
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_peek (POPPLER_TYPE_PAGE_MODE), mode);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Page Mode:</b>", enum_value->value_name, &row);
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_peek (POPPLER_TYPE_PAGE_LAYOUT), layout);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Page Layout:</b>", enum_value->value_name, &row);
+
+ pgd_info_add_permissions (GTK_TABLE (table), permissions, &row);
+
+ pgd_info_add_metadata (GTK_TABLE (table), metadata, &row);
+ g_free (metadata);
+
+ /* TODO: view_prefs */
+
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ gtk_widget_show (table);
+
+ gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
+ gtk_widget_show (frame);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.h
new file mode 100644
index 00000000000..a8b34d49533
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/info.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _INFO_H_
+#define _INFO_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_info_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _INFO_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.c
new file mode 100644
index 00000000000..ac93376746e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.c
@@ -0,0 +1,511 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "layers.h"
+
+enum {
+ LAYERS_TITLE_COLUMN,
+ LAYERS_VISIBILITY_COLUMN,
+ LAYERS_ENABLE_COLUMN,
+ LAYERS_SHOWTOGGLE_COLUMN,
+ LAYERS_RB_GROUP_COLUMN,
+ LAYERS_LAYER_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+ guint page;
+ GtkWidget *treeview;
+ GtkWidget *darea;
+
+#if defined (HAVE_CAIRO)
+ cairo_surface_t *surface;
+#else
+ GdkPixbuf *pixbuf;
+#endif
+} PgdLayersDemo;
+
+static void
+pgd_layers_free (PgdLayersDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+#if defined (HAVE_CAIRO)
+ if (demo->surface) {
+ cairo_surface_destroy (demo->surface);
+ demo->surface = NULL;
+ }
+#else
+ if (demo->pixbuf) {
+ g_object_unref (demo->pixbuf);
+ demo->pixbuf = NULL;
+ }
+#endif
+
+ g_free (demo);
+}
+
+static void
+build_tree (PopplerDocument *document,
+ GtkTreeModel *model,
+ GtkTreeIter *parent,
+ PopplerLayersIter *iter)
+{
+
+ do {
+ GtkTreeIter tree_iter;
+ PopplerLayersIter *child;
+ PopplerLayer *layer;
+ gboolean visible;
+ gchar *markup;
+ gint rb_group = 0;
+
+ layer = poppler_layers_iter_get_layer (iter);
+ if (layer) {
+ markup = g_markup_escape_text (poppler_layer_get_title (layer), -1);
+ visible = poppler_layer_is_visible (layer);
+ rb_group = poppler_layer_get_radio_button_group_id (layer);
+ } else {
+ gchar *title;
+
+ title = poppler_layers_iter_get_title (iter);
+ markup = g_markup_escape_text (title, -1);
+ g_free (title);
+
+ visible = FALSE;
+ layer = NULL;
+ }
+
+ gtk_tree_store_append (GTK_TREE_STORE (model), &tree_iter, parent);
+ gtk_tree_store_set (GTK_TREE_STORE (model), &tree_iter,
+ LAYERS_TITLE_COLUMN, markup,
+ LAYERS_VISIBILITY_COLUMN, visible,
+ LAYERS_ENABLE_COLUMN, TRUE, /* FIXME */
+ LAYERS_SHOWTOGGLE_COLUMN, (layer != NULL),
+ LAYERS_RB_GROUP_COLUMN, rb_group,
+ LAYERS_LAYER_COLUMN, layer,
+ -1);
+ if (layer)
+ g_object_unref (layer);
+ g_free (markup);
+
+ child = poppler_layers_iter_get_child (iter);
+ if (child)
+ build_tree (document, model, &tree_iter, child);
+ poppler_layers_iter_free (child);
+ } while (poppler_layers_iter_next (iter));
+}
+
+GtkTreeModel *
+pgd_layers_create_model (PopplerDocument *document)
+{
+ GtkTreeModel *model;
+ PopplerLayersIter *iter;
+
+ iter = poppler_layers_iter_new (document);
+ if (iter) {
+ model = GTK_TREE_MODEL (
+ gtk_tree_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_INT,
+ G_TYPE_OBJECT));
+ build_tree (document, model, NULL, iter);
+ poppler_layers_iter_free (iter);
+ } else {
+ GtkTreeIter tree_iter;
+ gchar *markup;
+
+ model = GTK_TREE_MODEL (gtk_list_store_new (1, G_TYPE_STRING));
+ gtk_list_store_append (GTK_LIST_STORE (model), &tree_iter);
+ markup = g_strdup_printf ("<span size=\"larger\" style=\"italic\">%s</span>",
+ "The document doesn't contain layers");
+ gtk_list_store_set (GTK_LIST_STORE (model), &tree_iter,
+ 0, markup, -1);
+ g_free (markup);
+ }
+
+ return model;
+}
+
+#if defined (HAVE_CAIRO)
+static cairo_surface_t *
+pgd_layers_render_page (PgdLayersDemo *demo)
+{
+ cairo_t *cr;
+ PopplerPage *page;
+ gdouble width, height;
+ cairo_surface_t *surface = NULL;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return NULL;
+
+ poppler_page_get_size (page, &width, &height);
+ gtk_widget_set_size_request (demo->darea, width, height);
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+ width, height);
+ cr = cairo_create (surface);
+
+ cairo_save (cr);
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ cairo_rectangle (cr, 0, 0, width, height);
+ cairo_fill (cr);
+ cairo_restore (cr);
+
+ cairo_save (cr);
+ poppler_page_render (page, cr);
+ cairo_restore (cr);
+
+ cairo_destroy (cr);
+ g_object_unref (page);
+
+ return surface;
+}
+#else
+static GdkPixbuf *
+pgd_layers_render_page (PgdLayersDemo *demo)
+{
+ PopplerPage *page;
+ gdouble width, height;
+ GdkPixbuf *pixbuf = NULL;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return NULL;
+
+ poppler_page_get_size (page, &width, &height);
+ gtk_widget_set_size_request (demo->darea, width, height);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ FALSE, 8, width, height);
+ gdk_pixbuf_fill (pixbuf, 0xffffff);
+ poppler_page_render_to_pixbuf (page, 0, 0,
+ width, height,
+ 1.0, 0, pixbuf);
+ g_object_unref (page);
+
+ return pixbuf;
+}
+#endif
+
+static gboolean
+pgd_layers_viewer_drawing_area_expose (GtkWidget *area,
+ GdkEventExpose *event,
+ PgdLayersDemo *demo)
+{
+#if defined (HAVE_CAIRO)
+ cairo_t *cr;
+
+ if (!demo->surface) {
+ demo->surface = pgd_layers_render_page (demo);
+ if (!demo->surface)
+ return FALSE;
+ }
+#else
+
+ if (!demo->pixbuf) {
+ demo->pixbuf = pgd_layers_render_page (demo);
+ if (!demo->pixbuf)
+ return FALSE;
+ }
+#endif
+
+ gdk_window_clear (area->window);
+
+#if defined (HAVE_CAIRO)
+ cr = gdk_cairo_create (area->window);
+ cairo_set_source_surface (cr, demo->surface, 0, 0);
+ cairo_paint (cr);
+ cairo_destroy (cr);
+#else
+ gdk_draw_pixbuf (area->window,
+ area->style->fg_gc[GTK_STATE_NORMAL],
+ demo->pixbuf,
+ 0, 0,
+ 0, 0,
+ gdk_pixbuf_get_width (demo->pixbuf),
+ gdk_pixbuf_get_height (demo->pixbuf),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
+#endif
+
+ return TRUE;
+}
+
+static gboolean
+pgd_layers_viewer_redraw (PgdLayersDemo *demo)
+{
+#if defined (HAVE_CAIRO)
+ cairo_surface_destroy (demo->surface);
+ demo->surface = NULL;
+#else
+ g_object_unref (demo->pixbuf);
+ demo->pixbuf = NULL;
+#endif
+ gtk_widget_queue_draw (demo->darea);
+
+ return FALSE;
+}
+
+static void
+pgd_layers_viewer_queue_redraw (PgdLayersDemo *demo)
+{
+ g_idle_add ((GSourceFunc)pgd_layers_viewer_redraw, demo);
+}
+
+static void
+pgd_layers_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdLayersDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+ pgd_layers_viewer_queue_redraw (demo);
+}
+
+static GtkWidget *
+pgd_layers_create_viewer (PgdLayersDemo *demo)
+{
+ GtkWidget *vbox, *hbox;
+ GtkWidget *label;
+ GtkWidget *swindow;
+ GtkWidget *page_selector;
+ guint n_pages;
+ gchar *str;
+
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ n_pages = poppler_document_get_n_pages (demo->doc);
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_layers_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->darea = gtk_drawing_area_new ();
+ g_signal_connect (G_OBJECT (demo->darea), "expose_event",
+ G_CALLBACK (pgd_layers_viewer_drawing_area_expose),
+ (gpointer)demo);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow), demo->darea);
+ gtk_widget_show (demo->darea);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ return vbox;
+}
+
+static gboolean
+update_kids (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
+{
+ if (gtk_tree_store_is_ancestor (GTK_TREE_STORE (model), parent, iter)) {
+ gboolean visible;
+
+ gtk_tree_model_get (model, parent,
+ LAYERS_VISIBILITY_COLUMN, &visible,
+ -1);
+ gtk_tree_store_set (GTK_TREE_STORE (model), iter,
+ LAYERS_ENABLE_COLUMN, visible,
+ -1);
+ }
+
+ return FALSE;
+}
+
+static gboolean
+clear_rb_group (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gint *rb_group)
+{
+ gint group;
+
+ gtk_tree_model_get (model, iter,
+ LAYERS_RB_GROUP_COLUMN, &group,
+ -1);
+
+ if (group == *rb_group) {
+ gtk_tree_store_set (GTK_TREE_STORE (model), iter,
+ LAYERS_VISIBILITY_COLUMN, FALSE,
+ -1);
+ }
+
+ return FALSE;
+}
+
+static void
+pgd_layers_visibility_changed (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ PgdLayersDemo *demo)
+{
+ GtkTreeModel *model;
+ GtkTreePath *path;
+ GtkTreeIter iter;
+ gboolean visible;
+ PopplerLayer *layer;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (demo->treeview));
+
+ path = gtk_tree_path_new_from_string (path_str);
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter,
+ LAYERS_VISIBILITY_COLUMN, &visible,
+ LAYERS_LAYER_COLUMN, &layer,
+ -1);
+
+ visible = !visible;
+ visible ? poppler_layer_show (layer) : poppler_layer_hide (layer);
+
+ if (visible) {
+ gint rb_group;
+
+ rb_group = poppler_layer_get_radio_button_group_id (layer);
+ if (rb_group) {
+ gtk_tree_model_foreach (model,
+ (GtkTreeModelForeachFunc)clear_rb_group,
+ &rb_group);
+ }
+ }
+
+ gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+ LAYERS_VISIBILITY_COLUMN, visible,
+ -1);
+
+ if (poppler_layer_is_parent (layer)) {
+ gtk_tree_model_foreach (model,
+ (GtkTreeModelForeachFunc)update_kids,
+ &iter);
+ }
+
+ pgd_layers_viewer_queue_redraw (demo);
+
+ gtk_tree_path_free (path);
+ g_object_unref (layer);
+}
+
+GtkWidget *
+pgd_layers_create_widget (PopplerDocument *document)
+{
+ PgdLayersDemo *demo;
+ GtkWidget *swindow;
+ GtkWidget *treeview;
+ GtkTreeModel *model;
+ GtkCellRenderer *renderer;
+ GtkTreeSelection *selection;
+ GtkWidget *hpaned, *viewer;
+
+ demo = g_new0 (PgdLayersDemo, 1);
+ demo->doc = g_object_ref (document);
+
+ hpaned = gtk_hpaned_new ();
+
+ viewer = pgd_layers_create_viewer (demo);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ model = pgd_layers_create_model (document);
+ treeview = gtk_tree_view_new_with_model (model);
+ demo->treeview = treeview;
+ g_object_unref (model);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Layer",
+ renderer,
+ "markup", LAYERS_TITLE_COLUMN,
+ NULL);
+ g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ g_object_set (G_OBJECT (gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 0)),
+ "expand", TRUE, NULL);
+
+ if (GTK_IS_TREE_STORE (model)) {
+ renderer = gtk_cell_renderer_toggle_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "Show/Hide",
+ renderer,
+ "active", LAYERS_VISIBILITY_COLUMN,
+ "activatable", LAYERS_ENABLE_COLUMN,
+ "visible", LAYERS_SHOWTOGGLE_COLUMN,
+ NULL);
+
+ g_signal_connect (renderer, "toggled",
+ G_CALLBACK (pgd_layers_visibility_changed),
+ (gpointer)demo);
+ gtk_tree_view_column_set_clickable (gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 1),
+ TRUE);
+ }
+
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_NONE);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), viewer);
+ gtk_widget_show (viewer);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 150);
+
+ g_object_weak_ref (G_OBJECT (hpaned),
+ (GWeakNotify)pgd_layers_free,
+ (gpointer)demo);
+
+ return hpaned;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.h
new file mode 100644
index 00000000000..88b43c38f8a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/layers.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _LAYERS_H_
+#define _LAYERS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_layers_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _LAYERS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.c
new file mode 100644
index 00000000000..6cb4a5df621
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.c
@@ -0,0 +1,289 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "links.h"
+#include "utils.h"
+
+enum {
+ LINKS_ACTION_TYPE_COLUMN,
+ LINKS_X1_COLUMN,
+ LINKS_Y1_COLUMN,
+ LINKS_X2_COLUMN,
+ LINKS_Y2_COLUMN,
+ LINKS_ACTION_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkListStore *model;
+ GtkWidget *action_view;
+ GtkWidget *timer_label;
+
+ gint page;
+} PgdLinksDemo;
+
+static void
+pgd_links_free (PgdLinksDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->model) {
+ g_object_unref (demo->model);
+ demo->model = NULL;
+ }
+
+ g_free (demo);
+}
+
+static void
+pgd_links_get_links (GtkWidget *button,
+ PgdLinksDemo *demo)
+{
+ PopplerPage *page;
+ GList *mapping, *l;
+ gint n_links;
+ GTimer *timer;
+
+ gtk_list_store_clear (demo->model);
+ pgd_action_view_set_action (demo->action_view, NULL);
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+ timer = g_timer_new ();
+ mapping = poppler_page_get_link_mapping (page);
+ g_timer_stop (timer);
+
+ n_links = g_list_length (mapping);
+ if (n_links > 0) {
+ gchar *str;
+
+ str = g_strdup_printf ("<i>%d links found in %.4f seconds</i>",
+ n_links, g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No links found</i>");
+ }
+
+ g_timer_destroy (timer);
+
+ for (l = mapping; l; l = g_list_next (l)) {
+ PopplerLinkMapping *lmapping;
+ PopplerAction *action;
+ GEnumValue *enum_value;
+ GtkTreeIter iter;
+ gchar *x1, *y1, *x2, *y2;
+
+ lmapping = (PopplerLinkMapping *)l->data;
+ action = poppler_action_copy (lmapping->action);
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_ACTION_TYPE), action->type);
+
+ x1 = g_strdup_printf ("%.2f", lmapping->area.x1);
+ y1 = g_strdup_printf ("%.2f", lmapping->area.y1);
+ x2 = g_strdup_printf ("%.2f", lmapping->area.x2);
+ y2 = g_strdup_printf ("%.2f", lmapping->area.y2);
+
+ gtk_list_store_append (demo->model, &iter);
+ gtk_list_store_set (demo->model, &iter,
+ LINKS_ACTION_TYPE_COLUMN, enum_value->value_name,
+ LINKS_X1_COLUMN, x1,
+ LINKS_Y1_COLUMN, y1,
+ LINKS_X2_COLUMN, x2,
+ LINKS_Y2_COLUMN, y2,
+ LINKS_ACTION_COLUMN, action,
+ -1);
+ g_free (x1);
+ g_free (y1);
+ g_free (x2);
+ g_free (y2);
+
+ g_object_weak_ref (G_OBJECT (demo->model),
+ (GWeakNotify)poppler_action_free,
+ action);
+ }
+
+ poppler_page_free_link_mapping (mapping);
+ g_object_unref (page);
+}
+
+static void
+pgd_links_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdLinksDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+static void
+pgd_links_selection_changed (GtkTreeSelection *treeselection,
+ PgdLinksDemo *demo)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+ PopplerAction *action;
+
+ gtk_tree_model_get (model, &iter,
+ LINKS_ACTION_COLUMN, &action,
+ -1);
+ pgd_action_view_set_action (demo->action_view, action);
+ }
+}
+
+GtkWidget *
+pgd_links_create_widget (PopplerDocument *document)
+{
+ PgdLinksDemo *demo;
+ GtkWidget *label;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *hpaned;
+ GtkWidget *swindow, *treeview;
+ GtkTreeSelection *selection;
+ GtkCellRenderer *renderer;
+ gchar *str;
+ gint n_pages;
+
+ demo = g_new0 (PgdLinksDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_links_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Links");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_links_get_links),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No links found</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ hpaned = gtk_hpaned_new ();
+
+ demo->action_view = pgd_action_view_new (document);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ demo->model = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_POINTER);
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (demo->model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Action Type",
+ renderer,
+ "text", LINKS_ACTION_TYPE_COLUMN,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "X1",
+ renderer,
+ "text", LINKS_X1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 2, "Y1",
+ renderer,
+ "text", LINKS_Y1_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 3, "X2",
+ renderer,
+ "text", LINKS_X2_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 4, "Y2",
+ renderer,
+ "text", LINKS_Y2_COLUMN,
+ NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_links_selection_changed),
+ (gpointer)demo);
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), demo->action_view);
+ gtk_widget_show (demo->action_view);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+ gtk_widget_show (hpaned);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_links_free,
+ demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.h
new file mode 100644
index 00000000000..b7dbaeb49ca
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/links.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _LINKS_H_
+#define _LINKS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_links_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _LINKS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/main.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/main.c
new file mode 100644
index 00000000000..3026c6cf5e2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/main.c
@@ -0,0 +1,247 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+#include <string.h>
+
+#include "info.h"
+#include "fonts.h"
+#include "render.h"
+#include "page.h"
+#include "outline.h"
+#include "links.h"
+#include "forms.h"
+#include "transitions.h"
+#include "images.h"
+#include "annots.h"
+#include "attachments.h"
+#include "layers.h"
+#include "text.h"
+#include "find.h"
+
+enum {
+ PGD_TITLE_COLUMN,
+ PGD_NPAGE_COLUMN,
+ PGD_WIDGET_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ const gchar *name;
+ GtkWidget *(* create_widget) (PopplerDocument *document);
+} PopplerGlibDemo;
+
+static const PopplerGlibDemo demo_list[] = {
+ { "Info", pgd_info_create_widget },
+ { "Fonts", pgd_fonts_create_widget },
+ { "Render", pgd_render_create_widget },
+ { "Page Info", pgd_page_create_widget },
+ { "Outline", pgd_outline_create_widget },
+ { "Links", pgd_links_create_widget },
+ { "Forms", pgd_forms_create_widget },
+ { "Page Transitions", pgd_transitions_create_widget },
+ { "Images", pgd_images_create_widget },
+ { "Annots", pgd_annots_create_widget },
+ { "Attachments", pgd_attachments_create_widget },
+ { "Layers", pgd_layers_create_widget },
+ { "Text", pgd_text_create_widget },
+ { "Find", pgd_find_create_widget }
+};
+
+static void
+pgd_demo_changed (GtkTreeSelection *selection,
+ GtkNotebook *notebook)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+ gint n_page;
+
+ gtk_tree_model_get (model, &iter,
+ PGD_NPAGE_COLUMN, &n_page,
+ -1);
+ gtk_notebook_set_current_page (notebook, n_page);
+ }
+}
+
+static GtkWidget *
+pgd_demo_list_create (void)
+{
+ GtkWidget *treeview;
+ GtkListStore *model;
+ GtkCellRenderer *renderer;
+ gint i;
+
+ model = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_INT,
+ G_TYPE_POINTER);
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Demos",
+ renderer,
+ "text", PGD_TITLE_COLUMN,
+ NULL);
+
+ for (i = 0; i < G_N_ELEMENTS (demo_list); i++) {
+ GtkTreeIter iter;
+
+ gtk_list_store_append (model, &iter);
+ gtk_list_store_set (model, &iter,
+ PGD_TITLE_COLUMN, demo_list[i].name,
+ PGD_NPAGE_COLUMN, i,
+ -1);
+ }
+
+ g_object_unref (model);
+
+ return treeview;
+}
+
+static GtkWidget *
+pdg_demo_notebook_create (PopplerDocument *document)
+{
+ GtkWidget *notebook;
+ gint i;
+
+ notebook = gtk_notebook_new ();
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
+
+ for (i = 0; i < G_N_ELEMENTS (demo_list); i++) {
+ GtkWidget *demo_widget;
+
+ demo_widget = demo_list[i].create_widget (document);
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), demo_widget, NULL);
+ gtk_widget_show (demo_widget);
+ }
+
+ return notebook;
+}
+
+gint main (gint argc, gchar **argv)
+{
+ PopplerDocument *document;
+ GtkWidget *win;
+ GtkWidget *hbox;
+ GtkWidget *notebook;
+ GtkWidget *treeview;
+ GtkTreeSelection *selection;
+ gchar *uri;
+ GTimer *timer;
+ GError *error = NULL;
+
+ if (argc != 2) {
+ g_print ("Usage: poppler-glib-demo FILE\n");
+ return 1;
+ }
+
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
+ gtk_init (&argc, &argv);
+
+#if GLIB_CHECK_VERSION (2,15,0)
+ GFile *file;
+
+ file = g_file_new_for_commandline_arg (argv[1]);
+ uri = g_file_get_uri (file);
+ g_object_unref (file);
+#else
+ if (g_path_is_absolute (argv[1])) {
+ uri = g_filename_to_uri (argv[1], NULL, &error);
+ } else if (g_ascii_strncasecmp (argv[1], "file://", strlen ("file://")) == 0) {
+ uri = g_strdup (argv[1]);
+ } else if (!g_strrstr (argv[1], "://")) {
+ gchar *dir;
+ gchar *filename;
+
+ dir = g_get_current_dir ();
+ filename = g_build_filename (dir, argv[1], NULL);
+ g_free (dir);
+
+ uri = g_filename_to_uri (filename, NULL, &error);
+ g_free (filename);
+ } else {
+ g_print ("Error: unsupported uri\n");
+
+ return 1;
+ }
+
+ if (error) {
+ g_print ("Error: %s\n", error->message);
+ g_error_free (error);
+
+ return 1;
+ }
+#endif /* GLIB_CHECK_VERSION */
+
+ timer = g_timer_new ();
+ document = poppler_document_new_from_file (uri, NULL, &error);
+ g_timer_stop (timer);
+ if (error) {
+ g_print ("Error: %s\n", error->message);
+ g_error_free (error);
+ g_free (uri);
+
+ return 1;
+ }
+
+ g_free (uri);
+
+ g_print ("Document successfully loaded in %.4f seconds\n",
+ g_timer_elapsed (timer, NULL));
+ g_timer_destroy (timer);
+
+ /* Main window */
+ win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (win), 600, 600);
+ gtk_window_set_title (GTK_WINDOW (win), "Poppler GLib Demo");
+ g_signal_connect (G_OBJECT (win), "delete-event",
+ G_CALLBACK (gtk_main_quit), NULL);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ treeview = pgd_demo_list_create ();
+ gtk_box_pack_start (GTK_BOX (hbox), treeview, FALSE, TRUE, 0);
+ gtk_widget_show (treeview);
+
+ notebook = pdg_demo_notebook_create (document);
+ gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
+ gtk_widget_show (notebook);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_demo_changed),
+ (gpointer) notebook);
+
+ gtk_container_add (GTK_CONTAINER (win), hbox);
+ gtk_widget_show (hbox);
+
+ gtk_widget_show (win);
+
+ gtk_main ();
+
+ g_object_unref (document);
+
+ return 0;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.c
new file mode 100644
index 00000000000..5dc71892513
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.c
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "outline.h"
+#include "utils.h"
+
+enum {
+ OUTLINE_TITLE_COLUMN,
+ OUTLINE_ACTION_TYPE_COLUMN,
+ OUTLINE_EXPAND_COLUMN,
+ OUTLINE_ACTION_COLUMN,
+ N_COLUMNS
+};
+
+static void
+build_tree (PopplerDocument *document,
+ GtkTreeModel *model,
+ GtkTreeIter *parent,
+ PopplerIndexIter *iter)
+{
+
+ do {
+ GtkTreeIter tree_iter;
+ PopplerIndexIter *child;
+ PopplerAction *action;
+ gboolean expand;
+ gchar *markup;
+ GEnumValue *enum_value;
+
+ action = poppler_index_iter_get_action (iter);
+ expand = poppler_index_iter_is_open (iter);
+
+ if (!action)
+ continue;
+
+ markup = g_markup_escape_text (action->any.title, -1);
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_ACTION_TYPE), action->type);
+
+ if (action->type == POPPLER_ACTION_GOTO_DEST &&
+ action->goto_dest.dest->type == POPPLER_DEST_NAMED) {
+ /* TODO */
+ }
+
+ gtk_tree_store_append (GTK_TREE_STORE (model), &tree_iter, parent);
+ gtk_tree_store_set (GTK_TREE_STORE (model), &tree_iter,
+ OUTLINE_TITLE_COLUMN, markup,
+ OUTLINE_ACTION_TYPE_COLUMN, enum_value->value_name,
+ OUTLINE_EXPAND_COLUMN, expand,
+ OUTLINE_ACTION_COLUMN, action,
+ -1);
+ g_object_weak_ref (G_OBJECT (model),
+ (GWeakNotify)poppler_action_free,
+ action);
+
+ g_free (markup);
+
+ child = poppler_index_iter_get_child (iter);
+ if (child)
+ build_tree (document, model, &tree_iter, child);
+ poppler_index_iter_free (child);
+ } while (poppler_index_iter_next (iter));
+}
+
+GtkTreeModel *
+pgd_outline_create_model (PopplerDocument *document)
+{
+ GtkTreeModel *model;
+ PopplerIndexIter *iter;
+
+ iter = poppler_index_iter_new (document);
+ if (iter) {
+ model = GTK_TREE_MODEL (
+ gtk_tree_store_new (N_COLUMNS,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_BOOLEAN, G_TYPE_POINTER));
+ build_tree (document, model, NULL, iter);
+ poppler_index_iter_free (iter);
+ } else {
+ GtkTreeIter tree_iter;
+ gchar *markup;
+
+ model = GTK_TREE_MODEL (gtk_list_store_new (1, G_TYPE_STRING));
+ gtk_list_store_append (GTK_LIST_STORE (model), &tree_iter);
+ markup = g_strdup_printf ("<span size=\"larger\" style=\"italic\">%s</span>",
+ "The document doesn't contain outline");
+ gtk_list_store_set (GTK_LIST_STORE (model), &tree_iter,
+ 0, markup, -1);
+ g_free (markup);
+ }
+
+ return model;
+}
+
+static void
+expand_open_links (GtkTreeView *tree_view,
+ GtkTreeModel *model,
+ GtkTreeIter *parent)
+{
+ GtkTreeIter iter;
+ gboolean expand;
+
+ if (gtk_tree_model_iter_children (model, &iter, parent)) {
+ do {
+ gtk_tree_model_get (model, &iter,
+ OUTLINE_EXPAND_COLUMN, &expand,
+ -1);
+ if (expand) {
+ GtkTreePath *path;
+
+ path = gtk_tree_model_get_path (model, &iter);
+ gtk_tree_view_expand_row (tree_view, path, FALSE);
+ gtk_tree_path_free (path);
+ }
+
+ expand_open_links (tree_view, model, &iter);
+ } while (gtk_tree_model_iter_next (model, &iter));
+ }
+}
+
+static void
+pgd_outline_selection_changed (GtkTreeSelection *treeselection,
+ GtkWidget *action_view)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) {
+ PopplerAction *action;
+
+ gtk_tree_model_get (model, &iter,
+ OUTLINE_ACTION_COLUMN, &action,
+ -1);
+ pgd_action_view_set_action (action_view, action);
+ }
+}
+
+GtkWidget *
+pgd_outline_create_widget (PopplerDocument *document)
+{
+ GtkWidget *swindow;
+ GtkWidget *treeview;
+ GtkTreeModel *model;
+ GtkCellRenderer *renderer;
+ GtkTreeSelection *selection;
+ GtkWidget *hpaned, *action;
+
+ hpaned = gtk_hpaned_new ();
+
+ action = pgd_action_view_new (document);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ model = pgd_outline_create_model (document);
+ treeview = gtk_tree_view_new_with_model (model);
+ g_object_unref (model);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Title",
+ renderer,
+ "markup", OUTLINE_TITLE_COLUMN,
+ NULL);
+ g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ g_object_set (G_OBJECT (gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), 0)),
+ "expand", TRUE, NULL);
+
+ if (GTK_IS_TREE_STORE (model)) {
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "Action Type",
+ renderer,
+ "text", OUTLINE_ACTION_TYPE_COLUMN,
+ NULL);
+
+ expand_open_links (GTK_TREE_VIEW (treeview), model, NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ g_signal_connect (G_OBJECT (selection), "changed",
+ G_CALLBACK (pgd_outline_selection_changed),
+ (gpointer)action);
+ } else {
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_NONE);
+ }
+
+ gtk_container_add (GTK_CONTAINER (swindow), treeview);
+ gtk_widget_show (treeview);
+
+ gtk_paned_add1 (GTK_PANED (hpaned), swindow);
+ gtk_widget_show (swindow);
+
+ gtk_paned_add2 (GTK_PANED (hpaned), action);
+ gtk_widget_show (action);
+
+ gtk_paned_set_position (GTK_PANED (hpaned), 300);
+
+ return hpaned;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.h
new file mode 100644
index 00000000000..61b8238b742
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/outline.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _OUTLINE_H_
+#define _OUTLINE_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_outline_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _OUTLINE_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.c
new file mode 100644
index 00000000000..ee034f0d8b4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.c
@@ -0,0 +1,335 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "page.h"
+#include "utils.h"
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkWidget *index;
+ GtkWidget *label;
+ GtkWidget *size;
+ GtkWidget *duration;
+ GtkWidget *thumbnail;
+ GtkWidget *thumbnail_size;
+
+ gint page;
+} PgdPageDemo;
+
+static void
+pgd_page_free (PgdPageDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ g_free (demo);
+}
+
+#ifndef POPPLER_WITH_GDK
+static void
+image_set_from_surface (GtkImage *gtkimage,
+ cairo_surface_t *surface)
+{
+ GdkPixbuf *pixbuf;
+ cairo_surface_t *image;
+ cairo_t *cr;
+ gboolean has_alpha;
+ gint width, height;
+ cairo_format_t surface_format;
+ gint pixbuf_n_channels;
+ gint pixbuf_rowstride;
+ guchar *pixbuf_pixels;
+ gint x, y;
+
+ width = cairo_image_surface_get_width (surface);
+ height = cairo_image_surface_get_height (surface);
+
+ surface_format = cairo_image_surface_get_format (surface);
+ has_alpha = (surface_format == CAIRO_FORMAT_ARGB32);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ TRUE, 8,
+ width, height);
+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixbuf_pixels = gdk_pixbuf_get_pixels (pixbuf);
+
+ image = cairo_image_surface_create_for_data (pixbuf_pixels,
+ surface_format,
+ width, height,
+ pixbuf_rowstride);
+ cr = cairo_create (image);
+ cairo_set_source_surface (cr, surface, 0, 0);
+
+ if (has_alpha)
+ cairo_mask_surface (cr, surface, 0, 0);
+ else
+ cairo_paint (cr);
+
+ cairo_destroy (cr);
+ cairo_surface_destroy (image);
+
+ for (y = 0; y < height; y++) {
+ guchar *p = pixbuf_pixels + y * pixbuf_rowstride;
+
+ for (x = 0; x < width; x++) {
+ guchar tmp;
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ tmp = p[0];
+ p[0] = p[2];
+ p[2] = tmp;
+ p[3] = (has_alpha) ? p[3] : 0xff;
+#else
+ tmp = p[0];
+ p[0] = (has_alpha) ? p[3] : 0xff;
+ p[3] = p[2];
+ p[2] = p[1];
+ p[1] = tmp;
+#endif
+ p += pixbuf_n_channels;
+ }
+ }
+
+ gtk_image_set_from_pixbuf (gtkimage, pixbuf);
+ g_object_unref (pixbuf);
+}
+#endif /* !POPPLER_WITH_GDK */
+
+static void
+pgd_page_set_page (PgdPageDemo *demo,
+ PopplerPage *page)
+{
+#ifdef POPPLER_WITH_GDK
+ GdkPixbuf *thumbnail;
+#else
+ cairo_surface_t *thumbnail;
+#endif
+ gchar *str;
+
+ str = page ? g_strdup_printf ("%d", poppler_page_get_index (page)) : NULL;
+ gtk_label_set_text (GTK_LABEL (demo->index), str);
+ g_free (str);
+
+ if (page) {
+ g_object_get (G_OBJECT (page), "label", &str, NULL);
+ gtk_label_set_text (GTK_LABEL (demo->label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_text (GTK_LABEL (demo->label), NULL);
+ }
+
+ if (page) {
+ gdouble width, height;
+
+ poppler_page_get_size (page, &width, &height);
+ str = g_strdup_printf ("%.2f x %.2f", width, height);
+ gtk_label_set_text (GTK_LABEL (demo->size), str);
+ g_free (str);
+ } else {
+ gtk_label_set_text (GTK_LABEL (demo->size), NULL);
+ }
+
+ str = page ? g_strdup_printf ("%.2f seconds", poppler_page_get_duration (page)) : NULL;
+ gtk_label_set_text (GTK_LABEL (demo->duration), str);
+ g_free (str);
+
+#ifdef POPPLER_WITH_GDK
+ thumbnail = page ? poppler_page_get_thumbnail_pixbuf (page) : NULL;
+#else
+ thumbnail = page ? poppler_page_get_thumbnail (page) : NULL;
+#endif
+ if (thumbnail) {
+ gint width, height;
+
+ poppler_page_get_thumbnail_size (page, &width, &height);
+ str = g_strdup_printf ("%d x %d", width, height);
+ gtk_label_set_text (GTK_LABEL (demo->thumbnail_size), str);
+ g_free (str);
+
+#ifdef POPPLER_WITH_GDK
+ gtk_image_set_from_pixbuf (GTK_IMAGE (demo->thumbnail), thumbnail);
+ g_object_unref (thumbnail);
+#else
+ image_set_from_surface (GTK_IMAGE (demo->thumbnail), thumbnail);
+ cairo_surface_destroy (thumbnail);
+#endif
+ } else {
+ str = g_strdup ("<i>No thumbnail found</i>");
+ gtk_label_set_markup (GTK_LABEL (demo->thumbnail_size), str);
+ g_free (str);
+
+ gtk_image_set_from_stock (GTK_IMAGE (demo->thumbnail),
+ GTK_STOCK_MISSING_IMAGE,
+ GTK_ICON_SIZE_DIALOG);
+ }
+}
+
+static void
+pgd_page_get_info (GtkWidget *button,
+ PgdPageDemo *demo)
+{
+ PopplerPage *page;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ pgd_page_set_page (demo, page);
+ g_object_unref (page);
+}
+
+static void
+pgd_page_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdPageDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+GtkWidget *
+pgd_page_create_widget (PopplerDocument *document)
+{
+ PgdPageDemo *demo;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *frame, *alignment;
+ GtkWidget *table;
+ GtkWidget *label;
+ GtkWidget *thumnail_box;
+ gchar *str;
+ gint n_pages;
+ gint row = 0;
+
+ demo = g_new0 (PgdPageDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_page_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Info");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_page_get_info),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Page Properties</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (frame), alignment);
+ gtk_widget_show (alignment);
+
+ table = gtk_table_new (3, 2, FALSE);
+
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+ pgd_table_add_property_with_value_widget (GTK_TABLE (table), "<b>Page Index:</b>",
+ &(demo->index), NULL, &row);
+ pgd_table_add_property_with_value_widget (GTK_TABLE (table), "<b>Page Label:</b>",
+ &(demo->label), NULL, &row);
+ pgd_table_add_property_with_value_widget (GTK_TABLE (table), "<b>Page Size:</b>",
+ &(demo->size), NULL, &row);
+ pgd_table_add_property_with_value_widget (GTK_TABLE (table), "<b>Page Duration:</b>",
+ &(demo->duration), NULL, &row);
+
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ gtk_widget_show (table);
+
+ gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
+ gtk_widget_show (frame);
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Page Thumbnail</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (frame), alignment);
+ gtk_widget_show (alignment);
+
+ thumnail_box = gtk_vbox_new (FALSE, 6);
+
+ demo->thumbnail = gtk_image_new ();
+ gtk_box_pack_start (GTK_BOX (thumnail_box), demo->thumbnail, TRUE, TRUE, 0);
+ gtk_widget_show (demo->thumbnail);
+
+ demo->thumbnail_size = gtk_label_new (NULL);
+ g_object_set (G_OBJECT (demo->thumbnail_size), "xalign", 0.5, NULL);
+ gtk_box_pack_start (GTK_BOX (thumnail_box), demo->thumbnail_size, TRUE, TRUE, 0);
+ gtk_widget_show (demo->thumbnail_size);
+
+ gtk_container_add (GTK_CONTAINER (alignment), thumnail_box);
+ gtk_widget_show (thumnail_box);
+
+ gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
+ gtk_widget_show (frame);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_page_free,
+ (gpointer)demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.h
new file mode 100644
index 00000000000..5b86a81d2e6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/page.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _PAGE_H_
+#define _PAGE_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_page_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _PAGE_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.c
new file mode 100644
index 00000000000..610d7d6338c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.c
@@ -0,0 +1,531 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+#include <cairo.h>
+
+#include "render.h"
+
+typedef enum {
+#if defined (HAVE_CAIRO)
+ PGD_RENDER_CAIRO,
+#endif
+ PGD_RENDER_PIXBUF
+} PgdRenderMode;
+
+typedef struct {
+ PopplerDocument *doc;
+
+ /* Properties */
+ PgdRenderMode mode;
+ gint page;
+ gdouble scale;
+ gint rotate;
+ GdkRectangle slice;
+
+ GtkWidget *swindow;
+ GtkWidget *darea;
+ GtkWidget *slice_x;
+ GtkWidget *slice_y;
+ GtkWidget *slice_w;
+ GtkWidget *slice_h;
+ GtkWidget *timer_label;
+
+#if defined (HAVE_CAIRO)
+ cairo_surface_t *surface;
+#endif
+ GdkPixbuf *pixbuf;
+} PgdRenderDemo;
+
+static void
+pgd_render_free (PgdRenderDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+#if defined (HAVE_CAIRO)
+ if (demo->surface) {
+ cairo_surface_destroy (demo->surface);
+ demo->surface = NULL;
+ }
+#endif
+
+ if (demo->pixbuf) {
+ g_object_unref (demo->pixbuf);
+ demo->pixbuf = NULL;
+ }
+
+ g_free (demo);
+}
+
+static gboolean
+pgd_render_drawing_area_expose (GtkWidget *area,
+ GdkEventExpose *event,
+ PgdRenderDemo *demo)
+{
+#if defined (HAVE_CAIRO)
+ if (demo->mode == PGD_RENDER_CAIRO && !demo->surface)
+ return FALSE;
+#endif
+
+ if (demo->mode == PGD_RENDER_PIXBUF && !demo->pixbuf)
+ return FALSE;
+
+ gdk_window_clear (area->window);
+
+#if defined (HAVE_CAIRO)
+ if (demo->mode == PGD_RENDER_CAIRO) {
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (area->window);
+ cairo_set_source_surface (cr, demo->surface, 0, 0);
+ cairo_paint (cr);
+ cairo_destroy (cr);
+ } else if (demo->mode == PGD_RENDER_PIXBUF) {
+#endif
+ gdk_draw_pixbuf (area->window,
+ area->style->fg_gc[GTK_STATE_NORMAL],
+ demo->pixbuf,
+ 0, 0,
+ 0, 0,
+ gdk_pixbuf_get_width (demo->pixbuf),
+ gdk_pixbuf_get_height (demo->pixbuf),
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
+#if defined (HAVE_CAIRO)
+ } else {
+ g_assert_not_reached ();
+ }
+#endif
+
+ return TRUE;
+}
+
+static void
+pgd_render_start (GtkButton *button,
+ PgdRenderDemo *demo)
+{
+ PopplerPage *page;
+ gdouble page_width, page_height;
+ gdouble width, height;
+ gint x, y;
+ gchar *str;
+ GTimer *timer;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+#if defined (HAVE_CAIRO)
+ if (demo->surface)
+ cairo_surface_destroy (demo->surface);
+ demo->surface = NULL;
+#endif
+
+ if (demo->pixbuf)
+ g_object_unref (demo->pixbuf);
+ demo->pixbuf = NULL;
+
+ poppler_page_get_size (page, &page_width, &page_height);
+
+ if (demo->rotate == 0 || demo->rotate == 180) {
+ width = demo->slice.width * demo->scale;
+ height = demo->slice.height * demo->scale;
+ x = demo->slice.x * demo->scale;
+ y = demo->slice.y * demo->scale;
+ } else {
+ width = demo->slice.height * demo->scale;
+ height = demo->slice.width * demo->scale;
+ x = demo->slice.y * demo->scale;
+ y = demo->slice.x * demo->scale;
+ }
+
+#if defined (HAVE_CAIRO)
+ if (demo->mode == PGD_RENDER_CAIRO) {
+ cairo_t *cr;
+
+ timer = g_timer_new ();
+ demo->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width, height);
+ cr = cairo_create (demo->surface);
+
+ cairo_save (cr);
+ switch (demo->rotate) {
+ case 90:
+ cairo_translate (cr, x + width, -y);
+ break;
+ case 180:
+ cairo_translate (cr, x + width, y + height);
+ break;
+ case 270:
+ cairo_translate (cr, -x, y + height);
+ break;
+ default:
+ cairo_translate (cr, -x, -y);
+ }
+
+ if (demo->scale != 1.0)
+ cairo_scale (cr, demo->scale, demo->scale);
+
+ if (demo->rotate != 0)
+ cairo_rotate (cr, demo->rotate * G_PI / 180.0);
+
+ poppler_page_render (page, cr);
+ cairo_restore (cr);
+
+ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+ cairo_set_source_rgb (cr, 1., 1., 1.);
+ cairo_paint (cr);
+
+ g_timer_stop (timer);
+
+ cairo_destroy (cr);
+ } else if (demo->mode == PGD_RENDER_PIXBUF) {
+#endif
+#ifdef POPPLER_WITH_GDK
+ timer = g_timer_new ();
+ demo->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ FALSE, 8, width, height);
+ gdk_pixbuf_fill (demo->pixbuf, 0xffffff);
+ poppler_page_render_to_pixbuf (page,
+ x, y,
+ width,
+ height,
+ demo->scale,
+ demo->rotate,
+ demo->pixbuf);
+ g_timer_stop (timer);
+#endif /* POPPLER_WITH_GDK */
+#if defined (HAVE_CAIRO)
+ } else {
+ g_assert_not_reached ();
+ }
+#endif
+ g_object_unref (page);
+
+ str = g_strdup_printf ("<i>Page rendered in %.4f seconds</i>",
+ g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+
+ g_timer_destroy (timer);
+
+ gtk_widget_set_size_request (demo->darea, width, height);
+ gtk_widget_queue_draw (demo->darea);
+}
+
+static void
+pgd_render_slice_selector_setup (PgdRenderDemo *demo)
+{
+ PopplerPage *page;
+ gdouble width, height;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+ poppler_page_get_size (page, &width, &height);
+
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (demo->slice_x), 0, width);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (demo->slice_y), 0, height);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (demo->slice_w), 0, width);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (demo->slice_h), 0, height);
+
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (demo->slice_x), 0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (demo->slice_y), 0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (demo->slice_w), width);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (demo->slice_h), height);
+
+ g_object_unref (page);
+}
+
+static void
+pgd_render_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdRenderDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+ pgd_render_slice_selector_setup (demo);
+}
+
+static void
+pgd_render_scale_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdRenderDemo *demo)
+{
+ demo->scale = gtk_spin_button_get_value (spinbutton);
+}
+
+static void
+pgd_render_rotate_selector_changed (GtkComboBox *combobox,
+ PgdRenderDemo *demo)
+{
+ demo->rotate = gtk_combo_box_get_active (combobox) * 90;
+}
+
+static void
+pgd_render_mode_selector_changed (GtkComboBox *combobox,
+ PgdRenderDemo *demo)
+{
+ demo->mode = gtk_combo_box_get_active (combobox);
+}
+
+static void
+pgd_render_slice_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdRenderDemo *demo)
+{
+ demo->slice.x = (gint)gtk_spin_button_get_value (GTK_SPIN_BUTTON (demo->slice_x));
+ demo->slice.y = (gint)gtk_spin_button_get_value (GTK_SPIN_BUTTON (demo->slice_y));
+ demo->slice.width = (gint)gtk_spin_button_get_value (GTK_SPIN_BUTTON (demo->slice_w));
+ demo->slice.height = (gint)gtk_spin_button_get_value (GTK_SPIN_BUTTON (demo->slice_h));
+}
+
+GtkWidget *
+pgd_render_properties_selector_create (PgdRenderDemo *demo)
+{
+ GtkWidget *hbox, *vbox;
+ GtkWidget *label;
+ GtkWidget *page_hbox, *page_selector;
+ GtkWidget *scale_hbox, *scale_selector;
+ GtkWidget *rotate_hbox, *rotate_selector;
+ GtkWidget *mode_hbox, *mode_selector;
+ GtkWidget *slice_hbox, *slice_selector;
+ GtkWidget *button;
+ gint n_pages;
+ gchar *str;
+
+ n_pages = poppler_document_get_n_pages (demo->doc);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ page_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (page_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_render_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (page_hbox), page_selector, TRUE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (page_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ gtk_box_pack_start (GTK_BOX (hbox), page_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (page_hbox);
+
+ scale_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Scale:");
+ gtk_box_pack_start (GTK_BOX (scale_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ scale_selector = gtk_spin_button_new_with_range (0, 10.0, 0.1);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (scale_selector), 1.0);
+ g_signal_connect (G_OBJECT (scale_selector), "value-changed",
+ G_CALLBACK (pgd_render_scale_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (scale_hbox), scale_selector, TRUE, TRUE, 0);
+ gtk_widget_show (scale_selector);
+
+ gtk_box_pack_start (GTK_BOX (hbox), scale_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (scale_hbox);
+
+ rotate_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Rotate:");
+ gtk_box_pack_start (GTK_BOX (rotate_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ rotate_selector = gtk_combo_box_new_text ();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "0");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "90");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "180");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "270");
+ gtk_combo_box_set_active (GTK_COMBO_BOX (rotate_selector), 0);
+ g_signal_connect (G_OBJECT (rotate_selector), "changed",
+ G_CALLBACK (pgd_render_rotate_selector_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (rotate_hbox), rotate_selector, TRUE, TRUE, 0);
+ gtk_widget_show (rotate_selector);
+
+ gtk_box_pack_start (GTK_BOX (hbox), rotate_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (rotate_hbox);
+
+ mode_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Mode:");
+ gtk_box_pack_start (GTK_BOX (mode_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ mode_selector = gtk_combo_box_new_text ();
+#if defined (HAVE_CAIRO)
+ gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "cairo");
+#endif
+#ifdef POPPLER_WITH_GDK
+ gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "pixbuf");
+#endif
+ gtk_combo_box_set_active (GTK_COMBO_BOX (mode_selector), 0);
+ g_signal_connect (G_OBJECT (mode_selector), "changed",
+ G_CALLBACK (pgd_render_mode_selector_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (mode_hbox), mode_selector, TRUE, TRUE, 0);
+ gtk_widget_show (mode_selector);
+
+ gtk_box_pack_start (GTK_BOX (hbox), mode_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (mode_hbox);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ slice_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("x:");
+ gtk_box_pack_start (GTK_BOX (slice_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ demo->slice_x = gtk_spin_button_new_with_range (0, 0, 1.0);
+ g_signal_connect (G_OBJECT (demo->slice_x), "value-changed",
+ G_CALLBACK (pgd_render_slice_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (slice_hbox), demo->slice_x, TRUE, TRUE, 0);
+ gtk_widget_show (demo->slice_x);
+
+ gtk_box_pack_start (GTK_BOX (hbox), slice_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (slice_hbox);
+
+ slice_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("y:");
+ gtk_box_pack_start (GTK_BOX (slice_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ demo->slice_y = gtk_spin_button_new_with_range (0, 0, 1.0);
+ g_signal_connect (G_OBJECT (demo->slice_y), "value-changed",
+ G_CALLBACK (pgd_render_slice_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (slice_hbox), demo->slice_y, TRUE, TRUE, 0);
+ gtk_widget_show (demo->slice_y);
+
+ gtk_box_pack_start (GTK_BOX (hbox), slice_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (slice_hbox);
+
+ slice_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("width:");
+ gtk_box_pack_start (GTK_BOX (slice_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ demo->slice_w = gtk_spin_button_new_with_range (0, 0, 1.0);
+ g_signal_connect (G_OBJECT (demo->slice_w), "value-changed",
+ G_CALLBACK (pgd_render_slice_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (slice_hbox), demo->slice_w, TRUE, TRUE, 0);
+ gtk_widget_show (demo->slice_w);
+
+ gtk_box_pack_start (GTK_BOX (hbox), slice_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (slice_hbox);
+
+ slice_hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("height:");
+ gtk_box_pack_start (GTK_BOX (slice_hbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+
+ demo->slice_h = gtk_spin_button_new_with_range (0, 0, 1.0);
+ g_signal_connect (G_OBJECT (demo->slice_h), "value-changed",
+ G_CALLBACK (pgd_render_slice_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (slice_hbox), demo->slice_h, TRUE, TRUE, 0);
+ gtk_widget_show (demo->slice_h);
+
+ gtk_box_pack_start (GTK_BOX (hbox), slice_hbox, FALSE, TRUE, 0);
+ gtk_widget_show (slice_hbox);
+
+ pgd_render_slice_selector_setup (demo);
+
+ button = gtk_button_new_with_label ("Render");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_render_start),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, TRUE, 0);
+ gtk_widget_show (button);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No page rendered</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_end (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ return vbox;
+}
+
+GtkWidget *
+pgd_render_create_widget (PopplerDocument *document)
+{
+ PgdRenderDemo *demo;
+ GtkWidget *vbox, *hbox;
+
+ demo = g_new0 (PgdRenderDemo, 1);
+
+ demo->doc = g_object_ref (document);
+ demo->scale = 1.0;
+
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ hbox = pgd_render_properties_selector_create (demo);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+ gtk_widget_show (hbox);
+
+ demo->darea = gtk_drawing_area_new ();
+ g_signal_connect (G_OBJECT (demo->darea), "expose_event",
+ G_CALLBACK (pgd_render_drawing_area_expose),
+ (gpointer)demo);
+
+ demo->swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (demo->swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (demo->swindow),
+ demo->darea);
+ gtk_widget_show (demo->darea);
+
+ gtk_box_pack_start (GTK_BOX (vbox), demo->swindow, TRUE, TRUE, 0);
+ gtk_widget_show (demo->swindow);
+
+ g_object_weak_ref (G_OBJECT (demo->swindow),
+ (GWeakNotify)pgd_render_free,
+ (gpointer)demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.h
new file mode 100644
index 00000000000..46f70396d93
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/render.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _RENDER_H_
+#define _RENDER_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_render_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _RENDER_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.c
new file mode 100644
index 00000000000..e11908217a6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.c
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <string.h>
+
+#include "text.h"
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkWidget *timer_label;
+ GtkTextBuffer *buffer;
+
+ gint page;
+} PgdTextDemo;
+
+static void
+pgd_text_free (PgdTextDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ if (demo->buffer) {
+ g_object_unref (demo->buffer);
+ demo->buffer = NULL;
+ }
+
+ g_free (demo);
+}
+
+static void
+pgd_text_get_text (GtkWidget *button,
+ PgdTextDemo *demo)
+{
+ PopplerPage *page;
+ PopplerRectangle rect;
+ gdouble width, height;
+ gchar *text;
+ GTimer *timer;
+
+ page = poppler_document_get_page (demo->doc, demo->page);
+ if (!page)
+ return;
+
+ poppler_page_get_size (page, &width, &height);
+ rect.x1 = rect.y1 = 0;
+ rect.x2 = width;
+ rect.y2 = height;
+
+ timer = g_timer_new ();
+ text = poppler_page_get_text (page, POPPLER_SELECTION_GLYPH, &rect);
+ g_timer_stop (timer);
+
+ if (text) {
+ gchar *str;
+
+ str = g_strdup_printf ("<i>got text in %.4f seconds</i>",
+ g_timer_elapsed (timer, NULL));
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
+ g_free (str);
+ } else {
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No text found</i>");
+ }
+
+ g_timer_destroy (timer);
+ g_object_unref (page);
+
+ if (text) {
+ gtk_text_buffer_set_text (demo->buffer, text, strlen (text));
+ g_free (text);
+ }
+}
+
+static void
+pgd_text_page_selector_value_changed (GtkSpinButton *spinbutton,
+ PgdTextDemo *demo)
+{
+ demo->page = (gint)gtk_spin_button_get_value (spinbutton) - 1;
+}
+
+GtkWidget *
+pgd_text_create_widget (PopplerDocument *document)
+{
+ PgdTextDemo *demo;
+ GtkWidget *label;
+ GtkWidget *vbox;
+ GtkWidget *hbox, *page_selector;
+ GtkWidget *button;
+ GtkWidget *swindow, *textview;
+ gchar *str;
+ gint n_pages;
+
+ demo = g_new0 (PgdTextDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ n_pages = poppler_document_get_n_pages (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ label = gtk_label_new ("Page:");
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+
+ page_selector = gtk_spin_button_new_with_range (1, n_pages, 1);
+ g_signal_connect (G_OBJECT (page_selector), "value-changed",
+ G_CALLBACK (pgd_text_page_selector_value_changed),
+ (gpointer)demo);
+ gtk_box_pack_start (GTK_BOX (hbox), page_selector, FALSE, TRUE, 0);
+ gtk_widget_show (page_selector);
+
+ str = g_strdup_printf ("of %d", n_pages);
+ label = gtk_label_new (str);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (str);
+
+ button = gtk_button_new_with_label ("Get Text");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_text_get_text),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ demo->timer_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (demo->timer_label), "<i>No text found</i>");
+ g_object_set (G_OBJECT (demo->timer_label), "xalign", 1.0, NULL);
+ gtk_box_pack_start (GTK_BOX (vbox), demo->timer_label, FALSE, TRUE, 0);
+ gtk_widget_show (demo->timer_label);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ demo->buffer = gtk_text_buffer_new (NULL);
+ textview = gtk_text_view_new_with_buffer (demo->buffer);
+
+ gtk_container_add (GTK_CONTAINER (swindow), textview);
+ gtk_widget_show (textview);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ g_object_weak_ref (G_OBJECT (vbox),
+ (GWeakNotify)pgd_text_free,
+ demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.h
new file mode 100644
index 00000000000..87a11435822
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/text.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _TEXT_H_
+#define _TEXT_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_text_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _TEXT_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.c
new file mode 100644
index 00000000000..b6188b58a6c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.c
@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "transitions.h"
+
+enum {
+ TRANSITIONS_PAGE_COLUMN,
+ TRANSITIONS_TYPE_COLUMN,
+ TRANSITIONS_ALIGNMENT_COLUMN,
+ TRANSITIONS_DIRECTION_COLUMN,
+ TRANSITIONS_DURATION_COLUMN,
+ TRANSITIONS_ANGLE_COLUMN,
+ TRANSITIONS_SCALE_COLUMN,
+ TRANSITIONS_RECTANGULAR_COLUMN,
+ N_COLUMNS
+};
+
+typedef struct {
+ PopplerDocument *doc;
+
+ GtkWidget *treeview;
+ GtkWidget *progress;
+
+ guint idle_id;
+} PgdTransitionsDemo;
+
+static void
+pgd_transitions_free (PgdTransitionsDemo *demo)
+{
+ if (!demo)
+ return;
+
+ if (demo->idle_id > 0) {
+ g_source_remove (demo->idle_id);
+ demo->idle_id = 0;
+ }
+
+ if (demo->doc) {
+ g_object_unref (demo->doc);
+ demo->doc = NULL;
+ }
+
+ g_free (demo);
+}
+
+static const gchar *
+transition_type_to_string (PopplerPageTransitionType type)
+{
+ switch (type) {
+ case POPPLER_PAGE_TRANSITION_REPLACE:
+ return "Replace";
+ case POPPLER_PAGE_TRANSITION_SPLIT:
+ return "Split";
+ case POPPLER_PAGE_TRANSITION_BLINDS:
+ return "Blinds";
+ case POPPLER_PAGE_TRANSITION_BOX:
+ return "Box";
+ case POPPLER_PAGE_TRANSITION_WIPE:
+ return "Wipe";
+ case POPPLER_PAGE_TRANSITION_DISSOLVE:
+ return "Dissolve";
+ case POPPLER_PAGE_TRANSITION_GLITTER:
+ return "Glitter";
+ case POPPLER_PAGE_TRANSITION_FLY:
+ return "Fly";
+ case POPPLER_PAGE_TRANSITION_PUSH:
+ return "Push";
+ case POPPLER_PAGE_TRANSITION_COVER:
+ return "Cover";
+ case POPPLER_PAGE_TRANSITION_UNCOVER:
+ return "Uncover";
+ case POPPLER_PAGE_TRANSITION_FADE:
+ return "Fade";
+ }
+
+ return "Unknown";
+}
+
+static const gchar *
+transition_alignment_to_string (PopplerPageTransitionAlignment alignment)
+{
+ return alignment == POPPLER_PAGE_TRANSITION_HORIZONTAL ? "Horizontal" : "Vertical";
+}
+
+static const gchar *
+transition_direction_to_string (PopplerPageTransitionDirection direction)
+{
+ return direction == POPPLER_PAGE_TRANSITION_INWARD ? "Inward" : "Outward";
+}
+
+static void
+pgd_transitions_update_progress (PgdTransitionsDemo *demo,
+ gint n_pages,
+ gint scanned)
+{
+ gchar *str;
+
+ str = g_strdup_printf ("Scanning transitions (%d%%)",
+ MIN (scanned * 100 / n_pages, 100));
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (demo->progress), str);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (demo->progress),
+ MIN ((gdouble)scanned / n_pages, 1.0));
+ g_free (str);
+}
+
+static gboolean
+pgd_transitions_fill_model (PgdTransitionsDemo *demo)
+{
+ GtkTreeModel *model;
+ gint i, n_pages;
+
+ n_pages = poppler_document_get_n_pages (demo->doc);
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (demo->treeview));
+ g_object_ref (model);
+
+ for (i = 0; i < n_pages; i++) {
+ PopplerPage *page;
+ PopplerPageTransition *transition;
+
+ pgd_transitions_update_progress (demo, n_pages, i);
+
+ while (gtk_events_pending ())
+ gtk_main_iteration ();
+
+ page = poppler_document_get_page (demo->doc, i);
+ if (!page)
+ continue;
+
+ transition = poppler_page_get_transition (page);
+ if (transition) {
+ GtkTreeIter iter;
+ gchar *npage;
+ gchar *duration;
+ gchar *angle;
+ gchar *scale;
+
+ npage = g_strdup_printf ("%d", i + 1);
+ duration = g_strdup_printf ("%d", transition->duration);
+ angle = g_strdup_printf ("%d", transition->angle);
+ scale = g_strdup_printf ("%.2f", transition->scale);
+
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ TRANSITIONS_PAGE_COLUMN, npage,
+ TRANSITIONS_TYPE_COLUMN,
+ transition_type_to_string (transition->type),
+ TRANSITIONS_ALIGNMENT_COLUMN,
+ transition_alignment_to_string (transition->alignment),
+ TRANSITIONS_DIRECTION_COLUMN,
+ transition_direction_to_string (transition->direction),
+ TRANSITIONS_DURATION_COLUMN, duration,
+ TRANSITIONS_ANGLE_COLUMN, angle,
+ TRANSITIONS_SCALE_COLUMN, scale,
+ TRANSITIONS_RECTANGULAR_COLUMN,
+ transition->rectangular ? "Yes" : "No",
+ -1);
+ g_free (npage);
+ g_free (duration);
+ g_free (angle);
+ g_free (scale);
+
+ poppler_page_transition_free (transition);
+ }
+
+ g_object_unref (page);
+ }
+
+ pgd_transitions_update_progress (demo, n_pages, n_pages);
+ g_object_unref (model);
+
+ return FALSE;
+}
+
+static void
+pgd_transitions_scan_button_clicked (GtkButton *button,
+ PgdTransitionsDemo *demo)
+{
+ if (demo->idle_id > 0)
+ g_source_remove (demo->idle_id);
+
+ demo->idle_id = g_idle_add ((GSourceFunc)pgd_transitions_fill_model, demo);
+}
+
+static GtkWidget *
+pgd_transitions_create_list (GtkTreeModel *model)
+{
+ GtkWidget *treeview;
+ GtkCellRenderer *renderer;
+
+ treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_NONE);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 0, "Page",
+ renderer,
+ "text", TRANSITIONS_PAGE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 1, "Type",
+ renderer,
+ "text", TRANSITIONS_TYPE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 2, "Alignment",
+ renderer,
+ "text", TRANSITIONS_ALIGNMENT_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 3, "Direction",
+ renderer,
+ "text", TRANSITIONS_DIRECTION_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 4, "Duration",
+ renderer,
+ "text", TRANSITIONS_DURATION_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 5, "Angle",
+ renderer,
+ "text", TRANSITIONS_ANGLE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 6, "Scale",
+ renderer,
+ "text", TRANSITIONS_SCALE_COLUMN,
+ NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ 7, "Rectangular",
+ renderer,
+ "text", TRANSITIONS_RECTANGULAR_COLUMN,
+ NULL);
+ return treeview;
+}
+
+GtkWidget *
+pgd_transitions_create_widget (PopplerDocument *document)
+{
+ PgdTransitionsDemo *demo;
+ GtkWidget *vbox;
+ GtkListStore *model;
+ GtkWidget *swindow;
+ GtkWidget *hbox, *button;
+
+ demo = g_new0 (PgdTransitionsDemo, 1);
+
+ demo->doc = g_object_ref (document);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+
+ demo->progress = gtk_progress_bar_new ();
+ gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (demo->progress),
+ PANGO_ELLIPSIZE_END);
+ gtk_box_pack_start (GTK_BOX (hbox), demo->progress, TRUE, TRUE, 0);
+ gtk_widget_show (demo->progress);
+
+ button = gtk_button_new_with_label ("Scan");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (pgd_transitions_scan_button_clicked),
+ (gpointer)demo);
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+ gtk_widget_show (hbox);
+
+ swindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ model = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_STRING);
+ demo->treeview = pgd_transitions_create_list (GTK_TREE_MODEL (model));
+ g_object_unref (model);
+
+ gtk_container_add (GTK_CONTAINER (swindow), demo->treeview);
+ gtk_widget_show (demo->treeview);
+
+ gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
+ gtk_widget_show (swindow);
+
+ g_object_weak_ref (G_OBJECT (swindow),
+ (GWeakNotify)pgd_transitions_free,
+ (gpointer)demo);
+
+ return vbox;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.h
new file mode 100644
index 00000000000..11d8bd47f7d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/transitions.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _TRANSITIONS_H_
+#define _TRANSITIONS_H_
+
+G_BEGIN_DECLS
+
+GtkWidget *pgd_transitions_create_widget (PopplerDocument *document);
+
+G_END_DECLS
+
+#endif /* _TRANSITIONS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.c b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.c
new file mode 100644
index 00000000000..010fab3086c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <time.h>
+
+#include "utils.h"
+
+void
+pgd_table_add_property_with_value_widget (GtkTable *table,
+ const gchar *markup,
+ GtkWidget **value_widget,
+ const gchar *value,
+ gint *row)
+{
+ GtkWidget *label;
+
+ label = gtk_label_new (NULL);
+ g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
+ gtk_label_set_markup (GTK_LABEL (label), markup);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, *row, *row + 1,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ *value_widget = label = gtk_label_new (value);
+ g_object_set (G_OBJECT (label),
+ "xalign", 0.0,
+ "selectable", TRUE,
+ "ellipsize", PANGO_ELLIPSIZE_END,
+ NULL);
+ gtk_table_attach (GTK_TABLE (table), label, 1, 2, *row, *row + 1,
+ GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ *row += 1;
+}
+
+void
+pgd_table_add_property (GtkTable *table,
+ const gchar *markup,
+ const gchar *value,
+ gint *row)
+{
+ GtkWidget *label;
+
+ pgd_table_add_property_with_value_widget (table, markup, &label, value, row);
+}
+
+GtkWidget *
+pgd_action_view_new (PopplerDocument *document)
+{
+ GtkWidget *frame, *label;
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Action Properties</b>");
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_widget_show (label);
+
+ g_object_set_data (G_OBJECT (frame), "document", document);
+
+ return frame;
+}
+
+static void
+pgd_action_view_add_destination (GtkWidget *action_view,
+ GtkTable *table,
+ PopplerDest *dest,
+ gboolean remote,
+ gint *row)
+{
+ PopplerDocument *document;
+ GEnumValue *enum_value;
+ gchar *str;
+
+ pgd_table_add_property (table, "<b>Type:</b>", "Destination", row);
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_DEST_TYPE), dest->type);
+ pgd_table_add_property (table, "<b>Destination Type:</b>", enum_value->value_name, row);
+
+ document = g_object_get_data (G_OBJECT (action_view), "document");
+
+ if (dest->type != POPPLER_DEST_NAMED) {
+ str = NULL;
+
+ if (document && !remote) {
+ PopplerPage *poppler_page;
+ gchar *page_label;
+
+ poppler_page = poppler_document_get_page (document, MAX (0, dest->page_num - 1));
+
+ g_object_get (G_OBJECT (poppler_page),
+ "label", &page_label,
+ NULL);
+ if (page_label) {
+ str = g_strdup_printf ("%d (%s)", dest->page_num, page_label);
+ g_free (page_label);
+ }
+ }
+
+ if (!str)
+ str = g_strdup_printf ("%d", dest->page_num);
+ pgd_table_add_property (table, "<b>Page:</b>", str, row);
+ g_free (str);
+
+ str = g_strdup_printf ("%.2f", dest->left);
+ pgd_table_add_property (table, "<b>Left:</b>", str, row);
+ g_free (str);
+
+ str = g_strdup_printf ("%.2f", dest->right);
+ pgd_table_add_property (table, "<b>Right:</b>", str, row);
+ g_free (str);
+
+ str = g_strdup_printf ("%.2f", dest->top);
+ pgd_table_add_property (table, "<b>Top:</b>", str, row);
+ g_free (str);
+
+ str = g_strdup_printf ("%.2f", dest->bottom);
+ pgd_table_add_property (table, "<b>Bottom:</b>", str, row);
+ g_free (str);
+
+ str = g_strdup_printf ("%.2f", dest->zoom);
+ pgd_table_add_property (table, "<b>Zoom:</b>", str, row);
+ g_free (str);
+ } else {
+ pgd_table_add_property (table, "<b>Named Dest:</b>", dest->named_dest, row);
+
+ if (document && !remote) {
+ PopplerDest *new_dest;
+
+ new_dest = poppler_document_find_dest (document, dest->named_dest);
+ if (new_dest) {
+ GtkWidget *new_table, *alignment;
+ gint new_row = 0;
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+
+ new_table = gtk_table_new (8, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (new_table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (new_table), 6);
+ gtk_table_attach_defaults (table, alignment, 0, 2, *row, *row + 1);
+ gtk_widget_show (alignment);
+
+ pgd_action_view_add_destination (action_view, GTK_TABLE (new_table),
+ new_dest, FALSE, &new_row);
+ poppler_dest_free (new_dest);
+
+ gtk_container_add (GTK_CONTAINER (alignment), new_table);
+ gtk_widget_show (new_table);
+
+ *row += 1;
+ }
+ }
+ }
+}
+
+void
+pgd_action_view_set_action (GtkWidget *action_view,
+ PopplerAction *action)
+{
+ GtkWidget *alignment;
+ GtkWidget *table;
+ gint row = 0;
+
+ alignment = gtk_bin_get_child (GTK_BIN (action_view));
+ if (alignment) {
+ gtk_container_remove (GTK_CONTAINER (action_view), alignment);
+ }
+
+ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5);
+ gtk_container_add (GTK_CONTAINER (action_view), alignment);
+ gtk_widget_show (alignment);
+
+ if (!action)
+ return;
+
+ table = gtk_table_new (10, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+
+ pgd_table_add_property (GTK_TABLE (table), "<b>Title:</b>", action->any.title, &row);
+
+ switch (action->type) {
+ case POPPLER_ACTION_UNKNOWN:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "Unknown", &row);
+ break;
+ case POPPLER_ACTION_NONE:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "None", &row);
+ break;
+ case POPPLER_ACTION_GOTO_DEST:
+ pgd_action_view_add_destination (action_view, GTK_TABLE (table), action->goto_dest.dest, FALSE, &row);
+ break;
+ case POPPLER_ACTION_GOTO_REMOTE:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "Remote Destination", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Filename:</b>", action->goto_remote.file_name, &row);
+ pgd_action_view_add_destination (action_view, GTK_TABLE (table), action->goto_remote.dest, TRUE, &row);
+ break;
+ case POPPLER_ACTION_LAUNCH:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "Launch", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Filename:</b>", action->launch.file_name, &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Params:</b>", action->launch.params, &row);
+ break;
+ case POPPLER_ACTION_URI:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "External URI", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>URI</b>", action->uri.uri, &row);
+ break;
+ case POPPLER_ACTION_NAMED:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "Named Action", &row);
+ pgd_table_add_property (GTK_TABLE (table), "<b>Name:</b>", action->named.named_dest, &row);
+ break;
+ case POPPLER_ACTION_MOVIE:
+ pgd_table_add_property (GTK_TABLE (table), "<b>Type:</b>", "Movie", &row);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ gtk_widget_show (table);
+}
+
+gchar *
+pgd_format_date (time_t utime)
+{
+ time_t time = (time_t) utime;
+ char s[256];
+ const char *fmt_hack = "%c";
+ size_t len;
+#ifdef HAVE_LOCALTIME_R
+ struct tm t;
+ if (time == 0 || !localtime_r (&time, &t)) return NULL;
+ len = strftime (s, sizeof (s), fmt_hack, &t);
+#else
+ struct tm *t;
+ if (time == 0 || !(t = localtime (&time)) ) return NULL;
+ len = strftime (s, sizeof (s), fmt_hack, t);
+#endif
+
+ if (len == 0 || s[0] == '\0') return NULL;
+
+ return g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.h b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.h
new file mode 100644
index 00000000000..72c3ef308d3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/demo/utils.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+G_BEGIN_DECLS
+
+void pgd_table_add_property (GtkTable *table,
+ const gchar *markup,
+ const gchar *value,
+ gint *row);
+void pgd_table_add_property_with_value_widget (GtkTable *table,
+ const gchar *markup,
+ GtkWidget **value_widget,
+ const gchar *value,
+ gint *row);
+GtkWidget *pgd_action_view_new (PopplerDocument *document);
+void pgd_action_view_set_action (GtkWidget *action_view,
+ PopplerAction *action);
+gchar *pgd_format_date (time_t utime);
+
+G_END_DECLS
+
+#endif /* _UTILS_H_ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.cc
new file mode 100644
index 00000000000..f171245857b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.cc
@@ -0,0 +1,418 @@
+/* poppler-action.cc: glib wrapper for poppler -*- c-basic-offset: 8 -*-
+ * Copyright (C) 2005, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler.h"
+#include "poppler-private.h"
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerDest, poppler_dest, poppler_dest_copy, poppler_dest_free)
+
+/**
+ * poppler_dest_copy:
+ * @dest: a #PopplerDest
+ *
+ * Copies @dest, creating an identical #PopplerDest.
+ *
+ * Return value: a new destination identical to @dest
+ **/
+PopplerDest *
+poppler_dest_copy (PopplerDest *dest)
+{
+ PopplerDest *new_dest;
+
+ new_dest = g_new0 (PopplerDest, 1);
+ memcpy (new_dest, dest, sizeof (PopplerDest));
+
+ if (dest->named_dest)
+ new_dest->named_dest = g_strdup (dest->named_dest);
+
+ return new_dest;
+}
+
+
+/**
+ * poppler_dest_free:
+ * @dest: a #PopplerDest
+ *
+ * Frees @dest
+ **/
+void
+poppler_dest_free (PopplerDest *dest)
+{
+ if (!dest)
+ return;
+
+ if (dest->named_dest)
+ g_free (dest->named_dest);
+
+ g_free (dest);
+}
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerAction, poppler_action, poppler_action_copy, poppler_action_free)
+
+/**
+ * poppler_action_free:
+ * @action: a #PopplerAction
+ *
+ * Frees @action
+ **/
+void
+poppler_action_free (PopplerAction *action)
+{
+ if (action == NULL)
+ return;
+
+ /* Action specific stuff */
+ switch (action->type) {
+ case POPPLER_ACTION_GOTO_DEST:
+ poppler_dest_free (action->goto_dest.dest);
+ break;
+ case POPPLER_ACTION_GOTO_REMOTE:
+ poppler_dest_free (action->goto_remote.dest);
+ g_free (action->goto_remote.file_name);
+ break;
+ case POPPLER_ACTION_URI:
+ g_free (action->uri.uri);
+ break;
+ case POPPLER_ACTION_LAUNCH:
+ g_free (action->launch.file_name);
+ g_free (action->launch.params);
+ break;
+ case POPPLER_ACTION_NAMED:
+ g_free (action->named.named_dest);
+ break;
+ case POPPLER_ACTION_MOVIE:
+ /* TODO */
+ break;
+ default:
+ break;
+ }
+
+ g_free (action->any.title);
+ g_free (action);
+}
+
+/**
+ * poppler_action_copy:
+ * @action: a #PopplerAction
+ *
+ * Copies @action, creating an identical #PopplerAction.
+ *
+ * Return value: a new action identical to @action
+ **/
+PopplerAction *
+poppler_action_copy (PopplerAction *action)
+{
+ PopplerAction *new_action;
+
+ g_return_val_if_fail (action != NULL, NULL);
+
+ /* Do a straight copy of the memory */
+ new_action = g_new0 (PopplerAction, 1);
+ memcpy (new_action, action, sizeof (PopplerAction));
+
+ if (action->any.title != NULL)
+ new_action->any.title = g_strdup (action->any.title);
+
+ switch (action->type) {
+ case POPPLER_ACTION_GOTO_DEST:
+ new_action->goto_dest.dest = poppler_dest_copy (action->goto_dest.dest);
+ break;
+ case POPPLER_ACTION_GOTO_REMOTE:
+ new_action->goto_remote.dest = poppler_dest_copy (action->goto_remote.dest);
+ if (action->goto_remote.file_name)
+ new_action->goto_remote.file_name = g_strdup (action->goto_remote.file_name);
+ break;
+ case POPPLER_ACTION_URI:
+ if (action->uri.uri)
+ new_action->uri.uri = g_strdup (action->uri.uri);
+ break;
+ case POPPLER_ACTION_LAUNCH:
+ if (action->launch.file_name)
+ new_action->launch.file_name = g_strdup (action->launch.file_name);
+ if (action->launch.params)
+ new_action->launch.params = g_strdup (action->launch.params);
+ break;
+ case POPPLER_ACTION_NAMED:
+ if (action->named.named_dest)
+ new_action->named.named_dest = g_strdup (action->named.named_dest);
+ break;
+ case POPPLER_ACTION_MOVIE:
+ /* TODO */
+ break;
+ default:
+ break;
+ }
+
+ return new_action;
+}
+
+PopplerDest *
+dest_new_goto (PopplerDocument *document,
+ LinkDest *link_dest)
+{
+ PopplerDest *dest;
+
+ dest = g_new0 (PopplerDest, 1);
+
+ if (link_dest == NULL) {
+ dest->type = POPPLER_DEST_UNKNOWN;
+ return dest;
+ }
+
+ switch (link_dest->getKind ()) {
+ case destXYZ:
+ dest->type = POPPLER_DEST_XYZ;
+ break;
+ case destFit:
+ dest->type = POPPLER_DEST_FIT;
+ break;
+ case destFitH:
+ dest->type = POPPLER_DEST_FITH;
+ break;
+ case destFitV:
+ dest->type = POPPLER_DEST_FITV;
+ break;
+ case destFitR:
+ dest->type = POPPLER_DEST_FITR;
+ break;
+ case destFitB:
+ dest->type = POPPLER_DEST_FITB;
+ break;
+ case destFitBH:
+ dest->type = POPPLER_DEST_FITBH;
+ break;
+ case destFitBV:
+ dest->type = POPPLER_DEST_FITBV;
+ break;
+ default:
+ dest->type = POPPLER_DEST_UNKNOWN;
+ }
+
+ if (link_dest->isPageRef ()) {
+ if (document) {
+ Ref page_ref = link_dest->getPageRef ();
+ dest->page_num = document->doc->findPage (page_ref.num, page_ref.gen);
+ } else {
+ /* FIXME: We don't keep areound the page_ref for the
+ * remote doc, so we can't look this up. Guess that
+ * it's 0*/
+ dest->page_num = 0;
+ }
+ } else {
+ dest->page_num = link_dest->getPageNum ();
+ }
+
+ dest->left = link_dest->getLeft ();
+ dest->bottom = link_dest->getBottom ();
+ dest->right = link_dest->getRight ();
+ dest->top = link_dest->getTop ();
+ dest->zoom = link_dest->getZoom ();
+ dest->change_left = link_dest->getChangeLeft ();
+ dest->change_top = link_dest->getChangeTop ();
+ dest->change_zoom = link_dest->getChangeZoom ();
+
+ if (document && dest->page_num > 0) {
+ PopplerPage *page;
+
+ page = poppler_document_get_page (document, dest->page_num - 1);
+
+ if (page) {
+ dest->left -= page->page->getCropBox ()->x1;
+ dest->bottom -= page->page->getCropBox ()->x1;
+ dest->right -= page->page->getCropBox ()->y1;
+ dest->top -= page->page->getCropBox ()->y1;
+
+ g_object_unref (page);
+ } else {
+ g_warning ("Invalid page %d in Link Destination\n", dest->page_num);
+ dest->page_num = 0;
+ }
+ }
+
+ return dest;
+}
+
+static PopplerDest *
+dest_new_named (GooString *named_dest)
+{
+ PopplerDest *dest;
+
+ dest = g_new0 (PopplerDest, 1);
+
+ if (named_dest == NULL) {
+ dest->type = POPPLER_DEST_UNKNOWN;
+ return dest;
+ }
+
+ dest->type = POPPLER_DEST_NAMED;
+ dest->named_dest = g_strdup (named_dest->getCString ());
+
+ return dest;
+}
+
+static void
+build_goto_dest (PopplerDocument *document,
+ PopplerAction *action,
+ LinkGoTo *link)
+{
+ LinkDest *link_dest;
+ GooString *named_dest;
+
+ /* Return if it isn't OK */
+ if (! link->isOk ()) {
+ action->goto_dest.dest = dest_new_goto (NULL, NULL);
+ return;
+ }
+
+ link_dest = link->getDest ();
+ named_dest = link->getNamedDest ();
+
+ if (link_dest != NULL) {
+ action->goto_dest.dest = dest_new_goto (document, link_dest);
+ } else if (named_dest != NULL) {
+ action->goto_dest.dest = dest_new_named (named_dest);
+ } else {
+ action->goto_dest.dest = dest_new_goto (document, NULL);
+ }
+}
+
+static void
+build_goto_remote (PopplerAction *action,
+ LinkGoToR *link)
+{
+ LinkDest *link_dest;
+ GooString *named_dest;
+
+ /* Return if it isn't OK */
+ if (! link->isOk ()) {
+ action->goto_remote.dest = dest_new_goto (NULL, NULL);
+ return;
+ }
+
+ action->goto_remote.file_name = _poppler_goo_string_to_utf8 (link->getFileName());
+
+ link_dest = link->getDest ();
+ named_dest = link->getNamedDest ();
+
+ if (link_dest != NULL) {
+ action->goto_remote.dest = dest_new_goto (NULL, link_dest);
+ } else if (named_dest != NULL) {
+ action->goto_remote.dest = dest_new_named (named_dest);
+ } else {
+ action->goto_remote.dest = dest_new_goto (NULL, NULL);
+ }
+}
+
+static void
+build_launch (PopplerAction *action,
+ LinkLaunch *link)
+{
+ if (link->getFileName()) {
+ action->launch.file_name = g_strdup (link->getFileName()->getCString ());
+ }
+ if (link->getParams()) {
+ action->launch.params = g_strdup (link->getParams()->getCString ());
+ }
+}
+
+static void
+build_uri (PopplerAction *action,
+ LinkURI *link)
+{
+ gchar *uri;
+
+ uri = link->getURI()->getCString ();
+ if (uri != NULL)
+ action->uri.uri = g_strdup (uri);
+}
+
+static void
+build_named (PopplerAction *action,
+ LinkNamed *link)
+{
+ gchar *name;
+
+ name = link->getName ()->getCString ();
+ if (name != NULL)
+ action->named.named_dest = g_strdup (name);
+}
+
+static void
+build_movie (PopplerAction *action,
+ LinkAction *link)
+{
+ /* FIXME: Write */
+}
+
+PopplerAction *
+_poppler_action_new (PopplerDocument *document,
+ LinkAction *link,
+ const gchar *title)
+{
+ PopplerAction *action;
+
+ action = g_new0 (PopplerAction, 1);
+
+ if (title)
+ action->any.title = g_strdup (title);
+
+ if (link == NULL) {
+ action->type = POPPLER_ACTION_NONE;
+ return action;
+ }
+
+ switch (link->getKind ()) {
+ case actionGoTo:
+ action->type = POPPLER_ACTION_GOTO_DEST;
+ build_goto_dest (document, action, dynamic_cast <LinkGoTo *> (link));
+ break;
+ case actionGoToR:
+ action->type = POPPLER_ACTION_GOTO_REMOTE;
+ build_goto_remote (action, dynamic_cast <LinkGoToR *> (link));
+ break;
+ case actionLaunch:
+ action->type = POPPLER_ACTION_LAUNCH;
+ build_launch (action, dynamic_cast <LinkLaunch *> (link));
+ break;
+ case actionURI:
+ action->type = POPPLER_ACTION_URI;
+ build_uri (action, dynamic_cast <LinkURI *> (link));
+ break;
+ case actionNamed:
+ action->type = POPPLER_ACTION_NAMED;
+ build_named (action, dynamic_cast <LinkNamed *> (link));
+ break;
+ case actionMovie:
+ action->type = POPPLER_ACTION_MOVIE;
+ build_movie (action, link);
+ break;
+ case actionUnknown:
+ default:
+ action->type = POPPLER_ACTION_UNKNOWN;
+ break;
+ }
+
+ return action;
+}
+
+PopplerDest *
+_poppler_dest_new_goto (PopplerDocument *document,
+ LinkDest *link_dest)
+{
+ return dest_new_goto (document, link_dest);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.h
new file mode 100644
index 00000000000..a89351af36b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-action.h
@@ -0,0 +1,162 @@
+/* poppler-action.h: glib interface to poppler
+ * Copyright (C) 2004, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_ACTION_H__
+#define __POPPLER_ACTION_H__
+
+#include <glib-object.h>
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+ POPPLER_ACTION_UNKNOWN, /* unknown action */
+ POPPLER_ACTION_NONE, /* no action specified */
+ POPPLER_ACTION_GOTO_DEST, /* go to destination */
+ POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
+ POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
+ POPPLER_ACTION_URI, /* URI */
+ POPPLER_ACTION_NAMED, /* named action*/
+ POPPLER_ACTION_MOVIE /* movie action */
+} PopplerActionType;
+
+typedef enum
+{
+ POPPLER_DEST_UNKNOWN,
+ POPPLER_DEST_XYZ,
+ POPPLER_DEST_FIT,
+ POPPLER_DEST_FITH,
+ POPPLER_DEST_FITV,
+ POPPLER_DEST_FITR,
+ POPPLER_DEST_FITB,
+ POPPLER_DEST_FITBH,
+ POPPLER_DEST_FITBV,
+ POPPLER_DEST_NAMED
+} PopplerDestType;
+
+/* Define the PopplerAction types */
+typedef struct _PopplerActionAny PopplerActionAny;
+typedef struct _PopplerActionGotoDest PopplerActionGotoDest;
+typedef struct _PopplerActionGotoRemote PopplerActionGotoRemote;
+typedef struct _PopplerActionLaunch PopplerActionLaunch;
+typedef struct _PopplerActionUri PopplerActionUri;
+typedef struct _PopplerActionNamed PopplerActionNamed;
+typedef struct _PopplerActionMovie PopplerActionMovie;
+
+struct _PopplerDest
+{
+ PopplerDestType type;
+
+ int page_num;
+ double left;
+ double bottom;
+ double right;
+ double top;
+ double zoom;
+ gchar *named_dest;
+ guint change_left : 1;
+ guint change_top : 1;
+ guint change_zoom : 1;
+};
+
+
+struct _PopplerActionAny
+{
+ PopplerActionType type;
+ gchar *title;
+};
+
+struct _PopplerActionGotoDest
+{
+ PopplerActionType type;
+ gchar *title;
+
+ PopplerDest *dest;
+};
+
+struct _PopplerActionGotoRemote
+{
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ PopplerDest *dest;
+};
+
+struct _PopplerActionLaunch
+{
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ gchar *params;
+};
+
+struct _PopplerActionUri
+{
+ PopplerActionType type;
+ gchar *title;
+
+ char *uri;
+};
+
+struct _PopplerActionNamed
+{
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *named_dest;
+};
+
+struct _PopplerActionMovie
+{
+ PopplerActionType type;
+ gchar *title;
+};
+
+union _PopplerAction
+{
+ PopplerActionType type;
+ PopplerActionAny any;
+ PopplerActionGotoDest goto_dest;
+ PopplerActionGotoRemote goto_remote;
+ PopplerActionLaunch launch;
+ PopplerActionUri uri;
+ PopplerActionNamed named;
+ PopplerActionMovie movie;
+};
+
+#define POPPLER_TYPE_ACTION (poppler_action_get_type ())
+#define POPPLER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ACTION, PopplerAction))
+
+GType poppler_action_get_type (void) G_GNUC_CONST;
+
+void poppler_action_free (PopplerAction *action);
+PopplerAction *poppler_action_copy (PopplerAction *action);
+
+
+#define POPPLER_TYPE_DEST (poppler_dest_get_type ())
+GType poppler_dest_get_type (void) G_GNUC_CONST;
+
+void poppler_dest_free (PopplerDest *dest);
+PopplerDest *poppler_dest_copy (PopplerDest *dest);
+
+G_END_DECLS
+
+#endif /* __POPPLER_GLIB_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.cc
new file mode 100644
index 00000000000..29051f95f7a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.cc
@@ -0,0 +1,839 @@
+/* poppler-annot.cc: glib interface to poppler
+ *
+ * Copyright (C) 2007 Inigo Martinez <inigomartinez@gmail.com>
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler.h"
+#include "poppler-private.h"
+
+typedef struct _PopplerAnnotClass PopplerAnnotClass;
+typedef struct _PopplerAnnotMarkupClass PopplerAnnotMarkupClass;
+typedef struct _PopplerAnnotFreeTextClass PopplerAnnotFreeTextClass;
+typedef struct _PopplerAnnotTextClass PopplerAnnotTextClass;
+
+struct _PopplerAnnot
+{
+ GObject parent_instance;
+ Annot *annot;
+};
+
+struct _PopplerAnnotClass
+{
+ GObjectClass parent_class;
+};
+
+struct _PopplerAnnotMarkup
+{
+ PopplerAnnot parent_instance;
+};
+
+struct _PopplerAnnotMarkupClass
+{
+ PopplerAnnotClass parent_class;
+};
+
+struct _PopplerAnnotText
+{
+ PopplerAnnotMarkup parent_instance;
+};
+
+struct _PopplerAnnotTextClass
+{
+ PopplerAnnotMarkupClass parent_class;
+};
+
+struct _PopplerAnnotFreeText
+{
+ PopplerAnnotMarkup parent_instance;
+};
+
+struct _PopplerAnnotFreeTextClass
+{
+ PopplerAnnotMarkupClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerAnnot, poppler_annot, G_TYPE_OBJECT)
+G_DEFINE_TYPE (PopplerAnnotMarkup, poppler_annot_markup, POPPLER_TYPE_ANNOT)
+G_DEFINE_TYPE (PopplerAnnotText, poppler_annot_text, POPPLER_TYPE_ANNOT_MARKUP)
+G_DEFINE_TYPE (PopplerAnnotFreeText, poppler_annot_free_text, POPPLER_TYPE_ANNOT_MARKUP)
+
+static void
+poppler_annot_finalize (GObject *object)
+{
+ PopplerAnnot *poppler_annot = POPPLER_ANNOT (object);
+
+ poppler_annot->annot = NULL;
+
+ G_OBJECT_CLASS (poppler_annot_parent_class)->finalize (object);
+}
+
+static void
+poppler_annot_init (PopplerAnnot *poppler_annot)
+{
+}
+
+static void
+poppler_annot_class_init (PopplerAnnotClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_annot_finalize;
+}
+
+PopplerAnnot *
+_poppler_annot_new (Annot *annot)
+{
+ PopplerAnnot *poppler_annot;
+
+ poppler_annot = POPPLER_ANNOT (g_object_new (POPPLER_TYPE_ANNOT, NULL));
+ poppler_annot->annot = annot;
+
+ return poppler_annot;
+}
+
+static void
+poppler_annot_markup_init (PopplerAnnotMarkup *poppler_annot)
+{
+}
+
+static void
+poppler_annot_markup_class_init (PopplerAnnotMarkupClass *klass)
+{
+}
+
+static void
+poppler_annot_text_init (PopplerAnnotText *poppler_annot)
+{
+}
+
+static void
+poppler_annot_text_class_init (PopplerAnnotTextClass *klass)
+{
+}
+
+PopplerAnnot *
+_poppler_annot_text_new (Annot *annot)
+{
+ PopplerAnnot *poppler_annot;
+
+ poppler_annot = POPPLER_ANNOT (g_object_new (POPPLER_TYPE_ANNOT_TEXT, NULL));
+ poppler_annot->annot = annot;
+
+ return poppler_annot;
+}
+
+static void
+poppler_annot_free_text_init (PopplerAnnotFreeText *poppler_annot)
+{
+}
+
+static void
+poppler_annot_free_text_class_init (PopplerAnnotFreeTextClass *klass)
+{
+}
+
+PopplerAnnot *
+_poppler_annot_free_text_new (Annot *annot)
+{
+ PopplerAnnot *poppler_annot;
+
+ poppler_annot = POPPLER_ANNOT (g_object_new (POPPLER_TYPE_ANNOT_FREE_TEXT, NULL));
+ poppler_annot->annot = annot;
+
+ return poppler_annot;
+}
+
+/* Public methods */
+/**
+ * poppler_annot_get_annot_type:
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Gets the type of @poppler_annot
+ *
+ * Return value: #PopplerAnnotType of @poppler_annot.
+ **/
+PopplerAnnotType
+poppler_annot_get_annot_type (PopplerAnnot *poppler_annot)
+{
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), POPPLER_ANNOT_UNKNOWN);
+
+ switch (poppler_annot->annot->getType ())
+ {
+ case Annot::typeText:
+ return POPPLER_ANNOT_TEXT;
+ case Annot::typeLink:
+ return POPPLER_ANNOT_LINK;
+ case Annot::typeFreeText:
+ return POPPLER_ANNOT_FREE_TEXT;
+ case Annot::typeLine:
+ return POPPLER_ANNOT_LINE;
+ case Annot::typeSquare:
+ return POPPLER_ANNOT_SQUARE;
+ case Annot::typeCircle:
+ return POPPLER_ANNOT_CIRCLE;
+ case Annot::typePolygon:
+ return POPPLER_ANNOT_POLYGON;
+ case Annot::typePolyLine:
+ return POPPLER_ANNOT_POLY_LINE;
+ case Annot::typeHighlight:
+ return POPPLER_ANNOT_HIGHLIGHT;
+ case Annot::typeUnderline:
+ return POPPLER_ANNOT_UNDERLINE;
+ case Annot::typeSquiggly:
+ return POPPLER_ANNOT_SQUIGGLY;
+ case Annot::typeStrikeOut:
+ return POPPLER_ANNOT_STRIKE_OUT;
+ case Annot::typeStamp:
+ return POPPLER_ANNOT_STAMP;
+ case Annot::typeCaret:
+ return POPPLER_ANNOT_CARET;
+ case Annot::typeInk:
+ return POPPLER_ANNOT_INK;
+ case Annot::typePopup:
+ return POPPLER_ANNOT_POPUP;
+ case Annot::typeFileAttachment:
+ return POPPLER_ANNOT_FILE_ATTACHMENT;
+ case Annot::typeSound:
+ return POPPLER_ANNOT_SOUND;
+ case Annot::typeMovie:
+ return POPPLER_ANNOT_MOVIE;
+ case Annot::typeWidget:
+ return POPPLER_ANNOT_WIDGET;
+ case Annot::typeScreen:
+ return POPPLER_ANNOT_SCREEN;
+ case Annot::typePrinterMark:
+ return POPPLER_ANNOT_PRINTER_MARK;
+ case Annot::typeTrapNet:
+ return POPPLER_ANNOT_TRAP_NET;
+ case Annot::typeWatermark:
+ return POPPLER_ANNOT_WATERMARK;
+ case Annot::type3D:
+ return POPPLER_ANNOT_3D;
+ default:
+ g_warning ("Unsupported Annot Type");
+ }
+
+ return POPPLER_ANNOT_UNKNOWN;
+}
+
+/**
+ * poppler_annot_get_contents:
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Retrieves the contents of @poppler_annot.
+ *
+ * Return value: a new allocated string with the contents of @poppler_annot. It
+ * must be freed with g_free() when done.
+ **/
+gchar *
+poppler_annot_get_contents (PopplerAnnot *poppler_annot)
+{
+ GooString *contents;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), NULL);
+
+ contents = poppler_annot->annot->getContents ();
+
+ return contents ? _poppler_goo_string_to_utf8 (contents) : NULL;
+}
+
+/**
+ * poppler_annot_set_contents:
+ * @poppler_annot: a #PopplerAnnot
+ * @contents: a text string containing the new contents
+ *
+ * Sets the contents of @poppler_annot to the given value,
+ * replacing the current contents.
+ **/
+void
+poppler_annot_set_contents (PopplerAnnot *poppler_annot,
+ const gchar *contents)
+{
+ GooString *goo_tmp;
+ gchar *tmp;
+ gsize length = 0;
+
+ g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
+
+ tmp = contents ? g_convert (contents, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+ goo_tmp = new GooString (tmp, length);
+ g_free (tmp);
+ poppler_annot->annot->setContents (goo_tmp);
+ delete (goo_tmp);
+}
+
+/**
+ * poppler_annot_get_name:
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Retrieves the name of @poppler_annot.
+ *
+ * Return value: a new allocated string with the name of @poppler_annot. It must
+ * be freed with g_free() when done.
+ **/
+gchar *
+poppler_annot_get_name (PopplerAnnot *poppler_annot)
+{
+ GooString *name;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), NULL);
+
+ name = poppler_annot->annot->getName ();
+
+ return name ? _poppler_goo_string_to_utf8 (name) : NULL;
+}
+
+/**
+ * poppler_annot_get_modified:
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Retrieves the last modification data of @poppler_annot. The returned
+ * string will be either a PDF format date or a text string.
+ * See also #poppler_date_parse()
+ *
+ * Return value: a new allocated string with the last modification data of
+ * @poppler_annot. It must be freed with g_free() when done.
+ **/
+gchar *
+poppler_annot_get_modified (PopplerAnnot *poppler_annot)
+{
+ GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), NULL);
+
+ text = poppler_annot->annot->getModified ();
+
+ return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+}
+
+/**
+ * poppler_annot_get_flags
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Retrieves the flag field specifying various characteristics of the
+ * @poppler_annot.
+ *
+ * Return value: the flag field of @poppler_annot.
+ **/
+PopplerAnnotFlag
+poppler_annot_get_flags (PopplerAnnot *poppler_annot)
+{
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), (PopplerAnnotFlag) 0);
+
+ return (PopplerAnnotFlag) poppler_annot->annot->getFlags ();
+}
+
+/**
+ * poppler_annot_get_color:
+ * @poppler_annot: a #PopplerAnnot
+ *
+ * Retrieves the color of @poppler_annot.
+ *
+ * Return value: a new allocated #PopplerColor with the color values of
+ * @poppler_annot, or %NULL. It must be freed with g_free() when done.
+ **/
+PopplerColor *
+poppler_annot_get_color (PopplerAnnot *poppler_annot)
+{
+ AnnotColor *color;
+ PopplerColor *poppler_color = NULL;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT (poppler_annot), NULL);
+
+ color = poppler_annot->annot->getColor ();
+
+ if (color) {
+ double *values = color->getValues ();
+
+ switch (color->getSpace ())
+ {
+ case AnnotColor::colorGray:
+ poppler_color = g_new (PopplerColor, 1);
+
+ poppler_color->red = (guint16) (values[0] * 65535);
+ poppler_color->green = poppler_color->red;
+ poppler_color->blue = poppler_color->red;
+
+ break;
+ case AnnotColor::colorRGB:
+ poppler_color = g_new (PopplerColor, 1);
+
+ poppler_color->red = (guint16) (values[0] * 65535);
+ poppler_color->green = (guint16) (values[1] * 65535);
+ poppler_color->blue = (guint16) (values[2] * 65535);
+
+ break;
+ case AnnotColor::colorCMYK:
+ g_warning ("Unsupported Annot Color: colorCMYK");
+ case AnnotColor::colorTransparent:
+ break;
+ }
+ }
+
+ return poppler_color;
+}
+
+/* PopplerAnnotMarkup */
+/**
+* poppler_annot_markup_get_label:
+* @poppler_annot: a #PopplerAnnotMarkup
+*
+* Retrieves the label text of @poppler_annot.
+*
+* Return value: the label text of @poppler_annot.
+*/
+gchar *
+poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+ GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ text = annot->getLabel ();
+
+ return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+}
+
+/**
+ * poppler_annot_markup_has_popup:
+ * @poppler_annot: a #PopplerAnnotMarkup
+ *
+ * Return %TRUE if the markup annotation has a popup window associated
+ *
+ * Return value: %TRUE, if @poppler_annot has popup, %FALSE otherwise
+ **/
+gboolean
+poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), FALSE);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ return annot->getPopup () != NULL;
+}
+
+/**
+ * poppler_annot_markup_get_popup_is_open:
+ * @poppler_annot: a #PopplerAnnotMarkup
+ *
+ * Retrieves the state of the popup annot related to @poppler_annot.
+ *
+ * Return value: the state of @poppler_annot. %TRUE if it's open, %FALSE in
+ * other case.
+ **/
+gboolean
+poppler_annot_markup_get_popup_is_open (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+ AnnotPopup *annot_popup;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), FALSE);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ if ((annot_popup = annot->getPopup ()))
+ return annot_popup->getOpen ();
+
+ return FALSE;
+}
+
+/**
+ * poppler_annot_markup_get_popup_rectangle:
+ * @poppler_annot: a #PopplerAnnotMarkup
+ * @poppler_rect: a #PopplerRectangle to store the popup rectangle
+ *
+ * Retrieves the rectangle of the popup annot related to @poppler_annot.
+ *
+ * Return value: %TRUE if #PopplerRectangle was correctly filled,
+ * %FALSE otherwise
+ **/
+gboolean
+poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
+ PopplerRectangle *poppler_rect)
+{
+ AnnotMarkup *annot;
+ Annot *annot_popup;
+ PDFRectangle *annot_rect;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), FALSE);
+ g_return_val_if_fail (poppler_rect != NULL, FALSE);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+ annot_popup = annot->getPopup ();
+ if (!annot_popup)
+ return FALSE;
+
+ annot_rect = annot_popup->getRect ();
+ poppler_rect->x1 = annot_rect->x1;
+ poppler_rect->x2 = annot_rect->x2;
+ poppler_rect->y1 = annot_rect->y1;
+ poppler_rect->y2 = annot_rect->y2;
+
+ return TRUE;
+}
+
+/**
+* poppler_annot_markup_get_opacity:
+* @poppler_annot: a #PopplerAnnotMarkup
+*
+* Retrieves the opacity value of @poppler_annot.
+*
+* Return value: the opacity value of @poppler_annot.
+*/
+gdouble
+poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), 0);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ return annot->getOpacity ();
+}
+
+GDate *
+poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+ GooString *annot_date;
+ time_t timet;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+ annot_date = annot->getDate ();
+ if (!annot_date)
+ return NULL;
+
+ if (_poppler_convert_pdf_date_to_gtime (annot_date, &timet)) {
+ GDate *date;
+
+ date = g_date_new ();
+ g_date_set_time_t (date, timet);
+
+ return date;
+ }
+
+ return NULL;
+}
+
+/**
+* poppler_annot_markup_get_subject:
+* @poppler_annot: a #PopplerAnnotMarkup
+*
+* Retrives the subject text of @poppler_annot.
+*
+* Return value: the subject text of @poppler_annot.
+*/
+gchar *
+poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+ GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ text = annot->getSubject ();
+
+ return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+}
+
+/**
+* poppler_annot_markup_get_reply_to:
+* @poppler_annot: a #PopplerAnnotMarkup
+*
+* Gets the reply type of @poppler_annot.
+*
+* Return value: #PopplerAnnotMarkupReplyType of @poppler_annot.
+*/
+PopplerAnnotMarkupReplyType
+poppler_annot_markup_get_reply_to (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), POPPLER_ANNOT_MARKUP_REPLY_TYPE_R);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ switch (annot->getReplyTo ())
+ {
+ case AnnotMarkup::replyTypeR:
+ return POPPLER_ANNOT_MARKUP_REPLY_TYPE_R;
+ case AnnotMarkup::replyTypeGroup:
+ return POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP;
+ default:
+ g_warning ("Unsupported Annot Markup Reply To Type");
+ }
+
+ return POPPLER_ANNOT_MARKUP_REPLY_TYPE_R;
+}
+
+/**
+* poppler_annot_markup_get_external_data:
+* @poppler_annot: a #PopplerAnnotMarkup
+*
+* Gets the external data type of @poppler_annot.
+*
+* Return value: #PopplerAnnotExternalDataType of @poppler_annot.
+*/
+PopplerAnnotExternalDataType
+poppler_annot_markup_get_external_data (PopplerAnnotMarkup *poppler_annot)
+{
+ AnnotMarkup *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ switch (annot->getExData ())
+ {
+ case annotExternalDataMarkup3D:
+ return POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D;
+ case annotExternalDataMarkupUnknown:
+ return POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN;
+ default:
+ g_warning ("Unsupported Annot Markup External Data");
+ }
+
+ return POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN;
+}
+
+/* PopplerAnnotText */
+/**
+ * poppler_annot_text_get_is_open:
+ * @poppler_annot: a #PopplerAnnotText
+ *
+ * Retrieves the state of @poppler_annot.
+ *
+ * Return value: the state of @poppler_annot. %TRUE if it's open, %FALSE in
+ * other case.
+ **/
+gboolean
+poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot)
+{
+ AnnotText *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_TEXT (poppler_annot), FALSE);
+
+ annot = static_cast<AnnotText *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ return annot->getOpen ();
+}
+
+/**
+ * poppler_annot_text_get_icon:
+ * @poppler_annot: a #PopplerAnnotText
+ *
+ * Gets the icon type of @poppler_annot.
+ *
+ * Return value: #PopplerAnnotTextIcon of @poppler_annot.
+ **/
+gchar *
+poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot)
+{
+ AnnotText *annot;
+ GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_TEXT (poppler_annot), NULL);
+
+ annot = static_cast<AnnotText *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ text = annot->getIcon ();
+
+ return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+}
+
+/**
+ * poppler_annot_text_get_state:
+ * @poppler_annot: a #PopplerAnnotText
+ *
+ * Retrieves the state of @poppler_annot.
+ *
+ * Return value: #PopplerAnnotTextState of @poppler_annot.
+ **/
+PopplerAnnotTextState
+poppler_annot_text_get_state (PopplerAnnotText *poppler_annot)
+{
+ AnnotText *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_TEXT (poppler_annot), POPPLER_ANNOT_TEXT_STATE_UNKNOWN);
+
+ annot = static_cast<AnnotText *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ switch (annot->getState ())
+ {
+ case AnnotText::stateUnknown:
+ return POPPLER_ANNOT_TEXT_STATE_UNKNOWN;
+ case AnnotText::stateMarked:
+ return POPPLER_ANNOT_TEXT_STATE_MARKED;
+ case AnnotText::stateUnmarked:
+ return POPPLER_ANNOT_TEXT_STATE_UNMARKED;
+ case AnnotText::stateAccepted:
+ return POPPLER_ANNOT_TEXT_STATE_ACCEPTED;
+ case AnnotText::stateRejected:
+ return POPPLER_ANNOT_TEXT_STATE_REJECTED;
+ case AnnotText::stateCancelled:
+ return POPPLER_ANNOT_TEXT_STATE_CANCELLED;
+ case AnnotText::stateCompleted:
+ return POPPLER_ANNOT_TEXT_STATE_COMPLETED;
+ case AnnotText::stateNone:
+ return POPPLER_ANNOT_TEXT_STATE_NONE;
+ default:
+ g_warning ("Unsupported Annot Text State");
+ }
+
+ return POPPLER_ANNOT_TEXT_STATE_UNKNOWN;
+}
+
+/* PopplerAnnotFreeText */
+/**
+ * poppler_annot_free_text_get_quadding:
+ * @poppler_annot: a #PopplerAnnotFreeText
+ *
+ * Retrieves the justification of the text of @poppler_annot.
+ *
+ * Return value: #PopplerAnnotFreeTextQuadding of @poppler_annot.
+ **/
+PopplerAnnotFreeTextQuadding
+poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot)
+{
+ AnnotFreeText *annot;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_FREE_TEXT (poppler_annot), POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED);
+
+ annot = static_cast<AnnotFreeText *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ switch (annot->getQuadding ())
+ {
+ case AnnotFreeText::quaddingLeftJustified:
+ return POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED;
+ case AnnotFreeText::quaddingCentered:
+ return POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED;
+ case AnnotFreeText::quaddingRightJustified:
+ return POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED;
+ default:
+ g_warning ("Unsupported Annot Free Text Quadding");
+ }
+
+ return POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED;
+}
+
+/**
+ * poppler_annot_free_text_get_callout_line:
+ * @poppler_annot: a #PopplerAnnotFreeText
+ *
+ * Retrieves a #PopplerCalloutLine of four or six numbers specifying a callout
+ * line attached to the @poppler_annot.
+ *
+ * Return value: a new allocated #PopplerCalloutLine if the annot has a callout
+ * line, NULL in other case. It must be freed with g_free() when
+ * done.
+ **/
+PopplerAnnotCalloutLine *
+poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot)
+{
+ AnnotFreeText *annot;
+ AnnotCalloutLine *line;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_FREE_TEXT (poppler_annot), NULL);
+
+ annot = static_cast<AnnotFreeText *>(POPPLER_ANNOT (poppler_annot)->annot);
+
+ if ((line = annot->getCalloutLine ())) {
+ AnnotCalloutMultiLine *multiline;
+ PopplerAnnotCalloutLine *callout = g_new0 (PopplerAnnotCalloutLine, 1);
+
+ callout->x1 = line->getX1();
+ callout->y1 = line->getY1();
+ callout->x2 = line->getX2();
+ callout->y2 = line->getY2();
+
+ if ((multiline = static_cast<AnnotCalloutMultiLine *>(line))) {
+ callout->multiline = TRUE;
+ callout->x3 = multiline->getX3();
+ callout->y3 = multiline->getY3();
+ return callout;
+ }
+
+ callout->multiline = FALSE;
+ return callout;
+ }
+
+ return NULL;
+}
+
+/* PopplerAnnotCalloutLine */
+POPPLER_DEFINE_BOXED_TYPE (PopplerAnnotCalloutLine, poppler_annot_callout_line,
+ poppler_annot_callout_line_copy,
+ poppler_annot_callout_line_free)
+
+/**
+ * poppler_annot_callout_line_new:
+ *
+ * Creates a new empty #PopplerAnnotCalloutLine.
+ *
+ * Return value: a new allocated #PopplerAnnotCalloutLine, NULL in other case.
+ * It must be freed when done.
+ **/
+PopplerAnnotCalloutLine *
+poppler_annot_callout_line_new (void)
+{
+ return g_new0 (PopplerAnnotCalloutLine, 1);
+}
+
+/**
+ * poppler_annot_callout_line_copy:
+ * @callout: the #PopplerAnnotCalloutline to be copied.
+ *
+ * It does copy @callout to a new #PopplerAnnotCalloutLine.
+ *
+ * Return value: a new allocated #PopplerAnnotCalloutLine as exact copy of
+ * @callout, NULL in other case. It must be freed when done.
+ **/
+PopplerAnnotCalloutLine *
+poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout)
+{
+ PopplerAnnotCalloutLine *new_callout;
+
+ g_return_val_if_fail (callout != NULL, NULL);
+
+ new_callout = g_new0 (PopplerAnnotCalloutLine, 1);
+ *new_callout = *callout;
+
+ return new_callout;
+}
+
+/**
+ * poppler_annot_callout_line_free:
+ * @callout: a #PopplerAnnotCalloutLine
+ *
+ * Frees the memory used by #PopplerAnnotCalloutLine.
+ **/
+void
+poppler_annot_callout_line_free (PopplerAnnotCalloutLine *callout)
+{
+ g_free (callout);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.h
new file mode 100644
index 00000000000..46480274e45
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-annot.h
@@ -0,0 +1,176 @@
+/* poppler-annot.h: glib interface to poppler
+ *
+ * Copyright (C) 2007 Inigo Martinez <inigomartinez@gmail.com>
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_ANNOT_H__
+#define __POPPLER_ANNOT_H__
+
+#include <glib-object.h>
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+#define POPPLER_TYPE_ANNOT (poppler_annot_get_type ())
+#define POPPLER_ANNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT, PopplerAnnot))
+#define POPPLER_IS_ANNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT))
+
+#define POPPLER_TYPE_ANNOT_MARKUP (poppler_annot_markup_get_type ())
+#define POPPLER_ANNOT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MARKUP, PopplerAnnotMarkup))
+#define POPPLER_IS_ANNOT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_MARKUP))
+
+#define POPPLER_TYPE_ANNOT_TEXT (poppler_annot_text_get_type ())
+#define POPPLER_ANNOT_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_TEXT, PopplerAnnotText))
+#define POPPLER_IS_ANNOT_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_TEXT))
+
+#define POPPLER_TYPE_ANNOT_FREE_TEXT (poppler_annot_free_text_get_type ())
+#define POPPLER_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT, PopplerAnnotFreeText))
+#define POPPLER_IS_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT))
+
+#define POPPLER_TYPE_ANNOT_CALLOUT_LINE (poppler_annot_callout_line_get_type ())
+
+typedef enum
+{
+ POPPLER_ANNOT_UNKNOWN,
+ POPPLER_ANNOT_TEXT,
+ POPPLER_ANNOT_LINK,
+ POPPLER_ANNOT_FREE_TEXT,
+ POPPLER_ANNOT_LINE,
+ POPPLER_ANNOT_SQUARE,
+ POPPLER_ANNOT_CIRCLE,
+ POPPLER_ANNOT_POLYGON,
+ POPPLER_ANNOT_POLY_LINE,
+ POPPLER_ANNOT_HIGHLIGHT,
+ POPPLER_ANNOT_UNDERLINE,
+ POPPLER_ANNOT_SQUIGGLY,
+ POPPLER_ANNOT_STRIKE_OUT,
+ POPPLER_ANNOT_STAMP,
+ POPPLER_ANNOT_CARET,
+ POPPLER_ANNOT_INK,
+ POPPLER_ANNOT_POPUP,
+ POPPLER_ANNOT_FILE_ATTACHMENT,
+ POPPLER_ANNOT_SOUND,
+ POPPLER_ANNOT_MOVIE,
+ POPPLER_ANNOT_WIDGET,
+ POPPLER_ANNOT_SCREEN,
+ POPPLER_ANNOT_PRINTER_MARK,
+ POPPLER_ANNOT_TRAP_NET,
+ POPPLER_ANNOT_WATERMARK,
+ POPPLER_ANNOT_3D
+} PopplerAnnotType;
+
+typedef enum /*< flags >*/
+{
+ POPPLER_ANNOT_FLAG_UNKNOWN = 0,
+ POPPLER_ANNOT_FLAG_INVISIBLE = 1 << 0,
+ POPPLER_ANNOT_FLAG_HIDDEN = 1 << 1,
+ POPPLER_ANNOT_FLAG_PRINT = 1 << 2,
+ POPPLER_ANNOT_FLAG_NO_ZOOM = 1 << 3,
+ POPPLER_ANNOT_FLAG_NO_ROTATE = 1 << 4,
+ POPPLER_ANNOT_FLAG_NO_VIEW = 1 << 5,
+ POPPLER_ANNOT_FLAG_READ_ONLY = 1 << 6,
+ POPPLER_ANNOT_FLAG_LOCKED = 1 << 7,
+ POPPLER_ANNOT_FLAG_TOGGLE_NO_VIEW = 1 << 8,
+ POPPLER_ANNOT_FLAG_LOCKED_CONTENTS = 1 << 9
+} PopplerAnnotFlag;
+
+typedef enum
+{
+ POPPLER_ANNOT_MARKUP_REPLY_TYPE_R,
+ POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP
+} PopplerAnnotMarkupReplyType;
+
+typedef enum
+{
+ POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D,
+ POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN
+} PopplerAnnotExternalDataType;
+
+typedef enum
+{
+ POPPLER_ANNOT_TEXT_STATE_MARKED,
+ POPPLER_ANNOT_TEXT_STATE_UNMARKED,
+ POPPLER_ANNOT_TEXT_STATE_ACCEPTED,
+ POPPLER_ANNOT_TEXT_STATE_REJECTED,
+ POPPLER_ANNOT_TEXT_STATE_CANCELLED,
+ POPPLER_ANNOT_TEXT_STATE_COMPLETED,
+ POPPLER_ANNOT_TEXT_STATE_NONE,
+ POPPLER_ANNOT_TEXT_STATE_UNKNOWN
+} PopplerAnnotTextState;
+
+typedef enum
+{
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED,
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED,
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED
+} PopplerAnnotFreeTextQuadding;
+
+struct _PopplerAnnotCalloutLine
+{
+ gboolean multiline;
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+ gdouble x3;
+ gdouble y3;
+};
+
+GType poppler_annot_get_type (void) G_GNUC_CONST;
+PopplerAnnotType poppler_annot_get_annot_type (PopplerAnnot *poppler_annot);
+gchar *poppler_annot_get_contents (PopplerAnnot *poppler_annot);
+void poppler_annot_set_contents (PopplerAnnot *poppler_annot,
+ const gchar *contents);
+gchar *poppler_annot_get_name (PopplerAnnot *poppler_annot);
+gchar *poppler_annot_get_modified (PopplerAnnot *poppler_annot);
+PopplerAnnotFlag poppler_annot_get_flags (PopplerAnnot *poppler_annot);
+PopplerColor *poppler_annot_get_color (PopplerAnnot *poppler_annot);
+
+/* PopplerAnnotMarkup */
+GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+gchar *poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot);
+gboolean poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot);
+gboolean poppler_annot_markup_get_popup_is_open (PopplerAnnotMarkup *poppler_annot);
+gboolean poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
+ PopplerRectangle *poppler_rect);
+gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot);
+GDate *poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot);
+gchar *poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot);
+PopplerAnnotMarkupReplyType poppler_annot_markup_get_reply_to (PopplerAnnotMarkup *poppler_annot);
+PopplerAnnotExternalDataType poppler_annot_markup_get_external_data (PopplerAnnotMarkup *poppler_annot);
+
+/* PopplerAnnotText */
+GType poppler_annot_text_get_type (void) G_GNUC_CONST;
+gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot);
+gchar *poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot);
+PopplerAnnotTextState poppler_annot_text_get_state (PopplerAnnotText *poppler_annot);
+
+/* PopplerAnnotFreeText */
+GType poppler_annot_free_text_get_type (void) G_GNUC_CONST;
+PopplerAnnotFreeTextQuadding poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot);
+PopplerAnnotCalloutLine *poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot);
+
+/* PopplerCalloutLine */
+GType poppler_annot_callout_line_get_type (void) G_GNUC_CONST;
+PopplerAnnotCalloutLine *poppler_annot_callout_line_new (void);
+PopplerAnnotCalloutLine *poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout);
+void poppler_annot_callout_line_free (PopplerAnnotCalloutLine *callout);
+
+G_END_DECLS
+
+#endif /* __POPPLER_ANNOT_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.cc
new file mode 100644
index 00000000000..78bc72f63a1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.cc
@@ -0,0 +1,274 @@
+/* poppler-attachment.cc: glib wrapper for poppler
+ * Copyright (C) 2006, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include <errno.h>
+#include <glib/gstdio.h>
+
+#include "poppler.h"
+#include "poppler-private.h"
+
+/* FIXME: We need to add gettext support sometime */
+#define _(x) (x)
+
+typedef struct _PopplerAttachmentPrivate PopplerAttachmentPrivate;
+struct _PopplerAttachmentPrivate
+{
+ Object *obj_stream;
+ PopplerDocument *document;
+};
+
+#define POPPLER_ATTACHMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachmentPrivate))
+
+static void poppler_attachment_dispose (GObject *obj);
+static void poppler_attachment_finalize (GObject *obj);
+
+G_DEFINE_TYPE (PopplerAttachment, poppler_attachment, G_TYPE_OBJECT)
+
+static void
+poppler_attachment_init (PopplerAttachment *attachment)
+{
+}
+
+static void
+poppler_attachment_class_init (PopplerAttachmentClass *klass)
+{
+ G_OBJECT_CLASS (klass)->dispose = poppler_attachment_dispose;
+ G_OBJECT_CLASS (klass)->finalize = poppler_attachment_finalize;
+ g_type_class_add_private (klass, sizeof (PopplerAttachmentPrivate));
+}
+
+static void
+poppler_attachment_dispose (GObject *obj)
+{
+ PopplerAttachmentPrivate *priv;
+
+ priv = POPPLER_ATTACHMENT_GET_PRIVATE (obj);
+
+ if (priv->obj_stream)
+ {
+ priv->obj_stream->free();
+ delete priv->obj_stream;
+ priv->obj_stream = NULL;
+ }
+
+ if (priv->document)
+ {
+ g_object_unref (priv->document);
+ priv->document = NULL;
+ }
+
+ G_OBJECT_CLASS (poppler_attachment_parent_class)->dispose (obj);
+}
+
+static void
+poppler_attachment_finalize (GObject *obj)
+{
+ PopplerAttachment *attachment;
+
+ attachment = (PopplerAttachment *) obj;
+
+ if (attachment->name)
+ g_free (attachment->name);
+ attachment->name = NULL;
+
+ if (attachment->description)
+ g_free (attachment->description);
+ attachment->description = NULL;
+
+ if (attachment->checksum)
+ g_string_free (attachment->checksum, TRUE);
+ attachment->checksum = NULL;
+
+ G_OBJECT_CLASS (poppler_attachment_parent_class)->finalize (obj);
+}
+
+/* Public functions */
+
+PopplerAttachment *
+_poppler_attachment_new (PopplerDocument *document,
+ EmbFile *emb_file)
+{
+ PopplerAttachment *attachment;
+ PopplerAttachmentPrivate *priv;
+
+ g_assert (document != NULL);
+ g_assert (emb_file != NULL);
+
+ attachment = (PopplerAttachment *) g_object_new (POPPLER_TYPE_ATTACHMENT, NULL);
+ priv = POPPLER_ATTACHMENT_GET_PRIVATE (attachment);
+
+ priv->document = (PopplerDocument *) g_object_ref (document);
+
+ if (emb_file->name ())
+ attachment->name = _poppler_goo_string_to_utf8 (emb_file->name ());
+ if (emb_file->description ())
+ attachment->description = _poppler_goo_string_to_utf8 (emb_file->description ());
+
+ attachment->size = emb_file->size ();
+
+ _poppler_convert_pdf_date_to_gtime (emb_file->createDate (), (time_t *)&attachment->ctime);
+ _poppler_convert_pdf_date_to_gtime (emb_file->modDate (), (time_t *)&attachment->mtime);
+
+ if (emb_file->checksum ()->getLength () > 0)
+ attachment->checksum = g_string_new_len (emb_file->checksum ()->getCString (),
+ emb_file->checksum ()->getLength ());
+
+ priv->obj_stream = new Object();
+ emb_file->streamObject().copy(priv->obj_stream);
+
+ return attachment;
+}
+
+static gboolean
+save_helper (const gchar *buf,
+ gsize count,
+ gpointer data,
+ GError **error)
+{
+ FILE *f = (FILE *) data;
+ gsize n;
+
+ n = fwrite (buf, 1, count, f);
+ if (n != count)
+ {
+ g_set_error (error,
+ G_FILE_ERROR,
+ g_file_error_from_errno (errno),
+ _("Error writing to image file: %s"),
+ g_strerror (errno));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * poppler_attachment_save:
+ * @attachment: A #PopplerAttachment.
+ * @filename: name of file to save
+ * @error: return location for error, or %NULL.
+ *
+ * Saves @attachment to a file indicated by @filename. If @error is set, %FALSE
+ * will be returned. Possible errors include those in the #G_FILE_ERROR domain
+ * and whatever the save function generates.
+ *
+ * Return value: %TRUE, if the file successfully saved
+ **/
+gboolean
+poppler_attachment_save (PopplerAttachment *attachment,
+ const char *filename,
+ GError **error)
+{
+ gboolean result;
+ FILE *f;
+
+ g_return_val_if_fail (POPPLER_IS_ATTACHMENT (attachment), FALSE);
+
+ f = g_fopen (filename, "wb");
+
+ if (f == NULL)
+ {
+ gchar *display_name = g_filename_display_name (filename);
+ g_set_error (error,
+ G_FILE_ERROR,
+ g_file_error_from_errno (errno),
+ _("Failed to open '%s' for writing: %s"),
+ display_name,
+ g_strerror (errno));
+ g_free (display_name);
+ return FALSE;
+ }
+
+ result = poppler_attachment_save_to_callback (attachment, save_helper, f, error);
+
+ if (fclose (f) < 0)
+ {
+ gchar *display_name = g_filename_display_name (filename);
+ g_set_error (error,
+ G_FILE_ERROR,
+ g_file_error_from_errno (errno),
+ _("Failed to close '%s', all data may not have been saved: %s"),
+ display_name,
+ g_strerror (errno));
+ g_free (display_name);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+#define BUF_SIZE 1024
+
+/**
+ * poppler_attachment_save_to_callback:
+ * @attachment: A #PopplerAttachment.
+ * @save_func: a function that is called to save each block of data that the save routine generates.
+ * @user_data: user data to pass to the save function.
+ * @error: return location for error, or %NULL.
+ *
+ * Saves @attachment by feeding the produced data to @save_func. Can be used
+ * when you want to store the attachment to something other than a file, such as
+ * an in-memory buffer or a socket. If @error is set, %FALSE will be
+ * returned. Possible errors include those in the #G_FILE_ERROR domain and
+ * whatever the save function generates.
+ *
+ * Return value: %TRUE, if the save successfully completed
+ **/
+gboolean
+poppler_attachment_save_to_callback (PopplerAttachment *attachment,
+ PopplerAttachmentSaveFunc save_func,
+ gpointer user_data,
+ GError **error)
+{
+ Stream *stream;
+ gchar buf[BUF_SIZE];
+ int i;
+ gboolean eof_reached = FALSE;
+
+ g_return_val_if_fail (POPPLER_IS_ATTACHMENT (attachment), FALSE);
+
+ stream = POPPLER_ATTACHMENT_GET_PRIVATE (attachment)->obj_stream->getStream();
+ stream->reset();
+
+ do
+ {
+ int data;
+
+ for (i = 0; i < BUF_SIZE; i++)
+ {
+ data = stream->getChar ();
+ if (data == EOF)
+ {
+ eof_reached = TRUE;
+ break;
+ }
+ buf[i] = data;
+ }
+
+ if (i > 0)
+ {
+ if (! (save_func) (buf, i, user_data, error))
+ return FALSE;
+ }
+ }
+ while (! eof_reached);
+
+
+ return TRUE;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.h
new file mode 100644
index 00000000000..d506167d005
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-attachment.h
@@ -0,0 +1,70 @@
+/* poppler-attachment.h: glib interface to poppler
+ * Copyright (C) 2004, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_ATTACHMENT_H__
+#define __POPPLER_ATTACHMENT_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+
+#define POPPLER_TYPE_ATTACHMENT (poppler_attachment_get_type ())
+#define POPPLER_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachment))
+#define POPPLER_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ATTACHMENT))
+
+
+typedef gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf,
+ gsize count,
+ gpointer data,
+ GError **error);
+
+struct _PopplerAttachment
+{
+ GObject parent;
+
+ gchar *name;
+ gchar *description;
+ gsize size;
+ GTime mtime;
+ GTime ctime;
+ GString *checksum;
+};
+
+typedef struct _PopplerAttachmentClass
+{
+ GObjectClass parent_class;
+} PopplerAttachmentClass;
+
+
+GType poppler_attachment_get_type (void) G_GNUC_CONST;
+gboolean poppler_attachment_save (PopplerAttachment *attachment,
+ const char *filename,
+ GError **error);
+gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment,
+ PopplerAttachmentSaveFunc save_func,
+ gpointer user_data,
+ GError **error);
+
+
+G_END_DECLS
+
+#endif /* __POPPLER_ATTACHMENT_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.cc
new file mode 100644
index 00000000000..2444f93c20a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.cc
@@ -0,0 +1,66 @@
+/* poppler-date.cc: glib interface to poppler
+ *
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <DateInfo.h>
+
+#include "poppler-date.h"
+
+/**
+ * poppler_date_parse:
+ * @date: string to parse
+ * @timet: an uninitialized #time_t
+ *
+ * Parses a PDF format date string and converts it to a #time_t. Returns #FALSE
+ * if the parsing fails or the input string is not a valid PDF format date string
+ *
+ * Return value: #TRUE, if @timet was set
+ **/
+gboolean
+poppler_date_parse (const gchar *date,
+ time_t *timet)
+{
+ gint year, mon, day, hour, min, sec, tz_hour, tz_minute;
+ gchar tz;
+ struct tm time;
+ time_t retval;
+
+ /* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */
+ // TODO do something with the timezone information
+ if (!parseDateString (date, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute))
+ return FALSE;
+
+ time.tm_year = year - 1900;
+ time.tm_mon = mon - 1;
+ time.tm_mday = day;
+ time.tm_hour = hour;
+ time.tm_min = min;
+ time.tm_sec = sec;
+ time.tm_wday = -1;
+ time.tm_yday = -1;
+ time.tm_isdst = -1; /* 0 = DST off, 1 = DST on, -1 = don't know */
+
+ /* compute tm_wday and tm_yday and check date */
+ retval = mktime (&time);
+ if (retval == (time_t) - 1)
+ return FALSE;
+
+ *timet = retval;
+
+ return TRUE;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.h
new file mode 100644
index 00000000000..2bb52b27377
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-date.h
@@ -0,0 +1,30 @@
+/* poppler-date.h: glib interface to poppler
+ *
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_DATE_H__
+#define __POPPLER_DATE_H__
+
+#include "poppler.h"
+
+G_BEGIN_DECLS
+gboolean poppler_date_parse (const gchar *date,
+ time_t *timet);
+G_END_DECLS
+
+#endif /* __POPPLER_DATE_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.cc
new file mode 100644
index 00000000000..fad45c84911
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.cc
@@ -0,0 +1,1960 @@
+/* poppler-document.cc: glib wrapper for poppler
+ * Copyright (C) 2005, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <string.h>
+
+#include <goo/GooList.h>
+#include <splash/SplashBitmap.h>
+#include <GlobalParams.h>
+#include <PDFDoc.h>
+#include <Outline.h>
+#include <ErrorCodes.h>
+#include <UnicodeMap.h>
+#include <GfxState.h>
+#include <SplashOutputDev.h>
+#include <Stream.h>
+#include <FontInfo.h>
+#include <PDFDocEncoding.h>
+#include <OptionalContent.h>
+
+#include "poppler.h"
+#include "poppler-private.h"
+#include "poppler-enums.h"
+
+enum {
+ PROP_0,
+ PROP_TITLE,
+ PROP_FORMAT,
+ PROP_FORMAT_MAJOR,
+ PROP_FORMAT_MINOR,
+ PROP_AUTHOR,
+ PROP_SUBJECT,
+ PROP_KEYWORDS,
+ PROP_CREATOR,
+ PROP_PRODUCER,
+ PROP_CREATION_DATE,
+ PROP_MOD_DATE,
+ PROP_LINEARIZED,
+ PROP_PAGE_LAYOUT,
+ PROP_PAGE_MODE,
+ PROP_VIEWER_PREFERENCES,
+ PROP_PERMISSIONS,
+ PROP_METADATA
+};
+
+static void poppler_document_layers_free (PopplerDocument *document);
+
+typedef struct _PopplerDocumentClass PopplerDocumentClass;
+struct _PopplerDocumentClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerDocument, poppler_document, G_TYPE_OBJECT)
+
+static PopplerDocument *
+_poppler_document_new_from_pdfdoc (PDFDoc *newDoc,
+ GError **error)
+{
+ PopplerDocument *document;
+
+ document = (PopplerDocument *) g_object_new (POPPLER_TYPE_DOCUMENT, NULL, NULL);
+
+ if (!newDoc->isOk()) {
+ int fopen_errno;
+ switch (newDoc->getErrorCode())
+ {
+ case errOpenFile:
+ // If there was an error opening the file, count it as a G_FILE_ERROR
+ // and set the GError parameters accordingly. (this assumes that the
+ // only way to get an errOpenFile error is if newDoc was created using
+ // a filename and thus fopen was called, which right now is true.
+ fopen_errno = newDoc->getFopenErrno();
+ g_set_error (error, G_FILE_ERROR,
+ g_file_error_from_errno (fopen_errno),
+ "%s", g_strerror (fopen_errno));
+ break;
+ case errBadCatalog:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_BAD_CATALOG,
+ "Failed to read the document catalog");
+ break;
+ case errDamaged:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_DAMAGED,
+ "PDF document is damaged");
+ break;
+ case errEncrypted:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_ENCRYPTED,
+ "Document is encrypted");
+ break;
+ default:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_INVALID,
+ "Failed to load document");
+ }
+
+ delete newDoc;
+ return NULL;
+ }
+
+ document->doc = newDoc;
+
+#if defined (HAVE_CAIRO)
+ document->output_dev = new CairoOutputDev ();
+ document->output_dev->startDoc(document->doc->getXRef (), document->doc->getCatalog ());
+#elif defined (HAVE_SPLASH)
+ SplashColor white;
+ white[0] = 255;
+ white[1] = 255;
+ white[2] = 255;
+ document->output_dev = new SplashOutputDev(splashModeRGB8, 4, gFalse, white);
+ document->output_dev->startDoc(document->doc->getXRef ());
+#endif
+
+ return document;
+}
+
+/**
+ * poppler_document_new_from_file:
+ * @uri: uri of the file to load
+ * @password: password to unlock the file with, or %NULL
+ * @error: Return location for an error, or %NULL
+ *
+ * Creates a new #PopplerDocument. If %NULL is returned, then @error will be
+ * set. Possible errors include those in the #POPPLER_ERROR and #G_FILE_ERROR
+ * domains.
+ *
+ * Return value: A newly created #PopplerDocument, or %NULL
+ **/
+PopplerDocument *
+poppler_document_new_from_file (const char *uri,
+ const char *password,
+ GError **error)
+{
+ PDFDoc *newDoc;
+ GooString *filename_g;
+ GooString *password_g;
+ char *filename;
+
+ if (!globalParams) {
+ globalParams = new GlobalParams();
+ }
+
+ filename = g_filename_from_uri (uri, NULL, error);
+ if (!filename)
+ return NULL;
+
+ password_g = NULL;
+ if (password != NULL) {
+ if (g_utf8_validate (password, -1, NULL)) {
+ gchar *password_latin;
+
+ password_latin = g_convert (password, -1,
+ "ISO-8859-1",
+ "UTF-8",
+ NULL, NULL, NULL);
+ password_g = new GooString (password_latin);
+ g_free (password_latin);
+ } else {
+ password_g = new GooString (password);
+ }
+ }
+
+#ifdef G_OS_WIN32
+ wchar_t *filenameW;
+ int length;
+
+ length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
+
+ filenameW = new WCHAR[length];
+ if (!filenameW)
+ return NULL;
+
+ length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, length);
+
+ newDoc = new PDFDoc(filenameW, length, password_g, password_g);
+ delete filenameW;
+#else
+ filename_g = new GooString (filename);
+ newDoc = new PDFDoc(filename_g, password_g, password_g);
+#endif
+ g_free (filename);
+
+ delete password_g;
+
+ return _poppler_document_new_from_pdfdoc (newDoc, error);
+}
+
+/**
+ * poppler_document_new_from_data:
+ * @data: the pdf data contained in a char array
+ * @length: the length of #data
+ * @password: password to unlock the file with, or %NULL
+ * @error: Return location for an error, or %NULL
+ *
+ * Creates a new #PopplerDocument. If %NULL is returned, then @error will be
+ * set. Possible errors include those in the #POPPLER_ERROR and #G_FILE_ERROR
+ * domains.
+ *
+ * Return value: A newly created #PopplerDocument, or %NULL
+ **/
+PopplerDocument *
+poppler_document_new_from_data (char *data,
+ int length,
+ const char *password,
+ GError **error)
+{
+ Object obj;
+ PDFDoc *newDoc;
+ MemStream *str;
+ GooString *password_g;
+
+ if (!globalParams) {
+ globalParams = new GlobalParams();
+ }
+
+ // create stream
+ obj.initNull();
+ str = new MemStream(data, 0, length, &obj);
+
+ password_g = NULL;
+ if (password != NULL)
+ password_g = new GooString (password);
+
+ newDoc = new PDFDoc(str, password_g, password_g);
+ delete password_g;
+
+ return _poppler_document_new_from_pdfdoc (newDoc, error);
+}
+
+static gboolean
+handle_save_error (int err_code,
+ GError **error)
+{
+ switch (err_code)
+ {
+ case errNone:
+ break;
+ case errOpenFile:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_OPEN_FILE,
+ "Failed to open file for writing");
+ break;
+ case errEncrypted:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_ENCRYPTED,
+ "Document is encrypted");
+ break;
+ default:
+ g_set_error (error, POPPLER_ERROR,
+ POPPLER_ERROR_INVALID,
+ "Failed to save document");
+ }
+
+ return err_code == errNone;
+}
+
+/**
+ * poppler_document_save:
+ * @document: a #PopplerDocument
+ * @uri: uri of file to save
+ * @error: return location for an error, or %NULL
+ *
+ * Saves @document. Any change made in the document such as
+ * form fields filled by the user will be saved.
+ * If @error is set, %FALSE will be returned. Possible errors
+ * include those in the #G_FILE_ERROR domain.
+ *
+ * Return value: %TRUE, if the document was successfully saved
+ **/
+gboolean
+poppler_document_save (PopplerDocument *document,
+ const char *uri,
+ GError **error)
+{
+ char *filename;
+ gboolean retval = FALSE;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
+
+ filename = g_filename_from_uri (uri, NULL, error);
+ if (filename != NULL) {
+ GooString *fname = new GooString (filename);
+ int err_code;
+ g_free (filename);
+
+ err_code = document->doc->saveAs (fname);
+ retval = handle_save_error (err_code, error);
+ delete fname;
+ }
+
+ return retval;
+}
+
+/**
+ * poppler_document_save_a_copy:
+ * @document: a #PopplerDocument
+ * @uri: uri of file to save
+ * @error: return location for an error, or %NULL
+ *
+ * Saves a copy of the original @document.
+ * Any change made in the document such as
+ * form fields filled by the user will not be saved.
+ * If @error is set, %FALSE will be returned. Possible errors
+ * include those in the #G_FILE_ERROR domain.
+ *
+ * Return value: %TRUE, if the document was successfully saved
+ **/
+gboolean
+poppler_document_save_a_copy (PopplerDocument *document,
+ const char *uri,
+ GError **error)
+{
+ char *filename;
+ gboolean retval = FALSE;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
+
+ filename = g_filename_from_uri (uri, NULL, error);
+ if (filename != NULL) {
+ GooString *fname = new GooString (filename);
+ int err_code;
+ g_free (filename);
+
+ err_code = document->doc->saveWithoutChangesAs (fname);
+ retval = handle_save_error (err_code, error);
+ delete fname;
+ }
+
+ return retval;
+}
+
+static void
+poppler_document_finalize (GObject *object)
+{
+ PopplerDocument *document = POPPLER_DOCUMENT (object);
+
+ poppler_document_layers_free (document);
+ delete document->output_dev;
+ delete document->doc;
+}
+
+/**
+ * poppler_document_get_n_pages:
+ * @document: A #PopplerDocument
+ *
+ * Returns the number of pages in a loaded document.
+ *
+ * Return value: Number of pages
+ **/
+int
+poppler_document_get_n_pages (PopplerDocument *document)
+{
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), 0);
+
+ return document->doc->getNumPages();
+}
+
+/**
+ * poppler_document_get_page:
+ * @document: A #PopplerDocument
+ * @index: a page index
+ *
+ * Returns the #PopplerPage indexed at @index. This object is owned by the
+ * caller.
+ *
+ * #PopplerPage<!-- -->s are indexed starting at 0.
+ *
+ * Return value: The #PopplerPage at @index
+ **/
+PopplerPage *
+poppler_document_get_page (PopplerDocument *document,
+ int index)
+{
+ Catalog *catalog;
+ Page *page;
+
+ g_return_val_if_fail (0 <= index &&
+ index < poppler_document_get_n_pages (document),
+ NULL);
+
+ catalog = document->doc->getCatalog();
+ page = catalog->getPage (index + 1);
+
+ return _poppler_page_new (document, page, index);
+}
+
+/**
+ * poppler_document_get_page_by_label:
+ * @document: A #PopplerDocument
+ * @label: a page label
+ *
+ * Returns the #PopplerPage reference by @label. This object is owned by the
+ * caller. @label is a human-readable string representation of the page number,
+ * and can be document specific. Typically, it is a value such as "iii" or "3".
+ *
+ * By default, "1" refers to the first page.
+ *
+ * Return value: The #PopplerPage referenced by @label
+ **/
+PopplerPage *
+poppler_document_get_page_by_label (PopplerDocument *document,
+ const char *label)
+{
+ Catalog *catalog;
+ GooString label_g(label);
+ int index;
+
+ catalog = document->doc->getCatalog();
+ if (!catalog->labelToIndex (&label_g, &index))
+ return NULL;
+
+ return poppler_document_get_page (document, index);
+}
+
+/**
+ * poppler_document_has_attachments:
+ * @document: A #PopplerDocument
+ *
+ * Returns %TRUE of @document has any attachments.
+ *
+ * Return value: %TRUE, if @document has attachments.
+ **/
+gboolean
+poppler_document_has_attachments (PopplerDocument *document)
+{
+ Catalog *catalog;
+ int n_files = 0;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
+
+ catalog = document->doc->getCatalog ();
+ if (catalog && catalog->isOk ())
+ {
+ n_files = catalog->numEmbeddedFiles ();
+ }
+
+ return (n_files != 0);
+}
+
+/**
+ * poppler_document_get_attachments:
+ * @document: A #PopplerDocument
+ *
+ * Returns a #GList containing #PopplerAttachment<!-- -->s. These attachments
+ * are unowned, and must be unreffed, and the list must be freed with
+ * g_list_free().
+ *
+ * Return value: a list of available attachments.
+ **/
+GList *
+poppler_document_get_attachments (PopplerDocument *document)
+{
+ Catalog *catalog;
+ int n_files, i;
+ GList *retval = NULL;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+
+ catalog = document->doc->getCatalog ();
+ if (catalog == NULL || ! catalog->isOk ())
+ return NULL;
+
+ n_files = catalog->numEmbeddedFiles ();
+ for (i = 0; i < n_files; i++)
+ {
+ PopplerAttachment *attachment;
+ EmbFile *emb_file;
+
+ emb_file = catalog->embeddedFile (i);
+ if (!emb_file->isOk ()) {
+ delete emb_file;
+ continue;
+ }
+ attachment = _poppler_attachment_new (document, emb_file);
+ delete emb_file;
+
+ retval = g_list_prepend (retval, attachment);
+ }
+ return g_list_reverse (retval);
+}
+
+/**
+ * poppler_document_find_dest:
+ * @document: A #PopplerDocument
+ * @link_name: a named destination
+ *
+ * Finds named destination @link_name in @document
+ *
+ * Return value: The #PopplerDest destination or %NULL if
+ * @link_name is not a destination. Returned value must
+ * be freed with #poppler_dest_free
+ **/
+PopplerDest *
+poppler_document_find_dest (PopplerDocument *document,
+ const gchar *link_name)
+{
+ PopplerDest *dest = NULL;
+ LinkDest *link_dest = NULL;
+ GooString *g_link_name;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (link_name != NULL, NULL);
+
+ g_link_name = new GooString (link_name);
+
+ if (g_link_name) {
+ link_dest = document->doc->findDest (g_link_name);
+ delete g_link_name;
+ }
+
+ if (link_dest) {
+ dest = _poppler_dest_new_goto (document, link_dest);
+ delete link_dest;
+ }
+
+ return dest;
+}
+
+char *_poppler_goo_string_to_utf8(GooString *s)
+{
+ char *result;
+
+ if (s->hasUnicodeMarker()) {
+ result = g_convert (s->getCString () + 2,
+ s->getLength () - 2,
+ "UTF-8", "UTF-16BE", NULL, NULL, NULL);
+ } else {
+ int len;
+ gunichar *ucs4_temp;
+ int i;
+
+ len = s->getLength ();
+ ucs4_temp = g_new (gunichar, len + 1);
+ for (i = 0; i < len; ++i) {
+ ucs4_temp[i] = pdfDocEncoding[(unsigned char)s->getChar(i)];
+ }
+ ucs4_temp[i] = 0;
+
+ result = g_ucs4_to_utf8 (ucs4_temp, -1, NULL, NULL, NULL);
+
+ g_free (ucs4_temp);
+ }
+
+ return result;
+}
+
+static void
+info_dict_get_string (Dict *info_dict, const gchar *key, GValue *value)
+{
+ Object obj;
+ GooString *goo_value;
+ gchar *result;
+
+ if (!info_dict->lookup ((gchar *)key, &obj)->isString ()) {
+ obj.free ();
+ return;
+ }
+
+ goo_value = obj.getString ();
+
+ result = _poppler_goo_string_to_utf8(goo_value);
+
+ obj.free ();
+
+ g_value_set_string (value, result);
+
+ g_free (result);
+}
+
+static void
+info_dict_get_date (Dict *info_dict, const gchar *key, GValue *value)
+{
+ Object obj;
+ time_t result;
+
+ if (!info_dict->lookup ((gchar *)key, &obj)->isString ()) {
+ obj.free ();
+ return;
+ }
+
+ if (_poppler_convert_pdf_date_to_gtime (obj.getString (), &result))
+ g_value_set_int (value, result);
+
+ obj.free ();
+}
+
+static PopplerPageLayout
+convert_page_layout (Catalog::PageLayout pageLayout)
+{
+ switch (pageLayout)
+ {
+ case Catalog::pageLayoutSinglePage:
+ return POPPLER_PAGE_LAYOUT_SINGLE_PAGE;
+ case Catalog::pageLayoutOneColumn:
+ return POPPLER_PAGE_LAYOUT_ONE_COLUMN;
+ case Catalog::pageLayoutTwoColumnLeft:
+ return POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT;
+ case Catalog::pageLayoutTwoColumnRight:
+ return POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT;
+ case Catalog::pageLayoutTwoPageLeft:
+ return POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT;
+ case Catalog::pageLayoutTwoPageRight:
+ return POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT;
+ case Catalog::pageLayoutNone:
+ default:
+ return POPPLER_PAGE_LAYOUT_UNSET;
+ }
+}
+
+static PopplerPageMode
+convert_page_mode (Catalog::PageMode pageMode)
+{
+ switch (pageMode)
+ {
+ case Catalog::pageModeOutlines:
+ return POPPLER_PAGE_MODE_USE_OUTLINES;
+ case Catalog::pageModeThumbs:
+ return POPPLER_PAGE_MODE_USE_THUMBS;
+ case Catalog::pageModeFullScreen:
+ return POPPLER_PAGE_MODE_FULL_SCREEN;
+ case Catalog::pageModeOC:
+ return POPPLER_PAGE_MODE_USE_OC;
+ case Catalog::pageModeAttach:
+ return POPPLER_PAGE_MODE_USE_ATTACHMENTS;
+ case Catalog::pageModeNone:
+ default:
+ return POPPLER_PAGE_MODE_UNSET;
+ }
+}
+
+static void
+poppler_document_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ PopplerDocument *document = POPPLER_DOCUMENT (object);
+ Object obj;
+ Catalog *catalog;
+ gchar *str;
+ guint flag;
+
+ switch (prop_id)
+ {
+ case PROP_TITLE:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Title", value);
+ obj.free ();
+ break;
+ case PROP_FORMAT:
+ str = g_strndup("PDF-", 15); /* allocates 16 chars, pads with \0s */
+ g_ascii_formatd (str + 4, 15 + 1 - 4,
+ "%.2g", document->doc->getPDFMajorVersion () + document->doc->getPDFMinorVersion() / 10.0);
+ g_value_take_string (value, str);
+ break;
+ case PROP_FORMAT_MAJOR:
+ g_value_set_uint (value, document->doc->getPDFMajorVersion ());
+ break;
+ case PROP_FORMAT_MINOR:
+ g_value_set_uint (value, document->doc->getPDFMinorVersion());
+ break;
+ case PROP_AUTHOR:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Author", value);
+ obj.free ();
+ break;
+ case PROP_SUBJECT:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Subject", value);
+ obj.free ();
+ break;
+ case PROP_KEYWORDS:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Keywords", value);
+ obj.free ();
+ break;
+ case PROP_CREATOR:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Creator", value);
+ obj.free ();
+ break;
+ case PROP_PRODUCER:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_string (obj.getDict(), "Producer", value);
+ obj.free ();
+ break;
+ case PROP_CREATION_DATE:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_date (obj.getDict(), "CreationDate", value);
+ obj.free ();
+ break;
+ case PROP_MOD_DATE:
+ document->doc->getDocInfo (&obj);
+ if (obj.isDict ())
+ info_dict_get_date (obj.getDict(), "ModDate", value);
+ obj.free ();
+ break;
+ case PROP_LINEARIZED:
+ if (document->doc->isLinearized ()) {
+ g_value_set_string (value, "Yes");
+ } else {
+ g_value_set_string (value, "No");
+ }
+ break;
+ case PROP_PAGE_LAYOUT:
+ catalog = document->doc->getCatalog ();
+ if (catalog && catalog->isOk ())
+ {
+ PopplerPageLayout page_layout = convert_page_layout (catalog->getPageLayout ());
+ g_value_set_enum (value, page_layout);
+ }
+ break;
+ case PROP_PAGE_MODE:
+ catalog = document->doc->getCatalog ();
+ if (catalog && catalog->isOk ())
+ {
+ PopplerPageMode page_mode = convert_page_mode (catalog->getPageMode ());
+ g_value_set_enum (value, page_mode);
+ }
+ break;
+ case PROP_VIEWER_PREFERENCES:
+ /* FIXME: write... */
+ g_value_set_flags (value, POPPLER_VIEWER_PREFERENCES_UNSET);
+ break;
+ case PROP_PERMISSIONS:
+ flag = 0;
+ if (document->doc->okToPrint ())
+ flag |= POPPLER_PERMISSIONS_OK_TO_PRINT;
+ if (document->doc->okToChange ())
+ flag |= POPPLER_PERMISSIONS_OK_TO_MODIFY;
+ if (document->doc->okToCopy ())
+ flag |= POPPLER_PERMISSIONS_OK_TO_COPY;
+ if (document->doc->okToAddNotes ())
+ flag |= POPPLER_PERMISSIONS_OK_TO_ADD_NOTES;
+ if (document->doc->okToFillForm ())
+ flag |= POPPLER_PERMISSIONS_OK_TO_FILL_FORM;
+ g_value_set_flags (value, flag);
+ break;
+ case PROP_METADATA:
+ catalog = document->doc->getCatalog ();
+ if (catalog && catalog->isOk ())
+ {
+ GooString *s = catalog->readMetadata ();
+ if ( s != NULL ) {
+ g_value_set_string (value, s->getCString());
+ delete s;
+ }
+ }
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+poppler_document_class_init (PopplerDocumentClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_document_finalize;
+ gobject_class->get_property = poppler_document_get_property;
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_TITLE,
+ g_param_spec_string ("title",
+ "Document Title",
+ "The title of the document",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_FORMAT,
+ g_param_spec_string ("format",
+ "PDF Format",
+ "The PDF version of the document",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_FORMAT_MAJOR,
+ g_param_spec_uint ("format-major",
+ "PDF Format Major",
+ "The PDF major version number of the document",
+ 0, G_MAXUINT, 1,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_FORMAT_MINOR,
+ g_param_spec_uint ("format-minor",
+ "PDF Format Minor",
+ "The PDF minor version number of the document",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_AUTHOR,
+ g_param_spec_string ("author",
+ "Author",
+ "The author of the document",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_SUBJECT,
+ g_param_spec_string ("subject",
+ "Subject",
+ "Subjects the document touches",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_KEYWORDS,
+ g_param_spec_string ("keywords",
+ "Keywords",
+ "Keywords",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_CREATOR,
+ g_param_spec_string ("creator",
+ "Creator",
+ "The software that created the document",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_PRODUCER,
+ g_param_spec_string ("producer",
+ "Producer",
+ "The software that converted the document",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_CREATION_DATE,
+ g_param_spec_int ("creation-date",
+ "Creation Date",
+ "The date and time the document was created",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_MOD_DATE,
+ g_param_spec_int ("mod-date",
+ "Modification Date",
+ "The date and time the document was modified",
+ 0, G_MAXINT, 0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_LINEARIZED,
+ g_param_spec_string ("linearized",
+ "Fast Web View Enabled",
+ "Is the document optimized for web viewing?",
+ NULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_PAGE_LAYOUT,
+ g_param_spec_enum ("page-layout",
+ "Page Layout",
+ "Initial Page Layout",
+ POPPLER_TYPE_PAGE_LAYOUT,
+ POPPLER_PAGE_LAYOUT_UNSET,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_PAGE_MODE,
+ g_param_spec_enum ("page-mode",
+ "Page Mode",
+ "Page Mode",
+ POPPLER_TYPE_PAGE_MODE,
+ POPPLER_PAGE_MODE_UNSET,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_VIEWER_PREFERENCES,
+ g_param_spec_flags ("viewer-preferences",
+ "Viewer Preferences",
+ "Viewer Preferences",
+ POPPLER_TYPE_VIEWER_PREFERENCES,
+ POPPLER_VIEWER_PREFERENCES_UNSET,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_PERMISSIONS,
+ g_param_spec_flags ("permissions",
+ "Permissions",
+ "Permissions",
+ POPPLER_TYPE_PERMISSIONS,
+ POPPLER_PERMISSIONS_FULL,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property
+ (G_OBJECT_CLASS (klass),
+ PROP_METADATA,
+ g_param_spec_string ("metadata",
+ "XML Metadata",
+ "Embedded XML metadata",
+ NULL,
+ G_PARAM_READABLE));
+}
+
+static void
+poppler_document_init (PopplerDocument *document)
+{
+}
+
+/* PopplerIndexIter: For determining the index of a tree */
+struct _PopplerIndexIter
+{
+ PopplerDocument *document;
+ GooList *items;
+ int index;
+};
+
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerIndexIter, poppler_index_iter,
+ poppler_index_iter_copy,
+ poppler_index_iter_free)
+
+/**
+ * poppler_index_iter_copy:
+ * @iter: a #PopplerIndexIter
+ *
+ * Creates a new #PopplerIndexIter as a copy of @iter. This must be freed with
+ * poppler_index_iter_free().
+ *
+ * Return value: a new #PopplerIndexIter
+ **/
+PopplerIndexIter *
+poppler_index_iter_copy (PopplerIndexIter *iter)
+{
+ PopplerIndexIter *new_iter;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ new_iter = g_new0 (PopplerIndexIter, 1);
+ *new_iter = *iter;
+ new_iter->document = (PopplerDocument *) g_object_ref (new_iter->document);
+
+ return new_iter;
+}
+
+/**
+ * poppler_index_iter_new:
+ * @document: a #PopplerDocument
+ *
+ * Returns the root #PopplerIndexIter for @document, or %NULL. This must be
+ * freed with poppler_index_iter_free().
+ *
+ * Certain documents have an index associated with them. This index can be used
+ * to help the user navigate the document, and is similar to a table of
+ * contents. Each node in the index will contain a #PopplerAction that can be
+ * displayed to the user &mdash; typically a #POPPLER_ACTION_GOTO_DEST or a
+ * #POPPLER_ACTION_URI<!-- -->.
+ *
+ * Here is a simple example of some code that walks the full index:
+ *
+ * <informalexample><programlisting>
+ * static void
+ * walk_index (PopplerIndexIter *iter)
+ * {
+ * do
+ * {
+ * /<!-- -->* Get the the action and do something with it *<!-- -->/
+ * PopplerIndexIter *child = poppler_index_iter_get_child (iter);
+ * if (child)
+ * walk_index (child);
+ * poppler_index_iter_free (child);
+ * }
+ * while (poppler_index_iter_next (iter));
+ * }
+ * ...
+ * {
+ * iter = poppler_index_iter_new (document);
+ * walk_index (iter);
+ * poppler_index_iter_free (iter);
+ * }
+ *</programlisting></informalexample>
+ *
+ * Return value: a new #PopplerIndexIter
+ **/
+PopplerIndexIter *
+poppler_index_iter_new (PopplerDocument *document)
+{
+ PopplerIndexIter *iter;
+ Outline *outline;
+ GooList *items;
+
+ outline = document->doc->getOutline();
+ if (outline == NULL)
+ return NULL;
+
+ items = outline->getItems();
+ if (items == NULL)
+ return NULL;
+
+ iter = g_new0 (PopplerIndexIter, 1);
+ iter->document = (PopplerDocument *) g_object_ref (document);
+ iter->items = items;
+ iter->index = 0;
+
+ return iter;
+}
+
+/**
+ * poppler_index_iter_get_child:
+ * @parent: a #PopplerIndexIter
+ *
+ * Returns a newly created child of @parent, or %NULL if the iter has no child.
+ * See poppler_index_iter_new() for more information on this function.
+ *
+ * Return value: a new #PopplerIndexIter
+ **/
+PopplerIndexIter *
+poppler_index_iter_get_child (PopplerIndexIter *parent)
+{
+ PopplerIndexIter *child;
+ OutlineItem *item;
+
+ g_return_val_if_fail (parent != NULL, NULL);
+
+ item = (OutlineItem *)parent->items->get (parent->index);
+ item->open ();
+ if (! (item->hasKids() && item->getKids()) )
+ return NULL;
+
+ child = g_new0 (PopplerIndexIter, 1);
+ child->document = (PopplerDocument *)g_object_ref (parent->document);
+ child->items = item->getKids ();
+
+ g_assert (child->items);
+
+ return child;
+}
+
+static gchar *
+unicode_to_char (Unicode *unicode,
+ int len)
+{
+ static UnicodeMap *uMap = NULL;
+ if (uMap == NULL) {
+ GooString *enc = new GooString("UTF-8");
+ uMap = globalParams->getUnicodeMap(enc);
+ uMap->incRefCnt ();
+ delete enc;
+ }
+
+ GooString gstr;
+ gchar buf[8]; /* 8 is enough for mapping an unicode char to a string */
+ int i, n;
+
+ for (i = 0; i < len; ++i) {
+ n = uMap->mapUnicode(unicode[i], buf, sizeof(buf));
+ gstr.append(buf, n);
+ }
+
+ return g_strdup (gstr.getCString ());
+}
+
+/**
+ * poppler_index_iter_is_open:
+ * @iter: a #PopplerIndexIter
+ *
+ * Returns whether this node should be expanded by default to the user. The
+ * document can provide a hint as to how the document's index should be expanded
+ * initially.
+ *
+ * Return value: %TRUE, if the document wants @iter to be expanded
+ **/
+gboolean
+poppler_index_iter_is_open (PopplerIndexIter *iter)
+{
+ OutlineItem *item;
+
+ item = (OutlineItem *)iter->items->get (iter->index);
+
+ return item->isOpen();
+}
+
+/**
+ * poppler_index_iter_get_action:
+ * @iter: a #PopplerIndexIter
+ *
+ * Returns the #PopplerAction associated with @iter. It must be freed with
+ * poppler_action_free().
+ *
+ * Return value: a new #PopplerAction
+ **/
+PopplerAction *
+poppler_index_iter_get_action (PopplerIndexIter *iter)
+{
+ OutlineItem *item;
+ LinkAction *link_action;
+ PopplerAction *action;
+ gchar *title;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ item = (OutlineItem *)iter->items->get (iter->index);
+ link_action = item->getAction ();
+
+ title = unicode_to_char (item->getTitle(),
+ item->getTitleLength ());
+
+ action = _poppler_action_new (iter->document, link_action, title);
+ g_free (title);
+
+ return action;
+}
+
+/**
+ * poppler_index_iter_next:
+ * @iter: a #PopplerIndexIter
+ *
+ * Sets @iter to point to the next action at the current level, if valid. See
+ * poppler_index_iter_new() for more information.
+ *
+ * Return value: %TRUE, if @iter was set to the next action
+ **/
+gboolean
+poppler_index_iter_next (PopplerIndexIter *iter)
+{
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+ iter->index++;
+ if (iter->index >= iter->items->getLength())
+ return FALSE;
+
+ return TRUE;
+}
+
+/**
+ * poppler_index_iter_free:
+ * @iter: a #PopplerIndexIter
+ *
+ * Frees @iter.
+ **/
+void
+poppler_index_iter_free (PopplerIndexIter *iter)
+{
+ if (iter == NULL)
+ return;
+
+ g_object_unref (iter->document);
+ g_free (iter);
+
+}
+
+struct _PopplerFontsIter
+{
+ GooList *items;
+ int index;
+};
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerFontsIter, poppler_fonts_iter,
+ poppler_fonts_iter_copy,
+ poppler_fonts_iter_free)
+
+const char *
+poppler_fonts_iter_get_full_name (PopplerFontsIter *iter)
+{
+ GooString *name;
+ FontInfo *info;
+
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ name = info->getName();
+ if (name != NULL) {
+ return info->getName()->getCString();
+ } else {
+ return NULL;
+ }
+}
+
+const char *
+poppler_fonts_iter_get_name (PopplerFontsIter *iter)
+{
+ FontInfo *info;
+ const char *name;
+
+ name = poppler_fonts_iter_get_full_name (iter);
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ if (info->getSubset() && name) {
+ while (*name && *name != '+')
+ name++;
+
+ if (*name)
+ name++;
+ }
+
+ return name;
+}
+
+const char *
+poppler_fonts_iter_get_file_name (PopplerFontsIter *iter)
+{
+ GooString *file;
+ FontInfo *info;
+
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ file = info->getFile();
+ if (file != NULL) {
+ return file->getCString();
+ } else {
+ return NULL;
+ }
+}
+
+PopplerFontType
+poppler_fonts_iter_get_font_type (PopplerFontsIter *iter)
+{
+ FontInfo *info;
+
+ g_return_val_if_fail (iter != NULL, POPPLER_FONT_TYPE_UNKNOWN);
+
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ return (PopplerFontType)info->getType ();
+}
+
+gboolean
+poppler_fonts_iter_is_embedded (PopplerFontsIter *iter)
+{
+ FontInfo *info;
+
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ return info->getEmbedded();
+}
+
+gboolean
+poppler_fonts_iter_is_subset (PopplerFontsIter *iter)
+{
+ FontInfo *info;
+
+ info = (FontInfo *)iter->items->get (iter->index);
+
+ return info->getSubset();
+}
+
+gboolean
+poppler_fonts_iter_next (PopplerFontsIter *iter)
+{
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+ iter->index++;
+ if (iter->index >= iter->items->getLength())
+ return FALSE;
+
+ return TRUE;
+}
+
+PopplerFontsIter *
+poppler_fonts_iter_copy (PopplerFontsIter *iter)
+{
+ PopplerFontsIter *new_iter;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ new_iter = g_new0 (PopplerFontsIter, 1);
+ *new_iter = *iter;
+
+ new_iter->items = new GooList ();
+ for (int i = 0; i < iter->items->getLength(); i++) {
+ FontInfo *info = (FontInfo *)iter->items->get(i);
+ new_iter->items->append (new FontInfo (*info));
+ }
+
+ return new_iter;
+}
+
+void
+poppler_fonts_iter_free (PopplerFontsIter *iter)
+{
+ if (iter == NULL)
+ return;
+
+ deleteGooList (iter->items, FontInfo);
+
+ g_free (iter);
+}
+
+static PopplerFontsIter *
+poppler_fonts_iter_new (GooList *items)
+{
+ PopplerFontsIter *iter;
+
+ iter = g_new0 (PopplerFontsIter, 1);
+ iter->items = items;
+ iter->index = 0;
+
+ return iter;
+}
+
+
+typedef struct _PopplerFontInfoClass PopplerFontInfoClass;
+struct _PopplerFontInfoClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerFontInfo, poppler_font_info, G_TYPE_OBJECT)
+
+static void poppler_font_info_finalize (GObject *object);
+
+
+static void
+poppler_font_info_class_init (PopplerFontInfoClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_font_info_finalize;
+}
+
+static void
+poppler_font_info_init (PopplerFontInfo *font_info)
+{
+ font_info->document = NULL;
+ font_info->scanner = NULL;
+}
+
+static void
+poppler_font_info_finalize (GObject *object)
+{
+ PopplerFontInfo *font_info = POPPLER_FONT_INFO (object);
+
+ delete font_info->scanner;
+ g_object_unref (font_info->document);
+}
+
+PopplerFontInfo *
+poppler_font_info_new (PopplerDocument *document)
+{
+ PopplerFontInfo *font_info;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+
+ font_info = (PopplerFontInfo *) g_object_new (POPPLER_TYPE_FONT_INFO,
+ NULL);
+ font_info->document = (PopplerDocument *) g_object_ref (document);
+ font_info->scanner = new FontInfoScanner(document->doc);
+
+ return font_info;
+}
+
+gboolean
+poppler_font_info_scan (PopplerFontInfo *font_info,
+ int n_pages,
+ PopplerFontsIter **iter)
+{
+ GooList *items;
+
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+ items = font_info->scanner->scan(n_pages);
+
+ if (items == NULL) {
+ *iter = NULL;
+ } else if (items->getLength() == 0) {
+ *iter = NULL;
+ delete items;
+ } else {
+ *iter = poppler_fonts_iter_new(items);
+ }
+
+ return (items != NULL);
+}
+
+/* For backward compatibility */
+void
+poppler_font_info_free (PopplerFontInfo *font_info)
+{
+ g_return_if_fail (font_info != NULL);
+
+ g_object_unref (font_info);
+}
+
+
+/* Optional content (layers) */
+static Layer *
+layer_new (OptionalContentGroup *oc)
+{
+ Layer *layer;
+
+ layer = g_new0 (Layer, 1);
+ layer->oc = oc;
+
+ return layer;
+}
+
+static void
+layer_free (Layer *layer)
+{
+ if (!layer)
+ return;
+
+ if (layer->kids) {
+ g_list_foreach (layer->kids, (GFunc)layer_free, NULL);
+ g_list_free (layer->kids);
+ }
+
+ if (layer->label) {
+ g_free (layer->label);
+ }
+
+ g_free (layer);
+}
+
+static GList *
+get_optional_content_rbgroups (OCGs *ocg)
+{
+ Array *rb;
+ GList *groups = NULL;
+
+ rb = ocg->getRBGroupsArray ();
+
+ if (rb) {
+ int i, j;
+
+ for (i = 0; i < rb->getLength (); ++i) {
+ Object obj;
+ Array *rb_array;
+ GList *group = NULL;
+
+ rb->get (i, &obj);
+ if (!obj.isArray ()) {
+ obj.free ();
+ continue;
+ }
+
+ rb_array = obj.getArray ();
+ for (j = 0; j < rb_array->getLength (); ++j) {
+ Object ref;
+ OptionalContentGroup *oc;
+
+ rb_array->getNF (j, &ref);
+ if (!ref.isRef ()) {
+ ref.free ();
+ continue;
+ }
+
+ oc = ocg->findOcgByRef (ref.getRef ());
+ group = g_list_prepend (group, oc);
+ ref.free ();
+ }
+ obj.free ();
+
+ groups = g_list_prepend (groups, group);
+ }
+ }
+
+ return groups;
+}
+
+static GList *
+poppler_document_get_layer_rbgroup (PopplerDocument *document,
+ Layer *layer)
+{
+ GList *l;
+
+ for (l = document->layers_rbgroups; l && l->data; l = g_list_next (l)) {
+ GList *group = (GList *)l->data;
+
+ if (g_list_find (group, layer->oc))
+ return group;
+ }
+
+ return NULL;
+}
+
+static GList *
+get_optional_content_items_sorted (OCGs *ocg, Layer *parent, Array *order)
+{
+ GList *items = NULL;
+ Layer *last_item = parent;
+ int i;
+
+ for (i = 0; i < order->getLength (); ++i) {
+ Object orderItem;
+
+ order->get (i, &orderItem);
+
+ if (orderItem.isDict ()) {
+ Object ref;
+
+ order->getNF (i, &ref);
+ if (ref.isRef ()) {
+ OptionalContentGroup *oc = ocg->findOcgByRef (ref.getRef ());
+ Layer *layer = layer_new (oc);
+
+ items = g_list_prepend (items, layer);
+ last_item = layer;
+ }
+ ref.free ();
+ } else if (orderItem.isArray () && orderItem.arrayGetLength () > 0) {
+ if (!last_item) {
+ last_item = layer_new (NULL);
+ items = g_list_prepend (items, last_item);
+ }
+ last_item->kids = get_optional_content_items_sorted (ocg, last_item, orderItem.getArray ());
+ } else if (orderItem.isString ()) {
+ last_item->label = _poppler_goo_string_to_utf8 (orderItem.getString ());
+ }
+ orderItem.free ();
+ }
+
+ return g_list_reverse (items);
+}
+
+static GList *
+get_optional_content_items (OCGs *ocg)
+{
+ Array *order;
+ GList *items = NULL;
+
+ order = ocg->getOrderArray ();
+
+ if (order) {
+ items = get_optional_content_items_sorted (ocg, NULL, order);
+ } else {
+ GooList *ocgs;
+ int i;
+
+ ocgs = ocg->getOCGs ();
+
+ for (i = 0; i < ocgs->getLength (); ++i) {
+ OptionalContentGroup *oc = (OptionalContentGroup *) ocgs->get (i);
+ Layer *layer = layer_new (oc);
+
+ items = g_list_prepend (items, layer);
+ }
+
+ items = g_list_reverse (items);
+ }
+
+ return items;
+}
+
+static GList *
+poppler_document_get_layers (PopplerDocument *document)
+{
+ if (!document->layers) {
+ Catalog *catalog = document->doc->getCatalog ();
+ OCGs *ocg = catalog->getOptContentConfig ();
+
+ if (!ocg)
+ return NULL;
+
+ document->layers = get_optional_content_items (ocg);
+ document->layers_rbgroups = get_optional_content_rbgroups (ocg);
+ }
+
+ return document->layers;
+}
+
+static void
+poppler_document_layers_free (PopplerDocument *document)
+{
+ if (!document->layers)
+ return;
+
+ g_list_foreach (document->layers, (GFunc)layer_free, NULL);
+ g_list_free (document->layers);
+
+ g_list_foreach (document->layers_rbgroups, (GFunc)g_list_free, NULL);
+ g_list_free (document->layers_rbgroups);
+
+ document->layers = NULL;
+ document->layers_rbgroups = NULL;
+}
+
+/* PopplerLayersIter */
+struct _PopplerLayersIter {
+ PopplerDocument *document;
+ GList *items;
+ int index;
+};
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerLayersIter, poppler_layers_iter,
+ poppler_layers_iter_copy,
+ poppler_layers_iter_free)
+
+/**
+ * poppler_layers_iter_copy:
+ * @iter: a #PopplerLayersIter
+ *
+ * Creates a new #PopplerLayersIter as a copy of @iter. This must be freed with
+ * poppler_layers_iter_free().
+ *
+ * Return value: a new #PopplerLayersIter
+ **/
+PopplerLayersIter *
+poppler_layers_iter_copy (PopplerLayersIter *iter)
+{
+ PopplerLayersIter *new_iter;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ new_iter = g_new0 (PopplerLayersIter, 1);
+ *new_iter = *iter;
+ new_iter->document = (PopplerDocument *) g_object_ref (new_iter->document);
+
+ return new_iter;
+}
+
+/**
+ * poppler_layers_iter_free:
+ * @iter: a #PopplerLayersIter
+ *
+ * Frees @iter.
+ **/
+void
+poppler_layers_iter_free (PopplerLayersIter *iter)
+{
+ if (iter == NULL)
+ return;
+
+ g_object_unref (iter->document);
+ g_free (iter);
+}
+
+/**
+ * poppler_layers_iter_new:
+ **/
+PopplerLayersIter *
+poppler_layers_iter_new (PopplerDocument *document)
+{
+ PopplerLayersIter *iter;
+ GList *items;
+
+ items = poppler_document_get_layers (document);
+
+ if (!items)
+ return NULL;
+
+ iter = g_new0 (PopplerLayersIter, 1);
+ iter->document = (PopplerDocument *)g_object_ref (document);
+ iter->items = items;
+
+ return iter;
+}
+
+/**
+ * poppler_layers_iter_get_child:
+ * @parent: a #PopplerLayersIter
+ *
+ * Returns a newly created child of @parent, or %NULL if the iter has no child.
+ * See poppler_layers_iter_new() for more information on this function.
+ *
+ * Return value: a new #PopplerLayersIter, or %NULL
+ **/
+PopplerLayersIter *
+poppler_layers_iter_get_child (PopplerLayersIter *parent)
+{
+ PopplerLayersIter *child;
+ Layer *layer;
+
+ g_return_val_if_fail (parent != NULL, NULL);
+
+ layer = (Layer *) g_list_nth_data (parent->items, parent->index);
+ if (!layer || !layer->kids)
+ return NULL;
+
+ child = g_new0 (PopplerLayersIter, 1);
+ child->document = (PopplerDocument *)g_object_ref (parent->document);
+ child->items = layer->kids;
+
+ g_assert (child->items);
+
+ return child;
+}
+
+/**
+ * poppler_layers_iter_get_title:
+ * @iter: a #PopplerLayersIter
+ *
+ * Returns the title associated with @iter. It must be freed with
+ * g_free().
+ *
+ * Return value: a new string containing the @iter's title or %NULL if @iter doesn't have a title.
+ * The returned string should be freed with g_free() when no longer needed.
+ **/
+gchar *
+poppler_layers_iter_get_title (PopplerLayersIter *iter)
+{
+ Layer *layer;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ layer = (Layer *)g_list_nth_data (iter->items, iter->index);
+
+ return layer->label ? g_strdup (layer->label) : NULL;
+}
+
+/**
+ * poppler_layers_iter_get_layer:
+ * @iter: a #PopplerLayersIter
+ *
+ * Returns the #PopplerLayer associated with @iter. It must be freed with
+ * poppler_layer_free().
+ *
+ * Return value: a new #PopplerLayer, or %NULL if there isn't any layer associated with @iter
+ **/
+PopplerLayer *
+poppler_layers_iter_get_layer (PopplerLayersIter *iter)
+{
+ Layer *layer;
+ PopplerLayer *poppler_layer = NULL;
+
+ g_return_val_if_fail (iter != NULL, NULL);
+
+ layer = (Layer *)g_list_nth_data (iter->items, iter->index);
+ if (layer->oc) {
+ GList *rb_group = NULL;
+
+ rb_group = poppler_document_get_layer_rbgroup (iter->document, layer);
+ poppler_layer = _poppler_layer_new (iter->document, layer, rb_group);
+ }
+
+ return poppler_layer;
+}
+
+/**
+ * poppler_layers_iter_next:
+ * @iter: a #PopplerLayersIter
+ *
+ * Sets @iter to point to the next action at the current level, if valid. See
+ * poppler_layers_iter_new() for more information.
+ *
+ * Return value: %TRUE, if @iter was set to the next action
+ **/
+gboolean
+poppler_layers_iter_next (PopplerLayersIter *iter)
+{
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+ iter->index++;
+ if (iter->index >= (gint)g_list_length (iter->items))
+ return FALSE;
+
+ return TRUE;
+}
+
+typedef struct _PopplerPSFileClass PopplerPSFileClass;
+struct _PopplerPSFileClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerPSFile, poppler_ps_file, G_TYPE_OBJECT)
+
+static void poppler_ps_file_finalize (GObject *object);
+
+
+static void
+poppler_ps_file_class_init (PopplerPSFileClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_ps_file_finalize;
+}
+
+static void
+poppler_ps_file_init (PopplerPSFile *ps_file)
+{
+ ps_file->out = NULL;
+ ps_file->paper_width = -1;
+ ps_file->paper_height = -1;
+ ps_file->duplex = FALSE;
+}
+
+static void
+poppler_ps_file_finalize (GObject *object)
+{
+ PopplerPSFile *ps_file = POPPLER_PS_FILE (object);
+
+ delete ps_file->out;
+ g_object_unref (ps_file->document);
+ g_free (ps_file->filename);
+}
+
+/**
+ * poppler_ps_file_new:
+ * @document: a #PopplerDocument
+ * @filename: the path of the output filename
+ * @first_page: the first page to print
+ * @n_pages: the number of pages to print
+ *
+ * Create a new postscript file to render to
+ *
+ * Return value: a PopplerPSFile
+ **/
+PopplerPSFile *
+poppler_ps_file_new (PopplerDocument *document, const char *filename,
+ int first_page, int n_pages)
+{
+ PopplerPSFile *ps_file;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (n_pages > 0, NULL);
+
+ ps_file = (PopplerPSFile *) g_object_new (POPPLER_TYPE_PS_FILE, NULL);
+ ps_file->document = (PopplerDocument *) g_object_ref (document);
+ ps_file->filename = g_strdup (filename);
+ ps_file->first_page = first_page + 1;
+ ps_file->last_page = first_page + 1 + n_pages - 1;
+
+ return ps_file;
+}
+
+/**
+ * poppler_ps_file_set_paper_size:
+ * @ps_file: a PopplerPSFile which was not yet printed to.
+ * @width: the paper width in 1/72 inch
+ * @height: the paper height in 1/72 inch
+ *
+ * Set the output paper size. These values will end up in the
+ * DocumentMedia, the BoundingBox DSC comments and other places in the
+ * generated PostScript.
+ *
+ **/
+void
+poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
+ double width, double height)
+{
+ g_return_if_fail (ps_file->out == NULL);
+
+ ps_file->paper_width = width;
+ ps_file->paper_height = height;
+}
+
+/**
+ * poppler_ps_file_set_duplex:
+ * @ps_file: a PopplerPSFile which was not yet printed to
+ * @duplex: whether to force duplex printing (on printers which support this)
+ *
+ * Enable or disable Duplex printing.
+ *
+ **/
+void
+poppler_ps_file_set_duplex (PopplerPSFile *ps_file, gboolean duplex)
+{
+ g_return_if_fail (ps_file->out == NULL);
+
+ ps_file->duplex = duplex;
+}
+
+/**
+ * poppler_ps_file_free:
+ * @ps_file: a PopplerPSFile
+ *
+ * Frees @ps_file
+ *
+ **/
+void
+poppler_ps_file_free (PopplerPSFile *ps_file)
+{
+ g_return_if_fail (ps_file != NULL);
+ g_object_unref (ps_file);
+}
+
+/**
+ * poppler_document_get_form_field:
+ * @document: a #PopplerDocument
+ * @id: an id of a #PopplerFormField
+ *
+ * Returns the #PopplerFormField for the given @id. It must be freed with
+ * g_object_unref()
+ *
+ * Return value: a new #PopplerFormField or NULL if not found
+ **/
+PopplerFormField *
+poppler_document_get_form_field (PopplerDocument *document,
+ gint id)
+{
+ Catalog *catalog = document->doc->getCatalog();
+ unsigned pageNum;
+ unsigned fieldNum;
+ FormPageWidgets *widgets;
+ FormWidget *field;
+
+ FormWidget::decodeID (id, &pageNum, &fieldNum);
+
+ widgets = catalog->getPage (pageNum)->getPageWidgets ();
+ if (!widgets)
+ return NULL;
+
+ field = widgets->getWidget (fieldNum);
+ if (field)
+ return _poppler_form_field_new (document, field);
+
+ return NULL;
+}
+
+gboolean
+_poppler_convert_pdf_date_to_gtime (GooString *date,
+ time_t *gdate)
+{
+ gchar *date_string;
+ gboolean retval;
+
+ if (date->hasUnicodeMarker()) {
+ date_string = g_convert (date->getCString () + 2,
+ date->getLength () - 2,
+ "UTF-8", "UTF-16BE", NULL, NULL, NULL);
+ } else {
+ date_string = g_strndup (date->getCString (), date->getLength ());
+ }
+
+ retval = poppler_date_parse (date_string, gdate);
+ g_free (date_string);
+
+ return retval;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.h
new file mode 100644
index 00000000000..2f4f50acb53
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-document.h
@@ -0,0 +1,192 @@
+/* poppler-document.h: glib interface to poppler
+ * Copyright (C) 2004, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_DOCUMENT_H__
+#define __POPPLER_DOCUMENT_H__
+
+#include <glib-object.h>
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+#define POPPLER_TYPE_DOCUMENT (poppler_document_get_type ())
+#define POPPLER_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_DOCUMENT, PopplerDocument))
+#define POPPLER_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_DOCUMENT))
+
+typedef enum
+{
+ POPPLER_PAGE_LAYOUT_UNSET,
+ POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
+ POPPLER_PAGE_LAYOUT_ONE_COLUMN,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
+} PopplerPageLayout;
+
+typedef enum
+{
+ POPPLER_PAGE_MODE_UNSET,
+ POPPLER_PAGE_MODE_NONE,
+ POPPLER_PAGE_MODE_USE_OUTLINES,
+ POPPLER_PAGE_MODE_USE_THUMBS,
+ POPPLER_PAGE_MODE_FULL_SCREEN,
+ POPPLER_PAGE_MODE_USE_OC,
+ POPPLER_PAGE_MODE_USE_ATTACHMENTS
+} PopplerPageMode;
+
+typedef enum
+{
+ POPPLER_FONT_TYPE_UNKNOWN,
+ POPPLER_FONT_TYPE_TYPE1,
+ POPPLER_FONT_TYPE_TYPE1C,
+ POPPLER_FONT_TYPE_TYPE1COT,
+ POPPLER_FONT_TYPE_TYPE3,
+ POPPLER_FONT_TYPE_TRUETYPE,
+ POPPLER_FONT_TYPE_TRUETYPEOT,
+ POPPLER_FONT_TYPE_CID_TYPE0,
+ POPPLER_FONT_TYPE_CID_TYPE0C,
+ POPPLER_FONT_TYPE_CID_TYPE0COT,
+ POPPLER_FONT_TYPE_CID_TYPE2,
+ POPPLER_FONT_TYPE_CID_TYPE2OT
+} PopplerFontType;
+
+typedef enum /*< flags >*/
+{
+ POPPLER_VIEWER_PREFERENCES_UNSET = 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR = 1 << 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR = 1 << 1,
+ POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI = 1 << 2,
+ POPPLER_VIEWER_PREFERENCES_FIT_WINDOW = 1 << 3,
+ POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW = 1 << 4,
+ POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE = 1 << 5,
+ POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 << 6
+} PopplerViewerPreferences;
+
+typedef enum /*< flags >*/
+{
+ POPPLER_PERMISSIONS_OK_TO_PRINT = 1 << 0,
+ POPPLER_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
+ POPPLER_PERMISSIONS_OK_TO_COPY = 1 << 2,
+ POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
+ POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 << 4,
+ POPPLER_PERMISSIONS_FULL = (POPPLER_PERMISSIONS_OK_TO_PRINT | POPPLER_PERMISSIONS_OK_TO_MODIFY | POPPLER_PERMISSIONS_OK_TO_COPY | POPPLER_PERMISSIONS_OK_TO_ADD_NOTES | POPPLER_PERMISSIONS_OK_TO_FILL_FORM)
+
+} PopplerPermissions;
+
+
+
+GType poppler_document_get_type (void) G_GNUC_CONST;
+PopplerDocument *poppler_document_new_from_file (const char *uri,
+ const char *password,
+ GError **error);
+PopplerDocument *poppler_document_new_from_data (char *data,
+ int length,
+ const char *password,
+ GError **error);
+gboolean poppler_document_save (PopplerDocument *document,
+ const char *uri,
+ GError **error);
+gboolean poppler_document_save_a_copy (PopplerDocument *document,
+ const char *uri,
+ GError **error);
+int poppler_document_get_n_pages (PopplerDocument *document);
+PopplerPage *poppler_document_get_page (PopplerDocument *document,
+ int index);
+PopplerPage *poppler_document_get_page_by_label (PopplerDocument *document,
+ const char *label);
+/* Attachments */
+gboolean poppler_document_has_attachments (PopplerDocument *document);
+GList *poppler_document_get_attachments (PopplerDocument *document);
+
+/* Links */
+PopplerDest *poppler_document_find_dest (PopplerDocument *document,
+ const gchar *link_name);
+
+/* Form */
+PopplerFormField *poppler_document_get_form_field (PopplerDocument *document,
+ gint id);
+
+/* Interface for getting the Index of a poppler_document */
+#define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type ())
+GType poppler_index_iter_get_type (void) G_GNUC_CONST;
+PopplerIndexIter *poppler_index_iter_new (PopplerDocument *document);
+PopplerIndexIter *poppler_index_iter_copy (PopplerIndexIter *iter);
+void poppler_index_iter_free (PopplerIndexIter *iter);
+
+PopplerIndexIter *poppler_index_iter_get_child (PopplerIndexIter *parent);
+gboolean poppler_index_iter_is_open (PopplerIndexIter *iter);
+PopplerAction *poppler_index_iter_get_action (PopplerIndexIter *iter);
+gboolean poppler_index_iter_next (PopplerIndexIter *iter);
+
+/* Interface for getting the Fonts of a poppler_document */
+#define POPPLER_TYPE_FONT_INFO (poppler_font_info_get_type ())
+#define POPPLER_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_FONT_INFO, PopplerFontInfo))
+#define POPPLER_IS_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_FONT_INFO))
+GType poppler_font_info_get_type (void) G_GNUC_CONST;
+PopplerFontInfo *poppler_font_info_new (PopplerDocument *document);
+gboolean poppler_font_info_scan (PopplerFontInfo *font_info,
+ int n_pages,
+ PopplerFontsIter **iter);
+void poppler_font_info_free (PopplerFontInfo *font_info);
+
+#define POPPLER_TYPE_FONTS_ITER (poppler_fonts_iter_get_type ())
+GType poppler_fonts_iter_get_type (void) G_GNUC_CONST;
+PopplerFontsIter *poppler_fonts_iter_copy (PopplerFontsIter *iter);
+void poppler_fonts_iter_free (PopplerFontsIter *iter);
+const char *poppler_fonts_iter_get_name (PopplerFontsIter *iter);
+const char *poppler_fonts_iter_get_full_name (PopplerFontsIter *iter);
+const char *poppler_fonts_iter_get_file_name (PopplerFontsIter *iter);
+PopplerFontType poppler_fonts_iter_get_font_type (PopplerFontsIter *iter);
+gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter);
+gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter);
+gboolean poppler_fonts_iter_next (PopplerFontsIter *iter);
+
+/* Interface for getting the Layers of a poppler_document */
+#define POPPLER_TYPE_LAYERS_ITER (poppler_layers_iter_get_type ())
+GType poppler_layers_iter_get_type (void) G_GNUC_CONST;
+PopplerLayersIter *poppler_layers_iter_new (PopplerDocument *document);
+PopplerLayersIter *poppler_layers_iter_copy (PopplerLayersIter *iter);
+void poppler_layers_iter_free (PopplerLayersIter *iter);
+
+PopplerLayersIter *poppler_layers_iter_get_child (PopplerLayersIter *parent);
+gchar *poppler_layers_iter_get_title (PopplerLayersIter *iter);
+PopplerLayer *poppler_layers_iter_get_layer (PopplerLayersIter *iter);
+gboolean poppler_layers_iter_next (PopplerLayersIter *iter);
+
+/* Export to ps */
+#define POPPLER_TYPE_PS_FILE (poppler_ps_file_get_type ())
+#define POPPLER_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_PS_FILE, PopplerPSFile))
+#define POPPLER_IS_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_PS_FILE))
+GType poppler_ps_file_get_type (void) G_GNUC_CONST;
+PopplerPSFile *poppler_ps_file_new (PopplerDocument *document,
+ const char *filename,
+ int first_page,
+ int n_pages);
+void poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
+ double width,
+ double height);
+void poppler_ps_file_set_duplex (PopplerPSFile *ps_file,
+ gboolean duplex);
+void poppler_ps_file_free (PopplerPSFile *ps_file);
+
+
+
+G_END_DECLS
+
+#endif /* __POPPLER_DOCUMENT_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c
new file mode 100644
index 00000000000..2f567c52dbc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c
@@ -0,0 +1,607 @@
+
+/* Generated data (by glib-mkenums) */
+
+#include <config.h>
+
+#include "poppler-enums.h"
+
+/* enumerations from "poppler-action.h" */
+#include "poppler-action.h"
+GType
+poppler_action_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ACTION_UNKNOWN, "POPPLER_ACTION_UNKNOWN", "unknown" },
+ { POPPLER_ACTION_NONE, "POPPLER_ACTION_NONE", "none" },
+ { POPPLER_ACTION_GOTO_DEST, "POPPLER_ACTION_GOTO_DEST", "goto-dest" },
+ { POPPLER_ACTION_GOTO_REMOTE, "POPPLER_ACTION_GOTO_REMOTE", "goto-remote" },
+ { POPPLER_ACTION_LAUNCH, "POPPLER_ACTION_LAUNCH", "launch" },
+ { POPPLER_ACTION_URI, "POPPLER_ACTION_URI", "uri" },
+ { POPPLER_ACTION_NAMED, "POPPLER_ACTION_NAMED", "named" },
+ { POPPLER_ACTION_MOVIE, "POPPLER_ACTION_MOVIE", "movie" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerActionType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_dest_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_DEST_UNKNOWN, "POPPLER_DEST_UNKNOWN", "unknown" },
+ { POPPLER_DEST_XYZ, "POPPLER_DEST_XYZ", "xyz" },
+ { POPPLER_DEST_FIT, "POPPLER_DEST_FIT", "fit" },
+ { POPPLER_DEST_FITH, "POPPLER_DEST_FITH", "fith" },
+ { POPPLER_DEST_FITV, "POPPLER_DEST_FITV", "fitv" },
+ { POPPLER_DEST_FITR, "POPPLER_DEST_FITR", "fitr" },
+ { POPPLER_DEST_FITB, "POPPLER_DEST_FITB", "fitb" },
+ { POPPLER_DEST_FITBH, "POPPLER_DEST_FITBH", "fitbh" },
+ { POPPLER_DEST_FITBV, "POPPLER_DEST_FITBV", "fitbv" },
+ { POPPLER_DEST_NAMED, "POPPLER_DEST_NAMED", "named" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerDestType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/* enumerations from "poppler-document.h" */
+#include "poppler-document.h"
+GType
+poppler_page_layout_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_PAGE_LAYOUT_UNSET, "POPPLER_PAGE_LAYOUT_UNSET", "unset" },
+ { POPPLER_PAGE_LAYOUT_SINGLE_PAGE, "POPPLER_PAGE_LAYOUT_SINGLE_PAGE", "single-page" },
+ { POPPLER_PAGE_LAYOUT_ONE_COLUMN, "POPPLER_PAGE_LAYOUT_ONE_COLUMN", "one-column" },
+ { POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT, "POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT", "two-column-left" },
+ { POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT, "POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT", "two-column-right" },
+ { POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT, "POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT", "two-page-left" },
+ { POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT, "POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT", "two-page-right" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerPageLayout"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_page_mode_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_PAGE_MODE_UNSET, "POPPLER_PAGE_MODE_UNSET", "unset" },
+ { POPPLER_PAGE_MODE_NONE, "POPPLER_PAGE_MODE_NONE", "none" },
+ { POPPLER_PAGE_MODE_USE_OUTLINES, "POPPLER_PAGE_MODE_USE_OUTLINES", "use-outlines" },
+ { POPPLER_PAGE_MODE_USE_THUMBS, "POPPLER_PAGE_MODE_USE_THUMBS", "use-thumbs" },
+ { POPPLER_PAGE_MODE_FULL_SCREEN, "POPPLER_PAGE_MODE_FULL_SCREEN", "full-screen" },
+ { POPPLER_PAGE_MODE_USE_OC, "POPPLER_PAGE_MODE_USE_OC", "use-oc" },
+ { POPPLER_PAGE_MODE_USE_ATTACHMENTS, "POPPLER_PAGE_MODE_USE_ATTACHMENTS", "use-attachments" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerPageMode"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_font_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_FONT_TYPE_UNKNOWN, "POPPLER_FONT_TYPE_UNKNOWN", "unknown" },
+ { POPPLER_FONT_TYPE_TYPE1, "POPPLER_FONT_TYPE_TYPE1", "type1" },
+ { POPPLER_FONT_TYPE_TYPE1C, "POPPLER_FONT_TYPE_TYPE1C", "type1c" },
+ { POPPLER_FONT_TYPE_TYPE1COT, "POPPLER_FONT_TYPE_TYPE1COT", "type1cot" },
+ { POPPLER_FONT_TYPE_TYPE3, "POPPLER_FONT_TYPE_TYPE3", "type3" },
+ { POPPLER_FONT_TYPE_TRUETYPE, "POPPLER_FONT_TYPE_TRUETYPE", "truetype" },
+ { POPPLER_FONT_TYPE_TRUETYPEOT, "POPPLER_FONT_TYPE_TRUETYPEOT", "truetypeot" },
+ { POPPLER_FONT_TYPE_CID_TYPE0, "POPPLER_FONT_TYPE_CID_TYPE0", "cid-type0" },
+ { POPPLER_FONT_TYPE_CID_TYPE0C, "POPPLER_FONT_TYPE_CID_TYPE0C", "cid-type0c" },
+ { POPPLER_FONT_TYPE_CID_TYPE0COT, "POPPLER_FONT_TYPE_CID_TYPE0COT", "cid-type0cot" },
+ { POPPLER_FONT_TYPE_CID_TYPE2, "POPPLER_FONT_TYPE_CID_TYPE2", "cid-type2" },
+ { POPPLER_FONT_TYPE_CID_TYPE2OT, "POPPLER_FONT_TYPE_CID_TYPE2OT", "cid-type2ot" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerFontType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_viewer_preferences_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GFlagsValue values[] = {
+ { POPPLER_VIEWER_PREFERENCES_UNSET, "POPPLER_VIEWER_PREFERENCES_UNSET", "unset" },
+ { POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR, "POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR", "hide-toolbar" },
+ { POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR, "POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR", "hide-menubar" },
+ { POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI, "POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI", "hide-windowui" },
+ { POPPLER_VIEWER_PREFERENCES_FIT_WINDOW, "POPPLER_VIEWER_PREFERENCES_FIT_WINDOW", "fit-window" },
+ { POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW, "POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW", "center-window" },
+ { POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE, "POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE", "display-doc-title" },
+ { POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL, "POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL", "direction-rtl" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_flags_register_static (g_intern_static_string ("PopplerViewerPreferences"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_permissions_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GFlagsValue values[] = {
+ { POPPLER_PERMISSIONS_OK_TO_PRINT, "POPPLER_PERMISSIONS_OK_TO_PRINT", "ok-to-print" },
+ { POPPLER_PERMISSIONS_OK_TO_MODIFY, "POPPLER_PERMISSIONS_OK_TO_MODIFY", "ok-to-modify" },
+ { POPPLER_PERMISSIONS_OK_TO_COPY, "POPPLER_PERMISSIONS_OK_TO_COPY", "ok-to-copy" },
+ { POPPLER_PERMISSIONS_OK_TO_ADD_NOTES, "POPPLER_PERMISSIONS_OK_TO_ADD_NOTES", "ok-to-add-notes" },
+ { POPPLER_PERMISSIONS_OK_TO_FILL_FORM, "POPPLER_PERMISSIONS_OK_TO_FILL_FORM", "ok-to-fill-form" },
+ { POPPLER_PERMISSIONS_FULL, "POPPLER_PERMISSIONS_FULL", "full" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_flags_register_static (g_intern_static_string ("PopplerPermissions"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/* enumerations from "poppler-form-field.h" */
+#include "poppler-form-field.h"
+GType
+poppler_form_field_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_FORM_FIELD_UNKNOWN, "POPPLER_FORM_FIELD_UNKNOWN", "unknown" },
+ { POPPLER_FORM_FIELD_BUTTON, "POPPLER_FORM_FIELD_BUTTON", "button" },
+ { POPPLER_FORM_FIELD_TEXT, "POPPLER_FORM_FIELD_TEXT", "text" },
+ { POPPLER_FORM_FIELD_CHOICE, "POPPLER_FORM_FIELD_CHOICE", "choice" },
+ { POPPLER_FORM_FIELD_SIGNATURE, "POPPLER_FORM_FIELD_SIGNATURE", "signature" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerFormFieldType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_form_button_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_FORM_BUTTON_PUSH, "POPPLER_FORM_BUTTON_PUSH", "push" },
+ { POPPLER_FORM_BUTTON_CHECK, "POPPLER_FORM_BUTTON_CHECK", "check" },
+ { POPPLER_FORM_BUTTON_RADIO, "POPPLER_FORM_BUTTON_RADIO", "radio" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerFormButtonType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_form_text_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_FORM_TEXT_NORMAL, "POPPLER_FORM_TEXT_NORMAL", "normal" },
+ { POPPLER_FORM_TEXT_MULTILINE, "POPPLER_FORM_TEXT_MULTILINE", "multiline" },
+ { POPPLER_FORM_TEXT_FILE_SELECT, "POPPLER_FORM_TEXT_FILE_SELECT", "file-select" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerFormTextType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_form_choice_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_FORM_CHOICE_COMBO, "POPPLER_FORM_CHOICE_COMBO", "combo" },
+ { POPPLER_FORM_CHOICE_LIST, "POPPLER_FORM_CHOICE_LIST", "list" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerFormChoiceType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/* enumerations from "poppler-annot.h" */
+#include "poppler-annot.h"
+GType
+poppler_annot_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ANNOT_UNKNOWN, "POPPLER_ANNOT_UNKNOWN", "unknown" },
+ { POPPLER_ANNOT_TEXT, "POPPLER_ANNOT_TEXT", "text" },
+ { POPPLER_ANNOT_LINK, "POPPLER_ANNOT_LINK", "link" },
+ { POPPLER_ANNOT_FREE_TEXT, "POPPLER_ANNOT_FREE_TEXT", "free-text" },
+ { POPPLER_ANNOT_LINE, "POPPLER_ANNOT_LINE", "line" },
+ { POPPLER_ANNOT_SQUARE, "POPPLER_ANNOT_SQUARE", "square" },
+ { POPPLER_ANNOT_CIRCLE, "POPPLER_ANNOT_CIRCLE", "circle" },
+ { POPPLER_ANNOT_POLYGON, "POPPLER_ANNOT_POLYGON", "polygon" },
+ { POPPLER_ANNOT_POLY_LINE, "POPPLER_ANNOT_POLY_LINE", "poly-line" },
+ { POPPLER_ANNOT_HIGHLIGHT, "POPPLER_ANNOT_HIGHLIGHT", "highlight" },
+ { POPPLER_ANNOT_UNDERLINE, "POPPLER_ANNOT_UNDERLINE", "underline" },
+ { POPPLER_ANNOT_SQUIGGLY, "POPPLER_ANNOT_SQUIGGLY", "squiggly" },
+ { POPPLER_ANNOT_STRIKE_OUT, "POPPLER_ANNOT_STRIKE_OUT", "strike-out" },
+ { POPPLER_ANNOT_STAMP, "POPPLER_ANNOT_STAMP", "stamp" },
+ { POPPLER_ANNOT_CARET, "POPPLER_ANNOT_CARET", "caret" },
+ { POPPLER_ANNOT_INK, "POPPLER_ANNOT_INK", "ink" },
+ { POPPLER_ANNOT_POPUP, "POPPLER_ANNOT_POPUP", "popup" },
+ { POPPLER_ANNOT_FILE_ATTACHMENT, "POPPLER_ANNOT_FILE_ATTACHMENT", "file-attachment" },
+ { POPPLER_ANNOT_SOUND, "POPPLER_ANNOT_SOUND", "sound" },
+ { POPPLER_ANNOT_MOVIE, "POPPLER_ANNOT_MOVIE", "movie" },
+ { POPPLER_ANNOT_WIDGET, "POPPLER_ANNOT_WIDGET", "widget" },
+ { POPPLER_ANNOT_SCREEN, "POPPLER_ANNOT_SCREEN", "screen" },
+ { POPPLER_ANNOT_PRINTER_MARK, "POPPLER_ANNOT_PRINTER_MARK", "printer-mark" },
+ { POPPLER_ANNOT_TRAP_NET, "POPPLER_ANNOT_TRAP_NET", "trap-net" },
+ { POPPLER_ANNOT_WATERMARK, "POPPLER_ANNOT_WATERMARK", "watermark" },
+ { POPPLER_ANNOT_3D, "POPPLER_ANNOT_3D", "3d" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerAnnotType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_annot_flag_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GFlagsValue values[] = {
+ { POPPLER_ANNOT_FLAG_UNKNOWN, "POPPLER_ANNOT_FLAG_UNKNOWN", "unknown" },
+ { POPPLER_ANNOT_FLAG_INVISIBLE, "POPPLER_ANNOT_FLAG_INVISIBLE", "invisible" },
+ { POPPLER_ANNOT_FLAG_HIDDEN, "POPPLER_ANNOT_FLAG_HIDDEN", "hidden" },
+ { POPPLER_ANNOT_FLAG_PRINT, "POPPLER_ANNOT_FLAG_PRINT", "print" },
+ { POPPLER_ANNOT_FLAG_NO_ZOOM, "POPPLER_ANNOT_FLAG_NO_ZOOM", "no-zoom" },
+ { POPPLER_ANNOT_FLAG_NO_ROTATE, "POPPLER_ANNOT_FLAG_NO_ROTATE", "no-rotate" },
+ { POPPLER_ANNOT_FLAG_NO_VIEW, "POPPLER_ANNOT_FLAG_NO_VIEW", "no-view" },
+ { POPPLER_ANNOT_FLAG_READ_ONLY, "POPPLER_ANNOT_FLAG_READ_ONLY", "read-only" },
+ { POPPLER_ANNOT_FLAG_LOCKED, "POPPLER_ANNOT_FLAG_LOCKED", "locked" },
+ { POPPLER_ANNOT_FLAG_TOGGLE_NO_VIEW, "POPPLER_ANNOT_FLAG_TOGGLE_NO_VIEW", "toggle-no-view" },
+ { POPPLER_ANNOT_FLAG_LOCKED_CONTENTS, "POPPLER_ANNOT_FLAG_LOCKED_CONTENTS", "locked-contents" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_flags_register_static (g_intern_static_string ("PopplerAnnotFlag"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_annot_markup_reply_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ANNOT_MARKUP_REPLY_TYPE_R, "POPPLER_ANNOT_MARKUP_REPLY_TYPE_R", "r" },
+ { POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP, "POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP", "group" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerAnnotMarkupReplyType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_annot_external_data_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D, "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D", "3d" },
+ { POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN, "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN", "unknown" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerAnnotExternalDataType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_annot_text_state_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ANNOT_TEXT_STATE_MARKED, "POPPLER_ANNOT_TEXT_STATE_MARKED", "marked" },
+ { POPPLER_ANNOT_TEXT_STATE_UNMARKED, "POPPLER_ANNOT_TEXT_STATE_UNMARKED", "unmarked" },
+ { POPPLER_ANNOT_TEXT_STATE_ACCEPTED, "POPPLER_ANNOT_TEXT_STATE_ACCEPTED", "accepted" },
+ { POPPLER_ANNOT_TEXT_STATE_REJECTED, "POPPLER_ANNOT_TEXT_STATE_REJECTED", "rejected" },
+ { POPPLER_ANNOT_TEXT_STATE_CANCELLED, "POPPLER_ANNOT_TEXT_STATE_CANCELLED", "cancelled" },
+ { POPPLER_ANNOT_TEXT_STATE_COMPLETED, "POPPLER_ANNOT_TEXT_STATE_COMPLETED", "completed" },
+ { POPPLER_ANNOT_TEXT_STATE_NONE, "POPPLER_ANNOT_TEXT_STATE_NONE", "none" },
+ { POPPLER_ANNOT_TEXT_STATE_UNKNOWN, "POPPLER_ANNOT_TEXT_STATE_UNKNOWN", "unknown" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerAnnotTextState"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_annot_free_text_quadding_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED, "POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED", "left-justified" },
+ { POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED, "POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED", "centered" },
+ { POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED, "POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED", "right-justified" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerAnnotFreeTextQuadding"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/* enumerations from "poppler.h" */
+#include "poppler.h"
+GType
+poppler_error_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ERROR_INVALID, "POPPLER_ERROR_INVALID", "invalid" },
+ { POPPLER_ERROR_ENCRYPTED, "POPPLER_ERROR_ENCRYPTED", "encrypted" },
+ { POPPLER_ERROR_OPEN_FILE, "POPPLER_ERROR_OPEN_FILE", "open-file" },
+ { POPPLER_ERROR_BAD_CATALOG, "POPPLER_ERROR_BAD_CATALOG", "bad-catalog" },
+ { POPPLER_ERROR_DAMAGED, "POPPLER_ERROR_DAMAGED", "damaged" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerError"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_orientation_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_ORIENTATION_PORTRAIT, "POPPLER_ORIENTATION_PORTRAIT", "portrait" },
+ { POPPLER_ORIENTATION_LANDSCAPE, "POPPLER_ORIENTATION_LANDSCAPE", "landscape" },
+ { POPPLER_ORIENTATION_UPSIDEDOWN, "POPPLER_ORIENTATION_UPSIDEDOWN", "upsidedown" },
+ { POPPLER_ORIENTATION_SEASCAPE, "POPPLER_ORIENTATION_SEASCAPE", "seascape" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerOrientation"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_page_transition_type_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_PAGE_TRANSITION_REPLACE, "POPPLER_PAGE_TRANSITION_REPLACE", "replace" },
+ { POPPLER_PAGE_TRANSITION_SPLIT, "POPPLER_PAGE_TRANSITION_SPLIT", "split" },
+ { POPPLER_PAGE_TRANSITION_BLINDS, "POPPLER_PAGE_TRANSITION_BLINDS", "blinds" },
+ { POPPLER_PAGE_TRANSITION_BOX, "POPPLER_PAGE_TRANSITION_BOX", "box" },
+ { POPPLER_PAGE_TRANSITION_WIPE, "POPPLER_PAGE_TRANSITION_WIPE", "wipe" },
+ { POPPLER_PAGE_TRANSITION_DISSOLVE, "POPPLER_PAGE_TRANSITION_DISSOLVE", "dissolve" },
+ { POPPLER_PAGE_TRANSITION_GLITTER, "POPPLER_PAGE_TRANSITION_GLITTER", "glitter" },
+ { POPPLER_PAGE_TRANSITION_FLY, "POPPLER_PAGE_TRANSITION_FLY", "fly" },
+ { POPPLER_PAGE_TRANSITION_PUSH, "POPPLER_PAGE_TRANSITION_PUSH", "push" },
+ { POPPLER_PAGE_TRANSITION_COVER, "POPPLER_PAGE_TRANSITION_COVER", "cover" },
+ { POPPLER_PAGE_TRANSITION_UNCOVER, "POPPLER_PAGE_TRANSITION_UNCOVER", "uncover" },
+ { POPPLER_PAGE_TRANSITION_FADE, "POPPLER_PAGE_TRANSITION_FADE", "fade" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerPageTransitionType"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_page_transition_alignment_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_PAGE_TRANSITION_HORIZONTAL, "POPPLER_PAGE_TRANSITION_HORIZONTAL", "horizontal" },
+ { POPPLER_PAGE_TRANSITION_VERTICAL, "POPPLER_PAGE_TRANSITION_VERTICAL", "vertical" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerPageTransitionAlignment"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_page_transition_direction_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_PAGE_TRANSITION_INWARD, "POPPLER_PAGE_TRANSITION_INWARD", "inward" },
+ { POPPLER_PAGE_TRANSITION_OUTWARD, "POPPLER_PAGE_TRANSITION_OUTWARD", "outward" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerPageTransitionDirection"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_selection_style_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_SELECTION_GLYPH, "POPPLER_SELECTION_GLYPH", "glyph" },
+ { POPPLER_SELECTION_WORD, "POPPLER_SELECTION_WORD", "word" },
+ { POPPLER_SELECTION_LINE, "POPPLER_SELECTION_LINE", "line" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerSelectionStyle"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+GType
+poppler_backend_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const GEnumValue values[] = {
+ { POPPLER_BACKEND_UNKNOWN, "POPPLER_BACKEND_UNKNOWN", "unknown" },
+ { POPPLER_BACKEND_SPLASH, "POPPLER_BACKEND_SPLASH", "splash" },
+ { POPPLER_BACKEND_CAIRO, "POPPLER_BACKEND_CAIRO", "cairo" },
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_enum_register_static (g_intern_static_string ("PopplerBackend"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+
+
+/* Generated data ends here */
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c.template b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c.template
new file mode 100644
index 00000000000..26a51b4c410
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.c.template
@@ -0,0 +1,44 @@
+/*** BEGIN file-header ***/
+#include <config.h>
+
+#include "poppler-enums.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+#include "@filename@"
+/*** END file-production ***/
+
+
+/*** BEGIN value-header ***/
+GType
+@enum_name@_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+
+/*** END file-tail ***/
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h
new file mode 100644
index 00000000000..250416f04fe
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h
@@ -0,0 +1,74 @@
+
+/* Generated data (by glib-mkenums) */
+
+
+#ifndef POPPLER_ENUMS_H
+#define POPPLER_ENUMS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* enumerations from "poppler-action.h" */
+GType poppler_action_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ACTION_TYPE (poppler_action_type_get_type ())
+GType poppler_dest_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_DEST_TYPE (poppler_dest_type_get_type ())
+
+/* enumerations from "poppler-document.h" */
+GType poppler_page_layout_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PAGE_LAYOUT (poppler_page_layout_get_type ())
+GType poppler_page_mode_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PAGE_MODE (poppler_page_mode_get_type ())
+GType poppler_font_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_FONT_TYPE (poppler_font_type_get_type ())
+GType poppler_viewer_preferences_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_VIEWER_PREFERENCES (poppler_viewer_preferences_get_type ())
+GType poppler_permissions_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PERMISSIONS (poppler_permissions_get_type ())
+
+/* enumerations from "poppler-form-field.h" */
+GType poppler_form_field_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_FORM_FIELD_TYPE (poppler_form_field_type_get_type ())
+GType poppler_form_button_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_FORM_BUTTON_TYPE (poppler_form_button_type_get_type ())
+GType poppler_form_text_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_FORM_TEXT_TYPE (poppler_form_text_type_get_type ())
+GType poppler_form_choice_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_FORM_CHOICE_TYPE (poppler_form_choice_type_get_type ())
+
+/* enumerations from "poppler-annot.h" */
+GType poppler_annot_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_TYPE (poppler_annot_type_get_type ())
+GType poppler_annot_flag_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_FLAG (poppler_annot_flag_get_type ())
+GType poppler_annot_markup_reply_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_MARKUP_REPLY_TYPE (poppler_annot_markup_reply_type_get_type ())
+GType poppler_annot_external_data_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_EXTERNAL_DATA_TYPE (poppler_annot_external_data_type_get_type ())
+GType poppler_annot_text_state_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_TEXT_STATE (poppler_annot_text_state_get_type ())
+GType poppler_annot_free_text_quadding_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ANNOT_FREE_TEXT_QUADDING (poppler_annot_free_text_quadding_get_type ())
+
+/* enumerations from "poppler.h" */
+GType poppler_error_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ERROR (poppler_error_get_type ())
+GType poppler_orientation_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ORIENTATION (poppler_orientation_get_type ())
+GType poppler_page_transition_type_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PAGE_TRANSITION_TYPE (poppler_page_transition_type_get_type ())
+GType poppler_page_transition_alignment_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT (poppler_page_transition_alignment_get_type ())
+GType poppler_page_transition_direction_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_PAGE_TRANSITION_DIRECTION (poppler_page_transition_direction_get_type ())
+GType poppler_selection_style_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_SELECTION_STYLE (poppler_selection_style_get_type ())
+GType poppler_backend_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_BACKEND (poppler_backend_get_type ())
+G_END_DECLS
+
+#endif /* !POPPLER_ENUMS_H */
+
+/* Generated data ends here */
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h.template b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h.template
new file mode 100644
index 00000000000..5d056dd54c0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-enums.h.template
@@ -0,0 +1,25 @@
+/*** BEGIN file-header ***/
+
+#ifndef POPPLER_ENUMS_H
+#define POPPLER_ENUMS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name@_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* !POPPLER_ENUMS_H */
+/*** END file-tail ***/
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h
new file mode 100644
index 00000000000..6df10361f23
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h
@@ -0,0 +1,34 @@
+/* poppler-features.h: glib interface to poppler
+ * Copyright (C) 2006, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_FEATURES_H__
+#define __POPPLER_FEATURES_H__
+
+#define POPPLER_HAS_CAIRO 1
+#define POPPLER_WITH_GDK 1
+
+#define POPPLER_MAJOR_VERSION (0)
+#define POPPLER_MINOR_VERSION (12)
+#define POPPLER_MICRO_VERSION (4)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+ (POPPLER_MAJOR_VERSION > (major) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
+#endif /* __POPPLER_FEATURES_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.cmake b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.cmake
new file mode 100644
index 00000000000..1f79ce4fdcd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.cmake
@@ -0,0 +1,33 @@
+/* poppler-features.h: glib interface to poppler
+ * Copyright (C) 2006, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_FEATURES_H__
+#define __POPPLER_FEATURES_H__
+
+@CAIRO_FEATURE@
+
+#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
+#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
+#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+ (POPPLER_MAJOR_VERSION > (major) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
+#endif /* __POPPLER_FEATURES_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.in b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.in
new file mode 100644
index 00000000000..99c7ed8e02d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-features.h.in
@@ -0,0 +1,34 @@
+/* poppler-features.h: glib interface to poppler
+ * Copyright (C) 2006, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_FEATURES_H__
+#define __POPPLER_FEATURES_H__
+
+@CAIRO_FEATURE@
+@GDK_FEATURE@
+
+#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
+#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
+#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+ (POPPLER_MAJOR_VERSION > (major) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
+#endif /* __POPPLER_FEATURES_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.cc
new file mode 100644
index 00000000000..4ed5b9ecc2e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.cc
@@ -0,0 +1,579 @@
+/* poppler-form-field.cc: glib interface to poppler
+ *
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ * Copyright (C) 2006 Julien Rebetez
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler.h"
+#include "poppler-private.h"
+
+typedef struct _PopplerFormFieldClass PopplerFormFieldClass;
+struct _PopplerFormFieldClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerFormField, poppler_form_field, G_TYPE_OBJECT)
+
+static void
+poppler_form_field_finalize (GObject *object)
+{
+ PopplerFormField *field = POPPLER_FORM_FIELD (object);
+
+ if (field->document)
+ {
+ g_object_unref (field->document);
+ field->document = NULL;
+ }
+ field->widget = NULL;
+
+ G_OBJECT_CLASS (poppler_form_field_parent_class)->finalize (object);
+}
+
+static void
+poppler_form_field_init (PopplerFormField *field)
+{
+}
+
+static void
+poppler_form_field_class_init (PopplerFormFieldClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_form_field_finalize;
+}
+
+PopplerFormField *
+_poppler_form_field_new (PopplerDocument *document,
+ FormWidget *field)
+{
+ PopplerFormField *poppler_field;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (field != NULL, NULL);
+
+ poppler_field = POPPLER_FORM_FIELD (g_object_new (POPPLER_TYPE_FORM_FIELD, NULL));
+
+ poppler_field->document = (PopplerDocument *)g_object_ref (document);
+ poppler_field->widget = field;
+
+ return poppler_field;
+}
+
+/* Public methods */
+/**
+ * poppler_form_field_get_field_type:
+ * @field: a #PopplerFormField
+ *
+ * Gets the type of @field
+ *
+ * Return value: #PopplerFormFieldType of @field
+ **/
+PopplerFormFieldType
+poppler_form_field_get_field_type (PopplerFormField *field)
+{
+ g_return_val_if_fail (POPPLER_IS_FORM_FIELD (field), POPPLER_FORM_FIELD_UNKNOWN);
+
+ switch (field->widget->getType ())
+ {
+ case formButton:
+ return POPPLER_FORM_FIELD_BUTTON;
+ case formText:
+ return POPPLER_FORM_FIELD_TEXT;
+ case formChoice:
+ return POPPLER_FORM_FIELD_CHOICE;
+ case formSignature:
+ return POPPLER_FORM_FIELD_SIGNATURE;
+ default:
+ g_warning ("Unsupported Form Field Type");
+ }
+
+ return POPPLER_FORM_FIELD_UNKNOWN;
+}
+
+/**
+ * poppler_form_field_get_id:
+ * @field: a #PopplerFormField
+ *
+ * Gets the id of @field
+ *
+ * Return value: the id of @field
+ **/
+gint
+poppler_form_field_get_id (PopplerFormField *field)
+{
+ g_return_val_if_fail (POPPLER_IS_FORM_FIELD (field), -1);
+
+ return field->widget->getID ();
+}
+
+/**
+ * poppler_form_field_get_font_size
+ * @field: a #PopplerFormField
+ *
+ * Gets the font size of @field
+ *
+ * Return value: the font size of @field
+ **/
+gdouble
+poppler_form_field_get_font_size (PopplerFormField *field)
+{
+ g_return_val_if_fail (POPPLER_IS_FORM_FIELD (field), 0);
+
+ return field->widget->getFontSize ();
+}
+
+/**
+ * poppler_form_field_is_read_only
+ * @field: a #PopplerFormField
+ *
+ * Checks whether @field is read only
+ *
+ * Return value: %TRUE if @field is read only
+ **/
+gboolean
+poppler_form_field_is_read_only (PopplerFormField *field)
+{
+ g_return_val_if_fail (POPPLER_IS_FORM_FIELD (field), FALSE);
+
+ return field->widget->isReadOnly ();
+}
+
+/* Button Field */
+/**
+ * poppler_form_field_button_get_button_type
+ * @field: a #PopplerFormField
+ *
+ * Gets the button type of @field
+ *
+ * Return value: #PopplerFormButtonType of @field
+ **/
+PopplerFormButtonType
+poppler_form_field_button_get_button_type (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formButton, POPPLER_FORM_BUTTON_PUSH);
+
+ switch (static_cast<FormWidgetButton*>(field->widget)->getButtonType ())
+ {
+ case formButtonPush:
+ return POPPLER_FORM_BUTTON_PUSH;
+ case formButtonCheck:
+ return POPPLER_FORM_BUTTON_CHECK;
+ case formButtonRadio:
+ return POPPLER_FORM_BUTTON_RADIO;
+ default:
+ g_assert_not_reached ();
+ }
+}
+
+/**
+ * poppler_form_field_button_get_state
+ * @field: a #PopplerFormField
+ *
+ * Queries a #PopplerFormField and returns its current state. Returns %TRUE if
+ * @field is pressed in and %FALSE if it is raised.
+ *
+ * Return value: current state of @field
+ **/
+gboolean
+poppler_form_field_button_get_state (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formButton, FALSE);
+
+ return static_cast<FormWidgetButton*>(field->widget)->getState ();
+}
+
+/**
+ * poppler_form_field_button_set_state
+ * @field: a #PopplerFormField
+ * @state: %TRUE or %FALSE
+ *
+ * Sets the status of @field. Set to %TRUE if you want the #PopplerFormField
+ * to be 'pressed in', and %FALSE to raise it.
+ **/
+void
+poppler_form_field_button_set_state (PopplerFormField *field,
+ gboolean state)
+{
+ g_return_if_fail (field->widget->getType () == formButton);
+
+ static_cast<FormWidgetButton*>(field->widget)->setState ((GBool)state);
+}
+
+/* Text Field */
+/**
+ * poppler_form_field_text_get_text_type:
+ * @field: a #PopplerFormField
+ *
+ * Gets the text type of @field.
+ *
+ * Return value: #PopplerFormTextType of @field
+ **/
+PopplerFormTextType
+poppler_form_field_text_get_text_type (PopplerFormField *field)
+{
+ FormWidgetText *text_field;
+
+ g_return_val_if_fail (field->widget->getType () == formText, POPPLER_FORM_TEXT_NORMAL);
+
+ text_field = static_cast<FormWidgetText*>(field->widget);
+
+ if (text_field->isMultiline ())
+ return POPPLER_FORM_TEXT_MULTILINE;
+ else if (text_field->isFileSelect ())
+ return POPPLER_FORM_TEXT_FILE_SELECT;
+
+ return POPPLER_FORM_TEXT_NORMAL;
+}
+
+/**
+ * poppler_form_field_text_get_text:
+ * @field: a #PopplerFormField
+ *
+ * Retrieves the contents of @field.
+ *
+ * Return value: a new allocated string. It must be freed with g_free() when done.
+ **/
+gchar *
+poppler_form_field_text_get_text (PopplerFormField *field)
+{
+ FormWidgetText *text_field;
+ GooString *tmp;
+
+ g_return_val_if_fail (field->widget->getType () == formText, NULL);
+
+ text_field = static_cast<FormWidgetText*>(field->widget);
+ tmp = text_field->getContent ();
+
+ return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+}
+
+/**
+ * poppler_form_field_text_set_text:
+ * @field: a #PopplerFormField
+ * @text: the new text
+ *
+ * Sets the text in @field to the given value, replacing the current contents.
+ **/
+void
+poppler_form_field_text_set_text (PopplerFormField *field,
+ const gchar *text)
+{
+ GooString *goo_tmp;
+ gchar *tmp;
+ gsize length = 0;
+
+ g_return_if_fail (field->widget->getType () == formText);
+
+ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+ goo_tmp = new GooString (tmp, length);
+ g_free (tmp);
+ static_cast<FormWidgetText*>(field->widget)->setContent (goo_tmp);
+ delete goo_tmp;
+}
+
+/**
+ * poppler_form_field_text_get_max_len:
+ * @field: a #PopplerFormField
+ *
+ * Retrieves the maximum allowed length of the text in @field
+ *
+ * Return value: the maximum allowed number of characters in @field, or -1 if there is no maximum.
+ **/
+gint
+poppler_form_field_text_get_max_len (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formText, 0);
+
+ return static_cast<FormWidgetText*>(field->widget)->getMaxLen ();
+}
+
+/**
+ * poppler_form_field_text_do_spell_check:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether spell checking should be done for the contents of @field
+ *
+ * Return value: %TRUE if spell checking should be done for @field
+ **/
+gboolean
+poppler_form_field_text_do_spell_check (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formText, FALSE);
+
+ return !static_cast<FormWidgetText*>(field->widget)->noSpellCheck ();
+}
+
+gboolean
+poppler_form_field_text_do_scroll (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formText, FALSE);
+
+ return !static_cast<FormWidgetText*>(field->widget)->noScroll ();
+}
+
+/**
+ * poppler_form_field_text_is_rich_text:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether the contents of @field are rich text
+ *
+ * Return value: %TRUE if the contents of @field are rich text
+ **/
+gboolean
+poppler_form_field_text_is_rich_text (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formText, FALSE);
+
+ return static_cast<FormWidgetText*>(field->widget)->isRichText ();
+}
+
+/**
+ * poppler_form_field_text_is_password:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether content of @field is a password and it must be hidden
+ *
+ * Return value: %TRUE if the content of @field is a password
+ **/
+gboolean
+poppler_form_field_text_is_password (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formText, FALSE);
+
+ return static_cast<FormWidgetText*>(field->widget)->isPassword ();
+}
+
+/* Choice Field */
+/**
+ * poppler_form_field_choice_get_choice_type:
+ * @field: a #PopplerFormField
+ *
+ * Gets the choice type of @field
+ *
+ * Return value: #PopplerFormChoiceType of @field
+ **/
+PopplerFormChoiceType
+poppler_form_field_choice_get_choice_type (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, POPPLER_FORM_CHOICE_COMBO);
+
+ if (static_cast<FormWidgetChoice*>(field->widget)->isCombo ())
+ return POPPLER_FORM_CHOICE_COMBO;
+ else
+ return POPPLER_FORM_CHOICE_LIST;
+}
+
+/**
+ * poppler_form_field_choice_is_editable:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether @field is editable
+ *
+ * Return value: %TRUE if @field is editable
+ **/
+gboolean
+poppler_form_field_choice_is_editable (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, FALSE);
+
+ return static_cast<FormWidgetChoice*>(field->widget)->hasEdit ();
+}
+
+/**
+ * poppler_form_field_choice_can_select_multiple:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether @field allows multiple choices to be selected
+ *
+ * Return value: %TRUE if @field allows multiple choices to be selected
+ **/
+gboolean
+poppler_form_field_choice_can_select_multiple (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, FALSE);
+
+ return static_cast<FormWidgetChoice*>(field->widget)->isMultiSelect ();
+}
+
+/**
+ * poppler_form_field_choice_do_spell_check:
+ * @field: a #PopplerFormField
+ *
+ * Checks whether spell checking should be done for the contents of @field
+ *
+ * Return value: %TRUE if spell checking should be done for @field
+ **/
+gboolean
+poppler_form_field_choice_do_spell_check (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, FALSE);
+
+ return !static_cast<FormWidgetChoice*>(field->widget)->noSpellCheck ();
+}
+
+gboolean
+poppler_form_field_choice_commit_on_change (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, FALSE);
+
+ return static_cast<FormWidgetChoice*>(field->widget)->commitOnSelChange ();
+}
+
+/**
+ * poppler_form_field_choice_get_n_items:
+ * @field: a #PopplerFormField
+ *
+ * Returns the number of items on @field
+ *
+ * Return value: the number of items on @field
+ **/
+gint
+poppler_form_field_choice_get_n_items (PopplerFormField *field)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, -1);
+
+ return static_cast<FormWidgetChoice*>(field->widget)->getNumChoices ();
+}
+
+/**
+ * poppler_form_field_choice_get_item:
+ * @field: a #PopplerFormField
+ * @index: the index of the item
+ *
+ * Returns the contents of the item on @field at the given index
+ *
+ * Return value: a new allocated string. It must be freed with g_free() when done.
+ **/
+gchar *
+poppler_form_field_choice_get_item (PopplerFormField *field,
+ gint index)
+{
+ GooString *tmp;
+
+ g_return_val_if_fail (field->widget->getType () == formChoice, NULL);
+
+ tmp = static_cast<FormWidgetChoice*>(field->widget)->getChoice (index);
+ return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+}
+
+/**
+ * poppler_form_field_choice_is_item_selected:
+ * @field: a #PopplerFormField
+ * @index: the index of the item
+ *
+ * Checks whether the item at the given index on @field is currently selected
+ *
+ * Return value: %TRUE if item at @index is currently selected
+ **/
+gboolean
+poppler_form_field_choice_is_item_selected (PopplerFormField *field,
+ gint index)
+{
+ g_return_val_if_fail (field->widget->getType () == formChoice, FALSE);
+
+ return static_cast<FormWidgetChoice*>(field->widget)->isSelected (index);
+}
+
+/**
+ * poppler_form_field_choice_select_item:
+ * @field: a #PopplerFormField
+ * @index: the index of the item
+ *
+ * Selects the item at the given index on @field
+ **/
+void
+poppler_form_field_choice_select_item (PopplerFormField *field,
+ gint index)
+{
+ g_return_if_fail (field->widget->getType () == formChoice);
+
+ static_cast<FormWidgetChoice*>(field->widget)->select (index);
+}
+
+/**
+ * poppler_form_field_choice_unselect_all:
+ * @field: a #PopplerFormField
+ *
+ * Unselects all the items on @field
+ **/
+void
+poppler_form_field_choice_unselect_all (PopplerFormField *field)
+{
+ g_return_if_fail (field->widget->getType () == formChoice);
+
+ static_cast<FormWidgetChoice*>(field->widget)->deselectAll ();
+}
+
+/**
+ * poppler_form_field_choice_toggle_item:
+ * @field: a #PopplerFormField
+ * @index: the index of the item
+ *
+ * Changes the state of the item at the given index
+ **/
+void
+poppler_form_field_choice_toggle_item (PopplerFormField *field,
+ gint index)
+{
+ g_return_if_fail (field->widget->getType () == formChoice);
+
+ static_cast<FormWidgetChoice*>(field->widget)->toggle (index);
+}
+
+/**
+ * poppler_form_field_choice_toggle_item:
+ * @field: a #PopplerFormField
+ * @text: the new text
+ *
+ * Sets the text in @field to the given value, replacing the current contents
+ **/
+void
+poppler_form_field_choice_set_text (PopplerFormField *field,
+ const gchar *text)
+{
+ GooString *goo_tmp;
+ gchar *tmp;
+ gsize length = 0;
+
+ g_return_if_fail (field->widget->getType () == formChoice);
+
+ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+ goo_tmp = new GooString (tmp, length);
+ g_free (tmp);
+ static_cast<FormWidgetChoice*>(field->widget)->setEditChoice (goo_tmp);
+ delete goo_tmp;
+}
+
+/**
+ * poppler_form_field_choice_get_text:
+ * @field: a #PopplerFormField
+ *
+ * Retrieves the contents of @field.
+ *
+ * Return value: a new allocated string. It must be freed with g_free() when done.
+ **/
+gchar *
+poppler_form_field_choice_get_text (PopplerFormField *field)
+{
+ GooString *tmp;
+
+ g_return_val_if_fail (field->widget->getType () == formChoice, NULL);
+
+ tmp = static_cast<FormWidgetChoice*>(field->widget)->getEditChoice ();
+ return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.h
new file mode 100644
index 00000000000..b8727e9e2c0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-form-field.h
@@ -0,0 +1,107 @@
+/* poppler-form-field.h: glib interface to poppler
+ *
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_FORM_FIELD_H__
+#define __POPPLER_FORM_FIELD_H__
+
+#include <glib-object.h>
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+#define POPPLER_TYPE_FORM_FIELD (poppler_form_field_get_type ())
+#define POPPLER_FORM_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_FORM_FIELD, PopplerFormField))
+#define POPPLER_IS_FORM_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_FORM_FIELD))
+
+typedef enum
+{
+ POPPLER_FORM_FIELD_UNKNOWN,
+ POPPLER_FORM_FIELD_BUTTON,
+ POPPLER_FORM_FIELD_TEXT,
+ POPPLER_FORM_FIELD_CHOICE,
+ POPPLER_FORM_FIELD_SIGNATURE
+} PopplerFormFieldType;
+
+typedef enum
+{
+ POPPLER_FORM_BUTTON_PUSH,
+ POPPLER_FORM_BUTTON_CHECK,
+ POPPLER_FORM_BUTTON_RADIO
+} PopplerFormButtonType;
+
+typedef enum
+{
+ POPPLER_FORM_TEXT_NORMAL,
+ POPPLER_FORM_TEXT_MULTILINE,
+ POPPLER_FORM_TEXT_FILE_SELECT
+} PopplerFormTextType;
+
+typedef enum
+{
+ POPPLER_FORM_CHOICE_COMBO,
+ POPPLER_FORM_CHOICE_LIST
+} PopplerFormChoiceType;
+
+GType poppler_form_field_get_type (void) G_GNUC_CONST;
+
+PopplerFormFieldType poppler_form_field_get_field_type (PopplerFormField *field);
+gint poppler_form_field_get_id (PopplerFormField *field);
+gdouble poppler_form_field_get_font_size (PopplerFormField *field);
+gboolean poppler_form_field_is_read_only (PopplerFormField *field);
+
+/* Button Field */
+PopplerFormButtonType poppler_form_field_button_get_button_type (PopplerFormField *field);
+gboolean poppler_form_field_button_get_state (PopplerFormField *field);
+void poppler_form_field_button_set_state (PopplerFormField *field,
+ gboolean state);
+
+/* Text Field */
+PopplerFormTextType poppler_form_field_text_get_text_type (PopplerFormField *field);
+gchar *poppler_form_field_text_get_text (PopplerFormField *field);
+void poppler_form_field_text_set_text (PopplerFormField *field,
+ const gchar *text);
+gint poppler_form_field_text_get_max_len (PopplerFormField *field);
+gboolean poppler_form_field_text_do_spell_check (PopplerFormField *field);
+gboolean poppler_form_field_text_do_scroll (PopplerFormField *field);
+gboolean poppler_form_field_text_is_rich_text (PopplerFormField *field);
+gboolean poppler_form_field_text_is_password (PopplerFormField *field);
+
+/* Choice Field */
+PopplerFormChoiceType poppler_form_field_choice_get_choice_type (PopplerFormField *field);
+gboolean poppler_form_field_choice_is_editable (PopplerFormField *field);
+gboolean poppler_form_field_choice_can_select_multiple (PopplerFormField *field);
+gboolean poppler_form_field_choice_do_spell_check (PopplerFormField *field);
+gboolean poppler_form_field_choice_commit_on_change (PopplerFormField *field);
+gint poppler_form_field_choice_get_n_items (PopplerFormField *field);
+gchar *poppler_form_field_choice_get_item (PopplerFormField *field,
+ gint index);
+gboolean poppler_form_field_choice_is_item_selected (PopplerFormField *field,
+ gint index);
+void poppler_form_field_choice_select_item (PopplerFormField *field,
+ gint index);
+void poppler_form_field_choice_unselect_all (PopplerFormField *field);
+void poppler_form_field_choice_toggle_item (PopplerFormField *field,
+ gint index);
+void poppler_form_field_choice_set_text (PopplerFormField *field,
+ const gchar *text);
+gchar *poppler_form_field_choice_get_text (PopplerFormField *field);
+
+G_END_DECLS
+
+#endif /* __POPPLER_FORM_FIELD_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.cc
new file mode 100644
index 00000000000..43aa85aa204
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.cc
@@ -0,0 +1,203 @@
+/* poppler-layer.cc: glib interface to poppler
+ *
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-layer.h"
+#include "poppler-private.h"
+
+typedef struct _PopplerLayerClass PopplerLayerClass;
+struct _PopplerLayerClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerLayer, poppler_layer, G_TYPE_OBJECT)
+
+static void
+poppler_layer_finalize (GObject *object)
+{
+ PopplerLayer *poppler_layer = POPPLER_LAYER (object);
+
+ if (poppler_layer->document)
+ {
+ g_object_unref (poppler_layer->document);
+ poppler_layer->document = NULL;
+ }
+
+ if (poppler_layer->title)
+ {
+ g_free (poppler_layer->title);
+ poppler_layer->title = NULL;
+ }
+ poppler_layer->layer = NULL;
+ poppler_layer->rbgroup = NULL;
+
+ G_OBJECT_CLASS (poppler_layer_parent_class)->finalize (object);
+}
+
+static void
+poppler_layer_init (PopplerLayer *layer)
+{
+}
+
+static void
+poppler_layer_class_init (PopplerLayerClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = poppler_layer_finalize;
+}
+
+PopplerLayer *
+_poppler_layer_new (PopplerDocument *document,
+ Layer *layer,
+ GList *rbgroup)
+{
+ PopplerLayer *poppler_layer;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (layer != NULL, NULL);
+
+ poppler_layer = POPPLER_LAYER (g_object_new (POPPLER_TYPE_LAYER, NULL));
+
+ poppler_layer->document = (PopplerDocument *)g_object_ref (document);
+ poppler_layer->layer = layer;
+ poppler_layer->rbgroup = rbgroup;
+ poppler_layer->title = _poppler_goo_string_to_utf8 (layer->oc->getName ());
+
+ return poppler_layer;
+}
+
+/**
+ * poppler_layer_get_title
+ * @layer: a #PopplerLayer
+ *
+ * Returns the name of the layer suitable for
+ * presentation as a title in a viewer's GUI
+ *
+ * Return value: a string containing the title of the layer
+ **/
+const gchar *
+poppler_layer_get_title (PopplerLayer *poppler_layer)
+{
+ g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), NULL);
+
+ return poppler_layer->title;
+}
+
+/**
+ * poppler_layer_is_visible
+ * @layer: a #PopplerLayer
+ *
+ * Returns whether @layer is visible
+ *
+ * Return value: %TRUE if @layer is visible
+ **/
+gboolean
+poppler_layer_is_visible (PopplerLayer *poppler_layer)
+{
+ g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), FALSE);
+
+ return poppler_layer->layer->oc->getState () == OptionalContentGroup::On;
+}
+
+/**
+ * poppler_layer_show
+ * @layer: a #PopplerLayer
+ *
+ * Shows @layer
+ **/
+void
+poppler_layer_show (PopplerLayer *poppler_layer)
+{
+ GList *l;
+ Layer *layer;
+
+ g_return_if_fail (POPPLER_IS_LAYER (poppler_layer));
+
+ layer = poppler_layer->layer;
+
+ if (layer->oc->getState () == OptionalContentGroup::On)
+ return;
+
+ layer->oc->setState (OptionalContentGroup::On);
+
+ for (l = poppler_layer->rbgroup; l && l->data; l = g_list_next (l)) {
+ OptionalContentGroup *oc = (OptionalContentGroup *)l->data;
+
+ if (oc != layer->oc)
+ oc->setState (OptionalContentGroup::Off);
+ }
+}
+
+/**
+ * poppler_layer_hide
+ * @layer: a #PopplerLayer
+ *
+ * Hides @layer. If @layer is the parent of other nested layers,
+ * such layers will be also hidden and will be blocked until @layer
+ * is shown again
+ **/
+void
+poppler_layer_hide (PopplerLayer *poppler_layer)
+{
+ Layer *layer;
+
+ g_return_if_fail (POPPLER_IS_LAYER (poppler_layer));
+
+ layer = poppler_layer->layer;
+
+ if (layer->oc->getState () == OptionalContentGroup::Off)
+ return;
+
+ layer->oc->setState (OptionalContentGroup::Off);
+}
+
+
+/**
+ * poppler_layer_is_parent
+ * @layer: a #PopplerLayer
+ *
+ * Returns whether @layer is parent of other nested layers.
+ *
+ * Return value: %TRUE if @layer is a parent layer
+ **/
+gboolean
+poppler_layer_is_parent (PopplerLayer *poppler_layer)
+{
+ g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), FALSE);
+
+ return poppler_layer->layer->kids != NULL;
+}
+
+/**
+ * poppler_layer_get_radio_button_group_id
+ * @layer: a #PopplerLayer
+ *
+ * Returns the numeric ID the radio button group associated with @layer.
+ *
+ * Return value: the ID of the radio button group associated with @layer,
+ * or 0 if the layer is not associated to any radio button group
+ **/
+gint
+poppler_layer_get_radio_button_group_id (PopplerLayer *poppler_layer)
+{
+ g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), FALSE);
+
+ return GPOINTER_TO_INT (poppler_layer->rbgroup);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.h
new file mode 100644
index 00000000000..2434e275888
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-layer.h
@@ -0,0 +1,43 @@
+/* poppler-layer.h: glib interface to poppler
+ *
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_LAYER_H__
+#define __POPPLER_LAYER_H__
+
+#include <glib-object.h>
+#include "poppler.h"
+
+G_BEGIN_DECLS
+
+#define POPPLER_TYPE_LAYER (poppler_layer_get_type ())
+#define POPPLER_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_LAYER, PopplerLayer))
+#define POPPLER_IS_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_LAYER))
+
+GType poppler_layer_get_type (void) G_GNUC_CONST;
+
+const gchar *poppler_layer_get_title (PopplerLayer *layer);
+gboolean poppler_layer_is_visible (PopplerLayer *layer);
+void poppler_layer_show (PopplerLayer *layer);
+void poppler_layer_hide (PopplerLayer *layer);
+gboolean poppler_layer_is_parent (PopplerLayer *layer);
+gint poppler_layer_get_radio_button_group_id (PopplerLayer *layer);
+
+G_END_DECLS
+
+#endif /* __POPPLER_LAYER_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.cc
new file mode 100644
index 00000000000..3c0ead1f431
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.cc
@@ -0,0 +1,2006 @@
+/* poppler-page.cc: glib wrapper for poppler
+ * Copyright (C) 2005, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include <math.h>
+
+#include <goo/GooList.h>
+#include <splash/SplashBitmap.h>
+#include <GlobalParams.h>
+#include <PDFDoc.h>
+#include <Outline.h>
+#include <ErrorCodes.h>
+#include <UnicodeMap.h>
+#include <GfxState.h>
+#include <PageTransition.h>
+
+#include "poppler.h"
+#include "poppler-private.h"
+
+enum
+{
+ PROP_0,
+ PROP_LABEL
+};
+
+typedef struct _PopplerPageClass PopplerPageClass;
+struct _PopplerPageClass
+{
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (PopplerPage, poppler_page, G_TYPE_OBJECT)
+
+PopplerPage *
+_poppler_page_new (PopplerDocument *document, Page *page, int index)
+{
+ PopplerPage *poppler_page;
+
+ g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
+
+ poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, NULL, NULL);
+ poppler_page->document = (PopplerDocument *) g_object_ref (document);
+ poppler_page->page = page;
+ poppler_page->index = index;
+
+ return poppler_page;
+}
+
+static void
+poppler_page_finalize (GObject *object)
+{
+ PopplerPage *page = POPPLER_PAGE (object);
+
+ g_object_unref (page->document);
+ page->document = NULL;
+
+ if (page->annots != NULL)
+ delete page->annots;
+#if defined (HAVE_CAIRO)
+ if (page->text != NULL)
+ page->text->decRefCnt();
+#else
+ if (page->gfx != NULL)
+ delete page->gfx;
+ if (page->text_dev != NULL)
+ delete page->text_dev;
+#endif
+ /* page->page is owned by the document */
+}
+
+/**
+ * poppler_page_get_size:
+ * @page: A #PopplerPage
+ * @width: return location for the width of @page
+ * @height: return location for the height of @page
+ *
+ * Gets the size of @page at the current scale and rotation.
+ **/
+void
+poppler_page_get_size (PopplerPage *page,
+ double *width,
+ double *height)
+{
+ double page_width, page_height;
+ int rotate;
+
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+
+ rotate = page->page->getRotate ();
+ if (rotate == 90 || rotate == 270) {
+ page_height = page->page->getCropWidth ();
+ page_width = page->page->getCropHeight ();
+ } else {
+ page_width = page->page->getCropWidth ();
+ page_height = page->page->getCropHeight ();
+ }
+
+ if (width != NULL)
+ *width = page_width;
+ if (height != NULL)
+ *height = page_height;
+}
+
+/**
+ * poppler_page_get_index:
+ * @page: a #PopplerPage
+ *
+ * Returns the index of @page
+ *
+ * Return value: index value of @page
+ **/
+int
+poppler_page_get_index (PopplerPage *page)
+{
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), 0);
+
+ return page->index;
+}
+
+/**
+ * poppler_page_get_duration:
+ * @page: a #PopplerPage
+ *
+ * Returns the duration of @page
+ *
+ * Return value: duration in seconds of @page or -1.
+ **/
+double
+poppler_page_get_duration (PopplerPage *page)
+{
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), -1);
+
+ return page->page->getDuration ();
+}
+
+/**
+ * poppler_page_get_transition:
+ * @page: a #PopplerPage
+ *
+ * Returns the transition effect of @page
+ *
+ * Return value: a #PopplerPageTransition or NULL.
+ **/
+PopplerPageTransition *
+poppler_page_get_transition (PopplerPage *page)
+{
+ PageTransition *trans;
+ PopplerPageTransition *transition;
+ Object obj;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ trans = new PageTransition (page->page->getTrans (&obj));
+ obj.free ();
+
+ if (!trans->isOk ()) {
+ delete trans;
+ return NULL;
+ }
+
+ transition = poppler_page_transition_new ();
+
+ switch (trans->getType ())
+ {
+ case transitionReplace:
+ transition->type = POPPLER_PAGE_TRANSITION_REPLACE;
+ break;
+ case transitionSplit:
+ transition->type = POPPLER_PAGE_TRANSITION_SPLIT;
+ break;
+ case transitionBlinds:
+ transition->type = POPPLER_PAGE_TRANSITION_BLINDS;
+ break;
+ case transitionBox:
+ transition->type = POPPLER_PAGE_TRANSITION_BOX;
+ break;
+ case transitionWipe:
+ transition->type = POPPLER_PAGE_TRANSITION_WIPE;
+ break;
+ case transitionDissolve:
+ transition->type = POPPLER_PAGE_TRANSITION_DISSOLVE;
+ break;
+ case transitionGlitter:
+ transition->type = POPPLER_PAGE_TRANSITION_GLITTER;
+ break;
+ case transitionFly:
+ transition->type = POPPLER_PAGE_TRANSITION_FLY;
+ break;
+ case transitionPush:
+ transition->type = POPPLER_PAGE_TRANSITION_PUSH;
+ break;
+ case transitionCover:
+ transition->type = POPPLER_PAGE_TRANSITION_COVER;
+ break;
+ case transitionUncover:
+ transition->type = POPPLER_PAGE_TRANSITION_UNCOVER;
+ break;
+ case transitionFade:
+ transition->type = POPPLER_PAGE_TRANSITION_FADE;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ transition->alignment = (trans->getAlignment() == transitionHorizontal) ?
+ POPPLER_PAGE_TRANSITION_HORIZONTAL :
+ POPPLER_PAGE_TRANSITION_VERTICAL;
+
+ transition->direction = (trans->getDirection() == transitionInward) ?
+ POPPLER_PAGE_TRANSITION_INWARD :
+ POPPLER_PAGE_TRANSITION_OUTWARD;
+
+ transition->duration = trans->getDuration();
+ transition->angle = trans->getAngle();
+ transition->scale = trans->getScale();
+ transition->rectangular = trans->isRectangular();
+
+ delete trans;
+
+ return transition;
+}
+
+#if !defined (HAVE_CAIRO)
+static TextOutputDev *
+poppler_page_get_text_output_dev (PopplerPage *page)
+{
+ if (page->text_dev == NULL) {
+ page->text_dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse);
+
+ if (page->gfx)
+ delete page->gfx;
+ page->gfx = page->page->createGfx(page->text_dev,
+ 72.0, 72.0, 0,
+ gFalse, /* useMediaBox */
+ gTrue, /* Crop */
+ -1, -1, -1, -1,
+ gFalse, /* printing */
+ page->document->doc->getCatalog (),
+ NULL, NULL, NULL, NULL);
+
+ page->page->display(page->gfx);
+
+ page->text_dev->endPage();
+ }
+
+ return page->text_dev;
+}
+#endif /* !defined (HAVE_CAIRO) */
+
+#if defined (HAVE_CAIRO)
+
+static TextPage *
+poppler_page_get_text_page (PopplerPage *page)
+{
+ if (page->text == NULL) {
+ cairo_t *cr;
+ cairo_surface_t *surface;
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
+ cr = cairo_create (surface);
+ poppler_page_render (page, cr);
+ cairo_destroy (cr);
+ cairo_surface_destroy (surface);
+
+ }
+
+ return page->text;
+}
+
+#ifdef POPPLER_WITH_GDK
+typedef struct {
+ unsigned char *cairo_data;
+ cairo_surface_t *surface;
+ cairo_t *cairo;
+} OutputDevData;
+
+static void
+poppler_page_prepare_output_dev (PopplerPage *page,
+ double scale,
+ int rotation,
+ gboolean transparent,
+ OutputDevData *output_dev_data)
+{
+ CairoOutputDev *output_dev;
+ cairo_surface_t *surface;
+ double width, height;
+ int cairo_width, cairo_height, cairo_rowstride, rotate;
+ unsigned char *cairo_data;
+
+ rotate = rotation + page->page->getRotate ();
+ if (rotate == 90 || rotate == 270) {
+ height = page->page->getCropWidth ();
+ width = page->page->getCropHeight ();
+ } else {
+ width = page->page->getCropWidth ();
+ height = page->page->getCropHeight ();
+ }
+
+ cairo_width = (int) ceil(width * scale);
+ cairo_height = (int) ceil(height * scale);
+
+ output_dev = page->document->output_dev;
+ cairo_rowstride = cairo_width * 4;
+ cairo_data = (guchar *) gmallocn (cairo_height, cairo_rowstride);
+ if (transparent)
+ memset (cairo_data, 0x00, cairo_height * cairo_rowstride);
+ else
+ memset (cairo_data, 0xff, cairo_height * cairo_rowstride);
+
+ surface = cairo_image_surface_create_for_data(cairo_data,
+ CAIRO_FORMAT_ARGB32,
+ cairo_width, cairo_height,
+ cairo_rowstride);
+
+ output_dev_data->cairo_data = cairo_data;
+ output_dev_data->surface = surface;
+ output_dev_data->cairo = cairo_create (surface);
+ output_dev->setCairo (output_dev_data->cairo);
+}
+
+static void
+copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
+ unsigned char *data,
+ GdkPixbuf *pixbuf)
+{
+ int cairo_width, cairo_height, cairo_rowstride;
+ unsigned char *pixbuf_data, *dst, *cairo_data;
+ int pixbuf_rowstride, pixbuf_n_channels;
+ unsigned int *src;
+ int x, y;
+
+ cairo_width = cairo_image_surface_get_width (surface);
+ cairo_height = cairo_image_surface_get_height (surface);
+ cairo_rowstride = cairo_width * 4;
+ cairo_data = data;
+
+ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+
+ if (cairo_width > gdk_pixbuf_get_width (pixbuf))
+ cairo_width = gdk_pixbuf_get_width (pixbuf);
+ if (cairo_height > gdk_pixbuf_get_height (pixbuf))
+ cairo_height = gdk_pixbuf_get_height (pixbuf);
+ for (y = 0; y < cairo_height; y++)
+ {
+ src = (unsigned int *) (cairo_data + y * cairo_rowstride);
+ dst = pixbuf_data + y * pixbuf_rowstride;
+ for (x = 0; x < cairo_width; x++)
+ {
+ dst[0] = (*src >> 16) & 0xff;
+ dst[1] = (*src >> 8) & 0xff;
+ dst[2] = (*src >> 0) & 0xff;
+ if (pixbuf_n_channels == 4)
+ dst[3] = (*src >> 24) & 0xff;
+ dst += pixbuf_n_channels;
+ src++;
+ }
+ }
+}
+
+static void
+poppler_page_copy_to_pixbuf (PopplerPage *page,
+ GdkPixbuf *pixbuf,
+ OutputDevData *output_dev_data)
+{
+ copy_cairo_surface_to_pixbuf (output_dev_data->surface,
+ output_dev_data->cairo_data,
+ pixbuf);
+
+ page->document->output_dev->setCairo (NULL);
+ cairo_surface_destroy (output_dev_data->surface);
+ cairo_destroy (output_dev_data->cairo);
+ gfree (output_dev_data->cairo_data);
+}
+
+static void
+poppler_page_set_selection_alpha (PopplerPage *page,
+ double scale,
+ GdkPixbuf *pixbuf,
+ PopplerSelectionStyle style,
+ PopplerRectangle *selection)
+{
+ /* Cairo doesn't need this, since cairo generates an alpha channel. */
+}
+#endif /* POPPLER_WITH_GDK */
+
+#elif defined (HAVE_SPLASH) && defined (POPPLER_WITH_GDK)
+
+typedef struct {
+} OutputDevData;
+
+static void
+poppler_page_prepare_output_dev (PopplerPage *page,
+ double scale,
+ int rotation,
+ gboolean transparent,
+ OutputDevData *output_dev_data)
+{
+ /* pft */
+}
+
+static void
+poppler_page_copy_to_pixbuf(PopplerPage *page,
+ GdkPixbuf *pixbuf,
+ OutputDevData *data)
+{
+ SplashOutputDev *output_dev;
+ SplashBitmap *bitmap;
+ SplashColorPtr color_ptr;
+ int splash_width, splash_height, splash_rowstride;
+ int pixbuf_rowstride, pixbuf_n_channels;
+ guchar *pixbuf_data, *dst;
+ int x, y;
+
+ output_dev = page->document->output_dev;
+
+ bitmap = output_dev->getBitmap ();
+ color_ptr = bitmap->getDataPtr ();
+
+ splash_width = bitmap->getWidth ();
+ splash_height = bitmap->getHeight ();
+ splash_rowstride = bitmap->getRowSize ();
+
+ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+
+ if (splash_width > gdk_pixbuf_get_width (pixbuf))
+ splash_width = gdk_pixbuf_get_width (pixbuf);
+ if (splash_height > gdk_pixbuf_get_height (pixbuf))
+ splash_height = gdk_pixbuf_get_height (pixbuf);
+
+ SplashColorPtr pixel = new Guchar[4];
+ for (y = 0; y < splash_height; y++)
+ {
+ dst = pixbuf_data + y * pixbuf_rowstride;
+ for (x = 0; x < splash_width; x++)
+ {
+ output_dev->getBitmap()->getPixel(x, y, pixel);
+ dst[0] = pixel[0];
+ dst[1] = pixel[1];
+ dst[2] = pixel[2];
+ if (pixbuf_n_channels == 4)
+ dst[3] = 0xff;
+ dst += pixbuf_n_channels;
+ }
+ }
+ delete [] pixel;
+}
+
+static void
+poppler_page_set_selection_alpha (PopplerPage *page,
+ double scale,
+ GdkPixbuf *pixbuf,
+ PopplerSelectionStyle style,
+ PopplerRectangle *selection)
+{
+ GList *region, *l;
+ gint x, y, width, height;
+ int pixbuf_rowstride, pixbuf_n_channels;
+ guchar *pixbuf_data, *dst;
+
+ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
+
+ if (pixbuf_n_channels != 4)
+ return;
+
+ for (y = 0; y < height; y++) {
+ dst = pixbuf_data + y * pixbuf_rowstride;
+ for (x = 0; x < width; x++) {
+ dst[3] = 0x00;
+ dst += pixbuf_n_channels;
+ }
+ }
+
+ region = poppler_page_get_selection_region (page, scale, style, selection);
+
+ for (l = region; l; l = g_list_next (l)) {
+ PopplerRectangle *rectangle = (PopplerRectangle *)l->data;
+ GdkRectangle rect;
+
+ rect.x = (gint)rectangle->x1;
+ rect.y = (gint)rectangle->y1;
+ rect.width = (gint) (rectangle->x2 - rectangle->x1);
+ rect.height = (gint) (rectangle->y2 - rectangle->y1);
+
+ for (y = 0; y < rect.height; y++) {
+ dst = pixbuf_data + (rect.y + y) * pixbuf_rowstride +
+ rect.x * pixbuf_n_channels;
+ for (x = 0; x < rect.width; x++) {
+ dst[3] = 0xff;
+ dst += pixbuf_n_channels;
+ }
+ }
+ }
+
+ poppler_page_selection_region_free (region);
+}
+
+#endif /* HAVE_SPLASH */
+
+static GBool
+poppler_print_annot_cb (Annot *annot, void *user_data)
+{
+ if (annot->getFlags () & Annot::flagPrint)
+ return gTrue;
+ return (annot->getType() == Annot::typeWidget);
+}
+
+#if defined (HAVE_CAIRO)
+
+static void
+_poppler_page_render (PopplerPage *page,
+ cairo_t *cairo,
+ GBool printing)
+{
+ CairoOutputDev *output_dev;
+
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+
+ output_dev = page->document->output_dev;
+ output_dev->setCairo (cairo);
+ output_dev->setPrinting (printing);
+
+ if (!printing)
+ output_dev->setTextPage (page->text);
+
+ /* NOTE: instead of passing -1 we should/could use cairo_clip_extents()
+ * to get a bounding box */
+ cairo_save (cairo);
+ page->page->displaySlice(output_dev,
+ 72.0, 72.0, 0,
+ gFalse, /* useMediaBox */
+ gTrue, /* Crop */
+ -1, -1,
+ -1, -1,
+ printing,
+ page->document->doc->getCatalog (),
+ NULL, NULL,
+ printing ? poppler_print_annot_cb : NULL, NULL);
+ cairo_restore (cairo);
+
+ output_dev->setCairo (NULL);
+ output_dev->setTextPage (NULL);
+}
+
+/**
+ * poppler_page_render:
+ * @page: the page to render from
+ * @cairo: cairo context to render to
+ *
+ * Render the page to the given cairo context. This function
+ * is for rendering a page that will be displayed. If you want
+ * to render a page that will be printed use
+ * poppler_page_render_for_printing() instead
+ **/
+void
+poppler_page_render (PopplerPage *page,
+ cairo_t *cairo)
+{
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+
+ if (!page->text)
+ page->text = new TextPage(gFalse);
+
+ _poppler_page_render (page, cairo, gFalse);
+}
+
+/**
+ * poppler_page_render_for_printing:
+ * @page: the page to render from
+ * @cairo: cairo context to render to
+ *
+ * Render the page to the given cairo context for printing.
+ **/
+void
+poppler_page_render_for_printing (PopplerPage *page,
+ cairo_t *cairo)
+{
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+
+ _poppler_page_render (page, cairo, gTrue);
+}
+
+static cairo_surface_t *
+create_surface_from_thumbnail_data (guchar *data,
+ gint width,
+ gint height,
+ gint rowstride)
+{
+ guchar *cairo_pixels;
+ gint cairo_stride;
+ cairo_surface_t *surface;
+ int j;
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+ if (cairo_surface_status (surface))
+ return NULL;
+
+ cairo_pixels = cairo_image_surface_get_data (surface);
+ cairo_stride = cairo_image_surface_get_stride (surface);
+
+ for (j = height; j; j--) {
+ guchar *p = data;
+ guchar *q = cairo_pixels;
+ guchar *end = p + 3 * width;
+
+ while (p < end) {
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ q[0] = p[2];
+ q[1] = p[1];
+ q[2] = p[0];
+#else
+ q[1] = p[0];
+ q[2] = p[1];
+ q[3] = p[2];
+#endif
+ p += 3;
+ q += 4;
+ }
+
+ data += rowstride;
+ cairo_pixels += cairo_stride;
+ }
+
+ return surface;
+}
+
+
+/**
+ * poppler_page_get_thumbnail:
+ * @page: the #PopperPage to get the thumbnail for
+ *
+ * Get the embedded thumbnail for the specified page. If the document
+ * doesn't have an embedded thumbnail for the page, this function
+ * returns %NULL.
+ *
+ * Return value: the tumbnail as a cairo_surface_t or %NULL if the document
+ * doesn't have a thumbnail for this page.
+ **/
+cairo_surface_t *
+poppler_page_get_thumbnail (PopplerPage *page)
+{
+ unsigned char *data;
+ int width, height, rowstride;
+ cairo_surface_t *surface;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
+
+ if (!page->page->loadThumb (&data, &width, &height, &rowstride))
+ return NULL;
+
+ surface = create_surface_from_thumbnail_data (data, width, height, rowstride);
+ gfree (data);
+
+ return surface;
+}
+
+/**
+ * poppler_page_render_selection:
+ * @page: the #PopplerPage for which to render selection
+ * @cairo: cairo context to render to
+ * @selection: start and end point of selection as a rectangle
+ * @old_selection: previous selection
+ * @style: a #PopplerSelectionStyle
+ * @glyph_color: color to use for drawing glyphs
+ * @background_color: color to use for the selection background
+ *
+ * Render the selection specified by @selection for @page to
+ * the given cairo context. The selection will be rendered, using
+ * @glyph_color for the glyphs and @background_color for the selection
+ * background.
+ *
+ * If non-NULL, @old_selection specifies the selection that is already
+ * rendered to @cairo, in which case this function will (some day)
+ * only render the changed part of the selection.
+ **/
+void
+poppler_page_render_selection (PopplerPage *page,
+ cairo_t *cairo,
+ PopplerRectangle *selection,
+ PopplerRectangle *old_selection,
+ PopplerSelectionStyle style,
+ PopplerColor *glyph_color,
+ PopplerColor *background_color)
+{
+ CairoOutputDev *output_dev;
+ TextPage *text;
+ SelectionStyle selection_style = selectionStyleGlyph;
+ PDFRectangle pdf_selection(selection->x1, selection->y1,
+ selection->x2, selection->y2);
+
+ GfxColor gfx_background_color = {
+ {
+ background_color->red,
+ background_color->green,
+ background_color->blue
+ }
+ };
+ GfxColor gfx_glyph_color = {
+ {
+ glyph_color->red,
+ glyph_color->green,
+ glyph_color->blue
+ }
+ };
+
+ switch (style)
+ {
+ case POPPLER_SELECTION_GLYPH:
+ selection_style = selectionStyleGlyph;
+ break;
+ case POPPLER_SELECTION_WORD:
+ selection_style = selectionStyleWord;
+ break;
+ case POPPLER_SELECTION_LINE:
+ selection_style = selectionStyleLine;
+ break;
+ }
+
+ output_dev = page->document->output_dev;
+ output_dev->setCairo (cairo);
+
+ text = poppler_page_get_text_page (page);
+ text->drawSelection (output_dev, 1.0, 0,
+ &pdf_selection, selection_style,
+ &gfx_glyph_color, &gfx_background_color);
+
+ output_dev->setCairo (NULL);
+}
+
+#endif /* HAVE_CAIRO */
+
+#ifdef POPPLER_WITH_GDK
+static void
+_poppler_page_render_to_pixbuf (PopplerPage *page,
+ int src_x, int src_y,
+ int src_width, int src_height,
+ double scale,
+ int rotation,
+ GBool printing,
+ GdkPixbuf *pixbuf)
+{
+ OutputDevData data;
+
+ poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data);
+
+ page->page->displaySlice(page->document->output_dev,
+ 72.0 * scale, 72.0 * scale,
+ rotation,
+ gFalse, /* useMediaBox */
+ gTrue, /* Crop */
+ src_x, src_y,
+ src_width, src_height,
+ printing,
+ page->document->doc->getCatalog (),
+ NULL, NULL,
+ printing ? poppler_print_annot_cb : NULL, NULL);
+
+ poppler_page_copy_to_pixbuf (page, pixbuf, &data);
+}
+
+/**
+ * poppler_page_render_to_pixbuf:
+ * @page: the page to render from
+ * @src_x: x coordinate of upper left corner
+ * @src_y: y coordinate of upper left corner
+ * @src_width: width of rectangle to render
+ * @src_height: height of rectangle to render
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render into
+ *
+ * First scale the document to match the specified pixels per point,
+ * then render the rectangle given by the upper left corner at
+ * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be displayed.
+ * If you want to render a page that will be printed use
+ * poppler_page_render_to_pixbuf_for_printing() instead
+ **/
+void
+poppler_page_render_to_pixbuf (PopplerPage *page,
+ int src_x, int src_y,
+ int src_width, int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf)
+{
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+ g_return_if_fail (scale > 0.0);
+ g_return_if_fail (pixbuf != NULL);
+
+ _poppler_page_render_to_pixbuf (page, src_x, src_y,
+ src_width, src_height,
+ scale, rotation,
+ gFalse,
+ pixbuf);
+}
+
+/**
+ * poppler_page_render_to_pixbuf_for_printing:
+ * @page: the page to render from
+ * @src_x: x coordinate of upper left corner
+ * @src_y: y coordinate of upper left corner
+ * @src_width: width of rectangle to render
+ * @src_height: height of rectangle to render
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render into
+ *
+ * First scale the document to match the specified pixels per point,
+ * then render the rectangle given by the upper left corner at
+ * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be printed.
+ **/
+void
+poppler_page_render_to_pixbuf_for_printing (PopplerPage *page,
+ int src_x, int src_y,
+ int src_width, int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf)
+{
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+ g_return_if_fail (scale > 0.0);
+ g_return_if_fail (pixbuf != NULL);
+
+ _poppler_page_render_to_pixbuf (page, src_x, src_y,
+ src_width, src_height,
+ scale, rotation,
+ gTrue,
+ pixbuf);
+}
+
+/**
+ * poppler_page_get_thumbnail_pixbuf:
+ * @page: the #PopperPage to get the thumbnail for
+ *
+ * Get the embedded thumbnail for the specified page. If the document
+ * doesn't have an embedded thumbnail for the page, this function
+ * returns %NULL.
+ *
+ * Return value: the tumbnail as a #GdkPixbuf or %NULL if the document
+ * doesn't have a thumbnail for this page.
+ **/
+GdkPixbuf *
+poppler_page_get_thumbnail_pixbuf (PopplerPage *page)
+{
+ unsigned char *data;
+ int width, height, rowstride;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
+
+ if (!page->page->loadThumb (&data, &width, &height, &rowstride))
+ return NULL;
+
+ return gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB,
+ FALSE, 8, width, height, rowstride,
+ (GdkPixbufDestroyNotify)gfree, NULL);
+}
+
+/**
+ * poppler_page_render_selection_to_pixbuf:
+ * @page: the #PopplerPage for which to render selection
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render to
+ * @selection: start and end point of selection as a rectangle
+ * @old_selection: previous selection
+ * @style: a #PopplerSelectionStyle
+ * @glyph_color: color to use for drawing glyphs
+ * @background_color: color to use for the selection background
+ *
+ * Render the selection specified by @selection for @page into
+ * @pixbuf. The selection will be rendered at @scale, using
+ * @glyph_color for the glyphs and @background_color for the selection
+ * background.
+ *
+ * If non-NULL, @old_selection specifies the selection that is already
+ * rendered in @pixbuf, in which case this function will (some day)
+ * only render the changed part of the selection.
+ **/
+void
+poppler_page_render_selection_to_pixbuf (PopplerPage *page,
+ gdouble scale,
+ int rotation,
+ GdkPixbuf *pixbuf,
+ PopplerRectangle *selection,
+ PopplerRectangle *old_selection,
+ PopplerSelectionStyle style,
+ GdkColor *glyph_color,
+ GdkColor *background_color)
+{
+ OutputDev *output_dev;
+ OutputDevData data;
+ SelectionStyle selection_style = selectionStyleGlyph;
+ PDFRectangle pdf_selection(selection->x1, selection->y1,
+ selection->x2, selection->y2);
+
+ GfxColor gfx_background_color = {
+ {
+ background_color->red,
+ background_color->green,
+ background_color->blue
+ }
+ };
+ GfxColor gfx_glyph_color = {
+ {
+ glyph_color->red,
+ glyph_color->green,
+ glyph_color->blue
+ }
+ };
+
+ switch (style)
+ {
+ case POPPLER_SELECTION_GLYPH:
+ selection_style = selectionStyleGlyph;
+ break;
+ case POPPLER_SELECTION_WORD:
+ selection_style = selectionStyleWord;
+ break;
+ case POPPLER_SELECTION_LINE:
+ selection_style = selectionStyleLine;
+ break;
+ }
+
+ output_dev = page->document->output_dev;
+
+ poppler_page_prepare_output_dev (page, scale, rotation, TRUE, &data);
+
+#if defined (HAVE_CAIRO)
+ TextPage *text;
+
+ text = poppler_page_get_text_page (page);
+ text->drawSelection (output_dev, scale, rotation,
+ &pdf_selection, selection_style,
+ &gfx_glyph_color, &gfx_background_color);
+#else
+ TextOutputDev *text_dev;
+
+ text_dev = poppler_page_get_text_output_dev (page);
+ text_dev->drawSelection (output_dev, scale, rotation,
+ &pdf_selection, selection_style,
+ &gfx_glyph_color, &gfx_background_color);
+ /* We'll need a function to destroy page->text_dev and page->gfx
+ * when the application wants to get rid of them.
+ *
+ * Two improvements: 1) make GfxFont refcounted and let TextPage and
+ * friends hold a reference to the GfxFonts they need so we can free
+ * up Gfx early. 2) use a TextPage directly when rendering the page
+ * so we don't have to use TextOutputDev and render a second
+ * time. */
+#endif
+
+ poppler_page_copy_to_pixbuf (page, pixbuf, &data);
+
+ poppler_page_set_selection_alpha (page, scale, pixbuf, style, selection);
+}
+
+#endif /* POPPLER_WITH_GDK */
+
+/**
+ * poppler_page_get_thumbnail_size:
+ * @page: A #PopplerPage
+ * @width: return location for width
+ * @height: return location for height
+ *
+ * Returns %TRUE if @page has a thumbnail associated with it. It also
+ * fills in @width and @height with the width and height of the
+ * thumbnail. The values of width and height are not changed if no
+ * appropriate thumbnail exists.
+ *
+ * Return value: %TRUE, if @page has a thumbnail associated with it.
+ **/
+gboolean
+poppler_page_get_thumbnail_size (PopplerPage *page,
+ int *width,
+ int *height)
+{
+ Object thumb;
+ Dict *dict;
+ gboolean retval = FALSE;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
+ g_return_val_if_fail (width != NULL, FALSE);
+ g_return_val_if_fail (height != NULL, FALSE);
+
+ page->page->getThumb (&thumb);
+ if (!thumb.isStream ())
+ {
+ thumb.free ();
+ return FALSE;
+ }
+
+ dict = thumb.streamGetDict();
+
+ /* Theoretically, this could succeed and you would still fail when
+ * loading the thumb */
+ if (dict->lookupInt ("Width", "W", width) &&
+ dict->lookupInt ("Height", "H", height))
+ retval = TRUE;
+
+ thumb.free ();
+
+ return retval;
+}
+
+/**
+ * poppler_page_get_selection_region:
+ * @page: a #PopplerPage
+ * @scale: scale specified as pixels per point
+ * @style: a #PopplerSelectionStyle
+ * @selection: start and end point of selection as a rectangle
+ *
+ * Returns a region containing the area that would be rendered by
+ * poppler_page_render_selection() or
+ * poppler_page_render_selection_to_pixbuf() as a #GList of
+ * #PopplerRectangle. The returned list must be freed with
+ * poppler_page_selection_region_free().
+ *
+ * Return value: a #GList of #PopplerRectangle
+ **/
+GList *
+poppler_page_get_selection_region (PopplerPage *page,
+ gdouble scale,
+ PopplerSelectionStyle style,
+ PopplerRectangle *selection)
+{
+ PDFRectangle poppler_selection;
+ SelectionStyle selection_style = selectionStyleGlyph;
+ GooList *list;
+ GList *region = NULL;
+ int i;
+
+ poppler_selection.x1 = selection->x1;
+ poppler_selection.y1 = selection->y1;
+ poppler_selection.x2 = selection->x2;
+ poppler_selection.y2 = selection->y2;
+
+ switch (style)
+ {
+ case POPPLER_SELECTION_GLYPH:
+ selection_style = selectionStyleGlyph;
+ break;
+ case POPPLER_SELECTION_WORD:
+ selection_style = selectionStyleWord;
+ break;
+ case POPPLER_SELECTION_LINE:
+ selection_style = selectionStyleLine;
+ break;
+ }
+
+#if defined (HAVE_CAIRO)
+ TextPage *text;
+
+ text = poppler_page_get_text_page (page);
+ list = text->getSelectionRegion(&poppler_selection,
+ selection_style, scale);
+#else
+ TextOutputDev *text_dev;
+
+ text_dev = poppler_page_get_text_output_dev (page);
+ list = text_dev->getSelectionRegion(&poppler_selection,
+ selection_style, scale);
+#endif
+
+ for (i = 0; i < list->getLength(); i++) {
+ PDFRectangle *selection_rect = (PDFRectangle *) list->get(i);
+ PopplerRectangle *rect;
+
+ rect = poppler_rectangle_new ();
+
+ rect->x1 = selection_rect->x1;
+ rect->y1 = selection_rect->y1;
+ rect->x2 = selection_rect->x2;
+ rect->y2 = selection_rect->y2;
+
+ region = g_list_prepend (region, rect);
+
+ delete selection_rect;
+ }
+
+ delete list;
+
+ return g_list_reverse (region);
+}
+
+void
+poppler_page_selection_region_free (GList *region)
+{
+ if (!region)
+ return;
+
+ g_list_foreach (region, (GFunc)poppler_rectangle_free, NULL);
+ g_list_free (region);
+}
+
+/**
+ * poppler_page_get_text:
+ * @page: a #PopplerPage
+ * @style: a #PopplerSelectionStyle
+ * @selection: the #PopplerRectangle including the text
+ *
+ * Retrieves the contents of the specified @selection as text.
+ *
+ * Return value: a pointer to the contents of the @selection
+ * as a string
+ **/
+char *
+poppler_page_get_text (PopplerPage *page,
+ PopplerSelectionStyle style,
+ PopplerRectangle *selection)
+{
+ GooString *sel_text;
+ double height;
+ char *result;
+ SelectionStyle selection_style = selectionStyleGlyph;
+ PDFRectangle pdf_selection;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
+ g_return_val_if_fail (selection != NULL, NULL);
+
+ poppler_page_get_size (page, NULL, &height);
+ pdf_selection.x1 = selection->x1;
+ pdf_selection.y1 = height - selection->y2;
+ pdf_selection.x2 = selection->x2;
+ pdf_selection.y2 = height - selection->y1;
+
+ switch (style)
+ {
+ case POPPLER_SELECTION_GLYPH:
+ selection_style = selectionStyleGlyph;
+ break;
+ case POPPLER_SELECTION_WORD:
+ selection_style = selectionStyleWord;
+ break;
+ case POPPLER_SELECTION_LINE:
+ selection_style = selectionStyleLine;
+ break;
+ }
+
+#if defined (HAVE_CAIRO)
+ TextPage *text;
+
+ text = poppler_page_get_text_page (page);
+ sel_text = text->getSelectionText (&pdf_selection, selection_style);
+#else
+ TextOutputDev *text_dev;
+
+ text_dev = poppler_page_get_text_output_dev (page);
+ sel_text = text_dev->getSelectionText (&pdf_selection, selection_style);
+#endif
+
+ result = g_strdup (sel_text->getCString ());
+ delete sel_text;
+
+ return result;
+}
+
+/**
+ * poppler_page_find_text:
+ * @page: a #PopplerPage
+ * @text: the text to search for (UTF-8 encoded)
+ *
+ * A #GList of rectangles for each occurance of the text on the page.
+ * The coordinates are in PDF points.
+ *
+ * Return value: a #GList of PopplerRectangle,
+ **/
+GList *
+poppler_page_find_text (PopplerPage *page,
+ const char *text)
+{
+ PopplerRectangle *match;
+ GList *matches;
+ double xMin, yMin, xMax, yMax;
+ gunichar *ucs4;
+ glong ucs4_len;
+ double height;
+#if defined (HAVE_CAIRO)
+ TextPage *text_dev;
+#else
+ TextOutputDev *text_dev;
+#endif
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
+ g_return_val_if_fail (text != NULL, FALSE);
+
+#if defined (HAVE_CAIRO)
+ text_dev = poppler_page_get_text_page (page);
+#else
+ text_dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse);
+ page->page->display (text_dev, 72, 72, 0,
+ gFalse, gTrue, gFalse,
+ page->document->doc->getCatalog());
+#endif
+
+ ucs4 = g_utf8_to_ucs4_fast (text, -1, &ucs4_len);
+ poppler_page_get_size (page, NULL, &height);
+
+ matches = NULL;
+ xMin = 0;
+ yMin = 0;
+
+ while (text_dev->findText (ucs4, ucs4_len,
+ gFalse, gTrue, // startAtTop, stopAtBottom
+ gTrue, gFalse, // startAtLast, stopAtLast
+ gFalse, gFalse, // caseSensitive, backwards
+ &xMin, &yMin, &xMax, &yMax))
+ {
+ match = g_new (PopplerRectangle, 1);
+ match->x1 = xMin;
+ match->y1 = height - yMax;
+ match->x2 = xMax;
+ match->y2 = height - yMin;
+ matches = g_list_prepend (matches, match);
+ }
+
+#if !defined (HAVE_CAIRO)
+ delete text_dev;
+#endif
+
+ g_free (ucs4);
+
+ return g_list_reverse (matches);
+}
+
+#if defined (HAVE_CAIRO)
+
+static CairoImageOutputDev *
+poppler_page_get_image_output_dev (PopplerPage *page,
+ GBool (*imgDrawDeviceCbk)(int img_id, void *data),
+ void *imgDrawCbkData)
+{
+ CairoImageOutputDev *image_dev;
+ Gfx *gfx;
+
+ image_dev = new CairoImageOutputDev ();
+
+ if (imgDrawDeviceCbk) {
+ image_dev->setImageDrawDecideCbk (imgDrawDeviceCbk,
+ imgDrawCbkData);
+ }
+
+ gfx = page->page->createGfx(image_dev,
+ 72.0, 72.0, 0,
+ gFalse, /* useMediaBox */
+ gTrue, /* Crop */
+ -1, -1, -1, -1,
+ gFalse, /* printing */
+ page->document->doc->getCatalog (),
+ NULL, NULL, NULL, NULL);
+ page->page->display(gfx);
+ delete gfx;
+
+ return image_dev;
+}
+
+/**
+ * poppler_page_get_image_mapping:
+ * @page: A #PopplerPage
+ *
+ * Returns a list of #PopplerImageMapping items that map from a
+ * location on @page to an image of the page. This list must be freed
+ * with poppler_page_free_image_mapping() when done.
+ *
+ * Return value: A #GList of #PopplerImageMapping
+ **/
+GList *
+poppler_page_get_image_mapping (PopplerPage *page)
+{
+ GList *map_list = NULL;
+ CairoImageOutputDev *out;
+ gint i;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ out = poppler_page_get_image_output_dev (page, NULL, NULL);
+
+ for (i = 0; i < out->getNumImages (); i++) {
+ PopplerImageMapping *mapping;
+ CairoImage *image;
+
+ image = out->getImage (i);
+
+ /* Create the mapping */
+ mapping = g_new (PopplerImageMapping, 1);
+
+ image->getRect (&(mapping->area.x1), &(mapping->area.y1),
+ &(mapping->area.x2), &(mapping->area.y2));
+ mapping->image_id = i;
+
+ mapping->area.x1 -= page->page->getCropBox()->x1;
+ mapping->area.x2 -= page->page->getCropBox()->x1;
+ mapping->area.y1 -= page->page->getCropBox()->y1;
+ mapping->area.y2 -= page->page->getCropBox()->y1;
+
+ map_list = g_list_prepend (map_list, mapping);
+ }
+
+ delete out;
+
+ return map_list;
+}
+
+static GBool
+image_draw_decide_cb (int image_id, void *data)
+{
+ return (image_id == GPOINTER_TO_INT (data));
+}
+
+/**
+ * poppler_page_get_image:
+ * @page: A #PopplerPage
+ * @image_id: The image identificator
+ *
+ * Returns a cairo surface for the image of the @page
+ *
+ * Return value: A cairo surface for the image
+ **/
+cairo_surface_t *
+poppler_page_get_image (PopplerPage *page,
+ gint image_id)
+{
+ CairoImageOutputDev *out;
+ cairo_surface_t *image;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ out = poppler_page_get_image_output_dev (page,
+ image_draw_decide_cb,
+ GINT_TO_POINTER (image_id));
+
+ if (image_id >= out->getNumImages ()) {
+ delete out;
+
+ return NULL;
+ }
+
+ image = out->getImage (image_id)->getImage ();
+ if (!image) {
+ delete out;
+
+ return NULL;
+ }
+
+ cairo_surface_reference (image);
+ delete out;
+
+ return image;
+}
+
+/**
+ * poppler_page_free_image_mapping:
+ * @list: A list of #PopplerImageMapping<!-- -->s
+ *
+ * Frees a list of #PopplerImageMapping<!-- -->s allocated by
+ * poppler_page_get_image_mapping().
+ **/
+void
+poppler_page_free_image_mapping (GList *list)
+{
+ if (list == NULL)
+ return;
+
+ g_list_foreach (list, (GFunc)g_free, NULL);
+ g_list_free (list);
+}
+
+#else /* HAVE_CAIRO */
+
+GList *
+poppler_page_get_image_mapping (PopplerPage *page)
+{
+ return NULL;
+}
+
+void
+poppler_page_free_image_mapping (GList *list)
+{
+}
+
+#endif /* HAVE_CAIRO */
+
+/**
+ * poppler_page_render_to_ps:
+ * @page: a #PopplerPage
+ * @ps_file: the PopplerPSFile to render to
+ *
+ * Render the page on a postscript file
+ *
+ **/
+void
+poppler_page_render_to_ps (PopplerPage *page,
+ PopplerPSFile *ps_file)
+{
+ g_return_if_fail (POPPLER_IS_PAGE (page));
+ g_return_if_fail (ps_file != NULL);
+
+ if (!ps_file->out)
+ ps_file->out = new PSOutputDev (ps_file->filename,
+ ps_file->document->doc->getXRef(),
+ ps_file->document->doc->getCatalog(),
+ NULL,
+ ps_file->first_page, ps_file->last_page,
+ psModePS, (int)ps_file->paper_width,
+ (int)ps_file->paper_height, ps_file->duplex,
+ 0, 0, 0, 0, gFalse, gFalse);
+
+
+ ps_file->document->doc->displayPage (ps_file->out, page->index + 1, 72.0, 72.0,
+ 0, gFalse, gTrue, gFalse);
+}
+
+static void
+poppler_page_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ PopplerPage *page = POPPLER_PAGE (object);
+ GooString label;
+
+ switch (prop_id)
+ {
+ case PROP_LABEL:
+ page->document->doc->getCatalog ()->indexToLabel (page->index, &label);
+ g_value_take_string (value, _poppler_goo_string_to_utf8(&label));
+ break;
+ }
+}
+
+static void
+poppler_page_class_init (PopplerPageClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GParamSpec *pspec;
+
+ gobject_class->finalize = poppler_page_finalize;
+ gobject_class->get_property = poppler_page_get_property;
+
+ pspec = g_param_spec_string ("label",
+ "Page Label",
+ "The label of the page",
+ NULL,
+ G_PARAM_READABLE);
+ g_object_class_install_property (G_OBJECT_CLASS (klass),
+ PROP_LABEL,
+ pspec);
+}
+
+static void
+poppler_page_init (PopplerPage *page)
+{
+}
+
+/**
+ * poppler_page_get_link_mapping:
+ * @page: A #PopplerPage
+ *
+ * Returns a list of #PopplerLinkMapping items that map from a
+ * location on @page to a #PopplerAction. This list must be freed
+ * with poppler_page_free_link_mapping() when done.
+ *
+ * Return value: A #GList of #PopplerLinkMapping
+ **/
+GList *
+poppler_page_get_link_mapping (PopplerPage *page)
+{
+ GList *map_list = NULL;
+ gint i;
+ Links *links;
+ Object obj;
+ double width, height;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ links = new Links (page->page->getAnnots (&obj),
+ page->document->doc->getCatalog ()->getBaseURI ());
+ obj.free ();
+
+ if (links == NULL)
+ return NULL;
+
+ poppler_page_get_size (page, &width, &height);
+
+ for (i = 0; i < links->getNumLinks (); i++)
+ {
+ PopplerLinkMapping *mapping;
+ PopplerRectangle rect;
+ LinkAction *link_action;
+ Link *link;
+
+ link = links->getLink (i);
+ link_action = link->getAction ();
+
+ /* Create the mapping */
+ mapping = g_new (PopplerLinkMapping, 1);
+ mapping->action = _poppler_action_new (page->document, link_action, NULL);
+
+ link->getRect (&rect.x1, &rect.y1, &rect.x2, &rect.y2);
+
+ switch (page->page->getRotate ())
+ {
+ case 90:
+ mapping->area.x1 = rect.y1;
+ mapping->area.y1 = height - rect.x2;
+ mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
+ mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
+
+ break;
+ case 180:
+ mapping->area.x1 = width - rect.x2;
+ mapping->area.y1 = height - rect.y2;
+ mapping->area.x2 = mapping->area.x1 + (rect.x2 - rect.x1);
+ mapping->area.y2 = mapping->area.y1 + (rect.y2 - rect.y1);
+
+ break;
+ case 270:
+ mapping->area.x1 = width - rect.y2;
+ mapping->area.y1 = rect.x1;
+ mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
+ mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
+
+ break;
+ default:
+ mapping->area.x1 = rect.x1;
+ mapping->area.y1 = rect.y1;
+ mapping->area.x2 = rect.x2;
+ mapping->area.y2 = rect.y2;
+ }
+
+ mapping->area.x1 -= page->page->getCropBox()->x1;
+ mapping->area.x2 -= page->page->getCropBox()->x1;
+ mapping->area.y1 -= page->page->getCropBox()->y1;
+ mapping->area.y2 -= page->page->getCropBox()->y1;
+
+ map_list = g_list_prepend (map_list, mapping);
+ }
+
+ delete links;
+
+ return map_list;
+}
+
+static void
+poppler_mapping_free (PopplerLinkMapping *mapping)
+{
+ poppler_action_free (mapping->action);
+ g_free (mapping);
+}
+
+/**
+ * poppler_page_free_link_mapping:
+ * @list: A list of #PopplerLinkMapping<!-- -->s
+ *
+ * Frees a list of #PopplerLinkMapping<!-- -->s allocated by
+ * poppler_page_get_link_mapping(). It also frees the #PopplerAction<!-- -->s
+ * that each mapping contains, so if you want to keep them around, you need to
+ * copy them with poppler_action_copy().
+ **/
+void
+poppler_page_free_link_mapping (GList *list)
+{
+ if (list == NULL)
+ return;
+
+ g_list_foreach (list, (GFunc) (poppler_mapping_free), NULL);
+ g_list_free (list);
+}
+
+/**
+ * poppler_page_get_form_field_mapping:
+ * @page: A #PopplerPage
+ *
+ * Returns a list of #PopplerFormFieldMapping items that map from a
+ * location on @page to a form field. This list must be freed
+ * with poppler_page_free_form_field_mapping() when done.
+ *
+ * Return value: A #GList of #PopplerFormFieldMapping
+ **/
+GList *
+poppler_page_get_form_field_mapping (PopplerPage *page)
+{
+ GList *map_list = NULL;
+ FormPageWidgets *forms;
+ gint i;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ forms = page->page->getPageWidgets ();
+ if (forms == NULL)
+ return NULL;
+
+ for (i = 0; i < forms->getNumWidgets (); i++) {
+ PopplerFormFieldMapping *mapping;
+ FormWidget *field;
+
+ mapping = poppler_form_field_mapping_new ();
+
+ field = forms->getWidget (i);
+
+ mapping->field = _poppler_form_field_new (page->document, field);
+ field->getRect (&(mapping->area.x1), &(mapping->area.y1),
+ &(mapping->area.x2), &(mapping->area.y2));
+
+ mapping->area.x1 -= page->page->getCropBox()->x1;
+ mapping->area.x2 -= page->page->getCropBox()->x1;
+ mapping->area.y1 -= page->page->getCropBox()->y1;
+ mapping->area.y2 -= page->page->getCropBox()->y1;
+
+ map_list = g_list_prepend (map_list, mapping);
+ }
+
+ return map_list;
+}
+
+/**
+ * poppler_page_free_form_field_mapping:
+ * @list: A list of #PopplerFormFieldMapping<!-- -->s
+ *
+ * Frees a list of #PopplerFormFieldMapping<!-- -->s allocated by
+ * poppler_page_get_form_field_mapping().
+ **/
+void
+poppler_page_free_form_field_mapping (GList *list)
+{
+ if (list == NULL)
+ return;
+
+ g_list_foreach (list, (GFunc) poppler_form_field_mapping_free, NULL);
+ g_list_free (list);
+}
+
+/**
+ * poppler_page_get_annot_mapping:
+ * @page: A #PopplerPage
+ *
+ * Returns a list of #PopplerAnnotMapping items that map from a location on
+ * @page to a #PopplerAnnot. This list must be freed with
+ * poppler_page_free_annot_mapping() when done.
+ *
+ * Return value: A #GList of #PopplerAnnotMapping
+ **/
+GList *
+poppler_page_get_annot_mapping (PopplerPage *page)
+{
+ GList *map_list = NULL;
+ double width, height;
+ gint i;
+
+ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
+
+ if (!page->annots)
+ page->annots = page->page->getAnnots (page->document->doc->getCatalog ());
+
+ if (!page->annots)
+ return NULL;
+
+ poppler_page_get_size (page, &width, &height);
+
+ for (i = 0; i < page->annots->getNumAnnots (); i++) {
+ PopplerAnnotMapping *mapping;
+ PopplerRectangle rect;
+ Annot *annot;
+ PDFRectangle *annot_rect;
+ gint rotation = 0;
+
+ annot = page->annots->getAnnot (i);
+
+ /* Create the mapping */
+ mapping = poppler_annot_mapping_new ();
+
+ switch (annot->getType ())
+ {
+ case Annot::typeText:
+ mapping->annot = _poppler_annot_text_new (annot);
+ break;
+ case Annot::typeFreeText:
+ mapping->annot = _poppler_annot_free_text_new (annot);
+ break;
+ default:
+ mapping->annot = _poppler_annot_new (annot);
+ break;
+ }
+
+ annot_rect = annot->getRect ();
+ rect.x1 = annot_rect->x1;
+ rect.y1 = annot_rect->y1;
+ rect.x2 = annot_rect->x2;
+ rect.y2 = annot_rect->y2;
+
+ if (! (annot->getFlags () & Annot::flagNoRotate))
+ rotation = page->page->getRotate ();
+
+ switch (rotation)
+ {
+ case 90:
+ mapping->area.x1 = rect.y1;
+ mapping->area.y1 = height - rect.x2;
+ mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
+ mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
+ break;
+ case 180:
+ mapping->area.x1 = width - rect.x2;
+ mapping->area.y1 = height - rect.y2;
+ mapping->area.x2 = mapping->area.x1 + (rect.x2 - rect.x1);
+ mapping->area.y2 = mapping->area.y1 + (rect.y2 - rect.y1);
+ break;
+ case 270:
+ mapping->area.x1 = width - rect.y2;
+ mapping->area.y1 = rect.x1;
+ mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
+ mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
+ break;
+ default:
+ mapping->area.x1 = rect.x1;
+ mapping->area.y1 = rect.y1;
+ mapping->area.x2 = rect.x2;
+ mapping->area.y2 = rect.y2;
+ }
+
+ mapping->area.x1 -= page->page->getCropBox()->x1;
+ mapping->area.x2 -= page->page->getCropBox()->x1;
+ mapping->area.y1 -= page->page->getCropBox()->y1;
+ mapping->area.y2 -= page->page->getCropBox()->y1;
+
+ map_list = g_list_prepend (map_list, mapping);
+ }
+
+ return g_list_reverse (map_list);
+}
+
+/**
+ * poppler_page_free_annot_mapping:
+ * @list: A list of #PopplerAnnotMapping<!-- -->s
+ *
+ * Frees a list of #PopplerAnnotMapping<!-- -->s allocated by
+ * poppler_page_get_annot_mapping(). It also frees the #PopplerAnnot<!-- -->s
+ * that each mapping contains, so if you want to keep them around, you need to
+ * copy them with poppler_annot_copy().
+ **/
+void
+poppler_page_free_annot_mapping (GList *list)
+{
+ if (!list)
+ return;
+
+ g_list_foreach (list, (GFunc)poppler_annot_mapping_free, NULL);
+ g_list_free (list);
+}
+
+/* PopplerRectangle type */
+
+POPPLER_DEFINE_BOXED_TYPE (PopplerRectangle, poppler_rectangle,
+ poppler_rectangle_copy,
+ poppler_rectangle_free)
+
+PopplerRectangle *
+poppler_rectangle_new (void)
+{
+ return g_new0 (PopplerRectangle, 1);
+}
+
+PopplerRectangle *
+poppler_rectangle_copy (PopplerRectangle *rectangle)
+{
+ PopplerRectangle *new_rectangle;
+
+ g_return_val_if_fail (rectangle != NULL, NULL);
+
+ new_rectangle = g_new (PopplerRectangle, 1);
+ *new_rectangle = *rectangle;
+
+ return new_rectangle;
+}
+
+void
+poppler_rectangle_free (PopplerRectangle *rectangle)
+{
+ g_free (rectangle);
+}
+
+/* PopplerColor type */
+POPPLER_DEFINE_BOXED_TYPE (PopplerColor, poppler_color, poppler_color_copy, poppler_color_free)
+
+PopplerColor *
+poppler_color_new (void)
+{
+ return (PopplerColor *) g_new0 (PopplerColor, 1);
+}
+
+PopplerColor *
+poppler_color_copy (PopplerColor *color)
+{
+ PopplerColor *new_color;
+
+ new_color = g_new (PopplerColor, 1);
+ *new_color = *color;
+
+ return new_color;
+}
+
+void
+poppler_color_free (PopplerColor *color)
+{
+ g_free (color);
+}
+
+/* PopplerLinkMapping type */
+POPPLER_DEFINE_BOXED_TYPE (PopplerLinkMapping, poppler_link_mapping,
+ poppler_link_mapping_copy,
+ poppler_link_mapping_free)
+
+PopplerLinkMapping *
+poppler_link_mapping_new (void)
+{
+ return (PopplerLinkMapping *) g_new0 (PopplerLinkMapping, 1);
+}
+
+PopplerLinkMapping *
+poppler_link_mapping_copy (PopplerLinkMapping *mapping)
+{
+ PopplerLinkMapping *new_mapping;
+
+ new_mapping = poppler_link_mapping_new ();
+
+ *new_mapping = *mapping;
+ if (new_mapping->action)
+ new_mapping->action = poppler_action_copy (new_mapping->action);
+
+ return new_mapping;
+}
+
+void
+poppler_link_mapping_free (PopplerLinkMapping *mapping)
+{
+ if (mapping->action)
+ poppler_action_free (mapping->action);
+
+ g_free (mapping);
+}
+
+/* Poppler Image mapping type */
+POPPLER_DEFINE_BOXED_TYPE (PopplerImageMapping, poppler_image_mapping,
+ poppler_image_mapping_copy,
+ poppler_image_mapping_free)
+
+PopplerImageMapping *
+poppler_image_mapping_new (void)
+{
+ return (PopplerImageMapping *) g_new0 (PopplerImageMapping, 1);
+}
+
+PopplerImageMapping *
+poppler_image_mapping_copy (PopplerImageMapping *mapping)
+{
+ PopplerImageMapping *new_mapping;
+
+ new_mapping = poppler_image_mapping_new ();
+
+ *new_mapping = *mapping;
+
+ return new_mapping;
+}
+
+void
+poppler_image_mapping_free (PopplerImageMapping *mapping)
+{
+ g_free (mapping);
+}
+
+/* Page Transition */
+POPPLER_DEFINE_BOXED_TYPE (PopplerPageTransition, poppler_page_transition,
+ poppler_page_transition_copy,
+ poppler_page_transition_free)
+
+PopplerPageTransition *
+poppler_page_transition_new (void)
+{
+ return (PopplerPageTransition *) g_new0 (PopplerPageTransition, 1);
+}
+
+PopplerPageTransition *
+poppler_page_transition_copy (PopplerPageTransition *transition)
+{
+ PopplerPageTransition *new_transition;
+
+ new_transition = poppler_page_transition_new ();
+ *new_transition = *transition;
+
+ return new_transition;
+}
+
+void
+poppler_page_transition_free (PopplerPageTransition *transition)
+{
+ g_free (transition);
+}
+
+/* Form Field Mapping Type */
+POPPLER_DEFINE_BOXED_TYPE (PopplerFormFieldMapping, poppler_form_field_mapping,
+ poppler_form_field_mapping_copy,
+ poppler_form_field_mapping_free)
+
+PopplerFormFieldMapping *
+poppler_form_field_mapping_new (void)
+{
+ return (PopplerFormFieldMapping *) g_new0 (PopplerFormFieldMapping, 1);
+}
+
+PopplerFormFieldMapping *
+poppler_form_field_mapping_copy (PopplerFormFieldMapping *mapping)
+{
+ PopplerFormFieldMapping *new_mapping;
+
+ new_mapping = poppler_form_field_mapping_new ();
+ *new_mapping = *mapping;
+
+ if (mapping->field)
+ new_mapping->field = (PopplerFormField *)g_object_ref (mapping->field);
+
+ return new_mapping;
+}
+
+void
+poppler_form_field_mapping_free (PopplerFormFieldMapping *mapping)
+{
+ if (!mapping)
+ return;
+
+ if (mapping->field)
+ g_object_unref (mapping->field);
+
+ g_free (mapping);
+}
+
+/* PopplerAnnot Mapping Type */
+POPPLER_DEFINE_BOXED_TYPE (PopplerAnnotMapping, poppler_annot_mapping,
+ poppler_annot_mapping_copy,
+ poppler_annot_mapping_free)
+
+PopplerAnnotMapping *
+poppler_annot_mapping_new (void)
+{
+ return (PopplerAnnotMapping *) g_new0 (PopplerAnnotMapping, 1);
+}
+
+PopplerAnnotMapping *
+poppler_annot_mapping_copy (PopplerAnnotMapping *mapping)
+{
+ PopplerAnnotMapping *new_mapping;
+
+ new_mapping = poppler_annot_mapping_new ();
+
+ *new_mapping = *mapping;
+ if (mapping->annot)
+ new_mapping->annot = (PopplerAnnot *) g_object_ref (mapping->annot);
+
+ return new_mapping;
+}
+
+void
+poppler_annot_mapping_free (PopplerAnnotMapping *mapping)
+{
+ if (!mapping)
+ return;
+
+ if (mapping->annot)
+ g_object_unref (mapping->annot);
+
+ g_free (mapping);
+}
+
+void
+poppler_page_get_crop_box (PopplerPage *page, PopplerRectangle *rect)
+{
+ PDFRectangle* cropBox = page->page->getCropBox ();
+
+ rect->x1 = cropBox->x1;
+ rect->x2 = cropBox->x2;
+ rect->y1 = cropBox->y1;
+ rect->y2 = cropBox->y2;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.h
new file mode 100644
index 00000000000..93510484e6c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-page.h
@@ -0,0 +1,227 @@
+/* poppler-page.h: glib interface to poppler
+ * Copyright (C) 2004, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_PAGE_H__
+#define __POPPLER_PAGE_H__
+
+#include <glib-object.h>
+
+#include "poppler.h"
+
+#ifdef POPPLER_WITH_GDK
+#include <gdk/gdk.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+#ifdef POPPLER_HAS_CAIRO
+#include <cairo.h>
+#endif
+
+G_BEGIN_DECLS
+
+#define POPPLER_TYPE_PAGE (poppler_page_get_type ())
+#define POPPLER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_PAGE, PopplerPage))
+#define POPPLER_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_PAGE))
+
+
+GType poppler_page_get_type (void) G_GNUC_CONST;
+
+#ifdef POPPLER_WITH_GDK
+void poppler_page_render_to_pixbuf (PopplerPage *page,
+ int src_x,
+ int src_y,
+ int src_width,
+ int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf);
+void poppler_page_render_to_pixbuf_for_printing (PopplerPage *page,
+ int src_x,
+ int src_y,
+ int src_width,
+ int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf);
+GdkPixbuf *poppler_page_get_thumbnail_pixbuf (PopplerPage *page);
+void poppler_page_render_selection_to_pixbuf (
+ PopplerPage *page,
+ gdouble scale,
+ int rotation,
+ GdkPixbuf *pixbuf,
+ PopplerRectangle *selection,
+ PopplerRectangle *old_selection,
+ PopplerSelectionStyle style,
+ GdkColor *glyph_color,
+ GdkColor *background_color);
+#endif /* POPPLER_WITH_GDK */
+
+#ifdef POPPLER_HAS_CAIRO
+void poppler_page_render (PopplerPage *page,
+ cairo_t *cairo);
+void poppler_page_render_for_printing (PopplerPage *page,
+ cairo_t *cairo);
+cairo_surface_t *poppler_page_get_thumbnail (PopplerPage *page);
+void poppler_page_render_selection (PopplerPage *page,
+ cairo_t *cairo,
+ PopplerRectangle *selection,
+ PopplerRectangle *old_selection,
+ PopplerSelectionStyle style,
+ PopplerColor *glyph_color,
+ PopplerColor *background_color);
+#endif /* POPPLER_HAS_CAIRO */
+
+void poppler_page_get_size (PopplerPage *page,
+ double *width,
+ double *height);
+int poppler_page_get_index (PopplerPage *page);
+double poppler_page_get_duration (PopplerPage *page);
+PopplerPageTransition *poppler_page_get_transition (PopplerPage *page);
+gboolean poppler_page_get_thumbnail_size (PopplerPage *page,
+ int *width,
+ int *height);
+GList *poppler_page_find_text (PopplerPage *page,
+ const char *text);
+void poppler_page_render_to_ps (PopplerPage *page,
+ PopplerPSFile *ps_file);
+char *poppler_page_get_text (PopplerPage *page,
+ PopplerSelectionStyle style,
+ PopplerRectangle *rect);
+GList *poppler_page_get_selection_region (PopplerPage *page,
+ gdouble scale,
+ PopplerSelectionStyle style,
+ PopplerRectangle *selection);
+void poppler_page_selection_region_free(GList *region);
+GList *poppler_page_get_link_mapping (PopplerPage *page);
+void poppler_page_free_link_mapping (GList *list);
+GList *poppler_page_get_image_mapping (PopplerPage *page);
+void poppler_page_free_image_mapping (GList *list);
+#ifdef POPPLER_HAS_CAIRO
+cairo_surface_t *poppler_page_get_image (PopplerPage *page,
+ gint image_id);
+#endif /* POPPLER_HAS_CAIRO */
+GList *poppler_page_get_form_field_mapping (PopplerPage *page);
+void poppler_page_free_form_field_mapping (GList *list);
+GList *poppler_page_get_annot_mapping (PopplerPage *page);
+void poppler_page_free_annot_mapping (GList *list);
+void poppler_page_get_crop_box (PopplerPage *page,
+ PopplerRectangle *rect);
+
+
+/* A rectangle on a page, with coordinates in PDF points. */
+#define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ())
+struct _PopplerRectangle
+{
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+};
+
+GType poppler_rectangle_get_type (void) G_GNUC_CONST;
+PopplerRectangle *poppler_rectangle_new (void);
+PopplerRectangle *poppler_rectangle_copy (PopplerRectangle *rectangle);
+void poppler_rectangle_free (PopplerRectangle *rectangle);
+
+/* A color in RGB */
+#define POPPLER_TYPE_COLOR (poppler_color_get_type ())
+struct _PopplerColor
+{
+ guint16 red;
+ guint16 green;
+ guint16 blue;
+};
+
+GType poppler_color_get_type (void) G_GNUC_CONST;
+PopplerColor *poppler_color_new (void);
+PopplerColor *poppler_color_copy (PopplerColor *color);
+void poppler_color_free (PopplerColor *color);
+
+/* Mapping between areas on the current page and PopplerActions */
+#define POPPLER_TYPE_LINK_MAPPING (poppler_link_mapping_get_type ())
+struct _PopplerLinkMapping
+{
+ PopplerRectangle area;
+ PopplerAction *action;
+};
+
+GType poppler_link_mapping_get_type (void) G_GNUC_CONST;
+PopplerLinkMapping *poppler_link_mapping_new (void);
+PopplerLinkMapping *poppler_link_mapping_copy (PopplerLinkMapping *mapping);
+void poppler_link_mapping_free (PopplerLinkMapping *mapping);
+
+/* Page Transition */
+#define POPPLER_TYPE_PAGE_TRANSITION (poppler_page_transition_get_type ())
+struct _PopplerPageTransition
+{
+ PopplerPageTransitionType type;
+ PopplerPageTransitionAlignment alignment;
+ PopplerPageTransitionDirection direction;
+ gint duration;
+ gint angle;
+ gdouble scale;
+ gboolean rectangular;
+};
+
+GType poppler_page_transition_get_type (void) G_GNUC_CONST;
+PopplerPageTransition *poppler_page_transition_new (void);
+PopplerPageTransition *poppler_page_transition_copy (PopplerPageTransition *transition);
+void poppler_page_transition_free (PopplerPageTransition *transition);
+
+/* Mapping between areas on the current page and images */
+#define POPPLER_TYPE_IMAGE_MAPPING (poppler_image_mapping_get_type ())
+struct _PopplerImageMapping
+{
+ PopplerRectangle area;
+ gint image_id;
+};
+
+GType poppler_image_mapping_get_type (void) G_GNUC_CONST;
+PopplerImageMapping *poppler_image_mapping_new (void);
+PopplerImageMapping *poppler_image_mapping_copy (PopplerImageMapping *mapping);
+void poppler_image_mapping_free (PopplerImageMapping *mapping);
+
+/* Mapping between areas on the current page and form fields */
+#define POPPLER_TYPE_FORM_FIELD_MAPPING (poppler_form_field_mapping_get_type ())
+struct _PopplerFormFieldMapping
+{
+ PopplerRectangle area;
+ PopplerFormField *field;
+};
+
+GType poppler_form_field_mapping_get_type (void) G_GNUC_CONST;
+PopplerFormFieldMapping *poppler_form_field_mapping_new (void);
+PopplerFormFieldMapping *poppler_form_field_mapping_copy (PopplerFormFieldMapping *mapping);
+void poppler_form_field_mapping_free (PopplerFormFieldMapping *mapping);
+
+/* Mapping between areas on the current page and annots */
+#define POPPLER_TYPE_ANNOT_MAPPING (poppler_annot_mapping_get_type ())
+struct _PopplerAnnotMapping
+{
+ PopplerRectangle area;
+ PopplerAnnot *annot;
+};
+
+GType poppler_annot_mapping_get_type (void) G_GNUC_CONST;
+PopplerAnnotMapping *poppler_annot_mapping_new (void);
+PopplerAnnotMapping *poppler_annot_mapping_copy (PopplerAnnotMapping *mapping);
+void poppler_annot_mapping_free (PopplerAnnotMapping *mapping);
+
+G_END_DECLS
+
+#endif /* __POPPLER_PAGE_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-private.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-private.h
new file mode 100644
index 00000000000..e8ace142671
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler-private.h
@@ -0,0 +1,135 @@
+#ifndef __POPPLER_PRIVATE_H__
+#define __POPPLER_PRIVATE_H__
+
+#include <config.h>
+#include <PDFDoc.h>
+#include <PSOutputDev.h>
+#include <Link.h>
+#include <Form.h>
+#include <Gfx.h>
+#include <FontInfo.h>
+#include <TextOutputDev.h>
+#include <Catalog.h>
+#include <OptionalContent.h>
+
+#if defined (HAVE_CAIRO)
+#include <CairoOutputDev.h>
+#elif defined (HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#endif
+
+struct _PopplerDocument
+{
+ GObject parent_instance;
+ PDFDoc *doc;
+
+ GList *layers;
+ GList *layers_rbgroups;
+#if defined (HAVE_CAIRO)
+ CairoOutputDev *output_dev;
+#elif defined (HAVE_SPLASH)
+ SplashOutputDev *output_dev;
+#endif
+};
+
+struct _PopplerPSFile
+{
+ GObject parent_instance;
+
+ PopplerDocument *document;
+ PSOutputDev *out;
+ char *filename;
+ int first_page;
+ int last_page;
+ double paper_width;
+ double paper_height;
+ gboolean duplex;
+};
+
+struct _PopplerFontInfo
+{
+ GObject parent_instance;
+ PopplerDocument *document;
+ FontInfoScanner *scanner;
+};
+
+struct _PopplerPage
+{
+ GObject parent_instance;
+ PopplerDocument *document;
+ Page *page;
+ int index;
+#if defined (HAVE_CAIRO)
+ TextPage *text;
+#else
+ TextOutputDev *text_dev;
+ Gfx *gfx;
+#endif
+ Annots *annots;
+};
+
+struct _PopplerFormField
+{
+ GObject parent_instance;
+ PopplerDocument *document;
+ FormWidget *widget;
+};
+
+typedef struct _Layer {
+ GList *kids;
+ gchar *label;
+ OptionalContentGroup *oc;
+} Layer;
+
+struct _PopplerLayer
+{
+ GObject parent_instance;
+ PopplerDocument *document;
+ Layer *layer;
+ GList *rbgroup;
+ gchar *title;
+};
+
+PopplerPage *_poppler_page_new (PopplerDocument *document,
+ Page *page,
+ int index);
+PopplerAction *_poppler_action_new (PopplerDocument *document,
+ LinkAction *link,
+ const gchar *title);
+PopplerLayer *_poppler_layer_new (PopplerDocument *document,
+ Layer *layer,
+ GList *rbgroup);
+PopplerDest *_poppler_dest_new_goto (PopplerDocument *document,
+ LinkDest *link_dest);
+PopplerFormField *_poppler_form_field_new (PopplerDocument *document,
+ FormWidget *field);
+PopplerAttachment *_poppler_attachment_new (PopplerDocument *document,
+ EmbFile *file);
+PopplerAnnot *_poppler_annot_new (Annot *annot);
+PopplerAnnot *_poppler_annot_text_new (Annot *annot);
+PopplerAnnot *_poppler_annot_free_text_new (Annot *annot);
+
+char *_poppler_goo_string_to_utf8(GooString *s);
+gboolean _poppler_convert_pdf_date_to_gtime (GooString *date,
+ time_t *gdate);
+
+/*
+ * A convenience macro for boxed type implementations, which defines a
+ * type_name_get_type() function registering the boxed type.
+ */
+#define POPPLER_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) \
+GType \
+type_name##_get_type (void) \
+{ \
+ static volatile gsize g_define_type_id__volatile = 0; \
+ if (g_once_init_enter (&g_define_type_id__volatile)) { \
+ GType g_define_type_id = \
+ g_boxed_type_register_static (g_intern_static_string (#TypeName), \
+ (GBoxedCopyFunc) copy_func, \
+ (GBoxedFreeFunc) free_func); \
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
+ } \
+ return g_define_type_id__volatile; \
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.cc
new file mode 100644
index 00000000000..3c1d503e22f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.cc
@@ -0,0 +1,64 @@
+/* poppler.cc: glib wrapper for poppler
+ * Copyright (C) 2005, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include "poppler.h"
+
+GQuark poppler_error_quark (void)
+{
+ static GQuark q = 0;
+
+ if (q == 0)
+ q = g_quark_from_static_string ("poppler-quark");
+
+ return q;
+}
+
+/**
+ * poppler_get_backend:
+ *
+ * Returns the backend compiled into the poppler library.
+ *
+ * Return value: The backend used by poppler
+ **/
+PopplerBackend
+poppler_get_backend (void)
+{
+#if defined (HAVE_CAIRO)
+ return POPPLER_BACKEND_CAIRO;
+#elif defined (HAVE_SPLASH)
+ return POPPLER_BACKEND_SPLASH;
+#else
+ return POPPLER_BACKEND_UNKNOWN;
+#endif
+}
+
+static const char poppler_version[] = PACKAGE_VERSION;
+
+/**
+ * poppler_get_version:
+ *
+ * Returns the version of poppler in use. This result is not to be freed.
+ *
+ * Return value: the version of poppler.
+ **/
+const char *
+poppler_get_version (void)
+{
+ return poppler_version;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.h b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.h
new file mode 100644
index 00000000000..b1a77307d9f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/poppler.h
@@ -0,0 +1,130 @@
+/* poppler.h: glib interface to poppler
+ * Copyright (C) 2004, Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_GLIB_H__
+#define __POPPLER_GLIB_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+GQuark poppler_error_quark (void);
+
+#define POPPLER_ERROR poppler_error_quark ()
+
+typedef enum
+{
+ POPPLER_ERROR_INVALID,
+ POPPLER_ERROR_ENCRYPTED,
+ POPPLER_ERROR_OPEN_FILE,
+ POPPLER_ERROR_BAD_CATALOG,
+ POPPLER_ERROR_DAMAGED
+} PopplerError;
+
+typedef enum
+{
+ POPPLER_ORIENTATION_PORTRAIT,
+ POPPLER_ORIENTATION_LANDSCAPE,
+ POPPLER_ORIENTATION_UPSIDEDOWN,
+ POPPLER_ORIENTATION_SEASCAPE
+} PopplerOrientation;
+
+typedef enum
+{
+ POPPLER_PAGE_TRANSITION_REPLACE,
+ POPPLER_PAGE_TRANSITION_SPLIT,
+ POPPLER_PAGE_TRANSITION_BLINDS,
+ POPPLER_PAGE_TRANSITION_BOX,
+ POPPLER_PAGE_TRANSITION_WIPE,
+ POPPLER_PAGE_TRANSITION_DISSOLVE,
+ POPPLER_PAGE_TRANSITION_GLITTER,
+ POPPLER_PAGE_TRANSITION_FLY,
+ POPPLER_PAGE_TRANSITION_PUSH,
+ POPPLER_PAGE_TRANSITION_COVER,
+ POPPLER_PAGE_TRANSITION_UNCOVER,
+ POPPLER_PAGE_TRANSITION_FADE
+} PopplerPageTransitionType;
+
+typedef enum
+{
+ POPPLER_PAGE_TRANSITION_HORIZONTAL,
+ POPPLER_PAGE_TRANSITION_VERTICAL
+} PopplerPageTransitionAlignment;
+
+typedef enum
+{
+ POPPLER_PAGE_TRANSITION_INWARD,
+ POPPLER_PAGE_TRANSITION_OUTWARD
+} PopplerPageTransitionDirection;
+
+typedef enum
+{
+ POPPLER_SELECTION_GLYPH,
+ POPPLER_SELECTION_WORD,
+ POPPLER_SELECTION_LINE
+} PopplerSelectionStyle;
+
+typedef struct _PopplerDocument PopplerDocument;
+typedef struct _PopplerIndexIter PopplerIndexIter;
+typedef struct _PopplerFontsIter PopplerFontsIter;
+typedef struct _PopplerLayersIter PopplerLayersIter;
+typedef struct _PopplerRectangle PopplerRectangle;
+typedef struct _PopplerColor PopplerColor;
+typedef struct _PopplerLinkMapping PopplerLinkMapping;
+typedef struct _PopplerPageTransition PopplerPageTransition;
+typedef struct _PopplerImageMapping PopplerImageMapping;
+typedef struct _PopplerFormFieldMapping PopplerFormFieldMapping;
+typedef struct _PopplerAnnotMapping PopplerAnnotMapping;
+typedef struct _PopplerPage PopplerPage;
+typedef struct _PopplerFontInfo PopplerFontInfo;
+typedef struct _PopplerLayer PopplerLayer;
+typedef struct _PopplerPSFile PopplerPSFile;
+typedef union _PopplerAction PopplerAction;
+typedef struct _PopplerDest PopplerDest;
+typedef struct _PopplerFormField PopplerFormField;
+typedef struct _PopplerAttachment PopplerAttachment;
+typedef struct _PopplerAnnot PopplerAnnot;
+typedef struct _PopplerAnnotMarkup PopplerAnnotMarkup;
+typedef struct _PopplerAnnotText PopplerAnnotText;
+typedef struct _PopplerAnnotFreeText PopplerAnnotFreeText;
+typedef struct _PopplerAnnotCalloutLine PopplerAnnotCalloutLine;
+
+typedef enum
+{
+ POPPLER_BACKEND_UNKNOWN,
+ POPPLER_BACKEND_SPLASH,
+ POPPLER_BACKEND_CAIRO
+} PopplerBackend;
+
+PopplerBackend poppler_get_backend (void);
+const char * poppler_get_version (void);
+
+G_END_DECLS
+
+#include "poppler-features.h"
+#include "poppler-document.h"
+#include "poppler-page.h"
+#include "poppler-layer.h"
+#include "poppler-action.h"
+#include "poppler-form-field.h"
+#include "poppler-enums.h"
+#include "poppler-attachment.h"
+#include "poppler-annot.h"
+#include "poppler-date.h"
+
+#endif /* __POPPLER_GLIB_H__ */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.am
new file mode 100644
index 00000000000..fc99ed12124
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.am
@@ -0,0 +1,88 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=poppler
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR=..
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS=--sgml-mode --output-format=xml --source-suffixes=c,cc,h
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/glib/*.h
+CFILE_GLOB=$(top_srcdir)/glib/*.cc
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES=
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files=
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES=-I$(top_srcdir)/glib -I$(top_builddir)/glib \
+ $(CAIRO_CFLAGS) \
+ $(POPPLER_GLIB_CFLAGS) \
+ $(GDK_CFLAGS) \
+ $(FREETYPE_CFLAGS)
+
+GTKDOC_LIBS=$(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(POPPLER_GLIB_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(cairo_libs)
+
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST +=
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.in
new file mode 100644
index 00000000000..55ce141742e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/Makefile.in
@@ -0,0 +1,698 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/gtk-doc.make
+subdir = glib/reference
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE = poppler
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR = ..
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS =
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS =
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS = --sgml-mode --output-format=xml --source-suffixes=c,cc,h
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS =
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS =
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB = $(top_srcdir)/glib/*.h
+CFILE_GLOB = $(top_srcdir)/glib/*.cc
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES =
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES =
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files =
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files =
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES = -I$(top_srcdir)/glib -I$(top_builddir)/glib \
+ $(CAIRO_CFLAGS) \
+ $(POPPLER_GLIB_CFLAGS) \
+ $(GDK_CFLAGS) \
+ $(FREETYPE_CFLAGS)
+
+GTKDOC_LIBS = $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(POPPLER_GLIB_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(cairo_libs)
+
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = sh -c
+@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glib/reference/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign glib/reference/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+ maintainer-clean-local
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+ clean-libtool clean-local dist-hook distclean \
+ distclean-generic distclean-libtool distclean-local distdir \
+ dvi dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-local mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-local
+
+
+@ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp
+@ENABLE_GTK_DOC_FALSE@all-local:
+
+docs: html-build.stamp
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ mkhtml_options=""; \
+ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
+ if test "$(?)" = "0"; then \
+ mkhtml_options=--path="$(srcdir)"; \
+ fi
+ cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ $(mkinstalldirs) $${installdir} ; \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $${installdir}; \
+ done; \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
+ fi; \
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \
+ fi
+
+uninstall-local:
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+@ENABLE_GTK_DOC_FALSE@ @false
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/ch01.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/ch01.html
new file mode 100644
index 00000000000..1a86988a39a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/ch01.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Poppler</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="index.html" title="Poppler Reference Manual">
+<link rel="prev" href="index.html" title="Poppler Reference Manual">
+<link rel="next" href="poppler-poppler.html" title="poppler">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" title="Poppler">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id360229"></a>Poppler</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler.html">poppler</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-document.html">PopplerDocument</a></span><span class="refpurpose"> — Information about a document</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-page.html">PopplerPage</a></span><span class="refpurpose"> — Information about a page in a document</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-action.html">PopplerAction</a></span><span class="refpurpose"> — Action links</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-attachment.html">PopplerAttachment</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-form-field.html">PopplerFormField</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-enums.html">poppler-enums</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-annot.html">PopplerAnnot</a></span><span class="refpurpose"> — Annotations</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-layer.html">PopplerLayer</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-features.html">Version and Features Information</a></span><span class="refpurpose"> — Variables and functions to check the poppler version and features</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/home.png b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/home.png
new file mode 100644
index 00000000000..17003611d9d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/home.png
Binary files differ
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.html
new file mode 100644
index 00000000000..405dbae4bd6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Poppler Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="next" href="ch01.html" title="Poppler">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="book" title="Poppler Reference Manual">
+<div class="titlepage">
+<div><div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Poppler Reference Manual</p></th></tr></table></div></div>
+<hr>
+</div>
+<div class="toc"><dl>
+<dt><span class="chapter"><a href="ch01.html">Poppler</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler.html">poppler</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-document.html">PopplerDocument</a></span><span class="refpurpose"> — Information about a document</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-page.html">PopplerPage</a></span><span class="refpurpose"> — Information about a page in a document</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-action.html">PopplerAction</a></span><span class="refpurpose"> — Action links</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-attachment.html">PopplerAttachment</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-form-field.html">PopplerFormField</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-enums.html">poppler-enums</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-annot.html">PopplerAnnot</a></span><span class="refpurpose"> — Annotations</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-layer.html">PopplerLayer</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="poppler-poppler-features.html">Version and Features Information</a></span><span class="refpurpose"> — Variables and functions to check the poppler version and features</span>
+</dt>
+</dl></dd>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.sgml
new file mode 100644
index 00000000000..aabf172224a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/index.sgml
@@ -0,0 +1,309 @@
+<ANCHOR id="poppler-poppler" href="poppler/poppler-poppler.html">
+<ANCHOR id="poppler-poppler.synopsis" href="poppler/poppler-poppler.html#poppler-poppler.synopsis">
+<ANCHOR id="PopplerDocument" href="poppler/poppler-poppler.html#PopplerDocument">
+<ANCHOR id="PopplerPage" href="poppler/poppler-poppler.html#PopplerPage">
+<ANCHOR id="poppler-poppler.object-hierarchy" href="poppler/poppler-poppler.html#poppler-poppler.object-hierarchy">
+<ANCHOR id="poppler-poppler.properties" href="poppler/poppler-poppler.html#poppler-poppler.properties">
+<ANCHOR id="poppler-poppler.description" href="poppler/poppler-poppler.html#poppler-poppler.description">
+<ANCHOR id="poppler-poppler.details" href="poppler/poppler-poppler.html#poppler-poppler.details">
+<ANCHOR id="poppler-error-quark" href="poppler/poppler-poppler.html#poppler-error-quark">
+<ANCHOR id="POPPLER-ERROR--CAPS" href="poppler/poppler-poppler.html#POPPLER-ERROR--CAPS">
+<ANCHOR id="PopplerError" href="poppler/poppler-poppler.html#PopplerError">
+<ANCHOR id="PopplerOrientation" href="poppler/poppler-poppler.html#PopplerOrientation">
+<ANCHOR id="PopplerDocument-struct" href="poppler/poppler-poppler.html#PopplerDocument-struct">
+<ANCHOR id="PopplerIndexIter" href="poppler/poppler-poppler.html#PopplerIndexIter">
+<ANCHOR id="PopplerFontsIter" href="poppler/poppler-poppler.html#PopplerFontsIter">
+<ANCHOR id="PopplerRectangle" href="poppler/poppler-poppler.html#PopplerRectangle">
+<ANCHOR id="PopplerSelectionStyle" href="poppler/poppler-poppler.html#PopplerSelectionStyle">
+<ANCHOR id="PopplerPageTransitionType" href="poppler/poppler-poppler.html#PopplerPageTransitionType">
+<ANCHOR id="PopplerPageTransitionAlignment" href="poppler/poppler-poppler.html#PopplerPageTransitionAlignment">
+<ANCHOR id="PopplerPageTransitionDirection" href="poppler/poppler-poppler.html#PopplerPageTransitionDirection">
+<ANCHOR id="PopplerLinkMapping" href="poppler/poppler-poppler.html#PopplerLinkMapping">
+<ANCHOR id="PopplerPage-struct" href="poppler/poppler-poppler.html#PopplerPage-struct">
+<ANCHOR id="PopplerFontInfo" href="poppler/poppler-poppler.html#PopplerFontInfo">
+<ANCHOR id="PopplerPSFile" href="poppler/poppler-poppler.html#PopplerPSFile">
+<ANCHOR id="PopplerBackend" href="poppler/poppler-poppler.html#PopplerBackend">
+<ANCHOR id="poppler-get-backend" href="poppler/poppler-poppler.html#poppler-get-backend">
+<ANCHOR id="poppler-get-version" href="poppler/poppler-poppler.html#poppler-get-version">
+<ANCHOR id="poppler-poppler.property-details" href="poppler/poppler-poppler.html#poppler-poppler.property-details">
+<ANCHOR id="PopplerDocument--author" href="poppler/poppler-poppler.html#PopplerDocument--author">
+<ANCHOR id="PopplerDocument--creation-date" href="poppler/poppler-poppler.html#PopplerDocument--creation-date">
+<ANCHOR id="PopplerDocument--creator" href="poppler/poppler-poppler.html#PopplerDocument--creator">
+<ANCHOR id="PopplerDocument--format" href="poppler/poppler-poppler.html#PopplerDocument--format">
+<ANCHOR id="PopplerDocument--format-major" href="poppler/poppler-poppler.html#PopplerDocument--format-major">
+<ANCHOR id="PopplerDocument--format-minor" href="poppler/poppler-poppler.html#PopplerDocument--format-minor">
+<ANCHOR id="PopplerDocument--keywords" href="poppler/poppler-poppler.html#PopplerDocument--keywords">
+<ANCHOR id="PopplerDocument--linearized" href="poppler/poppler-poppler.html#PopplerDocument--linearized">
+<ANCHOR id="PopplerDocument--metadata" href="poppler/poppler-poppler.html#PopplerDocument--metadata">
+<ANCHOR id="PopplerDocument--mod-date" href="poppler/poppler-poppler.html#PopplerDocument--mod-date">
+<ANCHOR id="PopplerDocument--page-layout" href="poppler/poppler-poppler.html#PopplerDocument--page-layout">
+<ANCHOR id="PopplerDocument--page-mode" href="poppler/poppler-poppler.html#PopplerDocument--page-mode">
+<ANCHOR id="PopplerDocument--permissions" href="poppler/poppler-poppler.html#PopplerDocument--permissions">
+<ANCHOR id="PopplerDocument--producer" href="poppler/poppler-poppler.html#PopplerDocument--producer">
+<ANCHOR id="PopplerDocument--subject" href="poppler/poppler-poppler.html#PopplerDocument--subject">
+<ANCHOR id="PopplerDocument--title" href="poppler/poppler-poppler.html#PopplerDocument--title">
+<ANCHOR id="PopplerDocument--viewer-preferences" href="poppler/poppler-poppler.html#PopplerDocument--viewer-preferences">
+<ANCHOR id="PopplerPage--label" href="poppler/poppler-poppler.html#PopplerPage--label">
+<ANCHOR id="poppler-poppler-document" href="poppler/poppler-poppler-document.html">
+<ANCHOR id="poppler-poppler-document.synopsis" href="poppler/poppler-poppler-document.html#poppler-poppler-document.synopsis">
+<ANCHOR id="poppler-poppler-document.description" href="poppler/poppler-poppler-document.html#poppler-poppler-document.description">
+<ANCHOR id="poppler-poppler-document.details" href="poppler/poppler-poppler-document.html#poppler-poppler-document.details">
+<ANCHOR id="PopplerPageLayout" href="poppler/poppler-poppler-document.html#PopplerPageLayout">
+<ANCHOR id="PopplerPageMode" href="poppler/poppler-poppler-document.html#PopplerPageMode">
+<ANCHOR id="PopplerFontType" href="poppler/poppler-poppler-document.html#PopplerFontType">
+<ANCHOR id="PopplerViewerPreferences" href="poppler/poppler-poppler-document.html#PopplerViewerPreferences">
+<ANCHOR id="PopplerPermissions" href="poppler/poppler-poppler-document.html#PopplerPermissions">
+<ANCHOR id="poppler-document-new-from-file" href="poppler/poppler-poppler-document.html#poppler-document-new-from-file">
+<ANCHOR id="poppler-document-new-from-data" href="poppler/poppler-poppler-document.html#poppler-document-new-from-data">
+<ANCHOR id="poppler-document-save" href="poppler/poppler-poppler-document.html#poppler-document-save">
+<ANCHOR id="poppler-document-get-n-pages" href="poppler/poppler-poppler-document.html#poppler-document-get-n-pages">
+<ANCHOR id="poppler-document-get-page" href="poppler/poppler-poppler-document.html#poppler-document-get-page">
+<ANCHOR id="poppler-document-get-page-by-label" href="poppler/poppler-poppler-document.html#poppler-document-get-page-by-label">
+<ANCHOR id="poppler-document-find-dest" href="poppler/poppler-poppler-document.html#poppler-document-find-dest">
+<ANCHOR id="poppler-document-has-attachments" href="poppler/poppler-poppler-document.html#poppler-document-has-attachments">
+<ANCHOR id="poppler-document-get-attachments" href="poppler/poppler-poppler-document.html#poppler-document-get-attachments">
+<ANCHOR id="poppler-document-get-form-field" href="poppler/poppler-poppler-document.html#poppler-document-get-form-field">
+<ANCHOR id="poppler-index-iter-get-type" href="poppler/poppler-poppler-document.html#poppler-index-iter-get-type">
+<ANCHOR id="poppler-index-iter-new" href="poppler/poppler-poppler-document.html#poppler-index-iter-new">
+<ANCHOR id="poppler-index-iter-copy" href="poppler/poppler-poppler-document.html#poppler-index-iter-copy">
+<ANCHOR id="poppler-index-iter-free" href="poppler/poppler-poppler-document.html#poppler-index-iter-free">
+<ANCHOR id="poppler-index-iter-get-child" href="poppler/poppler-poppler-document.html#poppler-index-iter-get-child">
+<ANCHOR id="poppler-index-iter-is-open" href="poppler/poppler-poppler-document.html#poppler-index-iter-is-open">
+<ANCHOR id="poppler-index-iter-get-action" href="poppler/poppler-poppler-document.html#poppler-index-iter-get-action">
+<ANCHOR id="poppler-index-iter-next" href="poppler/poppler-poppler-document.html#poppler-index-iter-next">
+<ANCHOR id="poppler-font-info-new" href="poppler/poppler-poppler-document.html#poppler-font-info-new">
+<ANCHOR id="poppler-font-info-scan" href="poppler/poppler-poppler-document.html#poppler-font-info-scan">
+<ANCHOR id="poppler-font-info-free" href="poppler/poppler-poppler-document.html#poppler-font-info-free">
+<ANCHOR id="poppler-fonts-iter-get-type" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-get-type">
+<ANCHOR id="poppler-fonts-iter-copy" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-copy">
+<ANCHOR id="poppler-fonts-iter-free" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-free">
+<ANCHOR id="poppler-fonts-iter-get-name" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-get-name">
+<ANCHOR id="poppler-fonts-iter-get-full-name" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-get-full-name">
+<ANCHOR id="poppler-fonts-iter-get-font-type" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-get-font-type">
+<ANCHOR id="poppler-fonts-iter-is-embedded" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-is-embedded">
+<ANCHOR id="poppler-fonts-iter-is-subset" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-is-subset">
+<ANCHOR id="poppler-fonts-iter-next" href="poppler/poppler-poppler-document.html#poppler-fonts-iter-next">
+<ANCHOR id="poppler-ps-file-new" href="poppler/poppler-poppler-document.html#poppler-ps-file-new">
+<ANCHOR id="poppler-ps-file-set-paper-size" href="poppler/poppler-poppler-document.html#poppler-ps-file-set-paper-size">
+<ANCHOR id="poppler-ps-file-set-duplex" href="poppler/poppler-poppler-document.html#poppler-ps-file-set-duplex">
+<ANCHOR id="poppler-ps-file-free" href="poppler/poppler-poppler-document.html#poppler-ps-file-free">
+<ANCHOR id="poppler-poppler-page" href="poppler/poppler-poppler-page.html">
+<ANCHOR id="poppler-poppler-page.synopsis" href="poppler/poppler-poppler-page.html#poppler-poppler-page.synopsis">
+<ANCHOR id="poppler-poppler-page.description" href="poppler/poppler-poppler-page.html#poppler-poppler-page.description">
+<ANCHOR id="poppler-poppler-page.details" href="poppler/poppler-poppler-page.html#poppler-poppler-page.details">
+<ANCHOR id="poppler-page-render" href="poppler/poppler-poppler-page.html#poppler-page-render">
+<ANCHOR id="poppler-page-render-to-pixbuf" href="poppler/poppler-poppler-page.html#poppler-page-render-to-pixbuf">
+<ANCHOR id="poppler-page-get-size" href="poppler/poppler-poppler-page.html#poppler-page-get-size">
+<ANCHOR id="poppler-page-get-index" href="poppler/poppler-poppler-page.html#poppler-page-get-index">
+<ANCHOR id="poppler-page-get-thumbnail" href="poppler/poppler-poppler-page.html#poppler-page-get-thumbnail">
+<ANCHOR id="poppler-page-get-thumbnail-size" href="poppler/poppler-poppler-page.html#poppler-page-get-thumbnail-size">
+<ANCHOR id="poppler-page-render-to-ps" href="poppler/poppler-poppler-page.html#poppler-page-render-to-ps">
+<ANCHOR id="poppler-page-find-text" href="poppler/poppler-poppler-page.html#poppler-page-find-text">
+<ANCHOR id="poppler-page-get-text" href="poppler/poppler-poppler-page.html#poppler-page-get-text">
+<ANCHOR id="poppler-page-get-duration" href="poppler/poppler-poppler-page.html#poppler-page-get-duration">
+<ANCHOR id="poppler-page-get-transition" href="poppler/poppler-poppler-page.html#poppler-page-get-transition">
+<ANCHOR id="poppler-page-get-link-mapping" href="poppler/poppler-poppler-page.html#poppler-page-get-link-mapping">
+<ANCHOR id="poppler-page-free-link-mapping" href="poppler/poppler-poppler-page.html#poppler-page-free-link-mapping">
+<ANCHOR id="poppler-page-get-image-mapping" href="poppler/poppler-poppler-page.html#poppler-page-get-image-mapping">
+<ANCHOR id="poppler-page-free-image-mapping" href="poppler/poppler-poppler-page.html#poppler-page-free-image-mapping">
+<ANCHOR id="poppler-page-get-form-field-mapping" href="poppler/poppler-poppler-page.html#poppler-page-get-form-field-mapping">
+<ANCHOR id="poppler-page-free-form-field-mapping" href="poppler/poppler-poppler-page.html#poppler-page-free-form-field-mapping">
+<ANCHOR id="poppler-page-get-selection-region" href="poppler/poppler-poppler-page.html#poppler-page-get-selection-region">
+<ANCHOR id="poppler-page-render-selection" href="poppler/poppler-poppler-page.html#poppler-page-render-selection">
+<ANCHOR id="poppler-page-render-selection-to-pixbuf" href="poppler/poppler-poppler-page.html#poppler-page-render-selection-to-pixbuf">
+<ANCHOR id="POPPLER-TYPE-RECTANGLE--CAPS" href="poppler/poppler-poppler-page.html#POPPLER-TYPE-RECTANGLE--CAPS">
+<ANCHOR id="PopplerRectangle" href="poppler/poppler-poppler-page.html#PopplerRectangle">
+<ANCHOR id="poppler-rectangle-get-type" href="poppler/poppler-poppler-page.html#poppler-rectangle-get-type">
+<ANCHOR id="poppler-rectangle-new" href="poppler/poppler-poppler-page.html#poppler-rectangle-new">
+<ANCHOR id="poppler-rectangle-copy" href="poppler/poppler-poppler-page.html#poppler-rectangle-copy">
+<ANCHOR id="poppler-rectangle-free" href="poppler/poppler-poppler-page.html#poppler-rectangle-free">
+<ANCHOR id="POPPLER-TYPE-PAGE-TRANSITION--CAPS" href="poppler/poppler-poppler-page.html#POPPLER-TYPE-PAGE-TRANSITION--CAPS">
+<ANCHOR id="PopplerPageTransition" href="poppler/poppler-poppler-page.html#PopplerPageTransition">
+<ANCHOR id="poppler-page-transition-get-type" href="poppler/poppler-poppler-page.html#poppler-page-transition-get-type">
+<ANCHOR id="poppler-page-transition-new" href="poppler/poppler-poppler-page.html#poppler-page-transition-new">
+<ANCHOR id="poppler-page-transition-copy" href="poppler/poppler-poppler-page.html#poppler-page-transition-copy">
+<ANCHOR id="poppler-page-transition-free" href="poppler/poppler-poppler-page.html#poppler-page-transition-free">
+<ANCHOR id="POPPLER-TYPE-LINK-MAPPING--CAPS" href="poppler/poppler-poppler-page.html#POPPLER-TYPE-LINK-MAPPING--CAPS">
+<ANCHOR id="PopplerLinkMapping" href="poppler/poppler-poppler-page.html#PopplerLinkMapping">
+<ANCHOR id="poppler-link-mapping-get-type" href="poppler/poppler-poppler-page.html#poppler-link-mapping-get-type">
+<ANCHOR id="poppler-link-mapping-new" href="poppler/poppler-poppler-page.html#poppler-link-mapping-new">
+<ANCHOR id="poppler-link-mapping-copy" href="poppler/poppler-poppler-page.html#poppler-link-mapping-copy">
+<ANCHOR id="poppler-link-mapping-free" href="poppler/poppler-poppler-page.html#poppler-link-mapping-free">
+<ANCHOR id="POPPLER-TYPE-IMAGE-MAPPING--CAPS" href="poppler/poppler-poppler-page.html#POPPLER-TYPE-IMAGE-MAPPING--CAPS">
+<ANCHOR id="PopplerImageMapping" href="poppler/poppler-poppler-page.html#PopplerImageMapping">
+<ANCHOR id="poppler-image-mapping-get-type" href="poppler/poppler-poppler-page.html#poppler-image-mapping-get-type">
+<ANCHOR id="poppler-image-mapping-new" href="poppler/poppler-poppler-page.html#poppler-image-mapping-new">
+<ANCHOR id="poppler-image-mapping-copy" href="poppler/poppler-poppler-page.html#poppler-image-mapping-copy">
+<ANCHOR id="poppler-image-mapping-free" href="poppler/poppler-poppler-page.html#poppler-image-mapping-free">
+<ANCHOR id="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS" href="poppler/poppler-poppler-page.html#POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS">
+<ANCHOR id="PopplerFormFieldMapping" href="poppler/poppler-poppler-page.html#PopplerFormFieldMapping">
+<ANCHOR id="poppler-form-field-mapping-get-type" href="poppler/poppler-poppler-page.html#poppler-form-field-mapping-get-type">
+<ANCHOR id="poppler-form-field-mapping-new" href="poppler/poppler-poppler-page.html#poppler-form-field-mapping-new">
+<ANCHOR id="poppler-form-field-mapping-copy" href="poppler/poppler-poppler-page.html#poppler-form-field-mapping-copy">
+<ANCHOR id="poppler-form-field-mapping-free" href="poppler/poppler-poppler-page.html#poppler-form-field-mapping-free">
+<ANCHOR id="poppler-poppler-action" href="poppler/poppler-poppler-action.html">
+<ANCHOR id="poppler-poppler-action.synopsis" href="poppler/poppler-poppler-action.html#poppler-poppler-action.synopsis">
+<ANCHOR id="poppler-poppler-action.description" href="poppler/poppler-poppler-action.html#poppler-poppler-action.description">
+<ANCHOR id="poppler-poppler-action.details" href="poppler/poppler-poppler-action.html#poppler-poppler-action.details">
+<ANCHOR id="PopplerActionType" href="poppler/poppler-poppler-action.html#PopplerActionType">
+<ANCHOR id="PopplerDestType" href="poppler/poppler-poppler-action.html#PopplerDestType">
+<ANCHOR id="PopplerActionAny" href="poppler/poppler-poppler-action.html#PopplerActionAny">
+<ANCHOR id="PopplerActionGotoDest" href="poppler/poppler-poppler-action.html#PopplerActionGotoDest">
+<ANCHOR id="PopplerActionGotoRemote" href="poppler/poppler-poppler-action.html#PopplerActionGotoRemote">
+<ANCHOR id="PopplerActionLaunch" href="poppler/poppler-poppler-action.html#PopplerActionLaunch">
+<ANCHOR id="PopplerActionUri" href="poppler/poppler-poppler-action.html#PopplerActionUri">
+<ANCHOR id="PopplerActionNamed" href="poppler/poppler-poppler-action.html#PopplerActionNamed">
+<ANCHOR id="PopplerActionMovie" href="poppler/poppler-poppler-action.html#PopplerActionMovie">
+<ANCHOR id="PopplerDest" href="poppler/poppler-poppler-action.html#PopplerDest">
+<ANCHOR id="PopplerAction" href="poppler/poppler-poppler-action.html#PopplerAction">
+<ANCHOR id="POPPLER-TYPE-ACTION--CAPS" href="poppler/poppler-poppler-action.html#POPPLER-TYPE-ACTION--CAPS">
+<ANCHOR id="POPPLER-ACTION--CAPS" href="poppler/poppler-poppler-action.html#POPPLER-ACTION--CAPS">
+<ANCHOR id="poppler-action-get-type" href="poppler/poppler-poppler-action.html#poppler-action-get-type">
+<ANCHOR id="poppler-action-copy" href="poppler/poppler-poppler-action.html#poppler-action-copy">
+<ANCHOR id="poppler-action-free" href="poppler/poppler-poppler-action.html#poppler-action-free">
+<ANCHOR id="POPPLER-TYPE-DEST--CAPS" href="poppler/poppler-poppler-action.html#POPPLER-TYPE-DEST--CAPS">
+<ANCHOR id="poppler-dest-get-type" href="poppler/poppler-poppler-action.html#poppler-dest-get-type">
+<ANCHOR id="poppler-dest-copy" href="poppler/poppler-poppler-action.html#poppler-dest-copy">
+<ANCHOR id="poppler-dest-free" href="poppler/poppler-poppler-action.html#poppler-dest-free">
+<ANCHOR id="poppler-poppler-attachment" href="poppler/poppler-poppler-attachment.html">
+<ANCHOR id="poppler-poppler-attachment.synopsis" href="poppler/poppler-poppler-attachment.html#poppler-poppler-attachment.synopsis">
+<ANCHOR id="PopplerAttachment" href="poppler/poppler-poppler-attachment.html#PopplerAttachment">
+<ANCHOR id="poppler-poppler-attachment.description" href="poppler/poppler-poppler-attachment.html#poppler-poppler-attachment.description">
+<ANCHOR id="poppler-poppler-attachment.details" href="poppler/poppler-poppler-attachment.html#poppler-poppler-attachment.details">
+<ANCHOR id="PopplerAttachment-struct" href="poppler/poppler-poppler-attachment.html#PopplerAttachment-struct">
+<ANCHOR id="poppler-attachment-save" href="poppler/poppler-poppler-attachment.html#poppler-attachment-save">
+<ANCHOR id="poppler-attachment-save-to-callback" href="poppler/poppler-poppler-attachment.html#poppler-attachment-save-to-callback">
+<ANCHOR id="PopplerAttachmentSaveFunc" href="poppler/poppler-poppler-attachment.html#PopplerAttachmentSaveFunc">
+<ANCHOR id="poppler-poppler-form-field" href="poppler/poppler-poppler-form-field.html">
+<ANCHOR id="poppler-poppler-form-field.synopsis" href="poppler/poppler-poppler-form-field.html#poppler-poppler-form-field.synopsis">
+<ANCHOR id="PopplerFormField" href="poppler/poppler-poppler-form-field.html#PopplerFormField">
+<ANCHOR id="poppler-poppler-form-field.object-hierarchy" href="poppler/poppler-poppler-form-field.html#poppler-poppler-form-field.object-hierarchy">
+<ANCHOR id="poppler-poppler-form-field.description" href="poppler/poppler-poppler-form-field.html#poppler-poppler-form-field.description">
+<ANCHOR id="poppler-poppler-form-field.details" href="poppler/poppler-poppler-form-field.html#poppler-poppler-form-field.details">
+<ANCHOR id="PopplerFormField-struct" href="poppler/poppler-poppler-form-field.html#PopplerFormField-struct">
+<ANCHOR id="PopplerFormButtonType" href="poppler/poppler-poppler-form-field.html#PopplerFormButtonType">
+<ANCHOR id="PopplerFormChoiceType" href="poppler/poppler-poppler-form-field.html#PopplerFormChoiceType">
+<ANCHOR id="PopplerFormFieldType" href="poppler/poppler-poppler-form-field.html#PopplerFormFieldType">
+<ANCHOR id="PopplerFormTextType" href="poppler/poppler-poppler-form-field.html#PopplerFormTextType">
+<ANCHOR id="poppler-form-field-get-id" href="poppler/poppler-poppler-form-field.html#poppler-form-field-get-id">
+<ANCHOR id="poppler-form-field-get-field-type" href="poppler/poppler-poppler-form-field.html#poppler-form-field-get-field-type">
+<ANCHOR id="poppler-form-field-is-read-only" href="poppler/poppler-poppler-form-field.html#poppler-form-field-is-read-only">
+<ANCHOR id="poppler-form-field-get-font-size" href="poppler/poppler-poppler-form-field.html#poppler-form-field-get-font-size">
+<ANCHOR id="poppler-form-field-button-get-button-type" href="poppler/poppler-poppler-form-field.html#poppler-form-field-button-get-button-type">
+<ANCHOR id="poppler-form-field-button-get-state" href="poppler/poppler-poppler-form-field.html#poppler-form-field-button-get-state">
+<ANCHOR id="poppler-form-field-button-set-state" href="poppler/poppler-poppler-form-field.html#poppler-form-field-button-set-state">
+<ANCHOR id="poppler-form-field-choice-can-select-multiple" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-can-select-multiple">
+<ANCHOR id="poppler-form-field-choice-commit-on-change" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-commit-on-change">
+<ANCHOR id="poppler-form-field-choice-do-spell-check" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-do-spell-check">
+<ANCHOR id="poppler-form-field-choice-get-choice-type" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-get-choice-type">
+<ANCHOR id="poppler-form-field-choice-get-item" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-get-item">
+<ANCHOR id="poppler-form-field-choice-get-n-items" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-get-n-items">
+<ANCHOR id="poppler-form-field-choice-get-text" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-get-text">
+<ANCHOR id="poppler-form-field-choice-is-editable" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-is-editable">
+<ANCHOR id="poppler-form-field-choice-is-item-selected" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-is-item-selected">
+<ANCHOR id="poppler-form-field-choice-select-item" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-select-item">
+<ANCHOR id="poppler-form-field-choice-set-text" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-set-text">
+<ANCHOR id="poppler-form-field-choice-toggle-item" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-toggle-item">
+<ANCHOR id="poppler-form-field-choice-unselect-all" href="poppler/poppler-poppler-form-field.html#poppler-form-field-choice-unselect-all">
+<ANCHOR id="poppler-form-field-text-do-scroll" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-do-scroll">
+<ANCHOR id="poppler-form-field-text-do-spell-check" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-do-spell-check">
+<ANCHOR id="poppler-form-field-text-get-max-len" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-get-max-len">
+<ANCHOR id="poppler-form-field-text-get-text" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-get-text">
+<ANCHOR id="poppler-form-field-text-get-text-type" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-get-text-type">
+<ANCHOR id="poppler-form-field-text-is-password" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-is-password">
+<ANCHOR id="poppler-form-field-text-is-rich-text" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-is-rich-text">
+<ANCHOR id="poppler-form-field-text-set-text" href="poppler/poppler-poppler-form-field.html#poppler-form-field-text-set-text">
+<ANCHOR id="poppler-poppler-enums" href="poppler/poppler-poppler-enums.html">
+<ANCHOR id="poppler-poppler-enums.synopsis" href="poppler/poppler-poppler-enums.html#poppler-poppler-enums.synopsis">
+<ANCHOR id="poppler-poppler-enums.description" href="poppler/poppler-poppler-enums.html#poppler-poppler-enums.description">
+<ANCHOR id="poppler-poppler-enums.details" href="poppler/poppler-poppler-enums.html#poppler-poppler-enums.details">
+<ANCHOR id="POPPLER-TYPE-ACTION-TYPE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-ACTION-TYPE--CAPS">
+<ANCHOR id="poppler-action-type-get-type" href="poppler/poppler-poppler-enums.html#poppler-action-type-get-type">
+<ANCHOR id="POPPLER-TYPE-DEST-TYPE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-DEST-TYPE--CAPS">
+<ANCHOR id="poppler-dest-type-get-type" href="poppler/poppler-poppler-enums.html#poppler-dest-type-get-type">
+<ANCHOR id="POPPLER-TYPE-PAGE-LAYOUT--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PAGE-LAYOUT--CAPS">
+<ANCHOR id="poppler-page-layout-get-type" href="poppler/poppler-poppler-enums.html#poppler-page-layout-get-type">
+<ANCHOR id="POPPLER-TYPE-PAGE-MODE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PAGE-MODE--CAPS">
+<ANCHOR id="poppler-page-mode-get-type" href="poppler/poppler-poppler-enums.html#poppler-page-mode-get-type">
+<ANCHOR id="POPPLER-TYPE-FONT-TYPE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-FONT-TYPE--CAPS">
+<ANCHOR id="poppler-font-type-get-type" href="poppler/poppler-poppler-enums.html#poppler-font-type-get-type">
+<ANCHOR id="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-VIEWER-PREFERENCES--CAPS">
+<ANCHOR id="poppler-viewer-preferences-get-type" href="poppler/poppler-poppler-enums.html#poppler-viewer-preferences-get-type">
+<ANCHOR id="POPPLER-TYPE-PERMISSIONS--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PERMISSIONS--CAPS">
+<ANCHOR id="poppler-permissions-get-type" href="poppler/poppler-poppler-enums.html#poppler-permissions-get-type">
+<ANCHOR id="POPPLER-TYPE-SELECTION-STYLE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-SELECTION-STYLE--CAPS">
+<ANCHOR id="poppler-selection-style-get-type" href="poppler/poppler-poppler-enums.html#poppler-selection-style-get-type">
+<ANCHOR id="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS">
+<ANCHOR id="poppler-page-transition-type-get-type" href="poppler/poppler-poppler-enums.html#poppler-page-transition-type-get-type">
+<ANCHOR id="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS">
+<ANCHOR id="poppler-page-transition-alignment-get-type" href="poppler/poppler-poppler-enums.html#poppler-page-transition-alignment-get-type">
+<ANCHOR id="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS">
+<ANCHOR id="poppler-page-transition-direction-get-type" href="poppler/poppler-poppler-enums.html#poppler-page-transition-direction-get-type">
+<ANCHOR id="POPPLER-TYPE-ERROR--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-ERROR--CAPS">
+<ANCHOR id="poppler-error-get-type" href="poppler/poppler-poppler-enums.html#poppler-error-get-type">
+<ANCHOR id="POPPLER-TYPE-ORIENTATION--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-ORIENTATION--CAPS">
+<ANCHOR id="poppler-orientation-get-type" href="poppler/poppler-poppler-enums.html#poppler-orientation-get-type">
+<ANCHOR id="POPPLER-TYPE-BACKEND--CAPS" href="poppler/poppler-poppler-enums.html#POPPLER-TYPE-BACKEND--CAPS">
+<ANCHOR id="poppler-backend-get-type" href="poppler/poppler-poppler-enums.html#poppler-backend-get-type">
+<ANCHOR id="poppler-poppler-annot" href="poppler/poppler-poppler-annot.html">
+<ANCHOR id="poppler-poppler-annot.synopsis" href="poppler/poppler-poppler-annot.html#poppler-poppler-annot.synopsis">
+<ANCHOR id="poppler-poppler-annot.description" href="poppler/poppler-poppler-annot.html#poppler-poppler-annot.description">
+<ANCHOR id="poppler-poppler-annot.details" href="poppler/poppler-poppler-annot.html#poppler-poppler-annot.details">
+<ANCHOR id="PopplerAnnot" href="poppler/poppler-poppler-annot.html#PopplerAnnot">
+<ANCHOR id="poppler-annot-callout-line-copy" href="poppler/poppler-poppler-annot.html#poppler-annot-callout-line-copy">
+<ANCHOR id="poppler-annot-callout-line-free" href="poppler/poppler-poppler-annot.html#poppler-annot-callout-line-free">
+<ANCHOR id="poppler-annot-callout-line-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-callout-line-get-type">
+<ANCHOR id="poppler-annot-callout-line-new" href="poppler/poppler-poppler-annot.html#poppler-annot-callout-line-new">
+<ANCHOR id="poppler-annot-external-data-type-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-external-data-type-get-type">
+<ANCHOR id="poppler-annot-flag-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-flag-get-type">
+<ANCHOR id="poppler-annot-free-text-get-callout-line" href="poppler/poppler-poppler-annot.html#poppler-annot-free-text-get-callout-line">
+<ANCHOR id="poppler-annot-free-text-get-quadding" href="poppler/poppler-poppler-annot.html#poppler-annot-free-text-get-quadding">
+<ANCHOR id="poppler-annot-free-text-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-free-text-get-type">
+<ANCHOR id="poppler-annot-free-text-quadding-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-free-text-quadding-get-type">
+<ANCHOR id="poppler-annot-get-annot-type" href="poppler/poppler-poppler-annot.html#poppler-annot-get-annot-type">
+<ANCHOR id="poppler-annot-get-color" href="poppler/poppler-poppler-annot.html#poppler-annot-get-color">
+<ANCHOR id="poppler-annot-get-contents" href="poppler/poppler-poppler-annot.html#poppler-annot-get-contents">
+<ANCHOR id="poppler-annot-get-flags" href="poppler/poppler-poppler-annot.html#poppler-annot-get-flags">
+<ANCHOR id="poppler-annot-get-modified" href="poppler/poppler-poppler-annot.html#poppler-annot-get-modified">
+<ANCHOR id="poppler-annot-get-name" href="poppler/poppler-poppler-annot.html#poppler-annot-get-name">
+<ANCHOR id="poppler-annot-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-get-type">
+<ANCHOR id="poppler-annot-mapping-copy" href="poppler/poppler-poppler-annot.html#poppler-annot-mapping-copy">
+<ANCHOR id="poppler-annot-mapping-free" href="poppler/poppler-poppler-annot.html#poppler-annot-mapping-free">
+<ANCHOR id="poppler-annot-mapping-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-mapping-get-type">
+<ANCHOR id="poppler-annot-mapping-new" href="poppler/poppler-poppler-annot.html#poppler-annot-mapping-new">
+<ANCHOR id="poppler-annot-markup-get-date" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-date">
+<ANCHOR id="poppler-annot-markup-get-external-data" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-external-data">
+<ANCHOR id="poppler-annot-markup-get-label" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-label">
+<ANCHOR id="poppler-annot-markup-get-opacity" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-opacity">
+<ANCHOR id="poppler-annot-markup-get-popup-is-open" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-popup-is-open">
+<ANCHOR id="poppler-annot-markup-get-reply-to" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-reply-to">
+<ANCHOR id="poppler-annot-markup-get-subject" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-subject">
+<ANCHOR id="poppler-annot-markup-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-get-type">
+<ANCHOR id="poppler-annot-markup-reply-type-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-markup-reply-type-get-type">
+<ANCHOR id="poppler-annot-text-get-icon" href="poppler/poppler-poppler-annot.html#poppler-annot-text-get-icon">
+<ANCHOR id="poppler-annot-text-get-is-open" href="poppler/poppler-poppler-annot.html#poppler-annot-text-get-is-open">
+<ANCHOR id="poppler-annot-text-get-state" href="poppler/poppler-poppler-annot.html#poppler-annot-text-get-state">
+<ANCHOR id="poppler-annot-text-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-text-get-type">
+<ANCHOR id="poppler-annot-text-state-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-text-state-get-type">
+<ANCHOR id="poppler-annot-type-get-type" href="poppler/poppler-poppler-annot.html#poppler-annot-type-get-type">
+<ANCHOR id="poppler-poppler-layer" href="poppler/poppler-poppler-layer.html">
+<ANCHOR id="poppler-poppler-layer.synopsis" href="poppler/poppler-poppler-layer.html#poppler-poppler-layer.synopsis">
+<ANCHOR id="poppler-poppler-layer.description" href="poppler/poppler-poppler-layer.html#poppler-poppler-layer.description">
+<ANCHOR id="poppler-poppler-layer.details" href="poppler/poppler-poppler-layer.html#poppler-poppler-layer.details">
+<ANCHOR id="poppler-layer-get-type" href="poppler/poppler-poppler-layer.html#poppler-layer-get-type">
+<ANCHOR id="poppler-layer-get-title" href="poppler/poppler-poppler-layer.html#poppler-layer-get-title">
+<ANCHOR id="poppler-layer-is-visible" href="poppler/poppler-poppler-layer.html#poppler-layer-is-visible">
+<ANCHOR id="poppler-layer-show" href="poppler/poppler-poppler-layer.html#poppler-layer-show">
+<ANCHOR id="poppler-layer-hide" href="poppler/poppler-poppler-layer.html#poppler-layer-hide">
+<ANCHOR id="poppler-layer-is-parent" href="poppler/poppler-poppler-layer.html#poppler-layer-is-parent">
+<ANCHOR id="poppler-layer-get-radio-button-group-id" href="poppler/poppler-poppler-layer.html#poppler-layer-get-radio-button-group-id">
+<ANCHOR id="poppler-poppler-features" href="poppler/poppler-poppler-features.html">
+<ANCHOR id="poppler-poppler-features.synopsis" href="poppler/poppler-poppler-features.html#poppler-poppler-features.synopsis">
+<ANCHOR id="poppler-poppler-features.description" href="poppler/poppler-poppler-features.html#poppler-poppler-features.description">
+<ANCHOR id="poppler-poppler-features.details" href="poppler/poppler-poppler-features.html#poppler-poppler-features.details">
+<ANCHOR id="POPPLER-HAS-CAIRO--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-HAS-CAIRO--CAPS">
+<ANCHOR id="POPPLER-WITH-GDK--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-WITH-GDK--CAPS">
+<ANCHOR id="POPPLER-MAJOR-VERSION--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-MAJOR-VERSION--CAPS">
+<ANCHOR id="POPPLER-MINOR-VERSION--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-MINOR-VERSION--CAPS">
+<ANCHOR id="POPPLER-MICRO-VERSION--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-MICRO-VERSION--CAPS">
+<ANCHOR id="POPPLER-CHECK-VERSION--CAPS" href="poppler/poppler-poppler-features.html#POPPLER-CHECK-VERSION--CAPS">
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/left.png b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/left.png
new file mode 100644
index 00000000000..2d05b3d5b4a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/left.png
Binary files differ
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-action.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-action.html
new file mode 100644
index 00000000000..27f85f3920a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-action.html
@@ -0,0 +1,386 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerAction</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-page.html" title="PopplerPage">
+<link rel="next" href="poppler-poppler-attachment.html" title="PopplerAttachment">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-page.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-attachment.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-action.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-action.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerAction">
+<a name="poppler-poppler-action"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-action.top_of_page"></a>PopplerAction</span></h2>
+<p>PopplerAction — Action links</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-action.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+enum <a class="link" href="poppler-poppler-action.html#PopplerActionType" title="enum PopplerActionType">PopplerActionType</a>;
+enum <a class="link" href="poppler-poppler-action.html#PopplerDestType" title="enum PopplerDestType">PopplerDestType</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionAny" title="PopplerActionAny">PopplerActionAny</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionGotoDest" title="PopplerActionGotoDest">PopplerActionGotoDest</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionGotoRemote" title="PopplerActionGotoRemote">PopplerActionGotoRemote</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionLaunch" title="PopplerActionLaunch">PopplerActionLaunch</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionUri" title="PopplerActionUri">PopplerActionUri</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionNamed" title="PopplerActionNamed">PopplerActionNamed</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerActionMovie" title="PopplerActionMovie">PopplerActionMovie</a>;
+ <a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a>;
+union <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a>;
+#define <a class="link" href="poppler-poppler-action.html#POPPLER-TYPE-ACTION--CAPS" title="POPPLER_TYPE_ACTION">POPPLER_TYPE_ACTION</a>
+#define <a class="link" href="poppler-poppler-action.html#POPPLER-ACTION--CAPS" title="POPPLER_ACTION()">POPPLER_ACTION</a> (obj)
+GType <a class="link" href="poppler-poppler-action.html#poppler-action-get-type" title="poppler_action_get_type ()">poppler_action_get_type</a> (void);
+<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> * <a class="link" href="poppler-poppler-action.html#poppler-action-copy" title="poppler_action_copy ()">poppler_action_copy</a> (<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> *action);
+void <a class="link" href="poppler-poppler-action.html#poppler-action-free" title="poppler_action_free ()">poppler_action_free</a> (<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> *action);
+#define <a class="link" href="poppler-poppler-action.html#POPPLER-TYPE-DEST--CAPS" title="POPPLER_TYPE_DEST">POPPLER_TYPE_DEST</a>
+GType <a class="link" href="poppler-poppler-action.html#poppler-dest-get-type" title="poppler_dest_get_type ()">poppler_dest_get_type</a> (void);
+<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> * <a class="link" href="poppler-poppler-action.html#poppler-dest-copy" title="poppler_dest_copy ()">poppler_dest_copy</a> (<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> *dest);
+void <a class="link" href="poppler-poppler-action.html#poppler-dest-free" title="poppler_dest_free ()">poppler_dest_free</a> (<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> *dest);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-action.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-action.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum PopplerActionType">
+<a name="PopplerActionType"></a><h3>enum PopplerActionType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_ACTION_UNKNOWN, /* unknown action */
+ POPPLER_ACTION_NONE, /* no action specified */
+ POPPLER_ACTION_GOTO_DEST, /* go to destination */
+ POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
+ POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
+ POPPLER_ACTION_URI, /* URI */
+ POPPLER_ACTION_NAMED, /* named action*/
+ POPPLER_ACTION_MOVIE /* movie action */
+} PopplerActionType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerDestType">
+<a name="PopplerDestType"></a><h3>enum PopplerDestType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_DEST_UNKNOWN,
+ POPPLER_DEST_XYZ,
+ POPPLER_DEST_FIT,
+ POPPLER_DEST_FITH,
+ POPPLER_DEST_FITV,
+ POPPLER_DEST_FITR,
+ POPPLER_DEST_FITB,
+ POPPLER_DEST_FITBH,
+ POPPLER_DEST_FITBV,
+ POPPLER_DEST_NAMED
+} PopplerDestType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionAny">
+<a name="PopplerActionAny"></a><h3>PopplerActionAny</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+} PopplerActionAny;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionGotoDest">
+<a name="PopplerActionGotoDest"></a><h3>PopplerActionGotoDest</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ PopplerDest *dest;
+} PopplerActionGotoDest;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionGotoRemote">
+<a name="PopplerActionGotoRemote"></a><h3>PopplerActionGotoRemote</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ PopplerDest *dest;
+} PopplerActionGotoRemote;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionLaunch">
+<a name="PopplerActionLaunch"></a><h3>PopplerActionLaunch</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ gchar *params;
+} PopplerActionLaunch;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionUri">
+<a name="PopplerActionUri"></a><h3>PopplerActionUri</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ char *uri;
+} PopplerActionUri;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionNamed">
+<a name="PopplerActionNamed"></a><h3>PopplerActionNamed</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *named_dest;
+} PopplerActionNamed;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerActionMovie">
+<a name="PopplerActionMovie"></a><h3>PopplerActionMovie</h3>
+<pre class="programlisting">typedef struct {
+ PopplerActionType type;
+ gchar *title;
+} PopplerActionMovie;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerDest">
+<a name="PopplerDest"></a><h3>PopplerDest</h3>
+<pre class="programlisting">typedef struct {
+ PopplerDestType type;
+
+ int page_num;
+ double left;
+ double bottom;
+ double right;
+ double top;
+ double zoom;
+ gchar *named_dest;
+ guint change_left : 1;
+ guint change_top : 1;
+ guint change_zoom : 1;
+} PopplerDest;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="union PopplerAction">
+<a name="PopplerAction"></a><h3>union PopplerAction</h3>
+<pre class="programlisting">union PopplerAction
+{
+ PopplerActionType type;
+ PopplerActionAny any;
+ PopplerActionGotoDest goto_dest;
+ PopplerActionGotoRemote goto_remote;
+ PopplerActionLaunch launch;
+ PopplerActionUri uri;
+ PopplerActionNamed named;
+ PopplerActionMovie movie;
+};
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_ACTION">
+<a name="POPPLER-TYPE-ACTION--CAPS"></a><h3>POPPLER_TYPE_ACTION</h3>
+<pre class="programlisting">#define POPPLER_TYPE_ACTION (poppler_action_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_ACTION()">
+<a name="POPPLER-ACTION--CAPS"></a><h3>POPPLER_ACTION()</h3>
+<pre class="programlisting">#define POPPLER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ACTION, PopplerAction))
+</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_action_get_type ()">
+<a name="poppler-action-get-type"></a><h3>poppler_action_get_type ()</h3>
+<pre class="programlisting">GType poppler_action_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_action_copy ()">
+<a name="poppler-action-copy"></a><h3>poppler_action_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> * poppler_action_copy (<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> *action);</pre>
+<p>
+Copies <em class="parameter"><code>action</code></em>, creating an identical <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new action identical to <em class="parameter"><code>action</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_action_free ()">
+<a name="poppler-action-free"></a><h3>poppler_action_free ()</h3>
+<pre class="programlisting">void poppler_action_free (<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> *action);</pre>
+<p>
+Frees <em class="parameter"><code>action</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_DEST">
+<a name="POPPLER-TYPE-DEST--CAPS"></a><h3>POPPLER_TYPE_DEST</h3>
+<pre class="programlisting">#define POPPLER_TYPE_DEST (poppler_dest_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_dest_get_type ()">
+<a name="poppler-dest-get-type"></a><h3>poppler_dest_get_type ()</h3>
+<pre class="programlisting">GType poppler_dest_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_dest_copy ()">
+<a name="poppler-dest-copy"></a><h3>poppler_dest_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> * poppler_dest_copy (<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> *dest);</pre>
+<p>
+Copies <em class="parameter"><code>dest</code></em>, creating an identical <a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest"><span class="type">PopplerDest</span></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest"><span class="type">PopplerDest</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new destination identical to <em class="parameter"><code>dest</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_dest_free ()">
+<a name="poppler-dest-free"></a><h3>poppler_dest_free ()</h3>
+<pre class="programlisting">void poppler_dest_free (<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> *dest);</pre>
+<p>
+Frees <em class="parameter"><code>dest</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest"><span class="type">PopplerDest</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-annot.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-annot.html
new file mode 100644
index 00000000000..4713634826d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-annot.html
@@ -0,0 +1,854 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerAnnot</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-enums.html" title="poppler-enums">
+<link rel="next" href="poppler-poppler-layer.html" title="PopplerLayer">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-enums.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-layer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-annot.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-annot.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerAnnot">
+<a name="poppler-poppler-annot"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-annot.top_of_page"></a>PopplerAnnot</span></h2>
+<p>PopplerAnnot — Annotations</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-annot.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+ <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a>;
+PopplerAnnotCalloutLine * <a class="link" href="poppler-poppler-annot.html#poppler-annot-callout-line-copy" title="poppler_annot_callout_line_copy ()">poppler_annot_callout_line_copy</a>
+ (PopplerAnnotCalloutLine *callout);
+void <a class="link" href="poppler-poppler-annot.html#poppler-annot-callout-line-free" title="poppler_annot_callout_line_free ()">poppler_annot_callout_line_free</a> (PopplerAnnotCalloutLine *callout);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-callout-line-get-type" title="poppler_annot_callout_line_get_type ()">poppler_annot_callout_line_get_type</a> (void);
+PopplerAnnotCalloutLine * <a class="link" href="poppler-poppler-annot.html#poppler-annot-callout-line-new" title="poppler_annot_callout_line_new ()">poppler_annot_callout_line_new</a>
+ (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-external-data-type-get-type" title="poppler_annot_external_data_type_get_type ()">poppler_annot_external_data_type_get_type</a>
+ (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-flag-get-type" title="poppler_annot_flag_get_type ()">poppler_annot_flag_get_type</a> (void);
+PopplerAnnotCalloutLine * <a class="link" href="poppler-poppler-annot.html#poppler-annot-free-text-get-callout-line" title="poppler_annot_free_text_get_callout_line ()">poppler_annot_free_text_get_callout_line</a>
+ (PopplerAnnotFreeText *poppler_annot);
+PopplerAnnotFreeTextQuadding <a class="link" href="poppler-poppler-annot.html#poppler-annot-free-text-get-quadding" title="poppler_annot_free_text_get_quadding ()">poppler_annot_free_text_get_quadding</a>
+ (PopplerAnnotFreeText *poppler_annot);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-free-text-get-type" title="poppler_annot_free_text_get_type ()">poppler_annot_free_text_get_type</a> (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-free-text-quadding-get-type" title="poppler_annot_free_text_quadding_get_type ()">poppler_annot_free_text_quadding_get_type</a>
+ (void);
+PopplerAnnotType <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-annot-type" title="poppler_annot_get_annot_type ()">poppler_annot_get_annot_type</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+PopplerColor * <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-color" title="poppler_annot_get_color ()">poppler_annot_get_color</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-contents" title="poppler_annot_get_contents ()">poppler_annot_get_contents</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+PopplerAnnotFlag <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-flags" title="poppler_annot_get_flags ()">poppler_annot_get_flags</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-modified" title="poppler_annot_get_modified ()">poppler_annot_get_modified</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-name" title="poppler_annot_get_name ()">poppler_annot_get_name</a> (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-get-type" title="poppler_annot_get_type ()">poppler_annot_get_type</a> (void);
+PopplerAnnotMapping * <a class="link" href="poppler-poppler-annot.html#poppler-annot-mapping-copy" title="poppler_annot_mapping_copy ()">poppler_annot_mapping_copy</a> (PopplerAnnotMapping *mapping);
+void <a class="link" href="poppler-poppler-annot.html#poppler-annot-mapping-free" title="poppler_annot_mapping_free ()">poppler_annot_mapping_free</a> (PopplerAnnotMapping *mapping);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-mapping-get-type" title="poppler_annot_mapping_get_type ()">poppler_annot_mapping_get_type</a> (void);
+PopplerAnnotMapping * <a class="link" href="poppler-poppler-annot.html#poppler-annot-mapping-new" title="poppler_annot_mapping_new ()">poppler_annot_mapping_new</a> (void);
+GDate * <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-date" title="poppler_annot_markup_get_date ()">poppler_annot_markup_get_date</a> (PopplerAnnotMarkup *poppler_annot);
+PopplerAnnotExternalDataType <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-external-data" title="poppler_annot_markup_get_external_data ()">poppler_annot_markup_get_external_data</a>
+ (PopplerAnnotMarkup *poppler_annot);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-label" title="poppler_annot_markup_get_label ()">poppler_annot_markup_get_label</a> (PopplerAnnotMarkup *poppler_annot);
+gdouble <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-opacity" title="poppler_annot_markup_get_opacity ()">poppler_annot_markup_get_opacity</a> (PopplerAnnotMarkup *poppler_annot);
+gboolean <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-popup-is-open" title="poppler_annot_markup_get_popup_is_open ()">poppler_annot_markup_get_popup_is_open</a>
+ (PopplerAnnotMarkup *poppler_annot);
+PopplerAnnotMarkupReplyType <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-reply-to" title="poppler_annot_markup_get_reply_to ()">poppler_annot_markup_get_reply_to</a>
+ (PopplerAnnotMarkup *poppler_annot);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-subject" title="poppler_annot_markup_get_subject ()">poppler_annot_markup_get_subject</a> (PopplerAnnotMarkup *poppler_annot);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-get-type" title="poppler_annot_markup_get_type ()">poppler_annot_markup_get_type</a> (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-markup-reply-type-get-type" title="poppler_annot_markup_reply_type_get_type ()">poppler_annot_markup_reply_type_get_type</a>
+ (void);
+gchar * <a class="link" href="poppler-poppler-annot.html#poppler-annot-text-get-icon" title="poppler_annot_text_get_icon ()">poppler_annot_text_get_icon</a> (PopplerAnnotText *poppler_annot);
+gboolean <a class="link" href="poppler-poppler-annot.html#poppler-annot-text-get-is-open" title="poppler_annot_text_get_is_open ()">poppler_annot_text_get_is_open</a> (PopplerAnnotText *poppler_annot);
+PopplerAnnotTextState <a class="link" href="poppler-poppler-annot.html#poppler-annot-text-get-state" title="poppler_annot_text_get_state ()">poppler_annot_text_get_state</a> (PopplerAnnotText *poppler_annot);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-text-get-type" title="poppler_annot_text_get_type ()">poppler_annot_text_get_type</a> (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-text-state-get-type" title="poppler_annot_text_state_get_type ()">poppler_annot_text_state_get_type</a> (void);
+GType <a class="link" href="poppler-poppler-annot.html#poppler-annot-type-get-type" title="poppler_annot_type_get_type ()">poppler_annot_type_get_type</a> (void);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-annot.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-annot.details"></a><h2>Details</h2>
+<div class="refsect2" title="PopplerAnnot">
+<a name="PopplerAnnot"></a><h3>PopplerAnnot</h3>
+<pre class="programlisting">typedef struct _PopplerAnnot PopplerAnnot;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_callout_line_copy ()">
+<a name="poppler-annot-callout-line-copy"></a><h3>poppler_annot_callout_line_copy ()</h3>
+<pre class="programlisting">PopplerAnnotCalloutLine * poppler_annot_callout_line_copy
+ (PopplerAnnotCalloutLine *callout);</pre>
+<p>
+It does copy <em class="parameter"><code>callout</code></em> to a new <span class="type">PopplerAnnotCalloutLine</span>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>callout</code></em> :</span></p></td>
+<td> the <span class="type">PopplerAnnotCalloutline</span> to be copied.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated <span class="type">PopplerAnnotCalloutLine</span> as exact copy of
+ <em class="parameter"><code>callout</code></em>, NULL in other case. It must be freed when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_callout_line_free ()">
+<a name="poppler-annot-callout-line-free"></a><h3>poppler_annot_callout_line_free ()</h3>
+<pre class="programlisting">void poppler_annot_callout_line_free (PopplerAnnotCalloutLine *callout);</pre>
+<p>
+Frees the memory used by <span class="type">PopplerAnnotCalloutLine</span>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>callout</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotCalloutLine</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_callout_line_get_type ()">
+<a name="poppler-annot-callout-line-get-type"></a><h3>poppler_annot_callout_line_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_callout_line_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_callout_line_new ()">
+<a name="poppler-annot-callout-line-new"></a><h3>poppler_annot_callout_line_new ()</h3>
+<pre class="programlisting">PopplerAnnotCalloutLine * poppler_annot_callout_line_new
+ (void);</pre>
+<p>
+Creates a new empty <span class="type">PopplerAnnotCalloutLine</span>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated <span class="type">PopplerAnnotCalloutLine</span>, NULL in other case.
+ It must be freed when done.
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_external_data_type_get_type ()">
+<a name="poppler-annot-external-data-type-get-type"></a><h3>poppler_annot_external_data_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_external_data_type_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_flag_get_type ()">
+<a name="poppler-annot-flag-get-type"></a><h3>poppler_annot_flag_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_flag_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_free_text_get_callout_line ()">
+<a name="poppler-annot-free-text-get-callout-line"></a><h3>poppler_annot_free_text_get_callout_line ()</h3>
+<pre class="programlisting">PopplerAnnotCalloutLine * poppler_annot_free_text_get_callout_line
+ (PopplerAnnotFreeText *poppler_annot);</pre>
+<p>
+Retrieves a <span class="type">PopplerCalloutLine</span> of four or six numbers specifying a callout
+line attached to the <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotFreeText</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated <span class="type">PopplerCalloutLine</span> if the annot has a callout
+ line, NULL in other case. It must be freed with <code class="function">g_free()</code> when
+ done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_free_text_get_quadding ()">
+<a name="poppler-annot-free-text-get-quadding"></a><h3>poppler_annot_free_text_get_quadding ()</h3>
+<pre class="programlisting">PopplerAnnotFreeTextQuadding poppler_annot_free_text_get_quadding
+ (PopplerAnnotFreeText *poppler_annot);</pre>
+<p>
+Retrieves the justification of the text of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotFreeText</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotFreeTextQuadding</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_free_text_get_type ()">
+<a name="poppler-annot-free-text-get-type"></a><h3>poppler_annot_free_text_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_free_text_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_free_text_quadding_get_type ()">
+<a name="poppler-annot-free-text-quadding-get-type"></a><h3>poppler_annot_free_text_quadding_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_free_text_quadding_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_annot_type ()">
+<a name="poppler-annot-get-annot-type"></a><h3>poppler_annot_get_annot_type ()</h3>
+<pre class="programlisting">PopplerAnnotType poppler_annot_get_annot_type (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Gets the type of <em class="parameter"><code>poppler_annot</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotType</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_color ()">
+<a name="poppler-annot-get-color"></a><h3>poppler_annot_get_color ()</h3>
+<pre class="programlisting">PopplerColor * poppler_annot_get_color (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Retrieves the color of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated <span class="type">PopplerColor</span> with the color values of
+ <em class="parameter"><code>poppler_annot</code></em>, or <code class="literal">NULL</code>. It must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_contents ()">
+<a name="poppler-annot-get-contents"></a><h3>poppler_annot_get_contents ()</h3>
+<pre class="programlisting">gchar * poppler_annot_get_contents (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Retrieves the contents of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string with the contents of <em class="parameter"><code>poppler_annot</code></em>. It
+ must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_flags ()">
+<a name="poppler-annot-get-flags"></a><h3>poppler_annot_get_flags ()</h3>
+<pre class="programlisting">PopplerAnnotFlag poppler_annot_get_flags (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Retrieves the flag field specifying various characteristics of the
+<em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the flag field of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_modified ()">
+<a name="poppler-annot-get-modified"></a><h3>poppler_annot_get_modified ()</h3>
+<pre class="programlisting">gchar * poppler_annot_get_modified (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Retrieves the last modification data of <em class="parameter"><code>poppler_annot</code></em>. The returned
+string will be either a PDF format date or a text string.
+See also #<code class="function">poppler_date_parse()</code></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string with the last modification data of
+ <em class="parameter"><code>poppler_annot</code></em>. It must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_name ()">
+<a name="poppler-annot-get-name"></a><h3>poppler_annot_get_name ()</h3>
+<pre class="programlisting">gchar * poppler_annot_get_name (<a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot">PopplerAnnot</a> *poppler_annot);</pre>
+<p>
+Retrieves the name of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-annot.html#PopplerAnnot" title="PopplerAnnot"><span class="type">PopplerAnnot</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string with the name of <em class="parameter"><code>poppler_annot</code></em>. It must
+ be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_get_type ()">
+<a name="poppler-annot-get-type"></a><h3>poppler_annot_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_mapping_copy ()">
+<a name="poppler-annot-mapping-copy"></a><h3>poppler_annot_mapping_copy ()</h3>
+<pre class="programlisting">PopplerAnnotMapping * poppler_annot_mapping_copy (PopplerAnnotMapping *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_mapping_free ()">
+<a name="poppler-annot-mapping-free"></a><h3>poppler_annot_mapping_free ()</h3>
+<pre class="programlisting">void poppler_annot_mapping_free (PopplerAnnotMapping *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_mapping_get_type ()">
+<a name="poppler-annot-mapping-get-type"></a><h3>poppler_annot_mapping_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_mapping_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_mapping_new ()">
+<a name="poppler-annot-mapping-new"></a><h3>poppler_annot_mapping_new ()</h3>
+<pre class="programlisting">PopplerAnnotMapping * poppler_annot_mapping_new (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_date ()">
+<a name="poppler-annot-markup-get-date"></a><h3>poppler_annot_markup_get_date ()</h3>
+<pre class="programlisting">GDate * poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_external_data ()">
+<a name="poppler-annot-markup-get-external-data"></a><h3>poppler_annot_markup_get_external_data ()</h3>
+<pre class="programlisting">PopplerAnnotExternalDataType poppler_annot_markup_get_external_data
+ (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Gets the external data type of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotExternalDataType</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_label ()">
+<a name="poppler-annot-markup-get-label"></a><h3>poppler_annot_markup_get_label ()</h3>
+<pre class="programlisting">gchar * poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Retrieves the label text of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the label text of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_opacity ()">
+<a name="poppler-annot-markup-get-opacity"></a><h3>poppler_annot_markup_get_opacity ()</h3>
+<pre class="programlisting">gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Retrieves the opacity value of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the opacity value of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_popup_is_open ()">
+<a name="poppler-annot-markup-get-popup-is-open"></a><h3>poppler_annot_markup_get_popup_is_open ()</h3>
+<pre class="programlisting">gboolean poppler_annot_markup_get_popup_is_open
+ (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Retrieves the state of the popup annot related to <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the state of <em class="parameter"><code>poppler_annot</code></em>. <code class="literal">TRUE</code> if it's open, <code class="literal">FALSE</code> in
+ other case.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_reply_to ()">
+<a name="poppler-annot-markup-get-reply-to"></a><h3>poppler_annot_markup_get_reply_to ()</h3>
+<pre class="programlisting">PopplerAnnotMarkupReplyType poppler_annot_markup_get_reply_to
+ (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Gets the reply type of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotMarkupReplyType</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_subject ()">
+<a name="poppler-annot-markup-get-subject"></a><h3>poppler_annot_markup_get_subject ()</h3>
+<pre class="programlisting">gchar * poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot);</pre>
+<p>
+Retrives the subject text of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotMarkup</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the subject text of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_get_type ()">
+<a name="poppler-annot-markup-get-type"></a><h3>poppler_annot_markup_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_markup_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_markup_reply_type_get_type ()">
+<a name="poppler-annot-markup-reply-type-get-type"></a><h3>poppler_annot_markup_reply_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_markup_reply_type_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_text_get_icon ()">
+<a name="poppler-annot-text-get-icon"></a><h3>poppler_annot_text_get_icon ()</h3>
+<pre class="programlisting">gchar * poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot);</pre>
+<p>
+Gets the icon type of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotText</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotTextIcon</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_text_get_is_open ()">
+<a name="poppler-annot-text-get-is-open"></a><h3>poppler_annot_text_get_is_open ()</h3>
+<pre class="programlisting">gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot);</pre>
+<p>
+Retrieves the state of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotText</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the state of <em class="parameter"><code>poppler_annot</code></em>. <code class="literal">TRUE</code> if it's open, <code class="literal">FALSE</code> in
+ other case.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_text_get_state ()">
+<a name="poppler-annot-text-get-state"></a><h3>poppler_annot_text_get_state ()</h3>
+<pre class="programlisting">PopplerAnnotTextState poppler_annot_text_get_state (PopplerAnnotText *poppler_annot);</pre>
+<p>
+Retrieves the state of <em class="parameter"><code>poppler_annot</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>poppler_annot</code></em> :</span></p></td>
+<td> a <span class="type">PopplerAnnotText</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <span class="type">PopplerAnnotTextState</span> of <em class="parameter"><code>poppler_annot</code></em>.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_text_get_type ()">
+<a name="poppler-annot-text-get-type"></a><h3>poppler_annot_text_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_text_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_text_state_get_type ()">
+<a name="poppler-annot-text-state-get-type"></a><h3>poppler_annot_text_state_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_text_state_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_annot_type_get_type ()">
+<a name="poppler-annot-type-get-type"></a><h3>poppler_annot_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_annot_type_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-attachment.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-attachment.html
new file mode 100644
index 00000000000..25346664097
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-attachment.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerAttachment</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-action.html" title="PopplerAction">
+<link rel="next" href="poppler-poppler-form-field.html" title="PopplerFormField">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-action.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-form-field.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-attachment.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-attachment.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerAttachment">
+<a name="poppler-poppler-attachment"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-attachment.top_of_page"></a>PopplerAttachment</span></h2>
+<p>PopplerAttachment</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-attachment.synopsis"></a><h2>Synopsis</h2>
+<a name="PopplerAttachment"></a><pre class="synopsis">
+ <a class="link" href="poppler-poppler-attachment.html#PopplerAttachment-struct" title="PopplerAttachment">PopplerAttachment</a>;
+gboolean <a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save" title="poppler_attachment_save ()">poppler_attachment_save</a> (<a class="link" href="poppler-poppler-attachment.html#PopplerAttachment">PopplerAttachment</a> *attachment,
+ const char *filename,
+ GError **error);
+gboolean <a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()">poppler_attachment_save_to_callback</a> (<a class="link" href="poppler-poppler-attachment.html#PopplerAttachment">PopplerAttachment</a> *attachment,
+ <a class="link" href="poppler-poppler-attachment.html#PopplerAttachmentSaveFunc" title="PopplerAttachmentSaveFunc ()">PopplerAttachmentSaveFunc</a> save_func,
+ gpointer user_data,
+ GError **error);
+gboolean (<a class="link" href="poppler-poppler-attachment.html#PopplerAttachmentSaveFunc" title="PopplerAttachmentSaveFunc ()">*PopplerAttachmentSaveFunc</a>) (const gchar *buf,
+ gsize count,
+ gpointer data,
+ GError **error);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-attachment.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-attachment.details"></a><h2>Details</h2>
+<div class="refsect2" title="PopplerAttachment">
+<a name="PopplerAttachment-struct"></a><h3>PopplerAttachment</h3>
+<pre class="programlisting">typedef struct _PopplerAttachment PopplerAttachment;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_attachment_save ()">
+<a name="poppler-attachment-save"></a><h3>poppler_attachment_save ()</h3>
+<pre class="programlisting">gboolean poppler_attachment_save (<a class="link" href="poppler-poppler-attachment.html#PopplerAttachment">PopplerAttachment</a> *attachment,
+ const char *filename,
+ GError **error);</pre>
+<p>
+Saves <em class="parameter"><code>attachment</code></em> to a file indicated by <em class="parameter"><code>filename</code></em>. If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code>
+will be returned. Possible errors include those in the <span class="type">G_FILE_ERROR</span> domain
+and whatever the save function generates.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>attachment</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler-attachment.html#PopplerAttachment"><span class="type">PopplerAttachment</span></a>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
+<td> name of file to save
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td> return location for error, or <code class="literal">NULL</code>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if the file successfully saved
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_attachment_save_to_callback ()">
+<a name="poppler-attachment-save-to-callback"></a><h3>poppler_attachment_save_to_callback ()</h3>
+<pre class="programlisting">gboolean poppler_attachment_save_to_callback (<a class="link" href="poppler-poppler-attachment.html#PopplerAttachment">PopplerAttachment</a> *attachment,
+ <a class="link" href="poppler-poppler-attachment.html#PopplerAttachmentSaveFunc" title="PopplerAttachmentSaveFunc ()">PopplerAttachmentSaveFunc</a> save_func,
+ gpointer user_data,
+ GError **error);</pre>
+<p>
+Saves <em class="parameter"><code>attachment</code></em> by feeding the produced data to <em class="parameter"><code>save_func</code></em>. Can be used
+when you want to store the attachment to something other than a file, such as
+an in-memory buffer or a socket. If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be
+returned. Possible errors include those in the <span class="type">G_FILE_ERROR</span> domain and
+whatever the save function generates.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>attachment</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler-attachment.html#PopplerAttachment"><span class="type">PopplerAttachment</span></a>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>save_func</code></em> :</span></p></td>
+<td> a function that is called to save each block of data that the save routine generates.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td> user data to pass to the save function.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td> return location for error, or <code class="literal">NULL</code>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if the save successfully completed
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="PopplerAttachmentSaveFunc ()">
+<a name="PopplerAttachmentSaveFunc"></a><h3>PopplerAttachmentSaveFunc ()</h3>
+<pre class="programlisting">gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf,
+ gsize count,
+ gpointer data,
+ GError **error);</pre>
+<p>
+Specifies the type of the function passed to
+<a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>. It is called once for each block of
+bytes that is "written" by <a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>. If
+successful it should return <code class="literal">TRUE</code>. If an error occurs it should set
+<em class="parameter"><code>error</code></em> and return <code class="literal">FALSE</code>, in which case <a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>
+will fail with the same error.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
+<td>buffer containing bytes to be written.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
+<td>number of bytes in <em class="parameter"><code>buf</code></em>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
+<td>A location to return an error.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td>user data passed to <a class="link" href="poppler-poppler-attachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>%TRUE if successful, <code class="literal">FALSE</code> (with <em class="parameter"><code>error</code></em> set) if failed.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-document.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-document.html
new file mode 100644
index 00000000000..38ca0d4fa59
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-document.html
@@ -0,0 +1,1122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerDocument</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler.html" title="poppler">
+<link rel="next" href="poppler-poppler-page.html" title="PopplerPage">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-page.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-document.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-document.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerDocument">
+<a name="poppler-poppler-document"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-document.top_of_page"></a>PopplerDocument</span></h2>
+<p>PopplerDocument — Information about a document</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-document.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+enum <a class="link" href="poppler-poppler-document.html#PopplerPageLayout" title="enum PopplerPageLayout">PopplerPageLayout</a>;
+enum <a class="link" href="poppler-poppler-document.html#PopplerPageMode" title="enum PopplerPageMode">PopplerPageMode</a>;
+enum <a class="link" href="poppler-poppler-document.html#PopplerFontType" title="enum PopplerFontType">PopplerFontType</a>;
+enum <a class="link" href="poppler-poppler-document.html#PopplerViewerPreferences" title="enum PopplerViewerPreferences">PopplerViewerPreferences</a>;
+enum <a class="link" href="poppler-poppler-document.html#PopplerPermissions" title="enum PopplerPermissions">PopplerPermissions</a>;
+<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-new-from-file" title="poppler_document_new_from_file ()">poppler_document_new_from_file</a> (const char *uri,
+ const char *password,
+ GError **error);
+<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-new-from-data" title="poppler_document_new_from_data ()">poppler_document_new_from_data</a> (char *data,
+ int length,
+ const char *password,
+ GError **error);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-document-save" title="poppler_document_save ()">poppler_document_save</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *uri,
+ GError **error);
+int <a class="link" href="poppler-poppler-document.html#poppler-document-get-n-pages" title="poppler_document_get_n_pages ()">poppler_document_get_n_pages</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);
+<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-get-page" title="poppler_document_get_page ()">poppler_document_get_page</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ int index);
+<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-get-page-by-label" title="poppler_document_get_page_by_label ()">poppler_document_get_page_by_label</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *label);
+<a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-find-dest" title="poppler_document_find_dest ()">poppler_document_find_dest</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const gchar *link_name);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-document-has-attachments" title="poppler_document_has_attachments ()">poppler_document_has_attachments</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);
+GList * <a class="link" href="poppler-poppler-document.html#poppler-document-get-attachments" title="poppler_document_get_attachments ()">poppler_document_get_attachments</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);
+<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> * <a class="link" href="poppler-poppler-document.html#poppler-document-get-form-field" title="poppler_document_get_form_field ()">poppler_document_get_form_field</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ gint id);
+GType <a class="link" href="poppler-poppler-document.html#poppler-index-iter-get-type" title="poppler_index_iter_get_type ()">poppler_index_iter_get_type</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * <a class="link" href="poppler-poppler-document.html#poppler-index-iter-new" title="poppler_index_iter_new ()">poppler_index_iter_new</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);
+<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * <a class="link" href="poppler-poppler-document.html#poppler-index-iter-copy" title="poppler_index_iter_copy ()">poppler_index_iter_copy</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);
+void <a class="link" href="poppler-poppler-document.html#poppler-index-iter-free" title="poppler_index_iter_free ()">poppler_index_iter_free</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);
+<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * <a class="link" href="poppler-poppler-document.html#poppler-index-iter-get-child" title="poppler_index_iter_get_child ()">poppler_index_iter_get_child</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *parent);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-index-iter-is-open" title="poppler_index_iter_is_open ()">poppler_index_iter_is_open</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);
+<a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> * <a class="link" href="poppler-poppler-document.html#poppler-index-iter-get-action" title="poppler_index_iter_get_action ()">poppler_index_iter_get_action</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-index-iter-next" title="poppler_index_iter_next ()">poppler_index_iter_next</a> (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);
+<a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> * <a class="link" href="poppler-poppler-document.html#poppler-font-info-new" title="poppler_font_info_new ()">poppler_font_info_new</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-font-info-scan" title="poppler_font_info_scan ()">poppler_font_info_scan</a> (<a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> *font_info,
+ int n_pages,
+ <a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> **iter);
+void <a class="link" href="poppler-poppler-document.html#poppler-font-info-free" title="poppler_font_info_free ()">poppler_font_info_free</a> (<a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> *font_info);
+GType <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-get-type" title="poppler_fonts_iter_get_type ()">poppler_fonts_iter_get_type</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> * <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-copy" title="poppler_fonts_iter_copy ()">poppler_fonts_iter_copy</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+void <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-free" title="poppler_fonts_iter_free ()">poppler_fonts_iter_free</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+const char * <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-get-name" title="poppler_fonts_iter_get_name ()">poppler_fonts_iter_get_name</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+const char * <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-get-full-name" title="poppler_fonts_iter_get_full_name ()">poppler_fonts_iter_get_full_name</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+<a class="link" href="poppler-poppler-document.html#PopplerFontType" title="enum PopplerFontType">PopplerFontType</a> <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-get-font-type" title="poppler_fonts_iter_get_font_type ()">poppler_fonts_iter_get_font_type</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-is-embedded" title="poppler_fonts_iter_is_embedded ()">poppler_fonts_iter_is_embedded</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-is-subset" title="poppler_fonts_iter_is_subset ()">poppler_fonts_iter_is_subset</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+gboolean <a class="link" href="poppler-poppler-document.html#poppler-fonts-iter-next" title="poppler_fonts_iter_next ()">poppler_fonts_iter_next</a> (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);
+<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> * <a class="link" href="poppler-poppler-document.html#poppler-ps-file-new" title="poppler_ps_file_new ()">poppler_ps_file_new</a> (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *filename,
+ int first_page,
+ int n_pages);
+void <a class="link" href="poppler-poppler-document.html#poppler-ps-file-set-paper-size" title="poppler_ps_file_set_paper_size ()">poppler_ps_file_set_paper_size</a> (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file,
+ double width,
+ double height);
+void <a class="link" href="poppler-poppler-document.html#poppler-ps-file-set-duplex" title="poppler_ps_file_set_duplex ()">poppler_ps_file_set_duplex</a> (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file,
+ gboolean duplex);
+void <a class="link" href="poppler-poppler-document.html#poppler-ps-file-free" title="poppler_ps_file_free ()">poppler_ps_file_free</a> (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-document.description"></a><h2>Description</h2>
+<p>
+The <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a> is an object used to refer to a main document.
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-document.details"></a><h2>Details</h2>
+<div class="refsect2" title="enum PopplerPageLayout">
+<a name="PopplerPageLayout"></a><h3>enum PopplerPageLayout</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_PAGE_LAYOUT_UNSET,
+ POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
+ POPPLER_PAGE_LAYOUT_ONE_COLUMN,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
+} PopplerPageLayout;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerPageMode">
+<a name="PopplerPageMode"></a><h3>enum PopplerPageMode</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_PAGE_MODE_UNSET,
+ POPPLER_PAGE_MODE_NONE,
+ POPPLER_PAGE_MODE_USE_OUTLINES,
+ POPPLER_PAGE_MODE_USE_THUMBS,
+ POPPLER_PAGE_MODE_FULL_SCREEN,
+ POPPLER_PAGE_MODE_USE_OC,
+ POPPLER_PAGE_MODE_USE_ATTACHMENTS
+} PopplerPageMode;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerFontType">
+<a name="PopplerFontType"></a><h3>enum PopplerFontType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_FONT_TYPE_UNKNOWN,
+ POPPLER_FONT_TYPE_TYPE1,
+ POPPLER_FONT_TYPE_TYPE1C,
+ POPPLER_FONT_TYPE_TYPE1COT,
+ POPPLER_FONT_TYPE_TYPE3,
+ POPPLER_FONT_TYPE_TRUETYPE,
+ POPPLER_FONT_TYPE_TRUETYPEOT,
+ POPPLER_FONT_TYPE_CID_TYPE0,
+ POPPLER_FONT_TYPE_CID_TYPE0C,
+ POPPLER_FONT_TYPE_CID_TYPE0COT,
+ POPPLER_FONT_TYPE_CID_TYPE2,
+ POPPLER_FONT_TYPE_CID_TYPE2OT
+} PopplerFontType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerViewerPreferences">
+<a name="PopplerViewerPreferences"></a><h3>enum PopplerViewerPreferences</h3>
+<pre class="programlisting">typedef enum /*&lt; flags &gt;*/
+{
+ POPPLER_VIEWER_PREFERENCES_UNSET = 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR = 1 &lt;&lt; 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR = 1 &lt;&lt; 1,
+ POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI = 1 &lt;&lt; 2,
+ POPPLER_VIEWER_PREFERENCES_FIT_WINDOW = 1 &lt;&lt; 3,
+ POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW = 1 &lt;&lt; 4,
+ POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE = 1 &lt;&lt; 5,
+ POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 &lt;&lt; 6
+} PopplerViewerPreferences;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerPermissions">
+<a name="PopplerPermissions"></a><h3>enum PopplerPermissions</h3>
+<pre class="programlisting">typedef enum /*&lt; flags &gt;*/
+{
+ POPPLER_PERMISSIONS_OK_TO_PRINT = 1 &lt;&lt; 0,
+ POPPLER_PERMISSIONS_OK_TO_MODIFY = 1 &lt;&lt; 1,
+ POPPLER_PERMISSIONS_OK_TO_COPY = 1 &lt;&lt; 2,
+ POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 &lt;&lt; 3,
+ POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 &lt;&lt; 4,
+ POPPLER_PERMISSIONS_FULL = (POPPLER_PERMISSIONS_OK_TO_PRINT | POPPLER_PERMISSIONS_OK_TO_MODIFY | POPPLER_PERMISSIONS_OK_TO_COPY | POPPLER_PERMISSIONS_OK_TO_ADD_NOTES | POPPLER_PERMISSIONS_OK_TO_FILL_FORM)
+
+} PopplerPermissions;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_new_from_file ()">
+<a name="poppler-document-new-from-file"></a><h3>poppler_document_new_from_file ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> * poppler_document_new_from_file (const char *uri,
+ const char *password,
+ GError **error);</pre>
+<p>
+Creates a new <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>. If <code class="literal">NULL</code> is returned, then <em class="parameter"><code>error</code></em> will be
+set. Possible errors include those in the <a class="link" href="poppler-poppler.html#POPPLER-ERROR--CAPS" title="POPPLER_ERROR"><span class="type">POPPLER_ERROR</span></a> and <span class="type">G_FILE_ERROR</span>
+domains.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
+<td> uri of the file to load
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
+<td> password to unlock the file with, or <code class="literal">NULL</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td> Return location for an error, or <code class="literal">NULL</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> A newly created <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>, or <code class="literal">NULL</code>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_new_from_data ()">
+<a name="poppler-document-new-from-data"></a><h3>poppler_document_new_from_data ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> * poppler_document_new_from_data (char *data,
+ int length,
+ const char *password,
+ GError **error);</pre>
+<p>
+Creates a new <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>. If <code class="literal">NULL</code> is returned, then <em class="parameter"><code>error</code></em> will be
+set. Possible errors include those in the <a class="link" href="poppler-poppler.html#POPPLER-ERROR--CAPS" title="POPPLER_ERROR"><span class="type">POPPLER_ERROR</span></a> and <span class="type">G_FILE_ERROR</span>
+domains.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
+<td> the pdf data contained in a char array
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
+<td> the length of <span class="type">data</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
+<td> password to unlock the file with, or <code class="literal">NULL</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td> Return location for an error, or <code class="literal">NULL</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> A newly created <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>, or <code class="literal">NULL</code>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_save ()">
+<a name="poppler-document-save"></a><h3>poppler_document_save ()</h3>
+<pre class="programlisting">gboolean poppler_document_save (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *uri,
+ GError **error);</pre>
+<p>
+Saves <em class="parameter"><code>document</code></em>. Any change made in the document such as
+form fields filled by the user will be saved.
+If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned. Possible errors
+include those in the <span class="type">G_FILE_ERROR</span> domain.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
+<td> uri of file to save
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
+<td> return location for an error, or <code class="literal">NULL</code>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if the document was successfully saved
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_get_n_pages ()">
+<a name="poppler-document-get-n-pages"></a><h3>poppler_document_get_n_pages ()</h3>
+<pre class="programlisting">int poppler_document_get_n_pages (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);</pre>
+<p>
+Returns the number of pages in a loaded document.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> Number of pages
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_get_page ()">
+<a name="poppler-document-get-page"></a><h3>poppler_document_get_page ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> * poppler_document_get_page (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ int index);</pre>
+<p>
+Returns the <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> indexed at <em class="parameter"><code>index</code></em>. This object is owned by the
+caller.
+</p>
+<p>
+<a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>s are indexed starting at 0.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td> a page index
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> The <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> at <em class="parameter"><code>index</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_get_page_by_label ()">
+<a name="poppler-document-get-page-by-label"></a><h3>poppler_document_get_page_by_label ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> * poppler_document_get_page_by_label (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *label);</pre>
+<p>
+Returns the <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> reference by <em class="parameter"><code>label</code></em>. This object is owned by the
+caller. <em class="parameter"><code>label</code></em> is a human-readable string representation of the page number,
+and can be document specific. Typically, it is a value such as "iii" or "3".
+</p>
+<p>
+By default, "1" refers to the first page.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
+<td> a page label
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> The <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> referenced by <em class="parameter"><code>label</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_find_dest ()">
+<a name="poppler-document-find-dest"></a><h3>poppler_document_find_dest ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest">PopplerDest</a> * poppler_document_find_dest (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const gchar *link_name);</pre>
+<p>
+Finds named destination <em class="parameter"><code>link_name</code></em> in <em class="parameter"><code>document</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>link_name</code></em> :</span></p></td>
+<td> a named destination
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> The <a class="link" href="poppler-poppler-action.html#PopplerDest" title="PopplerDest"><span class="type">PopplerDest</span></a> destination or <code class="literal">NULL</code> if
+<em class="parameter"><code>link_name</code></em> is not a destination. Returned value must
+be freed with <a class="link" href="poppler-poppler-action.html#poppler-dest-free" title="poppler_dest_free ()"><span class="type">poppler_dest_free</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_has_attachments ()">
+<a name="poppler-document-has-attachments"></a><h3>poppler_document_has_attachments ()</h3>
+<pre class="programlisting">gboolean poppler_document_has_attachments (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);</pre>
+<p>
+Returns <code class="literal">TRUE</code> of <em class="parameter"><code>document</code></em> has any attachments.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if <em class="parameter"><code>document</code></em> has attachments.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_get_attachments ()">
+<a name="poppler-document-get-attachments"></a><h3>poppler_document_get_attachments ()</h3>
+<pre class="programlisting">GList * poppler_document_get_attachments (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);</pre>
+<p>
+Returns a <span class="type">GList</span> containing <a class="link" href="poppler-poppler-attachment.html#PopplerAttachment"><span class="type">PopplerAttachment</span></a>s. These attachments
+are unowned, and must be unreffed, and the list must be freed with
+<code class="function">g_list_free()</code>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a list of available attachments.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_document_get_form_field ()">
+<a name="poppler-document-get-form-field"></a><h3>poppler_document_get_form_field ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> * poppler_document_get_form_field (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ gint id);</pre>
+<p>
+Returns the <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a> for the given <em class="parameter"><code>id</code></em>. It must be freed with
+<code class="function">g_object_unref()</code></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
+<td> an id of a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a> or NULL if not found
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_get_type ()">
+<a name="poppler-index-iter-get-type"></a><h3>poppler_index_iter_get_type ()</h3>
+<pre class="programlisting">GType poppler_index_iter_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_new ()">
+<a name="poppler-index-iter-new"></a><h3>poppler_index_iter_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * poppler_index_iter_new (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);</pre>
+<p>
+Returns the root <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a> for <em class="parameter"><code>document</code></em>, or <code class="literal">NULL</code>. This must be
+freed with <a class="link" href="poppler-poppler-document.html#poppler-index-iter-free" title="poppler_index_iter_free ()"><code class="function">poppler_index_iter_free()</code></a>.
+</p>
+<p>
+Certain documents have an index associated with them. This index can be used
+to help the user navigate the document, and is similar to a table of
+contents. Each node in the index will contain a <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a> that can be
+displayed to the user — typically a <span class="type">POPPLER_ACTION_GOTO_DEST</span> or a
+<span class="type">POPPLER_ACTION_URI</span>.
+</p>
+<p>
+Here is a simple example of some code that walks the full index:
+</p>
+<p>
+</p>
+<div class="informalexample"><pre class="programlisting">
+static void
+walk_index (PopplerIndexIter *iter)
+{
+ do
+ {
+ /* Get the the action and do something with it */
+ PopplerIndexIter *child = poppler_index_iter_get_child (iter);
+ if (child)
+ walk_index (child);
+ poppler_index_iter_free (child);
+ }
+ while (poppler_index_iter_next (iter));
+}
+...
+{
+ iter = poppler_index_iter_new (document);
+ walk_index (iter);
+ poppler_index_iter_free (iter);
+}
+</pre></div>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_copy ()">
+<a name="poppler-index-iter-copy"></a><h3>poppler_index_iter_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * poppler_index_iter_copy (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);</pre>
+<p>
+Creates a new <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a> as a copy of <em class="parameter"><code>iter</code></em>. This must be freed with
+<a class="link" href="poppler-poppler-document.html#poppler-index-iter-free" title="poppler_index_iter_free ()"><code class="function">poppler_index_iter_free()</code></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_free ()">
+<a name="poppler-index-iter-free"></a><h3>poppler_index_iter_free ()</h3>
+<pre class="programlisting">void poppler_index_iter_free (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);</pre>
+<p>
+Frees <em class="parameter"><code>iter</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_get_child ()">
+<a name="poppler-index-iter-get-child"></a><h3>poppler_index_iter_get_child ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> * poppler_index_iter_get_child (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *parent);</pre>
+<p>
+Returns a newly created child of <em class="parameter"><code>parent</code></em>, or <code class="literal">NULL</code> if the iter has no child.
+See <a class="link" href="poppler-poppler-document.html#poppler-index-iter-new" title="poppler_index_iter_new ()"><code class="function">poppler_index_iter_new()</code></a> for more information on this function.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_is_open ()">
+<a name="poppler-index-iter-is-open"></a><h3>poppler_index_iter_is_open ()</h3>
+<pre class="programlisting">gboolean poppler_index_iter_is_open (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);</pre>
+<p>
+Returns whether this node should be expanded by default to the user. The
+document can provide a hint as to how the document's index should be expanded
+initially.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if the document wants <em class="parameter"><code>iter</code></em> to be expanded
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_get_action ()">
+<a name="poppler-index-iter-get-action"></a><h3>poppler_index_iter_get_action ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction">PopplerAction</a> * poppler_index_iter_get_action (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);</pre>
+<p>
+Returns the <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a> associated with <em class="parameter"><code>iter</code></em>. It must be freed with
+<a class="link" href="poppler-poppler-action.html#poppler-action-free" title="poppler_action_free ()"><code class="function">poppler_action_free()</code></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_index_iter_next ()">
+<a name="poppler-index-iter-next"></a><h3>poppler_index_iter_next ()</h3>
+<pre class="programlisting">gboolean poppler_index_iter_next (<a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a> *iter);</pre>
+<p>
+Sets <em class="parameter"><code>iter</code></em> to point to the next action at the current level, if valid. See
+<a class="link" href="poppler-poppler-document.html#poppler-index-iter-new" title="poppler_index_iter_new ()"><code class="function">poppler_index_iter_new()</code></a> for more information.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter"><span class="type">PopplerIndexIter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if <em class="parameter"><code>iter</code></em> was set to the next action
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_font_info_new ()">
+<a name="poppler-font-info-new"></a><h3>poppler_font_info_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> * poppler_font_info_new (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_font_info_scan ()">
+<a name="poppler-font-info-scan"></a><h3>poppler_font_info_scan ()</h3>
+<pre class="programlisting">gboolean poppler_font_info_scan (<a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> *font_info,
+ int n_pages,
+ <a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> **iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>font_info</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n_pages</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_font_info_free ()">
+<a name="poppler-font-info-free"></a><h3>poppler_font_info_free ()</h3>
+<pre class="programlisting">void poppler_font_info_free (<a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a> *font_info);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>font_info</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_get_type ()">
+<a name="poppler-fonts-iter-get-type"></a><h3>poppler_fonts_iter_get_type ()</h3>
+<pre class="programlisting">GType poppler_fonts_iter_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_copy ()">
+<a name="poppler-fonts-iter-copy"></a><h3>poppler_fonts_iter_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> * poppler_fonts_iter_copy (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_free ()">
+<a name="poppler-fonts-iter-free"></a><h3>poppler_fonts_iter_free ()</h3>
+<pre class="programlisting">void poppler_fonts_iter_free (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_get_name ()">
+<a name="poppler-fonts-iter-get-name"></a><h3>poppler_fonts_iter_get_name ()</h3>
+<pre class="programlisting">const char * poppler_fonts_iter_get_name (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_get_full_name ()">
+<a name="poppler-fonts-iter-get-full-name"></a><h3>poppler_fonts_iter_get_full_name ()</h3>
+<pre class="programlisting">const char * poppler_fonts_iter_get_full_name (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_get_font_type ()">
+<a name="poppler-fonts-iter-get-font-type"></a><h3>poppler_fonts_iter_get_font_type ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-document.html#PopplerFontType" title="enum PopplerFontType">PopplerFontType</a> poppler_fonts_iter_get_font_type (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_is_embedded ()">
+<a name="poppler-fonts-iter-is-embedded"></a><h3>poppler_fonts_iter_is_embedded ()</h3>
+<pre class="programlisting">gboolean poppler_fonts_iter_is_embedded (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_is_subset ()">
+<a name="poppler-fonts-iter-is-subset"></a><h3>poppler_fonts_iter_is_subset ()</h3>
+<pre class="programlisting">gboolean poppler_fonts_iter_is_subset (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_fonts_iter_next ()">
+<a name="poppler-fonts-iter-next"></a><h3>poppler_fonts_iter_next ()</h3>
+<pre class="programlisting">gboolean poppler_fonts_iter_next (<a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a> *iter);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_ps_file_new ()">
+<a name="poppler-ps-file-new"></a><h3>poppler_ps_file_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> * poppler_ps_file_new (<a class="link" href="poppler-poppler.html#PopplerDocument">PopplerDocument</a> *document,
+ const char *filename,
+ int first_page,
+ int n_pages);</pre>
+<p>
+Create a new postscript file to render to</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>document</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerDocument"><span class="type">PopplerDocument</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
+<td> the path of the output filename
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>first_page</code></em> :</span></p></td>
+<td> the first page to print
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>n_pages</code></em> :</span></p></td>
+<td> the number of pages to print
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a PopplerPSFile
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_ps_file_set_paper_size ()">
+<a name="poppler-ps-file-set-paper-size"></a><h3>poppler_ps_file_set_paper_size ()</h3>
+<pre class="programlisting">void poppler_ps_file_set_paper_size (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file,
+ double width,
+ double height);</pre>
+<p>
+Set the output paper size. These values will end up in the
+DocumentMedia, the BoundingBox DSC comments and other places in the
+generated PostScript.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ps_file</code></em> :</span></p></td>
+<td> a PopplerPSFile which was not yet printed to.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
+<td> the paper width in 1/72 inch
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
+<td> the paper height in 1/72 inch
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_ps_file_set_duplex ()">
+<a name="poppler-ps-file-set-duplex"></a><h3>poppler_ps_file_set_duplex ()</h3>
+<pre class="programlisting">void poppler_ps_file_set_duplex (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file,
+ gboolean duplex);</pre>
+<p>
+Enable or disable Duplex printing.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ps_file</code></em> :</span></p></td>
+<td> a PopplerPSFile which was not yet printed to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>duplex</code></em> :</span></p></td>
+<td> whether to force duplex printing (on printers which support this)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_ps_file_free ()">
+<a name="poppler-ps-file-free"></a><h3>poppler_ps_file_free ()</h3>
+<pre class="programlisting">void poppler_ps_file_free (<a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file);</pre>
+<p>
+Frees <em class="parameter"><code>ps_file</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ps_file</code></em> :</span></p></td>
+<td> a PopplerPSFile
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-enums.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-enums.html
new file mode 100644
index 00000000000..ad430af2675
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-enums.html
@@ -0,0 +1,412 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>poppler-enums</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-form-field.html" title="PopplerFormField">
+<link rel="next" href="poppler-poppler-annot.html" title="PopplerAnnot">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-form-field.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-annot.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-enums.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-enums.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="poppler-enums">
+<a name="poppler-poppler-enums"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-enums.top_of_page"></a>poppler-enums</span></h2>
+<p>poppler-enums</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-enums.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-ACTION-TYPE--CAPS" title="POPPLER_TYPE_ACTION_TYPE">POPPLER_TYPE_ACTION_TYPE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-action-type-get-type" title="poppler_action_type_get_type ()">poppler_action_type_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-DEST-TYPE--CAPS" title="POPPLER_TYPE_DEST_TYPE">POPPLER_TYPE_DEST_TYPE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-dest-type-get-type" title="poppler_dest_type_get_type ()">poppler_dest_type_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-LAYOUT--CAPS" title="POPPLER_TYPE_PAGE_LAYOUT">POPPLER_TYPE_PAGE_LAYOUT</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-page-layout-get-type" title="poppler_page_layout_get_type ()">poppler_page_layout_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-MODE--CAPS" title="POPPLER_TYPE_PAGE_MODE">POPPLER_TYPE_PAGE_MODE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-page-mode-get-type" title="poppler_page_mode_get_type ()">poppler_page_mode_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-FONT-TYPE--CAPS" title="POPPLER_TYPE_FONT_TYPE">POPPLER_TYPE_FONT_TYPE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-font-type-get-type" title="poppler_font_type_get_type ()">poppler_font_type_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-VIEWER-PREFERENCES--CAPS" title="POPPLER_TYPE_VIEWER_PREFERENCES">POPPLER_TYPE_VIEWER_PREFERENCES</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-viewer-preferences-get-type" title="poppler_viewer_preferences_get_type ()">poppler_viewer_preferences_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PERMISSIONS--CAPS" title="POPPLER_TYPE_PERMISSIONS">POPPLER_TYPE_PERMISSIONS</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-permissions-get-type" title="poppler_permissions_get_type ()">poppler_permissions_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-SELECTION-STYLE--CAPS" title="POPPLER_TYPE_SELECTION_STYLE">POPPLER_TYPE_SELECTION_STYLE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-selection-style-get-type" title="poppler_selection_style_get_type ()">poppler_selection_style_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS" title="POPPLER_TYPE_PAGE_TRANSITION_TYPE">POPPLER_TYPE_PAGE_TRANSITION_TYPE</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-page-transition-type-get-type" title="poppler_page_transition_type_get_type ()">poppler_page_transition_type_get_type</a>
+ (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS" title="POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT">POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-page-transition-alignment-get-type" title="poppler_page_transition_alignment_get_type ()">poppler_page_transition_alignment_get_type</a>
+ (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS" title="POPPLER_TYPE_PAGE_TRANSITION_DIRECTION">POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-page-transition-direction-get-type" title="poppler_page_transition_direction_get_type ()">poppler_page_transition_direction_get_type</a>
+ (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-ERROR--CAPS" title="POPPLER_TYPE_ERROR">POPPLER_TYPE_ERROR</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-error-get-type" title="poppler_error_get_type ()">poppler_error_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-ORIENTATION--CAPS" title="POPPLER_TYPE_ORIENTATION">POPPLER_TYPE_ORIENTATION</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-orientation-get-type" title="poppler_orientation_get_type ()">poppler_orientation_get_type</a> (void);
+#define <a class="link" href="poppler-poppler-enums.html#POPPLER-TYPE-BACKEND--CAPS" title="POPPLER_TYPE_BACKEND">POPPLER_TYPE_BACKEND</a>
+GType <a class="link" href="poppler-poppler-enums.html#poppler-backend-get-type" title="poppler_backend_get_type ()">poppler_backend_get_type</a> (void);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-enums.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-enums.details"></a><h2>Details</h2>
+<div class="refsect2" title="POPPLER_TYPE_ACTION_TYPE">
+<a name="POPPLER-TYPE-ACTION-TYPE--CAPS"></a><h3>POPPLER_TYPE_ACTION_TYPE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_ACTION_TYPE (poppler_action_type_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_action_type_get_type ()">
+<a name="poppler-action-type-get-type"></a><h3>poppler_action_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_action_type_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_DEST_TYPE">
+<a name="POPPLER-TYPE-DEST-TYPE--CAPS"></a><h3>POPPLER_TYPE_DEST_TYPE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_DEST_TYPE (poppler_dest_type_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_dest_type_get_type ()">
+<a name="poppler-dest-type-get-type"></a><h3>poppler_dest_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_dest_type_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_LAYOUT">
+<a name="POPPLER-TYPE-PAGE-LAYOUT--CAPS"></a><h3>POPPLER_TYPE_PAGE_LAYOUT</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_LAYOUT (poppler_page_layout_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_layout_get_type ()">
+<a name="poppler-page-layout-get-type"></a><h3>poppler_page_layout_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_layout_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_MODE">
+<a name="POPPLER-TYPE-PAGE-MODE--CAPS"></a><h3>POPPLER_TYPE_PAGE_MODE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_MODE (poppler_page_mode_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_mode_get_type ()">
+<a name="poppler-page-mode-get-type"></a><h3>poppler_page_mode_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_mode_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_FONT_TYPE">
+<a name="POPPLER-TYPE-FONT-TYPE--CAPS"></a><h3>POPPLER_TYPE_FONT_TYPE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_FONT_TYPE (poppler_font_type_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_font_type_get_type ()">
+<a name="poppler-font-type-get-type"></a><h3>poppler_font_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_font_type_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_VIEWER_PREFERENCES">
+<a name="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS"></a><h3>POPPLER_TYPE_VIEWER_PREFERENCES</h3>
+<pre class="programlisting">#define POPPLER_TYPE_VIEWER_PREFERENCES (poppler_viewer_preferences_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_viewer_preferences_get_type ()">
+<a name="poppler-viewer-preferences-get-type"></a><h3>poppler_viewer_preferences_get_type ()</h3>
+<pre class="programlisting">GType poppler_viewer_preferences_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PERMISSIONS">
+<a name="POPPLER-TYPE-PERMISSIONS--CAPS"></a><h3>POPPLER_TYPE_PERMISSIONS</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PERMISSIONS (poppler_permissions_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_permissions_get_type ()">
+<a name="poppler-permissions-get-type"></a><h3>poppler_permissions_get_type ()</h3>
+<pre class="programlisting">GType poppler_permissions_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_SELECTION_STYLE">
+<a name="POPPLER-TYPE-SELECTION-STYLE--CAPS"></a><h3>POPPLER_TYPE_SELECTION_STYLE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_SELECTION_STYLE (poppler_selection_style_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_selection_style_get_type ()">
+<a name="poppler-selection-style-get-type"></a><h3>poppler_selection_style_get_type ()</h3>
+<pre class="programlisting">GType poppler_selection_style_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_TRANSITION_TYPE">
+<a name="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS"></a><h3>POPPLER_TYPE_PAGE_TRANSITION_TYPE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_TRANSITION_TYPE (poppler_page_transition_type_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_type_get_type ()">
+<a name="poppler-page-transition-type-get-type"></a><h3>poppler_page_transition_type_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_transition_type_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT">
+<a name="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS"></a><h3>POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT (poppler_page_transition_alignment_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_alignment_get_type ()">
+<a name="poppler-page-transition-alignment-get-type"></a><h3>poppler_page_transition_alignment_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_transition_alignment_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_TRANSITION_DIRECTION">
+<a name="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS"></a><h3>POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_TRANSITION_DIRECTION (poppler_page_transition_direction_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_direction_get_type ()">
+<a name="poppler-page-transition-direction-get-type"></a><h3>poppler_page_transition_direction_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_transition_direction_get_type
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_ERROR">
+<a name="POPPLER-TYPE-ERROR--CAPS"></a><h3>POPPLER_TYPE_ERROR</h3>
+<pre class="programlisting">#define POPPLER_TYPE_ERROR (poppler_error_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_error_get_type ()">
+<a name="poppler-error-get-type"></a><h3>poppler_error_get_type ()</h3>
+<pre class="programlisting">GType poppler_error_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_ORIENTATION">
+<a name="POPPLER-TYPE-ORIENTATION--CAPS"></a><h3>POPPLER_TYPE_ORIENTATION</h3>
+<pre class="programlisting">#define POPPLER_TYPE_ORIENTATION (poppler_orientation_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_orientation_get_type ()">
+<a name="poppler-orientation-get-type"></a><h3>poppler_orientation_get_type ()</h3>
+<pre class="programlisting">GType poppler_orientation_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_BACKEND">
+<a name="POPPLER-TYPE-BACKEND--CAPS"></a><h3>POPPLER_TYPE_BACKEND</h3>
+<pre class="programlisting">#define POPPLER_TYPE_BACKEND (poppler_backend_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_backend_get_type ()">
+<a name="poppler-backend-get-type"></a><h3>poppler_backend_get_type ()</h3>
+<pre class="programlisting">GType poppler_backend_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-features.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-features.html
new file mode 100644
index 00000000000..26266a7b595
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-features.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Version and Features Information</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-layer.html" title="PopplerLayer">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-layer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td> </td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-features.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-features.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="Version and Features Information">
+<a name="poppler-poppler-features"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-features.top_of_page"></a>Version and Features Information</span></h2>
+<p>Version and Features Information — Variables and functions to check the poppler version and features</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-features.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-HAS-CAIRO--CAPS" title="POPPLER_HAS_CAIRO">POPPLER_HAS_CAIRO</a>
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-WITH-GDK--CAPS" title="POPPLER_WITH_GDK">POPPLER_WITH_GDK</a>
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-MAJOR-VERSION--CAPS" title="POPPLER_MAJOR_VERSION">POPPLER_MAJOR_VERSION</a>
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-MINOR-VERSION--CAPS" title="POPPLER_MINOR_VERSION">POPPLER_MINOR_VERSION</a>
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-MICRO-VERSION--CAPS" title="POPPLER_MICRO_VERSION">POPPLER_MICRO_VERSION</a>
+#define <a class="link" href="poppler-poppler-features.html#POPPLER-CHECK-VERSION--CAPS" title="POPPLER_CHECK_VERSION()">POPPLER_CHECK_VERSION</a> (major,minor,micro)
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-features.description"></a><h2>Description</h2>
+<p>
+Poppler provides version information, and information about features
+enabled at compile time. This is primarily useful in configure checks
+for builds that have a configure script, or for allowing code to optionally
+depend but not require a specific poppler version.
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-features.details"></a><h2>Details</h2>
+<div class="refsect2" title="POPPLER_HAS_CAIRO">
+<a name="POPPLER-HAS-CAIRO--CAPS"></a><h3>POPPLER_HAS_CAIRO</h3>
+<pre class="programlisting">#define POPPLER_HAS_CAIRO 1
+</pre>
+<p>
+Defined if poppler was compiled with cairo support.
+</p>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_WITH_GDK">
+<a name="POPPLER-WITH-GDK--CAPS"></a><h3>POPPLER_WITH_GDK</h3>
+<pre class="programlisting">#define POPPLER_WITH_GDK 1
+</pre>
+<p>
+Defined if poppler was compiled with GDK support.
+</p>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_MAJOR_VERSION">
+<a name="POPPLER-MAJOR-VERSION--CAPS"></a><h3>POPPLER_MAJOR_VERSION</h3>
+<pre class="programlisting">#define POPPLER_MAJOR_VERSION (0)
+</pre>
+<p>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 0.)
+</p>
+Since: 0.11</div>
+<hr>
+<div class="refsect2" title="POPPLER_MINOR_VERSION">
+<a name="POPPLER-MINOR-VERSION--CAPS"></a><h3>POPPLER_MINOR_VERSION</h3>
+<pre class="programlisting">#define POPPLER_MINOR_VERSION (12)
+</pre>
+<p>
+</p>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 1.)
+Since: 0.11</div>
+<hr>
+<div class="refsect2" title="POPPLER_MICRO_VERSION">
+<a name="POPPLER-MICRO-VERSION--CAPS"></a><h3>POPPLER_MICRO_VERSION</h3>
+<pre class="programlisting">#define POPPLER_MICRO_VERSION (4)
+</pre>
+<p>
+The micro version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 2.)
+</p>
+Since: 0.11</div>
+<hr>
+<div class="refsect2" title="POPPLER_CHECK_VERSION()">
+<a name="POPPLER-CHECK-VERSION--CAPS"></a><h3>POPPLER_CHECK_VERSION()</h3>
+<pre class="programlisting">#define POPPLER_CHECK_VERSION(major,minor,micro)</pre>
+<p>
+Returns <code class="literal">TRUE</code> if the version of the poppler header files is the same
+as or newer than the passed-in version.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
+<td>major version (e.g. 0 for version 0.1.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
+<td>minor version (e.g. 1 for version 0.1.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>micro</code></em> :</span></p></td>
+<td>micro version (e.g. 2 for version 0.1.2)
+Since: 0.11
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-form-field.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-form-field.html
new file mode 100644
index 00000000000..52b4cbe2fba
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-form-field.html
@@ -0,0 +1,871 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerFormField</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-attachment.html" title="PopplerAttachment">
+<link rel="next" href="poppler-poppler-enums.html" title="poppler-enums">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-attachment.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-enums.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-form-field.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-form-field.description" class="shortcut">Description</a>
+  | 
+ <a href="#poppler-poppler-form-field.object-hierarchy" class="shortcut">Object Hierarchy</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerFormField">
+<a name="poppler-poppler-form-field"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-form-field.top_of_page"></a>PopplerFormField</span></h2>
+<p>PopplerFormField</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-form-field.synopsis"></a><h2>Synopsis</h2>
+<a name="PopplerFormField"></a><pre class="synopsis">
+ <a class="link" href="poppler-poppler-form-field.html#PopplerFormField-struct" title="PopplerFormField">PopplerFormField</a>;
+enum <a class="link" href="poppler-poppler-form-field.html#PopplerFormButtonType" title="enum PopplerFormButtonType">PopplerFormButtonType</a>;
+enum <a class="link" href="poppler-poppler-form-field.html#PopplerFormChoiceType" title="enum PopplerFormChoiceType">PopplerFormChoiceType</a>;
+enum <a class="link" href="poppler-poppler-form-field.html#PopplerFormFieldType" title="enum PopplerFormFieldType">PopplerFormFieldType</a>;
+enum <a class="link" href="poppler-poppler-form-field.html#PopplerFormTextType" title="enum PopplerFormTextType">PopplerFormTextType</a>;
+gint <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-get-id" title="poppler_form_field_get_id ()">poppler_form_field_get_id</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+<a class="link" href="poppler-poppler-form-field.html#PopplerFormFieldType" title="enum PopplerFormFieldType">PopplerFormFieldType</a> <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-get-field-type" title="poppler_form_field_get_field_type ()">poppler_form_field_get_field_type</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-is-read-only" title="poppler_form_field_is_read_only ()">poppler_form_field_is_read_only</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gdouble <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-get-font-size" title="poppler_form_field_get_font_size ()">poppler_form_field_get_font_size</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+<a class="link" href="poppler-poppler-form-field.html#PopplerFormButtonType" title="enum PopplerFormButtonType">PopplerFormButtonType</a> <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-button-get-button-type" title="poppler_form_field_button_get_button_type ()">poppler_form_field_button_get_button_type</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-button-get-state" title="poppler_form_field_button_get_state ()">poppler_form_field_button_get_state</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-button-set-state" title="poppler_form_field_button_set_state ()">poppler_form_field_button_set_state</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gboolean state);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-can-select-multiple" title="poppler_form_field_choice_can_select_multiple ()">poppler_form_field_choice_can_select_multiple</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-commit-on-change" title="poppler_form_field_choice_commit_on_change ()">poppler_form_field_choice_commit_on_change</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-do-spell-check" title="poppler_form_field_choice_do_spell_check ()">poppler_form_field_choice_do_spell_check</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+<a class="link" href="poppler-poppler-form-field.html#PopplerFormChoiceType" title="enum PopplerFormChoiceType">PopplerFormChoiceType</a> <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-get-choice-type" title="poppler_form_field_choice_get_choice_type ()">poppler_form_field_choice_get_choice_type</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gchar * <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-get-item" title="poppler_form_field_choice_get_item ()">poppler_form_field_choice_get_item</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);
+gint <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-get-n-items" title="poppler_form_field_choice_get_n_items ()">poppler_form_field_choice_get_n_items</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gchar * <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-get-text" title="poppler_form_field_choice_get_text ()">poppler_form_field_choice_get_text</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-is-editable" title="poppler_form_field_choice_is_editable ()">poppler_form_field_choice_is_editable</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-is-item-selected" title="poppler_form_field_choice_is_item_selected ()">poppler_form_field_choice_is_item_selected</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-select-item" title="poppler_form_field_choice_select_item ()">poppler_form_field_choice_select_item</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-set-text" title="poppler_form_field_choice_set_text ()">poppler_form_field_choice_set_text</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ const gchar *text);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-toggle-item" title="poppler_form_field_choice_toggle_item ()">poppler_form_field_choice_toggle_item</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-choice-unselect-all" title="poppler_form_field_choice_unselect_all ()">poppler_form_field_choice_unselect_all</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-do-scroll" title="poppler_form_field_text_do_scroll ()">poppler_form_field_text_do_scroll</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-do-spell-check" title="poppler_form_field_text_do_spell_check ()">poppler_form_field_text_do_spell_check</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gint <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-get-max-len" title="poppler_form_field_text_get_max_len ()">poppler_form_field_text_get_max_len</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gchar * <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-get-text" title="poppler_form_field_text_get_text ()">poppler_form_field_text_get_text</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+<a class="link" href="poppler-poppler-form-field.html#PopplerFormTextType" title="enum PopplerFormTextType">PopplerFormTextType</a> <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-get-text-type" title="poppler_form_field_text_get_text_type ()">poppler_form_field_text_get_text_type</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-is-password" title="poppler_form_field_text_is_password ()">poppler_form_field_text_is_password</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+gboolean <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-is-rich-text" title="poppler_form_field_text_is_rich_text ()">poppler_form_field_text_is_rich_text</a>
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);
+void <a class="link" href="poppler-poppler-form-field.html#poppler-form-field-text-set-text" title="poppler_form_field_text_set_text ()">poppler_form_field_text_set_text</a> (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ const gchar *text);
+</pre>
+</div>
+<div class="refsect1" title="Object Hierarchy">
+<a name="poppler-poppler-form-field.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="synopsis">
+ GObject
+ +----PopplerFormField
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-form-field.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-form-field.details"></a><h2>Details</h2>
+<div class="refsect2" title="PopplerFormField">
+<a name="PopplerFormField-struct"></a><h3>PopplerFormField</h3>
+<pre class="programlisting">typedef struct _PopplerFormField PopplerFormField;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerFormButtonType">
+<a name="PopplerFormButtonType"></a><h3>enum PopplerFormButtonType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_FORM_BUTTON_PUSH,
+ POPPLER_FORM_BUTTON_CHECK,
+ POPPLER_FORM_BUTTON_RADIO
+} PopplerFormButtonType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerFormChoiceType">
+<a name="PopplerFormChoiceType"></a><h3>enum PopplerFormChoiceType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_FORM_CHOICE_COMBO,
+ POPPLER_FORM_CHOICE_LIST
+} PopplerFormChoiceType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerFormFieldType">
+<a name="PopplerFormFieldType"></a><h3>enum PopplerFormFieldType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_FORM_FIELD_UNKNOWN,
+ POPPLER_FORM_FIELD_BUTTON,
+ POPPLER_FORM_FIELD_TEXT,
+ POPPLER_FORM_FIELD_CHOICE,
+ POPPLER_FORM_FIELD_SIGNATURE
+} PopplerFormFieldType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerFormTextType">
+<a name="PopplerFormTextType"></a><h3>enum PopplerFormTextType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_FORM_TEXT_NORMAL,
+ POPPLER_FORM_TEXT_MULTILINE,
+ POPPLER_FORM_TEXT_FILE_SELECT
+} PopplerFormTextType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_get_id ()">
+<a name="poppler-form-field-get-id"></a><h3>poppler_form_field_get_id ()</h3>
+<pre class="programlisting">gint poppler_form_field_get_id (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the id of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the id of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_get_field_type ()">
+<a name="poppler-form-field-get-field-type"></a><h3>poppler_form_field_get_field_type ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-form-field.html#PopplerFormFieldType" title="enum PopplerFormFieldType">PopplerFormFieldType</a> poppler_form_field_get_field_type (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the type of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="poppler-poppler-form-field.html#PopplerFormFieldType" title="enum PopplerFormFieldType"><span class="type">PopplerFormFieldType</span></a> of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_is_read_only ()">
+<a name="poppler-form-field-is-read-only"></a><h3>poppler_form_field_is_read_only ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_is_read_only (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether <em class="parameter"><code>field</code></em> is read only</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if <em class="parameter"><code>field</code></em> is read only
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_get_font_size ()">
+<a name="poppler-form-field-get-font-size"></a><h3>poppler_form_field_get_font_size ()</h3>
+<pre class="programlisting">gdouble poppler_form_field_get_font_size (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the font size of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the font size of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_button_get_button_type ()">
+<a name="poppler-form-field-button-get-button-type"></a><h3>poppler_form_field_button_get_button_type ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-form-field.html#PopplerFormButtonType" title="enum PopplerFormButtonType">PopplerFormButtonType</a> poppler_form_field_button_get_button_type
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the button type of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="poppler-poppler-form-field.html#PopplerFormButtonType" title="enum PopplerFormButtonType"><span class="type">PopplerFormButtonType</span></a> of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_button_get_state ()">
+<a name="poppler-form-field-button-get-state"></a><h3>poppler_form_field_button_get_state ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_button_get_state (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Queries a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a> and returns its current state. Returns <code class="literal">TRUE</code> if
+<em class="parameter"><code>field</code></em> is pressed in and <code class="literal">FALSE</code> if it is raised.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> current state of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_button_set_state ()">
+<a name="poppler-form-field-button-set-state"></a><h3>poppler_form_field_button_set_state ()</h3>
+<pre class="programlisting">void poppler_form_field_button_set_state (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gboolean state);</pre>
+<p>
+Sets the status of <em class="parameter"><code>field</code></em>. Set to <code class="literal">TRUE</code> if you want the <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+to be 'pressed in', and <code class="literal">FALSE</code> to raise it.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
+<td> <code class="literal">TRUE</code> or <code class="literal">FALSE</code>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_can_select_multiple ()">
+<a name="poppler-form-field-choice-can-select-multiple"></a><h3>poppler_form_field_choice_can_select_multiple ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_choice_can_select_multiple
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether <em class="parameter"><code>field</code></em> allows multiple choices to be selected</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if <em class="parameter"><code>field</code></em> allows multiple choices to be selected
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_commit_on_change ()">
+<a name="poppler-form-field-choice-commit-on-change"></a><h3>poppler_form_field_choice_commit_on_change ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_choice_commit_on_change
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_do_spell_check ()">
+<a name="poppler-form-field-choice-do-spell-check"></a><h3>poppler_form_field_choice_do_spell_check ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_choice_do_spell_check
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether spell checking should be done for the contents of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if spell checking should be done for <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_get_choice_type ()">
+<a name="poppler-form-field-choice-get-choice-type"></a><h3>poppler_form_field_choice_get_choice_type ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-form-field.html#PopplerFormChoiceType" title="enum PopplerFormChoiceType">PopplerFormChoiceType</a> poppler_form_field_choice_get_choice_type
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the choice type of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="poppler-poppler-form-field.html#PopplerFormChoiceType" title="enum PopplerFormChoiceType"><span class="type">PopplerFormChoiceType</span></a> of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_get_item ()">
+<a name="poppler-form-field-choice-get-item"></a><h3>poppler_form_field_choice_get_item ()</h3>
+<pre class="programlisting">gchar * poppler_form_field_choice_get_item (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);</pre>
+<p>
+Returns the contents of the item on <em class="parameter"><code>field</code></em> at the given index</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td> the index of the item
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string. It must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_get_n_items ()">
+<a name="poppler-form-field-choice-get-n-items"></a><h3>poppler_form_field_choice_get_n_items ()</h3>
+<pre class="programlisting">gint poppler_form_field_choice_get_n_items
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Returns the number of items on <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the number of items on <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_get_text ()">
+<a name="poppler-form-field-choice-get-text"></a><h3>poppler_form_field_choice_get_text ()</h3>
+<pre class="programlisting">gchar * poppler_form_field_choice_get_text (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Retrieves the contents of <em class="parameter"><code>field</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string. It must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_is_editable ()">
+<a name="poppler-form-field-choice-is-editable"></a><h3>poppler_form_field_choice_is_editable ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_choice_is_editable
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether <em class="parameter"><code>field</code></em> is editable</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if <em class="parameter"><code>field</code></em> is editable
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_is_item_selected ()">
+<a name="poppler-form-field-choice-is-item-selected"></a><h3>poppler_form_field_choice_is_item_selected ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_choice_is_item_selected
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);</pre>
+<p>
+Checks whether the item at the given index on <em class="parameter"><code>field</code></em> is currently selected</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td> the index of the item
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if item at <em class="parameter"><code>index</code></em> is currently selected
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_select_item ()">
+<a name="poppler-form-field-choice-select-item"></a><h3>poppler_form_field_choice_select_item ()</h3>
+<pre class="programlisting">void poppler_form_field_choice_select_item
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);</pre>
+<p>
+Selects the item at the given index on <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td> the index of the item
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_set_text ()">
+<a name="poppler-form-field-choice-set-text"></a><h3>poppler_form_field_choice_set_text ()</h3>
+<pre class="programlisting">void poppler_form_field_choice_set_text (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ const gchar *text);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_toggle_item ()">
+<a name="poppler-form-field-choice-toggle-item"></a><h3>poppler_form_field_choice_toggle_item ()</h3>
+<pre class="programlisting">void poppler_form_field_choice_toggle_item
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ gint index);</pre>
+<p>
+Sets the text in <em class="parameter"><code>field</code></em> to the given value, replacing the current contents</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_choice_unselect_all ()">
+<a name="poppler-form-field-choice-unselect-all"></a><h3>poppler_form_field_choice_unselect_all ()</h3>
+<pre class="programlisting">void poppler_form_field_choice_unselect_all
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Unselects all the items on <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_do_scroll ()">
+<a name="poppler-form-field-text-do-scroll"></a><h3>poppler_form_field_text_do_scroll ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_text_do_scroll (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_do_spell_check ()">
+<a name="poppler-form-field-text-do-spell-check"></a><h3>poppler_form_field_text_do_spell_check ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_text_do_spell_check
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether spell checking should be done for the contents of <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if spell checking should be done for <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_get_max_len ()">
+<a name="poppler-form-field-text-get-max-len"></a><h3>poppler_form_field_text_get_max_len ()</h3>
+<pre class="programlisting">gint poppler_form_field_text_get_max_len (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Retrieves the maximum allowed length of the text in <em class="parameter"><code>field</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the maximum allowed number of characters in <em class="parameter"><code>field</code></em>, or -1 if there is no maximum.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_get_text ()">
+<a name="poppler-form-field-text-get-text"></a><h3>poppler_form_field_text_get_text ()</h3>
+<pre class="programlisting">gchar * poppler_form_field_text_get_text (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Retrieves the contents of <em class="parameter"><code>field</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new allocated string. It must be freed with <code class="function">g_free()</code> when done.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_get_text_type ()">
+<a name="poppler-form-field-text-get-text-type"></a><h3>poppler_form_field_text_get_text_type ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-form-field.html#PopplerFormTextType" title="enum PopplerFormTextType">PopplerFormTextType</a> poppler_form_field_text_get_text_type
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Gets the text type of <em class="parameter"><code>field</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="poppler-poppler-form-field.html#PopplerFormTextType" title="enum PopplerFormTextType"><span class="type">PopplerFormTextType</span></a> of <em class="parameter"><code>field</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_is_password ()">
+<a name="poppler-form-field-text-is-password"></a><h3>poppler_form_field_text_is_password ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_text_is_password (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether content of <em class="parameter"><code>field</code></em> is a password and it must be hidden</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if the content of <em class="parameter"><code>field</code></em> is a password
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_is_rich_text ()">
+<a name="poppler-form-field-text-is-rich-text"></a><h3>poppler_form_field_text_is_rich_text ()</h3>
+<pre class="programlisting">gboolean poppler_form_field_text_is_rich_text
+ (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field);</pre>
+<p>
+Checks whether the contents of <em class="parameter"><code>field</code></em> are rich text</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if the contents of <em class="parameter"><code>field</code></em> are rich text
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_text_set_text ()">
+<a name="poppler-form-field-text-set-text"></a><h3>poppler_form_field_text_set_text ()</h3>
+<pre class="programlisting">void poppler_form_field_text_set_text (<a class="link" href="poppler-poppler-form-field.html#PopplerFormField">PopplerFormField</a> *field,
+ const gchar *text);</pre>
+<p>
+Sets the text in <em class="parameter"><code>field</code></em> to the given value, replacing the current contents.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-form-field.html#PopplerFormField"><span class="type">PopplerFormField</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
+<td> the new text
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-layer.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-layer.html
new file mode 100644
index 00000000000..dbfff4938cc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-layer.html
@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerLayer</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-annot.html" title="PopplerAnnot">
+<link rel="next" href="poppler-poppler-features.html" title="Version and Features Information">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-annot.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-features.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-layer.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-layer.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerLayer">
+<a name="poppler-poppler-layer"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-layer.top_of_page"></a>PopplerLayer</span></h2>
+<p>PopplerLayer</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-layer.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+GType <a class="link" href="poppler-poppler-layer.html#poppler-layer-get-type" title="poppler_layer_get_type ()">poppler_layer_get_type</a> (void);
+const gchar * <a class="link" href="poppler-poppler-layer.html#poppler-layer-get-title" title="poppler_layer_get_title ()">poppler_layer_get_title</a> (PopplerLayer *layer);
+gboolean <a class="link" href="poppler-poppler-layer.html#poppler-layer-is-visible" title="poppler_layer_is_visible ()">poppler_layer_is_visible</a> (PopplerLayer *layer);
+void <a class="link" href="poppler-poppler-layer.html#poppler-layer-show" title="poppler_layer_show ()">poppler_layer_show</a> (PopplerLayer *layer);
+void <a class="link" href="poppler-poppler-layer.html#poppler-layer-hide" title="poppler_layer_hide ()">poppler_layer_hide</a> (PopplerLayer *layer);
+gboolean <a class="link" href="poppler-poppler-layer.html#poppler-layer-is-parent" title="poppler_layer_is_parent ()">poppler_layer_is_parent</a> (PopplerLayer *layer);
+gint <a class="link" href="poppler-poppler-layer.html#poppler-layer-get-radio-button-group-id" title="poppler_layer_get_radio_button_group_id ()">poppler_layer_get_radio_button_group_id</a>
+ (PopplerLayer *layer);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-layer.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-layer.details"></a><h2>Details</h2>
+<div class="refsect2" title="poppler_layer_get_type ()">
+<a name="poppler-layer-get-type"></a><h3>poppler_layer_get_type ()</h3>
+<pre class="programlisting">GType poppler_layer_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_get_title ()">
+<a name="poppler-layer-get-title"></a><h3>poppler_layer_get_title ()</h3>
+<pre class="programlisting">const gchar * poppler_layer_get_title (PopplerLayer *layer);</pre>
+<p>
+Returns the name of the layer suitable for
+presentation as a title in a viewer's GUI</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a string containing the title of the layer
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_is_visible ()">
+<a name="poppler-layer-is-visible"></a><h3>poppler_layer_is_visible ()</h3>
+<pre class="programlisting">gboolean poppler_layer_is_visible (PopplerLayer *layer);</pre>
+<p>
+Returns whether <em class="parameter"><code>layer</code></em> is visible</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if <em class="parameter"><code>layer</code></em> is visible
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_show ()">
+<a name="poppler-layer-show"></a><h3>poppler_layer_show ()</h3>
+<pre class="programlisting">void poppler_layer_show (PopplerLayer *layer);</pre>
+<p>
+Shows <em class="parameter"><code>layer</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_hide ()">
+<a name="poppler-layer-hide"></a><h3>poppler_layer_hide ()</h3>
+<pre class="programlisting">void poppler_layer_hide (PopplerLayer *layer);</pre>
+<p>
+Hides <em class="parameter"><code>layer</code></em>. If <em class="parameter"><code>layer</code></em> is the parent of other nested layers,
+such layers will be also hidden and will be blocked until <em class="parameter"><code>layer</code></em>
+is shown again</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_is_parent ()">
+<a name="poppler-layer-is-parent"></a><h3>poppler_layer_is_parent ()</h3>
+<pre class="programlisting">gboolean poppler_layer_is_parent (PopplerLayer *layer);</pre>
+<p>
+Returns whether <em class="parameter"><code>layer</code></em> is parent of other nested layers.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code> if <em class="parameter"><code>layer</code></em> is a parent layer
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_layer_get_radio_button_group_id ()">
+<a name="poppler-layer-get-radio-button-group-id"></a><h3>poppler_layer_get_radio_button_group_id ()</h3>
+<pre class="programlisting">gint poppler_layer_get_radio_button_group_id
+ (PopplerLayer *layer);</pre>
+<p>
+Returns the numeric ID the radio button group associated with <em class="parameter"><code>layer</code></em>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
+<td> a <span class="type">PopplerLayer</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the ID of the radio button group associated with <em class="parameter"><code>layer</code></em>,
+or 0 if the layer is not associated to any radio button group
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-page.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-page.html
new file mode 100644
index 00000000000..bd565278b4f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler-page.html
@@ -0,0 +1,1258 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>PopplerPage</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="poppler-poppler-document.html" title="PopplerDocument">
+<link rel="next" href="poppler-poppler-action.html" title="PopplerAction">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="poppler-poppler-document.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-action.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler-page.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler-page.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" title="PopplerPage">
+<a name="poppler-poppler-page"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler-page.top_of_page"></a>PopplerPage</span></h2>
+<p>PopplerPage — Information about a page in a document</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler-page.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+void <a class="link" href="poppler-poppler-page.html#poppler-page-render" title="poppler_page_render ()">poppler_page_render</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ cairo_t *cairo);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-render-to-pixbuf" title="poppler_page_render_to_pixbuf ()">poppler_page_render_to_pixbuf</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ int src_x,
+ int src_y,
+ int src_width,
+ int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-get-size" title="poppler_page_get_size ()">poppler_page_get_size</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ double *width,
+ double *height);
+int <a class="link" href="poppler-poppler-page.html#poppler-page-get-index" title="poppler_page_get_index ()">poppler_page_get_index</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+cairo_surface_t * <a class="link" href="poppler-poppler-page.html#poppler-page-get-thumbnail" title="poppler_page_get_thumbnail ()">poppler_page_get_thumbnail</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+gboolean <a class="link" href="poppler-poppler-page.html#poppler-page-get-thumbnail-size" title="poppler_page_get_thumbnail_size ()">poppler_page_get_thumbnail_size</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ int *width,
+ int *height);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-render-to-ps" title="poppler_page_render_to_ps ()">poppler_page_render_to_ps</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ <a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file);
+GList * <a class="link" href="poppler-poppler-page.html#poppler-page-find-text" title="poppler_page_find_text ()">poppler_page_find_text</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ const char *text);
+char * <a class="link" href="poppler-poppler-page.html#poppler-page-get-text" title="poppler_page_get_text ()">poppler_page_get_text</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rect);
+double <a class="link" href="poppler-poppler-page.html#poppler-page-get-duration" title="poppler_page_get_duration ()">poppler_page_get_duration</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * <a class="link" href="poppler-poppler-page.html#poppler-page-get-transition" title="poppler_page_get_transition ()">poppler_page_get_transition</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+GList * <a class="link" href="poppler-poppler-page.html#poppler-page-get-link-mapping" title="poppler_page_get_link_mapping ()">poppler_page_get_link_mapping</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-free-link-mapping" title="poppler_page_free_link_mapping ()">poppler_page_free_link_mapping</a> (GList *list);
+GList * <a class="link" href="poppler-poppler-page.html#poppler-page-get-image-mapping" title="poppler_page_get_image_mapping ()">poppler_page_get_image_mapping</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-free-image-mapping" title="poppler_page_free_image_mapping ()">poppler_page_free_image_mapping</a> (GList *list);
+GList * <a class="link" href="poppler-poppler-page.html#poppler-page-get-form-field-mapping" title="poppler_page_get_form_field_mapping ()">poppler_page_get_form_field_mapping</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-free-form-field-mapping" title="poppler_page_free_form_field_mapping ()">poppler_page_free_form_field_mapping</a>
+ (GList *list);
+GList * <a class="link" href="poppler-poppler-page.html#poppler-page-get-selection-region" title="poppler_page_get_selection_region ()">poppler_page_get_selection_region</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ gdouble scale,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-render-selection" title="poppler_page_render_selection ()">poppler_page_render_selection</a> (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ cairo_t *cairo,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *old_selection,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ PopplerColor *glyph_color,
+ PopplerColor *background_color);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-render-selection-to-pixbuf" title="poppler_page_render_selection_to_pixbuf ()">poppler_page_render_selection_to_pixbuf</a>
+ (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ gdouble scale,
+ int rotation,
+ GdkPixbuf *pixbuf,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *old_selection,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ GdkColor *glyph_color,
+ GdkColor *background_color);
+#define <a class="link" href="poppler-poppler-page.html#POPPLER-TYPE-RECTANGLE--CAPS" title="POPPLER_TYPE_RECTANGLE">POPPLER_TYPE_RECTANGLE</a>
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a>;
+GType <a class="link" href="poppler-poppler-page.html#poppler-rectangle-get-type" title="poppler_rectangle_get_type ()">poppler_rectangle_get_type</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> * <a class="link" href="poppler-poppler-page.html#poppler-rectangle-new" title="poppler_rectangle_new ()">poppler_rectangle_new</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> * <a class="link" href="poppler-poppler-page.html#poppler-rectangle-copy" title="poppler_rectangle_copy ()">poppler_rectangle_copy</a> (<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rectangle);
+void <a class="link" href="poppler-poppler-page.html#poppler-rectangle-free" title="poppler_rectangle_free ()">poppler_rectangle_free</a> (<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rectangle);
+#define <a class="link" href="poppler-poppler-page.html#POPPLER-TYPE-PAGE-TRANSITION--CAPS" title="POPPLER_TYPE_PAGE_TRANSITION">POPPLER_TYPE_PAGE_TRANSITION</a>
+ <a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a>;
+GType <a class="link" href="poppler-poppler-page.html#poppler-page-transition-get-type" title="poppler_page_transition_get_type ()">poppler_page_transition_get_type</a> (void);
+<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * <a class="link" href="poppler-poppler-page.html#poppler-page-transition-new" title="poppler_page_transition_new ()">poppler_page_transition_new</a> (void);
+<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * <a class="link" href="poppler-poppler-page.html#poppler-page-transition-copy" title="poppler_page_transition_copy ()">poppler_page_transition_copy</a> (<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> *transition);
+void <a class="link" href="poppler-poppler-page.html#poppler-page-transition-free" title="poppler_page_transition_free ()">poppler_page_transition_free</a> (<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> *transition);
+#define <a class="link" href="poppler-poppler-page.html#POPPLER-TYPE-LINK-MAPPING--CAPS" title="POPPLER_TYPE_LINK_MAPPING">POPPLER_TYPE_LINK_MAPPING</a>
+ <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a>;
+GType <a class="link" href="poppler-poppler-page.html#poppler-link-mapping-get-type" title="poppler_link_mapping_get_type ()">poppler_link_mapping_get_type</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-link-mapping-new" title="poppler_link_mapping_new ()">poppler_link_mapping_new</a> (void);
+<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-link-mapping-copy" title="poppler_link_mapping_copy ()">poppler_link_mapping_copy</a> (<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> *mapping);
+void <a class="link" href="poppler-poppler-page.html#poppler-link-mapping-free" title="poppler_link_mapping_free ()">poppler_link_mapping_free</a> (<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> *mapping);
+#define <a class="link" href="poppler-poppler-page.html#POPPLER-TYPE-IMAGE-MAPPING--CAPS" title="POPPLER_TYPE_IMAGE_MAPPING">POPPLER_TYPE_IMAGE_MAPPING</a>
+ <a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a>;
+GType <a class="link" href="poppler-poppler-page.html#poppler-image-mapping-get-type" title="poppler_image_mapping_get_type ()">poppler_image_mapping_get_type</a> (void);
+<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-image-mapping-new" title="poppler_image_mapping_new ()">poppler_image_mapping_new</a> (void);
+<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-image-mapping-copy" title="poppler_image_mapping_copy ()">poppler_image_mapping_copy</a> (<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> *mapping);
+void <a class="link" href="poppler-poppler-page.html#poppler-image-mapping-free" title="poppler_image_mapping_free ()">poppler_image_mapping_free</a> (<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> *mapping);
+#define <a class="link" href="poppler-poppler-page.html#POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS" title="POPPLER_TYPE_FORM_FIELD_MAPPING">POPPLER_TYPE_FORM_FIELD_MAPPING</a>
+ <a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a>;
+GType <a class="link" href="poppler-poppler-page.html#poppler-form-field-mapping-get-type" title="poppler_form_field_mapping_get_type ()">poppler_form_field_mapping_get_type</a> (void);
+<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-form-field-mapping-new" title="poppler_form_field_mapping_new ()">poppler_form_field_mapping_new</a>
+ (void);
+<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> * <a class="link" href="poppler-poppler-page.html#poppler-form-field-mapping-copy" title="poppler_form_field_mapping_copy ()">poppler_form_field_mapping_copy</a>
+ (<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> *mapping);
+void <a class="link" href="poppler-poppler-page.html#poppler-form-field-mapping-free" title="poppler_form_field_mapping_free ()">poppler_form_field_mapping_free</a> (<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> *mapping);
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler-page.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler-page.details"></a><h2>Details</h2>
+<div class="refsect2" title="poppler_page_render ()">
+<a name="poppler-page-render"></a><h3>poppler_page_render ()</h3>
+<pre class="programlisting">void poppler_page_render (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ cairo_t *cairo);</pre>
+<p>
+Render the page to the given cairo context. This function
+is for rendering a page that will be displayed. If you want
+to render a page that will be printed use
+<code class="function">poppler_page_render_for_printing()</code> instead</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> the page to render from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cairo</code></em> :</span></p></td>
+<td> cairo context to render to
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_render_to_pixbuf ()">
+<a name="poppler-page-render-to-pixbuf"></a><h3>poppler_page_render_to_pixbuf ()</h3>
+<pre class="programlisting">void poppler_page_render_to_pixbuf (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ int src_x,
+ int src_y,
+ int src_width,
+ int src_height,
+ double scale,
+ int rotation,
+ GdkPixbuf *pixbuf);</pre>
+<p>
+First scale the document to match the specified pixels per point,
+then render the rectangle given by the upper left corner at
+(src_x, src_y) and src_width and src_height.
+This function is for rendering a page that will be displayed.
+If you want to render a page that will be printed use
+<code class="function">poppler_page_render_to_pixbuf_for_printing()</code> instead</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> the page to render from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src_x</code></em> :</span></p></td>
+<td> x coordinate of upper left corner
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src_y</code></em> :</span></p></td>
+<td> y coordinate of upper left corner
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src_width</code></em> :</span></p></td>
+<td> width of rectangle to render
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src_height</code></em> :</span></p></td>
+<td> height of rectangle to render
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>scale</code></em> :</span></p></td>
+<td> scale specified as pixels per point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em> :</span></p></td>
+<td> rotate the document by the specified degree
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
+<td> pixbuf to render into
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_size ()">
+<a name="poppler-page-get-size"></a><h3>poppler_page_get_size ()</h3>
+<pre class="programlisting">void poppler_page_get_size (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ double *width,
+ double *height);</pre>
+<p>
+Gets the size of <em class="parameter"><code>page</code></em> at the current scale and rotation.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
+<td> return location for the width of <em class="parameter"><code>page</code></em>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
+<td> return location for the height of <em class="parameter"><code>page</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_index ()">
+<a name="poppler-page-get-index"></a><h3>poppler_page_get_index ()</h3>
+<pre class="programlisting">int poppler_page_get_index (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns the index of <em class="parameter"><code>page</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> index value of <em class="parameter"><code>page</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_thumbnail ()">
+<a name="poppler-page-get-thumbnail"></a><h3>poppler_page_get_thumbnail ()</h3>
+<pre class="programlisting">cairo_surface_t * poppler_page_get_thumbnail (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Get the embedded thumbnail for the specified page. If the document
+doesn't have an embedded thumbnail for the page, this function
+returns <code class="literal">NULL</code>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> the <span class="type">PopperPage</span> to get the thumbnail for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the tumbnail as a cairo_surface_t or <code class="literal">NULL</code> if the document
+doesn't have a thumbnail for this page.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_thumbnail_size ()">
+<a name="poppler-page-get-thumbnail-size"></a><h3>poppler_page_get_thumbnail_size ()</h3>
+<pre class="programlisting">gboolean poppler_page_get_thumbnail_size (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ int *width,
+ int *height);</pre>
+<p>
+Returns <code class="literal">TRUE</code> if <em class="parameter"><code>page</code></em> has a thumbnail associated with it. It also
+fills in <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> with the width and height of the
+thumbnail. The values of width and height are not changed if no
+appropriate thumbnail exists.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
+<td> return location for width
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
+<td> return location for height
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <code class="literal">TRUE</code>, if <em class="parameter"><code>page</code></em> has a thumbnail associated with it.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_render_to_ps ()">
+<a name="poppler-page-render-to-ps"></a><h3>poppler_page_render_to_ps ()</h3>
+<pre class="programlisting">void poppler_page_render_to_ps (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ <a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a> *ps_file);</pre>
+<p>
+Render the page on a postscript file</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ps_file</code></em> :</span></p></td>
+<td> the PopplerPSFile to render to
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_find_text ()">
+<a name="poppler-page-find-text"></a><h3>poppler_page_find_text ()</h3>
+<pre class="programlisting">GList * poppler_page_find_text (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ const char *text);</pre>
+<p>
+A <span class="type">GList</span> of rectangles for each occurance of the text on the page.
+The coordinates are in PDF points.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
+<td> the text to search for (UTF-8 encoded)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a <span class="type">GList</span> of PopplerRectangle,
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_text ()">
+<a name="poppler-page-get-text"></a><h3>poppler_page_get_text ()</h3>
+<pre class="programlisting">char * poppler_page_get_text (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rect);</pre>
+<p>
+Retrieves the contents of the specified <em class="parameter"><code>selection</code></em> as text.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle"><span class="type">PopplerSelectionStyle</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a pointer to the contents of the <em class="parameter"><code>selection</code></em>
+ as a string
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_duration ()">
+<a name="poppler-page-get-duration"></a><h3>poppler_page_get_duration ()</h3>
+<pre class="programlisting">double poppler_page_get_duration (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns the duration of <em class="parameter"><code>page</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> duration in seconds of <em class="parameter"><code>page</code></em> or -1.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_transition ()">
+<a name="poppler-page-get-transition"></a><h3>poppler_page_get_transition ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * poppler_page_get_transition (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns the transition effect of <em class="parameter"><code>page</code></em></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition"><span class="type">PopplerPageTransition</span></a> or NULL.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_link_mapping ()">
+<a name="poppler-page-get-link-mapping"></a><h3>poppler_page_get_link_mapping ()</h3>
+<pre class="programlisting">GList * poppler_page_get_link_mapping (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns a list of <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping"><span class="type">PopplerLinkMapping</span></a> items that map from a
+location on <em class="parameter"><code>page</code></em> to a <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>. This list must be freed
+with <a class="link" href="poppler-poppler-page.html#poppler-page-free-link-mapping" title="poppler_page_free_link_mapping ()"><code class="function">poppler_page_free_link_mapping()</code></a> when done.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> A <span class="type">GList</span> of <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping"><span class="type">PopplerLinkMapping</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_free_link_mapping ()">
+<a name="poppler-page-free-link-mapping"></a><h3>poppler_page_free_link_mapping ()</h3>
+<pre class="programlisting">void poppler_page_free_link_mapping (GList *list);</pre>
+<p>
+Frees a list of <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping"><span class="type">PopplerLinkMapping</span></a>s allocated by
+<a class="link" href="poppler-poppler-page.html#poppler-page-get-link-mapping" title="poppler_page_get_link_mapping ()"><code class="function">poppler_page_get_link_mapping()</code></a>. It also frees the <a class="link" href="poppler-poppler-action.html#PopplerAction" title="union PopplerAction"><span class="type">PopplerAction</span></a>s
+that each mapping contains, so if you want to keep them around, you need to
+copy them with <a class="link" href="poppler-poppler-action.html#poppler-action-copy" title="poppler_action_copy ()"><code class="function">poppler_action_copy()</code></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td> A list of <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping"><span class="type">PopplerLinkMapping</span></a>s
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_image_mapping ()">
+<a name="poppler-page-get-image-mapping"></a><h3>poppler_page_get_image_mapping ()</h3>
+<pre class="programlisting">GList * poppler_page_get_image_mapping (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns a list of <a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping"><span class="type">PopplerImageMapping</span></a> items that map from a
+location on <em class="parameter"><code>page</code></em> to an image of the page. This list must be freed
+with <a class="link" href="poppler-poppler-page.html#poppler-page-free-image-mapping" title="poppler_page_free_image_mapping ()"><code class="function">poppler_page_free_image_mapping()</code></a> when done.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> A <span class="type">GList</span> of <a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping"><span class="type">PopplerImageMapping</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_free_image_mapping ()">
+<a name="poppler-page-free-image-mapping"></a><h3>poppler_page_free_image_mapping ()</h3>
+<pre class="programlisting">void poppler_page_free_image_mapping (GList *list);</pre>
+<p>
+Frees a list of <a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping"><span class="type">PopplerImageMapping</span></a>s allocated by
+<a class="link" href="poppler-poppler-page.html#poppler-page-get-image-mapping" title="poppler_page_get_image_mapping ()"><code class="function">poppler_page_get_image_mapping()</code></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td> A list of <a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping"><span class="type">PopplerImageMapping</span></a>s
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_form_field_mapping ()">
+<a name="poppler-page-get-form-field-mapping"></a><h3>poppler_page_get_form_field_mapping ()</h3>
+<pre class="programlisting">GList * poppler_page_get_form_field_mapping (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page);</pre>
+<p>
+Returns a list of <a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping"><span class="type">PopplerFormFieldMapping</span></a> items that map from a
+location on <em class="parameter"><code>page</code></em> to a form field. This list must be freed
+with <a class="link" href="poppler-poppler-page.html#poppler-page-free-form-field-mapping" title="poppler_page_free_form_field_mapping ()"><code class="function">poppler_page_free_form_field_mapping()</code></a> when done.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> A <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> A <span class="type">GList</span> of <a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping"><span class="type">PopplerFormFieldMapping</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_free_form_field_mapping ()">
+<a name="poppler-page-free-form-field-mapping"></a><h3>poppler_page_free_form_field_mapping ()</h3>
+<pre class="programlisting">void poppler_page_free_form_field_mapping
+ (GList *list);</pre>
+<p>
+Frees a list of <a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping"><span class="type">PopplerFormFieldMapping</span></a>s allocated by
+<a class="link" href="poppler-poppler-page.html#poppler-page-get-form-field-mapping" title="poppler_page_get_form_field_mapping ()"><code class="function">poppler_page_get_form_field_mapping()</code></a>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td> A list of <a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping"><span class="type">PopplerFormFieldMapping</span></a>s
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_get_selection_region ()">
+<a name="poppler-page-get-selection-region"></a><h3>poppler_page_get_selection_region ()</h3>
+<pre class="programlisting">GList * poppler_page_get_selection_region (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ gdouble scale,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection);</pre>
+<p>
+Returns a region containing the area that would be rendered by
+<a class="link" href="poppler-poppler-page.html#poppler-page-render-selection" title="poppler_page_render_selection ()"><code class="function">poppler_page_render_selection()</code></a> or
+<a class="link" href="poppler-poppler-page.html#poppler-page-render-selection-to-pixbuf" title="poppler_page_render_selection_to_pixbuf ()"><code class="function">poppler_page_render_selection_to_pixbuf()</code></a> as a <span class="type">GList</span> of
+<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle"><span class="type">PopplerRectangle</span></a>. The returned list must be freed with
+<code class="function">poppler_page_selection_region_free()</code>.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>scale</code></em> :</span></p></td>
+<td> scale specified as pixels per point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle"><span class="type">PopplerSelectionStyle</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
+<td> start and end point of selection as a rectangle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a <span class="type">GList</span> of <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle"><span class="type">PopplerRectangle</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_render_selection ()">
+<a name="poppler-page-render-selection"></a><h3>poppler_page_render_selection ()</h3>
+<pre class="programlisting">void poppler_page_render_selection (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ cairo_t *cairo,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *old_selection,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ PopplerColor *glyph_color,
+ PopplerColor *background_color);</pre>
+<p>
+Render the selection specified by <em class="parameter"><code>selection</code></em> for <em class="parameter"><code>page</code></em> to
+the given cairo context. The selection will be rendered, using
+<em class="parameter"><code>glyph_color</code></em> for the glyphs and <em class="parameter"><code>background_color</code></em> for the selection
+background.
+</p>
+<p>
+If non-NULL, <em class="parameter"><code>old_selection</code></em> specifies the selection that is already
+rendered to <em class="parameter"><code>cairo</code></em>, in which case this function will (some day)
+only render the changed part of the selection.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> the <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> for which to render selection
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>cairo</code></em> :</span></p></td>
+<td> cairo context to render to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
+<td> start and end point of selection as a rectangle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>old_selection</code></em> :</span></p></td>
+<td> previous selection
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle"><span class="type">PopplerSelectionStyle</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>glyph_color</code></em> :</span></p></td>
+<td> color to use for drawing glyphs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>background_color</code></em> :</span></p></td>
+<td> color to use for the selection background
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_render_selection_to_pixbuf ()">
+<a name="poppler-page-render-selection-to-pixbuf"></a><h3>poppler_page_render_selection_to_pixbuf ()</h3>
+<pre class="programlisting">void poppler_page_render_selection_to_pixbuf
+ (<a class="link" href="poppler-poppler.html#PopplerPage">PopplerPage</a> *page,
+ gdouble scale,
+ int rotation,
+ GdkPixbuf *pixbuf,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *selection,
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *old_selection,
+ <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a> style,
+ GdkColor *glyph_color,
+ GdkColor *background_color);</pre>
+<p>
+Render the selection specified by <em class="parameter"><code>selection</code></em> for <em class="parameter"><code>page</code></em> into
+<em class="parameter"><code>pixbuf</code></em>. The selection will be rendered at <em class="parameter"><code>scale</code></em>, using
+<em class="parameter"><code>glyph_color</code></em> for the glyphs and <em class="parameter"><code>background_color</code></em> for the selection
+background.
+</p>
+<p>
+If non-NULL, <em class="parameter"><code>old_selection</code></em> specifies the selection that is already
+rendered in <em class="parameter"><code>pixbuf</code></em>, in which case this function will (some day)
+only render the changed part of the selection.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>page</code></em> :</span></p></td>
+<td> the <a class="link" href="poppler-poppler.html#PopplerPage"><span class="type">PopplerPage</span></a> for which to render selection
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>scale</code></em> :</span></p></td>
+<td> scale specified as pixels per point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em> :</span></p></td>
+<td> rotate the document by the specified degree
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
+<td> pixbuf to render to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
+<td> start and end point of selection as a rectangle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>old_selection</code></em> :</span></p></td>
+<td> previous selection
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
+<td> a <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle"><span class="type">PopplerSelectionStyle</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>glyph_color</code></em> :</span></p></td>
+<td> color to use for drawing glyphs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>background_color</code></em> :</span></p></td>
+<td> color to use for the selection background
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_RECTANGLE">
+<a name="POPPLER-TYPE-RECTANGLE--CAPS"></a><h3>POPPLER_TYPE_RECTANGLE</h3>
+<pre class="programlisting">#define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerRectangle">
+<a name="PopplerRectangle"></a><h3>PopplerRectangle</h3>
+<pre class="programlisting">typedef struct {
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+} PopplerRectangle;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_rectangle_get_type ()">
+<a name="poppler-rectangle-get-type"></a><h3>poppler_rectangle_get_type ()</h3>
+<pre class="programlisting">GType poppler_rectangle_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_rectangle_new ()">
+<a name="poppler-rectangle-new"></a><h3>poppler_rectangle_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> * poppler_rectangle_new (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_rectangle_copy ()">
+<a name="poppler-rectangle-copy"></a><h3>poppler_rectangle_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> * poppler_rectangle_copy (<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rectangle);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rectangle</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_rectangle_free ()">
+<a name="poppler-rectangle-free"></a><h3>poppler_rectangle_free ()</h3>
+<pre class="programlisting">void poppler_rectangle_free (<a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a> *rectangle);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>rectangle</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_PAGE_TRANSITION">
+<a name="POPPLER-TYPE-PAGE-TRANSITION--CAPS"></a><h3>POPPLER_TYPE_PAGE_TRANSITION</h3>
+<pre class="programlisting">#define POPPLER_TYPE_PAGE_TRANSITION (poppler_page_transition_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerPageTransition">
+<a name="PopplerPageTransition"></a><h3>PopplerPageTransition</h3>
+<pre class="programlisting">typedef struct {
+ PopplerPageTransitionType type;
+ PopplerPageTransitionAlignment alignment;
+ PopplerPageTransitionDirection direction;
+ gint duration;
+ gint angle;
+ gdouble scale;
+ gboolean rectangular;
+} PopplerPageTransition;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_get_type ()">
+<a name="poppler-page-transition-get-type"></a><h3>poppler_page_transition_get_type ()</h3>
+<pre class="programlisting">GType poppler_page_transition_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_new ()">
+<a name="poppler-page-transition-new"></a><h3>poppler_page_transition_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * poppler_page_transition_new (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_copy ()">
+<a name="poppler-page-transition-copy"></a><h3>poppler_page_transition_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> * poppler_page_transition_copy (<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> *transition);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>transition</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_page_transition_free ()">
+<a name="poppler-page-transition-free"></a><h3>poppler_page_transition_free ()</h3>
+<pre class="programlisting">void poppler_page_transition_free (<a class="link" href="poppler-poppler-page.html#PopplerPageTransition" title="PopplerPageTransition">PopplerPageTransition</a> *transition);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>transition</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_LINK_MAPPING">
+<a name="POPPLER-TYPE-LINK-MAPPING--CAPS"></a><h3>POPPLER_TYPE_LINK_MAPPING</h3>
+<pre class="programlisting">#define POPPLER_TYPE_LINK_MAPPING (poppler_link_mapping_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerLinkMapping">
+<a name="PopplerLinkMapping"></a><h3>PopplerLinkMapping</h3>
+<pre class="programlisting">typedef struct {
+ PopplerRectangle area;
+ PopplerAction *action;
+} PopplerLinkMapping;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_link_mapping_get_type ()">
+<a name="poppler-link-mapping-get-type"></a><h3>poppler_link_mapping_get_type ()</h3>
+<pre class="programlisting">GType poppler_link_mapping_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_link_mapping_new ()">
+<a name="poppler-link-mapping-new"></a><h3>poppler_link_mapping_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> * poppler_link_mapping_new (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_link_mapping_copy ()">
+<a name="poppler-link-mapping-copy"></a><h3>poppler_link_mapping_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> * poppler_link_mapping_copy (<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_link_mapping_free ()">
+<a name="poppler-link-mapping-free"></a><h3>poppler_link_mapping_free ()</h3>
+<pre class="programlisting">void poppler_link_mapping_free (<a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_IMAGE_MAPPING">
+<a name="POPPLER-TYPE-IMAGE-MAPPING--CAPS"></a><h3>POPPLER_TYPE_IMAGE_MAPPING</h3>
+<pre class="programlisting">#define POPPLER_TYPE_IMAGE_MAPPING (poppler_image_mapping_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerImageMapping">
+<a name="PopplerImageMapping"></a><h3>PopplerImageMapping</h3>
+<pre class="programlisting">typedef struct {
+ PopplerRectangle area;
+ gint image_id;
+} PopplerImageMapping;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_image_mapping_get_type ()">
+<a name="poppler-image-mapping-get-type"></a><h3>poppler_image_mapping_get_type ()</h3>
+<pre class="programlisting">GType poppler_image_mapping_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_image_mapping_new ()">
+<a name="poppler-image-mapping-new"></a><h3>poppler_image_mapping_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> * poppler_image_mapping_new (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_image_mapping_copy ()">
+<a name="poppler-image-mapping-copy"></a><h3>poppler_image_mapping_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> * poppler_image_mapping_copy (<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_image_mapping_free ()">
+<a name="poppler-image-mapping-free"></a><h3>poppler_image_mapping_free ()</h3>
+<pre class="programlisting">void poppler_image_mapping_free (<a class="link" href="poppler-poppler-page.html#PopplerImageMapping" title="PopplerImageMapping">PopplerImageMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_TYPE_FORM_FIELD_MAPPING">
+<a name="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS"></a><h3>POPPLER_TYPE_FORM_FIELD_MAPPING</h3>
+<pre class="programlisting">#define POPPLER_TYPE_FORM_FIELD_MAPPING (poppler_form_field_mapping_get_type ())
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerFormFieldMapping">
+<a name="PopplerFormFieldMapping"></a><h3>PopplerFormFieldMapping</h3>
+<pre class="programlisting">typedef struct {
+ PopplerRectangle area;
+ PopplerFormField *field;
+} PopplerFormFieldMapping;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_mapping_get_type ()">
+<a name="poppler-form-field-mapping-get-type"></a><h3>poppler_form_field_mapping_get_type ()</h3>
+<pre class="programlisting">GType poppler_form_field_mapping_get_type (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_mapping_new ()">
+<a name="poppler-form-field-mapping-new"></a><h3>poppler_form_field_mapping_new ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> * poppler_form_field_mapping_new
+ (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_mapping_copy ()">
+<a name="poppler-form-field-mapping-copy"></a><h3>poppler_form_field_mapping_copy ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> * poppler_form_field_mapping_copy
+ (<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_form_field_mapping_free ()">
+<a name="poppler-form-field-mapping-free"></a><h3>poppler_form_field_mapping_free ()</h3>
+<pre class="programlisting">void poppler_form_field_mapping_free (<a class="link" href="poppler-poppler-page.html#PopplerFormFieldMapping" title="PopplerFormFieldMapping">PopplerFormFieldMapping</a> *mapping);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>mapping</code></em> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler.html b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler.html
new file mode 100644
index 00000000000..4878a272010
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler-poppler.html
@@ -0,0 +1,483 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>poppler</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Poppler Reference Manual">
+<link rel="up" href="ch01.html" title="Poppler">
+<link rel="prev" href="ch01.html" title="Poppler">
+<link rel="next" href="poppler-poppler-document.html" title="PopplerDocument">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="Poppler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">Poppler Reference Manual</th>
+<td><a accesskey="n" href="poppler-poppler-document.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#poppler-poppler.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#poppler-poppler.description" class="shortcut">Description</a>
+  | 
+ <a href="#poppler-poppler.object-hierarchy" class="shortcut">Object Hierarchy</a>
+  | 
+ <a href="#poppler-poppler.properties" class="shortcut">Properties</a>
+</td></tr>
+</table>
+<div class="refentry" title="poppler">
+<a name="poppler-poppler"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="poppler-poppler.top_of_page"></a>poppler</span></h2>
+<p>poppler</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv" title="Synopsis">
+<a name="poppler-poppler.synopsis"></a><h2>Synopsis</h2>
+<a name="PopplerDocument"></a><a name="PopplerPage"></a><pre class="synopsis">
+GQuark <a class="link" href="poppler-poppler.html#poppler-error-quark" title="poppler_error_quark ()">poppler_error_quark</a> (void);
+#define <a class="link" href="poppler-poppler.html#POPPLER-ERROR--CAPS" title="POPPLER_ERROR">POPPLER_ERROR</a>
+enum <a class="link" href="poppler-poppler.html#PopplerError" title="enum PopplerError">PopplerError</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerOrientation" title="enum PopplerOrientation">PopplerOrientation</a>;
+ <a class="link" href="poppler-poppler.html#PopplerDocument-struct" title="PopplerDocument">PopplerDocument</a>;
+ <a class="link" href="poppler-poppler.html#PopplerIndexIter" title="PopplerIndexIter">PopplerIndexIter</a>;
+ <a class="link" href="poppler-poppler.html#PopplerFontsIter" title="PopplerFontsIter">PopplerFontsIter</a>;
+ <a class="link" href="poppler-poppler.html#PopplerRectangle" title="PopplerRectangle">PopplerRectangle</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerSelectionStyle" title="enum PopplerSelectionStyle">PopplerSelectionStyle</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerPageTransitionType" title="enum PopplerPageTransitionType">PopplerPageTransitionType</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerPageTransitionAlignment" title="enum PopplerPageTransitionAlignment">PopplerPageTransitionAlignment</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerPageTransitionDirection" title="enum PopplerPageTransitionDirection">PopplerPageTransitionDirection</a>;
+ <a class="link" href="poppler-poppler.html#PopplerLinkMapping" title="PopplerLinkMapping">PopplerLinkMapping</a>;
+ <a class="link" href="poppler-poppler.html#PopplerPage-struct" title="PopplerPage">PopplerPage</a>;
+ <a class="link" href="poppler-poppler.html#PopplerFontInfo" title="PopplerFontInfo">PopplerFontInfo</a>;
+ <a class="link" href="poppler-poppler.html#PopplerPSFile" title="PopplerPSFile">PopplerPSFile</a>;
+enum <a class="link" href="poppler-poppler.html#PopplerBackend" title="enum PopplerBackend">PopplerBackend</a>;
+<a class="link" href="poppler-poppler.html#PopplerBackend" title="enum PopplerBackend">PopplerBackend</a> <a class="link" href="poppler-poppler.html#poppler-get-backend" title="poppler_get_backend ()">poppler_get_backend</a> (void);
+const char * <a class="link" href="poppler-poppler.html#poppler-get-version" title="poppler_get_version ()">poppler_get_version</a> (void);
+</pre>
+</div>
+<div class="refsect1" title="Object Hierarchy">
+<a name="poppler-poppler.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="synopsis">
+ GObject
+ +----PopplerDocument
+</pre>
+<pre class="synopsis">
+ GObject
+ +----PopplerPage
+</pre>
+</div>
+<div class="refsect1" title="Properties">
+<a name="poppler-poppler.properties"></a><h2>Properties</h2>
+<pre class="synopsis">
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--author" title='The "author" property'>author</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--creation-date" title='The "creation-date" property'>creation-date</a>" gint : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--creator" title='The "creator" property'>creator</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--format" title='The "format" property'>format</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--format-major" title='The "format-major" property'>format-major</a>" guint : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--format-minor" title='The "format-minor" property'>format-minor</a>" guint : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--keywords" title='The "keywords" property'>keywords</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--linearized" title='The "linearized" property'>linearized</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--metadata" title='The "metadata" property'>metadata</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--mod-date" title='The "mod-date" property'>mod-date</a>" gint : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--page-layout" title='The "page-layout" property'>page-layout</a>" <a class="link" href="poppler-poppler-document.html#PopplerPageLayout" title="enum PopplerPageLayout">PopplerPageLayout</a> : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--page-mode" title='The "page-mode" property'>page-mode</a>" <a class="link" href="poppler-poppler-document.html#PopplerPageMode" title="enum PopplerPageMode">PopplerPageMode</a> : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--permissions" title='The "permissions" property'>permissions</a>" <a class="link" href="poppler-poppler-document.html#PopplerPermissions" title="enum PopplerPermissions">PopplerPermissions</a> : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--producer" title='The "producer" property'>producer</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--subject" title='The "subject" property'>subject</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--title" title='The "title" property'>title</a>" gchar* : Read
+ "<a class="link" href="poppler-poppler.html#PopplerDocument--viewer-preferences" title='The "viewer-preferences" property'>viewer-preferences</a>" <a class="link" href="poppler-poppler-document.html#PopplerViewerPreferences" title="enum PopplerViewerPreferences">PopplerViewerPreferences</a> : Read
+ "<a class="link" href="poppler-poppler.html#PopplerPage--label" title='The "label" property'>label</a>" gchar* : Read
+</pre>
+</div>
+<div class="refsect1" title="Description">
+<a name="poppler-poppler.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" title="Details">
+<a name="poppler-poppler.details"></a><h2>Details</h2>
+<div class="refsect2" title="poppler_error_quark ()">
+<a name="poppler-error-quark"></a><h3>poppler_error_quark ()</h3>
+<pre class="programlisting">GQuark poppler_error_quark (void);</pre>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="POPPLER_ERROR">
+<a name="POPPLER-ERROR--CAPS"></a><h3>POPPLER_ERROR</h3>
+<pre class="programlisting">#define POPPLER_ERROR poppler_error_quark ()
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerError">
+<a name="PopplerError"></a><h3>enum PopplerError</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_ERROR_INVALID,
+ POPPLER_ERROR_ENCRYPTED,
+ POPPLER_ERROR_OPEN_FILE,
+ POPPLER_ERROR_BAD_CATALOG,
+ POPPLER_ERROR_DAMAGED
+} PopplerError;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerOrientation">
+<a name="PopplerOrientation"></a><h3>enum PopplerOrientation</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_ORIENTATION_PORTRAIT,
+ POPPLER_ORIENTATION_LANDSCAPE,
+ POPPLER_ORIENTATION_UPSIDEDOWN,
+ POPPLER_ORIENTATION_SEASCAPE
+} PopplerOrientation;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerDocument">
+<a name="PopplerDocument-struct"></a><h3>PopplerDocument</h3>
+<pre class="programlisting">typedef struct _PopplerDocument PopplerDocument;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerIndexIter">
+<a name="PopplerIndexIter"></a><h3>PopplerIndexIter</h3>
+<pre class="programlisting">typedef struct _PopplerIndexIter PopplerIndexIter;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerFontsIter">
+<a name="PopplerFontsIter"></a><h3>PopplerFontsIter</h3>
+<pre class="programlisting">typedef struct _PopplerFontsIter PopplerFontsIter;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerRectangle">
+<a name="PopplerRectangle"></a><h3>PopplerRectangle</h3>
+<pre class="programlisting">typedef struct {
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+} PopplerRectangle;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerSelectionStyle">
+<a name="PopplerSelectionStyle"></a><h3>enum PopplerSelectionStyle</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_SELECTION_GLYPH,
+ POPPLER_SELECTION_WORD,
+ POPPLER_SELECTION_LINE
+} PopplerSelectionStyle;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerPageTransitionType">
+<a name="PopplerPageTransitionType"></a><h3>enum PopplerPageTransitionType</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_PAGE_TRANSITION_REPLACE,
+ POPPLER_PAGE_TRANSITION_SPLIT,
+ POPPLER_PAGE_TRANSITION_BLINDS,
+ POPPLER_PAGE_TRANSITION_BOX,
+ POPPLER_PAGE_TRANSITION_WIPE,
+ POPPLER_PAGE_TRANSITION_DISSOLVE,
+ POPPLER_PAGE_TRANSITION_GLITTER,
+ POPPLER_PAGE_TRANSITION_FLY,
+ POPPLER_PAGE_TRANSITION_PUSH,
+ POPPLER_PAGE_TRANSITION_COVER,
+ POPPLER_PAGE_TRANSITION_UNCOVER,
+ POPPLER_PAGE_TRANSITION_FADE
+} PopplerPageTransitionType;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerPageTransitionAlignment">
+<a name="PopplerPageTransitionAlignment"></a><h3>enum PopplerPageTransitionAlignment</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_PAGE_TRANSITION_HORIZONTAL,
+ POPPLER_PAGE_TRANSITION_VERTICAL
+} PopplerPageTransitionAlignment;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerPageTransitionDirection">
+<a name="PopplerPageTransitionDirection"></a><h3>enum PopplerPageTransitionDirection</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_PAGE_TRANSITION_INWARD,
+ POPPLER_PAGE_TRANSITION_OUTWARD
+} PopplerPageTransitionDirection;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerLinkMapping">
+<a name="PopplerLinkMapping"></a><h3>PopplerLinkMapping</h3>
+<pre class="programlisting">typedef struct {
+ PopplerRectangle area;
+ PopplerAction *action;
+} PopplerLinkMapping;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerPage">
+<a name="PopplerPage-struct"></a><h3>PopplerPage</h3>
+<pre class="programlisting">typedef struct _PopplerPage PopplerPage;</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerFontInfo">
+<a name="PopplerFontInfo"></a><h3>PopplerFontInfo</h3>
+<pre class="programlisting">typedef struct {
+ GObject parent_instance;
+ PopplerDocument *document;
+ FontInfoScanner *scanner;
+} PopplerFontInfo;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="PopplerPSFile">
+<a name="PopplerPSFile"></a><h3>PopplerPSFile</h3>
+<pre class="programlisting">typedef struct {
+ GObject parent_instance;
+
+ PopplerDocument *document;
+ PSOutputDev *out;
+ char *filename;
+ int first_page;
+ int last_page;
+ double paper_width;
+ double paper_height;
+ gboolean duplex;
+} PopplerPSFile;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="enum PopplerBackend">
+<a name="PopplerBackend"></a><h3>enum PopplerBackend</h3>
+<pre class="programlisting">typedef enum
+{
+ POPPLER_BACKEND_UNKNOWN,
+ POPPLER_BACKEND_SPLASH,
+ POPPLER_BACKEND_CAIRO
+} PopplerBackend;
+</pre>
+<p>
+</p>
+</div>
+<hr>
+<div class="refsect2" title="poppler_get_backend ()">
+<a name="poppler-get-backend"></a><h3>poppler_get_backend ()</h3>
+<pre class="programlisting"><a class="link" href="poppler-poppler.html#PopplerBackend" title="enum PopplerBackend">PopplerBackend</a> poppler_get_backend (void);</pre>
+<p>
+Returns the backend compiled into the poppler library.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> The backend used by poppler
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" title="poppler_get_version ()">
+<a name="poppler-get-version"></a><h3>poppler_get_version ()</h3>
+<pre class="programlisting">const char * poppler_get_version (void);</pre>
+<p>
+Returns the version of poppler in use. This result is not to be freed.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the version of poppler.
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" title="Property Details">
+<a name="poppler-poppler.property-details"></a><h2>Property Details</h2>
+<div class="refsect2" title='The "author" property'>
+<a name="PopplerDocument--author"></a><h3>The <code class="literal">"author"</code> property</h3>
+<pre class="programlisting"> "author" gchar* : Read</pre>
+<p>The author of the document.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "creation-date" property'>
+<a name="PopplerDocument--creation-date"></a><h3>The <code class="literal">"creation-date"</code> property</h3>
+<pre class="programlisting"> "creation-date" gint : Read</pre>
+<p>The date and time the document was created.</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2" title='The "creator" property'>
+<a name="PopplerDocument--creator"></a><h3>The <code class="literal">"creator"</code> property</h3>
+<pre class="programlisting"> "creator" gchar* : Read</pre>
+<p>The software that created the document.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "format" property'>
+<a name="PopplerDocument--format"></a><h3>The <code class="literal">"format"</code> property</h3>
+<pre class="programlisting"> "format" gchar* : Read</pre>
+<p>The PDF version of the document.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "format-major" property'>
+<a name="PopplerDocument--format-major"></a><h3>The <code class="literal">"format-major"</code> property</h3>
+<pre class="programlisting"> "format-major" guint : Read</pre>
+<p>The PDF major version number of the document.</p>
+<p>Default value: 1</p>
+</div>
+<hr>
+<div class="refsect2" title='The "format-minor" property'>
+<a name="PopplerDocument--format-minor"></a><h3>The <code class="literal">"format-minor"</code> property</h3>
+<pre class="programlisting"> "format-minor" guint : Read</pre>
+<p>The PDF minor version number of the document.</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2" title='The "keywords" property'>
+<a name="PopplerDocument--keywords"></a><h3>The <code class="literal">"keywords"</code> property</h3>
+<pre class="programlisting"> "keywords" gchar* : Read</pre>
+<p>Keywords.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "linearized" property'>
+<a name="PopplerDocument--linearized"></a><h3>The <code class="literal">"linearized"</code> property</h3>
+<pre class="programlisting"> "linearized" gchar* : Read</pre>
+<p>Is the document optimized for web viewing?.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "metadata" property'>
+<a name="PopplerDocument--metadata"></a><h3>The <code class="literal">"metadata"</code> property</h3>
+<pre class="programlisting"> "metadata" gchar* : Read</pre>
+<p>Embedded XML metadata.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "mod-date" property'>
+<a name="PopplerDocument--mod-date"></a><h3>The <code class="literal">"mod-date"</code> property</h3>
+<pre class="programlisting"> "mod-date" gint : Read</pre>
+<p>The date and time the document was modified.</p>
+<p>Allowed values: &gt;= 0</p>
+<p>Default value: 0</p>
+</div>
+<hr>
+<div class="refsect2" title='The "page-layout" property'>
+<a name="PopplerDocument--page-layout"></a><h3>The <code class="literal">"page-layout"</code> property</h3>
+<pre class="programlisting"> "page-layout" <a class="link" href="poppler-poppler-document.html#PopplerPageLayout" title="enum PopplerPageLayout">PopplerPageLayout</a> : Read</pre>
+<p>Initial Page Layout.</p>
+<p>Default value: POPPLER_PAGE_LAYOUT_UNSET</p>
+</div>
+<hr>
+<div class="refsect2" title='The "page-mode" property'>
+<a name="PopplerDocument--page-mode"></a><h3>The <code class="literal">"page-mode"</code> property</h3>
+<pre class="programlisting"> "page-mode" <a class="link" href="poppler-poppler-document.html#PopplerPageMode" title="enum PopplerPageMode">PopplerPageMode</a> : Read</pre>
+<p>Page Mode.</p>
+<p>Default value: POPPLER_PAGE_MODE_UNSET</p>
+</div>
+<hr>
+<div class="refsect2" title='The "permissions" property'>
+<a name="PopplerDocument--permissions"></a><h3>The <code class="literal">"permissions"</code> property</h3>
+<pre class="programlisting"> "permissions" <a class="link" href="poppler-poppler-document.html#PopplerPermissions" title="enum PopplerPermissions">PopplerPermissions</a> : Read</pre>
+<p>Permissions.</p>
+<p>Default value: POPPLER_PERMISSIONS_OK_TO_PRINT|POPPLER_PERMISSIONS_OK_TO_MODIFY|POPPLER_PERMISSIONS_OK_TO_COPY|POPPLER_PERMISSIONS_OK_TO_ADD_NOTES|POPPLER_PERMISSIONS_OK_TO_FILL_FORM</p>
+</div>
+<hr>
+<div class="refsect2" title='The "producer" property'>
+<a name="PopplerDocument--producer"></a><h3>The <code class="literal">"producer"</code> property</h3>
+<pre class="programlisting"> "producer" gchar* : Read</pre>
+<p>The software that converted the document.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "subject" property'>
+<a name="PopplerDocument--subject"></a><h3>The <code class="literal">"subject"</code> property</h3>
+<pre class="programlisting"> "subject" gchar* : Read</pre>
+<p>Subjects the document touches.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "title" property'>
+<a name="PopplerDocument--title"></a><h3>The <code class="literal">"title"</code> property</h3>
+<pre class="programlisting"> "title" gchar* : Read</pre>
+<p>The title of the document.</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2" title='The "viewer-preferences" property'>
+<a name="PopplerDocument--viewer-preferences"></a><h3>The <code class="literal">"viewer-preferences"</code> property</h3>
+<pre class="programlisting"> "viewer-preferences" <a class="link" href="poppler-poppler-document.html#PopplerViewerPreferences" title="enum PopplerViewerPreferences">PopplerViewerPreferences</a> : Read</pre>
+<p>Viewer Preferences.</p>
+</div>
+<hr>
+<div class="refsect2" title='The "label" property'>
+<a name="PopplerPage--label"></a><h3>The <code class="literal">"label"</code> property</h3>
+<pre class="programlisting"> "label" gchar* : Read</pre>
+<p>The label of the page.</p>
+<p>Default value: NULL</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp
new file mode 100644
index 00000000000..352257c08a1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="Poppler Reference Manual" link="index.html" author="" name="poppler">
+ <chapters>
+ <sub name="Poppler" link="ch01.html">
+ <sub name="poppler" link="poppler-poppler.html"/>
+ <sub name="PopplerDocument" link="poppler-poppler-document.html"/>
+ <sub name="PopplerPage" link="poppler-poppler-page.html"/>
+ <sub name="PopplerAction" link="poppler-poppler-action.html"/>
+ <sub name="PopplerAttachment" link="poppler-poppler-attachment.html"/>
+ <sub name="PopplerFormField" link="poppler-poppler-form-field.html"/>
+ <sub name="poppler-enums" link="poppler-poppler-enums.html"/>
+ <sub name="PopplerAnnot" link="poppler-poppler-annot.html"/>
+ <sub name="PopplerLayer" link="poppler-poppler-layer.html"/>
+ <sub name="Version and Features Information" link="poppler-poppler-features.html"/>
+ </sub>
+ </chapters>
+ <functions>
+ <function name="poppler_error_quark ()" link="poppler-poppler.html#poppler-error-quark"/>
+ <function name="POPPLER_ERROR" link="poppler-poppler.html#POPPLER-ERROR--CAPS"/>
+ <function name="enum PopplerError" link="poppler-poppler.html#PopplerError"/>
+ <function name="enum PopplerOrientation" link="poppler-poppler.html#PopplerOrientation"/>
+ <function name="PopplerDocument" link="poppler-poppler.html#PopplerDocument-struct"/>
+ <function name="PopplerIndexIter" link="poppler-poppler.html#PopplerIndexIter"/>
+ <function name="PopplerFontsIter" link="poppler-poppler.html#PopplerFontsIter"/>
+ <function name="PopplerRectangle" link="poppler-poppler.html#PopplerRectangle"/>
+ <function name="enum PopplerSelectionStyle" link="poppler-poppler.html#PopplerSelectionStyle"/>
+ <function name="enum PopplerPageTransitionType" link="poppler-poppler.html#PopplerPageTransitionType"/>
+ <function name="enum PopplerPageTransitionAlignment" link="poppler-poppler.html#PopplerPageTransitionAlignment"/>
+ <function name="enum PopplerPageTransitionDirection" link="poppler-poppler.html#PopplerPageTransitionDirection"/>
+ <function name="PopplerLinkMapping" link="poppler-poppler.html#PopplerLinkMapping"/>
+ <function name="PopplerPage" link="poppler-poppler.html#PopplerPage-struct"/>
+ <function name="PopplerFontInfo" link="poppler-poppler.html#PopplerFontInfo"/>
+ <function name="PopplerPSFile" link="poppler-poppler.html#PopplerPSFile"/>
+ <function name="enum PopplerBackend" link="poppler-poppler.html#PopplerBackend"/>
+ <function name="poppler_get_backend ()" link="poppler-poppler.html#poppler-get-backend"/>
+ <function name="poppler_get_version ()" link="poppler-poppler.html#poppler-get-version"/>
+ <function name="The &quot;author&quot; property" link="poppler-poppler.html#PopplerDocument--author"/>
+ <function name="The &quot;creation-date&quot; property" link="poppler-poppler.html#PopplerDocument--creation-date"/>
+ <function name="The &quot;creator&quot; property" link="poppler-poppler.html#PopplerDocument--creator"/>
+ <function name="The &quot;format&quot; property" link="poppler-poppler.html#PopplerDocument--format"/>
+ <function name="The &quot;format-major&quot; property" link="poppler-poppler.html#PopplerDocument--format-major"/>
+ <function name="The &quot;format-minor&quot; property" link="poppler-poppler.html#PopplerDocument--format-minor"/>
+ <function name="The &quot;keywords&quot; property" link="poppler-poppler.html#PopplerDocument--keywords"/>
+ <function name="The &quot;linearized&quot; property" link="poppler-poppler.html#PopplerDocument--linearized"/>
+ <function name="The &quot;metadata&quot; property" link="poppler-poppler.html#PopplerDocument--metadata"/>
+ <function name="The &quot;mod-date&quot; property" link="poppler-poppler.html#PopplerDocument--mod-date"/>
+ <function name="The &quot;page-layout&quot; property" link="poppler-poppler.html#PopplerDocument--page-layout"/>
+ <function name="The &quot;page-mode&quot; property" link="poppler-poppler.html#PopplerDocument--page-mode"/>
+ <function name="The &quot;permissions&quot; property" link="poppler-poppler.html#PopplerDocument--permissions"/>
+ <function name="The &quot;producer&quot; property" link="poppler-poppler.html#PopplerDocument--producer"/>
+ <function name="The &quot;subject&quot; property" link="poppler-poppler.html#PopplerDocument--subject"/>
+ <function name="The &quot;title&quot; property" link="poppler-poppler.html#PopplerDocument--title"/>
+ <function name="The &quot;viewer-preferences&quot; property" link="poppler-poppler.html#PopplerDocument--viewer-preferences"/>
+ <function name="The &quot;label&quot; property" link="poppler-poppler.html#PopplerPage--label"/>
+ <function name="enum PopplerPageLayout" link="poppler-poppler-document.html#PopplerPageLayout"/>
+ <function name="enum PopplerPageMode" link="poppler-poppler-document.html#PopplerPageMode"/>
+ <function name="enum PopplerFontType" link="poppler-poppler-document.html#PopplerFontType"/>
+ <function name="enum PopplerViewerPreferences" link="poppler-poppler-document.html#PopplerViewerPreferences"/>
+ <function name="enum PopplerPermissions" link="poppler-poppler-document.html#PopplerPermissions"/>
+ <function name="poppler_document_new_from_file ()" link="poppler-poppler-document.html#poppler-document-new-from-file"/>
+ <function name="poppler_document_new_from_data ()" link="poppler-poppler-document.html#poppler-document-new-from-data"/>
+ <function name="poppler_document_save ()" link="poppler-poppler-document.html#poppler-document-save"/>
+ <function name="poppler_document_get_n_pages ()" link="poppler-poppler-document.html#poppler-document-get-n-pages"/>
+ <function name="poppler_document_get_page ()" link="poppler-poppler-document.html#poppler-document-get-page"/>
+ <function name="poppler_document_get_page_by_label ()" link="poppler-poppler-document.html#poppler-document-get-page-by-label"/>
+ <function name="poppler_document_find_dest ()" link="poppler-poppler-document.html#poppler-document-find-dest"/>
+ <function name="poppler_document_has_attachments ()" link="poppler-poppler-document.html#poppler-document-has-attachments"/>
+ <function name="poppler_document_get_attachments ()" link="poppler-poppler-document.html#poppler-document-get-attachments"/>
+ <function name="poppler_document_get_form_field ()" link="poppler-poppler-document.html#poppler-document-get-form-field"/>
+ <function name="poppler_index_iter_get_type ()" link="poppler-poppler-document.html#poppler-index-iter-get-type"/>
+ <function name="poppler_index_iter_new ()" link="poppler-poppler-document.html#poppler-index-iter-new"/>
+ <function name="poppler_index_iter_copy ()" link="poppler-poppler-document.html#poppler-index-iter-copy"/>
+ <function name="poppler_index_iter_free ()" link="poppler-poppler-document.html#poppler-index-iter-free"/>
+ <function name="poppler_index_iter_get_child ()" link="poppler-poppler-document.html#poppler-index-iter-get-child"/>
+ <function name="poppler_index_iter_is_open ()" link="poppler-poppler-document.html#poppler-index-iter-is-open"/>
+ <function name="poppler_index_iter_get_action ()" link="poppler-poppler-document.html#poppler-index-iter-get-action"/>
+ <function name="poppler_index_iter_next ()" link="poppler-poppler-document.html#poppler-index-iter-next"/>
+ <function name="poppler_font_info_new ()" link="poppler-poppler-document.html#poppler-font-info-new"/>
+ <function name="poppler_font_info_scan ()" link="poppler-poppler-document.html#poppler-font-info-scan"/>
+ <function name="poppler_font_info_free ()" link="poppler-poppler-document.html#poppler-font-info-free"/>
+ <function name="poppler_fonts_iter_get_type ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-type"/>
+ <function name="poppler_fonts_iter_copy ()" link="poppler-poppler-document.html#poppler-fonts-iter-copy"/>
+ <function name="poppler_fonts_iter_free ()" link="poppler-poppler-document.html#poppler-fonts-iter-free"/>
+ <function name="poppler_fonts_iter_get_name ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-name"/>
+ <function name="poppler_fonts_iter_get_full_name ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-full-name"/>
+ <function name="poppler_fonts_iter_get_font_type ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-font-type"/>
+ <function name="poppler_fonts_iter_is_embedded ()" link="poppler-poppler-document.html#poppler-fonts-iter-is-embedded"/>
+ <function name="poppler_fonts_iter_is_subset ()" link="poppler-poppler-document.html#poppler-fonts-iter-is-subset"/>
+ <function name="poppler_fonts_iter_next ()" link="poppler-poppler-document.html#poppler-fonts-iter-next"/>
+ <function name="poppler_ps_file_new ()" link="poppler-poppler-document.html#poppler-ps-file-new"/>
+ <function name="poppler_ps_file_set_paper_size ()" link="poppler-poppler-document.html#poppler-ps-file-set-paper-size"/>
+ <function name="poppler_ps_file_set_duplex ()" link="poppler-poppler-document.html#poppler-ps-file-set-duplex"/>
+ <function name="poppler_ps_file_free ()" link="poppler-poppler-document.html#poppler-ps-file-free"/>
+ <function name="poppler_page_render ()" link="poppler-poppler-page.html#poppler-page-render"/>
+ <function name="poppler_page_render_to_pixbuf ()" link="poppler-poppler-page.html#poppler-page-render-to-pixbuf"/>
+ <function name="poppler_page_get_size ()" link="poppler-poppler-page.html#poppler-page-get-size"/>
+ <function name="poppler_page_get_index ()" link="poppler-poppler-page.html#poppler-page-get-index"/>
+ <function name="poppler_page_get_thumbnail ()" link="poppler-poppler-page.html#poppler-page-get-thumbnail"/>
+ <function name="poppler_page_get_thumbnail_size ()" link="poppler-poppler-page.html#poppler-page-get-thumbnail-size"/>
+ <function name="poppler_page_render_to_ps ()" link="poppler-poppler-page.html#poppler-page-render-to-ps"/>
+ <function name="poppler_page_find_text ()" link="poppler-poppler-page.html#poppler-page-find-text"/>
+ <function name="poppler_page_get_text ()" link="poppler-poppler-page.html#poppler-page-get-text"/>
+ <function name="poppler_page_get_duration ()" link="poppler-poppler-page.html#poppler-page-get-duration"/>
+ <function name="poppler_page_get_transition ()" link="poppler-poppler-page.html#poppler-page-get-transition"/>
+ <function name="poppler_page_get_link_mapping ()" link="poppler-poppler-page.html#poppler-page-get-link-mapping"/>
+ <function name="poppler_page_free_link_mapping ()" link="poppler-poppler-page.html#poppler-page-free-link-mapping"/>
+ <function name="poppler_page_get_image_mapping ()" link="poppler-poppler-page.html#poppler-page-get-image-mapping"/>
+ <function name="poppler_page_free_image_mapping ()" link="poppler-poppler-page.html#poppler-page-free-image-mapping"/>
+ <function name="poppler_page_get_form_field_mapping ()" link="poppler-poppler-page.html#poppler-page-get-form-field-mapping"/>
+ <function name="poppler_page_free_form_field_mapping ()" link="poppler-poppler-page.html#poppler-page-free-form-field-mapping"/>
+ <function name="poppler_page_get_selection_region ()" link="poppler-poppler-page.html#poppler-page-get-selection-region"/>
+ <function name="poppler_page_render_selection ()" link="poppler-poppler-page.html#poppler-page-render-selection"/>
+ <function name="poppler_page_render_selection_to_pixbuf ()" link="poppler-poppler-page.html#poppler-page-render-selection-to-pixbuf"/>
+ <function name="POPPLER_TYPE_RECTANGLE" link="poppler-poppler-page.html#POPPLER-TYPE-RECTANGLE--CAPS"/>
+ <function name="PopplerRectangle" link="poppler-poppler-page.html#PopplerRectangle"/>
+ <function name="poppler_rectangle_get_type ()" link="poppler-poppler-page.html#poppler-rectangle-get-type"/>
+ <function name="poppler_rectangle_new ()" link="poppler-poppler-page.html#poppler-rectangle-new"/>
+ <function name="poppler_rectangle_copy ()" link="poppler-poppler-page.html#poppler-rectangle-copy"/>
+ <function name="poppler_rectangle_free ()" link="poppler-poppler-page.html#poppler-rectangle-free"/>
+ <function name="POPPLER_TYPE_PAGE_TRANSITION" link="poppler-poppler-page.html#POPPLER-TYPE-PAGE-TRANSITION--CAPS"/>
+ <function name="PopplerPageTransition" link="poppler-poppler-page.html#PopplerPageTransition"/>
+ <function name="poppler_page_transition_get_type ()" link="poppler-poppler-page.html#poppler-page-transition-get-type"/>
+ <function name="poppler_page_transition_new ()" link="poppler-poppler-page.html#poppler-page-transition-new"/>
+ <function name="poppler_page_transition_copy ()" link="poppler-poppler-page.html#poppler-page-transition-copy"/>
+ <function name="poppler_page_transition_free ()" link="poppler-poppler-page.html#poppler-page-transition-free"/>
+ <function name="POPPLER_TYPE_LINK_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-LINK-MAPPING--CAPS"/>
+ <function name="PopplerLinkMapping" link="poppler-poppler-page.html#PopplerLinkMapping"/>
+ <function name="poppler_link_mapping_get_type ()" link="poppler-poppler-page.html#poppler-link-mapping-get-type"/>
+ <function name="poppler_link_mapping_new ()" link="poppler-poppler-page.html#poppler-link-mapping-new"/>
+ <function name="poppler_link_mapping_copy ()" link="poppler-poppler-page.html#poppler-link-mapping-copy"/>
+ <function name="poppler_link_mapping_free ()" link="poppler-poppler-page.html#poppler-link-mapping-free"/>
+ <function name="POPPLER_TYPE_IMAGE_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-IMAGE-MAPPING--CAPS"/>
+ <function name="PopplerImageMapping" link="poppler-poppler-page.html#PopplerImageMapping"/>
+ <function name="poppler_image_mapping_get_type ()" link="poppler-poppler-page.html#poppler-image-mapping-get-type"/>
+ <function name="poppler_image_mapping_new ()" link="poppler-poppler-page.html#poppler-image-mapping-new"/>
+ <function name="poppler_image_mapping_copy ()" link="poppler-poppler-page.html#poppler-image-mapping-copy"/>
+ <function name="poppler_image_mapping_free ()" link="poppler-poppler-page.html#poppler-image-mapping-free"/>
+ <function name="POPPLER_TYPE_FORM_FIELD_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS"/>
+ <function name="PopplerFormFieldMapping" link="poppler-poppler-page.html#PopplerFormFieldMapping"/>
+ <function name="poppler_form_field_mapping_get_type ()" link="poppler-poppler-page.html#poppler-form-field-mapping-get-type"/>
+ <function name="poppler_form_field_mapping_new ()" link="poppler-poppler-page.html#poppler-form-field-mapping-new"/>
+ <function name="poppler_form_field_mapping_copy ()" link="poppler-poppler-page.html#poppler-form-field-mapping-copy"/>
+ <function name="poppler_form_field_mapping_free ()" link="poppler-poppler-page.html#poppler-form-field-mapping-free"/>
+ <function name="enum PopplerActionType" link="poppler-poppler-action.html#PopplerActionType"/>
+ <function name="enum PopplerDestType" link="poppler-poppler-action.html#PopplerDestType"/>
+ <function name="PopplerActionAny" link="poppler-poppler-action.html#PopplerActionAny"/>
+ <function name="PopplerActionGotoDest" link="poppler-poppler-action.html#PopplerActionGotoDest"/>
+ <function name="PopplerActionGotoRemote" link="poppler-poppler-action.html#PopplerActionGotoRemote"/>
+ <function name="PopplerActionLaunch" link="poppler-poppler-action.html#PopplerActionLaunch"/>
+ <function name="PopplerActionUri" link="poppler-poppler-action.html#PopplerActionUri"/>
+ <function name="PopplerActionNamed" link="poppler-poppler-action.html#PopplerActionNamed"/>
+ <function name="PopplerActionMovie" link="poppler-poppler-action.html#PopplerActionMovie"/>
+ <function name="PopplerDest" link="poppler-poppler-action.html#PopplerDest"/>
+ <function name="union PopplerAction" link="poppler-poppler-action.html#PopplerAction"/>
+ <function name="POPPLER_TYPE_ACTION" link="poppler-poppler-action.html#POPPLER-TYPE-ACTION--CAPS"/>
+ <function name="POPPLER_ACTION()" link="poppler-poppler-action.html#POPPLER-ACTION--CAPS"/>
+ <function name="poppler_action_get_type ()" link="poppler-poppler-action.html#poppler-action-get-type"/>
+ <function name="poppler_action_copy ()" link="poppler-poppler-action.html#poppler-action-copy"/>
+ <function name="poppler_action_free ()" link="poppler-poppler-action.html#poppler-action-free"/>
+ <function name="POPPLER_TYPE_DEST" link="poppler-poppler-action.html#POPPLER-TYPE-DEST--CAPS"/>
+ <function name="poppler_dest_get_type ()" link="poppler-poppler-action.html#poppler-dest-get-type"/>
+ <function name="poppler_dest_copy ()" link="poppler-poppler-action.html#poppler-dest-copy"/>
+ <function name="poppler_dest_free ()" link="poppler-poppler-action.html#poppler-dest-free"/>
+ <function name="PopplerAttachment" link="poppler-poppler-attachment.html#PopplerAttachment-struct"/>
+ <function name="poppler_attachment_save ()" link="poppler-poppler-attachment.html#poppler-attachment-save"/>
+ <function name="poppler_attachment_save_to_callback ()" link="poppler-poppler-attachment.html#poppler-attachment-save-to-callback"/>
+ <function name="PopplerAttachmentSaveFunc ()" link="poppler-poppler-attachment.html#PopplerAttachmentSaveFunc"/>
+ <function name="PopplerFormField" link="poppler-poppler-form-field.html#PopplerFormField-struct"/>
+ <function name="enum PopplerFormButtonType" link="poppler-poppler-form-field.html#PopplerFormButtonType"/>
+ <function name="enum PopplerFormChoiceType" link="poppler-poppler-form-field.html#PopplerFormChoiceType"/>
+ <function name="enum PopplerFormFieldType" link="poppler-poppler-form-field.html#PopplerFormFieldType"/>
+ <function name="enum PopplerFormTextType" link="poppler-poppler-form-field.html#PopplerFormTextType"/>
+ <function name="poppler_form_field_get_id ()" link="poppler-poppler-form-field.html#poppler-form-field-get-id"/>
+ <function name="poppler_form_field_get_field_type ()" link="poppler-poppler-form-field.html#poppler-form-field-get-field-type"/>
+ <function name="poppler_form_field_is_read_only ()" link="poppler-poppler-form-field.html#poppler-form-field-is-read-only"/>
+ <function name="poppler_form_field_get_font_size ()" link="poppler-poppler-form-field.html#poppler-form-field-get-font-size"/>
+ <function name="poppler_form_field_button_get_button_type ()" link="poppler-poppler-form-field.html#poppler-form-field-button-get-button-type"/>
+ <function name="poppler_form_field_button_get_state ()" link="poppler-poppler-form-field.html#poppler-form-field-button-get-state"/>
+ <function name="poppler_form_field_button_set_state ()" link="poppler-poppler-form-field.html#poppler-form-field-button-set-state"/>
+ <function name="poppler_form_field_choice_can_select_multiple ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-can-select-multiple"/>
+ <function name="poppler_form_field_choice_commit_on_change ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-commit-on-change"/>
+ <function name="poppler_form_field_choice_do_spell_check ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-do-spell-check"/>
+ <function name="poppler_form_field_choice_get_choice_type ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-choice-type"/>
+ <function name="poppler_form_field_choice_get_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-item"/>
+ <function name="poppler_form_field_choice_get_n_items ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-n-items"/>
+ <function name="poppler_form_field_choice_get_text ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-text"/>
+ <function name="poppler_form_field_choice_is_editable ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-is-editable"/>
+ <function name="poppler_form_field_choice_is_item_selected ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-is-item-selected"/>
+ <function name="poppler_form_field_choice_select_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-select-item"/>
+ <function name="poppler_form_field_choice_set_text ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-set-text"/>
+ <function name="poppler_form_field_choice_toggle_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-toggle-item"/>
+ <function name="poppler_form_field_choice_unselect_all ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-unselect-all"/>
+ <function name="poppler_form_field_text_do_scroll ()" link="poppler-poppler-form-field.html#poppler-form-field-text-do-scroll"/>
+ <function name="poppler_form_field_text_do_spell_check ()" link="poppler-poppler-form-field.html#poppler-form-field-text-do-spell-check"/>
+ <function name="poppler_form_field_text_get_max_len ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-max-len"/>
+ <function name="poppler_form_field_text_get_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-text"/>
+ <function name="poppler_form_field_text_get_text_type ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-text-type"/>
+ <function name="poppler_form_field_text_is_password ()" link="poppler-poppler-form-field.html#poppler-form-field-text-is-password"/>
+ <function name="poppler_form_field_text_is_rich_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-is-rich-text"/>
+ <function name="poppler_form_field_text_set_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-set-text"/>
+ <function name="POPPLER_TYPE_ACTION_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-ACTION-TYPE--CAPS"/>
+ <function name="poppler_action_type_get_type ()" link="poppler-poppler-enums.html#poppler-action-type-get-type"/>
+ <function name="POPPLER_TYPE_DEST_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-DEST-TYPE--CAPS"/>
+ <function name="poppler_dest_type_get_type ()" link="poppler-poppler-enums.html#poppler-dest-type-get-type"/>
+ <function name="POPPLER_TYPE_PAGE_LAYOUT" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-LAYOUT--CAPS"/>
+ <function name="poppler_page_layout_get_type ()" link="poppler-poppler-enums.html#poppler-page-layout-get-type"/>
+ <function name="POPPLER_TYPE_PAGE_MODE" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-MODE--CAPS"/>
+ <function name="poppler_page_mode_get_type ()" link="poppler-poppler-enums.html#poppler-page-mode-get-type"/>
+ <function name="POPPLER_TYPE_FONT_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-FONT-TYPE--CAPS"/>
+ <function name="poppler_font_type_get_type ()" link="poppler-poppler-enums.html#poppler-font-type-get-type"/>
+ <function name="POPPLER_TYPE_VIEWER_PREFERENCES" link="poppler-poppler-enums.html#POPPLER-TYPE-VIEWER-PREFERENCES--CAPS"/>
+ <function name="poppler_viewer_preferences_get_type ()" link="poppler-poppler-enums.html#poppler-viewer-preferences-get-type"/>
+ <function name="POPPLER_TYPE_PERMISSIONS" link="poppler-poppler-enums.html#POPPLER-TYPE-PERMISSIONS--CAPS"/>
+ <function name="poppler_permissions_get_type ()" link="poppler-poppler-enums.html#poppler-permissions-get-type"/>
+ <function name="POPPLER_TYPE_SELECTION_STYLE" link="poppler-poppler-enums.html#POPPLER-TYPE-SELECTION-STYLE--CAPS"/>
+ <function name="poppler_selection_style_get_type ()" link="poppler-poppler-enums.html#poppler-selection-style-get-type"/>
+ <function name="POPPLER_TYPE_PAGE_TRANSITION_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS"/>
+ <function name="poppler_page_transition_type_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-type-get-type"/>
+ <function name="POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS"/>
+ <function name="poppler_page_transition_alignment_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-alignment-get-type"/>
+ <function name="POPPLER_TYPE_PAGE_TRANSITION_DIRECTION" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS"/>
+ <function name="poppler_page_transition_direction_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-direction-get-type"/>
+ <function name="POPPLER_TYPE_ERROR" link="poppler-poppler-enums.html#POPPLER-TYPE-ERROR--CAPS"/>
+ <function name="poppler_error_get_type ()" link="poppler-poppler-enums.html#poppler-error-get-type"/>
+ <function name="POPPLER_TYPE_ORIENTATION" link="poppler-poppler-enums.html#POPPLER-TYPE-ORIENTATION--CAPS"/>
+ <function name="poppler_orientation_get_type ()" link="poppler-poppler-enums.html#poppler-orientation-get-type"/>
+ <function name="POPPLER_TYPE_BACKEND" link="poppler-poppler-enums.html#POPPLER-TYPE-BACKEND--CAPS"/>
+ <function name="poppler_backend_get_type ()" link="poppler-poppler-enums.html#poppler-backend-get-type"/>
+ <function name="PopplerAnnot" link="poppler-poppler-annot.html#PopplerAnnot"/>
+ <function name="poppler_annot_callout_line_copy ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-copy"/>
+ <function name="poppler_annot_callout_line_free ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-free"/>
+ <function name="poppler_annot_callout_line_get_type ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-get-type"/>
+ <function name="poppler_annot_callout_line_new ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-new"/>
+ <function name="poppler_annot_external_data_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-external-data-type-get-type"/>
+ <function name="poppler_annot_flag_get_type ()" link="poppler-poppler-annot.html#poppler-annot-flag-get-type"/>
+ <function name="poppler_annot_free_text_get_callout_line ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-callout-line"/>
+ <function name="poppler_annot_free_text_get_quadding ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-quadding"/>
+ <function name="poppler_annot_free_text_get_type ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-type"/>
+ <function name="poppler_annot_free_text_quadding_get_type ()" link="poppler-poppler-annot.html#poppler-annot-free-text-quadding-get-type"/>
+ <function name="poppler_annot_get_annot_type ()" link="poppler-poppler-annot.html#poppler-annot-get-annot-type"/>
+ <function name="poppler_annot_get_color ()" link="poppler-poppler-annot.html#poppler-annot-get-color"/>
+ <function name="poppler_annot_get_contents ()" link="poppler-poppler-annot.html#poppler-annot-get-contents"/>
+ <function name="poppler_annot_get_flags ()" link="poppler-poppler-annot.html#poppler-annot-get-flags"/>
+ <function name="poppler_annot_get_modified ()" link="poppler-poppler-annot.html#poppler-annot-get-modified"/>
+ <function name="poppler_annot_get_name ()" link="poppler-poppler-annot.html#poppler-annot-get-name"/>
+ <function name="poppler_annot_get_type ()" link="poppler-poppler-annot.html#poppler-annot-get-type"/>
+ <function name="poppler_annot_mapping_copy ()" link="poppler-poppler-annot.html#poppler-annot-mapping-copy"/>
+ <function name="poppler_annot_mapping_free ()" link="poppler-poppler-annot.html#poppler-annot-mapping-free"/>
+ <function name="poppler_annot_mapping_get_type ()" link="poppler-poppler-annot.html#poppler-annot-mapping-get-type"/>
+ <function name="poppler_annot_mapping_new ()" link="poppler-poppler-annot.html#poppler-annot-mapping-new"/>
+ <function name="poppler_annot_markup_get_date ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-date"/>
+ <function name="poppler_annot_markup_get_external_data ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-external-data"/>
+ <function name="poppler_annot_markup_get_label ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-label"/>
+ <function name="poppler_annot_markup_get_opacity ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-opacity"/>
+ <function name="poppler_annot_markup_get_popup_is_open ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-popup-is-open"/>
+ <function name="poppler_annot_markup_get_reply_to ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-reply-to"/>
+ <function name="poppler_annot_markup_get_subject ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-subject"/>
+ <function name="poppler_annot_markup_get_type ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-type"/>
+ <function name="poppler_annot_markup_reply_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-markup-reply-type-get-type"/>
+ <function name="poppler_annot_text_get_icon ()" link="poppler-poppler-annot.html#poppler-annot-text-get-icon"/>
+ <function name="poppler_annot_text_get_is_open ()" link="poppler-poppler-annot.html#poppler-annot-text-get-is-open"/>
+ <function name="poppler_annot_text_get_state ()" link="poppler-poppler-annot.html#poppler-annot-text-get-state"/>
+ <function name="poppler_annot_text_get_type ()" link="poppler-poppler-annot.html#poppler-annot-text-get-type"/>
+ <function name="poppler_annot_text_state_get_type ()" link="poppler-poppler-annot.html#poppler-annot-text-state-get-type"/>
+ <function name="poppler_annot_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-type-get-type"/>
+ <function name="poppler_layer_get_type ()" link="poppler-poppler-layer.html#poppler-layer-get-type"/>
+ <function name="poppler_layer_get_title ()" link="poppler-poppler-layer.html#poppler-layer-get-title"/>
+ <function name="poppler_layer_is_visible ()" link="poppler-poppler-layer.html#poppler-layer-is-visible"/>
+ <function name="poppler_layer_show ()" link="poppler-poppler-layer.html#poppler-layer-show"/>
+ <function name="poppler_layer_hide ()" link="poppler-poppler-layer.html#poppler-layer-hide"/>
+ <function name="poppler_layer_is_parent ()" link="poppler-poppler-layer.html#poppler-layer-is-parent"/>
+ <function name="poppler_layer_get_radio_button_group_id ()" link="poppler-poppler-layer.html#poppler-layer-get-radio-button-group-id"/>
+ <function name="POPPLER_HAS_CAIRO" link="poppler-poppler-features.html#POPPLER-HAS-CAIRO--CAPS"/>
+ <function name="POPPLER_WITH_GDK" link="poppler-poppler-features.html#POPPLER-WITH-GDK--CAPS"/>
+ <function name="POPPLER_MAJOR_VERSION" link="poppler-poppler-features.html#POPPLER-MAJOR-VERSION--CAPS"/>
+ <function name="POPPLER_MINOR_VERSION" link="poppler-poppler-features.html#POPPLER-MINOR-VERSION--CAPS"/>
+ <function name="POPPLER_MICRO_VERSION" link="poppler-poppler-features.html#POPPLER-MICRO-VERSION--CAPS"/>
+ <function name="POPPLER_CHECK_VERSION()" link="poppler-poppler-features.html#POPPLER-CHECK-VERSION--CAPS"/>
+ </functions>
+</book>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp2 b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp2
new file mode 100644
index 00000000000..59f8efbb0a8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/poppler.devhelp2
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="Poppler Reference Manual" link="index.html" author="" name="poppler" version="2" language="c">
+ <chapters>
+ <sub name="Poppler" link="ch01.html">
+ <sub name="poppler" link="poppler-poppler.html"/>
+ <sub name="PopplerDocument" link="poppler-poppler-document.html"/>
+ <sub name="PopplerPage" link="poppler-poppler-page.html"/>
+ <sub name="PopplerAction" link="poppler-poppler-action.html"/>
+ <sub name="PopplerAttachment" link="poppler-poppler-attachment.html"/>
+ <sub name="PopplerFormField" link="poppler-poppler-form-field.html"/>
+ <sub name="poppler-enums" link="poppler-poppler-enums.html"/>
+ <sub name="PopplerAnnot" link="poppler-poppler-annot.html"/>
+ <sub name="PopplerLayer" link="poppler-poppler-layer.html"/>
+ <sub name="Version and Features Information" link="poppler-poppler-features.html"/>
+ </sub>
+ </chapters>
+ <functions>
+ <keyword type="function" name="poppler_error_quark ()" link="poppler-poppler.html#poppler-error-quark"/>
+ <keyword type="macro" name="POPPLER_ERROR" link="poppler-poppler.html#POPPLER-ERROR--CAPS"/>
+ <keyword type="enum" name="enum PopplerError" link="poppler-poppler.html#PopplerError"/>
+ <keyword type="enum" name="enum PopplerOrientation" link="poppler-poppler.html#PopplerOrientation"/>
+ <keyword type="struct" name="PopplerDocument" link="poppler-poppler.html#PopplerDocument-struct"/>
+ <keyword type="struct" name="PopplerIndexIter" link="poppler-poppler.html#PopplerIndexIter"/>
+ <keyword type="struct" name="PopplerFontsIter" link="poppler-poppler.html#PopplerFontsIter"/>
+ <keyword type="struct" name="PopplerRectangle" link="poppler-poppler.html#PopplerRectangle"/>
+ <keyword type="enum" name="enum PopplerSelectionStyle" link="poppler-poppler.html#PopplerSelectionStyle"/>
+ <keyword type="enum" name="enum PopplerPageTransitionType" link="poppler-poppler.html#PopplerPageTransitionType"/>
+ <keyword type="enum" name="enum PopplerPageTransitionAlignment" link="poppler-poppler.html#PopplerPageTransitionAlignment"/>
+ <keyword type="enum" name="enum PopplerPageTransitionDirection" link="poppler-poppler.html#PopplerPageTransitionDirection"/>
+ <keyword type="struct" name="PopplerLinkMapping" link="poppler-poppler.html#PopplerLinkMapping"/>
+ <keyword type="struct" name="PopplerPage" link="poppler-poppler.html#PopplerPage-struct"/>
+ <keyword type="struct" name="PopplerFontInfo" link="poppler-poppler.html#PopplerFontInfo"/>
+ <keyword type="struct" name="PopplerPSFile" link="poppler-poppler.html#PopplerPSFile"/>
+ <keyword type="enum" name="enum PopplerBackend" link="poppler-poppler.html#PopplerBackend"/>
+ <keyword type="function" name="poppler_get_backend ()" link="poppler-poppler.html#poppler-get-backend"/>
+ <keyword type="function" name="poppler_get_version ()" link="poppler-poppler.html#poppler-get-version"/>
+ <keyword type="property" name="The &quot;author&quot; property" link="poppler-poppler.html#PopplerDocument--author"/>
+ <keyword type="property" name="The &quot;creation-date&quot; property" link="poppler-poppler.html#PopplerDocument--creation-date"/>
+ <keyword type="property" name="The &quot;creator&quot; property" link="poppler-poppler.html#PopplerDocument--creator"/>
+ <keyword type="property" name="The &quot;format&quot; property" link="poppler-poppler.html#PopplerDocument--format"/>
+ <keyword type="property" name="The &quot;format-major&quot; property" link="poppler-poppler.html#PopplerDocument--format-major"/>
+ <keyword type="property" name="The &quot;format-minor&quot; property" link="poppler-poppler.html#PopplerDocument--format-minor"/>
+ <keyword type="property" name="The &quot;keywords&quot; property" link="poppler-poppler.html#PopplerDocument--keywords"/>
+ <keyword type="property" name="The &quot;linearized&quot; property" link="poppler-poppler.html#PopplerDocument--linearized"/>
+ <keyword type="property" name="The &quot;metadata&quot; property" link="poppler-poppler.html#PopplerDocument--metadata"/>
+ <keyword type="property" name="The &quot;mod-date&quot; property" link="poppler-poppler.html#PopplerDocument--mod-date"/>
+ <keyword type="property" name="The &quot;page-layout&quot; property" link="poppler-poppler.html#PopplerDocument--page-layout"/>
+ <keyword type="property" name="The &quot;page-mode&quot; property" link="poppler-poppler.html#PopplerDocument--page-mode"/>
+ <keyword type="property" name="The &quot;permissions&quot; property" link="poppler-poppler.html#PopplerDocument--permissions"/>
+ <keyword type="property" name="The &quot;producer&quot; property" link="poppler-poppler.html#PopplerDocument--producer"/>
+ <keyword type="property" name="The &quot;subject&quot; property" link="poppler-poppler.html#PopplerDocument--subject"/>
+ <keyword type="property" name="The &quot;title&quot; property" link="poppler-poppler.html#PopplerDocument--title"/>
+ <keyword type="property" name="The &quot;viewer-preferences&quot; property" link="poppler-poppler.html#PopplerDocument--viewer-preferences"/>
+ <keyword type="property" name="The &quot;label&quot; property" link="poppler-poppler.html#PopplerPage--label"/>
+ <keyword type="enum" name="enum PopplerPageLayout" link="poppler-poppler-document.html#PopplerPageLayout"/>
+ <keyword type="enum" name="enum PopplerPageMode" link="poppler-poppler-document.html#PopplerPageMode"/>
+ <keyword type="enum" name="enum PopplerFontType" link="poppler-poppler-document.html#PopplerFontType"/>
+ <keyword type="enum" name="enum PopplerViewerPreferences" link="poppler-poppler-document.html#PopplerViewerPreferences"/>
+ <keyword type="enum" name="enum PopplerPermissions" link="poppler-poppler-document.html#PopplerPermissions"/>
+ <keyword type="function" name="poppler_document_new_from_file ()" link="poppler-poppler-document.html#poppler-document-new-from-file"/>
+ <keyword type="function" name="poppler_document_new_from_data ()" link="poppler-poppler-document.html#poppler-document-new-from-data"/>
+ <keyword type="function" name="poppler_document_save ()" link="poppler-poppler-document.html#poppler-document-save"/>
+ <keyword type="function" name="poppler_document_get_n_pages ()" link="poppler-poppler-document.html#poppler-document-get-n-pages"/>
+ <keyword type="function" name="poppler_document_get_page ()" link="poppler-poppler-document.html#poppler-document-get-page"/>
+ <keyword type="function" name="poppler_document_get_page_by_label ()" link="poppler-poppler-document.html#poppler-document-get-page-by-label"/>
+ <keyword type="function" name="poppler_document_find_dest ()" link="poppler-poppler-document.html#poppler-document-find-dest"/>
+ <keyword type="function" name="poppler_document_has_attachments ()" link="poppler-poppler-document.html#poppler-document-has-attachments"/>
+ <keyword type="function" name="poppler_document_get_attachments ()" link="poppler-poppler-document.html#poppler-document-get-attachments"/>
+ <keyword type="function" name="poppler_document_get_form_field ()" link="poppler-poppler-document.html#poppler-document-get-form-field"/>
+ <keyword type="function" name="poppler_index_iter_get_type ()" link="poppler-poppler-document.html#poppler-index-iter-get-type"/>
+ <keyword type="function" name="poppler_index_iter_new ()" link="poppler-poppler-document.html#poppler-index-iter-new"/>
+ <keyword type="function" name="poppler_index_iter_copy ()" link="poppler-poppler-document.html#poppler-index-iter-copy"/>
+ <keyword type="function" name="poppler_index_iter_free ()" link="poppler-poppler-document.html#poppler-index-iter-free"/>
+ <keyword type="function" name="poppler_index_iter_get_child ()" link="poppler-poppler-document.html#poppler-index-iter-get-child"/>
+ <keyword type="function" name="poppler_index_iter_is_open ()" link="poppler-poppler-document.html#poppler-index-iter-is-open"/>
+ <keyword type="function" name="poppler_index_iter_get_action ()" link="poppler-poppler-document.html#poppler-index-iter-get-action"/>
+ <keyword type="function" name="poppler_index_iter_next ()" link="poppler-poppler-document.html#poppler-index-iter-next"/>
+ <keyword type="function" name="poppler_font_info_new ()" link="poppler-poppler-document.html#poppler-font-info-new"/>
+ <keyword type="function" name="poppler_font_info_scan ()" link="poppler-poppler-document.html#poppler-font-info-scan"/>
+ <keyword type="function" name="poppler_font_info_free ()" link="poppler-poppler-document.html#poppler-font-info-free"/>
+ <keyword type="function" name="poppler_fonts_iter_get_type ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-type"/>
+ <keyword type="function" name="poppler_fonts_iter_copy ()" link="poppler-poppler-document.html#poppler-fonts-iter-copy"/>
+ <keyword type="function" name="poppler_fonts_iter_free ()" link="poppler-poppler-document.html#poppler-fonts-iter-free"/>
+ <keyword type="function" name="poppler_fonts_iter_get_name ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-name"/>
+ <keyword type="function" name="poppler_fonts_iter_get_full_name ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-full-name"/>
+ <keyword type="function" name="poppler_fonts_iter_get_font_type ()" link="poppler-poppler-document.html#poppler-fonts-iter-get-font-type"/>
+ <keyword type="function" name="poppler_fonts_iter_is_embedded ()" link="poppler-poppler-document.html#poppler-fonts-iter-is-embedded"/>
+ <keyword type="function" name="poppler_fonts_iter_is_subset ()" link="poppler-poppler-document.html#poppler-fonts-iter-is-subset"/>
+ <keyword type="function" name="poppler_fonts_iter_next ()" link="poppler-poppler-document.html#poppler-fonts-iter-next"/>
+ <keyword type="function" name="poppler_ps_file_new ()" link="poppler-poppler-document.html#poppler-ps-file-new"/>
+ <keyword type="function" name="poppler_ps_file_set_paper_size ()" link="poppler-poppler-document.html#poppler-ps-file-set-paper-size"/>
+ <keyword type="function" name="poppler_ps_file_set_duplex ()" link="poppler-poppler-document.html#poppler-ps-file-set-duplex"/>
+ <keyword type="function" name="poppler_ps_file_free ()" link="poppler-poppler-document.html#poppler-ps-file-free"/>
+ <keyword type="function" name="poppler_page_render ()" link="poppler-poppler-page.html#poppler-page-render"/>
+ <keyword type="function" name="poppler_page_render_to_pixbuf ()" link="poppler-poppler-page.html#poppler-page-render-to-pixbuf"/>
+ <keyword type="function" name="poppler_page_get_size ()" link="poppler-poppler-page.html#poppler-page-get-size"/>
+ <keyword type="function" name="poppler_page_get_index ()" link="poppler-poppler-page.html#poppler-page-get-index"/>
+ <keyword type="function" name="poppler_page_get_thumbnail ()" link="poppler-poppler-page.html#poppler-page-get-thumbnail"/>
+ <keyword type="function" name="poppler_page_get_thumbnail_size ()" link="poppler-poppler-page.html#poppler-page-get-thumbnail-size"/>
+ <keyword type="function" name="poppler_page_render_to_ps ()" link="poppler-poppler-page.html#poppler-page-render-to-ps"/>
+ <keyword type="function" name="poppler_page_find_text ()" link="poppler-poppler-page.html#poppler-page-find-text"/>
+ <keyword type="function" name="poppler_page_get_text ()" link="poppler-poppler-page.html#poppler-page-get-text"/>
+ <keyword type="function" name="poppler_page_get_duration ()" link="poppler-poppler-page.html#poppler-page-get-duration"/>
+ <keyword type="function" name="poppler_page_get_transition ()" link="poppler-poppler-page.html#poppler-page-get-transition"/>
+ <keyword type="function" name="poppler_page_get_link_mapping ()" link="poppler-poppler-page.html#poppler-page-get-link-mapping"/>
+ <keyword type="function" name="poppler_page_free_link_mapping ()" link="poppler-poppler-page.html#poppler-page-free-link-mapping"/>
+ <keyword type="function" name="poppler_page_get_image_mapping ()" link="poppler-poppler-page.html#poppler-page-get-image-mapping"/>
+ <keyword type="function" name="poppler_page_free_image_mapping ()" link="poppler-poppler-page.html#poppler-page-free-image-mapping"/>
+ <keyword type="function" name="poppler_page_get_form_field_mapping ()" link="poppler-poppler-page.html#poppler-page-get-form-field-mapping"/>
+ <keyword type="function" name="poppler_page_free_form_field_mapping ()" link="poppler-poppler-page.html#poppler-page-free-form-field-mapping"/>
+ <keyword type="function" name="poppler_page_get_selection_region ()" link="poppler-poppler-page.html#poppler-page-get-selection-region"/>
+ <keyword type="function" name="poppler_page_render_selection ()" link="poppler-poppler-page.html#poppler-page-render-selection"/>
+ <keyword type="function" name="poppler_page_render_selection_to_pixbuf ()" link="poppler-poppler-page.html#poppler-page-render-selection-to-pixbuf"/>
+ <keyword type="macro" name="POPPLER_TYPE_RECTANGLE" link="poppler-poppler-page.html#POPPLER-TYPE-RECTANGLE--CAPS"/>
+ <keyword type="struct" name="PopplerRectangle" link="poppler-poppler-page.html#PopplerRectangle"/>
+ <keyword type="function" name="poppler_rectangle_get_type ()" link="poppler-poppler-page.html#poppler-rectangle-get-type"/>
+ <keyword type="function" name="poppler_rectangle_new ()" link="poppler-poppler-page.html#poppler-rectangle-new"/>
+ <keyword type="function" name="poppler_rectangle_copy ()" link="poppler-poppler-page.html#poppler-rectangle-copy"/>
+ <keyword type="function" name="poppler_rectangle_free ()" link="poppler-poppler-page.html#poppler-rectangle-free"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_TRANSITION" link="poppler-poppler-page.html#POPPLER-TYPE-PAGE-TRANSITION--CAPS"/>
+ <keyword type="struct" name="PopplerPageTransition" link="poppler-poppler-page.html#PopplerPageTransition"/>
+ <keyword type="function" name="poppler_page_transition_get_type ()" link="poppler-poppler-page.html#poppler-page-transition-get-type"/>
+ <keyword type="function" name="poppler_page_transition_new ()" link="poppler-poppler-page.html#poppler-page-transition-new"/>
+ <keyword type="function" name="poppler_page_transition_copy ()" link="poppler-poppler-page.html#poppler-page-transition-copy"/>
+ <keyword type="function" name="poppler_page_transition_free ()" link="poppler-poppler-page.html#poppler-page-transition-free"/>
+ <keyword type="macro" name="POPPLER_TYPE_LINK_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-LINK-MAPPING--CAPS"/>
+ <keyword type="struct" name="PopplerLinkMapping" link="poppler-poppler-page.html#PopplerLinkMapping"/>
+ <keyword type="function" name="poppler_link_mapping_get_type ()" link="poppler-poppler-page.html#poppler-link-mapping-get-type"/>
+ <keyword type="function" name="poppler_link_mapping_new ()" link="poppler-poppler-page.html#poppler-link-mapping-new"/>
+ <keyword type="function" name="poppler_link_mapping_copy ()" link="poppler-poppler-page.html#poppler-link-mapping-copy"/>
+ <keyword type="function" name="poppler_link_mapping_free ()" link="poppler-poppler-page.html#poppler-link-mapping-free"/>
+ <keyword type="macro" name="POPPLER_TYPE_IMAGE_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-IMAGE-MAPPING--CAPS"/>
+ <keyword type="struct" name="PopplerImageMapping" link="poppler-poppler-page.html#PopplerImageMapping"/>
+ <keyword type="function" name="poppler_image_mapping_get_type ()" link="poppler-poppler-page.html#poppler-image-mapping-get-type"/>
+ <keyword type="function" name="poppler_image_mapping_new ()" link="poppler-poppler-page.html#poppler-image-mapping-new"/>
+ <keyword type="function" name="poppler_image_mapping_copy ()" link="poppler-poppler-page.html#poppler-image-mapping-copy"/>
+ <keyword type="function" name="poppler_image_mapping_free ()" link="poppler-poppler-page.html#poppler-image-mapping-free"/>
+ <keyword type="macro" name="POPPLER_TYPE_FORM_FIELD_MAPPING" link="poppler-poppler-page.html#POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS"/>
+ <keyword type="struct" name="PopplerFormFieldMapping" link="poppler-poppler-page.html#PopplerFormFieldMapping"/>
+ <keyword type="function" name="poppler_form_field_mapping_get_type ()" link="poppler-poppler-page.html#poppler-form-field-mapping-get-type"/>
+ <keyword type="function" name="poppler_form_field_mapping_new ()" link="poppler-poppler-page.html#poppler-form-field-mapping-new"/>
+ <keyword type="function" name="poppler_form_field_mapping_copy ()" link="poppler-poppler-page.html#poppler-form-field-mapping-copy"/>
+ <keyword type="function" name="poppler_form_field_mapping_free ()" link="poppler-poppler-page.html#poppler-form-field-mapping-free"/>
+ <keyword type="enum" name="enum PopplerActionType" link="poppler-poppler-action.html#PopplerActionType"/>
+ <keyword type="enum" name="enum PopplerDestType" link="poppler-poppler-action.html#PopplerDestType"/>
+ <keyword type="struct" name="PopplerActionAny" link="poppler-poppler-action.html#PopplerActionAny"/>
+ <keyword type="struct" name="PopplerActionGotoDest" link="poppler-poppler-action.html#PopplerActionGotoDest"/>
+ <keyword type="struct" name="PopplerActionGotoRemote" link="poppler-poppler-action.html#PopplerActionGotoRemote"/>
+ <keyword type="struct" name="PopplerActionLaunch" link="poppler-poppler-action.html#PopplerActionLaunch"/>
+ <keyword type="struct" name="PopplerActionUri" link="poppler-poppler-action.html#PopplerActionUri"/>
+ <keyword type="struct" name="PopplerActionNamed" link="poppler-poppler-action.html#PopplerActionNamed"/>
+ <keyword type="struct" name="PopplerActionMovie" link="poppler-poppler-action.html#PopplerActionMovie"/>
+ <keyword type="struct" name="PopplerDest" link="poppler-poppler-action.html#PopplerDest"/>
+ <keyword type="union" name="union PopplerAction" link="poppler-poppler-action.html#PopplerAction"/>
+ <keyword type="macro" name="POPPLER_TYPE_ACTION" link="poppler-poppler-action.html#POPPLER-TYPE-ACTION--CAPS"/>
+ <keyword type="macro" name="POPPLER_ACTION()" link="poppler-poppler-action.html#POPPLER-ACTION--CAPS"/>
+ <keyword type="function" name="poppler_action_get_type ()" link="poppler-poppler-action.html#poppler-action-get-type"/>
+ <keyword type="function" name="poppler_action_copy ()" link="poppler-poppler-action.html#poppler-action-copy"/>
+ <keyword type="function" name="poppler_action_free ()" link="poppler-poppler-action.html#poppler-action-free"/>
+ <keyword type="macro" name="POPPLER_TYPE_DEST" link="poppler-poppler-action.html#POPPLER-TYPE-DEST--CAPS"/>
+ <keyword type="function" name="poppler_dest_get_type ()" link="poppler-poppler-action.html#poppler-dest-get-type"/>
+ <keyword type="function" name="poppler_dest_copy ()" link="poppler-poppler-action.html#poppler-dest-copy"/>
+ <keyword type="function" name="poppler_dest_free ()" link="poppler-poppler-action.html#poppler-dest-free"/>
+ <keyword type="struct" name="PopplerAttachment" link="poppler-poppler-attachment.html#PopplerAttachment-struct"/>
+ <keyword type="function" name="poppler_attachment_save ()" link="poppler-poppler-attachment.html#poppler-attachment-save"/>
+ <keyword type="function" name="poppler_attachment_save_to_callback ()" link="poppler-poppler-attachment.html#poppler-attachment-save-to-callback"/>
+ <keyword type="function" name="PopplerAttachmentSaveFunc ()" link="poppler-poppler-attachment.html#PopplerAttachmentSaveFunc"/>
+ <keyword type="struct" name="PopplerFormField" link="poppler-poppler-form-field.html#PopplerFormField-struct"/>
+ <keyword type="enum" name="enum PopplerFormButtonType" link="poppler-poppler-form-field.html#PopplerFormButtonType"/>
+ <keyword type="enum" name="enum PopplerFormChoiceType" link="poppler-poppler-form-field.html#PopplerFormChoiceType"/>
+ <keyword type="enum" name="enum PopplerFormFieldType" link="poppler-poppler-form-field.html#PopplerFormFieldType"/>
+ <keyword type="enum" name="enum PopplerFormTextType" link="poppler-poppler-form-field.html#PopplerFormTextType"/>
+ <keyword type="function" name="poppler_form_field_get_id ()" link="poppler-poppler-form-field.html#poppler-form-field-get-id"/>
+ <keyword type="function" name="poppler_form_field_get_field_type ()" link="poppler-poppler-form-field.html#poppler-form-field-get-field-type"/>
+ <keyword type="function" name="poppler_form_field_is_read_only ()" link="poppler-poppler-form-field.html#poppler-form-field-is-read-only"/>
+ <keyword type="function" name="poppler_form_field_get_font_size ()" link="poppler-poppler-form-field.html#poppler-form-field-get-font-size"/>
+ <keyword type="function" name="poppler_form_field_button_get_button_type ()" link="poppler-poppler-form-field.html#poppler-form-field-button-get-button-type"/>
+ <keyword type="function" name="poppler_form_field_button_get_state ()" link="poppler-poppler-form-field.html#poppler-form-field-button-get-state"/>
+ <keyword type="function" name="poppler_form_field_button_set_state ()" link="poppler-poppler-form-field.html#poppler-form-field-button-set-state"/>
+ <keyword type="function" name="poppler_form_field_choice_can_select_multiple ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-can-select-multiple"/>
+ <keyword type="function" name="poppler_form_field_choice_commit_on_change ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-commit-on-change"/>
+ <keyword type="function" name="poppler_form_field_choice_do_spell_check ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-do-spell-check"/>
+ <keyword type="function" name="poppler_form_field_choice_get_choice_type ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-choice-type"/>
+ <keyword type="function" name="poppler_form_field_choice_get_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-item"/>
+ <keyword type="function" name="poppler_form_field_choice_get_n_items ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-n-items"/>
+ <keyword type="function" name="poppler_form_field_choice_get_text ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-get-text"/>
+ <keyword type="function" name="poppler_form_field_choice_is_editable ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-is-editable"/>
+ <keyword type="function" name="poppler_form_field_choice_is_item_selected ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-is-item-selected"/>
+ <keyword type="function" name="poppler_form_field_choice_select_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-select-item"/>
+ <keyword type="function" name="poppler_form_field_choice_set_text ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-set-text"/>
+ <keyword type="function" name="poppler_form_field_choice_toggle_item ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-toggle-item"/>
+ <keyword type="function" name="poppler_form_field_choice_unselect_all ()" link="poppler-poppler-form-field.html#poppler-form-field-choice-unselect-all"/>
+ <keyword type="function" name="poppler_form_field_text_do_scroll ()" link="poppler-poppler-form-field.html#poppler-form-field-text-do-scroll"/>
+ <keyword type="function" name="poppler_form_field_text_do_spell_check ()" link="poppler-poppler-form-field.html#poppler-form-field-text-do-spell-check"/>
+ <keyword type="function" name="poppler_form_field_text_get_max_len ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-max-len"/>
+ <keyword type="function" name="poppler_form_field_text_get_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-text"/>
+ <keyword type="function" name="poppler_form_field_text_get_text_type ()" link="poppler-poppler-form-field.html#poppler-form-field-text-get-text-type"/>
+ <keyword type="function" name="poppler_form_field_text_is_password ()" link="poppler-poppler-form-field.html#poppler-form-field-text-is-password"/>
+ <keyword type="function" name="poppler_form_field_text_is_rich_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-is-rich-text"/>
+ <keyword type="function" name="poppler_form_field_text_set_text ()" link="poppler-poppler-form-field.html#poppler-form-field-text-set-text"/>
+ <keyword type="macro" name="POPPLER_TYPE_ACTION_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-ACTION-TYPE--CAPS"/>
+ <keyword type="function" name="poppler_action_type_get_type ()" link="poppler-poppler-enums.html#poppler-action-type-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_DEST_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-DEST-TYPE--CAPS"/>
+ <keyword type="function" name="poppler_dest_type_get_type ()" link="poppler-poppler-enums.html#poppler-dest-type-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_LAYOUT" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-LAYOUT--CAPS"/>
+ <keyword type="function" name="poppler_page_layout_get_type ()" link="poppler-poppler-enums.html#poppler-page-layout-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_MODE" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-MODE--CAPS"/>
+ <keyword type="function" name="poppler_page_mode_get_type ()" link="poppler-poppler-enums.html#poppler-page-mode-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_FONT_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-FONT-TYPE--CAPS"/>
+ <keyword type="function" name="poppler_font_type_get_type ()" link="poppler-poppler-enums.html#poppler-font-type-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_VIEWER_PREFERENCES" link="poppler-poppler-enums.html#POPPLER-TYPE-VIEWER-PREFERENCES--CAPS"/>
+ <keyword type="function" name="poppler_viewer_preferences_get_type ()" link="poppler-poppler-enums.html#poppler-viewer-preferences-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PERMISSIONS" link="poppler-poppler-enums.html#POPPLER-TYPE-PERMISSIONS--CAPS"/>
+ <keyword type="function" name="poppler_permissions_get_type ()" link="poppler-poppler-enums.html#poppler-permissions-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_SELECTION_STYLE" link="poppler-poppler-enums.html#POPPLER-TYPE-SELECTION-STYLE--CAPS"/>
+ <keyword type="function" name="poppler_selection_style_get_type ()" link="poppler-poppler-enums.html#poppler-selection-style-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_TRANSITION_TYPE" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS"/>
+ <keyword type="function" name="poppler_page_transition_type_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-type-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS"/>
+ <keyword type="function" name="poppler_page_transition_alignment_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-alignment-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_PAGE_TRANSITION_DIRECTION" link="poppler-poppler-enums.html#POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS"/>
+ <keyword type="function" name="poppler_page_transition_direction_get_type ()" link="poppler-poppler-enums.html#poppler-page-transition-direction-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_ERROR" link="poppler-poppler-enums.html#POPPLER-TYPE-ERROR--CAPS"/>
+ <keyword type="function" name="poppler_error_get_type ()" link="poppler-poppler-enums.html#poppler-error-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_ORIENTATION" link="poppler-poppler-enums.html#POPPLER-TYPE-ORIENTATION--CAPS"/>
+ <keyword type="function" name="poppler_orientation_get_type ()" link="poppler-poppler-enums.html#poppler-orientation-get-type"/>
+ <keyword type="macro" name="POPPLER_TYPE_BACKEND" link="poppler-poppler-enums.html#POPPLER-TYPE-BACKEND--CAPS"/>
+ <keyword type="function" name="poppler_backend_get_type ()" link="poppler-poppler-enums.html#poppler-backend-get-type"/>
+ <keyword type="struct" name="PopplerAnnot" link="poppler-poppler-annot.html#PopplerAnnot"/>
+ <keyword type="function" name="poppler_annot_callout_line_copy ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-copy"/>
+ <keyword type="function" name="poppler_annot_callout_line_free ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-free"/>
+ <keyword type="function" name="poppler_annot_callout_line_get_type ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-get-type"/>
+ <keyword type="function" name="poppler_annot_callout_line_new ()" link="poppler-poppler-annot.html#poppler-annot-callout-line-new"/>
+ <keyword type="function" name="poppler_annot_external_data_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-external-data-type-get-type"/>
+ <keyword type="function" name="poppler_annot_flag_get_type ()" link="poppler-poppler-annot.html#poppler-annot-flag-get-type"/>
+ <keyword type="function" name="poppler_annot_free_text_get_callout_line ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-callout-line"/>
+ <keyword type="function" name="poppler_annot_free_text_get_quadding ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-quadding"/>
+ <keyword type="function" name="poppler_annot_free_text_get_type ()" link="poppler-poppler-annot.html#poppler-annot-free-text-get-type"/>
+ <keyword type="function" name="poppler_annot_free_text_quadding_get_type ()" link="poppler-poppler-annot.html#poppler-annot-free-text-quadding-get-type"/>
+ <keyword type="function" name="poppler_annot_get_annot_type ()" link="poppler-poppler-annot.html#poppler-annot-get-annot-type"/>
+ <keyword type="function" name="poppler_annot_get_color ()" link="poppler-poppler-annot.html#poppler-annot-get-color"/>
+ <keyword type="function" name="poppler_annot_get_contents ()" link="poppler-poppler-annot.html#poppler-annot-get-contents"/>
+ <keyword type="function" name="poppler_annot_get_flags ()" link="poppler-poppler-annot.html#poppler-annot-get-flags"/>
+ <keyword type="function" name="poppler_annot_get_modified ()" link="poppler-poppler-annot.html#poppler-annot-get-modified"/>
+ <keyword type="function" name="poppler_annot_get_name ()" link="poppler-poppler-annot.html#poppler-annot-get-name"/>
+ <keyword type="function" name="poppler_annot_get_type ()" link="poppler-poppler-annot.html#poppler-annot-get-type"/>
+ <keyword type="function" name="poppler_annot_mapping_copy ()" link="poppler-poppler-annot.html#poppler-annot-mapping-copy"/>
+ <keyword type="function" name="poppler_annot_mapping_free ()" link="poppler-poppler-annot.html#poppler-annot-mapping-free"/>
+ <keyword type="function" name="poppler_annot_mapping_get_type ()" link="poppler-poppler-annot.html#poppler-annot-mapping-get-type"/>
+ <keyword type="function" name="poppler_annot_mapping_new ()" link="poppler-poppler-annot.html#poppler-annot-mapping-new"/>
+ <keyword type="function" name="poppler_annot_markup_get_date ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-date"/>
+ <keyword type="function" name="poppler_annot_markup_get_external_data ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-external-data"/>
+ <keyword type="function" name="poppler_annot_markup_get_label ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-label"/>
+ <keyword type="function" name="poppler_annot_markup_get_opacity ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-opacity"/>
+ <keyword type="function" name="poppler_annot_markup_get_popup_is_open ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-popup-is-open"/>
+ <keyword type="function" name="poppler_annot_markup_get_reply_to ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-reply-to"/>
+ <keyword type="function" name="poppler_annot_markup_get_subject ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-subject"/>
+ <keyword type="function" name="poppler_annot_markup_get_type ()" link="poppler-poppler-annot.html#poppler-annot-markup-get-type"/>
+ <keyword type="function" name="poppler_annot_markup_reply_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-markup-reply-type-get-type"/>
+ <keyword type="function" name="poppler_annot_text_get_icon ()" link="poppler-poppler-annot.html#poppler-annot-text-get-icon"/>
+ <keyword type="function" name="poppler_annot_text_get_is_open ()" link="poppler-poppler-annot.html#poppler-annot-text-get-is-open"/>
+ <keyword type="function" name="poppler_annot_text_get_state ()" link="poppler-poppler-annot.html#poppler-annot-text-get-state"/>
+ <keyword type="function" name="poppler_annot_text_get_type ()" link="poppler-poppler-annot.html#poppler-annot-text-get-type"/>
+ <keyword type="function" name="poppler_annot_text_state_get_type ()" link="poppler-poppler-annot.html#poppler-annot-text-state-get-type"/>
+ <keyword type="function" name="poppler_annot_type_get_type ()" link="poppler-poppler-annot.html#poppler-annot-type-get-type"/>
+ <keyword type="function" name="poppler_layer_get_type ()" link="poppler-poppler-layer.html#poppler-layer-get-type"/>
+ <keyword type="function" name="poppler_layer_get_title ()" link="poppler-poppler-layer.html#poppler-layer-get-title"/>
+ <keyword type="function" name="poppler_layer_is_visible ()" link="poppler-poppler-layer.html#poppler-layer-is-visible"/>
+ <keyword type="function" name="poppler_layer_show ()" link="poppler-poppler-layer.html#poppler-layer-show"/>
+ <keyword type="function" name="poppler_layer_hide ()" link="poppler-poppler-layer.html#poppler-layer-hide"/>
+ <keyword type="function" name="poppler_layer_is_parent ()" link="poppler-poppler-layer.html#poppler-layer-is-parent"/>
+ <keyword type="function" name="poppler_layer_get_radio_button_group_id ()" link="poppler-poppler-layer.html#poppler-layer-get-radio-button-group-id"/>
+ <keyword type="macro" name="POPPLER_HAS_CAIRO" link="poppler-poppler-features.html#POPPLER-HAS-CAIRO--CAPS"/>
+ <keyword type="macro" name="POPPLER_WITH_GDK" link="poppler-poppler-features.html#POPPLER-WITH-GDK--CAPS"/>
+ <keyword type="macro" name="POPPLER_MAJOR_VERSION" link="poppler-poppler-features.html#POPPLER-MAJOR-VERSION--CAPS"/>
+ <keyword type="macro" name="POPPLER_MINOR_VERSION" link="poppler-poppler-features.html#POPPLER-MINOR-VERSION--CAPS"/>
+ <keyword type="macro" name="POPPLER_MICRO_VERSION" link="poppler-poppler-features.html#POPPLER-MICRO-VERSION--CAPS"/>
+ <keyword type="macro" name="POPPLER_CHECK_VERSION()" link="poppler-poppler-features.html#POPPLER-CHECK-VERSION--CAPS"/>
+ </functions>
+</book>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/right.png b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/right.png
new file mode 100644
index 00000000000..92832e3a456
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/right.png
Binary files differ
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/style.css b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/style.css
new file mode 100644
index 00000000000..bb44c280939
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/style.css
@@ -0,0 +1,167 @@
+.synopsis, .classsynopsis
+{
+ background: #eeeeee;
+ border: solid 1px #aaaaaa;
+ padding: 0.5em;
+}
+.programlisting
+{
+ background: #eeeeff;
+ border: solid 1px #aaaaff;
+ padding: 0.5em;
+}
+.variablelist
+{
+ padding: 4px;
+ margin-left: 3em;
+}
+.variablelist td:first-child
+{
+ vertical-align: top;
+}
+
+/* this is needed so that the local anchors are displayed below the naviagtion */
+@media screen {
+ sup a.footnote
+ {
+ position: relative;
+ top: 0em ! important;
+ }
+ div.refnamediv a[name], div.refsect1 a[name]
+ {
+ position: relative;
+ top: -4.5em;
+ }
+ table.navigation#top
+ {
+ background: #ffeeee;
+ border: solid 1px #ffaaaa;
+ margin-top: 0;
+ margin-bottom: 0;
+ position: fixed;
+ top: 0;
+ left: 0;
+ height: 2em;
+ z-index: 1;
+ }
+ .navigation a
+ {
+ color: #770000;
+ }
+ .navigation a:visited
+ {
+ color: #550000;
+ }
+ td.shortcuts
+ {
+ color: #770000;
+ font-size: 80%;
+ white-space: nowrap;
+ }
+ div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface
+ {
+ position: relative;
+ top: 3em;
+ z-index: 0;
+ }
+ div.glossary, div.index
+ {
+ position: relative;
+ top: 2em;
+ z-index: 0;
+ }
+ div.refnamediv
+ {
+ margin-top: 2em;
+ }
+ body
+ {
+ padding-bottom: 20em;
+ }
+}
+@media print {
+ table.navigation {
+ visibility: collapse;
+ display: none;
+ }
+ div.titlepage table.navigation {
+ visibility: visible;
+ display: table;
+ background: #ffeeee;
+ border: solid 1px #ffaaaa;
+ margin-top: 0;
+ margin-bottom: 0;
+ top: 0;
+ left: 0;
+ height: 2em;
+ }
+}
+
+.navigation .title
+{
+ font-size: 200%;
+}
+
+
+div.gallery-float
+{
+ float: left;
+ padding: 10px;
+}
+div.gallery-float img
+{
+ border-style: none;
+}
+div.gallery-spacer
+{
+ clear: both;
+}
+a
+{
+ text-decoration: none;
+}
+a:hover
+{
+ text-decoration: underline;
+ color: #FF0000;
+}
+
+div.table table
+{
+ border-collapse: collapse;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #777777;
+ border-width: 1px;
+}
+
+div.table table td, div.table table th
+{
+ border-style: solid;
+ border-color: #777777;
+ border-width: 1px;
+ padding: 3px;
+ vertical-align: top;
+}
+
+div.table table th
+{
+ background-color: #eeeeee;
+}
+
+hr
+{
+ color: #777777;
+ background: #777777;
+ border: 0;
+ height: 1px;
+ clear: both;
+}
+
+.footer
+{
+ padding-top: 3.5em;
+ color: #777777;
+ text-align: center;
+ font-size: 80%;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/up.png b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/up.png
new file mode 100644
index 00000000000..85b3e2a2755
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/html/up.png
Binary files differ
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-docs.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-docs.sgml
new file mode 100644
index 00000000000..33dc2c4710d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-docs.sgml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>Poppler Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Poppler</title>
+ <xi:include href="xml/poppler.xml"/>
+ <xi:include href="xml/poppler-document.xml"/>
+ <xi:include href="xml/poppler-page.xml"/>
+ <xi:include href="xml/poppler-action.xml"/>
+ <xi:include href="xml/poppler-attachment.xml"/>
+ <xi:include href="xml/poppler-form-field.xml"/>
+ <xi:include href="xml/poppler-enums.xml"/>
+ <xi:include href="xml/poppler-annot.xml"/>
+ <xi:include href="xml/poppler-layer.xml"/>
+ <xi:include href="xml/poppler-features.xml"/>
+ </chapter>
+</book>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-overrides.txt b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-overrides.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-overrides.txt
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-sections.txt b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-sections.txt
new file mode 100644
index 00000000000..070fdc9d6b8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler-sections.txt
@@ -0,0 +1,320 @@
+<SECTION>
+<FILE>poppler-page</FILE>
+poppler_page_render
+poppler_page_render_to_pixbuf
+poppler_page_get_size
+poppler_page_get_index
+poppler_page_get_thumbnail
+poppler_page_get_thumbnail_size
+poppler_page_render_to_ps
+poppler_page_find_text
+poppler_page_get_text
+poppler_page_get_duration
+poppler_page_get_transition
+poppler_page_get_link_mapping
+poppler_page_free_link_mapping
+poppler_page_get_image_mapping
+poppler_page_free_image_mapping
+poppler_page_get_form_field_mapping
+poppler_page_free_form_field_mapping
+poppler_page_get_selection_region
+poppler_page_render_selection
+poppler_page_render_selection_to_pixbuf
+POPPLER_TYPE_RECTANGLE
+PopplerRectangle
+poppler_rectangle_get_type
+poppler_rectangle_new
+poppler_rectangle_copy
+poppler_rectangle_free
+POPPLER_TYPE_PAGE_TRANSITION
+PopplerPageTransition
+poppler_page_transition_get_type
+poppler_page_transition_new
+poppler_page_transition_copy
+poppler_page_transition_free
+POPPLER_TYPE_LINK_MAPPING
+PopplerLinkMapping
+poppler_link_mapping_get_type
+poppler_link_mapping_new
+poppler_link_mapping_copy
+poppler_link_mapping_free
+POPPLER_TYPE_IMAGE_MAPPING
+PopplerImageMapping
+poppler_image_mapping_get_type
+poppler_image_mapping_new
+poppler_image_mapping_copy
+poppler_image_mapping_free
+POPPLER_TYPE_FORM_FIELD_MAPPING
+PopplerFormFieldMapping
+poppler_form_field_mapping_get_type
+poppler_form_field_mapping_new
+poppler_form_field_mapping_copy
+poppler_form_field_mapping_free
+<SUBSECTION Standard>
+POPPLER_PAGE
+POPPLER_IS_PAGE
+POPPLER_TYPE_PAGE
+poppler_page_get_type
+</SECTION>
+
+<SECTION>
+<FILE>poppler-document</FILE>
+PopplerPageLayout
+PopplerPageMode
+PopplerFontType
+PopplerViewerPreferences
+PopplerPermissions
+poppler_document_new_from_file
+poppler_document_new_from_data
+poppler_document_save
+poppler_document_get_n_pages
+poppler_document_get_page
+poppler_document_get_page_by_label
+poppler_document_find_dest
+poppler_document_has_attachments
+poppler_document_get_attachments
+poppler_document_get_form_field
+poppler_index_iter_get_type
+poppler_index_iter_new
+poppler_index_iter_copy
+poppler_index_iter_free
+poppler_index_iter_get_child
+poppler_index_iter_is_open
+poppler_index_iter_get_action
+poppler_index_iter_next
+poppler_font_info_new
+poppler_font_info_scan
+poppler_font_info_free
+poppler_fonts_iter_get_type
+poppler_fonts_iter_copy
+poppler_fonts_iter_free
+poppler_fonts_iter_get_name
+poppler_fonts_iter_get_full_name
+poppler_fonts_iter_get_font_type
+poppler_fonts_iter_is_embedded
+poppler_fonts_iter_is_subset
+poppler_fonts_iter_next
+poppler_ps_file_new
+poppler_ps_file_set_paper_size
+poppler_ps_file_set_duplex
+poppler_ps_file_free
+<SUBSECTION Standard>
+POPPLER_DOCUMENT
+POPPLER_IS_DOCUMENT
+POPPLER_TYPE_DOCUMENT
+poppler_document_get_type
+</SECTION>
+
+<SECTION>
+<FILE>poppler-action</FILE>
+PopplerActionType
+PopplerDestType
+PopplerActionAny
+PopplerActionGotoDest
+PopplerActionGotoRemote
+PopplerActionLaunch
+PopplerActionUri
+PopplerActionNamed
+PopplerActionMovie
+PopplerDest
+PopplerAction
+POPPLER_TYPE_ACTION
+POPPLER_ACTION
+poppler_action_get_type
+poppler_action_copy
+poppler_action_free
+POPPLER_TYPE_DEST
+poppler_dest_get_type
+poppler_dest_copy
+poppler_dest_free
+</SECTION>
+
+<SECTION>
+<FILE>poppler-attachment</FILE>
+PopplerAttachment
+poppler_attachment_save
+poppler_attachment_save_to_callback
+PopplerAttachmentSaveFunc
+<SUBSECTION Standard>
+POPPLER_ATTACHMENT
+POPPLER_IS_ATTACHMENT
+POPPLER_TYPE_ATTACHMENT
+poppler_attachment_get_type
+</SECTION>
+</SECTION>
+
+<SECTION>
+<FILE>poppler-form-field</FILE>
+PopplerFormField
+PopplerFormButtonType
+PopplerFormChoiceType
+PopplerFormFieldType
+PopplerFormTextType
+poppler_form_field_get_id
+poppler_form_field_get_field_type
+poppler_form_field_is_read_only
+poppler_form_field_get_font_size
+poppler_form_field_button_get_button_type
+poppler_form_field_button_get_state
+poppler_form_field_button_set_state
+poppler_form_field_choice_can_select_multiple
+poppler_form_field_choice_commit_on_change
+poppler_form_field_choice_do_spell_check
+poppler_form_field_choice_get_choice_type
+poppler_form_field_choice_get_item
+poppler_form_field_choice_get_n_items
+poppler_form_field_choice_get_text
+poppler_form_field_choice_is_editable
+poppler_form_field_choice_is_item_selected
+poppler_form_field_choice_select_item
+poppler_form_field_choice_set_text
+poppler_form_field_choice_toggle_item
+poppler_form_field_choice_unselect_all
+poppler_form_field_text_do_scroll
+poppler_form_field_text_do_spell_check
+poppler_form_field_text_get_max_len
+poppler_form_field_text_get_text
+poppler_form_field_text_get_text_type
+poppler_form_field_text_is_password
+poppler_form_field_text_is_rich_text
+poppler_form_field_text_set_text
+
+<SUBSECTION Standard>
+POPPLER_FORM_FIELD
+POPPLER_IS_FORM_FIELD
+POPPLER_TYPE_FORM_FIELD
+poppler_form_field_get_type
+</SECTION>
+
+<SECTION>
+<FILE>poppler-enums</FILE>
+POPPLER_TYPE_ACTION_TYPE
+poppler_action_type_get_type
+POPPLER_TYPE_DEST_TYPE
+poppler_dest_type_get_type
+POPPLER_TYPE_PAGE_LAYOUT
+poppler_page_layout_get_type
+POPPLER_TYPE_PAGE_MODE
+poppler_page_mode_get_type
+POPPLER_TYPE_FONT_TYPE
+poppler_font_type_get_type
+POPPLER_TYPE_VIEWER_PREFERENCES
+poppler_viewer_preferences_get_type
+POPPLER_TYPE_PERMISSIONS
+poppler_permissions_get_type
+POPPLER_TYPE_SELECTION_STYLE
+poppler_selection_style_get_type
+POPPLER_TYPE_PAGE_TRANSITION_TYPE
+poppler_page_transition_type_get_type
+POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT
+poppler_page_transition_alignment_get_type
+POPPLER_TYPE_PAGE_TRANSITION_DIRECTION
+poppler_page_transition_direction_get_type
+POPPLER_TYPE_ERROR
+poppler_error_get_type
+POPPLER_TYPE_ORIENTATION
+poppler_orientation_get_type
+POPPLER_TYPE_BACKEND
+poppler_backend_get_type
+</SECTION>
+
+<SECTION>
+<FILE>poppler</FILE>
+poppler_error_quark
+POPPLER_ERROR
+PopplerError
+PopplerOrientation
+PopplerDocument
+PopplerIndexIter
+PopplerFontsIter
+PopplerRectangle
+PopplerSelectionStyle
+PopplerPageTransitionType
+PopplerPageTransitionAlignment
+PopplerPageTransitionDirection
+PopplerLinkMapping
+PopplerPage
+PopplerFontInfo
+PopplerPSFile
+PopplerBackend
+poppler_get_backend
+poppler_get_version
+</SECTION>
+
+<SECTION>
+<FILE>poppler-private</FILE>
+PopplerDocument
+PopplerPSFile
+PopplerFontInfo
+PopplerPage
+</SECTION>
+
+<SECTION>
+<FILE>stamp-poppler-enums</FILE>
+</SECTION>
+
+<SECTION>
+<FILE>poppler-annot</FILE>
+PopplerAnnot
+poppler_annot_callout_line_copy
+poppler_annot_callout_line_free
+poppler_annot_callout_line_get_type
+poppler_annot_callout_line_new
+poppler_annot_external_data_type_get_type
+poppler_annot_flag_get_type
+poppler_annot_free_text_get_callout_line
+poppler_annot_free_text_get_quadding
+poppler_annot_free_text_get_type
+poppler_annot_free_text_quadding_get_type
+poppler_annot_get_annot_type
+poppler_annot_get_color
+poppler_annot_get_contents
+poppler_annot_get_flags
+poppler_annot_get_id
+poppler_annot_get_modified
+poppler_annot_get_name
+poppler_annot_get_type
+poppler_annot_mapping_copy
+poppler_annot_mapping_free
+poppler_annot_mapping_get_type
+poppler_annot_mapping_new
+poppler_annot_markup_get_date
+poppler_annot_markup_get_external_data
+poppler_annot_markup_get_label
+poppler_annot_markup_get_opacity
+poppler_annot_markup_get_popup_is_open
+poppler_annot_markup_get_reply_to
+poppler_annot_markup_get_subject
+poppler_annot_markup_get_type
+poppler_annot_markup_reply_type_get_type
+poppler_annot_movie_get_movie
+poppler_annot_movie_get_title
+poppler_annot_movie_get_type
+poppler_annot_text_get_icon
+poppler_annot_text_get_is_open
+poppler_annot_text_get_state
+poppler_annot_text_get_type
+poppler_annot_text_state_get_type
+poppler_annot_type_get_type
+</SECTION>
+
+<SECTION>
+<FILE>poppler-layer</FILE>
+poppler_layer_get_type
+poppler_layer_get_title
+poppler_layer_is_visible
+poppler_layer_show
+poppler_layer_hide
+poppler_layer_is_parent
+poppler_layer_get_radio_button_group_id
+</SECTION>
+
+<SECTION>
+<FILE>poppler-features</FILE>
+POPPLER_HAS_CAIRO
+POPPLER_WITH_GDK
+POPPLER_MAJOR_VERSION
+POPPLER_MINOR_VERSION
+POPPLER_MICRO_VERSION
+POPPLER_CHECK_VERSION
+</SECTION>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler.types b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler.types
new file mode 100644
index 00000000000..4e4bc33be4e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/poppler.types
@@ -0,0 +1,6 @@
+#include <poppler.h>
+
+poppler_document_get_type
+poppler_page_get_type
+poppler_attachment_get_type
+poppler_form_field_get_type
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-action.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-action.sgml
new file mode 100644
index 00000000000..f484bdedfea
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-action.sgml
@@ -0,0 +1,207 @@
+<!-- ##### SECTION Title ##### -->
+PopplerAction
+
+<!-- ##### SECTION Short_Description ##### -->
+Action links
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### ENUM PopplerActionType ##### -->
+<para>
+
+</para>
+
+@POPPLER_ACTION_UNKNOWN:
+@POPPLER_ACTION_NONE:
+@POPPLER_ACTION_GOTO_DEST:
+@POPPLER_ACTION_GOTO_REMOTE:
+@POPPLER_ACTION_LAUNCH:
+@POPPLER_ACTION_URI:
+@POPPLER_ACTION_NAMED:
+@POPPLER_ACTION_MOVIE:
+
+<!-- ##### ENUM PopplerDestType ##### -->
+<para>
+
+</para>
+
+@POPPLER_DEST_UNKNOWN:
+@POPPLER_DEST_XYZ:
+@POPPLER_DEST_FIT:
+@POPPLER_DEST_FITH:
+@POPPLER_DEST_FITV:
+@POPPLER_DEST_FITR:
+@POPPLER_DEST_FITB:
+@POPPLER_DEST_FITBH:
+@POPPLER_DEST_FITBV:
+@POPPLER_DEST_NAMED:
+
+<!-- ##### STRUCT PopplerActionAny ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+
+<!-- ##### STRUCT PopplerActionGotoDest ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+@dest:
+
+<!-- ##### STRUCT PopplerActionGotoRemote ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+@file_name:
+@dest:
+
+<!-- ##### STRUCT PopplerActionLaunch ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+@file_name:
+@params:
+
+<!-- ##### STRUCT PopplerActionUri ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+@uri:
+
+<!-- ##### STRUCT PopplerActionNamed ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+@named_dest:
+
+<!-- ##### STRUCT PopplerActionMovie ##### -->
+<para>
+
+</para>
+
+@type:
+@title:
+
+<!-- ##### STRUCT PopplerDest ##### -->
+<para>
+
+</para>
+
+@type:
+@page_num:
+@left:
+@bottom:
+@right:
+@top:
+@zoom:
+@named_dest:
+@change_left:
+@change_top:
+@change_zoom:
+
+<!-- ##### UNION PopplerAction ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO POPPLER_TYPE_ACTION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_ACTION ##### -->
+<para>
+
+</para>
+
+@obj:
+
+
+<!-- ##### FUNCTION poppler_action_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_action_copy ##### -->
+<para>
+
+</para>
+
+@action:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_action_free ##### -->
+<para>
+
+</para>
+
+@action:
+
+
+<!-- ##### MACRO POPPLER_TYPE_DEST ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_dest_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_dest_copy ##### -->
+<para>
+
+</para>
+
+@dest:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_dest_free ##### -->
+<para>
+
+</para>
+
+@dest:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-annot.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-annot.sgml
new file mode 100644
index 00000000000..e7abcf7846b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-annot.sgml
@@ -0,0 +1,333 @@
+<!-- ##### SECTION Title ##### -->
+PopplerAnnot
+
+<!-- ##### SECTION Short_Description ##### -->
+Annotations
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT PopplerAnnot ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION poppler_annot_callout_line_copy ##### -->
+<para>
+
+</para>
+
+@callout:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_callout_line_free ##### -->
+<para>
+
+</para>
+
+@callout:
+
+
+<!-- ##### FUNCTION poppler_annot_callout_line_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_callout_line_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_external_data_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_flag_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_free_text_get_callout_line ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_free_text_get_quadding ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_free_text_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_free_text_quadding_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_annot_type ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_color ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_contents ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_flags ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_modified ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_name ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_mapping_copy ##### -->
+<para>
+
+</para>
+
+@mapping:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_mapping_free ##### -->
+<para>
+
+</para>
+
+@mapping:
+
+
+<!-- ##### FUNCTION poppler_annot_mapping_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_mapping_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_date ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_external_data ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_label ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_opacity ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_popup_is_open ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_reply_to ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_subject ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_markup_reply_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_text_get_icon ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_text_get_is_open ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_text_get_state ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_text_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_text_state_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_annot_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml
new file mode 100644
index 00000000000..81dae971b7d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml
@@ -0,0 +1,65 @@
+<!-- ##### SECTION Title ##### -->
+PopplerAttachment
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT PopplerAttachment ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION poppler_attachment_save ##### -->
+<para>
+
+</para>
+
+@attachment:
+@filename:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_attachment_save_to_callback ##### -->
+<para>
+
+</para>
+
+@attachment:
+@save_func:
+@user_data:
+@error:
+@Returns:
+
+
+<!-- ##### USER_FUNCTION PopplerAttachmentSaveFunc ##### -->
+<para>
+Specifies the type of the function passed to
+poppler_attachment_save_to_callback(). It is called once for each block of
+bytes that is "written" by poppler_attachment_save_to_callback(). If
+successful it should return %TRUE. If an error occurs it should set
+@error and return %FALSE, in which case poppler_attachment_save_to_callback()
+will fail with the same error.
+</para>
+
+@buf: buffer containing bytes to be written.
+@count: number of bytes in @buf.
+@data: A location to return an error.
+@error: user data passed to poppler_attachment_save_to_callback()
+@Returns: %TRUE if successful, %FALSE (with @error set) if failed.
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml.sgml
new file mode 100644
index 00000000000..89c27889931
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-attachment.sgml.sgml
@@ -0,0 +1,67 @@
+<!-- ##### SECTION Title ##### -->
+poppler-attachment.sgml
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT PopplerAttachment ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION poppler_attachment_save ##### -->
+<para>
+
+</para>
+
+@attachment:
+@filename:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_attachment_save_to_callback ##### -->
+<para>
+
+</para>
+
+@attachment:
+@save_func:
+@user_data:
+@error:
+@Returns:
+
+
+<!-- ##### USER_FUNCTION PopplerAttachmentSaveFunc ##### -->
+<para>
+Specifies the type of the function passed to
+poppler_attachment_save_to_callback(). It is called once for each block of
+bytes that is "written" by poppler_attachment_save_to_callback(). If
+successful it should return %TRUE. If an error occurs it should set
+@error and return %FALSE, in which case poppler_attachment_save_to_callback()
+will fail with the same error.
+</para>
+
+@buf: buffer containing bytes to be written.
+@count: number of bytes in @buf.
+@data: A location to return an error.
+@error: user data passed to poppler_attachment_save_to_callback()
+@Returns: %TRUE if successful, %FALSE (with @error set) if failed.
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-document.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-document.sgml
new file mode 100644
index 00000000000..a8ef11e8bcd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-document.sgml
@@ -0,0 +1,405 @@
+<!-- ##### SECTION Title ##### -->
+PopplerDocument
+
+<!-- ##### SECTION Short_Description ##### -->
+Information about a document
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #PopplerDocument is an object used to refer to a main document.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### ENUM PopplerPageLayout ##### -->
+<para>
+
+</para>
+
+@POPPLER_PAGE_LAYOUT_UNSET:
+@POPPLER_PAGE_LAYOUT_SINGLE_PAGE:
+@POPPLER_PAGE_LAYOUT_ONE_COLUMN:
+@POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT:
+@POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT:
+@POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT:
+@POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT:
+
+<!-- ##### ENUM PopplerPageMode ##### -->
+<para>
+
+</para>
+
+@POPPLER_PAGE_MODE_UNSET:
+@POPPLER_PAGE_MODE_NONE:
+@POPPLER_PAGE_MODE_USE_OUTLINES:
+@POPPLER_PAGE_MODE_USE_THUMBS:
+@POPPLER_PAGE_MODE_FULL_SCREEN:
+@POPPLER_PAGE_MODE_USE_OC:
+@POPPLER_PAGE_MODE_USE_ATTACHMENTS:
+
+<!-- ##### ENUM PopplerFontType ##### -->
+<para>
+
+</para>
+
+@POPPLER_FONT_TYPE_UNKNOWN:
+@POPPLER_FONT_TYPE_TYPE1:
+@POPPLER_FONT_TYPE_TYPE1C:
+@POPPLER_FONT_TYPE_TYPE1COT:
+@POPPLER_FONT_TYPE_TYPE3:
+@POPPLER_FONT_TYPE_TRUETYPE:
+@POPPLER_FONT_TYPE_TRUETYPEOT:
+@POPPLER_FONT_TYPE_CID_TYPE0:
+@POPPLER_FONT_TYPE_CID_TYPE0C:
+@POPPLER_FONT_TYPE_CID_TYPE0COT:
+@POPPLER_FONT_TYPE_CID_TYPE2:
+@POPPLER_FONT_TYPE_CID_TYPE2OT:
+
+<!-- ##### ENUM PopplerViewerPreferences ##### -->
+<para>
+
+</para>
+
+@POPPLER_VIEWER_PREFERENCES_UNSET:
+@POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR:
+@POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR:
+@POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI:
+@POPPLER_VIEWER_PREFERENCES_FIT_WINDOW:
+@POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW:
+@POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE:
+@POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL:
+
+<!-- ##### ENUM PopplerPermissions ##### -->
+<para>
+
+</para>
+
+@POPPLER_PERMISSIONS_OK_TO_PRINT:
+@POPPLER_PERMISSIONS_OK_TO_MODIFY:
+@POPPLER_PERMISSIONS_OK_TO_COPY:
+@POPPLER_PERMISSIONS_OK_TO_ADD_NOTES:
+@POPPLER_PERMISSIONS_OK_TO_FILL_FORM:
+@POPPLER_PERMISSIONS_FULL:
+
+<!-- ##### FUNCTION poppler_document_new_from_file ##### -->
+<para>
+
+</para>
+
+@uri:
+@password:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_new_from_data ##### -->
+<para>
+
+</para>
+
+@data:
+@length:
+@password:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_save ##### -->
+<para>
+
+</para>
+
+@document:
+@uri:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_get_n_pages ##### -->
+<para>
+
+</para>
+
+@document:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_get_page ##### -->
+<para>
+
+</para>
+
+@document:
+@index:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_get_page_by_label ##### -->
+<para>
+
+</para>
+
+@document:
+@label:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_find_dest ##### -->
+<para>
+
+</para>
+
+@document:
+@link_name:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_has_attachments ##### -->
+<para>
+
+</para>
+
+@document:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_get_attachments ##### -->
+<para>
+
+</para>
+
+@document:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_document_get_form_field ##### -->
+<para>
+
+</para>
+
+@document:
+@id:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_new ##### -->
+<para>
+
+</para>
+
+@document:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_copy ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_free ##### -->
+<para>
+
+</para>
+
+@iter:
+
+
+<!-- ##### FUNCTION poppler_index_iter_get_child ##### -->
+<para>
+
+</para>
+
+@parent:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_is_open ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_get_action ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_index_iter_next ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_font_info_new ##### -->
+<para>
+
+</para>
+
+@document:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_font_info_scan ##### -->
+<para>
+
+</para>
+
+@font_info:
+@n_pages:
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_font_info_free ##### -->
+<para>
+
+</para>
+
+@font_info:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_copy ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_free ##### -->
+<para>
+
+</para>
+
+@iter:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_get_name ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_get_full_name ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_get_font_type ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_is_embedded ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_is_subset ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_fonts_iter_next ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_ps_file_new ##### -->
+<para>
+
+</para>
+
+@document:
+@filename:
+@first_page:
+@n_pages:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_ps_file_set_paper_size ##### -->
+<para>
+
+</para>
+
+@ps_file:
+@width:
+@height:
+
+
+<!-- ##### FUNCTION poppler_ps_file_set_duplex ##### -->
+<para>
+
+</para>
+
+@ps_file:
+@duplex:
+
+
+<!-- ##### FUNCTION poppler_ps_file_free ##### -->
+<para>
+
+</para>
+
+@ps_file:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-enums.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-enums.sgml
new file mode 100644
index 00000000000..b7841d70661
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-enums.sgml
@@ -0,0 +1,229 @@
+<!-- ##### SECTION Title ##### -->
+poppler-enums
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO POPPLER_TYPE_ACTION_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_action_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_DEST_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_dest_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_LAYOUT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_page_layout_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_MODE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_page_mode_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_FONT_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_font_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_VIEWER_PREFERENCES ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_viewer_preferences_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PERMISSIONS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_permissions_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_SELECTION_STYLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_selection_style_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_TRANSITION_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_page_transition_type_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_page_transition_alignment_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_TRANSITION_DIRECTION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_page_transition_direction_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_error_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_ORIENTATION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_orientation_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_TYPE_BACKEND ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION poppler_backend_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-features.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-features.sgml
new file mode 100644
index 00000000000..22f90b0638b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-features.sgml
@@ -0,0 +1,80 @@
+<!-- ##### SECTION Title ##### -->
+Version and Features Information
+
+<!-- ##### SECTION Short_Description ##### -->
+Variables and functions to check the poppler version and features
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Poppler provides version information, and information about features
+enabled at compile time. This is primarily useful in configure checks
+for builds that have a configure script, or for allowing code to optionally
+depend but not require a specific poppler version.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO POPPLER_HAS_CAIRO ##### -->
+<para>
+Defined if poppler was compiled with cairo support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_WITH_GDK ##### -->
+<para>
+Defined if poppler was compiled with GDK support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_MAJOR_VERSION ##### -->
+<para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 0.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MINOR_VERSION ##### -->
+<para>
+
+</para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 1.)
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MICRO_VERSION ##### -->
+<para>
+The micro version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 2.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_CHECK_VERSION ##### -->
+<para>
+Returns %TRUE if the version of the poppler header files is the same
+as or newer than the passed-in version.
+</para>
+
+@major: major version (e.g. 0 for version 0.1.2)
+@minor: minor version (e.g. 1 for version 0.1.2)
+@micro: micro version (e.g. 2 for version 0.1.2)
+
+Since: 0.11
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-form-field.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-form-field.sgml
new file mode 100644
index 00000000000..38d0e9d2491
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-form-field.sgml
@@ -0,0 +1,315 @@
+<!-- ##### SECTION Title ##### -->
+PopplerFormField
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT PopplerFormField ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM PopplerFormButtonType ##### -->
+<para>
+
+</para>
+
+@POPPLER_FORM_BUTTON_PUSH:
+@POPPLER_FORM_BUTTON_CHECK:
+@POPPLER_FORM_BUTTON_RADIO:
+
+<!-- ##### ENUM PopplerFormChoiceType ##### -->
+<para>
+
+</para>
+
+@POPPLER_FORM_CHOICE_COMBO:
+@POPPLER_FORM_CHOICE_LIST:
+
+<!-- ##### ENUM PopplerFormFieldType ##### -->
+<para>
+
+</para>
+
+@POPPLER_FORM_FIELD_UNKNOWN:
+@POPPLER_FORM_FIELD_BUTTON:
+@POPPLER_FORM_FIELD_TEXT:
+@POPPLER_FORM_FIELD_CHOICE:
+@POPPLER_FORM_FIELD_SIGNATURE:
+
+<!-- ##### ENUM PopplerFormTextType ##### -->
+<para>
+
+</para>
+
+@POPPLER_FORM_TEXT_NORMAL:
+@POPPLER_FORM_TEXT_MULTILINE:
+@POPPLER_FORM_TEXT_FILE_SELECT:
+
+<!-- ##### FUNCTION poppler_form_field_get_id ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_get_field_type ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_is_read_only ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_get_font_size ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_button_get_button_type ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_button_get_state ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_button_set_state ##### -->
+<para>
+
+</para>
+
+@field:
+@state:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_can_select_multiple ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_commit_on_change ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_do_spell_check ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_get_choice_type ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_get_item ##### -->
+<para>
+
+</para>
+
+@field:
+@index:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_get_n_items ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_get_text ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_is_editable ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_is_item_selected ##### -->
+<para>
+
+</para>
+
+@field:
+@index:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_select_item ##### -->
+<para>
+
+</para>
+
+@field:
+@index:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_set_text ##### -->
+<para>
+
+</para>
+
+@field:
+@text:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_toggle_item ##### -->
+<para>
+
+</para>
+
+@field:
+@index:
+
+
+<!-- ##### FUNCTION poppler_form_field_choice_unselect_all ##### -->
+<para>
+
+</para>
+
+@field:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_do_scroll ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_do_spell_check ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_get_max_len ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_get_text ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_get_text_type ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_is_password ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_is_rich_text ##### -->
+<para>
+
+</para>
+
+@field:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_text_set_text ##### -->
+<para>
+
+</para>
+
+@field:
+@text:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-layer.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-layer.sgml
new file mode 100644
index 00000000000..a2fe01c94ce
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-layer.sgml
@@ -0,0 +1,79 @@
+<!-- ##### SECTION Title ##### -->
+PopplerLayer
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION poppler_layer_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_layer_get_title ##### -->
+<para>
+
+</para>
+
+@layer:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_layer_is_visible ##### -->
+<para>
+
+</para>
+
+@layer:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_layer_show ##### -->
+<para>
+
+</para>
+
+@layer:
+
+
+<!-- ##### FUNCTION poppler_layer_hide ##### -->
+<para>
+
+</para>
+
+@layer:
+
+
+<!-- ##### FUNCTION poppler_layer_is_parent ##### -->
+<para>
+
+</para>
+
+@layer:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_layer_get_radio_button_group_id ##### -->
+<para>
+
+</para>
+
+@layer:
+@Returns:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-page.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-page.sgml
new file mode 100644
index 00000000000..a86293b55c8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-page.sgml
@@ -0,0 +1,470 @@
+<!-- ##### SECTION Title ##### -->
+PopplerPage
+
+<!-- ##### SECTION Short_Description ##### -->
+Information about a page in a document
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION poppler_page_render ##### -->
+<para>
+
+</para>
+
+@page:
+@cairo:
+
+
+<!-- ##### FUNCTION poppler_page_render_to_pixbuf ##### -->
+<para>
+
+</para>
+
+@page:
+@src_x:
+@src_y:
+@src_width:
+@src_height:
+@scale:
+@rotation:
+@pixbuf:
+
+
+<!-- ##### FUNCTION poppler_page_get_size ##### -->
+<para>
+
+</para>
+
+@page:
+@width:
+@height:
+
+
+<!-- ##### FUNCTION poppler_page_get_index ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_thumbnail ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_thumbnail_size ##### -->
+<para>
+
+</para>
+
+@page:
+@width:
+@height:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_render_to_ps ##### -->
+<para>
+
+</para>
+
+@page:
+@ps_file:
+
+
+<!-- ##### FUNCTION poppler_page_find_text ##### -->
+<para>
+
+</para>
+
+@page:
+@text:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_text ##### -->
+<para>
+
+</para>
+
+@page:
+@style:
+@rect:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_duration ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_transition ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_get_link_mapping ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_free_link_mapping ##### -->
+<para>
+
+</para>
+
+@list:
+
+
+<!-- ##### FUNCTION poppler_page_get_image_mapping ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_free_image_mapping ##### -->
+<para>
+
+</para>
+
+@list:
+
+
+<!-- ##### FUNCTION poppler_page_get_form_field_mapping ##### -->
+<para>
+
+</para>
+
+@page:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_free_form_field_mapping ##### -->
+<para>
+
+</para>
+
+@list:
+
+
+<!-- ##### FUNCTION poppler_page_get_selection_region ##### -->
+<para>
+
+</para>
+
+@page:
+@scale:
+@style:
+@selection:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_render_selection ##### -->
+<para>
+
+</para>
+
+@page:
+@cairo:
+@selection:
+@old_selection:
+@style:
+@glyph_color:
+@background_color:
+
+
+<!-- ##### FUNCTION poppler_page_render_selection_to_pixbuf ##### -->
+<para>
+
+</para>
+
+@page:
+@scale:
+@rotation:
+@pixbuf:
+@selection:
+@old_selection:
+@style:
+@glyph_color:
+@background_color:
+
+
+<!-- ##### MACRO POPPLER_TYPE_RECTANGLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT PopplerRectangle ##### -->
+<para>
+
+</para>
+
+@x1:
+@y1:
+@x2:
+@y2:
+
+<!-- ##### FUNCTION poppler_rectangle_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_rectangle_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_rectangle_copy ##### -->
+<para>
+
+</para>
+
+@rectangle:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_rectangle_free ##### -->
+<para>
+
+</para>
+
+@rectangle:
+
+
+<!-- ##### MACRO POPPLER_TYPE_PAGE_TRANSITION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT PopplerPageTransition ##### -->
+<para>
+
+</para>
+
+@type:
+@alignment:
+@direction:
+@duration:
+@angle:
+@scale:
+@rectangular:
+
+<!-- ##### FUNCTION poppler_page_transition_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_transition_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_transition_copy ##### -->
+<para>
+
+</para>
+
+@transition:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_page_transition_free ##### -->
+<para>
+
+</para>
+
+@transition:
+
+
+<!-- ##### MACRO POPPLER_TYPE_LINK_MAPPING ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT PopplerLinkMapping ##### -->
+<para>
+
+</para>
+
+@area:
+@action:
+
+<!-- ##### FUNCTION poppler_link_mapping_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_link_mapping_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_link_mapping_copy ##### -->
+<para>
+
+</para>
+
+@mapping:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_link_mapping_free ##### -->
+<para>
+
+</para>
+
+@mapping:
+
+
+<!-- ##### MACRO POPPLER_TYPE_IMAGE_MAPPING ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT PopplerImageMapping ##### -->
+<para>
+
+</para>
+
+@area:
+@image_id:
+
+<!-- ##### FUNCTION poppler_image_mapping_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_image_mapping_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_image_mapping_copy ##### -->
+<para>
+
+</para>
+
+@mapping:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_image_mapping_free ##### -->
+<para>
+
+</para>
+
+@mapping:
+
+
+<!-- ##### MACRO POPPLER_TYPE_FORM_FIELD_MAPPING ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT PopplerFormFieldMapping ##### -->
+<para>
+
+</para>
+
+@area:
+@field:
+
+<!-- ##### FUNCTION poppler_form_field_mapping_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_mapping_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_mapping_copy ##### -->
+<para>
+
+</para>
+
+@mapping:
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_form_field_mapping_free ##### -->
+<para>
+
+</para>
+
+@mapping:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-private.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-private.sgml
new file mode 100644
index 00000000000..fb167da7141
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-private.sgml
@@ -0,0 +1,145 @@
+<!-- ##### SECTION Title ##### -->
+poppler-private
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT PopplerDocument ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG PopplerDocument:author ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:creation-date ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:creator ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format-major ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format-minor ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:keywords ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:linearized ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:metadata ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:mod-date ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:page-layout ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:page-mode ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:permissions ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:producer ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:subject ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:title ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:viewer-preferences ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT PopplerPSFile ##### -->
+<para>
+
+</para>
+
+@parent_instance:
+@document:
+@out:
+@filename:
+@first_page:
+@last_page:
+@paper_width:
+@paper_height:
+@duplex:
+
+<!-- ##### STRUCT PopplerFontInfo ##### -->
+<para>
+
+</para>
+
+@parent_instance:
+@document:
+@scanner:
+
+<!-- ##### STRUCT PopplerPage ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG PopplerPage:label ##### -->
+<para>
+
+</para>
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-unused.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-unused.sgml
new file mode 100644
index 00000000000..de01a0629c1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler-unused.sgml
@@ -0,0 +1,31 @@
+<!-- ##### FUNCTION poppler_annot_get_id ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+<!-- ##### FUNCTION poppler_annot_movie_get_movie ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+<!-- ##### FUNCTION poppler_annot_movie_get_title ##### -->
+<para>
+
+</para>
+
+@poppler_annot:
+@Returns:
+
+<!-- ##### FUNCTION poppler_annot_movie_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler.sgml
new file mode 100644
index 00000000000..b399249d08c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/poppler.sgml
@@ -0,0 +1,279 @@
+<!-- ##### SECTION Title ##### -->
+poppler
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION poppler_error_quark ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### MACRO POPPLER_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### ENUM PopplerError ##### -->
+<para>
+
+</para>
+
+@POPPLER_ERROR_INVALID:
+@POPPLER_ERROR_ENCRYPTED:
+@POPPLER_ERROR_OPEN_FILE:
+@POPPLER_ERROR_BAD_CATALOG:
+@POPPLER_ERROR_DAMAGED:
+
+<!-- ##### ENUM PopplerOrientation ##### -->
+<para>
+
+</para>
+
+@POPPLER_ORIENTATION_PORTRAIT:
+@POPPLER_ORIENTATION_LANDSCAPE:
+@POPPLER_ORIENTATION_UPSIDEDOWN:
+@POPPLER_ORIENTATION_SEASCAPE:
+
+<!-- ##### STRUCT PopplerDocument ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG PopplerDocument:author ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:creation-date ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:creator ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format-major ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:format-minor ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:keywords ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:linearized ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:metadata ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:mod-date ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:page-layout ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:page-mode ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:permissions ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:producer ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:subject ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:title ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG PopplerDocument:viewer-preferences ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT PopplerIndexIter ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT PopplerFontsIter ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT PopplerRectangle ##### -->
+<para>
+
+</para>
+
+@x1:
+@y1:
+@x2:
+@y2:
+
+<!-- ##### ENUM PopplerSelectionStyle ##### -->
+<para>
+
+</para>
+
+@POPPLER_SELECTION_GLYPH:
+@POPPLER_SELECTION_WORD:
+@POPPLER_SELECTION_LINE:
+
+<!-- ##### ENUM PopplerPageTransitionType ##### -->
+<para>
+
+</para>
+
+@POPPLER_PAGE_TRANSITION_REPLACE:
+@POPPLER_PAGE_TRANSITION_SPLIT:
+@POPPLER_PAGE_TRANSITION_BLINDS:
+@POPPLER_PAGE_TRANSITION_BOX:
+@POPPLER_PAGE_TRANSITION_WIPE:
+@POPPLER_PAGE_TRANSITION_DISSOLVE:
+@POPPLER_PAGE_TRANSITION_GLITTER:
+@POPPLER_PAGE_TRANSITION_FLY:
+@POPPLER_PAGE_TRANSITION_PUSH:
+@POPPLER_PAGE_TRANSITION_COVER:
+@POPPLER_PAGE_TRANSITION_UNCOVER:
+@POPPLER_PAGE_TRANSITION_FADE:
+
+<!-- ##### ENUM PopplerPageTransitionAlignment ##### -->
+<para>
+
+</para>
+
+@POPPLER_PAGE_TRANSITION_HORIZONTAL:
+@POPPLER_PAGE_TRANSITION_VERTICAL:
+
+<!-- ##### ENUM PopplerPageTransitionDirection ##### -->
+<para>
+
+</para>
+
+@POPPLER_PAGE_TRANSITION_INWARD:
+@POPPLER_PAGE_TRANSITION_OUTWARD:
+
+<!-- ##### STRUCT PopplerLinkMapping ##### -->
+<para>
+
+</para>
+
+@area:
+@action:
+
+<!-- ##### STRUCT PopplerPage ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG PopplerPage:label ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT PopplerFontInfo ##### -->
+<para>
+
+</para>
+
+@parent_instance:
+@document:
+@scanner:
+
+<!-- ##### STRUCT PopplerPSFile ##### -->
+<para>
+
+</para>
+
+@parent_instance:
+@document:
+@out:
+@filename:
+@first_page:
+@last_page:
+@paper_width:
+@paper_height:
+@duplex:
+
+<!-- ##### ENUM PopplerBackend ##### -->
+<para>
+
+</para>
+
+@POPPLER_BACKEND_UNKNOWN:
+@POPPLER_BACKEND_SPLASH:
+@POPPLER_BACKEND_CAIRO:
+
+<!-- ##### FUNCTION poppler_get_backend ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION poppler_get_version ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/stamp-poppler-enums.sgml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/stamp-poppler-enums.sgml
new file mode 100644
index 00000000000..44a3c108aad
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/tmpl/stamp-poppler-enums.sgml
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+stamp-poppler-enums
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-deprecated.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-deprecated.xml
new file mode 100644
index 00000000000..113283526a9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-deprecated.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE indexdiv PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<indexdiv>
+</indexdiv>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-full.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-full.xml
new file mode 100644
index 00000000000..4a0e8e54a70
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/api-index-full.xml
@@ -0,0 +1,266 @@
+<?xml version="1.0"?>
+<!DOCTYPE indexdiv PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<indexdiv>
+<indexdiv><title>P</title>
+<indexentry><primaryie linkends="PopplerAction"><link linkend="PopplerAction">PopplerAction</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionAny"><link linkend="PopplerActionAny">PopplerActionAny</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionGotoDest"><link linkend="PopplerActionGotoDest">PopplerActionGotoDest</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionGotoRemote"><link linkend="PopplerActionGotoRemote">PopplerActionGotoRemote</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionLaunch"><link linkend="PopplerActionLaunch">PopplerActionLaunch</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionMovie"><link linkend="PopplerActionMovie">PopplerActionMovie</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionNamed"><link linkend="PopplerActionNamed">PopplerActionNamed</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionType"><link linkend="PopplerActionType">PopplerActionType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerActionUri"><link linkend="PopplerActionUri">PopplerActionUri</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerAnnot"><link linkend="PopplerAnnot">PopplerAnnot</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerAttachment-struct"><link linkend="PopplerAttachment">PopplerAttachment</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerAttachmentSaveFunc"><link linkend="PopplerAttachmentSaveFunc">PopplerAttachmentSaveFunc</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerBackend"><link linkend="PopplerBackend">PopplerBackend</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDest"><link linkend="PopplerDest">PopplerDest</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDestType"><link linkend="PopplerDestType">PopplerDestType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument-struct"><link linkend="PopplerDocument">PopplerDocument</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--author"><link linkend="PopplerDocument--author">PopplerDocument:author</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--creation-date"><link linkend="PopplerDocument--creation-date">PopplerDocument:creation-date</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--creator"><link linkend="PopplerDocument--creator">PopplerDocument:creator</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--format"><link linkend="PopplerDocument--format">PopplerDocument:format</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--format-major"><link linkend="PopplerDocument--format-major">PopplerDocument:format-major</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--format-minor"><link linkend="PopplerDocument--format-minor">PopplerDocument:format-minor</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--keywords"><link linkend="PopplerDocument--keywords">PopplerDocument:keywords</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--linearized"><link linkend="PopplerDocument--linearized">PopplerDocument:linearized</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--metadata"><link linkend="PopplerDocument--metadata">PopplerDocument:metadata</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--mod-date"><link linkend="PopplerDocument--mod-date">PopplerDocument:mod-date</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--page-layout"><link linkend="PopplerDocument--page-layout">PopplerDocument:page-layout</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--page-mode"><link linkend="PopplerDocument--page-mode">PopplerDocument:page-mode</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--permissions"><link linkend="PopplerDocument--permissions">PopplerDocument:permissions</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--producer"><link linkend="PopplerDocument--producer">PopplerDocument:producer</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--subject"><link linkend="PopplerDocument--subject">PopplerDocument:subject</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--title"><link linkend="PopplerDocument--title">PopplerDocument:title</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerDocument--viewer-preferences"><link linkend="PopplerDocument--viewer-preferences">PopplerDocument:viewer-preferences</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerError"><link linkend="PopplerError">PopplerError</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFontInfo"><link linkend="PopplerFontInfo">PopplerFontInfo</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFontsIter"><link linkend="PopplerFontsIter">PopplerFontsIter</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFontType"><link linkend="PopplerFontType">PopplerFontType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormButtonType"><link linkend="PopplerFormButtonType">PopplerFormButtonType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormChoiceType"><link linkend="PopplerFormChoiceType">PopplerFormChoiceType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormField-struct"><link linkend="PopplerFormField">PopplerFormField</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormFieldMapping"><link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormFieldType"><link linkend="PopplerFormFieldType">PopplerFormFieldType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerFormTextType"><link linkend="PopplerFormTextType">PopplerFormTextType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerImageMapping"><link linkend="PopplerImageMapping">PopplerImageMapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerIndexIter"><link linkend="PopplerIndexIter">PopplerIndexIter</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerLinkMapping"><link linkend="PopplerLinkMapping">PopplerLinkMapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerOrientation"><link linkend="PopplerOrientation">PopplerOrientation</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPage-struct"><link linkend="PopplerPage">PopplerPage</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPage--label"><link linkend="PopplerPage--label">PopplerPage:label</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageLayout"><link linkend="PopplerPageLayout">PopplerPageLayout</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageMode"><link linkend="PopplerPageMode">PopplerPageMode</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageTransition"><link linkend="PopplerPageTransition">PopplerPageTransition</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageTransitionAlignment"><link linkend="PopplerPageTransitionAlignment">PopplerPageTransitionAlignment</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageTransitionDirection"><link linkend="PopplerPageTransitionDirection">PopplerPageTransitionDirection</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPageTransitionType"><link linkend="PopplerPageTransitionType">PopplerPageTransitionType</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPermissions"><link linkend="PopplerPermissions">PopplerPermissions</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerPSFile"><link linkend="PopplerPSFile">PopplerPSFile</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerRectangle"><link linkend="PopplerRectangle">PopplerRectangle</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerSelectionStyle"><link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link></primaryie></indexentry>
+<indexentry><primaryie linkends="PopplerViewerPreferences"><link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-ACTION--CAPS"><link linkend="POPPLER-ACTION--CAPS">POPPLER_ACTION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-action-copy"><link linkend="poppler-action-copy">poppler_action_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-action-free"><link linkend="poppler-action-free">poppler_action_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-action-get-type"><link linkend="poppler-action-get-type">poppler_action_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-action-type-get-type"><link linkend="poppler-action-type-get-type">poppler_action_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-callout-line-copy"><link linkend="poppler-annot-callout-line-copy">poppler_annot_callout_line_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-callout-line-free"><link linkend="poppler-annot-callout-line-free">poppler_annot_callout_line_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-callout-line-get-type"><link linkend="poppler-annot-callout-line-get-type">poppler_annot_callout_line_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-callout-line-new"><link linkend="poppler-annot-callout-line-new">poppler_annot_callout_line_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-external-data-type-get-type"><link linkend="poppler-annot-external-data-type-get-type">poppler_annot_external_data_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-flag-get-type"><link linkend="poppler-annot-flag-get-type">poppler_annot_flag_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-free-text-get-callout-line"><link linkend="poppler-annot-free-text-get-callout-line">poppler_annot_free_text_get_callout_line</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-free-text-get-quadding"><link linkend="poppler-annot-free-text-get-quadding">poppler_annot_free_text_get_quadding</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-free-text-get-type"><link linkend="poppler-annot-free-text-get-type">poppler_annot_free_text_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-free-text-quadding-get-type"><link linkend="poppler-annot-free-text-quadding-get-type">poppler_annot_free_text_quadding_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-annot-type"><link linkend="poppler-annot-get-annot-type">poppler_annot_get_annot_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-color"><link linkend="poppler-annot-get-color">poppler_annot_get_color</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-contents"><link linkend="poppler-annot-get-contents">poppler_annot_get_contents</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-flags"><link linkend="poppler-annot-get-flags">poppler_annot_get_flags</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-modified"><link linkend="poppler-annot-get-modified">poppler_annot_get_modified</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-name"><link linkend="poppler-annot-get-name">poppler_annot_get_name</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-get-type"><link linkend="poppler-annot-get-type">poppler_annot_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-mapping-copy"><link linkend="poppler-annot-mapping-copy">poppler_annot_mapping_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-mapping-free"><link linkend="poppler-annot-mapping-free">poppler_annot_mapping_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-mapping-get-type"><link linkend="poppler-annot-mapping-get-type">poppler_annot_mapping_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-mapping-new"><link linkend="poppler-annot-mapping-new">poppler_annot_mapping_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-date"><link linkend="poppler-annot-markup-get-date">poppler_annot_markup_get_date</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-external-data"><link linkend="poppler-annot-markup-get-external-data">poppler_annot_markup_get_external_data</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-label"><link linkend="poppler-annot-markup-get-label">poppler_annot_markup_get_label</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-opacity"><link linkend="poppler-annot-markup-get-opacity">poppler_annot_markup_get_opacity</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-popup-is-open"><link linkend="poppler-annot-markup-get-popup-is-open">poppler_annot_markup_get_popup_is_open</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-reply-to"><link linkend="poppler-annot-markup-get-reply-to">poppler_annot_markup_get_reply_to</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-subject"><link linkend="poppler-annot-markup-get-subject">poppler_annot_markup_get_subject</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-get-type"><link linkend="poppler-annot-markup-get-type">poppler_annot_markup_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-markup-reply-type-get-type"><link linkend="poppler-annot-markup-reply-type-get-type">poppler_annot_markup_reply_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-text-get-icon"><link linkend="poppler-annot-text-get-icon">poppler_annot_text_get_icon</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-text-get-is-open"><link linkend="poppler-annot-text-get-is-open">poppler_annot_text_get_is_open</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-text-get-state"><link linkend="poppler-annot-text-get-state">poppler_annot_text_get_state</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-text-get-type"><link linkend="poppler-annot-text-get-type">poppler_annot_text_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-text-state-get-type"><link linkend="poppler-annot-text-state-get-type">poppler_annot_text_state_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-annot-type-get-type"><link linkend="poppler-annot-type-get-type">poppler_annot_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-attachment-save"><link linkend="poppler-attachment-save">poppler_attachment_save</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-attachment-save-to-callback"><link linkend="poppler-attachment-save-to-callback">poppler_attachment_save_to_callback</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-backend-get-type"><link linkend="poppler-backend-get-type">poppler_backend_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-CHECK-VERSION--CAPS"><link linkend="POPPLER-CHECK-VERSION--CAPS">POPPLER_CHECK_VERSION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-dest-copy"><link linkend="poppler-dest-copy">poppler_dest_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-dest-free"><link linkend="poppler-dest-free">poppler_dest_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-dest-get-type"><link linkend="poppler-dest-get-type">poppler_dest_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-dest-type-get-type"><link linkend="poppler-dest-type-get-type">poppler_dest_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-find-dest"><link linkend="poppler-document-find-dest">poppler_document_find_dest</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-get-attachments"><link linkend="poppler-document-get-attachments">poppler_document_get_attachments</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-get-form-field"><link linkend="poppler-document-get-form-field">poppler_document_get_form_field</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-get-n-pages"><link linkend="poppler-document-get-n-pages">poppler_document_get_n_pages</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-get-page"><link linkend="poppler-document-get-page">poppler_document_get_page</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-get-page-by-label"><link linkend="poppler-document-get-page-by-label">poppler_document_get_page_by_label</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-has-attachments"><link linkend="poppler-document-has-attachments">poppler_document_has_attachments</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-new-from-data"><link linkend="poppler-document-new-from-data">poppler_document_new_from_data</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-new-from-file"><link linkend="poppler-document-new-from-file">poppler_document_new_from_file</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-document-save"><link linkend="poppler-document-save">poppler_document_save</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-ERROR--CAPS"><link linkend="POPPLER-ERROR--CAPS">POPPLER_ERROR</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-error-get-type"><link linkend="poppler-error-get-type">poppler_error_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-error-quark"><link linkend="poppler-error-quark">poppler_error_quark</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-copy"><link linkend="poppler-fonts-iter-copy">poppler_fonts_iter_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-free"><link linkend="poppler-fonts-iter-free">poppler_fonts_iter_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-get-font-type"><link linkend="poppler-fonts-iter-get-font-type">poppler_fonts_iter_get_font_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-get-full-name"><link linkend="poppler-fonts-iter-get-full-name">poppler_fonts_iter_get_full_name</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-get-name"><link linkend="poppler-fonts-iter-get-name">poppler_fonts_iter_get_name</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-get-type"><link linkend="poppler-fonts-iter-get-type">poppler_fonts_iter_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-is-embedded"><link linkend="poppler-fonts-iter-is-embedded">poppler_fonts_iter_is_embedded</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-is-subset"><link linkend="poppler-fonts-iter-is-subset">poppler_fonts_iter_is_subset</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-fonts-iter-next"><link linkend="poppler-fonts-iter-next">poppler_fonts_iter_next</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-font-info-free"><link linkend="poppler-font-info-free">poppler_font_info_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-font-info-new"><link linkend="poppler-font-info-new">poppler_font_info_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-font-info-scan"><link linkend="poppler-font-info-scan">poppler_font_info_scan</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-font-type-get-type"><link linkend="poppler-font-type-get-type">poppler_font_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-button-get-button-type"><link linkend="poppler-form-field-button-get-button-type">poppler_form_field_button_get_button_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-button-get-state"><link linkend="poppler-form-field-button-get-state">poppler_form_field_button_get_state</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-button-set-state"><link linkend="poppler-form-field-button-set-state">poppler_form_field_button_set_state</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-can-select-multiple"><link linkend="poppler-form-field-choice-can-select-multiple">poppler_form_field_choice_can_select_multiple</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-commit-on-change"><link linkend="poppler-form-field-choice-commit-on-change">poppler_form_field_choice_commit_on_change</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-do-spell-check"><link linkend="poppler-form-field-choice-do-spell-check">poppler_form_field_choice_do_spell_check</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-get-choice-type"><link linkend="poppler-form-field-choice-get-choice-type">poppler_form_field_choice_get_choice_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-get-item"><link linkend="poppler-form-field-choice-get-item">poppler_form_field_choice_get_item</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-get-n-items"><link linkend="poppler-form-field-choice-get-n-items">poppler_form_field_choice_get_n_items</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-get-text"><link linkend="poppler-form-field-choice-get-text">poppler_form_field_choice_get_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-is-editable"><link linkend="poppler-form-field-choice-is-editable">poppler_form_field_choice_is_editable</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-is-item-selected"><link linkend="poppler-form-field-choice-is-item-selected">poppler_form_field_choice_is_item_selected</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-select-item"><link linkend="poppler-form-field-choice-select-item">poppler_form_field_choice_select_item</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-set-text"><link linkend="poppler-form-field-choice-set-text">poppler_form_field_choice_set_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-toggle-item"><link linkend="poppler-form-field-choice-toggle-item">poppler_form_field_choice_toggle_item</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-choice-unselect-all"><link linkend="poppler-form-field-choice-unselect-all">poppler_form_field_choice_unselect_all</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-get-field-type"><link linkend="poppler-form-field-get-field-type">poppler_form_field_get_field_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-get-font-size"><link linkend="poppler-form-field-get-font-size">poppler_form_field_get_font_size</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-get-id"><link linkend="poppler-form-field-get-id">poppler_form_field_get_id</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-is-read-only"><link linkend="poppler-form-field-is-read-only">poppler_form_field_is_read_only</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-mapping-copy"><link linkend="poppler-form-field-mapping-copy">poppler_form_field_mapping_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-mapping-free"><link linkend="poppler-form-field-mapping-free">poppler_form_field_mapping_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-mapping-get-type"><link linkend="poppler-form-field-mapping-get-type">poppler_form_field_mapping_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-mapping-new"><link linkend="poppler-form-field-mapping-new">poppler_form_field_mapping_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-do-scroll"><link linkend="poppler-form-field-text-do-scroll">poppler_form_field_text_do_scroll</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-do-spell-check"><link linkend="poppler-form-field-text-do-spell-check">poppler_form_field_text_do_spell_check</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-get-max-len"><link linkend="poppler-form-field-text-get-max-len">poppler_form_field_text_get_max_len</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-get-text"><link linkend="poppler-form-field-text-get-text">poppler_form_field_text_get_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-get-text-type"><link linkend="poppler-form-field-text-get-text-type">poppler_form_field_text_get_text_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-is-password"><link linkend="poppler-form-field-text-is-password">poppler_form_field_text_is_password</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-is-rich-text"><link linkend="poppler-form-field-text-is-rich-text">poppler_form_field_text_is_rich_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-form-field-text-set-text"><link linkend="poppler-form-field-text-set-text">poppler_form_field_text_set_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-get-backend"><link linkend="poppler-get-backend">poppler_get_backend</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-get-version"><link linkend="poppler-get-version">poppler_get_version</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-HAS-CAIRO--CAPS"><link linkend="POPPLER-HAS-CAIRO--CAPS">POPPLER_HAS_CAIRO</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-image-mapping-copy"><link linkend="poppler-image-mapping-copy">poppler_image_mapping_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-image-mapping-free"><link linkend="poppler-image-mapping-free">poppler_image_mapping_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-image-mapping-get-type"><link linkend="poppler-image-mapping-get-type">poppler_image_mapping_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-image-mapping-new"><link linkend="poppler-image-mapping-new">poppler_image_mapping_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-copy"><link linkend="poppler-index-iter-copy">poppler_index_iter_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-free"><link linkend="poppler-index-iter-free">poppler_index_iter_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-get-action"><link linkend="poppler-index-iter-get-action">poppler_index_iter_get_action</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-get-child"><link linkend="poppler-index-iter-get-child">poppler_index_iter_get_child</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-get-type"><link linkend="poppler-index-iter-get-type">poppler_index_iter_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-is-open"><link linkend="poppler-index-iter-is-open">poppler_index_iter_is_open</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-new"><link linkend="poppler-index-iter-new">poppler_index_iter_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-index-iter-next"><link linkend="poppler-index-iter-next">poppler_index_iter_next</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-get-radio-button-group-id"><link linkend="poppler-layer-get-radio-button-group-id">poppler_layer_get_radio_button_group_id</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-get-title"><link linkend="poppler-layer-get-title">poppler_layer_get_title</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-get-type"><link linkend="poppler-layer-get-type">poppler_layer_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-hide"><link linkend="poppler-layer-hide">poppler_layer_hide</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-is-parent"><link linkend="poppler-layer-is-parent">poppler_layer_is_parent</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-is-visible"><link linkend="poppler-layer-is-visible">poppler_layer_is_visible</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-layer-show"><link linkend="poppler-layer-show">poppler_layer_show</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-link-mapping-copy"><link linkend="poppler-link-mapping-copy">poppler_link_mapping_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-link-mapping-free"><link linkend="poppler-link-mapping-free">poppler_link_mapping_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-link-mapping-get-type"><link linkend="poppler-link-mapping-get-type">poppler_link_mapping_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-link-mapping-new"><link linkend="poppler-link-mapping-new">poppler_link_mapping_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-MAJOR-VERSION--CAPS"><link linkend="POPPLER-MAJOR-VERSION--CAPS">POPPLER_MAJOR_VERSION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-MICRO-VERSION--CAPS"><link linkend="POPPLER-MICRO-VERSION--CAPS">POPPLER_MICRO_VERSION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-MINOR-VERSION--CAPS"><link linkend="POPPLER-MINOR-VERSION--CAPS">POPPLER_MINOR_VERSION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-orientation-get-type"><link linkend="poppler-orientation-get-type">poppler_orientation_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-find-text"><link linkend="poppler-page-find-text">poppler_page_find_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-free-form-field-mapping"><link linkend="poppler-page-free-form-field-mapping">poppler_page_free_form_field_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-free-image-mapping"><link linkend="poppler-page-free-image-mapping">poppler_page_free_image_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-free-link-mapping"><link linkend="poppler-page-free-link-mapping">poppler_page_free_link_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-duration"><link linkend="poppler-page-get-duration">poppler_page_get_duration</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-form-field-mapping"><link linkend="poppler-page-get-form-field-mapping">poppler_page_get_form_field_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-image-mapping"><link linkend="poppler-page-get-image-mapping">poppler_page_get_image_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-index"><link linkend="poppler-page-get-index">poppler_page_get_index</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-link-mapping"><link linkend="poppler-page-get-link-mapping">poppler_page_get_link_mapping</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-selection-region"><link linkend="poppler-page-get-selection-region">poppler_page_get_selection_region</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-size"><link linkend="poppler-page-get-size">poppler_page_get_size</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-text"><link linkend="poppler-page-get-text">poppler_page_get_text</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-thumbnail"><link linkend="poppler-page-get-thumbnail">poppler_page_get_thumbnail</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-thumbnail-size"><link linkend="poppler-page-get-thumbnail-size">poppler_page_get_thumbnail_size</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-get-transition"><link linkend="poppler-page-get-transition">poppler_page_get_transition</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-layout-get-type"><link linkend="poppler-page-layout-get-type">poppler_page_layout_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-mode-get-type"><link linkend="poppler-page-mode-get-type">poppler_page_mode_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-render"><link linkend="poppler-page-render">poppler_page_render</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-render-selection"><link linkend="poppler-page-render-selection">poppler_page_render_selection</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-render-selection-to-pixbuf"><link linkend="poppler-page-render-selection-to-pixbuf">poppler_page_render_selection_to_pixbuf</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-render-to-pixbuf"><link linkend="poppler-page-render-to-pixbuf">poppler_page_render_to_pixbuf</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-render-to-ps"><link linkend="poppler-page-render-to-ps">poppler_page_render_to_ps</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-alignment-get-type"><link linkend="poppler-page-transition-alignment-get-type">poppler_page_transition_alignment_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-copy"><link linkend="poppler-page-transition-copy">poppler_page_transition_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-direction-get-type"><link linkend="poppler-page-transition-direction-get-type">poppler_page_transition_direction_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-free"><link linkend="poppler-page-transition-free">poppler_page_transition_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-get-type"><link linkend="poppler-page-transition-get-type">poppler_page_transition_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-new"><link linkend="poppler-page-transition-new">poppler_page_transition_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-page-transition-type-get-type"><link linkend="poppler-page-transition-type-get-type">poppler_page_transition_type_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-permissions-get-type"><link linkend="poppler-permissions-get-type">poppler_permissions_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-ps-file-free"><link linkend="poppler-ps-file-free">poppler_ps_file_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-ps-file-new"><link linkend="poppler-ps-file-new">poppler_ps_file_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-ps-file-set-duplex"><link linkend="poppler-ps-file-set-duplex">poppler_ps_file_set_duplex</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-ps-file-set-paper-size"><link linkend="poppler-ps-file-set-paper-size">poppler_ps_file_set_paper_size</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-rectangle-copy"><link linkend="poppler-rectangle-copy">poppler_rectangle_copy</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-rectangle-free"><link linkend="poppler-rectangle-free">poppler_rectangle_free</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-rectangle-get-type"><link linkend="poppler-rectangle-get-type">poppler_rectangle_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-rectangle-new"><link linkend="poppler-rectangle-new">poppler_rectangle_new</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-selection-style-get-type"><link linkend="poppler-selection-style-get-type">poppler_selection_style_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-ACTION--CAPS"><link linkend="POPPLER-TYPE-ACTION--CAPS">POPPLER_TYPE_ACTION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-ACTION-TYPE--CAPS"><link linkend="POPPLER-TYPE-ACTION-TYPE--CAPS">POPPLER_TYPE_ACTION_TYPE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-BACKEND--CAPS"><link linkend="POPPLER-TYPE-BACKEND--CAPS">POPPLER_TYPE_BACKEND</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-DEST--CAPS"><link linkend="POPPLER-TYPE-DEST--CAPS">POPPLER_TYPE_DEST</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-DEST-TYPE--CAPS"><link linkend="POPPLER-TYPE-DEST-TYPE--CAPS">POPPLER_TYPE_DEST_TYPE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-ERROR--CAPS"><link linkend="POPPLER-TYPE-ERROR--CAPS">POPPLER_TYPE_ERROR</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-FONT-TYPE--CAPS"><link linkend="POPPLER-TYPE-FONT-TYPE--CAPS">POPPLER_TYPE_FONT_TYPE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS"><link linkend="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS">POPPLER_TYPE_FORM_FIELD_MAPPING</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-IMAGE-MAPPING--CAPS"><link linkend="POPPLER-TYPE-IMAGE-MAPPING--CAPS">POPPLER_TYPE_IMAGE_MAPPING</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-LINK-MAPPING--CAPS"><link linkend="POPPLER-TYPE-LINK-MAPPING--CAPS">POPPLER_TYPE_LINK_MAPPING</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-ORIENTATION--CAPS"><link linkend="POPPLER-TYPE-ORIENTATION--CAPS">POPPLER_TYPE_ORIENTATION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-LAYOUT--CAPS"><link linkend="POPPLER-TYPE-PAGE-LAYOUT--CAPS">POPPLER_TYPE_PAGE_LAYOUT</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-MODE--CAPS"><link linkend="POPPLER-TYPE-PAGE-MODE--CAPS">POPPLER_TYPE_PAGE_MODE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-TRANSITION--CAPS"><link linkend="POPPLER-TYPE-PAGE-TRANSITION--CAPS">POPPLER_TYPE_PAGE_TRANSITION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS"><link linkend="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS">POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS"><link linkend="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS">POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS"><link linkend="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS">POPPLER_TYPE_PAGE_TRANSITION_TYPE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-PERMISSIONS--CAPS"><link linkend="POPPLER-TYPE-PERMISSIONS--CAPS">POPPLER_TYPE_PERMISSIONS</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-RECTANGLE--CAPS"><link linkend="POPPLER-TYPE-RECTANGLE--CAPS">POPPLER_TYPE_RECTANGLE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-SELECTION-STYLE--CAPS"><link linkend="POPPLER-TYPE-SELECTION-STYLE--CAPS">POPPLER_TYPE_SELECTION_STYLE</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS"><link linkend="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS">POPPLER_TYPE_VIEWER_PREFERENCES</link></primaryie></indexentry>
+<indexentry><primaryie linkends="poppler-viewer-preferences-get-type"><link linkend="poppler-viewer-preferences-get-type">poppler_viewer_preferences_get_type</link></primaryie></indexentry>
+<indexentry><primaryie linkends="POPPLER-WITH-GDK--CAPS"><link linkend="POPPLER-WITH-GDK--CAPS">POPPLER_WITH_GDK</link></primaryie></indexentry>
+</indexdiv>
+</indexdiv>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-action.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-action.xml
new file mode 100644
index 00000000000..c4dfb6aa8da
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-action.xml
@@ -0,0 +1,295 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-action">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-action.top_of_page">PopplerAction</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerAction</refname>
+<refpurpose>Action links</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-action.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+enum <link linkend="PopplerActionType">PopplerActionType</link>;
+enum <link linkend="PopplerDestType">PopplerDestType</link>;
+ <link linkend="PopplerActionAny">PopplerActionAny</link>;
+ <link linkend="PopplerActionGotoDest">PopplerActionGotoDest</link>;
+ <link linkend="PopplerActionGotoRemote">PopplerActionGotoRemote</link>;
+ <link linkend="PopplerActionLaunch">PopplerActionLaunch</link>;
+ <link linkend="PopplerActionUri">PopplerActionUri</link>;
+ <link linkend="PopplerActionNamed">PopplerActionNamed</link>;
+ <link linkend="PopplerActionMovie">PopplerActionMovie</link>;
+ <link linkend="PopplerDest">PopplerDest</link>;
+union <link linkend="PopplerAction">PopplerAction</link>;
+#define <link linkend="POPPLER-TYPE-ACTION--CAPS">POPPLER_TYPE_ACTION</link>
+#define <link linkend="POPPLER-ACTION--CAPS">POPPLER_ACTION</link> (obj)
+<link linkend="GType">GType</link> <link linkend="poppler-action-get-type">poppler_action_get_type</link> (void);
+<link linkend="PopplerAction">PopplerAction</link> * <link linkend="poppler-action-copy">poppler_action_copy</link> (<link linkend="PopplerAction">PopplerAction</link> *action);
+<link linkend="void">void</link> <link linkend="poppler-action-free">poppler_action_free</link> (<link linkend="PopplerAction">PopplerAction</link> *action);
+#define <link linkend="POPPLER-TYPE-DEST--CAPS">POPPLER_TYPE_DEST</link>
+<link linkend="GType">GType</link> <link linkend="poppler-dest-get-type">poppler_dest_get_type</link> (void);
+<link linkend="PopplerDest">PopplerDest</link> * <link linkend="poppler-dest-copy">poppler_dest_copy</link> (<link linkend="PopplerDest">PopplerDest</link> *dest);
+<link linkend="void">void</link> <link linkend="poppler-dest-free">poppler_dest_free</link> (<link linkend="PopplerDest">PopplerDest</link> *dest);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-action.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-action.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerActionType" role="enum">
+<title>enum PopplerActionType</title>
+<indexterm zone="PopplerActionType"><primary sortas="PopplerActionType">PopplerActionType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_ACTION_UNKNOWN, /* unknown action */
+ POPPLER_ACTION_NONE, /* no action specified */
+ POPPLER_ACTION_GOTO_DEST, /* go to destination */
+ POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
+ POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
+ POPPLER_ACTION_URI, /* URI */
+ POPPLER_ACTION_NAMED, /* named action*/
+ POPPLER_ACTION_MOVIE /* movie action */
+} PopplerActionType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerDestType" role="enum">
+<title>enum PopplerDestType</title>
+<indexterm zone="PopplerDestType"><primary sortas="PopplerDestType">PopplerDestType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_DEST_UNKNOWN,
+ POPPLER_DEST_XYZ,
+ POPPLER_DEST_FIT,
+ POPPLER_DEST_FITH,
+ POPPLER_DEST_FITV,
+ POPPLER_DEST_FITR,
+ POPPLER_DEST_FITB,
+ POPPLER_DEST_FITBH,
+ POPPLER_DEST_FITBV,
+ POPPLER_DEST_NAMED
+} PopplerDestType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionAny" role="struct">
+<title>PopplerActionAny</title>
+<indexterm zone="PopplerActionAny"><primary sortas="PopplerActionAny">PopplerActionAny</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+} PopplerActionAny;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionGotoDest" role="struct">
+<title>PopplerActionGotoDest</title>
+<indexterm zone="PopplerActionGotoDest"><primary sortas="PopplerActionGotoDest">PopplerActionGotoDest</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ PopplerDest *dest;
+} PopplerActionGotoDest;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionGotoRemote" role="struct">
+<title>PopplerActionGotoRemote</title>
+<indexterm zone="PopplerActionGotoRemote"><primary sortas="PopplerActionGotoRemote">PopplerActionGotoRemote</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ PopplerDest *dest;
+} PopplerActionGotoRemote;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionLaunch" role="struct">
+<title>PopplerActionLaunch</title>
+<indexterm zone="PopplerActionLaunch"><primary sortas="PopplerActionLaunch">PopplerActionLaunch</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *file_name;
+ gchar *params;
+} PopplerActionLaunch;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionUri" role="struct">
+<title>PopplerActionUri</title>
+<indexterm zone="PopplerActionUri"><primary sortas="PopplerActionUri">PopplerActionUri</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ char *uri;
+} PopplerActionUri;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionNamed" role="struct">
+<title>PopplerActionNamed</title>
+<indexterm zone="PopplerActionNamed"><primary sortas="PopplerActionNamed">PopplerActionNamed</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+
+ gchar *named_dest;
+} PopplerActionNamed;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerActionMovie" role="struct">
+<title>PopplerActionMovie</title>
+<indexterm zone="PopplerActionMovie"><primary sortas="PopplerActionMovie">PopplerActionMovie</primary></indexterm><programlisting>typedef struct {
+ PopplerActionType type;
+ gchar *title;
+} PopplerActionMovie;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerDest" role="struct">
+<title>PopplerDest</title>
+<indexterm zone="PopplerDest"><primary sortas="PopplerDest">PopplerDest</primary></indexterm><programlisting>typedef struct {
+ PopplerDestType type;
+
+ int page_num;
+ double left;
+ double bottom;
+ double right;
+ double top;
+ double zoom;
+ gchar *named_dest;
+ guint change_left : 1;
+ guint change_top : 1;
+ guint change_zoom : 1;
+} PopplerDest;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerAction" role="union">
+<title>union PopplerAction</title>
+<indexterm zone="PopplerAction"><primary sortas="PopplerAction">PopplerAction</primary></indexterm><programlisting>union PopplerAction
+{
+ PopplerActionType type;
+ PopplerActionAny any;
+ PopplerActionGotoDest goto_dest;
+ PopplerActionGotoRemote goto_remote;
+ PopplerActionLaunch launch;
+ PopplerActionUri uri;
+ PopplerActionNamed named;
+ PopplerActionMovie movie;
+};
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="POPPLER-TYPE-ACTION--CAPS" role="macro">
+<title>POPPLER_TYPE_ACTION</title>
+<indexterm zone="POPPLER-TYPE-ACTION--CAPS"><primary sortas="POPPLER_TYPE_ACTION">POPPLER_TYPE_ACTION</primary></indexterm><programlisting>#define POPPLER_TYPE_ACTION (poppler_action_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="POPPLER-ACTION--CAPS" role="macro">
+<title>POPPLER_ACTION()</title>
+<indexterm zone="POPPLER-ACTION--CAPS"><primary sortas="POPPLER_ACTION">POPPLER_ACTION</primary></indexterm><programlisting>#define POPPLER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ACTION, PopplerAction))
+</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>obj</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-action-get-type" role="function">
+<title>poppler_action_get_type ()</title>
+<indexterm zone="poppler-action-get-type"><primary sortas="poppler_action_get_type">poppler_action_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_action_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-action-copy" role="function">
+<title>poppler_action_copy ()</title>
+<indexterm zone="poppler-action-copy"><primary sortas="poppler_action_copy">poppler_action_copy</primary></indexterm><programlisting><link linkend="PopplerAction">PopplerAction</link> * poppler_action_copy (<link linkend="PopplerAction">PopplerAction</link> *action);</programlisting>
+<para>
+Copies <parameter>action</parameter>, creating an identical <link linkend="PopplerAction"><type>PopplerAction</type></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>action</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAction"><type>PopplerAction</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new action identical to <parameter>action</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-action-free" role="function">
+<title>poppler_action_free ()</title>
+<indexterm zone="poppler-action-free"><primary sortas="poppler_action_free">poppler_action_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_action_free (<link linkend="PopplerAction">PopplerAction</link> *action);</programlisting>
+<para>
+Frees <parameter>action</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>action</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAction"><type>PopplerAction</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-DEST--CAPS" role="macro">
+<title>POPPLER_TYPE_DEST</title>
+<indexterm zone="POPPLER-TYPE-DEST--CAPS"><primary sortas="POPPLER_TYPE_DEST">POPPLER_TYPE_DEST</primary></indexterm><programlisting>#define POPPLER_TYPE_DEST (poppler_dest_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-dest-get-type" role="function">
+<title>poppler_dest_get_type ()</title>
+<indexterm zone="poppler-dest-get-type"><primary sortas="poppler_dest_get_type">poppler_dest_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_dest_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-dest-copy" role="function">
+<title>poppler_dest_copy ()</title>
+<indexterm zone="poppler-dest-copy"><primary sortas="poppler_dest_copy">poppler_dest_copy</primary></indexterm><programlisting><link linkend="PopplerDest">PopplerDest</link> * poppler_dest_copy (<link linkend="PopplerDest">PopplerDest</link> *dest);</programlisting>
+<para>
+Copies <parameter>dest</parameter>, creating an identical <link linkend="PopplerDest"><type>PopplerDest</type></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>dest</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDest"><type>PopplerDest</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new destination identical to <parameter>dest</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-dest-free" role="function">
+<title>poppler_dest_free ()</title>
+<indexterm zone="poppler-dest-free"><primary sortas="poppler_dest_free">poppler_dest_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_dest_free (<link linkend="PopplerDest">PopplerDest</link> *dest);</programlisting>
+<para>
+Frees <parameter>dest</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>dest</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDest"><type>PopplerDest</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-annot.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-annot.xml
new file mode 100644
index 00000000000..555535b15c3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-annot.xml
@@ -0,0 +1,511 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-annot">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-annot.top_of_page">PopplerAnnot</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerAnnot</refname>
+<refpurpose>Annotations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-annot.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+ <link linkend="PopplerAnnot">PopplerAnnot</link>;
+<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * <link linkend="poppler-annot-callout-line-copy">poppler_annot_callout_line_copy</link>
+ (<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> *callout);
+<link linkend="void">void</link> <link linkend="poppler-annot-callout-line-free">poppler_annot_callout_line_free</link> (<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> *callout);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-callout-line-get-type">poppler_annot_callout_line_get_type</link> (void);
+<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * <link linkend="poppler-annot-callout-line-new">poppler_annot_callout_line_new</link>
+ (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-external-data-type-get-type">poppler_annot_external_data_type_get_type</link>
+ (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-flag-get-type">poppler_annot_flag_get_type</link> (void);
+<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * <link linkend="poppler-annot-free-text-get-callout-line">poppler_annot_free_text_get_callout_line</link>
+ (<link linkend="PopplerAnnotFreeText">PopplerAnnotFreeText</link> *poppler_annot);
+<link linkend="PopplerAnnotFreeTextQuadding">PopplerAnnotFreeTextQuadding</link> <link linkend="poppler-annot-free-text-get-quadding">poppler_annot_free_text_get_quadding</link>
+ (<link linkend="PopplerAnnotFreeText">PopplerAnnotFreeText</link> *poppler_annot);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-free-text-get-type">poppler_annot_free_text_get_type</link> (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-free-text-quadding-get-type">poppler_annot_free_text_quadding_get_type</link>
+ (void);
+<link linkend="PopplerAnnotType">PopplerAnnotType</link> <link linkend="poppler-annot-get-annot-type">poppler_annot_get_annot_type</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="PopplerColor">PopplerColor</link> * <link linkend="poppler-annot-get-color">poppler_annot_get_color</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-get-contents">poppler_annot_get_contents</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="PopplerAnnotFlag">PopplerAnnotFlag</link> <link linkend="poppler-annot-get-flags">poppler_annot_get_flags</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-get-modified">poppler_annot_get_modified</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-get-name">poppler_annot_get_name</link> (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-get-type">poppler_annot_get_type</link> (void);
+<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> * <link linkend="poppler-annot-mapping-copy">poppler_annot_mapping_copy</link> (<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> *mapping);
+<link linkend="void">void</link> <link linkend="poppler-annot-mapping-free">poppler_annot_mapping_free</link> (<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> *mapping);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-mapping-get-type">poppler_annot_mapping_get_type</link> (void);
+<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> * <link linkend="poppler-annot-mapping-new">poppler_annot_mapping_new</link> (void);
+<link linkend="GDate">GDate</link> * <link linkend="poppler-annot-markup-get-date">poppler_annot_markup_get_date</link> (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="PopplerAnnotExternalDataType">PopplerAnnotExternalDataType</link> <link linkend="poppler-annot-markup-get-external-data">poppler_annot_markup_get_external_data</link>
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-markup-get-label">poppler_annot_markup_get_label</link> (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="gdouble">gdouble</link> <link linkend="poppler-annot-markup-get-opacity">poppler_annot_markup_get_opacity</link> (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-annot-markup-get-popup-is-open">poppler_annot_markup_get_popup_is_open</link>
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="PopplerAnnotMarkupReplyType">PopplerAnnotMarkupReplyType</link> <link linkend="poppler-annot-markup-get-reply-to">poppler_annot_markup_get_reply_to</link>
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-markup-get-subject">poppler_annot_markup_get_subject</link> (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-markup-get-type">poppler_annot_markup_get_type</link> (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-markup-reply-type-get-type">poppler_annot_markup_reply_type_get_type</link>
+ (void);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-annot-text-get-icon">poppler_annot_text_get_icon</link> (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-annot-text-get-is-open">poppler_annot_text_get_is_open</link> (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);
+<link linkend="PopplerAnnotTextState">PopplerAnnotTextState</link> <link linkend="poppler-annot-text-get-state">poppler_annot_text_get_state</link> (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-text-get-type">poppler_annot_text_get_type</link> (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-text-state-get-type">poppler_annot_text_state_get_type</link> (void);
+<link linkend="GType">GType</link> <link linkend="poppler-annot-type-get-type">poppler_annot_type_get_type</link> (void);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-annot.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-annot.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerAnnot" role="struct">
+<title>PopplerAnnot</title>
+<indexterm zone="PopplerAnnot"><primary sortas="PopplerAnnot">PopplerAnnot</primary></indexterm><programlisting>typedef struct _PopplerAnnot PopplerAnnot;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-annot-callout-line-copy" role="function">
+<title>poppler_annot_callout_line_copy ()</title>
+<indexterm zone="poppler-annot-callout-line-copy"><primary sortas="poppler_annot_callout_line_copy">poppler_annot_callout_line_copy</primary></indexterm><programlisting><link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * poppler_annot_callout_line_copy
+ (<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> *callout);</programlisting>
+<para>
+It does copy <parameter>callout</parameter> to a new <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>callout</parameter>&#160;:</term>
+<listitem><simpara> the <link linkend="PopplerAnnotCalloutline"><type>PopplerAnnotCalloutline</type></link> to be copied.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link> as exact copy of
+ <parameter>callout</parameter>, NULL in other case. It must be freed when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-callout-line-free" role="function">
+<title>poppler_annot_callout_line_free ()</title>
+<indexterm zone="poppler-annot-callout-line-free"><primary sortas="poppler_annot_callout_line_free">poppler_annot_callout_line_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_annot_callout_line_free (<link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> *callout);</programlisting>
+<para>
+Frees the memory used by <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>callout</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-callout-line-get-type" role="function">
+<title>poppler_annot_callout_line_get_type ()</title>
+<indexterm zone="poppler-annot-callout-line-get-type"><primary sortas="poppler_annot_callout_line_get_type">poppler_annot_callout_line_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_callout_line_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-callout-line-new" role="function">
+<title>poppler_annot_callout_line_new ()</title>
+<indexterm zone="poppler-annot-callout-line-new"><primary sortas="poppler_annot_callout_line_new">poppler_annot_callout_line_new</primary></indexterm><programlisting><link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * poppler_annot_callout_line_new
+ (void);</programlisting>
+<para>
+Creates a new empty <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated <link linkend="PopplerAnnotCalloutLine"><type>PopplerAnnotCalloutLine</type></link>, NULL in other case.
+ It must be freed when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-external-data-type-get-type" role="function">
+<title>poppler_annot_external_data_type_get_type ()</title>
+<indexterm zone="poppler-annot-external-data-type-get-type"><primary sortas="poppler_annot_external_data_type_get_type">poppler_annot_external_data_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_external_data_type_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-flag-get-type" role="function">
+<title>poppler_annot_flag_get_type ()</title>
+<indexterm zone="poppler-annot-flag-get-type"><primary sortas="poppler_annot_flag_get_type">poppler_annot_flag_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_flag_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-free-text-get-callout-line" role="function">
+<title>poppler_annot_free_text_get_callout_line ()</title>
+<indexterm zone="poppler-annot-free-text-get-callout-line"><primary sortas="poppler_annot_free_text_get_callout_line">poppler_annot_free_text_get_callout_line</primary></indexterm><programlisting><link linkend="PopplerAnnotCalloutLine">PopplerAnnotCalloutLine</link> * poppler_annot_free_text_get_callout_line
+ (<link linkend="PopplerAnnotFreeText">PopplerAnnotFreeText</link> *poppler_annot);</programlisting>
+<para>
+Retrieves a <link linkend="PopplerCalloutLine"><type>PopplerCalloutLine</type></link> of four or six numbers specifying a callout
+line attached to the <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotFreeText"><type>PopplerAnnotFreeText</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated <link linkend="PopplerCalloutLine"><type>PopplerCalloutLine</type></link> if the annot has a callout
+ line, NULL in other case. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when
+ done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-free-text-get-quadding" role="function">
+<title>poppler_annot_free_text_get_quadding ()</title>
+<indexterm zone="poppler-annot-free-text-get-quadding"><primary sortas="poppler_annot_free_text_get_quadding">poppler_annot_free_text_get_quadding</primary></indexterm><programlisting><link linkend="PopplerAnnotFreeTextQuadding">PopplerAnnotFreeTextQuadding</link> poppler_annot_free_text_get_quadding
+ (<link linkend="PopplerAnnotFreeText">PopplerAnnotFreeText</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the justification of the text of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotFreeText"><type>PopplerAnnotFreeText</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotFreeTextQuadding"><type>PopplerAnnotFreeTextQuadding</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-free-text-get-type" role="function">
+<title>poppler_annot_free_text_get_type ()</title>
+<indexterm zone="poppler-annot-free-text-get-type"><primary sortas="poppler_annot_free_text_get_type">poppler_annot_free_text_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_free_text_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-free-text-quadding-get-type" role="function">
+<title>poppler_annot_free_text_quadding_get_type ()</title>
+<indexterm zone="poppler-annot-free-text-quadding-get-type"><primary sortas="poppler_annot_free_text_quadding_get_type">poppler_annot_free_text_quadding_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_free_text_quadding_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-annot-type" role="function">
+<title>poppler_annot_get_annot_type ()</title>
+<indexterm zone="poppler-annot-get-annot-type"><primary sortas="poppler_annot_get_annot_type">poppler_annot_get_annot_type</primary></indexterm><programlisting><link linkend="PopplerAnnotType">PopplerAnnotType</link> poppler_annot_get_annot_type (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Gets the type of <parameter>poppler_annot</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotType"><type>PopplerAnnotType</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-color" role="function">
+<title>poppler_annot_get_color ()</title>
+<indexterm zone="poppler-annot-get-color"><primary sortas="poppler_annot_get_color">poppler_annot_get_color</primary></indexterm><programlisting><link linkend="PopplerColor">PopplerColor</link> * poppler_annot_get_color (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the color of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated <link linkend="PopplerColor"><type>PopplerColor</type></link> with the color values of
+ <parameter>poppler_annot</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-contents" role="function">
+<title>poppler_annot_get_contents ()</title>
+<indexterm zone="poppler-annot-get-contents"><primary sortas="poppler_annot_get_contents">poppler_annot_get_contents</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_get_contents (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the contents of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string with the contents of <parameter>poppler_annot</parameter>. It
+ must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-flags" role="function">
+<title>poppler_annot_get_flags ()</title>
+<indexterm zone="poppler-annot-get-flags"><primary sortas="poppler_annot_get_flags">poppler_annot_get_flags</primary></indexterm><programlisting><link linkend="PopplerAnnotFlag">PopplerAnnotFlag</link> poppler_annot_get_flags (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the flag field specifying various characteristics of the
+<parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the flag field of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-modified" role="function">
+<title>poppler_annot_get_modified ()</title>
+<indexterm zone="poppler-annot-get-modified"><primary sortas="poppler_annot_get_modified">poppler_annot_get_modified</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_get_modified (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the last modification data of <parameter>poppler_annot</parameter>. The returned
+string will be either a PDF format date or a text string.
+See also #<link linkend="poppler-date-parse"><function>poppler_date_parse()</function></link></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string with the last modification data of
+ <parameter>poppler_annot</parameter>. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-name" role="function">
+<title>poppler_annot_get_name ()</title>
+<indexterm zone="poppler-annot-get-name"><primary sortas="poppler_annot_get_name">poppler_annot_get_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_get_name (<link linkend="PopplerAnnot">PopplerAnnot</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the name of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnot"><type>PopplerAnnot</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string with the name of <parameter>poppler_annot</parameter>. It must
+ be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-get-type" role="function">
+<title>poppler_annot_get_type ()</title>
+<indexterm zone="poppler-annot-get-type"><primary sortas="poppler_annot_get_type">poppler_annot_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-mapping-copy" role="function">
+<title>poppler_annot_mapping_copy ()</title>
+<indexterm zone="poppler-annot-mapping-copy"><primary sortas="poppler_annot_mapping_copy">poppler_annot_mapping_copy</primary></indexterm><programlisting><link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> * poppler_annot_mapping_copy (<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-mapping-free" role="function">
+<title>poppler_annot_mapping_free ()</title>
+<indexterm zone="poppler-annot-mapping-free"><primary sortas="poppler_annot_mapping_free">poppler_annot_mapping_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_annot_mapping_free (<link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-mapping-get-type" role="function">
+<title>poppler_annot_mapping_get_type ()</title>
+<indexterm zone="poppler-annot-mapping-get-type"><primary sortas="poppler_annot_mapping_get_type">poppler_annot_mapping_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_mapping_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-mapping-new" role="function">
+<title>poppler_annot_mapping_new ()</title>
+<indexterm zone="poppler-annot-mapping-new"><primary sortas="poppler_annot_mapping_new">poppler_annot_mapping_new</primary></indexterm><programlisting><link linkend="PopplerAnnotMapping">PopplerAnnotMapping</link> * poppler_annot_mapping_new (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-date" role="function">
+<title>poppler_annot_markup_get_date ()</title>
+<indexterm zone="poppler-annot-markup-get-date"><primary sortas="poppler_annot_markup_get_date">poppler_annot_markup_get_date</primary></indexterm><programlisting><link linkend="GDate">GDate</link> * poppler_annot_markup_get_date (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-external-data" role="function">
+<title>poppler_annot_markup_get_external_data ()</title>
+<indexterm zone="poppler-annot-markup-get-external-data"><primary sortas="poppler_annot_markup_get_external_data">poppler_annot_markup_get_external_data</primary></indexterm><programlisting><link linkend="PopplerAnnotExternalDataType">PopplerAnnotExternalDataType</link> poppler_annot_markup_get_external_data
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Gets the external data type of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotExternalDataType"><type>PopplerAnnotExternalDataType</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-label" role="function">
+<title>poppler_annot_markup_get_label ()</title>
+<indexterm zone="poppler-annot-markup-get-label"><primary sortas="poppler_annot_markup_get_label">poppler_annot_markup_get_label</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_markup_get_label (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the label text of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the label text of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-opacity" role="function">
+<title>poppler_annot_markup_get_opacity ()</title>
+<indexterm zone="poppler-annot-markup-get-opacity"><primary sortas="poppler_annot_markup_get_opacity">poppler_annot_markup_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> poppler_annot_markup_get_opacity (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the opacity value of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the opacity value of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-popup-is-open" role="function">
+<title>poppler_annot_markup_get_popup_is_open ()</title>
+<indexterm zone="poppler-annot-markup-get-popup-is-open"><primary sortas="poppler_annot_markup_get_popup_is_open">poppler_annot_markup_get_popup_is_open</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_annot_markup_get_popup_is_open
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the state of the popup annot related to <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the state of <parameter>poppler_annot</parameter>. <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if it's open, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> in
+ other case.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-reply-to" role="function">
+<title>poppler_annot_markup_get_reply_to ()</title>
+<indexterm zone="poppler-annot-markup-get-reply-to"><primary sortas="poppler_annot_markup_get_reply_to">poppler_annot_markup_get_reply_to</primary></indexterm><programlisting><link linkend="PopplerAnnotMarkupReplyType">PopplerAnnotMarkupReplyType</link> poppler_annot_markup_get_reply_to
+ (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Gets the reply type of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotMarkupReplyType"><type>PopplerAnnotMarkupReplyType</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-subject" role="function">
+<title>poppler_annot_markup_get_subject ()</title>
+<indexterm zone="poppler-annot-markup-get-subject"><primary sortas="poppler_annot_markup_get_subject">poppler_annot_markup_get_subject</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_markup_get_subject (<link linkend="PopplerAnnotMarkup">PopplerAnnotMarkup</link> *poppler_annot);</programlisting>
+<para>
+Retrives the subject text of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotMarkup"><type>PopplerAnnotMarkup</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the subject text of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-get-type" role="function">
+<title>poppler_annot_markup_get_type ()</title>
+<indexterm zone="poppler-annot-markup-get-type"><primary sortas="poppler_annot_markup_get_type">poppler_annot_markup_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_markup_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-markup-reply-type-get-type" role="function">
+<title>poppler_annot_markup_reply_type_get_type ()</title>
+<indexterm zone="poppler-annot-markup-reply-type-get-type"><primary sortas="poppler_annot_markup_reply_type_get_type">poppler_annot_markup_reply_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_markup_reply_type_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-text-get-icon" role="function">
+<title>poppler_annot_text_get_icon ()</title>
+<indexterm zone="poppler-annot-text-get-icon"><primary sortas="poppler_annot_text_get_icon">poppler_annot_text_get_icon</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_annot_text_get_icon (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);</programlisting>
+<para>
+Gets the icon type of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotText"><type>PopplerAnnotText</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotTextIcon"><type>PopplerAnnotTextIcon</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-text-get-is-open" role="function">
+<title>poppler_annot_text_get_is_open ()</title>
+<indexterm zone="poppler-annot-text-get-is-open"><primary sortas="poppler_annot_text_get_is_open">poppler_annot_text_get_is_open</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_annot_text_get_is_open (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the state of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotText"><type>PopplerAnnotText</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the state of <parameter>poppler_annot</parameter>. <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if it's open, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> in
+ other case.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-text-get-state" role="function">
+<title>poppler_annot_text_get_state ()</title>
+<indexterm zone="poppler-annot-text-get-state"><primary sortas="poppler_annot_text_get_state">poppler_annot_text_get_state</primary></indexterm><programlisting><link linkend="PopplerAnnotTextState">PopplerAnnotTextState</link> poppler_annot_text_get_state (<link linkend="PopplerAnnotText">PopplerAnnotText</link> *poppler_annot);</programlisting>
+<para>
+Retrieves the state of <parameter>poppler_annot</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>poppler_annot</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerAnnotText"><type>PopplerAnnotText</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerAnnotTextState"><type>PopplerAnnotTextState</type></link> of <parameter>poppler_annot</parameter>.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-text-get-type" role="function">
+<title>poppler_annot_text_get_type ()</title>
+<indexterm zone="poppler-annot-text-get-type"><primary sortas="poppler_annot_text_get_type">poppler_annot_text_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_text_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-text-state-get-type" role="function">
+<title>poppler_annot_text_state_get_type ()</title>
+<indexterm zone="poppler-annot-text-state-get-type"><primary sortas="poppler_annot_text_state_get_type">poppler_annot_text_state_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_text_state_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-annot-type-get-type" role="function">
+<title>poppler_annot_type_get_type ()</title>
+<indexterm zone="poppler-annot-type-get-type"><primary sortas="poppler_annot_type_get_type">poppler_annot_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_annot_type_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-attachment.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-attachment.xml
new file mode 100644
index 00000000000..61aa9f8e4b6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-attachment.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-attachment">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-attachment.top_of_page">PopplerAttachment</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerAttachment</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-attachment.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+<anchor id="PopplerAttachment"/>
+<synopsis>
+ <link linkend="PopplerAttachment-struct">PopplerAttachment</link>;
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-attachment-save">poppler_attachment_save</link> (<link linkend="PopplerAttachment">PopplerAttachment</link> *attachment,
+ const <link linkend="char">char</link> *filename,
+ <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-attachment-save-to-callback">poppler_attachment_save_to_callback</link> (<link linkend="PopplerAttachment">PopplerAttachment</link> *attachment,
+ <link linkend="PopplerAttachmentSaveFunc">PopplerAttachmentSaveFunc</link> save_func,
+ <link linkend="gpointer">gpointer</link> user_data,
+ <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link> (<link linkend="PopplerAttachmentSaveFunc">*PopplerAttachmentSaveFunc</link>) (const <link linkend="gchar">gchar</link> *buf,
+ <link linkend="gsize">gsize</link> count,
+ <link linkend="gpointer">gpointer</link> data,
+ <link linkend="GError">GError</link> **error);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-attachment.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-attachment.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerAttachment-struct" role="struct">
+<title>PopplerAttachment</title>
+<indexterm zone="PopplerAttachment-struct"><primary sortas="PopplerAttachment">PopplerAttachment</primary></indexterm><programlisting>typedef struct _PopplerAttachment PopplerAttachment;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-attachment-save" role="function">
+<title>poppler_attachment_save ()</title>
+<indexterm zone="poppler-attachment-save"><primary sortas="poppler_attachment_save">poppler_attachment_save</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_attachment_save (<link linkend="PopplerAttachment">PopplerAttachment</link> *attachment,
+ const <link linkend="char">char</link> *filename,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Saves <parameter>attachment</parameter> to a file indicated by <parameter>filename</parameter>. If <parameter>error</parameter> is set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
+will be returned. Possible errors include those in the <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link> domain
+and whatever the save function generates.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>attachment</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerAttachment"><type>PopplerAttachment</type></link>.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&#160;:</term>
+<listitem><simpara> name of file to save
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara> return location for error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if the file successfully saved
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-attachment-save-to-callback" role="function">
+<title>poppler_attachment_save_to_callback ()</title>
+<indexterm zone="poppler-attachment-save-to-callback"><primary sortas="poppler_attachment_save_to_callback">poppler_attachment_save_to_callback</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_attachment_save_to_callback (<link linkend="PopplerAttachment">PopplerAttachment</link> *attachment,
+ <link linkend="PopplerAttachmentSaveFunc">PopplerAttachmentSaveFunc</link> save_func,
+ <link linkend="gpointer">gpointer</link> user_data,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Saves <parameter>attachment</parameter> by feeding the produced data to <parameter>save_func</parameter>. Can be used
+when you want to store the attachment to something other than a file, such as
+an in-memory buffer or a socket. If <parameter>error</parameter> is set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> will be
+returned. Possible errors include those in the <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link> domain and
+whatever the save function generates.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>attachment</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerAttachment"><type>PopplerAttachment</type></link>.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>save_func</parameter>&#160;:</term>
+<listitem><simpara> a function that is called to save each block of data that the save routine generates.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
+<listitem><simpara> user data to pass to the save function.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara> return location for error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if the save successfully completed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="PopplerAttachmentSaveFunc" role="function">
+<title>PopplerAttachmentSaveFunc ()</title>
+<indexterm zone="PopplerAttachmentSaveFunc"><primary sortas="PopplerAttachmentSaveFunc">PopplerAttachmentSaveFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*PopplerAttachmentSaveFunc) (const <link linkend="gchar">gchar</link> *buf,
+ <link linkend="gsize">gsize</link> count,
+ <link linkend="gpointer">gpointer</link> data,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Specifies the type of the function passed to
+<link linkend="poppler-attachment-save-to-callback"><function>poppler_attachment_save_to_callback()</function></link>. It is called once for each block of
+bytes that is "written" by <link linkend="poppler-attachment-save-to-callback"><function>poppler_attachment_save_to_callback()</function></link>. If
+successful it should return <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>. If an error occurs it should set
+<parameter>error</parameter> and return <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>, in which case <link linkend="poppler-attachment-save-to-callback"><function>poppler_attachment_save_to_callback()</function></link>
+will fail with the same error.
+</para><variablelist role="params">
+<varlistentry><term><parameter>buf</parameter>&#160;:</term>
+<listitem><simpara>buffer containing bytes to be written.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>count</parameter>&#160;:</term>
+<listitem><simpara>number of bytes in <parameter>buf</parameter>.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>data</parameter>&#160;:</term>
+<listitem><simpara>A location to return an error.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara>user data passed to <link linkend="poppler-attachment-save-to-callback"><function>poppler_attachment_save_to_callback()</function></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>%TRUE if successful, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> (with <parameter>error</parameter> set) if failed.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-document.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-document.xml
new file mode 100644
index 00000000000..2da4c7686ed
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-document.xml
@@ -0,0 +1,722 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-document">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-document.top_of_page">PopplerDocument</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerDocument</refname>
+<refpurpose>Information about a document</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-document.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+enum <link linkend="PopplerPageLayout">PopplerPageLayout</link>;
+enum <link linkend="PopplerPageMode">PopplerPageMode</link>;
+enum <link linkend="PopplerFontType">PopplerFontType</link>;
+enum <link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link>;
+enum <link linkend="PopplerPermissions">PopplerPermissions</link>;
+<link linkend="PopplerDocument">PopplerDocument</link> * <link linkend="poppler-document-new-from-file">poppler_document_new_from_file</link> (const <link linkend="char">char</link> *uri,
+ const <link linkend="char">char</link> *password,
+ <link linkend="GError">GError</link> **error);
+<link linkend="PopplerDocument">PopplerDocument</link> * <link linkend="poppler-document-new-from-data">poppler_document_new_from_data</link> (<link linkend="char">char</link> *data,
+ <link linkend="int">int</link> length,
+ const <link linkend="char">char</link> *password,
+ <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-document-save">poppler_document_save</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *uri,
+ <link linkend="GError">GError</link> **error);
+<link linkend="int">int</link> <link linkend="poppler-document-get-n-pages">poppler_document_get_n_pages</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document);
+<link linkend="PopplerPage">PopplerPage</link> * <link linkend="poppler-document-get-page">poppler_document_get_page</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ <link linkend="int">int</link> index);
+<link linkend="PopplerPage">PopplerPage</link> * <link linkend="poppler-document-get-page-by-label">poppler_document_get_page_by_label</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *label);
+<link linkend="PopplerDest">PopplerDest</link> * <link linkend="poppler-document-find-dest">poppler_document_find_dest</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="gchar">gchar</link> *link_name);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-document-has-attachments">poppler_document_has_attachments</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document);
+<link linkend="GList">GList</link> * <link linkend="poppler-document-get-attachments">poppler_document_get_attachments</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document);
+<link linkend="PopplerFormField">PopplerFormField</link> * <link linkend="poppler-document-get-form-field">poppler_document_get_form_field</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ <link linkend="gint">gint</link> id);
+<link linkend="GType">GType</link> <link linkend="poppler-index-iter-get-type">poppler_index_iter_get_type</link> (void);
+<link linkend="PopplerIndexIter">PopplerIndexIter</link> * <link linkend="poppler-index-iter-new">poppler_index_iter_new</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document);
+<link linkend="PopplerIndexIter">PopplerIndexIter</link> * <link linkend="poppler-index-iter-copy">poppler_index_iter_copy</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);
+<link linkend="void">void</link> <link linkend="poppler-index-iter-free">poppler_index_iter_free</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);
+<link linkend="PopplerIndexIter">PopplerIndexIter</link> * <link linkend="poppler-index-iter-get-child">poppler_index_iter_get_child</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *parent);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-index-iter-is-open">poppler_index_iter_is_open</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);
+<link linkend="PopplerAction">PopplerAction</link> * <link linkend="poppler-index-iter-get-action">poppler_index_iter_get_action</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-index-iter-next">poppler_index_iter_next</link> (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);
+<link linkend="PopplerFontInfo">PopplerFontInfo</link> * <link linkend="poppler-font-info-new">poppler_font_info_new</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-font-info-scan">poppler_font_info_scan</link> (<link linkend="PopplerFontInfo">PopplerFontInfo</link> *font_info,
+ <link linkend="int">int</link> n_pages,
+ <link linkend="PopplerFontsIter">PopplerFontsIter</link> **iter);
+<link linkend="void">void</link> <link linkend="poppler-font-info-free">poppler_font_info_free</link> (<link linkend="PopplerFontInfo">PopplerFontInfo</link> *font_info);
+<link linkend="GType">GType</link> <link linkend="poppler-fonts-iter-get-type">poppler_fonts_iter_get_type</link> (void);
+<link linkend="PopplerFontsIter">PopplerFontsIter</link> * <link linkend="poppler-fonts-iter-copy">poppler_fonts_iter_copy</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="void">void</link> <link linkend="poppler-fonts-iter-free">poppler_fonts_iter_free</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+const <link linkend="char">char</link> * <link linkend="poppler-fonts-iter-get-name">poppler_fonts_iter_get_name</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+const <link linkend="char">char</link> * <link linkend="poppler-fonts-iter-get-full-name">poppler_fonts_iter_get_full_name</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="PopplerFontType">PopplerFontType</link> <link linkend="poppler-fonts-iter-get-font-type">poppler_fonts_iter_get_font_type</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-fonts-iter-is-embedded">poppler_fonts_iter_is_embedded</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-fonts-iter-is-subset">poppler_fonts_iter_is_subset</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-fonts-iter-next">poppler_fonts_iter_next</link> (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);
+<link linkend="PopplerPSFile">PopplerPSFile</link> * <link linkend="poppler-ps-file-new">poppler_ps_file_new</link> (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *filename,
+ <link linkend="int">int</link> first_page,
+ <link linkend="int">int</link> n_pages);
+<link linkend="void">void</link> <link linkend="poppler-ps-file-set-paper-size">poppler_ps_file_set_paper_size</link> (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file,
+ <link linkend="double">double</link> width,
+ <link linkend="double">double</link> height);
+<link linkend="void">void</link> <link linkend="poppler-ps-file-set-duplex">poppler_ps_file_set_duplex</link> (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file,
+ <link linkend="gboolean">gboolean</link> duplex);
+<link linkend="void">void</link> <link linkend="poppler-ps-file-free">poppler_ps_file_free</link> (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-document.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+The <link linkend="PopplerDocument"><type>PopplerDocument</type></link> is an object used to refer to a main document.
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-document.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerPageLayout" role="enum">
+<title>enum PopplerPageLayout</title>
+<indexterm zone="PopplerPageLayout"><primary sortas="PopplerPageLayout">PopplerPageLayout</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_PAGE_LAYOUT_UNSET,
+ POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
+ POPPLER_PAGE_LAYOUT_ONE_COLUMN,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
+} PopplerPageLayout;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPageMode" role="enum">
+<title>enum PopplerPageMode</title>
+<indexterm zone="PopplerPageMode"><primary sortas="PopplerPageMode">PopplerPageMode</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_PAGE_MODE_UNSET,
+ POPPLER_PAGE_MODE_NONE,
+ POPPLER_PAGE_MODE_USE_OUTLINES,
+ POPPLER_PAGE_MODE_USE_THUMBS,
+ POPPLER_PAGE_MODE_FULL_SCREEN,
+ POPPLER_PAGE_MODE_USE_OC,
+ POPPLER_PAGE_MODE_USE_ATTACHMENTS
+} PopplerPageMode;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFontType" role="enum">
+<title>enum PopplerFontType</title>
+<indexterm zone="PopplerFontType"><primary sortas="PopplerFontType">PopplerFontType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_FONT_TYPE_UNKNOWN,
+ POPPLER_FONT_TYPE_TYPE1,
+ POPPLER_FONT_TYPE_TYPE1C,
+ POPPLER_FONT_TYPE_TYPE1COT,
+ POPPLER_FONT_TYPE_TYPE3,
+ POPPLER_FONT_TYPE_TRUETYPE,
+ POPPLER_FONT_TYPE_TRUETYPEOT,
+ POPPLER_FONT_TYPE_CID_TYPE0,
+ POPPLER_FONT_TYPE_CID_TYPE0C,
+ POPPLER_FONT_TYPE_CID_TYPE0COT,
+ POPPLER_FONT_TYPE_CID_TYPE2,
+ POPPLER_FONT_TYPE_CID_TYPE2OT
+} PopplerFontType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerViewerPreferences" role="enum">
+<title>enum PopplerViewerPreferences</title>
+<indexterm zone="PopplerViewerPreferences"><primary sortas="PopplerViewerPreferences">PopplerViewerPreferences</primary></indexterm><programlisting>typedef enum /*&lt; flags &gt;*/
+{
+ POPPLER_VIEWER_PREFERENCES_UNSET = 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR = 1 &lt;&lt; 0,
+ POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR = 1 &lt;&lt; 1,
+ POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI = 1 &lt;&lt; 2,
+ POPPLER_VIEWER_PREFERENCES_FIT_WINDOW = 1 &lt;&lt; 3,
+ POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW = 1 &lt;&lt; 4,
+ POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE = 1 &lt;&lt; 5,
+ POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 &lt;&lt; 6
+} PopplerViewerPreferences;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPermissions" role="enum">
+<title>enum PopplerPermissions</title>
+<indexterm zone="PopplerPermissions"><primary sortas="PopplerPermissions">PopplerPermissions</primary></indexterm><programlisting>typedef enum /*&lt; flags &gt;*/
+{
+ POPPLER_PERMISSIONS_OK_TO_PRINT = 1 &lt;&lt; 0,
+ POPPLER_PERMISSIONS_OK_TO_MODIFY = 1 &lt;&lt; 1,
+ POPPLER_PERMISSIONS_OK_TO_COPY = 1 &lt;&lt; 2,
+ POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 &lt;&lt; 3,
+ POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 &lt;&lt; 4,
+ POPPLER_PERMISSIONS_FULL = (POPPLER_PERMISSIONS_OK_TO_PRINT | POPPLER_PERMISSIONS_OK_TO_MODIFY | POPPLER_PERMISSIONS_OK_TO_COPY | POPPLER_PERMISSIONS_OK_TO_ADD_NOTES | POPPLER_PERMISSIONS_OK_TO_FILL_FORM)
+
+} PopplerPermissions;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-document-new-from-file" role="function">
+<title>poppler_document_new_from_file ()</title>
+<indexterm zone="poppler-document-new-from-file"><primary sortas="poppler_document_new_from_file">poppler_document_new_from_file</primary></indexterm><programlisting><link linkend="PopplerDocument">PopplerDocument</link> * poppler_document_new_from_file (const <link linkend="char">char</link> *uri,
+ const <link linkend="char">char</link> *password,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Creates a new <link linkend="PopplerDocument"><type>PopplerDocument</type></link>. If <link linkend="NULL--CAPS"><literal>NULL</literal></link> is returned, then <parameter>error</parameter> will be
+set. Possible errors include those in the <link linkend="POPPLER-ERROR--CAPS"><type>POPPLER_ERROR</type></link> and <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link>
+domains.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>uri</parameter>&#160;:</term>
+<listitem><simpara> uri of the file to load
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>password</parameter>&#160;:</term>
+<listitem><simpara> password to unlock the file with, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara> Return location for an error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly created <link linkend="PopplerDocument"><type>PopplerDocument</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-new-from-data" role="function">
+<title>poppler_document_new_from_data ()</title>
+<indexterm zone="poppler-document-new-from-data"><primary sortas="poppler_document_new_from_data">poppler_document_new_from_data</primary></indexterm><programlisting><link linkend="PopplerDocument">PopplerDocument</link> * poppler_document_new_from_data (<link linkend="char">char</link> *data,
+ <link linkend="int">int</link> length,
+ const <link linkend="char">char</link> *password,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Creates a new <link linkend="PopplerDocument"><type>PopplerDocument</type></link>. If <link linkend="NULL--CAPS"><literal>NULL</literal></link> is returned, then <parameter>error</parameter> will be
+set. Possible errors include those in the <link linkend="POPPLER-ERROR--CAPS"><type>POPPLER_ERROR</type></link> and <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link>
+domains.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>data</parameter>&#160;:</term>
+<listitem><simpara> the pdf data contained in a char array
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>length</parameter>&#160;:</term>
+<listitem><simpara> the length of <link linkend="data"><type>data</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>password</parameter>&#160;:</term>
+<listitem><simpara> password to unlock the file with, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara> Return location for an error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly created <link linkend="PopplerDocument"><type>PopplerDocument</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-save" role="function">
+<title>poppler_document_save ()</title>
+<indexterm zone="poppler-document-save"><primary sortas="poppler_document_save">poppler_document_save</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_document_save (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *uri,
+ <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Saves <parameter>document</parameter>. Any change made in the document such as
+form fields filled by the user will be saved.
+If <parameter>error</parameter> is set, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> will be returned. Possible errors
+include those in the <link linkend="G-FILE-ERROR--CAPS"><type>G_FILE_ERROR</type></link> domain.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>uri</parameter>&#160;:</term>
+<listitem><simpara> uri of file to save
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&#160;:</term>
+<listitem><simpara> return location for an error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if the document was successfully saved
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-get-n-pages" role="function">
+<title>poppler_document_get_n_pages ()</title>
+<indexterm zone="poppler-document-get-n-pages"><primary sortas="poppler_document_get_n_pages">poppler_document_get_n_pages</primary></indexterm><programlisting><link linkend="int">int</link> poppler_document_get_n_pages (<link linkend="PopplerDocument">PopplerDocument</link> *document);</programlisting>
+<para>
+Returns the number of pages in a loaded document.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> Number of pages
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-get-page" role="function">
+<title>poppler_document_get_page ()</title>
+<indexterm zone="poppler-document-get-page"><primary sortas="poppler_document_get_page">poppler_document_get_page</primary></indexterm><programlisting><link linkend="PopplerPage">PopplerPage</link> * poppler_document_get_page (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ <link linkend="int">int</link> index);</programlisting>
+<para>
+Returns the <link linkend="PopplerPage"><type>PopplerPage</type></link> indexed at <parameter>index</parameter>. This object is owned by the
+caller.
+</para>
+<para>
+<link linkend="PopplerPage"><type>PopplerPage</type></link><!-- -->s are indexed starting at 0.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>index</parameter>&#160;:</term>
+<listitem><simpara> a page index
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The <link linkend="PopplerPage"><type>PopplerPage</type></link> at <parameter>index</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-get-page-by-label" role="function">
+<title>poppler_document_get_page_by_label ()</title>
+<indexterm zone="poppler-document-get-page-by-label"><primary sortas="poppler_document_get_page_by_label">poppler_document_get_page_by_label</primary></indexterm><programlisting><link linkend="PopplerPage">PopplerPage</link> * poppler_document_get_page_by_label (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *label);</programlisting>
+<para>
+Returns the <link linkend="PopplerPage"><type>PopplerPage</type></link> reference by <parameter>label</parameter>. This object is owned by the
+caller. <parameter>label</parameter> is a human-readable string representation of the page number,
+and can be document specific. Typically, it is a value such as "iii" or "3".
+</para>
+<para>
+By default, "1" refers to the first page.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>label</parameter>&#160;:</term>
+<listitem><simpara> a page label
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The <link linkend="PopplerPage"><type>PopplerPage</type></link> referenced by <parameter>label</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-find-dest" role="function">
+<title>poppler_document_find_dest ()</title>
+<indexterm zone="poppler-document-find-dest"><primary sortas="poppler_document_find_dest">poppler_document_find_dest</primary></indexterm><programlisting><link linkend="PopplerDest">PopplerDest</link> * poppler_document_find_dest (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="gchar">gchar</link> *link_name);</programlisting>
+<para>
+Finds named destination <parameter>link_name</parameter> in <parameter>document</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>link_name</parameter>&#160;:</term>
+<listitem><simpara> a named destination
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The <link linkend="PopplerDest"><type>PopplerDest</type></link> destination or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if
+<parameter>link_name</parameter> is not a destination. Returned value must
+be freed with <link linkend="poppler-dest-free"><type>poppler_dest_free</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-has-attachments" role="function">
+<title>poppler_document_has_attachments ()</title>
+<indexterm zone="poppler-document-has-attachments"><primary sortas="poppler_document_has_attachments">poppler_document_has_attachments</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_document_has_attachments (<link linkend="PopplerDocument">PopplerDocument</link> *document);</programlisting>
+<para>
+Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> of <parameter>document</parameter> has any attachments.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if <parameter>document</parameter> has attachments.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-get-attachments" role="function">
+<title>poppler_document_get_attachments ()</title>
+<indexterm zone="poppler-document-get-attachments"><primary sortas="poppler_document_get_attachments">poppler_document_get_attachments</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_document_get_attachments (<link linkend="PopplerDocument">PopplerDocument</link> *document);</programlisting>
+<para>
+Returns a <link linkend="GList"><type>GList</type></link> containing <link linkend="PopplerAttachment"><type>PopplerAttachment</type></link><!-- -->s. These attachments
+are unowned, and must be unreffed, and the list must be freed with
+<link linkend="g-list-free"><function>g_list_free()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a list of available attachments.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-document-get-form-field" role="function">
+<title>poppler_document_get_form_field ()</title>
+<indexterm zone="poppler-document-get-form-field"><primary sortas="poppler_document_get_form_field">poppler_document_get_form_field</primary></indexterm><programlisting><link linkend="PopplerFormField">PopplerFormField</link> * poppler_document_get_form_field (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ <link linkend="gint">gint</link> id);</programlisting>
+<para>
+Returns the <link linkend="PopplerFormField"><type>PopplerFormField</type></link> for the given <parameter>id</parameter>. It must be freed with
+<link linkend="g-object-unref"><function>g_object_unref()</function></link></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>id</parameter>&#160;:</term>
+<listitem><simpara> an id of a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="PopplerFormField"><type>PopplerFormField</type></link> or NULL if not found
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-get-type" role="function">
+<title>poppler_index_iter_get_type ()</title>
+<indexterm zone="poppler-index-iter-get-type"><primary sortas="poppler_index_iter_get_type">poppler_index_iter_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_index_iter_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-new" role="function">
+<title>poppler_index_iter_new ()</title>
+<indexterm zone="poppler-index-iter-new"><primary sortas="poppler_index_iter_new">poppler_index_iter_new</primary></indexterm><programlisting><link linkend="PopplerIndexIter">PopplerIndexIter</link> * poppler_index_iter_new (<link linkend="PopplerDocument">PopplerDocument</link> *document);</programlisting>
+<para>
+Returns the root <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link> for <parameter>document</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. This must be
+freed with <link linkend="poppler-index-iter-free"><function>poppler_index_iter_free()</function></link>.
+</para>
+<para>
+Certain documents have an index associated with them. This index can be used
+to help the user navigate the document, and is similar to a table of
+contents. Each node in the index will contain a <link linkend="PopplerAction"><type>PopplerAction</type></link> that can be
+displayed to the user &mdash; typically a <link linkend="POPPLER-ACTION-GOTO-DEST--CAPS"><type>POPPLER_ACTION_GOTO_DEST</type></link> or a
+<link linkend="POPPLER-ACTION-URI--CAPS"><type>POPPLER_ACTION_URI</type></link><!-- -->.
+</para>
+<para>
+Here is a simple example of some code that walks the full index:
+</para>
+<para>
+<informalexample><programlisting>
+static void
+walk_index (PopplerIndexIter *iter)
+{
+ do
+ {
+ /<!-- -->* Get the the action and do something with it *<!-- -->/
+ PopplerIndexIter *child = poppler_index_iter_get_child (iter);
+ if (child)
+ walk_index (child);
+ poppler_index_iter_free (child);
+ }
+ while (poppler_index_iter_next (iter));
+}
+...
+{
+ iter = poppler_index_iter_new (document);
+ walk_index (iter);
+ poppler_index_iter_free (iter);
+}
+</programlisting></informalexample></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-copy" role="function">
+<title>poppler_index_iter_copy ()</title>
+<indexterm zone="poppler-index-iter-copy"><primary sortas="poppler_index_iter_copy">poppler_index_iter_copy</primary></indexterm><programlisting><link linkend="PopplerIndexIter">PopplerIndexIter</link> * poppler_index_iter_copy (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);</programlisting>
+<para>
+Creates a new <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link> as a copy of <parameter>iter</parameter>. This must be freed with
+<link linkend="poppler-index-iter-free"><function>poppler_index_iter_free()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-free" role="function">
+<title>poppler_index_iter_free ()</title>
+<indexterm zone="poppler-index-iter-free"><primary sortas="poppler_index_iter_free">poppler_index_iter_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_index_iter_free (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);</programlisting>
+<para>
+Frees <parameter>iter</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-get-child" role="function">
+<title>poppler_index_iter_get_child ()</title>
+<indexterm zone="poppler-index-iter-get-child"><primary sortas="poppler_index_iter_get_child">poppler_index_iter_get_child</primary></indexterm><programlisting><link linkend="PopplerIndexIter">PopplerIndexIter</link> * poppler_index_iter_get_child (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *parent);</programlisting>
+<para>
+Returns a newly created child of <parameter>parent</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the iter has no child.
+See <link linkend="poppler-index-iter-new"><function>poppler_index_iter_new()</function></link> for more information on this function.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>parent</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-is-open" role="function">
+<title>poppler_index_iter_is_open ()</title>
+<indexterm zone="poppler-index-iter-is-open"><primary sortas="poppler_index_iter_is_open">poppler_index_iter_is_open</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_index_iter_is_open (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);</programlisting>
+<para>
+Returns whether this node should be expanded by default to the user. The
+document can provide a hint as to how the document's index should be expanded
+initially.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if the document wants <parameter>iter</parameter> to be expanded
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-get-action" role="function">
+<title>poppler_index_iter_get_action ()</title>
+<indexterm zone="poppler-index-iter-get-action"><primary sortas="poppler_index_iter_get_action">poppler_index_iter_get_action</primary></indexterm><programlisting><link linkend="PopplerAction">PopplerAction</link> * poppler_index_iter_get_action (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);</programlisting>
+<para>
+Returns the <link linkend="PopplerAction"><type>PopplerAction</type></link> associated with <parameter>iter</parameter>. It must be freed with
+<link linkend="poppler-action-free"><function>poppler_action_free()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="PopplerAction"><type>PopplerAction</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-index-iter-next" role="function">
+<title>poppler_index_iter_next ()</title>
+<indexterm zone="poppler-index-iter-next"><primary sortas="poppler_index_iter_next">poppler_index_iter_next</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_index_iter_next (<link linkend="PopplerIndexIter">PopplerIndexIter</link> *iter);</programlisting>
+<para>
+Sets <parameter>iter</parameter> to point to the next action at the current level, if valid. See
+<link linkend="poppler-index-iter-new"><function>poppler_index_iter_new()</function></link> for more information.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerIndexIter"><type>PopplerIndexIter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter> was set to the next action
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-font-info-new" role="function">
+<title>poppler_font_info_new ()</title>
+<indexterm zone="poppler-font-info-new"><primary sortas="poppler_font_info_new">poppler_font_info_new</primary></indexterm><programlisting><link linkend="PopplerFontInfo">PopplerFontInfo</link> * poppler_font_info_new (<link linkend="PopplerDocument">PopplerDocument</link> *document);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-font-info-scan" role="function">
+<title>poppler_font_info_scan ()</title>
+<indexterm zone="poppler-font-info-scan"><primary sortas="poppler_font_info_scan">poppler_font_info_scan</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_font_info_scan (<link linkend="PopplerFontInfo">PopplerFontInfo</link> *font_info,
+ <link linkend="int">int</link> n_pages,
+ <link linkend="PopplerFontsIter">PopplerFontsIter</link> **iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>font_info</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>n_pages</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-font-info-free" role="function">
+<title>poppler_font_info_free ()</title>
+<indexterm zone="poppler-font-info-free"><primary sortas="poppler_font_info_free">poppler_font_info_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_font_info_free (<link linkend="PopplerFontInfo">PopplerFontInfo</link> *font_info);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>font_info</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-get-type" role="function">
+<title>poppler_fonts_iter_get_type ()</title>
+<indexterm zone="poppler-fonts-iter-get-type"><primary sortas="poppler_fonts_iter_get_type">poppler_fonts_iter_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_fonts_iter_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-copy" role="function">
+<title>poppler_fonts_iter_copy ()</title>
+<indexterm zone="poppler-fonts-iter-copy"><primary sortas="poppler_fonts_iter_copy">poppler_fonts_iter_copy</primary></indexterm><programlisting><link linkend="PopplerFontsIter">PopplerFontsIter</link> * poppler_fonts_iter_copy (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-free" role="function">
+<title>poppler_fonts_iter_free ()</title>
+<indexterm zone="poppler-fonts-iter-free"><primary sortas="poppler_fonts_iter_free">poppler_fonts_iter_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_fonts_iter_free (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-get-name" role="function">
+<title>poppler_fonts_iter_get_name ()</title>
+<indexterm zone="poppler-fonts-iter-get-name"><primary sortas="poppler_fonts_iter_get_name">poppler_fonts_iter_get_name</primary></indexterm><programlisting>const <link linkend="char">char</link> * poppler_fonts_iter_get_name (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-get-full-name" role="function">
+<title>poppler_fonts_iter_get_full_name ()</title>
+<indexterm zone="poppler-fonts-iter-get-full-name"><primary sortas="poppler_fonts_iter_get_full_name">poppler_fonts_iter_get_full_name</primary></indexterm><programlisting>const <link linkend="char">char</link> * poppler_fonts_iter_get_full_name (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-get-font-type" role="function">
+<title>poppler_fonts_iter_get_font_type ()</title>
+<indexterm zone="poppler-fonts-iter-get-font-type"><primary sortas="poppler_fonts_iter_get_font_type">poppler_fonts_iter_get_font_type</primary></indexterm><programlisting><link linkend="PopplerFontType">PopplerFontType</link> poppler_fonts_iter_get_font_type (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-is-embedded" role="function">
+<title>poppler_fonts_iter_is_embedded ()</title>
+<indexterm zone="poppler-fonts-iter-is-embedded"><primary sortas="poppler_fonts_iter_is_embedded">poppler_fonts_iter_is_embedded</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_fonts_iter_is_embedded (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-is-subset" role="function">
+<title>poppler_fonts_iter_is_subset ()</title>
+<indexterm zone="poppler-fonts-iter-is-subset"><primary sortas="poppler_fonts_iter_is_subset">poppler_fonts_iter_is_subset</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_fonts_iter_is_subset (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-fonts-iter-next" role="function">
+<title>poppler_fonts_iter_next ()</title>
+<indexterm zone="poppler-fonts-iter-next"><primary sortas="poppler_fonts_iter_next">poppler_fonts_iter_next</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_fonts_iter_next (<link linkend="PopplerFontsIter">PopplerFontsIter</link> *iter);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>iter</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-ps-file-new" role="function">
+<title>poppler_ps_file_new ()</title>
+<indexterm zone="poppler-ps-file-new"><primary sortas="poppler_ps_file_new">poppler_ps_file_new</primary></indexterm><programlisting><link linkend="PopplerPSFile">PopplerPSFile</link> * poppler_ps_file_new (<link linkend="PopplerDocument">PopplerDocument</link> *document,
+ const <link linkend="char">char</link> *filename,
+ <link linkend="int">int</link> first_page,
+ <link linkend="int">int</link> n_pages);</programlisting>
+<para>
+Create a new postscript file to render to</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>document</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerDocument"><type>PopplerDocument</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&#160;:</term>
+<listitem><simpara> the path of the output filename
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>first_page</parameter>&#160;:</term>
+<listitem><simpara> the first page to print
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>n_pages</parameter>&#160;:</term>
+<listitem><simpara> the number of pages to print
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a PopplerPSFile
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-ps-file-set-paper-size" role="function">
+<title>poppler_ps_file_set_paper_size ()</title>
+<indexterm zone="poppler-ps-file-set-paper-size"><primary sortas="poppler_ps_file_set_paper_size">poppler_ps_file_set_paper_size</primary></indexterm><programlisting><link linkend="void">void</link> poppler_ps_file_set_paper_size (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file,
+ <link linkend="double">double</link> width,
+ <link linkend="double">double</link> height);</programlisting>
+<para>
+Set the output paper size. These values will end up in the
+DocumentMedia, the BoundingBox DSC comments and other places in the
+generated PostScript.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>ps_file</parameter>&#160;:</term>
+<listitem><simpara> a PopplerPSFile which was not yet printed to.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&#160;:</term>
+<listitem><simpara> the paper width in 1/72 inch
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&#160;:</term>
+<listitem><simpara> the paper height in 1/72 inch
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-ps-file-set-duplex" role="function">
+<title>poppler_ps_file_set_duplex ()</title>
+<indexterm zone="poppler-ps-file-set-duplex"><primary sortas="poppler_ps_file_set_duplex">poppler_ps_file_set_duplex</primary></indexterm><programlisting><link linkend="void">void</link> poppler_ps_file_set_duplex (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file,
+ <link linkend="gboolean">gboolean</link> duplex);</programlisting>
+<para>
+Enable or disable Duplex printing.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>ps_file</parameter>&#160;:</term>
+<listitem><simpara> a PopplerPSFile which was not yet printed to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>duplex</parameter>&#160;:</term>
+<listitem><simpara> whether to force duplex printing (on printers which support this)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-ps-file-free" role="function">
+<title>poppler_ps_file_free ()</title>
+<indexterm zone="poppler-ps-file-free"><primary sortas="poppler_ps_file_free">poppler_ps_file_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_ps_file_free (<link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file);</programlisting>
+<para>
+Frees <parameter>ps_file</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>ps_file</parameter>&#160;:</term>
+<listitem><simpara> a PopplerPSFile
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-enums.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-enums.xml
new file mode 100644
index 00000000000..cf0b0aa7d7a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-enums.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-enums">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-enums.top_of_page">poppler-enums</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>poppler-enums</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-enums.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+#define <link linkend="POPPLER-TYPE-ACTION-TYPE--CAPS">POPPLER_TYPE_ACTION_TYPE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-action-type-get-type">poppler_action_type_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-DEST-TYPE--CAPS">POPPLER_TYPE_DEST_TYPE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-dest-type-get-type">poppler_dest_type_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-PAGE-LAYOUT--CAPS">POPPLER_TYPE_PAGE_LAYOUT</link>
+<link linkend="GType">GType</link> <link linkend="poppler-page-layout-get-type">poppler_page_layout_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-PAGE-MODE--CAPS">POPPLER_TYPE_PAGE_MODE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-page-mode-get-type">poppler_page_mode_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-FONT-TYPE--CAPS">POPPLER_TYPE_FONT_TYPE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-font-type-get-type">poppler_font_type_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS">POPPLER_TYPE_VIEWER_PREFERENCES</link>
+<link linkend="GType">GType</link> <link linkend="poppler-viewer-preferences-get-type">poppler_viewer_preferences_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-PERMISSIONS--CAPS">POPPLER_TYPE_PERMISSIONS</link>
+<link linkend="GType">GType</link> <link linkend="poppler-permissions-get-type">poppler_permissions_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-SELECTION-STYLE--CAPS">POPPLER_TYPE_SELECTION_STYLE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-selection-style-get-type">poppler_selection_style_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS">POPPLER_TYPE_PAGE_TRANSITION_TYPE</link>
+<link linkend="GType">GType</link> <link linkend="poppler-page-transition-type-get-type">poppler_page_transition_type_get_type</link>
+ (void);
+#define <link linkend="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS">POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</link>
+<link linkend="GType">GType</link> <link linkend="poppler-page-transition-alignment-get-type">poppler_page_transition_alignment_get_type</link>
+ (void);
+#define <link linkend="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS">POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</link>
+<link linkend="GType">GType</link> <link linkend="poppler-page-transition-direction-get-type">poppler_page_transition_direction_get_type</link>
+ (void);
+#define <link linkend="POPPLER-TYPE-ERROR--CAPS">POPPLER_TYPE_ERROR</link>
+<link linkend="GType">GType</link> <link linkend="poppler-error-get-type">poppler_error_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-ORIENTATION--CAPS">POPPLER_TYPE_ORIENTATION</link>
+<link linkend="GType">GType</link> <link linkend="poppler-orientation-get-type">poppler_orientation_get_type</link> (void);
+#define <link linkend="POPPLER-TYPE-BACKEND--CAPS">POPPLER_TYPE_BACKEND</link>
+<link linkend="GType">GType</link> <link linkend="poppler-backend-get-type">poppler_backend_get_type</link> (void);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-enums.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-enums.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="POPPLER-TYPE-ACTION-TYPE--CAPS" role="macro">
+<title>POPPLER_TYPE_ACTION_TYPE</title>
+<indexterm zone="POPPLER-TYPE-ACTION-TYPE--CAPS"><primary sortas="POPPLER_TYPE_ACTION_TYPE">POPPLER_TYPE_ACTION_TYPE</primary></indexterm><programlisting>#define POPPLER_TYPE_ACTION_TYPE (poppler_action_type_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-action-type-get-type" role="function">
+<title>poppler_action_type_get_type ()</title>
+<indexterm zone="poppler-action-type-get-type"><primary sortas="poppler_action_type_get_type">poppler_action_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_action_type_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-DEST-TYPE--CAPS" role="macro">
+<title>POPPLER_TYPE_DEST_TYPE</title>
+<indexterm zone="POPPLER-TYPE-DEST-TYPE--CAPS"><primary sortas="POPPLER_TYPE_DEST_TYPE">POPPLER_TYPE_DEST_TYPE</primary></indexterm><programlisting>#define POPPLER_TYPE_DEST_TYPE (poppler_dest_type_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-dest-type-get-type" role="function">
+<title>poppler_dest_type_get_type ()</title>
+<indexterm zone="poppler-dest-type-get-type"><primary sortas="poppler_dest_type_get_type">poppler_dest_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_dest_type_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-LAYOUT--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_LAYOUT</title>
+<indexterm zone="POPPLER-TYPE-PAGE-LAYOUT--CAPS"><primary sortas="POPPLER_TYPE_PAGE_LAYOUT">POPPLER_TYPE_PAGE_LAYOUT</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_LAYOUT (poppler_page_layout_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-layout-get-type" role="function">
+<title>poppler_page_layout_get_type ()</title>
+<indexterm zone="poppler-page-layout-get-type"><primary sortas="poppler_page_layout_get_type">poppler_page_layout_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_layout_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-MODE--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_MODE</title>
+<indexterm zone="POPPLER-TYPE-PAGE-MODE--CAPS"><primary sortas="POPPLER_TYPE_PAGE_MODE">POPPLER_TYPE_PAGE_MODE</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_MODE (poppler_page_mode_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-mode-get-type" role="function">
+<title>poppler_page_mode_get_type ()</title>
+<indexterm zone="poppler-page-mode-get-type"><primary sortas="poppler_page_mode_get_type">poppler_page_mode_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_mode_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-FONT-TYPE--CAPS" role="macro">
+<title>POPPLER_TYPE_FONT_TYPE</title>
+<indexterm zone="POPPLER-TYPE-FONT-TYPE--CAPS"><primary sortas="POPPLER_TYPE_FONT_TYPE">POPPLER_TYPE_FONT_TYPE</primary></indexterm><programlisting>#define POPPLER_TYPE_FONT_TYPE (poppler_font_type_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-font-type-get-type" role="function">
+<title>poppler_font_type_get_type ()</title>
+<indexterm zone="poppler-font-type-get-type"><primary sortas="poppler_font_type_get_type">poppler_font_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_font_type_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS" role="macro">
+<title>POPPLER_TYPE_VIEWER_PREFERENCES</title>
+<indexterm zone="POPPLER-TYPE-VIEWER-PREFERENCES--CAPS"><primary sortas="POPPLER_TYPE_VIEWER_PREFERENCES">POPPLER_TYPE_VIEWER_PREFERENCES</primary></indexterm><programlisting>#define POPPLER_TYPE_VIEWER_PREFERENCES (poppler_viewer_preferences_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-viewer-preferences-get-type" role="function">
+<title>poppler_viewer_preferences_get_type ()</title>
+<indexterm zone="poppler-viewer-preferences-get-type"><primary sortas="poppler_viewer_preferences_get_type">poppler_viewer_preferences_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_viewer_preferences_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PERMISSIONS--CAPS" role="macro">
+<title>POPPLER_TYPE_PERMISSIONS</title>
+<indexterm zone="POPPLER-TYPE-PERMISSIONS--CAPS"><primary sortas="POPPLER_TYPE_PERMISSIONS">POPPLER_TYPE_PERMISSIONS</primary></indexterm><programlisting>#define POPPLER_TYPE_PERMISSIONS (poppler_permissions_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-permissions-get-type" role="function">
+<title>poppler_permissions_get_type ()</title>
+<indexterm zone="poppler-permissions-get-type"><primary sortas="poppler_permissions_get_type">poppler_permissions_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_permissions_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-SELECTION-STYLE--CAPS" role="macro">
+<title>POPPLER_TYPE_SELECTION_STYLE</title>
+<indexterm zone="POPPLER-TYPE-SELECTION-STYLE--CAPS"><primary sortas="POPPLER_TYPE_SELECTION_STYLE">POPPLER_TYPE_SELECTION_STYLE</primary></indexterm><programlisting>#define POPPLER_TYPE_SELECTION_STYLE (poppler_selection_style_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-selection-style-get-type" role="function">
+<title>poppler_selection_style_get_type ()</title>
+<indexterm zone="poppler-selection-style-get-type"><primary sortas="poppler_selection_style_get_type">poppler_selection_style_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_selection_style_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_TRANSITION_TYPE</title>
+<indexterm zone="POPPLER-TYPE-PAGE-TRANSITION-TYPE--CAPS"><primary sortas="POPPLER_TYPE_PAGE_TRANSITION_TYPE">POPPLER_TYPE_PAGE_TRANSITION_TYPE</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_TRANSITION_TYPE (poppler_page_transition_type_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-transition-type-get-type" role="function">
+<title>poppler_page_transition_type_get_type ()</title>
+<indexterm zone="poppler-page-transition-type-get-type"><primary sortas="poppler_page_transition_type_get_type">poppler_page_transition_type_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_transition_type_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</title>
+<indexterm zone="POPPLER-TYPE-PAGE-TRANSITION-ALIGNMENT--CAPS"><primary sortas="POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT">POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT (poppler_page_transition_alignment_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-transition-alignment-get-type" role="function">
+<title>poppler_page_transition_alignment_get_type ()</title>
+<indexterm zone="poppler-page-transition-alignment-get-type"><primary sortas="poppler_page_transition_alignment_get_type">poppler_page_transition_alignment_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_transition_alignment_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</title>
+<indexterm zone="POPPLER-TYPE-PAGE-TRANSITION-DIRECTION--CAPS"><primary sortas="POPPLER_TYPE_PAGE_TRANSITION_DIRECTION">POPPLER_TYPE_PAGE_TRANSITION_DIRECTION</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_TRANSITION_DIRECTION (poppler_page_transition_direction_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-transition-direction-get-type" role="function">
+<title>poppler_page_transition_direction_get_type ()</title>
+<indexterm zone="poppler-page-transition-direction-get-type"><primary sortas="poppler_page_transition_direction_get_type">poppler_page_transition_direction_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_transition_direction_get_type
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-ERROR--CAPS" role="macro">
+<title>POPPLER_TYPE_ERROR</title>
+<indexterm zone="POPPLER-TYPE-ERROR--CAPS"><primary sortas="POPPLER_TYPE_ERROR">POPPLER_TYPE_ERROR</primary></indexterm><programlisting>#define POPPLER_TYPE_ERROR (poppler_error_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-error-get-type" role="function">
+<title>poppler_error_get_type ()</title>
+<indexterm zone="poppler-error-get-type"><primary sortas="poppler_error_get_type">poppler_error_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_error_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-ORIENTATION--CAPS" role="macro">
+<title>POPPLER_TYPE_ORIENTATION</title>
+<indexterm zone="POPPLER-TYPE-ORIENTATION--CAPS"><primary sortas="POPPLER_TYPE_ORIENTATION">POPPLER_TYPE_ORIENTATION</primary></indexterm><programlisting>#define POPPLER_TYPE_ORIENTATION (poppler_orientation_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-orientation-get-type" role="function">
+<title>poppler_orientation_get_type ()</title>
+<indexterm zone="poppler-orientation-get-type"><primary sortas="poppler_orientation_get_type">poppler_orientation_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_orientation_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-BACKEND--CAPS" role="macro">
+<title>POPPLER_TYPE_BACKEND</title>
+<indexterm zone="POPPLER-TYPE-BACKEND--CAPS"><primary sortas="POPPLER_TYPE_BACKEND">POPPLER_TYPE_BACKEND</primary></indexterm><programlisting>#define POPPLER_TYPE_BACKEND (poppler_backend_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-backend-get-type" role="function">
+<title>poppler_backend_get_type ()</title>
+<indexterm zone="poppler-backend-get-type"><primary sortas="poppler_backend_get_type">poppler_backend_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_backend_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-features.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-features.xml
new file mode 100644
index 00000000000..29b60abedb5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-features.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-features">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-features.top_of_page">Version and Features Information</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Version and Features Information</refname>
+<refpurpose>Variables and functions to check the poppler version and features</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-features.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+#define <link linkend="POPPLER-HAS-CAIRO--CAPS">POPPLER_HAS_CAIRO</link>
+#define <link linkend="POPPLER-WITH-GDK--CAPS">POPPLER_WITH_GDK</link>
+#define <link linkend="POPPLER-MAJOR-VERSION--CAPS">POPPLER_MAJOR_VERSION</link>
+#define <link linkend="POPPLER-MINOR-VERSION--CAPS">POPPLER_MINOR_VERSION</link>
+#define <link linkend="POPPLER-MICRO-VERSION--CAPS">POPPLER_MICRO_VERSION</link>
+#define <link linkend="POPPLER-CHECK-VERSION--CAPS">POPPLER_CHECK_VERSION</link> (major,minor,micro)
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-features.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+Poppler provides version information, and information about features
+enabled at compile time. This is primarily useful in configure checks
+for builds that have a configure script, or for allowing code to optionally
+depend but not require a specific poppler version.
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-features.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="POPPLER-HAS-CAIRO--CAPS" role="macro">
+<title>POPPLER_HAS_CAIRO</title>
+<indexterm zone="POPPLER-HAS-CAIRO--CAPS"><primary sortas="POPPLER_HAS_CAIRO">POPPLER_HAS_CAIRO</primary></indexterm><programlisting>#define POPPLER_HAS_CAIRO 1
+</programlisting>
+<para>
+Defined if poppler was compiled with cairo support.
+</para></refsect2>
+<refsect2 id="POPPLER-WITH-GDK--CAPS" role="macro">
+<title>POPPLER_WITH_GDK</title>
+<indexterm zone="POPPLER-WITH-GDK--CAPS"><primary sortas="POPPLER_WITH_GDK">POPPLER_WITH_GDK</primary></indexterm><programlisting>#define POPPLER_WITH_GDK 1
+</programlisting>
+<para>
+Defined if poppler was compiled with GDK support.
+</para></refsect2>
+<refsect2 id="POPPLER-MAJOR-VERSION--CAPS" role="macro">
+<title>POPPLER_MAJOR_VERSION</title>
+<indexterm zone="POPPLER-MAJOR-VERSION--CAPS"><primary sortas="POPPLER_MAJOR_VERSION">POPPLER_MAJOR_VERSION</primary></indexterm><programlisting>#define POPPLER_MAJOR_VERSION (0)
+</programlisting>
+<para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 0.)
+</para>
+Since: 0.11</refsect2>
+<refsect2 id="POPPLER-MINOR-VERSION--CAPS" role="macro">
+<title>POPPLER_MINOR_VERSION</title>
+<indexterm zone="POPPLER-MINOR-VERSION--CAPS"><primary sortas="POPPLER_MINOR_VERSION">POPPLER_MINOR_VERSION</primary></indexterm><programlisting>#define POPPLER_MINOR_VERSION (12)
+</programlisting>
+<para>
+</para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 1.)
+Since: 0.11</refsect2>
+<refsect2 id="POPPLER-MICRO-VERSION--CAPS" role="macro">
+<title>POPPLER_MICRO_VERSION</title>
+<indexterm zone="POPPLER-MICRO-VERSION--CAPS"><primary sortas="POPPLER_MICRO_VERSION">POPPLER_MICRO_VERSION</primary></indexterm><programlisting>#define POPPLER_MICRO_VERSION (4)
+</programlisting>
+<para>
+The micro version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 2.)
+</para>
+Since: 0.11</refsect2>
+<refsect2 id="POPPLER-CHECK-VERSION--CAPS" role="macro">
+<title>POPPLER_CHECK_VERSION()</title>
+<indexterm zone="POPPLER-CHECK-VERSION--CAPS"><primary sortas="POPPLER_CHECK_VERSION">POPPLER_CHECK_VERSION</primary></indexterm><programlisting>#define POPPLER_CHECK_VERSION(major,minor,micro)</programlisting>
+<para>
+Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the version of the poppler header files is the same
+as or newer than the passed-in version.
+</para><variablelist role="params">
+<varlistentry><term><parameter>major</parameter>&#160;:</term>
+<listitem><simpara>major version (e.g. 0 for version 0.1.2)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>minor</parameter>&#160;:</term>
+<listitem><simpara>minor version (e.g. 1 for version 0.1.2)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>micro</parameter>&#160;:</term>
+<listitem><simpara>micro version (e.g. 2 for version 0.1.2)
+Since: 0.11
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-form-field.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-form-field.xml
new file mode 100644
index 00000000000..13b1ae75032
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-form-field.xml
@@ -0,0 +1,546 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-form-field">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-form-field.top_of_page">PopplerFormField</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerFormField</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-form-field.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+<anchor id="PopplerFormField"/>
+<synopsis>
+ <link linkend="PopplerFormField-struct">PopplerFormField</link>;
+enum <link linkend="PopplerFormButtonType">PopplerFormButtonType</link>;
+enum <link linkend="PopplerFormChoiceType">PopplerFormChoiceType</link>;
+enum <link linkend="PopplerFormFieldType">PopplerFormFieldType</link>;
+enum <link linkend="PopplerFormTextType">PopplerFormTextType</link>;
+<link linkend="gint">gint</link> <link linkend="poppler-form-field-get-id">poppler_form_field_get_id</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="PopplerFormFieldType">PopplerFormFieldType</link> <link linkend="poppler-form-field-get-field-type">poppler_form_field_get_field_type</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-is-read-only">poppler_form_field_is_read_only</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gdouble">gdouble</link> <link linkend="poppler-form-field-get-font-size">poppler_form_field_get_font_size</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="PopplerFormButtonType">PopplerFormButtonType</link> <link linkend="poppler-form-field-button-get-button-type">poppler_form_field_button_get_button_type</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-button-get-state">poppler_form_field_button_get_state</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="void">void</link> <link linkend="poppler-form-field-button-set-state">poppler_form_field_button_set_state</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gboolean">gboolean</link> state);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-choice-can-select-multiple">poppler_form_field_choice_can_select_multiple</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-choice-commit-on-change">poppler_form_field_choice_commit_on_change</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-choice-do-spell-check">poppler_form_field_choice_do_spell_check</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="PopplerFormChoiceType">PopplerFormChoiceType</link> <link linkend="poppler-form-field-choice-get-choice-type">poppler_form_field_choice_get_choice_type</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-form-field-choice-get-item">poppler_form_field_choice_get_item</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);
+<link linkend="gint">gint</link> <link linkend="poppler-form-field-choice-get-n-items">poppler_form_field_choice_get_n_items</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-form-field-choice-get-text">poppler_form_field_choice_get_text</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-choice-is-editable">poppler_form_field_choice_is_editable</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-choice-is-item-selected">poppler_form_field_choice_is_item_selected</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);
+<link linkend="void">void</link> <link linkend="poppler-form-field-choice-select-item">poppler_form_field_choice_select_item</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);
+<link linkend="void">void</link> <link linkend="poppler-form-field-choice-set-text">poppler_form_field_choice_set_text</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ const <link linkend="gchar">gchar</link> *text);
+<link linkend="void">void</link> <link linkend="poppler-form-field-choice-toggle-item">poppler_form_field_choice_toggle_item</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);
+<link linkend="void">void</link> <link linkend="poppler-form-field-choice-unselect-all">poppler_form_field_choice_unselect_all</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-text-do-scroll">poppler_form_field_text_do_scroll</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-text-do-spell-check">poppler_form_field_text_do_spell_check</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gint">gint</link> <link linkend="poppler-form-field-text-get-max-len">poppler_form_field_text_get_max_len</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gchar">gchar</link> * <link linkend="poppler-form-field-text-get-text">poppler_form_field_text_get_text</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="PopplerFormTextType">PopplerFormTextType</link> <link linkend="poppler-form-field-text-get-text-type">poppler_form_field_text_get_text_type</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-text-is-password">poppler_form_field_text_is_password</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-form-field-text-is-rich-text">poppler_form_field_text_is_rich_text</link>
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);
+<link linkend="void">void</link> <link linkend="poppler-form-field-text-set-text">poppler_form_field_text_set_text</link> (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ const <link linkend="gchar">gchar</link> *text);
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1 id="poppler-poppler-form-field.object-hierarchy" role="object_hierarchy">
+<title role="object_hierarchy.title">Object Hierarchy</title>
+<synopsis>
+ <link linkend="GObject">GObject</link>
+ +----PopplerFormField
+</synopsis>
+</refsect1>
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-form-field.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-form-field.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerFormField-struct" role="struct">
+<title>PopplerFormField</title>
+<indexterm zone="PopplerFormField-struct"><primary sortas="PopplerFormField">PopplerFormField</primary></indexterm><programlisting>typedef struct _PopplerFormField PopplerFormField;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFormButtonType" role="enum">
+<title>enum PopplerFormButtonType</title>
+<indexterm zone="PopplerFormButtonType"><primary sortas="PopplerFormButtonType">PopplerFormButtonType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_FORM_BUTTON_PUSH,
+ POPPLER_FORM_BUTTON_CHECK,
+ POPPLER_FORM_BUTTON_RADIO
+} PopplerFormButtonType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFormChoiceType" role="enum">
+<title>enum PopplerFormChoiceType</title>
+<indexterm zone="PopplerFormChoiceType"><primary sortas="PopplerFormChoiceType">PopplerFormChoiceType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_FORM_CHOICE_COMBO,
+ POPPLER_FORM_CHOICE_LIST
+} PopplerFormChoiceType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFormFieldType" role="enum">
+<title>enum PopplerFormFieldType</title>
+<indexterm zone="PopplerFormFieldType"><primary sortas="PopplerFormFieldType">PopplerFormFieldType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_FORM_FIELD_UNKNOWN,
+ POPPLER_FORM_FIELD_BUTTON,
+ POPPLER_FORM_FIELD_TEXT,
+ POPPLER_FORM_FIELD_CHOICE,
+ POPPLER_FORM_FIELD_SIGNATURE
+} PopplerFormFieldType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFormTextType" role="enum">
+<title>enum PopplerFormTextType</title>
+<indexterm zone="PopplerFormTextType"><primary sortas="PopplerFormTextType">PopplerFormTextType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_FORM_TEXT_NORMAL,
+ POPPLER_FORM_TEXT_MULTILINE,
+ POPPLER_FORM_TEXT_FILE_SELECT
+} PopplerFormTextType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-form-field-get-id" role="function">
+<title>poppler_form_field_get_id ()</title>
+<indexterm zone="poppler-form-field-get-id"><primary sortas="poppler_form_field_get_id">poppler_form_field_get_id</primary></indexterm><programlisting><link linkend="gint">gint</link> poppler_form_field_get_id (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the id of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the id of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-get-field-type" role="function">
+<title>poppler_form_field_get_field_type ()</title>
+<indexterm zone="poppler-form-field-get-field-type"><primary sortas="poppler_form_field_get_field_type">poppler_form_field_get_field_type</primary></indexterm><programlisting><link linkend="PopplerFormFieldType">PopplerFormFieldType</link> poppler_form_field_get_field_type (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the type of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerFormFieldType"><type>PopplerFormFieldType</type></link> of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-is-read-only" role="function">
+<title>poppler_form_field_is_read_only ()</title>
+<indexterm zone="poppler-form-field-is-read-only"><primary sortas="poppler_form_field_is_read_only">poppler_form_field_is_read_only</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_is_read_only (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether <parameter>field</parameter> is read only</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>field</parameter> is read only
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-get-font-size" role="function">
+<title>poppler_form_field_get_font_size ()</title>
+<indexterm zone="poppler-form-field-get-font-size"><primary sortas="poppler_form_field_get_font_size">poppler_form_field_get_font_size</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> poppler_form_field_get_font_size (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the font size of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the font size of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-button-get-button-type" role="function">
+<title>poppler_form_field_button_get_button_type ()</title>
+<indexterm zone="poppler-form-field-button-get-button-type"><primary sortas="poppler_form_field_button_get_button_type">poppler_form_field_button_get_button_type</primary></indexterm><programlisting><link linkend="PopplerFormButtonType">PopplerFormButtonType</link> poppler_form_field_button_get_button_type
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the button type of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerFormButtonType"><type>PopplerFormButtonType</type></link> of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-button-get-state" role="function">
+<title>poppler_form_field_button_get_state ()</title>
+<indexterm zone="poppler-form-field-button-get-state"><primary sortas="poppler_form_field_button_get_state">poppler_form_field_button_get_state</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_button_get_state (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Queries a <link linkend="PopplerFormField"><type>PopplerFormField</type></link> and returns its current state. Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if
+<parameter>field</parameter> is pressed in and <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if it is raised.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> current state of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-button-set-state" role="function">
+<title>poppler_form_field_button_set_state ()</title>
+<indexterm zone="poppler-form-field-button-set-state"><primary sortas="poppler_form_field_button_set_state">poppler_form_field_button_set_state</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_button_set_state (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gboolean">gboolean</link> state);</programlisting>
+<para>
+Sets the status of <parameter>field</parameter>. Set to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if you want the <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+to be 'pressed in', and <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> to raise it.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>state</parameter>&#160;:</term>
+<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> or <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-can-select-multiple" role="function">
+<title>poppler_form_field_choice_can_select_multiple ()</title>
+<indexterm zone="poppler-form-field-choice-can-select-multiple"><primary sortas="poppler_form_field_choice_can_select_multiple">poppler_form_field_choice_can_select_multiple</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_choice_can_select_multiple
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether <parameter>field</parameter> allows multiple choices to be selected</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>field</parameter> allows multiple choices to be selected
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-commit-on-change" role="function">
+<title>poppler_form_field_choice_commit_on_change ()</title>
+<indexterm zone="poppler-form-field-choice-commit-on-change"><primary sortas="poppler_form_field_choice_commit_on_change">poppler_form_field_choice_commit_on_change</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_choice_commit_on_change
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-do-spell-check" role="function">
+<title>poppler_form_field_choice_do_spell_check ()</title>
+<indexterm zone="poppler-form-field-choice-do-spell-check"><primary sortas="poppler_form_field_choice_do_spell_check">poppler_form_field_choice_do_spell_check</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_choice_do_spell_check
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether spell checking should be done for the contents of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if spell checking should be done for <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-get-choice-type" role="function">
+<title>poppler_form_field_choice_get_choice_type ()</title>
+<indexterm zone="poppler-form-field-choice-get-choice-type"><primary sortas="poppler_form_field_choice_get_choice_type">poppler_form_field_choice_get_choice_type</primary></indexterm><programlisting><link linkend="PopplerFormChoiceType">PopplerFormChoiceType</link> poppler_form_field_choice_get_choice_type
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the choice type of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerFormChoiceType"><type>PopplerFormChoiceType</type></link> of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-get-item" role="function">
+<title>poppler_form_field_choice_get_item ()</title>
+<indexterm zone="poppler-form-field-choice-get-item"><primary sortas="poppler_form_field_choice_get_item">poppler_form_field_choice_get_item</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_form_field_choice_get_item (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);</programlisting>
+<para>
+Returns the contents of the item on <parameter>field</parameter> at the given index</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>index</parameter>&#160;:</term>
+<listitem><simpara> the index of the item
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-get-n-items" role="function">
+<title>poppler_form_field_choice_get_n_items ()</title>
+<indexterm zone="poppler-form-field-choice-get-n-items"><primary sortas="poppler_form_field_choice_get_n_items">poppler_form_field_choice_get_n_items</primary></indexterm><programlisting><link linkend="gint">gint</link> poppler_form_field_choice_get_n_items
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Returns the number of items on <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the number of items on <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-get-text" role="function">
+<title>poppler_form_field_choice_get_text ()</title>
+<indexterm zone="poppler-form-field-choice-get-text"><primary sortas="poppler_form_field_choice_get_text">poppler_form_field_choice_get_text</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_form_field_choice_get_text (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Retrieves the contents of <parameter>field</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-is-editable" role="function">
+<title>poppler_form_field_choice_is_editable ()</title>
+<indexterm zone="poppler-form-field-choice-is-editable"><primary sortas="poppler_form_field_choice_is_editable">poppler_form_field_choice_is_editable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_choice_is_editable
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether <parameter>field</parameter> is editable</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>field</parameter> is editable
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-is-item-selected" role="function">
+<title>poppler_form_field_choice_is_item_selected ()</title>
+<indexterm zone="poppler-form-field-choice-is-item-selected"><primary sortas="poppler_form_field_choice_is_item_selected">poppler_form_field_choice_is_item_selected</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_choice_is_item_selected
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);</programlisting>
+<para>
+Checks whether the item at the given index on <parameter>field</parameter> is currently selected</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>index</parameter>&#160;:</term>
+<listitem><simpara> the index of the item
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if item at <parameter>index</parameter> is currently selected
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-select-item" role="function">
+<title>poppler_form_field_choice_select_item ()</title>
+<indexterm zone="poppler-form-field-choice-select-item"><primary sortas="poppler_form_field_choice_select_item">poppler_form_field_choice_select_item</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_choice_select_item
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);</programlisting>
+<para>
+Selects the item at the given index on <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>index</parameter>&#160;:</term>
+<listitem><simpara> the index of the item
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-set-text" role="function">
+<title>poppler_form_field_choice_set_text ()</title>
+<indexterm zone="poppler-form-field-choice-set-text"><primary sortas="poppler_form_field_choice_set_text">poppler_form_field_choice_set_text</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_choice_set_text (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ const <link linkend="gchar">gchar</link> *text);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>text</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-toggle-item" role="function">
+<title>poppler_form_field_choice_toggle_item ()</title>
+<indexterm zone="poppler-form-field-choice-toggle-item"><primary sortas="poppler_form_field_choice_toggle_item">poppler_form_field_choice_toggle_item</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_choice_toggle_item
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ <link linkend="gint">gint</link> index);</programlisting>
+<para>
+Sets the text in <parameter>field</parameter> to the given value, replacing the current contents</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>index</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-choice-unselect-all" role="function">
+<title>poppler_form_field_choice_unselect_all ()</title>
+<indexterm zone="poppler-form-field-choice-unselect-all"><primary sortas="poppler_form_field_choice_unselect_all">poppler_form_field_choice_unselect_all</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_choice_unselect_all
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Unselects all the items on <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-do-scroll" role="function">
+<title>poppler_form_field_text_do_scroll ()</title>
+<indexterm zone="poppler-form-field-text-do-scroll"><primary sortas="poppler_form_field_text_do_scroll">poppler_form_field_text_do_scroll</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_text_do_scroll (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-do-spell-check" role="function">
+<title>poppler_form_field_text_do_spell_check ()</title>
+<indexterm zone="poppler-form-field-text-do-spell-check"><primary sortas="poppler_form_field_text_do_spell_check">poppler_form_field_text_do_spell_check</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_text_do_spell_check
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether spell checking should be done for the contents of <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if spell checking should be done for <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-get-max-len" role="function">
+<title>poppler_form_field_text_get_max_len ()</title>
+<indexterm zone="poppler-form-field-text-get-max-len"><primary sortas="poppler_form_field_text_get_max_len">poppler_form_field_text_get_max_len</primary></indexterm><programlisting><link linkend="gint">gint</link> poppler_form_field_text_get_max_len (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Retrieves the maximum allowed length of the text in <parameter>field</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the maximum allowed number of characters in <parameter>field</parameter>, or -1 if there is no maximum.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-get-text" role="function">
+<title>poppler_form_field_text_get_text ()</title>
+<indexterm zone="poppler-form-field-text-get-text"><primary sortas="poppler_form_field_text_get_text">poppler_form_field_text_get_text</primary></indexterm><programlisting><link linkend="gchar">gchar</link> * poppler_form_field_text_get_text (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Retrieves the contents of <parameter>field</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new allocated string. It must be freed with <link linkend="g-free"><function>g_free()</function></link> when done.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-get-text-type" role="function">
+<title>poppler_form_field_text_get_text_type ()</title>
+<indexterm zone="poppler-form-field-text-get-text-type"><primary sortas="poppler_form_field_text_get_text_type">poppler_form_field_text_get_text_type</primary></indexterm><programlisting><link linkend="PopplerFormTextType">PopplerFormTextType</link> poppler_form_field_text_get_text_type
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Gets the text type of <parameter>field</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PopplerFormTextType"><type>PopplerFormTextType</type></link> of <parameter>field</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-is-password" role="function">
+<title>poppler_form_field_text_is_password ()</title>
+<indexterm zone="poppler-form-field-text-is-password"><primary sortas="poppler_form_field_text_is_password">poppler_form_field_text_is_password</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_text_is_password (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether content of <parameter>field</parameter> is a password and it must be hidden</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the content of <parameter>field</parameter> is a password
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-is-rich-text" role="function">
+<title>poppler_form_field_text_is_rich_text ()</title>
+<indexterm zone="poppler-form-field-text-is-rich-text"><primary sortas="poppler_form_field_text_is_rich_text">poppler_form_field_text_is_rich_text</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_form_field_text_is_rich_text
+ (<link linkend="PopplerFormField">PopplerFormField</link> *field);</programlisting>
+<para>
+Checks whether the contents of <parameter>field</parameter> are rich text</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the contents of <parameter>field</parameter> are rich text
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-text-set-text" role="function">
+<title>poppler_form_field_text_set_text ()</title>
+<indexterm zone="poppler-form-field-text-set-text"><primary sortas="poppler_form_field_text_set_text">poppler_form_field_text_set_text</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_text_set_text (<link linkend="PopplerFormField">PopplerFormField</link> *field,
+ const <link linkend="gchar">gchar</link> *text);</programlisting>
+<para>
+Sets the text in <parameter>field</parameter> to the given value, replacing the current contents.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>field</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerFormField"><type>PopplerFormField</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>text</parameter>&#160;:</term>
+<listitem><simpara> the new text
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-layer.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-layer.xml
new file mode 100644
index 00000000000..672679654a0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-layer.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-layer">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-layer.top_of_page">PopplerLayer</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerLayer</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-layer.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+<link linkend="GType">GType</link> <link linkend="poppler-layer-get-type">poppler_layer_get_type</link> (void);
+const <link linkend="gchar">gchar</link> * <link linkend="poppler-layer-get-title">poppler_layer_get_title</link> (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-layer-is-visible">poppler_layer_is_visible</link> (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+<link linkend="void">void</link> <link linkend="poppler-layer-show">poppler_layer_show</link> (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+<link linkend="void">void</link> <link linkend="poppler-layer-hide">poppler_layer_hide</link> (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-layer-is-parent">poppler_layer_is_parent</link> (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+<link linkend="gint">gint</link> <link linkend="poppler-layer-get-radio-button-group-id">poppler_layer_get_radio_button_group_id</link>
+ (<link linkend="PopplerLayer">PopplerLayer</link> *layer);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-layer.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-layer.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="poppler-layer-get-type" role="function">
+<title>poppler_layer_get_type ()</title>
+<indexterm zone="poppler-layer-get-type"><primary sortas="poppler_layer_get_type">poppler_layer_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_layer_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-get-title" role="function">
+<title>poppler_layer_get_title ()</title>
+<indexterm zone="poppler-layer-get-title"><primary sortas="poppler_layer_get_title">poppler_layer_get_title</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> * poppler_layer_get_title (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Returns the name of the layer suitable for
+presentation as a title in a viewer's GUI</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string containing the title of the layer
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-is-visible" role="function">
+<title>poppler_layer_is_visible ()</title>
+<indexterm zone="poppler-layer-is-visible"><primary sortas="poppler_layer_is_visible">poppler_layer_is_visible</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_layer_is_visible (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Returns whether <parameter>layer</parameter> is visible</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>layer</parameter> is visible
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-show" role="function">
+<title>poppler_layer_show ()</title>
+<indexterm zone="poppler-layer-show"><primary sortas="poppler_layer_show">poppler_layer_show</primary></indexterm><programlisting><link linkend="void">void</link> poppler_layer_show (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Shows <parameter>layer</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-hide" role="function">
+<title>poppler_layer_hide ()</title>
+<indexterm zone="poppler-layer-hide"><primary sortas="poppler_layer_hide">poppler_layer_hide</primary></indexterm><programlisting><link linkend="void">void</link> poppler_layer_hide (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Hides <parameter>layer</parameter>. If <parameter>layer</parameter> is the parent of other nested layers,
+such layers will be also hidden and will be blocked until <parameter>layer</parameter>
+is shown again</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-is-parent" role="function">
+<title>poppler_layer_is_parent ()</title>
+<indexterm zone="poppler-layer-is-parent"><primary sortas="poppler_layer_is_parent">poppler_layer_is_parent</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_layer_is_parent (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Returns whether <parameter>layer</parameter> is parent of other nested layers.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>layer</parameter> is a parent layer
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-layer-get-radio-button-group-id" role="function">
+<title>poppler_layer_get_radio_button_group_id ()</title>
+<indexterm zone="poppler-layer-get-radio-button-group-id"><primary sortas="poppler_layer_get_radio_button_group_id">poppler_layer_get_radio_button_group_id</primary></indexterm><programlisting><link linkend="gint">gint</link> poppler_layer_get_radio_button_group_id
+ (<link linkend="PopplerLayer">PopplerLayer</link> *layer);</programlisting>
+<para>
+Returns the numeric ID the radio button group associated with <parameter>layer</parameter>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>layer</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerLayer"><type>PopplerLayer</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the ID of the radio button group associated with <parameter>layer</parameter>,
+or 0 if the layer is not associated to any radio button group
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-page.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-page.xml
new file mode 100644
index 00000000000..9a7d5fdf88c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-page.xml
@@ -0,0 +1,819 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-page">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-page.top_of_page">PopplerPage</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>PopplerPage</refname>
+<refpurpose>Information about a page in a document</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-page.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+<link linkend="void">void</link> <link linkend="poppler-page-render">poppler_page_render</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="cairo-t">cairo_t</link> *cairo);
+<link linkend="void">void</link> <link linkend="poppler-page-render-to-pixbuf">poppler_page_render_to_pixbuf</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="int">int</link> src_x,
+ <link linkend="int">int</link> src_y,
+ <link linkend="int">int</link> src_width,
+ <link linkend="int">int</link> src_height,
+ <link linkend="double">double</link> scale,
+ <link linkend="int">int</link> rotation,
+ <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
+<link linkend="void">void</link> <link linkend="poppler-page-get-size">poppler_page_get_size</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="double">double</link> *width,
+ <link linkend="double">double</link> *height);
+<link linkend="int">int</link> <link linkend="poppler-page-get-index">poppler_page_get_index</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="cairo-surface-t">cairo_surface_t</link> * <link linkend="poppler-page-get-thumbnail">poppler_page_get_thumbnail</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="gboolean">gboolean</link> <link linkend="poppler-page-get-thumbnail-size">poppler_page_get_thumbnail_size</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="int">int</link> *width,
+ <link linkend="int">int</link> *height);
+<link linkend="void">void</link> <link linkend="poppler-page-render-to-ps">poppler_page_render_to_ps</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file);
+<link linkend="GList">GList</link> * <link linkend="poppler-page-find-text">poppler_page_find_text</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ const <link linkend="char">char</link> *text);
+<link linkend="char">char</link> * <link linkend="poppler-page-get-text">poppler_page_get_text</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *rect);
+<link linkend="double">double</link> <link linkend="poppler-page-get-duration">poppler_page_get_duration</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="PopplerPageTransition">PopplerPageTransition</link> * <link linkend="poppler-page-get-transition">poppler_page_get_transition</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="GList">GList</link> * <link linkend="poppler-page-get-link-mapping">poppler_page_get_link_mapping</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="void">void</link> <link linkend="poppler-page-free-link-mapping">poppler_page_free_link_mapping</link> (<link linkend="GList">GList</link> *list);
+<link linkend="GList">GList</link> * <link linkend="poppler-page-get-image-mapping">poppler_page_get_image_mapping</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="void">void</link> <link linkend="poppler-page-free-image-mapping">poppler_page_free_image_mapping</link> (<link linkend="GList">GList</link> *list);
+<link linkend="GList">GList</link> * <link linkend="poppler-page-get-form-field-mapping">poppler_page_get_form_field_mapping</link> (<link linkend="PopplerPage">PopplerPage</link> *page);
+<link linkend="void">void</link> <link linkend="poppler-page-free-form-field-mapping">poppler_page_free_form_field_mapping</link>
+ (<link linkend="GList">GList</link> *list);
+<link linkend="GList">GList</link> * <link linkend="poppler-page-get-selection-region">poppler_page_get_selection_region</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="gdouble">gdouble</link> scale,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection);
+<link linkend="void">void</link> <link linkend="poppler-page-render-selection">poppler_page_render_selection</link> (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="cairo-t">cairo_t</link> *cairo,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *old_selection,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerColor">PopplerColor</link> *glyph_color,
+ <link linkend="PopplerColor">PopplerColor</link> *background_color);
+<link linkend="void">void</link> <link linkend="poppler-page-render-selection-to-pixbuf">poppler_page_render_selection_to_pixbuf</link>
+ (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="gdouble">gdouble</link> scale,
+ <link linkend="int">int</link> rotation,
+ <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *old_selection,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="GdkColor">GdkColor</link> *glyph_color,
+ <link linkend="GdkColor">GdkColor</link> *background_color);
+#define <link linkend="POPPLER-TYPE-RECTANGLE--CAPS">POPPLER_TYPE_RECTANGLE</link>
+ <link linkend="PopplerRectangle">PopplerRectangle</link>;
+<link linkend="GType">GType</link> <link linkend="poppler-rectangle-get-type">poppler_rectangle_get_type</link> (void);
+<link linkend="PopplerRectangle">PopplerRectangle</link> * <link linkend="poppler-rectangle-new">poppler_rectangle_new</link> (void);
+<link linkend="PopplerRectangle">PopplerRectangle</link> * <link linkend="poppler-rectangle-copy">poppler_rectangle_copy</link> (<link linkend="PopplerRectangle">PopplerRectangle</link> *rectangle);
+<link linkend="void">void</link> <link linkend="poppler-rectangle-free">poppler_rectangle_free</link> (<link linkend="PopplerRectangle">PopplerRectangle</link> *rectangle);
+#define <link linkend="POPPLER-TYPE-PAGE-TRANSITION--CAPS">POPPLER_TYPE_PAGE_TRANSITION</link>
+ <link linkend="PopplerPageTransition">PopplerPageTransition</link>;
+<link linkend="GType">GType</link> <link linkend="poppler-page-transition-get-type">poppler_page_transition_get_type</link> (void);
+<link linkend="PopplerPageTransition">PopplerPageTransition</link> * <link linkend="poppler-page-transition-new">poppler_page_transition_new</link> (void);
+<link linkend="PopplerPageTransition">PopplerPageTransition</link> * <link linkend="poppler-page-transition-copy">poppler_page_transition_copy</link> (<link linkend="PopplerPageTransition">PopplerPageTransition</link> *transition);
+<link linkend="void">void</link> <link linkend="poppler-page-transition-free">poppler_page_transition_free</link> (<link linkend="PopplerPageTransition">PopplerPageTransition</link> *transition);
+#define <link linkend="POPPLER-TYPE-LINK-MAPPING--CAPS">POPPLER_TYPE_LINK_MAPPING</link>
+ <link linkend="PopplerLinkMapping">PopplerLinkMapping</link>;
+<link linkend="GType">GType</link> <link linkend="poppler-link-mapping-get-type">poppler_link_mapping_get_type</link> (void);
+<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> * <link linkend="poppler-link-mapping-new">poppler_link_mapping_new</link> (void);
+<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> * <link linkend="poppler-link-mapping-copy">poppler_link_mapping_copy</link> (<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> *mapping);
+<link linkend="void">void</link> <link linkend="poppler-link-mapping-free">poppler_link_mapping_free</link> (<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> *mapping);
+#define <link linkend="POPPLER-TYPE-IMAGE-MAPPING--CAPS">POPPLER_TYPE_IMAGE_MAPPING</link>
+ <link linkend="PopplerImageMapping">PopplerImageMapping</link>;
+<link linkend="GType">GType</link> <link linkend="poppler-image-mapping-get-type">poppler_image_mapping_get_type</link> (void);
+<link linkend="PopplerImageMapping">PopplerImageMapping</link> * <link linkend="poppler-image-mapping-new">poppler_image_mapping_new</link> (void);
+<link linkend="PopplerImageMapping">PopplerImageMapping</link> * <link linkend="poppler-image-mapping-copy">poppler_image_mapping_copy</link> (<link linkend="PopplerImageMapping">PopplerImageMapping</link> *mapping);
+<link linkend="void">void</link> <link linkend="poppler-image-mapping-free">poppler_image_mapping_free</link> (<link linkend="PopplerImageMapping">PopplerImageMapping</link> *mapping);
+#define <link linkend="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS">POPPLER_TYPE_FORM_FIELD_MAPPING</link>
+ <link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link>;
+<link linkend="GType">GType</link> <link linkend="poppler-form-field-mapping-get-type">poppler_form_field_mapping_get_type</link> (void);
+<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> * <link linkend="poppler-form-field-mapping-new">poppler_form_field_mapping_new</link>
+ (void);
+<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> * <link linkend="poppler-form-field-mapping-copy">poppler_form_field_mapping_copy</link>
+ (<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> *mapping);
+<link linkend="void">void</link> <link linkend="poppler-form-field-mapping-free">poppler_form_field_mapping_free</link> (<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> *mapping);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 id="poppler-poppler-page.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-page.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="poppler-page-render" role="function">
+<title>poppler_page_render ()</title>
+<indexterm zone="poppler-page-render"><primary sortas="poppler_page_render">poppler_page_render</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_render (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="cairo-t">cairo_t</link> *cairo);</programlisting>
+<para>
+Render the page to the given cairo context. This function
+is for rendering a page that will be displayed. If you want
+to render a page that will be printed use
+<link linkend="poppler-page-render-for-printing"><function>poppler_page_render_for_printing()</function></link> instead</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> the page to render from
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>cairo</parameter>&#160;:</term>
+<listitem><simpara> cairo context to render to
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-render-to-pixbuf" role="function">
+<title>poppler_page_render_to_pixbuf ()</title>
+<indexterm zone="poppler-page-render-to-pixbuf"><primary sortas="poppler_page_render_to_pixbuf">poppler_page_render_to_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_render_to_pixbuf (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="int">int</link> src_x,
+ <link linkend="int">int</link> src_y,
+ <link linkend="int">int</link> src_width,
+ <link linkend="int">int</link> src_height,
+ <link linkend="double">double</link> scale,
+ <link linkend="int">int</link> rotation,
+ <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
+<para>
+First scale the document to match the specified pixels per point,
+then render the rectangle given by the upper left corner at
+(src_x, src_y) and src_width and src_height.
+This function is for rendering a page that will be displayed.
+If you want to render a page that will be printed use
+<link linkend="poppler-page-render-to-pixbuf-for-printing"><function>poppler_page_render_to_pixbuf_for_printing()</function></link> instead</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> the page to render from
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>src_x</parameter>&#160;:</term>
+<listitem><simpara> x coordinate of upper left corner
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>src_y</parameter>&#160;:</term>
+<listitem><simpara> y coordinate of upper left corner
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>src_width</parameter>&#160;:</term>
+<listitem><simpara> width of rectangle to render
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>src_height</parameter>&#160;:</term>
+<listitem><simpara> height of rectangle to render
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>scale</parameter>&#160;:</term>
+<listitem><simpara> scale specified as pixels per point
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&#160;:</term>
+<listitem><simpara> rotate the document by the specified degree
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
+<listitem><simpara> pixbuf to render into
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-size" role="function">
+<title>poppler_page_get_size ()</title>
+<indexterm zone="poppler-page-get-size"><primary sortas="poppler_page_get_size">poppler_page_get_size</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_get_size (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="double">double</link> *width,
+ <link linkend="double">double</link> *height);</programlisting>
+<para>
+Gets the size of <parameter>page</parameter> at the current scale and rotation.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&#160;:</term>
+<listitem><simpara> return location for the width of <parameter>page</parameter>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&#160;:</term>
+<listitem><simpara> return location for the height of <parameter>page</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-index" role="function">
+<title>poppler_page_get_index ()</title>
+<indexterm zone="poppler-page-get-index"><primary sortas="poppler_page_get_index">poppler_page_get_index</primary></indexterm><programlisting><link linkend="int">int</link> poppler_page_get_index (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns the index of <parameter>page</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> index value of <parameter>page</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-thumbnail" role="function">
+<title>poppler_page_get_thumbnail ()</title>
+<indexterm zone="poppler-page-get-thumbnail"><primary sortas="poppler_page_get_thumbnail">poppler_page_get_thumbnail</primary></indexterm><programlisting><link linkend="cairo-surface-t">cairo_surface_t</link> * poppler_page_get_thumbnail (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Get the embedded thumbnail for the specified page. If the document
+doesn't have an embedded thumbnail for the page, this function
+returns <link linkend="NULL--CAPS"><literal>NULL</literal></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> the <link linkend="PopperPage"><type>PopperPage</type></link> to get the thumbnail for
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the tumbnail as a cairo_surface_t or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the document
+doesn't have a thumbnail for this page.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-thumbnail-size" role="function">
+<title>poppler_page_get_thumbnail_size ()</title>
+<indexterm zone="poppler-page-get-thumbnail-size"><primary sortas="poppler_page_get_thumbnail_size">poppler_page_get_thumbnail_size</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> poppler_page_get_thumbnail_size (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="int">int</link> *width,
+ <link linkend="int">int</link> *height);</programlisting>
+<para>
+Returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>page</parameter> has a thumbnail associated with it. It also
+fills in <parameter>width</parameter> and <parameter>height</parameter> with the width and height of the
+thumbnail. The values of width and height are not changed if no
+appropriate thumbnail exists.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&#160;:</term>
+<listitem><simpara> return location for width
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&#160;:</term>
+<listitem><simpara> return location for height
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if <parameter>page</parameter> has a thumbnail associated with it.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-render-to-ps" role="function">
+<title>poppler_page_render_to_ps ()</title>
+<indexterm zone="poppler-page-render-to-ps"><primary sortas="poppler_page_render_to_ps">poppler_page_render_to_ps</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_render_to_ps (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="PopplerPSFile">PopplerPSFile</link> *ps_file);</programlisting>
+<para>
+Render the page on a postscript file</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>ps_file</parameter>&#160;:</term>
+<listitem><simpara> the PopplerPSFile to render to
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-find-text" role="function">
+<title>poppler_page_find_text ()</title>
+<indexterm zone="poppler-page-find-text"><primary sortas="poppler_page_find_text">poppler_page_find_text</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_page_find_text (<link linkend="PopplerPage">PopplerPage</link> *page,
+ const <link linkend="char">char</link> *text);</programlisting>
+<para>
+A <link linkend="GList"><type>GList</type></link> of rectangles for each occurance of the text on the page.
+The coordinates are in PDF points.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>text</parameter>&#160;:</term>
+<listitem><simpara> the text to search for (UTF-8 encoded)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of PopplerRectangle,
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-text" role="function">
+<title>poppler_page_get_text ()</title>
+<indexterm zone="poppler-page-get-text"><primary sortas="poppler_page_get_text">poppler_page_get_text</primary></indexterm><programlisting><link linkend="char">char</link> * poppler_page_get_text (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *rect);</programlisting>
+<para>
+Retrieves the contents of the specified <parameter>selection</parameter> as text.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>style</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerSelectionStyle"><type>PopplerSelectionStyle</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rect</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to the contents of the <parameter>selection</parameter>
+ as a string
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-duration" role="function">
+<title>poppler_page_get_duration ()</title>
+<indexterm zone="poppler-page-get-duration"><primary sortas="poppler_page_get_duration">poppler_page_get_duration</primary></indexterm><programlisting><link linkend="double">double</link> poppler_page_get_duration (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns the duration of <parameter>page</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> duration in seconds of <parameter>page</parameter> or -1.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-transition" role="function">
+<title>poppler_page_get_transition ()</title>
+<indexterm zone="poppler-page-get-transition"><primary sortas="poppler_page_get_transition">poppler_page_get_transition</primary></indexterm><programlisting><link linkend="PopplerPageTransition">PopplerPageTransition</link> * poppler_page_get_transition (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns the transition effect of <parameter>page</parameter></para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="PopplerPageTransition"><type>PopplerPageTransition</type></link> or NULL.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-link-mapping" role="function">
+<title>poppler_page_get_link_mapping ()</title>
+<indexterm zone="poppler-page-get-link-mapping"><primary sortas="poppler_page_get_link_mapping">poppler_page_get_link_mapping</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_page_get_link_mapping (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns a list of <link linkend="PopplerLinkMapping"><type>PopplerLinkMapping</type></link> items that map from a
+location on <parameter>page</parameter> to a <link linkend="PopplerAction"><type>PopplerAction</type></link>. This list must be freed
+with <link linkend="poppler-page-free-link-mapping"><function>poppler_page_free_link_mapping()</function></link> when done.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GList"><type>GList</type></link> of <link linkend="PopplerLinkMapping"><type>PopplerLinkMapping</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-free-link-mapping" role="function">
+<title>poppler_page_free_link_mapping ()</title>
+<indexterm zone="poppler-page-free-link-mapping"><primary sortas="poppler_page_free_link_mapping">poppler_page_free_link_mapping</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_free_link_mapping (<link linkend="GList">GList</link> *list);</programlisting>
+<para>
+Frees a list of <link linkend="PopplerLinkMapping"><type>PopplerLinkMapping</type></link><!-- -->s allocated by
+<link linkend="poppler-page-get-link-mapping"><function>poppler_page_get_link_mapping()</function></link>. It also frees the <link linkend="PopplerAction"><type>PopplerAction</type></link><!-- -->s
+that each mapping contains, so if you want to keep them around, you need to
+copy them with <link linkend="poppler-action-copy"><function>poppler_action_copy()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>list</parameter>&#160;:</term>
+<listitem><simpara> A list of <link linkend="PopplerLinkMapping"><type>PopplerLinkMapping</type></link><!-- -->s
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-image-mapping" role="function">
+<title>poppler_page_get_image_mapping ()</title>
+<indexterm zone="poppler-page-get-image-mapping"><primary sortas="poppler_page_get_image_mapping">poppler_page_get_image_mapping</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_page_get_image_mapping (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns a list of <link linkend="PopplerImageMapping"><type>PopplerImageMapping</type></link> items that map from a
+location on <parameter>page</parameter> to an image of the page. This list must be freed
+with <link linkend="poppler-page-free-image-mapping"><function>poppler_page_free_image_mapping()</function></link> when done.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GList"><type>GList</type></link> of <link linkend="PopplerImageMapping"><type>PopplerImageMapping</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-free-image-mapping" role="function">
+<title>poppler_page_free_image_mapping ()</title>
+<indexterm zone="poppler-page-free-image-mapping"><primary sortas="poppler_page_free_image_mapping">poppler_page_free_image_mapping</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_free_image_mapping (<link linkend="GList">GList</link> *list);</programlisting>
+<para>
+Frees a list of <link linkend="PopplerImageMapping"><type>PopplerImageMapping</type></link><!-- -->s allocated by
+<link linkend="poppler-page-get-image-mapping"><function>poppler_page_get_image_mapping()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>list</parameter>&#160;:</term>
+<listitem><simpara> A list of <link linkend="PopplerImageMapping"><type>PopplerImageMapping</type></link><!-- -->s
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-form-field-mapping" role="function">
+<title>poppler_page_get_form_field_mapping ()</title>
+<indexterm zone="poppler-page-get-form-field-mapping"><primary sortas="poppler_page_get_form_field_mapping">poppler_page_get_form_field_mapping</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_page_get_form_field_mapping (<link linkend="PopplerPage">PopplerPage</link> *page);</programlisting>
+<para>
+Returns a list of <link linkend="PopplerFormFieldMapping"><type>PopplerFormFieldMapping</type></link> items that map from a
+location on <parameter>page</parameter> to a form field. This list must be freed
+with <link linkend="poppler-page-free-form-field-mapping"><function>poppler_page_free_form_field_mapping()</function></link> when done.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> A <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GList"><type>GList</type></link> of <link linkend="PopplerFormFieldMapping"><type>PopplerFormFieldMapping</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-free-form-field-mapping" role="function">
+<title>poppler_page_free_form_field_mapping ()</title>
+<indexterm zone="poppler-page-free-form-field-mapping"><primary sortas="poppler_page_free_form_field_mapping">poppler_page_free_form_field_mapping</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_free_form_field_mapping
+ (<link linkend="GList">GList</link> *list);</programlisting>
+<para>
+Frees a list of <link linkend="PopplerFormFieldMapping"><type>PopplerFormFieldMapping</type></link><!-- -->s allocated by
+<link linkend="poppler-page-get-form-field-mapping"><function>poppler_page_get_form_field_mapping()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>list</parameter>&#160;:</term>
+<listitem><simpara> A list of <link linkend="PopplerFormFieldMapping"><type>PopplerFormFieldMapping</type></link><!-- -->s
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-get-selection-region" role="function">
+<title>poppler_page_get_selection_region ()</title>
+<indexterm zone="poppler-page-get-selection-region"><primary sortas="poppler_page_get_selection_region">poppler_page_get_selection_region</primary></indexterm><programlisting><link linkend="GList">GList</link> * poppler_page_get_selection_region (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="gdouble">gdouble</link> scale,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection);</programlisting>
+<para>
+Returns a region containing the area that would be rendered by
+<link linkend="poppler-page-render-selection"><function>poppler_page_render_selection()</function></link> or
+<link linkend="poppler-page-render-selection-to-pixbuf"><function>poppler_page_render_selection_to_pixbuf()</function></link> as a <link linkend="GList"><type>GList</type></link> of
+<link linkend="PopplerRectangle"><type>PopplerRectangle</type></link>. The returned list must be freed with
+<link linkend="poppler-page-selection-region-free"><function>poppler_page_selection_region_free()</function></link>.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerPage"><type>PopplerPage</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>scale</parameter>&#160;:</term>
+<listitem><simpara> scale specified as pixels per point
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>style</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerSelectionStyle"><type>PopplerSelectionStyle</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>selection</parameter>&#160;:</term>
+<listitem><simpara> start and end point of selection as a rectangle
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="PopplerRectangle"><type>PopplerRectangle</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-render-selection" role="function">
+<title>poppler_page_render_selection ()</title>
+<indexterm zone="poppler-page-render-selection"><primary sortas="poppler_page_render_selection">poppler_page_render_selection</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_render_selection (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="cairo-t">cairo_t</link> *cairo,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *old_selection,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="PopplerColor">PopplerColor</link> *glyph_color,
+ <link linkend="PopplerColor">PopplerColor</link> *background_color);</programlisting>
+<para>
+Render the selection specified by <parameter>selection</parameter> for <parameter>page</parameter> to
+the given cairo context. The selection will be rendered, using
+<parameter>glyph_color</parameter> for the glyphs and <parameter>background_color</parameter> for the selection
+background.
+</para>
+<para>
+If non-NULL, <parameter>old_selection</parameter> specifies the selection that is already
+rendered to <parameter>cairo</parameter>, in which case this function will (some day)
+only render the changed part of the selection.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> the <link linkend="PopplerPage"><type>PopplerPage</type></link> for which to render selection
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>cairo</parameter>&#160;:</term>
+<listitem><simpara> cairo context to render to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>selection</parameter>&#160;:</term>
+<listitem><simpara> start and end point of selection as a rectangle
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>old_selection</parameter>&#160;:</term>
+<listitem><simpara> previous selection
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>style</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerSelectionStyle"><type>PopplerSelectionStyle</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>glyph_color</parameter>&#160;:</term>
+<listitem><simpara> color to use for drawing glyphs
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>background_color</parameter>&#160;:</term>
+<listitem><simpara> color to use for the selection background
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-render-selection-to-pixbuf" role="function">
+<title>poppler_page_render_selection_to_pixbuf ()</title>
+<indexterm zone="poppler-page-render-selection-to-pixbuf"><primary sortas="poppler_page_render_selection_to_pixbuf">poppler_page_render_selection_to_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_render_selection_to_pixbuf
+ (<link linkend="PopplerPage">PopplerPage</link> *page,
+ <link linkend="gdouble">gdouble</link> scale,
+ <link linkend="int">int</link> rotation,
+ <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *selection,
+ <link linkend="PopplerRectangle">PopplerRectangle</link> *old_selection,
+ <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link> style,
+ <link linkend="GdkColor">GdkColor</link> *glyph_color,
+ <link linkend="GdkColor">GdkColor</link> *background_color);</programlisting>
+<para>
+Render the selection specified by <parameter>selection</parameter> for <parameter>page</parameter> into
+<parameter>pixbuf</parameter>. The selection will be rendered at <parameter>scale</parameter>, using
+<parameter>glyph_color</parameter> for the glyphs and <parameter>background_color</parameter> for the selection
+background.
+</para>
+<para>
+If non-NULL, <parameter>old_selection</parameter> specifies the selection that is already
+rendered in <parameter>pixbuf</parameter>, in which case this function will (some day)
+only render the changed part of the selection.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>page</parameter>&#160;:</term>
+<listitem><simpara> the <link linkend="PopplerPage"><type>PopplerPage</type></link> for which to render selection
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>scale</parameter>&#160;:</term>
+<listitem><simpara> scale specified as pixels per point
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&#160;:</term>
+<listitem><simpara> rotate the document by the specified degree
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
+<listitem><simpara> pixbuf to render to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>selection</parameter>&#160;:</term>
+<listitem><simpara> start and end point of selection as a rectangle
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>old_selection</parameter>&#160;:</term>
+<listitem><simpara> previous selection
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>style</parameter>&#160;:</term>
+<listitem><simpara> a <link linkend="PopplerSelectionStyle"><type>PopplerSelectionStyle</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>glyph_color</parameter>&#160;:</term>
+<listitem><simpara> color to use for drawing glyphs
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>background_color</parameter>&#160;:</term>
+<listitem><simpara> color to use for the selection background
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-RECTANGLE--CAPS" role="macro">
+<title>POPPLER_TYPE_RECTANGLE</title>
+<indexterm zone="POPPLER-TYPE-RECTANGLE--CAPS"><primary sortas="POPPLER_TYPE_RECTANGLE">POPPLER_TYPE_RECTANGLE</primary></indexterm><programlisting>#define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerRectangle" role="struct">
+<title>PopplerRectangle</title>
+<indexterm zone="PopplerRectangle"><primary sortas="PopplerRectangle">PopplerRectangle</primary></indexterm><programlisting>typedef struct {
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+} PopplerRectangle;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-rectangle-get-type" role="function">
+<title>poppler_rectangle_get_type ()</title>
+<indexterm zone="poppler-rectangle-get-type"><primary sortas="poppler_rectangle_get_type">poppler_rectangle_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_rectangle_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-rectangle-new" role="function">
+<title>poppler_rectangle_new ()</title>
+<indexterm zone="poppler-rectangle-new"><primary sortas="poppler_rectangle_new">poppler_rectangle_new</primary></indexterm><programlisting><link linkend="PopplerRectangle">PopplerRectangle</link> * poppler_rectangle_new (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-rectangle-copy" role="function">
+<title>poppler_rectangle_copy ()</title>
+<indexterm zone="poppler-rectangle-copy"><primary sortas="poppler_rectangle_copy">poppler_rectangle_copy</primary></indexterm><programlisting><link linkend="PopplerRectangle">PopplerRectangle</link> * poppler_rectangle_copy (<link linkend="PopplerRectangle">PopplerRectangle</link> *rectangle);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>rectangle</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-rectangle-free" role="function">
+<title>poppler_rectangle_free ()</title>
+<indexterm zone="poppler-rectangle-free"><primary sortas="poppler_rectangle_free">poppler_rectangle_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_rectangle_free (<link linkend="PopplerRectangle">PopplerRectangle</link> *rectangle);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>rectangle</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-PAGE-TRANSITION--CAPS" role="macro">
+<title>POPPLER_TYPE_PAGE_TRANSITION</title>
+<indexterm zone="POPPLER-TYPE-PAGE-TRANSITION--CAPS"><primary sortas="POPPLER_TYPE_PAGE_TRANSITION">POPPLER_TYPE_PAGE_TRANSITION</primary></indexterm><programlisting>#define POPPLER_TYPE_PAGE_TRANSITION (poppler_page_transition_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPageTransition" role="struct">
+<title>PopplerPageTransition</title>
+<indexterm zone="PopplerPageTransition"><primary sortas="PopplerPageTransition">PopplerPageTransition</primary></indexterm><programlisting>typedef struct {
+ PopplerPageTransitionType type;
+ PopplerPageTransitionAlignment alignment;
+ PopplerPageTransitionDirection direction;
+ gint duration;
+ gint angle;
+ gdouble scale;
+ gboolean rectangular;
+} PopplerPageTransition;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-page-transition-get-type" role="function">
+<title>poppler_page_transition_get_type ()</title>
+<indexterm zone="poppler-page-transition-get-type"><primary sortas="poppler_page_transition_get_type">poppler_page_transition_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_page_transition_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-transition-new" role="function">
+<title>poppler_page_transition_new ()</title>
+<indexterm zone="poppler-page-transition-new"><primary sortas="poppler_page_transition_new">poppler_page_transition_new</primary></indexterm><programlisting><link linkend="PopplerPageTransition">PopplerPageTransition</link> * poppler_page_transition_new (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-transition-copy" role="function">
+<title>poppler_page_transition_copy ()</title>
+<indexterm zone="poppler-page-transition-copy"><primary sortas="poppler_page_transition_copy">poppler_page_transition_copy</primary></indexterm><programlisting><link linkend="PopplerPageTransition">PopplerPageTransition</link> * poppler_page_transition_copy (<link linkend="PopplerPageTransition">PopplerPageTransition</link> *transition);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>transition</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-page-transition-free" role="function">
+<title>poppler_page_transition_free ()</title>
+<indexterm zone="poppler-page-transition-free"><primary sortas="poppler_page_transition_free">poppler_page_transition_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_page_transition_free (<link linkend="PopplerPageTransition">PopplerPageTransition</link> *transition);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>transition</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-LINK-MAPPING--CAPS" role="macro">
+<title>POPPLER_TYPE_LINK_MAPPING</title>
+<indexterm zone="POPPLER-TYPE-LINK-MAPPING--CAPS"><primary sortas="POPPLER_TYPE_LINK_MAPPING">POPPLER_TYPE_LINK_MAPPING</primary></indexterm><programlisting>#define POPPLER_TYPE_LINK_MAPPING (poppler_link_mapping_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerLinkMapping" role="struct">
+<title>PopplerLinkMapping</title>
+<indexterm zone="PopplerLinkMapping"><primary sortas="PopplerLinkMapping">PopplerLinkMapping</primary></indexterm><programlisting>typedef struct {
+ PopplerRectangle area;
+ PopplerAction *action;
+} PopplerLinkMapping;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-link-mapping-get-type" role="function">
+<title>poppler_link_mapping_get_type ()</title>
+<indexterm zone="poppler-link-mapping-get-type"><primary sortas="poppler_link_mapping_get_type">poppler_link_mapping_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_link_mapping_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-link-mapping-new" role="function">
+<title>poppler_link_mapping_new ()</title>
+<indexterm zone="poppler-link-mapping-new"><primary sortas="poppler_link_mapping_new">poppler_link_mapping_new</primary></indexterm><programlisting><link linkend="PopplerLinkMapping">PopplerLinkMapping</link> * poppler_link_mapping_new (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-link-mapping-copy" role="function">
+<title>poppler_link_mapping_copy ()</title>
+<indexterm zone="poppler-link-mapping-copy"><primary sortas="poppler_link_mapping_copy">poppler_link_mapping_copy</primary></indexterm><programlisting><link linkend="PopplerLinkMapping">PopplerLinkMapping</link> * poppler_link_mapping_copy (<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-link-mapping-free" role="function">
+<title>poppler_link_mapping_free ()</title>
+<indexterm zone="poppler-link-mapping-free"><primary sortas="poppler_link_mapping_free">poppler_link_mapping_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_link_mapping_free (<link linkend="PopplerLinkMapping">PopplerLinkMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-IMAGE-MAPPING--CAPS" role="macro">
+<title>POPPLER_TYPE_IMAGE_MAPPING</title>
+<indexterm zone="POPPLER-TYPE-IMAGE-MAPPING--CAPS"><primary sortas="POPPLER_TYPE_IMAGE_MAPPING">POPPLER_TYPE_IMAGE_MAPPING</primary></indexterm><programlisting>#define POPPLER_TYPE_IMAGE_MAPPING (poppler_image_mapping_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerImageMapping" role="struct">
+<title>PopplerImageMapping</title>
+<indexterm zone="PopplerImageMapping"><primary sortas="PopplerImageMapping">PopplerImageMapping</primary></indexterm><programlisting>typedef struct {
+ PopplerRectangle area;
+ gint image_id;
+} PopplerImageMapping;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-image-mapping-get-type" role="function">
+<title>poppler_image_mapping_get_type ()</title>
+<indexterm zone="poppler-image-mapping-get-type"><primary sortas="poppler_image_mapping_get_type">poppler_image_mapping_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_image_mapping_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-image-mapping-new" role="function">
+<title>poppler_image_mapping_new ()</title>
+<indexterm zone="poppler-image-mapping-new"><primary sortas="poppler_image_mapping_new">poppler_image_mapping_new</primary></indexterm><programlisting><link linkend="PopplerImageMapping">PopplerImageMapping</link> * poppler_image_mapping_new (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-image-mapping-copy" role="function">
+<title>poppler_image_mapping_copy ()</title>
+<indexterm zone="poppler-image-mapping-copy"><primary sortas="poppler_image_mapping_copy">poppler_image_mapping_copy</primary></indexterm><programlisting><link linkend="PopplerImageMapping">PopplerImageMapping</link> * poppler_image_mapping_copy (<link linkend="PopplerImageMapping">PopplerImageMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-image-mapping-free" role="function">
+<title>poppler_image_mapping_free ()</title>
+<indexterm zone="poppler-image-mapping-free"><primary sortas="poppler_image_mapping_free">poppler_image_mapping_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_image_mapping_free (<link linkend="PopplerImageMapping">PopplerImageMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS" role="macro">
+<title>POPPLER_TYPE_FORM_FIELD_MAPPING</title>
+<indexterm zone="POPPLER-TYPE-FORM-FIELD-MAPPING--CAPS"><primary sortas="POPPLER_TYPE_FORM_FIELD_MAPPING">POPPLER_TYPE_FORM_FIELD_MAPPING</primary></indexterm><programlisting>#define POPPLER_TYPE_FORM_FIELD_MAPPING (poppler_form_field_mapping_get_type ())
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFormFieldMapping" role="struct">
+<title>PopplerFormFieldMapping</title>
+<indexterm zone="PopplerFormFieldMapping"><primary sortas="PopplerFormFieldMapping">PopplerFormFieldMapping</primary></indexterm><programlisting>typedef struct {
+ PopplerRectangle area;
+ PopplerFormField *field;
+} PopplerFormFieldMapping;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-form-field-mapping-get-type" role="function">
+<title>poppler_form_field_mapping_get_type ()</title>
+<indexterm zone="poppler-form-field-mapping-get-type"><primary sortas="poppler_form_field_mapping_get_type">poppler_form_field_mapping_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link> poppler_form_field_mapping_get_type (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-mapping-new" role="function">
+<title>poppler_form_field_mapping_new ()</title>
+<indexterm zone="poppler-form-field-mapping-new"><primary sortas="poppler_form_field_mapping_new">poppler_form_field_mapping_new</primary></indexterm><programlisting><link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> * poppler_form_field_mapping_new
+ (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-mapping-copy" role="function">
+<title>poppler_form_field_mapping_copy ()</title>
+<indexterm zone="poppler-form-field-mapping-copy"><primary sortas="poppler_form_field_mapping_copy">poppler_form_field_mapping_copy</primary></indexterm><programlisting><link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> * poppler_form_field_mapping_copy
+ (<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-form-field-mapping-free" role="function">
+<title>poppler_form_field_mapping_free ()</title>
+<indexterm zone="poppler-form-field-mapping-free"><primary sortas="poppler_form_field_mapping_free">poppler_form_field_mapping_free</primary></indexterm><programlisting><link linkend="void">void</link> poppler_form_field_mapping_free (<link linkend="PopplerFormFieldMapping">PopplerFormFieldMapping</link> *mapping);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><parameter>mapping</parameter>&#160;:</term>
+<listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-private.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-private.xml
new file mode 100644
index 00000000000..71b5245f472
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler-private.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler-private">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler-private.top_of_page">poppler-private</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>poppler-private</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler-private.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+<anchor id="PopplerDocument"/><anchor id="PopplerPage"/>
+<synopsis>
+ <link linkend="PopplerDocument-struct">PopplerDocument</link>;
+ <link linkend="PopplerPSFile">PopplerPSFile</link>;
+ <link linkend="PopplerFontInfo">PopplerFontInfo</link>;
+ <link linkend="PopplerPage-struct">PopplerPage</link>;
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1 id="poppler-poppler-private.object-hierarchy" role="object_hierarchy">
+<title role="object_hierarchy.title">Object Hierarchy</title>
+<synopsis>
+ <link linkend="GObject">GObject</link>
+ +----PopplerDocument
+</synopsis>
+<synopsis>
+ <link linkend="GObject">GObject</link>
+ +----PopplerPage
+</synopsis>
+</refsect1>
+
+
+
+
+
+<refsect1 id="poppler-poppler-private.properties" role="properties">
+<title role="properties.title">Properties</title>
+<synopsis>
+ &quot;<link linkend="PopplerDocument--author">author</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--creation-date">creation-date</link>&quot; <link linkend="gint">gint</link> : Read
+ &quot;<link linkend="PopplerDocument--creator">creator</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--format">format</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--format-major">format-major</link>&quot; <link linkend="guint">guint</link> : Read
+ &quot;<link linkend="PopplerDocument--format-minor">format-minor</link>&quot; <link linkend="guint">guint</link> : Read
+ &quot;<link linkend="PopplerDocument--keywords">keywords</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--linearized">linearized</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--metadata">metadata</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--mod-date">mod-date</link>&quot; <link linkend="gint">gint</link> : Read
+ &quot;<link linkend="PopplerDocument--page-layout">page-layout</link>&quot; <link linkend="PopplerPageLayout">PopplerPageLayout</link> : Read
+ &quot;<link linkend="PopplerDocument--page-mode">page-mode</link>&quot; <link linkend="PopplerPageMode">PopplerPageMode</link> : Read
+ &quot;<link linkend="PopplerDocument--permissions">permissions</link>&quot; <link linkend="PopplerPermissions">PopplerPermissions</link> : Read
+ &quot;<link linkend="PopplerDocument--producer">producer</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--subject">subject</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--title">title</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--viewer-preferences">viewer-preferences</link>&quot; <link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link> : Read
+ &quot;<link linkend="PopplerPage--label">label</link>&quot; <link linkend="gchar">gchar</link>* : Read
+</synopsis>
+</refsect1>
+
+
+
+<refsect1 id="poppler-poppler-private.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler-private.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="PopplerDocument-struct" role="struct">
+<title>PopplerDocument</title>
+<indexterm zone="PopplerDocument-struct"><primary sortas="PopplerDocument">PopplerDocument</primary></indexterm><programlisting>typedef struct _PopplerDocument PopplerDocument;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPSFile" role="struct">
+<title>PopplerPSFile</title>
+<indexterm zone="PopplerPSFile"><primary sortas="PopplerPSFile">PopplerPSFile</primary></indexterm><programlisting>typedef struct {
+ GObject parent_instance;
+
+ PopplerDocument *document;
+ PSOutputDev *out;
+ char *filename;
+ int first_page;
+ int last_page;
+ double paper_width;
+ double paper_height;
+ gboolean duplex;
+} PopplerPSFile;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFontInfo" role="struct">
+<title>PopplerFontInfo</title>
+<indexterm zone="PopplerFontInfo"><primary sortas="PopplerFontInfo">PopplerFontInfo</primary></indexterm><programlisting>typedef struct {
+ GObject parent_instance;
+ PopplerDocument *document;
+ FontInfoScanner *scanner;
+} PopplerFontInfo;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPage-struct" role="struct">
+<title>PopplerPage</title>
+<indexterm zone="PopplerPage-struct"><primary sortas="PopplerPage">PopplerPage</primary></indexterm><programlisting>typedef struct _PopplerPage PopplerPage;</programlisting>
+<para>
+</para></refsect2>
+
+</refsect1>
+<refsect1 id="poppler-poppler-private.property-details" role="property_details">
+<title role="property_details.title">Property Details</title>
+<refsect2 id="PopplerDocument--author" role="property"><title>The <literal>&quot;author&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--author"><primary sortas="PopplerDocument:author">PopplerDocument:author</primary></indexterm><programlisting> &quot;author&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The author of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--creation-date" role="property"><title>The <literal>&quot;creation-date&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--creation-date"><primary sortas="PopplerDocument:creation-date">PopplerDocument:creation-date</primary></indexterm><programlisting> &quot;creation-date&quot; <link linkend="gint">gint</link> : Read</programlisting>
+<para>The date and time the document was created.</para><para>Allowed values: &gt;= 0</para>
+<para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--creator" role="property"><title>The <literal>&quot;creator&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--creator"><primary sortas="PopplerDocument:creator">PopplerDocument:creator</primary></indexterm><programlisting> &quot;creator&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The software that created the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format" role="property"><title>The <literal>&quot;format&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format"><primary sortas="PopplerDocument:format">PopplerDocument:format</primary></indexterm><programlisting> &quot;format&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The PDF version of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format-major" role="property"><title>The <literal>&quot;format-major&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format-major"><primary sortas="PopplerDocument:format-major">PopplerDocument:format-major</primary></indexterm><programlisting> &quot;format-major&quot; <link linkend="guint">guint</link> : Read</programlisting>
+<para>The PDF major version number of the document.</para><para>Default value: 1</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format-minor" role="property"><title>The <literal>&quot;format-minor&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format-minor"><primary sortas="PopplerDocument:format-minor">PopplerDocument:format-minor</primary></indexterm><programlisting> &quot;format-minor&quot; <link linkend="guint">guint</link> : Read</programlisting>
+<para>The PDF minor version number of the document.</para><para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--keywords" role="property"><title>The <literal>&quot;keywords&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--keywords"><primary sortas="PopplerDocument:keywords">PopplerDocument:keywords</primary></indexterm><programlisting> &quot;keywords&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Keywords.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--linearized" role="property"><title>The <literal>&quot;linearized&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--linearized"><primary sortas="PopplerDocument:linearized">PopplerDocument:linearized</primary></indexterm><programlisting> &quot;linearized&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Is the document optimized for web viewing?.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--metadata" role="property"><title>The <literal>&quot;metadata&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--metadata"><primary sortas="PopplerDocument:metadata">PopplerDocument:metadata</primary></indexterm><programlisting> &quot;metadata&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Embedded XML metadata.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--mod-date" role="property"><title>The <literal>&quot;mod-date&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--mod-date"><primary sortas="PopplerDocument:mod-date">PopplerDocument:mod-date</primary></indexterm><programlisting> &quot;mod-date&quot; <link linkend="gint">gint</link> : Read</programlisting>
+<para>The date and time the document was modified.</para><para>Allowed values: &gt;= 0</para>
+<para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--page-layout" role="property"><title>The <literal>&quot;page-layout&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--page-layout"><primary sortas="PopplerDocument:page-layout">PopplerDocument:page-layout</primary></indexterm><programlisting> &quot;page-layout&quot; <link linkend="PopplerPageLayout">PopplerPageLayout</link> : Read</programlisting>
+<para>Initial Page Layout.</para><para>Default value: POPPLER_PAGE_LAYOUT_UNSET</para>
+</refsect2>
+<refsect2 id="PopplerDocument--page-mode" role="property"><title>The <literal>&quot;page-mode&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--page-mode"><primary sortas="PopplerDocument:page-mode">PopplerDocument:page-mode</primary></indexterm><programlisting> &quot;page-mode&quot; <link linkend="PopplerPageMode">PopplerPageMode</link> : Read</programlisting>
+<para>Page Mode.</para><para>Default value: POPPLER_PAGE_MODE_UNSET</para>
+</refsect2>
+<refsect2 id="PopplerDocument--permissions" role="property"><title>The <literal>&quot;permissions&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--permissions"><primary sortas="PopplerDocument:permissions">PopplerDocument:permissions</primary></indexterm><programlisting> &quot;permissions&quot; <link linkend="PopplerPermissions">PopplerPermissions</link> : Read</programlisting>
+<para>Permissions.</para><para>Default value: POPPLER_PERMISSIONS_OK_TO_PRINT|POPPLER_PERMISSIONS_OK_TO_MODIFY|POPPLER_PERMISSIONS_OK_TO_COPY|POPPLER_PERMISSIONS_OK_TO_ADD_NOTES|POPPLER_PERMISSIONS_OK_TO_FILL_FORM</para>
+</refsect2>
+<refsect2 id="PopplerDocument--producer" role="property"><title>The <literal>&quot;producer&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--producer"><primary sortas="PopplerDocument:producer">PopplerDocument:producer</primary></indexterm><programlisting> &quot;producer&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The software that converted the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--subject" role="property"><title>The <literal>&quot;subject&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--subject"><primary sortas="PopplerDocument:subject">PopplerDocument:subject</primary></indexterm><programlisting> &quot;subject&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Subjects the document touches.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--title" role="property"><title>The <literal>&quot;title&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--title"><primary sortas="PopplerDocument:title">PopplerDocument:title</primary></indexterm><programlisting> &quot;title&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The title of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--viewer-preferences" role="property"><title>The <literal>&quot;viewer-preferences&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--viewer-preferences"><primary sortas="PopplerDocument:viewer-preferences">PopplerDocument:viewer-preferences</primary></indexterm><programlisting> &quot;viewer-preferences&quot; <link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link> : Read</programlisting>
+<para>Viewer Preferences.</para></refsect2>
+<refsect2 id="PopplerPage--label" role="property"><title>The <literal>&quot;label&quot;</literal> property</title>
+<indexterm zone="PopplerPage--label"><primary sortas="PopplerPage:label">PopplerPage:label</primary></indexterm><programlisting> &quot;label&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The label of the page.</para><para>Default value: NULL</para>
+</refsect2>
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler.xml b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler.xml
new file mode 100644
index 00000000000..a347b370f90
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/reference/xml/poppler.xml
@@ -0,0 +1,362 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="poppler-poppler">
+<refmeta>
+<refentrytitle role="top_of_page" id="poppler-poppler.top_of_page">poppler</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>POPPLER Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>poppler</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv id="poppler-poppler.synopsis" role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+<anchor id="PopplerDocument"/><anchor id="PopplerPage"/>
+<synopsis>
+<link linkend="GQuark">GQuark</link> <link linkend="poppler-error-quark">poppler_error_quark</link> (void);
+#define <link linkend="POPPLER-ERROR--CAPS">POPPLER_ERROR</link>
+enum <link linkend="PopplerError">PopplerError</link>;
+enum <link linkend="PopplerOrientation">PopplerOrientation</link>;
+ <link linkend="PopplerDocument-struct">PopplerDocument</link>;
+ <link linkend="PopplerIndexIter">PopplerIndexIter</link>;
+ <link linkend="PopplerFontsIter">PopplerFontsIter</link>;
+ <link linkend="PopplerRectangle">PopplerRectangle</link>;
+enum <link linkend="PopplerSelectionStyle">PopplerSelectionStyle</link>;
+enum <link linkend="PopplerPageTransitionType">PopplerPageTransitionType</link>;
+enum <link linkend="PopplerPageTransitionAlignment">PopplerPageTransitionAlignment</link>;
+enum <link linkend="PopplerPageTransitionDirection">PopplerPageTransitionDirection</link>;
+ <link linkend="PopplerLinkMapping">PopplerLinkMapping</link>;
+ <link linkend="PopplerPage-struct">PopplerPage</link>;
+ <link linkend="PopplerFontInfo">PopplerFontInfo</link>;
+ <link linkend="PopplerPSFile">PopplerPSFile</link>;
+enum <link linkend="PopplerBackend">PopplerBackend</link>;
+<link linkend="PopplerBackend">PopplerBackend</link> <link linkend="poppler-get-backend">poppler_get_backend</link> (void);
+const <link linkend="char">char</link> * <link linkend="poppler-get-version">poppler_get_version</link> (void);
+</synopsis>
+</refsynopsisdiv>
+
+<refsect1 id="poppler-poppler.object-hierarchy" role="object_hierarchy">
+<title role="object_hierarchy.title">Object Hierarchy</title>
+<synopsis>
+ <link linkend="GObject">GObject</link>
+ +----PopplerDocument
+</synopsis>
+<synopsis>
+ <link linkend="GObject">GObject</link>
+ +----PopplerPage
+</synopsis>
+</refsect1>
+
+
+
+
+
+<refsect1 id="poppler-poppler.properties" role="properties">
+<title role="properties.title">Properties</title>
+<synopsis>
+ &quot;<link linkend="PopplerDocument--author">author</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--creation-date">creation-date</link>&quot; <link linkend="gint">gint</link> : Read
+ &quot;<link linkend="PopplerDocument--creator">creator</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--format">format</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--format-major">format-major</link>&quot; <link linkend="guint">guint</link> : Read
+ &quot;<link linkend="PopplerDocument--format-minor">format-minor</link>&quot; <link linkend="guint">guint</link> : Read
+ &quot;<link linkend="PopplerDocument--keywords">keywords</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--linearized">linearized</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--metadata">metadata</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--mod-date">mod-date</link>&quot; <link linkend="gint">gint</link> : Read
+ &quot;<link linkend="PopplerDocument--page-layout">page-layout</link>&quot; <link linkend="PopplerPageLayout">PopplerPageLayout</link> : Read
+ &quot;<link linkend="PopplerDocument--page-mode">page-mode</link>&quot; <link linkend="PopplerPageMode">PopplerPageMode</link> : Read
+ &quot;<link linkend="PopplerDocument--permissions">permissions</link>&quot; <link linkend="PopplerPermissions">PopplerPermissions</link> : Read
+ &quot;<link linkend="PopplerDocument--producer">producer</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--subject">subject</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--title">title</link>&quot; <link linkend="gchar">gchar</link>* : Read
+ &quot;<link linkend="PopplerDocument--viewer-preferences">viewer-preferences</link>&quot; <link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link> : Read
+ &quot;<link linkend="PopplerPage--label">label</link>&quot; <link linkend="gchar">gchar</link>* : Read
+</synopsis>
+</refsect1>
+
+
+
+<refsect1 id="poppler-poppler.description" role="desc">
+<title role="desc.title">Description</title>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="poppler-poppler.details" role="details">
+<title role="details.title">Details</title>
+<refsect2 id="poppler-error-quark" role="function">
+<title>poppler_error_quark ()</title>
+<indexterm zone="poppler-error-quark"><primary sortas="poppler_error_quark">poppler_error_quark</primary></indexterm><programlisting><link linkend="GQuark">GQuark</link> poppler_error_quark (void);</programlisting>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="POPPLER-ERROR--CAPS" role="macro">
+<title>POPPLER_ERROR</title>
+<indexterm zone="POPPLER-ERROR--CAPS"><primary sortas="POPPLER_ERROR">POPPLER_ERROR</primary></indexterm><programlisting>#define POPPLER_ERROR poppler_error_quark ()
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerError" role="enum">
+<title>enum PopplerError</title>
+<indexterm zone="PopplerError"><primary sortas="PopplerError">PopplerError</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_ERROR_INVALID,
+ POPPLER_ERROR_ENCRYPTED,
+ POPPLER_ERROR_OPEN_FILE,
+ POPPLER_ERROR_BAD_CATALOG,
+ POPPLER_ERROR_DAMAGED
+} PopplerError;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerOrientation" role="enum">
+<title>enum PopplerOrientation</title>
+<indexterm zone="PopplerOrientation"><primary sortas="PopplerOrientation">PopplerOrientation</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_ORIENTATION_PORTRAIT,
+ POPPLER_ORIENTATION_LANDSCAPE,
+ POPPLER_ORIENTATION_UPSIDEDOWN,
+ POPPLER_ORIENTATION_SEASCAPE
+} PopplerOrientation;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerDocument-struct" role="struct">
+<title>PopplerDocument</title>
+<indexterm zone="PopplerDocument-struct"><primary sortas="PopplerDocument">PopplerDocument</primary></indexterm><programlisting>typedef struct _PopplerDocument PopplerDocument;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerIndexIter" role="struct">
+<title>PopplerIndexIter</title>
+<indexterm zone="PopplerIndexIter"><primary sortas="PopplerIndexIter">PopplerIndexIter</primary></indexterm><programlisting>typedef struct _PopplerIndexIter PopplerIndexIter;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFontsIter" role="struct">
+<title>PopplerFontsIter</title>
+<indexterm zone="PopplerFontsIter"><primary sortas="PopplerFontsIter">PopplerFontsIter</primary></indexterm><programlisting>typedef struct _PopplerFontsIter PopplerFontsIter;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerRectangle" role="struct">
+<title>PopplerRectangle</title>
+<indexterm zone="PopplerRectangle"><primary sortas="PopplerRectangle">PopplerRectangle</primary></indexterm><programlisting>typedef struct {
+ gdouble x1;
+ gdouble y1;
+ gdouble x2;
+ gdouble y2;
+} PopplerRectangle;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerSelectionStyle" role="enum">
+<title>enum PopplerSelectionStyle</title>
+<indexterm zone="PopplerSelectionStyle"><primary sortas="PopplerSelectionStyle">PopplerSelectionStyle</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_SELECTION_GLYPH,
+ POPPLER_SELECTION_WORD,
+ POPPLER_SELECTION_LINE
+} PopplerSelectionStyle;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPageTransitionType" role="enum">
+<title>enum PopplerPageTransitionType</title>
+<indexterm zone="PopplerPageTransitionType"><primary sortas="PopplerPageTransitionType">PopplerPageTransitionType</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_PAGE_TRANSITION_REPLACE,
+ POPPLER_PAGE_TRANSITION_SPLIT,
+ POPPLER_PAGE_TRANSITION_BLINDS,
+ POPPLER_PAGE_TRANSITION_BOX,
+ POPPLER_PAGE_TRANSITION_WIPE,
+ POPPLER_PAGE_TRANSITION_DISSOLVE,
+ POPPLER_PAGE_TRANSITION_GLITTER,
+ POPPLER_PAGE_TRANSITION_FLY,
+ POPPLER_PAGE_TRANSITION_PUSH,
+ POPPLER_PAGE_TRANSITION_COVER,
+ POPPLER_PAGE_TRANSITION_UNCOVER,
+ POPPLER_PAGE_TRANSITION_FADE
+} PopplerPageTransitionType;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPageTransitionAlignment" role="enum">
+<title>enum PopplerPageTransitionAlignment</title>
+<indexterm zone="PopplerPageTransitionAlignment"><primary sortas="PopplerPageTransitionAlignment">PopplerPageTransitionAlignment</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_PAGE_TRANSITION_HORIZONTAL,
+ POPPLER_PAGE_TRANSITION_VERTICAL
+} PopplerPageTransitionAlignment;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPageTransitionDirection" role="enum">
+<title>enum PopplerPageTransitionDirection</title>
+<indexterm zone="PopplerPageTransitionDirection"><primary sortas="PopplerPageTransitionDirection">PopplerPageTransitionDirection</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_PAGE_TRANSITION_INWARD,
+ POPPLER_PAGE_TRANSITION_OUTWARD
+} PopplerPageTransitionDirection;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerLinkMapping" role="struct">
+<title>PopplerLinkMapping</title>
+<indexterm zone="PopplerLinkMapping"><primary sortas="PopplerLinkMapping">PopplerLinkMapping</primary></indexterm><programlisting>typedef struct {
+ PopplerRectangle area;
+ PopplerAction *action;
+} PopplerLinkMapping;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPage-struct" role="struct">
+<title>PopplerPage</title>
+<indexterm zone="PopplerPage-struct"><primary sortas="PopplerPage">PopplerPage</primary></indexterm><programlisting>typedef struct _PopplerPage PopplerPage;</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerFontInfo" role="struct">
+<title>PopplerFontInfo</title>
+<indexterm zone="PopplerFontInfo"><primary sortas="PopplerFontInfo">PopplerFontInfo</primary></indexterm><programlisting>typedef struct {
+ GObject parent_instance;
+ PopplerDocument *document;
+ FontInfoScanner *scanner;
+} PopplerFontInfo;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerPSFile" role="struct">
+<title>PopplerPSFile</title>
+<indexterm zone="PopplerPSFile"><primary sortas="PopplerPSFile">PopplerPSFile</primary></indexterm><programlisting>typedef struct {
+ GObject parent_instance;
+
+ PopplerDocument *document;
+ PSOutputDev *out;
+ char *filename;
+ int first_page;
+ int last_page;
+ double paper_width;
+ double paper_height;
+ gboolean duplex;
+} PopplerPSFile;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="PopplerBackend" role="enum">
+<title>enum PopplerBackend</title>
+<indexterm zone="PopplerBackend"><primary sortas="PopplerBackend">PopplerBackend</primary></indexterm><programlisting>typedef enum
+{
+ POPPLER_BACKEND_UNKNOWN,
+ POPPLER_BACKEND_SPLASH,
+ POPPLER_BACKEND_CAIRO
+} PopplerBackend;
+</programlisting>
+<para>
+</para></refsect2>
+<refsect2 id="poppler-get-backend" role="function">
+<title>poppler_get_backend ()</title>
+<indexterm zone="poppler-get-backend"><primary sortas="poppler_get_backend">poppler_get_backend</primary></indexterm><programlisting><link linkend="PopplerBackend">PopplerBackend</link> poppler_get_backend (void);</programlisting>
+<para>
+Returns the backend compiled into the poppler library.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The backend used by poppler
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2 id="poppler-get-version" role="function">
+<title>poppler_get_version ()</title>
+<indexterm zone="poppler-get-version"><primary sortas="poppler_get_version">poppler_get_version</primary></indexterm><programlisting>const <link linkend="char">char</link> * poppler_get_version (void);</programlisting>
+<para>
+Returns the version of poppler in use. This result is not to be freed.</para>
+<para>
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the version of poppler.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+<refsect1 id="poppler-poppler.property-details" role="property_details">
+<title role="property_details.title">Property Details</title>
+<refsect2 id="PopplerDocument--author" role="property"><title>The <literal>&quot;author&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--author"><primary sortas="PopplerDocument:author">PopplerDocument:author</primary></indexterm><programlisting> &quot;author&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The author of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--creation-date" role="property"><title>The <literal>&quot;creation-date&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--creation-date"><primary sortas="PopplerDocument:creation-date">PopplerDocument:creation-date</primary></indexterm><programlisting> &quot;creation-date&quot; <link linkend="gint">gint</link> : Read</programlisting>
+<para>The date and time the document was created.</para><para>Allowed values: &gt;= 0</para>
+<para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--creator" role="property"><title>The <literal>&quot;creator&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--creator"><primary sortas="PopplerDocument:creator">PopplerDocument:creator</primary></indexterm><programlisting> &quot;creator&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The software that created the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format" role="property"><title>The <literal>&quot;format&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format"><primary sortas="PopplerDocument:format">PopplerDocument:format</primary></indexterm><programlisting> &quot;format&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The PDF version of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format-major" role="property"><title>The <literal>&quot;format-major&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format-major"><primary sortas="PopplerDocument:format-major">PopplerDocument:format-major</primary></indexterm><programlisting> &quot;format-major&quot; <link linkend="guint">guint</link> : Read</programlisting>
+<para>The PDF major version number of the document.</para><para>Default value: 1</para>
+</refsect2>
+<refsect2 id="PopplerDocument--format-minor" role="property"><title>The <literal>&quot;format-minor&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--format-minor"><primary sortas="PopplerDocument:format-minor">PopplerDocument:format-minor</primary></indexterm><programlisting> &quot;format-minor&quot; <link linkend="guint">guint</link> : Read</programlisting>
+<para>The PDF minor version number of the document.</para><para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--keywords" role="property"><title>The <literal>&quot;keywords&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--keywords"><primary sortas="PopplerDocument:keywords">PopplerDocument:keywords</primary></indexterm><programlisting> &quot;keywords&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Keywords.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--linearized" role="property"><title>The <literal>&quot;linearized&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--linearized"><primary sortas="PopplerDocument:linearized">PopplerDocument:linearized</primary></indexterm><programlisting> &quot;linearized&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Is the document optimized for web viewing?.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--metadata" role="property"><title>The <literal>&quot;metadata&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--metadata"><primary sortas="PopplerDocument:metadata">PopplerDocument:metadata</primary></indexterm><programlisting> &quot;metadata&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Embedded XML metadata.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--mod-date" role="property"><title>The <literal>&quot;mod-date&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--mod-date"><primary sortas="PopplerDocument:mod-date">PopplerDocument:mod-date</primary></indexterm><programlisting> &quot;mod-date&quot; <link linkend="gint">gint</link> : Read</programlisting>
+<para>The date and time the document was modified.</para><para>Allowed values: &gt;= 0</para>
+<para>Default value: 0</para>
+</refsect2>
+<refsect2 id="PopplerDocument--page-layout" role="property"><title>The <literal>&quot;page-layout&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--page-layout"><primary sortas="PopplerDocument:page-layout">PopplerDocument:page-layout</primary></indexterm><programlisting> &quot;page-layout&quot; <link linkend="PopplerPageLayout">PopplerPageLayout</link> : Read</programlisting>
+<para>Initial Page Layout.</para><para>Default value: POPPLER_PAGE_LAYOUT_UNSET</para>
+</refsect2>
+<refsect2 id="PopplerDocument--page-mode" role="property"><title>The <literal>&quot;page-mode&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--page-mode"><primary sortas="PopplerDocument:page-mode">PopplerDocument:page-mode</primary></indexterm><programlisting> &quot;page-mode&quot; <link linkend="PopplerPageMode">PopplerPageMode</link> : Read</programlisting>
+<para>Page Mode.</para><para>Default value: POPPLER_PAGE_MODE_UNSET</para>
+</refsect2>
+<refsect2 id="PopplerDocument--permissions" role="property"><title>The <literal>&quot;permissions&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--permissions"><primary sortas="PopplerDocument:permissions">PopplerDocument:permissions</primary></indexterm><programlisting> &quot;permissions&quot; <link linkend="PopplerPermissions">PopplerPermissions</link> : Read</programlisting>
+<para>Permissions.</para><para>Default value: POPPLER_PERMISSIONS_OK_TO_PRINT|POPPLER_PERMISSIONS_OK_TO_MODIFY|POPPLER_PERMISSIONS_OK_TO_COPY|POPPLER_PERMISSIONS_OK_TO_ADD_NOTES|POPPLER_PERMISSIONS_OK_TO_FILL_FORM</para>
+</refsect2>
+<refsect2 id="PopplerDocument--producer" role="property"><title>The <literal>&quot;producer&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--producer"><primary sortas="PopplerDocument:producer">PopplerDocument:producer</primary></indexterm><programlisting> &quot;producer&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The software that converted the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--subject" role="property"><title>The <literal>&quot;subject&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--subject"><primary sortas="PopplerDocument:subject">PopplerDocument:subject</primary></indexterm><programlisting> &quot;subject&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>Subjects the document touches.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--title" role="property"><title>The <literal>&quot;title&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--title"><primary sortas="PopplerDocument:title">PopplerDocument:title</primary></indexterm><programlisting> &quot;title&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The title of the document.</para><para>Default value: NULL</para>
+</refsect2>
+<refsect2 id="PopplerDocument--viewer-preferences" role="property"><title>The <literal>&quot;viewer-preferences&quot;</literal> property</title>
+<indexterm zone="PopplerDocument--viewer-preferences"><primary sortas="PopplerDocument:viewer-preferences">PopplerDocument:viewer-preferences</primary></indexterm><programlisting> &quot;viewer-preferences&quot; <link linkend="PopplerViewerPreferences">PopplerViewerPreferences</link> : Read</programlisting>
+<para>Viewer Preferences.</para></refsect2>
+<refsect2 id="PopplerPage--label" role="property"><title>The <literal>&quot;label&quot;</literal> property</title>
+<indexterm zone="PopplerPage--label"><primary sortas="PopplerPage:label">PopplerPage:label</primary></indexterm><programlisting> &quot;label&quot; <link linkend="gchar">gchar</link>* : Read</programlisting>
+<para>The label of the page.</para><para>Default value: NULL</para>
+</refsect2>
+</refsect1>
+
+
+
+
+</refentry>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/glib/test-poppler-glib.cc b/Build/source/libs/poppler/poppler-0.12.4/glib/test-poppler-glib.cc
new file mode 100644
index 00000000000..e64000e8c2a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/glib/test-poppler-glib.cc
@@ -0,0 +1,665 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "config.h"
+#include "poppler.h"
+
+#define FAIL(msg) \
+ do { fprintf (stderr, "FAIL: %s\n", msg); exit (-1); } while (0)
+
+static gchar *
+poppler_format_date (GTime utime)
+{
+ time_t time = (time_t) utime;
+ char s[256];
+ const char *fmt_hack = "%c";
+ size_t len;
+#ifdef HAVE_LOCALTIME_R
+ struct tm t;
+ if (time == 0 || !localtime_r (&time, &t)) return NULL;
+ len = strftime (s, sizeof (s), fmt_hack, &t);
+#else
+ struct tm *t;
+ if (time == 0 || !(t = localtime (&time)) ) return NULL;
+ len = strftime (s, sizeof (s), fmt_hack, t);
+#endif
+
+ if (len == 0 || s[0] == '\0') return NULL;
+
+ return g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
+}
+
+static void
+print_index (PopplerIndexIter *iter, gint deph)
+{
+ do
+ {
+ PopplerAction *action;
+ PopplerIndexIter *child;
+ int i;
+
+ action = poppler_index_iter_get_action (iter);
+ for (i = 0; i < deph; i++)
+ g_print (" ");
+ g_print ("+ %s\n", action->any.title);
+ poppler_action_free (action);
+ child = poppler_index_iter_get_child (iter);
+ if (child)
+ print_index (child, deph + 1);
+ poppler_index_iter_free (child);
+ }
+ while (poppler_index_iter_next (iter));
+}
+
+static void
+print_layers (PopplerLayersIter *iter, gint deph)
+{
+ do
+ {
+ PopplerLayersIter *child;
+ PopplerLayer *layer;
+ gint i;
+
+ for (i = 0; i < deph; i++)
+ g_print (" ");
+
+ layer = poppler_layers_iter_get_layer (iter);
+ if (layer)
+ {
+ g_print ("+ %s (%s)\n", poppler_layer_get_title (layer),
+ poppler_layer_is_visible (layer) ?
+ "Visible" : "Hidden");
+ g_object_unref (layer);
+ }
+
+ child = poppler_layers_iter_get_child (iter);
+ if (child)
+ {
+ gchar *title;
+
+ title = poppler_layers_iter_get_title (iter);
+ if (title)
+ {
+ g_print ("+ %s\n", title);
+ g_free (title);
+ }
+ print_layers (child, deph + 1);
+ }
+ poppler_layers_iter_free (child);
+ }
+ while (poppler_layers_iter_next (iter));
+}
+
+static void
+print_document_info (PopplerDocument *document)
+{
+ gchar *title, *format, *author, *subject, *keywords, *creator, *producer, *linearized;
+ GTime creation_date, mod_date;
+ gchar *strdate;
+ PopplerPageLayout layout;
+ PopplerPageMode mode;
+ PopplerViewerPreferences view_prefs;
+ PopplerPermissions permissions;
+ PopplerFontInfo *font_info;
+ PopplerFontsIter *fonts_iter;
+ PopplerIndexIter *index_iter;
+ GEnumValue *enum_value;
+
+ g_object_get (document,
+ "title", &title,
+ "format", &format,
+ "author", &author,
+ "subject", &subject,
+ "keywords", &keywords,
+ "creation-date", &creation_date,
+ "mod-date", &mod_date,
+ "creator", &creator,
+ "producer", &producer,
+ "linearized", &linearized,
+ "page-mode", &mode,
+ "page-layout", &layout,
+ "viewer-preferences", &view_prefs,
+ "permissions", &permissions,
+ NULL);
+
+ printf ("\t---------------------------------------------------------\n");
+ printf ("\tDocument Metadata\n");
+ printf ("\t---------------------------------------------------------\n");
+ if (title) printf ("\ttitle:\t\t%s\n", title);
+ if (format) printf ("\tformat:\t\t%s\n", format);
+ if (author) printf ("\tauthor:\t\t%s\n", author);
+ if (subject) printf ("\tsubject:\t%s\n", subject);
+ if (keywords) printf ("\tkeywords:\t%s\n", keywords);
+ if (creator) printf ("\tcreator:\t%s\n", creator);
+ if (producer) printf ("\tproducer:\t%s\n", producer);
+ if (linearized) printf ("\tlinearized:\t%s\n", linearized);
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_peek (POPPLER_TYPE_PAGE_MODE), mode);
+ g_print ("\tpage mode:\t%s\n", enum_value->value_name);
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_peek (POPPLER_TYPE_PAGE_LAYOUT), layout);
+ g_print ("\tpage layout:\t%s\n", enum_value->value_name);
+
+ strdate = poppler_format_date (creation_date);
+ if (strdate)
+ {
+ g_print ("\tcreation date:\t%s\n", strdate);
+ g_free (strdate);
+ }
+ strdate = poppler_format_date (mod_date);
+ if (strdate)
+ {
+ g_print ("\tmodified date:\t%s\n", strdate);
+ g_free (strdate);
+ }
+
+ g_print ("\tfonts:\n");
+ font_info = poppler_font_info_new (document);
+ while (poppler_font_info_scan (font_info, 20, &fonts_iter)) {
+ if (fonts_iter) {
+ do {
+ g_print ("\t\t\t%s\n", poppler_fonts_iter_get_name (fonts_iter));
+ } while (poppler_fonts_iter_next (fonts_iter));
+ poppler_fonts_iter_free (fonts_iter);
+ }
+ }
+ g_object_unref (font_info);
+
+ index_iter = poppler_index_iter_new (document);
+ if (index_iter)
+ {
+ g_print ("\tindex:\n");
+ print_index (index_iter, 0);
+ poppler_index_iter_free (index_iter);
+ }
+
+ printf ("\t---------------------------------------------------------\n");
+ printf ("\tDocument Permissions\n");
+ printf ("\t---------------------------------------------------------\n");
+
+ printf ("\tOk to Print: %s\n",
+ permissions & POPPLER_PERMISSIONS_OK_TO_PRINT ? "Yes" : "No");
+ printf ("\tOk to Modify: %s\n",
+ permissions & POPPLER_PERMISSIONS_OK_TO_MODIFY ? "Yes" : "No");
+ printf ("\tOk to Copy: %s\n",
+ permissions & POPPLER_PERMISSIONS_OK_TO_COPY ? "Yes" : "No");
+ printf ("\tOk to Add Notes: %s\n",
+ permissions & POPPLER_PERMISSIONS_OK_TO_ADD_NOTES ? "Yes" : "No");
+ printf ("\tOk to Fill Forms: %s\n",
+ permissions & POPPLER_PERMISSIONS_OK_TO_FILL_FORM ? "Yes" : "No");
+
+ printf ("\n");
+
+ /* FIXME: print out the view prefs when we support it */
+
+ g_free (title);
+ g_free (format);
+ g_free (author);
+ g_free (subject);
+ g_free (keywords);
+ g_free (creator);
+ g_free (producer);
+ g_free (linearized);
+}
+
+static const gchar *
+transition_effect_name (PopplerPageTransitionType type)
+{
+ switch (type)
+ {
+ case POPPLER_PAGE_TRANSITION_REPLACE:
+ return "Replace";
+ case POPPLER_PAGE_TRANSITION_SPLIT:
+ return "Split";
+ case POPPLER_PAGE_TRANSITION_BLINDS:
+ return "Blinds";
+ case POPPLER_PAGE_TRANSITION_BOX:
+ return "Box";
+ case POPPLER_PAGE_TRANSITION_WIPE:
+ return "Wipe";
+ case POPPLER_PAGE_TRANSITION_DISSOLVE:
+ return "Dissolve";
+ case POPPLER_PAGE_TRANSITION_GLITTER:
+ return "Glitter";
+ case POPPLER_PAGE_TRANSITION_FLY:
+ return "Fly";
+ case POPPLER_PAGE_TRANSITION_PUSH:
+ return "Push";
+ case POPPLER_PAGE_TRANSITION_COVER:
+ return "Cover";
+ case POPPLER_PAGE_TRANSITION_UNCOVER:
+ return "Uncover";
+ case POPPLER_PAGE_TRANSITION_FADE:
+ return "Fade";
+ }
+
+ return "Unknown";
+}
+
+static void
+print_page_transition (PopplerPageTransition *transition)
+{
+ printf ("\t\tEffect: %s\n", transition_effect_name (transition->type));
+ printf ("\t\tAlignment: %s\n",
+ transition->alignment == POPPLER_PAGE_TRANSITION_HORIZONTAL ?
+ "Horizontal" : "Vertical");
+ printf ("\t\tDirection: %s\n",
+ transition->direction == POPPLER_PAGE_TRANSITION_INWARD ?
+ "Inward" : "Outward");
+ printf ("\t\tDuration: %d\n", transition->duration);
+ printf ("\t\tAngle: %d\n", transition->angle);
+ printf ("\t\tScale: %.2f\n", transition->scale);
+ printf ("\t\tRectangular: %s\n", transition->rectangular ? "Yes" : "No");
+}
+
+static void
+form_field_text_print (PopplerFormField *field)
+{
+ PopplerFormTextType type;
+ gchar *text;
+
+ type = poppler_form_field_text_get_text_type (field);
+ printf ("\t\tType:\t\tText\n");
+ printf ("\t\tMultiline:\t%s\n",
+ type == POPPLER_FORM_TEXT_MULTILINE ? "Yes" : "No");
+ printf ("\t\tFileSelect:\t%s\n",
+ type == POPPLER_FORM_TEXT_FILE_SELECT ? "Yes" : "No");
+ printf ("\t\tDoSpellCheck:\t%s\n",
+ poppler_form_field_text_do_spell_check (field) ? "Yes" : "No");
+ printf ("\t\tDoScroll:\t%s\n",
+ poppler_form_field_text_do_scroll (field) ? "Yes" : "No");
+ printf ("\t\tIsRichText:\t%s\n",
+ poppler_form_field_text_is_rich_text (field) ? "Yes" : "No");
+ printf ("\t\tPassword:\t%s\n",
+ poppler_form_field_text_is_password (field) ? "Yes" : "No");
+ printf ("\t\tMaxLen:\t\t%d\n", poppler_form_field_text_get_max_len (field));
+ text = poppler_form_field_text_get_text (field);
+ printf ("\t\tContent:\t%s\n", text ? text : "");
+ g_free (text);
+}
+
+static void
+form_field_button_print (PopplerFormField *field)
+{
+ PopplerFormButtonType button_type;
+ const gchar *button_type_str;
+
+ button_type = poppler_form_field_button_get_button_type (field);
+
+ switch (button_type)
+ {
+ case POPPLER_FORM_BUTTON_PUSH:
+ button_type_str = "Push";
+ break;
+ case POPPLER_FORM_BUTTON_CHECK:
+ button_type_str = "Check box";
+ break;
+ case POPPLER_FORM_BUTTON_RADIO:
+ button_type_str = "Radio Button";
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ printf ("\t\tType:\t\tButton\n");
+ printf ("\t\tButton type:\t%s\n", button_type_str);
+ if (button_type != POPPLER_FORM_BUTTON_PUSH)
+ printf ("\t\tState:\t\t%s\n",
+ poppler_form_field_button_get_state (field) ? "Active" : "Inactive");
+}
+
+static void
+form_field_choice_print (PopplerFormField *field)
+{
+ gint i, n_items;
+
+ printf ("\t\tType:\t\tChoice\n");
+ printf ("\t\tSubType:\t%s\n",
+ poppler_form_field_choice_get_choice_type (field) == POPPLER_FORM_CHOICE_COMBO ?
+ "Combo" : "List");
+ printf ("\t\tEditable:\t%s\n",
+ poppler_form_field_choice_is_editable (field) ? "Yes" : "No");
+ printf ("\t\tCan select multiple: %s\n",
+ poppler_form_field_choice_can_select_multiple (field) ? "Yes" : "No");
+ printf ("\t\tDoSpellCheck:\t%s\n",
+ poppler_form_field_choice_do_spell_check (field) ? "Yes" : "No");
+ printf ("\t\tCommit on change: %s\n",
+ poppler_form_field_choice_commit_on_change (field) ? "Yes" : "No");
+
+ n_items = poppler_form_field_choice_get_n_items (field);
+ for (i = 0; i < n_items; i++)
+ {
+ gchar *item;
+
+ item = poppler_form_field_choice_get_item (field, i);
+ printf ("\t\t\tItem %d: %s %s\n", i, item ? item : "",
+ poppler_form_field_choice_is_item_selected (field, i) ?
+ "(selected)" : "");
+ g_free (item);
+ }
+}
+
+static void
+form_field_print (PopplerFormField *field)
+{
+ printf ("\t\tFont Size:\t%.2f\n",
+ poppler_form_field_get_font_size (field));
+ printf ("\t\tReadOnly:\t%s\n",
+ poppler_form_field_is_read_only (field) ? "Yes" : "No");
+
+ switch (poppler_form_field_get_field_type (field))
+ {
+ case POPPLER_FORM_FIELD_TEXT:
+ form_field_text_print (field);
+ break;
+ case POPPLER_FORM_FIELD_BUTTON:
+ form_field_button_print (field);
+ break;
+ case POPPLER_FORM_FIELD_CHOICE:
+ form_field_choice_print (field);
+ break;
+ default:
+ printf ("\t\tUnknown form field\n");
+ }
+ printf ("\n");
+}
+
+static void
+annot_print (PopplerAnnot *annot)
+{
+ GEnumValue *enum_value;
+ gchar *text;
+
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_ANNOT_TYPE),
+ poppler_annot_get_annot_type (annot));
+ g_print ("\t\tType: %s\n", enum_value->value_name);
+ text = poppler_annot_get_contents (annot);
+ g_print ("\t\tContents: %s\n", text);
+ g_free (text);
+ printf ("\n");
+}
+
+int main (int argc, char *argv[])
+{
+ PopplerDocument *document;
+ PopplerBackend backend;
+ PopplerPage *page;
+ PopplerPageTransition *transition;
+ PopplerFormField *field;
+ GEnumValue *enum_value;
+ char *label;
+ GError *error;
+ GdkPixbuf *pixbuf, *thumb;
+ double width, height;
+ GList *list, *l;
+ char *text;
+ double duration;
+ PopplerRectangle area;
+ gint num_images;
+ gint num_forms;
+ gint num_links;
+ gint num_annots;
+ gint form_id = 0;
+ PopplerLayersIter *layers_iter;
+
+ if (argc != 3)
+ FAIL ("usage: test-poppler-glib file://FILE PAGE");
+
+ g_type_init ();
+
+ g_print ("Poppler version %s\n", poppler_get_version ());
+ backend = poppler_get_backend ();
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_BACKEND), backend);
+ g_print ("Backend is %s\n", enum_value->value_name);
+
+ error = NULL;
+ document = poppler_document_new_from_file (argv[1], NULL, &error);
+ if (document == NULL)
+ FAIL (error->message);
+
+ print_document_info (document);
+
+ page = poppler_document_get_page_by_label (document, argv[2]);
+ if (page == NULL)
+ FAIL ("page not found");
+
+ poppler_page_get_size (page, &width, &height);
+ printf ("\tpage size:\t%f inches by %f inches\n", width / 72, height / 72);
+
+ duration = poppler_page_get_duration (page);
+ if (duration > 0)
+ printf ("\tpage duration:\t%f second(s)\n", duration);
+ else
+ printf ("\tpage duration:\tno duration for page\n");
+
+ transition = poppler_page_get_transition (page);
+ if (transition) {
+ printf ("\tpage transition:\n");
+ print_page_transition (transition);
+ poppler_page_transition_free (transition);
+ } else {
+ printf ("\tpage transition:no transition effect for page\n");
+ }
+
+ thumb = poppler_page_get_thumbnail_pixbuf (page);
+ if (thumb != NULL) {
+ gdk_pixbuf_save (thumb, "thumb.png", "png", &error, NULL);
+ if (error != NULL)
+ FAIL (error->message);
+ else
+ printf ("\tthumbnail:\tsaved as thumb.png\n");
+ g_object_unref (G_OBJECT (thumb));
+ }
+ else
+ printf ("\tthumbnail:\tno thumbnail for page\n");
+
+ g_object_get (page, "label", &label, NULL);
+ printf ("\tpage label:\t%s\n", label);
+ g_free (label);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 220, 220);
+ gdk_pixbuf_fill (pixbuf, 0x00106000);
+ poppler_page_render_to_pixbuf (page, 100, 100, 200, 200, 1, 0, pixbuf);
+
+ gdk_pixbuf_save (pixbuf, "slice.png", "png", &error, NULL);
+ printf ("\tslice:\t\tsaved 200x200 slice at (100, 100) as slice.png\n");
+ if (error != NULL) {
+ FAIL (error->message);
+ g_error_free (error);
+ }
+
+ g_object_unref (G_OBJECT (pixbuf));
+
+ list = poppler_page_get_link_mapping (page);
+ num_links = g_list_length (list);
+ if (num_links > 0)
+ printf ("\tFound %d links at positions:\n", num_links);
+ else
+ printf ("\tNo links found\n");
+
+ for (l = list; l != NULL; l = l->next)
+ {
+ PopplerLinkMapping *mapping = (PopplerLinkMapping *)l->data;
+
+ printf ("\t\t(%f, %f) - (%f, %f)\n",
+ mapping->area.x1,
+ mapping->area.y1,
+ mapping->area.x2,
+ mapping->area.y2);
+ enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_ACTION_TYPE),
+ mapping->action->type);
+ g_print ("\t\t\tAction: %s (%d)\n", enum_value->value_name, mapping->action->type);
+ switch (mapping->action->type)
+ {
+ case POPPLER_ACTION_GOTO_DEST:
+ printf("\t\t\tDest title: %s\n", mapping->action->goto_dest.title);
+ printf("\t\t\tNamed dest: %s\n", mapping->action->goto_dest.dest->named_dest);
+ break;
+ default:
+ printf("\t\t\tDetails unimplemented for this action type\n");
+ }
+ }
+ poppler_page_free_link_mapping (list);
+
+ area.x1 = 0;
+ area.y1 = 0;
+ area.x2 = width;
+ area.y2 = height;
+
+ text = poppler_page_get_text (page, POPPLER_SELECTION_GLYPH, &area);
+ if (text)
+ {
+ FILE *file = fopen ("dump.txt", "w");
+ if (file)
+ {
+ fwrite (text, strlen (text), 1, file);
+ fclose (file);
+ }
+ g_free (text);
+ }
+
+ list = poppler_page_find_text (page, "Bitwise");
+ printf ("\n");
+ printf ("\tFound text \"Bitwise\" at positions:\n");
+ for (l = list; l != NULL; l = l->next)
+ {
+ PopplerRectangle *rect = (PopplerRectangle *)l->data;
+
+ printf (" (%f,%f)-(%f,%f)\n", rect->x1, rect->y1, rect->x2, rect->y2);
+ }
+
+ list = poppler_page_get_image_mapping (page);
+ num_images = g_list_length (list);
+ printf ("\n");
+ if (num_images > 0)
+ printf ("\tFound %d images at positions:\n", num_images);
+ else
+ printf ("\tNo images found\n");
+ for (l = list; l != NULL; l = l->next)
+ {
+ PopplerImageMapping *mapping;
+#if defined (HAVE_CAIRO)
+ cairo_surface_t *image;
+#endif
+ mapping = (PopplerImageMapping *)l->data;
+ printf ("\t\t(%f, %f) - (%f, %f)\n",
+ mapping->area.x1,
+ mapping->area.y1,
+ mapping->area.x2,
+ mapping->area.y2);
+#if defined (HAVE_CAIRO)
+ image = poppler_page_get_image (page, mapping->image_id);
+ printf ("\t\tImage: %p\n", image);
+ cairo_surface_destroy (image);
+#endif
+ }
+ poppler_page_free_image_mapping (list);
+
+ list = poppler_page_get_form_field_mapping (page);
+ num_forms = g_list_length (list);
+ printf ("\n");
+ if (num_forms > 0)
+ printf ("\tFound %d form fields at positions:\n", num_forms);
+ else
+ printf ("\tNo forms fields found\n");
+ for (l = list; l != NULL; l = l->next)
+ {
+ PopplerFormFieldMapping *mapping;
+
+ mapping = (PopplerFormFieldMapping *)l->data;
+
+ form_id = poppler_form_field_get_id (mapping->field);
+
+ printf ("\t\tId: %d: (%f, %f) - (%f, %f)\n",
+ form_id,
+ mapping->area.x1,
+ mapping->area.y1,
+ mapping->area.x2,
+ mapping->area.y2);
+ form_field_print (mapping->field);
+ }
+ poppler_page_free_form_field_mapping (list);
+
+ if (num_forms > 0)
+ {
+ field = poppler_document_get_form_field (document, form_id);
+ printf ("\tForm field for id %d\n", form_id);
+ form_field_print (field);
+ g_object_unref (field);
+ }
+
+ list = poppler_page_get_annot_mapping (page);
+ num_annots = g_list_length (list);
+ if (num_annots > 0)
+ printf ("\tFound %d annotations at positions:\n", num_annots);
+ else
+ printf ("\tNo annotations found\n");
+ for (l = list; l != NULL; l = l->next)
+ {
+ PopplerAnnotMapping *mapping = (PopplerAnnotMapping *)l->data;
+
+ printf ("\t\t(%f, %f) - (%f, %f)\n",
+ mapping->area.x1,
+ mapping->area.y1,
+ mapping->area.x2,
+ mapping->area.y2);
+
+ annot_print (mapping->annot);
+ }
+ poppler_page_free_annot_mapping (list);
+
+ if (poppler_document_has_attachments (document))
+ {
+ int i = 0;
+
+ g_print ("Attachments found:\n\n");
+
+ list = poppler_document_get_attachments (document);
+ for (l = list; l; l = l->next)
+ {
+ PopplerAttachment *attachment;
+ char *filename, *strdate;
+
+ filename = g_strdup_printf ("/tmp/attach%d", i);
+ attachment = (PopplerAttachment *)l->data;
+ g_print ("\tname: %s\n", attachment->name);
+ g_print ("\tdescription: %s\n", attachment->description);
+ g_print ("\tsize: %" G_GSIZE_FORMAT "\n", attachment->size);
+ strdate = poppler_format_date (attachment->ctime);
+ if (strdate)
+ {
+ g_print ("\tcreation date: %s\n", strdate);
+ g_free (strdate);
+ }
+ strdate = poppler_format_date (attachment->mtime);
+ if (strdate)
+ {
+ g_print ("\tmodification date: %s\n", strdate);
+ g_free (strdate);
+ }
+ poppler_attachment_save (attachment, filename, NULL);
+ g_free (filename);
+ g_print ("\n");
+ i++;
+ }
+ g_list_foreach (list, (GFunc) g_object_unref, NULL);
+ g_list_free (list);
+ }
+ else
+ g_print ("\tNo attachments found\n");
+
+ layers_iter = poppler_layers_iter_new (document);
+ if (layers_iter)
+ {
+ g_print ("\tLayers:\n");
+ print_layers (layers_iter, 0);
+ poppler_layers_iter_free (layers_iter);
+ }
+ else
+ g_print ("\tNo layers found\n");
+
+ g_object_unref (G_OBJECT (page));
+ g_object_unref (G_OBJECT (document));
+
+ return 0;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.cc
new file mode 100644
index 00000000000..79a6a9ae1f4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.cc
@@ -0,0 +1,120 @@
+//========================================================================
+//
+// FixedPoint.cc
+//
+// Fixed point type, with C++ operators.
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#if USE_FIXEDPOINT
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "FixedPoint.h"
+
+#define ln2 ((FixedPoint)0.69314718)
+
+#define ln2 ((FixedPoint)0.69314718)
+
+FixedPoint FixedPoint::sqrt(FixedPoint x) {
+ FixedPoint y0, y1, z;
+
+ if (x.val <= 0) {
+ y1.val = 0;
+ } else {
+ y1.val = x.val == 1 ? 2 : x.val >> 1;
+ do {
+ y0.val = y1.val;
+ z = x / y0;
+ y1.val = (y0.val + z.val) >> 1;
+ } while (::abs(y0.val - y1.val) > 1);
+ }
+ return y1;
+}
+
+FixedPoint FixedPoint::pow(FixedPoint x, FixedPoint y) {
+ FixedPoint t, t2, lnx0, lnx, z0, z;
+ int d, n, i;
+
+ if (y.val <= 0) {
+ z.val = 0;
+ } else {
+ // y * ln(x)
+ t = (x - 1) / (x + 1);
+ t2 = t * t;
+ d = 1;
+ lnx = 0;
+ do {
+ lnx0 = lnx;
+ lnx += t / d;
+ t *= t2;
+ d += 2;
+ } while (::abs(lnx.val - lnx0.val) > 2);
+ lnx.val <<= 1;
+ t = y * lnx;
+ // exp(y * ln(x))
+ n = floor(t / ln2);
+ t -= ln2 * n;
+ t2 = t;
+ d = 1;
+ i = 1;
+ z = 1;
+ do {
+ z0 = z;
+ z += t2 / d;
+ t2 *= t;
+ ++i;
+ d *= i;
+ } while (::abs(z.val - z0.val) > 2 && d < (1 << fixptShift));
+ if (n >= 0) {
+ z.val <<= n;
+ } else if (n < 0) {
+ z.val >>= -n;
+ }
+ }
+ return z;
+}
+
+int FixedPoint::mul(int x, int y) {
+#if 1 //~tmp
+ return ((FixPtInt64)x * y) >> fixptShift;
+#else
+ int ah0, ah, bh, al, bl;
+ ah0 = x & fixptMaskH;
+ ah = x >> fixptShift;
+ al = x - ah0;
+ bh = y >> fixptShift;
+ bl = y - (bh << fixptShift);
+ return ah0 * bh + ah * bl + al * bh + ((al * bl) >> fixptShift);
+#endif
+}
+
+int FixedPoint::div(int x, int y) {
+#if 1 //~tmp
+ return ((FixPtInt64)x << fixptShift) / y;
+#else
+#endif
+}
+
+GBool FixedPoint::divCheck(FixedPoint x, FixedPoint y, FixedPoint *result) {
+#if 1 //~tmp
+ FixPtInt64 z;
+
+ z = ((FixPtInt64)x.val << fixptShift) / y.val;
+ if ((z == 0 && x != 0) ||
+ z >= ((FixPtInt64)1 << 31) || z < -((FixPtInt64)1 << 31)) {
+ return gFalse;
+ }
+ result->val = z;
+ return gTrue;
+#else
+#endif
+}
+
+#endif // USE_FIXEDPOINT
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.h b/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.h
new file mode 100644
index 00000000000..08936bc6f2a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/FixedPoint.h
@@ -0,0 +1,155 @@
+//========================================================================
+//
+// FixedPoint.h
+//
+// Fixed point type, with C++ operators.
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FIXEDPOINT_H
+#define FIXEDPOINT_H
+
+#include "poppler/poppler-config.h"
+
+#if USE_FIXEDPOINT
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "gtypes.h"
+
+#define fixptShift 16
+#define fixptMaskL ((1 << fixptShift) - 1)
+#define fixptMaskH (~fixptMaskL)
+
+typedef long long FixPtInt64;
+
+class FixedPoint {
+public:
+
+ FixedPoint() { val = 0; }
+ FixedPoint(const FixedPoint &x) { val = x.val; }
+ FixedPoint(double x) { val = (int)(x * (1 << fixptShift) + 0.5); }
+ FixedPoint(int x) { val = x << fixptShift; }
+ FixedPoint(long x) { val = x << fixptShift; }
+
+ operator float()
+ { return (float) val * ((float)1 / (float)(1 << fixptShift)); }
+ operator double()
+ { return (double) val * (1.0 / (double)(1 << fixptShift)); }
+ operator int()
+ { return val >> fixptShift; }
+
+ int getRaw() { return val; }
+
+ FixedPoint operator =(FixedPoint x) { val = x.val; return *this; }
+
+ int operator ==(FixedPoint x) { return val == x.val; }
+ int operator ==(double x) { return *this == (FixedPoint)x; }
+ int operator ==(int x) { return *this == (FixedPoint)x; }
+ int operator ==(long x) { return *this == (FixedPoint)x; }
+
+ int operator !=(FixedPoint x) { return val != x.val; }
+ int operator !=(double x) { return *this != (FixedPoint)x; }
+ int operator !=(int x) { return *this != (FixedPoint)x; }
+ int operator !=(long x) { return *this != (FixedPoint)x; }
+
+ int operator <(FixedPoint x) { return val < x.val; }
+ int operator <(double x) { return *this < (FixedPoint)x; }
+ int operator <(int x) { return *this < (FixedPoint)x; }
+ int operator <(long x) { return *this < (FixedPoint)x; }
+
+ int operator <=(FixedPoint x) { return val <= x.val; }
+ int operator <=(double x) { return *this <= (FixedPoint)x; }
+ int operator <=(int x) { return *this <= (FixedPoint)x; }
+ int operator <=(long x) { return *this <= (FixedPoint)x; }
+
+ int operator >(FixedPoint x) { return val > x.val; }
+ int operator >(double x) { return *this > (FixedPoint)x; }
+ int operator >(int x) { return *this > (FixedPoint)x; }
+ int operator >(long x) { return *this > (FixedPoint)x; }
+
+ int operator >=(FixedPoint x) { return val >= x.val; }
+ int operator >=(double x) { return *this >= (FixedPoint)x; }
+ int operator >=(int x) { return *this >= (FixedPoint)x; }
+ int operator >=(long x) { return *this >= (FixedPoint)x; }
+
+ FixedPoint operator -() { return make(-val); }
+
+ FixedPoint operator +(FixedPoint x) { return make(val + x.val); }
+ FixedPoint operator +(double x) { return *this + (FixedPoint)x; }
+ FixedPoint operator +(int x) { return *this + (FixedPoint)x; }
+ FixedPoint operator +(long x) { return *this + (FixedPoint)x; }
+
+ FixedPoint operator +=(FixedPoint x) { val = val + x.val; return *this; }
+ FixedPoint operator +=(double x) { return *this += (FixedPoint)x; }
+ FixedPoint operator +=(int x) { return *this += (FixedPoint)x; }
+ FixedPoint operator +=(long x) { return *this += (FixedPoint)x; }
+
+ FixedPoint operator -(FixedPoint x) { return make(val - x.val); }
+ FixedPoint operator -(double x) { return *this - (FixedPoint)x; }
+ FixedPoint operator -(int x) { return *this - (FixedPoint)x; }
+ FixedPoint operator -(long x) { return *this - (FixedPoint)x; }
+
+ FixedPoint operator -=(FixedPoint x) { val = val - x.val; return *this; }
+ FixedPoint operator -=(double x) { return *this -= (FixedPoint)x; }
+ FixedPoint operator -=(int x) { return *this -= (FixedPoint)x; }
+ FixedPoint operator -=(long x) { return *this -= (FixedPoint)x; }
+
+ FixedPoint operator *(FixedPoint x) { return make(mul(val, x.val)); }
+ FixedPoint operator *(double x) { return *this * (FixedPoint)x; }
+ FixedPoint operator *(int x) { return *this * (FixedPoint)x; }
+ FixedPoint operator *(long x) { return *this * (FixedPoint)x; }
+
+ FixedPoint operator *=(FixedPoint x) { val = mul(val, x.val); return *this; }
+ FixedPoint operator *=(double x) { return *this *= (FixedPoint)x; }
+ FixedPoint operator *=(int x) { return *this *= (FixedPoint)x; }
+ FixedPoint operator *=(long x) { return *this *= (FixedPoint)x; }
+
+ FixedPoint operator /(FixedPoint x) { return make(div(val, x.val)); }
+ FixedPoint operator /(double x) { return *this / (FixedPoint)x; }
+ FixedPoint operator /(int x) { return *this / (FixedPoint)x; }
+ FixedPoint operator /(long x) { return *this / (FixedPoint)x; }
+
+ FixedPoint operator /=(FixedPoint x) { val = div(val, x.val); return *this; }
+ FixedPoint operator /=(double x) { return *this /= (FixedPoint)x; }
+ FixedPoint operator /=(int x) { return *this /= (FixedPoint)x; }
+ FixedPoint operator /=(long x) { return *this /= (FixedPoint)x; }
+
+ static FixedPoint abs(FixedPoint x) { return make(::abs(x.val)); }
+
+ static int floor(FixedPoint x) { return x.val >> fixptShift; }
+
+ static int ceil(FixedPoint x)
+ { return (x.val & fixptMaskL) ? ((x.val >> fixptShift) + 1)
+ : (x.val >> fixptShift); }
+
+ static int round(FixedPoint x)
+ { return (x.val + (1 << (fixptShift - 1))) >> fixptShift; }
+
+ static FixedPoint sqrt(FixedPoint x);
+
+ static FixedPoint pow(FixedPoint x, FixedPoint y);
+
+ // Compute *result = x/y; return false if there is an underflow or
+ // overflow.
+ static GBool divCheck(FixedPoint x, FixedPoint y, FixedPoint *result);
+
+private:
+
+ static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return x; }
+
+ static int mul(int x, int y);
+ static int div(int x, int y);
+
+ int val; // 16.16 fixed point
+};
+
+#endif // USE_FIXEDPOINT
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.cc
new file mode 100644
index 00000000000..5da9d69f82c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.cc
@@ -0,0 +1,380 @@
+//========================================================================
+//
+// GooHash.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "gmem.h"
+#include "GooString.h"
+#include "GooHash.h"
+
+//------------------------------------------------------------------------
+
+struct GooHashBucket {
+ GooString *key;
+ union {
+ void *p;
+ int i;
+ } val;
+ GooHashBucket *next;
+};
+
+struct GooHashIter {
+ int h;
+ GooHashBucket *p;
+};
+
+//------------------------------------------------------------------------
+
+GooHash::GooHash(GBool deleteKeysA) {
+ int h;
+
+ deleteKeys = deleteKeysA;
+ size = 7;
+ tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
+ for (h = 0; h < size; ++h) {
+ tab[h] = NULL;
+ }
+ len = 0;
+}
+
+GooHash::~GooHash() {
+ GooHashBucket *p;
+ int h;
+
+ for (h = 0; h < size; ++h) {
+ while (tab[h]) {
+ p = tab[h];
+ tab[h] = p->next;
+ if (deleteKeys) {
+ delete p->key;
+ }
+ delete p;
+ }
+ }
+ gfree(tab);
+}
+
+void GooHash::add(GooString *key, void *val) {
+ GooHashBucket *p;
+ int h;
+
+ // expand the table if necessary
+ if (len >= size) {
+ expand();
+ }
+
+ // add the new symbol
+ p = new GooHashBucket;
+ p->key = key;
+ p->val.p = val;
+ h = hash(key);
+ p->next = tab[h];
+ tab[h] = p;
+ ++len;
+}
+
+void GooHash::add(GooString *key, int val) {
+ GooHashBucket *p;
+ int h;
+
+ // expand the table if necessary
+ if (len >= size) {
+ expand();
+ }
+
+ // add the new symbol
+ p = new GooHashBucket;
+ p->key = key;
+ p->val.i = val;
+ h = hash(key);
+ p->next = tab[h];
+ tab[h] = p;
+ ++len;
+}
+
+void GooHash::replace(GooString *key, void *val) {
+ GooHashBucket *p;
+ int h;
+
+ if ((p = find(key, &h))) {
+ p->val.p = val;
+ delete key;
+ } else {
+ add(key, val);
+ }
+}
+
+void GooHash::replace(GooString *key, int val) {
+ GooHashBucket *p;
+ int h;
+
+ if ((p = find(key, &h))) {
+ p->val.i = val;
+ delete key;
+ } else {
+ add(key, val);
+ }
+}
+
+void *GooHash::lookup(GooString *key) {
+ GooHashBucket *p;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return NULL;
+ }
+ return p->val.p;
+}
+
+int GooHash::lookupInt(GooString *key) {
+ GooHashBucket *p;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return 0;
+ }
+ return p->val.i;
+}
+
+void *GooHash::lookup(char *key) {
+ GooHashBucket *p;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return NULL;
+ }
+ return p->val.p;
+}
+
+int GooHash::lookupInt(char *key) {
+ GooHashBucket *p;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return 0;
+ }
+ return p->val.i;
+}
+
+void *GooHash::remove(GooString *key) {
+ GooHashBucket *p;
+ GooHashBucket **q;
+ void *val;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return NULL;
+ }
+ q = &tab[h];
+ while (*q != p) {
+ q = &((*q)->next);
+ }
+ *q = p->next;
+ if (deleteKeys) {
+ delete p->key;
+ }
+ val = p->val.p;
+ delete p;
+ --len;
+ return val;
+}
+
+int GooHash::removeInt(GooString *key) {
+ GooHashBucket *p;
+ GooHashBucket **q;
+ int val;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return 0;
+ }
+ q = &tab[h];
+ while (*q != p) {
+ q = &((*q)->next);
+ }
+ *q = p->next;
+ if (deleteKeys) {
+ delete p->key;
+ }
+ val = p->val.i;
+ delete p;
+ --len;
+ return val;
+}
+
+void *GooHash::remove(char *key) {
+ GooHashBucket *p;
+ GooHashBucket **q;
+ void *val;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return NULL;
+ }
+ q = &tab[h];
+ while (*q != p) {
+ q = &((*q)->next);
+ }
+ *q = p->next;
+ if (deleteKeys) {
+ delete p->key;
+ }
+ val = p->val.p;
+ delete p;
+ --len;
+ return val;
+}
+
+int GooHash::removeInt(char *key) {
+ GooHashBucket *p;
+ GooHashBucket **q;
+ int val;
+ int h;
+
+ if (!(p = find(key, &h))) {
+ return 0;
+ }
+ q = &tab[h];
+ while (*q != p) {
+ q = &((*q)->next);
+ }
+ *q = p->next;
+ if (deleteKeys) {
+ delete p->key;
+ }
+ val = p->val.i;
+ delete p;
+ --len;
+ return val;
+}
+
+void GooHash::startIter(GooHashIter **iter) {
+ *iter = new GooHashIter;
+ (*iter)->h = -1;
+ (*iter)->p = NULL;
+}
+
+GBool GooHash::getNext(GooHashIter **iter, GooString **key, void **val) {
+ if (!*iter) {
+ return gFalse;
+ }
+ if ((*iter)->p) {
+ (*iter)->p = (*iter)->p->next;
+ }
+ while (!(*iter)->p) {
+ if (++(*iter)->h == size) {
+ delete *iter;
+ *iter = NULL;
+ return gFalse;
+ }
+ (*iter)->p = tab[(*iter)->h];
+ }
+ *key = (*iter)->p->key;
+ *val = (*iter)->p->val.p;
+ return gTrue;
+}
+
+GBool GooHash::getNext(GooHashIter **iter, GooString **key, int *val) {
+ if (!*iter) {
+ return gFalse;
+ }
+ if ((*iter)->p) {
+ (*iter)->p = (*iter)->p->next;
+ }
+ while (!(*iter)->p) {
+ if (++(*iter)->h == size) {
+ delete *iter;
+ *iter = NULL;
+ return gFalse;
+ }
+ (*iter)->p = tab[(*iter)->h];
+ }
+ *key = (*iter)->p->key;
+ *val = (*iter)->p->val.i;
+ return gTrue;
+}
+
+void GooHash::killIter(GooHashIter **iter) {
+ delete *iter;
+ *iter = NULL;
+}
+
+void GooHash::expand() {
+ GooHashBucket **oldTab;
+ GooHashBucket *p;
+ int oldSize, h, i;
+
+ oldSize = size;
+ oldTab = tab;
+ size = 2*size + 1;
+ tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
+ for (h = 0; h < size; ++h) {
+ tab[h] = NULL;
+ }
+ for (i = 0; i < oldSize; ++i) {
+ while (oldTab[i]) {
+ p = oldTab[i];
+ oldTab[i] = oldTab[i]->next;
+ h = hash(p->key);
+ p->next = tab[h];
+ tab[h] = p;
+ }
+ }
+ gfree(oldTab);
+}
+
+GooHashBucket *GooHash::find(GooString *key, int *h) {
+ GooHashBucket *p;
+
+ *h = hash(key);
+ for (p = tab[*h]; p; p = p->next) {
+ if (!p->key->cmp(key)) {
+ return p;
+ }
+ }
+ return NULL;
+}
+
+GooHashBucket *GooHash::find(char *key, int *h) {
+ GooHashBucket *p;
+
+ *h = hash(key);
+ for (p = tab[*h]; p; p = p->next) {
+ if (!p->key->cmp(key)) {
+ return p;
+ }
+ }
+ return NULL;
+}
+
+int GooHash::hash(GooString *key) {
+ char *p;
+ unsigned int h;
+ int i;
+
+ h = 0;
+ for (p = key->getCString(), i = 0; i < key->getLength(); ++p, ++i) {
+ h = 17 * h + (int)(*p & 0xff);
+ }
+ return (int)(h % size);
+}
+
+int GooHash::hash(char *key) {
+ char *p;
+ unsigned int h;
+
+ h = 0;
+ for (p = key; *p; ++p) {
+ h = 17 * h + (int)(*p & 0xff);
+ }
+ return (int)(h % size);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.h
new file mode 100644
index 00000000000..bdcf1c43ece
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooHash.h
@@ -0,0 +1,76 @@
+//========================================================================
+//
+// GooHash.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef GHASH_H
+#define GHASH_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "gtypes.h"
+
+class GooString;
+struct GooHashBucket;
+struct GooHashIter;
+
+//------------------------------------------------------------------------
+
+class GooHash {
+public:
+
+ GooHash(GBool deleteKeysA = gFalse);
+ ~GooHash();
+ void add(GooString *key, void *val);
+ void add(GooString *key, int val);
+ void replace(GooString *key, void *val);
+ void replace(GooString *key, int val);
+ void *lookup(GooString *key);
+ int lookupInt(GooString *key);
+ void *lookup(char *key);
+ int lookupInt(char *key);
+ void *remove(GooString *key);
+ int removeInt(GooString *key);
+ void *remove(char *key);
+ int removeInt(char *key);
+ int getLength() { return len; }
+ void startIter(GooHashIter **iter);
+ GBool getNext(GooHashIter **iter, GooString **key, void **val);
+ GBool getNext(GooHashIter **iter, GooString **key, int *val);
+ void killIter(GooHashIter **iter);
+
+private:
+
+ void expand();
+ GooHashBucket *find(GooString *key, int *h);
+ GooHashBucket *find(char *key, int *h);
+ int hash(GooString *key);
+ int hash(char *key);
+
+ GBool deleteKeys; // set if key strings should be deleted
+ int size; // number of buckets
+ int len; // number of entries
+ GooHashBucket **tab;
+};
+
+#define deleteGooHash(hash, T) \
+ do { \
+ GooHash *_hash = (hash); \
+ { \
+ GooHashIter *_iter; \
+ GooString *_key; \
+ void *_p; \
+ _hash->startIter(&_iter); \
+ while (_hash->getNext(&_iter, &_key, &_p)) { \
+ delete (T*)_p; \
+ } \
+ delete _hash; \
+ } \
+ } while(0)
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.cc
new file mode 100644
index 00000000000..dc6e4e21e00
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.cc
@@ -0,0 +1,97 @@
+//========================================================================
+//
+// GooList.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "gmem.h"
+#include "GooList.h"
+
+//------------------------------------------------------------------------
+// GooList
+//------------------------------------------------------------------------
+
+GooList::GooList() {
+ size = 8;
+ data = (void **)gmallocn(size, sizeof(void*));
+ length = 0;
+ inc = 0;
+}
+
+GooList::GooList(int sizeA) {
+ size = sizeA;
+ data = (void **)gmallocn(size, sizeof(void*));
+ length = 0;
+ inc = 0;
+}
+
+GooList::~GooList() {
+ gfree(data);
+}
+
+void GooList::append(void *p) {
+ if (length >= size) {
+ expand();
+ }
+ data[length++] = p;
+}
+
+void GooList::append(GooList *list) {
+ int i;
+
+ while (length + list->length > size) {
+ expand();
+ }
+ for (i = 0; i < list->length; ++i) {
+ data[length++] = list->data[i];
+ }
+}
+
+void GooList::insert(int i, void *p) {
+ if (length >= size) {
+ expand();
+ }
+ if (i < length) {
+ memmove(data+i+1, data+i, (length - i) * sizeof(void *));
+ }
+ data[i] = p;
+ ++length;
+}
+
+void *GooList::del(int i) {
+ void *p;
+
+ p = data[i];
+ if (i < length - 1) {
+ memmove(data+i, data+i+1, (length - i - 1) * sizeof(void *));
+ }
+ --length;
+ if (size - length >= ((inc > 0) ? inc : size/2)) {
+ shrink();
+ }
+ return p;
+}
+
+void GooList::sort(int (*cmp)(const void *obj1, const void *obj2)) {
+ qsort(data, length, sizeof(void *), cmp);
+}
+
+void GooList::expand() {
+ size += (inc > 0) ? inc : size;
+ data = (void **)greallocn(data, size, sizeof(void*));
+}
+
+void GooList::shrink() {
+ size -= (inc > 0) ? inc : size/2;
+ data = (void **)greallocn(data, size, sizeof(void*));
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.h
new file mode 100644
index 00000000000..576f3e8142d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooList.h
@@ -0,0 +1,94 @@
+//========================================================================
+//
+// GooList.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef GLIST_H
+#define GLIST_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "gtypes.h"
+
+//------------------------------------------------------------------------
+// GooList
+//------------------------------------------------------------------------
+
+class GooList {
+public:
+
+ // Create an empty list.
+ GooList();
+
+ // Create an empty list with space for <size1> elements.
+ GooList(int sizeA);
+
+ // Destructor - does not free pointed-to objects.
+ ~GooList();
+
+ //----- general
+
+ // Get the number of elements.
+ int getLength() { return length; }
+
+ //----- ordered list support
+
+ // Return the <i>th element.
+ // Assumes 0 <= i < length.
+ void *get(int i) { return data[i]; }
+
+ // Append an element to the end of the list.
+ void append(void *p);
+
+ // Append another list to the end of this one.
+ void append(GooList *list);
+
+ // Insert an element at index <i>.
+ // Assumes 0 <= i <= length.
+ void insert(int i, void *p);
+
+ // Deletes and returns the element at index <i>.
+ // Assumes 0 <= i < length.
+ void *del(int i);
+
+ // Sort the list accoring to the given comparison function.
+ // NB: this sorts an array of pointers, so the pointer args need to
+ // be double-dereferenced.
+ void sort(int (*cmp)(const void *ptr1, const void *ptr2));
+
+ //----- control
+
+ // Set allocation increment to <inc>. If inc > 0, that many
+ // elements will be allocated every time the list is expanded.
+ // If inc <= 0, the list will be doubled in size.
+ void setAllocIncr(int incA) { inc = incA; }
+
+private:
+
+ void expand();
+ void shrink();
+
+ void **data; // the list elements
+ int size; // size of data array
+ int length; // number of elements on list
+ int inc; // allocation increment
+};
+
+#define deleteGooList(list, T) \
+ do { \
+ GooList *_list = (list); \
+ { \
+ int _i; \
+ for (_i = 0; _i < _list->getLength(); ++_i) { \
+ delete (T*)_list->get(_i); \
+ } \
+ delete _list; \
+ } \
+ } while (0)
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooMutex.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooMutex.h
new file mode 100644
index 00000000000..3f53a626a67
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooMutex.h
@@ -0,0 +1,63 @@
+//========================================================================
+//
+// GooMutex.h
+//
+// Portable mutex macros.
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GMUTEX_H
+#define GMUTEX_H
+
+// Usage:
+//
+// GooMutex m;
+// gInitMutex(&m);
+// ...
+// gLockMutex(&m);
+// ... critical section ...
+// gUnlockMutex(&m);
+// ...
+// gDestroyMutex(&m);
+
+#ifdef _WIN32
+
+#include <windows.h>
+
+typedef CRITICAL_SECTION GooMutex;
+
+#define gInitMutex(m) InitializeCriticalSection(m)
+#define gDestroyMutex(m) DeleteCriticalSection(m)
+#define gLockMutex(m) EnterCriticalSection(m)
+#define gUnlockMutex(m) LeaveCriticalSection(m)
+
+#else // assume pthreads
+
+#include <pthread.h>
+
+typedef pthread_mutex_t GooMutex;
+
+#define gInitMutex(m) pthread_mutex_init(m, NULL)
+#define gDestroyMutex(m) pthread_mutex_destroy(m)
+#define gLockMutex(m) pthread_mutex_lock(m)
+#define gUnlockMutex(m) pthread_mutex_unlock(m)
+
+#endif
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.cc
new file mode 100644
index 00000000000..0d4cb73fa11
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.cc
@@ -0,0 +1,804 @@
+//========================================================================
+//
+// GooString.cc
+//
+// Simple variable-length string type.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <math.h>
+#include "gmem.h"
+#include "GooString.h"
+
+static const int MAXIMUM_DOUBLE_PREC = 16;
+
+//------------------------------------------------------------------------
+
+union GooStringFormatArg {
+ int i;
+ Guint ui;
+ long l;
+ Gulong ul;
+ double f;
+ char c;
+ char *s;
+ GooString *gs;
+};
+
+enum GooStringFormatType {
+ fmtIntDecimal,
+ fmtIntHex,
+ fmtIntOctal,
+ fmtIntBinary,
+ fmtUIntDecimal,
+ fmtUIntHex,
+ fmtUIntOctal,
+ fmtUIntBinary,
+ fmtLongDecimal,
+ fmtLongHex,
+ fmtLongOctal,
+ fmtLongBinary,
+ fmtULongDecimal,
+ fmtULongHex,
+ fmtULongOctal,
+ fmtULongBinary,
+ fmtDouble,
+ fmtDoubleTrimSmallAware,
+ fmtDoubleTrim,
+ fmtChar,
+ fmtString,
+ fmtGooString,
+ fmtSpace
+};
+
+static char *formatStrings[] = {
+ "d", "x", "o", "b", "ud", "ux", "uo", "ub",
+ "ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb",
+ "f", "gs", "g",
+ "c",
+ "s",
+ "t",
+ "w",
+ NULL
+};
+
+//------------------------------------------------------------------------
+
+int inline GooString::roundedSize(int len) {
+ int delta;
+ if (len <= STR_STATIC_SIZE-1)
+ return STR_STATIC_SIZE;
+ delta = len < 256 ? 7 : 255;
+ return ((len + 1) + delta) & ~delta;
+}
+
+// Make sure that the buffer is big enough to contain <newLength> characters
+// plus terminating 0.
+// We assume that if this is being called from the constructor, <s> was set
+// to NULL and <length> was set to 0 to indicate unused string before calling us.
+void inline GooString::resize(int newLength) {
+ char *s1 = s;
+
+ if (!s || (roundedSize(length) != roundedSize(newLength))) {
+ // requires re-allocating data for string
+ if (newLength < STR_STATIC_SIZE) {
+ s1 = sStatic;
+ } else {
+ // allocate a rounded amount
+ if (s == sStatic)
+ s1 = (char*)gmalloc(roundedSize(newLength));
+ else
+ s1 = (char*)grealloc(s, roundedSize(newLength));
+ }
+ if (s == sStatic || s1 == sStatic) {
+ // copy the minimum, we only need to if are moving to or
+ // from sStatic.
+ // assert(s != s1) the roundedSize condition ensures this
+ if (newLength < length) {
+ memcpy(s1, s, newLength);
+ } else {
+ memcpy(s1, s, length);
+ }
+ }
+
+ }
+
+ s = s1;
+ length = newLength;
+ s[length] = '\0';
+}
+
+GooString* GooString::Set(const char *s1, int s1Len, const char *s2, int s2Len)
+{
+ int newLen = 0;
+ char *p;
+
+ if (s1) {
+ if (CALC_STRING_LEN == s1Len) {
+ s1Len = strlen(s1);
+ } else
+ assert(s1Len >= 0);
+ newLen += s1Len;
+ }
+
+ if (s2) {
+ if (CALC_STRING_LEN == s2Len) {
+ s2Len = strlen(s2);
+ } else
+ assert(s2Len >= 0);
+ newLen += s2Len;
+ }
+
+ resize(newLen);
+ p = s;
+ if (s1) {
+ memcpy(p, s1, s1Len);
+ p += s1Len;
+ }
+ if (s2) {
+ memcpy(p, s2, s2Len);
+ p += s2Len;
+ }
+ return this;
+}
+
+GooString::GooString() {
+ s = NULL;
+ length = 0;
+ Set(NULL);
+}
+
+GooString::GooString(const char *sA) {
+ s = NULL;
+ length = 0;
+ Set(sA, CALC_STRING_LEN);
+}
+
+GooString::GooString(const char *sA, int lengthA) {
+ s = NULL;
+ length = 0;
+ Set(sA, lengthA);
+}
+
+GooString::GooString(GooString *str, int idx, int lengthA) {
+ s = NULL;
+ length = 0;
+ assert(idx + lengthA <= str->length);
+ Set(str->getCString() + idx, lengthA);
+}
+
+GooString::GooString(GooString *str) {
+ s = NULL;
+ length = 0;
+ Set(str->getCString(), str->length);
+}
+
+GooString::GooString(GooString *str1, GooString *str2) {
+ s = NULL;
+ length = 0;
+ Set(str1->getCString(), str1->length, str2->getCString(), str2->length);
+}
+
+GooString *GooString::fromInt(int x) {
+ char buf[24]; // enough space for 64-bit ints plus a little extra
+ char *p;
+ int len;
+ formatInt(x, buf, sizeof(buf), gFalse, 0, 10, &p, &len);
+ return new GooString(p, len);
+}
+
+GooString *GooString::format(char *fmt, ...) {
+ va_list argList;
+ GooString *s;
+
+ s = new GooString();
+ va_start(argList, fmt);
+ s->appendfv(fmt, argList);
+ va_end(argList);
+ return s;
+}
+
+GooString *GooString::formatv(char *fmt, va_list argList) {
+ GooString *s;
+
+ s = new GooString();
+ s->appendfv(fmt, argList);
+ return s;
+}
+
+GooString::~GooString() {
+ if (s != sStatic)
+ free(s);
+}
+
+GooString *GooString::clear() {
+ resize(0);
+ return this;
+}
+
+GooString *GooString::append(char c) {
+ return append((const char*)&c, 1);
+}
+
+GooString *GooString::append(GooString *str) {
+ return append(str->getCString(), str->getLength());
+}
+
+GooString *GooString::append(const char *str, int lengthA) {
+ int prevLen = length;
+ if (CALC_STRING_LEN == lengthA)
+ lengthA = strlen(str);
+ resize(length + lengthA);
+ memcpy(s + prevLen, str, lengthA);
+ return this;
+}
+
+GooString *GooString::appendf(char *fmt, ...) {
+ va_list argList;
+
+ va_start(argList, fmt);
+ appendfv(fmt, argList);
+ va_end(argList);
+ return this;
+}
+
+GooString *GooString::appendfv(char *fmt, va_list argList) {
+ GooStringFormatArg *args;
+ int argsLen, argsSize;
+ GooStringFormatArg arg;
+ int idx, width, prec;
+ GBool reverseAlign, zeroFill;
+ GooStringFormatType ft;
+ char buf[65];
+ int len, i;
+ char *p0, *p1, *str;
+
+ argsLen = 0;
+ argsSize = 8;
+ args = (GooStringFormatArg *)gmallocn(argsSize, sizeof(GooStringFormatArg));
+
+ p0 = fmt;
+ while (*p0) {
+ if (*p0 == '{') {
+ ++p0;
+ if (*p0 == '{') {
+ ++p0;
+ append('{');
+ } else {
+
+ // parse the format string
+ if (!(*p0 >= '0' && *p0 <= '9')) {
+ break;
+ }
+ idx = *p0 - '0';
+ for (++p0; *p0 >= '0' && *p0 <= '9'; ++p0) {
+ idx = 10 * idx + (*p0 - '0');
+ }
+ if (*p0 != ':') {
+ break;
+ }
+ ++p0;
+ if (*p0 == '-') {
+ reverseAlign = gTrue;
+ ++p0;
+ } else {
+ reverseAlign = gFalse;
+ }
+ width = 0;
+ zeroFill = *p0 == '0';
+ for (; *p0 >= '0' && *p0 <= '9'; ++p0) {
+ width = 10 * width + (*p0 - '0');
+ }
+ if (*p0 == '.') {
+ ++p0;
+ prec = 0;
+ for (; *p0 >= '0' && *p0 <= '9'; ++p0) {
+ prec = 10 * prec + (*p0 - '0');
+ }
+ } else {
+ prec = 0;
+ }
+ for (ft = (GooStringFormatType)0;
+ formatStrings[ft];
+ ft = (GooStringFormatType)(ft + 1)) {
+ if (!strncmp(p0, formatStrings[ft], strlen(formatStrings[ft]))) {
+ break;
+ }
+ }
+ if (!formatStrings[ft]) {
+ break;
+ }
+ p0 += strlen(formatStrings[ft]);
+ if (*p0 != '}') {
+ break;
+ }
+ ++p0;
+
+ // fetch the argument
+ if (idx > argsLen) {
+ break;
+ }
+ if (idx == argsLen) {
+ if (argsLen == argsSize) {
+ argsSize *= 2;
+ args = (GooStringFormatArg *)greallocn(args, argsSize,
+ sizeof(GooStringFormatArg));
+ }
+ switch (ft) {
+ case fmtIntDecimal:
+ case fmtIntHex:
+ case fmtIntOctal:
+ case fmtIntBinary:
+ case fmtSpace:
+ args[argsLen].i = va_arg(argList, int);
+ break;
+ case fmtUIntDecimal:
+ case fmtUIntHex:
+ case fmtUIntOctal:
+ case fmtUIntBinary:
+ args[argsLen].ui = va_arg(argList, Guint);
+ break;
+ case fmtLongDecimal:
+ case fmtLongHex:
+ case fmtLongOctal:
+ case fmtLongBinary:
+ args[argsLen].l = va_arg(argList, long);
+ break;
+ case fmtULongDecimal:
+ case fmtULongHex:
+ case fmtULongOctal:
+ case fmtULongBinary:
+ args[argsLen].ul = va_arg(argList, Gulong);
+ break;
+ case fmtDouble:
+ case fmtDoubleTrim:
+ case fmtDoubleTrimSmallAware:
+ args[argsLen].f = va_arg(argList, double);
+ break;
+ case fmtChar:
+ args[argsLen].c = (char)va_arg(argList, int);
+ break;
+ case fmtString:
+ args[argsLen].s = va_arg(argList, char *);
+ break;
+ case fmtGooString:
+ args[argsLen].gs = va_arg(argList, GooString *);
+ break;
+ }
+ ++argsLen;
+ }
+
+ // format the argument
+ arg = args[idx];
+ switch (ft) {
+ case fmtIntDecimal:
+ formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 10, &str, &len);
+ break;
+ case fmtIntHex:
+ formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 16, &str, &len);
+ break;
+ case fmtIntOctal:
+ formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 8, &str, &len);
+ break;
+ case fmtIntBinary:
+ formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 2, &str, &len);
+ break;
+ case fmtUIntDecimal:
+ formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 10,
+ &str, &len);
+ break;
+ case fmtUIntHex:
+ formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 16,
+ &str, &len);
+ break;
+ case fmtUIntOctal:
+ formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 8, &str, &len);
+ break;
+ case fmtUIntBinary:
+ formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 2, &str, &len);
+ break;
+ case fmtLongDecimal:
+ formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 10, &str, &len);
+ break;
+ case fmtLongHex:
+ formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 16, &str, &len);
+ break;
+ case fmtLongOctal:
+ formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 8, &str, &len);
+ break;
+ case fmtLongBinary:
+ formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 2, &str, &len);
+ break;
+ case fmtULongDecimal:
+ formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 10,
+ &str, &len);
+ break;
+ case fmtULongHex:
+ formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 16,
+ &str, &len);
+ break;
+ case fmtULongOctal:
+ formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 8, &str, &len);
+ break;
+ case fmtULongBinary:
+ formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 2, &str, &len);
+ break;
+ case fmtDouble:
+ formatDouble(arg.f, buf, sizeof(buf), prec, gFalse, &str, &len);
+ break;
+ case fmtDoubleTrim:
+ formatDouble(arg.f, buf, sizeof(buf), prec, gTrue, &str, &len);
+ break;
+ case fmtDoubleTrimSmallAware:
+ formatDoubleSmallAware(arg.f, buf, sizeof(buf), prec, gTrue, &str, &len);
+ break;
+ case fmtChar:
+ buf[0] = arg.c;
+ str = buf;
+ len = 1;
+ reverseAlign = !reverseAlign;
+ break;
+ case fmtString:
+ str = arg.s;
+ len = strlen(str);
+ reverseAlign = !reverseAlign;
+ break;
+ case fmtGooString:
+ str = arg.gs->getCString();
+ len = arg.gs->getLength();
+ reverseAlign = !reverseAlign;
+ break;
+ case fmtSpace:
+ str = buf;
+ len = 0;
+ width = arg.i;
+ break;
+ }
+
+ // append the formatted arg, handling width and alignment
+ if (!reverseAlign && len < width) {
+ for (i = len; i < width; ++i) {
+ append(' ');
+ }
+ }
+ append(str, len);
+ if (reverseAlign && len < width) {
+ for (i = len; i < width; ++i) {
+ append(' ');
+ }
+ }
+ }
+
+ } else if (*p0 == '}') {
+ ++p0;
+ if (*p0 == '}') {
+ ++p0;
+ }
+ append('}');
+
+ } else {
+ for (p1 = p0 + 1; *p1 && *p1 != '{' && *p1 != '}'; ++p1) ;
+ append(p0, p1 - p0);
+ p0 = p1;
+ }
+ }
+
+ gfree(args);
+ return this;
+}
+
+void GooString::formatInt(long x, char *buf, int bufSize,
+ GBool zeroFill, int width, int base,
+ char **p, int *len) {
+ static char vals[17] = "0123456789abcdef";
+ GBool neg;
+ int start, i, j;
+
+ i = bufSize;
+ if ((neg = x < 0)) {
+ x = -x;
+ }
+ start = neg ? 1 : 0;
+ if (x == 0) {
+ buf[--i] = '0';
+ } else {
+ while (i > start && x) {
+ buf[--i] = vals[x % base];
+ x /= base;
+ }
+ }
+ if (zeroFill) {
+ for (j = bufSize - i; i > start && j < width - start; ++j) {
+ buf[--i] = '0';
+ }
+ }
+ if (neg) {
+ buf[--i] = '-';
+ }
+ *p = buf + i;
+ *len = bufSize - i;
+}
+
+void GooString::formatUInt(Gulong x, char *buf, int bufSize,
+ GBool zeroFill, int width, int base,
+ char **p, int *len) {
+ static char vals[17] = "0123456789abcdef";
+ int i, j;
+
+ i = bufSize;
+ if (x == 0) {
+ buf[--i] = '0';
+ } else {
+ while (i > 0 && x) {
+ buf[--i] = vals[x % base];
+ x /= base;
+ }
+ }
+ if (zeroFill) {
+ for (j = bufSize - i; i > 0 && j < width; ++j) {
+ buf[--i] = '0';
+ }
+ }
+ *p = buf + i;
+ *len = bufSize - i;
+}
+
+void GooString::formatDouble(double x, char *buf, int bufSize, int prec,
+ GBool trim, char **p, int *len) {
+ GBool neg, started;
+ double x2;
+ int d, i, j;
+
+ if ((neg = x < 0)) {
+ x = -x;
+ }
+ x = floor(x * pow((double)10, prec) + 0.5);
+ i = bufSize;
+ started = !trim;
+ for (j = 0; j < prec && i > 1; ++j) {
+ x2 = floor(0.1 * (x + 0.5));
+ d = (int)floor(x - 10 * x2 + 0.5);
+ if (started || d != 0) {
+ buf[--i] = '0' + d;
+ started = gTrue;
+ }
+ x = x2;
+ }
+ if (i > 1 && started) {
+ buf[--i] = '.';
+ }
+ if (i > 1) {
+ do {
+ x2 = floor(0.1 * (x + 0.5));
+ d = (int)floor(x - 10 * x2 + 0.5);
+ buf[--i] = '0' + d;
+ x = x2;
+ } while (i > 1 && x);
+ }
+ if (neg) {
+ buf[--i] = '-';
+ }
+ *p = buf + i;
+ *len = bufSize - i;
+}
+
+void GooString::formatDoubleSmallAware(double x, char *buf, int bufSize, int prec,
+ GBool trim, char **p, int *len)
+{
+ double absX = fabs(x);
+ if (absX >= 0.1) {
+ formatDouble(x, buf, bufSize, prec, trim, p, len);
+ } else {
+ while (absX < 0.1 && prec < MAXIMUM_DOUBLE_PREC)
+ {
+ absX = absX * 10;
+ prec++;
+ }
+ formatDouble(x, buf, bufSize, prec, trim, p, len);
+ }
+}
+
+GooString *GooString::insert(int i, char c) {
+ return insert(i, (const char*)&c, 1);
+}
+
+GooString *GooString::insert(int i, GooString *str) {
+ return insert(i, str->getCString(), str->getLength());
+}
+
+GooString *GooString::insert(int i, const char *str, int lengthA) {
+ int j;
+ int prevLen = length;
+ if (CALC_STRING_LEN == lengthA)
+ lengthA = strlen(str);
+
+ resize(length + lengthA);
+ for (j = prevLen; j >= i; --j)
+ s[j+lengthA] = s[j];
+ memcpy(s+i, str, lengthA);
+ return this;
+}
+
+GooString *GooString::del(int i, int n) {
+ int j;
+
+ if (n > 0) {
+ if (i + n > length) {
+ n = length - i;
+ }
+ for (j = i; j <= length - n; ++j) {
+ s[j] = s[j + n];
+ }
+ resize(length - n);
+ }
+ return this;
+}
+
+GooString *GooString::upperCase() {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ if (islower(s[i]))
+ s[i] = toupper(s[i]);
+ }
+ return this;
+}
+
+GooString *GooString::lowerCase() {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ if (isupper(s[i]))
+ s[i] = tolower(s[i]);
+ }
+ return this;
+}
+
+int GooString::cmp(GooString *str) {
+ int n1, n2, i, x;
+ char *p1, *p2;
+
+ n1 = length;
+ n2 = str->length;
+ for (i = 0, p1 = s, p2 = str->s; i < n1 && i < n2; ++i, ++p1, ++p2) {
+ x = *p1 - *p2;
+ if (x != 0) {
+ return x;
+ }
+ }
+ return n1 - n2;
+}
+
+int GooString::cmpN(GooString *str, int n) {
+ int n1, n2, i, x;
+ char *p1, *p2;
+
+ n1 = length;
+ n2 = str->length;
+ for (i = 0, p1 = s, p2 = str->s;
+ i < n1 && i < n2 && i < n;
+ ++i, ++p1, ++p2) {
+ x = *p1 - *p2;
+ if (x != 0) {
+ return x;
+ }
+ }
+ if (i == n) {
+ return 0;
+ }
+ return n1 - n2;
+}
+
+int GooString::cmp(const char *sA) {
+ int n1, i, x;
+ const char *p1, *p2;
+
+ n1 = length;
+ for (i = 0, p1 = s, p2 = sA; i < n1 && *p2; ++i, ++p1, ++p2) {
+ x = *p1 - *p2;
+ if (x != 0) {
+ return x;
+ }
+ }
+ if (i < n1) {
+ return 1;
+ }
+ if (*p2) {
+ return -1;
+ }
+ return 0;
+}
+
+int GooString::cmpN(const char *sA, int n) {
+ int n1, i, x;
+ const char *p1, *p2;
+
+ n1 = length;
+ for (i = 0, p1 = s, p2 = sA; i < n1 && *p2 && i < n; ++i, ++p1, ++p2) {
+ x = *p1 - *p2;
+ if (x != 0) {
+ return x;
+ }
+ }
+ if (i == n) {
+ return 0;
+ }
+ if (i < n1) {
+ return 1;
+ }
+ if (*p2) {
+ return -1;
+ }
+ return 0;
+}
+
+GBool GooString::hasUnicodeMarker(void)
+{
+ return (s[0] & 0xff) == 0xfe && (s[1] & 0xff) == 0xff;
+}
+
+GooString *GooString::sanitizedName(GBool psmode)
+{
+ GooString *name;
+ char buf[8];
+ int i;
+ char c;
+
+ name = new GooString();
+
+ if (psmode)
+ {
+ // ghostscript chokes on names that begin with out-of-limits
+ // numbers, e.g., 1e4foo is handled correctly (as a name), but
+ // 1e999foo generates a limitcheck error
+ c = getChar(0);
+ if (c >= '0' && c <= '9') {
+ name->append('f');
+ }
+ }
+
+ for (i = 0; i < getLength(); ++i) {
+ c = getChar(i);
+ if (c <= (char)0x20 || c >= (char)0x7f ||
+ c == ' ' ||
+ c == '(' || c == ')' || c == '<' || c == '>' ||
+ c == '[' || c == ']' || c == '{' || c == '}' ||
+ c == '/' || c == '%' || c == '#') {
+ sprintf(buf, "#%02x", c & 0xff);
+ name->append(buf);
+ } else {
+ name->append(c);
+ }
+ }
+ return name;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.h
new file mode 100644
index 00000000000..731f640693b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooString.h
@@ -0,0 +1,176 @@
+//========================================================================
+//
+// GooString.h
+//
+// Simple variable-length string type.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GooString_H
+#define GooString_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdarg.h>
+#include <stdlib.h> // for NULL
+#include "gtypes.h"
+
+class GooString {
+public:
+
+ // Create an empty string.
+ GooString();
+
+ // Create a string from a C string.
+ GooString(const char *sA);
+
+ // Create a string from <lengthA> chars at <sA>. This string
+ // can contain null characters.
+ GooString(const char *sA, int lengthA);
+
+ // Create a string from <lengthA> chars at <idx> in <str>.
+ GooString(GooString *str, int idx, int lengthA);
+
+ // Set content of a string to concatination of <s1> and <s2>. They can both
+ // be NULL. if <s1Len> or <s2Len> is CALC_STRING_LEN, then length of the string
+ // will be calculated with strlen(). Otherwise we assume they are a valid
+ // length of string (or its substring)
+ GooString* Set(const char *s1, int s1Len=CALC_STRING_LEN, const char *s2=NULL, int s2Len=CALC_STRING_LEN);
+
+ // Copy a string.
+ GooString(GooString *str);
+ GooString *copy() { return new GooString(this); }
+
+ // Concatenate two strings.
+ GooString(GooString *str1, GooString *str2);
+
+ // Convert an integer to a string.
+ static GooString *fromInt(int x);
+
+ // Create a formatted string. Similar to printf, but without the
+ // string overflow issues. Formatting elements consist of:
+ // {<arg>:[<width>][.<precision>]<type>}
+ // where:
+ // - <arg> is the argument number (arg 0 is the first argument
+ // following the format string) -- NB: args must be first used in
+ // order; they can be reused in any order
+ // - <width> is the field width -- negative to reverse the alignment;
+ // starting with a leading zero to zero-fill (for integers)
+ // - <precision> is the number of digits to the right of the decimal
+ // point (for floating point numbers)
+ // - <type> is one of:
+ // d, x, o, b -- int in decimal, hex, octal, binary
+ // ud, ux, uo, ub -- unsigned int
+ // ld, lx, lo, lb, uld, ulx, ulo, ulb -- long, unsigned long
+ // f, g -- double
+ // c -- char
+ // s -- string (char *)
+ // t -- GooString *
+ // w -- blank space; arg determines width
+ // To get literal curly braces, use {{ or }}.
+ static GooString *format(char *fmt, ...);
+ static GooString *formatv(char *fmt, va_list argList);
+
+ // Destructor.
+ ~GooString();
+
+ // Get length.
+ int getLength() { return length; }
+
+ // Get C string.
+ char *getCString() { return s; }
+
+ // Get <i>th character.
+ char getChar(int i) { return s[i]; }
+
+ // Change <i>th character.
+ void setChar(int i, char c) { s[i] = c; }
+
+ // Clear string to zero length.
+ GooString *clear();
+
+ // Append a character or string.
+ GooString *append(char c);
+ GooString *append(GooString *str);
+ GooString *append(const char *str, int lengthA=CALC_STRING_LEN);
+
+ // Append a formatted string.
+ GooString *appendf(char *fmt, ...);
+ GooString *appendfv(char *fmt, va_list argList);
+
+ // Insert a character or string.
+ GooString *insert(int i, char c);
+ GooString *insert(int i, GooString *str);
+ GooString *insert(int i, const char *str, int lengthA=CALC_STRING_LEN);
+
+ // Delete a character or range of characters.
+ GooString *del(int i, int n = 1);
+
+ // Convert string to all-upper/all-lower case.
+ GooString *upperCase();
+ GooString *lowerCase();
+
+ // Compare two strings: -1:< 0:= +1:>
+ int cmp(GooString *str);
+ int cmpN(GooString *str, int n);
+ int cmp(const char *sA);
+ int cmpN(const char *sA, int n);
+
+ GBool hasUnicodeMarker(void);
+
+ // Sanitizes the string so that it does
+ // not contain any ( ) < > [ ] { } / %
+ // The postscript mode also has some more strict checks
+ // The caller owns the return value
+ GooString *sanitizedName(GBool psmode);
+
+private:
+ // you can tweak this number for a different speed/memory usage tradeoffs.
+ // In libc malloc() rounding is 16 so it's best to choose a value that
+ // results in sizeof(GooString) be a multiple of 16.
+ // 24 makes sizeof(GooString) to be 32.
+ static const int STR_STATIC_SIZE = 24;
+ // a special value telling that the length of the string is not given
+ // so it must be calculated from the strings
+ static const int CALC_STRING_LEN = -1;
+
+ int roundedSize(int len);
+
+ char sStatic[STR_STATIC_SIZE];
+ int length;
+ char *s;
+
+ void resize(int newLength);
+ static void formatInt(long x, char *buf, int bufSize,
+ GBool zeroFill, int width, int base,
+ char **p, int *len);
+ static void formatUInt(Gulong x, char *buf, int bufSize,
+ GBool zeroFill, int width, int base,
+ char **p, int *len);
+ static void formatDouble(double x, char *buf, int bufSize, int prec,
+ GBool trim, char **p, int *len);
+ static void formatDoubleSmallAware(double x, char *buf, int bufSize, int prec,
+ GBool trim, char **p, int *len);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.cc
new file mode 100644
index 00000000000..769fd639775
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.cc
@@ -0,0 +1,94 @@
+//========================================================================
+//
+// GooTimer.cc
+//
+// This file is licensed under GPLv2 or later
+//
+// Copyright 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "GooTimer.h"
+#include <string.h>
+
+#define USEC_PER_SEC 1000000
+
+//------------------------------------------------------------------------
+// GooTimer
+//------------------------------------------------------------------------
+
+GooTimer::GooTimer() {
+ start();
+}
+
+void GooTimer::start() {
+#ifdef HAVE_GETTIMEOFDAY
+ gettimeofday(&start_time, NULL);
+#elif defined(_MSC_VER)
+ QueryPerformanceCounter(&start_time);
+#endif
+ active = true;
+}
+
+void GooTimer::stop() {
+#ifdef HAVE_GETTIMEOFDAY
+ gettimeofday(&end_time, NULL);
+#elif defined(_MSC_VER)
+ QueryPerformanceCounter(&end_time);
+#endif
+ active = false;
+}
+
+#ifdef HAVE_GETTIMEOFDAY
+double GooTimer::getElapsed()
+{
+ double total;
+ struct timeval elapsed;
+
+ if (active)
+ gettimeofday(&end_time, NULL);
+
+ if (start_time.tv_usec > end_time.tv_usec) {
+ end_time.tv_usec += USEC_PER_SEC;
+ end_time.tv_sec--;
+ }
+
+ elapsed.tv_usec = end_time.tv_usec - start_time.tv_usec;
+ elapsed.tv_sec = end_time.tv_sec - start_time.tv_sec;
+
+ total = elapsed.tv_sec + ((double) elapsed.tv_usec / 1e6);
+ if (total < 0)
+ total = 0;
+
+ return total;
+}
+#elif defined(_MSC_VER)
+double GooTimer::getElapsed()
+{
+ LARGE_INTEGER freq;
+ double time_in_secs;
+ QueryPerformanceFrequency(&freq);
+
+ if (active)
+ QueryPerformanceCounter(&end_time);
+
+ time_in_secs = (double)(end_time.QuadPart-start_time.QuadPart)/(double)freq.QuadPart;
+ return time_in_secs * 1000.0;
+
+}
+#else
+double GooTimer::getElapsed()
+{
+#warning "no support for GooTimer"
+ return 0;
+}
+#endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.h
new file mode 100755
index 00000000000..f03413c21e6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooTimer.h
@@ -0,0 +1,54 @@
+//========================================================================
+//
+// GooTimer.cc
+//
+// This file is licensed under GPLv2 or later
+//
+// Copyright 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team
+//
+//========================================================================
+
+#ifndef GOOTIMER_H
+#define GOOTIMER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "gtypes.h"
+#ifdef HAVE_GETTIMEOFDAY
+#include <sys/time.h>
+#endif
+
+#ifdef _MSC_VER
+#include <windows.h>
+#endif
+
+//------------------------------------------------------------------------
+// GooTimer
+//------------------------------------------------------------------------
+
+class GooTimer {
+public:
+
+ // Create a new timer.
+ GooTimer();
+
+ void start();
+ void stop();
+ double getElapsed();
+
+private:
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval start_time;
+ struct timeval end_time;
+#elif defined(_MSC_VER)
+ LARGE_INTEGER start_time;
+ LARGE_INTEGER end_time;
+#endif
+ GBool active;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/GooVector.h b/Build/source/libs/poppler/poppler-0.12.4/goo/GooVector.h
new file mode 100644
index 00000000000..31a72e9bbe5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/GooVector.h
@@ -0,0 +1,113 @@
+//========================================================================
+//
+// This file comes from pdftohtml project
+// http://pdftohtml.sourceforge.net
+//
+// Copyright from:
+// Gueorgui Ovtcharov
+// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
+// Mikhail Kruk <meshko@cs.brandeis.edu>
+//
+//========================================================================
+
+#ifndef GOO_VECTOR_H
+#define GOO_VECTOR_H
+#include "goo/gtypes.h"
+
+
+template<class T>
+class GooVector{
+private:
+
+ int _size;
+ T* last;
+ T* storage;
+
+ void resize(){
+ if (_size==0) _size=2;else _size=2*_size;
+ T *tmp=new T[_size];
+ if (storage){
+ last=copy(storage,last,tmp);
+ delete [] storage;
+ }
+ else last=tmp;
+ storage=tmp;
+ }
+
+ T* copy(T* src1,T* src2,T* dest){
+ T* tmp=src1;
+ T* d=dest;
+ while(tmp!=src2){
+ *d=*tmp;
+ d++;tmp++;
+ }
+ return d;
+ }
+
+public:
+ typedef T* iterator;
+
+ GooVector(){
+ _size=0;
+ last=0;
+ storage=0;
+}
+
+
+
+virtual ~GooVector(){
+ delete[] storage ;
+}
+
+void reset(){
+ last=storage;
+}
+
+int size(){
+ return (last-storage);
+}
+void push_back(const T& elem){
+ if (!storage||(size() >=_size)) resize();
+ *last=elem;
+ last++;
+
+
+}
+
+
+T pop_back() {
+ if (last!=storage) last--;
+
+ return *last;
+}
+
+
+T operator[](unsigned int i){
+ return *(storage+i);
+}
+
+
+GBool isEmpty() const{
+ return !_size || (last==storage) ;
+}
+
+
+
+iterator begin() const{
+ return storage;
+}
+
+iterator end() const {
+ return last;
+}
+};
+#endif
+
+
+
+
+
+
+
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.am
new file mode 100644
index 00000000000..f10fd150458
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.am
@@ -0,0 +1,35 @@
+noinst_LTLIBRARIES = libgoo.la
+
+if ENABLE_XPDF_HEADERS
+
+poppler_goo_includedir = $(includedir)/poppler/goo
+poppler_goo_include_HEADERS = \
+ GooHash.h \
+ GooList.h \
+ GooTimer.h \
+ GooMutex.h \
+ GooString.h \
+ GooVector.h \
+ gtypes.h \
+ gmem.h \
+ gfile.h \
+ FixedPoint.h \
+ PNGWriter.h \
+ gstrtod.h
+
+endif
+
+INCLUDES = \
+ -I$(top_srcdir)
+
+libgoo_la_SOURCES = \
+ gfile.cc \
+ gmempp.cc \
+ GooHash.cc \
+ GooList.cc \
+ GooTimer.cc \
+ GooString.cc \
+ gmem.cc \
+ FixedPoint.cc \
+ PNGWriter.cc \
+ gstrtod.cc
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.in
new file mode 100644
index 00000000000..c4b58fba847
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/Makefile.in
@@ -0,0 +1,647 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = goo
+DIST_COMMON = $(am__poppler_goo_include_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libgoo_la_LIBADD =
+am_libgoo_la_OBJECTS = gfile.lo gmempp.lo GooHash.lo GooList.lo \
+ GooTimer.lo GooString.lo gmem.lo FixedPoint.lo PNGWriter.lo \
+ gstrtod.lo
+libgoo_la_OBJECTS = $(am_libgoo_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libgoo_la_SOURCES)
+DIST_SOURCES = $(libgoo_la_SOURCES)
+am__poppler_goo_include_HEADERS_DIST = GooHash.h GooList.h GooTimer.h \
+ GooMutex.h GooString.h GooVector.h gtypes.h gmem.h gfile.h \
+ FixedPoint.h PNGWriter.h gstrtod.h
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(poppler_goo_includedir)"
+HEADERS = $(poppler_goo_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+noinst_LTLIBRARIES = libgoo.la
+@ENABLE_XPDF_HEADERS_TRUE@poppler_goo_includedir = $(includedir)/poppler/goo
+@ENABLE_XPDF_HEADERS_TRUE@poppler_goo_include_HEADERS = \
+@ENABLE_XPDF_HEADERS_TRUE@ GooHash.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GooList.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GooTimer.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GooMutex.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GooString.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GooVector.h \
+@ENABLE_XPDF_HEADERS_TRUE@ gtypes.h \
+@ENABLE_XPDF_HEADERS_TRUE@ gmem.h \
+@ENABLE_XPDF_HEADERS_TRUE@ gfile.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FixedPoint.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PNGWriter.h \
+@ENABLE_XPDF_HEADERS_TRUE@ gstrtod.h
+
+INCLUDES = \
+ -I$(top_srcdir)
+
+libgoo_la_SOURCES = \
+ gfile.cc \
+ gmempp.cc \
+ GooHash.cc \
+ GooList.cc \
+ GooTimer.cc \
+ GooString.cc \
+ gmem.cc \
+ FixedPoint.cc \
+ PNGWriter.cc \
+ gstrtod.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign goo/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign goo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libgoo.la: $(libgoo_la_OBJECTS) $(libgoo_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(libgoo_la_OBJECTS) $(libgoo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FixedPoint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooHash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooList.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooString.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GooTimer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PNGWriter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmempp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstrtod.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_goo_includeHEADERS: $(poppler_goo_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_goo_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_goo_includedir)"
+ @list='$(poppler_goo_include_HEADERS)'; test -n "$(poppler_goo_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_goo_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_goo_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_goo_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_goo_include_HEADERS)'; test -n "$(poppler_goo_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_goo_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_goo_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(poppler_goo_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_goo_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-poppler_goo_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-poppler_goo_includeHEADERS \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am \
+ uninstall-poppler_goo_includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.cc
new file mode 100644
index 00000000000..864c976bc2b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.cc
@@ -0,0 +1,110 @@
+//========================================================================
+//
+// PNGWriter.cc
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
+// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#include "PNGWriter.h"
+
+#ifdef ENABLE_LIBPNG
+
+#include "poppler/Error.h"
+
+PNGWriter::PNGWriter()
+{
+}
+
+PNGWriter::~PNGWriter()
+{
+ /* cleanup heap allocation */
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+}
+
+bool PNGWriter::init(FILE *f, int width, int height)
+{
+ /* initialize stuff */
+ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ if (!png_ptr) {
+ error(-1, "png_create_write_struct failed");
+ return false;
+ }
+
+ info_ptr = png_create_info_struct(png_ptr);
+ if (!info_ptr) {
+ error(-1, "png_create_info_struct failed");
+ return false;
+ }
+
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "png_jmpbuf failed");
+ return false;
+ }
+
+ /* write header */
+ png_init_io(png_ptr, f);
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "Error during writing header");
+ return false;
+ }
+
+ // Set up the type of PNG image and the compression level
+ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
+
+ png_byte bit_depth = 8;
+ png_byte color_type = PNG_COLOR_TYPE_RGB;
+ png_byte interlace_type = PNG_INTERLACE_NONE;
+
+ png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, color_type, interlace_type, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+ png_write_info(png_ptr, info_ptr);
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "error during writing png info bytes");
+ return false;
+ }
+
+ return true;
+}
+
+bool PNGWriter::writePointers(png_bytep *rowPointers)
+{
+ png_write_image(png_ptr, rowPointers);
+ /* write bytes */
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "Error during writing bytes");
+ return false;
+ }
+
+ return true;
+}
+
+bool PNGWriter::writeRow(png_bytep *row)
+{
+ // Write the row to the file
+ png_write_rows(png_ptr, row, 1);
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "error during png row write");
+ return false;
+ }
+
+ return true;
+}
+
+bool PNGWriter::close()
+{
+ /* end write */
+ png_write_end(png_ptr, info_ptr);
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ error(-1, "Error during end of write");
+ return false;
+ }
+
+ return true;
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.h b/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.h
new file mode 100644
index 00000000000..0540bd7dfa2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/PNGWriter.h
@@ -0,0 +1,43 @@
+//========================================================================
+//
+// PNGWriter.h
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
+// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#ifndef PNGWRITER_H
+#define PNGWRITER_H
+
+#include <config.h>
+
+#ifdef ENABLE_LIBPNG
+
+#include <cstdio>
+#include <png.h>
+
+class PNGWriter
+{
+ public:
+ PNGWriter();
+ ~PNGWriter();
+
+ bool init(FILE *f, int width, int height);
+
+ bool writePointers(png_bytep *rowPointers);
+ bool writeRow(png_bytep *row);
+
+ bool close();
+
+ private:
+ png_structp png_ptr;
+ png_infop info_ptr;
+};
+
+#endif
+
+#endif \ No newline at end of file
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.cc
new file mode 100644
index 00000000000..e87563057e1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.cc
@@ -0,0 +1,723 @@
+//========================================================================
+//
+// gfile.cc
+//
+// Miscellaneous file and directory name manipulation.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2008 Adam Batkin <adam@batkin.net>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef _WIN32
+# include <time.h>
+#else
+# if defined(MACOS)
+# include <sys/stat.h>
+# elif !defined(ACORN)
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# endif
+# include <limits.h>
+# include <string.h>
+# if !defined(VMS) && !defined(ACORN) && !defined(MACOS)
+# include <pwd.h>
+# endif
+# if defined(VMS) && (__DECCXX_VER < 50200000)
+# include <unixlib.h>
+# endif
+#endif // _WIN32
+#include "GooString.h"
+#include "gfile.h"
+
+// Some systems don't define this, so just make it something reasonably
+// large.
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+//------------------------------------------------------------------------
+
+GooString *getHomeDir() {
+#ifdef VMS
+ //---------- VMS ----------
+ return new GooString("SYS$LOGIN:");
+
+#elif defined(__EMX__) || defined(_WIN32)
+ //---------- OS/2+EMX and Win32 ----------
+ char *s;
+ GooString *ret;
+
+ if ((s = getenv("HOME")))
+ ret = new GooString(s);
+ else
+ ret = new GooString(".");
+ return ret;
+
+#elif defined(ACORN)
+ //---------- RISCOS ----------
+ return new GooString("@");
+
+#elif defined(MACOS)
+ //---------- MacOS ----------
+ return new GooString(":");
+
+#else
+ //---------- Unix ----------
+ char *s;
+ struct passwd *pw;
+ GooString *ret;
+
+ if ((s = getenv("HOME"))) {
+ ret = new GooString(s);
+ } else {
+ if ((s = getenv("USER")))
+ pw = getpwnam(s);
+ else
+ pw = getpwuid(getuid());
+ if (pw)
+ ret = new GooString(pw->pw_dir);
+ else
+ ret = new GooString(".");
+ }
+ return ret;
+#endif
+}
+
+GooString *getCurrentDir() {
+ char buf[PATH_MAX+1];
+
+#if defined(__EMX__)
+ if (_getcwd2(buf, sizeof(buf)))
+#elif defined(_WIN32)
+ if (GetCurrentDirectory(sizeof(buf), buf))
+#elif defined(ACORN)
+ if (strcpy(buf, "@"))
+#elif defined(MACOS)
+ if (strcpy(buf, ":"))
+#else
+ if (getcwd(buf, sizeof(buf)))
+#endif
+ return new GooString(buf);
+ return new GooString();
+}
+
+GooString *appendToPath(GooString *path, char *fileName) {
+#if defined(VMS)
+ //---------- VMS ----------
+ //~ this should handle everything necessary for file
+ //~ requesters, but it's certainly not complete
+ char *p0, *p1, *p2;
+ char *q1;
+
+ p0 = path->getCString();
+ p1 = p0 + path->getLength() - 1;
+ if (!strcmp(fileName, "-")) {
+ if (*p1 == ']') {
+ for (p2 = p1; p2 > p0 && *p2 != '.' && *p2 != '['; --p2) ;
+ if (*p2 == '[')
+ ++p2;
+ path->del(p2 - p0, p1 - p2);
+ } else if (*p1 == ':') {
+ path->append("[-]");
+ } else {
+ path->clear();
+ path->append("[-]");
+ }
+ } else if ((q1 = strrchr(fileName, '.')) && !strncmp(q1, ".DIR;", 5)) {
+ if (*p1 == ']') {
+ path->insert(p1 - p0, '.');
+ path->insert(p1 - p0 + 1, fileName, q1 - fileName);
+ } else if (*p1 == ':') {
+ path->append('[');
+ path->append(']');
+ path->append(fileName, q1 - fileName);
+ } else {
+ path->clear();
+ path->append(fileName, q1 - fileName);
+ }
+ } else {
+ if (*p1 != ']' && *p1 != ':')
+ path->clear();
+ path->append(fileName);
+ }
+ return path;
+
+#elif defined(_WIN32)
+ //---------- Win32 ----------
+ GooString *tmp;
+ char buf[256];
+ char *fp;
+
+ tmp = new GooString(path);
+ tmp->append('/');
+ tmp->append(fileName);
+ GetFullPathName(tmp->getCString(), sizeof(buf), buf, &fp);
+ delete tmp;
+ path->clear();
+ path->append(buf);
+ return path;
+
+#elif defined(ACORN)
+ //---------- RISCOS ----------
+ char *p;
+ int i;
+
+ path->append(".");
+ i = path->getLength();
+ path->append(fileName);
+ for (p = path->getCString() + i; *p; ++p) {
+ if (*p == '/') {
+ *p = '.';
+ } else if (*p == '.') {
+ *p = '/';
+ }
+ }
+ return path;
+
+#elif defined(MACOS)
+ //---------- MacOS ----------
+ char *p;
+ int i;
+
+ path->append(":");
+ i = path->getLength();
+ path->append(fileName);
+ for (p = path->getCString() + i; *p; ++p) {
+ if (*p == '/') {
+ *p = ':';
+ } else if (*p == '.') {
+ *p = ':';
+ }
+ }
+ return path;
+
+#elif defined(__EMX__)
+ //---------- OS/2+EMX ----------
+ int i;
+
+ // appending "." does nothing
+ if (!strcmp(fileName, "."))
+ return path;
+
+ // appending ".." goes up one directory
+ if (!strcmp(fileName, "..")) {
+ for (i = path->getLength() - 2; i >= 0; --i) {
+ if (path->getChar(i) == '/' || path->getChar(i) == '\\' ||
+ path->getChar(i) == ':')
+ break;
+ }
+ if (i <= 0) {
+ if (path->getChar(0) == '/' || path->getChar(0) == '\\') {
+ path->del(1, path->getLength() - 1);
+ } else if (path->getLength() >= 2 && path->getChar(1) == ':') {
+ path->del(2, path->getLength() - 2);
+ } else {
+ path->clear();
+ path->append("..");
+ }
+ } else {
+ if (path->getChar(i-1) == ':')
+ ++i;
+ path->del(i, path->getLength() - i);
+ }
+ return path;
+ }
+
+ // otherwise, append "/" and new path component
+ if (path->getLength() > 0 &&
+ path->getChar(path->getLength() - 1) != '/' &&
+ path->getChar(path->getLength() - 1) != '\\')
+ path->append('/');
+ path->append(fileName);
+ return path;
+
+#else
+ //---------- Unix ----------
+ int i;
+
+ // appending "." does nothing
+ if (!strcmp(fileName, "."))
+ return path;
+
+ // appending ".." goes up one directory
+ if (!strcmp(fileName, "..")) {
+ for (i = path->getLength() - 2; i >= 0; --i) {
+ if (path->getChar(i) == '/')
+ break;
+ }
+ if (i <= 0) {
+ if (path->getChar(0) == '/') {
+ path->del(1, path->getLength() - 1);
+ } else {
+ path->clear();
+ path->append("..");
+ }
+ } else {
+ path->del(i, path->getLength() - i);
+ }
+ return path;
+ }
+
+ // otherwise, append "/" and new path component
+ if (path->getLength() > 0 &&
+ path->getChar(path->getLength() - 1) != '/')
+ path->append('/');
+ path->append(fileName);
+ return path;
+#endif
+}
+
+GooString *grabPath(char *fileName) {
+#ifdef VMS
+ //---------- VMS ----------
+ char *p;
+
+ if ((p = strrchr(fileName, ']')))
+ return new GooString(fileName, p + 1 - fileName);
+ if ((p = strrchr(fileName, ':')))
+ return new GooString(fileName, p + 1 - fileName);
+ return new GooString();
+
+#elif defined(__EMX__) || defined(_WIN32)
+ //---------- OS/2+EMX and Win32 ----------
+ char *p;
+
+ if ((p = strrchr(fileName, '/')))
+ return new GooString(fileName, p - fileName);
+ if ((p = strrchr(fileName, '\\')))
+ return new GooString(fileName, p - fileName);
+ if ((p = strrchr(fileName, ':')))
+ return new GooString(fileName, p + 1 - fileName);
+ return new GooString();
+
+#elif defined(ACORN)
+ //---------- RISCOS ----------
+ char *p;
+
+ if ((p = strrchr(fileName, '.')))
+ return new GooString(fileName, p - fileName);
+ return new GooString();
+
+#elif defined(MACOS)
+ //---------- MacOS ----------
+ char *p;
+
+ if ((p = strrchr(fileName, ':')))
+ return new GooString(fileName, p - fileName);
+ return new GooString();
+
+#else
+ //---------- Unix ----------
+ char *p;
+
+ if ((p = strrchr(fileName, '/')))
+ return new GooString(fileName, p - fileName);
+ return new GooString();
+#endif
+}
+
+GBool isAbsolutePath(char *path) {
+#ifdef VMS
+ //---------- VMS ----------
+ return strchr(path, ':') ||
+ (path[0] == '[' && path[1] != '.' && path[1] != '-');
+
+#elif defined(__EMX__) || defined(_WIN32)
+ //---------- OS/2+EMX and Win32 ----------
+ return path[0] == '/' || path[0] == '\\' || path[1] == ':';
+
+#elif defined(ACORN)
+ //---------- RISCOS ----------
+ return path[0] == '$';
+
+#elif defined(MACOS)
+ //---------- MacOS ----------
+ return path[0] != ':';
+
+#else
+ //---------- Unix ----------
+ return path[0] == '/';
+#endif
+}
+
+GooString *makePathAbsolute(GooString *path) {
+#ifdef VMS
+ //---------- VMS ----------
+ char buf[PATH_MAX+1];
+
+ if (!isAbsolutePath(path->getCString())) {
+ if (getcwd(buf, sizeof(buf))) {
+ path->insert(0, buf);
+ }
+ }
+ return path;
+
+#elif defined(_WIN32)
+ //---------- Win32 ----------
+ char buf[_MAX_PATH];
+ char *fp;
+
+ buf[0] = '\0';
+ if (!GetFullPathName(path->getCString(), _MAX_PATH, buf, &fp)) {
+ path->clear();
+ return path;
+ }
+ path->clear();
+ path->append(buf);
+ return path;
+
+#elif defined(ACORN)
+ //---------- RISCOS ----------
+ path->insert(0, '@');
+ return path;
+
+#elif defined(MACOS)
+ //---------- MacOS ----------
+ path->del(0, 1);
+ return path;
+
+#else
+ //---------- Unix and OS/2+EMX ----------
+ struct passwd *pw;
+ char buf[PATH_MAX+1];
+ GooString *s;
+ char *p1, *p2;
+ int n;
+
+ if (path->getChar(0) == '~') {
+ if (path->getChar(1) == '/' ||
+#ifdef __EMX__
+ path->getChar(1) == '\\' ||
+#endif
+ path->getLength() == 1) {
+ path->del(0, 1);
+ s = getHomeDir();
+ path->insert(0, s);
+ delete s;
+ } else {
+ p1 = path->getCString() + 1;
+#ifdef __EMX__
+ for (p2 = p1; *p2 && *p2 != '/' && *p2 != '\\'; ++p2) ;
+#else
+ for (p2 = p1; *p2 && *p2 != '/'; ++p2) ;
+#endif
+ if ((n = p2 - p1) > PATH_MAX)
+ n = PATH_MAX;
+ strncpy(buf, p1, n);
+ buf[n] = '\0';
+ if ((pw = getpwnam(buf))) {
+ path->del(0, p2 - p1 + 1);
+ path->insert(0, pw->pw_dir);
+ }
+ }
+ } else if (!isAbsolutePath(path->getCString())) {
+ if (getcwd(buf, sizeof(buf))) {
+#ifndef __EMX__
+ path->insert(0, '/');
+#endif
+ path->insert(0, buf);
+ }
+ }
+ return path;
+#endif
+}
+
+time_t getModTime(char *fileName) {
+#ifdef _WIN32
+ //~ should implement this, but it's (currently) only used in xpdf
+ return 0;
+#else
+ struct stat statBuf;
+
+ if (stat(fileName, &statBuf)) {
+ return 0;
+ }
+ return statBuf.st_mtime;
+#endif
+}
+
+GBool openTempFile(GooString **name, FILE **f, char *mode) {
+#if defined(_WIN32)
+ //---------- Win32 ----------
+ char *tempDir;
+ GooString *s, *s2;
+ char buf[32];
+ FILE *f2;
+ int t, i;
+
+ // this has the standard race condition problem, but I haven't found
+ // a better way to generate temp file names with extensions on
+ // Windows
+ if ((tempDir = getenv("TEMP"))) {
+ s = new GooString(tempDir);
+ s->append('\\');
+ } else {
+ s = new GooString();
+ }
+ s->append("x");
+ t = (int)time(NULL);
+ for (i = 0; i < 1000; ++i) {
+ sprintf(buf, "%d", t + i);
+ s2 = s->copy()->append(buf);
+ if (!(f2 = fopen(s2->getCString(), "r"))) {
+ if (!(f2 = fopen(s2->getCString(), mode))) {
+ delete s2;
+ delete s;
+ return gFalse;
+ }
+ *name = s2;
+ *f = f2;
+ delete s;
+ return gTrue;
+ }
+ fclose(f2);
+ delete s2;
+ }
+ delete s;
+ return gFalse;
+#elif defined(VMS) || defined(__EMX__) || defined(ACORN) || defined(MACOS)
+ //---------- non-Unix ----------
+ char *s;
+
+ // There is a security hole here: an attacker can create a symlink
+ // with this file name after the tmpnam call and before the fopen
+ // call. I will happily accept fixes to this function for non-Unix
+ // OSs.
+ if (!(s = tmpnam(NULL))) {
+ return gFalse;
+ }
+ *name = new GooString(s);
+ if (!(*f = fopen((*name)->getCString(), mode))) {
+ delete (*name);
+ return gFalse;
+ }
+ return gTrue;
+#else
+ //---------- Unix ----------
+ char *s;
+ int fd;
+
+#if HAVE_MKSTEMP
+ if ((s = getenv("TMPDIR"))) {
+ *name = new GooString(s);
+ } else {
+ *name = new GooString("/tmp");
+ }
+ (*name)->append("/XXXXXX");
+ fd = mkstemp((*name)->getCString());
+#else // HAVE_MKSTEMP
+ if (!(s = tmpnam(NULL))) {
+ return gFalse;
+ }
+ *name = new GooString(s);
+ fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
+#endif // HAVE_MKSTEMP
+ if (fd < 0 || !(*f = fdopen(fd, mode))) {
+ delete *name;
+ return gFalse;
+ }
+ return gTrue;
+#endif
+}
+
+GBool executeCommand(char *cmd) {
+#ifdef VMS
+ return system(cmd) ? gTrue : gFalse;
+#else
+ return system(cmd) ? gFalse : gTrue;
+#endif
+}
+
+char *getLine(char *buf, int size, FILE *f) {
+ int c, i;
+
+ i = 0;
+ while (i < size - 1) {
+ if ((c = fgetc(f)) == EOF) {
+ break;
+ }
+ buf[i++] = (char)c;
+ if (c == '\x0a') {
+ break;
+ }
+ if (c == '\x0d') {
+ c = fgetc(f);
+ if (c == '\x0a' && i < size - 1) {
+ buf[i++] = (char)c;
+ } else if (c != EOF) {
+ ungetc(c, f);
+ }
+ break;
+ }
+ }
+ buf[i] = '\0';
+ if (i == 0) {
+ return NULL;
+ }
+ return buf;
+}
+
+//------------------------------------------------------------------------
+// GDir and GDirEntry
+//------------------------------------------------------------------------
+
+GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) {
+#ifdef VMS
+ char *p;
+#elif defined(_WIN32)
+ DWORD fa;
+#elif defined(ACORN)
+#else
+ struct stat st;
+#endif
+
+ name = new GooString(nameA);
+ dir = gFalse;
+ fullPath = new GooString(dirPath);
+ appendToPath(fullPath, nameA);
+ if (doStat) {
+#ifdef VMS
+ if (!strcmp(nameA, "-") ||
+ ((p = strrchr(nameA, '.')) && !strncmp(p, ".DIR;", 5)))
+ dir = gTrue;
+#elif defined(ACORN)
+#else
+#ifdef _WIN32
+ fa = GetFileAttributes(fullPath->getCString());
+ dir = (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY));
+#else
+ if (stat(fullPath->getCString(), &st) == 0)
+ dir = S_ISDIR(st.st_mode);
+#endif
+#endif
+ }
+}
+
+GDirEntry::~GDirEntry() {
+ delete fullPath;
+ delete name;
+}
+
+GDir::GDir(char *name, GBool doStatA) {
+ path = new GooString(name);
+ doStat = doStatA;
+#if defined(_WIN32)
+ GooString *tmp;
+
+ tmp = path->copy();
+ tmp->append("/*.*");
+ hnd = FindFirstFile(tmp->getCString(), &ffd);
+ delete tmp;
+#elif defined(ACORN)
+#elif defined(MACOS)
+#else
+ dir = opendir(name);
+#ifdef VMS
+ needParent = strchr(name, '[') != NULL;
+#endif
+#endif
+}
+
+GDir::~GDir() {
+ delete path;
+#if defined(_WIN32)
+ if (hnd != INVALID_HANDLE_VALUE) {
+ FindClose(hnd);
+ hnd = INVALID_HANDLE_VALUE;
+ }
+#elif defined(ACORN)
+#elif defined(MACOS)
+#else
+ if (dir)
+ closedir(dir);
+#endif
+}
+
+GDirEntry *GDir::getNextEntry() {
+ GDirEntry *e;
+
+#if defined(_WIN32)
+ if (hnd != INVALID_HANDLE_VALUE) {
+ e = new GDirEntry(path->getCString(), ffd.cFileName, doStat);
+ if (!FindNextFile(hnd, &ffd)) {
+ FindClose(hnd);
+ hnd = INVALID_HANDLE_VALUE;
+ }
+ } else {
+ e = NULL;
+ }
+#elif defined(ACORN)
+#elif defined(MACOS)
+#elif defined(VMS)
+ struct dirent *ent;
+ e = NULL;
+ if (dir) {
+ if (needParent) {
+ e = new GDirEntry(path->getCString(), "-", doStat);
+ needParent = gFalse;
+ return e;
+ }
+ ent = readdir(dir);
+ if (ent) {
+ e = new GDirEntry(path->getCString(), ent->d_name, doStat);
+ }
+ }
+#else
+ struct dirent *ent;
+ e = NULL;
+ if (dir) {
+ do {
+ ent = readdir(dir);
+ }
+ while (ent && (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")));
+ if (ent) {
+ e = new GDirEntry(path->getCString(), ent->d_name, doStat);
+ }
+ }
+#endif
+
+ return e;
+}
+
+void GDir::rewind() {
+#ifdef _WIN32
+ GooString *tmp;
+
+ if (hnd != INVALID_HANDLE_VALUE)
+ FindClose(hnd);
+ tmp = path->copy();
+ tmp->append("/*.*");
+ hnd = FindFirstFile(tmp->getCString(), &ffd);
+ delete tmp;
+#elif defined(ACORN)
+#elif defined(MACOS)
+#else
+ if (dir)
+ rewinddir(dir);
+#ifdef VMS
+ needParent = strchr(path->getCString(), '[') != NULL;
+#endif
+#endif
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.h b/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.h
new file mode 100644
index 00000000000..17aea024d51
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gfile.h
@@ -0,0 +1,158 @@
+//========================================================================
+//
+// gfile.h
+//
+// Miscellaneous file and directory name manipulation.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GFILE_H
+#define GFILE_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+extern "C" {
+#if defined(_WIN32)
+# include <sys/stat.h>
+# ifdef FPTEX
+# include <win32lib.h>
+# else
+# include <windows.h>
+# endif
+#elif defined(ACORN)
+#elif defined(MACOS)
+# include <ctime.h>
+#else
+# include <unistd.h>
+# include <sys/types.h>
+# ifdef VMS
+# include "vms_dirent.h"
+# elif HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(d) strlen((d)->d_name)
+# else
+# define dirent direct
+# define NAMLEN(d) (d)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+# endif
+#endif
+}
+#include "gtypes.h"
+
+class GooString;
+
+//------------------------------------------------------------------------
+
+// Get home directory path.
+extern GooString *getHomeDir();
+
+// Get current directory.
+extern GooString *getCurrentDir();
+
+// Append a file name to a path string. <path> may be an empty
+// string, denoting the current directory). Returns <path>.
+extern GooString *appendToPath(GooString *path, char *fileName);
+
+// Grab the path from the front of the file name. If there is no
+// directory component in <fileName>, returns an empty string.
+extern GooString *grabPath(char *fileName);
+
+// Is this an absolute path or file name?
+extern GBool isAbsolutePath(char *path);
+
+// Make this path absolute by prepending current directory (if path is
+// relative) or prepending user's directory (if path starts with '~').
+extern GooString *makePathAbsolute(GooString *path);
+
+// Get the modification time for <fileName>. Returns 0 if there is an
+// error.
+extern time_t getModTime(char *fileName);
+
+// Create a temporary file and open it for writing. If <ext> is not
+// NULL, it will be used as the file name extension. Returns both the
+// name and the file pointer. For security reasons, all writing
+// should be done to the returned file pointer; the file may be
+// reopened later for reading, but not for writing. The <mode> string
+// should be "w" or "wb". Returns true on success.
+extern GBool openTempFile(GooString **name, FILE **f, char *mode);
+
+// Execute <command>. Returns true on success.
+extern GBool executeCommand(char *cmd);
+
+// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line
+// conventions.
+extern char *getLine(char *buf, int size, FILE *f);
+
+//------------------------------------------------------------------------
+// GDir and GDirEntry
+//------------------------------------------------------------------------
+
+class GDirEntry {
+public:
+
+ GDirEntry(char *dirPath, char *nameA, GBool doStat);
+ ~GDirEntry();
+ GooString *getName() { return name; }
+ GooString *getFullPath() { return fullPath; }
+ GBool isDir() { return dir; }
+
+private:
+
+ GooString *name; // dir/file name
+ GooString *fullPath;
+ GBool dir; // is it a directory?
+};
+
+class GDir {
+public:
+
+ GDir(char *name, GBool doStatA = gTrue);
+ ~GDir();
+ GDirEntry *getNextEntry();
+ void rewind();
+
+private:
+
+ GooString *path; // directory path
+ GBool doStat; // call stat() for each entry?
+#if defined(_WIN32)
+ WIN32_FIND_DATA ffd;
+ HANDLE hnd;
+#elif defined(ACORN)
+#elif defined(MACOS)
+#else
+ DIR *dir; // the DIR structure from opendir()
+#ifdef VMS
+ GBool needParent; // need to return an entry for [-]
+#endif
+#endif
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.cc
new file mode 100644
index 00000000000..af3e19ef74b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.cc
@@ -0,0 +1,346 @@
+/*
+ * gmem.c
+ *
+ * Memory routines with out-of-memory checking.
+ *
+ * Copyright 1996-2003 Glyph & Cog, LLC
+ */
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <limits.h>
+#include "gmem.h"
+
+#ifdef DEBUG_MEM
+
+typedef struct _GMemHdr {
+ unsigned int magic;
+ int size;
+ int index;
+ struct _GMemHdr *next, *prev;
+} GMemHdr;
+
+#define gMemHdrSize ((sizeof(GMemHdr) + 7) & ~7)
+#define gMemTrlSize (sizeof(long))
+
+#define gMemMagic 0xabcd9999
+
+#if gmemTrlSize==8
+#define gMemDeadVal 0xdeadbeefdeadbeefUL
+#else
+#define gMemDeadVal 0xdeadbeefUL
+#endif
+
+/* round data size so trailer will be aligned */
+#define gMemDataSize(size) \
+ ((((size) + gMemTrlSize - 1) / gMemTrlSize) * gMemTrlSize)
+
+static GMemHdr *gMemHead = NULL;
+static GMemHdr *gMemTail = NULL;
+
+static int gMemIndex = 0;
+static int gMemAlloc = 0;
+static int gMemInUse = 0;
+
+#endif /* DEBUG_MEM */
+
+inline static void *gmalloc(size_t size, bool checkoverflow) GMEM_EXCEP {
+#ifdef DEBUG_MEM
+ int size1;
+ char *mem;
+ GMemHdr *hdr;
+ void *data;
+ unsigned long *trl, *p;
+
+ if (size <= 0) {
+ return NULL;
+ }
+ size1 = gMemDataSize(size);
+ if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Out of memory\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ hdr = (GMemHdr *)mem;
+ data = (void *)(mem + gMemHdrSize);
+ trl = (unsigned long *)(mem + gMemHdrSize + size1);
+ hdr->magic = gMemMagic;
+ hdr->size = size;
+ hdr->index = gMemIndex++;
+ if (gMemTail) {
+ gMemTail->next = hdr;
+ hdr->prev = gMemTail;
+ gMemTail = hdr;
+ } else {
+ hdr->prev = NULL;
+ gMemHead = gMemTail = hdr;
+ }
+ hdr->next = NULL;
+ ++gMemAlloc;
+ gMemInUse += size;
+ for (p = (unsigned long *)data; p <= trl; ++p) {
+ *p = gMemDeadVal;
+ }
+ return data;
+#else
+ void *p;
+
+ if (size <= 0) {
+ return NULL;
+ }
+ if (!(p = malloc(size))) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Out of memory\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ return p;
+#endif
+}
+
+void *gmalloc(size_t size) GMEM_EXCEP {
+ return gmalloc(size, false);
+}
+
+void *gmalloc_checkoverflow(size_t size) GMEM_EXCEP {
+ return gmalloc(size, true);
+}
+
+inline static void *grealloc(void *p, size_t size, bool checkoverflow) GMEM_EXCEP {
+#ifdef DEBUG_MEM
+ GMemHdr *hdr;
+ void *q;
+ int oldSize;
+
+ if (size <= 0) {
+ if (p) {
+ gfree(p);
+ }
+ return NULL;
+ }
+ if (p) {
+ hdr = (GMemHdr *)((char *)p - gMemHdrSize);
+ oldSize = hdr->size;
+ q = gmalloc(size, checkoverflow);
+ memcpy(q, p, size < oldSize ? size : oldSize);
+ gfree(p);
+ } else {
+ q = gmalloc(size, checkoverflow);
+ }
+ return q;
+#else
+ void *q;
+
+ if (size <= 0) {
+ if (p) {
+ free(p);
+ }
+ return NULL;
+ }
+ if (p) {
+ q = realloc(p, size);
+ } else {
+ q = malloc(size);
+ }
+ if (!q) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Out of memory\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ return q;
+#endif
+}
+
+void *grealloc(void *p, size_t size) GMEM_EXCEP {
+ return grealloc(p, size, false);
+}
+
+void *grealloc_checkoverflow(void *p, size_t size) GMEM_EXCEP {
+ return grealloc(p, size, true);
+}
+
+inline static void *gmallocn(int nObjs, int objSize, bool checkoverflow) GMEM_EXCEP {
+ int n;
+
+ if (nObjs == 0) {
+ return NULL;
+ }
+ n = nObjs * objSize;
+ if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Bogus memory allocation size\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ return gmalloc(n, checkoverflow);
+}
+
+void *gmallocn(int nObjs, int objSize) GMEM_EXCEP {
+ return gmallocn(nObjs, objSize, false);
+}
+
+void *gmallocn_checkoverflow(int nObjs, int objSize) GMEM_EXCEP {
+ return gmallocn(nObjs, objSize, true);
+}
+
+inline static void *gmallocn3(int a, int b, int c, bool checkoverflow) GMEM_EXCEP {
+ int n = a * b;
+ if (b <= 0 || a < 0 || a >= INT_MAX / b) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Bogus memory allocation size\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ return gmallocn(n, c, checkoverflow);
+}
+
+void *gmallocn3(int a, int b, int c) GMEM_EXCEP {
+ return gmallocn3(a, b, c, false);
+}
+
+void *gmallocn3_checkoverflow(int a, int b, int c) GMEM_EXCEP {
+ return gmallocn3(a, b, c, true);
+}
+
+inline static void *greallocn(void *p, int nObjs, int objSize, bool checkoverflow) GMEM_EXCEP {
+ int n;
+
+ if (nObjs == 0) {
+ if (p) {
+ gfree(p);
+ }
+ return NULL;
+ }
+ n = nObjs * objSize;
+ if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
+#if USE_EXCEPTIONS
+ throw GMemException();
+#else
+ fprintf(stderr, "Bogus memory allocation size\n");
+ if (checkoverflow) return NULL;
+ else exit(1);
+#endif
+ }
+ return grealloc(p, n, checkoverflow);
+}
+
+void *greallocn(void *p, int nObjs, int objSize) GMEM_EXCEP {
+ return greallocn(p, nObjs, objSize, false);
+}
+
+void *greallocn_checkoverflow(void *p, int nObjs, int objSize) GMEM_EXCEP {
+ return greallocn(p, nObjs, objSize, true);
+}
+
+void gfree(void *p) {
+#ifdef DEBUG_MEM
+ int size;
+ GMemHdr *hdr;
+ unsigned long *trl, *clr;
+
+ if (p) {
+ hdr = (GMemHdr *)((char *)p - gMemHdrSize);
+ if (hdr->magic == gMemMagic &&
+ ((hdr->prev == NULL) == (hdr == gMemHead)) &&
+ ((hdr->next == NULL) == (hdr == gMemTail))) {
+ if (hdr->prev) {
+ hdr->prev->next = hdr->next;
+ } else {
+ gMemHead = hdr->next;
+ }
+ if (hdr->next) {
+ hdr->next->prev = hdr->prev;
+ } else {
+ gMemTail = hdr->prev;
+ }
+ --gMemAlloc;
+ gMemInUse -= hdr->size;
+ size = gMemDataSize(hdr->size);
+ trl = (unsigned long *)((char *)hdr + gMemHdrSize + size);
+ if (*trl != gMemDeadVal) {
+ fprintf(stderr, "Overwrite past end of block %d at address %p\n",
+ hdr->index, p);
+ }
+ for (clr = (unsigned long *)hdr; clr <= trl; ++clr) {
+ *clr = gMemDeadVal;
+ }
+ free(hdr);
+ } else {
+ fprintf(stderr, "Attempted to free bad address %p\n", p);
+ }
+ }
+#else
+ if (p) {
+ free(p);
+ }
+#endif
+}
+
+#ifdef DEBUG_MEM
+void gMemReport(FILE *f) {
+ GMemHdr *p;
+
+ fprintf(f, "%d memory allocations in all\n", gMemIndex);
+ if (gMemAlloc > 0) {
+ fprintf(f, "%d memory blocks left allocated:\n", gMemAlloc);
+ fprintf(f, " index size\n");
+ fprintf(f, "-------- --------\n");
+ for (p = gMemHead; p; p = p->next) {
+ fprintf(f, "%8d %8d\n", p->index, p->size);
+ }
+ } else {
+ fprintf(f, "No memory blocks left allocated\n");
+ }
+}
+#endif
+
+char *copyString(char *s) {
+ char *s1;
+
+ s1 = (char *)gmalloc(strlen(s) + 1);
+ strcpy(s1, s);
+ return s1;
+}
+
+char *gstrndup(const char *s, size_t n) {
+ char *s1 = (char*)gmalloc(n + 1); /* cannot return NULL for size > 0 */
+ s1[n] = '\0';
+ memcpy(s1, s, n);
+ return s1;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.h b/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.h
new file mode 100644
index 00000000000..ea75fb946f1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gmem.h
@@ -0,0 +1,108 @@
+/*
+ * gmem.h
+ *
+ * Memory routines with out-of-memory checking.
+ *
+ * Copyright 1996-2003 Glyph & Cog, LLC
+ */
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GMEM_H
+#define GMEM_H
+
+#include <stdio.h>
+#include "poppler/poppler-config.h"
+
+#if USE_EXCEPTIONS
+
+class GMemException {
+public:
+ GMemException() {}
+ ~GMemException() {}
+};
+
+#define GMEM_EXCEP throw(GMemException)
+
+#else // USE_EXCEPTIONS
+
+#define GMEM_EXCEP
+
+#endif // USE_EXCEPTIONS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Same as malloc, but prints error message and exits if malloc()
+ * returns NULL.
+ */
+extern void *gmalloc(size_t size) GMEM_EXCEP;
+extern void *gmalloc_checkoverflow(size_t size) GMEM_EXCEP;
+
+/*
+ * Same as realloc, but prints error message and exits if realloc()
+ * returns NULL. If <p> is NULL, calls malloc instead of realloc().
+ */
+extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
+extern void *grealloc_checkoverflow(size_t size) GMEM_EXCEP;
+
+/*
+ * These are similar to gmalloc and grealloc, but take an object count
+ * and size. The result is similar to allocating nObjs * objSize
+ * bytes, but there is an additional error check that the total size
+ * doesn't overflow an int.
+ * The gmallocn_checkoverflow variant returns NULL instead of exiting
+ * the application if a overflow is detected
+ */
+extern void *gmallocn(int nObjs, int objSize) GMEM_EXCEP;
+extern void *gmallocn_checkoverflow(int nObjs, int objSize) GMEM_EXCEP;
+extern void *gmallocn3(int a, int b, int c) GMEM_EXCEP;
+extern void *gmallocn3_checkoverflow(int a, int b, int c) GMEM_EXCEP;
+extern void *greallocn(void *p, int nObjs, int objSize) GMEM_EXCEP;
+extern void *greallocn_checkoverflow(void *p, int nObjs, int objSize) GMEM_EXCEP;
+
+/*
+ * Same as free, but checks for and ignores NULL pointers.
+ */
+extern void gfree(void *p);
+
+#ifdef DEBUG_MEM
+/*
+ * Report on unfreed memory.
+ */
+extern void gMemReport(FILE *f);
+#else
+#define gMemReport(f)
+#endif
+
+/*
+ * Allocate memory and copy a string into it.
+ */
+extern char *copyString(char *s);
+
+/*
+ * Allocate memory and copy a limited-length string to it.
+ */
+extern char *gstrndup(const char *s, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gmempp.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/gmempp.cc
new file mode 100644
index 00000000000..a70338ca3ce
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gmempp.cc
@@ -0,0 +1,32 @@
+//========================================================================
+//
+// gmempp.cc
+//
+// Use gmalloc/gfree for C++ new/delete operators.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+#include "gmem.h"
+
+#ifdef DEBUG_MEM
+
+void *operator new(size_t size) {
+ return gmalloc((int)size);
+}
+
+void *operator new[](size_t size) {
+ return gmalloc((int)size);
+}
+
+void operator delete(void *p) {
+ gfree(p);
+}
+
+void operator delete[](void *p) {
+ gfree(p);
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.cc b/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.cc
new file mode 100644
index 00000000000..e6c3a00741f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.cc
@@ -0,0 +1,147 @@
+/* This file is part of Libspectre.
+ *
+ * Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * Libspectre is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Libspectre is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* This function comes from spectre-utils from libspectre */
+
+#include "gstrtod.h"
+
+#include <clocale>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
+
+#define ascii_isspace(c) \
+ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')
+#define ascii_isdigit(c) \
+ (c >= '0' && c <= '9')
+
+double gatof(const char *nptr)
+{
+ return gstrtod(nptr, NULL);
+}
+
+double gstrtod(const char *nptr, char **endptr)
+{
+ char *fail_pos;
+ double val;
+ struct lconv *locale_data;
+ const char *decimal_point;
+ int decimal_point_len;
+ const char *p, *decimal_point_pos;
+ const char *end = NULL; /* Silence gcc */
+ int strtod_errno;
+
+ fail_pos = NULL;
+
+ locale_data = localeconv ();
+ decimal_point = locale_data->decimal_point;
+ decimal_point_len = strlen (decimal_point);
+
+ decimal_point_pos = NULL;
+ end = NULL;
+
+ if (decimal_point[0] != '.' || decimal_point[1] != 0) {
+ p = nptr;
+ /* Skip leading space */
+ while (ascii_isspace (*p))
+ p++;
+
+ /* Skip leading optional sign */
+ if (*p == '+' || *p == '-')
+ p++;
+
+ if (ascii_isdigit (*p) || *p == '.') {
+ while (ascii_isdigit (*p))
+ p++;
+
+ if (*p == '.')
+ decimal_point_pos = p++;
+
+ while (ascii_isdigit (*p))
+ p++;
+
+ if (*p == 'e' || *p == 'E')
+ p++;
+ if (*p == '+' || *p == '-')
+ p++;
+ while (ascii_isdigit (*p))
+ p++;
+
+ end = p;
+ }
+ /* For the other cases, we need not convert the decimal point */
+ }
+
+ if (decimal_point_pos) {
+ char *copy, *c;
+
+ /* We need to convert the '.' to the locale specific decimal point */
+ copy = (char *) malloc (end - nptr + 1 + decimal_point_len);
+
+ c = copy;
+ memcpy (c, nptr, decimal_point_pos - nptr);
+ c += decimal_point_pos - nptr;
+ memcpy (c, decimal_point, decimal_point_len);
+ c += decimal_point_len;
+ memcpy (c, decimal_point_pos + 1, end - (decimal_point_pos + 1));
+ c += end - (decimal_point_pos + 1);
+ *c = 0;
+
+ errno = 0;
+ val = strtod (copy, &fail_pos);
+ strtod_errno = errno;
+
+ if (fail_pos) {
+ if (fail_pos - copy > decimal_point_pos - nptr)
+ fail_pos = (char *)nptr + (fail_pos - copy) - (decimal_point_len - 1);
+ else
+ fail_pos = (char *)nptr + (fail_pos - copy);
+ }
+
+ free (copy);
+ } else if (end) {
+ char *copy;
+
+ copy = (char *) malloc (end - (char *)nptr + 1);
+ memcpy (copy, nptr, end - nptr);
+ *(copy + (end - (char *)nptr)) = 0;
+
+ errno = 0;
+ val = strtod (copy, &fail_pos);
+ strtod_errno = errno;
+
+ if (fail_pos) {
+ fail_pos = (char *)nptr + (fail_pos - copy);
+ }
+
+ free (copy);
+ } else {
+ errno = 0;
+ val = strtod (nptr, &fail_pos);
+ strtod_errno = errno;
+ }
+
+ if (endptr)
+ *endptr = fail_pos;
+
+ errno = strtod_errno;
+
+ return val;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.h b/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.h
new file mode 100644
index 00000000000..e8abdadf53e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gstrtod.h
@@ -0,0 +1,43 @@
+/* This file is part of Libspectre.
+ *
+ * Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * Libspectre is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Libspectre is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/* This function comes from spectre-utils from libspectre */
+
+#ifndef GSTRTOD_H
+#define GSTRTOD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This function behaves like the standard atof()/(strtod() function
+ * does in the C locale. It does this without actually changing
+ * the current locale, since that would not be thread-safe.
+ * A limitation of the implementation is that this function
+ * will still accept localized versions of infinities and NANs.
+ */
+double gatof(const char *nptr);
+double gstrtod(const char *nptr, char **endptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/goo/gtypes.h b/Build/source/libs/poppler/poppler-0.12.4/goo/gtypes.h
new file mode 100644
index 00000000000..9f64f57d4a1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/goo/gtypes.h
@@ -0,0 +1,29 @@
+/*
+ * gtypes.h
+ *
+ * Some useful simple types.
+ *
+ * Copyright 1996-2003 Glyph & Cog, LLC
+ */
+
+#ifndef GTYPES_H
+#define GTYPES_H
+
+/*
+ * These have stupid names to avoid conflicts with some (but not all)
+ * C++ compilers which define them.
+ */
+typedef int GBool;
+#define gTrue 1
+#define gFalse 0
+
+/*
+ * These have stupid names to avoid conflicts with <sys/types.h>,
+ * which on various systems defines some random subset of these.
+ */
+typedef unsigned char Guchar;
+typedef unsigned short Gushort;
+typedef unsigned int Guint;
+typedef unsigned long Gulong;
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/gtk-doc.make b/Build/source/libs/poppler/poppler-0.12.4/gtk-doc.make
new file mode 100644
index 00000000000..0f87cc797f7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/gtk-doc.make
@@ -0,0 +1,196 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = sh -c
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ mkhtml_options=""; \
+ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
+ if test "$(?)" = "0"; then \
+ mkhtml_options=--path="$(srcdir)"; \
+ fi
+ cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ $(mkinstalldirs) $${installdir} ; \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $${installdir}; \
+ done; \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
+ fi; \
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \
+ fi
+
+uninstall-local:
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/Build/source/libs/poppler/poppler-0.12.4/install-sh b/Build/source/libs/poppler/poppler-0.12.4/install-sh
new file mode 100755
index 00000000000..a5897de6ea7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/ltmain.sh b/Build/source/libs/poppler/poppler-0.12.4/ltmain.sh
new file mode 100755
index 00000000000..3506ead396b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/ltmain.sh
@@ -0,0 +1,8413 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6 Debian-2.2.6a-4"
+TIMESTAMP=""
+package_revision=1.3012
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # Unfortunately, winepath does not exit with a non-zero
+ # error code, so we are forced to check the contents of
+ # stdout. On the other hand, if the command is not
+ # found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both
+ # error code of zero AND non-empty stdout, which explains
+ # the odd construction:
+ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ func_error "Could not determine host path corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+ func_emit_wrapper_part2 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_pathlist "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
+
+static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
+ /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
+ /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
+ /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ printf ("%s", script_text_part1);
+ printf ("%s", script_text_part2);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 1);
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+ target_name));
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+ {
+ if (argv[i][env_set_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_set_opt_len + 1;
+ lt_opt_process_env_set (p);
+ }
+ else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_set (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_set_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+ {
+ if (argv[i][env_prepend_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_prepend_opt_len + 1;
+ lt_opt_process_env_prepend (p);
+ }
+ else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_prepend_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+ {
+ if (argv[i][env_append_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_append_opt_len + 1;
+ lt_opt_process_env_append (p);
+ }
+ else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_append (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_append_opt);
+ continue;
+ }
+ if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal ("Unrecognized option in %s namespace: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/acx_pthread.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/acx_pthread.m4
new file mode 100644
index 00000000000..7ac8ffddc5b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/acx_pthread.m4
@@ -0,0 +1,280 @@
+##### http://autoconf-archive.cryp.to/acx_pthread.html
+#
+# SYNOPSIS
+#
+# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads.
+# It sets the PTHREAD_LIBS output variable to the threads library and
+# linker flags, and the PTHREAD_CFLAGS output variable to any special
+# C compiler flags that are needed. (The user can also force certain
+# compiler flags/libs to be tested by setting these environment
+# variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise).
+# (This is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these
+# flags, but also link it with them as well. e.g. you should link
+# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+# $LIBS
+#
+# If you are only building threads programs, you may wish to use
+# these variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads
+# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+# run it if it is not found. If ACTION-IF-FOUND is not specified, the
+# default action will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or
+# if you have any other suggestions or comments. This macro was based
+# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
+# (with help from M. Frigo), as well as ac_pthread and hb_pthread
+# macros posted by Alejandro Forero Cuervo to the autoconf macro
+# repository. We are also grateful for the helpful feedback of
+# numerous users.
+#
+# LAST MODIFICATION
+#
+# 2006-05-29
+#
+# COPYLEFT
+#
+# Copyright (c) 2006 Steven G. Johnson <stevenj@alum.mit.edu>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you
+# make and distribute a modified version of the Autoconf Macro, you
+# may extend this special exception to the GPL to apply to your
+# modified version as well.
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ [acx_pthread_ok=yes])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+ [attr_name=$attr; break])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+ else
+ PTHREAD_CC=$CC
+ fi
+else
+ PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ acx_pthread_ok=no
+ $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/define-dir.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/define-dir.m4
new file mode 100644
index 00000000000..5e8c5ae138b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/define-dir.m4
@@ -0,0 +1,34 @@
+dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+dnl
+dnl This macro sets VARNAME to the expansion of the DIR variable,
+dnl taking care of fixing up ${prefix} and such.
+dnl
+dnl VARNAME is then offered as both an output variable and a C
+dnl preprocessor symbol.
+dnl
+dnl Example:
+dnl
+dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <kasal@ucw.cz>
+dnl @author Andreas Schwab <schwab@suse.de>
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl @author Alexandre Oliva
+dnl @version 2005-07-29
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/gtk-doc.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/gtk-doc.m4
new file mode 100644
index 00000000000..bfdfa1da69a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/gtk-doc.m4
@@ -0,0 +1,39 @@
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+ dnl for overriding the documentation installation directory
+ AC_ARG_WITH([html-dir],
+ AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+ [with_html_dir='${datadir}/gtk-doc/html'])
+ HTML_DIR="$with_html_dir"
+ AC_SUBST([HTML_DIR])
+
+ dnl enable/disable documentation building
+ AC_ARG_ENABLE([gtk-doc],
+ AS_HELP_STRING([--enable-gtk-doc],
+ [use gtk-doc to build documentation [[default=no]]]),,
+ [enable_gtk_doc=no])
+
+ if test x$enable_gtk_doc = xyes; then
+ ifelse([$1],[],
+ [PKG_CHECK_EXISTS([gtk-doc],,
+ AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+ [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+ AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
+ fi
+
+ AC_MSG_CHECKING([whether to build gtk-doc documentation])
+ AC_MSG_RESULT($enable_gtk_doc)
+
+ AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
+
+ AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
+ AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/libjpeg.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/libjpeg.m4
new file mode 100644
index 00000000000..505abc2712e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/libjpeg.m4
@@ -0,0 +1,108 @@
+dnl Based on Xpdf configure.in and evince configure.ac
+dnl Based on kde acinclude.m4.in, LGPL Licensed
+
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ echo "configure: __oline__: $i/$j" >&AC_FD_CC
+ if test -r "$i/$j"; then
+ echo "taking that" >&AC_FD_CC
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+AC_DEFUN([KDE_FIND_JPEG_HELPER],
+[
+AC_MSG_CHECKING([for libjpeg$2])
+AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
+[
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+],
+[jpeg_CreateDecompress();],
+ eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
+ eval "ac_cv_lib_jpeg_$1=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
+ enable_libjpeg=yes
+ LIBJPEG_LIBS="$ac_cv_lib_jpeg_$1"
+ AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
+else
+ AC_MSG_RESULT(no)
+ $3
+fi
+])
+
+
+AC_DEFUN([POPPLER_FIND_JPEG],
+[
+dnl first look for libraries
+KDE_FIND_JPEG_HELPER(6b, 6b,
+ KDE_FIND_JPEG_HELPER(normal, [],
+ [
+ LIBJPEG_LIBS=
+ ]
+ )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+dnl requires system dependent includes loaded before it)
+AC_CHECK_HEADER([jpeglib.h], [jpeg_incdir=yes], [jpeg_incdir=NO])
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no jpeg support)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG_LIBS" ; then
+ AC_DEFINE_UNQUOTED(ENABLE_LIBJPEG, 1, [Define if you have libjpeg])
+else
+ if test -n "$jpeg_incdir" || test -n "$LIBJPEG_LIBS" ; then
+ AC_MSG_WARN([
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+])
+ else
+ AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+ fi
+ jpeg_incdir=
+ enable_libjpeg=no
+ LIBJPEG_LIBS=
+fi
+
+AC_SUBST(LIBJPEG_LIBS)
+AH_VERBATIM(_AC_CHECK_JPEG,
+[/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+])
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/libpng.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/libpng.m4
new file mode 100644
index 00000000000..2633c13963a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/libpng.m4
@@ -0,0 +1,99 @@
+dnl Based on Xpdf configure.in and evince configure.ac
+dnl Based on kde acinclude.m4.in, LGPL Licensed
+
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ echo "configure: __oline__: $i/$j" >&AC_FD_CC
+ if test -r "$i/$j"; then
+ echo "taking that" >&AC_FD_CC
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+AC_DEFUN([FIND_PNG_HELPER],
+[
+AC_MSG_CHECKING([for libpng])
+AC_CACHE_VAL(ac_cv_lib_png,
+[
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lpng -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+void png_access_version_number();
+#ifdef __cplusplus
+}
+#endif
+],
+[png_access_version_number();],
+ eval "ac_cv_lib_png=-lpng",
+ eval "ac_cv_lib_png=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+ enable_libpng=yes
+ LIBPNG_LIBS="$ac_cv_lib_png"
+ AC_MSG_RESULT($ac_cv_lib_png)
+else
+ AC_MSG_RESULT(no)
+ $1
+fi
+])
+
+
+AC_DEFUN([POPPLER_FIND_PNG],
+[
+dnl first look for libraries
+FIND_PNG_HELPER(
+ FIND_PNG_HELPER(normal, [],
+ [
+ LIBPNG_LIBS=
+ ]
+ )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as png.h
+dnl requires system dependent includes loaded before it)
+png_incdirs="`eval echo $includedir` /usr/include /usr/local/include "
+AC_FIND_FILE(png.h, $png_incdirs, png_incdir)
+test "x$png_incdir" = xNO && png_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no png support)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$png_incdir" && test -n "$LIBPNG_LIBS" ; then
+ AC_DEFINE_UNQUOTED(ENABLE_LIBPNG, 1, [Define if you have libpng])
+else
+ if test -n "$png_incdir" || test -n "$LIBPNG_LIBS" ; then
+ AC_MSG_WARN([
+There is an installation error in png support. You seem to have only one of
+either the headers _or_ the libraries installed. You may need to either provide
+correct --with-extra-... options, or the development package of libpng. You
+can get a source package of libpng from http://www.libpng.org/pub/png/libpng.html
+Disabling PNG support.
+])
+ else
+ AC_MSG_WARN([libpng not found. disable PNG support.])
+ fi
+ png_incdir=
+ enable_libpng=no
+ LIBPNG_LIBS=
+fi
+
+AC_SUBST(LIBPNG_LIBS)
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/libtool.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/libtool.m4
new file mode 100644
index 00000000000..1e7ea47c080
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/libtool.m4
@@ -0,0 +1,7376 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/ltoptions.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/ltoptions.m4
new file mode 100644
index 00000000000..34151a3ba62
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/ltoptions.m4
@@ -0,0 +1,368 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/ltsugar.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/ltsugar.m4
new file mode 100644
index 00000000000..9000a057d31
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/ltversion.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/ltversion.m4
new file mode 100644
index 00000000000..b8e154fe6e1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3012 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6])
+m4_define([LT_PACKAGE_REVISION], [1.3012])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6'
+macro_revision='1.3012'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/lt~obsolete.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/lt~obsolete.m4
new file mode 100644
index 00000000000..637bb2066c4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/lt~obsolete.m4
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/Build/source/libs/poppler/poppler-0.12.4/m4/qt.m4 b/Build/source/libs/poppler/poppler-0.12.4/m4/qt.m4
new file mode 100644
index 00000000000..8de2628ca22
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/m4/qt.m4
@@ -0,0 +1,101 @@
+# POPPLER_FIND_QT(VARIABLE-PREFIX, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check whether the Qt libraries are available. Adapted from
+# OpenOffice.org configure.in
+#
+# --------------------------------------------------------------
+AC_DEFUN([POPPLER_FIND_QT],
+[
+dnl Search paths for Qt
+if test "$build_cpu" != "x86_64" ; then
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+else
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include"
+ qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+fi
+if test -n "$QTDIR" ; then
+ qt_incdirs="$QTDIR/include $qt_incdirs"
+ if test "$build_cpu" != "x86_64" ; then
+ qt_libdirs="$QTDIR/lib $qt_libdirs"
+ else
+ qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
+ fi
+fi
+
+dnl What to test
+qt_test_include="qstyle.h"
+qt_test_la_library="libqt-mt.la"
+qt_test_library="libqt-mt.so"
+
+dnl Check for Qt headers
+AC_MSG_CHECKING([for Qt headers])
+qt_incdir="no"
+for it in $qt_incdirs ; do
+ if test -r "$it/$qt_test_include" ; then
+ qt_incdir="$it"
+ break
+ fi
+done
+AC_MSG_RESULT([$qt_incdir])
+
+dnl Check for Qt libraries
+AC_MSG_CHECKING([for Qt libraries])
+qt_libdir="no"
+for qt_check in $qt_libdirs ; do
+ if test -r "$qt_check/$qt_test_la_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+
+ if test -r "$qt_check/$qt_test_library" ; then
+ qt_libdir="$qt_check"
+ break
+ fi
+done
+AC_MSG_RESULT([$qt_libdir])
+
+if test "x$qt_libdir" != "xno" ; then
+ if test "x$qt_incdir" != "xno" ; then
+ have_qt=yes
+ fi
+fi
+
+if test "x$have_qt" = "xyes"; then
+ AC_LANG_PUSH([C++])
+ pthread_needed=no
+
+ save_LDFLAGS=$LDFLAGS
+ save_CXXFLAGS=$CXXFLAGS
+ save_LIBS=$LIBS
+ CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+ LIBS="$LIBS -L$qt_libdir -lqt-mt"
+ AC_MSG_CHECKING([if Qt needs -pthread])
+ AC_TRY_LINK([#include <qt.h>], [QString s;], [pthread_needed=no], [pthread_needed=yes])
+ if test "x$pthread_needed" = "xyes"; then
+ LDFLAGS="$LDFLAGS -pthread"
+ AC_TRY_LINK([#include <qt.h>], [QString s;], [pthread_needed=yes], [pthread_needed=no])
+ fi
+ AC_MSG_RESULT([$pthread_needed])
+ LDFLAGS=$save_LDFLAGS
+ CXXFLAGS=$save_CXXFLAGS
+ LIBS=$save_LIBS
+
+ AC_LANG_POP
+
+ qtpthread=''
+ if test "x$pthread_needed" = "xyes"; then
+ qtpthread="-pthread"
+ fi
+
+ $1[]_CXXFLAGS="-I$qt_incdir"
+ $1[]_LIBS="$qtpthread -L$qt_libdir -lqt-mt"
+ ifelse([$2], , :, [$2])
+else
+ ifelse([$3], , [AC_MSG_FAILURE(dnl
+[Qt development libraries not found])],
+ [$3])
+fi
+])
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/missing b/Build/source/libs/poppler/poppler-0.12.4/missing
new file mode 100755
index 00000000000..28055d2ae6f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.cmake
new file mode 100644
index 00000000000..b32f118314b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.cmake
@@ -0,0 +1,9 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler-cairo
+Description: Cairo backend for Poppler PDF rendering library
+Version: @POPPLER_VERSION@
+Requires: poppler = @POPPLER_VERSION@ cairo >= @CAIRO_VERSION@
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.in
new file mode 100644
index 00000000000..367a5b690bf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-cairo.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler-cairo
+Description: Cairo backend for Poppler PDF rendering library
+Version: @VERSION@
+Requires: poppler = @VERSION@ cairo >= @CAIRO_VERSION@
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-config.h.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-config.h.cmake
new file mode 100644
index 00000000000..5122a4e629f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-config.h.cmake
@@ -0,0 +1,90 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
+// Copyright 1996-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef POPPLER_CONFIG_H
+#define POPPLER_CONFIG_H
+
+// We duplicate some of the config.h #define's here since they are
+// used in some of the header files we install. The #ifndef/#endif
+// around #undef look odd, but it's to silence warnings about
+// redefining those symbols.
+
+/* Enable multithreading support. */
+#ifndef MULTITHREADED
+#cmakedefine MULTITHREADED 1
+#endif
+
+/* Enable exceptions. */
+#ifndef USE_EXCEPTIONS
+#cmakedefine USE_EXCEPTIONS 1
+#endif
+
+/* Use fixedpoint. */
+#ifndef USE_FIXEDPOINT
+#cmakedefine USE_FIXEDPOINT 1
+#endif
+
+/* Include support for OPI comments. */
+#ifndef OPI_SUPPORT
+#cmakedefine OPI_SUPPORT 1
+#endif
+
+/* Enable word list support. */
+#ifndef TEXTOUT_WORD_LIST
+#cmakedefine TEXTOUT_WORD_LIST 1
+#endif
+
+// Also, there's a couple of preprocessor symbols in the header files
+// that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and
+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// copyright notice
+#define popplerCopyright "Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org"
+#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// popen
+//------------------------------------------------------------------------
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
+#endif
+
+#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
+#define POPEN_READ_MODE "rb"
+#else
+#define POPEN_READ_MODE "r"
+#endif
+
+//------------------------------------------------------------------------
+// Win32 stuff
+//------------------------------------------------------------------------
+
+#if defined(_WIN32) && !defined(_MSC_VER)
+#include <windef.h>
+#else
+#define CDECL
+#endif
+
+//------------------------------------------------------------------------
+// Compiler
+//------------------------------------------------------------------------
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
+ __attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define GCC_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
+
+#endif /* POPPLER_CONFIG_H */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.cmake
new file mode 100644
index 00000000000..5d06bab6c15
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.cmake
@@ -0,0 +1,13 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler-glib
+Description: GLib wrapper for poppler
+Version: @POPPLER_VERSION@
+Requires: @PC_REQUIRES@ gobject-2.0 gdk-2.0 gdk-pixbuf-2.0 @CAIRO_REQ@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-glib
+Cflags: -I${includedir}/poppler/glib
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.in
new file mode 100644
index 00000000000..2b79945d9dc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-glib.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler-glib
+Description: GLib wrapper for poppler
+Version: @VERSION@
+Requires: @PC_REQUIRES@ gobject-2.0 gdk-2.0 gdk-pixbuf-2.0 @CAIRO_REQ@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-glib
+Cflags: -I${includedir}/poppler/glib
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.cmake
new file mode 100644
index 00000000000..a01c03ee52b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.cmake
@@ -0,0 +1,13 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler-qt
+Description: Qt bindings for poppler
+Version: @POPPLER_VERSION@
+Requires: @PC_REQUIRES@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-qt
+Cflags: -I${includedir}/poppler/qt3
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.in
new file mode 100644
index 00000000000..3bab805dc83
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler-qt
+Description: Qt bindings for poppler
+Version: @VERSION@
+Requires: @PC_REQUIRES@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-qt
+Cflags: -I${includedir}/poppler/qt3
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.cmake
new file mode 100644
index 00000000000..b17fd5d8453
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.cmake
@@ -0,0 +1,13 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler-qt4
+Description: Qt4 bindings for poppler
+Version: @POPPLER_VERSION@
+Requires: @PC_REQUIRES@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-qt4
+Cflags: -I${includedir}/poppler/qt4
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.in
new file mode 100644
index 00000000000..306ae46e0b0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-qt4.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler-qt4
+Description: Qt4 bindings for poppler
+Version: @VERSION@
+Requires: @PC_REQUIRES@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-qt4
+Cflags: -I${includedir}/poppler/qt4
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.cmake
new file mode 100644
index 00000000000..cb95b3d2d27
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.cmake
@@ -0,0 +1,9 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler-splash
+Description: Splash backend for Poppler PDF rendering library
+Version: @POPPLER_VERSION@
+Requires: poppler = @POPPLER_VERSION@
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.in
new file mode 100644
index 00000000000..cf3491fc7cf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler-splash.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler-splash
+Description: Splash backend for Poppler PDF rendering library
+Version: @VERSION@
+Requires: poppler = @VERSION@
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.cmake b/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.cmake
new file mode 100644
index 00000000000..f1aebedbefd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: poppler
+Description: PDF rendering library
+Version: @POPPLER_VERSION@
+
+Libs: -L${libdir} -lpoppler
+Cflags: -I${includedir}/poppler
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.in b/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.in
new file mode 100644
index 00000000000..8605b28673b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: poppler
+Description: PDF rendering library
+Version: @VERSION@
+
+Libs: -L${libdir} -lpoppler
+Cflags: -I${includedir}/poppler
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.cc
new file mode 100644
index 00000000000..3a8e7391ddb
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.cc
@@ -0,0 +1,1179 @@
+//========================================================================
+//
+// ABWOutputDev.cc
+//
+// Copyright 2006-2007 Jauco Noordzij <jauco@jauco.nl>
+// Copyright 2007 Dominic Lachowicz <cinamod@hotmail.com>
+// Copyright 2008 Hib Eris <hib@hiberis.nl>
+//
+// Based somewhat on HtmlOutputDev.cc
+//
+//========================================================================
+
+#ifdef __GNUC__
+#pragma implementation
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <ctype.h>
+#include <math.h>
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "UnicodeMap.h"
+#include "goo/gmem.h"
+#include "Error.h"
+#include "GfxState.h"
+#include "GlobalParams.h"
+#include "ABWOutputDev.h"
+#include "PDFDoc.h"
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+
+// Inter-character space width which will cause addChar to start a new
+// word.
+#define minWordBreakSpace 0.1
+
+// Maximum inter-word spacing, as a fraction of the font size.
+#define maxWordSpacing 1.5
+
+// Max distance between baselines of two lines within a block, as a
+// fraction of the font size.
+#define maxLineSpacingDelta 1.5
+
+#define C_maxVCutValue 4
+#define C_maxHCutValue 5
+//------------------------------------------------------------------------
+// ABWOutputDev
+//------------------------------------------------------------------------
+
+ABWOutputDev::ABWOutputDev(xmlDocPtr ext_doc)
+{
+ pdfdoc = NULL;
+ N_page = N_style = N_text = N_styleset = N_Block = N_word = NULL;
+ doc = ext_doc;
+ N_root = xmlNewNode(NULL, BAD_CAST "abiword");
+ xmlDocSetRootElement(doc, N_root);
+ N_styleset = xmlNewChild(N_root, NULL, BAD_CAST "styles", NULL);
+ N_content = xmlNewChild(N_root, NULL, BAD_CAST "content", NULL);
+ uMap = globalParams->getTextEncoding();
+ maxStyle = Style = 1;
+}
+
+ABWOutputDev::~ABWOutputDev() {
+ xmlCleanupParser();
+}
+
+void ABWOutputDev::startPage(int pageNum, GfxState *state) {
+ /*While reading a pdf page this node acts as a placeholder parent.
+ when conversion is finished and the page is structured as we like it
+ all text fragments are moved from N_page to N_content.*/
+ N_page = xmlNewNode(NULL, BAD_CAST "page");
+ G_pageNum = pageNum;
+}
+
+/*Callback to denote that poppler reached the end of a page
+here I insert most of the interesting processing stuff*/
+void ABWOutputDev::endPage() {
+ //make sure all words are closed
+ endTextBlock();
+ cleanUpNode(N_page, true);
+ //xmlAddChild(N_content, N_page);
+ //xmlSaveFormatFileEnc("pre-cut.xml", doc, "UTF-8", 1);
+ //xmlUnlinkNode(N_page);
+ //call the top down cutting mechanism
+ recursiveXYC(N_page);
+ //by stopping to worry about creating empty nodes I made the code quite a
+ //bit more robust. This function makes sure we have a nice'n'clean tree
+ cleanUpNode(N_page, true);
+ //xmlAddChild(N_content, N_page);
+ //xmlSaveFormatFileEnc("raw.xml", doc, "UTF-8", 1);
+ //xmlUnlinkNode(N_page);
+
+ //Interpret the XY tree and infer text blocks and columns
+ interpretXYTree();
+ cleanUpNode(N_page, true);
+ //xmlAddChild(N_content, N_page);
+ //xmlSaveFormatFileEnc("interpreted.xml", doc, "UTF-8", 1);
+ //xmlUnlinkNode(N_page);
+
+ //I have blocks and columns, this function will turn that into paragraphs and
+ //columns
+ generateParagraphs();
+ cleanUpNode(N_page, true);
+ xmlAddChild(N_content, N_page);
+ N_page = NULL;
+}
+
+void ABWOutputDev::recursiveXYC(xmlNodePtr nodeset) {
+ /*This function implements the recursive XY Cut. basically, it gets
+ the largest piece of whitespace (using getBiggestSeperator()) and then
+ splits the page using splitNodes on that whitespace. It calls itself again
+ with both the halves*/
+ float bhs, bvs, X1, X2, Y1, Y2;
+
+ bvs = getBiggestSeperator(nodeset, VERTICAL, &X1, &X2);
+ bhs = getBiggestSeperator(nodeset, HORIZONTAL, &Y1, &Y2);
+
+ if (bvs == -1){
+ if (bhs == -1){//both -1
+ //FIXME: add assertions that bvs and bhs are >=-1
+ printf("No seperators\n");
+ return;
+ }
+ else { //only bhs > -1
+ splitNodes(Y1, HORIZONTAL, nodeset, bhs);
+ }
+ }
+ else {
+ if (bhs == -1){//only bvs > -1
+ splitNodes(X1, VERTICAL, nodeset, bvs);
+ }
+ else {//both > -1
+ if (bvs >= (bhs/1.7)){
+ //When people read a text they prefer vertical cuts over horizontal
+ //ones. I'm not that sure about the 1.7 value, but it seems to work.
+ splitNodes(X1, VERTICAL, nodeset, bvs);
+ }
+ else {
+ splitNodes(Y1, HORIZONTAL, nodeset, bhs);
+ }
+ }
+ }
+ recursiveXYC(nodeset->children);
+ recursiveXYC(nodeset->children->next);
+}
+
+void ABWOutputDev::splitNodes(float splitValue, unsigned int direction, xmlNodePtr N_parent, double seperator){
+ //This function takes a nodeset and splits it based on a cut value. It returns
+ //the nodePtr with two childnodes, the both chunks.
+ xmlNodePtr N_move, N_cur, N_newH, N_newL;
+ char * propName;
+ const char *nodeName;
+ char buf[20];
+ if (direction == HORIZONTAL) {
+ propName = "Y1";
+ nodeName = "horizontal";
+ }
+ else {
+ propName = "X1";
+ nodeName = "vertical";
+ }
+ N_newH = xmlNewNode(NULL, BAD_CAST nodeName);
+ N_newL = xmlNewNode(NULL, BAD_CAST nodeName);
+ sprintf(buf, "%f", seperator);
+ xmlNewProp(N_newH, BAD_CAST "diff", BAD_CAST buf);
+ sprintf(buf, "%f", seperator);
+ xmlNewProp(N_newL, BAD_CAST "diff", BAD_CAST buf);
+ N_cur = N_parent->children;
+ while (N_cur){
+ N_move = N_cur->next;
+ xmlUnlinkNode(N_cur);
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST propName)) > splitValue){
+ xmlAddChild(N_newH, N_cur);
+ }
+ else {
+ xmlAddChild(N_newL, N_cur);
+ }
+ N_cur = N_move;
+ }
+ xmlAddChild(N_parent, N_newL);
+ xmlAddChild(N_parent, N_newH);
+}
+
+float ABWOutputDev::getBiggestSeperator(xmlNodePtr N_set, unsigned int direction, float * C1, float * C2)
+{
+ int i = 0;
+ int nodeCount = xmlLsCountNode(N_set);
+ float store;
+ int min;
+ float gap, endV;
+ float * stt;
+ float * end;
+ if (nodeCount == 0){
+ //Add assertion that this shouldn't happen
+ fprintf(stderr,"No child nodes");
+ return -1;
+ }
+ stt = new float[nodeCount];
+ end = new float[nodeCount];
+ //store all variables in two arrays (one for start, one for end coordinates)
+ if (direction == VERTICAL) {
+ for (xmlNodePtr N_cur = N_set->children; N_cur != NULL; N_cur = N_cur->next){
+ stt[i] = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X1"));
+ end[i] = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X2"));
+ i++;
+ }
+ }
+ else {
+ for (xmlNodePtr N_cur = N_set->children; N_cur != NULL; N_cur = N_cur->next){
+ stt[i] = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y1"));
+ end[i] = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y2"));
+ i++;
+ }
+ }
+ //Sort them
+ for (i = 0; i < nodeCount - 1; i++){
+ min = i;
+ for (int j = i + 1; j < nodeCount; j++)
+ if (stt[j] < stt[i])
+ min = j;
+ store = stt[i];
+ stt[i] = stt[min];
+ stt[min] = store;
+ store = end[i];
+ end[i] = end[min];
+ end[min] = store;
+ }
+ //find the largest gap
+ gap = -1;
+ endV = end[0];
+ *C1 = 0;
+ *C2 = 0;
+ for (int inspect = 1; inspect < nodeCount; inspect++){
+ //no gap
+ if (((stt[inspect] - endV) - gap) < 0.5){ //FIXME:This is copied almost directly from the previous function, needs checking out
+ //partial overlap instead of complete one
+ if (end[inspect] > endV)
+ endV = end[inspect];
+ }
+ //gap
+ else{
+ //gap is larger than any previous gap
+ if (gap < (stt[inspect] - endV)){
+ gap = stt[inspect] - endV;
+ *C1 = endV;
+ *C2 = stt[inspect];
+ }
+ endV = end[inspect];
+ }
+ }
+ delete[] stt;
+ delete[] end;
+ return gap;
+}
+
+void ABWOutputDev::updateFont(GfxState *state) {
+ char buf[160];
+ xmlNodePtr N_cur;
+ GfxFont *font;
+ bool found = false;
+ bool isBold, isItalic, S_isBold, S_isItalic;
+ isBold = isItalic = S_isBold = S_isItalic = false;
+ font = state->getFont();
+ GooString *ftName;
+ char *fnEnd, *fnName;
+ int fnStart, ftSize;
+ //the first time this function is called there is no funt.
+ //Fixme: find out if that isn'y a bug
+ if (font){
+ isBold = (font->isBold() || font->getWeight() >6 || (strstr(font->getOrigName()->getCString(), "Bold")-font->getOrigName()->getCString() == (font->getOrigName()->getLength()-4)));
+ isItalic = (font->isItalic() || (strstr(font->getOrigName()->getCString(), "Italic")-font->getOrigName()->getCString() == (font->getOrigName()->getLength()-6)));
+ ftSize = int(state->getTransformedFontSize())-1;
+ ftName = new GooString(font->getOrigName());
+ fnStart = strcspn(ftName->getCString(), "+");
+ if (fnStart < ftName->getLength())
+ ftName->del(0,fnStart+1);
+ fnEnd = strrchr(ftName->getCString(), 44);
+ if (fnEnd == 0)
+ fnEnd = strrchr(ftName->getCString(), 45);
+ if (fnEnd != 0)
+ ftName->del(fnEnd-ftName->getCString(),ftName->getLength()-1);
+
+/* fnName = ftName;
+ if (isBold or isItalic){
+ fnStart = strcspn(fnName, "+");
+ if (fnStart == font->getOrigName()->getLength())
+ fnStart = 0;
+ else fnStart++;
+
+ fnEnd = strstr(fnName, ",");
+ if (fnEnd == 0)
+ fnEnd = strstr(fnName, "-");
+ if (fnEnd != 0)
+ fnName[fnEnd-fnName] = 0;
+// char fntName[fnLength];
+// strncpy (fntName,fnName+fnStart+1,fnLength);
+ fnName+=fnStart;
+// fnName = fntName;
+ }
+ else {*/
+ fnName = ftName->getCString();
+// }
+ for (N_cur = N_styleset->children; N_cur; N_cur = N_cur ->next){
+ if (
+ isBold == (xmlStrcasecmp(xmlGetProp(N_cur,BAD_CAST "bold"),BAD_CAST "bold;") == 0)
+ &&
+ isItalic == (xmlStrcasecmp(xmlGetProp(N_cur,BAD_CAST "italic"),BAD_CAST "italic") == 0)
+ &&
+ xmlStrcasecmp(xmlGetProp(N_cur,BAD_CAST "font"),BAD_CAST fnName) == 0
+ &&
+ xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "size")) == ftSize
+ ) {
+ found = true;
+ Style = int(xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "id")));
+ }
+ }
+ if (!found){
+ N_cur = xmlNewChild(N_styleset, NULL, BAD_CAST "s", NULL);
+ xmlSetProp(N_cur, BAD_CAST "type", BAD_CAST "P");
+ sprintf(buf, "%d", maxStyle++);
+ xmlSetProp(N_cur, BAD_CAST "name", BAD_CAST buf);
+ xmlSetProp(N_cur, BAD_CAST "id", BAD_CAST buf);
+ Style = maxStyle;
+ sprintf(buf, "%d", ftSize); xmlSetProp(N_cur, BAD_CAST "size", BAD_CAST buf);
+ isBold ? xmlSetProp(N_cur, BAD_CAST "bold", BAD_CAST "bold;") : xmlSetProp(N_cur, BAD_CAST "bold", BAD_CAST "normal;");
+ isItalic ? xmlSetProp(N_cur, BAD_CAST "italic", BAD_CAST "italic"): xmlSetProp(N_cur, BAD_CAST "italic", BAD_CAST "normal");
+ xmlSetProp(N_cur, BAD_CAST "font", BAD_CAST fnName);
+ }
+ }
+}
+
+void ABWOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen)
+{
+ //I wouldn't know what size this should safely be. I guess 64 bytes should be
+ //enough for any unicode character
+ char buf[64];
+ int charLen;
+ x = dx;
+ y = dy;
+ //state->textTransformDelta(dx * state->getHorizScaling(), dy, &dx, &dy);
+ //state->transformDelta(dx, dy, &dx, &dy);
+ if (uLen == 1 && code == 0x20) {
+ //If we break a text sequence on space, then the X1 should be increased
+ //but the Y1 and Y2 should remain the same.
+ beginWord(state,X2+dx,Y2);
+ }
+ else {
+ X2 += dx;
+ Y2 += dy;
+ charLen = uMap->mapUnicode(*u,buf,sizeof(buf));
+ //Getting Unicode to libxml is something I need to fix.
+ //simply passing it using a bad-cast isn't working.
+ //I assume that CharCode code it the U+value of the unicode character
+ //But for a ligature code gives me DF which is the ringel-s, I guess
+ //code should be two bytes wide?
+ xmlNodeAddContentLen(N_word, BAD_CAST buf, charLen);
+ }
+}
+
+void ABWOutputDev::beginString(GfxState *state, GooString *s) {
+ double x,y;
+ //state->textTransform(x, y, &x, &y);
+ state->transform(state->getCurX(), state->getCurY(), &x, &y);
+ if (N_word) {
+ verDist = y-Y2;
+ horDist = x-X2;
+ //TEST:changed fabs(horDist) to horDist
+ //FIXME: this if statement seems awkward to me.
+ if (horDist > (state->getTransformedFontSize()*maxWordSpacing) || (fabs(verDist) > (state->getTransformedFontSize()/maxLineSpacingDelta))) {
+ beginTextBlock(state,x,y);
+ }
+ else {
+ if ((horDist > (state->getTransformedFontSize()*minWordBreakSpace)) || (fabs(verDist) > (state->getTransformedFontSize()/maxLineSpacingDelta))) {
+ beginWord(state,x,y);
+ }
+ }
+ }
+ else {
+ //This is the first word. Clear all values and call beginWord;
+ X2 = x;
+ Y2 = y;
+ horDist = 0;
+ verDist = 0;
+ height = 0;
+ beginTextBlock(state,x,y);
+ }
+}
+
+void ABWOutputDev::endString(GfxState *state) {
+
+}
+
+void ABWOutputDev::beginWord(GfxState *state, double x, double y){
+ char buf[20];
+// printf("***BREAK!***\n");
+ endWord();
+ X1 = x;
+ Y2 = y;
+
+ horDist = X1-X2;
+ verDist = Y1-Y2;
+
+ X2 = X1;
+ height = state->getFont()->getAscent() * state->getTransformedFontSize();
+ Y1 = Y2-height;
+
+ N_word = xmlNewChild(N_Block, NULL, BAD_CAST "word", NULL);
+ sprintf(buf, "%f", X1); xmlNewProp(N_word, BAD_CAST "X1", BAD_CAST buf);
+ sprintf(buf, "%f", Y1); xmlNewProp(N_word, BAD_CAST "Y1", BAD_CAST buf);
+ sprintf(buf, "%d", Style); xmlNewProp(N_word, BAD_CAST "style", BAD_CAST buf);
+}
+
+void ABWOutputDev::endWord(){
+ char buf[20];
+ if (N_word) {
+ sprintf(buf, "%f", X2); xmlNewProp(N_word, BAD_CAST "X2", BAD_CAST buf);
+ sprintf(buf, "%f", Y2); xmlNewProp(N_word, BAD_CAST "Y2", BAD_CAST buf);
+ sprintf(buf, "%f", X2-X1); xmlNewProp(N_word, BAD_CAST "width", BAD_CAST buf);
+ sprintf(buf, "%f", Y2-Y1); xmlNewProp(N_word, BAD_CAST "height", BAD_CAST buf);
+ N_word = NULL;
+ }
+}
+
+void ABWOutputDev::beginTextBlock(GfxState *state, double x, double y){
+ endTextBlock();
+ N_Block = xmlNewChild(N_page, NULL, BAD_CAST "Textblock", NULL);
+ beginWord(state,x,y);
+}
+
+void ABWOutputDev::endTextBlock(){
+ if (N_Block) {
+ endWord();
+ N_Block = NULL;
+ }
+}
+/*
+This will be a function to retrieve coherent text blocks from the chunk tree.*/
+void ABWOutputDev::interpretXYTree(){
+ xmlNodePtr N_oldPage;
+ N_oldPage = N_page;
+ N_page = xmlNewNode(NULL, BAD_CAST "page");
+ N_column = N_page;
+ //xmlAddChild(N_content, N_page);
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ ATP_recursive(N_oldPage);
+}
+
+void ABWOutputDev::ATP_recursive(xmlNodePtr N_parent){
+ xmlNodePtr N_first, N_second, N_line, N_tempCol, N_tempColset = NULL;
+
+ N_first = N_parent->children;
+ if (!N_first)
+ return;
+
+ N_second = N_first->next;
+/*
+ Possibilities:
+ there is one child node
+ Because we cleaned up before the only case where we allow one childnode is
+ within Textblocks and textBlocks within 'vertical' nodes.
+ basically one text node means: add it to the current block.
+ There are two childnodes
+ This can be two verticals, two horizontals or one horizontal and a text node.
+ verticals:
+ If the first is vertical, the second is as well.
+ verticals mean: create a new Block, add a column per vertical make the
+ vertical the block and recurse inside.
+ then make the second vertical the block and recurse inside
+ then finish the block (ie. create a new one)
+ horizontal and or Textblocks
+ if first is textnode
+ add first to block
+ if second is textnode
+ at to block
+ else
+ call again
+ else
+ begin new block
+ call again
+ begin new block
+ if second is text node
+ add to block
+ else
+ call again
+ there are more then two child nodes
+ this can be a number of Textblocks and horizontals
+ add the textNodes to the current Block
+ if a horizontal is encountered enter it and generate a new block afterwards
+ */
+ //fprintf(stderr,"**********************************************************************\n");
+ //xmlSaveFormatFileEnc("-", doc, "UTF-8", 1);
+ switch (xmlLsCountNode(N_parent)) {
+ case 1:
+ //fprintf(stderr,"case 1\n");
+ N_line = xmlNewChild(N_Block, NULL, BAD_CAST "line", NULL);
+ xmlUnlinkNode(N_first);
+ xmlAddChild(N_line, N_first);
+ break;
+ case 2:
+ //fprintf(stderr,"case 2\n");
+ if (xmlStrcasecmp(N_first->name,BAD_CAST "vertical") == 0){
+ //store the column for the moment
+ N_tempCol = N_column;
+ /*If we have three columns they will turn up in the tree as:
+ <vertical>
+ <vertical/>
+ <vertical/>
+ </vertical>
+ <vertical/>
+ */
+ //if the parent is a vertical as well, we can skip the colset generation
+ //thing here we can also remove the just added column and block, because
+ //these are going to replace them
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "vertical") != 0){
+ //fprintf(stderr,"first time column\n");
+ N_tempColset = N_colset;
+ N_colset = xmlNewChild(N_column, NULL, BAD_CAST "colset", NULL);
+ N_column = xmlNewChild(N_colset, NULL, BAD_CAST "column", NULL);
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ }
+ else {
+ //fprintf(stderr,"second time column\n");
+ xmlUnlinkNode(N_column);
+ N_column = xmlNewChild(N_colset, NULL, BAD_CAST "column", NULL);
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ }
+ //fprintf(stderr,"Building first column...\n");
+ ATP_recursive(N_first);
+ N_column = xmlNewChild(N_colset, NULL, BAD_CAST "column", NULL);
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ //fprintf(stderr,"Building second column...\n");
+ ATP_recursive(N_second);
+ //make sure we end the column by continuing in the master column and
+ //setting the block and line to it
+ N_column = N_tempCol;
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "vertical") != 0){
+ if (N_tempColset != NULL)
+ N_colset = N_tempColset;
+ else
+ fprintf(stderr,"N_templColset should not! be empty (line 823)");//FIXME: add assert
+ }
+ }
+ else {
+ if (xmlStrcasecmp(N_first->name,BAD_CAST "Textblock") == 0) {
+ //fprintf(stderr,"add first as textblock\n");
+ N_line = xmlNewChild(N_Block, NULL, BAD_CAST "line", NULL);
+ xmlUnlinkNode(N_first);
+ xmlAddChild(N_line, N_first);
+ if (xmlStrcasecmp(N_second->name,BAD_CAST "Textblock") == 0) {
+ //fprintf(stderr,"add second as textblock\n");
+ //FIXME: this is not neat. We should ignore the cut ignoring when there are only two elements above
+ //line aggregation doesn't work anyway atm.
+ xmlUnlinkNode(N_second);
+ xmlAddChild(N_line, N_second);
+ //We have two textChunks that are going to be added to the line.
+ //the following statements make the line wrap around both textblocks
+ //if the firstX1 is smaller then the second X1 use the first, else use the second etc.
+ }
+ else {
+ //fprintf(stderr,"recursing into second\n");
+ ATP_recursive(N_second);
+ }
+ }
+ else {
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ //fprintf(stderr,"recursing into first\n");
+ ATP_recursive(N_first);
+ N_Block = xmlNewChild(N_column, NULL, BAD_CAST "chunk", NULL);
+ if (xmlStrcasecmp(N_second->name,BAD_CAST "Textblock") == 0) {
+ //fprintf(stderr,"add second as textblock\n");
+ N_line = xmlNewChild(N_Block, NULL, BAD_CAST "line", NULL);
+ xmlUnlinkNode(N_second);
+ xmlAddChild(N_line, N_second);
+ }
+ else {
+ //fprintf(stderr,"recursing into second\n");
+ ATP_recursive(N_second);
+ }
+ }
+ }
+ break;
+ default:
+ //double tX1=0, tX2=0, tY1=0, tY2=0;
+ //fprintf(stderr,"case default\n");
+ N_line = xmlNewChild(N_Block, NULL, BAD_CAST "line", NULL);
+ while (N_first){
+ //xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "X1")) < tX1 ? tX1 = xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "X1")) : tX1 = tX1;
+ //xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "X2")) > tX2 ? tX2 = xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "X2")) : tX2 = tX2;
+ //xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "Y1")) < tY1 ? tY1 = xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "Y1")) : tY1 = tY1;
+ //xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "Y2")) > tY2 ? tY2 = xmlXPathCastStringToNumber(xmlGetProp(N_first,BAD_CAST "Y2")) : tY1 = tY2;
+ N_second = N_first->next;
+ if (xmlStrcasecmp(N_first->name,BAD_CAST "Textblock") == 0){
+ xmlUnlinkNode(N_first);
+ xmlAddChild(N_line, N_first);
+ }
+ else { //fprintf(stderr,"This shouldn't happen! (line 700)\n");
+ }
+ N_first = N_second;
+ }
+ break;
+ }
+}
+
+/*The cleanup function. It started out as a simple function to remove empty nodes
+so that I could call xmladdnewchildnode as often as I liked so that I wouldn't get seg-faults
+It is now a bit more advanced, makes sure the tree is as it's supposed to be and adds information too*/
+void ABWOutputDev::cleanUpNode(xmlNodePtr N_parent, bool aggregateInfo){
+ double tX1=-1, tX2=-1, tY1=-1, tY2=-1;
+ xmlNodePtr N_cur, N_next;
+ N_cur = N_parent->children;
+ char buf[20];
+ int prevStyle = -1;
+ xmlChar *val;
+ int styleLength = xmlLsCountNode(N_styleset)+1;
+ float stylePos;
+ int *styles = new int[styleLength];
+ for (int i=1; i< styleLength; i++) { styles[i] = 0;}
+ /*
+ ignore two horizontal nodes with textBlocks right underneath them. They
+ signal the end of a chunk, and the horizontal seperation needs to be
+ preserved, because it means they are different lines. The second horizontal
+ therefore needs to be kept.
+ */
+ if ((xmlLsCountNode(N_parent) == 2)
+ &&
+ xmlStrcasecmp(N_parent->name,BAD_CAST "horizontal") == 0
+ &&
+ N_cur
+ &&
+ N_cur->next
+ &&
+ xmlStrcasecmp(N_cur->name,BAD_CAST "horizontal") == 0 && xmlStrcasecmp(N_cur->next->name,BAD_CAST "horizontal") == 0
+ &&
+ xmlLsCountNode(N_cur) == 1 && xmlLsCountNode(N_cur->next) == 1
+ &&
+ xmlStrcasecmp(N_cur->children->name,BAD_CAST "Textblock") == 0 && xmlStrcasecmp(N_cur->next->children->name,BAD_CAST "Textblock") == 0
+ ) {
+ xmlAddPrevSibling(N_cur->next,N_cur->children);
+ xmlUnlinkNode(N_cur);
+ }
+ /*
+ This removes columns if one of the parts is actually a single letter.
+ I found out I liked the columns better, so I have the code commented out.
+ */
+/* else if ((xmlLsCountNode(N_parent) == 2)
+ &&
+ N_cur
+ &&
+ N_cur->next
+ &&
+ xmlStrcasecmp(N_cur->name,BAD_CAST "vertical") == 0
+ &&
+ xmlStrcasecmp(N_cur->next->name,BAD_CAST "vertical") == 0
+ &&
+ (N_cur->children)
+ &&
+ (N_cur->children->children)
+ &&
+ (N_cur->children->children->children)
+ &&
+ xmlStrlen(N_cur->children->children->children->content) == 1) {
+ N_next = N_cur->next;
+ xmlAddChild(N_parent, N_next->children);
+ xmlAddPrevSibling(N_next->children->children, N_cur->children);
+ xmlUnlinkNode(N_cur);
+ xmlUnlinkNode(N_next);
+ } */else {
+ while (N_cur){
+ N_next = N_cur->next;
+ cleanUpNode(N_cur, aggregateInfo);
+ if (xmlLsCountNode(N_cur) == 0 && (xmlStrcasecmp(N_cur->name,BAD_CAST "cbr") != 0) && (xmlStrcasecmp(N_cur->name,BAD_CAST "s") != 0))
+ xmlUnlinkNode(N_cur);
+ //If the node is still around
+ N_cur = N_next;
+ }
+ }
+ //If a countainer element has only one child, it can be removed except for vertical
+ //cuts with only one textElement;
+ //the main reason for this code is to remove the crumbs after cleaning up in the loop above
+ if ((xmlLsCountNode(N_parent) == 1) && ((xmlStrcasecmp(N_parent->name,BAD_CAST "horizontal") == 0) || ((xmlStrcasecmp(N_parent->name,BAD_CAST "vertical") == 0) && (xmlStrcasecmp(N_parent->children->name,BAD_CAST "Textblock") != 0)))){
+ N_cur = N_parent->children;
+ xmlAddPrevSibling(N_parent,N_cur);
+ xmlUnlinkNode(N_parent);
+ }
+ //We cannot remove the page element so if it has only one childnode, we remove that childnode instead
+ if ((xmlStrcasecmp(N_parent->name,BAD_CAST "page") == 0) && (xmlLsCountNode(N_parent) == 1)) {
+ N_cur = N_parent->children->children;
+ while (N_cur){
+ N_next = N_cur->next;
+ xmlUnlinkNode(N_cur);
+ xmlAddChild(N_parent, N_cur);
+ N_cur = N_next;
+ }
+ xmlUnlinkNode(N_parent->children);
+ }
+ //Ok, so by this time the N_parent and his children are guaranteed to be clean
+ //this for loop gets information from the 'word' elements and propagates it up
+ //the tree.
+ if (aggregateInfo && xmlStrcasecmp(N_parent->name,BAD_CAST "word") != 0) {
+ for (N_cur = N_parent->children; N_cur; N_cur = N_cur->next){
+ val = xmlGetProp(N_cur,BAD_CAST "style");
+ stylePos = xmlXPathCastStringToNumber(val);
+ //fprintf(stderr,"1: %f, %d\n",stylePos,int(stylePos));
+ styles[int(stylePos)]=styles[int(stylePos)]+1;
+ //fprintf(stderr,"2: styles[%d] = %d\n",int(stylePos),styles[int(stylePos)]);
+ (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X1")) < tX1 || tX1 == -1)? tX1 = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X1")) : tX1 = tX1;
+ (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X2")) > tX2) ? tX2 = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "X2")) : tX2 = tX2;
+ (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y1")) < tY1 || tY1 == -1)? tY1 = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y1")) : tY1 = tY1;
+ (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y2")) > tY2) ? tY2 = xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "Y2")) : tY2 = tY2;
+ }
+ sprintf(buf, "%f", tX1); xmlSetProp(N_parent, BAD_CAST "X1", BAD_CAST buf);
+ sprintf(buf, "%f", tX2); xmlSetProp(N_parent, BAD_CAST "X2", BAD_CAST buf);
+ sprintf(buf, "%f", tY1); xmlSetProp(N_parent, BAD_CAST "Y1", BAD_CAST buf);
+ sprintf(buf, "%f", tY2); xmlSetProp(N_parent, BAD_CAST "Y2", BAD_CAST buf);
+ sprintf(buf, "%f", tX2-tX1); xmlSetProp(N_parent, BAD_CAST "width", BAD_CAST buf);
+ sprintf(buf, "%f", tY2-tY1); xmlSetProp(N_parent, BAD_CAST "height", BAD_CAST buf);
+ prevStyle = 0;
+ styles[0] = -1;
+ for (int i=1; i< styleLength; i++) { if (styles[i] > styles[prevStyle]) prevStyle = i; }
+ //fprintf(stderr,"%d\n", prevStyle);
+ if (prevStyle > 0){
+ sprintf(buf, "%d", prevStyle); xmlSetProp(N_parent, BAD_CAST "style", BAD_CAST buf);
+ }
+ }
+ if (N_parent->children && xmlStrcasecmp(N_parent->children->name,BAD_CAST "line") == 0 && xmlGetProp(N_parent->children,BAD_CAST "alignment") != NULL)
+ xmlSetProp(N_parent, BAD_CAST "alignment", xmlGetProp(N_parent->children,BAD_CAST "alignment"));
+
+ delete[] styles;
+}
+
+void ABWOutputDev::generateParagraphs() {
+ xmlNodePtr N_cur, N_parent, N_p, N_line, N_next;
+ int lvl;
+ //basically I first detect the text-alignment within blocks.
+ //ASSUMPTION: my block seperation thing is good enough so I don't need to
+ //worry about two alignments in one paragraph
+
+ X1 = 0;
+ X2 = pdfdoc->getPageCropWidth(G_pageNum);
+ Y1 = 0;
+ Y2 = pdfdoc->getPageCropHeight(G_pageNum);
+ addAlignment(N_page);
+
+ //then it's a switch per alignement
+ N_cur = N_page->children;
+ N_parent = N_page;
+ lvl = 1;
+ while (N_cur) {
+ if (xmlStrcasecmp(N_cur->name,BAD_CAST "chunk") == 0){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ //N_p = xmlNewChild(N_parent, NULL, BAD_CAST "chunk", NULL);
+ //A new paragraph is created when:
+ switch (int(xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "alignment")))){
+ //left
+ case 1: //the distance between the texblock X2 and the last word X2 is more than
+ //the following first word width.
+ N_line = N_cur->children;
+ while (N_line){
+ N_next = N_line->next;
+ xmlUnlinkNode(N_line);
+ xmlAddChild(N_p,N_line);
+ xmlSetProp(N_line, BAD_CAST "alignment", BAD_CAST "1");
+ if (N_next && xmlStrcasecmp(N_next->name,BAD_CAST "line") == 0){
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_next->children->children,BAD_CAST "width")) < (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "width")) - xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "width")))){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ }
+ }
+ N_line = N_next;
+ }
+ break;
+ //right
+ case 2: //the same but now with X1 and first word and following last word
+ N_line = N_cur->children;
+ while (N_line){
+ N_next = N_line->next;
+ xmlUnlinkNode(N_line);
+ xmlAddChild(N_p,N_line);
+ xmlSetProp(N_line, BAD_CAST "alignment", BAD_CAST "2");
+ if (N_next && xmlStrcasecmp(N_next->name,BAD_CAST "line") == 0){
+ //fprintf(stderr,"width_next=%f, X2_bl=%f, X2_w=%f\n",xmlXPathCastStringToNumber(xmlGetProp(N_next->children->children,BAD_CAST "width")),xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "width")),xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "width")));
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_next->children->children,BAD_CAST "width")) < (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "width")) - xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "width")))){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ }
+ }
+ N_line = N_next;
+ }
+ break;
+ //centered
+ case 3: //the combined left and right space is more than the following first word
+ N_line = N_cur->children;
+ while (N_line){
+ N_next = N_line->next;
+ xmlUnlinkNode(N_line);
+ xmlAddChild(N_p,N_line);
+ xmlSetProp(N_line, BAD_CAST "alignment", BAD_CAST "3");
+ if (N_next && xmlStrcasecmp(N_next->name,BAD_CAST "line") == 0){
+ //fprintf(stderr,"width_next=%f, X2_bl=%f, X2_w=%f\n",xmlXPathCastStringToNumber(xmlGetProp(N_next->children->children,BAD_CAST "width")),xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "width")),xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "width")));
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_next->children->children,BAD_CAST "width")) < (xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "width")) - xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "width")))){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ }
+ }
+ N_line = N_next;
+ }
+ break;
+ //justified
+ case 4:
+ //we break on all alignment=1 lines. A line with alignment=1 that is the first of a block will
+ //also initiate a paragraph break before.
+ N_line = N_cur->children;
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "alignment")) == 1){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ }
+ while (N_line){
+ N_next = N_line->next;
+ xmlUnlinkNode(N_line);
+ xmlAddChild(N_p,N_line);
+ if (xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "alignment")) == 1){
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ }
+ xmlSetProp(N_line, BAD_CAST "alignment", BAD_CAST "4");
+ N_line = N_next;
+ }
+ break;
+ }
+ }
+ else if (xmlStrcasecmp(N_cur->name,BAD_CAST "colset") == 0 || xmlStrcasecmp(N_cur->name,BAD_CAST "column") == 0){
+ N_parent = N_cur;
+ N_cur = N_cur->children;
+ lvl++;
+ N_p = xmlNewNode(NULL, BAD_CAST "chunk");
+ xmlAddPrevSibling(N_cur,N_p);
+ continue;
+ }
+ if (N_cur->next)
+ N_cur = N_cur->next;
+ else while (lvl > 0){
+ N_cur = N_parent;
+ N_parent = N_cur->parent;
+ lvl--;
+ if (N_cur->next){
+ N_cur = N_cur->next;
+ break;
+ }
+ }
+ if (lvl==0)
+ N_cur = NULL;
+ }
+}
+
+//function that adds an 'alignment=' property to the <chunk>s
+void ABWOutputDev::addAlignment(xmlNodePtr N_parent) {
+ xmlNodePtr N_chunk, N_line;
+ double tX1, tX2;
+ bool leftMatch, rightMatch, centerMatch;
+ int leftCnt = 0, rightCnt = 0, cntrCnt = 0, justCnt = 0;
+ //fprintf(stderr,"Entering addAlignment\n");
+ for (N_chunk = N_parent->children; N_chunk; N_chunk = N_chunk->next) {
+ if (xmlStrcasecmp(N_chunk->name,BAD_CAST "chunk") == 0){
+ X1 = xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1"));
+ X2 = xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2"));
+ //fprintf(stderr,"Found chunk\n");
+ //if the chunk contains only one line, we don't need to loop through it.
+ if (xmlLsCountNode(N_chunk) == 1){
+ //fprintf(stderr,"Processing line\n");
+ //fprintf(stderr,"X1=%f, X2=%f, cX1=%f, cX2=%f\n",X1,X2,xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1")), xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2")));
+ //fprintf(stderr,"%f\n",(xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1")) - X1)-(X2 - xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2"))));
+ //fprintf(stderr,"cX1-X1=%f, X2-cX2=%f\n",(xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1")) - X1),(X2 - xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2"))));
+ // a one line chunk, is either centered or left or right-aligned.
+ if ((xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1"))-X1)-(X2-xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2"))) > 1) {
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "2");
+ xmlNewProp(N_chunk->children, BAD_CAST "alignment", BAD_CAST "2");
+ //fprintf(stderr,"alignment = right\n");
+ }
+ else {
+ if ((xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1"))-X1)-(X2 - xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2")))< -1) {
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "1");
+ xmlNewProp(N_chunk->children, BAD_CAST "alignment", BAD_CAST "1");
+ //fprintf(stderr,"alignment = left\n");
+ }
+ else {
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "3");
+ xmlNewProp(N_chunk->children, BAD_CAST "alignment", BAD_CAST "3");
+ //fprintf(stderr,"alignment = center\n");
+ }
+ }
+ }
+ else {
+ leftCnt = 0;
+ rightCnt = 0;
+ cntrCnt = 0;
+ justCnt = 0;
+ for (N_line = N_chunk->children; N_line; N_line = N_line->next) {
+ //fprintf(stderr,"Processing line\n");
+ /*
+ |X1 - cX1| == 1
+ |X2 - cX2| == 1
+ |(cX1-X1)-(X2-cX2)| == 1
+ ok, each line can be just as wide as the current set,
+ it can be smaller and moved to the right
+ it can be smaller and moved to the left.
+ it can
+ */
+ //fprintf(stderr,"X1=%f, X2=%f, cX1=%f, cX2=%f\n",X1,X2,xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X1")), xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X2")));
+ //fprintf(stderr,"cX1-X1=%f, X2-cX2=%f\n",(xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X1")) - X1),(X2 - xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X2"))));
+ leftMatch = fabs(xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X1"))-X1) < 2;
+ rightMatch = fabs(X2-xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X2"))) < 2;
+ centerMatch = fabs((xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X1"))-X1)-(X2-xmlXPathCastStringToNumber(xmlGetProp(N_line,BAD_CAST "X2")))) < 2;
+ if (leftMatch && rightMatch) {
+ xmlNewProp(N_line, BAD_CAST "alignment", BAD_CAST "4");
+ justCnt++;
+ }
+ else if (centerMatch) {
+ xmlNewProp(N_line, BAD_CAST "alignment", BAD_CAST "3");
+ cntrCnt++;
+ }
+ else if (rightMatch) {
+ xmlNewProp(N_line, BAD_CAST "alignment", BAD_CAST "2");
+ rightCnt++;
+ }
+ else {
+ xmlNewProp(N_line, BAD_CAST "alignment", BAD_CAST "1");
+ leftCnt++;
+ }
+ }
+ //there is almost always one justified line in a centered text
+ //and most justified blocks have at least one left aligned line
+ //fprintf(stderr,"1:%d ,2:%d ,3:%d ,4:%d\n",leftCnt,justCnt,cntrCnt,rightCnt);
+ if ((leftCnt-1 >= justCnt) && (leftCnt >= rightCnt) && (leftCnt >= cntrCnt))
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "1");
+ else if ((justCnt >= leftCnt-1) && (justCnt >= rightCnt) && (justCnt >= cntrCnt))
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "4");
+ else if ((cntrCnt >= justCnt-1) && (cntrCnt >= rightCnt) && (cntrCnt >= leftCnt))
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "3");
+ else
+ xmlNewProp(N_chunk, BAD_CAST "alignment", BAD_CAST "2");
+ }
+ }
+ else {
+ if (xmlStrcasecmp(N_chunk->name,BAD_CAST "colset") == 0){
+ //fprintf(stderr,"Found a colset\n");
+ addAlignment(N_chunk);
+ }
+ else {
+ if (xmlStrcasecmp(N_chunk->name,BAD_CAST "column") == 0){
+ //fprintf(stderr,"Found a column\n");
+ tX1 = X1;
+ tX2 = X2;
+ X1 = xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X1"));
+ X2 = xmlXPathCastStringToNumber(xmlGetProp(N_chunk,BAD_CAST "X2"));
+ addAlignment(N_chunk);
+ X1 = tX1;
+ X2 = tX2;
+ }
+ else { //fprintf(stderr,"Found something else\n");
+ }
+ }
+ }
+ }
+//parse all blocks, and all lines within all blocks
+//do a set of checks and tick a flag if the check fails
+//check for line X1 is textBlock X1
+//check for line X2 is textblock X2
+//check if line is centered in textBock (LX1 != TX1 && LX2 != TX2 && LX1-TX1 == TX2=LX2)
+//if the LX1 != TX1 then how much is the difference?
+//a line isn't left aligned if all lines have a different X1 <= not so strong assumption.
+
+//justified if both are straight except for a couple of (same factor sized) indents at the left
+//else centered if above calculation is correct
+//else left aligned if left side is more straight than right (more lines in the same X1 or common factor
+//else right
+}
+
+void ABWOutputDev::setPDFDoc(PDFDoc *priv_pdfdoc) {
+ pdfdoc = priv_pdfdoc;
+}
+
+void ABWOutputDev::createABW() {
+ //*************************************************************
+ //change styles to abiword format
+ xmlNodePtr N_cur, N_next;
+ xmlAttrPtr N_prop;
+ char buf[500];
+ for (N_cur = N_styleset->children; N_cur; N_cur = N_cur->next){
+ sprintf(buf,"margin-top:0pt; color:000000; margin-left:0pt; text-position:normal; widows:2; text-indent:0in; font-variant:normal; margin-right:0pt; lang:nl-NL; line-height:1.0; font-size:%dpt; text-decoration:none; margin-bottom:0pt; bgcolor:transparent; text-align:left; font-stretch:normal;",int(xmlXPathCastStringToNumber(xmlGetProp(N_cur,BAD_CAST "size"))));
+ strncat(buf,"font-family:",12);
+ strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "font"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "font")));
+ strncat(buf,";",1);
+ strncat(buf,"font-weight:",12);
+ strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "bold"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "bold")));
+ strncat(buf,"font-style:",12);
+ strncat(buf,(char *)xmlGetProp(N_cur,BAD_CAST "italic"),strlen((char *)xmlGetProp(N_cur,BAD_CAST "italic")));
+ xmlSetProp(N_cur, BAD_CAST "props", BAD_CAST buf);
+ N_prop = xmlHasProp(N_cur, BAD_CAST "id");
+ if (N_prop != NULL) xmlRemoveProp(N_prop);
+ N_prop = xmlHasProp(N_cur, BAD_CAST "size");
+ if (N_prop != NULL) xmlRemoveProp(N_prop);
+ N_prop = xmlHasProp(N_cur, BAD_CAST "bold");
+ if (N_prop != NULL) xmlRemoveProp(N_prop);
+ N_prop = xmlHasProp(N_cur, BAD_CAST "italic");
+ if (N_prop != NULL) xmlRemoveProp(N_prop);
+ N_prop = xmlHasProp(N_cur, BAD_CAST "font");
+ if (N_prop != NULL) xmlRemoveProp(N_prop);
+ }
+ //*************************************************************
+ //Change the rest of the document
+ //each child of N_content is a page
+ N_cur = N_content->children;
+ while (N_cur){
+ //we creat a section node and attach it to the root, it will com after all
+ //the page nodes. Then we transform the page, and finally remove it
+ N_next = N_cur->next;
+ //fprintf(stderr,"***Transforming page\n");
+ N_Block = xmlNewChild(N_root, NULL, BAD_CAST "section", NULL);
+ transformPage(N_cur);
+ xmlUnlinkNode(N_cur);
+ //fprintf(stderr,"***Finished transforming page\n");
+ N_cur = N_next;
+ }
+ cleanUpNode(N_root, false);
+}
+
+void ABWOutputDev::transformPage(xmlNodePtr N_parent){
+ char buf[60];
+ xmlNodePtr N_cur, N_curLine, N_curText, N_curWord, text, space;
+ //translate the nodes into abiword nodes
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "page") == 0){
+ for (N_cur = N_parent->children; N_cur; N_cur = N_cur->next){
+ //fprintf(stderr,"**pass a page child\n");
+ transformPage(N_cur);
+ }
+ }
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "chunk") == 0){
+ //fprintf(stderr,"Found a chunk\n");
+ //I start a <p> on each chunk and add all word containment
+ N_text = xmlNewChild(N_Block, NULL, BAD_CAST "p", NULL);
+ if (int(xmlXPathCastStringToNumber(xmlGetProp(N_parent,BAD_CAST "style"))) > 0){
+ xmlNewProp(N_text, BAD_CAST "style", xmlGetProp(N_parent,BAD_CAST "style"));
+ }
+ switch (int(xmlXPathCastStringToNumber(xmlGetProp(N_parent,BAD_CAST "alignment")))){
+ case 1: xmlNewProp(N_text, BAD_CAST "props", BAD_CAST "text-align:left");
+ break;
+ case 2: xmlNewProp(N_text, BAD_CAST "props", BAD_CAST "text-align:right");
+ break;
+ case 3: xmlNewProp(N_text, BAD_CAST "props", BAD_CAST "text-align:center");
+ break;
+ case 4: xmlNewProp(N_text, BAD_CAST "props", BAD_CAST "text-align:justify");
+ break;
+ }
+ for (N_curLine = N_parent->children; N_curLine; N_curLine = N_curLine->next){
+ //fprintf(stderr,"A line\n");
+ for (N_curText = N_curLine->children; N_curText; N_curText = N_curText->next){
+ //fprintf(stderr,"a textNode\n");
+ for (N_curWord = N_curText->children; N_curWord; N_curWord = N_curWord->next){
+ //fprintf(stderr,"a word\n");
+ text = N_curWord->children;
+ xmlUnlinkNode(text);
+ xmlAddChild(N_text,text);
+ space = xmlNewText(BAD_CAST " ");
+ xmlAddChild(N_text,space);
+ }
+ }
+ }
+ }
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "column") == 0){
+ //fprintf(stderr,"Found a column\n");
+ for (N_cur = N_parent->children; N_cur; N_cur = N_cur->next){
+ transformPage(N_cur);
+ }
+ xmlNewChild(N_text, NULL, BAD_CAST "cbr", NULL);
+ }
+ if (xmlStrcasecmp(N_parent->name,BAD_CAST "colset") == 0){
+ //fprintf(stderr,"Found a colset\n");
+ //create new section columns: count childNodes of N_cur
+ //recurse through chunks and create textNodes
+ N_Block = xmlNewChild(N_root, NULL, BAD_CAST "section", NULL);
+ sprintf(buf,"columns:%d",xmlLsCountNode(N_parent));
+ xmlNewProp(N_Block, BAD_CAST "props", BAD_CAST buf);
+ for (N_cur = N_parent->children; N_cur; N_cur = N_cur->next){
+ transformPage(N_cur);
+ }
+ N_Block = xmlNewChild(N_root, NULL, BAD_CAST "section", NULL);
+ }
+ //fprintf(stderr,"at the end\n");
+}
+
+//Count nodes, copied from debugxml.c from libxml
+// libxml copyright file below
+/*
+Except where otherwise noted in the source code (e.g. the files hash.c,
+list.c and the trio files, which are covered by a similar licence but
+with different Copyright notices) all the files are:
+
+ Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Daniel Veillard shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from him.
+*/
+int ABWOutputDev::xmlLsCountNode(xmlNodePtr node) {
+ int ret = 0;
+ xmlNodePtr list = NULL;
+
+ if (node == NULL)
+ return(0);
+
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ list = node->children;
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ list = ((xmlDocPtr) node)->children;
+ break;
+ case XML_ATTRIBUTE_NODE:
+ list = ((xmlAttrPtr) node)->children;
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ if (node->content != NULL) {
+ ret = xmlStrlen(node->content);
+ }
+ break;
+ case XML_ENTITY_REF_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ ret = 1;
+ break;
+ }
+ for (;list != NULL;ret++)
+ list = list->next;
+ return(ret);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.h
new file mode 100644
index 00000000000..450b7dd5ab5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ABWOutputDev.h
@@ -0,0 +1,141 @@
+//========================================================================
+//
+// ABWOutputDev.h
+//
+// Copyright 2006-2007 Jauco Noordzij <jauco@jauco.nl>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+//========================================================================
+
+#ifndef ABWOUTPUTDEV_H
+#define ABWOUTPUTDEV_H
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include "goo/gtypes.h"
+#include "goo/GooList.h"
+#include "GfxFont.h"
+#include "OutputDev.h"
+#include "Catalog.h"
+#include "UnicodeMap.h"
+#include "PDFDoc.h"
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#ifdef _WIN32
+# define SLASH '\\'
+#else
+# define SLASH '/'
+#endif
+
+#define xoutRound(x) ((int)(x + 0.5))
+
+class GfxState;
+class GooString;
+
+//------------------------------------------------------------------------
+// ABWOutputDev
+//------------------------------------------------------------------------
+
+class ABWOutputDev: public OutputDev {
+public:
+
+ // Open a text output file. If <fileName> is NULL, no file is written
+ // (this is useful, e.g., for searching text). If <useASCII7> is true,
+ // text is converted to 7-bit ASCII; otherwise, text is converted to
+ // 8-bit ISO Latin-1. <useASCII7> should also be set for Japanese
+ // (EUC-JP) text. If <rawOrder> is true, the text is kept in content
+ // stream order.
+ ABWOutputDev(xmlDocPtr ext_doc);
+
+ // Destructor.
+ virtual ~ABWOutputDev();
+
+ // Check if file was successfully created.
+ virtual GBool isOk() { return gTrue; }
+
+ //---- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gFalse; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+
+ //----- text drawing
+ //new feature
+ virtual int DevType() {return 1234;}
+
+ int getPageWidth() { return maxPageWidth; }
+ int getPageHeight() { return maxPageHeight; }
+ float getBiggestSeperator(xmlNodePtr N_set, unsigned int direction, float * C1, float * C2);
+ void recursiveXYC(xmlNodePtr nodeset);
+ void splitNodes(float splitValue, unsigned int direction, xmlNodePtr N_parent, double extravalue);
+ virtual void beginString(GfxState *state, GooString *s);
+ virtual void endString(GfxState *state);
+ virtual void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen);
+ void beginWord(GfxState *state, double x, double y);
+ void endWord();
+ void beginTextBlock(GfxState *state, double x, double y);
+ void endTextBlock();
+ void interpretXYTree();
+ void ATP_recursive(xmlNodePtr N_cur);
+ void cleanUpNode(xmlNodePtr N_parent, bool aggregateInfo);
+ void transformPage(xmlNodePtr N_parent);
+ void generateParagraphs();
+ void addAlignment(xmlNodePtr N_parent);
+ void setPDFDoc(PDFDoc *priv_pdfdoc);
+ void createABW();
+
+private:
+ int maxPageWidth;
+ int maxPageHeight;
+ int G_pageNum;
+ int Style, maxStyle;
+ //A lot of values are nice to have around. I think that declaring some
+ //global variables that contain these values is faster & easier than reading
+ //them from the xml tree every time.
+ double height;
+ double wordSpace, charSpace;
+ double X1,X2,Y1,Y2,horDist, verDist, curDx, curDy;
+ bool mightBreak;
+ xmlDocPtr doc;
+ /* node pointers */
+ xmlNodePtr N_root, N_content, N_page, N_style, N_text, N_styleset, N_Block, N_word, N_column, N_colset;
+ xmlNodePtr outputDoc;
+ xmlXPathContextPtr xpathCtx;
+ static const unsigned int HORIZONTAL = 0;
+ static const unsigned int VERTICAL = 1;
+ UnicodeMap *uMap;
+ PDFDoc *pdfdoc;
+ int xmlLsCountNode(xmlNodePtr node);
+};
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.cc
new file mode 100644
index 00000000000..cb6a3811b0e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.cc
@@ -0,0 +1,4508 @@
+//========================================================================
+//
+// Annot.cc
+//
+// Copyright 2000-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+// Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
+// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <math.h>
+#include <assert.h>
+#include "goo/gmem.h"
+#include "goo/gstrtod.h"
+#include "GooList.h"
+#include "Error.h"
+#include "Object.h"
+#include "Catalog.h"
+#include "Gfx.h"
+#include "Lexer.h"
+#include "Annot.h"
+#include "GfxFont.h"
+#include "CharCodeToUnicode.h"
+#include "PDFDocEncoding.h"
+#include "Form.h"
+#include "Error.h"
+#include "Page.h"
+#include "XRef.h"
+#include "Movie.h"
+#include "OptionalContent.h"
+#include "Sound.h"
+#include "FileSpec.h"
+#include "DateInfo.h"
+#include <string.h>
+
+#define annotFlagHidden 0x0002
+#define annotFlagPrint 0x0004
+#define annotFlagNoView 0x0020
+
+#define fieldFlagReadOnly 0x00000001
+#define fieldFlagRequired 0x00000002
+#define fieldFlagNoExport 0x00000004
+#define fieldFlagMultiline 0x00001000
+#define fieldFlagPassword 0x00002000
+#define fieldFlagNoToggleToOff 0x00004000
+#define fieldFlagRadio 0x00008000
+#define fieldFlagPushbutton 0x00010000
+#define fieldFlagCombo 0x00020000
+#define fieldFlagEdit 0x00040000
+#define fieldFlagSort 0x00080000
+#define fieldFlagFileSelect 0x00100000
+#define fieldFlagMultiSelect 0x00200000
+#define fieldFlagDoNotSpellCheck 0x00400000
+#define fieldFlagDoNotScroll 0x00800000
+#define fieldFlagComb 0x01000000
+#define fieldFlagRichText 0x02000000
+#define fieldFlagRadiosInUnison 0x02000000
+#define fieldFlagCommitOnSelChange 0x04000000
+
+#define fieldQuadLeft 0
+#define fieldQuadCenter 1
+#define fieldQuadRight 2
+
+// distance of Bezier control point from center for circle approximation
+// = (4 * (sqrt(2) - 1) / 3) * r
+#define bezierCircle 0.55228475
+
+AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) {
+ if (string != NULL) {
+ if (!string->cmp("Square")) {
+ return annotLineEndingSquare;
+ } else if (!string->cmp("Circle")) {
+ return annotLineEndingCircle;
+ } else if (!string->cmp("Diamond")) {
+ return annotLineEndingDiamond;
+ } else if (!string->cmp("OpenArrow")) {
+ return annotLineEndingOpenArrow;
+ } else if (!string->cmp("ClosedArrow")) {
+ return annotLineEndingClosedArrow;
+ } else if (!string->cmp("Butt")) {
+ return annotLineEndingButt;
+ } else if (!string->cmp("ROpenArrow")) {
+ return annotLineEndingROpenArrow;
+ } else if (!string->cmp("RClosedArrow")) {
+ return annotLineEndingRClosedArrow;
+ } else if (!string->cmp("Slash")) {
+ return annotLineEndingSlash;
+ } else {
+ return annotLineEndingNone;
+ }
+ } else {
+ return annotLineEndingNone;
+ }
+}
+
+static AnnotExternalDataType parseAnnotExternalData(Dict* dict) {
+ Object obj1;
+ AnnotExternalDataType type;
+
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ GooString *typeName = new GooString(obj1.getName());
+
+ if (!typeName->cmp("Markup3D")) {
+ type = annotExternalDataMarkup3D;
+ } else {
+ type = annotExternalDataMarkupUnknown;
+ }
+ delete typeName;
+ } else {
+ type = annotExternalDataMarkupUnknown;
+ }
+ obj1.free();
+
+ return type;
+}
+
+PDFRectangle *parseDiffRectangle(Array *array, PDFRectangle *rect) {
+ PDFRectangle *newRect = NULL;
+ if (array->getLength() == 4) {
+ // deltas
+ Object obj1;
+ double dx1 = (array->get(0, &obj1)->isNum() ? obj1.getNum() : 0);
+ obj1.free();
+ double dy1 = (array->get(1, &obj1)->isNum() ? obj1.getNum() : 0);
+ obj1.free();
+ double dx2 = (array->get(2, &obj1)->isNum() ? obj1.getNum() : 0);
+ obj1.free();
+ double dy2 = (array->get(3, &obj1)->isNum() ? obj1.getNum() : 0);
+ obj1.free();
+
+ // checking that the numbers are valid (i.e. >= 0),
+ // and that applying the differences still give us a valid rect
+ if (dx1 >= 0 && dy1 >= 0 && dx2 >= 0 && dy2
+ && (rect->x2 - rect->x1 - dx1 - dx2) >= 0
+ && (rect->y2 - rect->y1 - dy1 - dy2) >= 0) {
+ newRect = new PDFRectangle();
+ newRect->x1 = rect->x1 + dx1;
+ newRect->y1 = rect->y1 + dy1;
+ newRect->x2 = rect->x2 - dx2;
+ newRect->y2 = rect->y2 - dy2;
+ }
+ }
+ return newRect;
+}
+
+//------------------------------------------------------------------------
+// AnnotBorderEffect
+//------------------------------------------------------------------------
+
+AnnotBorderEffect::AnnotBorderEffect(Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("S", &obj1)->isName()) {
+ GooString *effectName = new GooString(obj1.getName());
+
+ if (!effectName->cmp("C"))
+ effectType = borderEffectCloudy;
+ else
+ effectType = borderEffectNoEffect;
+ delete effectName;
+ } else {
+ effectType = borderEffectNoEffect;
+ }
+ obj1.free();
+
+ if ((dict->lookup("I", &obj1)->isNum()) && effectType == borderEffectCloudy) {
+ intensity = obj1.getNum();
+ } else {
+ intensity = 0;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotPath
+//------------------------------------------------------------------------
+
+AnnotPath::AnnotPath() {
+ coords = NULL;
+ coordsLength = 0;
+}
+
+AnnotPath::AnnotPath(Array *array) {
+ coords = NULL;
+ coordsLength = 0;
+ parsePathArray(array);
+}
+
+AnnotPath::AnnotPath(AnnotCoord **coords, int coordsLength) {
+ this->coords = coords;
+ this->coordsLength = coordsLength;
+}
+
+AnnotPath::~AnnotPath() {
+ if (coords) {
+ for (int i = 0; i < coordsLength; ++i)
+ delete coords[i];
+ gfree(coords);
+ }
+}
+
+double AnnotPath::getX(int coord) const {
+ if (coord >= 0 && coord < coordsLength)
+ return coords[coord]->getX();
+ return 0;
+}
+
+double AnnotPath::getY(int coord) const {
+ if (coord >= 0 && coord < coordsLength)
+ return coords[coord]->getY();
+ return 0;
+}
+
+AnnotCoord *AnnotPath::getCoord(int coord) const {
+ if (coord >= 0 && coord < coordsLength)
+ return coords[coord];
+ return NULL;
+}
+
+void AnnotPath::parsePathArray(Array *array) {
+ int tempLength;
+ AnnotCoord **tempCoords;
+ GBool correct = gTrue;
+
+ if (array->getLength() % 2) {
+ error(-1, "Bad Annot Path");
+ return;
+ }
+
+ tempLength = array->getLength() / 2;
+ tempCoords = (AnnotCoord **) gmallocn (tempLength, sizeof(AnnotCoord *));
+ memset(tempCoords, 0, tempLength * sizeof(AnnotCoord *));
+ for (int i = 0; i < tempLength && correct; i++) {
+ Object obj1;
+ double x = 0, y = 0;
+
+ if (array->get(i * 2, &obj1)->isNum()) {
+ x = obj1.getNum();
+ } else {
+ correct = gFalse;
+ }
+ obj1.free();
+
+ if (array->get((i * 2) + 1, &obj1)->isNum()) {
+ y = obj1.getNum();
+ } else {
+ correct = gFalse;
+ }
+ obj1.free();
+
+ if (!correct) {
+ for (int j = i - 1; j >= 0; j--)
+ delete tempCoords[j];
+ gfree (tempCoords);
+ return;
+ }
+
+ tempCoords[i] = new AnnotCoord(x, y);
+ }
+
+ coords = tempCoords;
+ coordsLength = tempLength;
+}
+
+//------------------------------------------------------------------------
+// AnnotCalloutLine
+//------------------------------------------------------------------------
+
+AnnotCalloutLine::AnnotCalloutLine(double x1, double y1, double x2, double y2)
+ : coord1(x1, y1), coord2(x2, y2) {
+}
+
+//------------------------------------------------------------------------
+// AnnotCalloutMultiLine
+//------------------------------------------------------------------------
+
+AnnotCalloutMultiLine::AnnotCalloutMultiLine(double x1, double y1, double x2,
+ double y2, double x3, double y3)
+ : AnnotCalloutLine(x1, y1, x2, y2), coord3(x3, y3) {
+}
+
+//------------------------------------------------------------------------
+// AnnotQuadrilateral
+//------------------------------------------------------------------------
+
+AnnotQuadrilaterals::AnnotQuadrilaterals(Array *array, PDFRectangle *rect) {
+ int arrayLength = array->getLength();
+ GBool correct = gTrue;
+ int quadsLength = 0;
+ AnnotQuadrilateral **quads;
+ double quadArray[8];
+
+ // default values
+ quadrilaterals = NULL;
+ quadrilateralsLength = 0;
+
+ if ((arrayLength % 8) == 0) {
+ int i = 0;
+
+ quadsLength = arrayLength / 8;
+ quads = (AnnotQuadrilateral **) gmallocn
+ ((quadsLength), sizeof(AnnotQuadrilateral *));
+ memset(quads, 0, quadsLength * sizeof(AnnotQuadrilateral *));
+
+ while (i < (quadsLength) && correct) {
+ for (int j = 0; j < 8 && correct; j++) {
+ Object obj;
+ if (array->get(i * 8 + j, &obj)->isNum()) {
+ quadArray[j] = obj.getNum();
+ if (j % 2 == 1) {
+ if (quadArray[j] < rect->y1 || quadArray[j] > rect->y2)
+ correct = gFalse;
+ } else {
+ if (quadArray[j] < rect->x1 || quadArray[j] > rect->x2)
+ correct = gFalse;
+ }
+ } else {
+ correct = gFalse;
+ }
+ obj.free();
+ }
+
+ if (correct)
+ quads[i] = new AnnotQuadrilateral(quadArray[0], quadArray[1],
+ quadArray[2], quadArray[3],
+ quadArray[4], quadArray[5],
+ quadArray[6], quadArray[7]);
+ i++;
+ }
+
+ if (correct) {
+ quadrilateralsLength = quadsLength;
+ quadrilaterals = quads;
+ } else {
+ for (int j = 0; j < i; j++)
+ delete quads[j];
+ gfree (quads);
+ }
+ }
+}
+
+AnnotQuadrilaterals::~AnnotQuadrilaterals() {
+ if (quadrilaterals) {
+ for(int i = 0; i < quadrilateralsLength; i++)
+ delete quadrilaterals[i];
+
+ gfree (quadrilaterals);
+ }
+}
+
+double AnnotQuadrilaterals::getX1(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord1.getX();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getY1(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord1.getY();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getX2(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord2.getX();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getY2(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord2.getY();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getX3(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord3.getX();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getY3(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord3.getY();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getX4(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord4.getX();
+ return 0;
+}
+
+double AnnotQuadrilaterals::getY4(int quadrilateral) {
+ if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength)
+ return quadrilaterals[quadrilateral]->coord4.getY();
+ return 0;
+}
+
+AnnotQuadrilaterals::AnnotQuadrilateral::AnnotQuadrilateral(double x1, double y1,
+ double x2, double y2, double x3, double y3, double x4, double y4)
+ : coord1(x1, y1), coord2(x2, y2), coord3(x3, y3), coord4(x4, y4) {
+}
+
+//------------------------------------------------------------------------
+// AnnotBorder
+//------------------------------------------------------------------------
+AnnotBorder::AnnotBorder() {
+ type = typeUnknown;
+ width = 1;
+ dashLength = 0;
+ dash = NULL;
+ style = borderSolid;
+}
+
+AnnotBorder::~AnnotBorder() {
+ if (dash)
+ gfree (dash);
+}
+
+//------------------------------------------------------------------------
+// AnnotBorderArray
+//------------------------------------------------------------------------
+
+AnnotBorderArray::AnnotBorderArray() {
+ type = typeArray;
+ horizontalCorner = 0;
+ verticalCorner = 0;
+}
+
+AnnotBorderArray::AnnotBorderArray(Array *array) {
+ Object obj1;
+ int arrayLength = array->getLength();
+
+ GBool correct = gTrue;
+ if (arrayLength == 3 || arrayLength == 4) {
+ // implementation note 81 in Appendix H.
+
+ if (array->get(0, &obj1)->isNum())
+ horizontalCorner = obj1.getNum();
+ else
+ correct = gFalse;
+ obj1.free();
+
+ if (array->get(1, &obj1)->isNum())
+ verticalCorner = obj1.getNum();
+ else
+ correct = gFalse;
+ obj1.free();
+
+ if (array->get(2, &obj1)->isNum())
+ width = obj1.getNum();
+ else
+ correct = gFalse;
+ obj1.free();
+
+ // TODO: check not all zero ? (Line Dash Pattern Page 217 PDF 8.1)
+ if (arrayLength == 4) {
+ if (array->get(3, &obj1)->isArray()) {
+ Array *dashPattern = obj1.getArray();
+ int tempLength = dashPattern->getLength();
+ double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
+
+ for(int i = 0; i < tempLength && i < DASH_LIMIT && correct; i++) {
+
+ if (dashPattern->get(i, &obj1)->isNum()) {
+ tempDash[i] = obj1.getNum();
+
+ if (tempDash[i] < 0)
+ correct = gFalse;
+
+ } else {
+ correct = gFalse;
+ }
+ obj1.free();
+ }
+
+ if (correct) {
+ dashLength = tempLength;
+ dash = tempDash;
+ style = borderDashed;
+ } else {
+ gfree (tempDash);
+ }
+ } else {
+ correct = gFalse;
+ }
+ obj1.free();
+ }
+ } else {
+ correct = gFalse;
+ }
+
+ if (!correct) {
+ width = 0;
+ }
+}
+
+//------------------------------------------------------------------------
+// AnnotBorderBS
+//------------------------------------------------------------------------
+
+AnnotBorderBS::AnnotBorderBS() {
+ type = typeBS;
+}
+
+AnnotBorderBS::AnnotBorderBS(Dict *dict) {
+ Object obj1, obj2;
+
+ // acroread 8 seems to need both W and S entries for
+ // any border to be drawn, even though the spec
+ // doesn't claim anything of that sort. We follow
+ // that behaviour by veryifying both entries exist
+ // otherwise we set the borderWidth to 0
+ // --jrmuizel
+ dict->lookup("W", &obj1);
+ dict->lookup("S", &obj2);
+ if (obj1.isNum() && obj2.isName()) {
+ GooString *styleName = new GooString(obj2.getName());
+
+ width = obj1.getNum();
+
+ if (!styleName->cmp("S")) {
+ style = borderSolid;
+ } else if (!styleName->cmp("D")) {
+ style = borderDashed;
+ } else if (!styleName->cmp("B")) {
+ style = borderBeveled;
+ } else if (!styleName->cmp("I")) {
+ style = borderInset;
+ } else if (!styleName->cmp("U")) {
+ style = borderUnderlined;
+ } else {
+ style = borderSolid;
+ }
+ delete styleName;
+ } else {
+ width = 0;
+ }
+ obj2.free();
+ obj1.free();
+
+ // TODO: check not all zero (Line Dash Pattern Page 217 PDF 8.1)
+ if (dict->lookup("D", &obj1)->isArray()) {
+ GBool correct = gTrue;
+ int tempLength = obj1.arrayGetLength();
+ double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
+
+ for(int i = 0; i < tempLength && correct; i++) {
+ Object obj2;
+
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ tempDash[i] = obj2.getNum();
+
+ if (tempDash[i] < 0)
+ correct = gFalse;
+ } else {
+ correct = gFalse;
+ }
+ obj2.free();
+ }
+
+ if (correct) {
+ dashLength = tempLength;
+ dash = tempDash;
+ style = borderDashed;
+ } else {
+ gfree (tempDash);
+ }
+
+ }
+
+ if (!dash) {
+ dashLength = 1;
+ dash = (double *) gmallocn (dashLength, sizeof (double));
+ dash[0] = 3;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotColor
+//------------------------------------------------------------------------
+
+AnnotColor::AnnotColor() {
+ length = 0;
+ values = NULL;
+}
+
+AnnotColor::AnnotColor(double gray) {
+ length = 1;
+ values = (double *) gmallocn (length, sizeof(double));
+
+ values[0] = gray;
+}
+
+AnnotColor::AnnotColor(double r, double g, double b) {
+ length = 3;
+ values = (double *) gmallocn (length, sizeof(double));
+
+ values[0] = r;
+ values[1] = g;
+ values[2] = b;
+}
+
+AnnotColor::AnnotColor(double c, double m, double y, double k) {
+ length = 4;
+ values = (double *) gmallocn (length, sizeof(double));
+
+ values[0] = c;
+ values[1] = m;
+ values[2] = y;
+ values[3] = k;
+}
+
+AnnotColor::AnnotColor(Array *array) {
+ // TODO: check what Acrobat does in the case of having more than 5 numbers.
+ if (array->getLength() < 5) {
+ length = array->getLength();
+ values = (double *) gmallocn (length, sizeof(double));
+
+ for(int i = 0; i < length; i++) {
+ Object obj1;
+
+ if (array->get(i, &obj1)->isNum()) {
+ values[i] = obj1.getNum();
+
+ if (values[i] < 0 || values[i] > 1)
+ values[i] = 0;
+ } else {
+ values[i] = 0;
+ }
+ obj1.free();
+ }
+ } else {
+ values = NULL;
+ length = 0;
+ }
+}
+
+AnnotColor::~AnnotColor() {
+ if (values)
+ gfree (values);
+}
+
+//------------------------------------------------------------------------
+// AnnotBorderStyle
+//------------------------------------------------------------------------
+
+AnnotBorderStyle::AnnotBorderStyle(AnnotBorderType typeA, double widthA,
+ double *dashA, int dashLengthA,
+ double rA, double gA, double bA) {
+ type = typeA;
+ width = widthA;
+ dash = dashA;
+ dashLength = dashLengthA;
+ r = rA;
+ g = gA;
+ b = bA;
+}
+
+AnnotBorderStyle::~AnnotBorderStyle() {
+ if (dash) {
+ gfree(dash);
+ }
+}
+
+//------------------------------------------------------------------------
+// AnnotIconFit
+//------------------------------------------------------------------------
+
+AnnotIconFit::AnnotIconFit(Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("SW", &obj1)->isName()) {
+ GooString *scaleName = new GooString(obj1.getName());
+
+ if(!scaleName->cmp("B")) {
+ scaleWhen = scaleBigger;
+ } else if(!scaleName->cmp("S")) {
+ scaleWhen = scaleSmaller;
+ } else if(!scaleName->cmp("N")) {
+ scaleWhen = scaleNever;
+ } else {
+ scaleWhen = scaleAlways;
+ }
+ delete scaleName;
+ } else {
+ scaleWhen = scaleAlways;
+ }
+ obj1.free();
+
+ if (dict->lookup("S", &obj1)->isName()) {
+ GooString *scaleName = new GooString(obj1.getName());
+
+ if(!scaleName->cmp("A")) {
+ scale = scaleAnamorphic;
+ } else {
+ scale = scaleProportional;
+ }
+ delete scaleName;
+ } else {
+ scale = scaleProportional;
+ }
+ obj1.free();
+
+ if (dict->lookup("A", &obj1)->isArray() && obj1.arrayGetLength() == 2) {
+ Object obj2;
+ (obj1.arrayGet(0, &obj2)->isNum() ? left = obj2.getNum() : left = 0);
+ obj2.free();
+ (obj1.arrayGet(1, &obj2)->isNum() ? bottom = obj2.getNum() : bottom = 0);
+ obj2.free();
+
+ if (left < 0 || left > 1)
+ left = 0.5;
+
+ if (bottom < 0 || bottom > 1)
+ bottom = 0.5;
+
+ } else {
+ left = bottom = 0.5;
+ }
+ obj1.free();
+
+ if (dict->lookup("FB", &obj1)->isBool()) {
+ fullyBounds = obj1.getBool();
+ } else {
+ fullyBounds = gFalse;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotAppearanceCharacs
+//------------------------------------------------------------------------
+
+AnnotAppearanceCharacs::AnnotAppearanceCharacs(Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("R", &obj1)->isInt()) {
+ rotation = obj1.getInt();
+ } else {
+ rotation = 0;
+ }
+ obj1.free();
+
+ if (dict->lookup("BC", &obj1)->isArray()) {
+ borderColor = new AnnotColor(obj1.getArray());
+ } else {
+ borderColor = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("BG", &obj1)->isArray()) {
+ backColor = new AnnotColor(obj1.getArray());
+ } else {
+ backColor = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("CA", &obj1)->isName()) {
+ normalCaption = new GooString(obj1.getName());
+ } else {
+ normalCaption = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("RC", &obj1)->isName()) {
+ rolloverCaption = new GooString(obj1.getName());
+ } else {
+ rolloverCaption = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("AC", &obj1)->isName()) {
+ alternateCaption = new GooString(obj1.getName());
+ } else {
+ alternateCaption = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("IF", &obj1)->isDict()) {
+ iconFit = new AnnotIconFit(obj1.getDict());
+ } else {
+ iconFit = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("TP", &obj1)->isInt()) {
+ position = (AnnotAppearanceCharacsTextPos) obj1.getInt();
+ } else {
+ position = captionNoIcon;
+ }
+ obj1.free();
+}
+
+AnnotAppearanceCharacs::~AnnotAppearanceCharacs() {
+ if (borderColor)
+ delete borderColor;
+
+ if (backColor)
+ delete backColor;
+
+ if (normalCaption)
+ delete normalCaption;
+
+ if (rolloverCaption)
+ delete rolloverCaption;
+
+ if (alternateCaption)
+ delete alternateCaption;
+
+ if (iconFit)
+ delete iconFit;
+}
+
+//------------------------------------------------------------------------
+// Annot
+//------------------------------------------------------------------------
+
+Annot::Annot(XRef *xrefA, PDFRectangle *rectA, Catalog *catalog) {
+ Object obj1;
+
+ flags = flagUnknown;
+ type = typeUnknown;
+
+ obj1.initArray (xrefA);
+ Object obj2;
+ obj1.arrayAdd (obj2.initReal (rectA->x1));
+ obj1.arrayAdd (obj2.initReal (rectA->y1));
+ obj1.arrayAdd (obj2.initReal (rectA->x2));
+ obj1.arrayAdd (obj2.initReal (rectA->y2));
+ obj2.free ();
+
+ annotObj.initDict (xrefA);
+ annotObj.dictSet ("Type", obj2.initName ("Annot"));
+ annotObj.dictSet ("Rect", &obj1);
+ // obj1 is owned by the dict
+
+ ref = xrefA->addIndirectObject (&annotObj);
+
+ initialize (xrefA, annotObj.getDict(), catalog);
+}
+
+Annot::Annot(XRef *xrefA, Dict *dict, Catalog* catalog) {
+ hasRef = false;
+ flags = flagUnknown;
+ type = typeUnknown;
+ annotObj.initDict (dict);
+ initialize (xrefA, dict, catalog);
+}
+
+Annot::Annot(XRef *xrefA, Dict *dict, Catalog* catalog, Object *obj) {
+ if (obj->isRef()) {
+ hasRef = gTrue;
+ ref = obj->getRef();
+ } else {
+ hasRef = gFalse;
+ }
+ flags = flagUnknown;
+ type = typeUnknown;
+ annotObj.initDict (dict);
+ initialize (xrefA, dict, catalog);
+}
+
+void Annot::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
+ Object asObj, obj1, obj2, obj3;
+
+ appRef.num = 0;
+ appRef.gen = 65535;
+ ok = gTrue;
+ xref = xrefA;
+ appearBuf = NULL;
+ fontSize = 0;
+
+ //----- parse the rectangle
+ rect = new PDFRectangle();
+ if (dict->lookup("Rect", &obj1)->isArray() && obj1.arrayGetLength() == 4) {
+ Object obj2;
+ (obj1.arrayGet(0, &obj2)->isNum() ? rect->x1 = obj2.getNum() : rect->x1 = 0);
+ obj2.free();
+ (obj1.arrayGet(1, &obj2)->isNum() ? rect->y1 = obj2.getNum() : rect->y1 = 0);
+ obj2.free();
+ (obj1.arrayGet(2, &obj2)->isNum() ? rect->x2 = obj2.getNum() : rect->x2 = 1);
+ obj2.free();
+ (obj1.arrayGet(3, &obj2)->isNum() ? rect->y2 = obj2.getNum() : rect->y2 = 1);
+ obj2.free();
+
+ if (rect->x1 > rect->x2) {
+ double t = rect->x1;
+ rect->x1 = rect->x2;
+ rect->x2 = t;
+ }
+
+ if (rect->y1 > rect->y2) {
+ double t = rect->y1;
+ rect->y1 = rect->y2;
+ rect->y2 = t;
+ }
+ } else {
+ rect->x1 = rect->y1 = 0;
+ rect->x2 = rect->y2 = 1;
+ error(-1, "Bad bounding box for annotation");
+ ok = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("Contents", &obj1)->isString()) {
+ contents = obj1.getString()->copy();
+ } else {
+ contents = NULL;
+ }
+ obj1.free();
+
+ /* TODO: Page Object indirect reference (should be parsed ?) */
+ pageDict = NULL;
+ /*if (dict->lookup("P", &obj1)->isDict()) {
+ pageDict = NULL;
+ } else {
+ pageDict = NULL;
+ }
+ obj1.free();
+ */
+
+ if (dict->lookup("NM", &obj1)->isString()) {
+ name = obj1.getString()->copy();
+ } else {
+ name = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("M", &obj1)->isString()) {
+ modified = obj1.getString()->copy();
+ } else {
+ modified = NULL;
+ }
+ obj1.free();
+
+ //----- get the flags
+ if (dict->lookup("F", &obj1)->isInt()) {
+ flags |= obj1.getInt();
+ } else {
+ flags = flagUnknown;
+ }
+ obj1.free();
+
+ if (dict->lookup("AP", &obj1)->isDict()) {
+ Object obj2;
+
+ if (dict->lookup("AS", &obj2)->isName()) {
+ Object obj3;
+
+ appearState = new GooString(obj2.getName());
+ if (obj1.dictLookup("N", &obj3)->isDict()) {
+ Object obj4;
+
+ if (obj3.dictLookupNF(appearState->getCString(), &obj4)->isRef()) {
+ obj4.copy(&appearance);
+ } else {
+ obj4.free();
+ if (obj3.dictLookupNF("Off", &obj4)->isRef()) {
+ obj4.copy(&appearance);
+ }
+ }
+ obj4.free();
+ }
+ obj3.free();
+ } else {
+ obj2.free();
+
+ appearState = NULL;
+ if (obj1.dictLookupNF("N", &obj2)->isRef()) {
+ obj2.copy(&appearance);
+ }
+ }
+ obj2.free();
+ } else {
+ appearState = NULL;
+ }
+ obj1.free();
+
+ //----- parse the border style
+ if (dict->lookup("BS", &obj1)->isDict()) {
+ border = new AnnotBorderBS(obj1.getDict());
+ } else {
+ obj1.free();
+
+ if (dict->lookup("Border", &obj1)->isArray())
+ border = new AnnotBorderArray(obj1.getArray());
+ else
+ // Adobe draws no border at all if the last element is of
+ // the wrong type.
+ border = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("C", &obj1)->isArray()) {
+ color = new AnnotColor(obj1.getArray());
+ } else {
+ color = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("StructParent", &obj1)->isInt()) {
+ treeKey = obj1.getInt();
+ } else {
+ treeKey = 0;
+ }
+ obj1.free();
+
+ optContentConfig = catalog ? catalog->getOptContentConfig() : NULL;
+ dict->lookupNF("OC", &oc);
+ if (!oc.isRef() && !oc.isNull()) {
+ error (-1, "Annotation OC value not null or dict: %i", oc.getType());
+ }
+}
+
+void Annot::update(const char *key, Object *value) {
+ /* Set M to current time */
+ delete modified;
+ modified = timeToDateString(NULL);
+
+ Object obj1;
+ obj1.initString (modified->copy());
+ annotObj.dictSet("M", &obj1);
+
+ annotObj.dictSet(const_cast<char*>(key), value);
+
+ xref->setModifiedObject(&annotObj, ref);
+}
+
+void Annot::setContents(GooString *new_content) {
+ delete contents;
+
+ if (new_content) {
+ contents = new GooString(new_content);
+ //append the unicode marker <FE FF> if needed
+ if (!contents->hasUnicodeMarker()) {
+ contents->insert(0, 0xff);
+ contents->insert(0, 0xfe);
+ }
+ } else {
+ contents = new GooString();
+ }
+
+ Object obj1;
+ obj1.initString(contents->copy());
+ update ("Contents", &obj1);
+}
+
+void Annot::setColor(AnnotColor *new_color) {
+ delete color;
+
+ if (new_color) {
+ Object obj1, obj2;
+ double *values = new_color->getValues();
+
+ obj1.initArray(xref);
+ for (int i = 0; i < (int)new_color->getSpace(); i++)
+ obj1.arrayAdd(obj2.initReal (values[i]));
+ update ("C", &obj1);
+ color = new_color;
+ } else {
+ color = NULL;
+ }
+}
+
+double Annot::getXMin() {
+ return rect->x1;
+}
+
+double Annot::getYMin() {
+ return rect->y1;
+}
+
+void Annot::readArrayNum(Object *pdfArray, int key, double *value) {
+ Object valueObject;
+
+ pdfArray->arrayGet(key, &valueObject);
+ if (valueObject.isNum()) {
+ *value = valueObject.getNum();
+ } else {
+ *value = 0;
+ ok = gFalse;
+ }
+ valueObject.free();
+}
+
+Annot::~Annot() {
+ annotObj.free();
+
+ delete rect;
+
+ if (contents)
+ delete contents;
+
+ if (pageDict)
+ delete pageDict;
+
+ if (name)
+ delete name;
+
+ if (modified)
+ delete modified;
+
+ appearance.free();
+
+ if (appearState)
+ delete appearState;
+
+ if (border)
+ delete border;
+
+ if (color)
+ delete color;
+
+ oc.free();
+}
+
+// Set the current fill or stroke color, based on <a> (which should
+// have 1, 3, or 4 elements). If <adjust> is +1, color is brightened;
+// if <adjust> is -1, color is darkened; otherwise color is not
+// modified.
+void Annot::setColor(Array *a, GBool fill, int adjust) {
+ Object obj1;
+ double color[4];
+ int nComps, i;
+
+ nComps = a->getLength();
+ if (nComps > 4) {
+ nComps = 4;
+ }
+ for (i = 0; i < nComps && i < 4; ++i) {
+ if (a->get(i, &obj1)->isNum()) {
+ color[i] = obj1.getNum();
+ } else {
+ color[i] = 0;
+ }
+ obj1.free();
+ }
+ if (nComps == 4) {
+ adjust = -adjust;
+ }
+ if (adjust > 0) {
+ for (i = 0; i < nComps; ++i) {
+ color[i] = 0.5 * color[i] + 0.5;
+ }
+ } else if (adjust < 0) {
+ for (i = 0; i < nComps; ++i) {
+ color[i] = 0.5 * color[i];
+ }
+ }
+ if (nComps == 4) {
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:c}\n",
+ color[0], color[1], color[2], color[3],
+ fill ? 'k' : 'K');
+ } else if (nComps == 3) {
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:s}\n",
+ color[0], color[1], color[2],
+ fill ? "rg" : "RG");
+ } else {
+ appearBuf->appendf("{0:.2f} {1:c}\n",
+ color[0],
+ fill ? 'g' : 'G');
+ }
+}
+
+// Draw an (approximate) circle of radius <r> centered at (<cx>, <cy>).
+// If <fill> is true, the circle is filled; otherwise it is stroked.
+void Annot::drawCircle(double cx, double cy, double r, GBool fill) {
+ appearBuf->appendf("{0:.2f} {1:.2f} m\n",
+ cx + r, cy);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx + r, cy + bezierCircle * r,
+ cx + bezierCircle * r, cy + r,
+ cx, cy + r);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx - bezierCircle * r, cy + r,
+ cx - r, cy + bezierCircle * r,
+ cx - r, cy);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx - r, cy - bezierCircle * r,
+ cx - bezierCircle * r, cy - r,
+ cx, cy - r);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx + bezierCircle * r, cy - r,
+ cx + r, cy - bezierCircle * r,
+ cx + r, cy);
+ appearBuf->append(fill ? "f\n" : "s\n");
+}
+
+// Draw the top-left half of an (approximate) circle of radius <r>
+// centered at (<cx>, <cy>).
+void Annot::drawCircleTopLeft(double cx, double cy, double r) {
+ double r2;
+
+ r2 = r / sqrt(2.0);
+ appearBuf->appendf("{0:.2f} {1:.2f} m\n",
+ cx + r2, cy + r2);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx + (1 - bezierCircle) * r2,
+ cy + (1 + bezierCircle) * r2,
+ cx - (1 - bezierCircle) * r2,
+ cy + (1 + bezierCircle) * r2,
+ cx - r2,
+ cy + r2);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx - (1 + bezierCircle) * r2,
+ cy + (1 - bezierCircle) * r2,
+ cx - (1 + bezierCircle) * r2,
+ cy - (1 - bezierCircle) * r2,
+ cx - r2,
+ cy - r2);
+ appearBuf->append("S\n");
+}
+
+// Draw the bottom-right half of an (approximate) circle of radius <r>
+// centered at (<cx>, <cy>).
+void Annot::drawCircleBottomRight(double cx, double cy, double r) {
+ double r2;
+
+ r2 = r / sqrt(2.0);
+ appearBuf->appendf("{0:.2f} {1:.2f} m\n",
+ cx - r2, cy - r2);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx - (1 - bezierCircle) * r2,
+ cy - (1 + bezierCircle) * r2,
+ cx + (1 - bezierCircle) * r2,
+ cy - (1 + bezierCircle) * r2,
+ cx + r2,
+ cy - r2);
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+ cx + (1 + bezierCircle) * r2,
+ cy - (1 - bezierCircle) * r2,
+ cx + (1 + bezierCircle) * r2,
+ cy + (1 - bezierCircle) * r2,
+ cx + r2,
+ cy + r2);
+ appearBuf->append("S\n");
+}
+
+void Annot::draw(Gfx *gfx, GBool printing) {
+ Object obj;
+
+ // check the flags
+ if ((flags & annotFlagHidden) ||
+ (printing && !(flags & annotFlagPrint)) ||
+ (!printing && (flags & annotFlagNoView))) {
+ return;
+ }
+
+ // check the OC
+ if (optContentConfig && oc.isRef()) {
+ if (! optContentConfig->optContentIsVisible(&oc))
+ return;
+ }
+
+ // draw the appearance stream
+ appearance.fetch(xref, &obj);
+ gfx->drawAnnot(&obj, (type == typeLink) ? border : (AnnotBorder *)NULL, color,
+ rect->x1, rect->y1, rect->x2, rect->y2);
+ obj.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotPopup
+//------------------------------------------------------------------------
+
+AnnotPopup::AnnotPopup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typePopup;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Popup"));
+ initialize (xrefA, annotObj.getDict(), catalog);
+}
+
+AnnotPopup::AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ type = typePopup;
+ initialize(xrefA, dict, catalog);
+}
+
+AnnotPopup::~AnnotPopup() {
+ parent.free();
+}
+
+void AnnotPopup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
+ Object obj1;
+
+ if (!dict->lookupNF("Parent", &parent)->isRef()) {
+ parent.initNull();
+ }
+
+ if (dict->lookup("Open", &obj1)->isBool()) {
+ open = obj1.getBool();
+ } else {
+ open = gFalse;
+ }
+ obj1.free();
+}
+
+void AnnotPopup::setParent(Object *parentA) {
+ parentA->copy(&parent);
+ update ("Parent", &parent);
+}
+
+void AnnotPopup::setParent(Annot *parentA) {
+ Ref parentRef = parentA->getRef();
+ parent.initRef(parentRef.num, parentRef.gen);
+ update ("Parent", &parent);
+}
+
+void AnnotPopup::setOpen(GBool openA) {
+ Object obj1;
+
+ open = openA;
+ obj1.initBool(open);
+ update ("Open", &obj1);
+}
+
+//------------------------------------------------------------------------
+// AnnotMarkup
+//------------------------------------------------------------------------
+AnnotMarkup::AnnotMarkup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ initialize(xrefA, annotObj.getDict(), catalog, &annotObj);
+}
+
+AnnotMarkup::AnnotMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ initialize(xrefA, dict, catalog, obj);
+}
+
+AnnotMarkup::~AnnotMarkup() {
+ if (label)
+ delete label;
+
+ if (popup)
+ delete popup;
+
+ if (date)
+ delete date;
+
+ if (subject)
+ delete subject;
+}
+
+void AnnotMarkup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) {
+ Object obj1;
+
+ if (dict->lookup("T", &obj1)->isString()) {
+ label = obj1.getString()->copy();
+ } else {
+ label = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("Popup", &obj1)->isDict()) {
+ popup = new AnnotPopup(xrefA, obj1.getDict(), catalog, obj);
+ } else {
+ popup = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("CA", &obj1)->isNum()) {
+ opacity = obj1.getNum();
+ } else {
+ opacity = 1.0;
+ }
+ obj1.free();
+
+ if (dict->lookup("CreationDate", &obj1)->isString()) {
+ date = obj1.getString()->copy();
+ } else {
+ date = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookupNF("IRT", &obj1)->isRef()) {
+ inReplyTo = obj1.getRef();
+ } else {
+ inReplyTo.num = 0;
+ inReplyTo.gen = 0;
+ }
+ obj1.free();
+
+ if (dict->lookup("Subj", &obj1)->isString()) {
+ subject = obj1.getString()->copy();
+ } else {
+ subject = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("RT", &obj1)->isName()) {
+ GooString *replyName = new GooString(obj1.getName());
+
+ if (!replyName->cmp("R")) {
+ replyTo = replyTypeR;
+ } else if (!replyName->cmp("Group")) {
+ replyTo = replyTypeGroup;
+ } else {
+ replyTo = replyTypeR;
+ }
+ delete replyName;
+ } else {
+ replyTo = replyTypeR;
+ }
+ obj1.free();
+
+ if (dict->lookup("ExData", &obj1)->isDict()) {
+ exData = parseAnnotExternalData(obj1.getDict());
+ } else {
+ exData = annotExternalDataMarkupUnknown;
+ }
+ obj1.free();
+}
+
+void AnnotMarkup::setLabel(GooString *new_label) {
+ delete label;
+
+ if (new_label) {
+ label = new GooString(new_label);
+ //append the unicode marker <FE FF> if needed
+ if (!label->hasUnicodeMarker()) {
+ label->insert(0, 0xff);
+ label->insert(0, 0xfe);
+ }
+ } else {
+ label = new GooString();
+ }
+
+ Object obj1;
+ obj1.initString(label->copy());
+ update ("T", &obj1);
+}
+
+void AnnotMarkup::setPopup(AnnotPopup *new_popup) {
+ delete popup;
+
+ if (new_popup) {
+ Object obj1;
+ Ref popupRef = new_popup->getRef();
+
+ obj1.initRef (popupRef.num, popupRef.gen);
+ update ("Popup", &obj1);
+
+ new_popup->setParent(this);
+ popup = new_popup;
+ } else {
+ popup = NULL;
+ }
+}
+
+//------------------------------------------------------------------------
+// AnnotText
+//------------------------------------------------------------------------
+
+AnnotText::AnnotText(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeText;
+ flags |= flagNoZoom | flagNoRotate;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Text"));
+ initialize (xrefA, catalog, annotObj.getDict());
+}
+
+AnnotText::AnnotText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+
+ type = typeText;
+ flags |= flagNoZoom | flagNoRotate;
+ initialize (xrefA, catalog, dict);
+}
+
+AnnotText::~AnnotText() {
+ delete icon;
+}
+
+void AnnotText::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("Open", &obj1)->isBool())
+ open = obj1.getBool();
+ else
+ open = gFalse;
+ obj1.free();
+
+ if (dict->lookup("Name", &obj1)->isName()) {
+ icon = new GooString(obj1.getName());
+ } else {
+ icon = new GooString("Note");
+ }
+ obj1.free();
+
+ if (dict->lookup("StateModel", &obj1)->isString()) {
+ Object obj2;
+ GooString *modelName = obj1.getString();
+
+ if (dict->lookup("State", &obj2)->isString()) {
+ GooString *stateName = obj2.getString();
+
+ if (!stateName->cmp("Marked")) {
+ state = stateMarked;
+ } else if (!stateName->cmp("Unmarked")) {
+ state = stateUnmarked;
+ } else if (!stateName->cmp("Accepted")) {
+ state = stateAccepted;
+ } else if (!stateName->cmp("Rejected")) {
+ state = stateRejected;
+ } else if (!stateName->cmp("Cancelled")) {
+ state = stateCancelled;
+ } else if (!stateName->cmp("Completed")) {
+ state = stateCompleted;
+ } else if (!stateName->cmp("None")) {
+ state = stateNone;
+ } else {
+ state = stateUnknown;
+ }
+ } else {
+ state = stateUnknown;
+ }
+ obj2.free();
+
+ if (!modelName->cmp("Marked")) {
+ switch (state) {
+ case stateUnknown:
+ state = stateMarked;
+ break;
+ case stateAccepted:
+ case stateRejected:
+ case stateCancelled:
+ case stateCompleted:
+ case stateNone:
+ state = stateUnknown;
+ break;
+ default:
+ break;
+ }
+ } else if (!modelName->cmp("Review")) {
+ switch (state) {
+ case stateUnknown:
+ state = stateNone;
+ break;
+ case stateMarked:
+ case stateUnmarked:
+ state = stateUnknown;
+ break;
+ default:
+ break;
+ }
+ } else {
+ state = stateUnknown;
+ }
+ } else {
+ state = stateUnknown;
+ }
+ obj1.free();
+}
+
+void AnnotText::setOpen(GBool openA) {
+ Object obj1;
+
+ open = openA;
+ obj1.initBool(open);
+ update ("Open", &obj1);
+}
+
+void AnnotText::setIcon(GooString *new_icon) {
+ if (new_icon && icon->cmp(new_icon) == 0)
+ return;
+
+ delete icon;
+
+ if (new_icon) {
+ icon = new GooString (new_icon);
+ } else {
+ icon = new GooString("Note");
+ }
+
+ Object obj1;
+ obj1.initName (icon->getCString());
+ update("Name", &obj1);
+}
+
+//------------------------------------------------------------------------
+// AnnotLink
+//------------------------------------------------------------------------
+AnnotLink::AnnotLink(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeLink;
+ annotObj.dictSet ("Subtype", obj1.initName ("Link"));
+ initialize (xrefA, catalog, annotObj.getDict());
+}
+
+AnnotLink::AnnotLink(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+
+ type = typeLink;
+ initialize (xrefA, catalog, dict);
+}
+
+AnnotLink::~AnnotLink() {
+ /*
+ if (actionDict)
+ delete actionDict;
+ */
+ dest.free();
+ /*
+ if (uriAction)
+ delete uriAction;
+ */
+ if (quadrilaterals)
+ delete quadrilaterals;
+}
+
+void AnnotLink::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+ /*
+ if (dict->lookup("A", &obj1)->isDict()) {
+ actionDict = NULL;
+ } else {
+ actionDict = NULL;
+ }
+ obj1.free();
+ */
+ dict->lookup("Dest", &dest);
+ if (dict->lookup("H", &obj1)->isName()) {
+ GooString *effect = new GooString(obj1.getName());
+
+ if (!effect->cmp("N")) {
+ linkEffect = effectNone;
+ } else if (!effect->cmp("I")) {
+ linkEffect = effectInvert;
+ } else if (!effect->cmp("O")) {
+ linkEffect = effectOutline;
+ } else if (!effect->cmp("P")) {
+ linkEffect = effectPush;
+ } else {
+ linkEffect = effectInvert;
+ }
+ delete effect;
+ } else {
+ linkEffect = effectInvert;
+ }
+ obj1.free();
+ /*
+ if (dict->lookup("PA", &obj1)->isDict()) {
+ uriAction = NULL;
+ } else {
+ uriAction = NULL;
+ }
+ obj1.free();
+ */
+ if (dict->lookup("QuadPoints", &obj1)->isArray()) {
+ quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect);
+ } else {
+ quadrilaterals = NULL;
+ }
+ obj1.free();
+}
+
+void AnnotLink::draw(Gfx *gfx, GBool printing) {
+ Object obj;
+
+ // check the flags
+ if ((flags & annotFlagHidden) ||
+ (printing && !(flags & annotFlagPrint)) ||
+ (!printing && (flags & annotFlagNoView))) {
+ return;
+ }
+
+ // draw the appearance stream
+ appearance.fetch(xref, &obj);
+ gfx->drawAnnot(&obj, border, color,
+ rect->x1, rect->y1, rect->x2, rect->y2);
+ obj.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotFreeText
+//------------------------------------------------------------------------
+AnnotFreeText::AnnotFreeText(XRef *xrefA, PDFRectangle *rect, GooString *da, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeFreeText;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("FreeText"));
+
+ Object obj2;
+ obj2.initString (da->copy());
+ annotObj.dictSet("DA", &obj2);
+
+ initialize (xrefA, catalog, annotObj.getDict());
+}
+
+AnnotFreeText::AnnotFreeText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeFreeText;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotFreeText::~AnnotFreeText() {
+ delete appearanceString;
+
+ if (styleString)
+ delete styleString;
+
+ if (calloutLine)
+ delete calloutLine;
+
+ if (borderEffect)
+ delete borderEffect;
+
+ if (rectangle)
+ delete rectangle;
+}
+
+void AnnotFreeText::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("DA", &obj1)->isString()) {
+ appearanceString = obj1.getString()->copy();
+ } else {
+ appearanceString = new GooString();
+ error(-1, "Bad appearance for annotation");
+ ok = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("Q", &obj1)->isInt()) {
+ quadding = (AnnotFreeTextQuadding) obj1.getInt();
+ } else {
+ quadding = quaddingLeftJustified;
+ }
+ obj1.free();
+
+ if (dict->lookup("DS", &obj1)->isString()) {
+ styleString = obj1.getString()->copy();
+ } else {
+ styleString = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("CL", &obj1)->isArray() && obj1.arrayGetLength() >= 4) {
+ double x1, y1, x2, y2;
+ Object obj2;
+
+ (obj1.arrayGet(0, &obj2)->isNum() ? x1 = obj2.getNum() : x1 = 0);
+ obj2.free();
+ (obj1.arrayGet(1, &obj2)->isNum() ? y1 = obj2.getNum() : y1 = 0);
+ obj2.free();
+ (obj1.arrayGet(2, &obj2)->isNum() ? x2 = obj2.getNum() : x2 = 0);
+ obj2.free();
+ (obj1.arrayGet(3, &obj2)->isNum() ? y2 = obj2.getNum() : y2 = 0);
+ obj2.free();
+
+ if (obj1.arrayGetLength() == 6) {
+ double x3, y3;
+ (obj1.arrayGet(4, &obj2)->isNum() ? x3 = obj2.getNum() : x3 = 0);
+ obj2.free();
+ (obj1.arrayGet(5, &obj2)->isNum() ? y3 = obj2.getNum() : y3 = 0);
+ obj2.free();
+ calloutLine = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3);
+ } else {
+ calloutLine = new AnnotCalloutLine(x1, y1, x2, y2);
+ }
+ } else {
+ calloutLine = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("IT", &obj1)->isName()) {
+ GooString *intentName = new GooString(obj1.getName());
+
+ if (!intentName->cmp("FreeText")) {
+ intent = intentFreeText;
+ } else if (!intentName->cmp("FreeTextCallout")) {
+ intent = intentFreeTextCallout;
+ } else if (!intentName->cmp("FreeTextTypeWriter")) {
+ intent = intentFreeTextTypeWriter;
+ } else {
+ intent = intentFreeText;
+ }
+ delete intentName;
+ } else {
+ intent = intentFreeText;
+ }
+ obj1.free();
+
+ if (dict->lookup("BE", &obj1)->isDict()) {
+ borderEffect = new AnnotBorderEffect(obj1.getDict());
+ } else {
+ borderEffect = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("RD", &obj1)->isArray()) {
+ rectangle = parseDiffRectangle(obj1.getArray(), rect);
+ } else {
+ rectangle = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("LE", &obj1)->isName()) {
+ GooString *styleName = new GooString(obj1.getName());
+ endStyle = parseAnnotLineEndingStyle(styleName);
+ delete styleName;
+ } else {
+ endStyle = annotLineEndingNone;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotLine
+//------------------------------------------------------------------------
+
+AnnotLine::AnnotLine(XRef *xrefA, PDFRectangle *rect, PDFRectangle *lRect, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeLine;
+ annotObj.dictSet ("Subtype", obj1.initName ("Line"));
+
+ Object obj2, obj3;
+ obj2.initArray (xrefA);
+ obj2.arrayAdd (obj3.initReal (lRect->x1));
+ obj2.arrayAdd (obj3.initReal (lRect->y1));
+ obj2.arrayAdd (obj3.initReal (lRect->x2));
+ obj2.arrayAdd (obj3.initReal (lRect->y2));
+ annotObj.dictSet ("L", &obj2);
+
+ initialize (xrefA, catalog, annotObj.getDict());
+}
+
+AnnotLine::AnnotLine(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeLine;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotLine::~AnnotLine() {
+ delete coord1;
+ delete coord2;
+
+ if (interiorColor)
+ delete interiorColor;
+
+ if (measure)
+ delete measure;
+}
+
+void AnnotLine::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("L", &obj1)->isArray() && obj1.arrayGetLength() == 4) {
+ Object obj2;
+ double x1, y1, x2, y2;
+
+ (obj1.arrayGet(0, &obj2)->isNum() ? x1 = obj2.getNum() : x1 = 0);
+ obj2.free();
+ (obj1.arrayGet(1, &obj2)->isNum() ? y1 = obj2.getNum() : y1 = 0);
+ obj2.free();
+ (obj1.arrayGet(2, &obj2)->isNum() ? x2 = obj2.getNum() : x2 = 0);
+ obj2.free();
+ (obj1.arrayGet(3, &obj2)->isNum() ? y2 = obj2.getNum() : y2 = 0);
+ obj2.free();
+
+ coord1 = new AnnotCoord(x1, y1);
+ coord2 = new AnnotCoord(x2, y2);
+ } else {
+ coord1 = new AnnotCoord();
+ coord2 = new AnnotCoord();
+ }
+ obj1.free();
+
+ if (dict->lookup("LE", &obj1)->isArray() && obj1.arrayGetLength() == 2) {
+ Object obj2;
+
+ if(obj1.arrayGet(0, &obj2)->isString())
+ startStyle = parseAnnotLineEndingStyle(obj2.getString());
+ else
+ startStyle = annotLineEndingNone;
+ obj2.free();
+
+ if(obj1.arrayGet(1, &obj2)->isString())
+ endStyle = parseAnnotLineEndingStyle(obj2.getString());
+ else
+ endStyle = annotLineEndingNone;
+ obj2.free();
+
+ } else {
+ startStyle = endStyle = annotLineEndingNone;
+ }
+ obj1.free();
+
+ if (dict->lookup("IC", &obj1)->isArray()) {
+ interiorColor = new AnnotColor(obj1.getArray());
+ } else {
+ interiorColor = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("LL", &obj1)->isNum()) {
+ leaderLineLength = obj1.getNum();
+ } else {
+ leaderLineLength = 0;
+ }
+ obj1.free();
+
+ if (dict->lookup("LLE", &obj1)->isNum()) {
+ leaderLineExtension = obj1.getNum();
+
+ if (leaderLineExtension < 0)
+ leaderLineExtension = 0;
+ } else {
+ leaderLineExtension = 0;
+ }
+ obj1.free();
+
+ if (dict->lookup("Cap", &obj1)->isBool()) {
+ caption = obj1.getBool();
+ } else {
+ caption = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("IT", &obj1)->isName()) {
+ GooString *intentName = new GooString(obj1.getName());
+
+ if(!intentName->cmp("LineArrow")) {
+ intent = intentLineArrow;
+ } else if(!intentName->cmp("LineDimension")) {
+ intent = intentLineDimension;
+ } else {
+ intent = intentLineArrow;
+ }
+ delete intentName;
+ } else {
+ intent = intentLineArrow;
+ }
+ obj1.free();
+
+ if (dict->lookup("LLO", &obj1)->isNum()) {
+ leaderLineOffset = obj1.getNum();
+
+ if (leaderLineOffset < 0)
+ leaderLineOffset = 0;
+ } else {
+ leaderLineOffset = 0;
+ }
+ obj1.free();
+
+ if (dict->lookup("CP", &obj1)->isName()) {
+ GooString *captionName = new GooString(obj1.getName());
+
+ if(!captionName->cmp("Inline")) {
+ captionPos = captionPosInline;
+ } else if(!captionName->cmp("Top")) {
+ captionPos = captionPosTop;
+ } else {
+ captionPos = captionPosInline;
+ }
+ delete captionName;
+ } else {
+ captionPos = captionPosInline;
+ }
+ obj1.free();
+
+ if (dict->lookup("Measure", &obj1)->isDict()) {
+ measure = NULL;
+ } else {
+ measure = NULL;
+ }
+ obj1.free();
+
+ if ((dict->lookup("CO", &obj1)->isArray()) && (obj1.arrayGetLength() == 2)) {
+ Object obj2;
+
+ (obj1.arrayGet(0, &obj2)->isNum() ? captionTextHorizontal = obj2.getNum() :
+ captionTextHorizontal = 0);
+ obj2.free();
+ (obj1.arrayGet(1, &obj2)->isNum() ? captionTextVertical = obj2.getNum() :
+ captionTextVertical = 0);
+ obj2.free();
+ } else {
+ captionTextHorizontal = captionTextVertical = 0;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotTextMarkup
+//------------------------------------------------------------------------
+AnnotTextMarkup::AnnotTextMarkup(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType,
+ AnnotQuadrilaterals *quadPoints, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ switch (subType) {
+ case typeHighlight:
+ annotObj.dictSet ("Subtype", obj1.initName ("Highlight"));
+ break;
+ case typeUnderline:
+ annotObj.dictSet ("Subtype", obj1.initName ("Underline"));
+ break;
+ case typeSquiggly:
+ annotObj.dictSet ("Subtype", obj1.initName ("Squiggly"));
+ break;
+ case typeStrikeOut:
+ annotObj.dictSet ("Subtype", obj1.initName ("StrikeOut"));
+ break;
+ default:
+ assert (0 && "Invalid subtype for AnnotTextMarkup\n");
+ }
+
+ Object obj2;
+ obj2.initArray (xrefA);
+
+ for (int i = 0; i < quadPoints->getQuadrilateralsLength(); ++i) {
+ Object obj3;
+
+ obj2.arrayAdd (obj3.initReal (quadPoints->getX1(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getY1(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getX2(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getY2(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getX3(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getY3(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getX4(i)));
+ obj2.arrayAdd (obj3.initReal (quadPoints->getY4(i)));
+ }
+
+ annotObj.dictSet ("QuadPoints", &obj2);
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotTextMarkup::AnnotTextMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ // the real type will be read in initialize()
+ type = typeHighlight;
+ initialize(xrefA, catalog, dict);
+}
+
+void AnnotTextMarkup::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ GooString typeName(obj1.getName());
+ if (!typeName.cmp("Highlight")) {
+ type = typeHighlight;
+ } else if (!typeName.cmp("Underline")) {
+ type = typeUnderline;
+ } else if (!typeName.cmp("Squiggly")) {
+ type = typeSquiggly;
+ } else if (!typeName.cmp("StrikeOut")) {
+ type = typeStrikeOut;
+ }
+ }
+ obj1.free();
+
+ if(dict->lookup("QuadPoints", &obj1)->isArray()) {
+ quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect);
+ } else {
+ quadrilaterals = NULL;
+ }
+ obj1.free();
+}
+
+AnnotTextMarkup::~AnnotTextMarkup() {
+ if(quadrilaterals) {
+ delete quadrilaterals;
+ }
+}
+
+//------------------------------------------------------------------------
+// AnnotWidget
+//------------------------------------------------------------------------
+
+AnnotWidget::AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ type = typeWidget;
+ widget = NULL;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotWidget::~AnnotWidget() {
+ if (appearCharacs)
+ delete appearCharacs;
+
+ if (action)
+ delete action;
+
+ if (additionActions)
+ delete additionActions;
+
+ if (parent)
+ delete parent;
+}
+
+void AnnotWidget::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
+ Object obj1;
+
+ if ((form = catalog->getForm ())) {
+ widget = form->findWidgetByRef (ref);
+
+ // check if field apperances need to be regenerated
+ // Only text or choice fields needs to have appearance regenerated
+ // see section 8.6.2 "Variable Text" of PDFReference
+ regen = gFalse;
+ if (widget != NULL && (widget->getType () == formText || widget->getType () == formChoice)) {
+ regen = form->getNeedAppearances ();
+ }
+ }
+
+ // If field doesn't have an AP we'll have to generate it
+ if (appearance.isNone () || appearance.isNull ())
+ regen = gTrue;
+
+ if(dict->lookup("H", &obj1)->isName()) {
+ GooString *modeName = new GooString(obj1.getName());
+
+ if(!modeName->cmp("N")) {
+ mode = highlightModeNone;
+ } else if(!modeName->cmp("O")) {
+ mode = highlightModeOutline;
+ } else if(!modeName->cmp("P") || !modeName->cmp("T")) {
+ mode = highlightModePush;
+ } else {
+ mode = highlightModeInvert;
+ }
+ delete modeName;
+ } else {
+ mode = highlightModeInvert;
+ }
+ obj1.free();
+
+ if(dict->lookup("MK", &obj1)->isDict()) {
+ appearCharacs = new AnnotAppearanceCharacs(obj1.getDict());
+ } else {
+ appearCharacs = NULL;
+ }
+ obj1.free();
+
+ if(dict->lookup("A", &obj1)->isDict()) {
+ action = NULL;
+ } else {
+ action = NULL;
+ }
+ obj1.free();
+
+ if(dict->lookup("AA", &obj1)->isDict()) {
+ additionActions = NULL;
+ } else {
+ additionActions = NULL;
+ }
+ obj1.free();
+
+ if(dict->lookup("Parent", &obj1)->isDict()) {
+ parent = NULL;
+ } else {
+ parent = NULL;
+ }
+ obj1.free();
+}
+
+// Grand unified handler for preparing text strings to be drawn into form
+// fields. Takes as input a text string (in PDFDocEncoding or UTF-16).
+// Converts some or all of this string to the appropriate encoding for the
+// specified font, and computes the width of the text. Can optionally stop
+// converting when a specified width has been reached, to perform line-breaking
+// for multi-line fields.
+//
+// Parameters:
+// text: input text string to convert
+// outBuf: buffer for writing re-encoded string
+// i: index at which to start converting; will be updated to point just after
+// last character processed
+// font: the font which will be used for display
+// width: computed width (unscaled by font size) will be stored here
+// widthLimit: if non-zero, stop converting to keep width under this value
+// (should be scaled down by font size)
+// charCount: count of number of characters will be stored here
+// noReencode: if set, do not try to translate the character encoding
+// (useful for Zapf Dingbats or other unusual encodings)
+// can only be used with simple fonts, not CID-keyed fonts
+//
+// TODO: Handle surrogate pairs in UTF-16.
+// Should be able to generate output for any CID-keyed font.
+// Doesn't handle vertical fonts--should it?
+void AnnotWidget::layoutText(GooString *text, GooString *outBuf, int *i,
+ GfxFont *font, double *width, double widthLimit,
+ int *charCount, GBool noReencode)
+{
+ CharCode c;
+ Unicode uChar, *uAux;
+ double w = 0.0;
+ int uLen, n;
+ double dx, dy, ox, oy;
+ GBool unicode = text->hasUnicodeMarker();
+ GBool spacePrev; // previous character was a space
+
+ // State for backtracking when more text has been processed than fits within
+ // widthLimit. We track for both input (text) and output (outBuf) the offset
+ // to the first character to discard.
+ //
+ // We keep track of several points:
+ // 1 - end of previous completed word which fits
+ // 2 - previous character which fit
+ int last_i1, last_i2, last_o1, last_o2;
+
+ if (unicode && text->getLength() % 2 != 0) {
+ error(-1, "AnnotWidget::layoutText, bad unicode string");
+ return;
+ }
+
+ // skip Unicode marker on string if needed
+ if (unicode && *i == 0)
+ *i = 2;
+
+ // Start decoding and copying characters, until either:
+ // we reach the end of the string
+ // we reach the maximum width
+ // we reach a newline character
+ // As we copy characters, keep track of the last full word to fit, so that we
+ // can backtrack if we exceed the maximum width.
+ last_i1 = last_i2 = *i;
+ last_o1 = last_o2 = 0;
+ spacePrev = gFalse;
+ outBuf->clear();
+
+ while (*i < text->getLength()) {
+ last_i2 = *i;
+ last_o2 = outBuf->getLength();
+
+ if (unicode) {
+ uChar = (unsigned char)(text->getChar(*i)) << 8;
+ uChar += (unsigned char)(text->getChar(*i + 1));
+ *i += 2;
+ } else {
+ if (noReencode)
+ uChar = text->getChar(*i) & 0xff;
+ else
+ uChar = pdfDocEncoding[text->getChar(*i) & 0xff];
+ *i += 1;
+ }
+
+ // Explicit line break?
+ if (uChar == '\r' || uChar == '\n') {
+ // Treat a <CR><LF> sequence as a single line break
+ if (uChar == '\r' && *i < text->getLength()) {
+ if (unicode && text->getChar(*i) == '\0'
+ && text->getChar(*i + 1) == '\n')
+ *i += 2;
+ else if (!unicode && text->getChar(*i) == '\n')
+ *i += 1;
+ }
+
+ break;
+ }
+
+ if (noReencode) {
+ outBuf->append(uChar);
+ } else {
+ CharCodeToUnicode *ccToUnicode = font->getToUnicode();
+ if (!ccToUnicode) {
+ // This assumes an identity CMap.
+ outBuf->append((uChar >> 8) & 0xff);
+ outBuf->append(uChar & 0xff);
+ } else if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) {
+ ccToUnicode->decRefCnt();
+ if (font->isCIDFont()) {
+ // TODO: This assumes an identity CMap. It should be extended to
+ // handle the general case.
+ outBuf->append((c >> 8) & 0xff);
+ outBuf->append(c & 0xff);
+ } else {
+ // 8-bit font
+ outBuf->append(c);
+ }
+ } else {
+ ccToUnicode->decRefCnt();
+ fprintf(stderr,
+ "warning: layoutText: cannot convert U+%04X\n", uChar);
+ }
+ }
+
+ // If we see a space, then we have a linebreak opportunity.
+ if (uChar == ' ') {
+ last_i1 = *i;
+ if (!spacePrev)
+ last_o1 = last_o2;
+ spacePrev = gTrue;
+ } else {
+ spacePrev = gFalse;
+ }
+
+ // Compute width of character just output
+ if (outBuf->getLength() > last_o2) {
+ dx = 0.0;
+ font->getNextChar(outBuf->getCString() + last_o2,
+ outBuf->getLength() - last_o2,
+ &c, &uAux, &uLen, &dx, &dy, &ox, &oy);
+ w += dx;
+ }
+
+ // Current line over-full now?
+ if (widthLimit > 0.0 && w > widthLimit) {
+ if (last_o1 > 0) {
+ // Back up to the previous word which fit, if there was a previous
+ // word.
+ *i = last_i1;
+ outBuf->del(last_o1, outBuf->getLength() - last_o1);
+ } else if (last_o2 > 0) {
+ // Otherwise, back up to the previous character (in the only word on
+ // this line)
+ *i = last_i2;
+ outBuf->del(last_o2, outBuf->getLength() - last_o2);
+ } else {
+ // Otherwise, we were trying to fit the first character; include it
+ // anyway even if it overflows the space--no updates to make.
+ }
+ break;
+ }
+ }
+
+ // If splitting input into lines because we reached the width limit, then
+ // consume any remaining trailing spaces that would go on this line from the
+ // input. If in doing so we reach a newline, consume that also. This code
+ // won't run if we stopped at a newline above, since in that case w <=
+ // widthLimit still.
+ if (widthLimit > 0.0 && w > widthLimit) {
+ if (unicode) {
+ while (*i < text->getLength()
+ && text->getChar(*i) == '\0' && text->getChar(*i + 1) == ' ')
+ *i += 2;
+ if (*i < text->getLength()
+ && text->getChar(*i) == '\0' && text->getChar(*i + 1) == '\r')
+ *i += 2;
+ if (*i < text->getLength()
+ && text->getChar(*i) == '\0' && text->getChar(*i + 1) == '\n')
+ *i += 2;
+ } else {
+ while (*i < text->getLength() && text->getChar(*i) == ' ')
+ *i += 1;
+ if (*i < text->getLength() && text->getChar(*i) == '\r')
+ *i += 1;
+ if (*i < text->getLength() && text->getChar(*i) == '\n')
+ *i += 1;
+ }
+ }
+
+ // Compute the actual width and character count of the final string, based on
+ // breakpoint, if this information is requested by the caller.
+ if (width != NULL || charCount != NULL) {
+ char *s = outBuf->getCString();
+ int len = outBuf->getLength();
+
+ if (width != NULL)
+ *width = 0.0;
+ if (charCount != NULL)
+ *charCount = 0;
+
+ while (len > 0) {
+ dx = 0.0;
+ n = font->getNextChar(s, len, &c, &uAux, &uLen, &dx, &dy, &ox, &oy);
+
+ if (n == 0) {
+ break;
+ }
+
+ if (width != NULL)
+ *width += dx;
+ if (charCount != NULL)
+ *charCount += 1;
+
+ s += n;
+ len -= n;
+ }
+ }
+}
+
+// Copy the given string to appearBuf, adding parentheses around it and
+// escaping characters as appropriate.
+void AnnotWidget::writeString(GooString *str, GooString *appearBuf)
+{
+ char c;
+ int i;
+
+ appearBuf->append('(');
+
+ for (i = 0; i < str->getLength(); ++i) {
+ c = str->getChar(i);
+ if (c == '(' || c == ')' || c == '\\') {
+ appearBuf->append('\\');
+ appearBuf->append(c);
+ } else if (c < 0x20) {
+ appearBuf->appendf("\\{0:03o}", (unsigned char)c);
+ } else {
+ appearBuf->append(c);
+ }
+ }
+
+ appearBuf->append(')');
+}
+
+// Draw the variable text or caption for a field.
+void AnnotWidget::drawText(GooString *text, GooString *da, GfxFontDict *fontDict,
+ GBool multiline, int comb, int quadding,
+ GBool txField, GBool forceZapfDingbats,
+ GBool password) {
+ GooList *daToks;
+ GooString *tok, *convertedText;
+ GfxFont *font;
+ double fontSize, fontSize2, borderWidth, x, xPrev, y, w, wMax;
+ int tfPos, tmPos, i, j;
+ GBool freeText = gFalse; // true if text should be freed before return
+ GBool freeFont = gFalse;
+
+ //~ if there is no MK entry, this should use the existing content stream,
+ //~ and only replace the marked content portion of it
+ //~ (this is only relevant for Tx fields)
+
+ // parse the default appearance string
+ tfPos = tmPos = -1;
+ if (da) {
+ daToks = new GooList();
+ i = 0;
+ while (i < da->getLength()) {
+ while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) {
+ ++i;
+ }
+ if (i < da->getLength()) {
+ for (j = i + 1;
+ j < da->getLength() && !Lexer::isSpace(da->getChar(j));
+ ++j) ;
+ daToks->append(new GooString(da, i, j - i));
+ i = j;
+ }
+ }
+ for (i = 2; i < daToks->getLength(); ++i) {
+ if (i >= 2 && !((GooString *)daToks->get(i))->cmp("Tf")) {
+ tfPos = i - 2;
+ } else if (i >= 6 && !((GooString *)daToks->get(i))->cmp("Tm")) {
+ tmPos = i - 6;
+ }
+ }
+ } else {
+ daToks = NULL;
+ }
+
+ // force ZapfDingbats
+ if (forceZapfDingbats) {
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos);
+ if (tok->cmp("/ZaDb")) {
+ tok->clear();
+ tok->append("/ZaDb");
+ }
+ }
+ }
+ // get the font and font size
+ font = NULL;
+ fontSize = 0;
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos);
+ if (tok->getLength() >= 1 && tok->getChar(0) == '/') {
+ if (!fontDict || !(font = fontDict->lookup(tok->getCString() + 1))) {
+ if (forceZapfDingbats) {
+ // We are forcing ZaDb but the font does not exist
+ // so create a fake one
+ Ref r; // dummy Ref, it's not used at all in this codepath
+ r.num = 0;
+ r.gen = 0;
+ Dict *d = new Dict(xref);
+ font = new Gfx8BitFont(xref, "ZaDb", r, new GooString("ZapfDingbats"), fontType1, d);
+ delete d;
+ freeFont = gTrue;
+ addDingbatsResource = gTrue;
+ } else {
+ error(-1, "Unknown font in field's DA string");
+ }
+ }
+ } else {
+ error(-1, "Invalid font name in 'Tf' operator in field's DA string");
+ }
+ tok = (GooString *)daToks->get(tfPos + 1);
+ fontSize = gatof(tok->getCString());
+ } else {
+ error(-1, "Missing 'Tf' operator in field's DA string");
+ }
+ if (!font) {
+ if (daToks) {
+ deleteGooList(daToks, GooString);
+ }
+ return;
+ }
+
+ // get the border width
+ borderWidth = border ? border->getWidth() : 0;
+
+ // for a password field, replace all characters with asterisks
+ if (password) {
+ int len;
+ if (text->hasUnicodeMarker())
+ len = (text->getLength() - 2) / 2;
+ else
+ len = text->getLength();
+
+ text = new GooString;
+ for (i = 0; i < len; ++i)
+ text->append('*');
+ freeText = gTrue;
+ }
+
+ convertedText = new GooString;
+
+ // setup
+ if (txField) {
+ appearBuf->append("/Tx BMC\n");
+ }
+ appearBuf->append("q\n");
+ appearBuf->append("BT\n");
+ // multi-line text
+ if (multiline) {
+ // note: the comb flag is ignored in multiline mode
+
+ wMax = rect->x2 - rect->x1 - 2 * borderWidth - 4;
+
+ // compute font autosize
+ if (fontSize == 0) {
+ for (fontSize = 20; fontSize > 1; --fontSize) {
+ y = rect->y2 - rect->y1;
+ i = 0;
+ while (i < text->getLength()) {
+ layoutText(text, convertedText, &i, font, &w, wMax / fontSize, NULL,
+ forceZapfDingbats);
+ y -= fontSize;
+ }
+ // approximate the descender for the last line
+ if (y >= 0.33 * fontSize) {
+ break;
+ }
+ }
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos + 1);
+ tok->clear();
+ tok->appendf("{0:.2f}", fontSize);
+ }
+ }
+
+ // starting y coordinate
+ // (note: each line of text starts with a Td operator that moves
+ // down a line)
+ y = rect->y2 - rect->y1;
+
+ // set the font matrix
+ if (tmPos >= 0) {
+ tok = (GooString *)daToks->get(tmPos + 4);
+ tok->clear();
+ tok->append('0');
+ tok = (GooString *)daToks->get(tmPos + 5);
+ tok->clear();
+ tok->appendf("{0:.2f}", y);
+ }
+
+ // write the DA string
+ if (daToks) {
+ for (i = 0; i < daToks->getLength(); ++i) {
+ appearBuf->append((GooString *)daToks->get(i))->append(' ');
+ }
+ }
+
+ // write the font matrix (if not part of the DA string)
+ if (tmPos < 0) {
+ appearBuf->appendf("1 0 0 1 0 {0:.2f} Tm\n", y);
+ }
+
+ // write a series of lines of text
+ i = 0;
+ xPrev = 0;
+ while (i < text->getLength()) {
+ layoutText(text, convertedText, &i, font, &w, wMax / fontSize, NULL,
+ forceZapfDingbats);
+ w *= fontSize;
+
+ // compute text start position
+ switch (quadding) {
+ case fieldQuadLeft:
+ default:
+ x = borderWidth + 2;
+ break;
+ case fieldQuadCenter:
+ x = (rect->x2 - rect->x1 - w) / 2;
+ break;
+ case fieldQuadRight:
+ x = rect->x2 - rect->x1 - borderWidth - 2 - w;
+ break;
+ }
+
+ // draw the line
+ appearBuf->appendf("{0:.2f} {1:.2f} Td\n", x - xPrev, -fontSize);
+ writeString(convertedText, appearBuf);
+ appearBuf->append(" Tj\n");
+
+ // next line
+ xPrev = x;
+ }
+
+ // single-line text
+ } else {
+ //~ replace newlines with spaces? - what does Acrobat do?
+
+ // comb formatting
+ if (comb > 0) {
+ int charCount;
+
+ // compute comb spacing
+ w = (rect->x2 - rect->x1 - 2 * borderWidth) / comb;
+
+ // compute font autosize
+ if (fontSize == 0) {
+ fontSize = rect->y2 - rect->y1 - 2 * borderWidth;
+ if (w < fontSize) {
+ fontSize = w;
+ }
+ fontSize = floor(fontSize);
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos + 1);
+ tok->clear();
+ tok->appendf("{0:.2f}", fontSize);
+ }
+ }
+
+ i = 0;
+ layoutText(text, convertedText, &i, font, NULL, 0.0, &charCount,
+ forceZapfDingbats);
+ if (charCount > comb)
+ charCount = comb;
+
+ // compute starting text cell
+ switch (quadding) {
+ case fieldQuadLeft:
+ default:
+ x = borderWidth;
+ break;
+ case fieldQuadCenter:
+ x = borderWidth + (comb - charCount) / 2 * w;
+ break;
+ case fieldQuadRight:
+ x = borderWidth + (comb - charCount) * w;
+ break;
+ }
+ y = 0.5 * (rect->y2 - rect->y1) - 0.4 * fontSize;
+
+ // set the font matrix
+ if (tmPos >= 0) {
+ tok = (GooString *)daToks->get(tmPos + 4);
+ tok->clear();
+ tok->appendf("{0:.2f}", x);
+ tok = (GooString *)daToks->get(tmPos + 5);
+ tok->clear();
+ tok->appendf("{0:.2f}", y);
+ }
+
+ // write the DA string
+ if (daToks) {
+ for (i = 0; i < daToks->getLength(); ++i) {
+ appearBuf->append((GooString *)daToks->get(i))->append(' ');
+ }
+ }
+
+ // write the font matrix (if not part of the DA string)
+ if (tmPos < 0) {
+ appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y);
+ }
+
+ // write the text string
+ char *s = convertedText->getCString();
+ int len = convertedText->getLength();
+ i = 0;
+ xPrev = w; // so that first character is placed properly
+ while (i < comb && len > 0) {
+ CharCode code;
+ Unicode *uAux;
+ int uLen, n;
+ double dx, dy, ox, oy;
+
+ dx = 0.0;
+ n = font->getNextChar(s, len, &code, &uAux, &uLen, &dx, &dy, &ox, &oy);
+ dx *= fontSize;
+
+ // center each character within its cell, by advancing the text
+ // position the appropriate amount relative to the start of the
+ // previous character
+ x = 0.5 * (w - dx);
+ appearBuf->appendf("{0:.2f} 0 Td\n", x - xPrev + w);
+
+ GooString *charBuf = new GooString(s, n);
+ writeString(charBuf, appearBuf);
+ appearBuf->append(" Tj\n");
+ delete charBuf;
+
+ i++;
+ s += n;
+ len -= n;
+ xPrev = x;
+ }
+
+ // regular (non-comb) formatting
+ } else {
+ i = 0;
+ layoutText(text, convertedText, &i, font, &w, 0.0, NULL,
+ forceZapfDingbats);
+
+ // compute font autosize
+ if (fontSize == 0) {
+ fontSize = rect->y2 - rect->y1 - 2 * borderWidth;
+ fontSize2 = (rect->x2 - rect->x1 - 4 - 2 * borderWidth) / w;
+ if (fontSize2 < fontSize) {
+ fontSize = fontSize2;
+ }
+ fontSize = floor(fontSize);
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos + 1);
+ tok->clear();
+ tok->appendf("{0:.2f}", fontSize);
+ }
+ }
+
+ // compute text start position
+ w *= fontSize;
+ switch (quadding) {
+ case fieldQuadLeft:
+ default:
+ x = borderWidth + 2;
+ break;
+ case fieldQuadCenter:
+ x = (rect->x2 - rect->x1 - w) / 2;
+ break;
+ case fieldQuadRight:
+ x = rect->x2 - rect->x1 - borderWidth - 2 - w;
+ break;
+ }
+ y = 0.5 * (rect->y2 - rect->y1) - 0.4 * fontSize;
+
+ // set the font matrix
+ if (tmPos >= 0) {
+ tok = (GooString *)daToks->get(tmPos + 4);
+ tok->clear();
+ tok->appendf("{0:.2f}", x);
+ tok = (GooString *)daToks->get(tmPos + 5);
+ tok->clear();
+ tok->appendf("{0:.2f}", y);
+ }
+
+ // write the DA string
+ if (daToks) {
+ for (i = 0; i < daToks->getLength(); ++i) {
+ appearBuf->append((GooString *)daToks->get(i))->append(' ');
+ }
+ }
+
+ // write the font matrix (if not part of the DA string)
+ if (tmPos < 0) {
+ appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y);
+ }
+
+ // write the text string
+ writeString(convertedText, appearBuf);
+ appearBuf->append(" Tj\n");
+ }
+ }
+ // cleanup
+ appearBuf->append("ET\n");
+ appearBuf->append("Q\n");
+ if (txField) {
+ appearBuf->append("EMC\n");
+ }
+ if (daToks) {
+ deleteGooList(daToks, GooString);
+ }
+ if (freeText) {
+ delete text;
+ }
+ delete convertedText;
+ if (freeFont) {
+ font->decRefCnt();
+ }
+}
+
+// Draw the variable text or caption for a field.
+void AnnotWidget::drawListBox(GooString **text, GBool *selection,
+ int nOptions, int topIdx,
+ GooString *da, GfxFontDict *fontDict, GBool quadding) {
+ GooList *daToks;
+ GooString *tok, *convertedText;
+ GfxFont *font;
+ double fontSize, fontSize2, borderWidth, x, y, w, wMax;
+ int tfPos, tmPos, i, j;
+
+ //~ if there is no MK entry, this should use the existing content stream,
+ //~ and only replace the marked content portion of it
+ //~ (this is only relevant for Tx fields)
+
+ // parse the default appearance string
+ tfPos = tmPos = -1;
+ if (da) {
+ daToks = new GooList();
+ i = 0;
+ while (i < da->getLength()) {
+ while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) {
+ ++i;
+ }
+ if (i < da->getLength()) {
+ for (j = i + 1;
+ j < da->getLength() && !Lexer::isSpace(da->getChar(j));
+ ++j) ;
+ daToks->append(new GooString(da, i, j - i));
+ i = j;
+ }
+ }
+ for (i = 2; i < daToks->getLength(); ++i) {
+ if (i >= 2 && !((GooString *)daToks->get(i))->cmp("Tf")) {
+ tfPos = i - 2;
+ } else if (i >= 6 && !((GooString *)daToks->get(i))->cmp("Tm")) {
+ tmPos = i - 6;
+ }
+ }
+ } else {
+ daToks = NULL;
+ }
+
+ // get the font and font size
+ font = NULL;
+ fontSize = 0;
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos);
+ if (tok->getLength() >= 1 && tok->getChar(0) == '/') {
+ if (!fontDict || !(font = fontDict->lookup(tok->getCString() + 1))) {
+ error(-1, "Unknown font in field's DA string");
+ }
+ } else {
+ error(-1, "Invalid font name in 'Tf' operator in field's DA string");
+ }
+ tok = (GooString *)daToks->get(tfPos + 1);
+ fontSize = gatof(tok->getCString());
+ } else {
+ error(-1, "Missing 'Tf' operator in field's DA string");
+ }
+ if (!font) {
+ if (daToks) {
+ deleteGooList(daToks, GooString);
+ }
+ return;
+ }
+
+ convertedText = new GooString;
+
+ // get the border width
+ borderWidth = border ? border->getWidth() : 0;
+
+ // compute font autosize
+ if (fontSize == 0) {
+ wMax = 0;
+ for (i = 0; i < nOptions; ++i) {
+ j = 0;
+ layoutText(text[i], convertedText, &j, font, &w, 0.0, NULL, gFalse);
+ if (w > wMax) {
+ wMax = w;
+ }
+ }
+ fontSize = rect->y2 - rect->y1 - 2 * borderWidth;
+ fontSize2 = (rect->x2 - rect->x1 - 4 - 2 * borderWidth) / wMax;
+ if (fontSize2 < fontSize) {
+ fontSize = fontSize2;
+ }
+ fontSize = floor(fontSize);
+ if (tfPos >= 0) {
+ tok = (GooString *)daToks->get(tfPos + 1);
+ tok->clear();
+ tok->appendf("{0:.2f}", fontSize);
+ }
+ }
+ // draw the text
+ y = rect->y2 - rect->y1 - 1.1 * fontSize;
+ for (i = topIdx; i < nOptions; ++i) {
+ // setup
+ appearBuf->append("q\n");
+
+ // draw the background if selected
+ if (selection[i]) {
+ appearBuf->append("0 g f\n");
+ appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} re f\n",
+ borderWidth,
+ y - 0.2 * fontSize,
+ rect->x2 - rect->x1 - 2 * borderWidth,
+ 1.1 * fontSize);
+ }
+
+ // setup
+ appearBuf->append("BT\n");
+
+ // compute text width and start position
+ j = 0;
+ layoutText(text[i], convertedText, &j, font, &w, 0.0, NULL, gFalse);
+ w *= fontSize;
+ switch (quadding) {
+ case fieldQuadLeft:
+ default:
+ x = borderWidth + 2;
+ break;
+ case fieldQuadCenter:
+ x = (rect->x2 - rect->x1 - w) / 2;
+ break;
+ case fieldQuadRight:
+ x = rect->x2 - rect->x1 - borderWidth - 2 - w;
+ break;
+ }
+
+ // set the font matrix
+ if (tmPos >= 0) {
+ tok = (GooString *)daToks->get(tmPos + 4);
+ tok->clear();
+ tok->appendf("{0:.2f}", x);
+ tok = (GooString *)daToks->get(tmPos + 5);
+ tok->clear();
+ tok->appendf("{0:.2f}", y);
+ }
+
+ // write the DA string
+ if (daToks) {
+ for (j = 0; j < daToks->getLength(); ++j) {
+ appearBuf->append((GooString *)daToks->get(j))->append(' ');
+ }
+ }
+
+ // write the font matrix (if not part of the DA string)
+ if (tmPos < 0) {
+ appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y);
+ }
+
+ // change the text color if selected
+ if (selection[i]) {
+ appearBuf->append("1 g\n");
+ }
+
+ // write the text string
+ writeString(convertedText, appearBuf);
+ appearBuf->append(" Tj\n");
+
+ // cleanup
+ appearBuf->append("ET\n");
+ appearBuf->append("Q\n");
+
+ // next line
+ y -= 1.1 * fontSize;
+ }
+
+ if (daToks) {
+ deleteGooList(daToks, GooString);
+ }
+
+ delete convertedText;
+}
+
+void AnnotWidget::generateFieldAppearance() {
+ Object mkObj, ftObj, appearDict, drObj, obj1, obj2, obj3;
+ Dict *field;
+ Dict *annot;
+ Dict *acroForm;
+ Dict *mkDict;
+ MemStream *appearStream;
+ GfxFontDict *fontDict;
+ GBool hasCaption;
+ double w, dx, dy, r;
+ double *dash;
+ GooString *caption, *da;
+ GooString **text;
+ GBool *selection;
+ int dashLength, ff, quadding, comb, nOptions, topIdx, i, j;
+ GBool modified;
+
+ if (widget == NULL || !widget->getField () || !widget->getField ()->getObj ()->isDict ())
+ return;
+
+ field = widget->getField ()->getObj ()->getDict ();
+ annot = widget->getObj ()->getDict ();
+ acroForm = form->getObj ()->getDict ();
+
+ // do not regenerate appearence if widget has not changed
+ modified = widget->isModified ();
+
+ // only regenerate when it doesn't have an AP or
+ // it already has an AP but widget has been modified
+ if (!regen && !modified) {
+ return;
+ }
+
+ appearBuf = new GooString ();
+ // get the appearance characteristics (MK) dictionary
+ if (annot->lookup("MK", &mkObj)->isDict()) {
+ mkDict = mkObj.getDict();
+ } else {
+ mkDict = NULL;
+ }
+ // draw the background
+ if (mkDict) {
+ if (mkDict->lookup("BG", &obj1)->isArray() &&
+ obj1.arrayGetLength() > 0) {
+ setColor(obj1.getArray(), gTrue, 0);
+ appearBuf->appendf("0 0 {0:.2f} {1:.2f} re f\n",
+ rect->x2 - rect->x1, rect->y2 - rect->y1);
+ }
+ obj1.free();
+ }
+
+ // get the field type
+ Form::fieldLookup(field, "FT", &ftObj);
+
+ // get the field flags (Ff) value
+ if (Form::fieldLookup(field, "Ff", &obj1)->isInt()) {
+ ff = obj1.getInt();
+ } else {
+ ff = 0;
+ }
+ obj1.free();
+
+ // draw the border
+ if (mkDict && border) {
+ w = border->getWidth();
+ if (w > 0) {
+ mkDict->lookup("BC", &obj1);
+ if (!(obj1.isArray() && obj1.arrayGetLength() > 0)) {
+ mkDict->lookup("BG", &obj1);
+ }
+ if (obj1.isArray() && obj1.arrayGetLength() > 0) {
+ dx = rect->x2 - rect->x1;
+ dy = rect->y2 - rect->y1;
+
+ // radio buttons with no caption have a round border
+ hasCaption = mkDict->lookup("CA", &obj2)->isString();
+ obj2.free();
+ if (ftObj.isName("Btn") && (ff & fieldFlagRadio) && !hasCaption) {
+ r = 0.5 * (dx < dy ? dx : dy);
+ switch (border->getStyle()) {
+ case AnnotBorder::borderDashed:
+ appearBuf->append("[");
+ dashLength = border->getDashLength();
+ dash = border->getDash();
+ for (i = 0; i < dashLength; ++i) {
+ appearBuf->appendf(" {0:.2f}", dash[i]);
+ }
+ appearBuf->append("] 0 d\n");
+ // fall through to the solid case
+ case AnnotBorder::borderSolid:
+ case AnnotBorder::borderUnderlined:
+ appearBuf->appendf("{0:.2f} w\n", w);
+ setColor(obj1.getArray(), gFalse, 0);
+ drawCircle(0.5 * dx, 0.5 * dy, r - 0.5 * w, gFalse);
+ break;
+ case AnnotBorder::borderBeveled:
+ case AnnotBorder::borderInset:
+ appearBuf->appendf("{0:.2f} w\n", 0.5 * w);
+ setColor(obj1.getArray(), gFalse, 0);
+ drawCircle(0.5 * dx, 0.5 * dy, r - 0.25 * w, gFalse);
+ setColor(obj1.getArray(), gFalse,
+ border->getStyle() == AnnotBorder::borderBeveled ? 1 : -1);
+ drawCircleTopLeft(0.5 * dx, 0.5 * dy, r - 0.75 * w);
+ setColor(obj1.getArray(), gFalse,
+ border->getStyle() == AnnotBorder::borderBeveled ? -1 : 1);
+ drawCircleBottomRight(0.5 * dx, 0.5 * dy, r - 0.75 * w);
+ break;
+ }
+
+ } else {
+ switch (border->getStyle()) {
+ case AnnotBorder::borderDashed:
+ appearBuf->append("[");
+ dashLength = border->getDashLength();
+ dash = border->getDash();
+ for (i = 0; i < dashLength; ++i) {
+ appearBuf->appendf(" {0:.2f}", dash[i]);
+ }
+ appearBuf->append("] 0 d\n");
+ // fall through to the solid case
+ case AnnotBorder::borderSolid:
+ appearBuf->appendf("{0:.2f} w\n", w);
+ setColor(obj1.getArray(), gFalse, 0);
+ appearBuf->appendf("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re s\n",
+ 0.5 * w, dx - w, dy - w);
+ break;
+ case AnnotBorder::borderBeveled:
+ case AnnotBorder::borderInset:
+ setColor(obj1.getArray(), gTrue,
+ border->getStyle() == AnnotBorder::borderBeveled ? 1 : -1);
+ appearBuf->append("0 0 m\n");
+ appearBuf->appendf("0 {0:.2f} l\n", dy);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx, dy);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, dy - w);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", w, dy - w);
+ appearBuf->appendf("{0:.2f} {0:.2f} l\n", w);
+ appearBuf->append("f\n");
+ setColor(obj1.getArray(), gTrue,
+ border->getStyle() == AnnotBorder::borderBeveled ? -1 : 1);
+ appearBuf->append("0 0 m\n");
+ appearBuf->appendf("{0:.2f} 0 l\n", dx);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx, dy);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, dy - w);
+ appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, w);
+ appearBuf->appendf("{0:.2f} {0:.2f} l\n", w);
+ appearBuf->append("f\n");
+ break;
+ case AnnotBorder::borderUnderlined:
+ appearBuf->appendf("{0:.2f} w\n", w);
+ setColor(obj1.getArray(), gFalse, 0);
+ appearBuf->appendf("0 0 m {0:.2f} 0 l s\n", dx);
+ break;
+ }
+
+ // clip to the inside of the border
+ appearBuf->appendf("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re W n\n",
+ w, dx - 2 * w, dy - 2 * w);
+ }
+ }
+ obj1.free();
+ }
+ }
+
+ // get the resource dictionary
+ acroForm->lookup("DR", &drObj);
+
+ // build the font dictionary
+ if (drObj.isDict() && drObj.dictLookup("Font", &obj1)->isDict()) {
+ fontDict = new GfxFontDict(xref, NULL, obj1.getDict());
+ } else {
+ fontDict = NULL;
+ }
+ obj1.free();
+
+ // get the default appearance string
+ if (Form::fieldLookup(field, "DA", &obj1)->isNull()) {
+ obj1.free();
+ acroForm->lookup("DA", &obj1);
+ }
+ if (obj1.isString()) {
+ da = obj1.getString()->copy();
+ //TODO: look for a font size / name HERE
+ // => create a function
+ } else {
+ da = NULL;
+ }
+ obj1.free();
+
+ // draw the field contents
+ if (ftObj.isName("Btn")) {
+ caption = NULL;
+ if (mkDict) {
+ if (mkDict->lookup("CA", &obj1)->isString()) {
+ caption = obj1.getString()->copy();
+ }
+ obj1.free();
+ }
+ // radio button
+ if (ff & fieldFlagRadio) {
+ //~ Acrobat doesn't draw a caption if there is no AP dict (?)
+ if (Form::fieldLookup(field, "V", &obj1)->isName()) {
+ if (annot->lookup("AS", &obj2)->isName(obj1.getName()) &&
+ strcmp (obj1.getName(), "Off") != 0) {
+ if (caption) {
+ drawText(caption, da, fontDict, gFalse, 0, fieldQuadCenter,
+ gFalse, gTrue);
+ } else {
+ if (mkDict) {
+ if (mkDict->lookup("BC", &obj3)->isArray() &&
+ obj3.arrayGetLength() > 0) {
+ dx = rect->x2 - rect->x1;
+ dy = rect->y2 - rect->y1;
+ setColor(obj3.getArray(), gTrue, 0);
+ drawCircle(0.5 * dx, 0.5 * dy, 0.2 * (dx < dy ? dx : dy),
+ gTrue);
+ }
+ obj3.free();
+ }
+ }
+ }
+ obj2.free();
+ }
+ obj1.free();
+ // pushbutton
+ } else if (ff & fieldFlagPushbutton) {
+ if (caption) {
+ drawText(caption, da, fontDict, gFalse, 0, fieldQuadCenter,
+ gFalse, gFalse);
+ }
+ // checkbox
+ } else {
+ if (annot->lookup("AS", &obj1)->isName() &&
+ strcmp(obj1.getName(), "Off") != 0) {
+ if (!caption) {
+ caption = new GooString("3"); // ZapfDingbats checkmark
+ }
+ drawText(caption, da, fontDict, gFalse, 0, fieldQuadCenter,
+ gFalse, gTrue);
+ }
+ obj1.free();
+ }
+ if (caption) {
+ delete caption;
+ }
+ } else if (ftObj.isName("Tx")) {
+ if (Form::fieldLookup(field, "V", &obj1)->isString()) {
+ if (Form::fieldLookup(field, "Q", &obj2)->isInt()) {
+ quadding = obj2.getInt();
+ } else {
+ quadding = fieldQuadLeft;
+ }
+ obj2.free();
+ comb = 0;
+ if (ff & fieldFlagComb) {
+ if (Form::fieldLookup(field, "MaxLen", &obj2)->isInt()) {
+ comb = obj2.getInt();
+ }
+ obj2.free();
+ }
+ drawText(obj1.getString(), da, fontDict,
+ ff & fieldFlagMultiline, comb, quadding, gTrue, gFalse, ff & fieldFlagPassword);
+ }
+ obj1.free();
+ } else if (ftObj.isName("Ch")) {
+ if (Form::fieldLookup(field, "Q", &obj1)->isInt()) {
+ quadding = obj1.getInt();
+ } else {
+ quadding = fieldQuadLeft;
+ }
+ obj1.free();
+ // combo box
+ if (ff & fieldFlagCombo) {
+ if (Form::fieldLookup(field, "V", &obj1)->isString()) {
+ drawText(obj1.getString(), da, fontDict,
+ gFalse, 0, quadding, gTrue, gFalse);
+ //~ Acrobat draws a popup icon on the right side
+ }
+ obj1.free();
+ // list box
+ } else {
+ if (field->lookup("Opt", &obj1)->isArray()) {
+ nOptions = obj1.arrayGetLength();
+ // get the option text
+ text = (GooString **)gmallocn(nOptions, sizeof(GooString *));
+ for (i = 0; i < nOptions; ++i) {
+ text[i] = NULL;
+ obj1.arrayGet(i, &obj2);
+ if (obj2.isString()) {
+ text[i] = obj2.getString()->copy();
+ } else if (obj2.isArray() && obj2.arrayGetLength() == 2) {
+ if (obj2.arrayGet(1, &obj3)->isString()) {
+ text[i] = obj3.getString()->copy();
+ }
+ obj3.free();
+ }
+ obj2.free();
+ if (!text[i]) {
+ text[i] = new GooString();
+ }
+ }
+ // get the selected option(s)
+ selection = (GBool *)gmallocn(nOptions, sizeof(GBool));
+ //~ need to use the I field in addition to the V field
+ Form::fieldLookup(field, "V", &obj2);
+ for (i = 0; i < nOptions; ++i) {
+ selection[i] = gFalse;
+ if (obj2.isString()) {
+ if (!obj2.getString()->cmp(text[i])) {
+ selection[i] = gTrue;
+ }
+ } else if (obj2.isArray()) {
+ for (j = 0; j < obj2.arrayGetLength(); ++j) {
+ if (obj2.arrayGet(j, &obj3)->isString() &&
+ !obj3.getString()->cmp(text[i])) {
+ selection[i] = gTrue;
+ }
+ obj3.free();
+ }
+ }
+ }
+ obj2.free();
+ // get the top index
+ if (field->lookup("TI", &obj2)->isInt()) {
+ topIdx = obj2.getInt();
+ } else {
+ topIdx = 0;
+ }
+ obj2.free();
+ // draw the text
+ drawListBox(text, selection, nOptions, topIdx, da, fontDict, quadding);
+ for (i = 0; i < nOptions; ++i) {
+ delete text[i];
+ }
+ gfree(text);
+ gfree(selection);
+ }
+ obj1.free();
+ }
+ } else if (ftObj.isName("Sig")) {
+ //~unimp
+ } else {
+ error(-1, "Unknown field type");
+ }
+
+ if (da) {
+ delete da;
+ }
+
+ // build the appearance stream dictionary
+ appearDict.initDict(xref);
+ appearDict.dictAdd(copyString("Length"),
+ obj1.initInt(appearBuf->getLength()));
+ appearDict.dictAdd(copyString("Subtype"), obj1.initName("Form"));
+ obj1.initArray(xref);
+ obj1.arrayAdd(obj2.initReal(0));
+ obj1.arrayAdd(obj2.initReal(0));
+ obj1.arrayAdd(obj2.initReal(rect->x2 - rect->x1));
+ obj1.arrayAdd(obj2.initReal(rect->y2 - rect->y1));
+ appearDict.dictAdd(copyString("BBox"), &obj1);
+
+ // set the resource dictionary
+ if (drObj.isDict()) {
+ appearDict.dictAdd(copyString("Resources"), drObj.copy(&obj1));
+ }
+ drObj.free();
+
+ // build the appearance stream
+ appearStream = new MemStream(strdup(appearBuf->getCString()), 0,
+ appearBuf->getLength(), &appearDict);
+ appearance.free();
+ appearance.initStream(appearStream);
+ delete appearBuf;
+
+ appearStream->setNeedFree(gTrue);
+
+ if (widget->isModified()) {
+ //create a new object that will contains the new appearance
+
+ //if we already have a N entry in our AP dict, reuse it
+ if (annot->lookup("AP", &obj1)->isDict() &&
+ obj1.dictLookupNF("N", &obj2)->isRef()) {
+ appRef = obj2.getRef();
+ }
+
+ obj2.free();
+ obj1.free();
+
+ // this annot doesn't have an AP yet, create one
+ if (appRef.num == 0)
+ appRef = xref->addIndirectObject(&appearance);
+ else // since we reuse the already existing AP, we have to notify the xref about this update
+ xref->setModifiedObject(&appearance, appRef);
+
+ // update object's AP and AS
+ Object apObj;
+ apObj.initDict(xref);
+
+ Object oaRef;
+ oaRef.initRef(appRef.num, appRef.gen);
+
+ apObj.dictSet("N", &oaRef);
+ annot->set("AP", &apObj);
+ Dict* d = new Dict(annot);
+ d->decRef();
+ Object dictObj;
+ dictObj.initDict(d);
+
+ xref->setModifiedObject(&dictObj, ref);
+ dictObj.free();
+ }
+
+ if (fontDict) {
+ delete fontDict;
+ }
+ ftObj.free();
+ mkObj.free();
+}
+
+
+void AnnotWidget::draw(Gfx *gfx, GBool printing) {
+ Object obj;
+
+ // check the flags
+ if ((flags & annotFlagHidden) ||
+ (printing && !(flags & annotFlagPrint)) ||
+ (!printing && (flags & annotFlagNoView))) {
+ return;
+ }
+
+ addDingbatsResource = gFalse;
+ generateFieldAppearance ();
+
+ // draw the appearance stream
+ appearance.fetch(xref, &obj);
+ if (addDingbatsResource) {
+ // We are forcing ZaDb but the font does not exist
+ // so create a fake one
+ Object baseFontObj, subtypeObj;
+ baseFontObj.initName("ZapfDingbats");
+ subtypeObj.initName("Type1");
+
+ Object fontDictObj;
+ Dict *fontDict = new Dict(xref);
+ fontDict->decRef();
+ fontDict->add(copyString("BaseFont"), &baseFontObj);
+ fontDict->add(copyString("Subtype"), &subtypeObj);
+ fontDictObj.initDict(fontDict);
+
+ Object fontsDictObj;
+ Dict *fontsDict = new Dict(xref);
+ fontsDict->decRef();
+ fontsDict->add(copyString("ZaDb"), &fontDictObj);
+ fontsDictObj.initDict(fontsDict);
+
+ Dict *dict = new Dict(xref);
+ dict->add(copyString("Font"), &fontsDictObj);
+ gfx->pushResources(dict);
+ delete dict;
+ }
+ gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+ rect->x1, rect->y1, rect->x2, rect->y2);
+ if (addDingbatsResource) {
+ gfx->popResources();
+ }
+ obj.free();
+}
+
+
+//------------------------------------------------------------------------
+// AnnotMovie
+//------------------------------------------------------------------------
+AnnotMovie::AnnotMovie(XRef *xrefA, PDFRectangle *rect, Movie *movieA, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeMovie;
+ annotObj.dictSet ("Subtype", obj1.initName ("Movie"));
+
+ movie = movieA->copy();
+ // TODO: create movie dict from movieA
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotMovie::AnnotMovie(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ type = typeMovie;
+ initialize(xrefA, catalog, dict);
+
+ movie = new Movie();
+ movie->parseAnnotMovie(this);
+}
+
+AnnotMovie::~AnnotMovie() {
+ if (title)
+ delete title;
+ if (fileName)
+ delete fileName;
+ delete movie;
+
+ if (posterStream && (!posterStream->decRef())) {
+ delete posterStream;
+ }
+}
+
+void AnnotMovie::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("T", &obj1)->isString()) {
+ title = obj1.getString()->copy();
+ } else {
+ title = NULL;
+ }
+ obj1.free();
+
+ Object movieDict;
+ Object aDict;
+
+ // default values
+ fileName = NULL;
+ width = 0;
+ height = 0;
+ rotationAngle = 0;
+ rate = 1.0;
+ volume = 1.0;
+ showControls = false;
+ repeatMode = repeatModeOnce;
+ synchronousPlay = false;
+
+ hasFloatingWindow = false;
+ isFullscreen = false;
+ FWScaleNum = 1;
+ FWScaleDenum = 1;
+ FWPosX = 0.5;
+ FWPosY = 0.5;
+
+ if (dict->lookup("Movie", &movieDict)->isDict()) {
+ Object obj2;
+ if (getFileSpecNameForPlatform(movieDict.dictLookup("F", &obj1), &obj2)) {
+ fileName = obj2.getString()->copy();
+ obj2.free();
+ }
+ obj1.free();
+
+ if (movieDict.dictLookup("Aspect", &obj1)->isArray()) {
+ Array* aspect = obj1.getArray();
+ if (aspect->getLength() >= 2) {
+ Object tmp;
+ if( aspect->get(0, &tmp)->isNum() ) {
+ width = (int)floor( aspect->get(0, &tmp)->getNum() + 0.5 );
+ }
+ tmp.free();
+ if( aspect->get(1, &tmp)->isNum() ) {
+ height = (int)floor( aspect->get(1, &tmp)->getNum() + 0.5 );
+ }
+ tmp.free();
+ }
+ }
+ obj1.free();
+
+ if (movieDict.dictLookup("Rotate", &obj1)->isInt()) {
+ // round up to 90°
+ rotationAngle = (((obj1.getInt() + 360) % 360) % 90) * 90;
+ }
+ obj1.free();
+
+ //
+ // movie poster
+ //
+ posterType = posterTypeNone;
+ posterStream = NULL;
+ if (!movieDict.dictLookup("Poster", &obj1)->isNone()) {
+ if (obj1.isBool()) {
+ GBool v = obj1.getBool();
+ if (v)
+ posterType = posterTypeFromMovie;
+ }
+
+ if (obj1.isStream()) {
+ posterType = posterTypeStream;
+
+ // "copy" stream
+ posterStream = obj1.getStream();
+ posterStream->incRef();
+ }
+
+ obj1.free();
+ }
+
+ }
+ movieDict.free();
+
+
+ // activation dictionary parsing ...
+
+ if (dict->lookup("A", &aDict)->isDict()) {
+ if (!aDict.dictLookup("Start", &obj1)->isNone()) {
+ if (obj1.isInt()) {
+ // If it is representable as an integer (subject to the implementation limit for
+ // integers, as described in Appendix C), it should be specified as such.
+
+ start.units = obj1.getInt();
+ }
+ if (obj1.isString()) {
+ // If it is not representable as an integer, it should be specified as an 8-byte
+ // string representing a 64-bit twos-complement integer, most significant
+ // byte first.
+
+ // UNSUPPORTED
+ }
+
+ if (obj1.isArray()) {
+ Array* a = obj1.getArray();
+
+ Object tmp;
+ a->get(0, &tmp);
+ if (tmp.isInt()) {
+ start.units = tmp.getInt();
+ }
+ if (tmp.isString()) {
+ // UNSUPPORTED
+ }
+ tmp.free();
+
+ a->get(1, &tmp);
+ if (tmp.isInt()) {
+ start.units_per_second = tmp.getInt();
+ }
+ tmp.free();
+ }
+ }
+ obj1.free();
+
+ if (!aDict.dictLookup("Duration", &obj1)->isNone()) {
+ if (obj1.isInt()) {
+ duration.units = obj1.getInt();
+ }
+ if (obj1.isString()) {
+ // UNSUPPORTED
+ }
+
+ if (obj1.isArray()) {
+ Array* a = obj1.getArray();
+
+ Object tmp;
+ a->get(0, &tmp);
+ if (tmp.isInt()) {
+ duration.units = tmp.getInt();
+ }
+ if (tmp.isString()) {
+ // UNSUPPORTED
+ }
+ tmp.free();
+
+ a->get(1, &tmp);
+ if (tmp.isInt()) {
+ duration.units_per_second = tmp.getInt();
+ }
+ tmp.free();
+ }
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("Rate", &obj1)->isNum()) {
+ rate = obj1.getNum();
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("Volume", &obj1)->isNum()) {
+ volume = obj1.getNum();
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("ShowControls", &obj1)->isBool()) {
+ showControls = obj1.getBool();
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("Synchronous", &obj1)->isBool()) {
+ synchronousPlay = obj1.getBool();
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("Mode", &obj1)->isName()) {
+ char* name = obj1.getName();
+ if (!strcmp(name, "Once"))
+ repeatMode = repeatModeOnce;
+ if (!strcmp(name, "Open"))
+ repeatMode = repeatModeOpen;
+ if (!strcmp(name, "Repeat"))
+ repeatMode = repeatModeRepeat;
+ if (!strcmp(name,"Palindrome"))
+ repeatMode = repeatModePalindrome;
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("FWScale", &obj1)->isArray()) {
+ // the presence of that entry implies that the movie is to be played
+ // in a floating window
+ hasFloatingWindow = true;
+
+ Array* scale = obj1.getArray();
+ if (scale->getLength() >= 2) {
+ Object tmp;
+ if (scale->get(0, &tmp)->isInt()) {
+ FWScaleNum = tmp.getInt();
+ }
+ tmp.free();
+ if (scale->get(1, &tmp)->isInt()) {
+ FWScaleDenum = tmp.getInt();
+ }
+ tmp.free();
+ }
+
+ // detect fullscreen mode
+ if ((FWScaleNum == 999) && (FWScaleDenum == 1)) {
+ isFullscreen = true;
+ }
+ }
+ obj1.free();
+
+ if (aDict.dictLookup("FWPosition", &obj1)->isArray()) {
+ Array* pos = obj1.getArray();
+ if (pos->getLength() >= 2) {
+ Object tmp;
+ if (pos->get(0, &tmp)->isNum()) {
+ FWPosX = tmp.getNum();
+ }
+ tmp.free();
+ if (pos->get(1, &tmp)->isNum()) {
+ FWPosY = tmp.getNum();
+ }
+ tmp.free();
+ }
+ }
+ }
+ aDict.free();
+}
+
+void AnnotMovie::getMovieSize(int& width, int& height) {
+ width = this->width;
+ height = this->height;
+}
+
+void AnnotMovie::getZoomFactor(int& num, int& denum) {
+ num = FWScaleNum;
+ denum = FWScaleDenum;
+}
+
+
+//------------------------------------------------------------------------
+// AnnotScreen
+//------------------------------------------------------------------------
+AnnotScreen::AnnotScreen(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeScreen;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Screen"));
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotScreen::AnnotScreen(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ type = typeScreen;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotScreen::~AnnotScreen() {
+ if (title)
+ delete title;
+ if (appearCharacs)
+ delete appearCharacs;
+
+ action.free();
+ additionAction.free();
+}
+
+void AnnotScreen::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ title = NULL;
+ if (dict->lookup("T", &obj1)->isString()) {
+ title = obj1.getString()->copy();
+ }
+ obj1.free();
+
+ dict->lookup("A", &action);
+
+ dict->lookup("AA", &additionAction);
+
+ appearCharacs = NULL;
+ if(dict->lookup("MK", &obj1)->isDict()) {
+ appearCharacs = new AnnotAppearanceCharacs(obj1.getDict());
+ }
+ obj1.free();
+
+}
+
+//------------------------------------------------------------------------
+// AnnotStamp
+//------------------------------------------------------------------------
+AnnotStamp::AnnotStamp(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeStamp;
+ annotObj.dictSet ("Subtype", obj1.initName ("Stamp"));
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotStamp::AnnotStamp(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeStamp;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotStamp::~AnnotStamp() {
+ delete icon;
+}
+
+void AnnotStamp::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("Name", &obj1)->isName()) {
+ icon = new GooString(obj1.getName());
+ } else {
+ icon = new GooString("Draft");
+ }
+ obj1.free();
+
+}
+
+//------------------------------------------------------------------------
+// AnnotGeometry
+//------------------------------------------------------------------------
+AnnotGeometry::AnnotGeometry(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ switch (subType) {
+ case typeSquare:
+ annotObj.dictSet ("Subtype", obj1.initName ("Square"));
+ break;
+ case typeCircle:
+ annotObj.dictSet ("Subtype", obj1.initName ("Circle"));
+ break;
+ default:
+ assert (0 && "Invalid subtype for AnnotGeometry\n");
+ }
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotGeometry::AnnotGeometry(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ // the real type will be read in initialize()
+ type = typeSquare;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotGeometry::~AnnotGeometry() {
+ delete interiorColor;
+ delete borderEffect;
+ delete geometryRect;
+}
+
+void AnnotGeometry::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ GooString typeName(obj1.getName());
+ if (!typeName.cmp("Square")) {
+ type = typeSquare;
+ } else if (!typeName.cmp("Circle")) {
+ type = typeCircle;
+ }
+ }
+ obj1.free();
+
+ if (dict->lookup("IC", &obj1)->isArray()) {
+ interiorColor = new AnnotColor(obj1.getArray());
+ } else {
+ interiorColor = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("BE", &obj1)->isDict()) {
+ borderEffect = new AnnotBorderEffect(obj1.getDict());
+ } else {
+ borderEffect = NULL;
+ }
+ obj1.free();
+
+ geometryRect = NULL;
+ if (dict->lookup("RD", &obj1)->isArray()) {
+ geometryRect = parseDiffRectangle(obj1.getArray(), rect);
+ }
+ obj1.free();
+
+}
+
+//------------------------------------------------------------------------
+// AnnotPolygon
+//------------------------------------------------------------------------
+AnnotPolygon::AnnotPolygon(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType,
+ AnnotPath *path, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ switch (subType) {
+ case typePolygon:
+ annotObj.dictSet ("Subtype", obj1.initName ("Polygon"));
+ break;
+ case typePolyLine:
+ annotObj.dictSet ("Subtype", obj1.initName ("PolyLine"));
+ break;
+ default:
+ assert (0 && "Invalid subtype for AnnotGeometry\n");
+ }
+
+ Object obj2;
+ obj2.initArray (xrefA);
+
+ for (int i = 0; i < path->getCoordsLength(); ++i) {
+ Object obj3;
+
+ obj2.arrayAdd (obj3.initReal (path->getX(i)));
+ obj2.arrayAdd (obj3.initReal (path->getY(i)));
+ }
+
+ annotObj.dictSet ("Vertices", &obj2);
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotPolygon::AnnotPolygon(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ // the real type will be read in initialize()
+ type = typePolygon;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotPolygon::~AnnotPolygon() {
+ delete vertices;
+
+ if (interiorColor)
+ delete interiorColor;
+
+ if (borderEffect)
+ delete borderEffect;
+}
+
+void AnnotPolygon::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ GooString typeName(obj1.getName());
+ if (!typeName.cmp("Polygon")) {
+ type = typePolygon;
+ } else if (!typeName.cmp("PolyLine")) {
+ type = typePolyLine;
+ }
+ }
+ obj1.free();
+
+ if (dict->lookup("Vertices", &obj1)->isArray()) {
+ vertices = new AnnotPath(obj1.getArray());
+ } else {
+ vertices = new AnnotPath();
+ error(-1, "Bad Annot Polygon Vertices");
+ ok = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("LE", &obj1)->isArray() && obj1.arrayGetLength() == 2) {
+ Object obj2;
+
+ if(obj1.arrayGet(0, &obj2)->isString())
+ startStyle = parseAnnotLineEndingStyle(obj2.getString());
+ else
+ startStyle = annotLineEndingNone;
+ obj2.free();
+
+ if(obj1.arrayGet(1, &obj2)->isString())
+ endStyle = parseAnnotLineEndingStyle(obj2.getString());
+ else
+ endStyle = annotLineEndingNone;
+ obj2.free();
+
+ } else {
+ startStyle = endStyle = annotLineEndingNone;
+ }
+ obj1.free();
+
+ if (dict->lookup("IC", &obj1)->isArray()) {
+ interiorColor = new AnnotColor(obj1.getArray());
+ } else {
+ interiorColor = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("BE", &obj1)->isDict()) {
+ borderEffect = new AnnotBorderEffect(obj1.getDict());
+ } else {
+ borderEffect = NULL;
+ }
+ obj1.free();
+
+ if (dict->lookup("IT", &obj1)->isName()) {
+ GooString *intentName = new GooString(obj1.getName());
+
+ if(!intentName->cmp("PolygonCloud")) {
+ intent = polygonCloud;
+ } else if(!intentName->cmp("PolyLineDimension")) {
+ intent = polylineDimension;
+ } else {
+ intent = polygonDimension;
+ }
+ delete intentName;
+ } else {
+ intent = polygonCloud;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotCaret
+//------------------------------------------------------------------------
+AnnotCaret::AnnotCaret(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeCaret;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Caret"));
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotCaret::AnnotCaret(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeCaret;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotCaret::~AnnotCaret() {
+ delete caretRect;
+}
+
+void AnnotCaret::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ symbol = symbolNone;
+ if (dict->lookup("Sy", &obj1)->isName()) {
+ GooString typeName(obj1.getName());
+ if (!typeName.cmp("P")) {
+ symbol = symbolP;
+ } else if (!typeName.cmp("None")) {
+ symbol = symbolNone;
+ }
+ }
+ obj1.free();
+
+ if (dict->lookup("RD", &obj1)->isArray()) {
+ caretRect = parseDiffRectangle(obj1.getArray(), rect);
+ } else {
+ caretRect = NULL;
+ }
+ obj1.free();
+
+}
+
+//------------------------------------------------------------------------
+// AnnotInk
+//------------------------------------------------------------------------
+AnnotInk::AnnotInk(XRef *xrefA, PDFRectangle *rect, AnnotPath **paths, int n_paths, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeInk;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Ink"));
+
+ Object obj2;
+ obj2.initArray (xrefA);
+
+ for (int i = 0; i < n_paths; ++i) {
+ AnnotPath *path = paths[i];
+ Object obj3;
+ obj3.initArray (xrefA);
+
+ for (int j = 0; j < path->getCoordsLength(); ++j) {
+ Object obj4;
+
+ obj3.arrayAdd (obj4.initReal (path->getX(j)));
+ obj3.arrayAdd (obj4.initReal (path->getY(j)));
+ }
+
+ obj2.arrayAdd (&obj3);
+ }
+
+ annotObj.dictSet ("InkList", &obj2);
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotInk::AnnotInk(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeInk;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotInk::~AnnotInk() {
+ if (inkList) {
+ for (int i = 0; i < inkListLength; ++i)
+ delete inkList[i];
+ gfree(inkList);
+ }
+}
+
+void AnnotInk::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("InkList", &obj1)->isArray()) {
+ Array *array = obj1.getArray();
+ inkListLength = array->getLength();
+ inkList = (AnnotPath **) gmallocn ((inkListLength), sizeof(AnnotPath *));
+ memset(inkList, 0, inkListLength * sizeof(AnnotPath *));
+ for (int i = 0; i < inkListLength; i++) {
+ Object obj2;
+ if (array->get(i, &obj2)->isArray())
+ inkList[i] = new AnnotPath(obj2.getArray());
+ obj2.free();
+ }
+ } else {
+ inkListLength = 0;
+ inkList = NULL;
+ error(-1, "Bad Annot Ink List");
+ ok = gFalse;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotFileAttachment
+//------------------------------------------------------------------------
+AnnotFileAttachment::AnnotFileAttachment(XRef *xrefA, PDFRectangle *rect, GooString *filename, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeFileAttachment;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("FileAttachment"));
+
+ Object obj2;
+ obj2.initString(filename->copy());
+ annotObj.dictSet ("FS", &obj2);
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotFileAttachment::AnnotFileAttachment(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeFileAttachment;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotFileAttachment::~AnnotFileAttachment() {
+ file.free();
+
+ if (name)
+ delete name;
+}
+
+void AnnotFileAttachment::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("FS", &obj1)->isDict() || dict->lookup("FS", &obj1)->isString()) {
+ obj1.copy(&file);
+ } else {
+ error(-1, "Bad Annot File Attachment");
+ ok = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("Name", &obj1)->isName()) {
+ name = new GooString(obj1.getName());
+ } else {
+ name = new GooString("PushPin");
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// AnnotSound
+//------------------------------------------------------------------------
+AnnotSound::AnnotSound(XRef *xrefA, PDFRectangle *rect, Sound *soundA, Catalog *catalog) :
+ AnnotMarkup(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = typeSound;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("Sound"));
+
+ Object obj2;
+ Stream *str = soundA->getStream();
+ obj2.initStream (str);
+ str->incRef(); //FIXME: initStream should do this?
+ annotObj.dictSet ("Sound", &obj2);
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+AnnotSound::AnnotSound(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ AnnotMarkup(xrefA, dict, catalog, obj) {
+ type = typeSound;
+ initialize(xrefA, catalog, dict);
+}
+
+AnnotSound::~AnnotSound() {
+ delete sound;
+
+ delete name;
+}
+
+void AnnotSound::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ sound = Sound::parseSound(dict->lookup("Sound", &obj1));
+ if (!sound) {
+ error(-1, "Bad Annot Sound");
+ ok = gFalse;
+ }
+ obj1.free();
+
+ if (dict->lookup("Name", &obj1)->isName()) {
+ name = new GooString(obj1.getName());
+ } else {
+ name = new GooString("Speaker");
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// Annot3D
+//------------------------------------------------------------------------
+Annot3D::Annot3D(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) :
+ Annot(xrefA, rect, catalog) {
+ Object obj1;
+
+ type = type3D;
+
+ annotObj.dictSet ("Subtype", obj1.initName ("3D"));
+
+ initialize(xrefA, catalog, annotObj.getDict());
+}
+
+Annot3D::Annot3D(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
+ Annot(xrefA, dict, catalog, obj) {
+ type = type3D;
+ initialize(xrefA, catalog, dict);
+}
+
+Annot3D::~Annot3D() {
+ if (activation)
+ delete activation;
+}
+
+void Annot3D::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
+ Object obj1;
+
+ if (dict->lookup("3DA", &obj1)->isDict()) {
+ activation = new Activation(obj1.getDict());
+ } else {
+ activation = NULL;
+ }
+ obj1.free();
+}
+
+Annot3D::Activation::Activation(Dict *dict) {
+ Object obj1;
+
+ if (dict->lookup("A", &obj1)->isName()) {
+ GooString *name = new GooString(obj1.getName());
+
+ if(!name->cmp("PO")) {
+ aTrigger = aTriggerPageOpened;
+ } else if(!name->cmp("PV")) {
+ aTrigger = aTriggerPageVisible;
+ } else if(!name->cmp("XA")) {
+ aTrigger = aTriggerUserAction;
+ } else {
+ aTrigger = aTriggerUnknown;
+ }
+ delete name;
+ } else {
+ aTrigger = aTriggerUnknown;
+ }
+ obj1.free();
+
+ if(dict->lookup("AIS", &obj1)->isName()) {
+ GooString *name = new GooString(obj1.getName());
+
+ if(!name->cmp("I")) {
+ aState = aStateEnabled;
+ } else if(!name->cmp("L")) {
+ aState = aStateDisabled;
+ } else {
+ aState = aStateUnknown;
+ }
+ delete name;
+ } else {
+ aState = aStateUnknown;
+ }
+ obj1.free();
+
+ if(dict->lookup("D", &obj1)->isName()) {
+ GooString *name = new GooString(obj1.getName());
+
+ if(!name->cmp("PC")) {
+ dTrigger = dTriggerPageClosed;
+ } else if(!name->cmp("PI")) {
+ dTrigger = dTriggerPageInvisible;
+ } else if(!name->cmp("XD")) {
+ dTrigger = dTriggerUserAction;
+ } else {
+ dTrigger = dTriggerUnknown;
+ }
+ delete name;
+ } else {
+ dTrigger = dTriggerUnknown;
+ }
+ obj1.free();
+
+ if(dict->lookup("DIS", &obj1)->isName()) {
+ GooString *name = new GooString(obj1.getName());
+
+ if(!name->cmp("U")) {
+ dState = dStateUninstantiaded;
+ } else if(!name->cmp("I")) {
+ dState = dStateInstantiated;
+ } else if(!name->cmp("L")) {
+ dState = dStateLive;
+ } else {
+ dState = dStateUnknown;
+ }
+ delete name;
+ } else {
+ dState = dStateUnknown;
+ }
+ obj1.free();
+
+ if (dict->lookup("TB", &obj1)->isBool()) {
+ displayToolbar = obj1.getBool();
+ } else {
+ displayToolbar = gTrue;
+ }
+ obj1.free();
+
+ if (dict->lookup("NP", &obj1)->isBool()) {
+ displayNavigation = obj1.getBool();
+ } else {
+ displayNavigation = gFalse;
+ }
+ obj1.free();
+}
+
+//------------------------------------------------------------------------
+// Annots
+//------------------------------------------------------------------------
+
+Annots::Annots(XRef *xref, Catalog *catalog, Object *annotsObj) {
+ Annot *annot;
+ Object obj1;
+ int size;
+ int i;
+
+ annots = NULL;
+ size = 0;
+ nAnnots = 0;
+
+ if (annotsObj->isArray()) {
+ for (i = 0; i < annotsObj->arrayGetLength(); ++i) {
+ //get the Ref to this annot and pass it to Annot constructor
+ //this way, it'll be possible for the annot to retrieve the corresponding
+ //form widget
+ Object obj2;
+ if (annotsObj->arrayGet(i, &obj1)->isDict()) {
+ annotsObj->arrayGetNF(i, &obj2);
+ annot = createAnnot (xref, obj1.getDict(), catalog, &obj2);
+ if (annot && annot->isOk()) {
+ if (nAnnots >= size) {
+ size += 16;
+ annots = (Annot **)greallocn(annots, size, sizeof(Annot *));
+ }
+ annots[nAnnots++] = annot;
+ } else {
+ delete annot;
+ }
+ }
+ obj2.free();
+ obj1.free();
+ }
+ }
+}
+
+Annot *Annots::createAnnot(XRef *xref, Dict* dict, Catalog *catalog, Object *obj) {
+ Annot *annot;
+ Object obj1;
+
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ GooString *typeName = new GooString(obj1.getName());
+
+ if (!typeName->cmp("Text")) {
+ annot = new AnnotText(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Link")) {
+ annot = new AnnotLink(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("FreeText")) {
+ annot = new AnnotFreeText(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Line")) {
+ annot = new AnnotLine(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Square")) {
+ annot = new AnnotGeometry(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Circle")) {
+ annot = new AnnotGeometry(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Polygon")) {
+ annot = new AnnotPolygon(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("PolyLine")) {
+ annot = new AnnotPolygon(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Highlight")) {
+ annot = new AnnotTextMarkup(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Underline")) {
+ annot = new AnnotTextMarkup(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Squiggly")) {
+ annot = new AnnotTextMarkup(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("StrikeOut")) {
+ annot = new AnnotTextMarkup(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Stamp")) {
+ annot = new AnnotStamp(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Caret")) {
+ annot = new AnnotCaret(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Ink")) {
+ annot = new AnnotInk(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("FileAttachment")) {
+ annot = new AnnotFileAttachment(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Sound")) {
+ annot = new AnnotSound(xref, dict, catalog, obj);
+ } else if(!typeName->cmp("Movie")) {
+ annot = new AnnotMovie(xref, dict, catalog, obj);
+ } else if(!typeName->cmp("Widget")) {
+ annot = new AnnotWidget(xref, dict, catalog, obj);
+ } else if(!typeName->cmp("Screen")) {
+ annot = new AnnotScreen(xref, dict, catalog, obj);
+ } else if(!typeName->cmp("PrinterMark")) {
+ annot = new Annot(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("TrapNet")) {
+ annot = new Annot(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Watermark")) {
+ annot = new Annot(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("3D")) {
+ annot = new Annot3D(xref, dict, catalog, obj);
+ } else if (!typeName->cmp("Popup")) {
+ /* Popup annots are already handled by markup annots
+ * Here we only care about popup annots without a
+ * markup annotation associated
+ */
+ Object obj2;
+
+ if (dict->lookup("Parent", &obj2)->isNull())
+ annot = new AnnotPopup(xref, dict, catalog, obj);
+ else
+ annot = NULL;
+
+ obj2.free();
+ } else {
+ annot = new Annot(xref, dict, catalog, obj);
+ }
+
+ delete typeName;
+ } else {
+ annot = NULL;
+ }
+ obj1.free();
+
+ return annot;
+}
+
+Annot *Annots::findAnnot(Ref *ref) {
+ int i;
+
+ for (i = 0; i < nAnnots; ++i) {
+ if (annots[i]->match(ref)) {
+ return annots[i];
+ }
+ }
+ return NULL;
+}
+
+
+Annots::~Annots() {
+ int i;
+
+ for (i = 0; i < nAnnots; ++i) {
+ delete annots[i];
+ }
+ gfree(annots);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.h
new file mode 100644
index 00000000000..b83c1dbb8c5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Annot.h
@@ -0,0 +1,1329 @@
+//========================================================================
+//
+// Annot.h
+//
+// Copyright 2000-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+// Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef ANNOT_H
+#define ANNOT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+class XRef;
+class Gfx;
+class Catalog;
+class CharCodeToUnicode;
+class GfxFont;
+class GfxFontDict;
+class Form;
+class FormWidget;
+class PDFRectangle;
+class Movie;
+class OCGs;
+class Sound;
+
+enum AnnotLineEndingStyle {
+ annotLineEndingSquare, // Square
+ annotLineEndingCircle, // Circle
+ annotLineEndingDiamond, // Diamond
+ annotLineEndingOpenArrow, // OpenArrow
+ annotLineEndingClosedArrow, // ClosedArrow
+ annotLineEndingNone, // None
+ annotLineEndingButt, // Butt
+ annotLineEndingROpenArrow, // ROpenArrow
+ annotLineEndingRClosedArrow, // RClosedArrow
+ annotLineEndingSlash // Slash
+};
+
+enum AnnotExternalDataType {
+ annotExternalDataMarkupUnknown,
+ annotExternalDataMarkup3D // Markup3D
+};
+
+//------------------------------------------------------------------------
+// AnnotCoord
+//------------------------------------------------------------------------
+
+class AnnotCoord {
+public:
+
+ AnnotCoord() : x(0), y(0) { }
+ AnnotCoord(double _x, double _y) : x(_x), y(_y) { }
+
+ double getX() const { return x; }
+ double getY() const { return y; }
+
+protected:
+
+ double x, y;
+};
+
+//------------------------------------------------------------------------
+// AnnotPath
+//------------------------------------------------------------------------
+
+class AnnotPath {
+public:
+ AnnotPath();
+ AnnotPath(Array *array);
+ AnnotPath(AnnotCoord **coords, int coordLength);
+ ~AnnotPath();
+
+ double getX(int coord) const;
+ double getY(int coord) const;
+ AnnotCoord *getCoord(int coord) const;
+ int getCoordsLength() const { return coordsLength; }
+protected:
+ AnnotCoord **coords;
+ int coordsLength;
+
+ void parsePathArray(Array *array);
+};
+
+//------------------------------------------------------------------------
+// AnnotCalloutLine
+//------------------------------------------------------------------------
+
+class AnnotCalloutLine {
+public:
+
+ AnnotCalloutLine(double x1, double y1, double x2, double y2);
+ virtual ~AnnotCalloutLine() { }
+
+ double getX1() const { return coord1.getX(); }
+ double getY1() const { return coord1.getY(); }
+ double getX2() const { return coord2.getX(); }
+ double getY2() const { return coord2.getY(); }
+
+protected:
+
+ AnnotCoord coord1, coord2;
+};
+
+//------------------------------------------------------------------------
+// AnnotCalloutMultiLine
+//------------------------------------------------------------------------
+
+class AnnotCalloutMultiLine: public AnnotCalloutLine {
+public:
+
+ AnnotCalloutMultiLine(double x1, double y1, double x2, double y2,
+ double x3, double y3);
+
+ double getX3() const { return coord3.getX(); }
+ double getY3() const { return coord3.getY(); }
+
+protected:
+
+ AnnotCoord coord3;
+};
+
+//------------------------------------------------------------------------
+// AnnotBorderEffect
+//------------------------------------------------------------------------
+
+class AnnotBorderEffect {
+public:
+
+ enum AnnotBorderEffectType {
+ borderEffectNoEffect, // S
+ borderEffectCloudy // C
+ };
+
+ AnnotBorderEffect(Dict *dict);
+
+ AnnotBorderEffectType getEffectType() const { return effectType; }
+ double getIntensity() const { return intensity; }
+
+private:
+
+ AnnotBorderEffectType effectType; // S (Default S)
+ double intensity; // I (Default 0)
+};
+
+//------------------------------------------------------------------------
+// AnnotQuadrilateral
+//------------------------------------------------------------------------
+
+class AnnotQuadrilaterals {
+ class AnnotQuadrilateral {
+ public:
+ AnnotQuadrilateral(double x1, double y1, double x2, double y2, double x3,
+ double y3, double x4, double y4);
+
+ AnnotCoord coord1, coord2, coord3, coord4;
+ };
+
+public:
+
+ AnnotQuadrilaterals(Array *array, PDFRectangle *rect);
+ ~AnnotQuadrilaterals();
+
+ double getX1(int quadrilateral);
+ double getY1(int quadrilateral);
+ double getX2(int quadrilateral);
+ double getY2(int quadrilateral);
+ double getX3(int quadrilateral);
+ double getY3(int quadrilateral);
+ double getX4(int quadrilateral);
+ double getY4(int quadrilateral);
+ int getQuadrilateralsLength() const { return quadrilateralsLength; }
+protected:
+
+ AnnotQuadrilateral** quadrilaterals;
+ int quadrilateralsLength;
+};
+
+//------------------------------------------------------------------------
+// AnnotBorder
+//------------------------------------------------------------------------
+
+class AnnotBorder {
+public:
+ enum AnnotBorderType {
+ typeUnknown,
+ typeArray,
+ typeBS
+ };
+
+ enum AnnotBorderStyle {
+ borderSolid, // Solid
+ borderDashed, // Dashed
+ borderBeveled, // Beveled
+ borderInset, // Inset
+ borderUnderlined // Underlined
+ };
+
+ AnnotBorder();
+ virtual ~AnnotBorder();
+
+ virtual AnnotBorderType getType() const { return type; }
+ virtual double getWidth() const { return width; }
+ virtual int getDashLength() const { return dashLength; }
+ virtual double *getDash() const { return dash; }
+ virtual AnnotBorderStyle getStyle() const { return style; }
+
+protected:
+ AnnotBorderType type;
+ double width;
+ int dashLength;
+ double *dash;
+ AnnotBorderStyle style;
+};
+
+//------------------------------------------------------------------------
+// AnnotBorderArray
+//------------------------------------------------------------------------
+
+class AnnotBorderArray: public AnnotBorder {
+public:
+ AnnotBorderArray();
+ AnnotBorderArray(Array *array);
+
+ double getHorizontalCorner() const { return horizontalCorner; }
+ double getVerticalCorner() const { return verticalCorner; }
+
+protected:
+ static const int DASH_LIMIT = 10; // implementation note 82 in Appendix H.
+ double horizontalCorner; // (Default 0)
+ double verticalCorner; // (Default 0)
+ // double width; // (Default 1) (inherited from AnnotBorder)
+};
+
+//------------------------------------------------------------------------
+// AnnotBorderBS
+//------------------------------------------------------------------------
+
+class AnnotBorderBS: public AnnotBorder {
+public:
+
+ AnnotBorderBS();
+ AnnotBorderBS(Dict *dict);
+
+private:
+ // double width; // W (Default 1) (inherited from AnnotBorder)
+ // AnnotBorderStyle style; // S (Default S) (inherited from AnnotBorder)
+ // double *dash; // D (Default [3]) (inherited from AnnotBorder)
+};
+
+//------------------------------------------------------------------------
+// AnnotColor
+//------------------------------------------------------------------------
+
+class AnnotColor {
+public:
+
+ enum AnnotColorSpace {
+ colorTransparent = 0,
+ colorGray = 1,
+ colorRGB = 3,
+ colorCMYK = 4
+ };
+
+ AnnotColor();
+ AnnotColor(double gray);
+ AnnotColor(double r, double g, double b);
+ AnnotColor(double c, double m, double y, double k);
+ AnnotColor(Array *array);
+ ~AnnotColor();
+
+ AnnotColorSpace getSpace() const { return (AnnotColorSpace) length; }
+ double *getValues() const { return values; }
+
+private:
+
+ double *values;
+ int length;
+};
+
+//------------------------------------------------------------------------
+// AnnotBorderStyle
+//------------------------------------------------------------------------
+
+enum AnnotBorderType {
+ annotBorderSolid,
+ annotBorderDashed,
+ annotBorderBeveled,
+ annotBorderInset,
+ annotBorderUnderlined
+};
+
+class AnnotBorderStyle {
+public:
+
+ AnnotBorderStyle(AnnotBorderType typeA, double widthA,
+ double *dashA, int dashLengthA,
+ double rA, double gA, double bA);
+ ~AnnotBorderStyle();
+
+ AnnotBorderType getType() { return type; }
+ double getWidth() { return width; }
+ void getDash(double **dashA, int *dashLengthA)
+ { *dashA = dash; *dashLengthA = dashLength; }
+ void getColor(double *rA, double *gA, double *bA)
+ { *rA = r; *gA = g; *bA = b; }
+
+private:
+
+ AnnotBorderType type;
+ double width;
+ double *dash;
+ int dashLength;
+ double r, g, b;
+};
+
+//------------------------------------------------------------------------
+// AnnotIconFit
+//------------------------------------------------------------------------
+
+class AnnotIconFit {
+public:
+
+ enum AnnotIconFitScaleWhen {
+ scaleAlways, // A
+ scaleBigger, // B
+ scaleSmaller, // S
+ scaleNever // N
+ };
+
+ enum AnnotIconFitScale {
+ scaleAnamorphic, // A
+ scaleProportional // P
+ };
+
+ AnnotIconFit(Dict *dict);
+
+ AnnotIconFitScaleWhen getScaleWhen() { return scaleWhen; }
+ AnnotIconFitScale getScale() { return scale; }
+ double getLeft() { return left; }
+ double getBottom() { return bottom; }
+ bool getFullyBounds() { return fullyBounds; }
+
+protected:
+
+ AnnotIconFitScaleWhen scaleWhen; // SW (Default A)
+ AnnotIconFitScale scale; // S (Default P)
+ double left; // A (Default [0.5 0.5]
+ double bottom; // Only if scale is P
+ bool fullyBounds; // FB (Default false)
+};
+
+//------------------------------------------------------------------------
+// AnnotAppearance
+//------------------------------------------------------------------------
+
+class AnnotAppearance {
+public:
+
+ enum AnnotAppearanceType {
+ appearNormal,
+ appearRollover,
+ appearDown
+ };
+
+ AnnotAppearance(Dict *dict);
+};
+
+//------------------------------------------------------------------------
+// AnnotAppearanceCharacs
+//------------------------------------------------------------------------
+
+class AnnotAppearanceCharacs {
+public:
+
+ enum AnnotAppearanceCharacsTextPos {
+ captionNoIcon, // 0
+ captionNoCaption, // 1
+ captionBelow, // 2
+ captionAbove, // 3
+ captionRight, // 4
+ captionLeft, // 5
+ captionOverlaid // 6
+ };
+
+ AnnotAppearanceCharacs(Dict *dict);
+ ~AnnotAppearanceCharacs();
+
+ int getRotation() { return rotation; }
+ AnnotColor *getBorderColor() { return borderColor; }
+ AnnotColor *getBackColor() { return backColor; }
+ GooString *getNormalCaption() { return normalCaption; }
+ GooString *getRolloverCaption() { return rolloverCaption; }
+ GooString *getAlternateCaption() { return alternateCaption; }
+ AnnotIconFit *getIconFit() { return iconFit; }
+ AnnotAppearanceCharacsTextPos getPosition() { return position; }
+
+protected:
+
+ int rotation; // R (Default 0)
+ AnnotColor *borderColor; // BC
+ AnnotColor *backColor; // BG
+ GooString *normalCaption; // CA
+ GooString *rolloverCaption; // RC
+ GooString *alternateCaption; // AC
+ // I
+ // RI
+ // IX
+ AnnotIconFit *iconFit; // IF
+ AnnotAppearanceCharacsTextPos position; // TP (Default 0)
+};
+
+//------------------------------------------------------------------------
+// Annot
+//------------------------------------------------------------------------
+
+class Annot {
+public:
+ enum AnnotFlag {
+ flagUnknown = 0x0000,
+ flagInvisible = 0x0001,
+ flagHidden = 0x0002,
+ flagPrint = 0x0004,
+ flagNoZoom = 0x0008,
+ flagNoRotate = 0x0010,
+ flagNoView = 0x0020,
+ flagReadOnly = 0x0040,
+ flagLocked = 0x0080,
+ flagToggleNoView = 0x0100,
+ flagLockedContents = 0x0200
+ };
+
+ enum AnnotSubtype {
+ typeUnknown, // 0
+ typeText, // Text 1
+ typeLink, // Link 2
+ typeFreeText, // FreeText 3
+ typeLine, // Line 4
+ typeSquare, // Square 5
+ typeCircle, // Circle 6
+ typePolygon, // Polygon 7
+ typePolyLine, // PolyLine 8
+ typeHighlight, // Highlight 9
+ typeUnderline, // Underline 10
+ typeSquiggly, // Squiggly 11
+ typeStrikeOut, // StrikeOut 12
+ typeStamp, // Stamp 13
+ typeCaret, // Caret 14
+ typeInk, // Ink 15
+ typePopup, // Popup 16
+ typeFileAttachment, // FileAttachment 17
+ typeSound, // Sound 18
+ typeMovie, // Movie 19
+ typeWidget, // Widget 20
+ typeScreen, // Screen 21
+ typePrinterMark, // PrinterMark 22
+ typeTrapNet, // TrapNet 23
+ typeWatermark, // Watermark 24
+ type3D // 3D 25
+ };
+
+ Annot(XRef *xrefA, PDFRectangle *rectA, Catalog *catalog);
+ Annot(XRef *xrefA, Dict *dict, Catalog *catalog);
+ Annot(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ virtual ~Annot();
+ GBool isOk() { return ok; }
+
+ virtual void draw(Gfx *gfx, GBool printing);
+ // Get appearance object.
+ Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); }
+
+ GBool match(Ref *refA)
+ { return ref.num == refA->num && ref.gen == refA->gen; }
+
+ double getXMin();
+ double getYMin();
+
+ double getFontSize() { return fontSize; }
+
+ // Sets the annot contents to new_content
+ // new_content should never be NULL
+ void setContents(GooString *new_content);
+
+ // The annotation takes the ownership of
+ // new_color.
+ void setColor(AnnotColor *new_color);
+
+ // getters
+ Ref getRef() const { return ref; }
+ AnnotSubtype getType() const { return type; }
+ PDFRectangle *getRect() const { return rect; }
+ GooString *getContents() const { return contents; }
+ Dict *getPageDict() const { return pageDict; }
+ GooString *getName() const { return name; }
+ GooString *getModified() const { return modified; }
+ Guint getFlags() const { return flags; }
+ /*Dict *getAppearDict() const { return appearDict; }*/
+ GooString *getAppearState() const { return appearState; }
+ AnnotBorder *getBorder() const { return border; }
+ AnnotColor *getColor() const { return color; }
+ int getTreeKey() const { return treeKey; }
+
+ int getId() { return ref.num; }
+
+private:
+ void readArrayNum(Object *pdfArray, int key, double *value);
+ // write vStr[i:j[ in appearBuf
+
+ void initialize (XRef *xrefA, Dict *dict, Catalog *catalog);
+
+
+protected:
+ void setColor(Array *a, GBool fill, int adjust);
+ void drawCircle(double cx, double cy, double r, GBool fill);
+ void drawCircleTopLeft(double cx, double cy, double r);
+ void drawCircleBottomRight(double cx, double cy, double r);
+
+ // Updates the field key of the annotation dictionary
+ // and sets M to the current time
+ void update(const char *key, Object *value);
+
+ Object annotObj;
+
+ // required data
+ AnnotSubtype type; // Annotation type
+ PDFRectangle *rect; // Rect
+
+ // optional data
+ GooString *contents; // Contents
+ Dict *pageDict; // P
+ GooString *name; // NM
+ GooString *modified; // M
+ Guint flags; // F (must be a 32 bit unsigned int)
+ //Dict *appearDict; // AP (should be correctly parsed)
+ Ref appRef; //the reference to the indirect appearance object in XRef
+ Object appearance; // a reference to the Form XObject stream
+ // for the normal appearance
+ GooString *appearState; // AS
+ int treeKey; // Struct Parent;
+ OCGs *optContentConfig; // Optional content config
+ Object oc; // OC
+
+ XRef *xref; // the xref table for this PDF file
+ Ref ref; // object ref identifying this annotation
+ GooString *appearBuf;
+ AnnotBorder *border; // Border, BS
+ AnnotColor *color; // C
+ double fontSize;
+ GBool ok;
+
+ bool hasRef;
+};
+
+//------------------------------------------------------------------------
+// AnnotPopup
+//------------------------------------------------------------------------
+
+class AnnotPopup: public Annot {
+public:
+ AnnotPopup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotPopup();
+
+ Object *getParent(Object *obj) { return parent.fetch (xref, obj); }
+ Object *getParentNF(Object *obj) { return &parent; }
+ void setParent(Object *parentA);
+ void setParent(Annot *parentA);
+ GBool getOpen() const { return open; }
+ void setOpen(GBool openA);
+
+protected:
+ void initialize(XRef *xrefA, Dict *dict, Catalog *catalog);
+
+ Object parent; // Parent
+ GBool open; // Open
+};
+
+//------------------------------------------------------------------------
+// AnnotMarkup
+//------------------------------------------------------------------------
+
+class AnnotMarkup: public Annot {
+public:
+ enum AnnotMarkupReplyType {
+ replyTypeR, // R
+ replyTypeGroup // Group
+ };
+
+ AnnotMarkup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ virtual ~AnnotMarkup();
+
+ // getters
+ GooString *getLabel() const { return label; }
+ AnnotPopup *getPopup() const { return popup; }
+ double getOpacity() const { return opacity; }
+ // getRC
+ GooString *getDate() const { return date; }
+ int getInReplyToID() const { return inReplyTo.num; }
+ GooString *getSubject() const { return subject; }
+ AnnotMarkupReplyType getReplyTo() const { return replyTo; }
+ AnnotExternalDataType getExData() const { return exData; }
+
+ // The annotation takes the ownership of new_popup
+ void setPopup(AnnotPopup *new_popup);
+ void setLabel(GooString *new_label);
+
+protected:
+ GooString *label; // T (Default autor)
+ AnnotPopup *popup; // Popup
+ double opacity; // CA (Default 1.0)
+ // RC
+ GooString *date; // CreationDate
+ Ref inReplyTo; // IRT
+ GooString *subject; // Subj
+ AnnotMarkupReplyType replyTo; // RT (Default R)
+ // this object is overrided by the custom intent fields defined in some
+ // annotation types.
+ //GooString *intent; // IT
+ AnnotExternalDataType exData; // ExData
+
+private:
+ void initialize(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+};
+
+//------------------------------------------------------------------------
+// AnnotText
+//------------------------------------------------------------------------
+
+class AnnotText: public AnnotMarkup {
+public:
+ enum AnnotTextState {
+ stateUnknown,
+ // Marked state model
+ stateMarked, // Marked
+ stateUnmarked, // Unmarked
+ // Review state model
+ stateAccepted, // Accepted
+ stateRejected, // Rejected
+ stateCancelled, // Cancelled
+ stateCompleted, // Completed
+ stateNone // None
+ };
+
+ AnnotText(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotText();
+
+ // getters
+ GBool getOpen() const { return open; }
+ GooString *getIcon() const { return icon; }
+ AnnotTextState getState() const { return state; }
+
+ void setOpen(GBool openA);
+ void setIcon(GooString *new_icon);
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ GBool open; // Open (Default false)
+ GooString *icon; // Name (Default Note)
+ AnnotTextState state; // State (Default Umarked if
+ // StateModel Marked
+ // None if StareModel Review)
+};
+
+//------------------------------------------------------------------------
+// AnnotMovie
+//------------------------------------------------------------------------
+
+
+
+class AnnotMovie: public Annot {
+ public:
+ enum PosterType {
+ posterTypeNone,
+ posterTypeStream,
+ posterTypeFromMovie
+ };
+
+ enum RepeatMode {
+ repeatModeOnce,
+ repeatModeOpen,
+ repeatModeRepeat,
+ repeatModePalindrome
+ };
+
+ struct Time {
+ Time() { units_per_second = 0; }
+ Gulong units;
+ int units_per_second; // 0 : defined by movie
+ };
+
+ AnnotMovie(XRef *xrefA, PDFRectangle *rect, Movie *movieA, Catalog *catalog);
+ AnnotMovie(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotMovie();
+
+ GooString* getTitle() { return title; }
+ GooString* getFileName() { return fileName; }
+ int getRotationAngle() { return rotationAngle; }
+
+ PosterType getPosterType() { return posterType; }
+ Stream* getPosterStream() { return posterStream; }
+
+ Time getStart() { return start; }
+ Time getDuration() { return duration; }
+ double getRate() { return rate; }
+ double getVolume() { return volume; }
+
+ GBool getShowControls() { return showControls; }
+ RepeatMode getRepeatMode() { return repeatMode; }
+ GBool getSynchronousPlay() { return synchronousPlay; }
+
+ GBool needFloatingWindow() { return hasFloatingWindow; }
+ GBool needFullscreen() { return isFullscreen; }
+
+
+ void getMovieSize(int& width, int& height);
+ void getZoomFactor(int& num, int& denum);
+ void getWindowPosition(double& x, double& y) { x = FWPosX; y = FWPosY; }
+
+ Movie* getMovie() { return movie; }
+
+ private:
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ GooString* title; // T
+ GooString* fileName; // Movie/F
+
+ int width; // Movie/Aspect
+ int height; // Movie/Aspect
+ int rotationAngle; // Movie/Rotate
+
+ PosterType posterType; // Movie/Poster
+ Stream* posterStream;
+
+ Time start; // A/Start
+ Time duration; // A/Duration
+ double rate; // A/Rate
+ double volume; // A/Volume
+
+ GBool showControls; // A/ShowControls
+
+ RepeatMode repeatMode; // A/Mode
+
+ GBool synchronousPlay; // A/Synchronous
+
+ // floating window
+ GBool hasFloatingWindow;
+ unsigned short FWScaleNum; // A/FWScale
+ unsigned short FWScaleDenum;
+ GBool isFullscreen;
+
+ double FWPosX; // A/FWPosition
+ double FWPosY;
+
+ Movie* movie;
+};
+
+
+//------------------------------------------------------------------------
+// AnnotScreen
+//------------------------------------------------------------------------
+
+class AnnotScreen: public Annot {
+ public:
+
+ AnnotScreen(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotScreen(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotScreen();
+
+ GooString* getTitle() { return title; }
+
+ AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; }
+ Object* getAction() { return &action; }
+ Object* getAdditionActions() { return &additionAction; }
+
+ private:
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+
+ GooString* title; // T
+
+ AnnotAppearanceCharacs* appearCharacs; // MK
+
+ Object action; // A
+ Object additionAction; // AA
+};
+
+//------------------------------------------------------------------------
+// AnnotLink
+//------------------------------------------------------------------------
+
+class AnnotLink: public Annot {
+public:
+
+ enum AnnotLinkEffect {
+ effectNone, // N
+ effectInvert, // I
+ effectOutline, // O
+ effectPush // P
+ };
+
+ AnnotLink(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotLink(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ virtual ~AnnotLink();
+
+ virtual void draw(Gfx *gfx, GBool printing);
+
+ // getters
+ Dict *getActionDict() const { return actionDict; }
+ Object *getDest() { return &dest; }
+ AnnotLinkEffect getLinkEffect() const { return linkEffect; }
+ Dict *getUriAction() const { return uriAction; }
+ AnnotQuadrilaterals *getQuadrilaterals() const { return quadrilaterals; }
+
+protected:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ Dict *actionDict; // A
+ Object dest; // Dest
+ AnnotLinkEffect linkEffect; // H (Default I)
+ Dict *uriAction; // PA
+
+ AnnotQuadrilaterals *quadrilaterals; // QuadPoints
+};
+
+//------------------------------------------------------------------------
+// AnnotFreeText
+//------------------------------------------------------------------------
+
+class AnnotFreeText: public AnnotMarkup {
+public:
+
+ enum AnnotFreeTextQuadding {
+ quaddingLeftJustified, // 0
+ quaddingCentered, // 1
+ quaddingRightJustified // 2
+ };
+
+ enum AnnotFreeTextIntent {
+ intentFreeText, // FreeText
+ intentFreeTextCallout, // FreeTextCallout
+ intentFreeTextTypeWriter // FreeTextTypeWriter
+ };
+
+ AnnotFreeText(XRef *xrefA, PDFRectangle *rect, GooString *da, Catalog *catalog);
+ AnnotFreeText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotFreeText();
+
+ // getters
+ GooString *getAppearanceString() const { return appearanceString; }
+ AnnotFreeTextQuadding getQuadding() const { return quadding; }
+ // return rc
+ GooString *getStyleString() const { return styleString; }
+ AnnotCalloutLine *getCalloutLine() const { return calloutLine; }
+ AnnotFreeTextIntent getIntent() const { return intent; }
+ AnnotBorderEffect *getBorderEffect() const { return borderEffect; }
+ PDFRectangle *getRectangle() const { return rectangle; }
+ AnnotLineEndingStyle getEndStyle() const { return endStyle; }
+
+protected:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ GooString *appearanceString; // DA
+
+ // optional
+ AnnotFreeTextQuadding quadding; // Q (Default 0)
+ // RC
+ GooString *styleString; // DS
+ AnnotCalloutLine *calloutLine; // CL
+ AnnotFreeTextIntent intent; // IT
+ AnnotBorderEffect *borderEffect; // BE
+ PDFRectangle *rectangle; // RD
+ // inherited from Annot
+ // AnnotBorderBS border; // BS
+ AnnotLineEndingStyle endStyle; // LE (Default None)
+};
+
+//------------------------------------------------------------------------
+// AnnotLine
+//------------------------------------------------------------------------
+
+class AnnotLine: public AnnotMarkup {
+public:
+
+ enum AnnotLineIntent {
+ intentLineArrow, // LineArrow
+ intentLineDimension // LineDimension
+ };
+
+ enum AnnotLineCaptionPos {
+ captionPosInline, // Inline
+ captionPosTop // Top
+ };
+
+ AnnotLine(XRef *xrefA, PDFRectangle *rect, PDFRectangle *lRect, Catalog *catalog);
+ AnnotLine(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotLine();
+
+ // getters
+ AnnotLineEndingStyle getStartStyle() const { return startStyle; }
+ AnnotLineEndingStyle getEndStyle() const { return endStyle; }
+ AnnotColor *getInteriorColor() const { return interiorColor; }
+ double getLeaderLineLength() const { return leaderLineLength; }
+ double getLeaderLineExtension() const { return leaderLineExtension; }
+ bool getCaption() const { return caption; }
+ AnnotLineIntent getIntent() const { return intent; }
+ double getLeaderLineOffset() const { return leaderLineOffset; }
+ AnnotLineCaptionPos getCaptionPos() const { return captionPos; }
+ Dict *getMeasure() const { return measure; }
+ double getCaptionTextHorizontal() const { return captionTextHorizontal; }
+ double getCaptionTextVertical() const { return captionTextVertical; }
+ double getX1() const { return coord1->getX(); }
+ double getY1() const { return coord1->getY(); }
+ double getX2() const { return coord2->getX(); }
+ double getY2() const { return coord2->getY(); }
+
+protected:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ AnnotCoord *coord1, *coord2;
+
+ // optional
+ // inherited from Annot
+ // AnnotBorderBS border; // BS
+ AnnotLineEndingStyle startStyle; // LE (Default [/None /None])
+ AnnotLineEndingStyle endStyle; //
+ AnnotColor *interiorColor; // IC
+ double leaderLineLength; // LL (Default 0)
+ double leaderLineExtension; // LLE (Default 0)
+ bool caption; // Cap (Default false)
+ AnnotLineIntent intent; // IT
+ double leaderLineOffset; // LLO
+ AnnotLineCaptionPos captionPos; // CP (Default Inline)
+ Dict *measure; // Measure
+ double captionTextHorizontal; // CO (Default [0, 0])
+ double captionTextVertical; //
+};
+
+//------------------------------------------------------------------------
+// AnnotTextMarkup
+//------------------------------------------------------------------------
+
+class AnnotTextMarkup: public AnnotMarkup {
+public:
+
+ AnnotTextMarkup(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType,
+ AnnotQuadrilaterals *quadPoints, Catalog *catalog);
+ AnnotTextMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ virtual ~AnnotTextMarkup();
+
+ AnnotQuadrilaterals *getQuadrilaterals() const { return quadrilaterals; }
+
+protected:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ AnnotQuadrilaterals *quadrilaterals; // QuadPoints
+};
+
+//------------------------------------------------------------------------
+// AnnotStamp
+//------------------------------------------------------------------------
+
+class AnnotStamp: public AnnotMarkup {
+public:
+
+ AnnotStamp(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotStamp(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotStamp();
+
+ // getters
+ GooString *getIcon() const { return icon; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ GooString *icon; // Name (Default Draft)
+};
+
+//------------------------------------------------------------------------
+// AnnotGeometry
+//------------------------------------------------------------------------
+
+class AnnotGeometry: public AnnotMarkup {
+public:
+
+ AnnotGeometry(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, Catalog *catalog);
+ AnnotGeometry(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotGeometry();
+
+ // getters
+ AnnotColor *getInteriorColor() const { return interiorColor; }
+ AnnotBorderEffect *getBorderEffect() const { return borderEffect; }
+ PDFRectangle *getGeometryRect() const { return geometryRect; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ AnnotColor *interiorColor; // IC
+ AnnotBorderEffect *borderEffect; // BE
+ PDFRectangle *geometryRect; // RD (combined with Rect)
+};
+
+//------------------------------------------------------------------------
+// AnnotPolygon
+//------------------------------------------------------------------------
+
+class AnnotPolygon: public AnnotMarkup {
+public:
+
+ enum AnnotPolygonIntent {
+ polygonCloud, // PolygonCloud
+ polylineDimension, // PolyLineDimension
+ polygonDimension // PolygonDimension
+ };
+
+ AnnotPolygon(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType,
+ AnnotPath *path, Catalog *catalog);
+ AnnotPolygon(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotPolygon();
+
+ // getters
+ AnnotPath *getVertices() const { return vertices; }
+ AnnotLineEndingStyle getStartStyle() const { return startStyle; }
+ AnnotLineEndingStyle getEndStyle() const { return endStyle; }
+ AnnotColor *getInteriorColor() const { return interiorColor; }
+ AnnotBorderEffect *getBorderEffect() const { return borderEffect; }
+ AnnotPolygonIntent getIntent() const { return intent; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ AnnotPath *vertices; // Vertices
+
+ // optional
+ AnnotLineEndingStyle startStyle; // LE (Default [/None /None])
+ AnnotLineEndingStyle endStyle; //
+ // inherited from Annot
+ // AnnotBorderBS border; // BS
+ AnnotColor *interiorColor; // IC
+ AnnotBorderEffect *borderEffect; // BE
+ AnnotPolygonIntent intent; // IT
+ // Measure
+};
+
+//------------------------------------------------------------------------
+// AnnotCaret
+//------------------------------------------------------------------------
+
+class AnnotCaret: public AnnotMarkup {
+public:
+
+ enum AnnotCaretSymbol {
+ symbolNone, // None
+ symbolP // P
+ };
+
+ AnnotCaret(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ AnnotCaret(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotCaret();
+
+ // getters
+ AnnotCaretSymbol getSymbol() const { return symbol; }
+ PDFRectangle *getCaretRect() const { return caretRect; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ AnnotCaretSymbol symbol; // Sy (Default None)
+ PDFRectangle *caretRect; // RD (combined with Rect)
+};
+
+//------------------------------------------------------------------------
+// AnnotInk
+//------------------------------------------------------------------------
+
+class AnnotInk: public AnnotMarkup {
+public:
+
+ AnnotInk(XRef *xrefA, PDFRectangle *rect, AnnotPath **paths, int n_paths, Catalog *catalog);
+ AnnotInk(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotInk();
+
+ // getters
+ AnnotPath **getInkList() const { return inkList; }
+ int getInkListLength() const { return inkListLength; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ AnnotPath **inkList; // InkList
+ int inkListLength;
+
+ // optional
+ // inherited from Annot
+ // AnnotBorderBS border; // BS
+};
+
+//------------------------------------------------------------------------
+// AnnotFileAttachment
+//------------------------------------------------------------------------
+
+class AnnotFileAttachment: public AnnotMarkup {
+public:
+
+ AnnotFileAttachment(XRef *xrefA, PDFRectangle *rect, GooString *filename, Catalog *catalog);
+ AnnotFileAttachment(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotFileAttachment();
+
+ // getters
+ Object *getFile() { return &file; }
+ GooString *getName() const { return name; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ Object file; // FS
+
+ // optional
+ GooString *name; // Name
+};
+
+//------------------------------------------------------------------------
+// AnnotSound
+//------------------------------------------------------------------------
+
+class AnnotSound: public AnnotMarkup {
+public:
+
+ AnnotSound(XRef *xrefA, PDFRectangle *rect, Sound *soundA, Catalog *catalog);
+ AnnotSound(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~AnnotSound();
+
+ // getters
+ Sound *getSound() { return sound; }
+ GooString *getName() const { return name; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ // required
+ Sound *sound; // Sound
+
+ // optional
+ GooString *name; // Name
+};
+
+//------------------------------------------------------------------------
+// AnnotWidget
+//------------------------------------------------------------------------
+
+class AnnotWidget: public Annot {
+public:
+
+ enum AnnotWidgetHighlightMode {
+ highlightModeNone, // N
+ highlightModeInvert, // I
+ highlightModeOutline, // O
+ highlightModePush // P,T
+ };
+
+ AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ virtual ~AnnotWidget();
+
+ virtual void draw(Gfx *gfx, GBool printing);
+
+ void generateFieldAppearance ();
+
+ AnnotWidgetHighlightMode getMode() { return mode; }
+ AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; }
+ Dict *getAction() { return action; }
+ Dict *getAdditionActions() { return additionActions; }
+ Dict *getParent() { return parent; }
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ void drawText(GooString *text, GooString *da, GfxFontDict *fontDict,
+ GBool multiline, int comb, int quadding,
+ GBool txField, GBool forceZapfDingbats,
+ GBool password=false);
+ void drawListBox(GooString **text, GBool *selection,
+ int nOptions, int topIdx,
+ GooString *da, GfxFontDict *fontDict, GBool quadding);
+ void layoutText(GooString *text, GooString *outBuf, int *i, GfxFont *font,
+ double *width, double widthLimit, int *charCount,
+ GBool noReencode);
+ void writeString(GooString *str, GooString *appearBuf);
+
+ Form *form;
+ FormWidget *widget; // FormWidget object for this annotation
+ AnnotWidgetHighlightMode mode; // H (Default I)
+ AnnotAppearanceCharacs *appearCharacs; // MK
+ Dict *action; // A
+ Dict *additionActions; // AA
+ // inherited from Annot
+ // AnnotBorderBS border; // BS
+ Dict *parent; // Parent
+ GBool regen;
+ GBool addDingbatsResource;
+};
+
+//------------------------------------------------------------------------
+// Annot3D
+//------------------------------------------------------------------------
+
+class Annot3D: public Annot {
+ class Activation {
+ public:
+ enum ActivationATrigger {
+ aTriggerUnknown,
+ aTriggerPageOpened, // PO
+ aTriggerPageVisible, // PV
+ aTriggerUserAction // XA
+ };
+
+ enum ActivationAState {
+ aStateUnknown,
+ aStateEnabled, // I
+ aStateDisabled // L
+ };
+
+ enum ActivationDTrigger {
+ dTriggerUnknown,
+ dTriggerPageClosed, // PC
+ dTriggerPageInvisible, // PI
+ dTriggerUserAction // XD
+ };
+
+ enum ActivationDState {
+ dStateUnknown,
+ dStateUninstantiaded, // U
+ dStateInstantiated, // I
+ dStateLive // L
+ };
+
+ Activation(Dict *dict);
+ private:
+
+ ActivationATrigger aTrigger; // A (Default XA)
+ ActivationAState aState; // AIS (Default L)
+ ActivationDTrigger dTrigger; // D (Default PI)
+ ActivationDState dState; // DIS (Default U)
+ GBool displayToolbar; // TB (Default true)
+ GBool displayNavigation; // NP (Default false);
+ };
+public:
+
+ Annot3D(XRef *xrefA, PDFRectangle *rect, Catalog *catalog);
+ Annot3D(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
+ ~Annot3D();
+
+ // getters
+
+private:
+
+ void initialize(XRef *xrefA, Catalog *catalog, Dict *dict);
+
+ Activation *activation; // 3DA
+};
+
+//------------------------------------------------------------------------
+// Annots
+//------------------------------------------------------------------------
+
+class Annots {
+public:
+
+ // Build a list of Annot objects.
+ Annots(XRef *xref, Catalog *catalog, Object *annotsObj);
+
+ ~Annots();
+
+ // Iterate through list of annotations.
+ int getNumAnnots() { return nAnnots; }
+ Annot *getAnnot(int i) { return annots[i]; }
+
+private:
+ Annot* createAnnot(XRef *xref, Dict* dict, Catalog *catalog, Object *obj);
+ Annot *findAnnot(Ref *ref);
+
+ Annot **annots;
+ int nAnnots;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.cc
new file mode 100644
index 00000000000..e7ec4e7dc5f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.cc
@@ -0,0 +1,102 @@
+//========================================================================
+//
+// Array.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include "goo/gmem.h"
+#include "Object.h"
+#include "Array.h"
+
+//------------------------------------------------------------------------
+// Array
+//------------------------------------------------------------------------
+
+Array::Array(XRef *xrefA) {
+ xref = xrefA;
+ elems = NULL;
+ size = length = 0;
+ ref = 1;
+}
+
+Array::~Array() {
+ int i;
+
+ for (i = 0; i < length; ++i)
+ elems[i].free();
+ gfree(elems);
+}
+
+void Array::add(Object *elem) {
+ if (length == size) {
+ if (length == 0) {
+ size = 8;
+ } else {
+ size *= 2;
+ }
+ elems = (Object *)greallocn(elems, size, sizeof(Object));
+ }
+ elems[length] = *elem;
+ ++length;
+}
+
+Object *Array::get(int i, Object *obj) {
+ if (i < 0 || i >= length) {
+#ifdef DEBUG_MEM
+ abort();
+#else
+ return obj->initNull();
+#endif
+ }
+ return elems[i].fetch(xref, obj);
+}
+
+Object *Array::getNF(int i, Object *obj) {
+ if (i < 0 || i >= length) {
+#ifdef DEBUG_MEM
+ abort();
+#else
+ return obj->initNull();
+#endif
+ }
+ return elems[i].copy(obj);
+}
+
+GBool Array::getString(int i, GooString *string)
+{
+ Object obj;
+
+ if (getNF(i, &obj)->isString()) {
+ string->clear();
+ string->append(obj.getString());
+ obj.free();
+ return gTrue;
+ } else {
+ obj.free();
+ return gFalse;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.h
new file mode 100644
index 00000000000..a6aca260b9f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Array.h
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// Array.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef ARRAY_H
+#define ARRAY_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+
+class XRef;
+
+//------------------------------------------------------------------------
+// Array
+//------------------------------------------------------------------------
+
+class Array {
+public:
+
+ // Constructor.
+ Array(XRef *xrefA);
+
+ // Destructor.
+ ~Array();
+
+ // Reference counting.
+ int incRef() { return ++ref; }
+ int decRef() { return --ref; }
+
+ // Get number of elements.
+ int getLength() { return length; }
+
+ // Add an element.
+ void add(Object *elem);
+
+ // Accessors.
+ Object *get(int i, Object *obj);
+ Object *getNF(int i, Object *obj);
+ GBool getString(int i, GooString *string);
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Object *elems; // array of elements
+ int size; // size of <elems> array
+ int length; // number of elements in array
+ int ref; // reference count
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.cc
new file mode 100644
index 00000000000..fbc8b01e2bc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.cc
@@ -0,0 +1,819 @@
+//========================================================================
+//
+// ArthurOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include <math.h>
+
+#include "goo/gfile.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "Object.h"
+#include "GfxState.h"
+#include "GfxFont.h"
+#include "Link.h"
+#include "CharCodeToUnicode.h"
+#include "FontEncodingTables.h"
+#include <fofi/FoFiTrueType.h>
+#include "ArthurOutputDev.h"
+
+#include <QtCore/QtDebug>
+#include <QtGui/QPainterPath>
+//------------------------------------------------------------------------
+
+#include "splash/SplashFontFileID.h"
+#include "splash/SplashFontFile.h"
+#include "splash/SplashFontEngine.h"
+#include "splash/SplashFont.h"
+#include "splash/SplashMath.h"
+#include "splash/SplashPath.h"
+#include "splash/SplashGlyphBitmap.h"
+//------------------------------------------------------------------------
+// SplashOutFontFileID
+//------------------------------------------------------------------------
+
+class SplashOutFontFileID: public SplashFontFileID {
+public:
+
+ SplashOutFontFileID(Ref *rA) { r = *rA; }
+
+ ~SplashOutFontFileID() {}
+
+ GBool matches(SplashFontFileID *id) {
+ return ((SplashOutFontFileID *)id)->r.num == r.num &&
+ ((SplashOutFontFileID *)id)->r.gen == r.gen;
+ }
+
+private:
+
+ Ref r;
+};
+
+
+
+//------------------------------------------------------------------------
+// ArthurOutputDev
+//------------------------------------------------------------------------
+
+ArthurOutputDev::ArthurOutputDev(QPainter *painter):
+ m_painter(painter)
+{
+ m_currentBrush = QBrush(Qt::SolidPattern);
+ m_fontEngine = 0;
+ m_font = 0;
+ m_image = 0;
+}
+
+ArthurOutputDev::~ArthurOutputDev()
+{
+ delete m_fontEngine;
+}
+
+void ArthurOutputDev::startDoc(XRef *xrefA) {
+ xref = xrefA;
+ delete m_fontEngine;
+ m_fontEngine = new SplashFontEngine(
+#if HAVE_T1LIB_H
+ globalParams->getEnableT1lib(),
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ globalParams->getEnableFreeType(),
+ gFalse,
+#endif
+ m_painter->testRenderHint(QPainter::TextAntialiasing));
+}
+
+void ArthurOutputDev::startPage(int pageNum, GfxState *state)
+{
+ // fill page with white background.
+ int w = static_cast<int>(state->getPageWidth());
+ int h = static_cast<int>(state->getPageHeight());
+ QColor fillColour(Qt::white);
+ QBrush fill(fillColour);
+ m_painter->save();
+ m_painter->setPen(fillColour);
+ m_painter->setBrush(fill);
+ m_painter->drawRect(0, 0, w, h);
+ m_painter->restore();
+}
+
+void ArthurOutputDev::endPage() {
+}
+
+void ArthurOutputDev::drawLink(Link *link, Catalog *catalog)
+{
+}
+
+void ArthurOutputDev::saveState(GfxState *state)
+{
+ m_painter->save();
+}
+
+void ArthurOutputDev::restoreState(GfxState *state)
+{
+ m_painter->restore();
+}
+
+void ArthurOutputDev::updateAll(GfxState *state)
+{
+ OutputDev::updateAll(state);
+ m_needFontUpdate = gTrue;
+}
+
+// This looks wrong - why aren't adjusting the matrix?
+void ArthurOutputDev::updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22,
+ double m31, double m32)
+{
+ updateLineDash(state);
+ updateLineJoin(state);
+ updateLineCap(state);
+ updateLineWidth(state);
+}
+
+void ArthurOutputDev::updateLineDash(GfxState *state)
+{
+ // qDebug() << "updateLineDash";
+}
+
+void ArthurOutputDev::updateFlatness(GfxState *state)
+{
+ // qDebug() << "updateFlatness";
+}
+
+void ArthurOutputDev::updateLineJoin(GfxState *state)
+{
+ switch (state->getLineJoin()) {
+ case 0:
+ m_currentPen.setJoinStyle(Qt::MiterJoin);
+ break;
+ case 1:
+ m_currentPen.setJoinStyle(Qt::RoundJoin);
+ break;
+ case 2:
+ m_currentPen.setJoinStyle(Qt::BevelJoin);
+ break;
+ }
+ m_painter->setPen(m_currentPen);
+}
+
+void ArthurOutputDev::updateLineCap(GfxState *state)
+{
+ switch (state->getLineCap()) {
+ case 0:
+ m_currentPen.setCapStyle(Qt::FlatCap);
+ break;
+ case 1:
+ m_currentPen.setCapStyle(Qt::RoundCap);
+ break;
+ case 2:
+ m_currentPen.setCapStyle(Qt::SquareCap);
+ break;
+ }
+ m_painter->setPen(m_currentPen);
+}
+
+void ArthurOutputDev::updateMiterLimit(GfxState *state)
+{
+ // We can't do mitre (or Miter) limit with Qt4 yet.
+ // the limit is in state->getMiterLimit() when we get there
+}
+
+void ArthurOutputDev::updateLineWidth(GfxState *state)
+{
+ m_currentPen.setWidthF(state->getTransformedLineWidth());
+ m_painter->setPen(m_currentPen);
+}
+
+void ArthurOutputDev::updateFillColor(GfxState *state)
+{
+ GfxRGB rgb;
+ QColor brushColour = m_currentBrush.color();
+ state->getFillRGB(&rgb);
+ brushColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), brushColour.alphaF());
+ m_currentBrush.setColor(brushColour);
+}
+
+void ArthurOutputDev::updateStrokeColor(GfxState *state)
+{
+ GfxRGB rgb;
+ QColor penColour = m_currentPen.color();
+ state->getStrokeRGB(&rgb);
+ penColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), penColour.alphaF());
+ m_currentPen.setColor(penColour);
+ m_painter->setPen(m_currentPen);
+}
+
+void ArthurOutputDev::updateFillOpacity(GfxState *state)
+{
+ QColor brushColour= m_currentBrush.color();
+ brushColour.setAlphaF(state->getFillOpacity());
+ m_currentBrush.setColor(brushColour);
+}
+
+void ArthurOutputDev::updateStrokeOpacity(GfxState *state)
+{
+ QColor penColour= m_currentPen.color();
+ penColour.setAlphaF(state->getStrokeOpacity());
+ m_currentPen.setColor(penColour);
+ m_painter->setPen(m_currentPen);
+}
+
+void ArthurOutputDev::updateFont(GfxState *state)
+{
+ GfxFont *gfxFont;
+ GfxFontType fontType;
+ SplashOutFontFileID *id;
+ SplashFontFile *fontFile;
+ SplashFontSrc *fontsrc;
+ FoFiTrueType *ff;
+ Ref embRef;
+ Object refObj, strObj;
+ GooString *fileName;
+ char *tmpBuf;
+ int tmpBufLen;
+ Gushort *codeToGID;
+ DisplayFontParam *dfp;
+ double *textMat;
+ double m11, m12, m21, m22, fontSize;
+ SplashCoord mat[4];
+ int substIdx, n;
+ int faceIndex = 0;
+ SplashCoord matrix[6];
+
+ m_needFontUpdate = false;
+ m_font = NULL;
+ fileName = NULL;
+ tmpBuf = NULL;
+ substIdx = -1;
+
+ if (!(gfxFont = state->getFont())) {
+ goto err1;
+ }
+ fontType = gfxFont->getType();
+ if (fontType == fontType3) {
+ goto err1;
+ }
+
+ // check the font file cache
+ id = new SplashOutFontFileID(gfxFont->getID());
+ if ((fontFile = m_fontEngine->getFontFile(id))) {
+ delete id;
+
+ } else {
+
+ // if there is an embedded font, write it to disk
+ if (gfxFont->getEmbeddedFontID(&embRef)) {
+ tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
+ if (! tmpBuf)
+ goto err2;
+ // if there is an external font file, use it
+ } else if (!(fileName = gfxFont->getExtFontFile())) {
+
+ // look for a display font mapping or a substitute font
+ dfp = NULL;
+ if (gfxFont->getName()) {
+ dfp = globalParams->getDisplayFont(gfxFont);
+ }
+ if (!dfp) {
+ error(-1, "Couldn't find a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ switch (dfp->kind) {
+ case displayFontT1:
+ fileName = dfp->t1.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1;
+ break;
+ case displayFontTT:
+ fileName = dfp->tt.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType;
+ faceIndex = dfp->tt.faceIndex;
+ break;
+ }
+ }
+
+ fontsrc = new SplashFontSrc;
+ if (fileName)
+ fontsrc->setFile(fileName, gFalse);
+ else
+ fontsrc->setBuf(tmpBuf, tmpBufLen, gFalse);
+
+ // load the font file
+ switch (fontType) {
+ case fontType1:
+ if (!(fontFile = m_fontEngine->loadType1Font(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontType1C:
+ if (!(fontFile = m_fontEngine->loadType1CFont(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontType1COT:
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontTrueType:
+ case fontTrueTypeOT:
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+ if (ff) {
+ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+ n = 256;
+ delete ff;
+ } else {
+ codeToGID = NULL;
+ n = 0;
+ }
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(
+ id,
+ fontsrc,
+ codeToGID, n))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType0:
+ case fontCIDType0C:
+ if (!(fontFile = m_fontEngine->loadCIDFont(
+ id,
+ fontsrc))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType0COT:
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(
+ id,
+ fontsrc))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType2:
+ case fontCIDType2OT:
+ codeToGID = NULL;
+ n = 0;
+ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
+ n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
+ if (n) {
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
+ n * sizeof(Gushort));
+ }
+ } else {
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+ if (! ff)
+ goto err2;
+ codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
+ delete ff;
+ }
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(
+ id,
+ fontsrc,
+ codeToGID, n, faceIndex))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ default:
+ // this shouldn't happen
+ goto err2;
+ }
+ }
+
+ // get the font matrix
+ textMat = state->getTextMat();
+ fontSize = state->getFontSize();
+ m11 = textMat[0] * fontSize * state->getHorizScaling();
+ m12 = textMat[1] * fontSize * state->getHorizScaling();
+ m21 = textMat[2] * fontSize;
+ m22 = textMat[3] * fontSize;
+
+ {
+ QMatrix painterMatrix = m_painter->worldMatrix();
+ matrix[0] = painterMatrix.m11();
+ matrix[1] = painterMatrix.m12();
+ matrix[2] = painterMatrix.m21();
+ matrix[3] = painterMatrix.m22();
+ matrix[4] = painterMatrix.dx();
+ matrix[5] = painterMatrix.dy();
+ }
+
+ // create the scaled font
+ mat[0] = m11; mat[1] = -m12;
+ mat[2] = m21; mat[3] = -m22;
+ m_font = m_fontEngine->getFont(fontFile, mat, matrix);
+
+ return;
+
+ err2:
+ delete id;
+ err1:
+ return;
+}
+
+static QPainterPath convertPath(GfxState *state, GfxPath *path, Qt::FillRule fillRule)
+{
+ GfxSubpath *subpath;
+ double x1, y1, x2, y2, x3, y3;
+ int i, j;
+
+ QPainterPath qPath;
+ qPath.setFillRule(fillRule);
+ for (i = 0; i < path->getNumSubpaths(); ++i) {
+ subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0) {
+ state->transform(subpath->getX(0), subpath->getY(0), &x1, &y1);
+ qPath.moveTo(x1, y1);
+ j = 1;
+ while (j < subpath->getNumPoints()) {
+ if (subpath->getCurve(j)) {
+ state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
+ state->transform(subpath->getX(j+1), subpath->getY(j+1), &x2, &y2);
+ state->transform(subpath->getX(j+2), subpath->getY(j+2), &x3, &y3);
+ qPath.cubicTo( x1, y1, x2, y2, x3, y3);
+ j += 3;
+ } else {
+ state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
+ qPath.lineTo(x1, y1);
+ ++j;
+ }
+ }
+ if (subpath->isClosed()) {
+ qPath.closeSubpath();
+ }
+ }
+ }
+ return qPath;
+}
+
+void ArthurOutputDev::stroke(GfxState *state)
+{
+ m_painter->drawPath( convertPath( state, state->getPath(), Qt::OddEvenFill ) );
+}
+
+void ArthurOutputDev::fill(GfxState *state)
+{
+ m_painter->fillPath( convertPath( state, state->getPath(), Qt::WindingFill ), m_currentBrush );
+}
+
+void ArthurOutputDev::eoFill(GfxState *state)
+{
+ m_painter->fillPath( convertPath( state, state->getPath(), Qt::OddEvenFill ), m_currentBrush );
+}
+
+void ArthurOutputDev::clip(GfxState *state)
+{
+ m_painter->setClipPath(convertPath( state, state->getPath(), Qt::WindingFill ) );
+}
+
+void ArthurOutputDev::eoClip(GfxState *state)
+{
+ m_painter->setClipPath(convertPath( state, state->getPath(), Qt::OddEvenFill ) );
+}
+
+void ArthurOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen) {
+ double x1, y1;
+// SplashPath *path;
+ int render;
+
+ if (m_needFontUpdate) {
+ updateFont(state);
+ }
+ if (!m_font) {
+ return;
+ }
+
+ // check for invisible text -- this is used by Acrobat Capture
+ render = state->getRender();
+ if (render == 3) {
+ return;
+ }
+
+ x -= originX;
+ y -= originY;
+ state->transform(x, y, &x1, &y1);
+
+ // fill
+ if (!(render & 1)) {
+ int x0, y0, xFrac, yFrac;
+
+ x0 = static_cast<int>(floor(x1));
+ xFrac = splashFloor((x1 - x0) * splashFontFraction);
+ y0 = static_cast<int>(floor(y1));
+ yFrac = splashFloor((y1 - y0) * splashFontFraction);
+ SplashPath * fontPath;
+ fontPath = m_font->getGlyphPath(code);
+ if (fontPath) {
+ QPainterPath qPath;
+ qPath.setFillRule(Qt::WindingFill);
+ for (int i = 0; i < fontPath->length; ++i) {
+ if (fontPath->flags[i] & splashPathFirst) {
+ qPath.moveTo(fontPath->pts[i].x+x0, fontPath->pts[i].y+y0);
+ } else if (fontPath->flags[i] & splashPathCurve) {
+ qPath.quadTo(fontPath->pts[i].x+x0, fontPath->pts[i].y+y0,
+ fontPath->pts[i+1].x+x0, fontPath->pts[i+1].y+y0);
+ ++i;
+ }
+#ifdef __GNUC__
+#warning FIX THIS
+#endif
+// else if (fontPath->flags[i] & splashPathArcCW) {
+// qDebug() << "Need to implement arc";
+// }
+ else {
+ qPath.lineTo(fontPath->pts[i].x+x0, fontPath->pts[i].y+y0);
+ }
+ if (fontPath->flags[i] & splashPathLast) {
+ qPath.closeSubpath();
+ }
+ }
+ m_painter->save();
+ GfxRGB rgb;
+ QColor brushColour = m_currentBrush.color();
+ state->getFillRGB(&rgb);
+ brushColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), state->getFillOpacity());
+ m_painter->setBrush(brushColour);
+ QColor penColour = m_currentPen.color();
+ state->getStrokeRGB(&rgb);
+ penColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), state->getStrokeOpacity());
+ m_painter->setPen(penColour);
+ m_painter->drawPath( qPath );
+ m_painter->restore();
+ }
+ }
+
+ // stroke
+ if ((render & 3) == 1 || (render & 3) == 2) {
+ qDebug() << "no stroke";
+ /*
+ if ((path = m_font->getGlyphPath(code))) {
+ path->offset((SplashCoord)x1, (SplashCoord)y1);
+ splash->stroke(path);
+ delete path;
+ }
+ */
+ }
+
+ // clip
+ if (render & 4) {
+ qDebug() << "no clip";
+ /*
+ path = m_font->getGlyphPath(code);
+ path->offset((SplashCoord)x1, (SplashCoord)y1);
+ if (textClipPath) {
+ textClipPath->append(path);
+ delete path;
+ } else {
+ textClipPath = path;
+ }
+ */
+ }
+}
+
+GBool ArthurOutputDev::beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen)
+{
+ return gFalse;
+}
+
+void ArthurOutputDev::endType3Char(GfxState *state)
+{
+}
+
+void ArthurOutputDev::type3D0(GfxState *state, double wx, double wy)
+{
+}
+
+void ArthurOutputDev::type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury)
+{
+}
+
+void ArthurOutputDev::endTextObject(GfxState *state)
+{
+}
+
+
+void ArthurOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg)
+{
+ qDebug() << "drawImageMask";
+#if 0
+ unsigned char *buffer;
+ unsigned char *dest;
+ cairo_surface_t *image;
+ cairo_pattern_t *pattern;
+ int x, y;
+ ImageStream *imgStr;
+ Guchar *pix;
+ double *ctm;
+ cairo_matrix_t matrix;
+ int invert_bit;
+ int row_stride;
+
+ row_stride = (width + 3) & ~3;
+ buffer = (unsigned char *) malloc (height * row_stride);
+ if (buffer == NULL) {
+ error(-1, "Unable to allocate memory for image.");
+ return;
+ }
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width, 1, 1);
+ imgStr->reset();
+
+ invert_bit = invert ? 1 : 0;
+
+ for (y = 0; y < height; y++) {
+ pix = imgStr->getLine();
+ dest = buffer + y * row_stride;
+ for (x = 0; x < width; x++) {
+
+ if (pix[x] ^ invert_bit)
+ *dest++ = 0;
+ else
+ *dest++ = 255;
+ }
+ }
+
+ image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_A8,
+ width, height, row_stride);
+ if (image == NULL)
+ return;
+ pattern = cairo_pattern_create_for_surface (image);
+ if (pattern == NULL)
+ return;
+
+ ctm = state->getCTM();
+ LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n",
+ width, height, ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]));
+ matrix.xx = ctm[0] / width;
+ matrix.xy = -ctm[2] / height;
+ matrix.yx = ctm[1] / width;
+ matrix.yy = -ctm[3] / height;
+ matrix.x0 = ctm[2] + ctm[4];
+ matrix.y0 = ctm[3] + ctm[5];
+ cairo_matrix_invert (&matrix);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ cairo_pattern_set_filter (pattern, CAIRO_FILTER_BEST);
+ /* FIXME: Doesn't the image mask support any colorspace? */
+ cairo_set_source_rgb (cairo, fill_color.r, fill_color.g, fill_color.b);
+ cairo_mask (cairo, pattern);
+
+ cairo_pattern_destroy (pattern);
+ cairo_surface_destroy (image);
+ free (buffer);
+ imgStr->close ();
+ delete imgStr;
+#endif
+}
+
+//TODO: lots more work here.
+void ArthurOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg)
+{
+ unsigned char *buffer;
+ unsigned int *dest;
+ int x, y;
+ ImageStream *imgStr;
+ Guchar *pix;
+ int i;
+ double *ctm;
+ QMatrix matrix;
+ int is_identity_transform;
+
+ buffer = (unsigned char *)gmallocn3(width, height, 4);
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ /* ICCBased color space doesn't do any color correction
+ * so check its underlying color space as well */
+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
+ (colorMap->getColorSpace()->getMode() == csICCBased &&
+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
+
+ if (maskColors) {
+ for (y = 0; y < height; y++) {
+ dest = (unsigned int *) (buffer + y * 4 * width);
+ pix = imgStr->getLine();
+ colorMap->getRGBLine (pix, dest, width);
+
+ for (x = 0; x < width; x++) {
+ for (i = 0; i < colorMap->getNumPixelComps(); ++i) {
+
+ if (pix[i] < maskColors[2*i] * 255||
+ pix[i] > maskColors[2*i+1] * 255) {
+ *dest = *dest | 0xff000000;
+ break;
+ }
+ }
+ pix += colorMap->getNumPixelComps();
+ dest++;
+ }
+ }
+
+ m_image = new QImage(buffer, width, height, QImage::Format_ARGB32);
+ }
+ else {
+ for (y = 0; y < height; y++) {
+ dest = (unsigned int *) (buffer + y * 4 * width);
+ pix = imgStr->getLine();
+ colorMap->getRGBLine (pix, dest, width);
+ }
+
+ m_image = new QImage(buffer, width, height, QImage::Format_RGB32);
+ }
+
+ if (m_image == NULL || m_image->isNull()) {
+ qDebug() << "Null image";
+ delete imgStr;
+ return;
+ }
+ ctm = state->getCTM();
+ matrix.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
+
+ m_painter->setMatrix(matrix, true);
+ m_painter->drawImage( QPoint(0,0), *m_image );
+ delete m_image;
+ m_image = 0;
+ free (buffer);
+ delete imgStr;
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.h
new file mode 100644
index 00000000000..1b80088da89
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ArthurOutputDev.h
@@ -0,0 +1,159 @@
+//========================================================================
+//
+// ArthurOutputDev.h
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef ARTHUROUTPUTDEV_H
+#define ARTHUROUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "OutputDev.h"
+#include "GfxState.h"
+
+#include <QtGui/QPainter>
+
+class GfxState;
+class GfxPath;
+class Gfx8BitFont;
+struct GfxRGB;
+
+class SplashFont;
+class SplashFontEngine;
+class SplashGlyphBitmap;
+
+//------------------------------------------------------------------------
+// ArthurOutputDev - Qt 4 QPainter renderer
+//------------------------------------------------------------------------
+
+class ArthurOutputDev: public OutputDev {
+public:
+
+ // Constructor.
+ ArthurOutputDev(QPainter *painter );
+
+ // Destructor.
+ virtual ~ArthurOutputDev();
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gTrue; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- link borders
+ virtual void drawLink(Link *link, Catalog *catalog);
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState *state);
+ virtual void restoreState(GfxState *state);
+
+ //----- update graphics state
+ virtual void updateAll(GfxState *state);
+ virtual void updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32);
+ virtual void updateLineDash(GfxState *state);
+ virtual void updateFlatness(GfxState *state);
+ virtual void updateLineJoin(GfxState *state);
+ virtual void updateLineCap(GfxState *state);
+ virtual void updateMiterLimit(GfxState *state);
+ virtual void updateLineWidth(GfxState *state);
+ virtual void updateFillColor(GfxState *state);
+ virtual void updateStrokeColor(GfxState *state);
+ virtual void updateFillOpacity(GfxState *state);
+ virtual void updateStrokeOpacity(GfxState *state);
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+
+ //----- path clipping
+ virtual void clip(GfxState *state);
+ virtual void eoClip(GfxState *state);
+
+ //----- text drawing
+ // virtual void drawString(GfxState *state, GooString *s);
+ virtual void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen);
+ virtual GBool beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen);
+ virtual void endType3Char(GfxState *state);
+ virtual void endTextObject(GfxState *state);
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+
+ //----- Type 3 font operators
+ virtual void type3D0(GfxState *state, double wx, double wy);
+ virtual void type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury);
+
+ //----- special access
+
+ // Called to indicate that a new PDF document has been loaded.
+ void startDoc(XRef *xrefA);
+
+ GBool isReverseVideo() { return gFalse; }
+
+private:
+ QPainter *m_painter;
+ QFont m_currentFont;
+ QPen m_currentPen;
+ QBrush m_currentBrush;
+ GBool m_needFontUpdate; // set when the font needs to be updated
+ QImage *m_image;
+ SplashFontEngine *m_fontEngine;
+ SplashFont *m_font; // current font
+ XRef *xref; // xref table for current document
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.cc
new file mode 100644
index 00000000000..329ff62fc39
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.cc
@@ -0,0 +1,65 @@
+//========================================================================
+//
+// BuiltinFont.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "FontEncodingTables.h"
+#include "BuiltinFont.h"
+
+//------------------------------------------------------------------------
+
+BuiltinFontWidths::BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA) {
+ int i, h;
+
+ size = sizeA;
+ tab = (BuiltinFontWidth **)gmallocn(size, sizeof(BuiltinFontWidth *));
+ for (i = 0; i < size; ++i) {
+ tab[i] = NULL;
+ }
+ for (i = 0; i < sizeA; ++i) {
+ h = hash(widths[i].name);
+ widths[i].next = tab[h];
+ tab[h] = &widths[i];
+ }
+}
+
+BuiltinFontWidths::~BuiltinFontWidths() {
+ gfree(tab);
+}
+
+GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
+ int h;
+ BuiltinFontWidth *p;
+
+ h = hash(name);
+ for (p = tab[h]; p; p = p->next) {
+ if (!strcmp(p->name, name)) {
+ *width = p->width;
+ return gTrue;
+ }
+ }
+ return gFalse;
+}
+
+int BuiltinFontWidths::hash(char *name) {
+ char *p;
+ unsigned int h;
+
+ h = 0;
+ for (p = name; *p; ++p) {
+ h = 17 * h + (int)(*p & 0xff);
+ }
+ return (int)(h % size);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.h
new file mode 100644
index 00000000000..8652034fd63
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFont.h
@@ -0,0 +1,55 @@
+//========================================================================
+//
+// BuiltinFont.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef BUILTINFONT_H
+#define BUILTINFONT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+struct BuiltinFont;
+class BuiltinFontWidths;
+
+//------------------------------------------------------------------------
+
+struct BuiltinFont {
+ char *name;
+ char **defaultBaseEnc;
+ short ascent;
+ short descent;
+ short bbox[4];
+ BuiltinFontWidths *widths;
+};
+
+//------------------------------------------------------------------------
+
+struct BuiltinFontWidth {
+ char *name;
+ Gushort width;
+ BuiltinFontWidth *next;
+};
+
+class BuiltinFontWidths {
+public:
+
+ BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
+ ~BuiltinFontWidths();
+ GBool getWidth(char *name, Gushort *width);
+
+private:
+
+ int hash(char *name);
+
+ BuiltinFontWidth **tab;
+ int size;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.cc
new file mode 100644
index 00000000000..5115b7bcf13
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.cc
@@ -0,0 +1,4284 @@
+//========================================================================
+//
+// BuiltinFontTables.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+#include <stdlib.h>
+#include "FontEncodingTables.h"
+#include "BuiltinFontTables.h"
+
+static BuiltinFontWidth courierWidthsTab[] = {
+ { "Ntilde", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "comma", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "colon", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "Aogonek", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "minus", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "zacute", 600, NULL },
+ { "yen", 600, NULL },
+ { "space", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "emdash", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "three", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "A", 600, NULL },
+ { "B", 600, NULL },
+ { "C", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "D", 600, NULL },
+ { "E", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "F", 600, NULL },
+ { "G", 600, NULL },
+ { "H", 600, NULL },
+ { "I", 600, NULL },
+ { "J", 600, NULL },
+ { "K", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "L", 600, NULL },
+ { "backslash", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "M", 600, NULL },
+ { "N", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "O", 600, NULL },
+ { "P", 600, NULL },
+ { "Q", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "R", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "caron", 600, NULL },
+ { "S", 600, NULL },
+ { "T", 600, NULL },
+ { "U", 600, NULL },
+ { "agrave", 600, NULL },
+ { "V", 600, NULL },
+ { "W", 600, NULL },
+ { "equal", 600, NULL },
+ { "question", 600, NULL },
+ { "X", 600, NULL },
+ { "Y", 600, NULL },
+ { "Z", 600, NULL },
+ { "four", 600, NULL },
+ { "a", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "b", 600, NULL },
+ { "c", 600, NULL },
+ { "d", 600, NULL },
+ { "e", 600, NULL },
+ { "f", 600, NULL },
+ { "g", 600, NULL },
+ { "bullet", 600, NULL },
+ { "h", 600, NULL },
+ { "i", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "dagger", 600, NULL },
+ { "j", 600, NULL },
+ { "k", 600, NULL },
+ { "l", 600, NULL },
+ { "m", 600, NULL },
+ { "n", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "o", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ring", 600, NULL },
+ { "p", 600, NULL },
+ { "q", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "r", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "aacute", 600, NULL },
+ { "s", 600, NULL },
+ { "OE", 600, NULL },
+ { "t", 600, NULL },
+ { "divide", 600, NULL },
+ { "u", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "v", 600, NULL },
+ { "w", 600, NULL },
+ { "x", 600, NULL },
+ { "y", 600, NULL },
+ { "z", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "mu", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "semicolon", 600, NULL },
+ { "oslash", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "parenright", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "trademark", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "nacute", 600, NULL },
+ { "macron", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "scaron", 600, NULL },
+ { "AE", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "lslash", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "eight", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "endash", 600, NULL },
+ { "oe", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Umacron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "copyright", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "slash", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "otilde", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "one", 600, NULL },
+ { "emacron", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "ucircumflex", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "umacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "adieresis", 600, NULL },
+ { "egrave", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "Eth", 600, NULL },
+ { "ae", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "five", 600, NULL },
+ { "nine", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "tilde", 600, NULL },
+ { "at", 600, NULL },
+ { "eacute", 600, NULL },
+ { "underscore", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "zero", 600, NULL },
+ { "multiply", 600, NULL },
+ { "eth", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "Racute", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "uacute", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "ograve", 600, NULL },
+ { "racute", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "thorn", 600, NULL },
+ { "degree", 600, NULL },
+ { "registered", 600, NULL },
+ { "radical", 600, NULL },
+ { "Aring", 600, NULL },
+ { "percent", 600, NULL },
+ { "six", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "two", 600, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "oacute", 600, NULL },
+ { "Uring", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "Delta", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "aring", 600, NULL },
+ { "grave", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "lacute", 600, NULL },
+ { "igrave", 600, NULL },
+ { "Ncaron", 600, NULL },
+ { "plus", 600, NULL },
+ { "uring", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "Yacute", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "acute", 600, NULL },
+ { "section", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "iacute", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "florin", 600, NULL },
+ { "yacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "fi", 600, NULL },
+ { "fl", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "seven", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "sterling", 600, NULL },
+ { "notequal", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "cacute", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "braceright", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "amacron", 600, NULL },
+ { "sacute", 600, NULL },
+ { "imacron", 600, NULL },
+ { "cent", 600, NULL },
+ { "currency", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "breve", 600, NULL },
+ { "bar", 600, NULL },
+ { "fraction", 600, NULL },
+ { "less", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "exclam", 600, NULL },
+ { "period", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "greater", 600, NULL },
+ { "atilde", 600, NULL },
+ { "brokenbar", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "onesuperior", 600, NULL }
+};
+
+static BuiltinFontWidth courierBoldWidthsTab[] = {
+ { "Ntilde", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "comma", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "colon", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "Aogonek", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "minus", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "zacute", 600, NULL },
+ { "yen", 600, NULL },
+ { "space", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "emdash", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "three", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "A", 600, NULL },
+ { "B", 600, NULL },
+ { "C", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "D", 600, NULL },
+ { "E", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "F", 600, NULL },
+ { "G", 600, NULL },
+ { "H", 600, NULL },
+ { "I", 600, NULL },
+ { "J", 600, NULL },
+ { "K", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "backslash", 600, NULL },
+ { "L", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "M", 600, NULL },
+ { "N", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "O", 600, NULL },
+ { "P", 600, NULL },
+ { "Q", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "R", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "caron", 600, NULL },
+ { "S", 600, NULL },
+ { "T", 600, NULL },
+ { "U", 600, NULL },
+ { "agrave", 600, NULL },
+ { "V", 600, NULL },
+ { "W", 600, NULL },
+ { "X", 600, NULL },
+ { "question", 600, NULL },
+ { "equal", 600, NULL },
+ { "Y", 600, NULL },
+ { "Z", 600, NULL },
+ { "four", 600, NULL },
+ { "a", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "b", 600, NULL },
+ { "c", 600, NULL },
+ { "d", 600, NULL },
+ { "e", 600, NULL },
+ { "f", 600, NULL },
+ { "g", 600, NULL },
+ { "bullet", 600, NULL },
+ { "h", 600, NULL },
+ { "i", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "dagger", 600, NULL },
+ { "j", 600, NULL },
+ { "k", 600, NULL },
+ { "l", 600, NULL },
+ { "m", 600, NULL },
+ { "n", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "o", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ring", 600, NULL },
+ { "p", 600, NULL },
+ { "q", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "r", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "aacute", 600, NULL },
+ { "s", 600, NULL },
+ { "OE", 600, NULL },
+ { "t", 600, NULL },
+ { "divide", 600, NULL },
+ { "u", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "v", 600, NULL },
+ { "w", 600, NULL },
+ { "x", 600, NULL },
+ { "y", 600, NULL },
+ { "z", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "mu", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "semicolon", 600, NULL },
+ { "oslash", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "parenright", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "trademark", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "nacute", 600, NULL },
+ { "macron", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "scaron", 600, NULL },
+ { "AE", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "lslash", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "eight", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "endash", 600, NULL },
+ { "oe", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Umacron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "copyright", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "slash", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "otilde", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "one", 600, NULL },
+ { "emacron", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "ucircumflex", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "umacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "adieresis", 600, NULL },
+ { "egrave", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "Eth", 600, NULL },
+ { "ae", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "nine", 600, NULL },
+ { "five", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "tilde", 600, NULL },
+ { "at", 600, NULL },
+ { "eacute", 600, NULL },
+ { "underscore", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "multiply", 600, NULL },
+ { "zero", 600, NULL },
+ { "eth", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "Racute", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "uacute", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "ograve", 600, NULL },
+ { "racute", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "thorn", 600, NULL },
+ { "degree", 600, NULL },
+ { "registered", 600, NULL },
+ { "radical", 600, NULL },
+ { "Aring", 600, NULL },
+ { "percent", 600, NULL },
+ { "six", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "two", 600, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "oacute", 600, NULL },
+ { "Uring", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "Delta", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "aring", 600, NULL },
+ { "grave", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "igrave", 600, NULL },
+ { "lacute", 600, NULL },
+ { "Ncaron", 600, NULL },
+ { "plus", 600, NULL },
+ { "uring", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "Yacute", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "acute", 600, NULL },
+ { "section", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "iacute", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "florin", 600, NULL },
+ { "yacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "fi", 600, NULL },
+ { "fl", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "seven", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "sterling", 600, NULL },
+ { "notequal", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "cacute", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "braceright", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "amacron", 600, NULL },
+ { "sacute", 600, NULL },
+ { "imacron", 600, NULL },
+ { "cent", 600, NULL },
+ { "currency", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "breve", 600, NULL },
+ { "bar", 600, NULL },
+ { "fraction", 600, NULL },
+ { "less", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "exclam", 600, NULL },
+ { "period", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "greater", 600, NULL },
+ { "atilde", 600, NULL },
+ { "brokenbar", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "onesuperior", 600, NULL }
+};
+
+static BuiltinFontWidth courierBoldObliqueWidthsTab[] = {
+ { "Ntilde", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "comma", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "colon", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "Aogonek", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "minus", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "zacute", 600, NULL },
+ { "yen", 600, NULL },
+ { "space", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "emdash", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "three", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "A", 600, NULL },
+ { "B", 600, NULL },
+ { "C", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "D", 600, NULL },
+ { "E", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "F", 600, NULL },
+ { "G", 600, NULL },
+ { "H", 600, NULL },
+ { "I", 600, NULL },
+ { "J", 600, NULL },
+ { "K", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "backslash", 600, NULL },
+ { "L", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "M", 600, NULL },
+ { "N", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "O", 600, NULL },
+ { "P", 600, NULL },
+ { "Q", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "R", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "caron", 600, NULL },
+ { "S", 600, NULL },
+ { "T", 600, NULL },
+ { "U", 600, NULL },
+ { "agrave", 600, NULL },
+ { "V", 600, NULL },
+ { "W", 600, NULL },
+ { "X", 600, NULL },
+ { "question", 600, NULL },
+ { "equal", 600, NULL },
+ { "Y", 600, NULL },
+ { "Z", 600, NULL },
+ { "four", 600, NULL },
+ { "a", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "b", 600, NULL },
+ { "c", 600, NULL },
+ { "d", 600, NULL },
+ { "e", 600, NULL },
+ { "f", 600, NULL },
+ { "g", 600, NULL },
+ { "bullet", 600, NULL },
+ { "h", 600, NULL },
+ { "i", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "dagger", 600, NULL },
+ { "j", 600, NULL },
+ { "k", 600, NULL },
+ { "l", 600, NULL },
+ { "m", 600, NULL },
+ { "n", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "o", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ring", 600, NULL },
+ { "p", 600, NULL },
+ { "q", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "r", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "aacute", 600, NULL },
+ { "s", 600, NULL },
+ { "OE", 600, NULL },
+ { "t", 600, NULL },
+ { "divide", 600, NULL },
+ { "u", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "v", 600, NULL },
+ { "w", 600, NULL },
+ { "x", 600, NULL },
+ { "y", 600, NULL },
+ { "z", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "mu", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "semicolon", 600, NULL },
+ { "oslash", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "parenright", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "trademark", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "nacute", 600, NULL },
+ { "macron", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "scaron", 600, NULL },
+ { "AE", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "lslash", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "eight", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "endash", 600, NULL },
+ { "oe", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Umacron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "copyright", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "slash", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "otilde", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "one", 600, NULL },
+ { "emacron", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "ucircumflex", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "umacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "adieresis", 600, NULL },
+ { "egrave", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "Eth", 600, NULL },
+ { "ae", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "nine", 600, NULL },
+ { "five", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "tilde", 600, NULL },
+ { "at", 600, NULL },
+ { "eacute", 600, NULL },
+ { "underscore", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "multiply", 600, NULL },
+ { "zero", 600, NULL },
+ { "eth", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "Racute", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "uacute", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "ograve", 600, NULL },
+ { "racute", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "thorn", 600, NULL },
+ { "degree", 600, NULL },
+ { "registered", 600, NULL },
+ { "radical", 600, NULL },
+ { "Aring", 600, NULL },
+ { "percent", 600, NULL },
+ { "six", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "two", 600, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "oacute", 600, NULL },
+ { "Uring", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "Delta", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "aring", 600, NULL },
+ { "grave", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "igrave", 600, NULL },
+ { "lacute", 600, NULL },
+ { "Ncaron", 600, NULL },
+ { "plus", 600, NULL },
+ { "uring", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "Yacute", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "acute", 600, NULL },
+ { "section", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "iacute", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "florin", 600, NULL },
+ { "yacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "fi", 600, NULL },
+ { "fl", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "seven", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "sterling", 600, NULL },
+ { "notequal", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "cacute", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "braceright", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "amacron", 600, NULL },
+ { "sacute", 600, NULL },
+ { "imacron", 600, NULL },
+ { "cent", 600, NULL },
+ { "currency", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "breve", 600, NULL },
+ { "bar", 600, NULL },
+ { "fraction", 600, NULL },
+ { "less", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "exclam", 600, NULL },
+ { "period", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "greater", 600, NULL },
+ { "atilde", 600, NULL },
+ { "brokenbar", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "onesuperior", 600, NULL }
+};
+
+static BuiltinFontWidth courierObliqueWidthsTab[] = {
+ { "Ntilde", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "comma", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "colon", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "Aogonek", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "minus", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "zacute", 600, NULL },
+ { "yen", 600, NULL },
+ { "space", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "emdash", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "three", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "A", 600, NULL },
+ { "B", 600, NULL },
+ { "C", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "D", 600, NULL },
+ { "E", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "F", 600, NULL },
+ { "G", 600, NULL },
+ { "H", 600, NULL },
+ { "I", 600, NULL },
+ { "J", 600, NULL },
+ { "K", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "backslash", 600, NULL },
+ { "L", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "M", 600, NULL },
+ { "N", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "O", 600, NULL },
+ { "P", 600, NULL },
+ { "Q", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "R", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "caron", 600, NULL },
+ { "S", 600, NULL },
+ { "T", 600, NULL },
+ { "U", 600, NULL },
+ { "agrave", 600, NULL },
+ { "V", 600, NULL },
+ { "W", 600, NULL },
+ { "X", 600, NULL },
+ { "question", 600, NULL },
+ { "equal", 600, NULL },
+ { "Y", 600, NULL },
+ { "Z", 600, NULL },
+ { "four", 600, NULL },
+ { "a", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "b", 600, NULL },
+ { "c", 600, NULL },
+ { "d", 600, NULL },
+ { "e", 600, NULL },
+ { "f", 600, NULL },
+ { "g", 600, NULL },
+ { "bullet", 600, NULL },
+ { "h", 600, NULL },
+ { "i", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "dagger", 600, NULL },
+ { "j", 600, NULL },
+ { "k", 600, NULL },
+ { "l", 600, NULL },
+ { "m", 600, NULL },
+ { "n", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "o", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ring", 600, NULL },
+ { "p", 600, NULL },
+ { "q", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "r", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "aacute", 600, NULL },
+ { "s", 600, NULL },
+ { "OE", 600, NULL },
+ { "t", 600, NULL },
+ { "divide", 600, NULL },
+ { "u", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "v", 600, NULL },
+ { "w", 600, NULL },
+ { "x", 600, NULL },
+ { "y", 600, NULL },
+ { "z", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "mu", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "semicolon", 600, NULL },
+ { "oslash", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "parenright", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "trademark", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "nacute", 600, NULL },
+ { "macron", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "scaron", 600, NULL },
+ { "AE", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "lslash", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "eight", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "endash", 600, NULL },
+ { "oe", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Umacron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "copyright", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "slash", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "otilde", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "one", 600, NULL },
+ { "emacron", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "ucircumflex", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "umacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "adieresis", 600, NULL },
+ { "egrave", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "Eth", 600, NULL },
+ { "ae", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "nine", 600, NULL },
+ { "five", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "tilde", 600, NULL },
+ { "at", 600, NULL },
+ { "eacute", 600, NULL },
+ { "underscore", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "multiply", 600, NULL },
+ { "zero", 600, NULL },
+ { "eth", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "Racute", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "uacute", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "ograve", 600, NULL },
+ { "racute", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "thorn", 600, NULL },
+ { "degree", 600, NULL },
+ { "registered", 600, NULL },
+ { "radical", 600, NULL },
+ { "Aring", 600, NULL },
+ { "percent", 600, NULL },
+ { "six", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "two", 600, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "oacute", 600, NULL },
+ { "Uring", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "Delta", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "aring", 600, NULL },
+ { "grave", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "igrave", 600, NULL },
+ { "lacute", 600, NULL },
+ { "Ncaron", 600, NULL },
+ { "plus", 600, NULL },
+ { "uring", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "Yacute", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "acute", 600, NULL },
+ { "section", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "iacute", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "florin", 600, NULL },
+ { "yacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "fi", 600, NULL },
+ { "fl", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "seven", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "sterling", 600, NULL },
+ { "notequal", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "cacute", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "braceright", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "amacron", 600, NULL },
+ { "sacute", 600, NULL },
+ { "imacron", 600, NULL },
+ { "cent", 600, NULL },
+ { "currency", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "breve", 600, NULL },
+ { "bar", 600, NULL },
+ { "fraction", 600, NULL },
+ { "less", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "exclam", 600, NULL },
+ { "period", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "greater", 600, NULL },
+ { "atilde", 600, NULL },
+ { "brokenbar", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "onesuperior", 600, NULL }
+};
+
+static BuiltinFontWidth helveticaWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 333, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 278, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 584, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 556, NULL },
+ { "asciitilde", 584, NULL },
+ { "colon", 278, NULL },
+ { "onehalf", 834, NULL },
+ { "dollar", 556, NULL },
+ { "Lcaron", 556, NULL },
+ { "ntilde", 556, NULL },
+ { "Aogonek", 667, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "minus", 584, NULL },
+ { "Iogonek", 278, NULL },
+ { "zacute", 500, NULL },
+ { "yen", 556, NULL },
+ { "space", 278, NULL },
+ { "Omacron", 778, NULL },
+ { "questiondown", 611, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 667, NULL },
+ { "three", 556, NULL },
+ { "numbersign", 556, NULL },
+ { "lcaron", 299, NULL },
+ { "A", 667, NULL },
+ { "B", 667, NULL },
+ { "C", 722, NULL },
+ { "aogonek", 556, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 834, NULL },
+ { "F", 611, NULL },
+ { "G", 778, NULL },
+ { "H", 722, NULL },
+ { "I", 278, NULL },
+ { "J", 500, NULL },
+ { "K", 667, NULL },
+ { "iogonek", 222, NULL },
+ { "backslash", 278, NULL },
+ { "L", 556, NULL },
+ { "periodcentered", 278, NULL },
+ { "M", 833, NULL },
+ { "N", 722, NULL },
+ { "omacron", 556, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 778, NULL },
+ { "P", 667, NULL },
+ { "Q", 778, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 722, NULL },
+ { "Aacute", 667, NULL },
+ { "caron", 333, NULL },
+ { "S", 667, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 556, NULL },
+ { "V", 667, NULL },
+ { "W", 944, NULL },
+ { "X", 667, NULL },
+ { "question", 556, NULL },
+ { "equal", 584, NULL },
+ { "Y", 667, NULL },
+ { "Z", 611, NULL },
+ { "four", 556, NULL },
+ { "a", 556, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "b", 556, NULL },
+ { "c", 500, NULL },
+ { "d", 556, NULL },
+ { "e", 556, NULL },
+ { "f", 278, NULL },
+ { "g", 556, NULL },
+ { "bullet", 350, NULL },
+ { "h", 556, NULL },
+ { "i", 222, NULL },
+ { "Oslash", 778, NULL },
+ { "dagger", 556, NULL },
+ { "j", 222, NULL },
+ { "k", 500, NULL },
+ { "l", 222, NULL },
+ { "m", 833, NULL },
+ { "n", 556, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "o", 556, NULL },
+ { "ordfeminine", 370, NULL },
+ { "ring", 333, NULL },
+ { "p", 556, NULL },
+ { "q", 556, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "r", 333, NULL },
+ { "twosuperior", 333, NULL },
+ { "aacute", 556, NULL },
+ { "s", 500, NULL },
+ { "OE", 1000, NULL },
+ { "t", 278, NULL },
+ { "divide", 584, NULL },
+ { "u", 556, NULL },
+ { "Ccaron", 722, NULL },
+ { "v", 500, NULL },
+ { "w", 722, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
+ { "z", 500, NULL },
+ { "Gbreve", 778, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 355, NULL },
+ { "gcommaaccent", 556, NULL },
+ { "mu", 556, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 667, NULL },
+ { "Lslash", 556, NULL },
+ { "semicolon", 278, NULL },
+ { "oslash", 611, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 471, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 500, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 556, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 556, NULL },
+ { "nacute", 556, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 778, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 500, NULL },
+ { "AE", 1000, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 222, NULL },
+ { "quotedblleft", 333, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 191, NULL },
+ { "eight", 556, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 556, NULL },
+ { "oe", 944, NULL },
+ { "Abreve", 667, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Adieresis", 667, NULL },
+ { "copyright", 737, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 556, NULL },
+ { "Idieresis", 278, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 556, NULL },
+ { "emacron", 556, NULL },
+ { "Odieresis", 778, NULL },
+ { "ucircumflex", 556, NULL },
+ { "bracketleft", 278, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 222, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 667, NULL },
+ { "umacron", 556, NULL },
+ { "abreve", 556, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 556, NULL },
+ { "egrave", 556, NULL },
+ { "edieresis", 556, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 889, NULL },
+ { "asterisk", 389, NULL },
+ { "odieresis", 556, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 556, NULL },
+ { "nine", 556, NULL },
+ { "five", 556, NULL },
+ { "udieresis", 556, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "guillemotright", 556, NULL },
+ { "Ccedilla", 722, NULL },
+ { "ydieresis", 500, NULL },
+ { "tilde", 333, NULL },
+ { "at", 1015, NULL },
+ { "eacute", 556, NULL },
+ { "underscore", 556, NULL },
+ { "Euro", 556, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 584, NULL },
+ { "zero", 556, NULL },
+ { "eth", 556, NULL },
+ { "Scedilla", 667, NULL },
+ { "Ograve", 778, NULL },
+ { "Racute", 722, NULL },
+ { "partialdiff", 476, NULL },
+ { "uacute", 556, NULL },
+ { "braceleft", 334, NULL },
+ { "Thorn", 667, NULL },
+ { "zcaron", 500, NULL },
+ { "scommaaccent", 500, NULL },
+ { "ccedilla", 500, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 556, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Oacute", 778, NULL },
+ { "scedilla", 500, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 556, NULL },
+ { "racute", 333, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 556, NULL },
+ { "degree", 400, NULL },
+ { "registered", 737, NULL },
+ { "radical", 453, NULL },
+ { "Aring", 667, NULL },
+ { "percent", 889, NULL },
+ { "six", 556, NULL },
+ { "paragraph", 537, NULL },
+ { "dcaron", 643, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 556, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 278, NULL },
+ { "Lacute", 556, NULL },
+ { "ocircumflex", 556, NULL },
+ { "oacute", 556, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "tcaron", 317, NULL },
+ { "eogonek", 556, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "asciicircum", 469, NULL },
+ { "aring", 556, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "bracketright", 278, NULL },
+ { "Iacute", 278, NULL },
+ { "ampersand", 667, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 222, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 584, NULL },
+ { "uring", 556, NULL },
+ { "quotesinglbase", 222, NULL },
+ { "lcommaaccent", 222, NULL },
+ { "Yacute", 667, NULL },
+ { "ohungarumlaut", 556, NULL },
+ { "threesuperior", 333, NULL },
+ { "acute", 333, NULL },
+ { "section", 556, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 333, NULL },
+ { "ncaron", 556, NULL },
+ { "florin", 556, NULL },
+ { "yacute", 500, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "fi", 500, NULL },
+ { "fl", 500, NULL },
+ { "Acircumflex", 667, NULL },
+ { "Cacute", 722, NULL },
+ { "Icircumflex", 278, NULL },
+ { "guillemotleft", 556, NULL },
+ { "germandbls", 611, NULL },
+ { "Amacron", 667, NULL },
+ { "seven", 556, NULL },
+ { "Sacute", 667, NULL },
+ { "ordmasculine", 365, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 556, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 278, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 556, NULL },
+ { "cacute", 500, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 334, NULL },
+ { "quotedblright", 333, NULL },
+ { "amacron", 556, NULL },
+ { "sacute", 500, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 556, NULL },
+ { "currency", 556, NULL },
+ { "logicalnot", 584, NULL },
+ { "zdotaccent", 500, NULL },
+ { "Atilde", 667, NULL },
+ { "breve", 333, NULL },
+ { "bar", 260, NULL },
+ { "fraction", 167, NULL },
+ { "less", 584, NULL },
+ { "ecaron", 556, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 278, NULL },
+ { "period", 278, NULL },
+ { "Rcaron", 722, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "greater", 584, NULL },
+ { "atilde", 556, NULL },
+ { "brokenbar", 260, NULL },
+ { "quoteleft", 222, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 333, NULL }
+};
+
+static BuiltinFontWidth helveticaBoldWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 389, NULL },
+ { "kcommaaccent", 556, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 278, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 584, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 556, NULL },
+ { "asciitilde", 584, NULL },
+ { "colon", 333, NULL },
+ { "onehalf", 834, NULL },
+ { "dollar", 556, NULL },
+ { "Lcaron", 611, NULL },
+ { "ntilde", 611, NULL },
+ { "Aogonek", 722, NULL },
+ { "ncommaaccent", 611, NULL },
+ { "minus", 584, NULL },
+ { "Iogonek", 278, NULL },
+ { "zacute", 500, NULL },
+ { "yen", 556, NULL },
+ { "space", 278, NULL },
+ { "Omacron", 778, NULL },
+ { "questiondown", 611, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 722, NULL },
+ { "three", 556, NULL },
+ { "numbersign", 556, NULL },
+ { "lcaron", 400, NULL },
+ { "A", 722, NULL },
+ { "B", 722, NULL },
+ { "C", 722, NULL },
+ { "aogonek", 556, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 834, NULL },
+ { "F", 611, NULL },
+ { "G", 778, NULL },
+ { "H", 722, NULL },
+ { "I", 278, NULL },
+ { "J", 556, NULL },
+ { "K", 722, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 611, NULL },
+ { "periodcentered", 278, NULL },
+ { "M", 833, NULL },
+ { "N", 722, NULL },
+ { "omacron", 611, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 778, NULL },
+ { "P", 667, NULL },
+ { "Q", 778, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 722, NULL },
+ { "Aacute", 722, NULL },
+ { "caron", 333, NULL },
+ { "S", 667, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 556, NULL },
+ { "V", 667, NULL },
+ { "W", 944, NULL },
+ { "X", 667, NULL },
+ { "question", 611, NULL },
+ { "equal", 584, NULL },
+ { "Y", 667, NULL },
+ { "Z", 611, NULL },
+ { "four", 556, NULL },
+ { "a", 556, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "b", 611, NULL },
+ { "c", 556, NULL },
+ { "d", 611, NULL },
+ { "e", 556, NULL },
+ { "f", 333, NULL },
+ { "g", 611, NULL },
+ { "bullet", 350, NULL },
+ { "h", 611, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 778, NULL },
+ { "dagger", 556, NULL },
+ { "j", 278, NULL },
+ { "k", 556, NULL },
+ { "l", 278, NULL },
+ { "m", 889, NULL },
+ { "n", 611, NULL },
+ { "tcommaaccent", 333, NULL },
+ { "o", 611, NULL },
+ { "ordfeminine", 370, NULL },
+ { "ring", 333, NULL },
+ { "p", 611, NULL },
+ { "q", 611, NULL },
+ { "uhungarumlaut", 611, NULL },
+ { "r", 389, NULL },
+ { "twosuperior", 333, NULL },
+ { "aacute", 556, NULL },
+ { "s", 556, NULL },
+ { "OE", 1000, NULL },
+ { "t", 333, NULL },
+ { "divide", 584, NULL },
+ { "u", 611, NULL },
+ { "Ccaron", 722, NULL },
+ { "v", 556, NULL },
+ { "w", 778, NULL },
+ { "x", 556, NULL },
+ { "y", 556, NULL },
+ { "z", 500, NULL },
+ { "Gbreve", 778, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 474, NULL },
+ { "gcommaaccent", 611, NULL },
+ { "mu", 611, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 667, NULL },
+ { "Lslash", 611, NULL },
+ { "semicolon", 333, NULL },
+ { "oslash", 611, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 494, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 556, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 611, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 556, NULL },
+ { "nacute", 611, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 778, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 556, NULL },
+ { "AE", 1000, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 500, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 238, NULL },
+ { "eight", 556, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 556, NULL },
+ { "oe", 944, NULL },
+ { "Abreve", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Adieresis", 722, NULL },
+ { "copyright", 737, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 611, NULL },
+ { "Idieresis", 278, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 556, NULL },
+ { "emacron", 556, NULL },
+ { "Odieresis", 778, NULL },
+ { "ucircumflex", 611, NULL },
+ { "bracketleft", 333, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 278, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 667, NULL },
+ { "umacron", 611, NULL },
+ { "abreve", 556, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 556, NULL },
+ { "egrave", 556, NULL },
+ { "edieresis", 556, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 889, NULL },
+ { "asterisk", 389, NULL },
+ { "odieresis", 611, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 611, NULL },
+ { "nine", 556, NULL },
+ { "five", 556, NULL },
+ { "udieresis", 611, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "guillemotright", 556, NULL },
+ { "Ccedilla", 722, NULL },
+ { "ydieresis", 556, NULL },
+ { "tilde", 333, NULL },
+ { "dbldaggerumlaut", 556, NULL },
+ { "at", 975, NULL },
+ { "eacute", 556, NULL },
+ { "underscore", 556, NULL },
+ { "Euro", 556, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 584, NULL },
+ { "zero", 556, NULL },
+ { "eth", 611, NULL },
+ { "Scedilla", 667, NULL },
+ { "Ograve", 778, NULL },
+ { "Racute", 722, NULL },
+ { "partialdiff", 494, NULL },
+ { "uacute", 611, NULL },
+ { "braceleft", 389, NULL },
+ { "Thorn", 667, NULL },
+ { "zcaron", 500, NULL },
+ { "scommaaccent", 556, NULL },
+ { "ccedilla", 556, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 611, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Oacute", 778, NULL },
+ { "scedilla", 556, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 611, NULL },
+ { "racute", 389, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 611, NULL },
+ { "degree", 400, NULL },
+ { "registered", 737, NULL },
+ { "radical", 549, NULL },
+ { "Aring", 722, NULL },
+ { "percent", 889, NULL },
+ { "six", 556, NULL },
+ { "paragraph", 556, NULL },
+ { "dcaron", 743, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 556, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 278, NULL },
+ { "Lacute", 611, NULL },
+ { "ocircumflex", 611, NULL },
+ { "oacute", 611, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "tcaron", 389, NULL },
+ { "eogonek", 556, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "asciicircum", 584, NULL },
+ { "aring", 556, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 611, NULL },
+ { "bracketright", 333, NULL },
+ { "Iacute", 278, NULL },
+ { "ampersand", 722, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 584, NULL },
+ { "uring", 611, NULL },
+ { "quotesinglbase", 278, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 667, NULL },
+ { "ohungarumlaut", 611, NULL },
+ { "threesuperior", 333, NULL },
+ { "acute", 333, NULL },
+ { "section", 556, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 500, NULL },
+ { "ncaron", 611, NULL },
+ { "florin", 556, NULL },
+ { "yacute", 556, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "fi", 611, NULL },
+ { "fl", 611, NULL },
+ { "Acircumflex", 722, NULL },
+ { "Cacute", 722, NULL },
+ { "Icircumflex", 278, NULL },
+ { "guillemotleft", 556, NULL },
+ { "germandbls", 611, NULL },
+ { "Amacron", 722, NULL },
+ { "seven", 556, NULL },
+ { "Sacute", 667, NULL },
+ { "ordmasculine", 365, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 556, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 278, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 556, NULL },
+ { "cacute", 556, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 389, NULL },
+ { "quotedblright", 500, NULL },
+ { "amacron", 556, NULL },
+ { "sacute", 556, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 556, NULL },
+ { "currency", 556, NULL },
+ { "logicalnot", 584, NULL },
+ { "zdotaccent", 500, NULL },
+ { "Atilde", 722, NULL },
+ { "breve", 333, NULL },
+ { "bar", 280, NULL },
+ { "fraction", 167, NULL },
+ { "less", 584, NULL },
+ { "ecaron", 556, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 333, NULL },
+ { "period", 278, NULL },
+ { "Rcaron", 722, NULL },
+ { "Kcommaaccent", 722, NULL },
+ { "greater", 584, NULL },
+ { "atilde", 556, NULL },
+ { "brokenbar", 280, NULL },
+ { "quoteleft", 278, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 333, NULL }
+};
+
+static BuiltinFontWidth helveticaBoldObliqueWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 389, NULL },
+ { "kcommaaccent", 556, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 278, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 584, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 556, NULL },
+ { "asciitilde", 584, NULL },
+ { "colon", 333, NULL },
+ { "onehalf", 834, NULL },
+ { "dollar", 556, NULL },
+ { "Lcaron", 611, NULL },
+ { "ntilde", 611, NULL },
+ { "Aogonek", 722, NULL },
+ { "ncommaaccent", 611, NULL },
+ { "minus", 584, NULL },
+ { "Iogonek", 278, NULL },
+ { "zacute", 500, NULL },
+ { "yen", 556, NULL },
+ { "space", 278, NULL },
+ { "Omacron", 778, NULL },
+ { "questiondown", 611, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 722, NULL },
+ { "three", 556, NULL },
+ { "numbersign", 556, NULL },
+ { "lcaron", 400, NULL },
+ { "A", 722, NULL },
+ { "B", 722, NULL },
+ { "C", 722, NULL },
+ { "aogonek", 556, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 834, NULL },
+ { "F", 611, NULL },
+ { "G", 778, NULL },
+ { "H", 722, NULL },
+ { "I", 278, NULL },
+ { "J", 556, NULL },
+ { "K", 722, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 611, NULL },
+ { "periodcentered", 278, NULL },
+ { "M", 833, NULL },
+ { "N", 722, NULL },
+ { "omacron", 611, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 778, NULL },
+ { "P", 667, NULL },
+ { "Q", 778, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 722, NULL },
+ { "Aacute", 722, NULL },
+ { "caron", 333, NULL },
+ { "S", 667, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 556, NULL },
+ { "V", 667, NULL },
+ { "W", 944, NULL },
+ { "X", 667, NULL },
+ { "question", 611, NULL },
+ { "equal", 584, NULL },
+ { "Y", 667, NULL },
+ { "Z", 611, NULL },
+ { "four", 556, NULL },
+ { "a", 556, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "b", 611, NULL },
+ { "c", 556, NULL },
+ { "d", 611, NULL },
+ { "e", 556, NULL },
+ { "f", 333, NULL },
+ { "g", 611, NULL },
+ { "bullet", 350, NULL },
+ { "h", 611, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 778, NULL },
+ { "dagger", 556, NULL },
+ { "j", 278, NULL },
+ { "k", 556, NULL },
+ { "l", 278, NULL },
+ { "m", 889, NULL },
+ { "n", 611, NULL },
+ { "tcommaaccent", 333, NULL },
+ { "o", 611, NULL },
+ { "ordfeminine", 370, NULL },
+ { "ring", 333, NULL },
+ { "p", 611, NULL },
+ { "q", 611, NULL },
+ { "uhungarumlaut", 611, NULL },
+ { "r", 389, NULL },
+ { "twosuperior", 333, NULL },
+ { "aacute", 556, NULL },
+ { "s", 556, NULL },
+ { "OE", 1000, NULL },
+ { "t", 333, NULL },
+ { "divide", 584, NULL },
+ { "u", 611, NULL },
+ { "Ccaron", 722, NULL },
+ { "v", 556, NULL },
+ { "w", 778, NULL },
+ { "x", 556, NULL },
+ { "y", 556, NULL },
+ { "z", 500, NULL },
+ { "Gbreve", 778, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 474, NULL },
+ { "gcommaaccent", 611, NULL },
+ { "mu", 611, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 667, NULL },
+ { "Lslash", 611, NULL },
+ { "semicolon", 333, NULL },
+ { "oslash", 611, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 494, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 556, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 611, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 556, NULL },
+ { "nacute", 611, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 778, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 556, NULL },
+ { "AE", 1000, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 500, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 238, NULL },
+ { "eight", 556, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 556, NULL },
+ { "oe", 944, NULL },
+ { "Abreve", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Adieresis", 722, NULL },
+ { "copyright", 737, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 611, NULL },
+ { "Idieresis", 278, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 556, NULL },
+ { "emacron", 556, NULL },
+ { "Odieresis", 778, NULL },
+ { "ucircumflex", 611, NULL },
+ { "bracketleft", 333, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 278, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 667, NULL },
+ { "umacron", 611, NULL },
+ { "abreve", 556, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 556, NULL },
+ { "egrave", 556, NULL },
+ { "edieresis", 556, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 889, NULL },
+ { "asterisk", 389, NULL },
+ { "odieresis", 611, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 611, NULL },
+ { "nine", 556, NULL },
+ { "five", 556, NULL },
+ { "udieresis", 611, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "guillemotright", 556, NULL },
+ { "Ccedilla", 722, NULL },
+ { "ydieresis", 556, NULL },
+ { "tilde", 333, NULL },
+ { "at", 975, NULL },
+ { "eacute", 556, NULL },
+ { "underscore", 556, NULL },
+ { "Euro", 556, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 584, NULL },
+ { "zero", 556, NULL },
+ { "eth", 611, NULL },
+ { "Scedilla", 667, NULL },
+ { "Ograve", 778, NULL },
+ { "Racute", 722, NULL },
+ { "partialdiff", 494, NULL },
+ { "uacute", 611, NULL },
+ { "braceleft", 389, NULL },
+ { "Thorn", 667, NULL },
+ { "zcaron", 500, NULL },
+ { "scommaaccent", 556, NULL },
+ { "ccedilla", 556, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 611, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Oacute", 778, NULL },
+ { "scedilla", 556, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 611, NULL },
+ { "racute", 389, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 611, NULL },
+ { "degree", 400, NULL },
+ { "registered", 737, NULL },
+ { "radical", 549, NULL },
+ { "Aring", 722, NULL },
+ { "percent", 889, NULL },
+ { "six", 556, NULL },
+ { "paragraph", 556, NULL },
+ { "dcaron", 743, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 556, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 278, NULL },
+ { "Lacute", 611, NULL },
+ { "ocircumflex", 611, NULL },
+ { "oacute", 611, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "tcaron", 389, NULL },
+ { "eogonek", 556, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "asciicircum", 584, NULL },
+ { "aring", 556, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 611, NULL },
+ { "bracketright", 333, NULL },
+ { "Iacute", 278, NULL },
+ { "ampersand", 722, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 584, NULL },
+ { "uring", 611, NULL },
+ { "quotesinglbase", 278, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 667, NULL },
+ { "ohungarumlaut", 611, NULL },
+ { "threesuperior", 333, NULL },
+ { "acute", 333, NULL },
+ { "section", 556, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 500, NULL },
+ { "ncaron", 611, NULL },
+ { "florin", 556, NULL },
+ { "yacute", 556, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "fi", 611, NULL },
+ { "fl", 611, NULL },
+ { "Acircumflex", 722, NULL },
+ { "Cacute", 722, NULL },
+ { "Icircumflex", 278, NULL },
+ { "guillemotleft", 556, NULL },
+ { "germandbls", 611, NULL },
+ { "Amacron", 722, NULL },
+ { "seven", 556, NULL },
+ { "Sacute", 667, NULL },
+ { "ordmasculine", 365, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 556, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 278, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 556, NULL },
+ { "cacute", 556, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 389, NULL },
+ { "quotedblright", 500, NULL },
+ { "amacron", 556, NULL },
+ { "sacute", 556, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 556, NULL },
+ { "currency", 556, NULL },
+ { "logicalnot", 584, NULL },
+ { "zdotaccent", 500, NULL },
+ { "Atilde", 722, NULL },
+ { "breve", 333, NULL },
+ { "bar", 280, NULL },
+ { "fraction", 167, NULL },
+ { "less", 584, NULL },
+ { "ecaron", 556, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 333, NULL },
+ { "period", 278, NULL },
+ { "Rcaron", 722, NULL },
+ { "Kcommaaccent", 722, NULL },
+ { "greater", 584, NULL },
+ { "atilde", 556, NULL },
+ { "brokenbar", 280, NULL },
+ { "quoteleft", 278, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 333, NULL }
+};
+
+static BuiltinFontWidth helveticaObliqueWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 333, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 278, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 584, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 556, NULL },
+ { "asciitilde", 584, NULL },
+ { "colon", 278, NULL },
+ { "onehalf", 834, NULL },
+ { "dollar", 556, NULL },
+ { "Lcaron", 556, NULL },
+ { "ntilde", 556, NULL },
+ { "Aogonek", 667, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "minus", 584, NULL },
+ { "Iogonek", 278, NULL },
+ { "zacute", 500, NULL },
+ { "yen", 556, NULL },
+ { "space", 278, NULL },
+ { "Omacron", 778, NULL },
+ { "questiondown", 611, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 667, NULL },
+ { "three", 556, NULL },
+ { "numbersign", 556, NULL },
+ { "lcaron", 299, NULL },
+ { "A", 667, NULL },
+ { "B", 667, NULL },
+ { "C", 722, NULL },
+ { "aogonek", 556, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 834, NULL },
+ { "F", 611, NULL },
+ { "G", 778, NULL },
+ { "H", 722, NULL },
+ { "I", 278, NULL },
+ { "J", 500, NULL },
+ { "K", 667, NULL },
+ { "iogonek", 222, NULL },
+ { "backslash", 278, NULL },
+ { "L", 556, NULL },
+ { "periodcentered", 278, NULL },
+ { "M", 833, NULL },
+ { "N", 722, NULL },
+ { "omacron", 556, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 778, NULL },
+ { "P", 667, NULL },
+ { "Q", 778, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 722, NULL },
+ { "Aacute", 667, NULL },
+ { "caron", 333, NULL },
+ { "S", 667, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 556, NULL },
+ { "V", 667, NULL },
+ { "W", 944, NULL },
+ { "X", 667, NULL },
+ { "question", 556, NULL },
+ { "equal", 584, NULL },
+ { "Y", 667, NULL },
+ { "Z", 611, NULL },
+ { "four", 556, NULL },
+ { "a", 556, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "b", 556, NULL },
+ { "c", 500, NULL },
+ { "d", 556, NULL },
+ { "e", 556, NULL },
+ { "f", 278, NULL },
+ { "g", 556, NULL },
+ { "bullet", 350, NULL },
+ { "h", 556, NULL },
+ { "i", 222, NULL },
+ { "Oslash", 778, NULL },
+ { "dagger", 556, NULL },
+ { "j", 222, NULL },
+ { "k", 500, NULL },
+ { "l", 222, NULL },
+ { "m", 833, NULL },
+ { "n", 556, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "o", 556, NULL },
+ { "ordfeminine", 370, NULL },
+ { "ring", 333, NULL },
+ { "p", 556, NULL },
+ { "q", 556, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "r", 333, NULL },
+ { "twosuperior", 333, NULL },
+ { "aacute", 556, NULL },
+ { "s", 500, NULL },
+ { "OE", 1000, NULL },
+ { "t", 278, NULL },
+ { "divide", 584, NULL },
+ { "u", 556, NULL },
+ { "Ccaron", 722, NULL },
+ { "v", 500, NULL },
+ { "w", 722, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
+ { "z", 500, NULL },
+ { "Gbreve", 778, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 355, NULL },
+ { "gcommaaccent", 556, NULL },
+ { "mu", 556, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 667, NULL },
+ { "Lslash", 556, NULL },
+ { "semicolon", 278, NULL },
+ { "oslash", 611, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 471, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 500, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 556, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 556, NULL },
+ { "nacute", 556, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 778, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 500, NULL },
+ { "AE", 1000, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 222, NULL },
+ { "quotedblleft", 333, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 191, NULL },
+ { "eight", 556, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 556, NULL },
+ { "oe", 944, NULL },
+ { "Abreve", 667, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Adieresis", 667, NULL },
+ { "copyright", 737, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 556, NULL },
+ { "Idieresis", 278, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 556, NULL },
+ { "emacron", 556, NULL },
+ { "Odieresis", 778, NULL },
+ { "ucircumflex", 556, NULL },
+ { "bracketleft", 278, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 222, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 667, NULL },
+ { "umacron", 556, NULL },
+ { "abreve", 556, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 556, NULL },
+ { "egrave", 556, NULL },
+ { "edieresis", 556, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 889, NULL },
+ { "asterisk", 389, NULL },
+ { "odieresis", 556, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 556, NULL },
+ { "nine", 556, NULL },
+ { "five", 556, NULL },
+ { "udieresis", 556, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "guillemotright", 556, NULL },
+ { "Ccedilla", 722, NULL },
+ { "ydieresis", 500, NULL },
+ { "tilde", 333, NULL },
+ { "at", 1015, NULL },
+ { "eacute", 556, NULL },
+ { "underscore", 556, NULL },
+ { "Euro", 556, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 584, NULL },
+ { "zero", 556, NULL },
+ { "eth", 556, NULL },
+ { "Scedilla", 667, NULL },
+ { "Ograve", 778, NULL },
+ { "Racute", 722, NULL },
+ { "partialdiff", 476, NULL },
+ { "uacute", 556, NULL },
+ { "braceleft", 334, NULL },
+ { "Thorn", 667, NULL },
+ { "zcaron", 500, NULL },
+ { "scommaaccent", 500, NULL },
+ { "ccedilla", 500, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 556, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Oacute", 778, NULL },
+ { "scedilla", 500, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 556, NULL },
+ { "racute", 333, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 556, NULL },
+ { "degree", 400, NULL },
+ { "registered", 737, NULL },
+ { "radical", 453, NULL },
+ { "Aring", 667, NULL },
+ { "percent", 889, NULL },
+ { "six", 556, NULL },
+ { "paragraph", 537, NULL },
+ { "dcaron", 643, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 556, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 278, NULL },
+ { "Lacute", 556, NULL },
+ { "ocircumflex", 556, NULL },
+ { "oacute", 556, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "tcaron", 317, NULL },
+ { "eogonek", 556, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "asciicircum", 469, NULL },
+ { "aring", 556, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "bracketright", 278, NULL },
+ { "Iacute", 278, NULL },
+ { "ampersand", 667, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 222, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 584, NULL },
+ { "uring", 556, NULL },
+ { "quotesinglbase", 222, NULL },
+ { "lcommaaccent", 222, NULL },
+ { "Yacute", 667, NULL },
+ { "ohungarumlaut", 556, NULL },
+ { "threesuperior", 333, NULL },
+ { "acute", 333, NULL },
+ { "section", 556, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 333, NULL },
+ { "ncaron", 556, NULL },
+ { "florin", 556, NULL },
+ { "yacute", 500, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "fi", 500, NULL },
+ { "fl", 500, NULL },
+ { "Acircumflex", 667, NULL },
+ { "Cacute", 722, NULL },
+ { "Icircumflex", 278, NULL },
+ { "guillemotleft", 556, NULL },
+ { "germandbls", 611, NULL },
+ { "Amacron", 667, NULL },
+ { "seven", 556, NULL },
+ { "Sacute", 667, NULL },
+ { "ordmasculine", 365, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 556, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 278, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 556, NULL },
+ { "cacute", 500, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 334, NULL },
+ { "quotedblright", 333, NULL },
+ { "amacron", 556, NULL },
+ { "sacute", 500, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 556, NULL },
+ { "currency", 556, NULL },
+ { "logicalnot", 584, NULL },
+ { "zdotaccent", 500, NULL },
+ { "Atilde", 667, NULL },
+ { "breve", 333, NULL },
+ { "bar", 260, NULL },
+ { "fraction", 167, NULL },
+ { "less", 584, NULL },
+ { "ecaron", 556, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 278, NULL },
+ { "period", 278, NULL },
+ { "Rcaron", 722, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "greater", 584, NULL },
+ { "atilde", 556, NULL },
+ { "brokenbar", 260, NULL },
+ { "quoteleft", 222, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 333, NULL }
+};
+
+static BuiltinFontWidth symbolWidthsTab[] = {
+ { "bracketleftex", 384, NULL },
+ { "alpha", 631, NULL },
+ { "union", 768, NULL },
+ { "infinity", 713, NULL },
+ { "comma", 250, NULL },
+ { "copyrightsans", 790, NULL },
+ { "plusminus", 549, NULL },
+ { "arrowup", 603, NULL },
+ { "apple", 790, NULL },
+ { "parenleftbt", 384, NULL },
+ { "notelement", 713, NULL },
+ { "colon", 278, NULL },
+ { "beta", 549, NULL },
+ { "braceleftbt", 494, NULL },
+ { "Lambda", 686, NULL },
+ { "Phi", 763, NULL },
+ { "minus", 549, NULL },
+ { "space", 250, NULL },
+ { "Sigma", 592, NULL },
+ { "approxequal", 549, NULL },
+ { "minute", 247, NULL },
+ { "circleplus", 768, NULL },
+ { "Omicron", 722, NULL },
+ { "three", 500, NULL },
+ { "numbersign", 500, NULL },
+ { "lambda", 549, NULL },
+ { "phi", 521, NULL },
+ { "aleph", 823, NULL },
+ { "Tau", 611, NULL },
+ { "spade", 753, NULL },
+ { "logicaland", 603, NULL },
+ { "sigma", 603, NULL },
+ { "propersuperset", 713, NULL },
+ { "omicron", 549, NULL },
+ { "question", 444, NULL },
+ { "equal", 549, NULL },
+ { "Epsilon", 611, NULL },
+ { "emptyset", 823, NULL },
+ { "diamond", 753, NULL },
+ { "four", 500, NULL },
+ { "Mu", 889, NULL },
+ { "parenlefttp", 384, NULL },
+ { "club", 753, NULL },
+ { "bullet", 460, NULL },
+ { "Omega", 768, NULL },
+ { "tau", 439, NULL },
+ { "Upsilon", 690, NULL },
+ { "bracelefttp", 494, NULL },
+ { "heart", 753, NULL },
+ { "divide", 549, NULL },
+ { "epsilon", 439, NULL },
+ { "logicalor", 603, NULL },
+ { "parenleftex", 384, NULL },
+ { "greaterequal", 549, NULL },
+ { "mu", 576, NULL },
+ { "Nu", 722, NULL },
+ { "therefore", 863, NULL },
+ { "notsubset", 713, NULL },
+ { "omega", 686, NULL },
+ { "semicolon", 278, NULL },
+ { "element", 713, NULL },
+ { "upsilon", 576, NULL },
+ { "existential", 549, NULL },
+ { "integralbt", 686, NULL },
+ { "lessequal", 549, NULL },
+ { "phi1", 603, NULL },
+ { "lozenge", 494, NULL },
+ { "trademarkserif", 890, NULL },
+ { "parenright", 333, NULL },
+ { "reflexsuperset", 713, NULL },
+ { "sigma1", 439, NULL },
+ { "nu", 521, NULL },
+ { "Gamma", 603, NULL },
+ { "angleright", 329, NULL },
+ { "ellipsis", 1000, NULL },
+ { "Rho", 556, NULL },
+ { "parenrightbt", 384, NULL },
+ { "radicalex", 500, NULL },
+ { "eight", 500, NULL },
+ { "angleleft", 329, NULL },
+ { "arrowdbldown", 603, NULL },
+ { "congruent", 549, NULL },
+ { "Theta", 741, NULL },
+ { "intersection", 768, NULL },
+ { "Pi", 768, NULL },
+ { "slash", 278, NULL },
+ { "registerserif", 790, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 500, NULL },
+ { "gamma", 411, NULL },
+ { "bracketleft", 333, NULL },
+ { "rho", 549, NULL },
+ { "circlemultiply", 768, NULL },
+ { "Chi", 722, NULL },
+ { "theta", 521, NULL },
+ { "pi", 549, NULL },
+ { "integraltp", 686, NULL },
+ { "Eta", 722, NULL },
+ { "product", 823, NULL },
+ { "nine", 500, NULL },
+ { "five", 500, NULL },
+ { "propersubset", 713, NULL },
+ { "bracketrightbt", 384, NULL },
+ { "trademarksans", 786, NULL },
+ { "dotmath", 250, NULL },
+ { "integralex", 686, NULL },
+ { "chi", 549, NULL },
+ { "parenrighttp", 384, NULL },
+ { "eta", 603, NULL },
+ { "underscore", 500, NULL },
+ { "Euro", 750, NULL },
+ { "multiply", 549, NULL },
+ { "zero", 500, NULL },
+ { "partialdiff", 494, NULL },
+ { "angle", 768, NULL },
+ { "arrowdblleft", 987, NULL },
+ { "braceleft", 480, NULL },
+ { "parenrightex", 384, NULL },
+ { "Rfraktur", 795, NULL },
+ { "Zeta", 611, NULL },
+ { "braceex", 494, NULL },
+ { "arrowdblup", 603, NULL },
+ { "arrowdown", 603, NULL },
+ { "Ifraktur", 686, NULL },
+ { "degree", 400, NULL },
+ { "Iota", 333, NULL },
+ { "perpendicular", 658, NULL },
+ { "radical", 549, NULL },
+ { "asteriskmath", 500, NULL },
+ { "percent", 833, NULL },
+ { "zeta", 494, NULL },
+ { "six", 500, NULL },
+ { "two", 500, NULL },
+ { "weierstrass", 987, NULL },
+ { "summation", 713, NULL },
+ { "bracketrighttp", 384, NULL },
+ { "carriagereturn", 658, NULL },
+ { "suchthat", 439, NULL },
+ { "arrowvertex", 603, NULL },
+ { "Delta", 612, NULL },
+ { "iota", 329, NULL },
+ { "arrowhorizex", 1000, NULL },
+ { "bracketrightex", 384, NULL },
+ { "bracketright", 333, NULL },
+ { "ampersand", 778, NULL },
+ { "plus", 549, NULL },
+ { "proportional", 713, NULL },
+ { "delta", 494, NULL },
+ { "copyrightserif", 790, NULL },
+ { "bracerightmid", 494, NULL },
+ { "arrowleft", 987, NULL },
+ { "second", 411, NULL },
+ { "arrowdblboth", 1042, NULL },
+ { "florin", 500, NULL },
+ { "Psi", 795, NULL },
+ { "bracerightbt", 494, NULL },
+ { "bracketleftbt", 384, NULL },
+ { "seven", 500, NULL },
+ { "braceleftmid", 494, NULL },
+ { "notequal", 549, NULL },
+ { "psi", 686, NULL },
+ { "equivalence", 549, NULL },
+ { "universal", 713, NULL },
+ { "arrowdblright", 987, NULL },
+ { "braceright", 480, NULL },
+ { "reflexsubset", 713, NULL },
+ { "Xi", 645, NULL },
+ { "theta1", 631, NULL },
+ { "logicalnot", 713, NULL },
+ { "Kappa", 722, NULL },
+ { "similar", 549, NULL },
+ { "bar", 200, NULL },
+ { "fraction", 167, NULL },
+ { "less", 549, NULL },
+ { "registersans", 790, NULL },
+ { "omega1", 713, NULL },
+ { "exclam", 333, NULL },
+ { "Upsilon1", 620, NULL },
+ { "bracerighttp", 494, NULL },
+ { "xi", 493, NULL },
+ { "period", 250, NULL },
+ { "Alpha", 722, NULL },
+ { "arrowright", 987, NULL },
+ { "greater", 549, NULL },
+ { "bracketlefttp", 384, NULL },
+ { "kappa", 549, NULL },
+ { "gradient", 713, NULL },
+ { "integral", 274, NULL },
+ { "arrowboth", 1042, NULL },
+ { "Beta", 667, NULL }
+};
+
+static BuiltinFontWidth timesBoldWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 444, NULL },
+ { "kcommaaccent", 556, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 667, NULL },
+ { "comma", 250, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 570, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 444, NULL },
+ { "asciitilde", 520, NULL },
+ { "colon", 333, NULL },
+ { "onehalf", 750, NULL },
+ { "dollar", 500, NULL },
+ { "Lcaron", 667, NULL },
+ { "ntilde", 556, NULL },
+ { "Aogonek", 722, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "minus", 570, NULL },
+ { "Iogonek", 389, NULL },
+ { "zacute", 444, NULL },
+ { "yen", 500, NULL },
+ { "space", 250, NULL },
+ { "Omacron", 778, NULL },
+ { "questiondown", 500, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 722, NULL },
+ { "three", 500, NULL },
+ { "numbersign", 500, NULL },
+ { "lcaron", 394, NULL },
+ { "A", 722, NULL },
+ { "B", 667, NULL },
+ { "C", 722, NULL },
+ { "aogonek", 500, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 750, NULL },
+ { "F", 611, NULL },
+ { "G", 778, NULL },
+ { "H", 778, NULL },
+ { "I", 389, NULL },
+ { "J", 500, NULL },
+ { "K", 778, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 667, NULL },
+ { "periodcentered", 250, NULL },
+ { "M", 944, NULL },
+ { "N", 722, NULL },
+ { "omacron", 500, NULL },
+ { "Tcommaaccent", 667, NULL },
+ { "O", 778, NULL },
+ { "P", 611, NULL },
+ { "Q", 778, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 722, NULL },
+ { "Aacute", 722, NULL },
+ { "caron", 333, NULL },
+ { "S", 556, NULL },
+ { "T", 667, NULL },
+ { "U", 722, NULL },
+ { "agrave", 500, NULL },
+ { "V", 722, NULL },
+ { "W", 1000, NULL },
+ { "X", 722, NULL },
+ { "question", 500, NULL },
+ { "equal", 570, NULL },
+ { "Y", 722, NULL },
+ { "Z", 667, NULL },
+ { "four", 500, NULL },
+ { "a", 500, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "b", 556, NULL },
+ { "c", 444, NULL },
+ { "d", 556, NULL },
+ { "e", 444, NULL },
+ { "f", 333, NULL },
+ { "g", 500, NULL },
+ { "bullet", 350, NULL },
+ { "h", 556, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 778, NULL },
+ { "dagger", 500, NULL },
+ { "j", 333, NULL },
+ { "k", 556, NULL },
+ { "l", 278, NULL },
+ { "m", 833, NULL },
+ { "n", 556, NULL },
+ { "tcommaaccent", 333, NULL },
+ { "o", 500, NULL },
+ { "ordfeminine", 300, NULL },
+ { "ring", 333, NULL },
+ { "p", 556, NULL },
+ { "q", 556, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "r", 444, NULL },
+ { "twosuperior", 300, NULL },
+ { "aacute", 500, NULL },
+ { "s", 389, NULL },
+ { "OE", 1000, NULL },
+ { "t", 333, NULL },
+ { "divide", 570, NULL },
+ { "u", 556, NULL },
+ { "Ccaron", 722, NULL },
+ { "v", 500, NULL },
+ { "w", 722, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
+ { "z", 444, NULL },
+ { "Gbreve", 778, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 389, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 555, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "mu", 556, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 556, NULL },
+ { "Lslash", 667, NULL },
+ { "semicolon", 333, NULL },
+ { "oslash", 500, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 494, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 444, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 500, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 500, NULL },
+ { "nacute", 556, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 778, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 389, NULL },
+ { "AE", 1000, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 500, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 278, NULL },
+ { "eight", 500, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 500, NULL },
+ { "oe", 722, NULL },
+ { "Abreve", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Adieresis", 722, NULL },
+ { "copyright", 747, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 500, NULL },
+ { "Idieresis", 389, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 500, NULL },
+ { "emacron", 444, NULL },
+ { "Odieresis", 778, NULL },
+ { "ucircumflex", 556, NULL },
+ { "bracketleft", 333, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 333, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 722, NULL },
+ { "umacron", 556, NULL },
+ { "abreve", 500, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 500, NULL },
+ { "egrave", 444, NULL },
+ { "edieresis", 444, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 722, NULL },
+ { "asterisk", 500, NULL },
+ { "odieresis", 500, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 556, NULL },
+ { "nine", 500, NULL },
+ { "five", 500, NULL },
+ { "udieresis", 556, NULL },
+ { "Zcaron", 667, NULL },
+ { "Scommaaccent", 556, NULL },
+ { "threequarters", 750, NULL },
+ { "guillemotright", 500, NULL },
+ { "Ccedilla", 722, NULL },
+ { "ydieresis", 500, NULL },
+ { "tilde", 333, NULL },
+ { "at", 930, NULL },
+ { "eacute", 444, NULL },
+ { "underscore", 500, NULL },
+ { "Euro", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 570, NULL },
+ { "zero", 500, NULL },
+ { "eth", 500, NULL },
+ { "Scedilla", 556, NULL },
+ { "Ograve", 778, NULL },
+ { "Racute", 722, NULL },
+ { "partialdiff", 494, NULL },
+ { "uacute", 556, NULL },
+ { "braceleft", 394, NULL },
+ { "Thorn", 611, NULL },
+ { "zcaron", 444, NULL },
+ { "scommaaccent", 389, NULL },
+ { "ccedilla", 444, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 556, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Oacute", 778, NULL },
+ { "scedilla", 389, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 500, NULL },
+ { "racute", 444, NULL },
+ { "Tcaron", 667, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 556, NULL },
+ { "degree", 400, NULL },
+ { "registered", 747, NULL },
+ { "radical", 549, NULL },
+ { "Aring", 722, NULL },
+ { "percent", 1000, NULL },
+ { "six", 500, NULL },
+ { "paragraph", 540, NULL },
+ { "dcaron", 672, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 500, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 389, NULL },
+ { "Lacute", 667, NULL },
+ { "ocircumflex", 500, NULL },
+ { "oacute", 500, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 667, NULL },
+ { "tcaron", 416, NULL },
+ { "eogonek", 444, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "asciicircum", 581, NULL },
+ { "aring", 500, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "bracketright", 333, NULL },
+ { "Iacute", 389, NULL },
+ { "ampersand", 833, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 570, NULL },
+ { "uring", 556, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 722, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "threesuperior", 300, NULL },
+ { "acute", 333, NULL },
+ { "section", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 500, NULL },
+ { "ncaron", 556, NULL },
+ { "florin", 500, NULL },
+ { "yacute", 500, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "fi", 556, NULL },
+ { "fl", 556, NULL },
+ { "Acircumflex", 722, NULL },
+ { "Cacute", 722, NULL },
+ { "Icircumflex", 389, NULL },
+ { "guillemotleft", 500, NULL },
+ { "germandbls", 556, NULL },
+ { "Amacron", 722, NULL },
+ { "seven", 500, NULL },
+ { "Sacute", 556, NULL },
+ { "ordmasculine", 330, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 500, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 389, NULL },
+ { "rcommaaccent", 444, NULL },
+ { "Zdotaccent", 667, NULL },
+ { "acircumflex", 500, NULL },
+ { "cacute", 444, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 394, NULL },
+ { "quotedblright", 500, NULL },
+ { "amacron", 500, NULL },
+ { "sacute", 389, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 500, NULL },
+ { "currency", 500, NULL },
+ { "logicalnot", 570, NULL },
+ { "zdotaccent", 444, NULL },
+ { "Atilde", 722, NULL },
+ { "breve", 333, NULL },
+ { "bar", 220, NULL },
+ { "fraction", 167, NULL },
+ { "less", 570, NULL },
+ { "ecaron", 444, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 333, NULL },
+ { "period", 250, NULL },
+ { "Rcaron", 722, NULL },
+ { "Kcommaaccent", 778, NULL },
+ { "greater", 570, NULL },
+ { "atilde", 500, NULL },
+ { "brokenbar", 220, NULL },
+ { "quoteleft", 333, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 300, NULL }
+};
+
+static BuiltinFontWidth timesBoldItalicWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 389, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 250, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 570, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 444, NULL },
+ { "asciitilde", 570, NULL },
+ { "colon", 333, NULL },
+ { "onehalf", 750, NULL },
+ { "dollar", 500, NULL },
+ { "Lcaron", 611, NULL },
+ { "ntilde", 556, NULL },
+ { "Aogonek", 667, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "minus", 606, NULL },
+ { "Iogonek", 389, NULL },
+ { "zacute", 389, NULL },
+ { "yen", 500, NULL },
+ { "space", 250, NULL },
+ { "Omacron", 722, NULL },
+ { "questiondown", 500, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 667, NULL },
+ { "three", 500, NULL },
+ { "numbersign", 500, NULL },
+ { "lcaron", 382, NULL },
+ { "A", 667, NULL },
+ { "B", 667, NULL },
+ { "C", 667, NULL },
+ { "aogonek", 500, NULL },
+ { "D", 722, NULL },
+ { "E", 667, NULL },
+ { "onequarter", 750, NULL },
+ { "F", 667, NULL },
+ { "G", 722, NULL },
+ { "H", 778, NULL },
+ { "I", 389, NULL },
+ { "J", 500, NULL },
+ { "K", 667, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 611, NULL },
+ { "periodcentered", 250, NULL },
+ { "M", 889, NULL },
+ { "N", 722, NULL },
+ { "omacron", 500, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 722, NULL },
+ { "P", 611, NULL },
+ { "Q", 722, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 667, NULL },
+ { "Aacute", 667, NULL },
+ { "caron", 333, NULL },
+ { "S", 556, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 500, NULL },
+ { "V", 667, NULL },
+ { "W", 889, NULL },
+ { "X", 667, NULL },
+ { "question", 500, NULL },
+ { "equal", 570, NULL },
+ { "Y", 611, NULL },
+ { "Z", 611, NULL },
+ { "four", 500, NULL },
+ { "a", 500, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "b", 500, NULL },
+ { "c", 444, NULL },
+ { "d", 500, NULL },
+ { "e", 444, NULL },
+ { "f", 333, NULL },
+ { "g", 500, NULL },
+ { "bullet", 350, NULL },
+ { "h", 556, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 722, NULL },
+ { "dagger", 500, NULL },
+ { "j", 278, NULL },
+ { "k", 500, NULL },
+ { "l", 278, NULL },
+ { "m", 778, NULL },
+ { "n", 556, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "o", 500, NULL },
+ { "ordfeminine", 266, NULL },
+ { "ring", 333, NULL },
+ { "p", 500, NULL },
+ { "q", 500, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "r", 389, NULL },
+ { "twosuperior", 300, NULL },
+ { "aacute", 500, NULL },
+ { "s", 389, NULL },
+ { "OE", 944, NULL },
+ { "t", 278, NULL },
+ { "divide", 570, NULL },
+ { "u", 556, NULL },
+ { "Ccaron", 667, NULL },
+ { "v", 444, NULL },
+ { "w", 667, NULL },
+ { "x", 500, NULL },
+ { "y", 444, NULL },
+ { "z", 389, NULL },
+ { "Gbreve", 722, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 389, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 555, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "mu", 576, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 556, NULL },
+ { "Lslash", 611, NULL },
+ { "semicolon", 333, NULL },
+ { "oslash", 500, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 494, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 444, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "gbreve", 500, NULL },
+ { "trademark", 1000, NULL },
+ { "daggerdbl", 500, NULL },
+ { "nacute", 556, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 722, NULL },
+ { "Emacron", 667, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 389, NULL },
+ { "AE", 944, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 500, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 278, NULL },
+ { "eight", 500, NULL },
+ { "exclamdown", 389, NULL },
+ { "endash", 500, NULL },
+ { "oe", 722, NULL },
+ { "Abreve", 667, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Adieresis", 667, NULL },
+ { "copyright", 747, NULL },
+ { "Egrave", 667, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 667, NULL },
+ { "otilde", 500, NULL },
+ { "Idieresis", 389, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 500, NULL },
+ { "emacron", 444, NULL },
+ { "Odieresis", 722, NULL },
+ { "ucircumflex", 556, NULL },
+ { "bracketleft", 333, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 333, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 611, NULL },
+ { "umacron", 556, NULL },
+ { "abreve", 500, NULL },
+ { "Eacute", 667, NULL },
+ { "adieresis", 500, NULL },
+ { "egrave", 444, NULL },
+ { "edieresis", 444, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 722, NULL },
+ { "asterisk", 500, NULL },
+ { "odieresis", 500, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 556, NULL },
+ { "nine", 500, NULL },
+ { "five", 500, NULL },
+ { "udieresis", 556, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 556, NULL },
+ { "threequarters", 750, NULL },
+ { "guillemotright", 500, NULL },
+ { "Ccedilla", 667, NULL },
+ { "ydieresis", 444, NULL },
+ { "tilde", 333, NULL },
+ { "at", 832, NULL },
+ { "eacute", 444, NULL },
+ { "underscore", 500, NULL },
+ { "Euro", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 570, NULL },
+ { "zero", 500, NULL },
+ { "eth", 500, NULL },
+ { "Scedilla", 556, NULL },
+ { "Ograve", 722, NULL },
+ { "Racute", 667, NULL },
+ { "partialdiff", 494, NULL },
+ { "uacute", 556, NULL },
+ { "braceleft", 348, NULL },
+ { "Thorn", 611, NULL },
+ { "zcaron", 389, NULL },
+ { "scommaaccent", 389, NULL },
+ { "ccedilla", 444, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 500, NULL },
+ { "Ocircumflex", 722, NULL },
+ { "Oacute", 722, NULL },
+ { "scedilla", 389, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 500, NULL },
+ { "racute", 389, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 667, NULL },
+ { "thorn", 500, NULL },
+ { "degree", 400, NULL },
+ { "registered", 747, NULL },
+ { "radical", 549, NULL },
+ { "Aring", 667, NULL },
+ { "percent", 833, NULL },
+ { "six", 500, NULL },
+ { "paragraph", 500, NULL },
+ { "dcaron", 608, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 500, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 389, NULL },
+ { "Lacute", 611, NULL },
+ { "ocircumflex", 500, NULL },
+ { "oacute", 500, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "tcaron", 366, NULL },
+ { "eogonek", 444, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "asciicircum", 570, NULL },
+ { "aring", 500, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "bracketright", 333, NULL },
+ { "Iacute", 389, NULL },
+ { "ampersand", 778, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 570, NULL },
+ { "uring", 556, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 611, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "threesuperior", 300, NULL },
+ { "acute", 333, NULL },
+ { "section", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 500, NULL },
+ { "ncaron", 556, NULL },
+ { "florin", 500, NULL },
+ { "yacute", 444, NULL },
+ { "Rcommaaccent", 667, NULL },
+ { "fi", 556, NULL },
+ { "fl", 556, NULL },
+ { "Acircumflex", 667, NULL },
+ { "Cacute", 667, NULL },
+ { "Icircumflex", 389, NULL },
+ { "guillemotleft", 500, NULL },
+ { "germandbls", 500, NULL },
+ { "Amacron", 667, NULL },
+ { "seven", 500, NULL },
+ { "Sacute", 556, NULL },
+ { "ordmasculine", 300, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 500, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 389, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 500, NULL },
+ { "cacute", 444, NULL },
+ { "Ecaron", 667, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 348, NULL },
+ { "quotedblright", 500, NULL },
+ { "amacron", 500, NULL },
+ { "sacute", 389, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 500, NULL },
+ { "currency", 500, NULL },
+ { "logicalnot", 606, NULL },
+ { "zdotaccent", 389, NULL },
+ { "Atilde", 667, NULL },
+ { "breve", 333, NULL },
+ { "bar", 220, NULL },
+ { "fraction", 167, NULL },
+ { "less", 570, NULL },
+ { "ecaron", 444, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 389, NULL },
+ { "period", 250, NULL },
+ { "Rcaron", 667, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "greater", 570, NULL },
+ { "atilde", 500, NULL },
+ { "brokenbar", 220, NULL },
+ { "quoteleft", 333, NULL },
+ { "Edotaccent", 667, NULL },
+ { "onesuperior", 300, NULL }
+};
+
+static BuiltinFontWidth timesItalicWidthsTab[] = {
+ { "Ntilde", 667, NULL },
+ { "rcaron", 389, NULL },
+ { "kcommaaccent", 444, NULL },
+ { "Ncommaaccent", 667, NULL },
+ { "Zacute", 556, NULL },
+ { "comma", 250, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 675, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 444, NULL },
+ { "asciitilde", 541, NULL },
+ { "colon", 333, NULL },
+ { "onehalf", 750, NULL },
+ { "dollar", 500, NULL },
+ { "Lcaron", 611, NULL },
+ { "ntilde", 500, NULL },
+ { "Aogonek", 611, NULL },
+ { "ncommaaccent", 500, NULL },
+ { "minus", 675, NULL },
+ { "Iogonek", 333, NULL },
+ { "zacute", 389, NULL },
+ { "yen", 500, NULL },
+ { "space", 250, NULL },
+ { "Omacron", 722, NULL },
+ { "questiondown", 500, NULL },
+ { "emdash", 889, NULL },
+ { "Agrave", 611, NULL },
+ { "three", 500, NULL },
+ { "numbersign", 500, NULL },
+ { "lcaron", 300, NULL },
+ { "A", 611, NULL },
+ { "B", 611, NULL },
+ { "C", 667, NULL },
+ { "aogonek", 500, NULL },
+ { "D", 722, NULL },
+ { "E", 611, NULL },
+ { "onequarter", 750, NULL },
+ { "F", 611, NULL },
+ { "G", 722, NULL },
+ { "H", 722, NULL },
+ { "I", 333, NULL },
+ { "J", 444, NULL },
+ { "K", 667, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 556, NULL },
+ { "periodcentered", 250, NULL },
+ { "M", 833, NULL },
+ { "N", 667, NULL },
+ { "omacron", 500, NULL },
+ { "Tcommaaccent", 556, NULL },
+ { "O", 722, NULL },
+ { "P", 611, NULL },
+ { "Q", 722, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 611, NULL },
+ { "Aacute", 611, NULL },
+ { "caron", 333, NULL },
+ { "S", 500, NULL },
+ { "T", 556, NULL },
+ { "U", 722, NULL },
+ { "agrave", 500, NULL },
+ { "V", 611, NULL },
+ { "W", 833, NULL },
+ { "X", 611, NULL },
+ { "question", 500, NULL },
+ { "equal", 675, NULL },
+ { "Y", 556, NULL },
+ { "Z", 556, NULL },
+ { "four", 500, NULL },
+ { "a", 500, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "b", 500, NULL },
+ { "c", 444, NULL },
+ { "d", 500, NULL },
+ { "e", 444, NULL },
+ { "f", 278, NULL },
+ { "g", 500, NULL },
+ { "bullet", 350, NULL },
+ { "h", 500, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 722, NULL },
+ { "dagger", 500, NULL },
+ { "j", 278, NULL },
+ { "k", 444, NULL },
+ { "l", 278, NULL },
+ { "m", 722, NULL },
+ { "n", 500, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "o", 500, NULL },
+ { "ordfeminine", 276, NULL },
+ { "ring", 333, NULL },
+ { "p", 500, NULL },
+ { "q", 500, NULL },
+ { "uhungarumlaut", 500, NULL },
+ { "r", 389, NULL },
+ { "twosuperior", 300, NULL },
+ { "aacute", 500, NULL },
+ { "s", 389, NULL },
+ { "OE", 944, NULL },
+ { "t", 278, NULL },
+ { "divide", 675, NULL },
+ { "u", 500, NULL },
+ { "Ccaron", 667, NULL },
+ { "v", 444, NULL },
+ { "w", 667, NULL },
+ { "x", 444, NULL },
+ { "y", 444, NULL },
+ { "z", 389, NULL },
+ { "Gbreve", 722, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 333, NULL },
+ { "Nacute", 667, NULL },
+ { "quotedbl", 420, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "mu", 500, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 500, NULL },
+ { "Lslash", 556, NULL },
+ { "semicolon", 333, NULL },
+ { "oslash", 500, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 471, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 444, NULL },
+ { "Ecircumflex", 611, NULL },
+ { "gbreve", 500, NULL },
+ { "trademark", 980, NULL },
+ { "daggerdbl", 500, NULL },
+ { "nacute", 500, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 722, NULL },
+ { "Emacron", 611, NULL },
+ { "ellipsis", 889, NULL },
+ { "scaron", 389, NULL },
+ { "AE", 889, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 556, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 214, NULL },
+ { "eight", 500, NULL },
+ { "exclamdown", 389, NULL },
+ { "endash", 500, NULL },
+ { "oe", 667, NULL },
+ { "Abreve", 611, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Adieresis", 611, NULL },
+ { "copyright", 760, NULL },
+ { "Egrave", 611, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 611, NULL },
+ { "otilde", 500, NULL },
+ { "Idieresis", 333, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 500, NULL },
+ { "emacron", 444, NULL },
+ { "Odieresis", 722, NULL },
+ { "ucircumflex", 500, NULL },
+ { "bracketleft", 389, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 333, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 556, NULL },
+ { "umacron", 500, NULL },
+ { "abreve", 500, NULL },
+ { "Eacute", 611, NULL },
+ { "adieresis", 500, NULL },
+ { "egrave", 444, NULL },
+ { "edieresis", 444, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 667, NULL },
+ { "asterisk", 500, NULL },
+ { "odieresis", 500, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 500, NULL },
+ { "nine", 500, NULL },
+ { "five", 500, NULL },
+ { "udieresis", 500, NULL },
+ { "Zcaron", 556, NULL },
+ { "Scommaaccent", 500, NULL },
+ { "threequarters", 750, NULL },
+ { "guillemotright", 500, NULL },
+ { "Ccedilla", 667, NULL },
+ { "ydieresis", 444, NULL },
+ { "tilde", 333, NULL },
+ { "at", 920, NULL },
+ { "eacute", 444, NULL },
+ { "underscore", 500, NULL },
+ { "Euro", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 675, NULL },
+ { "zero", 500, NULL },
+ { "eth", 500, NULL },
+ { "Scedilla", 500, NULL },
+ { "Ograve", 722, NULL },
+ { "Racute", 611, NULL },
+ { "partialdiff", 476, NULL },
+ { "uacute", 500, NULL },
+ { "braceleft", 400, NULL },
+ { "Thorn", 611, NULL },
+ { "zcaron", 389, NULL },
+ { "scommaaccent", 389, NULL },
+ { "ccedilla", 444, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 500, NULL },
+ { "Ocircumflex", 722, NULL },
+ { "Oacute", 722, NULL },
+ { "scedilla", 389, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 500, NULL },
+ { "racute", 389, NULL },
+ { "Tcaron", 556, NULL },
+ { "Eogonek", 611, NULL },
+ { "thorn", 500, NULL },
+ { "degree", 400, NULL },
+ { "registered", 760, NULL },
+ { "radical", 453, NULL },
+ { "Aring", 611, NULL },
+ { "percent", 833, NULL },
+ { "six", 500, NULL },
+ { "paragraph", 523, NULL },
+ { "dcaron", 544, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 500, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 333, NULL },
+ { "Lacute", 556, NULL },
+ { "ocircumflex", 500, NULL },
+ { "oacute", 500, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "tcaron", 300, NULL },
+ { "eogonek", 444, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "asciicircum", 422, NULL },
+ { "aring", 500, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 500, NULL },
+ { "bracketright", 389, NULL },
+ { "Iacute", 333, NULL },
+ { "ampersand", 778, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 667, NULL },
+ { "plus", 675, NULL },
+ { "uring", 500, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 556, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "threesuperior", 300, NULL },
+ { "acute", 333, NULL },
+ { "section", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 556, NULL },
+ { "ncaron", 500, NULL },
+ { "florin", 500, NULL },
+ { "yacute", 444, NULL },
+ { "Rcommaaccent", 611, NULL },
+ { "fi", 500, NULL },
+ { "fl", 500, NULL },
+ { "Acircumflex", 611, NULL },
+ { "Cacute", 667, NULL },
+ { "Icircumflex", 333, NULL },
+ { "guillemotleft", 500, NULL },
+ { "germandbls", 500, NULL },
+ { "Amacron", 611, NULL },
+ { "seven", 500, NULL },
+ { "Sacute", 500, NULL },
+ { "ordmasculine", 310, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 500, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 333, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Zdotaccent", 556, NULL },
+ { "acircumflex", 500, NULL },
+ { "cacute", 444, NULL },
+ { "Ecaron", 611, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 400, NULL },
+ { "quotedblright", 556, NULL },
+ { "amacron", 500, NULL },
+ { "sacute", 389, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 500, NULL },
+ { "currency", 500, NULL },
+ { "logicalnot", 675, NULL },
+ { "zdotaccent", 389, NULL },
+ { "Atilde", 611, NULL },
+ { "breve", 333, NULL },
+ { "bar", 275, NULL },
+ { "fraction", 167, NULL },
+ { "less", 675, NULL },
+ { "ecaron", 444, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 333, NULL },
+ { "period", 250, NULL },
+ { "Rcaron", 611, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "greater", 675, NULL },
+ { "atilde", 500, NULL },
+ { "brokenbar", 275, NULL },
+ { "quoteleft", 333, NULL },
+ { "Edotaccent", 611, NULL },
+ { "onesuperior", 300, NULL }
+};
+
+static BuiltinFontWidth timesRomanWidthsTab[] = {
+ { "Ntilde", 722, NULL },
+ { "rcaron", 333, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "comma", 250, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 564, NULL },
+ { "circumflex", 333, NULL },
+ { "dotaccent", 333, NULL },
+ { "edotaccent", 444, NULL },
+ { "asciitilde", 541, NULL },
+ { "colon", 278, NULL },
+ { "onehalf", 750, NULL },
+ { "dollar", 500, NULL },
+ { "Lcaron", 611, NULL },
+ { "ntilde", 500, NULL },
+ { "Aogonek", 722, NULL },
+ { "ncommaaccent", 500, NULL },
+ { "minus", 564, NULL },
+ { "Iogonek", 333, NULL },
+ { "zacute", 444, NULL },
+ { "yen", 500, NULL },
+ { "space", 250, NULL },
+ { "Omacron", 722, NULL },
+ { "questiondown", 444, NULL },
+ { "emdash", 1000, NULL },
+ { "Agrave", 722, NULL },
+ { "three", 500, NULL },
+ { "numbersign", 500, NULL },
+ { "lcaron", 344, NULL },
+ { "A", 722, NULL },
+ { "B", 667, NULL },
+ { "C", 667, NULL },
+ { "aogonek", 444, NULL },
+ { "D", 722, NULL },
+ { "E", 611, NULL },
+ { "onequarter", 750, NULL },
+ { "F", 556, NULL },
+ { "G", 722, NULL },
+ { "H", 722, NULL },
+ { "I", 333, NULL },
+ { "J", 389, NULL },
+ { "K", 722, NULL },
+ { "iogonek", 278, NULL },
+ { "backslash", 278, NULL },
+ { "L", 611, NULL },
+ { "periodcentered", 250, NULL },
+ { "M", 889, NULL },
+ { "N", 722, NULL },
+ { "omacron", 500, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "O", 722, NULL },
+ { "P", 556, NULL },
+ { "Q", 722, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "R", 667, NULL },
+ { "Aacute", 722, NULL },
+ { "caron", 333, NULL },
+ { "S", 556, NULL },
+ { "T", 611, NULL },
+ { "U", 722, NULL },
+ { "agrave", 444, NULL },
+ { "V", 722, NULL },
+ { "W", 944, NULL },
+ { "X", 722, NULL },
+ { "question", 444, NULL },
+ { "equal", 564, NULL },
+ { "Y", 722, NULL },
+ { "Z", 611, NULL },
+ { "four", 500, NULL },
+ { "a", 444, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "b", 500, NULL },
+ { "c", 444, NULL },
+ { "d", 500, NULL },
+ { "e", 444, NULL },
+ { "f", 333, NULL },
+ { "g", 500, NULL },
+ { "bullet", 350, NULL },
+ { "h", 500, NULL },
+ { "i", 278, NULL },
+ { "Oslash", 722, NULL },
+ { "dagger", 500, NULL },
+ { "j", 278, NULL },
+ { "k", 500, NULL },
+ { "l", 278, NULL },
+ { "m", 778, NULL },
+ { "n", 500, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "o", 500, NULL },
+ { "ordfeminine", 276, NULL },
+ { "ring", 333, NULL },
+ { "p", 500, NULL },
+ { "q", 500, NULL },
+ { "uhungarumlaut", 500, NULL },
+ { "r", 333, NULL },
+ { "twosuperior", 300, NULL },
+ { "aacute", 444, NULL },
+ { "s", 389, NULL },
+ { "OE", 889, NULL },
+ { "t", 278, NULL },
+ { "divide", 564, NULL },
+ { "u", 500, NULL },
+ { "Ccaron", 667, NULL },
+ { "v", 500, NULL },
+ { "w", 722, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
+ { "z", 444, NULL },
+ { "Gbreve", 722, NULL },
+ { "commaaccent", 250, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Idotaccent", 333, NULL },
+ { "Nacute", 722, NULL },
+ { "quotedbl", 408, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "mu", 500, NULL },
+ { "greaterequal", 549, NULL },
+ { "Scaron", 556, NULL },
+ { "Lslash", 611, NULL },
+ { "semicolon", 278, NULL },
+ { "oslash", 500, NULL },
+ { "lessequal", 549, NULL },
+ { "lozenge", 471, NULL },
+ { "parenright", 333, NULL },
+ { "ccaron", 444, NULL },
+ { "Ecircumflex", 611, NULL },
+ { "gbreve", 500, NULL },
+ { "trademark", 980, NULL },
+ { "daggerdbl", 500, NULL },
+ { "nacute", 500, NULL },
+ { "macron", 333, NULL },
+ { "Otilde", 722, NULL },
+ { "Emacron", 611, NULL },
+ { "ellipsis", 1000, NULL },
+ { "scaron", 389, NULL },
+ { "AE", 889, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lslash", 278, NULL },
+ { "quotedblleft", 444, NULL },
+ { "guilsinglright", 333, NULL },
+ { "hyphen", 333, NULL },
+ { "quotesingle", 180, NULL },
+ { "eight", 500, NULL },
+ { "exclamdown", 333, NULL },
+ { "endash", 500, NULL },
+ { "oe", 722, NULL },
+ { "Abreve", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Adieresis", 722, NULL },
+ { "copyright", 760, NULL },
+ { "Egrave", 611, NULL },
+ { "slash", 278, NULL },
+ { "Edieresis", 611, NULL },
+ { "otilde", 500, NULL },
+ { "Idieresis", 333, NULL },
+ { "parenleft", 333, NULL },
+ { "one", 500, NULL },
+ { "emacron", 444, NULL },
+ { "Odieresis", 722, NULL },
+ { "ucircumflex", 500, NULL },
+ { "bracketleft", 333, NULL },
+ { "Ugrave", 722, NULL },
+ { "quoteright", 333, NULL },
+ { "Udieresis", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Ydieresis", 722, NULL },
+ { "umacron", 500, NULL },
+ { "abreve", 444, NULL },
+ { "Eacute", 611, NULL },
+ { "adieresis", 444, NULL },
+ { "egrave", 444, NULL },
+ { "edieresis", 444, NULL },
+ { "idieresis", 278, NULL },
+ { "Eth", 722, NULL },
+ { "ae", 667, NULL },
+ { "asterisk", 500, NULL },
+ { "odieresis", 500, NULL },
+ { "Uacute", 722, NULL },
+ { "ugrave", 500, NULL },
+ { "nine", 500, NULL },
+ { "five", 500, NULL },
+ { "udieresis", 500, NULL },
+ { "Zcaron", 611, NULL },
+ { "Scommaaccent", 556, NULL },
+ { "threequarters", 750, NULL },
+ { "guillemotright", 500, NULL },
+ { "Ccedilla", 667, NULL },
+ { "ydieresis", 500, NULL },
+ { "tilde", 333, NULL },
+ { "at", 921, NULL },
+ { "eacute", 444, NULL },
+ { "underscore", 500, NULL },
+ { "Euro", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "multiply", 564, NULL },
+ { "zero", 500, NULL },
+ { "eth", 500, NULL },
+ { "Scedilla", 556, NULL },
+ { "Ograve", 722, NULL },
+ { "Racute", 667, NULL },
+ { "partialdiff", 476, NULL },
+ { "uacute", 500, NULL },
+ { "braceleft", 480, NULL },
+ { "Thorn", 556, NULL },
+ { "zcaron", 444, NULL },
+ { "scommaaccent", 389, NULL },
+ { "ccedilla", 444, NULL },
+ { "Dcaron", 722, NULL },
+ { "dcroat", 500, NULL },
+ { "Ocircumflex", 722, NULL },
+ { "Oacute", 722, NULL },
+ { "scedilla", 389, NULL },
+ { "ogonek", 333, NULL },
+ { "ograve", 500, NULL },
+ { "racute", 333, NULL },
+ { "Tcaron", 611, NULL },
+ { "Eogonek", 611, NULL },
+ { "thorn", 500, NULL },
+ { "degree", 400, NULL },
+ { "registered", 760, NULL },
+ { "radical", 453, NULL },
+ { "Aring", 722, NULL },
+ { "percent", 833, NULL },
+ { "six", 500, NULL },
+ { "paragraph", 453, NULL },
+ { "dcaron", 588, NULL },
+ { "Uogonek", 722, NULL },
+ { "two", 500, NULL },
+ { "summation", 600, NULL },
+ { "Igrave", 333, NULL },
+ { "Lacute", 611, NULL },
+ { "ocircumflex", 500, NULL },
+ { "oacute", 500, NULL },
+ { "Uring", 722, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "tcaron", 326, NULL },
+ { "eogonek", 444, NULL },
+ { "Delta", 612, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "asciicircum", 469, NULL },
+ { "aring", 444, NULL },
+ { "grave", 333, NULL },
+ { "uogonek", 500, NULL },
+ { "bracketright", 333, NULL },
+ { "Iacute", 333, NULL },
+ { "ampersand", 778, NULL },
+ { "igrave", 278, NULL },
+ { "lacute", 278, NULL },
+ { "Ncaron", 722, NULL },
+ { "plus", 564, NULL },
+ { "uring", 500, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "Yacute", 722, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "threesuperior", 300, NULL },
+ { "acute", 333, NULL },
+ { "section", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "iacute", 278, NULL },
+ { "quotedblbase", 444, NULL },
+ { "ncaron", 500, NULL },
+ { "florin", 500, NULL },
+ { "yacute", 500, NULL },
+ { "Rcommaaccent", 667, NULL },
+ { "fi", 556, NULL },
+ { "fl", 556, NULL },
+ { "Acircumflex", 722, NULL },
+ { "Cacute", 667, NULL },
+ { "Icircumflex", 333, NULL },
+ { "guillemotleft", 500, NULL },
+ { "germandbls", 500, NULL },
+ { "Amacron", 722, NULL },
+ { "seven", 500, NULL },
+ { "Sacute", 556, NULL },
+ { "ordmasculine", 310, NULL },
+ { "dotlessi", 278, NULL },
+ { "sterling", 500, NULL },
+ { "notequal", 549, NULL },
+ { "Imacron", 333, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "acircumflex", 444, NULL },
+ { "cacute", 444, NULL },
+ { "Ecaron", 611, NULL },
+ { "icircumflex", 278, NULL },
+ { "braceright", 480, NULL },
+ { "quotedblright", 444, NULL },
+ { "amacron", 444, NULL },
+ { "sacute", 389, NULL },
+ { "imacron", 278, NULL },
+ { "cent", 500, NULL },
+ { "currency", 500, NULL },
+ { "logicalnot", 564, NULL },
+ { "zdotaccent", 444, NULL },
+ { "Atilde", 722, NULL },
+ { "breve", 333, NULL },
+ { "bar", 200, NULL },
+ { "fraction", 167, NULL },
+ { "less", 564, NULL },
+ { "ecaron", 444, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "exclam", 333, NULL },
+ { "period", 250, NULL },
+ { "Rcaron", 667, NULL },
+ { "Kcommaaccent", 722, NULL },
+ { "greater", 564, NULL },
+ { "atilde", 444, NULL },
+ { "brokenbar", 200, NULL },
+ { "quoteleft", 333, NULL },
+ { "Edotaccent", 611, NULL },
+ { "onesuperior", 300, NULL }
+};
+
+static BuiltinFontWidth zapfDingbatsWidthsTab[] = {
+ { "a81", 438, NULL },
+ { "a82", 138, NULL },
+ { "a83", 277, NULL },
+ { "a84", 415, NULL },
+ { "a85", 509, NULL },
+ { "a86", 410, NULL },
+ { "a87", 234, NULL },
+ { "a88", 234, NULL },
+ { "a89", 390, NULL },
+ { "a140", 788, NULL },
+ { "a141", 788, NULL },
+ { "a142", 788, NULL },
+ { "a143", 788, NULL },
+ { "a144", 788, NULL },
+ { "a145", 788, NULL },
+ { "a146", 788, NULL },
+ { "a147", 788, NULL },
+ { "a148", 788, NULL },
+ { "a149", 788, NULL },
+ { "a90", 390, NULL },
+ { "a91", 276, NULL },
+ { "a92", 276, NULL },
+ { "space", 278, NULL },
+ { "a93", 317, NULL },
+ { "a94", 317, NULL },
+ { "a95", 334, NULL },
+ { "a96", 334, NULL },
+ { "a97", 392, NULL },
+ { "a98", 392, NULL },
+ { "a99", 668, NULL },
+ { "a150", 788, NULL },
+ { "a151", 788, NULL },
+ { "a152", 788, NULL },
+ { "a153", 788, NULL },
+ { "a154", 788, NULL },
+ { "a155", 788, NULL },
+ { "a156", 788, NULL },
+ { "a157", 788, NULL },
+ { "a158", 788, NULL },
+ { "a159", 788, NULL },
+ { "a160", 894, NULL },
+ { "a161", 838, NULL },
+ { "a162", 924, NULL },
+ { "a163", 1016, NULL },
+ { "a164", 458, NULL },
+ { "a165", 924, NULL },
+ { "a166", 918, NULL },
+ { "a167", 927, NULL },
+ { "a168", 928, NULL },
+ { "a169", 928, NULL },
+ { "a170", 834, NULL },
+ { "a171", 873, NULL },
+ { "a172", 828, NULL },
+ { "a173", 924, NULL },
+ { "a174", 917, NULL },
+ { "a175", 930, NULL },
+ { "a176", 931, NULL },
+ { "a177", 463, NULL },
+ { "a178", 883, NULL },
+ { "a179", 836, NULL },
+ { "a180", 867, NULL },
+ { "a181", 696, NULL },
+ { "a182", 874, NULL },
+ { "a183", 760, NULL },
+ { "a184", 946, NULL },
+ { "a185", 865, NULL },
+ { "a186", 967, NULL },
+ { "a187", 831, NULL },
+ { "a188", 873, NULL },
+ { "a189", 927, NULL },
+ { "a1", 974, NULL },
+ { "a2", 961, NULL },
+ { "a3", 980, NULL },
+ { "a4", 719, NULL },
+ { "a5", 789, NULL },
+ { "a6", 494, NULL },
+ { "a7", 552, NULL },
+ { "a8", 537, NULL },
+ { "a9", 577, NULL },
+ { "a190", 970, NULL },
+ { "a191", 918, NULL },
+ { "a192", 748, NULL },
+ { "a193", 836, NULL },
+ { "a194", 771, NULL },
+ { "a195", 888, NULL },
+ { "a196", 748, NULL },
+ { "a197", 771, NULL },
+ { "a198", 888, NULL },
+ { "a199", 867, NULL },
+ { "a10", 692, NULL },
+ { "a11", 960, NULL },
+ { "a12", 939, NULL },
+ { "a13", 549, NULL },
+ { "a14", 855, NULL },
+ { "a15", 911, NULL },
+ { "a16", 933, NULL },
+ { "a17", 945, NULL },
+ { "a18", 974, NULL },
+ { "a19", 755, NULL },
+ { "a20", 846, NULL },
+ { "a21", 762, NULL },
+ { "a22", 761, NULL },
+ { "a23", 571, NULL },
+ { "a24", 677, NULL },
+ { "a25", 763, NULL },
+ { "a26", 760, NULL },
+ { "a27", 759, NULL },
+ { "a28", 754, NULL },
+ { "a29", 786, NULL },
+ { "a30", 788, NULL },
+ { "a31", 788, NULL },
+ { "a32", 790, NULL },
+ { "a33", 793, NULL },
+ { "a34", 794, NULL },
+ { "a35", 816, NULL },
+ { "a36", 823, NULL },
+ { "a37", 789, NULL },
+ { "a38", 841, NULL },
+ { "a39", 823, NULL },
+ { "a40", 833, NULL },
+ { "a41", 816, NULL },
+ { "a42", 831, NULL },
+ { "a43", 923, NULL },
+ { "a44", 744, NULL },
+ { "a45", 723, NULL },
+ { "a46", 749, NULL },
+ { "a47", 790, NULL },
+ { "a48", 792, NULL },
+ { "a49", 695, NULL },
+ { "a100", 668, NULL },
+ { "a101", 732, NULL },
+ { "a102", 544, NULL },
+ { "a103", 544, NULL },
+ { "a104", 910, NULL },
+ { "a105", 911, NULL },
+ { "a106", 667, NULL },
+ { "a107", 760, NULL },
+ { "a108", 760, NULL },
+ { "a109", 626, NULL },
+ { "a50", 776, NULL },
+ { "a51", 768, NULL },
+ { "a52", 792, NULL },
+ { "a53", 759, NULL },
+ { "a54", 707, NULL },
+ { "a55", 708, NULL },
+ { "a56", 682, NULL },
+ { "a57", 701, NULL },
+ { "a58", 826, NULL },
+ { "a59", 815, NULL },
+ { "a110", 694, NULL },
+ { "a111", 595, NULL },
+ { "a112", 776, NULL },
+ { "a117", 690, NULL },
+ { "a118", 791, NULL },
+ { "a119", 790, NULL },
+ { "a60", 789, NULL },
+ { "a61", 789, NULL },
+ { "a62", 707, NULL },
+ { "a63", 687, NULL },
+ { "a64", 696, NULL },
+ { "a65", 689, NULL },
+ { "a66", 786, NULL },
+ { "a67", 787, NULL },
+ { "a68", 713, NULL },
+ { "a69", 791, NULL },
+ { "a200", 696, NULL },
+ { "a201", 874, NULL },
+ { "a120", 788, NULL },
+ { "a121", 788, NULL },
+ { "a202", 974, NULL },
+ { "a122", 788, NULL },
+ { "a203", 762, NULL },
+ { "a123", 788, NULL },
+ { "a204", 759, NULL },
+ { "a124", 788, NULL },
+ { "a205", 509, NULL },
+ { "a125", 788, NULL },
+ { "a206", 410, NULL },
+ { "a126", 788, NULL },
+ { "a127", 788, NULL },
+ { "a128", 788, NULL },
+ { "a129", 788, NULL },
+ { "a70", 785, NULL },
+ { "a71", 791, NULL },
+ { "a72", 873, NULL },
+ { "a73", 761, NULL },
+ { "a74", 762, NULL },
+ { "a75", 759, NULL },
+ { "a76", 892, NULL },
+ { "a77", 892, NULL },
+ { "a78", 788, NULL },
+ { "a79", 784, NULL },
+ { "a130", 788, NULL },
+ { "a131", 788, NULL },
+ { "a132", 788, NULL },
+ { "a133", 788, NULL },
+ { "a134", 788, NULL },
+ { "a135", 788, NULL },
+ { "a136", 788, NULL },
+ { "a137", 788, NULL },
+ { "a138", 788, NULL },
+ { "a139", 788, NULL }
+};
+
+BuiltinFont builtinFonts[] = {
+ { "Courier", standardEncoding, 629, -157, { -23, -250, 715, 805}, NULL },
+ { "Courier-Bold", standardEncoding, 629, -157, {-113, -250, 749, 801}, NULL },
+ { "Courier-BoldOblique", standardEncoding, 629, -157, { -57, -250, 869, 801}, NULL },
+ { "Courier-Oblique", standardEncoding, 629, -157, { -27, -250, 849, 805}, NULL },
+ { "Helvetica", standardEncoding, 718, -207, {-166, -225, 1000, 931}, NULL },
+ { "Helvetica-Bold", standardEncoding, 718, -207, {-170, -228, 1003, 962}, NULL },
+ { "Helvetica-BoldOblique", standardEncoding, 718, -207, {-174, -228, 1114, 962}, NULL },
+ { "Helvetica-Oblique", standardEncoding, 718, -207, {-170, -225, 1116, 931}, NULL },
+ { "Symbol", symbolEncoding, 1010, -293, {-180, -293, 1090, 1010}, NULL },
+ { "Times-Bold", standardEncoding, 683, -217, {-168, -218, 1000, 935}, NULL },
+ { "Times-BoldItalic", standardEncoding, 683, -217, {-200, -218, 996, 921}, NULL },
+ { "Times-Italic", standardEncoding, 683, -217, {-169, -217, 1010, 883}, NULL },
+ { "Times-Roman", standardEncoding, 683, -217, {-168, -218, 1000, 898}, NULL },
+ { "ZapfDingbats", zapfDingbatsEncoding, 820, -143, { -1, -143, 981, 820}, NULL }
+};
+
+BuiltinFont *builtinFontSubst[] = {
+ &builtinFonts[0],
+ &builtinFonts[3],
+ &builtinFonts[1],
+ &builtinFonts[2],
+ &builtinFonts[4],
+ &builtinFonts[7],
+ &builtinFonts[5],
+ &builtinFonts[6],
+ &builtinFonts[12],
+ &builtinFonts[11],
+ &builtinFonts[9],
+ &builtinFonts[10]
+};
+
+void initBuiltinFontTables() {
+ builtinFonts[0].widths = new BuiltinFontWidths(courierWidthsTab, 315);
+ builtinFonts[1].widths = new BuiltinFontWidths(courierBoldWidthsTab, 315);
+ builtinFonts[2].widths = new BuiltinFontWidths(courierBoldObliqueWidthsTab, 315);
+ builtinFonts[3].widths = new BuiltinFontWidths(courierObliqueWidthsTab, 315);
+ builtinFonts[4].widths = new BuiltinFontWidths(helveticaWidthsTab, 315);
+ builtinFonts[5].widths = new BuiltinFontWidths(helveticaBoldWidthsTab, 316);
+ builtinFonts[6].widths = new BuiltinFontWidths(helveticaBoldObliqueWidthsTab, 315);
+ builtinFonts[7].widths = new BuiltinFontWidths(helveticaObliqueWidthsTab, 315);
+ builtinFonts[8].widths = new BuiltinFontWidths(symbolWidthsTab, 190);
+ builtinFonts[9].widths = new BuiltinFontWidths(timesBoldWidthsTab, 315);
+ builtinFonts[10].widths = new BuiltinFontWidths(timesBoldItalicWidthsTab, 315);
+ builtinFonts[11].widths = new BuiltinFontWidths(timesItalicWidthsTab, 315);
+ builtinFonts[12].widths = new BuiltinFontWidths(timesRomanWidthsTab, 315);
+ builtinFonts[13].widths = new BuiltinFontWidths(zapfDingbatsWidthsTab, 202);
+}
+
+void freeBuiltinFontTables() {
+ int i;
+
+ for (i = 0; i < 14; ++i) {
+ delete builtinFonts[i].widths;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.h
new file mode 100644
index 00000000000..eb45549efd2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/BuiltinFontTables.h
@@ -0,0 +1,23 @@
+//========================================================================
+//
+// BuiltinFontTables.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef BUILTINFONTTABLES_H
+#define BUILTINFONTTABLES_H
+
+#include "BuiltinFont.h"
+
+#define nBuiltinFonts 14
+#define nBuiltinFontSubsts 12
+
+extern BuiltinFont builtinFonts[nBuiltinFonts];
+extern BuiltinFont *builtinFontSubst[nBuiltinFontSubsts];
+
+extern void initBuiltinFontTables();
+extern void freeBuiltinFontTables();
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.cc
new file mode 100644
index 00000000000..0e861c017f8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.cc
@@ -0,0 +1,469 @@
+//========================================================================
+//
+// CMap.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "goo/GooString.h"
+#include "Error.h"
+#include "GlobalParams.h"
+#include "PSTokenizer.h"
+#include "CMap.h"
+#include "Object.h"
+
+//------------------------------------------------------------------------
+
+struct CMapVectorEntry {
+ GBool isVector;
+ union {
+ CMapVectorEntry *vector;
+ CID cid;
+ };
+};
+
+//------------------------------------------------------------------------
+
+static int getCharFromFile(void *data) {
+ return fgetc((FILE *)data);
+}
+
+static int getCharFromStream(void *data) {
+ return ((Stream *)data)->getChar();
+}
+
+//------------------------------------------------------------------------
+
+CMap *CMap::parse(CMapCache *cache, GooString *collectionA,
+ GooString *cMapNameA, Stream *stream) {
+ FILE *f = NULL;
+ CMap *cmap;
+ PSTokenizer *pst;
+ char tok1[256], tok2[256], tok3[256];
+ int n1, n2, n3;
+ Guint start, end, code;
+
+ if (stream) {
+ stream->reset();
+ pst = new PSTokenizer(&getCharFromStream, stream);
+ } else {
+ if (!(f = globalParams->findCMapFile(collectionA, cMapNameA))) {
+
+ // Check for an identity CMap.
+ if (!cMapNameA->cmp("Identity") || !cMapNameA->cmp("Identity-H")) {
+ return new CMap(collectionA->copy(), cMapNameA->copy(), 0);
+ }
+ if (!cMapNameA->cmp("Identity-V")) {
+ return new CMap(collectionA->copy(), cMapNameA->copy(), 1);
+ }
+
+ error(-1, "Couldn't find '%s' CMap file for '%s' collection",
+ cMapNameA->getCString(), collectionA->getCString());
+ return NULL;
+ }
+ pst = new PSTokenizer(&getCharFromFile, f);
+ }
+
+ cmap = new CMap(collectionA->copy(), cMapNameA->copy());
+
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ while (pst->getToken(tok2, sizeof(tok2), &n2)) {
+ if (!strcmp(tok2, "usecmap")) {
+ if (tok1[0] == '/') {
+ cmap->useCMap(cache, tok1 + 1);
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok1, "/WMode")) {
+ cmap->wMode = atoi(tok2);
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok2, "begincodespacerange")) {
+ while (pst->getToken(tok1, sizeof(tok1), &n1)) {
+ if (!strcmp(tok1, "endcodespacerange")) {
+ break;
+ }
+ if (!pst->getToken(tok2, sizeof(tok2), &n2) ||
+ !strcmp(tok2, "endcodespacerange")) {
+ error(-1, "Illegal entry in codespacerange block in CMap");
+ break;
+ }
+ if (tok1[0] == '<' && tok2[0] == '<' &&
+ n1 == n2 && n1 >= 4 && (n1 & 1) == 0) {
+ tok1[n1 - 1] = tok2[n1 - 1] = '\0';
+ sscanf(tok1 + 1, "%x", &start);
+ sscanf(tok2 + 1, "%x", &end);
+ n1 = (n1 - 2) / 2;
+ cmap->addCodeSpace(cmap->vector, start, end, n1);
+ }
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok2, "begincidchar")) {
+ while (pst->getToken(tok1, sizeof(tok1), &n1)) {
+ if (!strcmp(tok1, "endcidchar")) {
+ break;
+ }
+ if (!pst->getToken(tok2, sizeof(tok2), &n2) ||
+ !strcmp(tok2, "endcidchar")) {
+ error(-1, "Illegal entry in cidchar block in CMap");
+ break;
+ }
+ if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' &&
+ n1 >= 4 && (n1 & 1) == 0)) {
+ error(-1, "Illegal entry in cidchar block in CMap");
+ continue;
+ }
+ tok1[n1 - 1] = '\0';
+ if (sscanf(tok1 + 1, "%x", &code) != 1) {
+ error(-1, "Illegal entry in cidchar block in CMap");
+ continue;
+ }
+ n1 = (n1 - 2) / 2;
+ cmap->addCIDs(code, code, n1, (CID)atoi(tok2));
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok2, "begincidrange")) {
+ while (pst->getToken(tok1, sizeof(tok1), &n1)) {
+ if (!strcmp(tok1, "endcidrange")) {
+ break;
+ }
+ if (!pst->getToken(tok2, sizeof(tok2), &n2) ||
+ !strcmp(tok2, "endcidrange") ||
+ !pst->getToken(tok3, sizeof(tok3), &n3) ||
+ !strcmp(tok3, "endcidrange")) {
+ error(-1, "Illegal entry in cidrange block in CMap");
+ break;
+ }
+ if (tok1[0] == '<' && tok2[0] == '<' &&
+ n1 == n2 && n1 >= 4 && (n1 & 1) == 0) {
+ tok1[n1 - 1] = tok2[n1 - 1] = '\0';
+ sscanf(tok1 + 1, "%x", &start);
+ sscanf(tok2 + 1, "%x", &end);
+ n1 = (n1 - 2) / 2;
+ cmap->addCIDs(start, end, n1, (CID)atoi(tok3));
+ }
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else {
+ strcpy(tok1, tok2);
+ }
+ }
+ delete pst;
+
+ if (f) {
+ fclose(f);
+ }
+
+ return cmap;
+}
+
+CMap::CMap(GooString *collectionA, GooString *cMapNameA) {
+ int i;
+
+ collection = collectionA;
+ cMapName = cMapNameA;
+ wMode = 0;
+ vector = (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry));
+ for (i = 0; i < 256; ++i) {
+ vector[i].isVector = gFalse;
+ vector[i].cid = 0;
+ }
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+CMap::CMap(GooString *collectionA, GooString *cMapNameA, int wModeA) {
+ collection = collectionA;
+ cMapName = cMapNameA;
+ wMode = wModeA;
+ vector = NULL;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+void CMap::useCMap(CMapCache *cache, char *useName) {
+ GooString *useNameStr;
+ CMap *subCMap;
+
+ useNameStr = new GooString(useName);
+ subCMap = cache->getCMap(collection, useNameStr, NULL);
+ delete useNameStr;
+ if (!subCMap) {
+ return;
+ }
+ copyVector(vector, subCMap->vector);
+ subCMap->decRefCnt();
+}
+
+void CMap::copyVector(CMapVectorEntry *dest, CMapVectorEntry *src) {
+ int i, j;
+
+ for (i = 0; i < 256; ++i) {
+ if (src[i].isVector) {
+ if (!dest[i].isVector) {
+ dest[i].isVector = gTrue;
+ dest[i].vector =
+ (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry));
+ for (j = 0; j < 256; ++j) {
+ dest[i].vector[j].isVector = gFalse;
+ dest[i].vector[j].cid = 0;
+ }
+ }
+ copyVector(dest[i].vector, src[i].vector);
+ } else {
+ if (dest[i].isVector) {
+ error(-1, "Collision in usecmap");
+ } else {
+ dest[i].cid = src[i].cid;
+ }
+ }
+ }
+}
+
+void CMap::addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end,
+ Guint nBytes) {
+ Guint start2, end2;
+ int startByte, endByte, i, j;
+
+ if (nBytes > 1) {
+ startByte = (start >> (8 * (nBytes - 1))) & 0xff;
+ endByte = (end >> (8 * (nBytes - 1))) & 0xff;
+ start2 = start & ((1 << (8 * (nBytes - 1))) - 1);
+ end2 = end & ((1 << (8 * (nBytes - 1))) - 1);
+ for (i = startByte; i <= endByte; ++i) {
+ if (!vec[i].isVector) {
+ vec[i].isVector = gTrue;
+ vec[i].vector =
+ (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry));
+ for (j = 0; j < 256; ++j) {
+ vec[i].vector[j].isVector = gFalse;
+ vec[i].vector[j].cid = 0;
+ }
+ }
+ addCodeSpace(vec[i].vector, start2, end2, nBytes - 1);
+ }
+ }
+}
+
+void CMap::addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID) {
+ CMapVectorEntry *vec;
+ CID cid;
+ int byte;
+ Guint i;
+
+ vec = vector;
+ for (i = nBytes - 1; i >= 1; --i) {
+ byte = (start >> (8 * i)) & 0xff;
+ if (!vec[byte].isVector) {
+ error(-1, "Invalid CID (%0*x - %0*x) in CMap",
+ 2*nBytes, start, 2*nBytes, end);
+ return;
+ }
+ vec = vec[byte].vector;
+ }
+ cid = firstCID;
+ for (byte = (int)(start & 0xff); byte <= (int)(end & 0xff); ++byte) {
+ if (vec[byte].isVector) {
+ error(-1, "Invalid CID (%0*x - %0*x) in CMap",
+ 2*nBytes, start, 2*nBytes, end);
+ } else {
+ vec[byte].cid = cid;
+ }
+ ++cid;
+ }
+}
+
+CMap::~CMap() {
+ delete collection;
+ delete cMapName;
+ if (vector) {
+ freeCMapVector(vector);
+ }
+#if MULTITHREADED
+ gDestroyMutex(&mutex);
+#endif
+}
+
+void CMap::freeCMapVector(CMapVectorEntry *vec) {
+ int i;
+
+ for (i = 0; i < 256; ++i) {
+ if (vec[i].isVector) {
+ freeCMapVector(vec[i].vector);
+ }
+ }
+ gfree(vec);
+}
+
+void CMap::incRefCnt() {
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ ++refCnt;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+}
+
+void CMap::decRefCnt() {
+ GBool done;
+
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ done = --refCnt == 0;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+ if (done) {
+ delete this;
+ }
+}
+
+GBool CMap::match(GooString *collectionA, GooString *cMapNameA) {
+ return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA);
+}
+
+CID CMap::getCID(char *s, int len, int *nUsed) {
+ CMapVectorEntry *vec;
+ int n, i;
+
+ if (!(vec = vector)) {
+ // identity CMap
+ *nUsed = 2;
+ if (len < 2) {
+ return 0;
+ }
+ return ((s[0] & 0xff) << 8) + (s[1] & 0xff);
+ }
+ n = 0;
+ while (1) {
+ if (n >= len) {
+ *nUsed = n;
+ return 0;
+ }
+ i = s[n++] & 0xff;
+ if (!vec[i].isVector) {
+ *nUsed = n;
+ return vec[i].cid;
+ }
+ vec = vec[i].vector;
+ }
+}
+
+void CMap::setReverseMapVector(Guint startCode, CMapVectorEntry *vec,
+ Guint *rmap, Guint rmapSize, Guint ncand) {
+ int i;
+
+ if (vec == 0) return;
+ for (i = 0;i < 256;i++) {
+ if (vec[i].isVector) {
+ setReverseMapVector((startCode+i) << 8,
+ vec[i].vector,rmap,rmapSize,ncand);
+ } else {
+ Guint cid = vec[i].cid;
+
+ if (cid < rmapSize) {
+ Guint cand;
+
+ for (cand = 0;cand < ncand;cand++) {
+ Guint code = startCode+i;
+ Guint idx = cid*ncand+cand;
+ if (rmap[idx] == 0) {
+ rmap[idx] = code;
+ break;
+ } else if (rmap[idx] == code) {
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
+void CMap::setReverseMap(Guint *rmap, Guint rmapSize, Guint ncand) {
+ setReverseMapVector(0,vector,rmap,rmapSize,ncand);
+}
+
+//------------------------------------------------------------------------
+
+CMapCache::CMapCache() {
+ int i;
+
+ for (i = 0; i < cMapCacheSize; ++i) {
+ cache[i] = NULL;
+ }
+}
+
+CMapCache::~CMapCache() {
+ int i;
+
+ for (i = 0; i < cMapCacheSize; ++i) {
+ if (cache[i]) {
+ cache[i]->decRefCnt();
+ }
+ }
+}
+
+CMap *CMapCache::getCMap(GooString *collection, GooString *cMapName, Stream *stream) {
+ CMap *cmap;
+ int i, j;
+
+ if (cache[0] && cache[0]->match(collection, cMapName)) {
+ cache[0]->incRefCnt();
+ return cache[0];
+ }
+ for (i = 1; i < cMapCacheSize; ++i) {
+ if (cache[i] && cache[i]->match(collection, cMapName)) {
+ cmap = cache[i];
+ for (j = i; j >= 1; --j) {
+ cache[j] = cache[j - 1];
+ }
+ cache[0] = cmap;
+ cmap->incRefCnt();
+ return cmap;
+ }
+ }
+ if ((cmap = CMap::parse(this, collection, cMapName, stream))) {
+ if (cache[cMapCacheSize - 1]) {
+ cache[cMapCacheSize - 1]->decRefCnt();
+ }
+ for (j = cMapCacheSize - 1; j >= 1; --j) {
+ cache[j] = cache[j - 1];
+ }
+ cache[0] = cmap;
+ cmap->incRefCnt();
+ return cmap;
+ }
+ return NULL;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.h
new file mode 100644
index 00000000000..9de0a8702c9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CMap.h
@@ -0,0 +1,126 @@
+//========================================================================
+//
+// CMap.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef CMAP_H
+#define CMAP_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include "goo/gtypes.h"
+#include "CharTypes.h"
+
+#if MULTITHREADED
+#include "goo/GooMutex.h"
+#endif
+
+class GooString;
+struct CMapVectorEntry;
+class CMapCache;
+class Stream;
+
+//------------------------------------------------------------------------
+
+class CMap {
+public:
+
+ // Create the CMap specified by <collection> and <cMapName>. Sets
+ // the initial reference count to 1.
+ // Stream is a stream containing the CMap, can be NULL and
+ // this means the CMap will be searched in the CMap files
+ // Returns NULL on failure.
+ static CMap *parse(CMapCache *cache, GooString *collectionA,
+ GooString *cMapNameA, Stream *stream);
+
+ ~CMap();
+
+ void incRefCnt();
+ void decRefCnt();
+
+ // Return collection name (<registry>-<ordering>).
+ GooString *getCollection() { return collection; }
+
+ // Return true if this CMap matches the specified <collectionA>, and
+ // <cMapNameA>.
+ GBool match(GooString *collectionA, GooString *cMapNameA);
+
+ // Return the CID corresponding to the character code starting at
+ // <s>, which contains <len> bytes. Sets *<nUsed> to the number of
+ // bytes used by the char code.
+ CID getCID(char *s, int len, int *nUsed);
+
+ // Return the writing mode (0=horizontal, 1=vertical).
+ int getWMode() { return wMode; }
+
+ void setReverseMap(Guint *rmap, Guint rmapSize, Guint ncand);
+
+private:
+
+ CMap(GooString *collectionA, GooString *cMapNameA);
+ CMap(GooString *collectionA, GooString *cMapNameA, int wModeA);
+ void useCMap(CMapCache *cache, char *useName);
+ void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src);
+ void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end,
+ Guint nBytes);
+ void addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID);
+ void freeCMapVector(CMapVectorEntry *vec);
+ void setReverseMapVector(Guint startCode, CMapVectorEntry *vec,
+ Guint *rmap, Guint rmapSize, Guint ncand);
+
+ GooString *collection;
+ GooString *cMapName;
+ int wMode; // writing mode (0=horizontal, 1=vertical)
+ CMapVectorEntry *vector; // vector for first byte (NULL for
+ // identity CMap)
+ int refCnt;
+#if MULTITHREADED
+ GooMutex mutex;
+#endif
+};
+
+//------------------------------------------------------------------------
+
+#define cMapCacheSize 4
+
+class CMapCache {
+public:
+
+ CMapCache();
+ ~CMapCache();
+
+ // Get the <cMapName> CMap for the specified character collection.
+ // Increments its reference count; there will be one reference for
+ // the cache plus one for the caller of this function.
+ // Stream is a stream containing the CMap, can be NULL and
+ // this means the CMap will be searched in the CMap files
+ // Returns NULL on failure.
+ CMap *getCMap(GooString *collection, GooString *cMapName, Stream *stream);
+
+private:
+
+ CMap *cache[cMapCacheSize];
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.cc
new file mode 100644
index 00000000000..f08d8939b73
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.cc
@@ -0,0 +1,780 @@
+//========================================================================
+//
+// CairoFontEngine.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005-2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
+// Copyright (C) 2005, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006, 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk>
+// Copyright (C) 2008 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2009 Darren Kenny <darren.kenny@sun.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#include "config.h"
+#include <string.h>
+#include "CairoFontEngine.h"
+#include "CairoOutputDev.h"
+#include "CharCodeToUnicode.h"
+#include "GlobalParams.h"
+#include <fofi/FoFiTrueType.h>
+#include <fofi/FoFiType1C.h>
+#include "goo/gfile.h"
+#include "Error.h"
+#include "XRef.h"
+#include "Gfx.h"
+#include "Page.h"
+
+#if HAVE_FCNTL_H && HAVE_SYS_MMAN_H && HAVE_SYS_STAT_H
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#define CAN_CHECK_OPEN_FACES 1
+#endif
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+
+//------------------------------------------------------------------------
+// CairoFont
+//------------------------------------------------------------------------
+
+CairoFont::CairoFont(Ref ref,
+ cairo_font_face_t *cairo_font_face,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ GBool substitute,
+ GBool printing) : ref(ref),
+ cairo_font_face(cairo_font_face),
+ codeToGID(codeToGID),
+ codeToGIDLen(codeToGIDLen),
+ substitute(substitute),
+ printing(printing) { }
+
+CairoFont::~CairoFont() {
+ cairo_font_face_destroy (cairo_font_face);
+ gfree(codeToGID);
+}
+
+GBool
+CairoFont::matches(Ref &other, GBool printingA) {
+ return (other.num == ref.num && other.gen == ref.gen);
+}
+
+cairo_font_face_t *
+CairoFont::getFontFace(void) {
+ return cairo_font_face;
+}
+
+unsigned long
+CairoFont::getGlyph(CharCode code,
+ Unicode *u, int uLen) {
+ FT_UInt gid;
+
+ if (codeToGID && code < codeToGIDLen) {
+ gid = (FT_UInt)codeToGID[code];
+ } else {
+ gid = (FT_UInt)code;
+ }
+ return gid;
+}
+
+double
+CairoFont::getSubstitutionCorrection(GfxFont *gfxFont)
+{
+ double w1, w2,w3;
+ CharCode code;
+ char *name;
+
+ // for substituted fonts: adjust the font matrix -- compare the
+ // width of 'm' in the original font and the substituted font
+ if (isSubstitute() && !gfxFont->isCIDFont()) {
+ for (code = 0; code < 256; ++code) {
+ if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) &&
+ name[0] == 'm' && name[1] == '\0') {
+ break;
+ }
+ }
+ if (code < 256) {
+ w1 = ((Gfx8BitFont *)gfxFont)->getWidth(code);
+ {
+ cairo_matrix_t m;
+ cairo_matrix_init_identity(&m);
+ cairo_font_options_t *options = cairo_font_options_create();
+ cairo_font_options_set_hint_style(options, CAIRO_HINT_STYLE_NONE);
+ cairo_font_options_set_hint_metrics(options, CAIRO_HINT_METRICS_OFF);
+ cairo_scaled_font_t *scaled_font = cairo_scaled_font_create(cairo_font_face, &m, &m, options);
+
+ cairo_text_extents_t extents;
+ cairo_scaled_font_text_extents(scaled_font, "m", &extents);
+
+ cairo_scaled_font_destroy(scaled_font);
+ cairo_font_options_destroy(options);
+ w3 = extents.width;
+ w2 = extents.x_advance;
+ }
+ if (!gfxFont->isSymbolic()) {
+ // if real font is substantially narrower than substituted
+ // font, reduce the font size accordingly
+ if (w1 > 0.01 && w1 < 0.9 * w2) {
+ w1 /= w2;
+ return w1;
+ }
+ }
+ }
+ }
+ return 1.0;
+}
+
+//------------------------------------------------------------------------
+// CairoFreeTypeFont
+//------------------------------------------------------------------------
+
+static cairo_user_data_key_t _ft_cairo_key;
+
+static void
+_ft_done_face_uncached (void *closure)
+{
+ FT_Face face = (FT_Face) closure;
+ FT_Done_Face (face);
+}
+
+static GBool
+_ft_new_face_uncached (FT_Library lib,
+ const char *filename,
+ FT_Face *face_out,
+ cairo_font_face_t **font_face_out)
+{
+ FT_Face face;
+ cairo_font_face_t *font_face;
+
+ if (FT_New_Face (lib, filename, 0, &face))
+ return gFalse;
+
+ font_face = cairo_ft_font_face_create_for_ft_face (face,
+ FT_LOAD_NO_HINTING |
+ FT_LOAD_NO_BITMAP);
+ if (cairo_font_face_set_user_data (font_face,
+ &_ft_cairo_key,
+ face,
+ _ft_done_face_uncached))
+ {
+ _ft_done_face_uncached (face);
+ cairo_font_face_destroy (font_face);
+ return gFalse;
+ }
+
+ *face_out = face;
+ *font_face_out = font_face;
+ return gTrue;
+}
+
+#if CAN_CHECK_OPEN_FACES
+static struct _ft_face_data {
+ struct _ft_face_data *prev, *next, **head;
+
+ int fd;
+ unsigned long hash;
+ size_t size;
+ unsigned char *bytes;
+
+ FT_Library lib;
+ FT_Face face;
+ cairo_font_face_t *font_face;
+} *_ft_open_faces;
+
+static unsigned long
+_djb_hash (const unsigned char *bytes, size_t len)
+{
+ unsigned long hash = 5381;
+ while (len--) {
+ unsigned char c = *bytes++;
+ hash *= 33;
+ hash ^= c;
+ }
+ return hash;
+}
+
+static GBool
+_ft_face_data_equal (struct _ft_face_data *a, struct _ft_face_data *b)
+{
+ if (a->lib != b->lib)
+ return gFalse;
+ if (a->size != b->size)
+ return gFalse;
+ if (a->hash != b->hash)
+ return gFalse;
+
+ return memcmp (a->bytes, b->bytes, a->size) == 0;
+}
+
+static void
+_ft_done_face (void *closure)
+{
+ struct _ft_face_data *data = (struct _ft_face_data *) closure;
+
+ if (data->next)
+ data->next->prev = data->prev;
+ if (data->prev)
+ data->prev->next = data->next;
+ else
+ _ft_open_faces = data->next;
+
+#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4)
+ munmap ((char*)data->bytes, data->size);
+#else
+ munmap (data->bytes, data->size);
+#endif
+ close (data->fd);
+
+ FT_Done_Face (data->face);
+ gfree (data);
+}
+
+static GBool
+_ft_new_face (FT_Library lib,
+ const char *filename,
+ FT_Face *face_out,
+ cairo_font_face_t **font_face_out)
+{
+ struct _ft_face_data *l;
+ struct stat st;
+ struct _ft_face_data tmpl;
+
+ /* if we fail to mmap the file, just pass it to FreeType instead */
+ tmpl.fd = open (filename, O_RDONLY);
+ if (tmpl.fd == -1)
+ return _ft_new_face_uncached (lib, filename, face_out, font_face_out);
+
+ if (fstat (tmpl.fd, &st) == -1) {
+ close (tmpl.fd);
+ return _ft_new_face_uncached (lib, filename, face_out, font_face_out);
+ }
+
+ tmpl.bytes = (unsigned char *) mmap (NULL, st.st_size,
+ PROT_READ, MAP_PRIVATE,
+ tmpl.fd, 0);
+ if (tmpl.bytes == MAP_FAILED) {
+ close (tmpl.fd);
+ return _ft_new_face_uncached (lib, filename, face_out, font_face_out);
+ }
+
+ /* check to see if this is a duplicate of any of the currently open fonts */
+ tmpl.lib = lib;
+ tmpl.size = st.st_size;
+ tmpl.hash = _djb_hash (tmpl.bytes, tmpl.size);
+
+ for (l = _ft_open_faces; l; l = l->next) {
+ if (_ft_face_data_equal (l, &tmpl)) {
+#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4)
+ munmap ((char*)tmpl.bytes, tmpl.size);
+#else
+ munmap (tmpl.bytes, tmpl.size);
+#endif
+ close (tmpl.fd);
+ *face_out = l->face;
+ *font_face_out = cairo_font_face_reference (l->font_face);
+ return gTrue;
+ }
+ }
+
+ /* not a dup, open and insert into list */
+ if (FT_New_Memory_Face (lib,
+ (FT_Byte *) tmpl.bytes, tmpl.size,
+ 0, &tmpl.face))
+ {
+#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4)
+ munmap ((char*)tmpl.bytes, tmpl.size);
+#else
+ munmap (tmpl.bytes, tmpl.size);
+#endif
+
+ close (tmpl.fd);
+ return gFalse;
+ }
+
+ l = (struct _ft_face_data *) gmallocn (1, sizeof (struct _ft_face_data));
+ *l = tmpl;
+ l->prev = NULL;
+ l->next = _ft_open_faces;
+ if (_ft_open_faces)
+ _ft_open_faces->prev = l;
+ _ft_open_faces = l;
+
+ l->font_face = cairo_ft_font_face_create_for_ft_face (tmpl.face,
+ FT_LOAD_NO_HINTING |
+ FT_LOAD_NO_BITMAP);
+ if (cairo_font_face_set_user_data (l->font_face,
+ &_ft_cairo_key,
+ l,
+ _ft_done_face))
+ {
+ cairo_font_face_destroy (l->font_face);
+ _ft_done_face (l);
+ return gFalse;
+ }
+
+ *face_out = l->face;
+ *font_face_out = l->font_face;
+ return gTrue;
+}
+#else
+#define _ft_new_face _ft_new_face_uncached
+#endif
+
+CairoFreeTypeFont::CairoFreeTypeFont(Ref ref,
+ cairo_font_face_t *cairo_font_face,
+ FT_Face face,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ GBool substitute) : CairoFont(ref,
+ cairo_font_face,
+ codeToGID,
+ codeToGIDLen,
+ substitute,
+ gTrue),
+ face(face) { }
+
+CairoFreeTypeFont::~CairoFreeTypeFont() { }
+
+CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
+ FT_Library lib, GBool useCIDs) {
+ Ref embRef;
+ Object refObj, strObj;
+ GooString *tmpFileName, *fileName;
+ DisplayFontParam *dfp;
+ FILE *tmpFile;
+ int c, i, n;
+ GfxFontType fontType;
+ char **enc;
+ char *name;
+ FoFiTrueType *ff;
+ FoFiType1C *ff1c;
+ Ref ref;
+ FT_Face face;
+ cairo_font_face_t *font_face;
+
+ Gushort *codeToGID;
+ int codeToGIDLen;
+
+ dfp = NULL;
+ codeToGID = NULL;
+ codeToGIDLen = 0;
+
+ GBool substitute = gFalse;
+
+ ref = *gfxFont->getID();
+ fontType = gfxFont->getType();
+
+ tmpFileName = NULL;
+
+ if (gfxFont->getEmbeddedFontID(&embRef)) {
+ if (!openTempFile(&tmpFileName, &tmpFile, "wb")) {
+ error(-1, "Couldn't create temporary font file");
+ goto err2;
+ }
+
+ refObj.initRef(embRef.num, embRef.gen);
+ refObj.fetch(xref, &strObj);
+ refObj.free();
+ if (!strObj.isStream()) {
+ error(-1, "Embedded font object is wrong type");
+ strObj.free();
+ fclose(tmpFile);
+ goto err2;
+ }
+ strObj.streamReset();
+ while ((c = strObj.streamGetChar()) != EOF) {
+ fputc(c, tmpFile);
+ }
+ strObj.streamClose();
+ strObj.free();
+ fclose(tmpFile);
+ fileName = tmpFileName;
+
+ } else if (!(fileName = gfxFont->getExtFontFile())) {
+ // look for a display font mapping or a substitute font
+ dfp = NULL;
+ if (gfxFont->getName()) {
+ dfp = globalParams->getDisplayFont(gfxFont);
+ }
+ if (!dfp) {
+ error(-1, "Couldn't find a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ switch (dfp->kind) {
+ case displayFontT1:
+ fileName = dfp->t1.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1;
+ break;
+ case displayFontTT:
+ fileName = dfp->tt.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType;
+ break;
+ }
+ substitute = gTrue;
+ }
+
+ switch (fontType) {
+ case fontType1:
+ case fontType1C:
+ case fontType1COT:
+ if (! _ft_new_face (lib, fileName->getCString(), &face, &font_face)) {
+ error(-1, "could not create type1 face");
+ goto err2;
+ }
+
+ enc = ((Gfx8BitFont *)gfxFont)->getEncoding();
+
+ codeToGID = (Gushort *)gmallocn(256, sizeof(int));
+ codeToGIDLen = 256;
+ for (i = 0; i < 256; ++i) {
+ codeToGID[i] = 0;
+ if ((name = enc[i])) {
+ codeToGID[i] = (Gushort)FT_Get_Name_Index(face, name);
+ }
+ }
+ break;
+
+ case fontCIDType2:
+ codeToGID = NULL;
+ n = 0;
+ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
+ n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
+ if (n) {
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
+ n * sizeof(Gushort));
+ }
+ } else {
+ ff = FoFiTrueType::load(fileName->getCString());
+ if (! ff)
+ goto err2;
+ codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
+ delete ff;
+ }
+ codeToGIDLen = n;
+ /* Fall through */
+ case fontTrueType:
+ if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
+ error(-1, "failed to load truetype font\n");
+ goto err2;
+ }
+ /* This might be set already for the CIDType2 case */
+ if (fontType == fontTrueType) {
+ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+ codeToGIDLen = 256;
+ }
+ delete ff;
+ if (! _ft_new_face (lib, fileName->getCString(), &face, &font_face)) {
+ error(-1, "could not create truetype face\n");
+ goto err2;
+ }
+ break;
+
+ case fontCIDType0:
+ case fontCIDType0C:
+
+ codeToGID = NULL;
+ codeToGIDLen = 0;
+
+ if (!useCIDs)
+ {
+ if ((ff1c = FoFiType1C::load(fileName->getCString()))) {
+ codeToGID = ff1c->getCIDToGIDMap(&codeToGIDLen);
+ delete ff1c;
+ }
+ }
+
+ if (! _ft_new_face (lib, fileName->getCString(), &face, &font_face)) {
+ gfree(codeToGID);
+ codeToGID = NULL;
+ error(-1, "could not create cid face\n");
+ goto err2;
+ }
+ break;
+
+ default:
+ printf ("font type %d not handled\n", (int)fontType);
+ goto err2;
+ break;
+ }
+
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later
+ if (fileName == tmpFileName) {
+ unlink (fileName->getCString());
+ delete tmpFileName;
+ }
+
+ return new CairoFreeTypeFont(ref,
+ font_face, face,
+ codeToGID, codeToGIDLen,
+ substitute);
+
+ err2:
+ /* hmm? */
+ printf ("some font thing failed\n");
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+// CairoType3Font
+//------------------------------------------------------------------------
+
+static const cairo_user_data_key_t type3_font_key = {0};
+
+typedef struct _type3_font_info {
+ GfxFont *font;
+ XRef *xref;
+ Catalog *catalog;
+ CairoFontEngine *fontEngine;
+ GBool printing;
+} type3_font_info_t;
+
+static void
+_free_type3_font_info(void *closure)
+{
+ type3_font_info_t *info = (type3_font_info_t *) closure;
+
+ info->font->decRefCnt();
+ free (info);
+}
+
+static cairo_status_t
+_render_type3_glyph (cairo_scaled_font_t *scaled_font,
+ unsigned long glyph,
+ cairo_t *cr,
+ cairo_text_extents_t *metrics)
+{
+ Dict *charProcs;
+ Object charProc;
+ CairoOutputDev *output_dev;
+ cairo_matrix_t matrix, invert_y_axis;
+ double *mat;
+ double wx, wy;
+ PDFRectangle box;
+ type3_font_info_t *info;
+ GfxFont *font;
+ Dict *resDict;
+ Gfx *gfx;
+
+ info = (type3_font_info_t *)
+ cairo_font_face_get_user_data (cairo_scaled_font_get_font_face (scaled_font),
+ &type3_font_key);
+
+ font = info->font;
+ resDict = ((Gfx8BitFont *)font)->getResources();
+ charProcs = ((Gfx8BitFont *)(info->font))->getCharProcs();
+ if (!charProcs)
+ return CAIRO_STATUS_USER_FONT_ERROR;
+
+ if ((int)glyph >= charProcs->getLength())
+ return CAIRO_STATUS_USER_FONT_ERROR;
+
+ mat = font->getFontMatrix();
+ matrix.xx = mat[0];
+ matrix.yx = mat[1];
+ matrix.xy = mat[2];
+ matrix.yy = mat[3];
+ matrix.x0 = mat[4];
+ matrix.y0 = mat[5];
+ cairo_matrix_init_scale (&invert_y_axis, 1, -1);
+ cairo_matrix_multiply (&matrix, &matrix, &invert_y_axis);
+ cairo_transform (cr, &matrix);
+
+ output_dev = new CairoOutputDev();
+ output_dev->setCairo(cr);
+ output_dev->setPrinting(info->printing);
+
+ mat = font->getFontBBox();
+ box.x1 = mat[0];
+ box.y1 = mat[1];
+ box.x2 = mat[2];
+ box.y2 = mat[3];
+ gfx = new Gfx(info->xref, output_dev, resDict, info->catalog, &box, NULL);
+ output_dev->startDoc(info->xref, info->catalog, info->fontEngine);
+ output_dev->startPage (1, gfx->getState());
+ output_dev->setInType3Char(gTrue);
+ gfx->display(charProcs->getVal(glyph, &charProc));
+
+ output_dev->getType3GlyphWidth (&wx, &wy);
+ cairo_matrix_transform_distance (&matrix, &wx, &wy);
+ metrics->x_advance = wx;
+ metrics->y_advance = wy;
+ if (output_dev->hasType3GlyphBBox()) {
+ double *bbox = output_dev->getType3GlyphBBox();
+
+ cairo_matrix_transform_point (&matrix, &bbox[0], &bbox[1]);
+ cairo_matrix_transform_point (&matrix, &bbox[2], &bbox[3]);
+ metrics->x_bearing = bbox[0];
+ metrics->y_bearing = bbox[1];
+ metrics->width = bbox[2] - bbox[0];
+ metrics->height = bbox[3] - bbox[1];
+ }
+
+ delete gfx;
+ delete output_dev;
+ charProc.free();
+
+ return CAIRO_STATUS_SUCCESS;
+}
+
+
+CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, XRef *xref,
+ Catalog *catalog, CairoFontEngine *fontEngine,
+ GBool printing) {
+ Object refObj, strObj;
+ type3_font_info_t *info;
+ cairo_font_face_t *font_face;
+ Ref ref;
+ Gushort *codeToGID;
+ int codeToGIDLen;
+ int i, j;
+ char **enc;
+ Dict *charProcs;
+ char *name;
+
+ charProcs = ((Gfx8BitFont *)gfxFont)->getCharProcs();
+ info = (type3_font_info_t *) malloc(sizeof(*info));
+ ref = *gfxFont->getID();
+ font_face = cairo_user_font_face_create();
+ cairo_user_font_face_set_render_glyph_func (font_face, _render_type3_glyph);
+ gfxFont->incRefCnt();
+ info->font = gfxFont;
+ info->xref = xref;
+ info->catalog = catalog;
+ info->fontEngine = fontEngine;
+ info->printing = printing;
+
+ cairo_font_face_set_user_data (font_face, &type3_font_key, (void *) info, _free_type3_font_info);
+
+ enc = ((Gfx8BitFont *)gfxFont)->getEncoding();
+ codeToGID = (Gushort *)gmallocn(256, sizeof(int));
+ codeToGIDLen = 256;
+ for (i = 0; i < 256; ++i) {
+ codeToGID[i] = 0;
+ if ((name = enc[i])) {
+ for (j = 0; j < charProcs->getLength(); j++) {
+ if (strcmp(name, charProcs->getKey(j)) == 0) {
+ codeToGID[i] = (Gushort) j;
+ }
+ }
+ }
+ }
+
+ return new CairoType3Font(ref, xref, catalog, font_face, codeToGID, codeToGIDLen, printing);
+}
+
+CairoType3Font::CairoType3Font(Ref ref,
+ XRef *xref,
+ Catalog *cat,
+ cairo_font_face_t *cairo_font_face,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ GBool printing) : CairoFont(ref,
+ cairo_font_face,
+ codeToGID,
+ codeToGIDLen,
+ gFalse,
+ printing),
+ xref(xref),
+ catalog(catalog) { }
+
+CairoType3Font::~CairoType3Font() { }
+
+GBool
+CairoType3Font::matches(Ref &other, GBool printingA) {
+ return (other.num == ref.num && other.gen == ref.gen && printing == printingA);
+}
+
+
+//------------------------------------------------------------------------
+// CairoFontEngine
+//------------------------------------------------------------------------
+
+CairoFontEngine::CairoFontEngine(FT_Library libA) {
+ int i;
+
+ lib = libA;
+ for (i = 0; i < cairoFontCacheSize; ++i) {
+ fontCache[i] = NULL;
+ }
+
+ FT_Int major, minor, patch;
+ // as of FT 2.1.8, CID fonts are indexed by CID instead of GID
+ FT_Library_Version(lib, &major, &minor, &patch);
+ useCIDs = major > 2 ||
+ (major == 2 && (minor > 1 || (minor == 1 && patch > 7)));
+}
+
+CairoFontEngine::~CairoFontEngine() {
+ int i;
+
+ for (i = 0; i < cairoFontCacheSize; ++i) {
+ if (fontCache[i])
+ delete fontCache[i];
+ }
+}
+
+CairoFont *
+CairoFontEngine::getFont(GfxFont *gfxFont, XRef *xref, Catalog *catalog, GBool printing) {
+ int i, j;
+ Ref ref;
+ CairoFont *font;
+ GfxFontType fontType;
+
+ ref = *gfxFont->getID();
+
+ for (i = 0; i < cairoFontCacheSize; ++i) {
+ font = fontCache[i];
+ if (font && font->matches(ref, printing)) {
+ for (j = i; j > 0; --j) {
+ fontCache[j] = fontCache[j-1];
+ }
+ fontCache[0] = font;
+ return font;
+ }
+ }
+
+ fontType = gfxFont->getType();
+ if (fontType == fontType3)
+ font = CairoType3Font::create (gfxFont, xref, catalog, this, printing);
+ else
+ font = CairoFreeTypeFont::create (gfxFont, xref, lib, useCIDs);
+
+ //XXX: if font is null should we still insert it into the cache?
+ if (fontCache[cairoFontCacheSize - 1]) {
+ delete fontCache[cairoFontCacheSize - 1];
+ }
+ for (j = cairoFontCacheSize - 1; j > 0; --j) {
+ fontCache[j] = fontCache[j-1];
+ }
+ fontCache[0] = font;
+ return font;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.h
new file mode 100644
index 00000000000..f156cab728a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoFontEngine.h
@@ -0,0 +1,126 @@
+//========================================================================
+//
+// CairoFontEngine.h
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2008 Adrian Johnson <ajohnson@redneon.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef CAIROFONTENGINE_H
+#define CAIROFONTENGINE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include <cairo-ft.h>
+
+#include "GfxFont.h"
+#include "Catalog.h"
+
+class CairoFontEngine;
+
+class CairoFont {
+public:
+ CairoFont(Ref ref,
+ cairo_font_face_t *face,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ GBool substitute,
+ GBool printing);
+ virtual ~CairoFont();
+
+ virtual GBool matches(Ref &other, GBool printing);
+ cairo_font_face_t *getFontFace(void);
+ unsigned long getGlyph(CharCode code, Unicode *u, int uLen);
+ double getSubstitutionCorrection(GfxFont *gfxFont);
+
+ GBool isSubstitute() { return substitute; }
+protected:
+ Ref ref;
+ cairo_font_face_t *cairo_font_face;
+
+ Gushort *codeToGID;
+ int codeToGIDLen;
+
+ GBool substitute;
+ GBool printing;
+};
+
+//------------------------------------------------------------------------
+
+class CairoFreeTypeFont : public CairoFont {
+public:
+ static CairoFreeTypeFont *create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs);
+ virtual ~CairoFreeTypeFont();
+
+private:
+ CairoFreeTypeFont(Ref ref, cairo_font_face_t *cairo_font_face, FT_Face face,
+ Gushort *codeToGID, int codeToGIDLen, GBool substitute);
+ FT_Face face;
+};
+
+//------------------------------------------------------------------------
+
+class CairoType3Font : public CairoFont {
+public:
+ static CairoType3Font *create(GfxFont *gfxFont, XRef *xref,
+ Catalog *catalog, CairoFontEngine *fontEngine,
+ GBool printing);
+ virtual ~CairoType3Font();
+
+ virtual GBool matches(Ref &other, GBool printing);
+
+private:
+ CairoType3Font(Ref ref, XRef *xref, Catalog *catalog,
+ cairo_font_face_t *cairo_font_face,
+ Gushort *codeToGID, int codeToGIDLen,
+ GBool printing);
+ XRef *xref;
+ Catalog *catalog;
+};
+
+//------------------------------------------------------------------------
+
+#define cairoFontCacheSize 64
+
+//------------------------------------------------------------------------
+// CairoFontEngine
+//------------------------------------------------------------------------
+
+class CairoFontEngine {
+public:
+
+ // Create a font engine.
+ CairoFontEngine(FT_Library libA);
+ ~CairoFontEngine();
+
+ CairoFont *getFont(GfxFont *gfxFont, XRef *xref, Catalog *catalog, GBool printing);
+
+private:
+ CairoFont *fontCache[cairoFontCacheSize];
+ FT_Library lib;
+ GBool useCIDs;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.cc
new file mode 100644
index 00000000000..de8a6c27672
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.cc
@@ -0,0 +1,2312 @@
+//========================================================================
+//
+// CairoOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+// Copyright (C) 2006-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2008 Carl Worth <cworth@cworth.org>
+// Copyright (C) 2008, 2009 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+#include <cairo.h>
+
+#include "goo/gfile.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "Object.h"
+#include "Gfx.h"
+#include "GfxState.h"
+#include "GfxFont.h"
+#include "Page.h"
+#include "Link.h"
+#include "CharCodeToUnicode.h"
+#include "FontEncodingTables.h"
+#include "PDFDocEncoding.h"
+#include <fofi/FoFiTrueType.h>
+#include <splash/SplashBitmap.h>
+#include "CairoOutputDev.h"
+#include "CairoFontEngine.h"
+//------------------------------------------------------------------------
+
+// #define LOG_CAIRO
+
+#ifdef LOG_CAIRO
+#define LOG(x) (x)
+#else
+#define LOG(x)
+#endif
+
+static inline void printMatrix(cairo_matrix_t *matrix){
+ printf("%f %f, %f %f (%f %f)\n", matrix->xx, matrix->yx,
+ matrix->xy, matrix->yy,
+ matrix->x0, matrix->y0);
+}
+
+//------------------------------------------------------------------------
+// CairoImage
+//------------------------------------------------------------------------
+
+CairoImage::CairoImage (double x1, double y1, double x2, double y2) {
+ this->image = NULL;
+ this->x1 = x1;
+ this->y1 = y1;
+ this->x2 = x2;
+ this->y2 = y2;
+}
+
+CairoImage::~CairoImage () {
+ if (image)
+ cairo_surface_destroy (image);
+}
+
+void CairoImage::setImage (cairo_surface_t *image) {
+ if (this->image)
+ cairo_surface_destroy (this->image);
+ this->image = cairo_surface_reference (image);
+}
+
+//------------------------------------------------------------------------
+// CairoOutputDev
+//------------------------------------------------------------------------
+
+// We cannot tie the lifetime of an FT_Library object to that of
+// CairoOutputDev, since any FT_Faces created with it may end up with a
+// reference by Cairo which can be held long after the CairoOutputDev is
+// deleted. The simplest way to avoid problems is to never tear down the
+// FT_Library instance; to avoid leaks, just use a single global instance
+// initialized the first time it is needed.
+FT_Library CairoOutputDev::ft_lib;
+GBool CairoOutputDev::ft_lib_initialized = gFalse;
+
+CairoOutputDev::CairoOutputDev() {
+ xref = NULL;
+ catalog = NULL;
+
+ if (!ft_lib_initialized) {
+ FT_Init_FreeType(&ft_lib);
+ ft_lib_initialized = gTrue;
+ }
+
+ fontEngine = NULL;
+ fontEngine_owner = gFalse;
+ glyphs = NULL;
+ fill_pattern = NULL;
+ stroke_pattern = NULL;
+ stroke_opacity = 1.0;
+ fill_opacity = 1.0;
+ textClipPath = NULL;
+ haveCSPattern = gFalse;
+ cairo = NULL;
+ currentFont = NULL;
+ prescaleImages = gTrue;
+ printing = gTrue;
+ inType3Char = gFalse;
+ t3_glyph_has_bbox = gFalse;
+
+ groupColorSpaceStack = NULL;
+ maskStack = NULL;
+ group = NULL;
+ mask = NULL;
+ shape = NULL;
+ cairo_shape = NULL;
+ knockoutCount = 0;
+
+ text = NULL;
+ actualText = NULL;
+}
+
+CairoOutputDev::~CairoOutputDev() {
+ if (fontEngine_owner && fontEngine) {
+ delete fontEngine;
+ }
+
+ if (cairo)
+ cairo_destroy (cairo);
+ cairo_pattern_destroy (stroke_pattern);
+ cairo_pattern_destroy (fill_pattern);
+ if (group)
+ cairo_pattern_destroy (group);
+ if (mask)
+ cairo_pattern_destroy (mask);
+ if (shape)
+ cairo_pattern_destroy (shape);
+ if (text)
+ text->decRefCnt();
+ if (actualText)
+ delete actualText;
+}
+
+void CairoOutputDev::setCairo(cairo_t *cairo)
+{
+ if (this->cairo != NULL) {
+ cairo_status_t status = cairo_status (this->cairo);
+ if (status) {
+ warning("cairo context error: %s\n", cairo_status_to_string(status));
+ }
+ cairo_destroy (this->cairo);
+ assert(!cairo_shape);
+ }
+ if (cairo != NULL) {
+ this->cairo = cairo_reference (cairo);
+ /* save the initial matrix so that we can use it for type3 fonts. */
+ //XXX: is this sufficient? could we miss changes to the matrix somehow?
+ cairo_get_matrix(cairo, &orig_matrix);
+ } else {
+ this->cairo = NULL;
+ this->cairo_shape = NULL;
+ }
+}
+
+void CairoOutputDev::setTextPage(TextPage *text)
+{
+ if (this->text)
+ this->text->decRefCnt();
+ if (actualText)
+ delete actualText;
+ if (text) {
+ this->text = text;
+ this->text->incRefCnt();
+ actualText = new ActualText(text);
+ } else {
+ this->text = NULL;
+ actualText = NULL;
+ }
+}
+
+void CairoOutputDev::startDoc(XRef *xrefA, Catalog *catalogA,
+ CairoFontEngine *parentFontEngine) {
+ xref = xrefA;
+ catalog = catalogA;
+ if (parentFontEngine) {
+ fontEngine = parentFontEngine;
+ } else {
+ if (fontEngine) {
+ delete fontEngine;
+ }
+ fontEngine = new CairoFontEngine(ft_lib);
+ fontEngine_owner = gTrue;
+ }
+}
+
+void CairoOutputDev::startPage(int pageNum, GfxState *state) {
+ /* set up some per page defaults */
+ cairo_pattern_destroy(fill_pattern);
+ fill_pattern = cairo_pattern_create_rgb(0., 0., 0.);
+
+ cairo_pattern_destroy(stroke_pattern);
+ stroke_pattern = cairo_pattern_create_rgb(0., 0., 0.);
+
+ if (text)
+ text->startPage(state);
+}
+
+void CairoOutputDev::endPage() {
+ if (text) {
+ text->endPage();
+ text->coalesce(gTrue, gFalse);
+ }
+}
+
+void CairoOutputDev::drawLink(Link *link, Catalog *catalog) {
+}
+
+void CairoOutputDev::saveState(GfxState *state) {
+ LOG(printf ("save\n"));
+ cairo_save (cairo);
+ if (cairo_shape)
+ cairo_save (cairo_shape);
+
+ MaskStack *ms = new MaskStack;
+ ms->mask = cairo_pattern_reference(mask);
+ ms->next = maskStack;
+ maskStack = ms;
+}
+
+void CairoOutputDev::restoreState(GfxState *state) {
+ LOG(printf ("restore\n"));
+ cairo_restore (cairo);
+ if (cairo_shape)
+ cairo_restore (cairo_shape);
+
+ /* These aren't restored by cairo_restore() since we keep them in
+ * the output device. */
+ updateFillColor(state);
+ updateStrokeColor(state);
+ updateFillOpacity(state);
+ updateStrokeOpacity(state);
+ updateBlendMode(state);
+
+ MaskStack* ms = maskStack;
+ if (mask)
+ cairo_pattern_destroy(mask);
+
+ if (ms) {
+ mask = ms->mask;
+ maskStack = ms->next;
+ delete ms;
+ }
+}
+
+void CairoOutputDev::updateAll(GfxState *state) {
+ updateLineDash(state);
+ updateLineJoin(state);
+ updateLineCap(state);
+ updateLineWidth(state);
+ updateFlatness(state);
+ updateMiterLimit(state);
+ updateFillColor(state);
+ updateStrokeColor(state);
+ updateFillOpacity(state);
+ updateStrokeOpacity(state);
+ updateBlendMode(state);
+ needFontUpdate = gTrue;
+ if (text)
+ text->updateFont(state);
+}
+
+void CairoOutputDev::setDefaultCTM(double *ctm) {
+ cairo_matrix_t matrix;
+ matrix.xx = ctm[0];
+ matrix.yx = ctm[1];
+ matrix.xy = ctm[2];
+ matrix.yy = ctm[3];
+ matrix.x0 = ctm[4];
+ matrix.y0 = ctm[5];
+
+ cairo_transform (cairo, &matrix);
+ if (cairo_shape)
+ cairo_transform (cairo_shape, &matrix);
+
+ OutputDev::setDefaultCTM(ctm);
+}
+
+void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22,
+ double m31, double m32) {
+ cairo_matrix_t matrix, invert_matrix;
+ matrix.xx = m11;
+ matrix.yx = m12;
+ matrix.xy = m21;
+ matrix.yy = m22;
+ matrix.x0 = m31;
+ matrix.y0 = m32;
+
+ /* Make sure the matrix is invertible before setting it.
+ * cairo will blow up if we give it a matrix that's not
+ * invertible, so we need to check before passing it
+ * to cairo_transform. Ignoring it is likely to give better
+ * results than not rendering anything at all. See #14398
+ *
+ * Ideally, we could do the cairo_transform
+ * and then check if anything went wrong and fix it then
+ * instead of having to invert the matrix. */
+ invert_matrix = matrix;
+ if (cairo_matrix_invert(&invert_matrix)) {
+ warning("matrix not invertible\n");
+ return;
+ }
+
+ cairo_transform (cairo, &matrix);
+ if (cairo_shape)
+ cairo_transform (cairo_shape, &matrix);
+ updateLineDash(state);
+ updateLineJoin(state);
+ updateLineCap(state);
+ updateLineWidth(state);
+}
+
+void CairoOutputDev::updateLineDash(GfxState *state) {
+ double *dashPattern;
+ int dashLength;
+ double dashStart;
+
+ state->getLineDash(&dashPattern, &dashLength, &dashStart);
+ cairo_set_dash (cairo, dashPattern, dashLength, dashStart);
+ if (cairo_shape)
+ cairo_set_dash (cairo_shape, dashPattern, dashLength, dashStart);
+}
+
+void CairoOutputDev::updateFlatness(GfxState *state) {
+ // cairo_set_tolerance (cairo, state->getFlatness());
+}
+
+void CairoOutputDev::updateLineJoin(GfxState *state) {
+ switch (state->getLineJoin()) {
+ case 0:
+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_MITER);
+ break;
+ case 1:
+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_ROUND);
+ break;
+ case 2:
+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_BEVEL);
+ break;
+ }
+ if (cairo_shape)
+ cairo_set_line_join (cairo_shape, cairo_get_line_join(cairo));
+}
+
+void CairoOutputDev::updateLineCap(GfxState *state) {
+ switch (state->getLineCap()) {
+ case 0:
+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_BUTT);
+ break;
+ case 1:
+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_ROUND);
+ break;
+ case 2:
+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_SQUARE);
+ break;
+ }
+ if (cairo_shape)
+ cairo_set_line_cap (cairo_shape, cairo_get_line_cap(cairo));
+}
+
+void CairoOutputDev::updateMiterLimit(GfxState *state) {
+ cairo_set_miter_limit (cairo, state->getMiterLimit());
+ if (cairo_shape)
+ cairo_set_miter_limit (cairo_shape, state->getMiterLimit());
+}
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+
+void CairoOutputDev::updateLineWidth(GfxState *state) {
+ LOG(printf ("line width: %f\n", state->getLineWidth()));
+ if (state->getLineWidth() == 0.0) {
+ /* find out how big pixels (device unit) are in the x and y directions
+ * choose the smaller of the two as our line width */
+ double x = 1.0, y = 1.0;
+ cairo_device_to_user_distance(cairo, &x, &y);
+ cairo_set_line_width (cairo, MIN(fabs(x),fabs(y)));
+ } else {
+ cairo_set_line_width (cairo, state->getLineWidth());
+ }
+ if (cairo_shape)
+ cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo));
+}
+
+void CairoOutputDev::updateFillColor(GfxState *state) {
+ state->getFillRGB(&fill_color);
+
+ cairo_pattern_destroy(fill_pattern);
+ fill_pattern = cairo_pattern_create_rgba(fill_color.r / 65535.0,
+ fill_color.g / 65535.0,
+ fill_color.b / 65535.0,
+ fill_opacity);
+
+ LOG(printf ("fill color: %d %d %d\n",
+ fill_color.r, fill_color.g, fill_color.b));
+}
+
+void CairoOutputDev::updateStrokeColor(GfxState *state) {
+ state->getStrokeRGB(&stroke_color);
+
+ cairo_pattern_destroy(stroke_pattern);
+ stroke_pattern = cairo_pattern_create_rgba(stroke_color.r / 65535.0,
+ stroke_color.g / 65535.0,
+ stroke_color.b / 65535.0,
+ stroke_opacity);
+
+ LOG(printf ("stroke color: %d %d %d\n",
+ stroke_color.r, stroke_color.g, stroke_color.b));
+}
+
+void CairoOutputDev::updateFillOpacity(GfxState *state) {
+ fill_opacity = state->getFillOpacity();
+
+ cairo_pattern_destroy(fill_pattern);
+ fill_pattern = cairo_pattern_create_rgba(fill_color.r / 65535.0,
+ fill_color.g / 65535.0,
+ fill_color.b / 65535.0,
+ fill_opacity);
+
+ LOG(printf ("fill opacity: %f\n", fill_opacity));
+}
+
+void CairoOutputDev::updateStrokeOpacity(GfxState *state) {
+ stroke_opacity = state->getStrokeOpacity();
+
+ cairo_pattern_destroy(stroke_pattern);
+ stroke_pattern = cairo_pattern_create_rgba(stroke_color.r / 65535.0,
+ stroke_color.g / 65535.0,
+ stroke_color.b / 65535.0,
+ stroke_opacity);
+
+ LOG(printf ("stroke opacity: %f\n", stroke_opacity));
+}
+
+void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) {
+ state->getFillRGB(&fill_color);
+
+ cairo_pattern_add_color_stop_rgba(fill_pattern, offset,
+ fill_color.r / 65535.0,
+ fill_color.g / 65535.0,
+ fill_color.b / 65535.0,
+ fill_opacity);
+ LOG(printf ("fill color stop: %f (%d, %d, %d)\n",
+ offset, fill_color.r, fill_color.g, fill_color.b));
+}
+
+void CairoOutputDev::updateBlendMode(GfxState *state) {
+#ifdef CAIRO_HAS_BLEND_MODES
+ switch (state->getBlendMode()) {
+ default:
+ case gfxBlendNormal:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_OVER);
+ break;
+ case gfxBlendMultiply:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY);
+ break;
+ case gfxBlendScreen:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_SCREEN);
+ break;
+ case gfxBlendOverlay:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_OVERLAY);
+ break;
+ case gfxBlendDarken:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_DARKEN);
+ break;
+ case gfxBlendLighten:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_LIGHTEN);
+ break;
+ case gfxBlendColorDodge:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_DODGE);
+ break;
+ case gfxBlendColorBurn:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_BURN);
+ break;
+ case gfxBlendHardLight:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_HARD_LIGHT);
+ break;
+ case gfxBlendSoftLight:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_SOFT_LIGHT);
+ break;
+ case gfxBlendDifference:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_DIFFERENCE);
+ break;
+ case gfxBlendExclusion:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_EXCLUSION);
+ break;
+ case gfxBlendHue:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_HUE);
+ break;
+ case gfxBlendSaturation:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_SATURATION);
+ break;
+ case gfxBlendColor:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_COLOR);
+ break;
+ case gfxBlendLuminosity:
+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_LUMINOSITY);
+ break;
+ }
+ LOG(printf ("blend mode: %d\n", (int)state->getBlendMode()));
+#endif /* CAIRO_HAS_BLEND_MODES */
+}
+
+void CairoOutputDev::updateFont(GfxState *state) {
+ cairo_font_face_t *font_face;
+ cairo_matrix_t matrix, invert_matrix;
+
+ LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
+
+ needFontUpdate = gFalse;
+
+ //FIXME: use cairo font engine?
+ if (text)
+ text->updateFont(state);
+
+ currentFont = fontEngine->getFont (state->getFont(), xref, catalog, printing);
+
+ if (!currentFont)
+ return;
+
+ font_face = currentFont->getFontFace();
+ cairo_set_font_face (cairo, font_face);
+
+ double fontSize = state->getFontSize();
+ double *m = state->getTextMat();
+ /* NOTE: adjusting by a constant is hack. The correct solution
+ * is probably to use user-fonts and compute the scale on a per
+ * glyph basis instead of for the entire font */
+ double w = currentFont->getSubstitutionCorrection(state->getFont());
+ matrix.xx = m[0] * fontSize * state->getHorizScaling() * w;
+ matrix.yx = m[1] * fontSize * state->getHorizScaling() * w;
+ matrix.xy = -m[2] * fontSize;
+ matrix.yy = -m[3] * fontSize;
+ matrix.x0 = 0;
+ matrix.y0 = 0;
+
+ LOG(printf ("font matrix: %f %f %f %f\n", matrix.xx, matrix.yx, matrix.xy, matrix.yy));
+
+ /* Make sure the font matrix is invertible before setting it. cairo
+ * will blow up if we give it a matrix that's not invertible, so we
+ * need to check before passing it to cairo_set_font_matrix. Ignoring it
+ * is likely to give better results than not rendering anything at
+ * all. See #18254.
+ */
+ invert_matrix = matrix;
+ if (cairo_matrix_invert(&invert_matrix)) {
+ warning("font matrix not invertible\n");
+ return;
+ }
+
+ cairo_set_font_matrix (cairo, &matrix);
+}
+
+void CairoOutputDev::updateRender(GfxState *state) {
+ int rm;
+ rm = state->getRender();
+ if (rm == 7 && haveCSPattern) {
+ haveCSPattern = gFalse;
+ restoreState(state);
+ }
+}
+
+void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) {
+ GfxSubpath *subpath;
+ int i, j;
+ for (i = 0; i < path->getNumSubpaths(); ++i) {
+ subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0) {
+ cairo_move_to (cairo, subpath->getX(0), subpath->getY(0));
+ j = 1;
+ while (j < subpath->getNumPoints()) {
+ if (subpath->getCurve(j)) {
+ cairo_curve_to( cairo,
+ subpath->getX(j), subpath->getY(j),
+ subpath->getX(j+1), subpath->getY(j+1),
+ subpath->getX(j+2), subpath->getY(j+2));
+
+ j += 3;
+ } else {
+ cairo_line_to (cairo, subpath->getX(j), subpath->getY(j));
+ ++j;
+ }
+ }
+ if (subpath->isClosed()) {
+ LOG (printf ("close\n"));
+ cairo_close_path (cairo);
+ }
+ }
+ }
+}
+
+void CairoOutputDev::stroke(GfxState *state) {
+ doPath (cairo, state, state->getPath());
+ cairo_set_source (cairo, stroke_pattern);
+ LOG(printf ("stroke\n"));
+ cairo_stroke (cairo);
+ if (cairo_shape) {
+ doPath (cairo_shape, state, state->getPath());
+ cairo_stroke (cairo_shape);
+ }
+}
+
+void CairoOutputDev::fill(GfxState *state) {
+ doPath (cairo, state, state->getPath());
+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
+ cairo_set_source (cairo, fill_pattern);
+ LOG(printf ("fill\n"));
+ //XXX: how do we get the path
+ cairo_fill (cairo);
+ if (cairo_shape) {
+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
+ doPath (cairo_shape, state, state->getPath());
+ cairo_fill (cairo_shape);
+ }
+}
+
+void CairoOutputDev::eoFill(GfxState *state) {
+ doPath (cairo, state, state->getPath());
+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
+ cairo_set_source (cairo, fill_pattern);
+ LOG(printf ("fill-eo\n"));
+ cairo_fill (cairo);
+
+ if (cairo_shape) {
+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
+ doPath (cairo_shape, state, state->getPath());
+ cairo_fill (cairo_shape);
+ }
+
+}
+
+GBool CairoOutputDev::tilingPatternFill(GfxState *state, Object *str,
+ int paintType, Dict *resDict,
+ double *mat, double *bbox,
+ int x0, int y0, int x1, int y1,
+ double xStep, double yStep)
+{
+ PDFRectangle box;
+ Gfx *gfx;
+ cairo_pattern_t *pattern;
+ cairo_surface_t *surface;
+ cairo_matrix_t matrix;
+ cairo_t *old_cairo;
+ double xMin, yMin, xMax, yMax;
+
+ if (xStep != bbox[2] || yStep != bbox[3])
+ return gFalse;
+ /* TODO: implement the other cases here too */
+
+ surface = cairo_surface_create_similar (cairo_get_target (cairo),
+ CAIRO_CONTENT_COLOR_ALPHA,
+ bbox[2], bbox[3]);
+ if (cairo_surface_status (surface))
+ return gFalse;
+
+ old_cairo = cairo;
+ cairo = cairo_create (surface);
+ cairo_surface_destroy (surface);
+
+ box.x1 = bbox[0]; box.y1 = bbox[1];
+ box.x2 = bbox[2]; box.y2 = bbox[3];
+ gfx = new Gfx(xref, this, resDict, catalog, &box, NULL);
+ gfx->display(str);
+ delete gfx;
+
+ pattern = cairo_pattern_create_for_surface (cairo_get_target (cairo));
+ cairo_destroy (cairo);
+ cairo = old_cairo;
+ if (cairo_pattern_status (pattern))
+ return gFalse;
+
+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
+ cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin);
+
+ cairo_matrix_init (&matrix, mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ cairo_transform (cairo, &matrix);
+ cairo_set_source (cairo, pattern);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
+ cairo_fill (cairo);
+
+ cairo_pattern_destroy (pattern);
+
+ return gTrue;
+}
+
+GBool CairoOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) {
+ double x0, y0, x1, y1;
+ double dx, dy;
+
+ shading->getCoords(&x0, &y0, &x1, &y1);
+ dx = x1 - x0;
+ dy = y1 - y0;
+
+ cairo_pattern_destroy(fill_pattern);
+ fill_pattern = cairo_pattern_create_linear (x0 + tMin * dx, y0 + tMin * dy,
+ x0 + tMax * dx, y0 + tMax * dy);
+ if (!shading->getExtend0() && !shading->getExtend1())
+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
+ else
+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
+
+ // TODO: use the actual stops in the shading in the case
+ // of linear interpolation (Type 2 Exponential functions with N=1)
+ return gFalse;
+}
+
+GBool CairoOutputDev::axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading)
+{
+ return (shading->getExtend0() == shading->getExtend1());
+}
+
+GBool CairoOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) {
+ double x0, y0, r0, x1, y1, r1;
+ double dx, dy, dr;
+
+ shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
+ dx = x1 - x0;
+ dy = y1 - y0;
+ dr = r1 - r0;
+ cairo_pattern_destroy(fill_pattern);
+ fill_pattern = cairo_pattern_create_radial (x0 + sMin * dx,
+ y0 + sMin * dy,
+ r0 + sMin * dr,
+ x0 + sMax * dx,
+ y0 + sMax * dy,
+ r0 + sMax * dr);
+ if (shading->getExtend0() && shading->getExtend1())
+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
+ else
+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
+
+ return gFalse;
+}
+
+GBool CairoOutputDev::radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading)
+{
+ return (shading->getExtend0() == shading->getExtend1());
+}
+
+void CairoOutputDev::clip(GfxState *state) {
+ doPath (cairo, state, state->getPath());
+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
+ cairo_clip (cairo);
+ LOG (printf ("clip\n"));
+ if (cairo_shape) {
+ doPath (cairo_shape, state, state->getPath());
+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
+ cairo_clip (cairo_shape);
+ }
+}
+
+void CairoOutputDev::eoClip(GfxState *state) {
+ doPath (cairo, state, state->getPath());
+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
+ cairo_clip (cairo);
+ LOG (printf ("clip-eo\n"));
+ if (cairo_shape) {
+ doPath (cairo_shape, state, state->getPath());
+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
+ cairo_clip (cairo_shape);
+ }
+
+}
+
+void CairoOutputDev::beginString(GfxState *state, GooString *s)
+{
+ int len = s->getLength();
+
+ if (needFontUpdate)
+ updateFont(state);
+
+ if (!currentFont)
+ return;
+
+ glyphs = (cairo_glyph_t *) gmallocn (len, sizeof (cairo_glyph_t));
+ glyphCount = 0;
+}
+
+void CairoOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen)
+{
+ if (currentFont) {
+ glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen);
+ glyphs[glyphCount].x = x - originX;
+ glyphs[glyphCount].y = y - originY;
+ glyphCount++;
+ }
+
+ if (!text)
+ return;
+ actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen);
+}
+
+void CairoOutputDev::endString(GfxState *state)
+{
+ int render;
+
+ if (!currentFont)
+ return;
+
+ // endString can be called without a corresponding beginString. If this
+ // happens glyphs will be null so don't draw anything, just return.
+ // XXX: OutputDevs should probably not have to deal with this...
+ if (!glyphs)
+ return;
+
+ // ignore empty strings and invisible text -- this is used by
+ // Acrobat Capture
+ render = state->getRender();
+ if (render == 3 || glyphCount == 0) {
+ gfree(glyphs);
+ glyphs = NULL;
+ return;
+ }
+
+ if (!(render & 1)) {
+ LOG (printf ("fill string\n"));
+ cairo_set_source (cairo, fill_pattern);
+ cairo_show_glyphs (cairo, glyphs, glyphCount);
+ if (cairo_shape)
+ cairo_show_glyphs (cairo_shape, glyphs, glyphCount);
+ }
+
+ // stroke
+ if ((render & 3) == 1 || (render & 3) == 2) {
+ LOG (printf ("stroke string\n"));
+ cairo_set_source (cairo, stroke_pattern);
+ cairo_glyph_path (cairo, glyphs, glyphCount);
+ cairo_stroke (cairo);
+ if (cairo_shape) {
+ cairo_glyph_path (cairo_shape, glyphs, glyphCount);
+ cairo_stroke (cairo_shape);
+ }
+ }
+
+ // clip
+ if (render & 4) {
+ LOG (printf ("clip string\n"));
+ // append the glyph path to textClipPath.
+
+ // set textClipPath as the currentPath
+ if (textClipPath) {
+ cairo_append_path (cairo, textClipPath);
+ if (cairo_shape) {
+ cairo_append_path (cairo_shape, textClipPath);
+ }
+ cairo_path_destroy (textClipPath);
+ }
+
+ // append the glyph path
+ cairo_glyph_path (cairo, glyphs, glyphCount);
+
+ // move the path back into textClipPath
+ // and clear the current path
+ textClipPath = cairo_copy_path (cairo);
+ cairo_new_path (cairo);
+ if (cairo_shape) {
+ cairo_new_path (cairo_shape);
+ }
+ }
+
+ gfree (glyphs);
+ glyphs = NULL;
+}
+
+
+GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen) {
+
+ cairo_save (cairo);
+ double *ctm;
+ cairo_matrix_t matrix;
+
+ ctm = state->getCTM();
+ matrix.xx = ctm[0];
+ matrix.yx = ctm[1];
+ matrix.xy = ctm[2];
+ matrix.yy = ctm[3];
+ matrix.x0 = ctm[4];
+ matrix.y0 = ctm[5];
+ /* Restore the original matrix and then transform to matrix needed for the
+ * type3 font. This is ugly but seems to work. Perhaps there is a better way to do it?*/
+ cairo_set_matrix(cairo, &orig_matrix);
+ cairo_transform(cairo, &matrix);
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_set_matrix(cairo_shape, &orig_matrix);
+ cairo_transform(cairo_shape, &matrix);
+ }
+ cairo_pattern_destroy(stroke_pattern);
+ cairo_pattern_reference(fill_pattern);
+ stroke_pattern = fill_pattern;
+ return gFalse;
+}
+
+void CairoOutputDev::endType3Char(GfxState *state) {
+ cairo_restore (cairo);
+ if (cairo_shape) {
+ cairo_restore (cairo_shape);
+ }
+}
+
+void CairoOutputDev::type3D0(GfxState *state, double wx, double wy) {
+ t3_glyph_wx = wx;
+ t3_glyph_wy = wy;
+}
+
+void CairoOutputDev::type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury) {
+ t3_glyph_wx = wx;
+ t3_glyph_wy = wy;
+ t3_glyph_bbox[0] = llx;
+ t3_glyph_bbox[1] = lly;
+ t3_glyph_bbox[2] = urx;
+ t3_glyph_bbox[3] = ury;
+ t3_glyph_has_bbox = gTrue;
+}
+
+void CairoOutputDev::beginTextObject(GfxState *state) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ haveCSPattern = gTrue;
+ saveState(state);
+ savedRender = state->getRender();
+ state->setRender(7); // Set clip to text path
+ }
+}
+
+void CairoOutputDev::endTextObject(GfxState *state) {
+ if (haveCSPattern) {
+ state->setRender(savedRender);
+ haveCSPattern = gFalse;
+ if (state->getFillColorSpace()->getMode() != csPattern) {
+ if (textClipPath) {
+ cairo_new_path (cairo);
+ cairo_append_path (cairo, textClipPath);
+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
+ cairo_set_source (cairo, fill_pattern);
+ cairo_fill (cairo);
+ if (cairo_shape) {
+ cairo_new_path (cairo_shape);
+ cairo_append_path (cairo_shape, textClipPath);
+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
+ cairo_fill (cairo_shape);
+ }
+ cairo_path_destroy (textClipPath);
+ textClipPath = NULL;
+ }
+ restoreState(state);
+ updateFillColor(state);
+ }
+ }
+
+ if (textClipPath) {
+ // clip the accumulated text path
+ cairo_append_path (cairo, textClipPath);
+ cairo_clip (cairo);
+ if (cairo_shape) {
+ cairo_append_path (cairo_shape, textClipPath);
+ cairo_clip (cairo_shape);
+ }
+ cairo_path_destroy (textClipPath);
+ textClipPath = NULL;
+ }
+}
+
+void CairoOutputDev::beginMarkedContent(char *name, Dict *properties)
+{
+ if (text)
+ actualText->beginMC(properties);
+}
+
+void CairoOutputDev::endMarkedContent(GfxState *state)
+{
+ if (text)
+ actualText->endMC(state);
+}
+
+static inline int splashRound(SplashCoord x) {
+ return (int)floor(x + 0.5);
+}
+
+static inline int splashCeil(SplashCoord x) {
+ return (int)ceil(x);
+}
+
+static inline int splashFloor(SplashCoord x) {
+ return (int)floor(x);
+}
+
+static
+cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content)
+{
+ double x1, y1, x2, y2;
+ int width, height;
+ cairo_clip_extents (cairo, &x1, &y1, &x2, &y2);
+ cairo_matrix_t matrix;
+ cairo_get_matrix (cairo, &matrix);
+ //cairo_matrix_transform_point(&matrix, &x1, &y1);
+ //cairo_matrix_transform_point(&matrix, &x2, &y2);*/
+ cairo_user_to_device(cairo, &x1, &y1);
+ cairo_user_to_device(cairo, &x2, &y2);
+ width = splashCeil(x2) - splashFloor(x1);
+ //XXX: negative matrix
+ ////height = splashCeil(y2) - splashFloor(y1);
+ height = splashFloor(y1) - splashCeil(y2);
+ cairo_surface_t *target = cairo_get_target (cairo);
+ cairo_surface_t *result;
+
+ result = cairo_surface_create_similar (target, content, width, height);
+ double x_offset, y_offset;
+ cairo_surface_get_device_offset(target, &x_offset, &y_offset);
+ cairo_surface_set_device_offset(result, x_offset, y_offset);
+
+
+ return result;
+}
+
+
+
+void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+ GfxColorSpace * blendingColorSpace,
+ GBool /*isolated*/, GBool knockout,
+ GBool forSoftMask) {
+ /* push color space */
+ ColorSpaceStack* css = new ColorSpaceStack;
+ css->cs = blendingColorSpace;
+ css->knockout = knockout;
+ css->next = groupColorSpaceStack;
+ groupColorSpaceStack = css;
+ if (knockout) {
+ knockoutCount++;
+ if (!cairo_shape) {
+ /* create a surface for tracking the shape */
+ cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA);
+ cairo_shape = cairo_create (cairo_shape_surface);
+ cairo_surface_destroy (cairo_shape_surface);
+
+ /* the color doesn't matter as long as it is opaque */
+ cairo_set_source_rgb (cairo_shape, 0, 0, 0);
+ cairo_matrix_t matrix;
+ cairo_get_matrix (cairo, &matrix);
+ //printMatrix(&matrix);
+ cairo_set_matrix (cairo_shape, &matrix);
+ } else {
+ cairo_reference (cairo_shape);
+ }
+ }
+ if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
+ /* we need to track the shape */
+ cairo_push_group (cairo_shape);
+ }
+ if (0 && forSoftMask)
+ cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA);
+ else
+ cairo_push_group (cairo);
+
+ /* push_group has an implicit cairo_save() */
+ if (knockout) {
+ /*XXX: let's hope this matches the semantics needed */
+ cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
+ } else {
+ cairo_set_operator(cairo, CAIRO_OPERATOR_OVER);
+ }
+}
+
+void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) {
+
+ if (group)
+ cairo_pattern_destroy(group);
+ group = cairo_pop_group (cairo);
+
+ if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
+ if (shape)
+ cairo_pattern_destroy(shape);
+ shape = cairo_pop_group (cairo_shape);
+ }
+}
+
+void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {
+ cairo_set_source (cairo, group);
+
+ if (!mask) {
+ //XXX: deal with mask && shape case
+ if (shape) {
+ cairo_save (cairo);
+
+ /* OPERATOR_SOURCE w/ a mask is defined as (src IN mask) ADD (dest OUT mask)
+ * however our source has already been clipped to mask so we only need to
+ * do ADD and OUT */
+
+ /* clear the shape mask */
+ cairo_set_source (cairo, shape);
+ cairo_set_operator (cairo, CAIRO_OPERATOR_DEST_OUT);
+ cairo_paint (cairo);
+
+ cairo_set_operator (cairo, CAIRO_OPERATOR_ADD);
+ cairo_set_source (cairo, group);
+ cairo_paint (cairo);
+
+ cairo_restore (cairo);
+
+ cairo_pattern_destroy (shape);
+ shape = NULL;
+ } else {
+ cairo_paint_with_alpha (cairo, fill_opacity);
+ }
+ cairo_status_t status = cairo_status(cairo);
+ if (status)
+ printf("BAD status: %s\n", cairo_status_to_string(status));
+ } else {
+ cairo_mask(cairo, mask);
+
+ cairo_pattern_destroy(mask);
+ mask = NULL;
+ }
+
+ popTransparencyGroup();
+}
+
+typedef unsigned int uint32_t;
+
+static uint32_t luminocity(uint32_t x)
+{
+ int r = (x >> 16) & 0xff;
+ int g = (x >> 8) & 0xff;
+ int b = (x >> 0) & 0xff;
+ // an arbitrary integer approximation of .3*r + .59*g + .11*b
+ int y = (r*19661+g*38666+b*7209 + 32829)>>16;
+ return y << 24;
+}
+
+
+/* XXX: do we need to deal with shape here? */
+void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
+ Function * transferFunc, GfxColor * backdropColor) {
+ cairo_pattern_destroy(mask);
+
+ if (alpha == false) {
+ /* We need to mask according to the luminocity of the group.
+ * So we paint the group to an image surface convert it to a luminocity map
+ * and then use that as the mask. */
+
+ double x1, y1, x2, y2, tmp;
+ cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
+ cairo_user_to_device(cairo, &x1, &y1);
+ cairo_user_to_device(cairo, &x2, &y2);
+ if (x1 > x2) {
+ tmp = x1;
+ x1 = x2;
+ x2 = tmp;
+ }
+
+ if (y1 > y2) {
+ tmp = y1;
+ y1 = y2;
+ y2 = tmp;
+ }
+
+ int width = (int)(ceil(x2) - floor(x1));
+ int height = (int)(ceil(y2) - floor(y1));
+
+ cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
+ cairo_t *maskCtx = cairo_create(source);
+
+ //XXX: hopefully this uses the correct color space */
+ GfxRGB backdropColorRGB;
+ groupColorSpaceStack->cs->getRGB(backdropColor, &backdropColorRGB);
+ /* paint the backdrop */
+ cairo_set_source_rgb(maskCtx, backdropColorRGB.r / 65535.0,
+ backdropColorRGB.g / 65535.0,
+ backdropColorRGB.b / 65535.0);
+
+
+ cairo_matrix_t mat;
+ cairo_get_matrix(cairo, &mat);
+ cairo_set_matrix(maskCtx, &mat);
+
+ /* make the device offset of the new mask match that of the group */
+ double x_offset, y_offset;
+ cairo_surface_t *pats;
+ cairo_pattern_get_surface(group, &pats);
+ cairo_surface_get_device_offset(pats, &x_offset, &y_offset);
+ cairo_surface_set_device_offset(source, x_offset, y_offset);
+
+ /* paint the group */
+ cairo_set_source(maskCtx, group);
+ cairo_paint(maskCtx);
+
+ /* XXX status = cairo_status(maskCtx); */
+ cairo_destroy(maskCtx);
+
+ /* convert to a luminocity map */
+ uint32_t *source_data = (uint32_t*)cairo_image_surface_get_data(source);
+ /* get stride in units of 32 bits */
+ int stride = cairo_image_surface_get_stride(source)/4;
+ for (int y=0; y<height; y++) {
+ for (int x=0; x<width; x++) {
+ source_data[y*stride + x] = luminocity(source_data[y*stride + x]);
+
+#if 0
+ here is how splash deals with the transferfunction we should deal with this
+ at some point
+ if (transferFunc) {
+ transferFunc->transform(&lum, &lum2);
+ } else {
+ lum2 = lum;
+ }
+ p[x] = (int)(lum2 * 255.0 + 0.5);
+#endif
+
+ }
+ }
+ cairo_surface_mark_dirty (source);
+
+ /* setup the new mask pattern */
+ mask = cairo_pattern_create_for_surface(source);
+ cairo_matrix_t patMatrix;
+ cairo_pattern_get_matrix(group, &patMatrix);
+ cairo_pattern_set_matrix(mask, &patMatrix);
+
+ cairo_surface_destroy(source);
+ } else {
+ mask = cairo_pattern_reference(group);
+ }
+
+ popTransparencyGroup();
+}
+
+void CairoOutputDev::popTransparencyGroup() {
+ /* pop color space */
+ ColorSpaceStack *css = groupColorSpaceStack;
+ if (css->knockout) {
+ knockoutCount--;
+ if (!knockoutCount) {
+ /* we don't need to track the shape anymore because
+ * we are not above any knockout groups */
+ cairo_destroy(cairo_shape);
+ cairo_shape = NULL;
+ }
+ }
+ groupColorSpaceStack = css->next;
+ delete css;
+}
+
+
+void CairoOutputDev::clearSoftMask(GfxState * /*state*/) {
+ if (mask)
+ cairo_pattern_destroy(mask);
+ mask = NULL;
+}
+
+void CairoOutputDev::endMaskClip(GfxState *state) {
+ clearSoftMask(state);
+}
+
+void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+
+ /* FIXME: Doesn't the image mask support any colorspace? */
+ cairo_set_source (cairo, fill_pattern);
+
+ /* work around a cairo bug when scaling 1x1 surfaces */
+ if (width == 1 && height == 1) {
+ cairo_save (cairo);
+ cairo_rectangle (cairo, 0., 0., width, height);
+ cairo_fill (cairo);
+ cairo_restore (cairo);
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_rectangle (cairo_shape, 0., 0., width, height);
+ cairo_fill (cairo_shape);
+ cairo_restore (cairo_shape);
+ }
+ return;
+ }
+
+ /* shape is 1.0 for painted areas, 0.0 for unpainted ones */
+
+ cairo_matrix_t matrix;
+ cairo_get_matrix (cairo, &matrix);
+ //XXX: it is possible that we should only do sub pixel positioning if
+ // we are rendering fonts */
+ if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) {
+ drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg);
+ } else {
+ drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg);
+ }
+}
+
+void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ unsigned char *buffer;
+ unsigned char *dest;
+ cairo_surface_t *image;
+ cairo_pattern_t *pattern;
+ int x, y;
+ ImageStream *imgStr;
+ Guchar *pix;
+ cairo_matrix_t matrix;
+ int invert_bit;
+ int row_stride;
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width, 1, 1);
+ imgStr->reset();
+
+ image = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
+ if (cairo_surface_status (image))
+ goto cleanup;
+
+ buffer = cairo_image_surface_get_data (image);
+ row_stride = cairo_image_surface_get_stride (image);
+
+ invert_bit = invert ? 1 : 0;
+
+ for (y = 0; y < height; y++) {
+ pix = imgStr->getLine();
+ dest = buffer + y * row_stride;
+ for (x = 0; x < width; x++) {
+
+ if (pix[x] ^ invert_bit)
+ *dest++ = 0;
+ else
+ *dest++ = 255;
+ }
+ }
+
+ cairo_surface_mark_dirty (image);
+ pattern = cairo_pattern_create_for_surface (image);
+ cairo_surface_destroy (image);
+ if (cairo_pattern_status (pattern))
+ goto cleanup;
+
+ LOG (printf ("drawImageMask %dx%d\n", width, height));
+
+ /* we should actually be using CAIRO_FILTER_NEAREST here. However,
+ * cairo doesn't yet do minifaction filtering causing scaled down
+ * images with CAIRO_FILTER_NEAREST to look really bad */
+ cairo_pattern_set_filter (pattern,
+ interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
+
+ cairo_matrix_init_translate (&matrix, 0, height);
+ cairo_matrix_scale (&matrix, width, -height);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ mask = cairo_pattern_reference (pattern);
+ } else {
+ cairo_save (cairo);
+ cairo_rectangle (cairo, 0., 0., 1., 1.);
+ cairo_clip (cairo);
+ cairo_mask (cairo, pattern);
+ cairo_restore (cairo);
+ }
+
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_set_source (cairo_shape, pattern);
+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
+ cairo_fill (cairo_shape);
+ cairo_restore (cairo_shape);
+ }
+
+ cairo_pattern_destroy (pattern);
+
+cleanup:
+ imgStr->close();
+ delete imgStr;
+}
+
+
+void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ unsigned char *buffer;
+ cairo_surface_t *image;
+ cairo_pattern_t *pattern;
+ ImageStream *imgStr;
+ Guchar *pix;
+ cairo_matrix_t matrix;
+ int invert_bit;
+ int row_stride;
+
+ /* cairo does a very poor job of scaling down images so we scale them ourselves */
+
+ /* this scaling code is adopted from the splash image scaling code */
+ cairo_get_matrix(cairo, &matrix);
+#if 0
+ printf("[%f %f], [%f %f], %f %f\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
+#endif
+ /* this whole computation should be factored out */
+ double xScale = matrix.xx;
+ double yScale = matrix.yy;
+ int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
+ int scaledHeight;
+ int scaledWidth;
+ if (xScale >= 0) {
+ tx = splashRound(matrix.x0 - 0.01);
+ tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
+ } else {
+ tx = splashRound(matrix.x0 + 0.01) - 1;
+ tx2 = splashRound(matrix.x0 + xScale - 0.01);
+ }
+ scaledWidth = abs(tx2 - tx) + 1;
+ //scaledWidth = splashRound(fabs(xScale));
+ if (scaledWidth == 0) {
+ // technically, this should draw nothing, but it generally seems
+ // better to draw a one-pixel-wide stripe rather than throwing it
+ // away
+ scaledWidth = 1;
+ }
+ if (yScale >= 0) {
+ ty = splashFloor(matrix.y0 + 0.01);
+ ty2 = splashCeil(matrix.y0 + yScale - 0.01);
+ } else {
+ ty = splashCeil(matrix.y0 - 0.01);
+ ty2 = splashFloor(matrix.y0 + yScale + 0.01);
+ }
+ scaledHeight = abs(ty2 - ty);
+ if (scaledHeight == 0) {
+ scaledHeight = 1;
+ }
+#if 0
+ printf("xscale: %g, yscale: %g\n", xScale, yScale);
+ printf("width: %d, height: %d\n", width, height);
+ printf("scaledWidth: %d, scaledHeight: %d\n", scaledWidth, scaledHeight);
+#endif
+
+ /* compute the required padding */
+ /* Padding is used to preserve the aspect ratio.
+ We compute total_pad to make (height+total_pad)/scaledHeight as close to height/yScale as possible */
+ int head_pad = 0;
+ int tail_pad = 0;
+ int total_pad = splashRound(height*(scaledHeight/fabs(yScale)) - height);
+
+ /* compute the two pieces of padding */
+ if (total_pad > 0) {
+ //XXX: i'm not positive fabs() is correct
+ float tail_error = fabs(matrix.y0 - ty);
+ float head_error = fabs(ty2 - (matrix.y0 + yScale));
+ float tail_fraction = tail_error/(tail_error + head_error);
+ tail_pad = splashRound(total_pad*tail_fraction);
+ head_pad = total_pad - tail_pad;
+ } else {
+ tail_pad = 0;
+ head_pad = 0;
+ }
+ int origHeight = height;
+ height += tail_pad;
+ height += head_pad;
+#if 0
+ printf("head_pad: %d tail_pad: %d\n", head_pad, tail_pad);
+ printf("origHeight: %d height: %d\n", origHeight, height);
+ printf("ty: %d, ty2: %d\n", ty, ty2);
+#endif
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width, 1, 1);
+ imgStr->reset();
+
+ invert_bit = invert ? 1 : 0;
+
+ image = cairo_image_surface_create (CAIRO_FORMAT_A8, scaledWidth, scaledHeight);
+ if (cairo_surface_status (image)) {
+ imgStr->close();
+ delete imgStr;
+ return;
+ }
+
+ buffer = cairo_image_surface_get_data (image);
+ row_stride = cairo_image_surface_get_stride (image);
+
+ int yp = height / scaledHeight;
+ int yq = height % scaledHeight;
+ int xp = width / scaledWidth;
+ int xq = width % scaledWidth;
+ int yt = 0;
+ int origHeight_c = origHeight;
+ /* use MIN() because yp might be > origHeight because of padding */
+ unsigned char *pixBuf = (unsigned char *)malloc(MIN(yp+1, origHeight)*width);
+ int lastYStep = 1;
+ int total = 0;
+ for (int y = 0; y < scaledHeight; y++) {
+ // y scale Bresenham
+ int yStep = yp;
+ yt += yq;
+
+ if (yt >= scaledHeight) {
+ yt -= scaledHeight;
+ ++yStep;
+ }
+
+ // read row (s) from image ignoring the padding as appropriate
+ {
+ int n = (yp > 0) ? yStep : lastYStep;
+ total += n;
+ if (n > 0) {
+ unsigned char *p = pixBuf;
+ int head_pad_count = head_pad;
+ int origHeight_count = origHeight;
+ int tail_pad_count = tail_pad;
+ for (int i=0; i<n; i++) {
+ // get row
+ if (head_pad_count) {
+ head_pad_count--;
+ } else if (origHeight_count) {
+ pix = imgStr->getLine();
+ for (int j=0; j<width; j++) {
+ if (pix[j] ^ invert_bit)
+ p[j] = 0;
+ else
+ p[j] = 255;
+ }
+ origHeight_count--;
+ p += width;
+ } else if (tail_pad_count) {
+ tail_pad_count--;
+ } else {
+ printf("%d %d\n", n, total);
+ assert(0 && "over run\n");
+ }
+ }
+ }
+ }
+
+ lastYStep = yStep;
+ int k1 = y;
+
+ int xt = 0;
+ int xSrc = 0;
+ int x1 = k1;
+ int n = yStep > 0 ? yStep : 1;
+ int origN = n;
+
+ /* compute the size of padding and pixels that will be used for this row */
+ int head_pad_size = MIN(n, head_pad);
+ n -= head_pad_size;
+ head_pad -= MIN(head_pad_size, yStep);
+
+ int pix_size = MIN(n, origHeight);
+ n -= pix_size;
+ origHeight -= MIN(pix_size, yStep);
+
+ int tail_pad_size = MIN(n, tail_pad);
+ n -= tail_pad_size;
+ tail_pad -= MIN(tail_pad_size, yStep);
+ if (n != 0) {
+ printf("n = %d (%d %d %d)\n", n, head_pad_size, pix_size, tail_pad_size);
+ assert(n == 0);
+ }
+
+ for (int x = 0; x < scaledWidth; ++x) {
+ int xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+ int m = xStep > 0 ? xStep : 1;
+ float pixAcc0 = 0;
+ /* could m * head_pad_size * tail_pad_size overflow? */
+ if (invert_bit) {
+ pixAcc0 += m * head_pad_size * tail_pad_size * 255;
+ } else {
+ pixAcc0 += m * head_pad_size * tail_pad_size * 0;
+ }
+ /* Accumulate all of the source pixels for the destination pixel */
+ for (int i = 0; i < pix_size; ++i) {
+ for (int j = 0; j< m; ++j) {
+ if (xSrc + i*width + j > MIN(yp + 1, origHeight_c)*width) {
+ printf("%d > %d (%d %d %d %d) (%d %d %d)\n", xSrc + i*width + j, MIN(yp + 1, origHeight_c)*width, xSrc, i , width, j, yp, origHeight_c, width);
+ printf("%d %d %d\n", head_pad_size, pix_size, tail_pad_size);
+ assert(0 && "bad access\n");
+ }
+ pixAcc0 += pixBuf[xSrc + i*width + j];
+ }
+ }
+ buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN*m));
+ xSrc += xStep;
+ x1 += 1;
+ }
+
+ }
+ free(pixBuf);
+
+ cairo_surface_mark_dirty (image);
+ pattern = cairo_pattern_create_for_surface (image);
+ cairo_surface_destroy (image);
+ if (cairo_pattern_status (pattern)) {
+ imgStr->close();
+ delete imgStr;
+ return;
+ }
+
+ /* we should actually be using CAIRO_FILTER_NEAREST here. However,
+ * cairo doesn't yet do minifaction filtering causing scaled down
+ * images with CAIRO_FILTER_NEAREST to look really bad */
+ cairo_pattern_set_filter (pattern,
+ interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
+
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ cairo_matrix_init_translate (&matrix, 0, scaledHeight);
+ cairo_matrix_scale (&matrix, scaledWidth, -scaledHeight);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ mask = cairo_pattern_reference (pattern);
+ } else {
+ cairo_save (cairo);
+
+ /* modify our current transformation so that the prescaled image
+ * goes where it is supposed to */
+ cairo_get_matrix(cairo, &matrix);
+ cairo_scale(cairo, 1.0/matrix.xx, 1.0/matrix.yy);
+ // get integer co-ords
+ cairo_translate (cairo, tx - matrix.x0, ty2 - matrix.y0);
+ if (yScale > 0)
+ cairo_scale(cairo, 1, -1);
+
+ cairo_rectangle (cairo, 0., 0., scaledWidth, scaledHeight);
+ cairo_clip (cairo);
+ cairo_mask (cairo, pattern);
+
+ //cairo_get_matrix(cairo, &matrix);
+ //printf("mask at: [%f %f], [%f %f], %f %f\n\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
+ cairo_restore(cairo);
+ }
+
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+
+ /* modify our current transformation so that the prescaled image
+ * goes where it is supposed to */
+ cairo_get_matrix(cairo_shape, &matrix);
+ cairo_scale(cairo_shape, 1.0/matrix.xx, 1.0/matrix.yy);
+ // get integer co-ords
+ cairo_translate (cairo_shape, tx - matrix.x0, ty2 - matrix.y0);
+ if (yScale > 0)
+ cairo_scale(cairo_shape, 1, -1);
+
+ cairo_rectangle (cairo_shape, 0., 0., scaledWidth, scaledHeight);
+ cairo_fill (cairo_shape);
+
+ cairo_restore(cairo_shape);
+ }
+
+ cairo_pattern_destroy (pattern);
+
+ imgStr->close();
+ delete imgStr;
+}
+
+void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
+ Stream *str, int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth,
+ int maskHeight, GBool maskInvert,
+ GBool maskInterpolate)
+{
+ ImageStream *maskImgStr, *imgStr;
+ int row_stride;
+ unsigned char *maskBuffer, *buffer;
+ unsigned char *maskDest;
+ unsigned int *dest;
+ cairo_surface_t *maskImage, *image;
+ cairo_pattern_t *maskPattern, *pattern;
+ cairo_matrix_t matrix;
+ cairo_matrix_t maskMatrix;
+ Guchar *pix;
+ int x, y;
+ int invert_bit;
+
+ maskImgStr = new ImageStream(maskStr, maskWidth, 1, 1);
+ maskImgStr->reset();
+
+ maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
+ if (cairo_surface_status (maskImage)) {
+ maskImgStr->close();
+ delete maskImgStr;
+ return;
+ }
+
+ maskBuffer = cairo_image_surface_get_data (maskImage);
+ row_stride = cairo_image_surface_get_stride (maskImage);
+
+ invert_bit = maskInvert ? 1 : 0;
+
+ for (y = 0; y < maskHeight; y++) {
+ pix = maskImgStr->getLine();
+ maskDest = maskBuffer + y * row_stride;
+ for (x = 0; x < maskWidth; x++) {
+ if (pix[x] ^ invert_bit)
+ *maskDest++ = 0;
+ else
+ *maskDest++ = 255;
+ }
+ }
+
+ maskImgStr->close();
+ delete maskImgStr;
+
+ cairo_surface_mark_dirty (maskImage);
+ maskPattern = cairo_pattern_create_for_surface (maskImage);
+ cairo_surface_destroy (maskImage);
+ if (cairo_pattern_status (maskPattern))
+ return;
+
+#if 0
+ /* ICCBased color space doesn't do any color correction
+ * so check its underlying color space as well */
+ int is_identity_transform;
+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
+ (colorMap->getColorSpace()->getMode() == csICCBased &&
+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
+#endif
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+ if (cairo_surface_status (image))
+ goto cleanup;
+
+ buffer = cairo_image_surface_get_data (image);
+ row_stride = cairo_image_surface_get_stride (image);
+ for (y = 0; y < height; y++) {
+ dest = (unsigned int *) (buffer + y * row_stride);
+ pix = imgStr->getLine();
+ colorMap->getRGBLine (pix, dest, width);
+ }
+
+ cairo_surface_mark_dirty (image);
+ pattern = cairo_pattern_create_for_surface (image);
+ cairo_surface_destroy (image);
+ if (cairo_pattern_status (pattern))
+ goto cleanup;
+
+ LOG (printf ("drawMaskedImage %dx%d\n", width, height));
+
+ cairo_pattern_set_filter (pattern,
+ interpolate ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
+ cairo_pattern_set_filter (maskPattern,
+ maskInterpolate ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
+
+ cairo_matrix_init_translate (&matrix, 0, height);
+ cairo_matrix_scale (&matrix, width, -height);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
+ cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
+ cairo_pattern_set_matrix (maskPattern, &maskMatrix);
+
+ cairo_save (cairo);
+ cairo_set_source (cairo, pattern);
+ cairo_rectangle (cairo, 0., 0., 1., 1.);
+ cairo_clip (cairo);
+ cairo_mask (cairo, maskPattern);
+ cairo_restore (cairo);
+
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_set_source (cairo_shape, pattern);
+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
+ cairo_fill (cairo_shape);
+ cairo_restore (cairo_shape);
+ }
+
+ cairo_pattern_destroy (maskPattern);
+ cairo_pattern_destroy (pattern);
+
+cleanup:
+ imgStr->close();
+ delete imgStr;
+}
+
+
+//XXX: is this affect by AIS(alpha is shape)?
+void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate)
+{
+ ImageStream *maskImgStr, *imgStr;
+ int row_stride;
+ unsigned char *maskBuffer, *buffer;
+ unsigned char *maskDest;
+ unsigned int *dest;
+ cairo_surface_t *maskImage, *image;
+ cairo_pattern_t *maskPattern, *pattern;
+ cairo_matrix_t maskMatrix, matrix;
+ Guchar *pix;
+ int y;
+
+ maskImgStr = new ImageStream(maskStr, maskWidth,
+ maskColorMap->getNumPixelComps(),
+ maskColorMap->getBits());
+ maskImgStr->reset();
+
+ maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
+ if (cairo_surface_status (maskImage)) {
+ maskImgStr->close();
+ delete maskImgStr;
+ return;
+ }
+
+ maskBuffer = cairo_image_surface_get_data (maskImage);
+ row_stride = cairo_image_surface_get_stride (maskImage);
+ for (y = 0; y < maskHeight; y++) {
+ maskDest = (unsigned char *) (maskBuffer + y * row_stride);
+ pix = maskImgStr->getLine();
+ maskColorMap->getGrayLine (pix, maskDest, maskWidth);
+ }
+
+ maskImgStr->close();
+ delete maskImgStr;
+
+ cairo_surface_mark_dirty (maskImage);
+ maskPattern = cairo_pattern_create_for_surface (maskImage);
+ cairo_surface_destroy (maskImage);
+ if (cairo_pattern_status (maskPattern))
+ return;
+
+#if 0
+ /* ICCBased color space doesn't do any color correction
+ * so check its underlying color space as well */
+ int is_identity_transform;
+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
+ (colorMap->getColorSpace()->getMode() == csICCBased &&
+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
+#endif
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+ if (cairo_surface_status (image))
+ goto cleanup;
+
+ buffer = cairo_image_surface_get_data (image);
+ row_stride = cairo_image_surface_get_stride (image);
+ for (y = 0; y < height; y++) {
+ dest = (unsigned int *) (buffer + y * row_stride);
+ pix = imgStr->getLine();
+ colorMap->getRGBLine (pix, dest, width);
+ }
+
+ cairo_surface_mark_dirty (image);
+ pattern = cairo_pattern_create_for_surface (image);
+ cairo_surface_destroy (image);
+ if (cairo_pattern_status (pattern))
+ goto cleanup;
+
+ LOG (printf ("drawSoftMaskedImage %dx%d\n", width, height));
+
+ //XXX: should set mask filter
+ cairo_pattern_set_filter (pattern,
+ interpolate ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
+ cairo_pattern_set_filter (maskPattern,
+ maskInterpolate ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
+
+ cairo_matrix_init_translate (&matrix, 0, height);
+ cairo_matrix_scale (&matrix, width, -height);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
+ cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
+ cairo_pattern_set_matrix (maskPattern, &maskMatrix);
+
+ cairo_save (cairo);
+ cairo_set_source (cairo, pattern);
+ cairo_rectangle (cairo, 0., 0.,
+ MIN (width, maskWidth) / (double)width,
+ MIN (height, maskHeight) / (double)height);
+ cairo_clip (cairo);
+ cairo_mask (cairo, maskPattern);
+ cairo_restore (cairo);
+
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_set_source (cairo_shape, pattern);
+ cairo_rectangle (cairo_shape, 0., 0.,
+ MIN (width, maskWidth) / (double)width,
+ MIN (height, maskHeight) / (double)height);
+ cairo_fill (cairo_shape);
+ cairo_restore (cairo_shape);
+ }
+
+ cairo_pattern_destroy (maskPattern);
+ cairo_pattern_destroy (pattern);
+
+cleanup:
+ imgStr->close();
+ delete imgStr;
+}
+
+void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ int *maskColors, GBool inlineImg)
+{
+ cairo_surface_t *image;
+ cairo_pattern_t *pattern, *maskPattern;
+ ImageStream *imgStr;
+ cairo_matrix_t matrix;
+ unsigned char *buffer;
+ int stride, i;
+ GfxRGB *lookup = NULL;
+
+ /* TODO: Do we want to cache these? */
+ imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+#if 0
+ /* ICCBased color space doesn't do any color correction
+ * so check its underlying color space as well */
+ int is_identity_transform;
+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
+ (colorMap->getColorSpace()->getMode() == csICCBased &&
+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
+#endif
+
+ image = cairo_image_surface_create (maskColors ?
+ CAIRO_FORMAT_ARGB32 :
+ CAIRO_FORMAT_RGB24,
+ width, height);
+ if (cairo_surface_status (image))
+ goto cleanup;
+
+ // special case for one-channel (monochrome/gray/separation) images:
+ // build a lookup table here
+ if (colorMap->getNumPixelComps() == 1) {
+ int n;
+ Guchar pix;
+
+ n = 1 << colorMap->getBits();
+ lookup = (GfxRGB *)gmallocn(n, sizeof(GfxRGB));
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+
+ colorMap->getRGB(&pix, &lookup[i]);
+ }
+ }
+
+ buffer = cairo_image_surface_get_data (image);
+ stride = cairo_image_surface_get_stride (image);
+ for (int y = 0; y < height; y++) {
+ uint32_t *dest = (uint32_t *) (buffer + y * stride);
+ Guchar *pix = imgStr->getLine();
+
+ if (lookup) {
+ Guchar *p = pix;
+ GfxRGB rgb;
+
+ for (i = 0; i < width; i++) {
+ rgb = lookup[*p];
+ dest[i] =
+ ((int) colToByte(rgb.r) << 16) |
+ ((int) colToByte(rgb.g) << 8) |
+ ((int) colToByte(rgb.b) << 0);
+ p++;
+ }
+ } else {
+ colorMap->getRGBLine (pix, dest, width);
+ }
+
+ if (maskColors) {
+ for (int x = 0; x < width; x++) {
+ bool is_opaque = false;
+ for (int i = 0; i < colorMap->getNumPixelComps(); ++i) {
+ if (pix[i] < maskColors[2*i] ||
+ pix[i] > maskColors[2*i+1]) {
+ is_opaque = true;
+ break;
+ }
+ }
+ if (is_opaque)
+ *dest |= 0xff000000;
+ else
+ *dest = 0;
+ dest++;
+ pix += colorMap->getNumPixelComps();
+ }
+ }
+ }
+ gfree(lookup);
+
+ cairo_surface_mark_dirty (image);
+ pattern = cairo_pattern_create_for_surface (image);
+ cairo_surface_destroy (image);
+ if (cairo_pattern_status (pattern))
+ goto cleanup;
+
+ LOG (printf ("drawImage %dx%d\n", width, height));
+
+ cairo_pattern_set_filter (pattern,
+ interpolate ?
+ CAIRO_FILTER_BILINEAR : CAIRO_FILTER_FAST);
+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
+
+ cairo_matrix_init_translate (&matrix, 0, height);
+ cairo_matrix_scale (&matrix, width, -height);
+ cairo_pattern_set_matrix (pattern, &matrix);
+
+ if (!mask && fill_opacity != 1.0) {
+ maskPattern = cairo_pattern_create_rgba (1., 1., 1., fill_opacity);
+ } else if (mask) {
+ maskPattern = cairo_pattern_reference (mask);
+ } else {
+ maskPattern = NULL;
+ }
+
+ cairo_save (cairo);
+ cairo_set_source (cairo, pattern);
+ cairo_rectangle (cairo, 0., 0., 1., 1.);
+ if (maskPattern) {
+ cairo_clip (cairo);
+ cairo_mask (cairo, maskPattern);
+ } else {
+ cairo_fill (cairo);
+ }
+ cairo_restore (cairo);
+
+ cairo_pattern_destroy (maskPattern);
+
+ if (cairo_shape) {
+ cairo_save (cairo_shape);
+ cairo_set_source (cairo_shape, pattern);
+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
+ cairo_fill (cairo_shape);
+ cairo_restore (cairo_shape);
+ }
+
+ cairo_pattern_destroy (pattern);
+
+cleanup:
+ imgStr->close();
+ delete imgStr;
+}
+
+
+//------------------------------------------------------------------------
+// ImageOutputDev
+//------------------------------------------------------------------------
+
+CairoImageOutputDev::CairoImageOutputDev()
+{
+ images = NULL;
+ numImages = 0;
+ size = 0;
+ imgDrawCbk = NULL;
+ imgDrawCbkData = NULL;
+}
+
+CairoImageOutputDev::~CairoImageOutputDev()
+{
+ int i;
+
+ for (i = 0; i < numImages; i++)
+ delete images[i];
+ gfree (images);
+}
+
+void CairoImageOutputDev::saveImage(CairoImage *image)
+{
+ if (numImages >= size) {
+ size += 16;
+ images = (CairoImage **) greallocn (images, size, sizeof (CairoImage *));
+ }
+ images[numImages++] = image;
+}
+
+void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg)
+{
+ cairo_t *cr;
+ cairo_surface_t *surface;
+ double x1, y1, x2, y2;
+ double *ctm;
+ double mat[6];
+ CairoImage *image;
+
+ ctm = state->getCTM();
+
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+ x1 = mat[4];
+ y1 = mat[5];
+ x2 = x1 + width;
+ y2 = y1 + height;
+
+ image = new CairoImage (x1, y1, x2, y2);
+ saveImage (image);
+
+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+ cr = cairo_create (surface);
+ setCairo (cr);
+ cairo_translate (cr, 0, height);
+ cairo_scale (cr, width, -height);
+
+ CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
+ image->setImage (surface);
+
+ setCairo (NULL);
+ cairo_surface_destroy (surface);
+ cairo_destroy (cr);
+ }
+}
+
+void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg)
+{
+ cairo_t *cr;
+ cairo_surface_t *surface;
+ double x1, y1, x2, y2;
+ double *ctm;
+ double mat[6];
+ CairoImage *image;
+
+ ctm = state->getCTM();
+
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+ x1 = mat[4];
+ y1 = mat[5];
+ x2 = x1 + width;
+ y2 = y1 + height;
+
+ image = new CairoImage (x1, y1, x2, y2);
+ saveImage (image);
+
+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+ cr = cairo_create (surface);
+ setCairo (cr);
+ cairo_translate (cr, 0, height);
+ cairo_scale (cr, width, -height);
+
+ CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg);
+ image->setImage (surface);
+
+ setCairo (NULL);
+ cairo_surface_destroy (surface);
+ cairo_destroy (cr);
+ }
+}
+
+void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate)
+{
+ cairo_t *cr;
+ cairo_surface_t *surface;
+ double x1, y1, x2, y2;
+ double *ctm;
+ double mat[6];
+ CairoImage *image;
+
+ ctm = state->getCTM();
+
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+ x1 = mat[4];
+ y1 = mat[5];
+ x2 = x1 + width;
+ y2 = y1 + height;
+
+ image = new CairoImage (x1, y1, x2, y2);
+ saveImage (image);
+
+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+ cr = cairo_create (surface);
+ setCairo (cr);
+ cairo_translate (cr, 0, height);
+ cairo_scale (cr, width, -height);
+
+ CairoOutputDev::drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate,
+ maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
+ image->setImage (surface);
+
+ setCairo (NULL);
+ cairo_surface_destroy (surface);
+ cairo_destroy (cr);
+ }
+}
+
+void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate)
+{
+ cairo_t *cr;
+ cairo_surface_t *surface;
+ double x1, y1, x2, y2;
+ double *ctm;
+ double mat[6];
+ CairoImage *image;
+
+ ctm = state->getCTM();
+
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+ x1 = mat[4];
+ y1 = mat[5];
+ x2 = x1 + width;
+ y2 = y1 + height;
+
+ image = new CairoImage (x1, y1, x2, y2);
+ saveImage (image);
+
+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+ cr = cairo_create (surface);
+ setCairo (cr);
+ cairo_translate (cr, 0, height);
+ cairo_scale (cr, width, -height);
+
+ CairoOutputDev::drawMaskedImage(state, ref, str, width, height, colorMap, interpolate,
+ maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
+ image->setImage (surface);
+
+ setCairo (NULL);
+ cairo_surface_destroy (surface);
+ cairo_destroy (cr);
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.h
new file mode 100644
index 00000000000..fb9c0d7e785
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CairoOutputDev.h
@@ -0,0 +1,469 @@
+//========================================================================
+//
+// CairoOutputDev.h
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, INC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+// Copyright (C) 2006-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2008, 2009 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef CAIROOUTPUTDEV_H
+#define CAIROOUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include <cairo-ft.h>
+#include "OutputDev.h"
+#include "TextOutputDev.h"
+#include "GfxState.h"
+
+class GfxState;
+class GfxPath;
+class Gfx8BitFont;
+struct GfxRGB;
+class CairoFontEngine;
+class CairoFont;
+
+//------------------------------------------------------------------------
+
+//------------------------------------------------------------------------
+// CairoImage
+//------------------------------------------------------------------------
+class CairoImage {
+public:
+ // Constructor.
+ CairoImage (double x1, double y1, double x2, double y2);
+
+ // Destructor.
+ ~CairoImage ();
+
+ // Set the image cairo surface
+ void setImage (cairo_surface_t *image);
+
+ // Get the image cairo surface
+ cairo_surface_t *getImage () const { return image; }
+
+ // Get the image rectangle
+ void getRect (double *xa1, double *ya1, double *xa2, double *ya2)
+ { *xa1 = x1; *ya1 = y1; *xa2 = x2; *ya2 = y2; }
+
+private:
+ cairo_surface_t *image; // image cairo surface
+ double x1, y1; // upper left corner
+ double x2, y2; // lower right corner
+};
+
+
+//------------------------------------------------------------------------
+// CairoOutputDev
+//------------------------------------------------------------------------
+
+class CairoOutputDev: public OutputDev {
+public:
+
+ // Constructor.
+ CairoOutputDev();
+
+ // Destructor.
+ virtual ~CairoOutputDev();
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use tilingPatternFill()? If this returns false,
+ // tiling pattern fills will be reduced to a series of other drawing
+ // operations.
+ virtual GBool useTilingPatternFill() { return gTrue; }
+
+ // Does this device use functionShadedFill(), axialShadedFill(), and
+ // radialShadedFill()? If this returns false, these shaded fills
+ // will be reduced to a series of other drawing operations.
+ virtual GBool useShadedFills() { return gTrue; }
+
+ // Does this device use FillColorStop()?
+ virtual GBool useFillColorStop() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- link borders
+ virtual void drawLink(Link *link, Catalog *catalog);
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState *state);
+ virtual void restoreState(GfxState *state);
+
+ //----- update graphics state
+ virtual void updateAll(GfxState *state);
+ virtual void setDefaultCTM(double *ctm);
+ virtual void updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32);
+ virtual void updateLineDash(GfxState *state);
+ virtual void updateFlatness(GfxState *state);
+ virtual void updateLineJoin(GfxState *state);
+ virtual void updateLineCap(GfxState *state);
+ virtual void updateMiterLimit(GfxState *state);
+ virtual void updateLineWidth(GfxState *state);
+ virtual void updateFillColor(GfxState *state);
+ virtual void updateStrokeColor(GfxState *state);
+ virtual void updateFillOpacity(GfxState *state);
+ virtual void updateStrokeOpacity(GfxState *state);
+ virtual void updateFillColorStop(GfxState *state, double offset);
+ virtual void updateBlendMode(GfxState *state);
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+ virtual void updateRender(GfxState *state);
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+ virtual GBool tilingPatternFill(GfxState *state, Object *str,
+ int paintType, Dict *resDict,
+ double *mat, double *bbox,
+ int x0, int y0, int x1, int y1,
+ double xStep, double yStep);
+ virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
+ virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading);
+ virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax);
+ virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading);
+
+ //----- path clipping
+ virtual void clip(GfxState *state);
+ virtual void eoClip(GfxState *state);
+
+ //----- text drawing
+ void beginString(GfxState *state, GooString *s);
+ void endString(GfxState *state);
+ void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen);
+
+ virtual GBool beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen);
+ virtual void endType3Char(GfxState *state);
+ virtual void beginTextObject(GfxState *state);
+ virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath && haveCSPattern; }
+ virtual void endTextObject(GfxState *state);
+
+ // If current colorspace is pattern,
+ // does this device support text in pattern colorspace?
+ virtual GBool supportTextCSPattern(GfxState *state) {
+ return state->getFillColorSpace()->getMode() == csPattern; }
+
+ // If current colorspace is pattern,
+ // need this device special handling for masks in pattern colorspace?
+ virtual GBool fillMaskCSPattern(GfxState * state) {
+ return state->getFillColorSpace()->getMode() == csPattern; }
+
+ virtual void endMaskClip(GfxState *state);
+
+ //----- grouping operators
+ virtual void beginMarkedContent(char *name, Dict *properties);
+ virtual void endMarkedContent(GfxState *state);
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert, GBool interpolate,
+ GBool inlineImg);
+ void drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert, GBool interpolate,
+ GBool inlineImg);
+ void drawImageMaskRegular(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert, GBool interpolate,
+ GBool inlineImg);
+
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+
+ //----- transparency groups and soft masks
+ virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+ GfxColorSpace * /*blendingColorSpace*/,
+ GBool /*isolated*/, GBool /*knockout*/,
+ GBool /*forSoftMask*/);
+ virtual void endTransparencyGroup(GfxState * /*state*/);
+ void popTransparencyGroup();
+ virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/);
+ virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
+ Function * /*transferFunc*/, GfxColor * /*backdropColor*/);
+ virtual void clearSoftMask(GfxState * /*state*/);
+
+ //----- Type 3 font operators
+ virtual void type3D0(GfxState *state, double wx, double wy);
+ virtual void type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury);
+
+ //----- special access
+
+ // Called to indicate that a new PDF document has been loaded.
+ void startDoc(XRef *xrefA, Catalog *catalogA, CairoFontEngine *fontEngine = NULL);
+
+ GBool isReverseVideo() { return gFalse; }
+
+ void setCairo (cairo_t *cr);
+ void setTextPage (TextPage *text);
+ void setPrinting (GBool printing) { this->printing = printing; needFontUpdate = gTrue; }
+
+ void setInType3Char(GBool inType3Char) { this->inType3Char = inType3Char; }
+ void getType3GlyphWidth (double *wx, double *wy) { *wx = t3_glyph_wx; *wy = t3_glyph_wy; }
+ GBool hasType3GlyphBBox () { return t3_glyph_has_bbox; }
+ double *getType3GlyphBBox () { return t3_glyph_bbox; }
+
+protected:
+ void doPath(cairo_t *cairo, GfxState *state, GfxPath *path);
+
+ GfxRGB fill_color, stroke_color;
+ cairo_pattern_t *fill_pattern, *stroke_pattern;
+ double fill_opacity;
+ double stroke_opacity;
+ CairoFont *currentFont;
+
+ XRef *xref; // xref table for current document
+ Catalog *catalog;
+
+ static FT_Library ft_lib;
+ static GBool ft_lib_initialized;
+
+ CairoFontEngine *fontEngine;
+ GBool fontEngine_owner;
+
+ cairo_t *cairo;
+ cairo_matrix_t orig_matrix;
+ GBool needFontUpdate; // set when the font needs to be updated
+ GBool printing;
+ cairo_surface_t *surface;
+ cairo_glyph_t *glyphs;
+ int glyphCount;
+ cairo_path_t *textClipPath;
+ GBool inType3Char; // inside a Type 3 CharProc
+ double t3_glyph_wx, t3_glyph_wy;
+ GBool t3_glyph_has_bbox;
+ double t3_glyph_bbox[4];
+
+ GBool prescaleImages;
+
+ TextPage *text; // text for the current page
+ ActualText *actualText;
+
+ cairo_pattern_t *group;
+ cairo_pattern_t *shape;
+ cairo_pattern_t *mask;
+ cairo_surface_t *cairo_shape_surface;
+ cairo_t *cairo_shape;
+ int knockoutCount;
+ struct ColorSpaceStack {
+ GBool knockout;
+ GfxColorSpace *cs;
+ struct ColorSpaceStack *next;
+ } * groupColorSpaceStack;
+
+ struct MaskStack {
+ cairo_pattern_t *mask;
+ struct MaskStack *next;
+ } *maskStack;
+
+ GBool haveCSPattern; // set if text has been drawn with a
+ // clipping render mode because of pattern colorspace
+ int savedRender; // use if pattern colorspace
+};
+
+//------------------------------------------------------------------------
+// CairoImageOutputDev
+//------------------------------------------------------------------------
+
+//XXX: this should ideally not inherit from CairoOutputDev but use it instead perhaps
+class CairoImageOutputDev: public CairoOutputDev {
+public:
+
+ // Constructor.
+ CairoImageOutputDev();
+
+ // Destructor.
+ virtual ~CairoImageOutputDev();
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gFalse; }
+
+ // Does this device use tilingPatternFill()? If this returns false,
+ // tiling pattern fills will be reduced to a series of other drawing
+ // operations.
+ virtual GBool useTilingPatternFill() { return gTrue; }
+
+ // Does this device use functionShadedFill(), axialShadedFill(), and
+ // radialShadedFill()? If this returns false, these shaded fills
+ // will be reduced to a series of other drawing operations.
+ virtual GBool useShadedFills() { return gTrue; }
+
+ // Does this device use FillColorStop()?
+ virtual GBool useFillColorStop() { return gFalse; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gTrue; }
+
+ //----- link borders
+ virtual void drawLink(Link *link, Catalog *catalog) { }
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState *state) { }
+ virtual void restoreState(GfxState *state) { }
+
+ //----- update graphics state
+ virtual void updateAll(GfxState *state) { }
+ virtual void setDefaultCTM(double *ctm) { }
+ virtual void updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32) { }
+ virtual void updateLineDash(GfxState *state) { }
+ virtual void updateFlatness(GfxState *state) { }
+ virtual void updateLineJoin(GfxState *state) { }
+ virtual void updateLineCap(GfxState *state) { }
+ virtual void updateMiterLimit(GfxState *state) { }
+ virtual void updateLineWidth(GfxState *state) { }
+ virtual void updateFillColor(GfxState *state) { }
+ virtual void updateStrokeColor(GfxState *state) { }
+ virtual void updateFillOpacity(GfxState *state) { }
+ virtual void updateStrokeOpacity(GfxState *state) { }
+ virtual void updateBlendMode(GfxState *state) { }
+
+ //----- update text state
+ virtual void updateFont(GfxState *state) { }
+
+ //----- path painting
+ virtual void stroke(GfxState *state) { }
+ virtual void fill(GfxState *state) { }
+ virtual void eoFill(GfxState *state) { }
+ virtual GBool tilingPatternFill(GfxState *state, Object *str,
+ int paintType, Dict *resDict,
+ double *mat, double *bbox,
+ int x0, int y0, int x1, int y1,
+ double xStep, double yStep) { return gTrue; }
+ virtual GBool axialShadedFill(GfxState *state,
+ GfxAxialShading *shading,
+ double tMin, double tMax) { return gTrue; }
+ virtual GBool radialShadedFill(GfxState *state,
+ GfxRadialShading *shading,
+ double sMin, double sMax) { return gTrue; }
+
+ //----- path clipping
+ virtual void clip(GfxState *state) { }
+ virtual void eoClip(GfxState *state) { }
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+
+ //----- transparency groups and soft masks
+ virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+ GfxColorSpace * /*blendingColorSpace*/,
+ GBool /*isolated*/, GBool /*knockout*/,
+ GBool /*forSoftMask*/) {}
+ virtual void endTransparencyGroup(GfxState * /*state*/) {}
+ virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {}
+ virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
+ Function * /*transferFunc*/, GfxColor * /*backdropColor*/) {}
+ virtual void clearSoftMask(GfxState * /*state*/) {}
+
+ //----- Image list
+ // By default images are not rendred
+ void setImageDrawDecideCbk(GBool (*cbk)(int img_id, void *data),
+ void *data) { imgDrawCbk = cbk; imgDrawCbkData = data; }
+ // Iterate through list of images.
+ int getNumImages() const { return numImages; }
+ CairoImage *getImage(int i) const { return images[i]; }
+
+private:
+ void saveImage(CairoImage *image);
+
+ CairoImage **images;
+ int numImages;
+ int size;
+ GBool (*imgDrawCbk)(int img_id, void *data);
+ void *imgDrawCbkData;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.cc
new file mode 100644
index 00000000000..9a18e244040
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.cc
@@ -0,0 +1,739 @@
+//========================================================================
+//
+// Catalog.cc
+//
+// Copyright 1996-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Jeff Muizelaar <jrmuizel@nit.ca>
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
+// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2006, 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "goo/gmem.h"
+#include "Object.h"
+#include "XRef.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Page.h"
+#include "Error.h"
+#include "Link.h"
+#include "PageLabelInfo.h"
+#include "Catalog.h"
+#include "Form.h"
+#include "OptionalContent.h"
+
+//------------------------------------------------------------------------
+// Catalog
+//------------------------------------------------------------------------
+
+Catalog::Catalog(XRef *xrefA) {
+ Object catDict, pagesDict, pagesDictRef;
+ Object obj, obj2;
+ Object optContentProps;
+ char *alreadyRead;
+ int numPages0;
+ int i;
+
+ ok = gTrue;
+ xref = xrefA;
+ pages = NULL;
+ pageRefs = NULL;
+ numPages = pagesSize = 0;
+ baseURI = NULL;
+ pageLabelInfo = NULL;
+ form = NULL;
+ optContent = NULL;
+
+ xref->getCatalog(&catDict);
+ if (!catDict.isDict()) {
+ error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName());
+ goto err1;
+ }
+ // get the AcroForm dictionary
+ catDict.dictLookup("AcroForm", &acroForm);
+
+ // load Forms
+ if (acroForm.isDict()) {
+ form = new Form(xref,&acroForm);
+ }
+
+
+ // read page tree
+ catDict.dictLookup("Pages", &pagesDict);
+ // This should really be isDict("Pages"), but I've seen at least one
+ // PDF file where the /Type entry is missing.
+ if (!pagesDict.isDict()) {
+ error(-1, "Top-level pages object is wrong type (%s)",
+ pagesDict.getTypeName());
+ goto err2;
+ }
+ pagesDict.dictLookup("Count", &obj);
+ // some PDF files actually use real numbers here ("/Count 9.0")
+ if (!obj.isNum()) {
+ error(-1, "Page count in top-level pages object is wrong type (%s)",
+ obj.getTypeName());
+ goto err3;
+ }
+ pagesSize = numPages0 = (int)obj.getNum();
+ obj.free();
+ pages = (Page **)gmallocn(pagesSize, sizeof(Page *));
+ pageRefs = (Ref *)gmallocn(pagesSize, sizeof(Ref));
+ for (i = 0; i < pagesSize; ++i) {
+ pages[i] = NULL;
+ pageRefs[i].num = -1;
+ pageRefs[i].gen = -1;
+ }
+ alreadyRead = (char *)gmalloc(xref->getNumObjects());
+ memset(alreadyRead, 0, xref->getNumObjects());
+ if (catDict.dictLookupNF("Pages", &pagesDictRef)->isRef() &&
+ pagesDictRef.getRefNum() >= 0 &&
+ pagesDictRef.getRefNum() < xref->getNumObjects()) {
+ alreadyRead[pagesDictRef.getRefNum()] = 1;
+ }
+ pagesDictRef.free();
+ numPages = readPageTree(pagesDict.getDict(), NULL, 0, alreadyRead);
+ gfree(alreadyRead);
+ if (numPages != numPages0) {
+ error(-1, "Page count in top-level pages object is incorrect");
+ }
+ pagesDict.free();
+
+ // read named destination dictionary
+ catDict.dictLookup("Dests", &dests);
+
+ // read root of named destination tree - PDF1.6 table 3.28
+ if (catDict.dictLookup("Names", &obj)->isDict()) {
+ obj.dictLookup("Dests", &obj2);
+ destNameTree.init(xref, &obj2);
+ obj2.free();
+ obj.dictLookup("EmbeddedFiles", &obj2);
+ embeddedFileNameTree.init(xref, &obj2);
+ obj2.free();
+ obj.dictLookup("JavaScript", &obj2);
+ jsNameTree.init(xref, &obj2);
+ obj2.free();
+ }
+ obj.free();
+
+ if (catDict.dictLookup("PageLabels", &obj)->isDict())
+ pageLabelInfo = new PageLabelInfo(&obj, numPages);
+ obj.free();
+
+ // read page mode
+ pageMode = pageModeNone;
+ if (catDict.dictLookup("PageMode", &obj)->isName()) {
+ if (obj.isName("UseNone"))
+ pageMode = pageModeNone;
+ else if (obj.isName("UseOutlines"))
+ pageMode = pageModeOutlines;
+ else if (obj.isName("UseThumbs"))
+ pageMode = pageModeThumbs;
+ else if (obj.isName("FullScreen"))
+ pageMode = pageModeFullScreen;
+ else if (obj.isName("UseOC"))
+ pageMode = pageModeOC;
+ else if (obj.isName("UseAttachments"))
+ pageMode = pageModeAttach;
+ }
+ obj.free();
+
+ pageLayout = pageLayoutNone;
+ if (catDict.dictLookup("PageLayout", &obj)->isName()) {
+ if (obj.isName("SinglePage"))
+ pageLayout = pageLayoutSinglePage;
+ if (obj.isName("OneColumn"))
+ pageLayout = pageLayoutOneColumn;
+ if (obj.isName("TwoColumnLeft"))
+ pageLayout = pageLayoutTwoColumnLeft;
+ if (obj.isName("TwoColumnRight"))
+ pageLayout = pageLayoutTwoColumnRight;
+ if (obj.isName("TwoPageLeft"))
+ pageLayout = pageLayoutTwoPageLeft;
+ if (obj.isName("TwoPageRight"))
+ pageLayout = pageLayoutTwoPageRight;
+ }
+ obj.free();
+
+ // read base URI
+ if (catDict.dictLookup("URI", &obj)->isDict()) {
+ if (obj.dictLookup("Base", &obj2)->isString()) {
+ baseURI = obj2.getString()->copy();
+ }
+ obj2.free();
+ }
+ obj.free();
+
+ // get the metadata stream
+ catDict.dictLookup("Metadata", &metadata);
+
+ // get the structure tree root
+ catDict.dictLookup("StructTreeRoot", &structTreeRoot);
+
+ // get the outline dictionary
+ catDict.dictLookup("Outlines", &outline);
+
+ // get the Optional Content dictionary
+ if (catDict.dictLookup("OCProperties", &optContentProps)->isDict()) {
+ optContent = new OCGs(&optContentProps, xref);
+ if (!optContent->isOk ()) {
+ delete optContent;
+ optContent = NULL;
+ }
+ }
+ optContentProps.free();
+
+ // perform form-related loading after all widgets have been loaded
+ if (form)
+ form->postWidgetsLoad();
+
+ catDict.free();
+ return;
+
+ err3:
+ obj.free();
+ err2:
+ pagesDict.free();
+ err1:
+ catDict.free();
+ dests.initNull();
+ ok = gFalse;
+}
+
+Catalog::~Catalog() {
+ int i;
+
+ if (pages) {
+ for (i = 0; i < pagesSize; ++i) {
+ if (pages[i]) {
+ delete pages[i];
+ }
+ }
+ gfree(pages);
+ gfree(pageRefs);
+ }
+ dests.free();
+ destNameTree.free();
+ embeddedFileNameTree.free();
+ jsNameTree.free();
+ if (baseURI) {
+ delete baseURI;
+ }
+ delete pageLabelInfo;
+ delete form;
+ delete optContent;
+ metadata.free();
+ structTreeRoot.free();
+ outline.free();
+ acroForm.free();
+}
+
+GooString *Catalog::readMetadata() {
+ GooString *s;
+ Dict *dict;
+ Object obj;
+ int c;
+
+ if (!metadata.isStream()) {
+ return NULL;
+ }
+ dict = metadata.streamGetDict();
+ if (!dict->lookup("Subtype", &obj)->isName("XML")) {
+ error(-1, "Unknown Metadata type: '%s'",
+ obj.isName() ? obj.getName() : "???");
+ }
+ obj.free();
+ s = new GooString();
+ metadata.streamReset();
+ while ((c = metadata.streamGetChar()) != EOF) {
+ s->append(c);
+ }
+ metadata.streamClose();
+ return s;
+}
+
+int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start,
+ char *alreadyRead) {
+ Object kids;
+ Object kid;
+ Object kidRef;
+ PageAttrs *attrs1, *attrs2;
+ Page *page;
+ int i, j;
+
+ attrs1 = new PageAttrs(attrs, pagesDict);
+ pagesDict->lookup("Kids", &kids);
+ if (!kids.isArray()) {
+ error(-1, "Kids object (page %d) is wrong type (%s)",
+ start+1, kids.getTypeName());
+ goto err1;
+ }
+ for (i = 0; i < kids.arrayGetLength(); ++i) {
+ kids.arrayGetNF(i, &kidRef);
+ if (kidRef.isRef() &&
+ kidRef.getRefNum() >= 0 &&
+ kidRef.getRefNum() < xref->getNumObjects()) {
+ if (alreadyRead[kidRef.getRefNum()]) {
+ error(-1, "Loop in Pages tree");
+ kidRef.free();
+ continue;
+ }
+ alreadyRead[kidRef.getRefNum()] = 1;
+ }
+ kids.arrayGet(i, &kid);
+ if (kid.isDict("Page")) {
+ attrs2 = new PageAttrs(attrs1, kid.getDict());
+ page = new Page(xref, start+1, kid.getDict(), kidRef.getRef(), attrs2, form);
+ if (!page->isOk()) {
+ ++start;
+ goto err3;
+ }
+ if (start >= pagesSize) {
+ pagesSize += 32;
+ pages = (Page **)greallocn(pages, pagesSize, sizeof(Page *));
+ pageRefs = (Ref *)greallocn(pageRefs, pagesSize, sizeof(Ref));
+ for (j = pagesSize - 32; j < pagesSize; ++j) {
+ pages[j] = NULL;
+ pageRefs[j].num = -1;
+ pageRefs[j].gen = -1;
+ }
+ }
+ pages[start] = page;
+ if (kidRef.isRef()) {
+ pageRefs[start].num = kidRef.getRefNum();
+ pageRefs[start].gen = kidRef.getRefGen();
+ }
+ ++start;
+ // This should really be isDict("Pages"), but I've seen at least one
+ // PDF file where the /Type entry is missing.
+ } else if (kid.isDict()) {
+ if ((start = readPageTree(kid.getDict(), attrs1, start, alreadyRead))
+ < 0)
+ goto err2;
+ } else {
+ error(-1, "Kid object (page %d) is wrong type (%s)",
+ start+1, kid.getTypeName());
+ }
+ kid.free();
+ kidRef.free();
+ }
+ delete attrs1;
+ kids.free();
+ return start;
+
+ err3:
+ delete page;
+ err2:
+ kid.free();
+ kidRef.free();
+ err1:
+ kids.free();
+ delete attrs1;
+ ok = gFalse;
+ return -1;
+}
+
+int Catalog::findPage(int num, int gen) {
+ int i;
+
+ for (i = 0; i < numPages; ++i) {
+ if (pageRefs[i].num == num && pageRefs[i].gen == gen)
+ return i + 1;
+ }
+ return 0;
+}
+
+LinkDest *Catalog::findDest(GooString *name) {
+ LinkDest *dest;
+ Object obj1, obj2;
+ GBool found;
+
+ // try named destination dictionary then name tree
+ found = gFalse;
+ if (dests.isDict()) {
+ if (!dests.dictLookup(name->getCString(), &obj1)->isNull())
+ found = gTrue;
+ else
+ obj1.free();
+ }
+ if (!found) {
+ if (destNameTree.lookup(name, &obj1))
+ found = gTrue;
+ else
+ obj1.free();
+ }
+ if (!found)
+ return NULL;
+
+ // construct LinkDest
+ dest = NULL;
+ if (obj1.isArray()) {
+ dest = new LinkDest(obj1.getArray());
+ } else if (obj1.isDict()) {
+ if (obj1.dictLookup("D", &obj2)->isArray())
+ dest = new LinkDest(obj2.getArray());
+ else
+ error(-1, "Bad named destination value");
+ obj2.free();
+ } else {
+ error(-1, "Bad named destination value");
+ }
+ obj1.free();
+ if (dest && !dest->isOk()) {
+ delete dest;
+ dest = NULL;
+ }
+
+ return dest;
+}
+
+EmbFile *Catalog::embeddedFile(int i)
+{
+ Object efDict;
+ Object obj;
+ obj = embeddedFileNameTree.getValue(i);
+ EmbFile *embeddedFile = 0;
+ if (obj.isRef()) {
+ GooString desc(embeddedFileNameTree.getName(i));
+ embeddedFile = new EmbFile(obj.fetch(xref, &efDict), &desc);
+ efDict.free();
+ } else {
+ Object null;
+ embeddedFile = new EmbFile(&null);
+ }
+ return embeddedFile;
+}
+
+GooString *Catalog::getJS(int i)
+{
+ Object obj = jsNameTree.getValue(i);
+ if (obj.isRef()) {
+ Ref r = obj.getRef();
+ obj.free();
+ xref->fetch(r.num, r.gen, &obj);
+ }
+
+ if (!obj.isDict()) {
+ obj.free();
+ return 0;
+ }
+ Object obj2;
+ if (!obj.dictLookup("S", &obj2)->isName()) {
+ obj2.free();
+ obj.free();
+ return 0;
+ }
+ if (strcmp(obj2.getName(), "JavaScript")) {
+ obj2.free();
+ obj.free();
+ return 0;
+ }
+ obj2.free();
+ obj.dictLookup("JS", &obj2);
+ GooString *js = 0;
+ if (obj2.isString()) {
+ js = new GooString(obj2.getString());
+ }
+ else if (obj2.isStream()) {
+ Stream *stream = obj2.getStream();
+ js = new GooString();
+ stream->reset();
+ int j;
+ while ((j = stream->getChar()) != EOF) {
+ js->append((char)j);
+ }
+ }
+ obj2.free();
+ obj.free();
+ return js;
+}
+
+NameTree::NameTree()
+{
+ size = 0;
+ length = 0;
+ entries = NULL;
+}
+
+NameTree::Entry::Entry(Array *array, int index) {
+ if (!array->getString(index, &name) || !array->getNF(index + 1, &value)) {
+ Object aux;
+ array->get(index, &aux);
+ if (aux.isString() && array->getNF(index + 1, &value) )
+ {
+ name.append(aux.getString());
+ }
+ else
+ error(-1, "Invalid page tree");
+ }
+}
+
+NameTree::Entry::~Entry() {
+ value.free();
+}
+
+void NameTree::addEntry(Entry *entry)
+{
+ if (length == size) {
+ if (length == 0) {
+ size = 8;
+ } else {
+ size *= 2;
+ }
+ entries = (Entry **) grealloc (entries, sizeof (Entry *) * size);
+ }
+
+ entries[length] = entry;
+ ++length;
+}
+
+void NameTree::init(XRef *xrefA, Object *tree) {
+ xref = xrefA;
+ parse(tree);
+}
+
+void NameTree::parse(Object *tree) {
+ Object names;
+ Object kids, kid;
+ int i;
+
+ if (!tree->isDict())
+ return;
+
+ // leaf node
+ if (tree->dictLookup("Names", &names)->isArray()) {
+ for (i = 0; i < names.arrayGetLength(); i += 2) {
+ NameTree::Entry *entry;
+
+ entry = new Entry(names.getArray(), i);
+ addEntry(entry);
+ }
+ }
+ names.free();
+
+ // root or intermediate node
+ if (tree->dictLookup("Kids", &kids)->isArray()) {
+ for (i = 0; i < kids.arrayGetLength(); ++i) {
+ if (kids.arrayGet(i, &kid)->isDict())
+ parse(&kid);
+ kid.free();
+ }
+ }
+ kids.free();
+}
+
+int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry)
+{
+ GooString *key = (GooString *) voidKey;
+ Entry *entry = *(NameTree::Entry **) voidEntry;
+
+ return key->cmp(&entry->name);
+}
+
+GBool NameTree::lookup(GooString *name, Object *obj)
+{
+ Entry **entry;
+
+ entry = (Entry **) bsearch(name, entries,
+ length, sizeof(Entry *), Entry::cmp);
+ if (entry != NULL) {
+ (*entry)->value.fetch(xref, obj);
+ return gTrue;
+ } else {
+ printf("failed to look up %s\n", name->getCString());
+ obj->initNull();
+ return gFalse;
+ }
+}
+
+Object NameTree::getValue(int index)
+{
+ if (index < length) {
+ return entries[index]->value;
+ } else {
+ return Object();
+ }
+}
+
+GooString *NameTree::getName(int index)
+{
+ if (index < length) {
+ return &entries[index]->name;
+ } else {
+ return NULL;
+ }
+}
+
+void NameTree::free()
+{
+ int i;
+
+ for (i = 0; i < length; i++)
+ delete entries[i];
+
+ gfree(entries);
+}
+
+GBool Catalog::labelToIndex(GooString *label, int *index)
+{
+ char *end;
+
+ if (pageLabelInfo != NULL) {
+ if (!pageLabelInfo->labelToIndex(label, index))
+ return gFalse;
+ } else {
+ *index = strtol(label->getCString(), &end, 10) - 1;
+ if (*end != '\0')
+ return gFalse;
+ }
+
+ if (*index < 0 || *index >= numPages)
+ return gFalse;
+
+ return gTrue;
+}
+
+GBool Catalog::indexToLabel(int index, GooString *label)
+{
+ char buffer[32];
+
+ if (index < 0 || index >= numPages)
+ return gFalse;
+
+ if (pageLabelInfo != NULL) {
+ return pageLabelInfo->indexToLabel(index, label);
+ } else {
+ snprintf(buffer, sizeof (buffer), "%d", index + 1);
+ label->append(buffer);
+ return gTrue;
+ }
+}
+
+EmbFile::EmbFile(Object *efDict, GooString *description)
+{
+ m_name = 0;
+ m_description = 0;
+ if (description)
+ m_description = description->copy();
+ m_size = -1;
+ m_createDate = 0;
+ m_modDate = 0;
+ m_checksum = 0;
+ m_mimetype = 0;
+ if (efDict->isDict()) {
+ Object fileSpec;
+ Object fileDesc;
+ Object paramDict;
+ Object paramObj;
+ Object obj2;
+ Stream *efStream = NULL;
+ // efDict matches Table 3.40 in the PDF1.6 spec
+ efDict->dictLookup("F", &fileSpec);
+ if (fileSpec.isString()) {
+ m_name = new GooString(fileSpec.getString());
+ }
+ fileSpec.free();
+
+ // the logic here is that the description from the name
+ // dictionary is used if we don't have a more specific
+ // description - see the Note: on page 157 of the PDF1.6 spec
+ efDict->dictLookup("Desc", &fileDesc);
+ if (fileDesc.isString()) {
+ delete m_description;
+ m_description = new GooString(fileDesc.getString());
+ } else {
+ efDict->dictLookup("Description", &fileDesc);
+ if (fileDesc.isString()) {
+ delete m_description;
+ m_description = new GooString(fileDesc.getString());
+ }
+ }
+ fileDesc.free();
+
+ efDict->dictLookup("EF", &obj2);
+ if (obj2.isDict()) {
+ // This gives us the raw data stream bytes
+
+ obj2.dictLookup("F", &m_objStr);
+ if (m_objStr.isStream()) {
+ efStream = m_objStr.getStream();
+
+ // dataDict corresponds to Table 3.41 in the PDF1.6 spec.
+ Dict *dataDict = efStream->getDict();
+
+ // subtype is normally the mimetype
+ Object subtypeName;
+ if (dataDict->lookup("Subtype", &subtypeName)->isName()) {
+ m_mimetype = new GooString(subtypeName.getName());
+ }
+ subtypeName.free();
+
+ // paramDict corresponds to Table 3.42 in the PDF1.6 spec
+ Object paramDict;
+ dataDict->lookup( "Params", &paramDict );
+ if (paramDict.isDict()) {
+ paramDict.dictLookup("ModDate", &paramObj);
+ if (paramObj.isString()) {
+ m_modDate = new GooString(paramObj.getString());
+ }
+ paramObj.free();
+ paramDict.dictLookup("CreationDate", &paramObj);
+ if (paramObj.isString()) {
+ m_createDate = new GooString(paramObj.getString());
+ }
+ paramObj.free();
+ paramDict.dictLookup("Size", &paramObj);
+ if (paramObj.isInt()) {
+ m_size = paramObj.getInt();
+ }
+ paramObj.free();
+ paramDict.dictLookup("CheckSum", &paramObj);
+ if (paramObj.isString()) {
+ m_checksum = new GooString(paramObj.getString());
+ }
+ paramObj.free();
+ }
+ paramDict.free();
+ }
+ }
+ obj2.free();
+ }
+ if (!m_name)
+ m_name = new GooString();
+ if (!m_description)
+ m_description = new GooString();
+ if (!m_createDate)
+ m_createDate = new GooString();
+ if (!m_modDate)
+ m_modDate = new GooString();
+ if (!m_checksum)
+ m_checksum = new GooString();
+ if (!m_mimetype)
+ m_mimetype = new GooString();
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.h
new file mode 100644
index 00000000000..f5b389f201e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Catalog.h
@@ -0,0 +1,252 @@
+//========================================================================
+//
+// Catalog.h
+//
+// Copyright 1996-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005, 2007, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef CATALOG_H
+#define CATALOG_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+class XRef;
+class Object;
+class Page;
+class PageAttrs;
+struct Ref;
+class LinkDest;
+class PageLabelInfo;
+class Form;
+class OCGs;
+
+//------------------------------------------------------------------------
+// NameTree
+//------------------------------------------------------------------------
+
+class NameTree {
+public:
+ NameTree();
+ void init(XRef *xref, Object *tree);
+ void parse(Object *tree);
+ GBool lookup(GooString *name, Object *obj);
+ void free();
+ int numEntries() { return length; };
+ // iterator accessor
+ Object getValue(int i);
+ GooString *getName(int i);
+
+private:
+ struct Entry {
+ Entry(Array *array, int index);
+ ~Entry();
+ GooString name;
+ Object value;
+ void free();
+ static int cmp(const void *key, const void *entry);
+ };
+
+ void addEntry(Entry *entry);
+
+ XRef *xref;
+ Object *root;
+ Entry **entries;
+ int size, length; // size is the number of entries in
+ // the array of Entry*
+ // length is the number of real Entry
+};
+
+class EmbFile {
+public:
+ EmbFile(GooString *name, GooString *description,
+ int size,
+ GooString *createDate,
+ GooString *modDate, GooString *checksum,
+ GooString *mimetype,
+ Object objStr) :
+ m_name(name),
+ m_description(description),
+ m_size(size),
+ m_createDate(createDate),
+ m_modDate(modDate),
+ m_checksum(checksum),
+ m_mimetype(mimetype)
+ {
+ objStr.copy(&m_objStr);
+ }
+ EmbFile(Object *efDict, GooString *description = 0);
+
+ ~EmbFile()
+ {
+ delete m_name;
+ delete m_description;
+ delete m_modDate;
+ delete m_createDate;
+ delete m_checksum;
+ delete m_mimetype;
+ m_objStr.free();
+ }
+
+ GooString *name() { return m_name; }
+ GooString *description() { return m_description; }
+ int size() { return m_size; }
+ GooString *modDate() { return m_modDate; }
+ GooString *createDate() { return m_createDate; }
+ GooString *checksum() { return m_checksum; }
+ GooString *mimeType() { return m_mimetype; }
+ Object &streamObject() { return m_objStr; }
+ bool isOk() { return m_objStr.isStream(); }
+
+private:
+ GooString *m_name;
+ GooString *m_description;
+ int m_size;
+ GooString *m_createDate;
+ GooString *m_modDate;
+ GooString *m_checksum;
+ GooString *m_mimetype;
+ Object m_objStr;
+};
+
+//------------------------------------------------------------------------
+// Catalog
+//------------------------------------------------------------------------
+
+class Catalog {
+public:
+
+ // Constructor.
+ Catalog(XRef *xrefA);
+
+ // Destructor.
+ ~Catalog();
+
+ // Is catalog valid?
+ GBool isOk() { return ok; }
+
+ // Get number of pages.
+ int getNumPages() { return numPages; }
+
+ // Get a page.
+ Page *getPage(int i) { return pages[i-1]; }
+
+ // Get the reference for a page object.
+ Ref *getPageRef(int i) { return &pageRefs[i-1]; }
+
+ // Return base URI, or NULL if none.
+ GooString *getBaseURI() { return baseURI; }
+
+ // Return the contents of the metadata stream, or NULL if there is
+ // no metadata.
+ GooString *readMetadata();
+
+ // Return the structure tree root object.
+ Object *getStructTreeRoot() { return &structTreeRoot; }
+
+ // Find a page, given its object ID. Returns page number, or 0 if
+ // not found.
+ int findPage(int num, int gen);
+
+ // Find a named destination. Returns the link destination, or
+ // NULL if <name> is not a destination.
+ LinkDest *findDest(GooString *name);
+
+ Object *getDests() { return &dests; }
+
+ // Get the number of embedded files
+ int numEmbeddedFiles() { return embeddedFileNameTree.numEntries(); }
+
+ // Get the i'th file embedded (at the Document level) in the document
+ EmbFile *embeddedFile(int i);
+
+ // Get the number of javascript scripts
+ int numJS() { return jsNameTree.numEntries(); }
+
+ // Get the i'th JavaScript script (at the Document level) in the document
+ GooString *getJS(int i);
+
+ // Convert between page indices and page labels.
+ GBool labelToIndex(GooString *label, int *index);
+ GBool indexToLabel(int index, GooString *label);
+
+ Object *getOutline() { return &outline; }
+
+ Object *getAcroForm() { return &acroForm; }
+
+ OCGs *getOptContentConfig() { return optContent; }
+
+ Form* getForm() { return form; }
+
+ enum PageMode {
+ pageModeNone,
+ pageModeOutlines,
+ pageModeThumbs,
+ pageModeFullScreen,
+ pageModeOC,
+ pageModeAttach
+ };
+ enum PageLayout {
+ pageLayoutNone,
+ pageLayoutSinglePage,
+ pageLayoutOneColumn,
+ pageLayoutTwoColumnLeft,
+ pageLayoutTwoColumnRight,
+ pageLayoutTwoPageLeft,
+ pageLayoutTwoPageRight
+ };
+
+ // Returns the page mode.
+ PageMode getPageMode() { return pageMode; }
+ PageLayout getPageLayout() { return pageLayout; }
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Page **pages; // array of pages
+ Ref *pageRefs; // object ID for each page
+ Form *form;
+ int numPages; // number of pages
+ int pagesSize; // size of pages array
+ Object dests; // named destination dictionary
+ NameTree destNameTree; // named destination name-tree
+ NameTree embeddedFileNameTree; // embedded file name-tree
+ NameTree jsNameTree; // Java Script name-tree
+ GooString *baseURI; // base URI for URI-type links
+ Object metadata; // metadata stream
+ Object structTreeRoot; // structure tree root dictionary
+ Object outline; // outline dictionary
+ Object acroForm; // AcroForm dictionary
+ OCGs *optContent; // Optional Content groups
+ GBool ok; // true if catalog is valid
+ PageLabelInfo *pageLabelInfo; // info about page labels
+ PageMode pageMode; // page mode
+ PageLayout pageLayout; // page layout
+
+ int readPageTree(Dict *pages, PageAttrs *attrs, int start,
+ char *alreadyRead);
+ Object *findDestInTree(Object *tree, GooString *name, Object *obj);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.cc
new file mode 100644
index 00000000000..5941190a4ec
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.cc
@@ -0,0 +1,617 @@
+//========================================================================
+//
+// CharCodeToUnicode.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2008, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "goo/GooString.h"
+#include "Error.h"
+#include "GlobalParams.h"
+#include "PSTokenizer.h"
+#include "CharCodeToUnicode.h"
+
+//------------------------------------------------------------------------
+
+struct CharCodeToUnicodeString {
+ CharCode c;
+ Unicode *u;
+ int len;
+};
+
+//------------------------------------------------------------------------
+
+static int getCharFromString(void *data) {
+ char *p;
+ int c;
+
+ p = *(char **)data;
+ if (*p) {
+ c = *p++;
+ *(char **)data = p;
+ } else {
+ c = EOF;
+ }
+ return c;
+}
+
+static int getCharFromFile(void *data) {
+ return fgetc((FILE *)data);
+}
+
+//------------------------------------------------------------------------
+
+CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(GooString *fileName,
+ GooString *collection) {
+ FILE *f;
+ Unicode *mapA;
+ CharCode size, mapLenA;
+ char buf[64];
+ Unicode u;
+ CharCodeToUnicode *ctu;
+
+ if (!(f = fopen(fileName->getCString(), "r"))) {
+ error(-1, "Couldn't open cidToUnicode file '%s'",
+ fileName->getCString());
+ return NULL;
+ }
+
+ size = 32768;
+ mapA = (Unicode *)gmallocn(size, sizeof(Unicode));
+ mapLenA = 0;
+
+ while (getLine(buf, sizeof(buf), f)) {
+ if (mapLenA == size) {
+ size *= 2;
+ mapA = (Unicode *)greallocn(mapA, size, sizeof(Unicode));
+ }
+ if (sscanf(buf, "%x", &u) == 1) {
+ mapA[mapLenA] = u;
+ } else {
+ error(-1, "Bad line (%d) in cidToUnicode file '%s'",
+ (int)(mapLenA + 1), fileName->getCString());
+ mapA[mapLenA] = 0;
+ }
+ ++mapLenA;
+ }
+ fclose(f);
+
+ ctu = new CharCodeToUnicode(collection->copy(), mapA, mapLenA, gTrue,
+ NULL, 0, 0);
+ gfree(mapA);
+ return ctu;
+}
+
+CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(
+ GooString *fileName) {
+ FILE *f;
+ Unicode *mapA;
+ CharCodeToUnicodeString *sMapA;
+ CharCode size, oldSize, len, sMapSizeA, sMapLenA;
+ char buf[256];
+ char *tok;
+ Unicode u0;
+ int uBufSize = 8;
+ Unicode *uBuf = (Unicode *)gmallocn(uBufSize, sizeof(Unicode));
+ CharCodeToUnicode *ctu;
+ int line, n, i;
+
+ if (!(f = fopen(fileName->getCString(), "r"))) {
+ gfree(uBuf);
+ error(-1, "Couldn't open unicodeToUnicode file '%s'",
+ fileName->getCString());
+ return NULL;
+ }
+
+ size = 4096;
+ mapA = (Unicode *)gmallocn(size, sizeof(Unicode));
+ memset(mapA, 0, size * sizeof(Unicode));
+ len = 0;
+ sMapA = NULL;
+ sMapSizeA = sMapLenA = 0;
+
+ line = 0;
+ while (getLine(buf, sizeof(buf), f)) {
+ ++line;
+ if (!(tok = strtok(buf, " \t\r\n")) ||
+ sscanf(tok, "%x", &u0) != 1) {
+ error(-1, "Bad line (%d) in unicodeToUnicode file '%s'",
+ line, fileName->getCString());
+ continue;
+ }
+ n = 0;
+ while ((tok = strtok(NULL, " \t\r\n"))) {
+ if (n >= uBufSize)
+ {
+ uBufSize += 8;
+ uBuf = (Unicode *)greallocn(uBuf, uBufSize, sizeof(Unicode));
+ }
+ if (sscanf(tok, "%x", &uBuf[n]) != 1) {
+ error(-1, "Bad line (%d) in unicodeToUnicode file '%s'",
+ line, fileName->getCString());
+ break;
+ }
+ ++n;
+ }
+ if (n < 1) {
+ error(-1, "Bad line (%d) in unicodeToUnicode file '%s'",
+ line, fileName->getCString());
+ continue;
+ }
+ if (u0 >= size) {
+ oldSize = size;
+ while (u0 >= size) {
+ size *= 2;
+ }
+ mapA = (Unicode *)greallocn(mapA, size, sizeof(Unicode));
+ memset(mapA + oldSize, 0, (size - oldSize) * sizeof(Unicode));
+ }
+ if (n == 1) {
+ mapA[u0] = uBuf[0];
+ } else {
+ mapA[u0] = 0;
+ if (sMapLenA == sMapSizeA) {
+ sMapSizeA += 16;
+ sMapA = (CharCodeToUnicodeString *)
+ greallocn(sMapA, sMapSizeA, sizeof(CharCodeToUnicodeString));
+ }
+ sMapA[sMapLenA].c = u0;
+ sMapA[sMapLenA].u = (Unicode*)gmallocn(n, sizeof(Unicode));
+ for (i = 0; i < n; ++i) {
+ sMapA[sMapLenA].u[i] = uBuf[i];
+ }
+ sMapA[sMapLenA].len = n;
+ ++sMapLenA;
+ }
+ if (u0 >= len) {
+ len = u0 + 1;
+ }
+ }
+ fclose(f);
+
+ ctu = new CharCodeToUnicode(fileName->copy(), mapA, len, gTrue,
+ sMapA, sMapLenA, sMapSizeA);
+ gfree(mapA);
+ gfree(uBuf);
+ return ctu;
+}
+
+CharCodeToUnicode *CharCodeToUnicode::make8BitToUnicode(Unicode *toUnicode) {
+ return new CharCodeToUnicode(NULL, toUnicode, 256, gTrue, NULL, 0, 0);
+}
+
+CharCodeToUnicode *CharCodeToUnicode::parseCMap(GooString *buf, int nBits) {
+ CharCodeToUnicode *ctu;
+ char *p;
+
+ ctu = new CharCodeToUnicode(NULL);
+ p = buf->getCString();
+ ctu->parseCMap1(&getCharFromString, &p, nBits);
+ return ctu;
+}
+
+CharCodeToUnicode *CharCodeToUnicode::parseCMapFromFile(GooString *fileName,
+ int nBits) {
+ CharCodeToUnicode *ctu;
+ FILE *f;
+
+ ctu = new CharCodeToUnicode(NULL);
+ if ((f = globalParams->findToUnicodeFile(fileName))) {
+ ctu->parseCMap1(&getCharFromFile, f, nBits);
+ fclose(f);
+ } else {
+ error(-1, "Couldn't find ToUnicode CMap file for '%s'",
+ fileName->getCString());
+ }
+ return ctu;
+}
+
+void CharCodeToUnicode::mergeCMap(GooString *buf, int nBits) {
+ char *p;
+
+ p = buf->getCString();
+ parseCMap1(&getCharFromString, &p, nBits);
+}
+
+void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data,
+ int nBits) {
+ PSTokenizer *pst;
+ char tok1[256], tok2[256], tok3[256];
+ int nDigits, n1, n2, n3;
+ CharCode i;
+ CharCode code1, code2;
+ GooString *name;
+ FILE *f;
+
+ nDigits = nBits / 4;
+ pst = new PSTokenizer(getCharFunc, data);
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ while (pst->getToken(tok2, sizeof(tok2), &n2)) {
+ if (!strcmp(tok2, "usecmap")) {
+ if (tok1[0] == '/') {
+ name = new GooString(tok1 + 1);
+ if ((f = globalParams->findToUnicodeFile(name))) {
+ parseCMap1(&getCharFromFile, f, nBits);
+ fclose(f);
+ } else {
+ error(-1, "Couldn't find ToUnicode CMap file for '%s'",
+ name->getCString());
+ }
+ delete name;
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok2, "beginbfchar")) {
+ while (pst->getToken(tok1, sizeof(tok1), &n1)) {
+ if (!strcmp(tok1, "endbfchar")) {
+ break;
+ }
+ if (!pst->getToken(tok2, sizeof(tok2), &n2) ||
+ !strcmp(tok2, "endbfchar")) {
+ error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
+ break;
+ }
+ if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
+ tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ if (!(n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0' &&
+ tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
+ continue;
+ }
+ }
+ tok1[n1 - 1] = tok2[n2 - 1] = '\0';
+ if (sscanf(tok1 + 1, "%x", &code1) != 1) {
+ error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
+ continue;
+ }
+ addMapping(code1, tok2 + 1, n2 - 2, 0);
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else if (!strcmp(tok2, "beginbfrange")) {
+ while (pst->getToken(tok1, sizeof(tok1), &n1)) {
+ if (!strcmp(tok1, "endbfrange")) {
+ break;
+ }
+ if (!pst->getToken(tok2, sizeof(tok2), &n2) ||
+ !strcmp(tok2, "endbfrange") ||
+ !pst->getToken(tok3, sizeof(tok3), &n3) ||
+ !strcmp(tok3, "endbfrange")) {
+ error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
+ break;
+ }
+ if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
+ n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
+ continue;
+ }
+ tok1[n1 - 1] = tok2[n2 - 1] = '\0';
+ if (sscanf(tok1 + 1, "%x", &code1) != 1 ||
+ sscanf(tok2 + 1, "%x", &code2) != 1) {
+ error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
+ continue;
+ }
+ if (!strcmp(tok3, "[")) {
+ i = 0;
+ while (pst->getToken(tok1, sizeof(tok1), &n1) &&
+ code1 + i <= code2) {
+ if (!strcmp(tok1, "]")) {
+ break;
+ }
+ if (tok1[0] == '<' && tok1[n1 - 1] == '>') {
+ tok1[n1 - 1] = '\0';
+ addMapping(code1 + i, tok1 + 1, n1 - 2, 0);
+ } else {
+ error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
+ }
+ ++i;
+ }
+ } else if (tok3[0] == '<' && tok3[n3 - 1] == '>') {
+ tok3[n3 - 1] = '\0';
+ for (i = 0; code1 <= code2; ++code1, ++i) {
+ addMapping(code1, tok3 + 1, n3 - 2, i);
+ }
+
+ } else {
+ error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
+ }
+ }
+ pst->getToken(tok1, sizeof(tok1), &n1);
+ } else {
+ strcpy(tok1, tok2);
+ }
+ }
+ delete pst;
+}
+
+void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n,
+ int offset) {
+ CharCode oldLen, i;
+ Unicode u;
+ char uHex[5];
+ int j;
+
+ if (code >= mapLen) {
+ oldLen = mapLen;
+ mapLen = (code + 256) & ~255;
+ map = (Unicode *)greallocn(map, mapLen, sizeof(Unicode));
+ for (i = oldLen; i < mapLen; ++i) {
+ map[i] = 0;
+ }
+ }
+ if (n <= 4) {
+ if (sscanf(uStr, "%x", &u) != 1) {
+ error(-1, "Illegal entry in ToUnicode CMap");
+ return;
+ }
+ map[code] = u + offset;
+ } else {
+ if (sMapLen >= sMapSize) {
+ sMapSize = sMapSize + 16;
+ sMap = (CharCodeToUnicodeString *)
+ greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString));
+ }
+ map[code] = 0;
+ sMap[sMapLen].c = code;
+ sMap[sMapLen].len = n / 4;
+ sMap[sMapLen].u = (Unicode*)gmallocn(sMap[sMapLen].len, sizeof(Unicode));
+ for (j = 0; j < sMap[sMapLen].len; ++j) {
+ strncpy(uHex, uStr + j*4, 4);
+ uHex[4] = '\0';
+ if (sscanf(uHex, "%x", &sMap[sMapLen].u[j]) != 1) {
+ error(-1, "Illegal entry in ToUnicode CMap");
+ }
+ }
+ sMap[sMapLen].u[sMap[sMapLen].len - 1] += offset;
+ ++sMapLen;
+ }
+}
+
+CharCodeToUnicode::CharCodeToUnicode(GooString *tagA) {
+ CharCode i;
+
+ tag = tagA;
+ mapLen = 256;
+ map = (Unicode *)gmallocn(mapLen, sizeof(Unicode));
+ for (i = 0; i < mapLen; ++i) {
+ map[i] = 0;
+ }
+ sMap = NULL;
+ sMapLen = sMapSize = 0;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+CharCodeToUnicode::CharCodeToUnicode(GooString *tagA, Unicode *mapA,
+ CharCode mapLenA, GBool copyMap,
+ CharCodeToUnicodeString *sMapA,
+ int sMapLenA, int sMapSizeA) {
+ tag = tagA;
+ mapLen = mapLenA;
+ if (copyMap) {
+ map = (Unicode *)gmallocn(mapLen, sizeof(Unicode));
+ memcpy(map, mapA, mapLen * sizeof(Unicode));
+ } else {
+ map = mapA;
+ }
+ sMap = sMapA;
+ sMapLen = sMapLenA;
+ sMapSize = sMapSizeA;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+CharCodeToUnicode::~CharCodeToUnicode() {
+ if (tag) {
+ delete tag;
+ }
+ gfree(map);
+ if (sMap) {
+ for (int i = 0; i < sMapLen; ++i) gfree(sMap[i].u);
+ gfree(sMap);
+ }
+#if MULTITHREADED
+ gDestroyMutex(&mutex);
+#endif
+}
+
+void CharCodeToUnicode::incRefCnt() {
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ ++refCnt;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+}
+
+void CharCodeToUnicode::decRefCnt() {
+ GBool done;
+
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ done = --refCnt == 0;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+ if (done) {
+ delete this;
+ }
+}
+
+GBool CharCodeToUnicode::match(GooString *tagA) {
+ return tag && !tag->cmp(tagA);
+}
+
+void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) {
+ int i, j;
+
+ if (len == 1) {
+ map[c] = u[0];
+ } else {
+ for (i = 0; i < sMapLen; ++i) {
+ if (sMap[i].c == c) {
+ gfree(sMap[i].u);
+ break;
+ }
+ }
+ if (i == sMapLen) {
+ if (sMapLen == sMapSize) {
+ sMapSize += 8;
+ sMap = (CharCodeToUnicodeString *)
+ greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString));
+ }
+ ++sMapLen;
+ }
+ map[c] = 0;
+ sMap[i].c = c;
+ sMap[i].len = len;
+ sMap[i].u = (Unicode*)gmallocn(len, sizeof(Unicode));
+ for (j = 0; j < len; ++j) {
+ sMap[i].u[j] = u[j];
+ }
+ }
+}
+
+int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode **u) {
+ int i;
+
+ if (c >= mapLen) {
+ return 0;
+ }
+ if (map[c]) {
+ *u = &map[c];
+ return 1;
+ }
+ for (i = sMapLen - 1; i >= 0; --i) { // in reverse so CMap takes precedence
+ if (sMap[i].c == c) {
+ *u = sMap[i].u;
+ return sMap[i].len;
+ }
+ }
+ return 0;
+}
+
+int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) {
+ //look for charcode in map
+ if (usize == 1) {
+ for (CharCode i=0; i<mapLen; i++) {
+ if (map[i] == *u) {
+ *c = i;
+ return 1;
+ }
+ }
+ *c = 'x';
+ } else {
+ int i, j;
+ //for each entry in the sMap
+ for (i=0; i<sMapLen; i++) {
+ //if the entry's unicode length isn't the same are usize, the strings
+ // are obviously differents
+ if (sMap[i].len != usize) continue;
+ //compare the string char by char
+ for (j=0; j<sMap[i].len; j++) {
+ if (sMap[i].u[j] != u[j]) {
+ continue;
+ }
+ }
+
+ //we have the same strings
+ if (j==sMap[i].len) {
+ *c = sMap[i].c;
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+CharCodeToUnicodeCache::CharCodeToUnicodeCache(int sizeA) {
+ int i;
+
+ size = sizeA;
+ cache = (CharCodeToUnicode **)gmallocn(size, sizeof(CharCodeToUnicode *));
+ for (i = 0; i < size; ++i) {
+ cache[i] = NULL;
+ }
+}
+
+CharCodeToUnicodeCache::~CharCodeToUnicodeCache() {
+ int i;
+
+ for (i = 0; i < size; ++i) {
+ if (cache[i]) {
+ cache[i]->decRefCnt();
+ }
+ }
+ gfree(cache);
+}
+
+CharCodeToUnicode *CharCodeToUnicodeCache::getCharCodeToUnicode(GooString *tag) {
+ CharCodeToUnicode *ctu;
+ int i, j;
+
+ if (cache[0] && cache[0]->match(tag)) {
+ cache[0]->incRefCnt();
+ return cache[0];
+ }
+ for (i = 1; i < size; ++i) {
+ if (cache[i] && cache[i]->match(tag)) {
+ ctu = cache[i];
+ for (j = i; j >= 1; --j) {
+ cache[j] = cache[j - 1];
+ }
+ cache[0] = ctu;
+ ctu->incRefCnt();
+ return ctu;
+ }
+ }
+ return NULL;
+}
+
+void CharCodeToUnicodeCache::add(CharCodeToUnicode *ctu) {
+ int i;
+
+ if (cache[size - 1]) {
+ cache[size - 1]->decRefCnt();
+ }
+ for (i = size - 1; i >= 1; --i) {
+ cache[i] = cache[i - 1];
+ }
+ cache[0] = ctu;
+ ctu->incRefCnt();
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.h
new file mode 100644
index 00000000000..1daedd7162c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharCodeToUnicode.h
@@ -0,0 +1,136 @@
+//========================================================================
+//
+// CharCodeToUnicode.h
+//
+// Mapping from character codes to Unicode.
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef CHARCODETOUNICODE_H
+#define CHARCODETOUNICODE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include "CharTypes.h"
+
+#if MULTITHREADED
+#include "goo/GooMutex.h"
+#endif
+
+struct CharCodeToUnicodeString;
+
+//------------------------------------------------------------------------
+
+class CharCodeToUnicode {
+friend class UnicodeToCharCode;
+public:
+
+ // Read the CID-to-Unicode mapping for <collection> from the file
+ // specified by <fileName>. Sets the initial reference count to 1.
+ // Returns NULL on failure.
+ static CharCodeToUnicode *parseCIDToUnicode(GooString *fileName,
+ GooString *collection);
+
+ // Create a Unicode-to-Unicode mapping from the file specified by
+ // <fileName>. Sets the initial reference count to 1. Returns NULL
+ // on failure.
+ static CharCodeToUnicode *parseUnicodeToUnicode(GooString *fileName);
+
+ // Create the CharCode-to-Unicode mapping for an 8-bit font.
+ // <toUnicode> is an array of 256 Unicode indexes. Sets the initial
+ // reference count to 1.
+ static CharCodeToUnicode *make8BitToUnicode(Unicode *toUnicode);
+
+ // Parse a ToUnicode CMap for an 8- or 16-bit font.
+ static CharCodeToUnicode *parseCMap(GooString *buf, int nBits);
+ static CharCodeToUnicode *parseCMapFromFile(GooString *fileName, int nBits);
+
+ // Parse a ToUnicode CMap for an 8- or 16-bit font, merging it into
+ // <this>.
+ void mergeCMap(GooString *buf, int nBits);
+
+ ~CharCodeToUnicode();
+
+ void incRefCnt();
+ void decRefCnt();
+
+ // Return true if this mapping matches the specified <tagA>.
+ GBool match(GooString *tagA);
+
+ // Set the mapping for <c>.
+ void setMapping(CharCode c, Unicode *u, int len);
+
+ // Map a CharCode to Unicode.
+ int mapToUnicode(CharCode c, Unicode **u);
+
+ int mapToCharCode(Unicode* u, CharCode *c, int usize);
+
+ // Return the mapping's length, i.e., one more than the max char
+ // code supported by the mapping.
+ CharCode getLength() { return mapLen; }
+
+private:
+
+ void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits);
+ void addMapping(CharCode code, char *uStr, int n, int offset);
+ CharCodeToUnicode(GooString *tagA);
+ CharCodeToUnicode(GooString *tagA, Unicode *mapA,
+ CharCode mapLenA, GBool copyMap,
+ CharCodeToUnicodeString *sMapA,
+ int sMapLenA, int sMapSizeA);
+
+ GooString *tag;
+ Unicode *map;
+ CharCode mapLen;
+ CharCodeToUnicodeString *sMap;
+ int sMapLen, sMapSize;
+ int refCnt;
+#if MULTITHREADED
+ GooMutex mutex;
+#endif
+};
+
+//------------------------------------------------------------------------
+
+class CharCodeToUnicodeCache {
+public:
+
+ CharCodeToUnicodeCache(int sizeA);
+ ~CharCodeToUnicodeCache();
+
+ // Get the CharCodeToUnicode object for <tag>. Increments its
+ // reference count; there will be one reference for the cache plus
+ // one for the caller of this function. Returns NULL on failure.
+ CharCodeToUnicode *getCharCodeToUnicode(GooString *tag);
+
+ // Insert <ctu> into the cache, in the most-recently-used position.
+ void add(CharCodeToUnicode *ctu);
+
+private:
+
+ CharCodeToUnicode **cache;
+ int size;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CharTypes.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharTypes.h
new file mode 100644
index 00000000000..d0df630d0c9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CharTypes.h
@@ -0,0 +1,24 @@
+//========================================================================
+//
+// CharTypes.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef CHARTYPES_H
+#define CHARTYPES_H
+
+// Unicode character.
+typedef unsigned int Unicode;
+
+// Character ID for CID character collections.
+typedef unsigned int CID;
+
+// This is large enough to hold any of the following:
+// - 8-bit char code
+// - 16-bit CID
+// - Unicode
+typedef unsigned int CharCode;
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/CompactFontTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/CompactFontTables.h
new file mode 100644
index 00000000000..757e1cb96fc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/CompactFontTables.h
@@ -0,0 +1,464 @@
+//========================================================================
+//
+// CompactFontTables.h
+//
+// Copyright 1999-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef COMPACTFONTINFO_H
+#define COMPACTFONTINFO_H
+
+static char *type1CStdStrings[391] = {
+ ".notdef",
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ "questiondown",
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ "ring",
+ "cedilla",
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ "AE",
+ "ordfeminine",
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ "ae",
+ "dotlessi",
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ "onesuperior",
+ "logicalnot",
+ "mu",
+ "trademark",
+ "Eth",
+ "onehalf",
+ "plusminus",
+ "Thorn",
+ "onequarter",
+ "divide",
+ "brokenbar",
+ "degree",
+ "thorn",
+ "threequarters",
+ "twosuperior",
+ "registered",
+ "minus",
+ "eth",
+ "multiply",
+ "threesuperior",
+ "copyright",
+ "Aacute",
+ "Acircumflex",
+ "Adieresis",
+ "Agrave",
+ "Aring",
+ "Atilde",
+ "Ccedilla",
+ "Eacute",
+ "Ecircumflex",
+ "Edieresis",
+ "Egrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Igrave",
+ "Ntilde",
+ "Oacute",
+ "Ocircumflex",
+ "Odieresis",
+ "Ograve",
+ "Otilde",
+ "Scaron",
+ "Uacute",
+ "Ucircumflex",
+ "Udieresis",
+ "Ugrave",
+ "Yacute",
+ "Ydieresis",
+ "Zcaron",
+ "aacute",
+ "acircumflex",
+ "adieresis",
+ "agrave",
+ "aring",
+ "atilde",
+ "ccedilla",
+ "eacute",
+ "ecircumflex",
+ "edieresis",
+ "egrave",
+ "iacute",
+ "icircumflex",
+ "idieresis",
+ "igrave",
+ "ntilde",
+ "oacute",
+ "ocircumflex",
+ "odieresis",
+ "ograve",
+ "otilde",
+ "scaron",
+ "uacute",
+ "ucircumflex",
+ "udieresis",
+ "ugrave",
+ "yacute",
+ "ydieresis",
+ "zcaron",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ "isuperior",
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ "ff",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ "Dotaccentsmall",
+ "Macronsmall",
+ "figuredash",
+ "hypheninferior",
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ "zerosuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall",
+ "001.000",
+ "001.001",
+ "001.002",
+ "001.003",
+ "Black",
+ "Bold",
+ "Book",
+ "Light",
+ "Medium",
+ "Regular",
+ "Roman",
+ "Semibold"
+};
+
+static Gushort type1CISOAdobeCharset[229] = {
+ 0, 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, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228
+};
+
+static const Gushort type1CExpertCharset[166] = {
+ 0, 1, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 13, 14, 15, 99, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 27, 28, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 109, 110, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 158, 155, 163, 319, 320, 321, 322, 323, 324, 325,
+ 326, 150, 164, 169, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378
+};
+
+static Gushort type1CExpertSubsetCharset[87] = {
+ 0, 1, 231, 232, 235, 236, 237, 238, 13, 14,
+ 15, 99, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 27, 28, 249, 250, 251, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 109, 110, 267, 268, 269, 270, 272, 300, 301,
+ 302, 305, 314, 315, 158, 155, 163, 320, 321, 322,
+ 323, 324, 325, 326, 150, 164, 169, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.cc
new file mode 100644
index 00000000000..7c6ba7022a1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.cc
@@ -0,0 +1,195 @@
+//========================================================================
+//
+// DCTStream.cc
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright 2009 Ryszard Trojnacki <rysiek@menel.com>
+//
+//========================================================================
+
+#include "DCTStream.h"
+
+static void str_init_source(j_decompress_ptr cinfo)
+{
+}
+
+static boolean str_fill_input_buffer(j_decompress_ptr cinfo)
+{
+ int c;
+ struct str_src_mgr * src = (struct str_src_mgr *)cinfo->src;
+ if (src->abort) return FALSE;
+ if (src->index == 0) {
+ c = 0xFF;
+ src->index++;
+ }
+ else if (src->index == 1) {
+ c = 0xD8;
+ src->index++;
+ }
+ else c = src->str->getChar();
+ if (c != EOF)
+ {
+ src->buffer = c;
+ src->pub.next_input_byte = &src->buffer;
+ src->pub.bytes_in_buffer = 1;
+ return TRUE;
+ }
+ else return FALSE;
+}
+
+static void str_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
+{
+ struct str_src_mgr * src = (struct str_src_mgr *)cinfo->src;
+ if (num_bytes > 0) {
+ while (num_bytes > (long) src->pub.bytes_in_buffer) {
+ num_bytes -= (long) src->pub.bytes_in_buffer;
+ str_fill_input_buffer(cinfo);
+ }
+ src->pub.next_input_byte += (size_t) num_bytes;
+ src->pub.bytes_in_buffer -= (size_t) num_bytes;
+ }
+}
+
+static void str_term_source(j_decompress_ptr cinfo)
+{
+}
+
+DCTStream::DCTStream(Stream *strA, int colorXformA) :
+ FilterStream(strA) {
+ init();
+}
+
+DCTStream::~DCTStream() {
+ jpeg_destroy_decompress(&cinfo);
+ delete str;
+}
+
+static void exitErrorHandler(jpeg_common_struct *error) {
+ j_decompress_ptr cinfo = (j_decompress_ptr)error;
+ str_src_mgr * src = (struct str_src_mgr *)cinfo->src;
+ src->abort = true;
+}
+
+void DCTStream::init()
+{
+ jpeg_std_error(&jerr);
+ jerr.error_exit = &exitErrorHandler;
+ src.pub.init_source = str_init_source;
+ src.pub.fill_input_buffer = str_fill_input_buffer;
+ src.pub.skip_input_data = str_skip_input_data;
+ src.pub.resync_to_restart = jpeg_resync_to_restart;
+ src.pub.term_source = str_term_source;
+ src.pub.bytes_in_buffer = 0;
+ src.pub.next_input_byte = NULL;
+ src.str = str;
+ src.index = 0;
+ src.abort = false;
+ current = NULL;
+ limit = NULL;
+
+ cinfo.err = &jerr;
+ jpeg_create_decompress(&cinfo);
+ cinfo.src = (jpeg_source_mgr *)&src;
+ row_buffer = NULL;
+}
+
+void DCTStream::reset() {
+ int row_stride;
+
+ str->reset();
+
+ if (row_buffer)
+ {
+ jpeg_destroy_decompress(&cinfo);
+ init();
+ }
+
+ // JPEG data has to start with 0xFF 0xD8
+ // but some pdf like the one on
+ // https://bugs.freedesktop.org/show_bug.cgi?id=3299
+ // does have some garbage before that this seeks for
+ // the start marker...
+ bool startFound = false;
+ int c = 0, c2 = 0;
+ while (!startFound)
+ {
+ if (!c)
+ {
+ c = str->getChar();
+ if (c == -1)
+ {
+ error(-1, "Could not find start of jpeg data");
+ src.abort = true;
+ return;
+ }
+ if (c != 0xFF) c = 0;
+ }
+ else
+ {
+ c2 = str->getChar();
+ if (c2 != 0xD8)
+ {
+ c = 0;
+ c2 = 0;
+ }
+ else startFound = true;
+ }
+ }
+
+ jpeg_read_header(&cinfo, TRUE);
+ if (src.abort) return;
+
+ if (!jpeg_start_decompress(&cinfo))
+ {
+ src.abort = true;
+ return;
+ }
+
+ row_stride = cinfo.output_width * cinfo.output_components;
+ row_buffer = cinfo.mem->alloc_sarray((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
+}
+
+int DCTStream::getChar() {
+ if (src.abort) return EOF;
+
+ int c;
+
+ if (current == limit) {
+ if (cinfo.output_scanline < cinfo.output_height)
+ {
+ if (!jpeg_read_scanlines(&cinfo, row_buffer, 1)) return EOF;
+ current = &row_buffer[0][0];
+ limit = &row_buffer[0][(cinfo.output_width - 1) * cinfo.output_components] + cinfo.output_components;
+ }
+ else return EOF;
+ }
+ c = *current;
+ ++current;
+ return c;
+}
+
+int DCTStream::lookChar() {
+ if (src.abort) return EOF;
+
+ return *current;
+}
+
+GooString *DCTStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< >> /DCTDecode filter\n");
+ return s;
+}
+
+GBool DCTStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.h
new file mode 100644
index 00000000000..29f8cf9d43c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/DCTStream.h
@@ -0,0 +1,79 @@
+//========================================================================
+//
+// DCTStream.h
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright 2005 Martin Kretzschmar <martink@gnome.org>
+// Copyright 2005-2007, 2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#ifndef DCTSTREAM_H
+#define DCTSTREAM_H
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "poppler-config.h"
+#include "Error.h"
+#include "Object.h"
+#include "Decrypt.h"
+#include "Stream.h"
+
+extern "C" {
+#include <jpeglib.h>
+}
+
+struct str_src_mgr {
+ struct jpeg_source_mgr pub;
+ JOCTET buffer;
+ Stream *str;
+ int index;
+ bool abort;
+};
+
+
+class DCTStream: public FilterStream {
+public:
+
+ DCTStream(Stream *strA, int colorXformA);
+ virtual ~DCTStream();
+ virtual StreamKind getKind() { return strDCT; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ Stream *getRawStream() { return str; }
+
+private:
+ void init();
+
+ JSAMPLE *current;
+ JSAMPLE *limit;
+ struct jpeg_decompress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+ struct str_src_mgr src;
+ JSAMPARRAY row_buffer;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.cc
new file mode 100644
index 00000000000..563204a1743
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.cc
@@ -0,0 +1,118 @@
+//========================================================================
+//
+// DateInfo.cc
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+//========================================================================
+//
+// Based on code from pdfinfo.cc
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#include "DateInfo.h"
+
+#include <stdio.h>
+#include <string.h>
+
+/* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */
+GBool parseDateString(const char *dateString, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute)
+{
+ if ( dateString == NULL ) return gFalse;
+ if ( strlen(dateString) < 2 ) return gFalse;
+
+ if ( dateString[0] == 'D' && dateString[1] == ':' )
+ dateString += 2;
+
+ *month = 1;
+ *day = 1;
+ *hour = 0;
+ *minute = 0;
+ *second = 0;
+ *tz = 0x00;
+ *tzHour = 0;
+ *tzMinute = 0;
+
+ if ( sscanf( dateString,
+ "%4d%2d%2d%2d%2d%2d%c%2d%*c%2d",
+ year, month, day, hour, minute, second,
+ tz, tzHour, tzMinute ) > 0 ) {
+ /* Workaround for y2k bug in Distiller 3 stolen from gpdf, hoping that it won't
+ * be used after y2.2k */
+ if ( *year < 1930 && strlen (dateString) > 14)
+ {
+ int century, years_since_1900;
+ if ( sscanf( dateString,
+ "%2d%3d%2d%2d%2d%2d%2d",
+ &century, &years_since_1900, month, day, hour, minute, second) == 7 )
+ {
+ *year = century * 100 + years_since_1900;
+ }
+ else
+ {
+ return gFalse;
+ }
+ }
+
+ if (*year <= 0) return gFalse;
+
+ return gTrue;
+ }
+
+ return gFalse;
+}
+
+
+GooString *timeToDateString(time_t *timet) {
+ GooString *dateString;
+ char s[5];
+ struct tm *gt;
+ size_t len;
+ time_t timep = timet ? *timet : time(NULL);
+
+#ifdef HAVE_GMTIME_R
+ struct tm t;
+ gt = gmtime_r (&timep, &t);
+#else
+ gt = gmtime (&timep);
+#endif
+
+ dateString = new GooString ("D:");
+
+ /* Year YYYY */
+ len = strftime (s, sizeof(s), "%Y", gt);
+ dateString->append (s, len);
+
+ /* Month MM */
+ len = strftime (s, sizeof(s), "%m", gt);
+ dateString->append (s, len);
+
+ /* Day DD */
+ len = strftime (s, sizeof(s), "%d", gt);
+ dateString->append (s, len);
+
+ /* Hour HH */
+ len = strftime (s, sizeof(s), "%H", gt);
+ dateString->append (s, len);
+
+ /* Minute mm */
+ len = strftime (s, sizeof(s), "%M", gt);
+ dateString->append (s, len);
+
+ /* Second SS */
+ len = strftime (s, sizeof(s), "%S", gt);
+ dateString->append (s, len);
+
+ return dateString;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.h
new file mode 100644
index 00000000000..116350f4134
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/DateInfo.h
@@ -0,0 +1,35 @@
+//========================================================================
+//
+// DateInfo.h
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+//========================================================================
+//
+// Based on code from pdfinfo.cc
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef DATE_INFO_H
+#define DATE_INFO_H
+
+#include "goo/gtypes.h"
+#include "goo/GooString.h"
+#include <time.h>
+
+GBool parseDateString(const char *string, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute);
+
+/* Converts the time_t into a PDF Date format string.
+ * If timet is NULL, current time is used.
+ */
+GooString *timeToDateString(time_t *timet);
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.cc
new file mode 100644
index 00000000000..ca294d39e00
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.cc
@@ -0,0 +1,805 @@
+//========================================================================
+//
+// Decrypt.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Matthias Franz <matthias@ktug.or.kr>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include "goo/gmem.h"
+#include "Decrypt.h"
+#include "Error.h"
+
+static void rc4InitKey(Guchar *key, int keyLen, Guchar *state);
+static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c);
+static void aesKeyExpansion(DecryptAESState *s,
+ Guchar *objKey, int objKeyLen);
+static void aesDecryptBlock(DecryptAESState *s, Guchar *in, GBool last);
+
+static const Guchar passwordPad[32] = {
+ 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41,
+ 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08,
+ 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
+ 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a
+};
+
+//------------------------------------------------------------------------
+// Decrypt
+//------------------------------------------------------------------------
+
+GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength,
+ GooString *ownerKey, GooString *userKey,
+ int permissions, GooString *fileID,
+ GooString *ownerPassword, GooString *userPassword,
+ Guchar *fileKey, GBool encryptMetadata,
+ GBool *ownerPasswordOk) {
+ Guchar test[32], test2[32];
+ GooString *userPassword2;
+ Guchar fState[256];
+ Guchar tmpKey[16];
+ Guchar fx, fy;
+ int len, i, j;
+
+ // try using the supplied owner password to generate the user password
+ *ownerPasswordOk = gFalse;
+ if (ownerPassword) {
+ len = ownerPassword->getLength();
+ if (len < 32) {
+ memcpy(test, ownerPassword->getCString(), len);
+ memcpy(test + len, passwordPad, 32 - len);
+ } else {
+ memcpy(test, ownerPassword->getCString(), 32);
+ }
+ md5(test, 32, test);
+ if (encRevision == 3) {
+ for (i = 0; i < 50; ++i) {
+ md5(test, keyLength, test);
+ }
+ }
+ if (encRevision == 2) {
+ rc4InitKey(test, keyLength, fState);
+ fx = fy = 0;
+ for (i = 0; i < 32; ++i) {
+ test2[i] = rc4DecryptByte(fState, &fx, &fy, ownerKey->getChar(i));
+ }
+ } else {
+ memcpy(test2, ownerKey->getCString(), 32);
+ for (i = 19; i >= 0; --i) {
+ for (j = 0; j < keyLength; ++j) {
+ tmpKey[j] = test[j] ^ i;
+ }
+ rc4InitKey(tmpKey, keyLength, fState);
+ fx = fy = 0;
+ for (j = 0; j < 32; ++j) {
+ test2[j] = rc4DecryptByte(fState, &fx, &fy, test2[j]);
+ }
+ }
+ }
+ userPassword2 = new GooString((char *)test2, 32);
+ if (makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey,
+ permissions, fileID, userPassword2, fileKey,
+ encryptMetadata)) {
+ *ownerPasswordOk = gTrue;
+ delete userPassword2;
+ return gTrue;
+ }
+ delete userPassword2;
+ }
+
+ // try using the supplied user password
+ return makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey,
+ permissions, fileID, userPassword, fileKey,
+ encryptMetadata);
+}
+
+GBool Decrypt::makeFileKey2(int encVersion, int encRevision, int keyLength,
+ GooString *ownerKey, GooString *userKey,
+ int permissions, GooString *fileID,
+ GooString *userPassword, Guchar *fileKey,
+ GBool encryptMetadata) {
+ Guchar *buf;
+ Guchar test[32];
+ Guchar fState[256];
+ Guchar tmpKey[16];
+ Guchar fx, fy;
+ int len, i, j;
+ GBool ok;
+
+ // generate file key
+ buf = (Guchar *)gmalloc(72 + fileID->getLength());
+ if (userPassword) {
+ len = userPassword->getLength();
+ if (len < 32) {
+ memcpy(buf, userPassword->getCString(), len);
+ memcpy(buf + len, passwordPad, 32 - len);
+ } else {
+ memcpy(buf, userPassword->getCString(), 32);
+ }
+ } else {
+ memcpy(buf, passwordPad, 32);
+ }
+ memcpy(buf + 32, ownerKey->getCString(), 32);
+ buf[64] = permissions & 0xff;
+ buf[65] = (permissions >> 8) & 0xff;
+ buf[66] = (permissions >> 16) & 0xff;
+ buf[67] = (permissions >> 24) & 0xff;
+ memcpy(buf + 68, fileID->getCString(), fileID->getLength());
+ len = 68 + fileID->getLength();
+ if (!encryptMetadata) {
+ buf[len++] = 0xff;
+ buf[len++] = 0xff;
+ buf[len++] = 0xff;
+ buf[len++] = 0xff;
+ }
+ md5(buf, len, fileKey);
+ if (encRevision == 3) {
+ for (i = 0; i < 50; ++i) {
+ md5(fileKey, keyLength, fileKey);
+ }
+ }
+
+ // test user password
+ if (encRevision == 2) {
+ rc4InitKey(fileKey, keyLength, fState);
+ fx = fy = 0;
+ for (i = 0; i < 32; ++i) {
+ test[i] = rc4DecryptByte(fState, &fx, &fy, userKey->getChar(i));
+ }
+ ok = memcmp(test, passwordPad, 32) == 0;
+ } else if (encRevision == 3) {
+ memcpy(test, userKey->getCString(), 32);
+ for (i = 19; i >= 0; --i) {
+ for (j = 0; j < keyLength; ++j) {
+ tmpKey[j] = fileKey[j] ^ i;
+ }
+ rc4InitKey(tmpKey, keyLength, fState);
+ fx = fy = 0;
+ for (j = 0; j < 32; ++j) {
+ test[j] = rc4DecryptByte(fState, &fx, &fy, test[j]);
+ }
+ }
+ memcpy(buf, passwordPad, 32);
+ memcpy(buf + 32, fileID->getCString(), fileID->getLength());
+ md5(buf, 32 + fileID->getLength(), buf);
+ ok = memcmp(test, buf, 16) == 0;
+ } else {
+ ok = gFalse;
+ }
+
+ gfree(buf);
+ return ok;
+}
+
+//------------------------------------------------------------------------
+// DecryptStream
+//------------------------------------------------------------------------
+
+DecryptStream::DecryptStream(Stream *strA, Guchar *fileKey,
+ CryptAlgorithm algoA, int keyLength,
+ int objNum, int objGen):
+ FilterStream(strA)
+{
+ int n, i;
+
+ algo = algoA;
+
+ // construct object key
+ for (i = 0; i < keyLength; ++i) {
+ objKey[i] = fileKey[i];
+ }
+ objKey[keyLength] = objNum & 0xff;
+ objKey[keyLength + 1] = (objNum >> 8) & 0xff;
+ objKey[keyLength + 2] = (objNum >> 16) & 0xff;
+ objKey[keyLength + 3] = objGen & 0xff;
+ objKey[keyLength + 4] = (objGen >> 8) & 0xff;
+ if (algo == cryptAES) {
+ objKey[keyLength + 5] = 0x73; // 's'
+ objKey[keyLength + 6] = 0x41; // 'A'
+ objKey[keyLength + 7] = 0x6c; // 'l'
+ objKey[keyLength + 8] = 0x54; // 'T'
+ n = keyLength + 9;
+ } else {
+ n = keyLength + 5;
+ }
+ Decrypt::md5(objKey, n, objKey);
+ if ((objKeyLength = keyLength + 5) > 16) {
+ objKeyLength = 16;
+ }
+}
+
+DecryptStream::~DecryptStream() {
+ delete str;
+}
+
+void DecryptStream::reset() {
+ int i;
+
+ charactersRead = 0;
+ str->reset();
+ switch (algo) {
+ case cryptRC4:
+ state.rc4.x = state.rc4.y = 0;
+ rc4InitKey(objKey, objKeyLength, state.rc4.state);
+ state.rc4.buf = EOF;
+ break;
+ case cryptAES:
+ aesKeyExpansion(&state.aes, objKey, objKeyLength);
+ for (i = 0; i < 16; ++i) {
+ state.aes.cbc[i] = str->getChar();
+ }
+ state.aes.bufIdx = 16;
+ break;
+ }
+}
+
+int DecryptStream::getPos() {
+ return charactersRead;
+}
+
+int DecryptStream::getChar() {
+ Guchar in[16];
+ int c, i;
+
+ c = EOF; // make gcc happy
+ switch (algo) {
+ case cryptRC4:
+ if (state.rc4.buf == EOF) {
+ c = str->getChar();
+ if (c != EOF) {
+ state.rc4.buf = rc4DecryptByte(state.rc4.state, &state.rc4.x,
+ &state.rc4.y, (Guchar)c);
+ }
+ }
+ c = state.rc4.buf;
+ state.rc4.buf = EOF;
+ break;
+ case cryptAES:
+ if (state.aes.bufIdx == 16) {
+ for (i = 0; i < 16; ++i) {
+ if ((c = str->getChar()) == EOF) {
+ return EOF;
+ }
+ in[i] = (Guchar)c;
+ }
+ aesDecryptBlock(&state.aes, in, str->lookChar() == EOF);
+ }
+ if (state.aes.bufIdx == 16) {
+ c = EOF;
+ } else {
+ c = state.aes.buf[state.aes.bufIdx++];
+ }
+ break;
+ }
+ if (c != EOF)
+ charactersRead++;
+ return c;
+}
+
+int DecryptStream::lookChar() {
+ Guchar in[16];
+ int c, i;
+
+ c = EOF; // make gcc happy
+ switch (algo) {
+ case cryptRC4:
+ if (state.rc4.buf == EOF) {
+ c = str->getChar();
+ if (c != EOF) {
+ state.rc4.buf = rc4DecryptByte(state.rc4.state, &state.rc4.x,
+ &state.rc4.y, (Guchar)c);
+ }
+ }
+ c = state.rc4.buf;
+ break;
+ case cryptAES:
+ if (state.aes.bufIdx == 16) {
+ for (i = 0; i < 16; ++i) {
+ if ((c = str->getChar()) == EOF) {
+ return EOF;
+ }
+ in[i] = c;
+ }
+ aesDecryptBlock(&state.aes, in, str->lookChar() == EOF);
+ }
+ if (state.aes.bufIdx == 16) {
+ c = EOF;
+ } else {
+ c = state.aes.buf[state.aes.bufIdx];
+ }
+ break;
+ }
+ return c;
+}
+
+GBool DecryptStream::isBinary(GBool last) {
+ return str->isBinary(last);
+}
+
+//------------------------------------------------------------------------
+// RC4-compatible decryption
+//------------------------------------------------------------------------
+
+static void rc4InitKey(Guchar *key, int keyLen, Guchar *state) {
+ Guchar index1, index2;
+ Guchar t;
+ int i;
+
+ for (i = 0; i < 256; ++i)
+ state[i] = i;
+ index1 = index2 = 0;
+ for (i = 0; i < 256; ++i) {
+ index2 = (key[index1] + state[i] + index2) % 256;
+ t = state[i];
+ state[i] = state[index2];
+ state[index2] = t;
+ index1 = (index1 + 1) % keyLen;
+ }
+}
+
+static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c) {
+ Guchar x1, y1, tx, ty;
+
+ x1 = *x = (*x + 1) % 256;
+ y1 = *y = (state[*x] + *y) % 256;
+ tx = state[x1];
+ ty = state[y1];
+ state[x1] = ty;
+ state[y1] = tx;
+ return c ^ state[(tx + ty) % 256];
+}
+
+//------------------------------------------------------------------------
+// AES decryption
+//------------------------------------------------------------------------
+
+static const Guchar sbox[256] = {
+ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
+ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
+ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
+ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
+ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
+ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
+ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
+ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
+ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
+ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
+ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
+ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
+ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
+ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
+ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
+ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
+};
+
+static const Guchar invSbox[256] = {
+ 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
+ 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
+ 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
+ 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,
+ 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92,
+ 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
+ 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06,
+ 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b,
+ 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
+ 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e,
+ 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b,
+ 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
+ 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f,
+ 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef,
+ 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
+ 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
+};
+
+static const Guint rcon[11] = {
+ 0x00000000, // unused
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x40000000,
+ 0x80000000,
+ 0x1b000000,
+ 0x36000000
+};
+
+static inline Guint subWord(Guint x) {
+ return (sbox[x >> 24] << 24)
+ | (sbox[(x >> 16) & 0xff] << 16)
+ | (sbox[(x >> 8) & 0xff] << 8)
+ | sbox[x & 0xff];
+}
+
+static inline Guint rotWord(Guint x) {
+ return ((x << 8) & 0xffffffff) | (x >> 24);
+}
+
+static inline void invSubBytes(Guchar *state) {
+ int i;
+
+ for (i = 0; i < 16; ++i) {
+ state[i] = invSbox[state[i]];
+ }
+}
+
+static inline void invShiftRows(Guchar *state) {
+ Guchar t;
+
+ t = state[7];
+ state[7] = state[6];
+ state[6] = state[5];
+ state[5] = state[4];
+ state[4] = t;
+
+ t = state[8];
+ state[8] = state[10];
+ state[10] = t;
+ t = state[9];
+ state[9] = state[11];
+ state[11] = t;
+
+ t = state[12];
+ state[12] = state[13];
+ state[13] = state[14];
+ state[14] = state[15];
+ state[15] = t;
+}
+
+// {09} \cdot s
+static inline Guchar mul09(Guchar s) {
+ Guchar s2, s4, s8;
+
+ s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+ s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ return s ^ s8;
+}
+
+// {0b} \cdot s
+static inline Guchar mul0b(Guchar s) {
+ Guchar s2, s4, s8;
+
+ s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+ s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ return s ^ s2 ^ s8;
+}
+
+// {0d} \cdot s
+static inline Guchar mul0d(Guchar s) {
+ Guchar s2, s4, s8;
+
+ s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+ s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ return s ^ s4 ^ s8;
+}
+
+// {0e} \cdot s
+static inline Guchar mul0e(Guchar s) {
+ Guchar s2, s4, s8;
+
+ s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+ s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ return s2 ^ s4 ^ s8;
+}
+
+static inline void invMixColumns(Guchar *state) {
+ int c;
+ Guchar s0, s1, s2, s3;
+
+ for (c = 0; c < 4; ++c) {
+ s0 = state[c];
+ s1 = state[4+c];
+ s2 = state[8+c];
+ s3 = state[12+c];
+ state[c] = mul0e(s0) ^ mul0b(s1) ^ mul0d(s2) ^ mul09(s3);
+ state[4+c] = mul09(s0) ^ mul0e(s1) ^ mul0b(s2) ^ mul0d(s3);
+ state[8+c] = mul0d(s0) ^ mul09(s1) ^ mul0e(s2) ^ mul0b(s3);
+ state[12+c] = mul0b(s0) ^ mul0d(s1) ^ mul09(s2) ^ mul0e(s3);
+ }
+}
+
+static inline void invMixColumnsW(Guint *w) {
+ int c;
+ Guchar s0, s1, s2, s3;
+
+ for (c = 0; c < 4; ++c) {
+ s0 = w[c] >> 24;
+ s1 = w[c] >> 16;
+ s2 = w[c] >> 8;
+ s3 = w[c];
+ w[c] = ((mul0e(s0) ^ mul0b(s1) ^ mul0d(s2) ^ mul09(s3)) << 24)
+ | ((mul09(s0) ^ mul0e(s1) ^ mul0b(s2) ^ mul0d(s3)) << 16)
+ | ((mul0d(s0) ^ mul09(s1) ^ mul0e(s2) ^ mul0b(s3)) << 8)
+ | (mul0b(s0) ^ mul0d(s1) ^ mul09(s2) ^ mul0e(s3));
+ }
+}
+
+static inline void addRoundKey(Guchar *state, Guint *w) {
+ int c;
+
+ for (c = 0; c < 4; ++c) {
+ state[c] ^= w[c] >> 24;
+ state[4+c] ^= w[c] >> 16;
+ state[8+c] ^= w[c] >> 8;
+ state[12+c] ^= w[c];
+ }
+}
+
+static void aesKeyExpansion(DecryptAESState *s,
+ Guchar *objKey, int /*objKeyLen*/) {
+ Guint temp;
+ int i, round;
+
+ //~ this assumes objKeyLen == 16
+
+ for (i = 0; i < 4; ++i) {
+ s->w[i] = (objKey[4*i] << 24) + (objKey[4*i+1] << 16) +
+ (objKey[4*i+2] << 8) + objKey[4*i+3];
+ }
+ for (i = 4; i < 44; ++i) {
+ temp = s->w[i-1];
+ if (!(i & 3)) {
+ temp = subWord(rotWord(temp)) ^ rcon[i/4];
+ }
+ s->w[i] = s->w[i-4] ^ temp;
+ }
+ for (round = 1; round <= 9; ++round) {
+ invMixColumnsW(&s->w[round * 4]);
+ }
+}
+
+static void aesDecryptBlock(DecryptAESState *s, Guchar *in, GBool last) {
+ int c, round, n, i;
+
+ // initial state
+ for (c = 0; c < 4; ++c) {
+ s->state[c] = in[4*c];
+ s->state[4+c] = in[4*c+1];
+ s->state[8+c] = in[4*c+2];
+ s->state[12+c] = in[4*c+3];
+ }
+
+ // round 0
+ addRoundKey(s->state, &s->w[10 * 4]);
+
+ // rounds 1-9
+ for (round = 9; round >= 1; --round) {
+ invSubBytes(s->state);
+ invShiftRows(s->state);
+ invMixColumns(s->state);
+ addRoundKey(s->state, &s->w[round * 4]);
+ }
+
+ // round 10
+ invSubBytes(s->state);
+ invShiftRows(s->state);
+ addRoundKey(s->state, &s->w[0]);
+
+ // CBC
+ for (c = 0; c < 4; ++c) {
+ s->buf[4*c] = s->state[c] ^ s->cbc[4*c];
+ s->buf[4*c+1] = s->state[4+c] ^ s->cbc[4*c+1];
+ s->buf[4*c+2] = s->state[8+c] ^ s->cbc[4*c+2];
+ s->buf[4*c+3] = s->state[12+c] ^ s->cbc[4*c+3];
+ }
+
+ // save the input block for the next CBC
+ for (i = 0; i < 16; ++i) {
+ s->cbc[i] = in[i];
+ }
+
+ // remove padding
+ s->bufIdx = 0;
+ if (last) {
+ n = s->buf[15];
+ for (i = 15; i >= n; --i) {
+ s->buf[i] = s->buf[i-n];
+ }
+ s->bufIdx = n;
+ if (n > 16)
+ {
+ error(-1, "Reducing bufIdx from %d to 16 to not crash", n);
+ s->bufIdx = 16;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// MD5 message digest
+//------------------------------------------------------------------------
+
+// this works around a bug in older Sun compilers
+static inline Gulong rotateLeft(Gulong x, int r) {
+ x &= 0xffffffff;
+ return ((x << r) | (x >> (32 - r))) & 0xffffffff;
+}
+
+static inline Gulong md5Round1(Gulong a, Gulong b, Gulong c, Gulong d,
+ Gulong Xk, Gulong s, Gulong Ti) {
+ return b + rotateLeft((a + ((b & c) | (~b & d)) + Xk + Ti), s);
+}
+
+static inline Gulong md5Round2(Gulong a, Gulong b, Gulong c, Gulong d,
+ Gulong Xk, Gulong s, Gulong Ti) {
+ return b + rotateLeft((a + ((b & d) | (c & ~d)) + Xk + Ti), s);
+}
+
+static inline Gulong md5Round3(Gulong a, Gulong b, Gulong c, Gulong d,
+ Gulong Xk, Gulong s, Gulong Ti) {
+ return b + rotateLeft((a + (b ^ c ^ d) + Xk + Ti), s);
+}
+
+static inline Gulong md5Round4(Gulong a, Gulong b, Gulong c, Gulong d,
+ Gulong Xk, Gulong s, Gulong Ti) {
+ return b + rotateLeft((a + (c ^ (b | ~d)) + Xk + Ti), s);
+}
+
+void Decrypt::md5(Guchar *msg, int msgLen, Guchar *digest) {
+ Gulong x[16];
+ Gulong a, b, c, d, aa, bb, cc, dd;
+ int n64;
+ int i, j, k;
+
+ // compute number of 64-byte blocks
+ // (length + pad byte (0x80) + 8 bytes for length)
+ n64 = (msgLen + 1 + 8 + 63) / 64;
+
+ // initialize a, b, c, d
+ a = 0x67452301;
+ b = 0xefcdab89;
+ c = 0x98badcfe;
+ d = 0x10325476;
+
+ // loop through blocks
+ k = 0;
+ for (i = 0; i < n64; ++i) {
+
+ // grab a 64-byte block
+ for (j = 0; j < 16 && k < msgLen - 3; ++j, k += 4)
+ x[j] = (((((msg[k+3] << 8) + msg[k+2]) << 8) + msg[k+1]) << 8) + msg[k];
+ if (i == n64 - 1) {
+ if (k == msgLen - 3)
+ x[j] = 0x80000000 + (((msg[k+2] << 8) + msg[k+1]) << 8) + msg[k];
+ else if (k == msgLen - 2)
+ x[j] = 0x800000 + (msg[k+1] << 8) + msg[k];
+ else if (k == msgLen - 1)
+ x[j] = 0x8000 + msg[k];
+ else
+ x[j] = 0x80;
+ ++j;
+ while (j < 16)
+ x[j++] = 0;
+ x[14] = msgLen << 3;
+ }
+
+ // save a, b, c, d
+ aa = a;
+ bb = b;
+ cc = c;
+ dd = d;
+
+ // round 1
+ a = md5Round1(a, b, c, d, x[0], 7, 0xd76aa478);
+ d = md5Round1(d, a, b, c, x[1], 12, 0xe8c7b756);
+ c = md5Round1(c, d, a, b, x[2], 17, 0x242070db);
+ b = md5Round1(b, c, d, a, x[3], 22, 0xc1bdceee);
+ a = md5Round1(a, b, c, d, x[4], 7, 0xf57c0faf);
+ d = md5Round1(d, a, b, c, x[5], 12, 0x4787c62a);
+ c = md5Round1(c, d, a, b, x[6], 17, 0xa8304613);
+ b = md5Round1(b, c, d, a, x[7], 22, 0xfd469501);
+ a = md5Round1(a, b, c, d, x[8], 7, 0x698098d8);
+ d = md5Round1(d, a, b, c, x[9], 12, 0x8b44f7af);
+ c = md5Round1(c, d, a, b, x[10], 17, 0xffff5bb1);
+ b = md5Round1(b, c, d, a, x[11], 22, 0x895cd7be);
+ a = md5Round1(a, b, c, d, x[12], 7, 0x6b901122);
+ d = md5Round1(d, a, b, c, x[13], 12, 0xfd987193);
+ c = md5Round1(c, d, a, b, x[14], 17, 0xa679438e);
+ b = md5Round1(b, c, d, a, x[15], 22, 0x49b40821);
+
+ // round 2
+ a = md5Round2(a, b, c, d, x[1], 5, 0xf61e2562);
+ d = md5Round2(d, a, b, c, x[6], 9, 0xc040b340);
+ c = md5Round2(c, d, a, b, x[11], 14, 0x265e5a51);
+ b = md5Round2(b, c, d, a, x[0], 20, 0xe9b6c7aa);
+ a = md5Round2(a, b, c, d, x[5], 5, 0xd62f105d);
+ d = md5Round2(d, a, b, c, x[10], 9, 0x02441453);
+ c = md5Round2(c, d, a, b, x[15], 14, 0xd8a1e681);
+ b = md5Round2(b, c, d, a, x[4], 20, 0xe7d3fbc8);
+ a = md5Round2(a, b, c, d, x[9], 5, 0x21e1cde6);
+ d = md5Round2(d, a, b, c, x[14], 9, 0xc33707d6);
+ c = md5Round2(c, d, a, b, x[3], 14, 0xf4d50d87);
+ b = md5Round2(b, c, d, a, x[8], 20, 0x455a14ed);
+ a = md5Round2(a, b, c, d, x[13], 5, 0xa9e3e905);
+ d = md5Round2(d, a, b, c, x[2], 9, 0xfcefa3f8);
+ c = md5Round2(c, d, a, b, x[7], 14, 0x676f02d9);
+ b = md5Round2(b, c, d, a, x[12], 20, 0x8d2a4c8a);
+
+ // round 3
+ a = md5Round3(a, b, c, d, x[5], 4, 0xfffa3942);
+ d = md5Round3(d, a, b, c, x[8], 11, 0x8771f681);
+ c = md5Round3(c, d, a, b, x[11], 16, 0x6d9d6122);
+ b = md5Round3(b, c, d, a, x[14], 23, 0xfde5380c);
+ a = md5Round3(a, b, c, d, x[1], 4, 0xa4beea44);
+ d = md5Round3(d, a, b, c, x[4], 11, 0x4bdecfa9);
+ c = md5Round3(c, d, a, b, x[7], 16, 0xf6bb4b60);
+ b = md5Round3(b, c, d, a, x[10], 23, 0xbebfbc70);
+ a = md5Round3(a, b, c, d, x[13], 4, 0x289b7ec6);
+ d = md5Round3(d, a, b, c, x[0], 11, 0xeaa127fa);
+ c = md5Round3(c, d, a, b, x[3], 16, 0xd4ef3085);
+ b = md5Round3(b, c, d, a, x[6], 23, 0x04881d05);
+ a = md5Round3(a, b, c, d, x[9], 4, 0xd9d4d039);
+ d = md5Round3(d, a, b, c, x[12], 11, 0xe6db99e5);
+ c = md5Round3(c, d, a, b, x[15], 16, 0x1fa27cf8);
+ b = md5Round3(b, c, d, a, x[2], 23, 0xc4ac5665);
+
+ // round 4
+ a = md5Round4(a, b, c, d, x[0], 6, 0xf4292244);
+ d = md5Round4(d, a, b, c, x[7], 10, 0x432aff97);
+ c = md5Round4(c, d, a, b, x[14], 15, 0xab9423a7);
+ b = md5Round4(b, c, d, a, x[5], 21, 0xfc93a039);
+ a = md5Round4(a, b, c, d, x[12], 6, 0x655b59c3);
+ d = md5Round4(d, a, b, c, x[3], 10, 0x8f0ccc92);
+ c = md5Round4(c, d, a, b, x[10], 15, 0xffeff47d);
+ b = md5Round4(b, c, d, a, x[1], 21, 0x85845dd1);
+ a = md5Round4(a, b, c, d, x[8], 6, 0x6fa87e4f);
+ d = md5Round4(d, a, b, c, x[15], 10, 0xfe2ce6e0);
+ c = md5Round4(c, d, a, b, x[6], 15, 0xa3014314);
+ b = md5Round4(b, c, d, a, x[13], 21, 0x4e0811a1);
+ a = md5Round4(a, b, c, d, x[4], 6, 0xf7537e82);
+ d = md5Round4(d, a, b, c, x[11], 10, 0xbd3af235);
+ c = md5Round4(c, d, a, b, x[2], 15, 0x2ad7d2bb);
+ b = md5Round4(b, c, d, a, x[9], 21, 0xeb86d391);
+
+ // increment a, b, c, d
+ a += aa;
+ b += bb;
+ c += cc;
+ d += dd;
+ }
+
+ // break digest into bytes
+ digest[0] = (Guchar)(a & 0xff);
+ digest[1] = (Guchar)((a >>= 8) & 0xff);
+ digest[2] = (Guchar)((a >>= 8) & 0xff);
+ digest[3] = (Guchar)((a >>= 8) & 0xff);
+ digest[4] = (Guchar)(b & 0xff);
+ digest[5] = (Guchar)((b >>= 8) & 0xff);
+ digest[6] = (Guchar)((b >>= 8) & 0xff);
+ digest[7] = (Guchar)((b >>= 8) & 0xff);
+ digest[8] = (Guchar)(c & 0xff);
+ digest[9] = (Guchar)((c >>= 8) & 0xff);
+ digest[10] = (Guchar)((c >>= 8) & 0xff);
+ digest[11] = (Guchar)((c >>= 8) & 0xff);
+ digest[12] = (Guchar)(d & 0xff);
+ digest[13] = (Guchar)((d >>= 8) & 0xff);
+ digest[14] = (Guchar)((d >>= 8) & 0xff);
+ digest[15] = (Guchar)((d >>= 8) & 0xff);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.h
new file mode 100644
index 00000000000..feb701444e2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Decrypt.h
@@ -0,0 +1,111 @@
+//========================================================================
+//
+// Decrypt.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef DECRYPT_H
+#define DECRYPT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "goo/GooString.h"
+#include "Object.h"
+#include "Stream.h"
+
+//------------------------------------------------------------------------
+// Decrypt
+//------------------------------------------------------------------------
+
+class Decrypt {
+public:
+ static void md5(Guchar *msg, int msgLen, Guchar *digest);
+
+ // Generate a file key. The <fileKey> buffer must have space for at
+ // least 16 bytes. Checks <ownerPassword> and then <userPassword>
+ // and returns true if either is correct. Sets <ownerPasswordOk> if
+ // the owner password was correct. Either or both of the passwords
+ // may be NULL, which is treated as an empty string.
+ static GBool makeFileKey(int encVersion, int encRevision, int keyLength,
+ GooString *ownerKey, GooString *userKey,
+ int permissions, GooString *fileID,
+ GooString *ownerPassword, GooString *userPassword,
+ Guchar *fileKey, GBool encryptMetadata,
+ GBool *ownerPasswordOk);
+
+private:
+
+ static GBool makeFileKey2(int encVersion, int encRevision, int keyLength,
+ GooString *ownerKey, GooString *userKey,
+ int permissions, GooString *fileID,
+ GooString *userPassword, Guchar *fileKey,
+ GBool encryptMetadata);
+};
+
+//------------------------------------------------------------------------
+// DecryptStream
+//------------------------------------------------------------------------
+
+struct DecryptRC4State {
+ Guchar state[256];
+ Guchar x, y;
+ int buf;
+};
+
+struct DecryptAESState {
+ Guint w[44];
+ Guchar state[16];
+ Guchar cbc[16];
+ Guchar buf[16];
+ int bufIdx;
+};
+
+class DecryptStream: public FilterStream {
+public:
+
+ DecryptStream(Stream *strA, Guchar *fileKey,
+ CryptAlgorithm algoA, int keyLength,
+ int objNum, int objGen);
+ virtual ~DecryptStream();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual int getPos();
+ virtual GBool isBinary(GBool last);
+ virtual Stream *getUndecodedStream() { return this; }
+
+private:
+
+ CryptAlgorithm algo;
+ int objKeyLength;
+ Guchar objKey[16 + 9];
+ int charactersRead; // so that getPos() can be correct
+
+ union {
+ DecryptRC4State rc4;
+ DecryptAESState aes;
+ } state;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.cc
new file mode 100644
index 00000000000..a899bca16c0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.cc
@@ -0,0 +1,176 @@
+//========================================================================
+//
+// Dict.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "Object.h"
+#include "XRef.h"
+#include "Dict.h"
+
+//------------------------------------------------------------------------
+// Dict
+//------------------------------------------------------------------------
+
+Dict::Dict(XRef *xrefA) {
+ xref = xrefA;
+ entries = NULL;
+ size = length = 0;
+ ref = 1;
+}
+
+Dict::Dict(Dict* dictA) {
+ xref = dictA->xref;
+ size = length = dictA->length;
+ ref = 1;
+
+ entries = (DictEntry *)gmallocn(size, sizeof(DictEntry));
+ for (int i=0; i<length; i++) {
+ entries[i].key = strdup(dictA->entries[i].key);
+ dictA->entries[i].val.copy(&entries[i].val);
+ }
+}
+
+Dict::~Dict() {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ gfree(entries[i].key);
+ entries[i].val.free();
+ }
+ gfree(entries);
+}
+
+void Dict::add(char *key, Object *val) {
+ if (length == size) {
+ if (length == 0) {
+ size = 8;
+ } else {
+ size *= 2;
+ }
+ entries = (DictEntry *)greallocn(entries, size, sizeof(DictEntry));
+ }
+ entries[length].key = key;
+ entries[length].val = *val;
+ ++length;
+}
+
+inline DictEntry *Dict::find(char *key) {
+ int i;
+
+ for (i = length - 1; i >=0; --i) {
+ if (!strcmp(key, entries[i].key))
+ return &entries[i];
+ }
+ return NULL;
+}
+
+void Dict::remove(char *key) {
+ int i;
+ bool found = false;
+ DictEntry tmp;
+ if(length == 0) return;
+
+ for(i=0; i<length; i++) {
+ if (!strcmp(key, entries[i].key)) {
+ found = true;
+ break;
+ }
+ }
+ if(!found) return;
+ //replace the deleted entry with the last entry
+ length -= 1;
+ tmp = entries[length];
+ if (i!=length) //don't copy the last entry if it is deleted
+ entries[i] = tmp;
+}
+
+void Dict::set(char *key, Object *val) {
+ DictEntry *e;
+ e = find (key);
+ if (e) {
+ e->val.free();
+ e->val = *val;
+ } else {
+ add (copyString(key), val);
+ }
+}
+
+
+GBool Dict::is(char *type) {
+ DictEntry *e;
+
+ return (e = find("Type")) && e->val.isName(type);
+}
+
+Object *Dict::lookup(char *key, Object *obj) {
+ DictEntry *e;
+
+ return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
+}
+
+Object *Dict::lookupNF(char *key, Object *obj) {
+ DictEntry *e;
+
+ return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
+}
+
+GBool Dict::lookupInt(const char *key, const char *alt_key, int *value)
+{
+ Object obj1;
+ GBool success = gFalse;
+
+ lookup ((char *) key, &obj1);
+ if (obj1.isNull () && alt_key != NULL) {
+ obj1.free ();
+ lookup ((char *) alt_key, &obj1);
+ }
+ if (obj1.isInt ()) {
+ *value = obj1.getInt ();
+ success = gTrue;
+ }
+
+ obj1.free ();
+
+ return success;
+}
+
+char *Dict::getKey(int i) {
+ return entries[i].key;
+}
+
+Object *Dict::getVal(int i, Object *obj) {
+ return entries[i].val.fetch(xref, obj);
+}
+
+Object *Dict::getValNF(int i, Object *obj) {
+ return entries[i].val.copy(obj);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.h
new file mode 100644
index 00000000000..bb747d579bd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Dict.h
@@ -0,0 +1,98 @@
+//========================================================================
+//
+// Dict.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef DICT_H
+#define DICT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+
+//------------------------------------------------------------------------
+// Dict
+//------------------------------------------------------------------------
+
+struct DictEntry {
+ char *key;
+ Object val;
+};
+
+class Dict {
+public:
+
+ // Constructor.
+ Dict(XRef *xrefA);
+ Dict(Dict* dictA);
+
+ // Destructor.
+ ~Dict();
+
+ // Reference counting.
+ int incRef() { return ++ref; }
+ int decRef() { return --ref; }
+
+ // Get number of entries.
+ int getLength() { return length; }
+
+ // Add an entry. NB: does not copy key.
+ void add(char *key, Object *val);
+
+ // Update the value of an existing entry, otherwise create it
+ void set(char *key, Object *val);
+ // Remove an entry. This invalidate indexes
+ void remove(char *key);
+
+ // Check if dictionary is of specified type.
+ GBool is(char *type);
+
+ // Look up an entry and return the value. Returns a null object
+ // if <key> is not in the dictionary.
+ Object *lookup(char *key, Object *obj);
+ Object *lookupNF(char *key, Object *obj);
+ GBool lookupInt(const char *key, const char *alt_key, int *value);
+
+ // Iterative accessors.
+ char *getKey(int i);
+ Object *getVal(int i, Object *obj);
+ Object *getValNF(int i, Object *obj);
+
+ // Set the xref pointer. This is only used in one special case: the
+ // trailer dictionary, which is read before the xref table is
+ // parsed.
+ void setXRef(XRef *xrefA) { xref = xrefA; }
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ DictEntry *entries; // array of entries
+ int size; // size of <entries> array
+ int length; // number of entries in dictionary
+ int ref; // reference count
+
+ DictEntry *find(char *key);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.cc
new file mode 100644
index 00000000000..fc2bef4371c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.cc
@@ -0,0 +1,72 @@
+//========================================================================
+//
+// Error.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdarg.h>
+#include "GlobalParams.h"
+#include "Error.h"
+
+static void defaultErrorFunction(int pos, char *msg, va_list args)
+{
+ if (pos >= 0) {
+ fprintf(stderr, "Error (%d): ", pos);
+ } else {
+ fprintf(stderr, "Error: ");
+ }
+ vfprintf(stderr, msg, args);
+ fprintf(stderr, "\n");
+ fflush(stderr);
+}
+
+static void (*errorFunction)(int, char *, va_list args) = defaultErrorFunction;
+
+void setErrorFunction(void (* f)(int, char *, va_list args))
+{
+ errorFunction = f;
+}
+
+void CDECL error(int pos, char *msg, ...) {
+ va_list args;
+ // NB: this can be called before the globalParams object is created
+ if (globalParams && globalParams->getErrQuiet()) {
+ return;
+ }
+ va_start(args, msg);
+ (*errorFunction)(pos, msg, args);
+ va_end(args);
+}
+
+void warning(char *msg, ...) {
+ va_list args;
+ va_start(args, msg);
+ vprintf(msg, args);
+ va_end(args);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.h
new file mode 100644
index 00000000000..07f3d1f92ad
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Error.h
@@ -0,0 +1,40 @@
+//========================================================================
+//
+// Error.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef ERROR_H
+#define ERROR_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdarg.h>
+#include "poppler-config.h"
+
+extern void CDECL error(int pos, char *msg, ...) GCC_PRINTF_FORMAT (2, 3);
+void warning(char *msg, ...) GCC_PRINTF_FORMAT (1, 2);
+
+void setErrorFunction(void (* f)(int , char *, va_list args));
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ErrorCodes.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/ErrorCodes.h
new file mode 100644
index 00000000000..b28528df564
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ErrorCodes.h
@@ -0,0 +1,36 @@
+//========================================================================
+//
+// ErrorCodes.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef ERRORCODES_H
+#define ERRORCODES_H
+
+#define errNone 0 // no error
+
+#define errOpenFile 1 // couldn't open the PDF file
+
+#define errBadCatalog 2 // couldn't read the page catalog
+
+#define errDamaged 3 // PDF file was damaged and couldn't be
+ // repaired
+
+#define errEncrypted 4 // file was encrypted and password was
+ // incorrect or not supplied
+
+#define errHighlightFile 5 // nonexistent or invalid highlight file
+
+#define errBadPrinter 6 // invalid printer
+
+#define errPrinting 7 // error during printing
+
+#define errPermission 8 // PDF file doesn't allow that operation
+
+#define errBadPageNum 9 // invalid page number
+
+#define errFileIO 10 // file I/O error
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.cc
new file mode 100644
index 00000000000..4df6139402b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.cc
@@ -0,0 +1,140 @@
+//========================================================================
+//
+// FileSpec.cc
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+//========================================================================
+//
+// Most of the code from Link.cc and PSOutputDev.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#include "FileSpec.h"
+
+GBool getFileSpecName (Object *fileSpec, Object *fileName)
+{
+ if (fileSpec->isString()) {
+ fileSpec->copy(fileName);
+ return gTrue;
+ }
+
+ if (fileSpec->isDict()) {
+ fileSpec->dictLookup("UF", fileName);
+ if (fileName->isString()) {
+ return gTrue;
+ }
+ fileName->free();
+ fileSpec->dictLookup("F", fileName);
+ if (fileName->isString()) {
+ return gTrue;
+ }
+ fileName->free();
+ fileSpec->dictLookup("DOS", fileName);
+ if (fileName->isString()) {
+ return gTrue;
+ }
+ fileName->free();
+ fileSpec->dictLookup("Mac", fileName);
+ if (fileName->isString()) {
+ return gTrue;
+ }
+ fileName->free();
+ fileSpec->dictLookup("Unix", fileName);
+ if (fileName->isString()) {
+ return gTrue;
+ }
+ fileName->free();
+ }
+ return gFalse;
+}
+
+GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName)
+{
+ if (fileSpec->isString()) {
+ fileSpec->copy(fileName);
+ return gTrue;
+ }
+
+ if (fileSpec->isDict()) {
+ if (!fileSpec->dictLookup("UF", fileName)->isString ()) {
+ fileName->free();
+ if (!fileSpec->dictLookup("F", fileName)->isString ()) {
+ fileName->free();
+#ifdef _WIN32
+ char *platform = "DOS";
+#else
+ char *platform = "Unix";
+#endif
+ if (!fileSpec->dictLookup(platform, fileName)->isString ()) {
+ fileName->free();
+ error(-1, "Illegal file spec");
+ return gFalse;
+ }
+ }
+ }
+ } else {
+ error(-1, "Illegal file spec");
+ return gFalse;
+ }
+
+ // system-dependent path manipulation
+#ifdef _WIN32
+ int i, j;
+ GooString *name = fileName->getString();
+ // "//...." --> "\...."
+ // "/x/...." --> "x:\...."
+ // "/server/share/...." --> "\\server\share\...."
+ // convert escaped slashes to slashes and unescaped slashes to backslashes
+ i = 0;
+ if (name->getChar(0) == '/') {
+ if (name->getLength() >= 2 && name->getChar(1) == '/') {
+ name->del(0);
+ i = 0;
+ } else if (name->getLength() >= 2 &&
+ ((name->getChar(1) >= 'a' && name->getChar(1) <= 'z') ||
+ (name->getChar(1) >= 'A' && name->getChar(1) <= 'Z')) &&
+ (name->getLength() == 2 || name->getChar(2) == '/')) {
+ name->setChar(0, name->getChar(1));
+ name->setChar(1, ':');
+ i = 2;
+ } else {
+ for (j = 2; j < name->getLength(); ++j) {
+ if (name->getChar(j-1) != '\\' &&
+ name->getChar(j) == '/') {
+ break;
+ }
+ }
+ if (j < name->getLength()) {
+ name->setChar(0, '\\');
+ name->insert(0, '\\');
+ i = 2;
+ }
+ }
+ }
+ for (; i < name->getLength(); ++i) {
+ if (name->getChar(i) == '/') {
+ name->setChar(i, '\\');
+ } else if (name->getChar(i) == '\\' &&
+ i+1 < name->getLength() &&
+ name->getChar(i+1) == '/') {
+ name->del(i);
+ }
+ }
+#endif /* _WIN32 */
+
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.h
new file mode 100644
index 00000000000..ec35f3f5436
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FileSpec.h
@@ -0,0 +1,24 @@
+//========================================================================
+//
+// FileSpec.h
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef FILE_SPEC_H
+#define FILE_SPEC_H
+
+#include "goo/gtypes.h"
+#include "Object.h"
+
+GBool getFileSpecName (Object *fileSpec, Object *fileName);
+GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName);
+
+#endif /* FILE_SPEC_H */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.cc
new file mode 100644
index 00000000000..487ce94761c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.cc
@@ -0,0 +1,125 @@
+//========================================================================
+//
+// FlateStream.cc
+//
+// Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net>
+//
+// This file is under the GPLv2 or later license
+//
+//========================================================================
+#include "FlateStream.h"
+FlateStream::FlateStream(Stream *strA, int predictor, int columns, int colors, int bits) :
+ FilterStream(strA)
+{
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ } else {
+ pred = NULL;
+ }
+ out_pos = 0;
+ memset(&d_stream, 0, sizeof(d_stream));
+ inflateInit(&d_stream);
+}
+
+FlateStream::~FlateStream() {
+ inflateEnd(&d_stream);
+ delete pred;
+ delete str;
+}
+
+void FlateStream::reset() {
+ //FIXME: what are the semantics of reset?
+ //i.e. how much intialization has to happen in the constructor?
+
+ /* reinitialize zlib */
+ inflateEnd(&d_stream);
+ memset(&d_stream, 0, sizeof(d_stream));
+ inflateInit(&d_stream);
+
+ str->reset();
+ d_stream.avail_in = 0;
+ status = Z_OK;
+ out_pos = 0;
+ out_buf_len = 0;
+}
+
+int FlateStream::getRawChar() {
+ if (fill_buffer())
+ return EOF;
+
+ return out_buf[out_pos++];
+}
+
+int FlateStream::getChar() {
+ if (pred)
+ return pred->getChar();
+ else
+ return getRawChar();
+}
+
+int FlateStream::lookChar() {
+ if (pred)
+ return pred->lookChar();
+
+ if (fill_buffer())
+ return EOF;
+
+ return out_buf[out_pos];
+}
+
+int FlateStream::fill_buffer() {
+ /* only fill the buffer if it has all been used */
+ if (out_pos >= out_buf_len) {
+ /* check if the flatestream has been exhausted */
+ if (status == Z_STREAM_END) {
+ return -1;
+ }
+
+ /* set to the begining of out_buf */
+ d_stream.avail_out = sizeof(out_buf);
+ d_stream.next_out = out_buf;
+ out_pos = 0;
+
+ while (1) {
+ /* buffer is empty so we need to fill it */
+ if (d_stream.avail_in == 0) {
+ int c;
+ /* read from the source stream */
+ while (d_stream.avail_in < sizeof(in_buf) && (c = str->getChar()) != EOF) {
+ in_buf[d_stream.avail_in++] = c;
+ }
+ d_stream.next_in = in_buf;
+ }
+
+ /* keep decompressing until we can't anymore */
+ if (d_stream.avail_out == 0 || d_stream.avail_in == 0 || (status != Z_OK && status != Z_BUF_ERROR))
+ break;
+ status = inflate(&d_stream, Z_SYNC_FLUSH);
+ }
+
+ out_buf_len = sizeof(out_buf) - d_stream.avail_out;
+ if (status != Z_OK && status != Z_STREAM_END)
+ return -1;
+ if (!out_buf_len)
+ return -1;
+ }
+
+ return 0;
+}
+
+GooString *FlateStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 3 || pred) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< >> /FlateDecode filter\n");
+ return s;
+}
+
+GBool FlateStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.h
new file mode 100644
index 00000000000..f4be9e471e1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FlateStream.h
@@ -0,0 +1,69 @@
+//========================================================================
+//
+// FlateStream.h
+//
+// Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net>
+//
+// This file is under the GPLv2 or later license
+//
+//========================================================================
+
+#ifndef FLATESTREAM_H
+#define FLATESTREAM_H
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "poppler-config.h"
+#include "Error.h"
+#include "Object.h"
+#include "Decrypt.h"
+#include "Stream.h"
+
+extern "C" {
+#include <zlib.h>
+}
+
+class FlateStream: public FilterStream {
+public:
+
+ FlateStream(Stream *strA, int predictor, int columns, int colors, int bits);
+ virtual ~FlateStream();
+ virtual StreamKind getKind() { return strFlate; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual int getRawChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+ int fill_buffer(void);
+ z_stream d_stream;
+ StreamPredictor *pred;
+ int status;
+ /* in_buf currently needs to be 1 or we over read from EmbedStreams */
+ unsigned char in_buf[1];
+ unsigned char out_buf[4096];
+ int out_pos;
+ int out_buf_len;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.cc
new file mode 100644
index 00000000000..cd8d8926542
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.cc
@@ -0,0 +1,1824 @@
+//========================================================================
+//
+// FontEncodingTables.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+#include <stdlib.h>
+#include "FontEncodingTables.h"
+
+char *macRomanEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quotesingle",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "grave",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ NULL,
+ "Adieresis",
+ "Aring",
+ "Ccedilla",
+ "Eacute",
+ "Ntilde",
+ "Odieresis",
+ "Udieresis",
+ "aacute",
+ "agrave",
+ "acircumflex",
+ "adieresis",
+ "atilde",
+ "aring",
+ "ccedilla",
+ "eacute",
+ "egrave",
+ "ecircumflex",
+ "edieresis",
+ "iacute",
+ "igrave",
+ "icircumflex",
+ "idieresis",
+ "ntilde",
+ "oacute",
+ "ograve",
+ "ocircumflex",
+ "odieresis",
+ "otilde",
+ "uacute",
+ "ugrave",
+ "ucircumflex",
+ "udieresis",
+ "dagger",
+ "degree",
+ "cent",
+ "sterling",
+ "section",
+ "bullet",
+ "paragraph",
+ "germandbls",
+ "registered",
+ "copyright",
+ "trademark",
+ "acute",
+ "dieresis",
+ "notequal",
+ "AE",
+ "Oslash",
+ "infinity",
+ "plusminus",
+ "lessequal",
+ "greaterequal",
+ "yen",
+ "mu",
+ "partialdiff",
+ "summation",
+ "product",
+ "pi",
+ "integral",
+ "ordfeminine",
+ "ordmasculine",
+ "Omega",
+ "ae",
+ "oslash",
+ "questiondown",
+ "exclamdown",
+ "logicalnot",
+ "radical",
+ "florin",
+ "approxequal",
+ "Delta",
+ "guillemotleft",
+ "guillemotright",
+ "ellipsis",
+ "space",
+ "Agrave",
+ "Atilde",
+ "Otilde",
+ "OE",
+ "oe",
+ "endash",
+ "emdash",
+ "quotedblleft",
+ "quotedblright",
+ "quoteleft",
+ "quoteright",
+ "divide",
+ "lozenge",
+ "ydieresis",
+ "Ydieresis",
+ "fraction",
+ "currency",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "daggerdbl",
+ "periodcentered",
+ "quotesinglbase",
+ "quotedblbase",
+ "perthousand",
+ "Acircumflex",
+ "Ecircumflex",
+ "Aacute",
+ "Edieresis",
+ "Egrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Igrave",
+ "Oacute",
+ "Ocircumflex",
+ "apple",
+ "Ograve",
+ "Uacute",
+ "Ucircumflex",
+ "Ugrave",
+ "dotlessi",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "ring",
+ "cedilla",
+ "hungarumlaut",
+ "ogonek",
+ "caron"
+};
+
+char *macExpertEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ "centoldstyle",
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "comma",
+ "hyphen",
+ "period",
+ "fraction",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "colon",
+ "semicolon",
+ NULL,
+ "threequartersemdash",
+ NULL,
+ "questionsmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Ethsmall",
+ NULL,
+ NULL,
+ "onequarter",
+ "onehalf",
+ "threequarters",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "ff",
+ "fi",
+ "fl",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ NULL,
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hypheninferior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ NULL,
+ NULL,
+ "asuperior",
+ "centsuperior",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Aacutesmall",
+ "Agravesmall",
+ "Acircumflexsmall",
+ "Adieresissmall",
+ "Atildesmall",
+ "Aringsmall",
+ "Ccedillasmall",
+ "Eacutesmall",
+ "Egravesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Iacutesmall",
+ "Igravesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ntildesmall",
+ "Oacutesmall",
+ "Ogravesmall",
+ "Ocircumflexsmall",
+ "Odieresissmall",
+ "Otildesmall",
+ "Uacutesmall",
+ "Ugravesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ NULL,
+ "eightsuperior",
+ "fourinferior",
+ "threeinferior",
+ "sixinferior",
+ "eightinferior",
+ "seveninferior",
+ "Scaronsmall",
+ NULL,
+ "centinferior",
+ "twoinferior",
+ NULL,
+ "Dieresissmall",
+ NULL,
+ "Caronsmall",
+ "osuperior",
+ "fiveinferior",
+ NULL,
+ "commainferior",
+ "periodinferior",
+ "Yacutesmall",
+ NULL,
+ "dollarinferior",
+ NULL,
+ NULL,
+ "Thornsmall",
+ NULL,
+ "nineinferior",
+ "zeroinferior",
+ "Zcaronsmall",
+ "AEsmall",
+ "Oslashsmall",
+ "questiondownsmall",
+ "oneinferior",
+ "Lslashsmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Cedillasmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "OEsmall",
+ "figuredash",
+ "hyphensuperior",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "exclamdownsmall",
+ NULL,
+ "Ydieresissmall",
+ NULL,
+ "onesuperior",
+ "twosuperior",
+ "threesuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "ninesuperior",
+ "zerosuperior",
+ NULL,
+ "esuperior",
+ "rsuperior",
+ "tsuperior",
+ NULL,
+ NULL,
+ "isuperior",
+ "ssuperior",
+ "dsuperior",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "lsuperior",
+ "Ogoneksmall",
+ "Brevesmall",
+ "Macronsmall",
+ "bsuperior",
+ "nsuperior",
+ "msuperior",
+ "commasuperior",
+ "periodsuperior",
+ "Dotaccentsmall",
+ "Ringsmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+char *winAnsiEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quotesingle",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "grave",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "bullet",
+ "Euro",
+ "bullet",
+ "quotesinglbase",
+ "florin",
+ "quotedblbase",
+ "ellipsis",
+ "dagger",
+ "daggerdbl",
+ "circumflex",
+ "perthousand",
+ "Scaron",
+ "guilsinglleft",
+ "OE",
+ "bullet",
+ "Zcaron",
+ "bullet",
+ "bullet",
+ "quoteleft",
+ "quoteright",
+ "quotedblleft",
+ "quotedblright",
+ "bullet",
+ "endash",
+ "emdash",
+ "tilde",
+ "trademark",
+ "scaron",
+ "guilsinglright",
+ "oe",
+ "bullet",
+ "zcaron",
+ "Ydieresis",
+ "space",
+ "exclamdown",
+ "cent",
+ "sterling",
+ "currency",
+ "yen",
+ "brokenbar",
+ "section",
+ "dieresis",
+ "copyright",
+ "ordfeminine",
+ "guillemotleft",
+ "logicalnot",
+ "hyphen",
+ "registered",
+ "macron",
+ "degree",
+ "plusminus",
+ "twosuperior",
+ "threesuperior",
+ "acute",
+ "mu",
+ "paragraph",
+ "periodcentered",
+ "cedilla",
+ "onesuperior",
+ "ordmasculine",
+ "guillemotright",
+ "onequarter",
+ "onehalf",
+ "threequarters",
+ "questiondown",
+ "Agrave",
+ "Aacute",
+ "Acircumflex",
+ "Atilde",
+ "Adieresis",
+ "Aring",
+ "AE",
+ "Ccedilla",
+ "Egrave",
+ "Eacute",
+ "Ecircumflex",
+ "Edieresis",
+ "Igrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Eth",
+ "Ntilde",
+ "Ograve",
+ "Oacute",
+ "Ocircumflex",
+ "Otilde",
+ "Odieresis",
+ "multiply",
+ "Oslash",
+ "Ugrave",
+ "Uacute",
+ "Ucircumflex",
+ "Udieresis",
+ "Yacute",
+ "Thorn",
+ "germandbls",
+ "agrave",
+ "aacute",
+ "acircumflex",
+ "atilde",
+ "adieresis",
+ "aring",
+ "ae",
+ "ccedilla",
+ "egrave",
+ "eacute",
+ "ecircumflex",
+ "edieresis",
+ "igrave",
+ "iacute",
+ "icircumflex",
+ "idieresis",
+ "eth",
+ "ntilde",
+ "ograve",
+ "oacute",
+ "ocircumflex",
+ "otilde",
+ "odieresis",
+ "divide",
+ "oslash",
+ "ugrave",
+ "uacute",
+ "ucircumflex",
+ "udieresis",
+ "yacute",
+ "thorn",
+ "ydieresis"
+};
+
+char *standardEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ NULL,
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ NULL,
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ NULL,
+ "questiondown",
+ NULL,
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ NULL,
+ "ring",
+ "cedilla",
+ NULL,
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "AE",
+ NULL,
+ "ordfeminine",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "ae",
+ NULL,
+ NULL,
+ NULL,
+ "dotlessi",
+ NULL,
+ NULL,
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+char *expertEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ NULL,
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "comma",
+ "hyphen",
+ "period",
+ "fraction",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "colon",
+ "semicolon",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ NULL,
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ NULL,
+ NULL,
+ NULL,
+ "isuperior",
+ NULL,
+ NULL,
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ NULL,
+ NULL,
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ NULL,
+ "ff",
+ "fi",
+ "fl",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ NULL,
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ NULL,
+ NULL,
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ NULL,
+ "Dotaccentsmall",
+ NULL,
+ NULL,
+ "Macronsmall",
+ NULL,
+ NULL,
+ "figuredash",
+ "hypheninferior",
+ NULL,
+ NULL,
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ NULL,
+ NULL,
+ NULL,
+ "onequarter",
+ "onehalf",
+ "threequarters",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ NULL,
+ NULL,
+ "zerosuperior",
+ "onesuperior",
+ "twosuperior",
+ "threesuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall"
+};
+
+char *symbolEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "exclam",
+ "universal",
+ "numbersign",
+ "existential",
+ "percent",
+ "ampersand",
+ "suchthat",
+ "parenleft",
+ "parenright",
+ "asteriskmath",
+ "plus",
+ "comma",
+ "minus",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "congruent",
+ "Alpha",
+ "Beta",
+ "Chi",
+ "Delta",
+ "Epsilon",
+ "Phi",
+ "Gamma",
+ "Eta",
+ "Iota",
+ "theta1",
+ "Kappa",
+ "Lambda",
+ "Mu",
+ "Nu",
+ "Omicron",
+ "Pi",
+ "Theta",
+ "Rho",
+ "Sigma",
+ "Tau",
+ "Upsilon",
+ "sigma1",
+ "Omega",
+ "Xi",
+ "Psi",
+ "Zeta",
+ "bracketleft",
+ "therefore",
+ "bracketright",
+ "perpendicular",
+ "underscore",
+ "radicalex",
+ "alpha",
+ "beta",
+ "chi",
+ "delta",
+ "epsilon",
+ "phi",
+ "gamma",
+ "eta",
+ "iota",
+ "phi1",
+ "kappa",
+ "lambda",
+ "mu",
+ "nu",
+ "omicron",
+ "pi",
+ "theta",
+ "rho",
+ "sigma",
+ "tau",
+ "upsilon",
+ "omega1",
+ "omega",
+ "xi",
+ "psi",
+ "zeta",
+ "braceleft",
+ "bar",
+ "braceright",
+ "similar",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "Upsilon1",
+ "minute",
+ "lessequal",
+ "fraction",
+ "infinity",
+ "florin",
+ "club",
+ "diamond",
+ "heart",
+ "spade",
+ "arrowboth",
+ "arrowleft",
+ "arrowup",
+ "arrowright",
+ "arrowdown",
+ "degree",
+ "plusminus",
+ "second",
+ "greaterequal",
+ "multiply",
+ "proportional",
+ "partialdiff",
+ "bullet",
+ "divide",
+ "notequal",
+ "equivalence",
+ "approxequal",
+ "ellipsis",
+ "arrowvertex",
+ "arrowhorizex",
+ "carriagereturn",
+ "aleph",
+ "Ifraktur",
+ "Rfraktur",
+ "weierstrass",
+ "circlemultiply",
+ "circleplus",
+ "emptyset",
+ "intersection",
+ "union",
+ "propersuperset",
+ "reflexsuperset",
+ "notsubset",
+ "propersubset",
+ "reflexsubset",
+ "element",
+ "notelement",
+ "angle",
+ "gradient",
+ "registerserif",
+ "copyrightserif",
+ "trademarkserif",
+ "product",
+ "radical",
+ "dotmath",
+ "logicalnot",
+ "logicaland",
+ "logicalor",
+ "arrowdblboth",
+ "arrowdblleft",
+ "arrowdblup",
+ "arrowdblright",
+ "arrowdbldown",
+ "lozenge",
+ "angleleft",
+ "registersans",
+ "copyrightsans",
+ "trademarksans",
+ "summation",
+ "parenlefttp",
+ "parenleftex",
+ "parenleftbt",
+ "bracketlefttp",
+ "bracketleftex",
+ "bracketleftbt",
+ "bracelefttp",
+ "braceleftmid",
+ "braceleftbt",
+ "braceex",
+ NULL,
+ "angleright",
+ "integral",
+ "integraltp",
+ "integralex",
+ "integralbt",
+ "parenrighttp",
+ "parenrightex",
+ "parenrightbt",
+ "bracketrighttp",
+ "bracketrightex",
+ "bracketrightbt",
+ "bracerighttp",
+ "bracerightmid",
+ "bracerightbt",
+ NULL
+};
+
+char *zapfDingbatsEncoding[256] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "space",
+ "a1",
+ "a2",
+ "a202",
+ "a3",
+ "a4",
+ "a5",
+ "a119",
+ "a118",
+ "a117",
+ "a11",
+ "a12",
+ "a13",
+ "a14",
+ "a15",
+ "a16",
+ "a105",
+ "a17",
+ "a18",
+ "a19",
+ "a20",
+ "a21",
+ "a22",
+ "a23",
+ "a24",
+ "a25",
+ "a26",
+ "a27",
+ "a28",
+ "a6",
+ "a7",
+ "a8",
+ "a9",
+ "a10",
+ "a29",
+ "a30",
+ "a31",
+ "a32",
+ "a33",
+ "a34",
+ "a35",
+ "a36",
+ "a37",
+ "a38",
+ "a39",
+ "a40",
+ "a41",
+ "a42",
+ "a43",
+ "a44",
+ "a45",
+ "a46",
+ "a47",
+ "a48",
+ "a49",
+ "a50",
+ "a51",
+ "a52",
+ "a53",
+ "a54",
+ "a55",
+ "a56",
+ "a57",
+ "a58",
+ "a59",
+ "a60",
+ "a61",
+ "a62",
+ "a63",
+ "a64",
+ "a65",
+ "a66",
+ "a67",
+ "a68",
+ "a69",
+ "a70",
+ "a71",
+ "a72",
+ "a73",
+ "a74",
+ "a203",
+ "a75",
+ "a204",
+ "a76",
+ "a77",
+ "a78",
+ "a79",
+ "a81",
+ "a82",
+ "a83",
+ "a84",
+ "a97",
+ "a98",
+ "a99",
+ "a100",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "a101",
+ "a102",
+ "a103",
+ "a104",
+ "a106",
+ "a107",
+ "a108",
+ "a112",
+ "a111",
+ "a110",
+ "a109",
+ "a120",
+ "a121",
+ "a122",
+ "a123",
+ "a124",
+ "a125",
+ "a126",
+ "a127",
+ "a128",
+ "a129",
+ "a130",
+ "a131",
+ "a132",
+ "a133",
+ "a134",
+ "a135",
+ "a136",
+ "a137",
+ "a138",
+ "a139",
+ "a140",
+ "a141",
+ "a142",
+ "a143",
+ "a144",
+ "a145",
+ "a146",
+ "a147",
+ "a148",
+ "a149",
+ "a150",
+ "a151",
+ "a152",
+ "a153",
+ "a154",
+ "a155",
+ "a156",
+ "a157",
+ "a158",
+ "a159",
+ "a160",
+ "a161",
+ "a163",
+ "a164",
+ "a196",
+ "a165",
+ "a192",
+ "a166",
+ "a167",
+ "a168",
+ "a169",
+ "a170",
+ "a171",
+ "a172",
+ "a173",
+ "a162",
+ "a174",
+ "a175",
+ "a176",
+ "a177",
+ "a178",
+ "a179",
+ "a193",
+ "a180",
+ "a199",
+ "a181",
+ "a200",
+ "a182",
+ NULL,
+ "a201",
+ "a183",
+ "a184",
+ "a197",
+ "a185",
+ "a194",
+ "a198",
+ "a186",
+ "a195",
+ "a187",
+ "a188",
+ "a189",
+ "a190",
+ "a191",
+ NULL
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.h
new file mode 100644
index 00000000000..8b0a1e7e993
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontEncodingTables.h
@@ -0,0 +1,20 @@
+//========================================================================
+//
+// FontEncodingTables.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FONTENCODINGTABLES_H
+#define FONTENCODINGTABLES_H
+
+extern char *macRomanEncoding[];
+extern char *macExpertEncoding[];
+extern char *winAnsiEncoding[];
+extern char *standardEncoding[];
+extern char *expertEncoding[];
+extern char *symbolEncoding[];
+extern char *zapfDingbatsEncoding[];
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.cc
new file mode 100644
index 00000000000..0037e071c73
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.cc
@@ -0,0 +1,262 @@
+//========================================================================
+//
+// FontInfo.cc
+//
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2006 Kouhei Sutou <kou@cozmixng.org>
+// Copyright (C) 2009 Pino Toscano <pino@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+//========================================================================
+//
+// Based on code from pdffonts.cc
+//
+// Copyright 2001-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <math.h>
+#include "GlobalParams.h"
+#include "Error.h"
+#include "Object.h"
+#include "Dict.h"
+#include "GfxFont.h"
+#include "Annot.h"
+#include "PDFDoc.h"
+#include "FontInfo.h"
+
+FontInfoScanner::FontInfoScanner(PDFDoc *docA, int firstPage) {
+ doc = docA;
+ currentPage = firstPage + 1;
+ fonts = NULL;
+ fontsLen = fontsSize = 0;
+ visitedXObjects = NULL;
+ visitedXObjectsLen = visitedXObjectsSize = 0;
+}
+
+FontInfoScanner::~FontInfoScanner() {
+ gfree(fonts);
+ gfree(visitedXObjects);
+}
+
+GooList *FontInfoScanner::scan(int nPages) {
+ GooList *result;
+ Page *page;
+ Dict *resDict;
+ Annots *annots;
+ Object obj1, obj2;
+ int lastPage;
+
+ if (currentPage > doc->getNumPages()) {
+ return NULL;
+ }
+
+ result = new GooList();
+
+ lastPage = currentPage + nPages;
+ if (lastPage > doc->getNumPages() + 1) {
+ lastPage = doc->getNumPages() + 1;
+ }
+
+ for (int pg = currentPage; pg < lastPage; ++pg) {
+ page = doc->getCatalog()->getPage(pg);
+ if ((resDict = page->getResourceDict())) {
+ scanFonts(resDict, result);
+ }
+ annots = new Annots(doc->getXRef(), doc->getCatalog(), page->getAnnots(&obj1));
+ obj1.free();
+ for (int i = 0; i < annots->getNumAnnots(); ++i) {
+ if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
+ obj1.streamGetDict()->lookup("Resources", &obj2);
+ if (obj2.isDict()) {
+ scanFonts(obj2.getDict(), result);
+ }
+ obj2.free();
+ }
+ obj1.free();
+ }
+ delete annots;
+ }
+
+ currentPage = lastPage;
+
+ return result;
+}
+
+void FontInfoScanner::scanFonts(Dict *resDict, GooList *fontsList) {
+ Object obj1, obj2, xObjDict, xObj, xObj2, resObj;
+ Ref r;
+ GfxFontDict *gfxFontDict;
+ GfxFont *font;
+ int i;
+
+ // scan the fonts in this resource dictionary
+ gfxFontDict = NULL;
+ resDict->lookupNF("Font", &obj1);
+ if (obj1.isRef()) {
+ obj1.fetch(doc->getXRef(), &obj2);
+ if (obj2.isDict()) {
+ r = obj1.getRef();
+ gfxFontDict = new GfxFontDict(doc->getXRef(), &r, obj2.getDict());
+ }
+ obj2.free();
+ } else if (obj1.isDict()) {
+ gfxFontDict = new GfxFontDict(doc->getXRef(), NULL, obj1.getDict());
+ }
+ if (gfxFontDict) {
+ for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
+ int k;
+ if ((font = gfxFontDict->getFont(i))) {
+ Ref fontRef = *font->getID();
+ GBool alreadySeen = gFalse;
+
+ // check for an already-seen font
+ for (k = 0; k < fontsLen; ++k) {
+ if (fontRef.num == fonts[k].num && fontRef.gen == fonts[k].gen) {
+ alreadySeen = gTrue;
+ }
+ }
+
+ // add this font to the list
+ if (!alreadySeen) {
+ fontsList->append(new FontInfo(font, doc));
+ if (fontsLen == fontsSize) {
+ fontsSize += 32;
+ fonts = (Ref *)grealloc(fonts, fontsSize * sizeof(Ref));
+ }
+ fonts[fontsLen++] = *font->getID();
+ }
+ }
+ }
+ delete gfxFontDict;
+ }
+ obj1.free();
+
+ // recursively scan any resource dictionaries in objects in this
+ // resource dictionary
+ resDict->lookup("XObject", &xObjDict);
+ if (xObjDict.isDict()) {
+ for (i = 0; i < xObjDict.dictGetLength(); ++i) {
+ xObjDict.dictGetValNF(i, &xObj);
+ if (xObj.isRef()) {
+ GBool alreadySeen = gFalse;
+ // check for an already-seen XObject
+ for (int k = 0; k < visitedXObjectsLen; ++k) {
+ if (xObj.getRef().num == visitedXObjects[k].num &&
+ xObj.getRef().gen == visitedXObjects[k].gen) {
+ alreadySeen = gTrue;
+ }
+ }
+
+ if (alreadySeen) {
+ xObj.free();
+ continue;
+ }
+
+ if (visitedXObjectsLen == visitedXObjectsSize) {
+ visitedXObjectsSize += 32;
+ visitedXObjects = (Ref *)grealloc(visitedXObjects, visitedXObjectsSize * sizeof(Ref));
+ }
+ visitedXObjects[visitedXObjectsLen++] = xObj.getRef();
+ }
+
+ xObj.fetch(doc->getXRef(), &xObj2);
+
+ if (xObj2.isStream()) {
+ xObj2.streamGetDict()->lookup("Resources", &resObj);
+ if (resObj.isDict() && resObj.getDict() != resDict) {
+ scanFonts(resObj.getDict(), fontsList);
+ }
+ resObj.free();
+ }
+ xObj.free();
+ xObj2.free();
+ }
+ }
+ xObjDict.free();
+}
+
+FontInfo::FontInfo(GfxFont *font, PDFDoc *doc) {
+ GooString *origName;
+ Object fontObj, toUnicodeObj;
+ int i;
+
+ fontRef = *font->getID();
+
+ // font name
+ origName = font->getOrigName();
+ if (origName != NULL) {
+ name = font->getOrigName()->copy();
+ } else {
+ name = NULL;
+ }
+
+ // font type
+ type = (FontInfo::Type)font->getType();
+
+ // check for an embedded font
+ if (font->getType() == fontType3) {
+ emb = gTrue;
+ } else {
+ emb = font->getEmbeddedFontID(&embRef);
+ }
+
+ if (!emb)
+ {
+ DisplayFontParam *dfp = globalParams->getDisplayFont(font);
+ if (dfp)
+ {
+ if (dfp->kind == displayFontT1) file = dfp->t1.fileName->copy();
+ else file = dfp->tt.fileName->copy();
+ }
+ else file = NULL;
+ }
+ else file = NULL;
+
+ // look for a ToUnicode map
+ hasToUnicode = gFalse;
+ if (doc->getXRef()->fetch(fontRef.num, fontRef.gen, &fontObj)->isDict()) {
+ hasToUnicode = fontObj.dictLookup("ToUnicode", &toUnicodeObj)->isStream();
+ toUnicodeObj.free();
+ }
+ fontObj.free();
+
+ // check for a font subset name: capital letters followed by a '+'
+ // sign
+ subset = gFalse;
+ if (name) {
+ for (i = 0; i < name->getLength(); ++i) {
+ if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') {
+ break;
+ }
+ }
+ subset = i > 0 && i < name->getLength() && name->getChar(i) == '+';
+ }
+}
+
+FontInfo::FontInfo(FontInfo& f) {
+ name = f.name ? f.name->copy() : NULL;
+ file = f.file ? f.file->copy() : NULL;
+ type = f.type;
+ emb = f.emb;
+ subset = f.subset;
+ hasToUnicode = f.hasToUnicode;
+ fontRef = f.fontRef;
+ embRef = f.embRef;
+}
+
+FontInfo::~FontInfo() {
+ delete name;
+ delete file;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.h
new file mode 100644
index 00000000000..79eafea4429
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/FontInfo.h
@@ -0,0 +1,98 @@
+//========================================================================
+//
+// FontInfo.h
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2009 Pino Toscano <pino@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+//========================================================================
+//
+// Based on code from pdffonts.cc
+//
+// Copyright 2001-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef FONT_INFO_H
+#define FONT_INFO_H
+
+#include "goo/gtypes.h"
+#include "goo/GooList.h"
+
+class FontInfo {
+public:
+ enum Type {
+ unknown,
+ Type1,
+ Type1C,
+ Type1COT,
+ Type3,
+ TrueType,
+ TrueTypeOT,
+ CIDType0,
+ CIDType0C,
+ CIDType0COT,
+ CIDTrueType,
+ CIDTrueTypeOT
+ };
+
+ // Constructor.
+ FontInfo(GfxFont *fontA, PDFDoc *doc);
+ // Copy constructor
+ FontInfo(FontInfo& f);
+ // Destructor.
+ ~FontInfo();
+
+ GooString *getName() { return name; };
+ GooString *getFile() { return file; };
+ Type getType() { return type; };
+ GBool getEmbedded() { return emb; };
+ GBool getSubset() { return subset; };
+ GBool getToUnicode() { return hasToUnicode; };
+ Ref getRef() { return fontRef; };
+ Ref getEmbRef() { return embRef; };
+
+private:
+ GooString *name;
+ GooString *file;
+ Type type;
+ GBool emb;
+ GBool subset;
+ GBool hasToUnicode;
+ Ref fontRef;
+ Ref embRef;
+};
+
+class FontInfoScanner {
+public:
+
+ // Constructor.
+ FontInfoScanner(PDFDoc *doc, int firstPage = 0);
+ // Destructor.
+ ~FontInfoScanner();
+
+ GooList *scan(int nPages);
+
+private:
+
+ PDFDoc *doc;
+ int currentPage;
+ Ref *fonts;
+ int fontsLen;
+ int fontsSize;
+
+ Ref *visitedXObjects;
+ int visitedXObjectsLen;
+ int visitedXObjectsSize;
+
+ void scanFonts(Dict *resDict, GooList *fontsList);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.cc
new file mode 100644
index 00000000000..7ccc96bf75c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.cc
@@ -0,0 +1,1293 @@
+//========================================================================
+//
+// Form.cc
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright 2006-2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright 2007-2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright 2007 Adrian Johnson <ajohnson@redneon.com>
+// Copyright 2007 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright 2008 Pino Toscano <pino@kde.org>
+// Copyright 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright 2009 Matthias Drochner <M.Drochner@fz-juelich.de>
+// Copyright 2009 KDAB via Guillermo Amaral <gamaral@amaral.com.mx>
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "Error.h"
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Form.h"
+#include "XRef.h"
+#include "PDFDocEncoding.h"
+#include "Annot.h"
+#include "Catalog.h"
+
+//return a newly allocated char* containing an UTF16BE string of size length
+char* pdfDocEncodingToUTF16 (GooString* orig, int* length)
+{
+ //double size, a unicode char takes 2 char, add 2 for the unicode marker
+ *length = 2+2*orig->getLength();
+ char *result = new char[(*length)];
+ char *cstring = orig->getCString();
+ //unicode marker
+ result[0] = 0xfe;
+ result[1] = 0xff;
+ //convert to utf16
+ for(int i=2,j=0; i<(*length); i+=2,j++) {
+ Unicode u = pdfDocEncoding[(unsigned int)((unsigned char)cstring[j])]&0xffff;
+ result[i] = (u >> 8) & 0xff;
+ result[i+1] = u & 0xff;
+ }
+ return result;
+}
+
+
+
+FormWidget::FormWidget(XRef *xrefA, Object *aobj, unsigned num, Ref aref, FormField *fieldA)
+{
+ Object obj1, obj2;
+ ref = aref;
+ double t;
+ ID = 0;
+ defaultsLoaded = gFalse;
+ fontSize = 0.0;
+ modified = gFalse;
+ childNum = num;
+ xref = xrefA;
+ aobj->copy(&obj);
+ type = formUndef;
+ field = fieldA;
+ Dict *dict = obj.getDict();
+
+ if (!dict->lookup("Rect", &obj1)->isArray()) {
+ error(-1, "Annotation rectangle is wrong type");
+ goto err2;
+ }
+ if (!obj1.arrayGet(0, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ x1 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(1, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ y1 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(2, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ x2 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(3, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ y2 = obj2.getNum();
+ obj2.free();
+ obj1.free();
+ //swap coords if needed
+ if (x1 > x2) {
+ t = x1;
+ x1 = x2;
+ x2 = t;
+ }
+ if (y1 > y2) {
+ t = y1;
+ y1 = y2;
+ y2 = t;
+ }
+
+ err1:
+ obj2.free();
+ err2:
+ obj1.free();
+}
+
+FormWidget::~FormWidget()
+{
+ obj.free ();
+}
+
+bool FormWidget::isReadOnly() const
+{
+ return field->isReadOnly();
+}
+
+int FormWidget::encodeID (unsigned pageNum, unsigned fieldNum)
+{
+ return (pageNum << 4*sizeof(unsigned)) + fieldNum;
+}
+
+void FormWidget::decodeID (unsigned id, unsigned* pageNum, unsigned* fieldNum)
+{
+ *pageNum = id >> 4*sizeof(unsigned);
+ *fieldNum = (id << 4*sizeof(unsigned)) >> 4*sizeof(unsigned);
+}
+
+void FormWidget::updateField (const char *key, Object *value)
+{
+ Object *obj1;
+ Ref ref1;
+ Object obj2;
+
+ if (obj.getDict()->lookup ("FT", &obj2)->isName ()) {
+ // It's a composed (annot + field) dict
+ obj1 = &obj;
+ ref1 = ref;
+ } else {
+ // It's an annot dict, we have to modify the Field (parent) dict
+ obj1 = field->getObj ();
+ ref1 = field->getRef ();
+ }
+ obj2.free ();
+
+ obj1->getDict ()->set (const_cast<char*>(key), value);
+ //notify the xref about the update
+ xref->setModifiedObject(obj1, ref1);
+}
+
+FormWidgetButton::FormWidgetButton (XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) :
+ FormWidget(xrefA, aobj, num, ref, p)
+{
+ type = formButton;
+ parent = static_cast<FormFieldButton*>(field);
+ onStr = NULL;
+ state = gFalse;
+ siblingsID = NULL;
+ numSiblingsID = 0;
+}
+
+FormWidgetButton::~FormWidgetButton ()
+{
+ if (siblingsID)
+ gfree(siblingsID);
+ delete onStr;
+}
+
+FormButtonType FormWidgetButton::getButtonType () const
+{
+ return parent->getButtonType ();
+}
+
+void FormWidgetButton::setState (GBool astate, GBool calledByParent)
+{
+ //pushButtons don't have state
+ if (parent->getButtonType() == formButtonPush)
+ return;
+ //the state modification may be denied by the parent. e.g we don't want to let the user put all combo boxes to false
+ if (!calledByParent) { //avoid infinite recursion
+ modified = gTrue;
+ if (!parent->setState(childNum, astate)) {
+ return;
+ }
+ }
+ state = astate;
+
+ //update appearance
+ char *offStr = "Off";
+ Object obj1;
+ obj1.initName(state?getOnStr():offStr);
+ updateField ("V", &obj1);
+
+ obj1.initName(state?getOnStr():offStr);
+ //modify the Appearance State entry as well
+ obj.getDict()->set("AS", &obj1);
+ //notify the xref about the update
+ xref->setModifiedObject(&obj, ref);
+}
+
+void FormWidgetButton::loadDefaults ()
+{
+ if (defaultsLoaded)
+ return;
+
+ defaultsLoaded = gTrue;
+
+ Dict *dict = obj.getDict();
+ Object obj1;
+
+ //pushButtons don't have state
+ if (parent->getButtonType() != formButtonPush ){
+ //find the name of the state in the AP dictionnary (/Yes, /Off)
+ //The reference say the Off state, if it existe, _must_ be stored in the AP dict under the name /Off
+ //The "on" state may be stored under any other name
+ if (dict->lookup("AP", &obj1)->isDict()) {
+ Dict *tmpDict = obj1.getDict();
+ int length = tmpDict->getLength();
+ for(int i=0; i<length; i++) {
+ Object obj2;
+ tmpDict->getVal(i, &obj2);
+ if (obj2.isDict()) {
+ Dict *tmpDict2 = obj2.getDict();
+ int length2 = tmpDict2->getLength();
+ for(int j=0; j<length2; j++) {
+ Object obj3;
+ tmpDict2->getVal(j, &obj3);
+ char *key = tmpDict2->getKey(j);
+ if(strcmp(key, "Off")) { //if we don't have Off, we have the name of the "on" state
+ onStr = new GooString (key);
+ }
+ obj3.free();
+ if (onStr)
+ break;
+ }
+ } else if (obj2.isStream()) {
+ // TODO do something with str and obj3
+ Stream *str = obj2.getStream();
+ Dict *tmpDict2 = str->getDict();
+ Object obj3;
+ tmpDict2->lookup("Length", &obj3);
+ onStr = new GooString ("D");
+ obj3.free();
+ }
+ obj2.free();
+ if (onStr)
+ break;
+ }
+ }
+ obj1.free();
+
+ //We didn't found the "on" state for the button
+ if (!onStr) {
+ error(-1, "FormWidgetButton:: unable to find the on state for the button\n");
+ onStr = new GooString(""); // TODO is this the best solution?
+ }
+ }
+
+ if (Form::fieldLookup(dict, "V", &obj1)->isName()) {
+ Object obj2;
+ if (dict->lookup("AS", &obj2)->isName(obj1.getName())) {
+ if (strcmp (obj1.getName(), "Off") != 0) {
+ setState(gTrue);
+ }
+ }
+ obj2.free();
+ } else if (obj1.isArray()) { //handle the case where we have multiple choices
+ error(-1, "FormWidgetButton:: multiple choice isn't supported yet\n");
+ }
+ obj1.free();
+}
+
+GBool FormWidgetButton::getState ()
+{
+ return state;
+}
+
+void FormWidgetButton::setNumSiblingsID (int i)
+{
+ numSiblingsID = i;
+ siblingsID = (unsigned*)greallocn(siblingsID, numSiblingsID, sizeof(unsigned));
+}
+
+
+FormWidgetText::FormWidgetText (XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) :
+ FormWidget(xrefA, aobj, num, ref, p)
+{
+ type = formText;
+ parent = static_cast<FormFieldText*>(field);
+}
+
+void FormWidgetText::loadDefaults ()
+{
+ if (defaultsLoaded)
+ return;
+
+ defaultsLoaded = gTrue;
+
+ Dict *dict = obj.getDict();
+ Object obj1;
+
+ if (Form::fieldLookup(dict, "V", &obj1)->isString()) {
+ if (obj1.getString()->hasUnicodeMarker()) {
+ if (obj1.getString()->getLength() <= 2) {
+ } else {
+ parent->setContentCopy(obj1.getString());
+ }
+ } else {
+ if (obj1.getString()->getLength() > 0) {
+ //non-unicode string -- assume pdfDocEncoding and try to convert to UTF16BE
+ int tmp_length;
+ char* tmp_str = pdfDocEncodingToUTF16(obj1.getString(), &tmp_length);
+ GooString* str1 = new GooString(tmp_str, tmp_length);
+ parent->setContentCopy(str1);
+ delete str1;
+ delete []tmp_str;
+ }
+ }
+ }
+ obj1.free();
+
+}
+
+GooString* FormWidgetText::getContent ()
+{
+ return parent->getContent();
+}
+
+GooString* FormWidgetText::getContentCopy ()
+{
+ return parent->getContentCopy();
+}
+
+bool FormWidgetText::isMultiline () const
+{
+ return parent->isMultiline();
+}
+
+bool FormWidgetText::isPassword () const
+{
+ return parent->isPassword();
+}
+
+bool FormWidgetText::isFileSelect () const
+{
+ return parent->isFileSelect();
+}
+
+bool FormWidgetText::noSpellCheck () const
+{
+ return parent->noSpellCheck();
+}
+
+bool FormWidgetText::noScroll () const
+{
+ return parent->noScroll();
+}
+
+bool FormWidgetText::isComb () const
+{
+ return parent->isComb();
+}
+
+bool FormWidgetText::isRichText () const
+{
+ return parent->isRichText();
+}
+
+int FormWidgetText::getMaxLen () const
+{
+ return parent->getMaxLen ();
+}
+
+void FormWidgetText::setContent(GooString* new_content)
+{
+ if (isReadOnly()) {
+ error(-1, "FormWidgetText::setContentCopy called on a read only field\n");
+ return;
+ }
+
+ modified = gTrue;
+ if (new_content == NULL) {
+ parent->setContentCopy(NULL);
+ } else {
+ //append the unicode marker <FE FF> if needed
+ if (!new_content->hasUnicodeMarker()) {
+ new_content->insert(0, 0xff);
+ new_content->insert(0, 0xfe);
+ }
+
+ GooString *cont = new GooString(new_content);
+ parent->setContentCopy(cont);
+
+ Object obj1;
+ obj1.initString(cont);
+ updateField ("V", &obj1);
+ }
+}
+
+FormWidgetChoice::FormWidgetChoice(XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) :
+ FormWidget(xrefA, aobj, num, ref, p)
+{
+ type = formChoice;
+ parent = static_cast<FormFieldChoice*>(field);
+}
+
+void FormWidgetChoice::loadDefaults ()
+{
+ if (defaultsLoaded)
+ return;
+
+ defaultsLoaded = gTrue;
+
+ Dict *dict = obj.getDict();
+ Object obj1;
+ if (dict->lookup("Opt", &obj1)->isArray()) {
+ Object obj2;
+ parent->_setNumChoices(obj1.arrayGetLength());
+ parent->_createChoicesTab();
+ for(int i=0; i<parent->getNumChoices(); i++) {
+ obj1.arrayGet(i, &obj2);
+ if(obj2.isString()) {
+ parent->_setChoiceExportVal(i, obj2.getString()->copy());
+ parent->_setChoiceOptionName(i, obj2.getString()->copy());
+ } else if (obj2.isArray()) { // [Export_value, Displayed_text]
+ Object obj3,obj4;
+ if (obj2.arrayGetLength() < 2) {
+ error(-1, "FormWidgetChoice:: invalid Opt entry -- array's length < 2\n");
+ parent->_setChoiceExportVal(i, new GooString(""));
+ parent->_setChoiceOptionName(i, new GooString(""));
+ continue;
+ }
+ obj2.arrayGet(0, &obj3);
+ obj2.arrayGet(1, &obj4);
+ parent->_setChoiceExportVal(i, obj3.getString()->copy());
+ parent->_setChoiceOptionName(i, obj4.getString()->copy());
+ obj3.free();
+ obj4.free();
+ } else {
+ error(-1, "FormWidgetChoice:: invalid %d Opt entry\n", i);
+ parent->_setChoiceExportVal(i, new GooString(""));
+ parent->_setChoiceOptionName(i, new GooString(""));
+ }
+ obj2.free();
+ }
+ } else {
+ //empty choice
+ }
+ obj1.free();
+
+ bool* tmpCurrentChoice = new bool[parent->getNumChoices()];
+ memset(tmpCurrentChoice, 0, sizeof(bool)*parent->getNumChoices());
+
+ //find default choice
+ if (Form::fieldLookup(dict, "V", &obj1)->isString()) {
+ for(int i=0; i<parent->getNumChoices(); i++) {
+ if (parent->getChoice(i)->cmp(obj1.getString()) == 0) {
+ tmpCurrentChoice[i] = true;
+ break;
+ }
+ }
+ } else if (obj1.isArray()) {
+ for(int i=0; i<obj1.arrayGetLength(); i++) {
+ Object obj2;
+ obj1.arrayGet(i, &obj2);
+ for(int j=0; j<parent->getNumChoices(); j++) {
+ if (parent->getChoice(j)->cmp(obj2.getString()) == 0) {
+ tmpCurrentChoice[i] = true;
+ }
+ }
+
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ //convert choice's human readable strings to UTF16
+ //and update the /Opt dict entry to reflect this change
+#ifdef UPDATE_OPT
+ Object *objOpt = new Object();
+ objOpt->initArray(xref);
+#endif
+ for(int i=0; i<parent->getNumChoices(); i++) {
+ if (parent->getChoice(i)->hasUnicodeMarker()) { //string already in UTF16, do nothing
+
+ } else { //string in pdfdocencoding, convert to UTF16
+ int len;
+ char* buffer = pdfDocEncodingToUTF16(parent->getChoice(i), &len);
+ parent->getChoice(i)->Set(buffer, len);
+ delete [] buffer;
+ }
+ #ifdef UPDATE_OPT
+ Object *obj2 = new Object();
+ obj2->initString(choices[i]);
+ objOpt->getArray()->add(obj2);
+ #endif
+ }
+ //set default choice now that we have UTF16 strings
+ for (int i=0; i<parent->getNumChoices(); i++) {
+ if (tmpCurrentChoice[i])
+ parent->select(i);
+ }
+#ifdef UPDATE_OPT
+ updateField ("Opt", objOpt);
+#endif
+ delete [] tmpCurrentChoice;
+}
+
+FormWidgetChoice::~FormWidgetChoice()
+{
+}
+
+void FormWidgetChoice::_updateV ()
+{
+ Object obj1;
+ //this is an editable combo-box with user-entered text
+ if (hasEdit() && parent->getEditChoice()) {
+ obj1.initString(new GooString(parent->getEditChoice()));
+ } else {
+ int numSelected = parent->getNumSelected();
+ if (numSelected == 0) {
+ obj1.initString(new GooString(""));
+ } else if (numSelected == 1) {
+ for(int i=0; i<parent->getNumChoices(); i++) {
+ if (parent->isSelected(i)) {
+ obj1.initString(new GooString(parent->getChoice(i)));
+ break;
+ }
+ }
+ } else {
+ obj1.initArray(xref);
+ for(int i=0; i<parent->getNumChoices(); i++) {
+ if (parent->isSelected(i)) {
+ Object obj2;
+ obj2.initString(new GooString(parent->getChoice(i)));
+ obj1.arrayAdd(&obj2);
+ }
+ }
+ }
+ }
+ updateField ("V", &obj1);
+ modified = gTrue;
+}
+
+bool FormWidgetChoice::_checkRange (int i)
+{
+ if (i < 0 || i >= parent->getNumChoices()) {
+ error(-1, "FormWidgetChoice::_checkRange i out of range : %i", i);
+ return false;
+ }
+ return true;
+}
+
+void FormWidgetChoice::select (int i)
+{
+ if (isReadOnly()) {
+ error(-1, "FormWidgetChoice::select called on a read only field\n");
+ return;
+ }
+ if (!_checkRange(i)) return;
+ modified = gTrue;
+ parent->select(i);
+ _updateV();
+}
+
+void FormWidgetChoice::toggle (int i)
+{
+ if (isReadOnly()) {
+ error(-1, "FormWidgetChoice::toggle called on a read only field\n");
+ return;
+ }
+ if (!_checkRange(i)) return;
+ modified = gTrue;
+ parent->toggle(i);
+ _updateV();
+}
+
+void FormWidgetChoice::deselectAll ()
+{
+ if (isReadOnly()) {
+ error(-1, "FormWidgetChoice::deselectAll called on a read only field\n");
+ return;
+ }
+ modified = gTrue;
+ parent->deselectAll();
+ _updateV();
+}
+
+GooString* FormWidgetChoice::getEditChoice ()
+{
+ if (!hasEdit()) {
+ error(-1, "FormFieldChoice::getEditChoice called on a non-editable choice\n");
+ return NULL;
+ }
+ return parent->getEditChoice();
+}
+
+bool FormWidgetChoice::isSelected (int i)
+{
+ if (!_checkRange(i)) return false;
+ return parent->isSelected(i);
+}
+
+void FormWidgetChoice::setEditChoice (GooString* new_content)
+{
+ if (isReadOnly()) {
+ error(-1, "FormWidgetText::setEditChoice called on a read only field\n");
+ return;
+ }
+ if (!hasEdit()) {
+ error(-1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n");
+ return;
+ }
+
+ modified = gTrue;
+ if (new_content == NULL) {
+ parent->setEditChoice(NULL);
+ } else {
+ //append the unicode marker <FE FF> if needed
+ if (!new_content->hasUnicodeMarker()) {
+ new_content->insert(0, 0xff);
+ new_content->insert(0, 0xfe);
+ }
+ parent->setEditChoice(new_content);
+ }
+ _updateV();
+}
+
+int FormWidgetChoice::getNumChoices()
+{
+ return parent->getNumChoices();
+}
+
+GooString* FormWidgetChoice::getChoice(int i)
+{
+ return parent->getChoice(i);
+}
+
+bool FormWidgetChoice::isCombo () const
+{
+ return parent->isCombo();
+}
+
+bool FormWidgetChoice::hasEdit () const
+{
+ return parent->hasEdit();
+}
+
+bool FormWidgetChoice::isMultiSelect () const
+{
+ return parent->isMultiSelect();
+}
+
+bool FormWidgetChoice::noSpellCheck () const
+{
+ return parent->noSpellCheck();
+}
+
+bool FormWidgetChoice::commitOnSelChange () const
+{
+ return parent->commitOnSelChange();
+}
+
+bool FormWidgetChoice::isListBox () const
+{
+ return parent->isListBox();
+}
+
+FormWidgetSignature::FormWidgetSignature(XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) :
+ FormWidget(xrefA, aobj, num, ref, p)
+{
+ type = formSignature;
+ parent = static_cast<FormFieldSignature*>(field);
+}
+
+
+//========================================================================
+// FormField
+//========================================================================
+
+FormField::FormField(XRef* xrefA, Object *aobj, const Ref& aref, FormFieldType ty)
+{
+ xref = xrefA;
+ aobj->copy(&obj);
+ Dict* dict = obj.getDict();
+ ref.num = ref.gen = 0;
+ type = ty;
+ numChildren = 0;
+ children = NULL;
+ terminal = false;
+ widgets = NULL;
+ readOnly = false;
+ ref = aref;
+
+ Object obj1;
+ //childs
+ if (dict->lookup("Kids", &obj1)->isArray()) {
+ Array *array = obj1.getArray();
+ int length = array->getLength();
+ // Load children
+ for(int i=0; i<length; i++) {
+ Object obj2,obj3;
+ Object childRef;
+ array->get(i, &obj2);
+ array->getNF(i, &childRef);
+ if (!obj2.isDict ()) {
+ error (-1, "Reference to an invalid or non existant object");
+ continue;
+ }
+ //field child
+ if (dict->lookup ("FT", &obj3)->isName()) {
+ // If I'm not a generic container field and my children
+ // are widgets, create widgets for them
+ Object obj4;
+
+ if (obj2.dictLookup("Subtype",&obj4)->isName()) {
+ _createWidget(&obj2, childRef.getRef());
+ }
+ obj4.free();
+ } else if(obj2.dictLookup("FT", &obj3)->isName() || obj2.dictLookup("Kids", &obj3)->isArray()) {
+ if(terminal) error(-1, "Field can't have both Widget AND Field as kids\n");
+
+ numChildren++;
+ children = (FormField**)greallocn(children, numChildren, sizeof(FormField*));
+
+ obj3.free();
+ children[numChildren-1] = Form::createFieldFromDict (&obj2, xrefA, childRef.getRef());
+ }
+ // 1 - we will handle 'collapsed' fields (field + annot in the same dict)
+ // as if the annot was in the Kids array of the field
+ else if (obj2.dictLookup("Subtype",&obj3)->isName()) {
+ _createWidget(&obj2, childRef.getRef());
+ }
+ obj2.free();
+ obj3.free();
+ }
+ }
+ obj1.free();
+ // As said in 1, if this is a 'collapsed' field, behave like if we had a
+ // child annot
+ if (dict->lookup("Subtype", &obj1)->isName()) {
+ _createWidget(aobj, ref);
+ }
+ obj1.free();
+
+ //flags
+ if (Form::fieldLookup(dict, "Ff", &obj1)->isInt()) {
+ int flags = obj1.getInt();
+ if (flags & 0x1) { // 1 -> ReadOnly
+ readOnly = true;
+ }
+ if (flags & 0x2) { // 2 -> Required
+ //TODO
+ }
+ if (flags & 0x4) { // 3 -> NoExport
+ //TODO
+ }
+ }
+ obj1.free();
+}
+
+FormField::~FormField()
+{
+ if (!terminal) {
+ if(children) {
+ for (int i=0; i<numChildren; i++)
+ delete children[i];
+ gfree(children);
+ }
+ } else {
+ for (int i = 0; i < numChildren; ++i)
+ delete widgets[i];
+ gfree (widgets);
+ }
+ obj.free();
+}
+
+void FormField::loadChildrenDefaults ()
+{
+ if(!terminal) {
+ for(int i=0; i<numChildren; i++) {
+ children[i]->loadChildrenDefaults();
+ }
+ } else {
+ for (int i=0; i<numChildren; i++) {
+ widgets[i]->loadDefaults();
+ }
+ }
+}
+
+void FormField::fillChildrenSiblingsID()
+{
+ if(terminal) return;
+ for (int i=0; i<numChildren; i++) {
+ children[i]->fillChildrenSiblingsID();
+ }
+}
+
+
+void FormField::_createWidget (Object *obj, Ref aref)
+{
+ terminal = true;
+ numChildren++;
+ widgets = (FormWidget**)greallocn(widgets, numChildren, sizeof(FormWidget*));
+ //ID = index in "widgets" table
+ switch (type) {
+ case formButton:
+ widgets[numChildren-1] = new FormWidgetButton(xref, obj, numChildren-1, aref, this);
+ break;
+ case formText:
+ widgets[numChildren-1] = new FormWidgetText(xref, obj, numChildren-1, aref, this);
+ break;
+ case formChoice:
+ widgets[numChildren-1] = new FormWidgetChoice(xref, obj, numChildren-1, aref, this);
+ break;
+ case formSignature:
+ widgets[numChildren-1] = new FormWidgetSignature(xref, obj, numChildren-1, aref, this);
+ break;
+ default:
+ error(-1, "SubType on non-terminal field, invalid document?");
+ numChildren--;
+ terminal = false;
+ }
+}
+
+FormWidget* FormField::findWidgetByRef (Ref aref)
+{
+ if (terminal) {
+ for(int i=0; i<numChildren; i++) {
+ if (widgets[i]->getRef().num == aref.num
+ && widgets[i]->getRef().gen == aref.gen)
+ return widgets[i];
+ }
+ } else {
+ for(int i=0; i<numChildren; i++) {
+ FormWidget* result = children[i]->findWidgetByRef(aref);
+ if(result) return result;
+ }
+ }
+ return NULL;
+}
+
+
+//------------------------------------------------------------------------
+// FormFieldButton
+//------------------------------------------------------------------------
+FormFieldButton::FormFieldButton(XRef *xrefA, Object *aobj, const Ref& ref)
+ : FormField(xrefA, aobj, ref, formButton)
+{
+ Dict* dict = obj.getDict();
+ active_child = -1;
+ noAllOff = false;
+
+ Object obj1;
+ btype = formButtonCheck;
+ if (Form::fieldLookup(dict, "Ff", &obj1)->isInt()) {
+ int flags = obj1.getInt();
+
+ if (flags & 0x10000) { // 17 -> push button
+ btype = formButtonPush;
+ } else if (flags & 0x8000) { // 16 -> radio button
+ btype = formButtonRadio;
+ if (flags & 0x4000) { // 15 -> noToggleToOff
+ noAllOff = true;
+ }
+ }
+ if (flags & 0x1000000) { // 26 -> radiosInUnison
+ error(-1, "FormFieldButton:: radiosInUnison flag unimplemented, please report a bug with a testcase\n");
+ }
+ }
+}
+
+void FormFieldButton::fillChildrenSiblingsID()
+{
+ if (!terminal) {
+ for(int i=0; i<numChildren; i++) {
+ children[i]->fillChildrenSiblingsID();
+ }
+ } else {
+ for(int i=0; i<numChildren; i++) {
+ FormWidgetButton *btn = static_cast<FormWidgetButton*>(widgets[i]);
+ btn->setNumSiblingsID(numChildren-1);
+ for(int j=0, counter=0; j<numChildren; j++) {
+ if (i == j) continue;
+ btn->setSiblingsID(counter, widgets[j]->getID());
+ counter++;
+ }
+ }
+ }
+}
+
+GBool FormFieldButton::setState (int num, GBool s)
+{
+ if (readOnly) {
+ error(-1, "FormFieldButton::setState called on a readOnly field\n");
+ return gFalse;
+ }
+
+ // A check button could behave as a radio button
+ // when it's in a set of more than 1 buttons
+ if (btype == formButtonRadio || btype == formButtonCheck) {
+ if (!s && noAllOff)
+ return gFalse; //don't allow to set all radio to off
+
+ if (s == gTrue) {
+ active_child = num;
+ for(int i=0; i<numChildren; i++) {
+ if (i==active_child) continue;
+ static_cast<FormWidgetButton*>(widgets[i])->setState(gFalse, gTrue);
+ }
+
+ //The parent field's V entry holds a name object corresponding to the ap-
+ //pearance state of whichever child field is currently in the on state
+ if (active_child >= 0) {
+ FormWidgetButton* actChild = static_cast<FormWidgetButton*>(widgets[active_child]);
+ if (actChild->getOnStr()) {
+ Object obj1;
+ obj1.initName(actChild->getOnStr());
+ obj.getDict()->set("V", &obj1);
+ xref->setModifiedObject(&obj, ref);
+ }
+ }
+ } else {
+ active_child = -1;
+ Object obj1;
+ obj1.initName("Off");
+ obj.getDict()->set("V", &obj1);
+ xref->setModifiedObject(&obj, ref);
+ }
+ }
+ return gTrue;
+}
+
+FormFieldButton::~FormFieldButton()
+{
+}
+
+//------------------------------------------------------------------------
+// FormFieldText
+//------------------------------------------------------------------------
+FormFieldText::FormFieldText(XRef *xrefA, Object *aobj, const Ref& ref)
+ : FormField(xrefA, aobj, ref, formText)
+{
+ Dict* dict = obj.getDict();
+ Object obj1;
+ content = NULL;
+ multiline = password = fileSelect = doNotSpellCheck = doNotScroll = comb = richText = false;
+ maxLen = 0;
+
+ if (Form::fieldLookup(dict, "Ff", &obj1)->isInt()) {
+ int flags = obj1.getInt();
+ if (flags & 0x1000) // 13 -> Multiline
+ multiline = true;
+ if (flags & 0x2000) // 14 -> Password
+ password = true;
+ if (flags & 0x100000) // 21 -> FileSelect
+ fileSelect = true;
+ if (flags & 0x400000)// 23 -> DoNotSpellCheck
+ doNotSpellCheck = true;
+ if (flags & 0x800000) // 24 -> DoNotScroll
+ doNotScroll = true;
+ if (flags & 0x1000000) // 25 -> Comb
+ comb = true;
+ if (flags & 0x2000000)// 26 -> RichText
+ richText = true;
+ }
+ obj1.free();
+
+ if (Form::fieldLookup(dict, "MaxLen", &obj1)->isInt()) {
+ maxLen = obj1.getInt();
+ }
+ obj1.free();
+}
+
+GooString* FormFieldText::getContentCopy ()
+{
+ if (!content) return NULL;
+ return new GooString(*content);
+}
+
+void FormFieldText::setContentCopy (GooString* new_content)
+{
+ if(content) {
+ delete content;
+ }
+ content = new_content->copy();
+}
+
+FormFieldText::~FormFieldText()
+{
+ delete content;
+}
+
+
+//------------------------------------------------------------------------
+// FormFieldChoice
+//------------------------------------------------------------------------
+FormFieldChoice::FormFieldChoice(XRef *xrefA, Object *aobj, const Ref& ref)
+ : FormField(xrefA, aobj, ref, formChoice)
+{
+ numChoices = 0;
+ choices = NULL;
+ editedChoice = NULL;
+
+ Dict* dict = obj.getDict();
+ Object obj1;
+
+ combo = edit = multiselect = doNotSpellCheck = doCommitOnSelChange = false;
+
+ if (Form::fieldLookup(dict, "Ff", &obj1)->isInt()) {
+ int flags = obj1.getInt();
+ if (flags & 0x20000) // 18 -> Combo
+ combo = true;
+ if (flags & 0x40000) // 19 -> Edit
+ edit = true;
+ if (flags & 0x200000) // 22 -> MultiSelect
+ multiselect = true;
+ if (flags & 0x400000) // 23 -> DoNotSpellCheck
+ doNotSpellCheck = true;
+ if (flags & 0x4000000) // 27 -> CommitOnSelChange
+ doCommitOnSelChange = true;
+ }
+ obj1.free();
+
+}
+
+FormFieldChoice::~FormFieldChoice()
+{
+ for (int i=0; i<numChoices; i++) {
+ delete choices[i].exportVal;
+ delete choices[i].optionName;
+ }
+ delete [] choices;
+ delete editedChoice;
+}
+
+void FormFieldChoice::deselectAll ()
+{
+ for(int i=0; i<numChoices; i++) {
+ choices[i].selected = false;
+ }
+}
+
+void FormFieldChoice::toggle (int i)
+{
+ choices[i].selected = !choices[i].selected;
+}
+
+void FormFieldChoice::select (int i)
+{
+ if (!multiselect)
+ deselectAll();
+ choices[i].selected = true;
+}
+
+void FormFieldChoice::setEditChoice (GooString* new_content)
+{
+ if (editedChoice)
+ delete editedChoice;
+
+ deselectAll();
+
+ editedChoice = new_content->copy();
+}
+
+GooString* FormFieldChoice::getEditChoice ()
+{
+ return editedChoice;
+}
+
+int FormFieldChoice::getNumSelected ()
+{
+ int cnt = 0;
+ for(int i=0; i<numChoices; i++) {
+ if (choices[i].selected)
+ cnt++;
+ }
+ return cnt;
+}
+
+void FormFieldChoice::_createChoicesTab ()
+{
+ choices = new ChoiceOpt[numChoices];
+ for(int i=0; i<numChoices; i++) {
+ choices[i].selected = false;
+ }
+}
+
+//------------------------------------------------------------------------
+// FormFieldSignature
+//------------------------------------------------------------------------
+FormFieldSignature::FormFieldSignature(XRef *xrefA, Object *dict, const Ref& ref)
+ : FormField(xrefA, dict, ref, formSignature)
+{
+}
+
+FormFieldSignature::~FormFieldSignature()
+{
+
+}
+
+//------------------------------------------------------------------------
+// Form
+//------------------------------------------------------------------------
+
+Form::Form(XRef *xrefA, Object* acroFormA)
+{
+ Object obj1;
+
+ xref = xrefA;
+ acroForm = acroFormA;
+
+ size = 0;
+ numFields = 0;
+ rootFields = NULL;
+
+ acroForm->dictLookup("NeedAppearances", &obj1);
+ needAppearances = (obj1.isBool() && obj1.getBool());
+ obj1.free();
+
+ acroForm->dictLookup("Fields", &obj1);
+ if (obj1.isArray()) {
+ Array *array = obj1.getArray();
+ Object obj2;
+
+ for(int i=0; i<array->getLength(); i++) {
+ Object oref;
+ array->get(i, &obj2);
+ array->getNF(i, &oref);
+ if (!oref.isRef()) {
+ error(-1, "Direct object in rootFields");
+ obj2.free();
+ oref.free();
+ continue;
+ }
+
+ if (!obj2.isDict()) {
+ error(-1, "Reference in Fields array to an invalid or non existant object");
+ obj2.free();
+ oref.free();
+ continue;
+ }
+
+ if (numFields >= size) {
+ size += 16;
+ rootFields = (FormField**)greallocn(rootFields,size,sizeof(FormField*));
+ }
+
+ rootFields[numFields++] = createFieldFromDict (&obj2, xrefA, oref.getRef());
+
+ obj2.free();
+ oref.free();
+ }
+ } else {
+ error(-1, "Can't get Fields array\n");
+ }
+ obj1.free ();
+}
+
+Form::~Form() {
+ int i;
+ for(i = 0; i< numFields; ++i)
+ delete rootFields[i];
+ gfree (rootFields);
+}
+
+// Look up an inheritable field dictionary entry.
+Object *Form::fieldLookup(Dict *field, char *key, Object *obj) {
+ Dict *dict;
+ Object parent;
+
+ dict = field;
+ if (!dict->lookup(key, obj)->isNull()) {
+ return obj;
+ }
+ obj->free();
+ if (dict->lookup("Parent", &parent)->isDict()) {
+ fieldLookup(parent.getDict(), key, obj);
+ } else {
+ obj->initNull();
+ }
+ parent.free();
+ return obj;
+}
+
+FormField *Form::createFieldFromDict (Object* obj, XRef *xrefA, const Ref& pref)
+{
+ Object obj2;
+ FormField *field;
+
+ if (Form::fieldLookup(obj->getDict (), "FT", &obj2)->isName("Btn")) {
+ field = new FormFieldButton(xrefA, obj, pref);
+ } else if (obj2.isName("Tx")) {
+ field = new FormFieldText(xrefA, obj, pref);
+ } else if (obj2.isName("Ch")) {
+ field = new FormFieldChoice(xrefA, obj, pref);
+ } else if (obj2.isName("Sig")) {
+ field = new FormFieldSignature(xrefA, obj, pref);
+ } else { //we don't have an FT entry => non-terminal field
+ field = new FormField(xrefA, obj, pref);
+ }
+ obj2.free();
+
+ field->loadChildrenDefaults();
+
+ return field;
+}
+
+void Form::postWidgetsLoad ()
+{
+ for(int i=0; i<numFields; i++) {
+ rootFields[i]->fillChildrenSiblingsID();
+ }
+}
+
+FormWidget* Form::findWidgetByRef (Ref aref)
+{
+ for(int i=0; i<numFields; i++) {
+ FormWidget *result = rootFields[i]->findWidgetByRef(aref);
+ if(result) return result;
+ }
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+// FormPageWidgets
+//------------------------------------------------------------------------
+
+FormPageWidgets::FormPageWidgets (XRef *xrefA, Object* annots, unsigned int page, Form *form)
+{
+ Object obj1;
+ numWidgets = 0;
+ widgets = NULL;
+ xref = xrefA;
+ if (annots->isArray() && form) {
+ size = annots->arrayGetLength();
+ widgets = (FormWidget**)greallocn(widgets, size, sizeof(FormWidget*));
+
+ /* For each entry in the page 'Annots' dict, try to find
+ a matching form field */
+ for (int i = 0; i < size; ++i) {
+ if (!annots->arrayGetNF(i, &obj1)->isRef()) {
+ /* Since all entry in a form field's kid dict needs to be
+ indirect references, if this annot isn't indirect, it isn't
+ related to a form field */
+ obj1.free();
+ continue;
+ }
+ Ref r = obj1.getRef();
+
+ /* Try to find a form field which either has this Annot in its Kids entry
+ or is merged with this Annot */
+ FormWidget* tmp = form->findWidgetByRef(r);
+ if(tmp) {
+ // We've found a corresponding form field, link it
+ tmp->setID(FormWidget::encodeID(page, numWidgets));
+ widgets[numWidgets++] = tmp;
+ //create a temporary Annot to get the font size
+ Object obj2;
+ if (annots->arrayGet(i, &obj2)->isDict()) {
+ Annot *ann;
+
+ ann = new Annot(xref, obj2.getDict(), NULL);
+ tmp->setFontSize(ann->getFontSize());
+ delete ann;
+ }
+ obj2.free();
+ }
+
+ obj1.free();
+ }
+ }
+}
+
+FormPageWidgets::~FormPageWidgets()
+{
+ gfree (widgets);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.h
new file mode 100644
index 00000000000..35d66afc184
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Form.h
@@ -0,0 +1,480 @@
+//========================================================================
+//
+// Form.h
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright 2006 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright 2007, 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright 2007-2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#ifndef FORM_H
+#define FORM_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+#include "goo/GooVector.h"
+
+class GooString;
+class Array;
+class Dict;
+class Annot;
+class Catalog;
+
+enum FormFieldType {
+ formButton,
+ formText,
+ formChoice,
+ formSignature,
+ formUndef
+};
+
+enum FormButtonType {
+ formButtonCheck,
+ formButtonPush,
+ formButtonRadio
+};
+
+class Form;
+class FormField;
+class FormFieldButton;
+class FormFieldText;
+class FormFieldSignature;
+class FormFieldChoice;
+
+//------------------------------------------------------------------------
+// FormWidget
+// A FormWidget represents the graphical part of a field and is "attached"
+// to a page.
+//------------------------------------------------------------------------
+
+class FormWidget {
+public:
+ virtual ~FormWidget();
+
+ // see the description of FormField::LoadChildrenDefaults
+ virtual void loadDefaults () {}
+
+ // Check if point is inside the field bounding rect
+ GBool inRect(double x, double y)
+ { return x1 <= x && x <= x2 && y1 <= y && y <= y2; }
+
+ // Get the field bounding rect
+ void getRect(double *xa1, double *ya1, double *xa2, double *ya2)
+ { *xa1 = x1; *ya1 = y1; *xa2 = x2; *ya2 = y2; }
+
+ unsigned getID () { return ID; }
+ void setID (unsigned int i) { ID=i; }
+
+ FormField *getField () { return field; }
+ FormFieldType getType() { return type; }
+
+ Object* getObj() { return &obj; }
+ Ref getRef() { return ref; }
+
+ void setChildNum (unsigned i) { childNum = i; }
+ unsigned getChildNum () { return childNum; }
+
+ void setFontSize(double f) { fontSize = f; }
+ double getFontSize () { return fontSize; }
+
+ GBool isModified () { return modified; }
+
+ bool isReadOnly() const;
+
+ // return the unique ID corresponding to pageNum/fieldNum
+ static int encodeID (unsigned pageNum, unsigned fieldNum);
+ // decode id and retrieve pageNum and fieldNum
+ static void decodeID (unsigned id, unsigned* pageNum, unsigned* fieldNum);
+
+protected:
+ FormWidget(XRef *xrefA, Object *aobj, unsigned num, Ref aref, FormField *fieldA);
+
+ void updateField (const char *key, Object *value);
+
+ FormField* field;
+ FormFieldType type;
+ Object obj;
+ Ref ref;
+ XRef *xref;
+ GBool defaultsLoaded;
+ GBool modified;
+ //index of this field in the parent's child list
+ unsigned childNum;
+
+ /*
+ Field ID is an (unsigned) integer, calculated as follow :
+ the first sizeof/2 bits are the field number, relative to the page
+ the last sizeof/2 bits are the page number
+ [page number | field number]
+ (encoding) id = (pageNum << 4*sizeof(unsigned)) + fieldNum;
+ (decoding) pageNum = id >> 4*sizeof(unsigned); fieldNum = (id << 4*sizeof(unsigned)) >> 4*sizeof(unsigned);
+ */
+ unsigned ID;
+
+ double x1, y1; // lower left corner
+ double x2, y2; // upper right corner
+ double fontSize; //font size if this widget has text
+
+};
+
+//------------------------------------------------------------------------
+// FormWidgetButton
+//------------------------------------------------------------------------
+
+class FormWidgetButton: public FormWidget {
+public:
+ FormWidgetButton(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p);
+ ~FormWidgetButton ();
+
+ FormButtonType getButtonType() const;
+
+ void setState (GBool state, GBool calledByParent=gFalse);
+ GBool getState ();
+
+ char* getOnStr () { return onStr->getCString(); }
+
+ void loadDefaults();
+
+ void setNumSiblingsID (int i);
+ void setSiblingsID (int i, unsigned id) { siblingsID[i] = id; }
+
+ //For radio buttons, return the IDs of the other radio buttons in the same group
+ unsigned* getSiblingsID () const { return siblingsID; }
+ int getNumSiblingsID () const { return numSiblingsID; }
+
+protected:
+ unsigned* siblingsID; // IDs of dependent buttons (each button of a radio field has all the others buttons
+ // of the same field in this array)
+ int numSiblingsID;
+ GooString *onStr;
+ FormFieldButton *parent;
+ GBool state;
+};
+
+//------------------------------------------------------------------------
+// FormWidgetText
+//------------------------------------------------------------------------
+
+class FormWidgetText: public FormWidget {
+public:
+ FormWidgetText(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p);
+ //return the field's content (UTF16BE)
+ GooString* getContent() ;
+ //return a copy of the field's content (UTF16BE)
+ GooString* getContentCopy();
+
+ //except a UTF16BE string
+ void setContent(GooString* new_content);
+
+ void loadDefaults ();
+
+ bool isMultiline () const;
+ bool isPassword () const;
+ bool isFileSelect () const;
+ bool noSpellCheck () const;
+ bool noScroll () const;
+ bool isComb () const;
+ bool isRichText () const;
+ int getMaxLen () const;
+protected:
+ FormFieldText *parent;
+};
+
+//------------------------------------------------------------------------
+// FormWidgetChoice
+//------------------------------------------------------------------------
+
+class FormWidgetChoice: public FormWidget {
+public:
+ FormWidgetChoice(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p);
+ ~FormWidgetChoice();
+
+ void loadDefaults ();
+ int getNumChoices();
+ //return the display name of the i-th choice (UTF16BE)
+ GooString* getChoice(int i);
+ //select the i-th choice
+ void select (int i);
+
+ //toggle selection of the i-th choice
+ void toggle (int i);
+
+ //deselect everything
+ void deselectAll ();
+
+ //except a UTF16BE string
+ //only work for editable combo box, set the user-entered text as the current choice
+ void setEditChoice(GooString* new_content);
+
+ GooString* getEditChoice ();
+
+ bool isSelected (int i);
+
+ bool isCombo () const;
+ bool hasEdit () const;
+ bool isMultiSelect () const;
+ bool noSpellCheck () const;
+ bool commitOnSelChange () const;
+ bool isListBox () const;
+protected:
+ void _updateV ();
+ bool _checkRange (int i);
+ FormFieldChoice *parent;
+};
+
+//------------------------------------------------------------------------
+// FormWidgetSignature
+//------------------------------------------------------------------------
+
+class FormWidgetSignature: public FormWidget {
+public:
+ FormWidgetSignature(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p);
+protected:
+ FormFieldSignature *parent;
+};
+
+//------------------------------------------------------------------------
+// FormField
+// A FormField implements the logical side of a field and is "attached" to
+// the Catalog. This is an internal class and client applications should
+// only interact with FormWidgets.
+//------------------------------------------------------------------------
+
+class FormField {
+public:
+ FormField(XRef* xrefa, Object *aobj, const Ref& aref, FormFieldType t=formUndef);
+
+ virtual ~FormField();
+
+ // Accessors.
+ FormFieldType getType() { return type; }
+ Object* getObj() { return &obj; }
+ Ref getRef() { return ref; }
+
+ void setReadOnly (bool b) { readOnly = b; }
+ bool isReadOnly () const { return readOnly; }
+
+ FormWidget* findWidgetByRef (Ref aref);
+ // Since while loading their defaults, children may call parents methods, it's better
+ // to do that when parents are completly constructed
+ void loadChildrenDefaults();
+
+ // only implemented in FormFieldButton
+ virtual void fillChildrenSiblingsID ();
+
+
+ protected:
+ void _createWidget (Object *obj, Ref aref);
+
+ FormFieldType type; // field type
+ Ref ref;
+ bool terminal;
+ Object obj;
+ XRef *xref;
+ FormField **children;
+ int numChildren;
+ FormWidget **widgets;
+ bool readOnly;
+
+private:
+ FormField() {}
+};
+
+
+//------------------------------------------------------------------------
+// FormFieldButton
+//------------------------------------------------------------------------
+
+class FormFieldButton: public FormField {
+public:
+ FormFieldButton(XRef *xrefA, Object *dict, const Ref& ref);
+
+ FormButtonType getButtonType () { return btype; }
+
+ bool noToggleToOff () const { return noAllOff; }
+
+ // returns gTrue if the state modification is accepted
+ GBool setState (int num, GBool s);
+
+ void fillChildrenSiblingsID ();
+
+ virtual ~FormFieldButton();
+protected:
+ FormButtonType btype;
+ int size;
+ int active_child; //only used for combo box
+ bool noAllOff;
+};
+
+//------------------------------------------------------------------------
+// FormFieldText
+//------------------------------------------------------------------------
+
+class FormFieldText: public FormField {
+public:
+ FormFieldText(XRef *xrefA, Object *dict, const Ref& ref);
+
+ GooString* getContent () { return content; }
+ GooString* getContentCopy ();
+ void setContentCopy (GooString* new_content);
+ virtual ~FormFieldText();
+
+ bool isMultiline () const { return multiline; }
+ bool isPassword () const { return password; }
+ bool isFileSelect () const { return fileSelect; }
+ bool noSpellCheck () const { return doNotSpellCheck; }
+ bool noScroll () const { return doNotScroll; }
+ bool isComb () const { return comb; }
+ bool isRichText () const { return richText; }
+
+ int getMaxLen () const { return maxLen; }
+protected:
+ GooString* content;
+ bool multiline;
+ bool password;
+ bool fileSelect;
+ bool doNotSpellCheck;
+ bool doNotScroll;
+ bool comb;
+ bool richText;
+ int maxLen;
+};
+
+//------------------------------------------------------------------------
+// FormFieldChoice
+//------------------------------------------------------------------------
+
+class FormFieldChoice: public FormField {
+public:
+ FormFieldChoice(XRef *xrefA, Object *aobj, const Ref& ref);
+
+ virtual ~FormFieldChoice();
+
+ int getNumChoices() { return numChoices; }
+ GooString* getChoice(int i) { return choices[i].optionName; }
+ GooString* getExportVal (int i) { return choices[i].exportVal; }
+
+ //select the i-th choice
+ void select (int i);
+
+ //toggle selection of the i-th choice
+ void toggle (int i);
+
+ //deselect everything
+ void deselectAll ();
+
+ //only work for editable combo box, set the user-entered text as the current choice
+ void setEditChoice(GooString* new_content);
+
+ GooString* getEditChoice ();
+
+ bool isSelected (int i) { return choices[i].selected; }
+
+ int getNumSelected ();
+
+ bool isCombo () const { return combo; }
+ bool hasEdit () const { return edit; }
+ bool isMultiSelect () const { return multiselect; }
+ bool noSpellCheck () const { return doNotSpellCheck; }
+ bool commitOnSelChange () const { return doCommitOnSelChange; }
+ bool isListBox () const { return !combo; }
+
+ /* these functions _must_ only be used by FormWidgetChoice */
+ void _setNumChoices (int i) { numChoices = i; }
+ void _createChoicesTab ();
+ void _setChoiceExportVal (int i, GooString* str) { choices[i].exportVal = str; }
+ void _setChoiceOptionName (int i, GooString* str) { choices[i].optionName = str; }
+
+protected:
+ bool combo;
+ bool edit;
+ bool multiselect;
+ bool doNotSpellCheck;
+ bool doCommitOnSelChange;
+
+ struct ChoiceOpt {
+ GooString* exportVal; //the export value ("internal" name)
+ GooString* optionName; //displayed name
+ bool selected; //if this choice is selected
+ };
+
+ int numChoices;
+ ChoiceOpt* choices;
+ GooString* editedChoice;
+};
+
+//------------------------------------------------------------------------
+// FormFieldSignature
+//------------------------------------------------------------------------
+
+class FormFieldSignature: public FormField {
+public:
+ FormFieldSignature(XRef *xrefA, Object *dict, const Ref& ref);
+
+ virtual ~FormFieldSignature();
+};
+
+//------------------------------------------------------------------------
+// Form
+// This class handle the document-wide part of Form (things in the acroForm
+// Catalog entry).
+//------------------------------------------------------------------------
+
+class Form {
+public:
+ Form(XRef *xrefA, Object* acroForm);
+
+ ~Form();
+
+ // Look up an inheritable field dictionary entry.
+ static Object *fieldLookup(Dict *field, char *key, Object *obj);
+
+ /* Creates a new Field of the type specified in obj's dict.
+ used in Form::Form and FormField::FormField */
+ static FormField *createFieldFromDict (Object* obj, XRef *xref, const Ref& aref);
+
+ Object *getObj () const { return acroForm; }
+ GBool getNeedAppearances () const { return needAppearances; }
+ int getNumFields() const { return numFields; }
+ FormField* getRootField(int i) const { return rootFields[i]; }
+
+ FormWidget* findWidgetByRef (Ref aref);
+
+ void postWidgetsLoad();
+private:
+ FormField** rootFields;
+ int numFields;
+ int size;
+ XRef* xref;
+ Object *acroForm;
+ GBool needAppearances;
+};
+
+//------------------------------------------------------------------------
+// FormPageWidgets
+//------------------------------------------------------------------------
+
+class FormPageWidgets {
+public:
+ FormPageWidgets (XRef *xrefA, Object* annots, unsigned int page, Form *form);
+ ~FormPageWidgets();
+
+ int getNumWidgets() const { return numWidgets; }
+ FormWidget* getWidget(int i) const { return widgets[i]; }
+
+private:
+ FormWidget** widgets;
+ int numWidgets;
+ int size;
+ unsigned pageNum;
+ XRef* xref;
+};
+
+#endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.cc
new file mode 100644
index 00000000000..73a6b5f3e62
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.cc
@@ -0,0 +1,1704 @@
+//========================================================================
+//
+// Function.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2008, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#include "goo/gmem.h"
+#include "goo/gstrtod.h"
+#include "Object.h"
+#include "Dict.h"
+#include "Stream.h"
+#include "Error.h"
+#include "Function.h"
+#include "PopplerCache.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+//------------------------------------------------------------------------
+// Function
+//------------------------------------------------------------------------
+
+Function::Function() {
+}
+
+Function::~Function() {
+}
+
+Function *Function::parse(Object *funcObj) {
+ Function *func;
+ Dict *dict;
+ int funcType;
+ Object obj1;
+
+ if (funcObj->isStream()) {
+ dict = funcObj->streamGetDict();
+ } else if (funcObj->isDict()) {
+ dict = funcObj->getDict();
+ } else if (funcObj->isName("Identity")) {
+ return new IdentityFunction();
+ } else {
+ error(-1, "Expected function dictionary or stream");
+ return NULL;
+ }
+
+ if (!dict->lookup("FunctionType", &obj1)->isInt()) {
+ error(-1, "Function type is missing or wrong type");
+ obj1.free();
+ return NULL;
+ }
+ funcType = obj1.getInt();
+ obj1.free();
+
+ if (funcType == 0) {
+ func = new SampledFunction(funcObj, dict);
+ } else if (funcType == 2) {
+ func = new ExponentialFunction(funcObj, dict);
+ } else if (funcType == 3) {
+ func = new StitchingFunction(funcObj, dict);
+ } else if (funcType == 4) {
+ func = new PostScriptFunction(funcObj, dict);
+ } else {
+ error(-1, "Unimplemented function type (%d)", funcType);
+ return NULL;
+ }
+ if (!func->isOk()) {
+ delete func;
+ return NULL;
+ }
+
+ return func;
+}
+
+GBool Function::init(Dict *dict) {
+ Object obj1, obj2;
+ int i;
+
+ //----- Domain
+ if (!dict->lookup("Domain", &obj1)->isArray()) {
+ error(-1, "Function is missing domain");
+ goto err2;
+ }
+ m = obj1.arrayGetLength() / 2;
+ if (m > funcMaxInputs) {
+ error(-1, "Functions with more than %d inputs are unsupported",
+ funcMaxInputs);
+ goto err2;
+ }
+ for (i = 0; i < m; ++i) {
+ obj1.arrayGet(2*i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function domain array");
+ goto err1;
+ }
+ domain[i][0] = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2*i+1, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function domain array");
+ goto err1;
+ }
+ domain[i][1] = obj2.getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ //----- Range
+ hasRange = gFalse;
+ n = 0;
+ if (dict->lookup("Range", &obj1)->isArray()) {
+ hasRange = gTrue;
+ n = obj1.arrayGetLength() / 2;
+ if (n > funcMaxOutputs) {
+ error(-1, "Functions with more than %d outputs are unsupported",
+ funcMaxOutputs);
+ goto err2;
+ }
+ for (i = 0; i < n; ++i) {
+ obj1.arrayGet(2*i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function range array");
+ goto err1;
+ }
+ range[i][0] = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2*i+1, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function range array");
+ goto err1;
+ }
+ range[i][1] = obj2.getNum();
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ return gTrue;
+
+ err1:
+ obj2.free();
+ err2:
+ obj1.free();
+ return gFalse;
+}
+
+//------------------------------------------------------------------------
+// IdentityFunction
+//------------------------------------------------------------------------
+
+IdentityFunction::IdentityFunction() {
+ int i;
+
+ // fill these in with arbitrary values just in case they get used
+ // somewhere
+ m = funcMaxInputs;
+ n = funcMaxOutputs;
+ for (i = 0; i < funcMaxInputs; ++i) {
+ domain[i][0] = 0;
+ domain[i][1] = 1;
+ }
+ hasRange = gFalse;
+}
+
+IdentityFunction::~IdentityFunction() {
+}
+
+void IdentityFunction::transform(double *in, double *out) {
+ int i;
+
+ for (i = 0; i < funcMaxOutputs; ++i) {
+ out[i] = in[i];
+ }
+}
+
+//------------------------------------------------------------------------
+// SampledFunction
+//------------------------------------------------------------------------
+
+SampledFunction::SampledFunction(Object *funcObj, Dict *dict) {
+ Stream *str;
+ int sampleBits;
+ double sampleMul;
+ Object obj1, obj2;
+ Guint buf, bitMask;
+ int bits;
+ Guint s;
+ int i;
+
+ samples = NULL;
+ sBuf = NULL;
+ ok = gFalse;
+
+ //----- initialize the generic stuff
+ if (!init(dict)) {
+ goto err1;
+ }
+ if (!hasRange) {
+ error(-1, "Type 0 function is missing range");
+ goto err1;
+ }
+ if (m > sampledFuncMaxInputs) {
+ error(-1, "Sampled functions with more than %d inputs are unsupported",
+ sampledFuncMaxInputs);
+ goto err1;
+ }
+
+ //----- buffer
+ sBuf = (double *)gmallocn(1 << m, sizeof(double));
+
+ //----- get the stream
+ if (!funcObj->isStream()) {
+ error(-1, "Type 0 function isn't a stream");
+ goto err1;
+ }
+ str = funcObj->getStream();
+
+ //----- Size
+ if (!dict->lookup("Size", &obj1)->isArray() ||
+ obj1.arrayGetLength() != m) {
+ error(-1, "Function has missing or invalid size array");
+ goto err2;
+ }
+ for (i = 0; i < m; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!obj2.isInt()) {
+ error(-1, "Illegal value in function size array");
+ goto err3;
+ }
+ sampleSize[i] = obj2.getInt();
+ obj2.free();
+ }
+ obj1.free();
+ idxMul[0] = n;
+ for (i = 1; i < m; ++i) {
+ idxMul[i] = idxMul[i-1] * sampleSize[i-1];
+ }
+
+ //----- BitsPerSample
+ if (!dict->lookup("BitsPerSample", &obj1)->isInt()) {
+ error(-1, "Function has missing or invalid BitsPerSample");
+ goto err2;
+ }
+ sampleBits = obj1.getInt();
+ sampleMul = 1.0 / (pow(2.0, (double)sampleBits) - 1);
+ obj1.free();
+
+ //----- Encode
+ if (dict->lookup("Encode", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2*m) {
+ for (i = 0; i < m; ++i) {
+ obj1.arrayGet(2*i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function encode array");
+ goto err3;
+ }
+ encode[i][0] = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2*i+1, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function encode array");
+ goto err3;
+ }
+ encode[i][1] = obj2.getNum();
+ obj2.free();
+ }
+ } else {
+ for (i = 0; i < m; ++i) {
+ encode[i][0] = 0;
+ encode[i][1] = sampleSize[i] - 1;
+ }
+ }
+ obj1.free();
+ for (i = 0; i < m; ++i) {
+ inputMul[i] = (encode[i][1] - encode[i][0]) /
+ (domain[i][1] - domain[i][0]);
+ }
+
+ //----- Decode
+ if (dict->lookup("Decode", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2*n) {
+ for (i = 0; i < n; ++i) {
+ obj1.arrayGet(2*i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function decode array");
+ goto err3;
+ }
+ decode[i][0] = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2*i+1, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function decode array");
+ goto err3;
+ }
+ decode[i][1] = obj2.getNum();
+ obj2.free();
+ }
+ } else {
+ for (i = 0; i < n; ++i) {
+ decode[i][0] = range[i][0];
+ decode[i][1] = range[i][1];
+ }
+ }
+ obj1.free();
+
+ //----- samples
+ nSamples = n;
+ for (i = 0; i < m; ++i)
+ nSamples *= sampleSize[i];
+ samples = (double *)gmallocn(nSamples, sizeof(double));
+ buf = 0;
+ bits = 0;
+ bitMask = (1 << sampleBits) - 1;
+ str->reset();
+ for (i = 0; i < nSamples; ++i) {
+ if (sampleBits == 8) {
+ s = str->getChar();
+ } else if (sampleBits == 16) {
+ s = str->getChar();
+ s = (s << 8) + str->getChar();
+ } else if (sampleBits == 32) {
+ s = str->getChar();
+ s = (s << 8) + str->getChar();
+ s = (s << 8) + str->getChar();
+ s = (s << 8) + str->getChar();
+ } else {
+ while (bits < sampleBits) {
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bits += 8;
+ }
+ s = (buf >> (bits - sampleBits)) & bitMask;
+ bits -= sampleBits;
+ }
+ samples[i] = (double)s * sampleMul;
+ }
+ str->close();
+
+ ok = gTrue;
+ return;
+
+ err3:
+ obj2.free();
+ err2:
+ obj1.free();
+ err1:
+ return;
+}
+
+SampledFunction::~SampledFunction() {
+ if (samples) {
+ gfree(samples);
+ }
+ if (sBuf) {
+ gfree(sBuf);
+ }
+}
+
+SampledFunction::SampledFunction(SampledFunction *func) {
+ memcpy(this, func, sizeof(SampledFunction));
+ samples = (double *)gmallocn(nSamples, sizeof(double));
+ memcpy(samples, func->samples, nSamples * sizeof(double));
+ sBuf = (double *)gmallocn(1 << m, sizeof(double));
+}
+
+void SampledFunction::transform(double *in, double *out) {
+ double x;
+ int e[funcMaxInputs][2];
+ double efrac0[funcMaxInputs];
+ double efrac1[funcMaxInputs];
+ int i, j, k, idx, t;
+
+ // map input values into sample array
+ for (i = 0; i < m; ++i) {
+ x = (in[i] - domain[i][0]) * inputMul[i] + encode[i][0];
+ if (x < 0) {
+ x = 0;
+ } else if (x > sampleSize[i] - 1) {
+ x = sampleSize[i] - 1;
+ }
+ e[i][0] = (int)x;
+ if ((e[i][1] = e[i][0] + 1) >= sampleSize[i]) {
+ // this happens if in[i] = domain[i][1]
+ e[i][1] = e[i][0];
+ }
+ efrac1[i] = x - e[i][0];
+ efrac0[i] = 1 - efrac1[i];
+ }
+
+ // for each output, do m-linear interpolation
+ for (i = 0; i < n; ++i) {
+
+ // pull 2^m values out of the sample array
+ for (j = 0; j < (1<<m); ++j) {
+ idx = i;
+ for (k = 0, t = j; k < m; ++k, t >>= 1) {
+ idx += idxMul[k] * (e[k][t & 1]);
+ }
+ sBuf[j] = samples[idx];
+ }
+
+ // do m sets of interpolations
+ for (j = 0, t = (1<<m); j < m; ++j, t >>= 1) {
+ for (k = 0; k < t; k += 2) {
+ sBuf[k >> 1] = efrac0[j] * sBuf[k] + efrac1[j] * sBuf[k+1];
+ }
+ }
+
+ // map output value to range
+ out[i] = sBuf[0] * (decode[i][1] - decode[i][0]) + decode[i][0];
+ if (out[i] < range[i][0]) {
+ out[i] = range[i][0];
+ } else if (out[i] > range[i][1]) {
+ out[i] = range[i][1];
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// ExponentialFunction
+//------------------------------------------------------------------------
+
+ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) {
+ Object obj1, obj2;
+ int i;
+
+ ok = gFalse;
+
+ //----- initialize the generic stuff
+ if (!init(dict)) {
+ goto err1;
+ }
+ if (m != 1) {
+ error(-1, "Exponential function with more than one input");
+ goto err1;
+ }
+
+ //----- C0
+ if (dict->lookup("C0", &obj1)->isArray()) {
+ if (hasRange && obj1.arrayGetLength() != n) {
+ error(-1, "Function's C0 array is wrong length");
+ goto err2;
+ }
+ n = obj1.arrayGetLength();
+ for (i = 0; i < n; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function C0 array");
+ goto err3;
+ }
+ c0[i] = obj2.getNum();
+ obj2.free();
+ }
+ } else {
+ if (hasRange && n != 1) {
+ error(-1, "Function's C0 array is wrong length");
+ goto err2;
+ }
+ n = 1;
+ c0[0] = 0;
+ }
+ obj1.free();
+
+ //----- C1
+ if (dict->lookup("C1", &obj1)->isArray()) {
+ if (obj1.arrayGetLength() != n) {
+ error(-1, "Function's C1 array is wrong length");
+ goto err2;
+ }
+ for (i = 0; i < n; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!obj2.isNum()) {
+ error(-1, "Illegal value in function C1 array");
+ goto err3;
+ }
+ c1[i] = obj2.getNum();
+ obj2.free();
+ }
+ } else {
+ if (n != 1) {
+ error(-1, "Function's C1 array is wrong length");
+ goto err2;
+ }
+ c1[0] = 1;
+ }
+ obj1.free();
+
+ //----- N (exponent)
+ if (!dict->lookup("N", &obj1)->isNum()) {
+ error(-1, "Function has missing or invalid N");
+ goto err2;
+ }
+ e = obj1.getNum();
+ obj1.free();
+
+ ok = gTrue;
+ return;
+
+ err3:
+ obj2.free();
+ err2:
+ obj1.free();
+ err1:
+ return;
+}
+
+ExponentialFunction::~ExponentialFunction() {
+}
+
+ExponentialFunction::ExponentialFunction(ExponentialFunction *func) {
+ memcpy(this, func, sizeof(ExponentialFunction));
+}
+
+void ExponentialFunction::transform(double *in, double *out) {
+ double x;
+ int i;
+
+ if (in[0] < domain[0][0]) {
+ x = domain[0][0];
+ } else if (in[0] > domain[0][1]) {
+ x = domain[0][1];
+ } else {
+ x = in[0];
+ }
+ for (i = 0; i < n; ++i) {
+ out[i] = c0[i] + pow(x, e) * (c1[i] - c0[i]);
+ if (hasRange) {
+ if (out[i] < range[i][0]) {
+ out[i] = range[i][0];
+ } else if (out[i] > range[i][1]) {
+ out[i] = range[i][1];
+ }
+ }
+ }
+ return;
+}
+
+//------------------------------------------------------------------------
+// StitchingFunction
+//------------------------------------------------------------------------
+
+StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict) {
+ Object obj1, obj2;
+ int i;
+
+ ok = gFalse;
+ funcs = NULL;
+ bounds = NULL;
+ encode = NULL;
+ scale = NULL;
+
+ //----- initialize the generic stuff
+ if (!init(dict)) {
+ goto err1;
+ }
+ if (m != 1) {
+ error(-1, "Stitching function with more than one input");
+ goto err1;
+ }
+
+ //----- Functions
+ if (!dict->lookup("Functions", &obj1)->isArray()) {
+ error(-1, "Missing 'Functions' entry in stitching function");
+ goto err1;
+ }
+ k = obj1.arrayGetLength();
+ funcs = (Function **)gmallocn(k, sizeof(Function *));
+ bounds = (double *)gmallocn(k + 1, sizeof(double));
+ encode = (double *)gmallocn(2 * k, sizeof(double));
+ scale = (double *)gmallocn(k, sizeof(double));
+ for (i = 0; i < k; ++i) {
+ funcs[i] = NULL;
+ }
+ for (i = 0; i < k; ++i) {
+ if (!(funcs[i] = Function::parse(obj1.arrayGet(i, &obj2)))) {
+ goto err2;
+ }
+ if (i > 0 && (funcs[i]->getInputSize() != 1 ||
+ funcs[i]->getOutputSize() != funcs[0]->getOutputSize())) {
+ error(-1, "Incompatible subfunctions in stitching function");
+ goto err2;
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ //----- Bounds
+ if (!dict->lookup("Bounds", &obj1)->isArray() ||
+ obj1.arrayGetLength() != k - 1) {
+ error(-1, "Missing or invalid 'Bounds' entry in stitching function");
+ goto err1;
+ }
+ bounds[0] = domain[0][0];
+ for (i = 1; i < k; ++i) {
+ if (!obj1.arrayGet(i - 1, &obj2)->isNum()) {
+ error(-1, "Invalid type in 'Bounds' array in stitching function");
+ goto err2;
+ }
+ bounds[i] = obj2.getNum();
+ obj2.free();
+ }
+ bounds[k] = domain[0][1];
+ obj1.free();
+
+ //----- Encode
+ if (!dict->lookup("Encode", &obj1)->isArray() ||
+ obj1.arrayGetLength() != 2 * k) {
+ error(-1, "Missing or invalid 'Encode' entry in stitching function");
+ goto err1;
+ }
+ for (i = 0; i < 2 * k; ++i) {
+ if (!obj1.arrayGet(i, &obj2)->isNum()) {
+ error(-1, "Invalid type in 'Encode' array in stitching function");
+ goto err2;
+ }
+ encode[i] = obj2.getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ //----- pre-compute the scale factors
+ for (i = 0; i < k; ++i) {
+ if (bounds[i] == bounds[i+1]) {
+ // avoid a divide-by-zero -- in this situation, function i will
+ // never be used anyway
+ scale[i] = 0;
+ } else {
+ scale[i] = (encode[2*i+1] - encode[2*i]) / (bounds[i+1] - bounds[i]);
+ }
+ }
+
+ ok = gTrue;
+ return;
+
+ err2:
+ obj2.free();
+ err1:
+ obj1.free();
+}
+
+StitchingFunction::StitchingFunction(StitchingFunction *func) {
+ int i;
+
+ memcpy(this, func, sizeof(StitchingFunction));
+
+ k = func->k;
+ funcs = (Function **)gmallocn(k, sizeof(Function *));
+ for (i = 0; i < k; ++i) {
+ funcs[i] = func->funcs[i]->copy();
+ }
+ bounds = (double *)gmallocn(k + 1, sizeof(double));
+ memcpy(bounds, func->bounds, (k + 1) * sizeof(double));
+ encode = (double *)gmallocn(2 * k, sizeof(double));
+ memcpy(encode, func->encode, 2 * k * sizeof(double));
+ scale = (double *)gmallocn(k, sizeof(double));
+ memcpy(scale, func->scale, k * sizeof(double));
+ ok = gTrue;
+}
+
+StitchingFunction::~StitchingFunction() {
+ int i;
+
+ if (funcs) {
+ for (i = 0; i < k; ++i) {
+ if (funcs[i]) {
+ delete funcs[i];
+ }
+ }
+ }
+ gfree(funcs);
+ gfree(bounds);
+ gfree(encode);
+ gfree(scale);
+}
+
+void StitchingFunction::transform(double *in, double *out) {
+ double x;
+ int i;
+
+ if (in[0] < domain[0][0]) {
+ x = domain[0][0];
+ } else if (in[0] > domain[0][1]) {
+ x = domain[0][1];
+ } else {
+ x = in[0];
+ }
+ for (i = 0; i < k - 1; ++i) {
+ if (x < bounds[i+1]) {
+ break;
+ }
+ }
+ x = encode[2*i] + (x - bounds[i]) * scale[i];
+ funcs[i]->transform(&x, out);
+}
+
+//------------------------------------------------------------------------
+// PostScriptFunction
+//------------------------------------------------------------------------
+
+enum PSOp {
+ psOpAbs,
+ psOpAdd,
+ psOpAnd,
+ psOpAtan,
+ psOpBitshift,
+ psOpCeiling,
+ psOpCopy,
+ psOpCos,
+ psOpCvi,
+ psOpCvr,
+ psOpDiv,
+ psOpDup,
+ psOpEq,
+ psOpExch,
+ psOpExp,
+ psOpFalse,
+ psOpFloor,
+ psOpGe,
+ psOpGt,
+ psOpIdiv,
+ psOpIndex,
+ psOpLe,
+ psOpLn,
+ psOpLog,
+ psOpLt,
+ psOpMod,
+ psOpMul,
+ psOpNe,
+ psOpNeg,
+ psOpNot,
+ psOpOr,
+ psOpPop,
+ psOpRoll,
+ psOpRound,
+ psOpSin,
+ psOpSqrt,
+ psOpSub,
+ psOpTrue,
+ psOpTruncate,
+ psOpXor,
+ psOpIf,
+ psOpIfelse,
+ psOpReturn
+};
+
+// Note: 'if' and 'ifelse' are parsed separately.
+// The rest are listed here in alphabetical order.
+// The index in this table is equivalent to the entry in PSOp.
+static const char *psOpNames[] = {
+ "abs",
+ "add",
+ "and",
+ "atan",
+ "bitshift",
+ "ceiling",
+ "copy",
+ "cos",
+ "cvi",
+ "cvr",
+ "div",
+ "dup",
+ "eq",
+ "exch",
+ "exp",
+ "false",
+ "floor",
+ "ge",
+ "gt",
+ "idiv",
+ "index",
+ "le",
+ "ln",
+ "log",
+ "lt",
+ "mod",
+ "mul",
+ "ne",
+ "neg",
+ "not",
+ "or",
+ "pop",
+ "roll",
+ "round",
+ "sin",
+ "sqrt",
+ "sub",
+ "true",
+ "truncate",
+ "xor"
+};
+
+#define nPSOps (sizeof(psOpNames) / sizeof(char *))
+
+enum PSObjectType {
+ psBool,
+ psInt,
+ psReal,
+ psOperator,
+ psBlock
+};
+
+// In the code array, 'if'/'ifelse' operators take up three slots
+// plus space for the code in the subclause(s).
+//
+// +---------------------------------+
+// | psOperator: psOpIf / psOpIfelse |
+// +---------------------------------+
+// | psBlock: ptr=<A> |
+// +---------------------------------+
+// | psBlock: ptr=<B> |
+// +---------------------------------+
+// | if clause |
+// | ... |
+// | psOperator: psOpReturn |
+// +---------------------------------+
+// <A> | else clause |
+// | ... |
+// | psOperator: psOpReturn |
+// +---------------------------------+
+// <B> | ... |
+//
+// For 'if', pointer <A> is present in the code stream but unused.
+
+struct PSObject {
+ PSObjectType type;
+ union {
+ GBool booln; // boolean (stack only)
+ int intg; // integer (stack and code)
+ double real; // real (stack and code)
+ PSOp op; // operator (code only)
+ int blk; // if/ifelse block pointer (code only)
+ };
+};
+
+#define psStackSize 100
+
+class PSStack {
+public:
+
+ PSStack() {sp = psStackSize; }
+ void clear() { sp = psStackSize; }
+ void pushBool(GBool booln)
+ {
+ if (checkOverflow()) {
+ stack[--sp].type = psBool;
+ stack[sp].booln = booln;
+ }
+ }
+ void pushInt(int intg)
+ {
+ if (checkOverflow()) {
+ stack[--sp].type = psInt;
+ stack[sp].intg = intg;
+ }
+ }
+ void pushReal(double real)
+ {
+ if (checkOverflow()) {
+ stack[--sp].type = psReal;
+ stack[sp].real = real;
+ }
+ }
+ GBool popBool()
+ {
+ if (checkUnderflow() && checkType(psBool, psBool)) {
+ return stack[sp++].booln;
+ }
+ return gFalse;
+ }
+ int popInt()
+ {
+ if (checkUnderflow() && checkType(psInt, psInt)) {
+ return stack[sp++].intg;
+ }
+ return 0;
+ }
+ double popNum()
+ {
+ double ret;
+
+ if (checkUnderflow() && checkType(psInt, psReal)) {
+ ret = (stack[sp].type == psInt) ? (double)stack[sp].intg : stack[sp].real;
+ ++sp;
+ return ret;
+ }
+ return 0;
+ }
+ GBool empty() { return sp == psStackSize; }
+ GBool topIsInt() { return sp < psStackSize && stack[sp].type == psInt; }
+ GBool topTwoAreInts()
+ { return sp < psStackSize - 1 &&
+ stack[sp].type == psInt &&
+ stack[sp+1].type == psInt; }
+ GBool topIsReal() { return sp < psStackSize && stack[sp].type == psReal; }
+ GBool topTwoAreNums()
+ { return sp < psStackSize - 1 &&
+ (stack[sp].type == psInt || stack[sp].type == psReal) &&
+ (stack[sp+1].type == psInt || stack[sp+1].type == psReal); }
+ void copy(int n);
+ void roll(int n, int j);
+ void index(int i)
+ {
+ if (!checkOverflow()) {
+ return;
+ }
+ --sp;
+ stack[sp] = stack[sp + 1 + i];
+ }
+ void pop()
+ {
+ if (!checkUnderflow()) {
+ return;
+ }
+ ++sp;
+ }
+
+private:
+
+ GBool checkOverflow(int n = 1)
+ {
+ if (sp - n < 0) {
+ error(-1, "Stack overflow in PostScript function");
+ return gFalse;
+ }
+ return gTrue;
+ }
+ GBool checkUnderflow()
+ {
+ if (sp == psStackSize) {
+ error(-1, "Stack underflow in PostScript function");
+ return gFalse;
+ }
+ return gTrue;
+ }
+ GBool checkType(PSObjectType t1, PSObjectType t2)
+ {
+ if (stack[sp].type != t1 && stack[sp].type != t2) {
+ error(-1, "Type mismatch in PostScript function");
+ return gFalse;
+ }
+ return gTrue;
+ }
+ PSObject stack[psStackSize];
+ int sp;
+};
+
+
+void PSStack::copy(int n) {
+ int i;
+
+ if (sp + n > psStackSize) {
+ error(-1, "Stack underflow in PostScript function");
+ return;
+ }
+ if (!checkOverflow(n)) {
+ return;
+ }
+ for (i = sp + n - 1; i >= sp; --i) {
+ stack[i - n] = stack[i];
+ }
+ sp -= n;
+}
+
+void PSStack::roll(int n, int j) {
+ PSObject obj;
+ int i, k;
+
+ if (j >= 0) {
+ j %= n;
+ } else {
+ j = -j % n;
+ if (j != 0) {
+ j = n - j;
+ }
+ }
+ if (n <= 0 || j == 0) {
+ return;
+ }
+ if (j <= n / 2) {
+ for (i = 0; i < j; ++i) {
+ obj = stack[sp];
+ for (k = sp; k < sp + n - 1; ++k) {
+ stack[k] = stack[k+1];
+ }
+ stack[sp + n - 1] = obj;
+ }
+ } else {
+ j = n - j;
+ obj = stack[sp + n - 1];
+ for (k = sp + n - 1; k > sp; --k) {
+ stack[k] = stack[k-1];
+ }
+ stack[sp] = obj;
+ }
+}
+
+class PostScriptFunctionKey : public PopplerCacheKey
+{
+ public:
+ PostScriptFunctionKey(int sizeA, double *inA, bool copyA)
+ {
+ init(sizeA, inA, copyA);
+ }
+
+ PostScriptFunctionKey(const PostScriptFunctionKey &key)
+ {
+ init(key.size, key.in, key.copied);
+ }
+
+ void init(int sizeA, double *inA, bool copyA)
+ {
+ copied = copyA;
+ size = sizeA;
+ if (copied) {
+ in = new double[size];
+ for (int i = 0; i < size; ++i) in[i] = inA[i];
+ } else {
+ in = inA;
+ }
+ }
+
+ ~PostScriptFunctionKey()
+ {
+ if (copied) delete[] in;
+ }
+
+ bool operator==(const PopplerCacheKey &key) const
+ {
+ const PostScriptFunctionKey *k = static_cast<const PostScriptFunctionKey*>(&key);
+ if (size == k->size) {
+ bool equal = true;
+ for (int i = 0; equal && i < size; ++i) {
+ equal = in[i] == k->in[i];
+ }
+ return equal;
+ } else {
+ return false;
+ }
+ }
+
+ bool copied;
+ int size;
+ double *in;
+};
+
+class PostScriptFunctionItem : public PopplerCacheItem
+{
+ public:
+ PostScriptFunctionItem(int sizeA, double *outA)
+ {
+ init(sizeA, outA);
+ }
+
+ PostScriptFunctionItem(const PostScriptFunctionItem &item)
+ {
+ init(item.size, item.out);
+ }
+
+ void init(int sizeA, double *outA)
+ {
+ size = sizeA;
+ out = new double[size];
+ for (int i = 0; i < size; ++i) out[i] = outA[i];
+ }
+
+ ~PostScriptFunctionItem()
+ {
+ delete[] out;
+ }
+
+ int size;
+ double *out;
+};
+
+PostScriptFunction::PostScriptFunction(Object *funcObj, Dict *dict) {
+ Stream *str;
+ int codePtr;
+ GooString *tok;
+
+ code = NULL;
+ codeString = NULL;
+ codeSize = 0;
+ ok = gFalse;
+ cache = new PopplerCache(5);
+
+ //----- initialize the generic stuff
+ if (!init(dict)) {
+ goto err1;
+ }
+ if (!hasRange) {
+ error(-1, "Type 4 function is missing range");
+ goto err1;
+ }
+
+ //----- get the stream
+ if (!funcObj->isStream()) {
+ error(-1, "Type 4 function isn't a stream");
+ goto err1;
+ }
+ str = funcObj->getStream();
+
+ //----- parse the function
+ codeString = new GooString();
+ str->reset();
+ if (!(tok = getToken(str)) || tok->cmp("{")) {
+ error(-1, "Expected '{' at start of PostScript function");
+ if (tok) {
+ delete tok;
+ }
+ goto err1;
+ }
+ delete tok;
+ codePtr = 0;
+ if (!parseCode(str, &codePtr)) {
+ goto err2;
+ }
+ str->close();
+
+ ok = gTrue;
+
+ stack = new PSStack();
+
+ err2:
+ str->close();
+ err1:
+ return;
+}
+
+PostScriptFunction::PostScriptFunction(PostScriptFunction *func) {
+ memcpy(this, func, sizeof(PostScriptFunction));
+ code = (PSObject *)gmallocn(codeSize, sizeof(PSObject));
+ memcpy(code, func->code, codeSize * sizeof(PSObject));
+ codeString = func->codeString->copy();
+ stack = new PSStack();
+ memcpy(stack, func->stack, sizeof(PSStack));
+
+ cache = new PopplerCache(func->cache->size());
+ for (int i = 0; i < func->cache->numberOfItems(); ++i)
+ {
+ PostScriptFunctionKey *key = new PostScriptFunctionKey(*(PostScriptFunctionKey*)func->cache->key(i));
+ PostScriptFunctionItem *item = new PostScriptFunctionItem(*(PostScriptFunctionItem*)func->cache->item(i));
+ cache->put(key, item);
+ }
+}
+
+PostScriptFunction::~PostScriptFunction() {
+ gfree(code);
+ delete codeString;
+ delete stack;
+ delete cache;
+}
+
+void PostScriptFunction::transform(double *in, double *out) {
+ int i;
+
+ PostScriptFunctionKey key(m, in, false);
+ PopplerCacheItem *item = cache->lookup(key);
+ if (item) {
+ PostScriptFunctionItem *it = static_cast<PostScriptFunctionItem *>(item);
+ for (int i = 0; i < n; ++i) {
+ out[i] = it->out[i];
+ }
+ return;
+ }
+
+ stack->clear();
+ for (i = 0; i < m; ++i) {
+ //~ may need to check for integers here
+ stack->pushReal(in[i]);
+ }
+ exec(stack, 0);
+ for (i = n - 1; i >= 0; --i) {
+ out[i] = stack->popNum();
+ if (out[i] < range[i][0]) {
+ out[i] = range[i][0];
+ } else if (out[i] > range[i][1]) {
+ out[i] = range[i][1];
+ }
+ }
+
+ PostScriptFunctionKey *newKey = new PostScriptFunctionKey(m, in, true);
+ PostScriptFunctionItem *newItem = new PostScriptFunctionItem(n, out);
+ cache->put(newKey, newItem);
+
+ // if (!stack->empty()) {
+ // error(-1, "Extra values on stack at end of PostScript function");
+ // }
+}
+
+GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) {
+ GooString *tok;
+ char *p;
+ GBool isReal;
+ int opPtr, elsePtr;
+ int a, b, mid, cmp;
+
+ while (1) {
+ if (!(tok = getToken(str))) {
+ error(-1, "Unexpected end of PostScript function stream");
+ return gFalse;
+ }
+ p = tok->getCString();
+ if (isdigit(*p) || *p == '.' || *p == '-') {
+ isReal = gFalse;
+ for (++p; *p; ++p) {
+ if (*p == '.') {
+ isReal = gTrue;
+ break;
+ }
+ }
+ resizeCode(*codePtr);
+ if (isReal) {
+ code[*codePtr].type = psReal;
+ code[*codePtr].real = gatof(tok->getCString());
+ } else {
+ code[*codePtr].type = psInt;
+ code[*codePtr].intg = atoi(tok->getCString());
+ }
+ ++*codePtr;
+ delete tok;
+ } else if (!tok->cmp("{")) {
+ delete tok;
+ opPtr = *codePtr;
+ *codePtr += 3;
+ resizeCode(opPtr + 2);
+ if (!parseCode(str, codePtr)) {
+ return gFalse;
+ }
+ if (!(tok = getToken(str))) {
+ error(-1, "Unexpected end of PostScript function stream");
+ return gFalse;
+ }
+ if (!tok->cmp("{")) {
+ elsePtr = *codePtr;
+ if (!parseCode(str, codePtr)) {
+ return gFalse;
+ }
+ delete tok;
+ if (!(tok = getToken(str))) {
+ error(-1, "Unexpected end of PostScript function stream");
+ return gFalse;
+ }
+ } else {
+ elsePtr = -1;
+ }
+ if (!tok->cmp("if")) {
+ if (elsePtr >= 0) {
+ error(-1, "Got 'if' operator with two blocks in PostScript function");
+ return gFalse;
+ }
+ code[opPtr].type = psOperator;
+ code[opPtr].op = psOpIf;
+ code[opPtr+2].type = psBlock;
+ code[opPtr+2].blk = *codePtr;
+ } else if (!tok->cmp("ifelse")) {
+ if (elsePtr < 0) {
+ error(-1, "Got 'ifelse' operator with one blocks in PostScript function");
+ return gFalse;
+ }
+ code[opPtr].type = psOperator;
+ code[opPtr].op = psOpIfelse;
+ code[opPtr+1].type = psBlock;
+ code[opPtr+1].blk = elsePtr;
+ code[opPtr+2].type = psBlock;
+ code[opPtr+2].blk = *codePtr;
+ } else {
+ error(-1, "Expected if/ifelse operator in PostScript function");
+ delete tok;
+ return gFalse;
+ }
+ delete tok;
+ } else if (!tok->cmp("}")) {
+ delete tok;
+ resizeCode(*codePtr);
+ code[*codePtr].type = psOperator;
+ code[*codePtr].op = psOpReturn;
+ ++*codePtr;
+ break;
+ } else {
+ a = -1;
+ b = nPSOps;
+ // invariant: psOpNames[a] < tok < psOpNames[b]
+ while (b - a > 1) {
+ mid = (a + b) / 2;
+ cmp = tok->cmp(psOpNames[mid]);
+ if (cmp > 0) {
+ a = mid;
+ } else if (cmp < 0) {
+ b = mid;
+ } else {
+ a = b = mid;
+ }
+ }
+ if (cmp != 0) {
+ error(-1, "Unknown operator '%s' in PostScript function",
+ tok->getCString());
+ delete tok;
+ return gFalse;
+ }
+ delete tok;
+ resizeCode(*codePtr);
+ code[*codePtr].type = psOperator;
+ code[*codePtr].op = (PSOp)a;
+ ++*codePtr;
+ }
+ }
+ return gTrue;
+}
+
+GooString *PostScriptFunction::getToken(Stream *str) {
+ GooString *s;
+ int c;
+ GBool comment;
+
+ s = new GooString();
+ comment = gFalse;
+ while (1) {
+ if ((c = str->getChar()) == EOF) {
+ break;
+ }
+ codeString->append(c);
+ if (comment) {
+ if (c == '\x0a' || c == '\x0d') {
+ comment = gFalse;
+ }
+ } else if (c == '%') {
+ comment = gTrue;
+ } else if (!isspace(c)) {
+ break;
+ }
+ }
+ if (c == '{' || c == '}') {
+ s->append((char)c);
+ } else if (isdigit(c) || c == '.' || c == '-') {
+ while (1) {
+ s->append((char)c);
+ c = str->lookChar();
+ if (c == EOF || !(isdigit(c) || c == '.' || c == '-')) {
+ break;
+ }
+ str->getChar();
+ codeString->append(c);
+ }
+ } else {
+ while (1) {
+ s->append((char)c);
+ c = str->lookChar();
+ if (c == EOF || !isalnum(c)) {
+ break;
+ }
+ str->getChar();
+ codeString->append(c);
+ }
+ }
+ return s;
+}
+
+void PostScriptFunction::resizeCode(int newSize) {
+ if (newSize >= codeSize) {
+ codeSize += 64;
+ code = (PSObject *)greallocn(code, codeSize, sizeof(PSObject));
+ }
+}
+
+void PostScriptFunction::exec(PSStack *stack, int codePtr) {
+ int i1, i2;
+ double r1, r2, result;
+ GBool b1, b2;
+
+ while (1) {
+ switch (code[codePtr].type) {
+ case psInt:
+ stack->pushInt(code[codePtr++].intg);
+ break;
+ case psReal:
+ stack->pushReal(code[codePtr++].real);
+ break;
+ case psOperator:
+ switch (code[codePtr++].op) {
+ case psOpAbs:
+ if (stack->topIsInt()) {
+ stack->pushInt(abs(stack->popInt()));
+ } else {
+ stack->pushReal(fabs(stack->popNum()));
+ }
+ break;
+ case psOpAdd:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 + i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushReal(r1 + r2);
+ }
+ break;
+ case psOpAnd:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 & i2);
+ } else {
+ b2 = stack->popBool();
+ b1 = stack->popBool();
+ stack->pushBool(b1 && b2);
+ }
+ break;
+ case psOpAtan:
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ result = atan2(r1, r2) * 180.0 / M_PI;
+ if (result < 0) result += 360.0;
+ stack->pushReal(result);
+ break;
+ case psOpBitshift:
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ if (i2 > 0) {
+ stack->pushInt(i1 << i2);
+ } else if (i2 < 0) {
+ stack->pushInt((int)((Guint)i1 >> i2));
+ } else {
+ stack->pushInt(i1);
+ }
+ break;
+ case psOpCeiling:
+ if (!stack->topIsInt()) {
+ stack->pushReal(ceil(stack->popNum()));
+ }
+ break;
+ case psOpCopy:
+ stack->copy(stack->popInt());
+ break;
+ case psOpCos:
+ stack->pushReal(cos(stack->popNum() * M_PI / 180.0));
+ break;
+ case psOpCvi:
+ if (!stack->topIsInt()) {
+ stack->pushInt((int)stack->popNum());
+ }
+ break;
+ case psOpCvr:
+ if (!stack->topIsReal()) {
+ stack->pushReal(stack->popNum());
+ }
+ break;
+ case psOpDiv:
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushReal(r1 / r2);
+ break;
+ case psOpDup:
+ stack->copy(1);
+ break;
+ case psOpEq:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 == i2);
+ } else if (stack->topTwoAreNums()) {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 == r2);
+ } else {
+ b2 = stack->popBool();
+ b1 = stack->popBool();
+ stack->pushBool(b1 == b2);
+ }
+ break;
+ case psOpExch:
+ stack->roll(2, 1);
+ break;
+ case psOpExp:
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushReal(pow(r1, r2));
+ break;
+ case psOpFalse:
+ stack->pushBool(gFalse);
+ break;
+ case psOpFloor:
+ if (!stack->topIsInt()) {
+ stack->pushReal(floor(stack->popNum()));
+ }
+ break;
+ case psOpGe:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 >= i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 >= r2);
+ }
+ break;
+ case psOpGt:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 > i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 > r2);
+ }
+ break;
+ case psOpIdiv:
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 / i2);
+ break;
+ case psOpIndex:
+ stack->index(stack->popInt());
+ break;
+ case psOpLe:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 <= i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 <= r2);
+ }
+ break;
+ case psOpLn:
+ stack->pushReal(log(stack->popNum()));
+ break;
+ case psOpLog:
+ stack->pushReal(log10(stack->popNum()));
+ break;
+ case psOpLt:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 < i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 < r2);
+ }
+ break;
+ case psOpMod:
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 % i2);
+ break;
+ case psOpMul:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ //~ should check for out-of-range, and push a real instead
+ stack->pushInt(i1 * i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushReal(r1 * r2);
+ }
+ break;
+ case psOpNe:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushBool(i1 != i2);
+ } else if (stack->topTwoAreNums()) {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushBool(r1 != r2);
+ } else {
+ b2 = stack->popBool();
+ b1 = stack->popBool();
+ stack->pushBool(b1 != b2);
+ }
+ break;
+ case psOpNeg:
+ if (stack->topIsInt()) {
+ stack->pushInt(-stack->popInt());
+ } else {
+ stack->pushReal(-stack->popNum());
+ }
+ break;
+ case psOpNot:
+ if (stack->topIsInt()) {
+ stack->pushInt(~stack->popInt());
+ } else {
+ stack->pushBool(!stack->popBool());
+ }
+ break;
+ case psOpOr:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 | i2);
+ } else {
+ b2 = stack->popBool();
+ b1 = stack->popBool();
+ stack->pushBool(b1 || b2);
+ }
+ break;
+ case psOpPop:
+ stack->pop();
+ break;
+ case psOpRoll:
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->roll(i1, i2);
+ break;
+ case psOpRound:
+ if (!stack->topIsInt()) {
+ r1 = stack->popNum();
+ stack->pushReal((r1 >= 0) ? floor(r1 + 0.5) : ceil(r1 - 0.5));
+ }
+ break;
+ case psOpSin:
+ stack->pushReal(sin(stack->popNum() * M_PI / 180.0));
+ break;
+ case psOpSqrt:
+ stack->pushReal(sqrt(stack->popNum()));
+ break;
+ case psOpSub:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 - i2);
+ } else {
+ r2 = stack->popNum();
+ r1 = stack->popNum();
+ stack->pushReal(r1 - r2);
+ }
+ break;
+ case psOpTrue:
+ stack->pushBool(gTrue);
+ break;
+ case psOpTruncate:
+ if (!stack->topIsInt()) {
+ r1 = stack->popNum();
+ stack->pushReal((r1 >= 0) ? floor(r1) : ceil(r1));
+ }
+ break;
+ case psOpXor:
+ if (stack->topTwoAreInts()) {
+ i2 = stack->popInt();
+ i1 = stack->popInt();
+ stack->pushInt(i1 ^ i2);
+ } else {
+ b2 = stack->popBool();
+ b1 = stack->popBool();
+ stack->pushBool(b1 ^ b2);
+ }
+ break;
+ case psOpIf:
+ b1 = stack->popBool();
+ if (b1) {
+ exec(stack, codePtr + 2);
+ }
+ codePtr = code[codePtr + 1].blk;
+ break;
+ case psOpIfelse:
+ b1 = stack->popBool();
+ if (b1) {
+ exec(stack, codePtr + 2);
+ } else {
+ exec(stack, code[codePtr].blk);
+ }
+ codePtr = code[codePtr + 1].blk;
+ break;
+ case psOpReturn:
+ return;
+ }
+ break;
+ default:
+ error(-1, "Internal: bad object in PostScript function code");
+ break;
+ }
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.h
new file mode 100644
index 00000000000..2dcccb06a1b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Function.h
@@ -0,0 +1,244 @@
+//========================================================================
+//
+// Function.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef FUNCTION_H
+#define FUNCTION_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+
+class Dict;
+class Stream;
+struct PSObject;
+class PSStack;
+class PopplerCache;
+
+//------------------------------------------------------------------------
+// Function
+//------------------------------------------------------------------------
+
+#define funcMaxInputs 32
+#define funcMaxOutputs 32
+#define sampledFuncMaxInputs 16
+
+class Function {
+public:
+
+ Function();
+
+ virtual ~Function();
+
+ // Construct a function. Returns NULL if unsuccessful.
+ static Function *parse(Object *funcObj);
+
+ // Initialize the entries common to all function types.
+ GBool init(Dict *dict);
+
+ virtual Function *copy() = 0;
+
+ // Return the function type:
+ // -1 : identity
+ // 0 : sampled
+ // 2 : exponential
+ // 3 : stitching
+ // 4 : PostScript
+ virtual int getType() = 0;
+
+ // Return size of input and output tuples.
+ int getInputSize() { return m; }
+ int getOutputSize() { return n; }
+
+ double getDomainMin(int i) { return domain[i][0]; }
+ double getDomainMax(int i) { return domain[i][1]; }
+ double getRangeMin(int i) { return range[i][0]; }
+ double getRangeMax(int i) { return range[i][1]; }
+ GBool getHasRange() { return hasRange; }
+
+ // Transform an input tuple into an output tuple.
+ virtual void transform(double *in, double *out) = 0;
+
+ virtual GBool isOk() = 0;
+
+protected:
+
+ int m, n; // size of input and output tuples
+ double // min and max values for function domain
+ domain[funcMaxInputs][2];
+ double // min and max values for function range
+ range[funcMaxOutputs][2];
+ GBool hasRange; // set if range is defined
+};
+
+//------------------------------------------------------------------------
+// IdentityFunction
+//------------------------------------------------------------------------
+
+class IdentityFunction: public Function {
+public:
+
+ IdentityFunction();
+ virtual ~IdentityFunction();
+ virtual Function *copy() { return new IdentityFunction(); }
+ virtual int getType() { return -1; }
+ virtual void transform(double *in, double *out);
+ virtual GBool isOk() { return gTrue; }
+
+private:
+};
+
+//------------------------------------------------------------------------
+// SampledFunction
+//------------------------------------------------------------------------
+
+class SampledFunction: public Function {
+public:
+
+ SampledFunction(Object *funcObj, Dict *dict);
+ virtual ~SampledFunction();
+ virtual Function *copy() { return new SampledFunction(this); }
+ virtual int getType() { return 0; }
+ virtual void transform(double *in, double *out);
+ virtual GBool isOk() { return ok; }
+
+ int getSampleSize(int i) { return sampleSize[i]; }
+ double getEncodeMin(int i) { return encode[i][0]; }
+ double getEncodeMax(int i) { return encode[i][1]; }
+ double getDecodeMin(int i) { return decode[i][0]; }
+ double getDecodeMax(int i) { return decode[i][1]; }
+ double *getSamples() { return samples; }
+
+private:
+
+ SampledFunction(SampledFunction *func);
+
+ int // number of samples for each domain element
+ sampleSize[funcMaxInputs];
+ double // min and max values for domain encoder
+ encode[funcMaxInputs][2];
+ double // min and max values for range decoder
+ decode[funcMaxOutputs][2];
+ double // input multipliers
+ inputMul[funcMaxInputs];
+ int idxMul[funcMaxInputs]; // sample array index multipliers
+ double *samples; // the samples
+ int nSamples; // size of the samples array
+ double *sBuf; // buffer for the transform function
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// ExponentialFunction
+//------------------------------------------------------------------------
+
+class ExponentialFunction: public Function {
+public:
+
+ ExponentialFunction(Object *funcObj, Dict *dict);
+ virtual ~ExponentialFunction();
+ virtual Function *copy() { return new ExponentialFunction(this); }
+ virtual int getType() { return 2; }
+ virtual void transform(double *in, double *out);
+ virtual GBool isOk() { return ok; }
+
+ double *getC0() { return c0; }
+ double *getC1() { return c1; }
+ double getE() { return e; }
+
+private:
+
+ ExponentialFunction(ExponentialFunction *func);
+
+ double c0[funcMaxOutputs];
+ double c1[funcMaxOutputs];
+ double e;
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// StitchingFunction
+//------------------------------------------------------------------------
+
+class StitchingFunction: public Function {
+public:
+
+ StitchingFunction(Object *funcObj, Dict *dict);
+ virtual ~StitchingFunction();
+ virtual Function *copy() { return new StitchingFunction(this); }
+ virtual int getType() { return 3; }
+ virtual void transform(double *in, double *out);
+ virtual GBool isOk() { return ok; }
+
+ int getNumFuncs() { return k; }
+ Function *getFunc(int i) { return funcs[i]; }
+ double *getBounds() { return bounds; }
+ double *getEncode() { return encode; }
+ double *getScale() { return scale; }
+
+private:
+
+ StitchingFunction(StitchingFunction *func);
+
+ int k;
+ Function **funcs;
+ double *bounds;
+ double *encode;
+ double *scale;
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// PostScriptFunction
+//------------------------------------------------------------------------
+
+class PostScriptFunction: public Function {
+public:
+
+ PostScriptFunction(Object *funcObj, Dict *dict);
+ virtual ~PostScriptFunction();
+ virtual Function *copy() { return new PostScriptFunction(this); }
+ virtual int getType() { return 4; }
+ virtual void transform(double *in, double *out);
+ virtual GBool isOk() { return ok; }
+
+ GooString *getCodeString() { return codeString; }
+
+private:
+
+ PostScriptFunction(PostScriptFunction *func);
+ GBool parseCode(Stream *str, int *codePtr);
+ GooString *getToken(Stream *str);
+ void resizeCode(int newSize);
+ void exec(PSStack *stack, int codePtr);
+
+ GooString *codeString;
+ PSObject *code;
+ PSStack *stack;
+ int codeSize;
+ GBool ok;
+ PopplerCache *cache;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.cc
new file mode 100644
index 00000000000..60eb78a60b2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.cc
@@ -0,0 +1,4750 @@
+//========================================================================
+//
+// Gfx.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no>
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007, 2008 Brad Hards <bradh@kde.org>
+// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+#include <math.h>
+#include "goo/gmem.h"
+#include "goo/GooTimer.h"
+#include "goo/GooHash.h"
+#include "GlobalParams.h"
+#include "CharTypes.h"
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Stream.h"
+#include "Lexer.h"
+#include "Parser.h"
+#include "GfxFont.h"
+#include "GfxState.h"
+#include "OutputDev.h"
+#include "Page.h"
+#include "Annot.h"
+#include "Error.h"
+#include "Gfx.h"
+#include "ProfileData.h"
+#include "Catalog.h"
+#include "OptionalContent.h"
+
+// the MSVC math.h doesn't define this
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+//------------------------------------------------------------------------
+// constants
+//------------------------------------------------------------------------
+
+// Max recursive depth for a function shading fill.
+#define functionMaxDepth 6
+
+// Max delta allowed in any color component for a function shading fill.
+#define functionColorDelta (dblToCol(1 / 256.0))
+
+// Max number of splits along the t axis for an axial shading fill.
+#define axialMaxSplits 256
+
+// Max delta allowed in any color component for an axial shading fill.
+#define axialColorDelta (dblToCol(1 / 256.0))
+
+// Max number of splits along the t axis for a radial shading fill.
+#define radialMaxSplits 256
+
+// Max delta allowed in any color component for a radial shading fill.
+#define radialColorDelta (dblToCol(1 / 256.0))
+
+// Max recursive depth for a Gouraud triangle shading fill.
+#define gouraudMaxDepth 6
+
+// Max delta allowed in any color component for a Gouraud triangle
+// shading fill.
+#define gouraudColorDelta (dblToCol(1 / 256.0))
+
+// Max recursive depth for a patch mesh shading fill.
+#define patchMaxDepth 6
+
+// Max delta allowed in any color component for a patch mesh shading
+// fill.
+#define patchColorDelta (dblToCol(1 / 256.0))
+
+//------------------------------------------------------------------------
+// Operator table
+//------------------------------------------------------------------------
+
+#ifdef _MSC_VER // this works around a bug in the VC7 compiler
+# pragma optimize("",off)
+#endif
+
+Operator Gfx::opTab[] = {
+ {"\"", 3, {tchkNum, tchkNum, tchkString},
+ &Gfx::opMoveSetShowText},
+ {"'", 1, {tchkString},
+ &Gfx::opMoveShowText},
+ {"B", 0, {tchkNone},
+ &Gfx::opFillStroke},
+ {"B*", 0, {tchkNone},
+ &Gfx::opEOFillStroke},
+ {"BDC", 2, {tchkName, tchkProps},
+ &Gfx::opBeginMarkedContent},
+ {"BI", 0, {tchkNone},
+ &Gfx::opBeginImage},
+ {"BMC", 1, {tchkName},
+ &Gfx::opBeginMarkedContent},
+ {"BT", 0, {tchkNone},
+ &Gfx::opBeginText},
+ {"BX", 0, {tchkNone},
+ &Gfx::opBeginIgnoreUndef},
+ {"CS", 1, {tchkName},
+ &Gfx::opSetStrokeColorSpace},
+ {"DP", 2, {tchkName, tchkProps},
+ &Gfx::opMarkPoint},
+ {"Do", 1, {tchkName},
+ &Gfx::opXObject},
+ {"EI", 0, {tchkNone},
+ &Gfx::opEndImage},
+ {"EMC", 0, {tchkNone},
+ &Gfx::opEndMarkedContent},
+ {"ET", 0, {tchkNone},
+ &Gfx::opEndText},
+ {"EX", 0, {tchkNone},
+ &Gfx::opEndIgnoreUndef},
+ {"F", 0, {tchkNone},
+ &Gfx::opFill},
+ {"G", 1, {tchkNum},
+ &Gfx::opSetStrokeGray},
+ {"ID", 0, {tchkNone},
+ &Gfx::opImageData},
+ {"J", 1, {tchkInt},
+ &Gfx::opSetLineCap},
+ {"K", 4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetStrokeCMYKColor},
+ {"M", 1, {tchkNum},
+ &Gfx::opSetMiterLimit},
+ {"MP", 1, {tchkName},
+ &Gfx::opMarkPoint},
+ {"Q", 0, {tchkNone},
+ &Gfx::opRestore},
+ {"RG", 3, {tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetStrokeRGBColor},
+ {"S", 0, {tchkNone},
+ &Gfx::opStroke},
+ {"SC", -4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetStrokeColor},
+ {"SCN", -33, {tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN},
+ &Gfx::opSetStrokeColorN},
+ {"T*", 0, {tchkNone},
+ &Gfx::opTextNextLine},
+ {"TD", 2, {tchkNum, tchkNum},
+ &Gfx::opTextMoveSet},
+ {"TJ", 1, {tchkArray},
+ &Gfx::opShowSpaceText},
+ {"TL", 1, {tchkNum},
+ &Gfx::opSetTextLeading},
+ {"Tc", 1, {tchkNum},
+ &Gfx::opSetCharSpacing},
+ {"Td", 2, {tchkNum, tchkNum},
+ &Gfx::opTextMove},
+ {"Tf", 2, {tchkName, tchkNum},
+ &Gfx::opSetFont},
+ {"Tj", 1, {tchkString},
+ &Gfx::opShowText},
+ {"Tm", 6, {tchkNum, tchkNum, tchkNum, tchkNum,
+ tchkNum, tchkNum},
+ &Gfx::opSetTextMatrix},
+ {"Tr", 1, {tchkInt},
+ &Gfx::opSetTextRender},
+ {"Ts", 1, {tchkNum},
+ &Gfx::opSetTextRise},
+ {"Tw", 1, {tchkNum},
+ &Gfx::opSetWordSpacing},
+ {"Tz", 1, {tchkNum},
+ &Gfx::opSetHorizScaling},
+ {"W", 0, {tchkNone},
+ &Gfx::opClip},
+ {"W*", 0, {tchkNone},
+ &Gfx::opEOClip},
+ {"b", 0, {tchkNone},
+ &Gfx::opCloseFillStroke},
+ {"b*", 0, {tchkNone},
+ &Gfx::opCloseEOFillStroke},
+ {"c", 6, {tchkNum, tchkNum, tchkNum, tchkNum,
+ tchkNum, tchkNum},
+ &Gfx::opCurveTo},
+ {"cm", 6, {tchkNum, tchkNum, tchkNum, tchkNum,
+ tchkNum, tchkNum},
+ &Gfx::opConcat},
+ {"cs", 1, {tchkName},
+ &Gfx::opSetFillColorSpace},
+ {"d", 2, {tchkArray, tchkNum},
+ &Gfx::opSetDash},
+ {"d0", 2, {tchkNum, tchkNum},
+ &Gfx::opSetCharWidth},
+ {"d1", 6, {tchkNum, tchkNum, tchkNum, tchkNum,
+ tchkNum, tchkNum},
+ &Gfx::opSetCacheDevice},
+ {"f", 0, {tchkNone},
+ &Gfx::opFill},
+ {"f*", 0, {tchkNone},
+ &Gfx::opEOFill},
+ {"g", 1, {tchkNum},
+ &Gfx::opSetFillGray},
+ {"gs", 1, {tchkName},
+ &Gfx::opSetExtGState},
+ {"h", 0, {tchkNone},
+ &Gfx::opClosePath},
+ {"i", 1, {tchkNum},
+ &Gfx::opSetFlat},
+ {"j", 1, {tchkInt},
+ &Gfx::opSetLineJoin},
+ {"k", 4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetFillCMYKColor},
+ {"l", 2, {tchkNum, tchkNum},
+ &Gfx::opLineTo},
+ {"m", 2, {tchkNum, tchkNum},
+ &Gfx::opMoveTo},
+ {"n", 0, {tchkNone},
+ &Gfx::opEndPath},
+ {"q", 0, {tchkNone},
+ &Gfx::opSave},
+ {"re", 4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opRectangle},
+ {"rg", 3, {tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetFillRGBColor},
+ {"ri", 1, {tchkName},
+ &Gfx::opSetRenderingIntent},
+ {"s", 0, {tchkNone},
+ &Gfx::opCloseStroke},
+ {"sc", -4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opSetFillColor},
+ {"scn", -33, {tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN, tchkSCN, tchkSCN, tchkSCN,
+ tchkSCN},
+ &Gfx::opSetFillColorN},
+ {"sh", 1, {tchkName},
+ &Gfx::opShFill},
+ {"v", 4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opCurveTo1},
+ {"w", 1, {tchkNum},
+ &Gfx::opSetLineWidth},
+ {"y", 4, {tchkNum, tchkNum, tchkNum, tchkNum},
+ &Gfx::opCurveTo2},
+};
+
+#ifdef _MSC_VER // this works around a bug in the VC7 compiler
+# pragma optimize("",on)
+#endif
+
+#define numOps (sizeof(opTab) / sizeof(Operator))
+
+static inline GBool isSameGfxColor(const GfxColor &colorA, const GfxColor &colorB, Guint nComps, double delta) {
+ for (Guint k = 0; k < nComps; ++k) {
+ if (abs(colorA.c[k] - colorB.c[k]) > delta) {
+ return false;
+ }
+ }
+ return true;
+}
+
+//------------------------------------------------------------------------
+// GfxResources
+//------------------------------------------------------------------------
+
+GfxResources::GfxResources(XRef *xref, Dict *resDict, GfxResources *nextA) {
+ Object obj1, obj2;
+ Ref r;
+
+ if (resDict) {
+
+ // build font dictionary
+ fonts = NULL;
+ resDict->lookupNF("Font", &obj1);
+ if (obj1.isRef()) {
+ obj1.fetch(xref, &obj2);
+ if (obj2.isDict()) {
+ r = obj1.getRef();
+ fonts = new GfxFontDict(xref, &r, obj2.getDict());
+ }
+ obj2.free();
+ } else if (obj1.isDict()) {
+ fonts = new GfxFontDict(xref, NULL, obj1.getDict());
+ }
+ obj1.free();
+
+ // get XObject dictionary
+ resDict->lookup("XObject", &xObjDict);
+
+ // get color space dictionary
+ resDict->lookup("ColorSpace", &colorSpaceDict);
+
+ // get pattern dictionary
+ resDict->lookup("Pattern", &patternDict);
+
+ // get shading dictionary
+ resDict->lookup("Shading", &shadingDict);
+
+ // get graphics state parameter dictionary
+ resDict->lookup("ExtGState", &gStateDict);
+
+ // get properties dictionary
+ resDict->lookup("Properties", &propertiesDict);
+
+ } else {
+ fonts = NULL;
+ xObjDict.initNull();
+ colorSpaceDict.initNull();
+ patternDict.initNull();
+ shadingDict.initNull();
+ gStateDict.initNull();
+ propertiesDict.initNull();
+ }
+
+ next = nextA;
+}
+
+GfxResources::~GfxResources() {
+ if (fonts) {
+ delete fonts;
+ }
+ xObjDict.free();
+ colorSpaceDict.free();
+ patternDict.free();
+ shadingDict.free();
+ gStateDict.free();
+ propertiesDict.free();
+}
+
+GfxFont *GfxResources::lookupFont(char *name) {
+ GfxFont *font;
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->fonts) {
+ if ((font = resPtr->fonts->lookup(name)))
+ return font;
+ }
+ }
+ error(-1, "Unknown font tag '%s'", name);
+ return NULL;
+}
+
+GBool GfxResources::lookupXObject(char *name, Object *obj) {
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->xObjDict.isDict()) {
+ if (!resPtr->xObjDict.dictLookup(name, obj)->isNull())
+ return gTrue;
+ obj->free();
+ }
+ }
+ error(-1, "XObject '%s' is unknown", name);
+ return gFalse;
+}
+
+GBool GfxResources::lookupXObjectNF(char *name, Object *obj) {
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->xObjDict.isDict()) {
+ if (!resPtr->xObjDict.dictLookupNF(name, obj)->isNull())
+ return gTrue;
+ obj->free();
+ }
+ }
+ error(-1, "XObject '%s' is unknown", name);
+ return gFalse;
+}
+
+GBool GfxResources::lookupMarkedContentNF(char *name, Object *obj) {
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->propertiesDict.isDict()) {
+ if (!resPtr->propertiesDict.dictLookupNF(name, obj)->isNull())
+ return gTrue;
+ obj->free();
+ }
+ }
+ error(-1, "Marked Content '%s' is unknown", name);
+ return gFalse;
+}
+
+void GfxResources::lookupColorSpace(char *name, Object *obj) {
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->colorSpaceDict.isDict()) {
+ if (!resPtr->colorSpaceDict.dictLookup(name, obj)->isNull()) {
+ return;
+ }
+ obj->free();
+ }
+ }
+ obj->initNull();
+}
+
+GfxPattern *GfxResources::lookupPattern(char *name, Gfx *gfx) {
+ GfxResources *resPtr;
+ GfxPattern *pattern;
+ Object obj;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->patternDict.isDict()) {
+ if (!resPtr->patternDict.dictLookup(name, &obj)->isNull()) {
+ pattern = GfxPattern::parse(&obj, gfx);
+ obj.free();
+ return pattern;
+ }
+ obj.free();
+ }
+ }
+ error(-1, "Unknown pattern '%s'", name);
+ return NULL;
+}
+
+GfxShading *GfxResources::lookupShading(char *name, Gfx *gfx) {
+ GfxResources *resPtr;
+ GfxShading *shading;
+ Object obj;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->shadingDict.isDict()) {
+ if (!resPtr->shadingDict.dictLookup(name, &obj)->isNull()) {
+ shading = GfxShading::parse(&obj, gfx);
+ obj.free();
+ return shading;
+ }
+ obj.free();
+ }
+ }
+ error(-1, "Unknown shading '%s'", name);
+ return NULL;
+}
+
+GBool GfxResources::lookupGState(char *name, Object *obj) {
+ GfxResources *resPtr;
+
+ for (resPtr = this; resPtr; resPtr = resPtr->next) {
+ if (resPtr->gStateDict.isDict()) {
+ if (!resPtr->gStateDict.dictLookup(name, obj)->isNull()) {
+ return gTrue;
+ }
+ obj->free();
+ }
+ }
+ error(-1, "ExtGState '%s' is unknown", name);
+ return gFalse;
+}
+
+//------------------------------------------------------------------------
+// Gfx
+//------------------------------------------------------------------------
+
+Gfx::Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, Catalog *catalogA,
+ double hDPI, double vDPI, PDFRectangle *box,
+ PDFRectangle *cropBox, int rotate,
+ GBool (*abortCheckCbkA)(void *data),
+ void *abortCheckCbkDataA)
+#ifdef USE_CMS
+ : iccColorSpaceCache(5)
+#endif
+{
+ int i;
+
+ xref = xrefA;
+ catalog = catalogA;
+ subPage = gFalse;
+ printCommands = globalParams->getPrintCommands();
+ profileCommands = globalParams->getProfileCommands();
+ textHaveCSPattern = gFalse;
+ drawText = gFalse;
+ maskHaveCSPattern = gFalse;
+ mcStack = NULL;
+
+ // start the resource stack
+ res = new GfxResources(xref, resDict, NULL);
+
+ // initialize
+ out = outA;
+ state = new GfxState(hDPI, vDPI, box, rotate, out->upsideDown());
+ fontChanged = gFalse;
+ clip = clipNone;
+ ignoreUndef = 0;
+ out->startPage(pageNum, state);
+ out->setDefaultCTM(state->getCTM());
+ out->updateAll(state);
+ for (i = 0; i < 6; ++i) {
+ baseMatrix[i] = state->getCTM()[i];
+ }
+ formDepth = 0;
+ abortCheckCbk = abortCheckCbkA;
+ abortCheckCbkData = abortCheckCbkDataA;
+
+ // set crop box
+ if (cropBox) {
+ state->moveTo(cropBox->x1, cropBox->y1);
+ state->lineTo(cropBox->x2, cropBox->y1);
+ state->lineTo(cropBox->x2, cropBox->y2);
+ state->lineTo(cropBox->x1, cropBox->y2);
+ state->closePath();
+ state->clip();
+ out->clip(state);
+ state->clearPath();
+ }
+}
+
+Gfx::Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, Catalog *catalogA,
+ PDFRectangle *box, PDFRectangle *cropBox,
+ GBool (*abortCheckCbkA)(void *data),
+ void *abortCheckCbkDataA)
+ #ifdef USE_CMS
+ : iccColorSpaceCache(5)
+#endif
+{
+ int i;
+
+ xref = xrefA;
+ catalog = catalogA;
+ subPage = gTrue;
+ printCommands = globalParams->getPrintCommands();
+ profileCommands = globalParams->getProfileCommands();
+ textHaveCSPattern = gFalse;
+ drawText = gFalse;
+ maskHaveCSPattern = gFalse;
+ mcStack = NULL;
+
+ // start the resource stack
+ res = new GfxResources(xref, resDict, NULL);
+
+ // initialize
+ out = outA;
+ state = new GfxState(72, 72, box, 0, gFalse);
+ fontChanged = gFalse;
+ clip = clipNone;
+ ignoreUndef = 0;
+ for (i = 0; i < 6; ++i) {
+ baseMatrix[i] = state->getCTM()[i];
+ }
+ formDepth = 0;
+ abortCheckCbk = abortCheckCbkA;
+ abortCheckCbkData = abortCheckCbkDataA;
+
+ // set crop box
+ if (cropBox) {
+ state->moveTo(cropBox->x1, cropBox->y1);
+ state->lineTo(cropBox->x2, cropBox->y1);
+ state->lineTo(cropBox->x2, cropBox->y2);
+ state->lineTo(cropBox->x1, cropBox->y2);
+ state->closePath();
+ state->clip();
+ out->clip(state);
+ state->clearPath();
+ }
+}
+
+Gfx::~Gfx() {
+ while (state->hasSaves()) {
+ restoreState();
+ }
+ if (!subPage) {
+ out->endPage();
+ }
+ while (res) {
+ popResources();
+ }
+ if (state) {
+ delete state;
+ }
+ while (mcStack) {
+ popMarkedContent();
+ }
+}
+
+void Gfx::display(Object *obj, GBool topLevel) {
+ Object obj2;
+ int i;
+
+ if (obj->isArray()) {
+ for (i = 0; i < obj->arrayGetLength(); ++i) {
+ obj->arrayGet(i, &obj2);
+ if (!obj2.isStream()) {
+ error(-1, "Weird page contents");
+ obj2.free();
+ return;
+ }
+ obj2.free();
+ }
+ } else if (!obj->isStream()) {
+ error(-1, "Weird page contents");
+ return;
+ }
+ parser = new Parser(xref, new Lexer(xref, obj), gFalse);
+ go(topLevel);
+ delete parser;
+ parser = NULL;
+}
+
+void Gfx::go(GBool topLevel) {
+ Object obj;
+ Object args[maxArgs];
+ int numArgs, i;
+ int lastAbortCheck;
+
+ // scan a sequence of objects
+ updateLevel = lastAbortCheck = 0;
+ numArgs = 0;
+ parser->getObj(&obj);
+ while (!obj.isEOF()) {
+
+ // got a command - execute it
+ if (obj.isCmd()) {
+ if (printCommands) {
+ obj.print(stdout);
+ for (i = 0; i < numArgs; ++i) {
+ printf(" ");
+ args[i].print(stdout);
+ }
+ printf("\n");
+ fflush(stdout);
+ }
+ GooTimer timer;
+
+ // Run the operation
+ execOp(&obj, args, numArgs);
+
+ // Update the profile information
+ if (profileCommands) {
+ GooHash *hash;
+
+ hash = out->getProfileHash ();
+ if (hash) {
+ GooString *cmd_g;
+ ProfileData *data_p;
+
+ cmd_g = new GooString (obj.getCmd());
+ data_p = (ProfileData *)hash->lookup (cmd_g);
+ if (data_p == NULL) {
+ data_p = new ProfileData();
+ hash->add (cmd_g, data_p);
+ }
+
+ data_p->addElement(timer.getElapsed ());
+ }
+ }
+ obj.free();
+ for (i = 0; i < numArgs; ++i)
+ args[i].free();
+ numArgs = 0;
+
+ // periodically update display
+ if (++updateLevel >= 20000) {
+ out->dump();
+ updateLevel = 0;
+ }
+
+ // check for an abort
+ if (abortCheckCbk) {
+ if (updateLevel - lastAbortCheck > 10) {
+ if ((*abortCheckCbk)(abortCheckCbkData)) {
+ break;
+ }
+ lastAbortCheck = updateLevel;
+ }
+ }
+
+ // got an argument - save it
+ } else if (numArgs < maxArgs) {
+ args[numArgs++] = obj;
+
+ // too many arguments - something is wrong
+ } else {
+ error(getPos(), "Too many args in content stream");
+ if (printCommands) {
+ printf("throwing away arg: ");
+ obj.print(stdout);
+ printf("\n");
+ fflush(stdout);
+ }
+ obj.free();
+ }
+
+ // grab the next object
+ parser->getObj(&obj);
+ }
+ obj.free();
+
+ // args at end with no command
+ if (numArgs > 0) {
+ error(getPos(), "Leftover args in content stream");
+ if (printCommands) {
+ printf("%d leftovers:", numArgs);
+ for (i = 0; i < numArgs; ++i) {
+ printf(" ");
+ args[i].print(stdout);
+ }
+ printf("\n");
+ fflush(stdout);
+ }
+ for (i = 0; i < numArgs; ++i)
+ args[i].free();
+ }
+
+ // update display
+ if (topLevel && updateLevel > 0) {
+ out->dump();
+ }
+}
+
+void Gfx::execOp(Object *cmd, Object args[], int numArgs) {
+ Operator *op;
+ char *name;
+ Object *argPtr;
+ int i;
+
+ // find operator
+ name = cmd->getCmd();
+ if (!(op = findOp(name))) {
+ if (ignoreUndef == 0)
+ error(getPos(), "Unknown operator '%s'", name);
+ return;
+ }
+
+ // type check args
+ argPtr = args;
+ if (op->numArgs >= 0) {
+ if (numArgs < op->numArgs) {
+ error(getPos(), "Too few (%d) args to '%s' operator", numArgs, name);
+ return;
+ }
+ if (numArgs > op->numArgs) {
+#if 0
+ error(getPos(), "Too many (%d) args to '%s' operator", numArgs, name);
+#endif
+ argPtr += numArgs - op->numArgs;
+ numArgs = op->numArgs;
+ }
+ } else {
+ if (numArgs > -op->numArgs) {
+ error(getPos(), "Too many (%d) args to '%s' operator",
+ numArgs, name);
+ return;
+ }
+ }
+ for (i = 0; i < numArgs; ++i) {
+ if (!checkArg(&argPtr[i], op->tchk[i])) {
+ error(getPos(), "Arg #%d to '%s' operator is wrong type (%s)",
+ i, name, argPtr[i].getTypeName());
+ return;
+ }
+ }
+
+ // do it
+ (this->*op->func)(argPtr, numArgs);
+}
+
+Operator *Gfx::findOp(char *name) {
+ int a, b, m, cmp;
+
+ a = -1;
+ b = numOps;
+ // invariant: opTab[a] < name < opTab[b]
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ cmp = strcmp(opTab[m].name, name);
+ if (cmp < 0)
+ a = m;
+ else if (cmp > 0)
+ b = m;
+ else
+ a = b = m;
+ }
+ if (cmp != 0)
+ return NULL;
+ return &opTab[a];
+}
+
+GBool Gfx::checkArg(Object *arg, TchkType type) {
+ switch (type) {
+ case tchkBool: return arg->isBool();
+ case tchkInt: return arg->isInt();
+ case tchkNum: return arg->isNum();
+ case tchkString: return arg->isString();
+ case tchkName: return arg->isName();
+ case tchkArray: return arg->isArray();
+ case tchkProps: return arg->isDict() || arg->isName();
+ case tchkSCN: return arg->isNum() || arg->isName();
+ case tchkNone: return gFalse;
+ }
+ return gFalse;
+}
+
+int Gfx::getPos() {
+ return parser ? parser->getPos() : -1;
+}
+
+//------------------------------------------------------------------------
+// graphics state operators
+//------------------------------------------------------------------------
+
+void Gfx::opSave(Object args[], int numArgs) {
+ saveState();
+}
+
+void Gfx::opRestore(Object args[], int numArgs) {
+ restoreState();
+}
+
+void Gfx::opConcat(Object args[], int numArgs) {
+ state->concatCTM(args[0].getNum(), args[1].getNum(),
+ args[2].getNum(), args[3].getNum(),
+ args[4].getNum(), args[5].getNum());
+ out->updateCTM(state, args[0].getNum(), args[1].getNum(),
+ args[2].getNum(), args[3].getNum(),
+ args[4].getNum(), args[5].getNum());
+ fontChanged = gTrue;
+}
+
+void Gfx::opSetDash(Object args[], int numArgs) {
+ Array *a;
+ int length;
+ Object obj;
+ double *dash;
+ int i;
+
+ a = args[0].getArray();
+ length = a->getLength();
+ if (length == 0) {
+ dash = NULL;
+ } else {
+ dash = (double *)gmallocn(length, sizeof(double));
+ for (i = 0; i < length; ++i) {
+ dash[i] = a->get(i, &obj)->getNum();
+ obj.free();
+ }
+ }
+ state->setLineDash(dash, length, args[1].getNum());
+ out->updateLineDash(state);
+}
+
+void Gfx::opSetFlat(Object args[], int numArgs) {
+ state->setFlatness((int)args[0].getNum());
+ out->updateFlatness(state);
+}
+
+void Gfx::opSetLineJoin(Object args[], int numArgs) {
+ state->setLineJoin(args[0].getInt());
+ out->updateLineJoin(state);
+}
+
+void Gfx::opSetLineCap(Object args[], int numArgs) {
+ state->setLineCap(args[0].getInt());
+ out->updateLineCap(state);
+}
+
+void Gfx::opSetMiterLimit(Object args[], int numArgs) {
+ state->setMiterLimit(args[0].getNum());
+ out->updateMiterLimit(state);
+}
+
+void Gfx::opSetLineWidth(Object args[], int numArgs) {
+ state->setLineWidth(args[0].getNum());
+ out->updateLineWidth(state);
+}
+
+void Gfx::opSetExtGState(Object args[], int numArgs) {
+ Object obj1, obj2, obj3, obj4, obj5;
+ GfxBlendMode mode;
+ GBool haveFillOP;
+ Function *funcs[4];
+ GfxColor backdropColor;
+ GBool haveBackdropColor;
+ GfxColorSpace *blendingColorSpace;
+ GBool alpha, isolated, knockout;
+ int i;
+
+ if (!res->lookupGState(args[0].getName(), &obj1)) {
+ return;
+ }
+ if (!obj1.isDict()) {
+ error(getPos(), "ExtGState '%s' is wrong type", args[0].getName());
+ obj1.free();
+ return;
+ }
+ if (printCommands) {
+ printf(" gfx state dict: ");
+ obj1.print();
+ printf("\n");
+ }
+
+ // transparency support: blend mode, fill/stroke opacity
+ if (!obj1.dictLookup("BM", &obj2)->isNull()) {
+ if (state->parseBlendMode(&obj2, &mode)) {
+ state->setBlendMode(mode);
+ out->updateBlendMode(state);
+ } else {
+ error(getPos(), "Invalid blend mode in ExtGState");
+ }
+ }
+ obj2.free();
+ if (obj1.dictLookup("ca", &obj2)->isNum()) {
+ state->setFillOpacity(obj2.getNum());
+ out->updateFillOpacity(state);
+ }
+ obj2.free();
+ if (obj1.dictLookup("CA", &obj2)->isNum()) {
+ state->setStrokeOpacity(obj2.getNum());
+ out->updateStrokeOpacity(state);
+ }
+ obj2.free();
+
+ // fill/stroke overprint
+ if ((haveFillOP = (obj1.dictLookup("op", &obj2)->isBool()))) {
+ state->setFillOverprint(obj2.getBool());
+ out->updateFillOverprint(state);
+ }
+ obj2.free();
+ if (obj1.dictLookup("OP", &obj2)->isBool()) {
+ state->setStrokeOverprint(obj2.getBool());
+ out->updateStrokeOverprint(state);
+ if (!haveFillOP) {
+ state->setFillOverprint(obj2.getBool());
+ out->updateFillOverprint(state);
+ }
+ }
+ obj2.free();
+
+ // stroke adjust
+ if (obj1.dictLookup("SA", &obj2)->isBool()) {
+ state->setStrokeAdjust(obj2.getBool());
+ out->updateStrokeAdjust(state);
+ }
+ obj2.free();
+
+ // transfer function
+ if (obj1.dictLookup("TR2", &obj2)->isNull()) {
+ obj2.free();
+ obj1.dictLookup("TR", &obj2);
+ }
+ if (obj2.isName("Default") ||
+ obj2.isName("Identity")) {
+ funcs[0] = funcs[1] = funcs[2] = funcs[3] = NULL;
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ } else if (obj2.isArray() && obj2.arrayGetLength() == 4) {
+ for (i = 0; i < 4; ++i) {
+ obj2.arrayGet(i, &obj3);
+ funcs[i] = Function::parse(&obj3);
+ obj3.free();
+ if (!funcs[i]) {
+ break;
+ }
+ }
+ if (i == 4) {
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ }
+ } else if (obj2.isName() || obj2.isDict() || obj2.isStream()) {
+ if ((funcs[0] = Function::parse(&obj2))) {
+ funcs[1] = funcs[2] = funcs[3] = NULL;
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ }
+ } else if (!obj2.isNull()) {
+ error(getPos(), "Invalid transfer function in ExtGState");
+ }
+ obj2.free();
+
+ // alpha is shape
+ if (obj1.dictLookup("AIS", &obj2)->isBool()) {
+ state->setAlphaIsShape(obj2.getBool());
+ out->updateAlphaIsShape(state);
+ }
+ obj2.free();
+
+ // text knockout
+ if (obj1.dictLookup("TK", &obj2)->isBool()) {
+ state->setTextKnockout(obj2.getBool());
+ out->updateTextKnockout(state);
+ }
+ obj2.free();
+
+ // soft mask
+ if (!obj1.dictLookup("SMask", &obj2)->isNull()) {
+ if (obj2.isName("None")) {
+ out->clearSoftMask(state);
+ } else if (obj2.isDict()) {
+ if (obj2.dictLookup("S", &obj3)->isName("Alpha")) {
+ alpha = gTrue;
+ } else { // "Luminosity"
+ alpha = gFalse;
+ }
+ obj3.free();
+ funcs[0] = NULL;
+ if (!obj2.dictLookup("TR", &obj3)->isNull()) {
+ funcs[0] = Function::parse(&obj3);
+ if (funcs[0]->getInputSize() != 1 ||
+ funcs[0]->getOutputSize() != 1) {
+ error(getPos(),
+ "Invalid transfer function in soft mask in ExtGState");
+ delete funcs[0];
+ funcs[0] = NULL;
+ }
+ }
+ obj3.free();
+ if ((haveBackdropColor = obj2.dictLookup("BC", &obj3)->isArray())) {
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ backdropColor.c[i] = 0;
+ }
+ for (i = 0; i < obj3.arrayGetLength() && i < gfxColorMaxComps; ++i) {
+ obj3.arrayGet(i, &obj4);
+ if (obj4.isNum()) {
+ backdropColor.c[i] = dblToCol(obj4.getNum());
+ }
+ obj4.free();
+ }
+ }
+ obj3.free();
+ if (obj2.dictLookup("G", &obj3)->isStream()) {
+ if (obj3.streamGetDict()->lookup("Group", &obj4)->isDict()) {
+ blendingColorSpace = NULL;
+ isolated = knockout = gFalse;
+ if (!obj4.dictLookup("CS", &obj5)->isNull()) {
+ blendingColorSpace = GfxColorSpace::parse(&obj5, this);
+ }
+ obj5.free();
+ if (obj4.dictLookup("I", &obj5)->isBool()) {
+ isolated = obj5.getBool();
+ }
+ obj5.free();
+ if (obj4.dictLookup("K", &obj5)->isBool()) {
+ knockout = obj5.getBool();
+ }
+ obj5.free();
+ if (!haveBackdropColor) {
+ if (blendingColorSpace) {
+ blendingColorSpace->getDefaultColor(&backdropColor);
+ } else {
+ //~ need to get the parent or default color space (?)
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ backdropColor.c[i] = 0;
+ }
+ }
+ }
+ doSoftMask(&obj3, alpha, blendingColorSpace,
+ isolated, knockout, funcs[0], &backdropColor);
+ if (funcs[0]) {
+ delete funcs[0];
+ }
+ } else {
+ error(getPos(), "Invalid soft mask in ExtGState - missing group");
+ }
+ obj4.free();
+ } else {
+ error(getPos(), "Invalid soft mask in ExtGState - missing group");
+ }
+ obj3.free();
+ } else if (!obj2.isNull()) {
+ error(getPos(), "Invalid soft mask in ExtGState");
+ }
+ }
+ obj2.free();
+ if (obj1.dictLookup("Font", &obj2)->isArray()) {
+ GfxFont *font;
+ if (obj2.arrayGetLength() == 2) {
+ Object fargs0, fargs1;
+
+ obj2.arrayGetNF(0,&fargs0);
+ obj2.arrayGet(1,&fargs1);
+ if (fargs0.isRef() && fargs1.isNum()) {
+ Object fobj;
+ Ref r;
+
+ fargs0.fetch(xref, &fobj);
+ if (fobj.isDict()) {
+ r = fargs0.getRef();
+ font = GfxFont::makeFont(xref,args[0].getName(),r,fobj.getDict());
+ state->setFont(font,fargs1.getNum());
+ fontChanged = gTrue;
+ }
+ fobj.free();
+ }
+ fargs0.free();
+ fargs1.free();
+ } else {
+ error(getPos(), "Number of args mismatch for /Font in ExtGState");
+ }
+ }
+ obj2.free();
+ if (obj1.dictLookup("LW", &obj2)->isNum()) {
+ opSetLineWidth(&obj2,1);
+ }
+ obj2.free();
+ if (obj1.dictLookup("LC", &obj2)->isInt()) {
+ opSetLineCap(&obj2,1);
+ }
+ obj2.free();
+ if (obj1.dictLookup("LJ", &obj2)->isInt()) {
+ opSetLineJoin(&obj2,1);
+ }
+ obj2.free();
+ if (obj1.dictLookup("ML", &obj2)->isNum()) {
+ opSetMiterLimit(&obj2,1);
+ }
+ obj2.free();
+ if (obj1.dictLookup("D", &obj2)->isArray()) {
+ if (obj2.arrayGetLength() == 2) {
+ Object dargs[2];
+
+ obj2.arrayGetNF(0,&dargs[0]);
+ obj2.arrayGet(1,&dargs[1]);
+ if (dargs[0].isArray() && dargs[1].isInt()) {
+ opSetDash(dargs,2);
+ }
+ dargs[0].free();
+ dargs[1].free();
+ } else {
+ error(getPos(), "Number of args mismatch for /D in ExtGState");
+ }
+ }
+ obj2.free();
+ if (obj1.dictLookup("RI", &obj2)->isName()) {
+ opSetRenderingIntent(&obj2,1);
+ }
+ obj2.free();
+ if (obj1.dictLookup("FL", &obj2)->isNum()) {
+ opSetFlat(&obj2,1);
+ }
+ obj2.free();
+
+ obj1.free();
+}
+
+void Gfx::doSoftMask(Object *str, GBool alpha,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool knockout,
+ Function *transferFunc, GfxColor *backdropColor) {
+ Dict *dict, *resDict;
+ double m[6], bbox[4];
+ Object obj1, obj2;
+ int i;
+
+ // check for excessive recursion
+ if (formDepth > 20) {
+ return;
+ }
+
+ // get stream dict
+ dict = str->streamGetDict();
+
+ // check form type
+ dict->lookup("FormType", &obj1);
+ if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
+ error(getPos(), "Unknown form type");
+ }
+ obj1.free();
+
+ // get bounding box
+ dict->lookup("BBox", &obj1);
+ if (!obj1.isArray()) {
+ obj1.free();
+ error(getPos(), "Bad form bounding box");
+ return;
+ }
+ for (i = 0; i < 4; ++i) {
+ obj1.arrayGet(i, &obj2);
+ bbox[i] = obj2.getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ // get matrix
+ dict->lookup("Matrix", &obj1);
+ if (obj1.isArray()) {
+ for (i = 0; i < 6; ++i) {
+ obj1.arrayGet(i, &obj2);
+ m[i] = obj2.getNum();
+ obj2.free();
+ }
+ } else {
+ m[0] = 1; m[1] = 0;
+ m[2] = 0; m[3] = 1;
+ m[4] = 0; m[5] = 0;
+ }
+ obj1.free();
+
+ // get resources
+ dict->lookup("Resources", &obj1);
+ resDict = obj1.isDict() ? obj1.getDict() : (Dict *)NULL;
+
+ // draw it
+ ++formDepth;
+ doForm1(str, resDict, m, bbox, gTrue, gTrue,
+ blendingColorSpace, isolated, knockout,
+ alpha, transferFunc, backdropColor);
+ --formDepth;
+
+ if (blendingColorSpace) {
+ delete blendingColorSpace;
+ }
+ obj1.free();
+}
+
+void Gfx::opSetRenderingIntent(Object args[], int numArgs) {
+}
+
+//------------------------------------------------------------------------
+// color operators
+//------------------------------------------------------------------------
+
+void Gfx::opSetFillGray(Object args[], int numArgs) {
+ GfxColor color;
+
+ if (textHaveCSPattern) {
+ GBool needFill = out->deviceHasTextClip(state);
+ out->endTextObject(state);
+ if (needFill) {
+ doPatternFill(gTrue);
+ }
+ out->restoreState(state);
+ state->setFillPattern(NULL);
+ state->setFillColorSpace(new GfxDeviceGrayColorSpace());
+ out->updateFillColorSpace(state);
+ color.c[0] = dblToCol(args[0].getNum());
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ out->beginTextObject(state);
+ out->updateRender(state);
+ out->updateTextMat(state);
+ out->updateTextPos(state);
+ textHaveCSPattern = gFalse;
+ } else {
+ state->setFillPattern(NULL);
+ state->setFillColorSpace(new GfxDeviceGrayColorSpace());
+ out->updateFillColorSpace(state);
+ color.c[0] = dblToCol(args[0].getNum());
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ }
+}
+
+void Gfx::opSetStrokeGray(Object args[], int numArgs) {
+ GfxColor color;
+
+ state->setStrokePattern(NULL);
+ state->setStrokeColorSpace(new GfxDeviceGrayColorSpace());
+ out->updateStrokeColorSpace(state);
+ color.c[0] = dblToCol(args[0].getNum());
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+}
+
+void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ if (textHaveCSPattern) {
+ colorSpaceText = new GfxDeviceCMYKColorSpace();
+ for (i = 0; i < 4; ++i) {
+ colorText.c[i] = dblToCol(args[i].getNum());
+ }
+ } else {
+ state->setFillPattern(NULL);
+ state->setFillColorSpace(new GfxDeviceCMYKColorSpace());
+ out->updateFillColorSpace(state);
+ for (i = 0; i < 4; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ }
+}
+
+void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ state->setStrokePattern(NULL);
+ state->setStrokeColorSpace(new GfxDeviceCMYKColorSpace());
+ out->updateStrokeColorSpace(state);
+ for (i = 0; i < 4; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+}
+
+void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ if (textHaveCSPattern) {
+ colorSpaceText = new GfxDeviceRGBColorSpace();
+ for (i = 0; i < 3; ++i) {
+ colorText.c[i] = dblToCol(args[i].getNum());
+ }
+ } else {
+ state->setFillPattern(NULL);
+ state->setFillColorSpace(new GfxDeviceRGBColorSpace());
+ out->updateFillColorSpace(state);
+ for (i = 0; i < 3; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ }
+}
+
+void Gfx::opSetStrokeRGBColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ state->setStrokePattern(NULL);
+ state->setStrokeColorSpace(new GfxDeviceRGBColorSpace());
+ out->updateStrokeColorSpace(state);
+ for (i = 0; i < 3; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+}
+
+void Gfx::opSetFillColorSpace(Object args[], int numArgs) {
+ Object obj;
+ GfxColorSpace *colorSpace;
+ GfxColor color;
+
+ state->setFillPattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], this);
+ } else {
+ colorSpace = GfxColorSpace::parse(&obj, this);
+ }
+ obj.free();
+ if (colorSpace) {
+ state->setFillColorSpace(colorSpace);
+ out->updateFillColorSpace(state);
+ colorSpace->getDefaultColor(&color);
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ if (drawText) {
+ if (colorSpace->getMode() == csPattern) {
+ colorSpaceText = NULL;
+ textHaveCSPattern = gTrue;
+ out->beginTextObject(state);
+ } else if (textHaveCSPattern) {
+ GBool needFill = out->deviceHasTextClip(state);
+ out->endTextObject(state);
+ if (needFill) {
+ doPatternFill(gTrue);
+ }
+ out->beginTextObject(state);
+ out->updateRender(state);
+ out->updateTextMat(state);
+ out->updateTextPos(state);
+ textHaveCSPattern = gFalse;
+ }
+ }
+ } else {
+ error(getPos(), "Bad color space (fill)");
+ }
+}
+
+void Gfx::opSetStrokeColorSpace(Object args[], int numArgs) {
+ Object obj;
+ GfxColorSpace *colorSpace;
+ GfxColor color;
+
+ state->setStrokePattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], this);
+ } else {
+ colorSpace = GfxColorSpace::parse(&obj, this);
+ }
+ obj.free();
+ if (colorSpace) {
+ state->setStrokeColorSpace(colorSpace);
+ out->updateStrokeColorSpace(state);
+ colorSpace->getDefaultColor(&color);
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+ } else {
+ error(getPos(), "Bad color space (stroke)");
+ }
+}
+
+void Gfx::opSetFillColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ if (numArgs != state->getFillColorSpace()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'sc' command");
+ return;
+ }
+ state->setFillPattern(NULL);
+ for (i = 0; i < numArgs; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+}
+
+void Gfx::opSetStrokeColor(Object args[], int numArgs) {
+ GfxColor color;
+ int i;
+
+ if (numArgs != state->getStrokeColorSpace()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'SC' command");
+ return;
+ }
+ state->setStrokePattern(NULL);
+ for (i = 0; i < numArgs; ++i) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+}
+
+void Gfx::opSetFillColorN(Object args[], int numArgs) {
+ GfxColor color;
+ GfxPattern *pattern;
+ int i;
+
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ if (numArgs > 1) {
+ if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() ||
+ numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace())
+ ->getUnder()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'scn' command");
+ return;
+ }
+ for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
+ if (args[i].isNum()) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ }
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ }
+ if (args[numArgs-1].isName() &&
+ (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) {
+ state->setFillPattern(pattern);
+ }
+
+ } else {
+ if (numArgs != state->getFillColorSpace()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'scn' command");
+ return;
+ }
+ state->setFillPattern(NULL);
+ for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
+ if (args[i].isNum()) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ }
+ state->setFillColor(&color);
+ out->updateFillColor(state);
+ }
+}
+
+void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
+ GfxColor color;
+ GfxPattern *pattern;
+ int i;
+
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ if (numArgs > 1) {
+ if (!((GfxPatternColorSpace *)state->getStrokeColorSpace())
+ ->getUnder() ||
+ numArgs - 1 != ((GfxPatternColorSpace *)state->getStrokeColorSpace())
+ ->getUnder()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'SCN' command");
+ return;
+ }
+ for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
+ if (args[i].isNum()) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ }
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+ }
+ if (args[numArgs-1].isName() &&
+ (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) {
+ state->setStrokePattern(pattern);
+ }
+
+ } else {
+ if (numArgs != state->getStrokeColorSpace()->getNComps()) {
+ error(getPos(), "Incorrect number of arguments in 'SCN' command");
+ return;
+ }
+ state->setStrokePattern(NULL);
+ for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
+ if (args[i].isNum()) {
+ color.c[i] = dblToCol(args[i].getNum());
+ }
+ }
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+ }
+}
+
+//------------------------------------------------------------------------
+// path segment operators
+//------------------------------------------------------------------------
+
+void Gfx::opMoveTo(Object args[], int numArgs) {
+ state->moveTo(args[0].getNum(), args[1].getNum());
+}
+
+void Gfx::opLineTo(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ error(getPos(), "No current point in lineto");
+ return;
+ }
+ state->lineTo(args[0].getNum(), args[1].getNum());
+}
+
+void Gfx::opCurveTo(Object args[], int numArgs) {
+ double x1, y1, x2, y2, x3, y3;
+
+ if (!state->isCurPt()) {
+ error(getPos(), "No current point in curveto");
+ return;
+ }
+ x1 = args[0].getNum();
+ y1 = args[1].getNum();
+ x2 = args[2].getNum();
+ y2 = args[3].getNum();
+ x3 = args[4].getNum();
+ y3 = args[5].getNum();
+ state->curveTo(x1, y1, x2, y2, x3, y3);
+}
+
+void Gfx::opCurveTo1(Object args[], int numArgs) {
+ double x1, y1, x2, y2, x3, y3;
+
+ if (!state->isCurPt()) {
+ error(getPos(), "No current point in curveto1");
+ return;
+ }
+ x1 = state->getCurX();
+ y1 = state->getCurY();
+ x2 = args[0].getNum();
+ y2 = args[1].getNum();
+ x3 = args[2].getNum();
+ y3 = args[3].getNum();
+ state->curveTo(x1, y1, x2, y2, x3, y3);
+}
+
+void Gfx::opCurveTo2(Object args[], int numArgs) {
+ double x1, y1, x2, y2, x3, y3;
+
+ if (!state->isCurPt()) {
+ error(getPos(), "No current point in curveto2");
+ return;
+ }
+ x1 = args[0].getNum();
+ y1 = args[1].getNum();
+ x2 = args[2].getNum();
+ y2 = args[3].getNum();
+ x3 = x2;
+ y3 = y2;
+ state->curveTo(x1, y1, x2, y2, x3, y3);
+}
+
+void Gfx::opRectangle(Object args[], int numArgs) {
+ double x, y, w, h;
+
+ x = args[0].getNum();
+ y = args[1].getNum();
+ w = args[2].getNum();
+ h = args[3].getNum();
+ state->moveTo(x, y);
+ state->lineTo(x + w, y);
+ state->lineTo(x + w, y + h);
+ state->lineTo(x, y + h);
+ state->closePath();
+}
+
+void Gfx::opClosePath(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ error(getPos(), "No current point in closepath");
+ return;
+ }
+ state->closePath();
+}
+
+//------------------------------------------------------------------------
+// path painting operators
+//------------------------------------------------------------------------
+
+void Gfx::opEndPath(Object args[], int numArgs) {
+ doEndPath();
+}
+
+void Gfx::opStroke(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in stroke");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opCloseStroke(Object * /*args[]*/, int /*numArgs*/) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in closepath/stroke");
+ return;
+ }
+ state->closePath();
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opFill(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in fill");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gFalse);
+ } else {
+ out->fill(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opEOFill(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in eofill");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gTrue);
+ } else {
+ out->eoFill(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opFillStroke(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in fill/stroke");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gFalse);
+ } else {
+ out->fill(state);
+ }
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opCloseFillStroke(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in closepath/fill/stroke");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ state->closePath();
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gFalse);
+ } else {
+ out->fill(state);
+ }
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opEOFillStroke(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in eofill/stroke");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gTrue);
+ } else {
+ out->eoFill(state);
+ }
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::opCloseEOFillStroke(Object args[], int numArgs) {
+ if (!state->isCurPt()) {
+ //error(getPos(), "No path in closepath/eofill/stroke");
+ return;
+ }
+ if (state->isPath() && !contentIsHidden()) {
+ state->closePath();
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ doPatternFill(gTrue);
+ } else {
+ out->eoFill(state);
+ }
+ if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ doPatternStroke();
+ } else {
+ out->stroke(state);
+ }
+ }
+ doEndPath();
+}
+
+void Gfx::doPatternFill(GBool eoFill) {
+ GfxPattern *pattern;
+
+ // this is a bit of a kludge -- patterns can be really slow, so we
+ // skip them if we're only doing text extraction, since they almost
+ // certainly don't contain any text
+ if (!out->needNonText()) {
+ return;
+ }
+
+ if (!(pattern = state->getFillPattern())) {
+ return;
+ }
+ switch (pattern->getType()) {
+ case 1:
+ doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, eoFill);
+ break;
+ case 2:
+ doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, eoFill);
+ break;
+ default:
+ error(getPos(), "Unimplemented pattern type (%d) in fill",
+ pattern->getType());
+ break;
+ }
+}
+
+void Gfx::doPatternStroke() {
+ GfxPattern *pattern;
+
+ // this is a bit of a kludge -- patterns can be really slow, so we
+ // skip them if we're only doing text extraction, since they almost
+ // certainly don't contain any text
+ if (!out->needNonText()) {
+ return;
+ }
+
+ if (!(pattern = state->getStrokePattern())) {
+ return;
+ }
+ switch (pattern->getType()) {
+ case 1:
+ doTilingPatternFill((GfxTilingPattern *)pattern, gTrue, gFalse);
+ break;
+ case 2:
+ doShadingPatternFill((GfxShadingPattern *)pattern, gTrue, gFalse);
+ break;
+ default:
+ error(getPos(), "Unimplemented pattern type (%d) in stroke",
+ pattern->getType());
+ break;
+ }
+}
+
+void Gfx::doTilingPatternFill(GfxTilingPattern *tPat,
+ GBool stroke, GBool eoFill) {
+ GfxPatternColorSpace *patCS;
+ GfxColorSpace *cs;
+ GfxColor color;
+ GfxPath *savedPath;
+ double xMin, yMin, xMax, yMax, x, y, x1, y1;
+ double cxMin, cyMin, cxMax, cyMax;
+ int xi0, yi0, xi1, yi1, xi, yi;
+ double *ctm, *btm, *ptm;
+ double m[6], ictm[6], m1[6], imb[6];
+ double det;
+ double xstep, ystep;
+ int i;
+
+ // get color space
+ patCS = (GfxPatternColorSpace *)(stroke ? state->getStrokeColorSpace()
+ : state->getFillColorSpace());
+
+ // construct a (pattern space) -> (current space) transform matrix
+ ctm = state->getCTM();
+ btm = baseMatrix;
+ ptm = tPat->getMatrix();
+ // iCTM = invert CTM
+ det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]);
+ ictm[0] = ctm[3] * det;
+ ictm[1] = -ctm[1] * det;
+ ictm[2] = -ctm[2] * det;
+ ictm[3] = ctm[0] * det;
+ ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det;
+ ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det;
+ // m1 = PTM * BTM = PTM * base transform matrix
+ m1[0] = ptm[0] * btm[0] + ptm[1] * btm[2];
+ m1[1] = ptm[0] * btm[1] + ptm[1] * btm[3];
+ m1[2] = ptm[2] * btm[0] + ptm[3] * btm[2];
+ m1[3] = ptm[2] * btm[1] + ptm[3] * btm[3];
+ m1[4] = ptm[4] * btm[0] + ptm[5] * btm[2] + btm[4];
+ m1[5] = ptm[4] * btm[1] + ptm[5] * btm[3] + btm[5];
+ // m = m1 * iCTM = (PTM * BTM) * (iCTM)
+ m[0] = m1[0] * ictm[0] + m1[1] * ictm[2];
+ m[1] = m1[0] * ictm[1] + m1[1] * ictm[3];
+ m[2] = m1[2] * ictm[0] + m1[3] * ictm[2];
+ m[3] = m1[2] * ictm[1] + m1[3] * ictm[3];
+ m[4] = m1[4] * ictm[0] + m1[5] * ictm[2] + ictm[4];
+ m[5] = m1[4] * ictm[1] + m1[5] * ictm[3] + ictm[5];
+
+ // construct a (device space) -> (pattern space) transform matrix
+ det = 1 / (m1[0] * m1[3] - m1[1] * m1[2]);
+ imb[0] = m1[3] * det;
+ imb[1] = -m1[1] * det;
+ imb[2] = -m1[2] * det;
+ imb[3] = m1[0] * det;
+ imb[4] = (m1[2] * m1[5] - m1[3] * m1[4]) * det;
+ imb[5] = (m1[1] * m1[4] - m1[0] * m1[5]) * det;
+
+ // save current graphics state
+ savedPath = state->getPath()->copy();
+ saveState();
+
+ // set underlying color space (for uncolored tiling patterns); set
+ // various other parameters (stroke color, line width) to match
+ // Adobe's behavior
+ if (tPat->getPaintType() == 2 && (cs = patCS->getUnder())) {
+ state->setFillColorSpace(cs->copy());
+ out->updateFillColorSpace(state);
+ state->setStrokeColorSpace(cs->copy());
+ out->updateStrokeColorSpace(state);
+ if (stroke) {
+ state->setFillColor(state->getStrokeColor());
+ } else {
+ state->setStrokeColor(state->getFillColor());
+ }
+ } else {
+ cs = new GfxDeviceGrayColorSpace();
+ state->setFillColorSpace(cs);
+ cs->getDefaultColor(&color);
+ state->setFillColor(&color);
+ out->updateFillColorSpace(state);
+ state->setStrokeColorSpace(new GfxDeviceGrayColorSpace());
+ state->setStrokeColor(&color);
+ out->updateStrokeColorSpace(state);
+ }
+ state->setFillPattern(NULL);
+ out->updateFillColor(state);
+ state->setStrokePattern(NULL);
+ out->updateStrokeColor(state);
+
+ // clip to current path
+ if (stroke) {
+ state->clipToStrokePath();
+ out->clipToStrokePath(state);
+ } else if (!textHaveCSPattern && !maskHaveCSPattern) {
+ state->clip();
+ if (eoFill) {
+ out->eoClip(state);
+ } else {
+ out->clip(state);
+ }
+ }
+ state->clearPath();
+ state->setLineWidth(0);
+ out->updateLineWidth(state);
+
+ // get the clip region, check for empty
+ state->getClipBBox(&cxMin, &cyMin, &cxMax, &cyMax);
+ if (cxMin > cxMax || cyMin > cyMax) {
+ goto restore;
+ }
+
+ // transform clip region bbox to pattern space
+ xMin = xMax = cxMin * imb[0] + cyMin * imb[2] + imb[4];
+ yMin = yMax = cxMin * imb[1] + cyMin * imb[3] + imb[5];
+ x1 = cxMin * imb[0] + cyMax * imb[2] + imb[4];
+ y1 = cxMin * imb[1] + cyMax * imb[3] + imb[5];
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ x1 = cxMax * imb[0] + cyMin * imb[2] + imb[4];
+ y1 = cxMax * imb[1] + cyMin * imb[3] + imb[5];
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ x1 = cxMax * imb[0] + cyMax * imb[2] + imb[4];
+ y1 = cxMax * imb[1] + cyMax * imb[3] + imb[5];
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+
+ // draw the pattern
+ //~ this should treat negative steps differently -- start at right/top
+ //~ edge instead of left/bottom (?)
+ xstep = fabs(tPat->getXStep());
+ ystep = fabs(tPat->getYStep());
+ xi0 = (int)ceil((xMin - tPat->getBBox()[2]) / xstep);
+ xi1 = (int)floor((xMax - tPat->getBBox()[0]) / xstep) + 1;
+ yi0 = (int)ceil((yMin - tPat->getBBox()[3]) / ystep);
+ yi1 = (int)floor((yMax - tPat->getBBox()[1]) / ystep) + 1;
+ for (i = 0; i < 4; ++i) {
+ m1[i] = m[i];
+ }
+ if (!contentIsHidden()) {
+ m1[4] = m[4];
+ m1[5] = m[5];
+ if (out->useTilingPatternFill() &&
+ out->tilingPatternFill(state, tPat->getContentStream(),
+ tPat->getPaintType(), tPat->getResDict(),
+ m1, tPat->getBBox(),
+ xi0, yi0, xi1, yi1, xstep, ystep)) {
+ goto restore;
+ } else {
+ for (yi = yi0; yi < yi1; ++yi) {
+ for (xi = xi0; xi < xi1; ++xi) {
+ x = xi * xstep;
+ y = yi * ystep;
+ m1[4] = x * m[0] + y * m[2] + m[4];
+ m1[5] = x * m[1] + y * m[3] + m[5];
+ doForm1(tPat->getContentStream(), tPat->getResDict(),
+ m1, tPat->getBBox());
+ }
+ }
+ }
+ }
+
+ // restore graphics state
+ restore:
+ restoreState();
+ state->setPath(savedPath);
+}
+
+void Gfx::doShadingPatternFill(GfxShadingPattern *sPat,
+ GBool stroke, GBool eoFill) {
+ GfxShading *shading;
+ GfxPath *savedPath;
+ double *ctm, *btm, *ptm;
+ double m[6], ictm[6], m1[6];
+ double xMin, yMin, xMax, yMax;
+ double det;
+
+ shading = sPat->getShading();
+
+ // save current graphics state
+ savedPath = state->getPath()->copy();
+ saveState();
+
+ // clip to bbox
+ if (shading->getHasBBox()) {
+ shading->getBBox(&xMin, &yMin, &xMax, &yMax);
+ state->moveTo(xMin, yMin);
+ state->lineTo(xMax, yMin);
+ state->lineTo(xMax, yMax);
+ state->lineTo(xMin, yMax);
+ state->closePath();
+ state->clip();
+ out->clip(state);
+ state->setPath(savedPath->copy());
+ }
+
+ // clip to current path
+ if (stroke) {
+ state->clipToStrokePath();
+ out->clipToStrokePath(state);
+ } else if (!textHaveCSPattern && !maskHaveCSPattern) {
+ state->clip();
+ if (eoFill) {
+ out->eoClip(state);
+ } else {
+ out->clip(state);
+ }
+ }
+
+ // set the color space
+ state->setFillColorSpace(shading->getColorSpace()->copy());
+ out->updateFillColorSpace(state);
+
+ // background color fill
+ if (shading->getHasBackground()) {
+ state->setFillColor(shading->getBackground());
+ out->updateFillColor(state);
+ if (!contentIsHidden())
+ out->fill(state);
+ }
+ state->clearPath();
+
+ // construct a (pattern space) -> (current space) transform matrix
+ ctm = state->getCTM();
+ btm = baseMatrix;
+ ptm = sPat->getMatrix();
+ // iCTM = invert CTM
+ det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]);
+ ictm[0] = ctm[3] * det;
+ ictm[1] = -ctm[1] * det;
+ ictm[2] = -ctm[2] * det;
+ ictm[3] = ctm[0] * det;
+ ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det;
+ ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det;
+ // m1 = PTM * BTM = PTM * base transform matrix
+ m1[0] = ptm[0] * btm[0] + ptm[1] * btm[2];
+ m1[1] = ptm[0] * btm[1] + ptm[1] * btm[3];
+ m1[2] = ptm[2] * btm[0] + ptm[3] * btm[2];
+ m1[3] = ptm[2] * btm[1] + ptm[3] * btm[3];
+ m1[4] = ptm[4] * btm[0] + ptm[5] * btm[2] + btm[4];
+ m1[5] = ptm[4] * btm[1] + ptm[5] * btm[3] + btm[5];
+ // m = m1 * iCTM = (PTM * BTM) * (iCTM)
+ m[0] = m1[0] * ictm[0] + m1[1] * ictm[2];
+ m[1] = m1[0] * ictm[1] + m1[1] * ictm[3];
+ m[2] = m1[2] * ictm[0] + m1[3] * ictm[2];
+ m[3] = m1[2] * ictm[1] + m1[3] * ictm[3];
+ m[4] = m1[4] * ictm[0] + m1[5] * ictm[2] + ictm[4];
+ m[5] = m1[4] * ictm[1] + m1[5] * ictm[3] + ictm[5];
+
+ // set the new matrix
+ state->concatCTM(m[0], m[1], m[2], m[3], m[4], m[5]);
+ out->updateCTM(state, m[0], m[1], m[2], m[3], m[4], m[5]);
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ GBool vaa = out->getVectorAntialias();
+ if (vaa) {
+ out->setVectorAntialias(gFalse);
+ }
+#endif
+
+ // do shading type-specific operations
+ switch (shading->getType()) {
+ case 1:
+ doFunctionShFill((GfxFunctionShading *)shading);
+ break;
+ case 2:
+ doAxialShFill((GfxAxialShading *)shading);
+ break;
+ case 3:
+ doRadialShFill((GfxRadialShading *)shading);
+ break;
+ case 4:
+ case 5:
+ doGouraudTriangleShFill((GfxGouraudTriangleShading *)shading);
+ break;
+ case 6:
+ case 7:
+ doPatchMeshShFill((GfxPatchMeshShading *)shading);
+ break;
+ }
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ if (vaa) {
+ out->setVectorAntialias(gTrue);
+ }
+#endif
+
+ // restore graphics state
+ restoreState();
+ state->setPath(savedPath);
+}
+
+void Gfx::opShFill(Object args[], int numArgs) {
+ GfxShading *shading;
+ GfxPath *savedPath;
+ double xMin, yMin, xMax, yMax;
+
+ if (!(shading = res->lookupShading(args[0].getName(), this))) {
+ return;
+ }
+
+ // save current graphics state
+ savedPath = state->getPath()->copy();
+ saveState();
+
+ // clip to bbox
+ if (shading->getHasBBox()) {
+ shading->getBBox(&xMin, &yMin, &xMax, &yMax);
+ state->moveTo(xMin, yMin);
+ state->lineTo(xMax, yMin);
+ state->lineTo(xMax, yMax);
+ state->lineTo(xMin, yMax);
+ state->closePath();
+ state->clip();
+ out->clip(state);
+ state->clearPath();
+ }
+
+ // set the color space
+ state->setFillColorSpace(shading->getColorSpace()->copy());
+ out->updateFillColorSpace(state);
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ GBool vaa = out->getVectorAntialias();
+ if (vaa) {
+ out->setVectorAntialias(gFalse);
+ }
+#endif
+
+ // do shading type-specific operations
+ switch (shading->getType()) {
+ case 1:
+ doFunctionShFill((GfxFunctionShading *)shading);
+ break;
+ case 2:
+ doAxialShFill((GfxAxialShading *)shading);
+ break;
+ case 3:
+ doRadialShFill((GfxRadialShading *)shading);
+ break;
+ case 4:
+ case 5:
+ doGouraudTriangleShFill((GfxGouraudTriangleShading *)shading);
+ break;
+ case 6:
+ case 7:
+ doPatchMeshShFill((GfxPatchMeshShading *)shading);
+ break;
+ }
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ if (vaa) {
+ out->setVectorAntialias(gTrue);
+ }
+#endif
+
+ // restore graphics state
+ restoreState();
+ state->setPath(savedPath);
+
+ delete shading;
+}
+
+void Gfx::doFunctionShFill(GfxFunctionShading *shading) {
+ double x0, y0, x1, y1;
+ GfxColor colors[4];
+
+ if (out->useShadedFills() &&
+ out->functionShadedFill(state, shading)) {
+ return;
+ }
+
+ shading->getDomain(&x0, &y0, &x1, &y1);
+ shading->getColor(x0, y0, &colors[0]);
+ shading->getColor(x0, y1, &colors[1]);
+ shading->getColor(x1, y0, &colors[2]);
+ shading->getColor(x1, y1, &colors[3]);
+ doFunctionShFill1(shading, x0, y0, x1, y1, colors, 0);
+}
+
+void Gfx::doFunctionShFill1(GfxFunctionShading *shading,
+ double x0, double y0,
+ double x1, double y1,
+ GfxColor *colors, int depth) {
+ GfxColor fillColor;
+ GfxColor color0M, color1M, colorM0, colorM1, colorMM;
+ GfxColor colors2[4];
+ double *matrix;
+ double xM, yM;
+ int nComps, i, j;
+
+ nComps = shading->getColorSpace()->getNComps();
+ matrix = shading->getMatrix();
+
+ // compare the four corner colors
+ for (i = 0; i < 4; ++i) {
+ for (j = 0; j < nComps; ++j) {
+ if (abs(colors[i].c[j] - colors[(i+1)&3].c[j]) > functionColorDelta) {
+ break;
+ }
+ }
+ if (j < nComps) {
+ break;
+ }
+ }
+
+ // center of the rectangle
+ xM = 0.5 * (x0 + x1);
+ yM = 0.5 * (y0 + y1);
+
+ // the four corner colors are close (or we hit the recursive limit)
+ // -- fill the rectangle; but require at least one subdivision
+ // (depth==0) to avoid problems when the four outer corners of the
+ // shaded region are the same color
+ if ((i == 4 && depth > 0) || depth == functionMaxDepth) {
+
+ // use the center color
+ shading->getColor(xM, yM, &fillColor);
+ state->setFillColor(&fillColor);
+ out->updateFillColor(state);
+
+ // fill the rectangle
+ state->moveTo(x0 * matrix[0] + y0 * matrix[2] + matrix[4],
+ x0 * matrix[1] + y0 * matrix[3] + matrix[5]);
+ state->lineTo(x1 * matrix[0] + y0 * matrix[2] + matrix[4],
+ x1 * matrix[1] + y0 * matrix[3] + matrix[5]);
+ state->lineTo(x1 * matrix[0] + y1 * matrix[2] + matrix[4],
+ x1 * matrix[1] + y1 * matrix[3] + matrix[5]);
+ state->lineTo(x0 * matrix[0] + y1 * matrix[2] + matrix[4],
+ x0 * matrix[1] + y1 * matrix[3] + matrix[5]);
+ state->closePath();
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+
+ // the four corner colors are not close enough -- subdivide the
+ // rectangle
+ } else {
+
+ // colors[0] colorM0 colors[2]
+ // (x0,y0) (xM,y0) (x1,y0)
+ // +----------+----------+
+ // | | |
+ // | UL | UR |
+ // color0M | colorMM | color1M
+ // (x0,yM) +----------+----------+ (x1,yM)
+ // | (xM,yM) |
+ // | LL | LR |
+ // | | |
+ // +----------+----------+
+ // colors[1] colorM1 colors[3]
+ // (x0,y1) (xM,y1) (x1,y1)
+
+ shading->getColor(x0, yM, &color0M);
+ shading->getColor(x1, yM, &color1M);
+ shading->getColor(xM, y0, &colorM0);
+ shading->getColor(xM, y1, &colorM1);
+ shading->getColor(xM, yM, &colorMM);
+
+ // upper-left sub-rectangle
+ colors2[0] = colors[0];
+ colors2[1] = color0M;
+ colors2[2] = colorM0;
+ colors2[3] = colorMM;
+ doFunctionShFill1(shading, x0, y0, xM, yM, colors2, depth + 1);
+
+ // lower-left sub-rectangle
+ colors2[0] = color0M;
+ colors2[1] = colors[1];
+ colors2[2] = colorMM;
+ colors2[3] = colorM1;
+ doFunctionShFill1(shading, x0, yM, xM, y1, colors2, depth + 1);
+
+ // upper-right sub-rectangle
+ colors2[0] = colorM0;
+ colors2[1] = colorMM;
+ colors2[2] = colors[2];
+ colors2[3] = color1M;
+ doFunctionShFill1(shading, xM, y0, x1, yM, colors2, depth + 1);
+
+ // lower-right sub-rectangle
+ colors2[0] = colorMM;
+ colors2[1] = colorM1;
+ colors2[2] = color1M;
+ colors2[3] = colors[3];
+ doFunctionShFill1(shading, xM, yM, x1, y1, colors2, depth + 1);
+ }
+}
+
+static void bubbleSort(double array[])
+{
+ for (int j = 0; j < 3; ++j) {
+ int kk = j;
+ for (int k = j + 1; k < 4; ++k) {
+ if (array[k] < array[kk]) {
+ kk = k;
+ }
+ }
+ double tmp = array[j];
+ array[j] = array[kk];
+ array[kk] = tmp;
+ }
+}
+
+void Gfx::doAxialShFill(GfxAxialShading *shading) {
+ double xMin, yMin, xMax, yMax;
+ double x0, y0, x1, y1;
+ double dx, dy, mul;
+ GBool dxZero, dyZero;
+ double bboxIntersections[4];
+ double tMin, tMax, tx, ty;
+ double s[4], sMin, sMax, tmp;
+ double ux0, uy0, ux1, uy1, vx0, vy0, vx1, vy1;
+ double t0, t1, tt;
+ double ta[axialMaxSplits + 1];
+ int next[axialMaxSplits + 1];
+ GfxColor color0, color1;
+ int nComps;
+ int i, j, k;
+ GBool needExtend = gTrue;
+
+ // get the clip region bbox
+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
+
+ // compute min and max t values, based on the four corners of the
+ // clip region bbox
+ shading->getCoords(&x0, &y0, &x1, &y1);
+ dx = x1 - x0;
+ dy = y1 - y0;
+ dxZero = fabs(dx) < 0.01;
+ dyZero = fabs(dy) < 0.01;
+ if (dxZero && dyZero) {
+ tMin = tMax = 0;
+ } else {
+ mul = 1 / (dx * dx + dy * dy);
+ bboxIntersections[0] = ((xMin - x0) * dx + (yMin - y0) * dy) * mul;
+ bboxIntersections[1] = ((xMin - x0) * dx + (yMax - y0) * dy) * mul;
+ bboxIntersections[2] = ((xMax - x0) * dx + (yMin - y0) * dy) * mul;
+ bboxIntersections[3] = ((xMax - x0) * dx + (yMax - y0) * dy) * mul;
+ bubbleSort(bboxIntersections);
+ tMin = bboxIntersections[0];
+ tMax = bboxIntersections[3];
+ if (tMin < 0 && !shading->getExtend0()) {
+ tMin = 0;
+ }
+ if (tMax > 1 && !shading->getExtend1()) {
+ tMax = 1;
+ }
+ }
+
+ if (out->useShadedFills() &&
+ out->axialShadedFill(state, shading, tMin, tMax)) {
+ return;
+ }
+
+ // get the function domain
+ t0 = shading->getDomain0();
+ t1 = shading->getDomain1();
+
+ // Traverse the t axis and do the shading.
+ //
+ // For each point (tx, ty) on the t axis, consider a line through
+ // that point perpendicular to the t axis:
+ //
+ // x(s) = tx + s * -dy --> s = (x - tx) / -dy
+ // y(s) = ty + s * dx --> s = (y - ty) / dx
+ //
+ // Then look at the intersection of this line with the bounding box
+ // (xMin, yMin, xMax, yMax). In the general case, there are four
+ // intersection points:
+ //
+ // s0 = (xMin - tx) / -dy
+ // s1 = (xMax - tx) / -dy
+ // s2 = (yMin - ty) / dx
+ // s3 = (yMax - ty) / dx
+ //
+ // and we want the middle two s values.
+ //
+ // In the case where dx = 0, take s0 and s1; in the case where dy =
+ // 0, take s2 and s3.
+ //
+ // Each filled polygon is bounded by two of these line segments
+ // perpdendicular to the t axis.
+ //
+ // The t axis is bisected into smaller regions until the color
+ // difference across a region is small enough, and then the region
+ // is painted with a single color.
+
+ // set up: require at least one split to avoid problems when the two
+ // ends of the t axis have the same color
+ nComps = shading->getColorSpace()->getNComps();
+ ta[0] = tMin;
+ next[0] = axialMaxSplits / 2;
+ ta[axialMaxSplits / 2] = 0.5 * (tMin + tMax);
+ next[axialMaxSplits / 2] = axialMaxSplits;
+ ta[axialMaxSplits] = tMax;
+
+ // compute the color at t = tMin
+ if (tMin < 0) {
+ tt = t0;
+ } else if (tMin > 1) {
+ tt = t1;
+ } else {
+ tt = t0 + (t1 - t0) * tMin;
+ }
+ shading->getColor(tt, &color0);
+
+ if (out->useFillColorStop()) {
+ // make sure we add stop color when t = tMin
+ state->setFillColor(&color0);
+ out->updateFillColorStop(state, (tt - tMin)/(tMax - tMin));
+ }
+
+ // compute the coordinates of the point on the t axis at t = tMin;
+ // then compute the intersection of the perpendicular line with the
+ // bounding box
+ tx = x0 + tMin * dx;
+ ty = y0 + tMin * dy;
+ if (dxZero && dyZero) {
+ sMin = sMax = 0;
+ } else if (dxZero) {
+ sMin = (xMin - tx) / -dy;
+ sMax = (xMax - tx) / -dy;
+ if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; }
+ } else if (dyZero) {
+ sMin = (yMin - ty) / dx;
+ sMax = (yMax - ty) / dx;
+ if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; }
+ } else {
+ s[0] = (yMin - ty) / dx;
+ s[1] = (yMax - ty) / dx;
+ s[2] = (xMin - tx) / -dy;
+ s[3] = (xMax - tx) / -dy;
+ bubbleSort(s);
+ sMin = s[1];
+ sMax = s[2];
+ }
+ ux0 = tx - sMin * dy;
+ uy0 = ty + sMin * dx;
+ vx0 = tx - sMax * dy;
+ vy0 = ty + sMax * dx;
+
+ i = 0;
+ bool doneBBox1, doneBBox2;
+ if (dxZero && dyZero) {
+ doneBBox1 = doneBBox2 = true;
+ } else {
+ doneBBox1 = bboxIntersections[1] < tMin;
+ doneBBox2 = bboxIntersections[2] > tMax;
+ }
+
+ // If output device doesn't support the extended mode required
+ // we have to do it here
+ needExtend = !out->axialShadedSupportExtend(state, shading);
+
+ while (i < axialMaxSplits) {
+
+ // bisect until color difference is small enough or we hit the
+ // bisection limit
+ j = next[i];
+ while (j > i + 1) {
+ if (ta[j] < 0) {
+ tt = t0;
+ } else if (ta[j] > 1) {
+ tt = t1;
+ } else {
+ tt = t0 + (t1 - t0) * ta[j];
+ }
+ shading->getColor(tt, &color1);
+ if (isSameGfxColor(color1, color0, nComps, axialColorDelta)) {
+ // in these two if what we guarantee is that if we are skipping lots of
+ // positions because the colors are the same, we still create a region
+ // with vertexs passing by bboxIntersections[1] and bboxIntersections[2]
+ // otherwise we can have empty regions that should really be painted
+ // like happened in bug 19896
+ // What we do to ensure that we pass a line through this points
+ // is making sure use the exact bboxIntersections[] value as one of the used ta[] values
+ if (!doneBBox1 && ta[i] < bboxIntersections[1] && ta[j] > bboxIntersections[1]) {
+ int teoricalj = (int) ((bboxIntersections[1] - tMin) * axialMaxSplits / (tMax - tMin));
+ if (teoricalj <= i) teoricalj = i + 1;
+ if (teoricalj < j) {
+ next[i] = teoricalj;
+ next[teoricalj] = j;
+ }
+ else {
+ teoricalj = j;
+ }
+ ta[teoricalj] = bboxIntersections[1];
+ j = teoricalj;
+ doneBBox1 = true;
+ }
+ if (!doneBBox2 && ta[i] < bboxIntersections[2] && ta[j] > bboxIntersections[2]) {
+ int teoricalj = (int) ((bboxIntersections[2] - tMin) * axialMaxSplits / (tMax - tMin));
+ if (teoricalj <= i) teoricalj = i + 1;
+ if (teoricalj < j) {
+ next[i] = teoricalj;
+ next[teoricalj] = j;
+ }
+ else {
+ teoricalj = j;
+ }
+ ta[teoricalj] = bboxIntersections[2];
+ j = teoricalj;
+ doneBBox2 = true;
+ }
+ break;
+ }
+ k = (i + j) / 2;
+ ta[k] = 0.5 * (ta[i] + ta[j]);
+ next[i] = k;
+ next[k] = j;
+ j = k;
+ }
+
+ // use the average of the colors of the two sides of the region
+ for (k = 0; k < nComps; ++k) {
+ color0.c[k] = (color0.c[k] + color1.c[k]) / 2;
+ }
+
+ // compute the coordinates of the point on the t axis; then
+ // compute the intersection of the perpendicular line with the
+ // bounding box
+ tx = x0 + ta[j] * dx;
+ ty = y0 + ta[j] * dy;
+ if (dxZero && dyZero) {
+ sMin = sMax = 0;
+ } else if (dxZero) {
+ sMin = (xMin - tx) / -dy;
+ sMax = (xMax - tx) / -dy;
+ if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; }
+ } else if (dyZero) {
+ sMin = (yMin - ty) / dx;
+ sMax = (yMax - ty) / dx;
+ if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; }
+ } else {
+ s[0] = (yMin - ty) / dx;
+ s[1] = (yMax - ty) / dx;
+ s[2] = (xMin - tx) / -dy;
+ s[3] = (xMax - tx) / -dy;
+ bubbleSort(s);
+ sMin = s[1];
+ sMax = s[2];
+ }
+ ux1 = tx - sMin * dy;
+ uy1 = ty + sMin * dx;
+ vx1 = tx - sMax * dy;
+ vy1 = ty + sMax * dx;
+
+ // set the color
+ state->setFillColor(&color0);
+ if (out->useFillColorStop())
+ out->updateFillColorStop(state, (ta[j] - tMin)/(tMax - tMin));
+ else
+ out->updateFillColor(state);
+
+ if (needExtend) {
+ // fill the region
+ state->moveTo(ux0, uy0);
+ state->lineTo(vx0, vy0);
+ state->lineTo(vx1, vy1);
+ state->lineTo(ux1, uy1);
+ state->closePath();
+ }
+
+ if (!out->useFillColorStop()) {
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+
+ // set up for next region
+ ux0 = ux1;
+ uy0 = uy1;
+ vx0 = vx1;
+ vy0 = vy1;
+ color0 = color1;
+ i = next[i];
+ }
+
+ if (out->useFillColorStop()) {
+ if (!needExtend) {
+ state->moveTo(xMin, yMin);
+ state->lineTo(xMin, yMax);
+ state->lineTo(xMax, yMax);
+ state->lineTo(xMax, yMin);
+ state->closePath();
+ }
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+}
+
+void Gfx::doRadialShFill(GfxRadialShading *shading) {
+ double xMin, yMin, xMax, yMax;
+ double x0, y0, r0, x1, y1, r1, t0, t1;
+ int nComps;
+ GfxColor colorA, colorB;
+ double xa, ya, xb, yb, ra, rb;
+ double ta, tb, sa, sb;
+ double sz, xz, yz, sMin, sMax;
+ GBool enclosed;
+ int ia, ib, k, n;
+ double *ctm;
+ double theta, alpha, angle, t;
+ GBool needExtend = gTrue;
+
+ // get the shading info
+ shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
+ t0 = shading->getDomain0();
+ t1 = shading->getDomain1();
+ nComps = shading->getColorSpace()->getNComps();
+
+ // Compute the point at which r(s) = 0; check for the enclosed
+ // circles case; and compute the angles for the tangent lines.
+ if (x0 == x1 && y0 == y1) {
+ enclosed = gTrue;
+ theta = 0; // make gcc happy
+ sz = 0; // make gcc happy
+ } else if (r0 == r1) {
+ enclosed = gFalse;
+ theta = 0;
+ sz = 0; // make gcc happy
+ } else {
+ sz = -r0 / (r1 - r0);
+ xz = x0 + sz * (x1 - x0);
+ yz = y0 + sz * (y1 - y0);
+ enclosed = (xz - x0) * (xz - x0) + (yz - y0) * (yz - y0) <= r0 * r0;
+ theta = asin(r0 / sqrt((x0 - xz) * (x0 - xz) + (y0 - yz) * (y0 - yz)));
+ if (r0 > r1) {
+ theta = -theta;
+ }
+ }
+ if (enclosed) {
+ alpha = 0;
+ } else {
+ alpha = atan2(y1 - y0, x1 - x0);
+ }
+
+ // compute the (possibly extended) s range
+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
+ if (enclosed) {
+ sMin = 0;
+ sMax = 1;
+ } else {
+ sMin = 1;
+ sMax = 0;
+ // solve for x(s) + r(s) = xMin
+ if ((x1 + r1) - (x0 + r0) != 0) {
+ sa = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for x(s) - r(s) = xMax
+ if ((x1 - r1) - (x0 - r0) != 0) {
+ sa = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for y(s) + r(s) = yMin
+ if ((y1 + r1) - (y0 + r0) != 0) {
+ sa = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for y(s) - r(s) = yMax
+ if ((y1 - r1) - (y0 - r0) != 0) {
+ sa = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // check against sz
+ if (r0 < r1) {
+ if (sMin < sz) {
+ sMin = sz;
+ }
+ } else if (r0 > r1) {
+ if (sMax > sz) {
+ sMax = sz;
+ }
+ }
+ // check the 'extend' flags
+ if (!shading->getExtend0() && sMin < 0) {
+ sMin = 0;
+ }
+ if (!shading->getExtend1() && sMax > 1) {
+ sMax = 1;
+ }
+ }
+
+ if (out->useShadedFills() &&
+ out->radialShadedFill(state, shading, sMin, sMax)) {
+ return;
+ }
+
+ // compute the number of steps into which circles must be divided to
+ // achieve a curve flatness of 0.1 pixel in device space for the
+ // largest circle (note that "device space" is 72 dpi when generating
+ // PostScript, hence the relatively small 0.1 pixel accuracy)
+ ctm = state->getCTM();
+ t = fabs(ctm[0]);
+ if (fabs(ctm[1]) > t) {
+ t = fabs(ctm[1]);
+ }
+ if (fabs(ctm[2]) > t) {
+ t = fabs(ctm[2]);
+ }
+ if (fabs(ctm[3]) > t) {
+ t = fabs(ctm[3]);
+ }
+ if (r0 > r1) {
+ t *= r0;
+ } else {
+ t *= r1;
+ }
+ if (t < 1) {
+ n = 3;
+ } else {
+ n = (int)(M_PI / acos(1 - 0.1 / t));
+ if (n < 3) {
+ n = 3;
+ } else if (n > 200) {
+ n = 200;
+ }
+ }
+
+ // setup for the start circle
+ ia = 0;
+ sa = sMin;
+ ta = t0 + sa * (t1 - t0);
+ xa = x0 + sa * (x1 - x0);
+ ya = y0 + sa * (y1 - y0);
+ ra = r0 + sa * (r1 - r0);
+ if (ta < t0) {
+ shading->getColor(t0, &colorA);
+ } else if (ta > t1) {
+ shading->getColor(t1, &colorA);
+ } else {
+ shading->getColor(ta, &colorA);
+ }
+
+ needExtend = !out->radialShadedSupportExtend(state, shading);
+
+ // fill the circles
+ while (ia < radialMaxSplits) {
+
+ // go as far along the t axis (toward t1) as we can, such that the
+ // color difference is within the tolerance (radialColorDelta) --
+ // this uses bisection (between the current value, t, and t1),
+ // limited to radialMaxSplits points along the t axis; require at
+ // least one split to avoid problems when the innermost and
+ // outermost colors are the same
+ ib = radialMaxSplits;
+ sb = sMax;
+ tb = t0 + sb * (t1 - t0);
+ if (tb < t0) {
+ shading->getColor(t0, &colorB);
+ } else if (tb > t1) {
+ shading->getColor(t1, &colorB);
+ } else {
+ shading->getColor(tb, &colorB);
+ }
+ while (ib - ia > 1) {
+ if (isSameGfxColor(colorB, colorA, nComps, radialColorDelta) && ib < radialMaxSplits) {
+ // The shading is not necessarily lineal so having two points with the
+ // same color does not mean all the areas in between have the same color too
+ // Do another bisection to be a bit more sure we are not doing something wrong
+ GfxColor colorC;
+ int ic = (ia + ib) / 2;
+ double sc = sMin + ((double)ic / (double)radialMaxSplits) * (sMax - sMin);
+ double tc = t0 + sc * (t1 - t0);
+ if (tc < t0) {
+ shading->getColor(t0, &colorC);
+ } else if (tc > t1) {
+ shading->getColor(t1, &colorC);
+ } else {
+ shading->getColor(tc, &colorC);
+ }
+ if (isSameGfxColor(colorC, colorA, nComps, radialColorDelta))
+ break;
+ }
+ ib = (ia + ib) / 2;
+ sb = sMin + ((double)ib / (double)radialMaxSplits) * (sMax - sMin);
+ tb = t0 + sb * (t1 - t0);
+ if (tb < t0) {
+ shading->getColor(t0, &colorB);
+ } else if (tb > t1) {
+ shading->getColor(t1, &colorB);
+ } else {
+ shading->getColor(tb, &colorB);
+ }
+ }
+
+ // compute center and radius of the circle
+ xb = x0 + sb * (x1 - x0);
+ yb = y0 + sb * (y1 - y0);
+ rb = r0 + sb * (r1 - r0);
+
+ // use the average of the colors at the two circles
+ for (k = 0; k < nComps; ++k) {
+ colorA.c[k] = (colorA.c[k] + colorB.c[k]) / 2;
+ }
+ state->setFillColor(&colorA);
+ if (out->useFillColorStop())
+ out->updateFillColorStop(state, (sa - sMin)/(sMax - sMin));
+ else
+ out->updateFillColor(state);
+
+ if (needExtend) {
+ if (enclosed) {
+ // construct path for first circle (counterclockwise)
+ state->moveTo(xa + ra, ya);
+ for (k = 1; k < n; ++k) {
+ angle = ((double)k / (double)n) * 2 * M_PI;
+ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle));
+ }
+ state->closePath();
+
+ // construct and append path for second circle (clockwise)
+ state->moveTo(xb + rb, yb);
+ for (k = 1; k < n; ++k) {
+ angle = -((double)k / (double)n) * 2 * M_PI;
+ state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle));
+ }
+ state->closePath();
+ } else {
+ // construct the first subpath (clockwise)
+ state->moveTo(xa + ra * cos(alpha + theta + 0.5 * M_PI),
+ ya + ra * sin(alpha + theta + 0.5 * M_PI));
+ for (k = 0; k < n; ++k) {
+ angle = alpha + theta + 0.5 * M_PI
+ - ((double)k / (double)n) * (2 * theta + M_PI);
+ state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle));
+ }
+ for (k = 0; k < n; ++k) {
+ angle = alpha - theta - 0.5 * M_PI
+ + ((double)k / (double)n) * (2 * theta - M_PI);
+ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle));
+ }
+ state->closePath();
+
+ // construct the second subpath (counterclockwise)
+ state->moveTo(xa + ra * cos(alpha + theta + 0.5 * M_PI),
+ ya + ra * sin(alpha + theta + 0.5 * M_PI));
+ for (k = 0; k < n; ++k) {
+ angle = alpha + theta + 0.5 * M_PI
+ + ((double)k / (double)n) * (-2 * theta + M_PI);
+ state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle));
+ }
+ for (k = 0; k < n; ++k) {
+ angle = alpha - theta - 0.5 * M_PI
+ + ((double)k / (double)n) * (2 * theta + M_PI);
+ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle));
+ }
+ state->closePath();
+ }
+ }
+
+ if (!out->useFillColorStop()) {
+ // fill the path
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+
+ // step to the next value of t
+ ia = ib;
+ sa = sb;
+ ta = tb;
+ xa = xb;
+ ya = yb;
+ ra = rb;
+ colorA = colorB;
+ }
+
+ if (out->useFillColorStop()) {
+ // make sure we add stop color when sb = sMax
+ state->setFillColor(&colorA);
+ out->updateFillColorStop(state, (sb - sMin)/(sMax - sMin));
+
+ // fill the path
+ state->moveTo(xMin, yMin);
+ state->lineTo(xMin, yMax);
+ state->lineTo(xMax, yMax);
+ state->lineTo(xMax, yMin);
+ state->closePath();
+
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+
+ if (!needExtend)
+ return;
+
+ if (enclosed) {
+ // extend the smaller circle
+ if ((shading->getExtend0() && r0 <= r1) ||
+ (shading->getExtend1() && r1 < r0)) {
+ if (r0 <= r1) {
+ ta = t0;
+ ra = r0;
+ xa = x0;
+ ya = y0;
+ } else {
+ ta = t1;
+ ra = r1;
+ xa = x1;
+ ya = y1;
+ }
+ shading->getColor(ta, &colorA);
+ state->setFillColor(&colorA);
+ out->updateFillColor(state);
+ state->moveTo(xa + ra, ya);
+ for (k = 1; k < n; ++k) {
+ angle = ((double)k / (double)n) * 2 * M_PI;
+ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle));
+ }
+ state->closePath();
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+
+ // extend the larger circle
+ if ((shading->getExtend0() && r0 > r1) ||
+ (shading->getExtend1() && r1 >= r0)) {
+ if (r0 > r1) {
+ ta = t0;
+ ra = r0;
+ xa = x0;
+ ya = y0;
+ } else {
+ ta = t1;
+ ra = r1;
+ xa = x1;
+ ya = y1;
+ }
+ shading->getColor(ta, &colorA);
+ state->setFillColor(&colorA);
+ out->updateFillColor(state);
+ state->moveTo(xMin, yMin);
+ state->lineTo(xMin, yMax);
+ state->lineTo(xMax, yMax);
+ state->lineTo(xMax, yMin);
+ state->closePath();
+ state->moveTo(xa + ra, ya);
+ for (k = 1; k < n; ++k) {
+ angle = ((double)k / (double)n) * 2 * M_PI;
+ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle));
+ }
+ state->closePath();
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ }
+ }
+}
+
+void Gfx::doGouraudTriangleShFill(GfxGouraudTriangleShading *shading) {
+ double x0, y0, x1, y1, x2, y2;
+ GfxColor color0, color1, color2;
+ int i;
+
+ for (i = 0; i < shading->getNTriangles(); ++i) {
+ shading->getTriangle(i, &x0, &y0, &color0,
+ &x1, &y1, &color1,
+ &x2, &y2, &color2);
+ gouraudFillTriangle(x0, y0, &color0, x1, y1, &color1, x2, y2, &color2,
+ shading->getColorSpace()->getNComps(), 0);
+ }
+}
+
+void Gfx::gouraudFillTriangle(double x0, double y0, GfxColor *color0,
+ double x1, double y1, GfxColor *color1,
+ double x2, double y2, GfxColor *color2,
+ int nComps, int depth) {
+ double x01, y01, x12, y12, x20, y20;
+ GfxColor color01, color12, color20;
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ if (abs(color0->c[i] - color1->c[i]) > gouraudColorDelta ||
+ abs(color1->c[i] - color2->c[i]) > gouraudColorDelta) {
+ break;
+ }
+ }
+ if (i == nComps || depth == gouraudMaxDepth) {
+ state->setFillColor(color0);
+ out->updateFillColor(state);
+ state->moveTo(x0, y0);
+ state->lineTo(x1, y1);
+ state->lineTo(x2, y2);
+ state->closePath();
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ } else {
+ x01 = 0.5 * (x0 + x1);
+ y01 = 0.5 * (y0 + y1);
+ x12 = 0.5 * (x1 + x2);
+ y12 = 0.5 * (y1 + y2);
+ x20 = 0.5 * (x2 + x0);
+ y20 = 0.5 * (y2 + y0);
+ //~ if the shading has a Function, this should interpolate on the
+ //~ function parameter, not on the color components
+ for (i = 0; i < nComps; ++i) {
+ color01.c[i] = (color0->c[i] + color1->c[i]) / 2;
+ color12.c[i] = (color1->c[i] + color2->c[i]) / 2;
+ color20.c[i] = (color2->c[i] + color0->c[i]) / 2;
+ }
+ gouraudFillTriangle(x0, y0, color0, x01, y01, &color01,
+ x20, y20, &color20, nComps, depth + 1);
+ gouraudFillTriangle(x01, y01, &color01, x1, y1, color1,
+ x12, y12, &color12, nComps, depth + 1);
+ gouraudFillTriangle(x01, y01, &color01, x12, y12, &color12,
+ x20, y20, &color20, nComps, depth + 1);
+ gouraudFillTriangle(x20, y20, &color20, x12, y12, &color12,
+ x2, y2, color2, nComps, depth + 1);
+ }
+}
+
+void Gfx::doPatchMeshShFill(GfxPatchMeshShading *shading) {
+ int start, i;
+
+ if (shading->getNPatches() > 128) {
+ start = 3;
+ } else if (shading->getNPatches() > 64) {
+ start = 2;
+ } else if (shading->getNPatches() > 16) {
+ start = 1;
+ } else {
+ start = 0;
+ }
+ for (i = 0; i < shading->getNPatches(); ++i) {
+ fillPatch(shading->getPatch(i), shading->getColorSpace()->getNComps(),
+ start);
+ }
+}
+
+void Gfx::fillPatch(GfxPatch *patch, int nComps, int depth) {
+ GfxPatch patch00, patch01, patch10, patch11;
+ double xx[4][8], yy[4][8];
+ double xxm, yym;
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ if (abs(patch->color[0][0].c[i] - patch->color[0][1].c[i])
+ > patchColorDelta ||
+ abs(patch->color[0][1].c[i] - patch->color[1][1].c[i])
+ > patchColorDelta ||
+ abs(patch->color[1][1].c[i] - patch->color[1][0].c[i])
+ > patchColorDelta ||
+ abs(patch->color[1][0].c[i] - patch->color[0][0].c[i])
+ > patchColorDelta) {
+ break;
+ }
+ }
+ if (i == nComps || depth == patchMaxDepth) {
+ state->setFillColor(&patch->color[0][0]);
+ out->updateFillColor(state);
+ state->moveTo(patch->x[0][0], patch->y[0][0]);
+ state->curveTo(patch->x[0][1], patch->y[0][1],
+ patch->x[0][2], patch->y[0][2],
+ patch->x[0][3], patch->y[0][3]);
+ state->curveTo(patch->x[1][3], patch->y[1][3],
+ patch->x[2][3], patch->y[2][3],
+ patch->x[3][3], patch->y[3][3]);
+ state->curveTo(patch->x[3][2], patch->y[3][2],
+ patch->x[3][1], patch->y[3][1],
+ patch->x[3][0], patch->y[3][0]);
+ state->curveTo(patch->x[2][0], patch->y[2][0],
+ patch->x[1][0], patch->y[1][0],
+ patch->x[0][0], patch->y[0][0]);
+ state->closePath();
+ if (!contentIsHidden())
+ out->fill(state);
+ state->clearPath();
+ } else {
+ for (i = 0; i < 4; ++i) {
+ xx[i][0] = patch->x[i][0];
+ yy[i][0] = patch->y[i][0];
+ xx[i][1] = 0.5 * (patch->x[i][0] + patch->x[i][1]);
+ yy[i][1] = 0.5 * (patch->y[i][0] + patch->y[i][1]);
+ xxm = 0.5 * (patch->x[i][1] + patch->x[i][2]);
+ yym = 0.5 * (patch->y[i][1] + patch->y[i][2]);
+ xx[i][6] = 0.5 * (patch->x[i][2] + patch->x[i][3]);
+ yy[i][6] = 0.5 * (patch->y[i][2] + patch->y[i][3]);
+ xx[i][2] = 0.5 * (xx[i][1] + xxm);
+ yy[i][2] = 0.5 * (yy[i][1] + yym);
+ xx[i][5] = 0.5 * (xxm + xx[i][6]);
+ yy[i][5] = 0.5 * (yym + yy[i][6]);
+ xx[i][3] = xx[i][4] = 0.5 * (xx[i][2] + xx[i][5]);
+ yy[i][3] = yy[i][4] = 0.5 * (yy[i][2] + yy[i][5]);
+ xx[i][7] = patch->x[i][3];
+ yy[i][7] = patch->y[i][3];
+ }
+ for (i = 0; i < 4; ++i) {
+ patch00.x[0][i] = xx[0][i];
+ patch00.y[0][i] = yy[0][i];
+ patch00.x[1][i] = 0.5 * (xx[0][i] + xx[1][i]);
+ patch00.y[1][i] = 0.5 * (yy[0][i] + yy[1][i]);
+ xxm = 0.5 * (xx[1][i] + xx[2][i]);
+ yym = 0.5 * (yy[1][i] + yy[2][i]);
+ patch10.x[2][i] = 0.5 * (xx[2][i] + xx[3][i]);
+ patch10.y[2][i] = 0.5 * (yy[2][i] + yy[3][i]);
+ patch00.x[2][i] = 0.5 * (patch00.x[1][i] + xxm);
+ patch00.y[2][i] = 0.5 * (patch00.y[1][i] + yym);
+ patch10.x[1][i] = 0.5 * (xxm + patch10.x[2][i]);
+ patch10.y[1][i] = 0.5 * (yym + patch10.y[2][i]);
+ patch00.x[3][i] = 0.5 * (patch00.x[2][i] + patch10.x[1][i]);
+ patch00.y[3][i] = 0.5 * (patch00.y[2][i] + patch10.y[1][i]);
+ patch10.x[0][i] = patch00.x[3][i];
+ patch10.y[0][i] = patch00.y[3][i];
+ patch10.x[3][i] = xx[3][i];
+ patch10.y[3][i] = yy[3][i];
+ }
+ for (i = 4; i < 8; ++i) {
+ patch01.x[0][i-4] = xx[0][i];
+ patch01.y[0][i-4] = yy[0][i];
+ patch01.x[1][i-4] = 0.5 * (xx[0][i] + xx[1][i]);
+ patch01.y[1][i-4] = 0.5 * (yy[0][i] + yy[1][i]);
+ xxm = 0.5 * (xx[1][i] + xx[2][i]);
+ yym = 0.5 * (yy[1][i] + yy[2][i]);
+ patch11.x[2][i-4] = 0.5 * (xx[2][i] + xx[3][i]);
+ patch11.y[2][i-4] = 0.5 * (yy[2][i] + yy[3][i]);
+ patch01.x[2][i-4] = 0.5 * (patch01.x[1][i-4] + xxm);
+ patch01.y[2][i-4] = 0.5 * (patch01.y[1][i-4] + yym);
+ patch11.x[1][i-4] = 0.5 * (xxm + patch11.x[2][i-4]);
+ patch11.y[1][i-4] = 0.5 * (yym + patch11.y[2][i-4]);
+ patch01.x[3][i-4] = 0.5 * (patch01.x[2][i-4] + patch11.x[1][i-4]);
+ patch01.y[3][i-4] = 0.5 * (patch01.y[2][i-4] + patch11.y[1][i-4]);
+ patch11.x[0][i-4] = patch01.x[3][i-4];
+ patch11.y[0][i-4] = patch01.y[3][i-4];
+ patch11.x[3][i-4] = xx[3][i];
+ patch11.y[3][i-4] = yy[3][i];
+ }
+ //~ if the shading has a Function, this should interpolate on the
+ //~ function parameter, not on the color components
+ for (i = 0; i < nComps; ++i) {
+ patch00.color[0][0].c[i] = patch->color[0][0].c[i];
+ patch00.color[0][1].c[i] = (patch->color[0][0].c[i] +
+ patch->color[0][1].c[i]) / 2;
+ patch01.color[0][0].c[i] = patch00.color[0][1].c[i];
+ patch01.color[0][1].c[i] = patch->color[0][1].c[i];
+ patch01.color[1][1].c[i] = (patch->color[0][1].c[i] +
+ patch->color[1][1].c[i]) / 2;
+ patch11.color[0][1].c[i] = patch01.color[1][1].c[i];
+ patch11.color[1][1].c[i] = patch->color[1][1].c[i];
+ patch11.color[1][0].c[i] = (patch->color[1][1].c[i] +
+ patch->color[1][0].c[i]) / 2;
+ patch10.color[1][1].c[i] = patch11.color[1][0].c[i];
+ patch10.color[1][0].c[i] = patch->color[1][0].c[i];
+ patch10.color[0][0].c[i] = (patch->color[1][0].c[i] +
+ patch->color[0][0].c[i]) / 2;
+ patch00.color[1][0].c[i] = patch10.color[0][0].c[i];
+ patch00.color[1][1].c[i] = (patch00.color[1][0].c[i] +
+ patch01.color[1][1].c[i]) / 2;
+ patch01.color[1][0].c[i] = patch00.color[1][1].c[i];
+ patch11.color[0][0].c[i] = patch00.color[1][1].c[i];
+ patch10.color[0][1].c[i] = patch00.color[1][1].c[i];
+ }
+ fillPatch(&patch00, nComps, depth + 1);
+ fillPatch(&patch10, nComps, depth + 1);
+ fillPatch(&patch01, nComps, depth + 1);
+ fillPatch(&patch11, nComps, depth + 1);
+ }
+}
+
+void Gfx::doEndPath() {
+ if (state->isCurPt() && clip != clipNone) {
+ state->clip();
+ if (clip == clipNormal) {
+ out->clip(state);
+ } else {
+ out->eoClip(state);
+ }
+ }
+ clip = clipNone;
+ state->clearPath();
+}
+
+//------------------------------------------------------------------------
+// path clipping operators
+//------------------------------------------------------------------------
+
+void Gfx::opClip(Object args[], int numArgs) {
+ clip = clipNormal;
+}
+
+void Gfx::opEOClip(Object args[], int numArgs) {
+ clip = clipEO;
+}
+
+//------------------------------------------------------------------------
+// text object operators
+//------------------------------------------------------------------------
+
+void Gfx::opBeginText(Object args[], int numArgs) {
+ out->beginTextObject(state);
+ drawText = gTrue;
+ state->setTextMat(1, 0, 0, 1, 0, 0);
+ state->textMoveTo(0, 0);
+ out->updateTextMat(state);
+ out->updateTextPos(state);
+ fontChanged = gTrue;
+ if (out->supportTextCSPattern(state)) {
+ colorSpaceText = NULL;
+ textHaveCSPattern = gTrue;
+ }
+}
+
+void Gfx::opEndText(Object args[], int numArgs) {
+ GBool needFill = out->deviceHasTextClip(state);
+ out->endTextObject(state);
+ drawText = gFalse;
+ if (out->supportTextCSPattern(state) && textHaveCSPattern) {
+ if (needFill) {
+ doPatternFill(gTrue);
+ }
+ out->restoreState(state);
+ if (colorSpaceText != NULL) {
+ state->setFillPattern(NULL);
+ state->setFillColorSpace(colorSpaceText);
+ out->updateFillColorSpace(state);
+ state->setFillColor(&colorText);
+ out->updateFillColor(state);
+ colorSpaceText = NULL;
+ }
+ }
+ textHaveCSPattern = gFalse;
+}
+
+//------------------------------------------------------------------------
+// text state operators
+//------------------------------------------------------------------------
+
+void Gfx::opSetCharSpacing(Object args[], int numArgs) {
+ state->setCharSpace(args[0].getNum());
+ out->updateCharSpace(state);
+}
+
+void Gfx::opSetFont(Object args[], int numArgs) {
+ GfxFont *font;
+
+ if (!(font = res->lookupFont(args[0].getName()))) {
+ // unsetting the font (drawing no text) is better than using the
+ // previous one and drawing random glyphs from it
+ state->setFont(NULL, args[1].getNum());
+ fontChanged = gTrue;
+ return;
+ }
+ if (printCommands) {
+ printf(" font: tag=%s name='%s' %g\n",
+ font->getTag()->getCString(),
+ font->getName() ? font->getName()->getCString() : "???",
+ args[1].getNum());
+ fflush(stdout);
+ }
+
+ font->incRefCnt();
+ state->setFont(font, args[1].getNum());
+ fontChanged = gTrue;
+}
+
+void Gfx::opSetTextLeading(Object args[], int numArgs) {
+ state->setLeading(args[0].getNum());
+}
+
+void Gfx::opSetTextRender(Object args[], int numArgs) {
+ state->setRender(args[0].getInt());
+ if (args[0].getInt() == 7) {
+ textHaveCSPattern = gFalse;
+ }
+ out->updateRender(state);
+}
+
+void Gfx::opSetTextRise(Object args[], int numArgs) {
+ state->setRise(args[0].getNum());
+ out->updateRise(state);
+}
+
+void Gfx::opSetWordSpacing(Object args[], int numArgs) {
+ state->setWordSpace(args[0].getNum());
+ out->updateWordSpace(state);
+}
+
+void Gfx::opSetHorizScaling(Object args[], int numArgs) {
+ state->setHorizScaling(args[0].getNum());
+ out->updateHorizScaling(state);
+ fontChanged = gTrue;
+}
+
+//------------------------------------------------------------------------
+// text positioning operators
+//------------------------------------------------------------------------
+
+void Gfx::opTextMove(Object args[], int numArgs) {
+ double tx, ty;
+
+ tx = state->getLineX() + args[0].getNum();
+ ty = state->getLineY() + args[1].getNum();
+ state->textMoveTo(tx, ty);
+ out->updateTextPos(state);
+}
+
+void Gfx::opTextMoveSet(Object args[], int numArgs) {
+ double tx, ty;
+
+ tx = state->getLineX() + args[0].getNum();
+ ty = args[1].getNum();
+ state->setLeading(-ty);
+ ty += state->getLineY();
+ state->textMoveTo(tx, ty);
+ out->updateTextPos(state);
+}
+
+void Gfx::opSetTextMatrix(Object args[], int numArgs) {
+ state->setTextMat(args[0].getNum(), args[1].getNum(),
+ args[2].getNum(), args[3].getNum(),
+ args[4].getNum(), args[5].getNum());
+ state->textMoveTo(0, 0);
+ out->updateTextMat(state);
+ out->updateTextPos(state);
+ fontChanged = gTrue;
+}
+
+void Gfx::opTextNextLine(Object args[], int numArgs) {
+ double tx, ty;
+
+ tx = state->getLineX();
+ ty = state->getLineY() - state->getLeading();
+ state->textMoveTo(tx, ty);
+ out->updateTextPos(state);
+}
+
+//------------------------------------------------------------------------
+// text string operators
+//------------------------------------------------------------------------
+
+void Gfx::opShowText(Object args[], int numArgs) {
+ if (!state->getFont()) {
+ error(getPos(), "No font in show");
+ return;
+ }
+ if (fontChanged) {
+ out->updateFont(state);
+ fontChanged = gFalse;
+ }
+ out->beginStringOp(state);
+ doShowText(args[0].getString());
+ out->endStringOp(state);
+}
+
+void Gfx::opMoveShowText(Object args[], int numArgs) {
+ double tx, ty;
+
+ if (!state->getFont()) {
+ error(getPos(), "No font in move/show");
+ return;
+ }
+ if (fontChanged) {
+ out->updateFont(state);
+ fontChanged = gFalse;
+ }
+ tx = state->getLineX();
+ ty = state->getLineY() - state->getLeading();
+ state->textMoveTo(tx, ty);
+ out->updateTextPos(state);
+ out->beginStringOp(state);
+ doShowText(args[0].getString());
+ out->endStringOp(state);
+}
+
+void Gfx::opMoveSetShowText(Object args[], int numArgs) {
+ double tx, ty;
+
+ if (!state->getFont()) {
+ error(getPos(), "No font in move/set/show");
+ return;
+ }
+ if (fontChanged) {
+ out->updateFont(state);
+ fontChanged = gFalse;
+ }
+ state->setWordSpace(args[0].getNum());
+ state->setCharSpace(args[1].getNum());
+ tx = state->getLineX();
+ ty = state->getLineY() - state->getLeading();
+ state->textMoveTo(tx, ty);
+ out->updateWordSpace(state);
+ out->updateCharSpace(state);
+ out->updateTextPos(state);
+ out->beginStringOp(state);
+ doShowText(args[2].getString());
+ out->endStringOp(state);
+}
+
+void Gfx::opShowSpaceText(Object args[], int numArgs) {
+ Array *a;
+ Object obj;
+ int wMode;
+ int i;
+
+ if (!state->getFont()) {
+ error(getPos(), "No font in show/space");
+ return;
+ }
+ if (fontChanged) {
+ out->updateFont(state);
+ fontChanged = gFalse;
+ }
+ out->beginStringOp(state);
+ wMode = state->getFont()->getWMode();
+ a = args[0].getArray();
+ for (i = 0; i < a->getLength(); ++i) {
+ a->get(i, &obj);
+ if (obj.isNum()) {
+ // this uses the absolute value of the font size to match
+ // Acrobat's behavior
+ if (wMode) {
+ state->textShift(0, -obj.getNum() * 0.001 *
+ fabs(state->getFontSize()));
+ } else {
+ state->textShift(-obj.getNum() * 0.001 *
+ fabs(state->getFontSize()), 0);
+ }
+ out->updateTextShift(state, obj.getNum());
+ } else if (obj.isString()) {
+ doShowText(obj.getString());
+ } else {
+ error(getPos(), "Element of show/space array must be number or string");
+ }
+ obj.free();
+ }
+ out->endStringOp(state);
+}
+
+void Gfx::doShowText(GooString *s) {
+ GfxFont *font;
+ int wMode;
+ double riseX, riseY;
+ CharCode code;
+ Unicode *u = NULL;
+ double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, lineX, lineY;
+ double originX, originY, tOriginX, tOriginY;
+ double oldCTM[6], newCTM[6];
+ double *mat;
+ Object charProc;
+ Dict *resDict;
+ Parser *oldParser;
+ char *p;
+ int len, n, uLen, nChars, nSpaces, i;
+
+ font = state->getFont();
+ wMode = font->getWMode();
+
+ if (out->useDrawChar()) {
+ out->beginString(state, s);
+ }
+
+ // handle a Type 3 char
+ if (font->getType() == fontType3 && out->interpretType3Chars()) {
+ mat = state->getCTM();
+ for (i = 0; i < 6; ++i) {
+ oldCTM[i] = mat[i];
+ }
+ mat = state->getTextMat();
+ newCTM[0] = mat[0] * oldCTM[0] + mat[1] * oldCTM[2];
+ newCTM[1] = mat[0] * oldCTM[1] + mat[1] * oldCTM[3];
+ newCTM[2] = mat[2] * oldCTM[0] + mat[3] * oldCTM[2];
+ newCTM[3] = mat[2] * oldCTM[1] + mat[3] * oldCTM[3];
+ mat = font->getFontMatrix();
+ newCTM[0] = mat[0] * newCTM[0] + mat[1] * newCTM[2];
+ newCTM[1] = mat[0] * newCTM[1] + mat[1] * newCTM[3];
+ newCTM[2] = mat[2] * newCTM[0] + mat[3] * newCTM[2];
+ newCTM[3] = mat[2] * newCTM[1] + mat[3] * newCTM[3];
+ newCTM[0] *= state->getFontSize();
+ newCTM[1] *= state->getFontSize();
+ newCTM[2] *= state->getFontSize();
+ newCTM[3] *= state->getFontSize();
+ newCTM[0] *= state->getHorizScaling();
+ newCTM[2] *= state->getHorizScaling();
+ state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
+ curX = state->getCurX();
+ curY = state->getCurY();
+ lineX = state->getLineX();
+ lineY = state->getLineY();
+ oldParser = parser;
+ p = s->getCString();
+ len = s->getLength();
+ while (len > 0) {
+ n = font->getNextChar(p, len, &code,
+ &u, &uLen,
+ &dx, &dy, &originX, &originY);
+ dx = dx * state->getFontSize() + state->getCharSpace();
+ if (n == 1 && *p == ' ') {
+ dx += state->getWordSpace();
+ }
+ dx *= state->getHorizScaling();
+ dy *= state->getFontSize();
+ state->textTransformDelta(dx, dy, &tdx, &tdy);
+ state->transform(curX + riseX, curY + riseY, &x, &y);
+ saveState();
+ state->setCTM(newCTM[0], newCTM[1], newCTM[2], newCTM[3], x, y);
+ //~ the CTM concat values here are wrong (but never used)
+ out->updateCTM(state, 1, 0, 0, 1, 0, 0);
+ if (!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy,
+ code, u, uLen)) {
+ ((Gfx8BitFont *)font)->getCharProc(code, &charProc);
+ if ((resDict = ((Gfx8BitFont *)font)->getResources())) {
+ pushResources(resDict);
+ }
+ if (charProc.isStream()) {
+ display(&charProc, gFalse);
+ } else {
+ error(getPos(), "Missing or bad Type3 CharProc entry");
+ }
+ out->endType3Char(state);
+ if (resDict) {
+ popResources();
+ }
+ charProc.free();
+ }
+ restoreState();
+ // GfxState::restore() does *not* restore the current position,
+ // so we deal with it here using (curX, curY) and (lineX, lineY)
+ curX += tdx;
+ curY += tdy;
+ state->moveTo(curX, curY);
+ state->textSetPos(lineX, lineY);
+ p += n;
+ len -= n;
+ }
+ parser = oldParser;
+
+ } else if (out->useDrawChar()) {
+ state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
+ p = s->getCString();
+ len = s->getLength();
+ while (len > 0) {
+ n = font->getNextChar(p, len, &code,
+ &u, &uLen,
+ &dx, &dy, &originX, &originY);
+ if (wMode) {
+ dx *= state->getFontSize();
+ dy = dy * state->getFontSize() + state->getCharSpace();
+ if (n == 1 && *p == ' ') {
+ dy += state->getWordSpace();
+ }
+ } else {
+ dx = dx * state->getFontSize() + state->getCharSpace();
+ if (n == 1 && *p == ' ') {
+ dx += state->getWordSpace();
+ }
+ dx *= state->getHorizScaling();
+ dy *= state->getFontSize();
+ }
+ state->textTransformDelta(dx, dy, &tdx, &tdy);
+ originX *= state->getFontSize();
+ originY *= state->getFontSize();
+ state->textTransformDelta(originX, originY, &tOriginX, &tOriginY);
+ if (!contentIsHidden()) {
+ out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY,
+ tdx, tdy, tOriginX, tOriginY, code, n, u, uLen);
+ }
+ state->shift(tdx, tdy);
+ p += n;
+ len -= n;
+ }
+
+ } else {
+ dx = dy = 0;
+ p = s->getCString();
+ len = s->getLength();
+ nChars = nSpaces = 0;
+ while (len > 0) {
+ n = font->getNextChar(p, len, &code,
+ &u, &uLen,
+ &dx2, &dy2, &originX, &originY);
+ dx += dx2;
+ dy += dy2;
+ if (n == 1 && *p == ' ') {
+ ++nSpaces;
+ }
+ ++nChars;
+ p += n;
+ len -= n;
+ }
+ if (wMode) {
+ dx *= state->getFontSize();
+ dy = dy * state->getFontSize()
+ + nChars * state->getCharSpace()
+ + nSpaces * state->getWordSpace();
+ } else {
+ dx = dx * state->getFontSize()
+ + nChars * state->getCharSpace()
+ + nSpaces * state->getWordSpace();
+ dx *= state->getHorizScaling();
+ dy *= state->getFontSize();
+ }
+ state->textTransformDelta(dx, dy, &tdx, &tdy);
+ if (!contentIsHidden())
+ out->drawString(state, s);
+ state->shift(tdx, tdy);
+ }
+
+ if (out->useDrawChar()) {
+ out->endString(state);
+ }
+
+ updateLevel += 10 * s->getLength();
+}
+
+//------------------------------------------------------------------------
+// XObject operators
+//------------------------------------------------------------------------
+
+void Gfx::opXObject(Object args[], int numArgs) {
+ char *name;
+ Object obj1, obj2, obj3, refObj;
+#if OPI_SUPPORT
+ Object opiDict;
+#endif
+
+ name = args[0].getName();
+ if (!res->lookupXObject(name, &obj1)) {
+ return;
+ }
+ if (!obj1.isStream()) {
+ error(getPos(), "XObject '%s' is wrong type", name);
+ obj1.free();
+ return;
+ }
+
+ obj1.streamGetDict()->lookupNF("OC", &obj2);
+ if (obj2.isNull()) {
+ // No OC entry - so we proceed as normal
+ } else if (obj2.isRef()) {
+ if ( catalog->getOptContentConfig() && ! catalog->getOptContentConfig()->optContentIsVisible( &obj2 ) ) {
+ obj2.free();
+ obj1.free();
+ return;
+ }
+ } else {
+ error(getPos(), "XObject OC value not null or dict: %i", obj2.getType());
+ }
+ obj2.free();
+
+#if OPI_SUPPORT
+ obj1.streamGetDict()->lookup("OPI", &opiDict);
+ if (opiDict.isDict()) {
+ out->opiBegin(state, opiDict.getDict());
+ }
+#endif
+ obj1.streamGetDict()->lookup("Subtype", &obj2);
+ if (obj2.isName("Image")) {
+ if (out->needNonText()) {
+ res->lookupXObjectNF(name, &refObj);
+ doImage(&refObj, obj1.getStream(), gFalse);
+ refObj.free();
+ }
+ } else if (obj2.isName("Form")) {
+ res->lookupXObjectNF(name, &refObj);
+ if (out->useDrawForm() && refObj.isRef()) {
+ out->drawForm(refObj.getRef());
+ } else {
+ doForm(&obj1);
+ }
+ refObj.free();
+ } else if (obj2.isName("PS")) {
+ obj1.streamGetDict()->lookup("Level1", &obj3);
+ out->psXObject(obj1.getStream(),
+ obj3.isStream() ? obj3.getStream() : (Stream *)NULL);
+ } else if (obj2.isName()) {
+ error(getPos(), "Unknown XObject subtype '%s'", obj2.getName());
+ } else {
+ error(getPos(), "XObject subtype is missing or wrong type");
+ }
+ obj2.free();
+#if OPI_SUPPORT
+ if (opiDict.isDict()) {
+ out->opiEnd(state, opiDict.getDict());
+ }
+ opiDict.free();
+#endif
+ obj1.free();
+}
+
+void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
+ Dict *dict, *maskDict;
+ int width, height;
+ int bits, maskBits;
+ GBool interpolate;
+ StreamColorSpaceMode csMode;
+ GBool mask;
+ GBool invert;
+ GfxColorSpace *colorSpace, *maskColorSpace;
+ GfxImageColorMap *colorMap, *maskColorMap;
+ Object maskObj, smaskObj;
+ GBool haveColorKeyMask, haveExplicitMask, haveSoftMask;
+ int maskColors[2*gfxColorMaxComps];
+ int maskWidth, maskHeight;
+ GBool maskInvert;
+ GBool maskInterpolate;
+ Stream *maskStr;
+ Object obj1, obj2;
+ int i;
+
+ // get info from the stream
+ bits = 0;
+ csMode = streamCSNone;
+ str->getImageParams(&bits, &csMode);
+
+ // get stream dict
+ dict = str->getDict();
+
+ // get size
+ dict->lookup("Width", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("W", &obj1);
+ }
+ if (obj1.isInt())
+ width = obj1.getInt();
+ else if (obj1.isReal())
+ width = (int)obj1.getReal();
+ else
+ goto err2;
+ obj1.free();
+ dict->lookup("Height", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("H", &obj1);
+ }
+ if (obj1.isInt())
+ height = obj1.getInt();
+ else if (obj1.isReal())
+ height = (int)obj1.getReal();
+ else
+ goto err2;
+ obj1.free();
+
+ if (width < 1 || height < 1)
+ goto err1;
+
+ // image interpolation
+ dict->lookup("Interpolate", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("I", &obj1);
+ }
+ if (obj1.isBool())
+ interpolate = obj1.getBool();
+ else
+ interpolate = gFalse;
+ obj1.free();
+ maskInterpolate = gFalse;
+
+ // image or mask?
+ dict->lookup("ImageMask", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("IM", &obj1);
+ }
+ mask = gFalse;
+ if (obj1.isBool())
+ mask = obj1.getBool();
+ else if (!obj1.isNull())
+ goto err2;
+ obj1.free();
+
+ // bit depth
+ if (bits == 0) {
+ dict->lookup("BitsPerComponent", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("BPC", &obj1);
+ }
+ if (obj1.isInt()) {
+ bits = obj1.getInt();
+ } else if (mask) {
+ bits = 1;
+ } else {
+ goto err2;
+ }
+ obj1.free();
+ }
+
+ // display a mask
+ if (mask) {
+
+ // check for inverted mask
+ if (bits != 1)
+ goto err1;
+ invert = gFalse;
+ dict->lookup("Decode", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("D", &obj1);
+ }
+ if (obj1.isArray()) {
+ obj1.arrayGet(0, &obj2);
+ // Table 4.39 says /Decode must be [1 0] or [0 1]. Adobe
+ // accepts [1.0 0.0] as well.
+ if (obj2.isNum() && obj2.getNum() >= 0.9)
+ invert = gTrue;
+ obj2.free();
+ } else if (!obj1.isNull()) {
+ goto err2;
+ }
+ obj1.free();
+
+ // draw it
+ if (!contentIsHidden()) {
+ out->drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
+ if (out->fillMaskCSPattern(state)) {
+ maskHaveCSPattern = gTrue;
+ doPatternFill(gTrue);
+ out->endMaskClip(state);
+ maskHaveCSPattern = gFalse;
+ }
+ }
+ } else {
+
+ // get color space and color map
+ dict->lookup("ColorSpace", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("CS", &obj1);
+ }
+ if (obj1.isName() && inlineImg) {
+ res->lookupColorSpace(obj1.getName(), &obj2);
+ if (!obj2.isNull()) {
+ obj1.free();
+ obj1 = obj2;
+ } else {
+ obj2.free();
+ }
+ }
+ if (!obj1.isNull()) {
+ colorSpace = GfxColorSpace::parse(&obj1, this);
+ } else if (csMode == streamCSDeviceGray) {
+ colorSpace = new GfxDeviceGrayColorSpace();
+ } else if (csMode == streamCSDeviceRGB) {
+ colorSpace = new GfxDeviceRGBColorSpace();
+ } else if (csMode == streamCSDeviceCMYK) {
+ colorSpace = new GfxDeviceCMYKColorSpace();
+ } else {
+ colorSpace = NULL;
+ }
+ obj1.free();
+ if (!colorSpace) {
+ goto err1;
+ }
+ dict->lookup("Decode", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("D", &obj1);
+ }
+ colorMap = new GfxImageColorMap(bits, &obj1, colorSpace);
+ obj1.free();
+ if (!colorMap->isOk()) {
+ delete colorMap;
+ goto err1;
+ }
+
+ // get the mask
+ haveColorKeyMask = haveExplicitMask = haveSoftMask = gFalse;
+ maskStr = NULL; // make gcc happy
+ maskWidth = maskHeight = 0; // make gcc happy
+ maskInvert = gFalse; // make gcc happy
+ maskColorMap = NULL; // make gcc happy
+ dict->lookup("Mask", &maskObj);
+ dict->lookup("SMask", &smaskObj);
+ if (smaskObj.isStream()) {
+ // soft mask
+ if (inlineImg) {
+ goto err1;
+ }
+ maskStr = smaskObj.getStream();
+ maskDict = smaskObj.streamGetDict();
+ maskDict->lookup("Width", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("W", &obj1);
+ }
+ if (!obj1.isInt()) {
+ goto err2;
+ }
+ maskWidth = obj1.getInt();
+ obj1.free();
+ maskDict->lookup("Height", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("H", &obj1);
+ }
+ if (!obj1.isInt()) {
+ goto err2;
+ }
+ maskHeight = obj1.getInt();
+ obj1.free();
+ maskDict->lookup("Interpolate", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("I", &obj1);
+ }
+ if (obj1.isBool())
+ maskInterpolate = obj1.getBool();
+ else
+ maskInterpolate = gFalse;
+ obj1.free();
+ maskDict->lookup("BitsPerComponent", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("BPC", &obj1);
+ }
+ if (!obj1.isInt()) {
+ goto err2;
+ }
+ maskBits = obj1.getInt();
+ obj1.free();
+ maskDict->lookup("ColorSpace", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("CS", &obj1);
+ }
+ if (obj1.isName()) {
+ res->lookupColorSpace(obj1.getName(), &obj2);
+ if (!obj2.isNull()) {
+ obj1.free();
+ obj1 = obj2;
+ } else {
+ obj2.free();
+ }
+ }
+ maskColorSpace = GfxColorSpace::parse(&obj1, this);
+ obj1.free();
+ if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
+ goto err1;
+ }
+ maskDict->lookup("Decode", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("D", &obj1);
+ }
+ maskColorMap = new GfxImageColorMap(maskBits, &obj1, maskColorSpace);
+ obj1.free();
+ if (!maskColorMap->isOk()) {
+ delete maskColorMap;
+ goto err1;
+ }
+ //~ handle the Matte entry
+ haveSoftMask = gTrue;
+ } else if (maskObj.isArray()) {
+ // color key mask
+ for (i = 0;
+ i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps;
+ ++i) {
+ maskObj.arrayGet(i, &obj1);
+ if (obj1.isInt()) {
+ maskColors[i] = obj1.getInt();
+ } else if (obj1.isReal()) {
+ error(-1, "Mask entry should be an integer but it's a real, trying to use it");
+ maskColors[i] = (int) obj1.getReal();
+ } else {
+ error(-1, "Mask entry should be an integer but it's of type %d", obj1.getType());
+ obj1.free();
+ goto err1;
+ }
+ obj1.free();
+ }
+ haveColorKeyMask = gTrue;
+ } else if (maskObj.isStream()) {
+ // explicit mask
+ if (inlineImg) {
+ goto err1;
+ }
+ maskStr = maskObj.getStream();
+ maskDict = maskObj.streamGetDict();
+ maskDict->lookup("Width", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("W", &obj1);
+ }
+ if (!obj1.isInt()) {
+ goto err2;
+ }
+ maskWidth = obj1.getInt();
+ obj1.free();
+ maskDict->lookup("Height", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("H", &obj1);
+ }
+ if (!obj1.isInt()) {
+ goto err2;
+ }
+ maskHeight = obj1.getInt();
+ obj1.free();
+ maskDict->lookup("Interpolate", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("I", &obj1);
+ }
+ if (obj1.isBool())
+ maskInterpolate = obj1.getBool();
+ else
+ maskInterpolate = gFalse;
+ obj1.free();
+ maskDict->lookup("ImageMask", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("IM", &obj1);
+ }
+ if (!obj1.isBool() || !obj1.getBool()) {
+ goto err2;
+ }
+ obj1.free();
+ maskInvert = gFalse;
+ maskDict->lookup("Decode", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ maskDict->lookup("D", &obj1);
+ }
+ if (obj1.isArray()) {
+ obj1.arrayGet(0, &obj2);
+ // Table 4.39 says /Decode must be [1 0] or [0 1]. Adobe
+ // accepts [1.0 0.0] as well.
+ if (obj2.isNum() && obj2.getNum() >= 0.9) {
+ maskInvert = gTrue;
+ }
+ obj2.free();
+ } else if (!obj1.isNull()) {
+ goto err2;
+ }
+ obj1.free();
+ haveExplicitMask = gTrue;
+ }
+
+ // draw it
+ if (haveSoftMask) {
+ if (!contentIsHidden()) {
+ out->drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate,
+ maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
+ }
+ delete maskColorMap;
+ } else if (haveExplicitMask && !contentIsHidden ()) {
+ out->drawMaskedImage(state, ref, str, width, height, colorMap, interpolate,
+ maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
+ } else if (!contentIsHidden()) {
+ out->drawImage(state, ref, str, width, height, colorMap, interpolate,
+ haveColorKeyMask ? maskColors : (int *)NULL, inlineImg);
+ }
+ delete colorMap;
+
+ maskObj.free();
+ smaskObj.free();
+ }
+
+ if ((i = width * height) > 1000) {
+ i = 1000;
+ }
+ updateLevel += i;
+
+ return;
+
+ err2:
+ obj1.free();
+ err1:
+ error(getPos(), "Bad image parameters");
+}
+
+void Gfx::doForm(Object *str) {
+ Dict *dict;
+ GBool transpGroup, isolated, knockout;
+ GfxColorSpace *blendingColorSpace;
+ Object matrixObj, bboxObj;
+ double m[6], bbox[4];
+ Object resObj;
+ Dict *resDict;
+ Object obj1, obj2, obj3;
+ int i;
+
+ // check for excessive recursion
+ if (formDepth > 20) {
+ return;
+ }
+
+ // get stream dict
+ dict = str->streamGetDict();
+
+ // check form type
+ dict->lookup("FormType", &obj1);
+ if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
+ error(getPos(), "Unknown form type");
+ }
+ obj1.free();
+
+ // get bounding box
+ dict->lookup("BBox", &bboxObj);
+ if (!bboxObj.isArray()) {
+ bboxObj.free();
+ error(getPos(), "Bad form bounding box");
+ return;
+ }
+ for (i = 0; i < 4; ++i) {
+ bboxObj.arrayGet(i, &obj1);
+ bbox[i] = obj1.getNum();
+ obj1.free();
+ }
+ bboxObj.free();
+
+ // get matrix
+ dict->lookup("Matrix", &matrixObj);
+ if (matrixObj.isArray()) {
+ for (i = 0; i < 6; ++i) {
+ matrixObj.arrayGet(i, &obj1);
+ m[i] = obj1.getNum();
+ obj1.free();
+ }
+ } else {
+ m[0] = 1; m[1] = 0;
+ m[2] = 0; m[3] = 1;
+ m[4] = 0; m[5] = 0;
+ }
+ matrixObj.free();
+
+ // get resources
+ dict->lookup("Resources", &resObj);
+ resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+
+ // check for a transparency group
+ transpGroup = isolated = knockout = gFalse;
+ blendingColorSpace = NULL;
+ if (dict->lookup("Group", &obj1)->isDict()) {
+ if (obj1.dictLookup("S", &obj2)->isName("Transparency")) {
+ transpGroup = gTrue;
+ if (!obj1.dictLookup("CS", &obj3)->isNull()) {
+ blendingColorSpace = GfxColorSpace::parse(&obj3, this);
+ }
+ obj3.free();
+ if (obj1.dictLookup("I", &obj3)->isBool()) {
+ isolated = obj3.getBool();
+ }
+ obj3.free();
+ if (obj1.dictLookup("K", &obj3)->isBool()) {
+ knockout = obj3.getBool();
+ }
+ obj3.free();
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ // draw it
+ ++formDepth;
+ doForm1(str, resDict, m, bbox,
+ transpGroup, gFalse, blendingColorSpace, isolated, knockout);
+ --formDepth;
+
+ if (blendingColorSpace) {
+ delete blendingColorSpace;
+ }
+ resObj.free();
+}
+
+void Gfx::doForm1(Object *str, Dict *resDict, double *matrix, double *bbox,
+ GBool transpGroup, GBool softMask,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool knockout,
+ GBool alpha, Function *transferFunc,
+ GfxColor *backdropColor) {
+ Parser *oldParser;
+ double oldBaseMatrix[6];
+ int i;
+
+ // push new resources on stack
+ pushResources(resDict);
+
+ // save current graphics state
+ saveState();
+
+ // kill any pre-existing path
+ state->clearPath();
+
+ // save current parser
+ oldParser = parser;
+
+ // set form transformation matrix
+ state->concatCTM(matrix[0], matrix[1], matrix[2],
+ matrix[3], matrix[4], matrix[5]);
+ out->updateCTM(state, matrix[0], matrix[1], matrix[2],
+ matrix[3], matrix[4], matrix[5]);
+
+ // set form bounding box
+ state->moveTo(bbox[0], bbox[1]);
+ state->lineTo(bbox[2], bbox[1]);
+ state->lineTo(bbox[2], bbox[3]);
+ state->lineTo(bbox[0], bbox[3]);
+ state->closePath();
+ state->clip();
+ out->clip(state);
+ state->clearPath();
+
+ if (softMask || transpGroup) {
+ if (state->getBlendMode() != gfxBlendNormal) {
+ state->setBlendMode(gfxBlendNormal);
+ out->updateBlendMode(state);
+ }
+ if (state->getFillOpacity() != 1) {
+ state->setFillOpacity(1);
+ out->updateFillOpacity(state);
+ }
+ if (state->getStrokeOpacity() != 1) {
+ state->setStrokeOpacity(1);
+ out->updateStrokeOpacity(state);
+ }
+ out->clearSoftMask(state);
+ out->beginTransparencyGroup(state, bbox, blendingColorSpace,
+ isolated, knockout, softMask);
+ }
+
+ // set new base matrix
+ for (i = 0; i < 6; ++i) {
+ oldBaseMatrix[i] = baseMatrix[i];
+ baseMatrix[i] = state->getCTM()[i];
+ }
+
+ GfxState *stateBefore = state;
+
+ // draw the form
+ display(str, gFalse);
+
+ if (stateBefore != state) {
+ if (state->isParentState(stateBefore)) {
+ error(-1, "There's a form with more q than Q, trying to fix");
+ while (stateBefore != state) {
+ restoreState();
+ }
+ } else {
+ error(-1, "There's a form with more Q than q");
+ }
+ }
+
+ if (softMask || transpGroup) {
+ out->endTransparencyGroup(state);
+ }
+
+ // restore base matrix
+ for (i = 0; i < 6; ++i) {
+ baseMatrix[i] = oldBaseMatrix[i];
+ }
+
+ // restore parser
+ parser = oldParser;
+
+ // restore graphics state
+ restoreState();
+
+ // pop resource stack
+ popResources();
+
+ if (softMask) {
+ out->setSoftMask(state, bbox, alpha, transferFunc, backdropColor);
+ } else if (transpGroup) {
+ out->paintTransparencyGroup(state, bbox);
+ }
+
+ return;
+}
+
+//------------------------------------------------------------------------
+// in-line image operators
+//------------------------------------------------------------------------
+
+void Gfx::opBeginImage(Object args[], int numArgs) {
+ Stream *str;
+ int c1, c2;
+
+ // build dict/stream
+ str = buildImageStream();
+
+ // display the image
+ if (str) {
+ doImage(NULL, str, gTrue);
+
+ // skip 'EI' tag
+ c1 = str->getUndecodedStream()->getChar();
+ c2 = str->getUndecodedStream()->getChar();
+ while (!(c1 == 'E' && c2 == 'I') && c2 != EOF) {
+ c1 = c2;
+ c2 = str->getUndecodedStream()->getChar();
+ }
+ delete str;
+ }
+}
+
+Stream *Gfx::buildImageStream() {
+ Object dict;
+ Object obj;
+ char *key;
+ Stream *str;
+
+ // build dictionary
+ dict.initDict(xref);
+ parser->getObj(&obj);
+ while (!obj.isCmd("ID") && !obj.isEOF()) {
+ if (!obj.isName()) {
+ error(getPos(), "Inline image dictionary key must be a name object");
+ obj.free();
+ } else {
+ key = copyString(obj.getName());
+ obj.free();
+ parser->getObj(&obj);
+ if (obj.isEOF() || obj.isError()) {
+ gfree(key);
+ break;
+ }
+ dict.dictAdd(key, &obj);
+ }
+ parser->getObj(&obj);
+ }
+ if (obj.isEOF()) {
+ error(getPos(), "End of file in inline image");
+ obj.free();
+ dict.free();
+ return NULL;
+ }
+ obj.free();
+
+ // make stream
+ str = new EmbedStream(parser->getStream(), &dict, gFalse, 0);
+ str = str->addFilters(&dict);
+
+ return str;
+}
+
+void Gfx::opImageData(Object args[], int numArgs) {
+ error(getPos(), "Internal: got 'ID' operator");
+}
+
+void Gfx::opEndImage(Object args[], int numArgs) {
+ error(getPos(), "Internal: got 'EI' operator");
+}
+
+//------------------------------------------------------------------------
+// type 3 font operators
+//------------------------------------------------------------------------
+
+void Gfx::opSetCharWidth(Object args[], int numArgs) {
+ out->type3D0(state, args[0].getNum(), args[1].getNum());
+}
+
+void Gfx::opSetCacheDevice(Object args[], int numArgs) {
+ out->type3D1(state, args[0].getNum(), args[1].getNum(),
+ args[2].getNum(), args[3].getNum(),
+ args[4].getNum(), args[5].getNum());
+}
+
+//------------------------------------------------------------------------
+// compatibility operators
+//------------------------------------------------------------------------
+
+void Gfx::opBeginIgnoreUndef(Object args[], int numArgs) {
+ ++ignoreUndef;
+}
+
+void Gfx::opEndIgnoreUndef(Object args[], int numArgs) {
+ if (ignoreUndef > 0)
+ --ignoreUndef;
+}
+
+//------------------------------------------------------------------------
+// marked content operators
+//------------------------------------------------------------------------
+
+struct MarkedContentStack {
+ GBool ocSuppressed; // are we ignoring content based on OptionalContent?
+ MarkedContentStack *next; // next object on stack
+};
+
+void Gfx::popMarkedContent() {
+ MarkedContentStack *mc = mcStack;
+ mcStack = mc->next;
+ delete mc;
+}
+
+void Gfx::pushMarkedContent() {
+ MarkedContentStack *mc = new MarkedContentStack();
+ mc->ocSuppressed = gFalse;
+ mc->next = mcStack;
+ mcStack = mc;
+}
+
+GBool Gfx::contentIsHidden() {
+ MarkedContentStack *mc = mcStack;
+ bool hidden = mc && mc->ocSuppressed;
+ while (!hidden && mc && mc->next) {
+ mc = mc->next;
+ hidden = mc->ocSuppressed;
+ }
+ return hidden;
+}
+
+void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
+ // push a new stack entry
+ pushMarkedContent();
+
+ OCGs *contentConfig = catalog->getOptContentConfig();
+ char* name0 = args[0].getName();
+ if ( strncmp( name0, "OC", 2) == 0 && contentConfig) {
+ if ( numArgs >= 2 ) {
+ if (!args[1].isName()) {
+ error(getPos(), "Unexpected MC Type: %i", args[1].getType());
+ }
+ char* name1 = args[1].getName();
+ Object markedContent;
+ if ( res->lookupMarkedContentNF( name1, &markedContent ) ) {
+ if ( markedContent.isRef() ) {
+ bool visible = contentConfig->optContentIsVisible( &markedContent );
+ MarkedContentStack *mc = mcStack;
+ mc->ocSuppressed = !(visible);
+ }
+ } else {
+ error(getPos(), "DID NOT find %s", name1);
+ }
+ } else {
+ error(getPos(), "insufficient arguments for Marked Content");
+ }
+ }
+
+ if (printCommands) {
+ printf(" marked content: %s ", args[0].getName());
+ if (numArgs == 2)
+ args[1].print(stdout);
+ printf("\n");
+ fflush(stdout);
+ }
+
+ if(numArgs == 2 && args[1].isDict ()) {
+ out->beginMarkedContent(args[0].getName(),args[1].getDict());
+ }
+}
+
+void Gfx::opEndMarkedContent(Object args[], int numArgs) {
+ // pop the stack
+ if (mcStack)
+ popMarkedContent();
+ out->endMarkedContent(state);
+}
+
+void Gfx::opMarkPoint(Object args[], int numArgs) {
+ if (printCommands) {
+ printf(" mark point: %s ", args[0].getName());
+ if (numArgs == 2)
+ args[1].print(stdout);
+ printf("\n");
+ fflush(stdout);
+ }
+
+ if(numArgs == 2 && args[1].isDict()) {
+ out->markPoint(args[0].getName(),args[1].getDict());
+ } else {
+ out->markPoint(args[0].getName());
+ }
+
+}
+
+//------------------------------------------------------------------------
+// misc
+//------------------------------------------------------------------------
+
+void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
+ double xMin, double yMin, double xMax, double yMax) {
+ Dict *dict, *resDict;
+ Object matrixObj, bboxObj, resObj;
+ Object obj1;
+ double m[6], bbox[4], ictm[6];
+ double *ctm;
+ double formX0, formY0, formX1, formY1;
+ double annotX0, annotY0, annotX1, annotY1;
+ double det, x, y, sx, sy;
+ double r, g, b;
+ GfxColor color;
+ double *dash, *dash2;
+ int dashLength;
+ int i;
+
+ //~ can we assume that we're in default user space?
+ //~ (i.e., baseMatrix = ctm)
+
+ // transform the annotation bbox from default user space to user
+ // space: (bbox * baseMatrix) * iCTM
+ ctm = state->getCTM();
+ det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]);
+ ictm[0] = ctm[3] * det;
+ ictm[1] = -ctm[1] * det;
+ ictm[2] = -ctm[2] * det;
+ ictm[3] = ctm[0] * det;
+ ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det;
+ ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det;
+ x = baseMatrix[0] * xMin + baseMatrix[2] * yMin + baseMatrix[4];
+ y = baseMatrix[1] * xMin + baseMatrix[3] * yMin + baseMatrix[5];
+ annotX0 = ictm[0] * x + ictm[2] * y + ictm[4];
+ annotY0 = ictm[1] * x + ictm[3] * y + ictm[5];
+ x = baseMatrix[0] * xMax + baseMatrix[2] * yMax + baseMatrix[4];
+ y = baseMatrix[1] * xMax + baseMatrix[3] * yMax + baseMatrix[5];
+ annotX1 = ictm[0] * x + ictm[2] * y + ictm[4];
+ annotY1 = ictm[1] * x + ictm[3] * y + ictm[5];
+ if (annotX0 > annotX1) {
+ x = annotX0; annotX0 = annotX1; annotX1 = x;
+ }
+ if (annotY0 > annotY1) {
+ y = annotY0; annotY0 = annotY1; annotY1 = y;
+ }
+
+ // draw the appearance stream (if there is one)
+ if (str->isStream()) {
+
+ // get stream dict
+ dict = str->streamGetDict();
+
+ // get the form bounding box
+ dict->lookup("BBox", &bboxObj);
+ if (!bboxObj.isArray()) {
+ bboxObj.free();
+ error(getPos(), "Bad form bounding box");
+ return;
+ }
+ for (i = 0; i < 4; ++i) {
+ bboxObj.arrayGet(i, &obj1);
+ bbox[i] = obj1.getNum();
+ obj1.free();
+ }
+ bboxObj.free();
+
+ // get the form matrix
+ dict->lookup("Matrix", &matrixObj);
+ if (matrixObj.isArray() && matrixObj.arrayGetLength() >= 6) {
+ for (i = 0; i < 6; ++i) {
+ matrixObj.arrayGet(i, &obj1);
+ m[i] = obj1.getNum();
+ obj1.free();
+ }
+ } else {
+ m[0] = 1; m[1] = 0;
+ m[2] = 0; m[3] = 1;
+ m[4] = 0; m[5] = 0;
+ }
+ matrixObj.free();
+
+ // transform the form bbox from form space to user space
+ formX0 = bbox[0] * m[0] + bbox[1] * m[2] + m[4];
+ formY0 = bbox[0] * m[1] + bbox[1] * m[3] + m[5];
+ formX1 = bbox[2] * m[0] + bbox[3] * m[2] + m[4];
+ formY1 = bbox[2] * m[1] + bbox[3] * m[3] + m[5];
+ if (formX0 > formX1) {
+ x = formX0; formX0 = formX1; formX1 = x;
+ }
+ if (formY0 > formY1) {
+ y = formY0; formY0 = formY1; formY1 = y;
+ }
+
+ // scale the form to fit the annotation bbox
+ if (formX1 == formX0) {
+ // this shouldn't happen
+ sx = 1;
+ } else {
+ sx = (annotX1 - annotX0) / (formX1 - formX0);
+ }
+ if (formY1 == formY0) {
+ // this shouldn't happen
+ sy = 1;
+ } else {
+ sy = (annotY1 - annotY0) / (formY1 - formY0);
+ }
+ m[0] *= sx;
+ m[2] *= sx;
+ m[4] = (m[4] - formX0) * sx + annotX0;
+ m[1] *= sy;
+ m[3] *= sy;
+ m[5] = (m[5] - formY0) * sy + annotY0;
+
+ // get resources
+ dict->lookup("Resources", &resObj);
+ resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+
+ // draw it
+ doForm1(str, resDict, m, bbox);
+
+ resObj.free();
+ }
+
+ // draw the border
+ if (border && border->getWidth() > 0) {
+ if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) {
+ state->setStrokePattern(NULL);
+ state->setStrokeColorSpace(new GfxDeviceRGBColorSpace());
+ out->updateStrokeColorSpace(state);
+ }
+ if (aColor && (aColor->getSpace() == AnnotColor::colorRGB)) {
+ double *values = aColor->getValues();
+ r = values[0];
+ g = values[1];
+ b = values[2];
+ } else {
+ r = g = b = 0;
+ };
+ color.c[0] = dblToCol(r);
+ color.c[1] = dblToCol(g);
+ color.c[2] = dblToCol(b);
+ state->setStrokeColor(&color);
+ out->updateStrokeColor(state);
+ // compute the width scale factor when going from default user
+ // space to user space
+ x = (baseMatrix[0] + baseMatrix[2]) * ictm[0] +
+ (baseMatrix[1] + baseMatrix[3]) * ictm[2];
+ y = (baseMatrix[0] + baseMatrix[2]) * ictm[1] +
+ (baseMatrix[1] + baseMatrix[3]) * ictm[3];
+ x = sqrt(0.5 * (x * x + y * y));
+ state->setLineWidth(x * border->getWidth());
+ out->updateLineWidth(state);
+ dashLength = border->getDashLength();
+ dash = border->getDash();
+ if (border->getStyle() == AnnotBorder::borderDashed && dashLength > 0) {
+ dash2 = (double *)gmallocn(dashLength, sizeof(double));
+ for (i = 0; i < dashLength; ++i) {
+ dash2[i] = x * dash[i];
+ }
+ state->setLineDash(dash2, dashLength, 0);
+ out->updateLineDash(state);
+ }
+ //~ this doesn't currently handle the beveled and engraved styles
+ state->clearPath();
+ state->moveTo(annotX0, out->upsideDown() ? annotY0 : annotY1);
+ state->lineTo(annotX1, out->upsideDown() ? annotY0 : annotY1);
+ if (border->getStyle() != AnnotBorder::borderUnderlined) {
+ state->lineTo(annotX1, out->upsideDown() ? annotY1 : annotY0);
+ state->lineTo(annotX0, out->upsideDown() ? annotY1 : annotY0);
+ state->closePath();
+ }
+ out->stroke(state);
+ }
+}
+
+void Gfx::saveState() {
+ out->saveState(state);
+ state = state->save();
+}
+
+void Gfx::restoreState() {
+ state = state->restore();
+ out->restoreState(state);
+}
+
+void Gfx::pushResources(Dict *resDict) {
+ res = new GfxResources(xref, resDict, res);
+}
+
+void Gfx::popResources() {
+ GfxResources *resPtr;
+
+ resPtr = res->getNext();
+ delete res;
+ res = resPtr;
+}
+
+#ifdef USE_CMS
+PopplerCache *Gfx::getIccColorSpaceCache()
+{
+ return &iccColorSpaceCache;
+}
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.h
new file mode 100644
index 00000000000..bb762600de4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Gfx.h
@@ -0,0 +1,358 @@
+//========================================================================
+//
+// Gfx.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2007 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright (C) 2008 Brad Hards <bradh@kde.org>
+// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GFX_H
+#define GFX_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "goo/GooList.h"
+#include "GfxState.h"
+#include "Object.h"
+#include "PopplerCache.h"
+
+class GooString;
+class XRef;
+class Array;
+class Stream;
+class Parser;
+class Dict;
+class Function;
+class OutputDev;
+class GfxFontDict;
+class GfxFont;
+class GfxPattern;
+class GfxTilingPattern;
+class GfxShadingPattern;
+class GfxShading;
+class GfxFunctionShading;
+class GfxAxialShading;
+class GfxRadialShading;
+class GfxGouraudTriangleShading;
+class GfxPatchMeshShading;
+struct GfxPatch;
+class GfxState;
+struct GfxColor;
+class GfxColorSpace;
+class Gfx;
+class PDFRectangle;
+class AnnotBorder;
+class AnnotColor;
+class Catalog;
+struct MarkedContentStack;
+
+//------------------------------------------------------------------------
+
+enum GfxClipType {
+ clipNone,
+ clipNormal,
+ clipEO
+};
+
+enum TchkType {
+ tchkBool, // boolean
+ tchkInt, // integer
+ tchkNum, // number (integer or real)
+ tchkString, // string
+ tchkName, // name
+ tchkArray, // array
+ tchkProps, // properties (dictionary or name)
+ tchkSCN, // scn/SCN args (number of name)
+ tchkNone // used to avoid empty initializer lists
+};
+
+#define maxArgs 33
+
+struct Operator {
+ char name[4];
+ int numArgs;
+ TchkType tchk[maxArgs];
+ void (Gfx::*func)(Object args[], int numArgs);
+};
+
+//------------------------------------------------------------------------
+
+class GfxResources {
+public:
+
+ GfxResources(XRef *xref, Dict *resDict, GfxResources *nextA);
+ ~GfxResources();
+
+ GfxFont *lookupFont(char *name);
+ GBool lookupXObject(char *name, Object *obj);
+ GBool lookupXObjectNF(char *name, Object *obj);
+ GBool lookupMarkedContentNF(char *name, Object *obj);
+ void lookupColorSpace(char *name, Object *obj);
+ GfxPattern *lookupPattern(char *name, Gfx *gfx);
+ GfxShading *lookupShading(char *name, Gfx *gfx);
+ GBool lookupGState(char *name, Object *obj);
+
+ GfxResources *getNext() { return next; }
+
+private:
+
+ GfxFontDict *fonts;
+ Object xObjDict;
+ Object colorSpaceDict;
+ Object patternDict;
+ Object shadingDict;
+ Object gStateDict;
+ Object propertiesDict;
+ GfxResources *next;
+};
+
+//------------------------------------------------------------------------
+// Gfx
+//------------------------------------------------------------------------
+
+class Gfx {
+public:
+
+ // Constructor for regular output.
+ Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, Catalog *catalog,
+ double hDPI, double vDPI, PDFRectangle *box,
+ PDFRectangle *cropBox, int rotate,
+ GBool (*abortCheckCbkA)(void *data) = NULL,
+ void *abortCheckCbkDataA = NULL);
+
+ // Constructor for a sub-page object.
+ Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, Catalog *catalog,
+ PDFRectangle *box, PDFRectangle *cropBox,
+ GBool (*abortCheckCbkA)(void *data) = NULL,
+ void *abortCheckCbkDataA = NULL);
+
+ ~Gfx();
+
+ // Interpret a stream or array of streams.
+ void display(Object *obj, GBool topLevel = gTrue);
+
+ // Display an annotation, given its appearance (a Form XObject),
+ // border style, and bounding box (in default user space).
+ void drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
+ double xMin, double yMin, double xMax, double yMax);
+
+ // Save graphics state.
+ void saveState();
+
+ // Restore graphics state.
+ void restoreState();
+
+ // Get the current graphics state object.
+ GfxState *getState() { return state; }
+
+ void pushResources(Dict *resDict);
+ void popResources();
+
+#ifdef USE_CMS
+ PopplerCache *getIccColorSpaceCache();
+#endif
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Catalog *catalog; // the Catalog for this PDF file
+ OutputDev *out; // output device
+ GBool subPage; // is this a sub-page object?
+ GBool printCommands; // print the drawing commands (for debugging)
+ GBool profileCommands; // profile the drawing commands (for debugging)
+ GBool textHaveCSPattern; // in text drawing and text has pattern colorspace
+ GBool drawText; // in text drawing
+ GBool maskHaveCSPattern; // in mask drawing and mask has pattern colorspace
+ GfxColorSpace *colorSpaceText;// colorspace after text has filled with pattern
+ GfxColor colorText; // fill color after after text has filled with pattern
+ GfxResources *res; // resource stack
+ int updateLevel;
+
+ GfxState *state; // current graphics state
+ GBool fontChanged; // set if font or text matrix has changed
+ GfxClipType clip; // do a clip?
+ int ignoreUndef; // current BX/EX nesting level
+ double baseMatrix[6]; // default matrix for most recent
+ // page/form/pattern
+ int formDepth;
+
+ MarkedContentStack *mcStack; // current BMC/EMC stack
+
+ Parser *parser; // parser for page content stream(s)
+
+#ifdef USE_CMS
+ PopplerCache iccColorSpaceCache;
+#endif
+
+ GBool // callback to check for an abort
+ (*abortCheckCbk)(void *data);
+ void *abortCheckCbkData;
+
+ static Operator opTab[]; // table of operators
+
+ void go(GBool topLevel);
+ void execOp(Object *cmd, Object args[], int numArgs);
+ Operator *findOp(char *name);
+ GBool checkArg(Object *arg, TchkType type);
+ int getPos();
+
+ // graphics state operators
+ void opSave(Object args[], int numArgs);
+ void opRestore(Object args[], int numArgs);
+ void opConcat(Object args[], int numArgs);
+ void opSetDash(Object args[], int numArgs);
+ void opSetFlat(Object args[], int numArgs);
+ void opSetLineJoin(Object args[], int numArgs);
+ void opSetLineCap(Object args[], int numArgs);
+ void opSetMiterLimit(Object args[], int numArgs);
+ void opSetLineWidth(Object args[], int numArgs);
+ void opSetExtGState(Object args[], int numArgs);
+ void doSoftMask(Object *str, GBool alpha,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool knockout,
+ Function *transferFunc, GfxColor *backdropColor);
+ void opSetRenderingIntent(Object args[], int numArgs);
+
+ // color operators
+ void opSetFillGray(Object args[], int numArgs);
+ void opSetStrokeGray(Object args[], int numArgs);
+ void opSetFillCMYKColor(Object args[], int numArgs);
+ void opSetStrokeCMYKColor(Object args[], int numArgs);
+ void opSetFillRGBColor(Object args[], int numArgs);
+ void opSetStrokeRGBColor(Object args[], int numArgs);
+ void opSetFillColorSpace(Object args[], int numArgs);
+ void opSetStrokeColorSpace(Object args[], int numArgs);
+ void opSetFillColor(Object args[], int numArgs);
+ void opSetStrokeColor(Object args[], int numArgs);
+ void opSetFillColorN(Object args[], int numArgs);
+ void opSetStrokeColorN(Object args[], int numArgs);
+
+ // path segment operators
+ void opMoveTo(Object args[], int numArgs);
+ void opLineTo(Object args[], int numArgs);
+ void opCurveTo(Object args[], int numArgs);
+ void opCurveTo1(Object args[], int numArgs);
+ void opCurveTo2(Object args[], int numArgs);
+ void opRectangle(Object args[], int numArgs);
+ void opClosePath(Object args[], int numArgs);
+
+ // path painting operators
+ void opEndPath(Object args[], int numArgs);
+ void opStroke(Object args[], int numArgs);
+ void opCloseStroke(Object args[], int numArgs);
+ void opFill(Object args[], int numArgs);
+ void opEOFill(Object args[], int numArgs);
+ void opFillStroke(Object args[], int numArgs);
+ void opCloseFillStroke(Object args[], int numArgs);
+ void opEOFillStroke(Object args[], int numArgs);
+ void opCloseEOFillStroke(Object args[], int numArgs);
+ void doPatternFill(GBool eoFill);
+ void doPatternStroke();
+ void doTilingPatternFill(GfxTilingPattern *tPat,
+ GBool stroke, GBool eoFill);
+ void doShadingPatternFill(GfxShadingPattern *sPat,
+ GBool stroke, GBool eoFill);
+ void opShFill(Object args[], int numArgs);
+ void doFunctionShFill(GfxFunctionShading *shading);
+ void doFunctionShFill1(GfxFunctionShading *shading,
+ double x0, double y0,
+ double x1, double y1,
+ GfxColor *colors, int depth);
+ void doAxialShFill(GfxAxialShading *shading);
+ void doRadialShFill(GfxRadialShading *shading);
+ void doGouraudTriangleShFill(GfxGouraudTriangleShading *shading);
+ void gouraudFillTriangle(double x0, double y0, GfxColor *color0,
+ double x1, double y1, GfxColor *color1,
+ double x2, double y2, GfxColor *color2,
+ int nComps, int depth);
+ void doPatchMeshShFill(GfxPatchMeshShading *shading);
+ void fillPatch(GfxPatch *patch, int nComps, int depth);
+ void doEndPath();
+
+ // path clipping operators
+ void opClip(Object args[], int numArgs);
+ void opEOClip(Object args[], int numArgs);
+
+ // text object operators
+ void opBeginText(Object args[], int numArgs);
+ void opEndText(Object args[], int numArgs);
+
+ // text state operators
+ void opSetCharSpacing(Object args[], int numArgs);
+ void opSetFont(Object args[], int numArgs);
+ void opSetTextLeading(Object args[], int numArgs);
+ void opSetTextRender(Object args[], int numArgs);
+ void opSetTextRise(Object args[], int numArgs);
+ void opSetWordSpacing(Object args[], int numArgs);
+ void opSetHorizScaling(Object args[], int numArgs);
+
+ // text positioning operators
+ void opTextMove(Object args[], int numArgs);
+ void opTextMoveSet(Object args[], int numArgs);
+ void opSetTextMatrix(Object args[], int numArgs);
+ void opTextNextLine(Object args[], int numArgs);
+
+ // text string operators
+ void opShowText(Object args[], int numArgs);
+ void opMoveShowText(Object args[], int numArgs);
+ void opMoveSetShowText(Object args[], int numArgs);
+ void opShowSpaceText(Object args[], int numArgs);
+ void doShowText(GooString *s);
+
+ // XObject operators
+ void opXObject(Object args[], int numArgs);
+ void doImage(Object *ref, Stream *str, GBool inlineImg);
+ void doForm(Object *str);
+ void doForm1(Object *str, Dict *resDict, double *matrix, double *bbox,
+ GBool transpGroup = gFalse, GBool softMask = gFalse,
+ GfxColorSpace *blendingColorSpace = NULL,
+ GBool isolated = gFalse, GBool knockout = gFalse,
+ GBool alpha = gFalse, Function *transferFunc = NULL,
+ GfxColor *backdropColor = NULL);
+
+ // in-line image operators
+ void opBeginImage(Object args[], int numArgs);
+ Stream *buildImageStream();
+ void opImageData(Object args[], int numArgs);
+ void opEndImage(Object args[], int numArgs);
+
+ // type 3 font operators
+ void opSetCharWidth(Object args[], int numArgs);
+ void opSetCacheDevice(Object args[], int numArgs);
+
+ // compatibility operators
+ void opBeginIgnoreUndef(Object args[], int numArgs);
+ void opEndIgnoreUndef(Object args[], int numArgs);
+
+ // marked content operators
+ void opBeginMarkedContent(Object args[], int numArgs);
+ void opEndMarkedContent(Object args[], int numArgs);
+ void opMarkPoint(Object args[], int numArgs);
+ GBool contentIsHidden();
+ void pushMarkedContent();
+ void popMarkedContent();
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.cc
new file mode 100644
index 00000000000..e7d564a4e09
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.cc
@@ -0,0 +1,2143 @@
+//========================================================================
+//
+// GfxFont.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2005, 2006, 2008, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2007 Ed Catmur <ed@catmur.co.uk>
+// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org>
+// Copyright (C) 2008 Ed Avis <eda@waniasset.com>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 Peter Kerzum <kerzum@yandex-team.ru>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "Error.h"
+#include "Object.h"
+#include "Dict.h"
+#include "GlobalParams.h"
+#include "CMap.h"
+#include "CharCodeToUnicode.h"
+#include "FontEncodingTables.h"
+#include "BuiltinFontTables.h"
+#include <fofi/FoFiType1.h>
+#include <fofi/FoFiType1C.h>
+#include <fofi/FoFiTrueType.h>
+#include "GfxFont.h"
+
+//------------------------------------------------------------------------
+
+struct StdFontMapEntry {
+ char *altName;
+ char *properName;
+};
+
+// Acrobat 4.0 and earlier substituted Base14-compatible fonts without
+// providing Widths and a FontDescriptor, so we munge the names into
+// the proper Base14 names. This table is from implementation note 44
+// in the PDF 1.4 spec, with some additions based on empirical
+// evidence.
+static const StdFontMapEntry stdFontMap[] = {
+ { "Arial", "Helvetica" },
+ { "Arial,Bold", "Helvetica-Bold" },
+ { "Arial,BoldItalic", "Helvetica-BoldOblique" },
+ { "Arial,Italic", "Helvetica-Oblique" },
+ { "Arial-Bold", "Helvetica-Bold" },
+ { "Arial-BoldItalic", "Helvetica-BoldOblique" },
+ { "Arial-BoldItalicMT", "Helvetica-BoldOblique" },
+ { "Arial-BoldMT", "Helvetica-Bold" },
+ { "Arial-Italic", "Helvetica-Oblique" },
+ { "Arial-ItalicMT", "Helvetica-Oblique" },
+ { "ArialMT", "Helvetica" },
+ { "Courier,Bold", "Courier-Bold" },
+ { "Courier,BoldItalic", "Courier-BoldOblique" },
+ { "Courier,Italic", "Courier-Oblique" },
+ { "CourierNew", "Courier" },
+ { "CourierNew,Bold", "Courier-Bold" },
+ { "CourierNew,BoldItalic", "Courier-BoldOblique" },
+ { "CourierNew,Italic", "Courier-Oblique" },
+ { "CourierNew-Bold", "Courier-Bold" },
+ { "CourierNew-BoldItalic", "Courier-BoldOblique" },
+ { "CourierNew-Italic", "Courier-Oblique" },
+ { "CourierNewPS-BoldItalicMT", "Courier-BoldOblique" },
+ { "CourierNewPS-BoldMT", "Courier-Bold" },
+ { "CourierNewPS-ItalicMT", "Courier-Oblique" },
+ { "CourierNewPSMT", "Courier" },
+ { "Helvetica,Bold", "Helvetica-Bold" },
+ { "Helvetica,BoldItalic", "Helvetica-BoldOblique" },
+ { "Helvetica,Italic", "Helvetica-Oblique" },
+ { "Helvetica-BoldItalic", "Helvetica-BoldOblique" },
+ { "Helvetica-Italic", "Helvetica-Oblique" },
+ { "Symbol,Bold", "Symbol" },
+ { "Symbol,BoldItalic", "Symbol" },
+ { "Symbol,Italic", "Symbol" },
+ { "TimesNewRoman", "Times-Roman" },
+ { "TimesNewRoman,Bold", "Times-Bold" },
+ { "TimesNewRoman,BoldItalic", "Times-BoldItalic" },
+ { "TimesNewRoman,Italic", "Times-Italic" },
+ { "TimesNewRoman-Bold", "Times-Bold" },
+ { "TimesNewRoman-BoldItalic", "Times-BoldItalic" },
+ { "TimesNewRoman-Italic", "Times-Italic" },
+ { "TimesNewRomanPS", "Times-Roman" },
+ { "TimesNewRomanPS-Bold", "Times-Bold" },
+ { "TimesNewRomanPS-BoldItalic", "Times-BoldItalic" },
+ { "TimesNewRomanPS-BoldItalicMT", "Times-BoldItalic" },
+ { "TimesNewRomanPS-BoldMT", "Times-Bold" },
+ { "TimesNewRomanPS-Italic", "Times-Italic" },
+ { "TimesNewRomanPS-ItalicMT", "Times-Italic" },
+ { "TimesNewRomanPSMT", "Times-Roman" },
+ { "TimesNewRomanPSMT,Bold", "Times-Bold" },
+ { "TimesNewRomanPSMT,BoldItalic", "Times-BoldItalic" },
+ { "TimesNewRomanPSMT,Italic", "Times-Italic" }
+};
+
+static int parseCharName(char *charName, Unicode *uBuf, int uLen,
+ GBool names, GBool ligatures,
+ GBool numeric, GBool hex, GBool variants);
+
+//------------------------------------------------------------------------
+// GfxFont
+//------------------------------------------------------------------------
+
+GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) {
+ GooString *nameA;
+ GfxFont *font;
+ Object obj1;
+
+ // get base font name
+ nameA = NULL;
+ fontDict->lookup("BaseFont", &obj1);
+ if (obj1.isName()) {
+ nameA = new GooString(obj1.getName());
+ }
+ obj1.free();
+
+ // get font type
+ font = NULL;
+ fontDict->lookup("Subtype", &obj1);
+ if (obj1.isName("Type1") || obj1.isName("MMType1")) {
+ font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1, fontDict);
+ } else if (obj1.isName("Type1C")) {
+ font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1C, fontDict);
+ } else if (obj1.isName("Type3")) {
+ font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType3, fontDict);
+ } else if (obj1.isName("TrueType")) {
+ font = new Gfx8BitFont(xref, tagA, idA, nameA, fontTrueType, fontDict);
+ } else if (obj1.isName("Type0")) {
+ font = new GfxCIDFont(xref, tagA, idA, nameA, fontDict);
+ } else {
+ error(-1, "Unknown font type: '%s'",
+ obj1.isName() ? obj1.getName() : "???");
+ font = new Gfx8BitFont(xref, tagA, idA, nameA, fontUnknownType, fontDict);
+ }
+ obj1.free();
+
+ return font;
+}
+
+GfxFont::GfxFont(char *tagA, Ref idA, GooString *nameA) {
+ ok = gFalse;
+ tag = new GooString(tagA);
+ id = idA;
+ name = nameA;
+ origName = nameA;
+ embFontName = NULL;
+ extFontFile = NULL;
+ family = NULL;
+ stretch = StretchNotDefined;
+ weight = WeightNotDefined;
+ refCnt = 1;
+ dfp = NULL;
+}
+
+GfxFont::~GfxFont() {
+ delete tag;
+ delete family;
+ if (origName && origName != name) {
+ delete origName;
+ }
+ if (name) {
+ delete name;
+ }
+ if (embFontName) {
+ delete embFontName;
+ }
+ if (extFontFile) {
+ delete extFontFile;
+ }
+ delete dfp;
+}
+
+void GfxFont::incRefCnt() {
+ refCnt++;
+}
+
+void GfxFont::decRefCnt() {
+ if (--refCnt == 0)
+ delete this;
+}
+
+void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) {
+ Object obj1, obj2, obj3, obj4;
+ double t;
+ int i;
+
+ // assume Times-Roman by default (for substitution purposes)
+ flags = fontSerif;
+
+ embFontID.num = -1;
+ embFontID.gen = -1;
+ missingWidth = 0;
+
+ if (fontDict->lookup("FontDescriptor", &obj1)->isDict()) {
+
+ // get flags
+ if (obj1.dictLookup("Flags", &obj2)->isInt()) {
+ flags = obj2.getInt();
+ }
+ obj2.free();
+
+ // get name
+ obj1.dictLookup("FontName", &obj2);
+ if (obj2.isName()) {
+ embFontName = new GooString(obj2.getName());
+ }
+ obj2.free();
+ if (embFontName == NULL) {
+ // get name with typo
+ obj1.dictLookup("Fontname", &obj2);
+ if (obj2.isName()) {
+ embFontName = new GooString(obj2.getName());
+ error(-1, "The file uses Fontname instead of FontName please notify the creator that the file is broken");
+ }
+ obj2.free();
+ }
+
+ // get family
+ obj1.dictLookup("FontFamily", &obj2);
+ if (obj2.isString()) family = new GooString(obj2.getString());
+ obj2.free();
+
+ // get stretch
+ obj1.dictLookup("FontStretch", &obj2);
+ if (obj2.isName()) {
+ if (strcmp(obj2.getName(), "UltraCondensed") == 0) stretch = UltraCondensed;
+ else if (strcmp(obj2.getName(), "ExtraCondensed") == 0) stretch = ExtraCondensed;
+ else if (strcmp(obj2.getName(), "Condensed") == 0) stretch = Condensed;
+ else if (strcmp(obj2.getName(), "SemiCondensed") == 0) stretch = SemiCondensed;
+ else if (strcmp(obj2.getName(), "Normal") == 0) stretch = Normal;
+ else if (strcmp(obj2.getName(), "SemiExpanded") == 0) stretch = SemiExpanded;
+ else if (strcmp(obj2.getName(), "Expanded") == 0) stretch = Expanded;
+ else if (strcmp(obj2.getName(), "ExtraExpanded") == 0) stretch = ExtraExpanded;
+ else if (strcmp(obj2.getName(), "UltraExpanded") == 0) stretch = UltraExpanded;
+ else error(-1, "Invalid Font Stretch");
+ }
+ obj2.free();
+
+ // get weight
+ obj1.dictLookup("FontWeight", &obj2);
+ if (obj2.isNum()) {
+ if (obj2.getNum() == 100) weight = W100;
+ else if (obj2.getNum() == 200) weight = W200;
+ else if (obj2.getNum() == 300) weight = W300;
+ else if (obj2.getNum() == 400) weight = W400;
+ else if (obj2.getNum() == 500) weight = W500;
+ else if (obj2.getNum() == 600) weight = W600;
+ else if (obj2.getNum() == 700) weight = W700;
+ else if (obj2.getNum() == 800) weight = W800;
+ else if (obj2.getNum() == 900) weight = W900;
+ else error(-1, "Invalid Font Weight");
+ }
+ obj2.free();
+
+ // look for embedded font file
+ if (obj1.dictLookupNF("FontFile", &obj2)->isRef()) {
+ embFontID = obj2.getRef();
+ if (type != fontType1) {
+ error(-1, "Mismatch between font type and embedded font file");
+ if (isCIDFont()) {
+ error(-1, "CID font has FontFile attribute; assuming CIDType0");
+ type = fontCIDType0;
+ } else {
+ type = fontType1;
+ }
+ }
+ }
+ obj2.free();
+ if (embFontID.num == -1 &&
+ obj1.dictLookupNF("FontFile2", &obj2)->isRef()) {
+ embFontID = obj2.getRef();
+ if (type != fontTrueType && type != fontCIDType2) {
+ error(-1, "Mismatch between font type and embedded font file");
+ type = isCIDFont() ? fontCIDType2 : fontTrueType;
+ }
+ }
+ obj2.free();
+ if (embFontID.num == -1 &&
+ obj1.dictLookupNF("FontFile3", &obj2)->isRef()) {
+ if (obj2.fetch(xref, &obj3)->isStream()) {
+ obj3.streamGetDict()->lookup("Subtype", &obj4);
+ if (obj4.isName("Type1")) {
+ embFontID = obj2.getRef();
+ if (type != fontType1) {
+ error(-1, "Mismatch between font type and embedded font file");
+ if (isCIDFont()) {
+ error(-1, "Embedded CID font has type Type1; assuming CIDType0");
+ type = fontCIDType0;
+ } else {
+ type = fontType1;
+ }
+ }
+ } else if (obj4.isName("Type1C")) {
+ embFontID = obj2.getRef();
+ if (type != fontType1 && type != fontType1C) {
+ error(-1, "Mismatch between font type and embedded font file");
+ }
+ if (isCIDFont()) {
+ error(-1, "Embedded CID font has type Type1C; assuming CIDType0C");
+ type = fontCIDType0C;
+ } else {
+ type = fontType1C;
+ }
+ } else if (obj4.isName("TrueType")) {
+ embFontID = obj2.getRef();
+ if (type != fontTrueType) {
+ error(-1, "Mismatch between font type and embedded font file");
+ if (isCIDFont()) {
+ error(-1, "Embedded CID font has type TrueType; assuming CIDType2");
+ type = fontCIDType2;
+ } else {
+ type = fontTrueType;
+ }
+ }
+ } else if (obj4.isName("CIDFontType0C")) {
+ embFontID = obj2.getRef();
+ if (type != fontCIDType0) {
+ error(-1, "Mismatch between font type and embedded font file");
+ }
+ if (isCIDFont()) {
+ type = fontCIDType0C;
+ } else {
+ error(-1, "Embedded non-CID font has type CIDFontType0c; assuming Type1C");
+ type = fontType1C;
+ }
+ } else if (obj4.isName("OpenType")) {
+ embFontID = obj2.getRef();
+ if (type == fontTrueType) {
+ type = fontTrueTypeOT;
+ } else if (type == fontType1) {
+ type = fontType1COT;
+ } else if (type == fontCIDType0) {
+ type = fontCIDType0COT;
+ } else if (type == fontCIDType2) {
+ type = fontCIDType2OT;
+ } else {
+ error(-1, "Mismatch between font type and embedded font file");
+ }
+ } else {
+ error(-1, "Unknown embedded font type '%s'",
+ obj4.isName() ? obj4.getName() : "???");
+ }
+ obj4.free();
+ }
+ obj3.free();
+ }
+ obj2.free();
+
+ // look for MissingWidth
+ obj1.dictLookup("MissingWidth", &obj2);
+ if (obj2.isNum()) {
+ missingWidth = obj2.getNum();
+ }
+ obj2.free();
+
+ // get Ascent and Descent
+ obj1.dictLookup("Ascent", &obj2);
+ if (obj2.isNum()) {
+ t = 0.001 * obj2.getNum();
+ // some broken font descriptors set ascent and descent to 0
+ if (t != 0) {
+ ascent = t;
+ }
+ }
+ obj2.free();
+ obj1.dictLookup("Descent", &obj2);
+ if (obj2.isNum()) {
+ t = 0.001 * obj2.getNum();
+ // some broken font descriptors set ascent and descent to 0
+ if (t != 0) {
+ descent = t;
+ }
+ // some broken font descriptors specify a positive descent
+ if (descent > 0) {
+ descent = -descent;
+ }
+ }
+ obj2.free();
+
+ // font FontBBox
+ if (obj1.dictLookup("FontBBox", &obj2)->isArray()) {
+ for (i = 0; i < 4 && i < obj2.arrayGetLength(); ++i) {
+ if (obj2.arrayGet(i, &obj3)->isNum()) {
+ fontBBox[i] = 0.001 * obj3.getNum();
+ }
+ obj3.free();
+ }
+ }
+ obj2.free();
+
+ }
+ obj1.free();
+}
+
+CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits,
+ CharCodeToUnicode *ctu) {
+ GooString *buf;
+ Object obj1;
+ int c;
+
+ if (!fontDict->lookup("ToUnicode", &obj1)->isStream()) {
+ obj1.free();
+ return NULL;
+ }
+ buf = new GooString();
+ obj1.streamReset();
+ while ((c = obj1.streamGetChar()) != EOF) {
+ buf->append(c);
+ }
+ obj1.streamClose();
+ obj1.free();
+ if (ctu) {
+ ctu->mergeCMap(buf, nBits);
+ } else {
+ ctu = CharCodeToUnicode::parseCMap(buf, nBits);
+ }
+ delete buf;
+ return ctu;
+}
+
+void GfxFont::findExtFontFile() {
+ static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
+ static char *ttExts[] = { ".ttf", ".ttc", NULL };
+
+ if (name) {
+ if (type == fontType1) {
+ extFontFile = globalParams->findFontFile(name, type1Exts);
+ } else if (type == fontTrueType) {
+ extFontFile = globalParams->findFontFile(name, ttExts);
+ }
+ }
+}
+
+char *GfxFont::readExtFontFile(int *len) {
+ FILE *f;
+ char *buf;
+
+ if (!(f = fopen(extFontFile->getCString(), "rb"))) {
+ error(-1, "External font file '%s' vanished", extFontFile->getCString());
+ return NULL;
+ }
+ if (fseek(f, 0, SEEK_END) != 0) {
+ error(-1, "Cannot seek to end of '%s'", extFontFile->getCString());
+ fclose(f);
+ return NULL;
+ }
+ *len = (int)ftell(f);
+ if (fseek(f, 0, SEEK_SET) != 0) {
+ error(-1, "Cannot seek to start of '%s'", extFontFile->getCString());
+ fclose(f);
+ return NULL;
+ }
+ buf = (char *)gmalloc(*len);
+ if ((int)fread(buf, 1, *len, f) != *len) {
+ error(-1, "Error reading external font file '%s'",
+ extFontFile->getCString());
+ }
+ fclose(f);
+ return buf;
+}
+
+char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
+ char *buf;
+ Object obj1, obj2;
+ Stream *str;
+ int c;
+ int size, i;
+
+ obj1.initRef(embFontID.num, embFontID.gen);
+ obj1.fetch(xref, &obj2);
+ if (!obj2.isStream()) {
+ error(-1, "Embedded font file is not a stream");
+ obj2.free();
+ obj1.free();
+ embFontID.num = -1;
+ *len = 0;
+ return NULL;
+ }
+ str = obj2.getStream();
+
+ buf = NULL;
+ i = size = 0;
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ if (i == size) {
+ size += 4096;
+ buf = (char *)grealloc(buf, size);
+ }
+ buf[i++] = c;
+ }
+ *len = i;
+ str->close();
+
+ obj2.free();
+ obj1.free();
+
+ return buf;
+}
+
+//------------------------------------------------------------------------
+// Gfx8BitFont
+//------------------------------------------------------------------------
+
+Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GooString *nameA,
+ GfxFontType typeA, Dict *fontDict):
+ GfxFont(tagA, idA, nameA)
+{
+ GooString *name2;
+ BuiltinFont *builtinFont;
+ char **baseEnc;
+ GBool baseEncFromFontFile;
+ char *buf;
+ int len;
+ FoFiType1 *ffT1;
+ FoFiType1C *ffT1C;
+ int code;
+ char *charName;
+ GBool missing, hex;
+ Unicode toUnicode[256];
+ CharCodeToUnicode *utu, *ctu2;
+ Unicode uBuf[8];
+ double mul;
+ int firstChar, lastChar;
+ Gushort w;
+ Object obj1, obj2, obj3;
+ int n, i, a, b, m;
+
+ refCnt = 1;
+ type = typeA;
+ ctu = NULL;
+
+ // do font name substitution for various aliases of the Base 14 font
+ // names
+ if (name) {
+ name2 = name->copy();
+ i = 0;
+ while (i < name2->getLength()) {
+ if (name2->getChar(i) == ' ') {
+ name2->del(i);
+ } else {
+ ++i;
+ }
+ }
+ a = 0;
+ b = sizeof(stdFontMap) / sizeof(StdFontMapEntry);
+ // invariant: stdFontMap[a].altName <= name2 < stdFontMap[b].altName
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (name2->cmp(stdFontMap[m].altName) >= 0) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ if (!name2->cmp(stdFontMap[a].altName)) {
+ name = new GooString(stdFontMap[a].properName);
+ }
+ delete name2;
+ }
+
+ // is it a built-in font?
+ builtinFont = NULL;
+ if (name) {
+ for (i = 0; i < nBuiltinFonts; ++i) {
+ if (!name->cmp(builtinFonts[i].name)) {
+ builtinFont = &builtinFonts[i];
+ break;
+ }
+ }
+ }
+
+ // default ascent/descent values
+ if (builtinFont) {
+ ascent = 0.001 * builtinFont->ascent;
+ descent = 0.001 * builtinFont->descent;
+ fontBBox[0] = 0.001 * builtinFont->bbox[0];
+ fontBBox[1] = 0.001 * builtinFont->bbox[1];
+ fontBBox[2] = 0.001 * builtinFont->bbox[2];
+ fontBBox[3] = 0.001 * builtinFont->bbox[3];
+ } else {
+ ascent = 0.95;
+ descent = -0.35;
+ fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
+ }
+
+ // get info from font descriptor
+ readFontDescriptor(xref, fontDict);
+
+ // for non-embedded fonts, don't trust the ascent/descent/bbox
+ // values from the font descriptor
+ if (builtinFont && embFontID.num < 0) {
+ ascent = 0.001 * builtinFont->ascent;
+ descent = 0.001 * builtinFont->descent;
+ fontBBox[0] = 0.001 * builtinFont->bbox[0];
+ fontBBox[1] = 0.001 * builtinFont->bbox[1];
+ fontBBox[2] = 0.001 * builtinFont->bbox[2];
+ fontBBox[3] = 0.001 * builtinFont->bbox[3];
+ }
+
+ // look for an external font file
+ findExtFontFile();
+
+ // get font matrix
+ fontMat[0] = fontMat[3] = 1;
+ fontMat[1] = fontMat[2] = fontMat[4] = fontMat[5] = 0;
+ if (fontDict->lookup("FontMatrix", &obj1)->isArray()) {
+ for (i = 0; i < 6 && i < obj1.arrayGetLength(); ++i) {
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ fontMat[i] = obj2.getNum();
+ }
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ // get Type 3 bounding box, font definition, and resources
+ if (type == fontType3) {
+ if (fontDict->lookup("FontBBox", &obj1)->isArray()) {
+ for (i = 0; i < 4 && i < obj1.arrayGetLength(); ++i) {
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ fontBBox[i] = obj2.getNum();
+ }
+ obj2.free();
+ }
+ }
+ obj1.free();
+ if (!fontDict->lookup("CharProcs", &charProcs)->isDict()) {
+ error(-1, "Missing or invalid CharProcs dictionary in Type 3 font");
+ charProcs.free();
+ }
+ if (!fontDict->lookup("Resources", &resources)->isDict()) {
+ resources.free();
+ }
+ }
+
+ //----- build the font encoding -----
+
+ // Encodings start with a base encoding, which can come from
+ // (in order of priority):
+ // 1. FontDict.Encoding or FontDict.Encoding.BaseEncoding
+ // - MacRoman / MacExpert / WinAnsi / Standard
+ // 2. embedded or external font file
+ // 3. default:
+ // - builtin --> builtin encoding
+ // - TrueType --> WinAnsiEncoding
+ // - others --> StandardEncoding
+ // and then add a list of differences (if any) from
+ // FontDict.Encoding.Differences.
+
+ // check FontDict for base encoding
+ hasEncoding = gFalse;
+ usesMacRomanEnc = gFalse;
+ baseEnc = NULL;
+ baseEncFromFontFile = gFalse;
+ fontDict->lookup("Encoding", &obj1);
+ if (obj1.isDict()) {
+ obj1.dictLookup("BaseEncoding", &obj2);
+ if (obj2.isName("MacRomanEncoding")) {
+ hasEncoding = gTrue;
+ usesMacRomanEnc = gTrue;
+ baseEnc = macRomanEncoding;
+ } else if (obj2.isName("MacExpertEncoding")) {
+ hasEncoding = gTrue;
+ baseEnc = macExpertEncoding;
+ } else if (obj2.isName("WinAnsiEncoding")) {
+ hasEncoding = gTrue;
+ baseEnc = winAnsiEncoding;
+ }
+ obj2.free();
+ } else if (obj1.isName("MacRomanEncoding")) {
+ hasEncoding = gTrue;
+ usesMacRomanEnc = gTrue;
+ baseEnc = macRomanEncoding;
+ } else if (obj1.isName("MacExpertEncoding")) {
+ hasEncoding = gTrue;
+ baseEnc = macExpertEncoding;
+ } else if (obj1.isName("WinAnsiEncoding")) {
+ hasEncoding = gTrue;
+ baseEnc = winAnsiEncoding;
+ }
+
+ // check embedded or external font file for base encoding
+ // (only for Type 1 fonts - trying to get an encoding out of a
+ // TrueType font is a losing proposition)
+ ffT1 = NULL;
+ ffT1C = NULL;
+ buf = NULL;
+ if (type == fontType1 && (extFontFile || embFontID.num >= 0)) {
+ if (extFontFile) {
+ ffT1 = FoFiType1::load(extFontFile->getCString());
+ } else {
+ buf = readEmbFontFile(xref, &len);
+ ffT1 = FoFiType1::make(buf, len);
+ }
+ if (ffT1) {
+ if (ffT1->getName()) {
+ if (embFontName) {
+ delete embFontName;
+ }
+ embFontName = new GooString(ffT1->getName());
+ }
+ if (!baseEnc) {
+ baseEnc = ffT1->getEncoding();
+ baseEncFromFontFile = gTrue;
+ }
+ }
+ } else if (type == fontType1C && (extFontFile || embFontID.num >= 0)) {
+ if (extFontFile) {
+ ffT1C = FoFiType1C::load(extFontFile->getCString());
+ } else {
+ buf = readEmbFontFile(xref, &len);
+ ffT1C = FoFiType1C::make(buf, len);
+ }
+ if (ffT1C) {
+ if (ffT1C->getName()) {
+ if (embFontName) {
+ delete embFontName;
+ }
+ embFontName = new GooString(ffT1C->getName());
+ }
+ if (!baseEnc) {
+ baseEnc = ffT1C->getEncoding();
+ baseEncFromFontFile = gTrue;
+ }
+ }
+ }
+ if (buf) {
+ gfree(buf);
+ }
+
+ // get default base encoding
+ if (!baseEnc) {
+ if (builtinFont && embFontID.num < 0) {
+ baseEnc = builtinFont->defaultBaseEnc;
+ hasEncoding = gTrue;
+ } else if (type == fontTrueType) {
+ baseEnc = winAnsiEncoding;
+ } else {
+ baseEnc = standardEncoding;
+ }
+ }
+
+ // copy the base encoding
+ for (i = 0; i < 256; ++i) {
+ enc[i] = baseEnc[i];
+ if ((encFree[i] = baseEncFromFontFile) && enc[i]) {
+ enc[i] = copyString(baseEnc[i]);
+ }
+ }
+
+ // some Type 1C font files have empty encodings, which can break the
+ // T1C->T1 conversion (since the 'seac' operator depends on having
+ // the accents in the encoding), so we fill in any gaps from
+ // StandardEncoding
+ if (type == fontType1C && (extFontFile || embFontID.num >= 0) &&
+ baseEncFromFontFile) {
+ for (i = 0; i < 256; ++i) {
+ if (!enc[i] && standardEncoding[i]) {
+ enc[i] = standardEncoding[i];
+ encFree[i] = gFalse;
+ }
+ }
+ }
+
+ // merge differences into encoding
+ if (obj1.isDict()) {
+ obj1.dictLookup("Differences", &obj2);
+ if (obj2.isArray()) {
+ hasEncoding = gTrue;
+ code = 0;
+ for (i = 0; i < obj2.arrayGetLength(); ++i) {
+ obj2.arrayGet(i, &obj3);
+ if (obj3.isInt()) {
+ code = obj3.getInt();
+ } else if (obj3.isName()) {
+ if (code >= 0 && code < 256) {
+ if (encFree[code]) {
+ gfree(enc[code]);
+ }
+ enc[code] = copyString(obj3.getName());
+ encFree[code] = gTrue;
+ }
+ ++code;
+ } else {
+ error(-1, "Wrong type in font encoding resource differences (%s)",
+ obj3.getTypeName());
+ }
+ obj3.free();
+ }
+ }
+ obj2.free();
+ }
+ obj1.free();
+ if (ffT1) {
+ delete ffT1;
+ }
+ if (ffT1C) {
+ delete ffT1C;
+ }
+
+ //----- build the mapping to Unicode -----
+
+ // pass 1: use the name-to-Unicode mapping table
+ missing = hex = gFalse;
+ for (code = 0; code < 256; ++code) {
+ if ((charName = enc[code])) {
+ if (!(toUnicode[code] = globalParams->mapNameToUnicode(charName)) &&
+ strcmp(charName, ".notdef")) {
+ // if it wasn't in the name-to-Unicode table, check for a
+ // name that looks like 'Axx' or 'xx', where 'A' is any letter
+ // and 'xx' is two hex digits
+ if ((strlen(charName) == 3 &&
+ isalpha(charName[0]) &&
+ isxdigit(charName[1]) && isxdigit(charName[2]) &&
+ ((charName[1] >= 'a' && charName[1] <= 'f') ||
+ (charName[1] >= 'A' && charName[1] <= 'F') ||
+ (charName[2] >= 'a' && charName[2] <= 'f') ||
+ (charName[2] >= 'A' && charName[2] <= 'F'))) ||
+ (strlen(charName) == 2 &&
+ isxdigit(charName[0]) && isxdigit(charName[1]) &&
+ ((charName[0] >= 'a' && charName[0] <= 'f') ||
+ (charName[0] >= 'A' && charName[0] <= 'F') ||
+ (charName[1] >= 'a' && charName[1] <= 'f') ||
+ (charName[1] >= 'A' && charName[1] <= 'F')))) {
+ hex = gTrue;
+ }
+ missing = gTrue;
+ }
+ } else {
+ toUnicode[code] = 0;
+ }
+ }
+
+ // construct the char code -> Unicode mapping object
+ ctu = CharCodeToUnicode::make8BitToUnicode(toUnicode);
+
+ // pass 2: try to fill in the missing chars, looking for ligatures, numeric
+ // references and variants
+ if (missing) {
+ for (code = 0; code < 256; ++code) {
+ if (!toUnicode[code]) {
+ if ((charName = enc[code]) && strcmp(charName, ".notdef")
+ && (n = parseCharName(charName, uBuf, sizeof(uBuf)/sizeof(*uBuf),
+ gFalse, // don't check simple names (pass 1)
+ gTrue, // do check ligatures
+ globalParams->getMapNumericCharNames(),
+ hex,
+ gTrue))) { // do check variants
+ ctu->setMapping((CharCode)code, uBuf, n);
+ } else if (globalParams->getMapUnknownCharNames()) {
+ // if the 'mapUnknownCharNames' flag is set, do a simple pass-through
+ // mapping for unknown character names
+ if (charName && charName[0]) {
+ for (n = 0; n < (int)(sizeof(uBuf)/sizeof(*uBuf)); ++n)
+ if (!(uBuf[n] = charName[n]))
+ break;
+ ctu->setMapping((CharCode)code, uBuf, n);
+ } else {
+ uBuf[0] = code;
+ ctu->setMapping((CharCode)code, uBuf, 1);
+ }
+ }
+ }
+ }
+ }
+
+ // merge in a ToUnicode CMap, if there is one -- this overwrites
+ // existing entries in ctu, i.e., the ToUnicode CMap takes
+ // precedence, but the other encoding info is allowed to fill in any
+ // holes
+ readToUnicodeCMap(fontDict, 8, ctu);
+
+ // look for a Unicode-to-Unicode mapping
+ if (name && (utu = globalParams->getUnicodeToUnicode(name))) {
+ Unicode *uAux;
+ for (i = 0; i < 256; ++i) {
+ toUnicode[i] = 0;
+ }
+ ctu2 = CharCodeToUnicode::make8BitToUnicode(toUnicode);
+ for (i = 0; i < 256; ++i) {
+ n = ctu->mapToUnicode((CharCode)i, &uAux);
+ if (n >= 1) {
+ n = utu->mapToUnicode((CharCode)uAux[0], &uAux);
+ if (n >= 1) {
+ ctu2->setMapping((CharCode)i, uAux, n);
+ }
+ }
+ }
+ utu->decRefCnt();
+ delete ctu;
+ ctu = ctu2;
+ }
+
+ //----- get the character widths -----
+
+ // initialize all widths
+ for (code = 0; code < 256; ++code) {
+ widths[code] = missingWidth * 0.001;
+ }
+
+ // use widths from font dict, if present
+ fontDict->lookup("FirstChar", &obj1);
+ firstChar = obj1.isInt() ? obj1.getInt() : 0;
+ obj1.free();
+ if (firstChar < 0 || firstChar > 255) {
+ firstChar = 0;
+ }
+ fontDict->lookup("LastChar", &obj1);
+ lastChar = obj1.isInt() ? obj1.getInt() : 255;
+ obj1.free();
+ if (lastChar < 0 || lastChar > 255) {
+ lastChar = 255;
+ }
+ mul = (type == fontType3) ? fontMat[0] : 0.001;
+ fontDict->lookup("Widths", &obj1);
+ if (obj1.isArray()) {
+ flags |= fontFixedWidth;
+ if (obj1.arrayGetLength() < lastChar - firstChar + 1) {
+ lastChar = firstChar + obj1.arrayGetLength() - 1;
+ }
+ for (code = firstChar; code <= lastChar; ++code) {
+ obj1.arrayGet(code - firstChar, &obj2);
+ if (obj2.isNum()) {
+ widths[code] = obj2.getNum() * mul;
+ if (widths[code] != widths[firstChar]) {
+ flags &= ~fontFixedWidth;
+ }
+ }
+ obj2.free();
+ }
+
+ // use widths from built-in font
+ } else if (builtinFont) {
+ // this is a kludge for broken PDF files that encode char 32
+ // as .notdef
+ if (builtinFont->widths->getWidth("space", &w)) {
+ widths[32] = 0.001 * w;
+ }
+ for (code = 0; code < 256; ++code) {
+ if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) {
+ widths[code] = 0.001 * w;
+ }
+ }
+
+ // couldn't find widths -- use defaults
+ } else {
+ // this is technically an error -- the Widths entry is required
+ // for all but the Base-14 fonts -- but certain PDF generators
+ // apparently don't include widths for Arial and TimesNewRoman
+ if (isFixedWidth()) {
+ i = 0;
+ } else if (isSerif()) {
+ i = 8;
+ } else {
+ i = 4;
+ }
+ if (isBold()) {
+ i += 2;
+ }
+ if (isItalic()) {
+ i += 1;
+ }
+ builtinFont = builtinFontSubst[i];
+ // this is a kludge for broken PDF files that encode char 32
+ // as .notdef
+ if (builtinFont->widths->getWidth("space", &w)) {
+ widths[32] = 0.001 * w;
+ }
+ for (code = 0; code < 256; ++code) {
+ if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) {
+ widths[code] = 0.001 * w;
+ }
+ }
+ }
+ obj1.free();
+
+ ok = gTrue;
+}
+
+Gfx8BitFont::~Gfx8BitFont() {
+ int i;
+
+ for (i = 0; i < 256; ++i) {
+ if (encFree[i] && enc[i]) {
+ gfree(enc[i]);
+ }
+ }
+ ctu->decRefCnt();
+ if (charProcs.isDict()) {
+ charProcs.free();
+ }
+ if (resources.isDict()) {
+ resources.free();
+ }
+}
+
+// This function is in part a derived work of the Adobe Glyph Mapping
+// Convention: http://www.adobe.com/devnet/opentype/archives/glyph.html
+// Algorithmic comments are excerpted from that document to aid
+// maintainability.
+static int parseCharName(char *charName, Unicode *uBuf, int uLen,
+ GBool names, GBool ligatures,
+ GBool numeric, GBool hex, GBool variants)
+{
+ if (uLen <= 0) {
+ error(-1, "Zero-length output buffer (recursion overflow?) in "
+ "parseCharName, component \"%s\"", charName);
+ return 0;
+ }
+ // Step 1: drop all the characters from the glyph name starting with the
+ // first occurrence of a period (U+002E FULL STOP), if any.
+ if (variants) {
+ char *var_part = strchr(charName, '.');
+ if (var_part == charName) {
+ return 0; // .notdef or similar
+ } else if (var_part != NULL) {
+ // parse names of the form 7.oldstyle, P.swash, s.sc, etc.
+ char *main_part = gstrndup(charName, var_part - charName);
+ GBool namesRecurse = gTrue, variantsRecurse = gFalse;
+ int n = parseCharName(main_part, uBuf, uLen, namesRecurse, ligatures,
+ numeric, hex, variantsRecurse);
+ gfree(main_part);
+ return n;
+ }
+ }
+ // Step 2: split the remaining string into a sequence of components, using
+ // underscore (U+005F LOW LINE) as the delimiter.
+ if (ligatures && strchr(charName, '_')) {
+ // parse names of the form A_a (e.g. f_i, T_h, l_quotesingle)
+ char *lig_part, *lig_end, *lig_copy;
+ int n = 0, m;
+ lig_part = lig_copy = copyString(charName);
+ do {
+ if ((lig_end = strchr(lig_part, '_')))
+ *lig_end = '\0';
+ if (lig_part[0] != '\0') {
+ GBool namesRecurse = gTrue, ligaturesRecurse = gFalse;
+ if ((m = parseCharName(lig_part, uBuf + n, uLen - n, namesRecurse,
+ ligaturesRecurse, numeric, hex, variants)))
+ n += m;
+ else
+ error(-1, "Could not parse ligature component \"%s\" of \"%s\" in "
+ "parseCharName", lig_part, charName);
+ }
+ lig_part = lig_end + 1;
+ } while (lig_end && n < uLen);
+ gfree(lig_copy);
+ return n;
+ }
+ // Step 3: map each component to a character string according to the
+ // procedure below, and concatenate those strings; the result is the
+ // character string to which the glyph name is mapped.
+ // 3.1. if the font is Zapf Dingbats (PostScript FontName ZapfDingbats), and
+ // the component is in the ZapfDingbats list, then map it to the
+ // corresponding character in that list.
+ // 3.2. otherwise, if the component is in the Adobe Glyph List, then map it
+ // to the corresponding character in that list.
+ if (names && (uBuf[0] = globalParams->mapNameToUnicode(charName))) {
+ return 1;
+ }
+ if (numeric) {
+ unsigned int n = strlen(charName);
+ // 3.3. otherwise, if the component is of the form "uni" (U+0075 U+006E
+ // U+0069) followed by a sequence of uppercase hexadecimal digits (0 .. 9,
+ // A .. F, i.e. U+0030 .. U+0039, U+0041 .. U+0046), the length of that
+ // sequence is a multiple of four, and each group of four digits represents
+ // a number in the set {0x0000 .. 0xD7FF, 0xE000 .. 0xFFFF}, then interpret
+ // each such number as a Unicode scalar value and map the component to the
+ // string made of those scalar values. Note that the range and digit length
+ // restrictions mean that the "uni" prefix can be used only with Unicode
+ // values from the Basic Multilingual Plane (BMP).
+ if (n >= 7 && (n % 4) == 3 && !strncmp(charName, "uni", 3)) {
+ int i;
+ unsigned int m;
+ for (i = 0, m = 3; i < uLen && m < n; m += 4) {
+ if (isxdigit(charName[m]) && isxdigit(charName[m + 1]) &&
+ isxdigit(charName[m + 2]) && isxdigit(charName[m + 3])) {
+ unsigned int u;
+ sscanf(charName + m, "%4x", &u);
+ if (u <= 0xD7FF || (0xE000 <= u && u <= 0xFFFF)) {
+ uBuf[i++] = u;
+ }
+ }
+ }
+ return i;
+ }
+ // 3.4. otherwise, if the component is of the form "u" (U+0075) followed by
+ // a sequence of four to six uppercase hexadecimal digits {0 .. 9, A .. F}
+ // (U+0030 .. U+0039, U+0041 .. U+0046), and those digits represent a
+ // number in {0x0000 .. 0xD7FF, 0xE000 .. 0x10FFFF}, then interpret this
+ // number as a Unicode scalar value and map the component to the string
+ // made of this scalar value.
+ if (n >= 5 && n <= 7 && charName[0] == 'u' && isxdigit(charName[1]) &&
+ isxdigit(charName[2]) && isxdigit(charName[3]) && isxdigit(charName[4])
+ && (n <= 5 || isxdigit(charName[5]))
+ && (n <= 6 || isxdigit(charName[6]))) {
+ unsigned int u;
+ sscanf(charName + 1, "%x", &u);
+ if (u <= 0xD7FF || (0xE000 <= u && u <= 0x10FFFF)) {
+ uBuf[0] = u;
+ return 1;
+ }
+ }
+ // Not in Adobe Glyph Mapping convention: look for names of the form 'Axx',
+ // 'xx', 'Ann', 'ABnn', or 'nn', where 'A' and 'B' are any letters, 'xx' is
+ // two hex digits, and 'nn' is 2-4 decimal digits
+ if (hex && n == 3 && isalpha(charName[0]) &&
+ isxdigit(charName[1]) && isxdigit(charName[2])) {
+ sscanf(charName+1, "%x", (unsigned int *)uBuf);
+ return 1;
+ } else if (hex && n == 2 &&
+ isxdigit(charName[0]) && isxdigit(charName[1])) {
+ sscanf(charName, "%x", (unsigned int *)uBuf);
+ return 1;
+ } else if (!hex && n >= 2 && n <= 4 &&
+ isdigit(charName[0]) && isdigit(charName[1])) {
+ uBuf[0] = (Unicode)atoi(charName);
+ return 1;
+ } else if (n >= 3 && n <= 5 &&
+ isdigit(charName[1]) && isdigit(charName[2])) {
+ uBuf[0] = (Unicode)atoi(charName+1);
+ return 1;
+ } else if (n >= 4 && n <= 6 &&
+ isdigit(charName[2]) && isdigit(charName[3])) {
+ uBuf[0] = (Unicode)atoi(charName+2);
+ return 1;
+ }
+ }
+ // 3.5. otherwise, map the component to the empty string
+ return 0;
+}
+
+int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code,
+ Unicode **u, int *uLen,
+ double *dx, double *dy, double *ox, double *oy) {
+ CharCode c;
+
+ *code = c = (CharCode)(*s & 0xff);
+ *uLen = ctu->mapToUnicode(c, u);
+ *dx = widths[c];
+ *dy = *ox = *oy = 0;
+ return 1;
+}
+
+CharCodeToUnicode *Gfx8BitFont::getToUnicode() {
+ ctu->incRefCnt();
+ return ctu;
+}
+
+Gushort *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
+ Gushort *map;
+ int cmapPlatform, cmapEncoding;
+ int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
+ GBool useMacRoman, useUnicode;
+ char *charName;
+ Unicode u;
+ int code, i, n;
+
+ map = (Gushort *)gmallocn(256, sizeof(Gushort));
+ for (i = 0; i < 256; ++i) {
+ map[i] = 0;
+ }
+
+ // To match up with the Adobe-defined behaviour, we choose a cmap
+ // like this:
+ // 1. If the PDF font has an encoding:
+ // 1a. If the PDF font specified MacRomanEncoding and the
+ // TrueType font has a Macintosh Roman cmap, use it, and
+ // reverse map the char names through MacRomanEncoding to
+ // get char codes.
+ // 1b. If the TrueType font has a Microsoft Unicode cmap or a
+ // non-Microsoft Unicode cmap, use it, and use the Unicode
+ // indexes, not the char codes.
+ // 1c. If the PDF font is symbolic and the TrueType font has a
+ // Microsoft Symbol cmap, use it, and use char codes
+ // directly (possibly with an offset of 0xf000).
+ // 1d. If the TrueType font has a Macintosh Roman cmap, use it,
+ // as in case 1a.
+ // 2. If the PDF font does not have an encoding or the PDF font is
+ // symbolic:
+ // 2a. If the TrueType font has a Macintosh Roman cmap, use it,
+ // and use char codes directly (possibly with an offset of
+ // 0xf000).
+ // 2b. If the TrueType font has a Microsoft Symbol cmap, use it,
+ // and use char codes directly (possible with an offset of
+ // 0xf000).
+ // 3. If none of these rules apply, use the first cmap and hope for
+ // the best (this shouldn't happen).
+ unicodeCmap = macRomanCmap = msSymbolCmap = -1;
+ for (i = 0; i < ff->getNumCmaps(); ++i) {
+ cmapPlatform = ff->getCmapPlatform(i);
+ cmapEncoding = ff->getCmapEncoding(i);
+ if ((cmapPlatform == 3 && cmapEncoding == 1) ||
+ cmapPlatform == 0) {
+ unicodeCmap = i;
+ } else if (cmapPlatform == 1 && cmapEncoding == 0) {
+ macRomanCmap = i;
+ } else if (cmapPlatform == 3 && cmapEncoding == 0) {
+ msSymbolCmap = i;
+ }
+ }
+ cmap = 0;
+ useMacRoman = gFalse;
+ useUnicode = gFalse;
+ if (hasEncoding) {
+ if (usesMacRomanEnc && macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ useMacRoman = gTrue;
+ } else if (unicodeCmap >= 0) {
+ cmap = unicodeCmap;
+ useUnicode = gTrue;
+ } else if ((flags & fontSymbolic) && msSymbolCmap >= 0) {
+ cmap = msSymbolCmap;
+ } else if ((flags & fontSymbolic) && macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ } else if (macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ useMacRoman = gTrue;
+ }
+ } else {
+ if (msSymbolCmap >= 0) {
+ cmap = msSymbolCmap;
+ } else if (macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ }
+ }
+
+ // reverse map the char names through MacRomanEncoding, then map the
+ // char codes through the cmap
+ if (useMacRoman) {
+ for (i = 0; i < 256; ++i) {
+ if ((charName = enc[i])) {
+ if ((code = globalParams->getMacRomanCharCode(charName))) {
+ map[i] = ff->mapCodeToGID(cmap, code);
+ }
+ }
+ }
+
+ // map Unicode through the cmap
+ } else if (useUnicode) {
+ Unicode *uAux;
+ for (i = 0; i < 256; ++i) {
+ if (((charName = enc[i]) && (u = globalParams->mapNameToUnicode(charName))))
+ map[i] = ff->mapCodeToGID(cmap, u);
+ else
+ {
+ n = ctu->mapToUnicode((CharCode)i, &uAux);
+ if (n > 0) map[i] = ff->mapCodeToGID(cmap, uAux[0]);
+ }
+ }
+
+ // map the char codes through the cmap, possibly with an offset of
+ // 0xf000
+ } else {
+ for (i = 0; i < 256; ++i) {
+ if (!(map[i] = ff->mapCodeToGID(cmap, i))) {
+ map[i] = ff->mapCodeToGID(cmap, 0xf000 + i);
+ }
+ }
+ }
+
+ // try the TrueType 'post' table to handle any unmapped characters
+ for (i = 0; i < 256; ++i) {
+ if (!map[i] && (charName = enc[i])) {
+ map[i] = (Gushort)(int)ff->mapNameToGID(charName);
+ }
+ }
+
+ return map;
+}
+
+Dict *Gfx8BitFont::getCharProcs() {
+ return charProcs.isDict() ? charProcs.getDict() : (Dict *)NULL;
+}
+
+Object *Gfx8BitFont::getCharProc(int code, Object *proc) {
+ if (enc[code] && charProcs.isDict()) {
+ charProcs.dictLookup(enc[code], proc);
+ } else {
+ proc->initNull();
+ }
+ return proc;
+}
+
+Dict *Gfx8BitFont::getResources() {
+ return resources.isDict() ? resources.getDict() : (Dict *)NULL;
+}
+
+//------------------------------------------------------------------------
+// GfxCIDFont
+//------------------------------------------------------------------------
+
+static int CDECL cmpWidthExcep(const void *w1, const void *w2) {
+ return ((GfxFontCIDWidthExcep *)w1)->first -
+ ((GfxFontCIDWidthExcep *)w2)->first;
+}
+
+static int CDECL cmpWidthExcepV(const void *w1, const void *w2) {
+ return ((GfxFontCIDWidthExcepV *)w1)->first -
+ ((GfxFontCIDWidthExcepV *)w2)->first;
+}
+
+GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA,
+ Dict *fontDict):
+ GfxFont(tagA, idA, nameA)
+{
+ Dict *desFontDict;
+ GooString *collection, *cMapName;
+ Object desFontDictObj;
+ Object obj1, obj2, obj3, obj4, obj5, obj6;
+ CharCodeToUnicode *utu;
+ CharCode c;
+ Unicode *uBuf;
+ int c1, c2;
+ int excepsSize, i, j, k, n;
+
+ refCnt = 1;
+ ascent = 0.95;
+ descent = -0.35;
+ fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
+ cMap = NULL;
+ ctu = NULL;
+ widths.defWidth = 1.0;
+ widths.defHeight = -1.0;
+ widths.defVY = 0.880;
+ widths.exceps = NULL;
+ widths.nExceps = 0;
+ widths.excepsV = NULL;
+ widths.nExcepsV = 0;
+ cidToGID = NULL;
+ cidToGIDLen = 0;
+
+ // get the descendant font
+ if (!fontDict->lookup("DescendantFonts", &obj1)->isArray()) {
+ error(-1, "Missing DescendantFonts entry in Type 0 font");
+ obj1.free();
+ goto err1;
+ }
+ if (!obj1.arrayGet(0, &desFontDictObj)->isDict()) {
+ error(-1, "Bad descendant font in Type 0 font");
+ goto err3;
+ }
+ obj1.free();
+ desFontDict = desFontDictObj.getDict();
+
+ // font type
+ if (!desFontDict->lookup("Subtype", &obj1)) {
+ error(-1, "Missing Subtype entry in Type 0 descendant font");
+ goto err3;
+ }
+ if (obj1.isName("CIDFontType0")) {
+ type = fontCIDType0;
+ } else if (obj1.isName("CIDFontType2")) {
+ type = fontCIDType2;
+ } else {
+ error(-1, "Unknown Type 0 descendant font type '%s'",
+ obj1.isName() ? obj1.getName() : "???");
+ goto err3;
+ }
+ obj1.free();
+
+ // get info from font descriptor
+ readFontDescriptor(xref, desFontDict);
+
+ // look for an external font file
+ findExtFontFile();
+
+ //----- encoding info -----
+
+ // char collection
+ if (!desFontDict->lookup("CIDSystemInfo", &obj1)->isDict()) {
+ error(-1, "Missing CIDSystemInfo dictionary in Type 0 descendant font");
+ goto err3;
+ }
+ obj1.dictLookup("Registry", &obj2);
+ obj1.dictLookup("Ordering", &obj3);
+ if (!obj2.isString() || !obj3.isString()) {
+ error(-1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font");
+ goto err4;
+ }
+ collection = obj2.getString()->copy()->append('-')->append(obj3.getString());
+ obj3.free();
+ obj2.free();
+ obj1.free();
+
+ // look for a ToUnicode CMap
+ if (!(ctu = readToUnicodeCMap(fontDict, 16, NULL))) {
+
+ // the "Adobe-Identity" and "Adobe-UCS" collections don't have
+ // cidToUnicode files
+ if (collection->cmp("Adobe-Identity") &&
+ collection->cmp("Adobe-UCS")) {
+
+ // look for a user-supplied .cidToUnicode file
+ if (!(ctu = globalParams->getCIDToUnicode(collection))) {
+ // I'm not completely sure that this is the best thing to do
+ // but it seems to produce better results when the .cidToUnicode
+ // files from the poppler-data package are missing. At least
+ // we know that assuming the Identity mapping is definitely wrong.
+ // -- jrmuizel
+ static const char * knownCollections [] = {
+ "Adobe-CNS1",
+ "Adobe-GB1",
+ "Adobe-Japan1",
+ "Adobe-Japan2",
+ "Adobe-Korea1",
+ };
+ for (size_t i = 0; i < sizeof(knownCollections)/sizeof(knownCollections[0]); i++) {
+ if (collection->cmp(knownCollections[i]) == 0) {
+ error(-1, "Missing language pack for '%s' mapping", collection->getCString());
+ delete collection;
+ goto err2;
+ }
+ }
+ error(-1, "Unknown character collection '%s'",
+ collection->getCString());
+ // fall-through, assuming the Identity mapping -- this appears
+ // to match Adobe's behavior
+ }
+ }
+ }
+
+ // look for a Unicode-to-Unicode mapping
+ if (name && (utu = globalParams->getUnicodeToUnicode(name))) {
+ if (ctu) {
+ for (c = 0; c < ctu->getLength(); ++c) {
+ n = ctu->mapToUnicode(c, &uBuf);
+ if (n >= 1) {
+ n = utu->mapToUnicode((CharCode)uBuf[0], &uBuf);
+ if (n >= 1) {
+ ctu->setMapping(c, uBuf, n);
+ }
+ }
+ }
+ utu->decRefCnt();
+ } else {
+ ctu = utu;
+ }
+ }
+
+ // encoding (i.e., CMap)
+ //~ also need to deal with the UseCMap entry in the stream dict
+ if (!fontDict->lookup("Encoding", &obj1)->isName()) {
+ GBool success = gFalse;
+ if (obj1.isStream()) {
+ Object objName;
+ Stream *s = obj1.getStream();
+ s->getDict()->lookup("CMapName", &objName);
+ if (objName.isName())
+ {
+ cMapName = new GooString(objName.getName());
+ cMap = globalParams->getCMap(collection, cMapName, s);
+ success = gTrue;
+ }
+ objName.free();
+ }
+
+ if (!success) {
+ error(-1, "Missing or invalid Encoding entry in Type 0 font");
+ delete collection;
+ goto err3;
+ }
+ } else {
+ cMapName = new GooString(obj1.getName());
+ cMap = globalParams->getCMap(collection, cMapName);
+ }
+ delete collection;
+ delete cMapName;
+ if (!cMap) {
+ error(-1, "Unknown CMap '%s' for character collection '%s'",
+ cMapName->getCString(), collection->getCString());
+ goto err2;
+ }
+ obj1.free();
+
+ // CIDToGIDMap (for embedded TrueType fonts)
+ if (type == fontCIDType2 || type == fontCIDType2OT) {
+ desFontDict->lookup("CIDToGIDMap", &obj1);
+ if (obj1.isStream()) {
+ cidToGIDLen = 0;
+ i = 64;
+ cidToGID = (Gushort *)gmallocn(i, sizeof(Gushort));
+ obj1.streamReset();
+ while ((c1 = obj1.streamGetChar()) != EOF &&
+ (c2 = obj1.streamGetChar()) != EOF) {
+ if (cidToGIDLen == i) {
+ i *= 2;
+ cidToGID = (Gushort *)greallocn(cidToGID, i, sizeof(Gushort));
+ }
+ cidToGID[cidToGIDLen++] = (Gushort)((c1 << 8) + c2);
+ }
+ } else if (!obj1.isName("Identity") && !obj1.isNull()) {
+ error(-1, "Invalid CIDToGIDMap entry in CID font");
+ }
+ obj1.free();
+ }
+
+ //----- character metrics -----
+
+ // default char width
+ if (desFontDict->lookup("DW", &obj1)->isInt()) {
+ widths.defWidth = obj1.getInt() * 0.001;
+ }
+ obj1.free();
+
+ // char width exceptions
+ if (desFontDict->lookup("W", &obj1)->isArray()) {
+ excepsSize = 0;
+ i = 0;
+ while (i + 1 < obj1.arrayGetLength()) {
+ obj1.arrayGet(i, &obj2);
+ obj1.arrayGet(i + 1, &obj3);
+ if (obj2.isInt() && obj3.isInt() && i + 2 < obj1.arrayGetLength()) {
+ if (obj1.arrayGet(i + 2, &obj4)->isNum()) {
+ if (widths.nExceps == excepsSize) {
+ excepsSize += 16;
+ widths.exceps = (GfxFontCIDWidthExcep *)
+ greallocn(widths.exceps,
+ excepsSize, sizeof(GfxFontCIDWidthExcep));
+ }
+ widths.exceps[widths.nExceps].first = obj2.getInt();
+ widths.exceps[widths.nExceps].last = obj3.getInt();
+ widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
+ ++widths.nExceps;
+ } else {
+ error(-1, "Bad widths array in Type 0 font");
+ }
+ obj4.free();
+ i += 3;
+ } else if (obj2.isInt() && obj3.isArray()) {
+ if (widths.nExceps + obj3.arrayGetLength() > excepsSize) {
+ excepsSize = (widths.nExceps + obj3.arrayGetLength() + 15) & ~15;
+ widths.exceps = (GfxFontCIDWidthExcep *)
+ greallocn(widths.exceps,
+ excepsSize, sizeof(GfxFontCIDWidthExcep));
+ }
+ j = obj2.getInt();
+ for (k = 0; k < obj3.arrayGetLength(); ++k) {
+ if (obj3.arrayGet(k, &obj4)->isNum()) {
+ widths.exceps[widths.nExceps].first = j;
+ widths.exceps[widths.nExceps].last = j;
+ widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
+ ++j;
+ ++widths.nExceps;
+ } else {
+ error(-1, "Bad widths array in Type 0 font");
+ }
+ obj4.free();
+ }
+ i += 2;
+ } else {
+ error(-1, "Bad widths array in Type 0 font");
+ ++i;
+ }
+ obj3.free();
+ obj2.free();
+ }
+ qsort(widths.exceps, widths.nExceps, sizeof(GfxFontCIDWidthExcep),
+ &cmpWidthExcep);
+ }
+ obj1.free();
+
+ // default metrics for vertical font
+ if (desFontDict->lookup("DW2", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2) {
+ if (obj1.arrayGet(0, &obj2)->isNum()) {
+ widths.defVY = obj2.getNum() * 0.001;
+ }
+ obj2.free();
+ if (obj1.arrayGet(1, &obj2)->isNum()) {
+ widths.defHeight = obj2.getNum() * 0.001;
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ // char metric exceptions for vertical font
+ if (desFontDict->lookup("W2", &obj1)->isArray()) {
+ excepsSize = 0;
+ i = 0;
+ while (i + 1 < obj1.arrayGetLength()) {
+ obj1.arrayGet(i, &obj2);
+ obj1.arrayGet(i+ 1, &obj3);
+ if (obj2.isInt() && obj3.isInt() && i + 4 < obj1.arrayGetLength()) {
+ if (obj1.arrayGet(i + 2, &obj4)->isNum() &&
+ obj1.arrayGet(i + 3, &obj5)->isNum() &&
+ obj1.arrayGet(i + 4, &obj6)->isNum()) {
+ if (widths.nExcepsV == excepsSize) {
+ excepsSize += 16;
+ widths.excepsV = (GfxFontCIDWidthExcepV *)
+ greallocn(widths.excepsV,
+ excepsSize, sizeof(GfxFontCIDWidthExcepV));
+ }
+ widths.excepsV[widths.nExcepsV].first = obj2.getInt();
+ widths.excepsV[widths.nExcepsV].last = obj3.getInt();
+ widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001;
+ widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001;
+ widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001;
+ ++widths.nExcepsV;
+ } else {
+ error(-1, "Bad widths (W2) array in Type 0 font");
+ }
+ obj6.free();
+ obj5.free();
+ obj4.free();
+ i += 5;
+ } else if (obj2.isInt() && obj3.isArray()) {
+ if (widths.nExcepsV + obj3.arrayGetLength() / 3 > excepsSize) {
+ excepsSize =
+ (widths.nExcepsV + obj3.arrayGetLength() / 3 + 15) & ~15;
+ widths.excepsV = (GfxFontCIDWidthExcepV *)
+ greallocn(widths.excepsV,
+ excepsSize, sizeof(GfxFontCIDWidthExcepV));
+ }
+ j = obj2.getInt();
+ for (k = 0; k < obj3.arrayGetLength(); k += 3) {
+ if (obj3.arrayGet(k, &obj4)->isNum() &&
+ obj3.arrayGet(k+1, &obj5)->isNum() &&
+ obj3.arrayGet(k+2, &obj6)->isNum()) {
+ widths.excepsV[widths.nExcepsV].first = j;
+ widths.excepsV[widths.nExcepsV].last = j;
+ widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001;
+ widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001;
+ widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001;
+ ++j;
+ ++widths.nExcepsV;
+ } else {
+ error(-1, "Bad widths (W2) array in Type 0 font");
+ }
+ obj6.free();
+ obj5.free();
+ obj4.free();
+ }
+ i += 2;
+ } else {
+ error(-1, "Bad widths (W2) array in Type 0 font");
+ ++i;
+ }
+ obj3.free();
+ obj2.free();
+ }
+ qsort(widths.excepsV, widths.nExcepsV, sizeof(GfxFontCIDWidthExcepV),
+ &cmpWidthExcepV);
+ }
+ obj1.free();
+
+ desFontDictObj.free();
+ ok = gTrue;
+ return;
+
+ err4:
+ obj3.free();
+ obj2.free();
+ err3:
+ obj1.free();
+ err2:
+ desFontDictObj.free();
+ err1:;
+}
+
+GfxCIDFont::~GfxCIDFont() {
+ if (cMap) {
+ cMap->decRefCnt();
+ }
+ if (ctu) {
+ ctu->decRefCnt();
+ }
+ gfree(widths.exceps);
+ gfree(widths.excepsV);
+ if (cidToGID) {
+ gfree(cidToGID);
+ }
+}
+
+int GfxCIDFont::getNextChar(char *s, int len, CharCode *code,
+ Unicode **u, int *uLen,
+ double *dx, double *dy, double *ox, double *oy) {
+ CID cid;
+ double w, h, vx, vy;
+ int n, a, b, m;
+
+ if (!cMap) {
+ *code = 0;
+ *uLen = 0;
+ *dx = *dy = 0;
+ return 1;
+ }
+
+ *code = (CharCode)(cid = cMap->getCID(s, len, &n));
+ if (ctu) {
+ *uLen = ctu->mapToUnicode(cid, u);
+ } else {
+ *uLen = 0;
+ }
+
+ // horizontal
+ if (cMap->getWMode() == 0) {
+ w = widths.defWidth;
+ h = vx = vy = 0;
+ if (widths.nExceps > 0 && cid >= widths.exceps[0].first) {
+ a = 0;
+ b = widths.nExceps;
+ // invariant: widths.exceps[a].first <= cid < widths.exceps[b].first
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (widths.exceps[m].first <= cid) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ if (cid <= widths.exceps[a].last) {
+ w = widths.exceps[a].width;
+ }
+ }
+
+ // vertical
+ } else {
+ w = 0;
+ h = widths.defHeight;
+ vx = widths.defWidth / 2;
+ vy = widths.defVY;
+ if (widths.nExcepsV > 0 && cid >= widths.excepsV[0].first) {
+ a = 0;
+ b = widths.nExcepsV;
+ // invariant: widths.excepsV[a].first <= cid < widths.excepsV[b].first
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (widths.excepsV[m].last <= cid) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ if (cid <= widths.excepsV[a].last) {
+ h = widths.excepsV[a].height;
+ vx = widths.excepsV[a].vx;
+ vy = widths.excepsV[a].vy;
+ }
+ }
+ }
+
+ *dx = w;
+ *dy = h;
+ *ox = vx;
+ *oy = vy;
+
+ return n;
+}
+
+int GfxCIDFont::getWMode() {
+ return cMap ? cMap->getWMode() : 0;
+}
+
+CharCodeToUnicode *GfxCIDFont::getToUnicode() {
+ if (ctu) {
+ ctu->incRefCnt();
+ }
+ return ctu;
+}
+
+GooString *GfxCIDFont::getCollection() {
+ return cMap ? cMap->getCollection() : (GooString *)NULL;
+}
+
+Gushort GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi,
+ Unicode unicode, GBool wmode) {
+ Gushort gid = ff->mapCodeToGID(cmapi,unicode);
+ if (wmode) {
+ Gushort vgid = ff->mapToVertGID(gid);
+ if (vgid != 0) gid = vgid;
+ }
+ return gid;
+}
+
+Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
+#define N_UCS_CANDIDATES 2
+ /* space characters */
+ static const unsigned long spaces[] = {
+ 0x2000,0x2001,0x2002,0x2003,0x2004,0x2005,0x2006,0x2007,
+ 0x2008,0x2009,0x200A,0x00A0,0x200B,0x2060,0x3000,0xFEFF,
+ 0
+ };
+ static char *adobe_cns1_cmaps[] = {
+ "UniCNS-UTF32-V",
+ "UniCNS-UCS2-V",
+ "UniCNS-UTF32-H",
+ "UniCNS-UCS2-H",
+ 0
+ };
+ static char *adobe_gb1_cmaps[] = {
+ "UniGB-UTF32-V",
+ "UniGB-UCS2-V",
+ "UniGB-UTF32-H",
+ "UniGB-UCS2-H",
+ 0
+ };
+ static char *adobe_japan1_cmaps[] = {
+ "UniJIS-UTF32-V",
+ "UniJIS-UCS2-V",
+ "UniJIS-UTF32-H",
+ "UniJIS-UCS2-H",
+ 0
+ };
+ static char *adobe_japan2_cmaps[] = {
+ "UniHojo-UTF32-V",
+ "UniHojo-UCS2-V",
+ "UniHojo-UTF32-H",
+ "UniHojo-UCS2-H",
+ 0
+ };
+ static char *adobe_korea1_cmaps[] = {
+ "UniKS-UTF32-V",
+ "UniKS-UCS2-V",
+ "UniKS-UTF32-H",
+ "UniKS-UCS2-H",
+ 0
+ };
+ static struct CMapListEntry {
+ char *collection;
+ char *scriptTag;
+ char *toUnicodeMap;
+ char **CMaps;
+ } CMapList[] = {
+ {
+ "Adobe-CNS1",
+ "kana",
+ "Adobe-CNS1-UCS2",
+ adobe_cns1_cmaps,
+ },
+ {
+ "Adobe-GB1",
+ "kana",
+ "Adobe-GB1-UCS2",
+ adobe_gb1_cmaps,
+ },
+ {
+ "Adobe-Japan1",
+ "kana",
+ "Adobe-Japan1-UCS2",
+ adobe_japan1_cmaps,
+ },
+ {
+ "Adobe-Japan2",
+ "kana",
+ "Adobe-Japan2-UCS2",
+ adobe_japan2_cmaps,
+ },
+ {
+ "Adobe-Korea1",
+ "kana",
+ "Adobe-Korea1-UCS2",
+ adobe_korea1_cmaps,
+ },
+ {0, 0, 0, 0}
+ };
+ Unicode *humap = 0;
+ Unicode *vumap = 0;
+ Unicode *tumap = 0;
+ Gushort *codeToGID = 0;
+ unsigned long n;
+ int i;
+ unsigned long code;
+ int wmode;
+ char **cmapName;
+ CMap *cMap;
+ CMapListEntry *lp;
+ int cmap;
+ int cmapPlatform, cmapEncoding;
+ Ref embID;
+
+ *mapsizep = 0;
+ if (!ctu) return NULL;
+ if (getCollection()->cmp("Adobe-Identity") == 0) return NULL;
+ if (getEmbeddedFontID(&embID)) {
+ /* if this font is embedded font,
+ * CIDToGIDMap should be embedded in PDF file
+ * and already set. So return it.
+ */
+ *mapsizep = getCIDToGIDLen();
+ return getCIDToGID();
+ }
+
+ /* we use only unicode cmap */
+ cmap = -1;
+ for (i = 0; i < ff->getNumCmaps(); ++i) {
+ cmapPlatform = ff->getCmapPlatform(i);
+ cmapEncoding = ff->getCmapEncoding(i);
+ if (cmapPlatform == 3 && cmapEncoding == 10) {
+ /* UCS-4 */
+ cmap = i;
+ /* use UCS-4 cmap */
+ break;
+ } else if (cmapPlatform == 3 && cmapEncoding == 1) {
+ /* Unicode */
+ cmap = i;
+ } else if (cmapPlatform == 0 && cmap < 0) {
+ cmap = i;
+ }
+ }
+ if (cmap < 0)
+ return NULL;
+
+ wmode = getWMode();
+ for (lp = CMapList;lp->collection != 0;lp++) {
+ if (strcmp(lp->collection,getCollection()->getCString()) == 0) {
+ break;
+ }
+ }
+ n = 65536;
+ tumap = new Unicode[n];
+ humap = new Unicode[n*N_UCS_CANDIDATES];
+ memset(humap,0,sizeof(Unicode)*n*N_UCS_CANDIDATES);
+ if (lp->collection != 0) {
+ CharCodeToUnicode *tctu;
+ GooString tname(lp->toUnicodeMap);
+
+ if ((tctu = CharCodeToUnicode::parseCMapFromFile(&tname,16)) != 0) {
+ CharCode cid;
+ for (cid = 0;cid < n ;cid++) {
+ int len;
+ Unicode *ucodes;
+
+ len = tctu->mapToUnicode(cid,&ucodes);
+ if (len == 1) {
+ tumap[cid] = ucodes[0];
+ } else {
+ /* if not single character, ignore it */
+ tumap[cid] = 0;
+ }
+ }
+ delete tctu;
+ }
+ vumap = new Unicode[n];
+ memset(vumap,0,sizeof(Unicode)*n);
+ for (cmapName = lp->CMaps;*cmapName != 0;cmapName++) {
+ GooString cname(*cmapName);
+
+ if ((cMap = globalParams->getCMap(getCollection(),&cname))
+ != 0) {
+ if (cMap->getWMode()) {
+ cMap->setReverseMap(vumap,n,1);
+ } else {
+ cMap->setReverseMap(humap,n,N_UCS_CANDIDATES);
+ }
+ cMap->decRefCnt();
+ }
+ }
+ ff->setupGSUB(lp->scriptTag);
+ } else {
+ error(-1,"Unknown character collection %s\n",
+ getCollection()->getCString());
+ if ((ctu = getToUnicode()) != 0) {
+ CharCode cid;
+ for (cid = 0;cid < n ;cid++) {
+ Unicode *ucode;
+
+ if (ctu->mapToUnicode(cid, &ucode))
+ humap[cid*N_UCS_CANDIDATES] = ucode[0];
+ else
+ humap[cid*N_UCS_CANDIDATES] = 0;
+ for (i = 1;i < N_UCS_CANDIDATES;i++) {
+ humap[cid*N_UCS_CANDIDATES+i] = 0;
+ }
+ }
+ ctu->decRefCnt();
+ }
+ }
+ // map CID -> Unicode -> GID
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
+ for (code = 0; code < n; ++code) {
+ Unicode unicode;
+ unsigned long gid;
+
+ unicode = 0;
+ gid = 0;
+ if (humap != 0) {
+ for (i = 0;i < N_UCS_CANDIDATES
+ && gid == 0 && (unicode = humap[code*N_UCS_CANDIDATES+i]) != 0;i++) {
+ gid = mapCodeToGID(ff,cmap,unicode,gFalse);
+ }
+ }
+ if (gid == 0 && vumap != 0) {
+ unicode = vumap[code];
+ if (unicode != 0) {
+ gid = mapCodeToGID(ff,cmap,unicode,gTrue);
+ if (gid == 0 && tumap != 0) {
+ if ((unicode = tumap[code]) != 0) {
+ gid = mapCodeToGID(ff,cmap,unicode,gTrue);
+ }
+ }
+ }
+ }
+ if (gid == 0 && tumap != 0) {
+ if ((unicode = tumap[code]) != 0) {
+ gid = mapCodeToGID(ff,cmap,unicode,gFalse);
+ }
+ }
+ if (gid == 0) {
+ /* special handling space characters */
+ const unsigned long *p;
+
+ if (humap != 0) unicode = humap[code];
+ if (unicode != 0) {
+ /* check if code is space character , so map code to 0x0020 */
+ for (p = spaces;*p != 0;p++) {
+ if (*p == unicode) {
+ unicode = 0x20;
+ gid = mapCodeToGID(ff,cmap,unicode,wmode);
+ break;
+ }
+ }
+ }
+ }
+ codeToGID[code] = gid;
+ }
+ *mapsizep = n;
+ if (humap != 0) delete[] humap;
+ if (tumap != 0) delete[] tumap;
+ if (vumap != 0) delete[] vumap;
+ return codeToGID;
+}
+
+double GfxCIDFont::getWidth (char* s, int len) {
+ int nUsed;
+ double w;
+ int a, b, m;
+
+ CID cid = cMap->getCID(s, len, &nUsed);
+
+ w = widths.defWidth;
+ if (widths.nExceps > 0 && cid >= widths.exceps[0].first) {
+ a = 0;
+ b = widths.nExceps;
+ // invariant: widths.exceps[a].first <= cid < widths.exceps[b].first
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (widths.exceps[m].first <= cid) {
+ a = m;
+ } else {
+ b = m;
+ }
+ }
+ if (cid <= widths.exceps[a].last) {
+ w = widths.exceps[a].width;
+ }
+ }
+ return w;
+}
+
+//------------------------------------------------------------------------
+// GfxFontDict
+//------------------------------------------------------------------------
+
+GfxFontDict::GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict) {
+ int i;
+ Object obj1, obj2;
+ Ref r;
+
+ numFonts = fontDict->getLength();
+ fonts = (GfxFont **)gmallocn(numFonts, sizeof(GfxFont *));
+ for (i = 0; i < numFonts; ++i) {
+ fontDict->getValNF(i, &obj1);
+ obj1.fetch(xref, &obj2);
+ if (obj2.isDict()) {
+ if (obj1.isRef()) {
+ r = obj1.getRef();
+ } else {
+ // no indirect reference for this font, so invent a unique one
+ // (legal generation numbers are five digits, so any 6-digit
+ // number would be safe)
+ r.num = i;
+ if (fontDictRef) {
+ r.gen = 100000 + fontDictRef->num;
+ } else {
+ r.gen = 999999;
+ }
+ }
+ fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i),
+ r, obj2.getDict());
+ if (fonts[i] && !fonts[i]->isOk()) {
+ // XXX: it may be meaningful to distinguish between
+ // NULL and !isOk() so that when we do lookups
+ // we can tell the difference between a missing font
+ // and a font that is just !isOk()
+ fonts[i]->decRefCnt();
+ fonts[i] = NULL;
+ }
+ } else {
+ error(-1, "font resource is not a dictionary");
+ fonts[i] = NULL;
+ }
+ obj1.free();
+ obj2.free();
+ }
+}
+
+GfxFontDict::~GfxFontDict() {
+ int i;
+
+ for (i = 0; i < numFonts; ++i) {
+ if (fonts[i]) {
+ fonts[i]->decRefCnt();
+ }
+ }
+ gfree(fonts);
+}
+
+GfxFont *GfxFontDict::lookup(char *tag) {
+ int i;
+
+ for (i = 0; i < numFonts; ++i) {
+ if (fonts[i] && fonts[i]->matches(tag)) {
+ return fonts[i];
+ }
+ }
+ return NULL;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.h
new file mode 100644
index 00000000000..55f8692e349
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxFont.h
@@ -0,0 +1,391 @@
+//========================================================================
+//
+// GfxFont.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GFXFONT_H
+#define GFXFONT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "goo/GooString.h"
+#include "Object.h"
+#include "CharTypes.h"
+
+class Dict;
+class CMap;
+class CharCodeToUnicode;
+class FoFiTrueType;
+class DisplayFontParam;
+struct GfxFontCIDWidths;
+
+//------------------------------------------------------------------------
+// GfxFontType
+//------------------------------------------------------------------------
+
+enum GfxFontType {
+ //----- Gfx8BitFont
+ fontUnknownType,
+ fontType1,
+ fontType1C,
+ fontType1COT,
+ fontType3,
+ fontTrueType,
+ fontTrueTypeOT,
+ //----- GfxCIDFont
+ fontCIDType0,
+ fontCIDType0C,
+ fontCIDType0COT,
+ fontCIDType2,
+ fontCIDType2OT
+};
+
+//------------------------------------------------------------------------
+// GfxFontCIDWidths
+//------------------------------------------------------------------------
+
+struct GfxFontCIDWidthExcep {
+ CID first; // this record applies to
+ CID last; // CIDs <first>..<last>
+ double width; // char width
+};
+
+struct GfxFontCIDWidthExcepV {
+ CID first; // this record applies to
+ CID last; // CIDs <first>..<last>
+ double height; // char height
+ double vx, vy; // origin position
+};
+
+struct GfxFontCIDWidths {
+ double defWidth; // default char width
+ double defHeight; // default char height
+ double defVY; // default origin position
+ GfxFontCIDWidthExcep *exceps; // exceptions
+ int nExceps; // number of valid entries in exceps
+ GfxFontCIDWidthExcepV * // exceptions for vertical font
+ excepsV;
+ int nExcepsV; // number of valid entries in excepsV
+};
+
+//------------------------------------------------------------------------
+// GfxFont
+//------------------------------------------------------------------------
+
+#define fontFixedWidth (1 << 0)
+#define fontSerif (1 << 1)
+#define fontSymbolic (1 << 2)
+#define fontItalic (1 << 6)
+#define fontBold (1 << 18)
+
+class GfxFont {
+public:
+
+ enum Stretch {
+ StretchNotDefined,
+ UltraCondensed,
+ ExtraCondensed,
+ Condensed,
+ SemiCondensed,
+ Normal,
+ SemiExpanded,
+ Expanded,
+ ExtraExpanded,
+ UltraExpanded };
+
+ enum Weight {
+ WeightNotDefined,
+ W100,
+ W200,
+ W300,
+ W400, // Normal
+ W500,
+ W600,
+ W700, // Bold
+ W800,
+ W900 };
+
+ // Build a GfxFont object.
+ static GfxFont *makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict);
+
+ GfxFont(char *tagA, Ref idA, GooString *nameA);
+
+ GBool isOk() { return ok; }
+
+ void incRefCnt();
+ void decRefCnt();
+
+ // Get font tag.
+ GooString *getTag() { return tag; }
+
+ // Get font dictionary ID.
+ Ref *getID() { return &id; }
+
+ // Does this font match the tag?
+ GBool matches(char *tagA) { return !tag->cmp(tagA); }
+
+ // Get base font name.
+ GooString *getName() { return name; }
+
+ // Get font family name.
+ GooString *getFamily() { return family; }
+
+ // Get font stretch.
+ Stretch getStretch() { return stretch; }
+
+ // Get font weight.
+ Weight getWeight() { return weight; }
+
+ // Get the original font name (ignornig any munging that might have
+ // been done to map to a canonical Base-14 font name).
+ GooString *getOrigName() { return origName; }
+
+ // Get font type.
+ GfxFontType getType() { return type; }
+ virtual GBool isCIDFont() { return gFalse; }
+
+ // Get embedded font ID, i.e., a ref for the font file stream.
+ // Returns false if there is no embedded font.
+ GBool getEmbeddedFontID(Ref *embID)
+ { *embID = embFontID; return embFontID.num >= 0; }
+
+ // Get the PostScript font name for the embedded font. Returns
+ // NULL if there is no embedded font.
+ GooString *getEmbeddedFontName() { return embFontName; }
+
+ // Get the name of the external font file. Returns NULL if there
+ // is no external font file.
+ GooString *getExtFontFile() { return extFontFile; }
+
+ // Get font descriptor flags.
+ int getFlags() { return flags; }
+ GBool isFixedWidth() { return flags & fontFixedWidth; }
+ GBool isSerif() { return flags & fontSerif; }
+ GBool isSymbolic() { return flags & fontSymbolic; }
+ GBool isItalic() { return flags & fontItalic; }
+ GBool isBold() { return flags & fontBold; }
+
+ // Return the Unicode map.
+ virtual CharCodeToUnicode *getToUnicode() = 0;
+
+ // Return the font matrix.
+ double *getFontMatrix() { return fontMat; }
+
+ // Return the font bounding box.
+ double *getFontBBox() { return fontBBox; }
+
+ // Return the ascent and descent values.
+ double getAscent() { return ascent; }
+ double getDescent() { return descent; }
+
+ // Return the writing mode (0=horizontal, 1=vertical).
+ virtual int getWMode() { return 0; }
+
+ // Read an external or embedded font file into a buffer.
+ char *readExtFontFile(int *len);
+ char *readEmbFontFile(XRef *xref, int *len);
+
+ // Get the next char from a string <s> of <len> bytes, returning the
+ // char <code>, its Unicode mapping <u>, its displacement vector
+ // (<dx>, <dy>), and its origin offset vector (<ox>, <oy>). <uSize>
+ // is the number of entries available in <u>, and <uLen> is set to
+ // the number actually used. Returns the number of bytes used by
+ // the char code.
+ virtual int getNextChar(char *s, int len, CharCode *code,
+ Unicode **u, int *uLen,
+ double *dx, double *dy, double *ox, double *oy) = 0;
+
+ /* XXX: dfp shouldn't be public, however the font finding code is currently in
+ * GlobalParams. Instead it should be inside the GfxFont class. However,
+ * getDisplayFont currently uses FCcfg so moving it is not as simple. */
+ /* XXX: related to this is the fact that all of the extFontFile stuff is dead */
+ DisplayFontParam *dfp;
+protected:
+
+ virtual ~GfxFont();
+
+ void readFontDescriptor(XRef *xref, Dict *fontDict);
+ CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits,
+ CharCodeToUnicode *ctu);
+ void findExtFontFile();
+
+ GooString *tag; // PDF font tag
+ Ref id; // reference (used as unique ID)
+ GooString *name; // font name
+ GooString *family; // font family
+ Stretch stretch; // font stretch
+ Weight weight; // font weight
+ GooString *origName; // original font name
+ GfxFontType type; // type of font
+ int flags; // font descriptor flags
+ GooString *embFontName; // name of embedded font
+ Ref embFontID; // ref to embedded font file stream
+ GooString *extFontFile; // external font file name
+ double fontMat[6]; // font matrix (Type 3 only)
+ double fontBBox[4]; // font bounding box (Type 3 only)
+ double missingWidth; // "default" width
+ double ascent; // max height above baseline
+ double descent; // max depth below baseline
+ int refCnt;
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// Gfx8BitFont
+//------------------------------------------------------------------------
+
+class Gfx8BitFont: public GfxFont {
+public:
+
+ Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GooString *nameA,
+ GfxFontType typeA, Dict *fontDict);
+
+ virtual int getNextChar(char *s, int len, CharCode *code,
+ Unicode **u, int *uLen,
+ double *dx, double *dy, double *ox, double *oy);
+
+ // Return the encoding.
+ char **getEncoding() { return enc; }
+
+ // Return the Unicode map.
+ CharCodeToUnicode *getToUnicode();
+
+ // Return the character name associated with <code>.
+ char *getCharName(int code) { return enc[code]; }
+
+ // Returns true if the PDF font specified an encoding.
+ GBool getHasEncoding() { return hasEncoding; }
+
+ // Returns true if the PDF font specified MacRomanEncoding.
+ GBool getUsesMacRomanEnc() { return usesMacRomanEnc; }
+
+ // Get width of a character.
+ double getWidth(Guchar c) { return widths[c]; }
+
+ // Return a char code-to-GID mapping for the provided font file.
+ // (This is only useful for TrueType fonts.)
+ Gushort *getCodeToGIDMap(FoFiTrueType *ff);
+
+ // Return the Type 3 CharProc dictionary, or NULL if none.
+ Dict *getCharProcs();
+
+ // Return the Type 3 CharProc for the character associated with <code>.
+ Object *getCharProc(int code, Object *proc);
+
+ // Return the Type 3 Resources dictionary, or NULL if none.
+ Dict *getResources();
+
+private:
+ virtual ~Gfx8BitFont();
+
+ char *enc[256]; // char code --> char name
+ char encFree[256]; // boolean for each char name: if set,
+ // the string is malloc'ed
+ CharCodeToUnicode *ctu; // char code --> Unicode
+ GBool hasEncoding;
+ GBool usesMacRomanEnc;
+ double widths[256]; // character widths
+ Object charProcs; // Type 3 CharProcs dictionary
+ Object resources; // Type 3 Resources dictionary
+};
+
+//------------------------------------------------------------------------
+// GfxCIDFont
+//------------------------------------------------------------------------
+
+class GfxCIDFont: public GfxFont {
+public:
+
+ GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA,
+ Dict *fontDict);
+
+ virtual GBool isCIDFont() { return gTrue; }
+
+ virtual int getNextChar(char *s, int len, CharCode *code,
+ Unicode **u, int *uLen,
+ double *dx, double *dy, double *ox, double *oy);
+
+ // Return the writing mode (0=horizontal, 1=vertical).
+ virtual int getWMode();
+
+ // Return the Unicode map.
+ CharCodeToUnicode *getToUnicode();
+
+ // Get the collection name (<registry>-<ordering>).
+ GooString *getCollection();
+
+ // Return the CID-to-GID mapping table. These should only be called
+ // if type is fontCIDType2.
+ Gushort *getCIDToGID() { return cidToGID; }
+ int getCIDToGIDLen() { return cidToGIDLen; }
+
+ Gushort *getCodeToGIDMap(FoFiTrueType *ff, int *length);
+
+ double getWidth(char* s, int len);
+
+private:
+ virtual ~GfxCIDFont();
+
+ Gushort mapCodeToGID(FoFiTrueType *ff, int cmapi,
+ Unicode unicode, GBool wmode);
+
+ CMap *cMap; // char code --> CID
+ CharCodeToUnicode *ctu; // CID --> Unicode
+ GfxFontCIDWidths widths; // character widths
+ Gushort *cidToGID; // CID --> GID mapping (for embedded
+ // TrueType fonts)
+ int cidToGIDLen;
+};
+
+//------------------------------------------------------------------------
+// GfxFontDict
+//------------------------------------------------------------------------
+
+class GfxFontDict {
+public:
+
+ // Build the font dictionary, given the PDF font dictionary.
+ GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict);
+
+ // Destructor.
+ ~GfxFontDict();
+
+ // Get the specified font.
+ GfxFont *lookup(char *tag);
+
+ // Iterative access.
+ int getNumFonts() { return numFonts; }
+ GfxFont *getFont(int i) { return fonts[i]; }
+
+private:
+
+ GfxFont **fonts; // list of fonts
+ int numFonts; // number of fonts
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.cc
new file mode 100644
index 00000000000..d53c0cb5f87
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.cc
@@ -0,0 +1,5078 @@
+//========================================================================
+//
+// GfxState.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2006-2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Christian Persch <chpe@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <math.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "Error.h"
+#include "Object.h"
+#include "Array.h"
+#include "Page.h"
+#include "Gfx.h"
+#include "GfxState.h"
+#include "GfxState_helpers.h"
+#include "GfxFont.h"
+#include "GlobalParams.h"
+#include "PopplerCache.h"
+
+//------------------------------------------------------------------------
+
+GBool Matrix::invertTo(Matrix *other)
+{
+ double det;
+
+ det = 1 / (m[0] * m[3] - m[1] * m[2]);
+ other->m[0] = m[3] * det;
+ other->m[1] = -m[1] * det;
+ other->m[2] = -m[2] * det;
+ other->m[3] = m[0] * det;
+ other->m[4] = (m[2] * m[5] - m[3] * m[4]) * det;
+ other->m[5] = (m[1] * m[4] - m[0] * m[5]) * det;
+
+ return gTrue;
+}
+
+void Matrix::transform(double x, double y, double *tx, double *ty)
+{
+ double temp_x, temp_y;
+
+ temp_x = m[0] * x + m[2] * y + m[4];
+ temp_y = m[1] * x + m[3] * y + m[5];
+
+ *tx = temp_x;
+ *ty = temp_y;
+}
+
+//------------------------------------------------------------------------
+
+struct GfxBlendModeInfo {
+ char *name;
+ GfxBlendMode mode;
+};
+
+static const GfxBlendModeInfo gfxBlendModeNames[] = {
+ { "Normal", gfxBlendNormal },
+ { "Compatible", gfxBlendNormal },
+ { "Multiply", gfxBlendMultiply },
+ { "Screen", gfxBlendScreen },
+ { "Overlay", gfxBlendOverlay },
+ { "Darken", gfxBlendDarken },
+ { "Lighten", gfxBlendLighten },
+ { "ColorDodge", gfxBlendColorDodge },
+ { "ColorBurn", gfxBlendColorBurn },
+ { "HardLight", gfxBlendHardLight },
+ { "SoftLight", gfxBlendSoftLight },
+ { "Difference", gfxBlendDifference },
+ { "Exclusion", gfxBlendExclusion },
+ { "Hue", gfxBlendHue },
+ { "Saturation", gfxBlendSaturation },
+ { "Color", gfxBlendColor },
+ { "Luminosity", gfxBlendLuminosity }
+};
+
+#define nGfxBlendModeNames \
+ ((int)((sizeof(gfxBlendModeNames) / sizeof(GfxBlendModeInfo))))
+
+//------------------------------------------------------------------------
+//
+// NB: This must match the GfxColorSpaceMode enum defined in
+// GfxState.h
+static char *gfxColorSpaceModeNames[] = {
+ "DeviceGray",
+ "CalGray",
+ "DeviceRGB",
+ "CalRGB",
+ "DeviceCMYK",
+ "Lab",
+ "ICCBased",
+ "Indexed",
+ "Separation",
+ "DeviceN",
+ "Pattern"
+};
+
+#define nGfxColorSpaceModes ((sizeof(gfxColorSpaceModeNames) / sizeof(char *)))
+
+#ifdef USE_CMS
+
+#include <lcms.h>
+
+#define COLOR_PROFILE_DIR "/ColorProfiles/"
+#define GLOBAL_COLOR_PROFILE_DIR POPPLER_DATADIR COLOR_PROFILE_DIR
+
+void GfxColorTransform::doTransform(void *in, void *out, unsigned int size) {
+ cmsDoTransform(transform, in, out, size);
+}
+
+// transformA should be a cmsHTRANSFORM
+GfxColorTransform::GfxColorTransform(void *transformA) {
+ transform = transformA;
+ refCount = 1;
+}
+
+GfxColorTransform::~GfxColorTransform() {
+ cmsDeleteTransform(transform);
+}
+
+void GfxColorTransform::ref() {
+ refCount++;
+}
+
+unsigned int GfxColorTransform::unref() {
+ return --refCount;
+}
+
+static cmsHPROFILE RGBProfile = NULL;
+static GooString *displayProfileName = NULL; // display profile file Name
+static cmsHPROFILE displayProfile = NULL; // display profile
+static unsigned int displayPixelType = 0;
+static GfxColorTransform *XYZ2DisplayTransform = NULL;
+
+// convert color space signature to cmsColor type
+static unsigned int getCMSColorSpaceType(icColorSpaceSignature cs);
+static unsigned int getCMSNChannels(icColorSpaceSignature cs);
+static cmsHPROFILE loadColorProfile(const char *fileName);
+
+void GfxColorSpace::setDisplayProfile(void *displayProfileA) {
+ displayProfile = displayProfileA;
+}
+
+void GfxColorSpace::setDisplayProfileName(GooString *name) {
+ displayProfileName = name->copy();
+}
+
+cmsHPROFILE GfxColorSpace::getRGBProfile() {
+ return RGBProfile;
+}
+
+cmsHPROFILE GfxColorSpace::getDisplayProfile() {
+ return displayProfile;
+}
+
+#endif
+
+//------------------------------------------------------------------------
+// GfxColorSpace
+//------------------------------------------------------------------------
+
+GfxColorSpace::GfxColorSpace() {
+}
+
+GfxColorSpace::~GfxColorSpace() {
+}
+
+GfxColorSpace *GfxColorSpace::parse(Object *csObj, Gfx *gfx) {
+ GfxColorSpace *cs;
+ Object obj1;
+
+ cs = NULL;
+ if (csObj->isName()) {
+ if (csObj->isName("DeviceGray") || csObj->isName("G")) {
+ cs = new GfxDeviceGrayColorSpace();
+ } else if (csObj->isName("DeviceRGB") || csObj->isName("RGB")) {
+ cs = new GfxDeviceRGBColorSpace();
+ } else if (csObj->isName("DeviceCMYK") || csObj->isName("CMYK")) {
+ cs = new GfxDeviceCMYKColorSpace();
+ } else if (csObj->isName("Pattern")) {
+ cs = new GfxPatternColorSpace(NULL);
+ } else {
+ error(-1, "Bad color space '%s'", csObj->getName());
+ }
+ } else if (csObj->isArray()) {
+ csObj->arrayGet(0, &obj1);
+ if (obj1.isName("DeviceGray") || obj1.isName("G")) {
+ cs = new GfxDeviceGrayColorSpace();
+ } else if (obj1.isName("DeviceRGB") || obj1.isName("RGB")) {
+ cs = new GfxDeviceRGBColorSpace();
+ } else if (obj1.isName("DeviceCMYK") || obj1.isName("CMYK")) {
+ cs = new GfxDeviceCMYKColorSpace();
+ } else if (obj1.isName("CalGray")) {
+ cs = GfxCalGrayColorSpace::parse(csObj->getArray());
+ } else if (obj1.isName("CalRGB")) {
+ cs = GfxCalRGBColorSpace::parse(csObj->getArray());
+ } else if (obj1.isName("Lab")) {
+ cs = GfxLabColorSpace::parse(csObj->getArray());
+ } else if (obj1.isName("ICCBased")) {
+ cs = GfxICCBasedColorSpace::parse(csObj->getArray(), gfx);
+ } else if (obj1.isName("Indexed") || obj1.isName("I")) {
+ cs = GfxIndexedColorSpace::parse(csObj->getArray(), gfx);
+ } else if (obj1.isName("Separation")) {
+ cs = GfxSeparationColorSpace::parse(csObj->getArray(), gfx);
+ } else if (obj1.isName("DeviceN")) {
+ cs = GfxDeviceNColorSpace::parse(csObj->getArray(), gfx);
+ } else if (obj1.isName("Pattern")) {
+ cs = GfxPatternColorSpace::parse(csObj->getArray(), gfx);
+ } else {
+ error(-1, "Bad color space");
+ }
+ obj1.free();
+ } else {
+ error(-1, "Bad color space - expected name or array");
+ }
+ return cs;
+}
+
+void GfxColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel) {
+ int i;
+
+ for (i = 0; i < getNComps(); ++i) {
+ decodeLow[i] = 0;
+ decodeRange[i] = 1;
+ }
+}
+
+int GfxColorSpace::getNumColorSpaceModes() {
+ return nGfxColorSpaceModes;
+}
+
+char *GfxColorSpace::getColorSpaceModeName(int idx) {
+ return gfxColorSpaceModeNames[idx];
+}
+
+#ifdef USE_CMS
+cmsHPROFILE loadColorProfile(const char *fileName)
+{
+ cmsHPROFILE hp = NULL;
+ FILE *fp;
+
+ if (fileName[0] == '/') {
+ // full path
+ // check if open the file
+ if ((fp = fopen(fileName,"r")) != NULL) {
+ fclose(fp);
+ hp = cmsOpenProfileFromFile(fileName,"r");
+ }
+ return hp;
+ }
+ // try to load from user directory
+ GooString *path = globalParams->getBaseDir();
+ path->append(COLOR_PROFILE_DIR);
+ path->append(fileName);
+ // check if open the file
+ if ((fp = fopen(path->getCString(),"r")) != NULL) {
+ fclose(fp);
+ hp = cmsOpenProfileFromFile(path->getCString(),"r");
+ }
+ delete path;
+ if (hp == NULL) {
+ // load from global directory
+ path = new GooString(GLOBAL_COLOR_PROFILE_DIR);
+ path->append(fileName);
+ // check if open the file
+ if ((fp = fopen(path->getCString(),"r")) != NULL) {
+ fclose(fp);
+ hp = cmsOpenProfileFromFile(path->getCString(),"r");
+ }
+ delete path;
+ }
+ return hp;
+}
+
+static int CMSError(int ecode, const char *msg)
+{
+ error(-1, "%s", msg);
+ return 1;
+}
+
+int GfxColorSpace::setupColorProfiles()
+{
+ static GBool initialized = gFalse;
+ cmsHTRANSFORM transform;
+ unsigned int nChannels;
+
+ // do only once
+ if (initialized) return 0;
+ initialized = gTrue;
+
+ // set error handlor
+ cmsSetErrorHandler(CMSError);
+
+ if (displayProfile == NULL) {
+ // load display profile if it was not already loaded.
+ if (displayProfileName == NULL) {
+ displayProfile = loadColorProfile("display.icc");
+ } else if (displayProfileName->getLength() > 0) {
+ displayProfile = loadColorProfile(displayProfileName->getCString());
+ }
+ }
+ // load RGB profile
+ RGBProfile = loadColorProfile("RGB.icc");
+ if (RGBProfile == NULL) {
+ /* use built in sRGB profile */
+ RGBProfile = cmsCreate_sRGBProfile();
+ }
+ // create transforms
+ if (displayProfile != NULL) {
+ displayPixelType = getCMSColorSpaceType(cmsGetColorSpace(displayProfile));
+ nChannels = getCMSNChannels(cmsGetColorSpace(displayProfile));
+ // create transform from XYZ
+ cmsHPROFILE XYZProfile = cmsCreateXYZProfile();
+ if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL,
+ displayProfile,
+ COLORSPACE_SH(displayPixelType) |
+ CHANNELS_SH(nChannels) | BYTES_SH(1),
+ INTENT_RELATIVE_COLORIMETRIC,0)) == 0) {
+ error(-1, "Can't create Lab transform");
+ } else {
+ XYZ2DisplayTransform = new GfxColorTransform(transform);
+ }
+ cmsCloseProfile(XYZProfile);
+ }
+ return 0;
+}
+
+unsigned int getCMSColorSpaceType(icColorSpaceSignature cs)
+{
+ switch (cs) {
+ case icSigXYZData:
+ return PT_XYZ;
+ break;
+ case icSigLabData:
+ return PT_Lab;
+ break;
+ case icSigLuvData:
+ return PT_YUV;
+ break;
+ case icSigYCbCrData:
+ return PT_YCbCr;
+ break;
+ case icSigYxyData:
+ return PT_Yxy;
+ break;
+ case icSigRgbData:
+ return PT_RGB;
+ break;
+ case icSigGrayData:
+ return PT_GRAY;
+ break;
+ case icSigHsvData:
+ return PT_HSV;
+ break;
+ case icSigHlsData:
+ return PT_HLS;
+ break;
+ case icSigCmykData:
+ return PT_CMYK;
+ break;
+ case icSigCmyData:
+ return PT_CMY;
+ break;
+ case icSig2colorData:
+ case icSig3colorData:
+ case icSig4colorData:
+ case icSig5colorData:
+ case icSig6colorData:
+ case icSig7colorData:
+ case icSig8colorData:
+ case icSig9colorData:
+ case icSig10colorData:
+ case icSig11colorData:
+ case icSig12colorData:
+ case icSig13colorData:
+ case icSig14colorData:
+ case icSig15colorData:
+ default:
+ break;
+ }
+ return PT_RGB;
+}
+
+unsigned int getCMSNChannels(icColorSpaceSignature cs)
+{
+ switch (cs) {
+ case icSigXYZData:
+ case icSigLuvData:
+ case icSigLabData:
+ case icSigYCbCrData:
+ case icSigYxyData:
+ case icSigRgbData:
+ case icSigHsvData:
+ case icSigHlsData:
+ case icSigCmyData:
+ case icSig3colorData:
+ return 3;
+ break;
+ case icSigGrayData:
+ return 1;
+ break;
+ case icSigCmykData:
+ case icSig4colorData:
+ return 4;
+ break;
+ case icSig2colorData:
+ return 2;
+ break;
+ case icSig5colorData:
+ return 5;
+ break;
+ case icSig6colorData:
+ return 6;
+ break;
+ case icSig7colorData:
+ return 7;
+ break;
+ case icSig8colorData:
+ return 8;
+ break;
+ case icSig9colorData:
+ return 9;
+ break;
+ case icSig10colorData:
+ return 10;
+ break;
+ case icSig11colorData:
+ return 11;
+ break;
+ case icSig12colorData:
+ return 12;
+ break;
+ case icSig13colorData:
+ return 13;
+ break;
+ case icSig14colorData:
+ return 14;
+ break;
+ case icSig15colorData:
+ return 15;
+ default:
+ break;
+ }
+ return 3;
+}
+
+#endif
+
+//------------------------------------------------------------------------
+// GfxDeviceGrayColorSpace
+//------------------------------------------------------------------------
+
+GfxDeviceGrayColorSpace::GfxDeviceGrayColorSpace() {
+}
+
+GfxDeviceGrayColorSpace::~GfxDeviceGrayColorSpace() {
+}
+
+GfxColorSpace *GfxDeviceGrayColorSpace::copy() {
+ return new GfxDeviceGrayColorSpace();
+}
+
+void GfxDeviceGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ *gray = clip01(color->c[0]);
+}
+
+void GfxDeviceGrayColorSpace::getGrayLine(Guchar *in, Guchar *out, int length) {
+ memcpy (out, in, length);
+}
+
+void GfxDeviceGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ rgb->r = rgb->g = rgb->b = clip01(color->c[0]);
+}
+
+void GfxDeviceGrayColorSpace::getRGBLine(Guchar *in, unsigned int *out,
+ int length) {
+ int i;
+
+ for (i = 0; i < length; i++)
+ out[i] = (in[i] << 16) | (in[i] << 8) | (in[i] << 0);
+}
+
+void GfxDeviceGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ cmyk->c = cmyk->m = cmyk->y = 0;
+ cmyk->k = clip01(gfxColorComp1 - color->c[0]);
+}
+
+void GfxDeviceGrayColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+}
+
+//------------------------------------------------------------------------
+// GfxCalGrayColorSpace
+//------------------------------------------------------------------------
+
+GfxCalGrayColorSpace::GfxCalGrayColorSpace() {
+ whiteX = whiteY = whiteZ = 1;
+ blackX = blackY = blackZ = 0;
+ gamma = 1;
+}
+
+GfxCalGrayColorSpace::~GfxCalGrayColorSpace() {
+}
+
+GfxColorSpace *GfxCalGrayColorSpace::copy() {
+ GfxCalGrayColorSpace *cs;
+
+ cs = new GfxCalGrayColorSpace();
+ cs->whiteX = whiteX;
+ cs->whiteY = whiteY;
+ cs->whiteZ = whiteZ;
+ cs->blackX = blackX;
+ cs->blackY = blackY;
+ cs->blackZ = blackZ;
+ cs->gamma = gamma;
+ return cs;
+}
+
+// This is the inverse of MatrixLMN in Example 4.10 from the PostScript
+// Language Reference, Third Edition.
+static const double xyzrgb[3][3] = {
+ { 3.240449, -1.537136, -0.498531 },
+ { -0.969265, 1.876011, 0.041556 },
+ { 0.055643, -0.204026, 1.057229 }
+};
+
+GfxColorSpace *GfxCalGrayColorSpace::parse(Array *arr) {
+ GfxCalGrayColorSpace *cs;
+ Object obj1, obj2, obj3;
+
+ arr->get(1, &obj1);
+ if (!obj1.isDict()) {
+ error(-1, "Bad CalGray color space");
+ obj1.free();
+ return NULL;
+ }
+ cs = new GfxCalGrayColorSpace();
+ if (obj1.dictLookup("WhitePoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->whiteX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->whiteY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->whiteZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("BlackPoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->blackX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->blackY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->blackZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("Gamma", &obj2)->isNum()) {
+ cs->gamma = obj2.getNum();
+ }
+ obj2.free();
+ obj1.free();
+
+ cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX +
+ xyzrgb[0][1] * cs->whiteY +
+ xyzrgb[0][2] * cs->whiteZ);
+ cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX +
+ xyzrgb[1][1] * cs->whiteY +
+ xyzrgb[1][2] * cs->whiteZ);
+ cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX +
+ xyzrgb[2][1] * cs->whiteY +
+ xyzrgb[2][2] * cs->whiteZ);
+
+ return cs;
+}
+
+// convert CalGray to media XYZ color space
+// (not multiply by the white point)
+void GfxCalGrayColorSpace::getXYZ(GfxColor *color,
+ double *pX, double *pY, double *pZ) {
+ double A;
+
+ A = colToDbl(color->c[0]);
+ *pX = pow(A,gamma);
+ *pY = pow(A,gamma);
+ *pZ = pow(A,gamma);
+}
+
+void GfxCalGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ GfxRGB rgb;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+ double X, Y, Z;
+
+ getXYZ(color,&X,&Y,&Z);
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ *gray = byteToCol(out[0]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ *gray = clip01((GfxColorComp)(0.299 * rgb.r +
+ 0.587 * rgb.g +
+ 0.114 * rgb.b + 0.5));
+}
+
+void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double X, Y, Z;
+ double r, g, b;
+
+ getXYZ(color,&X,&Y,&Z);
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_RGB) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ rgb->r = byteToCol(out[0]);
+ rgb->g = byteToCol(out[1]);
+ rgb->b = byteToCol(out[2]);
+ return;
+ }
+#endif
+ X *= whiteX;
+ Y *= whiteY;
+ Z *= whiteZ;
+ // convert XYZ to RGB, including gamut mapping and gamma correction
+ r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;
+ g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;
+ b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;
+ rgb->r = dblToCol(pow(clip01(r * kr), 0.5));
+ rgb->g = dblToCol(pow(clip01(g * kg), 0.5));
+ rgb->b = dblToCol(pow(clip01(b * kb), 0.5));
+ rgb->r = rgb->g = rgb->b = clip01(color->c[0]);
+}
+
+void GfxCalGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ GfxRGB rgb;
+ GfxColorComp c, m, y, k;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_CMYK) {
+ double in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+ double X, Y, Z;
+
+ getXYZ(color,&X,&Y,&Z);
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ cmyk->c = byteToCol(out[0]);
+ cmyk->m = byteToCol(out[1]);
+ cmyk->y = byteToCol(out[2]);
+ cmyk->k = byteToCol(out[3]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ c = clip01(gfxColorComp1 - rgb.r);
+ m = clip01(gfxColorComp1 - rgb.g);
+ y = clip01(gfxColorComp1 - rgb.b);
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk->c = c - k;
+ cmyk->m = m - k;
+ cmyk->y = y - k;
+ cmyk->k = k;
+}
+
+void GfxCalGrayColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+}
+
+//------------------------------------------------------------------------
+// GfxDeviceRGBColorSpace
+//------------------------------------------------------------------------
+
+GfxDeviceRGBColorSpace::GfxDeviceRGBColorSpace() {
+}
+
+GfxDeviceRGBColorSpace::~GfxDeviceRGBColorSpace() {
+}
+
+GfxColorSpace *GfxDeviceRGBColorSpace::copy() {
+ return new GfxDeviceRGBColorSpace();
+}
+
+void GfxDeviceRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ *gray = clip01((GfxColorComp)(0.3 * color->c[0] +
+ 0.59 * color->c[1] +
+ 0.11 * color->c[2] + 0.5));
+}
+
+void GfxDeviceRGBColorSpace::getGrayLine(Guchar *in, Guchar *out, int length) {
+ int i;
+
+ for (i = 0; i < length; i++) {
+ out[i] =
+ (in[i * 3 + 0] * 19595 +
+ in[i * 3 + 1] * 38469 +
+ in[i * 3 + 2] * 7472) / 65536;
+ }
+}
+
+void GfxDeviceRGBColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ rgb->r = clip01(color->c[0]);
+ rgb->g = clip01(color->c[1]);
+ rgb->b = clip01(color->c[2]);
+}
+
+void GfxDeviceRGBColorSpace::getRGBLine(Guchar *in, unsigned int *out,
+ int length) {
+ Guchar *p;
+ int i;
+
+ for (i = 0, p = in; i < length; i++, p += 3)
+ out[i] = (p[0] << 16) | (p[1] << 8) | (p[2] << 0);
+}
+
+void GfxDeviceRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ GfxColorComp c, m, y, k;
+
+ c = clip01(gfxColorComp1 - color->c[0]);
+ m = clip01(gfxColorComp1 - color->c[1]);
+ y = clip01(gfxColorComp1 - color->c[2]);
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk->c = c - k;
+ cmyk->m = m - k;
+ cmyk->y = y - k;
+ cmyk->k = k;
+}
+
+void GfxDeviceRGBColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+ color->c[1] = 0;
+ color->c[2] = 0;
+}
+
+//------------------------------------------------------------------------
+// GfxCalRGBColorSpace
+//------------------------------------------------------------------------
+
+GfxCalRGBColorSpace::GfxCalRGBColorSpace() {
+ whiteX = whiteY = whiteZ = 1;
+ blackX = blackY = blackZ = 0;
+ gammaR = gammaG = gammaB = 1;
+ mat[0] = 1; mat[1] = 0; mat[2] = 0;
+ mat[3] = 0; mat[4] = 1; mat[5] = 0;
+ mat[6] = 0; mat[7] = 0; mat[8] = 1;
+}
+
+GfxCalRGBColorSpace::~GfxCalRGBColorSpace() {
+}
+
+GfxColorSpace *GfxCalRGBColorSpace::copy() {
+ GfxCalRGBColorSpace *cs;
+ int i;
+
+ cs = new GfxCalRGBColorSpace();
+ cs->whiteX = whiteX;
+ cs->whiteY = whiteY;
+ cs->whiteZ = whiteZ;
+ cs->blackX = blackX;
+ cs->blackY = blackY;
+ cs->blackZ = blackZ;
+ cs->gammaR = gammaR;
+ cs->gammaG = gammaG;
+ cs->gammaB = gammaB;
+ for (i = 0; i < 9; ++i) {
+ cs->mat[i] = mat[i];
+ }
+ return cs;
+}
+
+GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr) {
+ GfxCalRGBColorSpace *cs;
+ Object obj1, obj2, obj3;
+ int i;
+
+ arr->get(1, &obj1);
+ if (!obj1.isDict()) {
+ error(-1, "Bad CalRGB color space");
+ obj1.free();
+ return NULL;
+ }
+ cs = new GfxCalRGBColorSpace();
+ if (obj1.dictLookup("WhitePoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->whiteX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->whiteY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->whiteZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("BlackPoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->blackX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->blackY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->blackZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("Gamma", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->gammaR = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->gammaG = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->gammaB = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("Matrix", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 9) {
+ for (i = 0; i < 9; ++i) {
+ obj2.arrayGet(i, &obj3);
+ cs->mat[i] = obj3.getNum();
+ obj3.free();
+ }
+ }
+ obj2.free();
+ obj1.free();
+
+ cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX +
+ xyzrgb[0][1] * cs->whiteY +
+ xyzrgb[0][2] * cs->whiteZ);
+ cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX +
+ xyzrgb[1][1] * cs->whiteY +
+ xyzrgb[1][2] * cs->whiteZ);
+ cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX +
+ xyzrgb[2][1] * cs->whiteY +
+ xyzrgb[2][2] * cs->whiteZ);
+
+ return cs;
+}
+
+// convert CalRGB to XYZ color space
+void GfxCalRGBColorSpace::getXYZ(GfxColor *color,
+ double *pX, double *pY, double *pZ) {
+ double A, B, C;
+
+ A = colToDbl(color->c[0]);
+ B = colToDbl(color->c[1]);
+ C = colToDbl(color->c[2]);
+ *pX = mat[0]*pow(A,gammaR)+mat[3]*pow(B,gammaG)+mat[6]*pow(C,gammaB);
+ *pY = mat[1]*pow(A,gammaR)+mat[4]*pow(B,gammaG)+mat[7]*pow(C,gammaB);
+ *pZ = mat[2]*pow(A,gammaR)+mat[5]*pow(B,gammaG)+mat[8]*pow(C,gammaB);
+}
+
+void GfxCalRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ GfxRGB rgb;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+ double X, Y, Z;
+
+ getXYZ(color,&X,&Y,&Z);
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ *gray = byteToCol(out[0]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ *gray = clip01((GfxColorComp)(0.299 * rgb.r +
+ 0.587 * rgb.g +
+ 0.114 * rgb.b + 0.5));
+}
+
+void GfxCalRGBColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double X, Y, Z;
+ double r, g, b;
+
+ getXYZ(color,&X,&Y,&Z);
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_RGB) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+
+ in[0] = clip01(X/whiteX);
+ in[1] = clip01(Y/whiteY);
+ in[2] = clip01(Z/whiteZ);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ rgb->r = byteToCol(out[0]);
+ rgb->g = byteToCol(out[1]);
+ rgb->b = byteToCol(out[2]);
+ return;
+ }
+#endif
+ // convert XYZ to RGB, including gamut mapping and gamma correction
+ r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;
+ g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;
+ b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;
+ rgb->r = dblToCol(pow(clip01(r), 0.5));
+ rgb->g = dblToCol(pow(clip01(g), 0.5));
+ rgb->b = dblToCol(pow(clip01(b), 0.5));
+}
+
+void GfxCalRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ GfxRGB rgb;
+ GfxColorComp c, m, y, k;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_CMYK) {
+ double in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+ double X, Y, Z;
+
+ getXYZ(color,&X,&Y,&Z);
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ cmyk->c = byteToCol(out[0]);
+ cmyk->m = byteToCol(out[1]);
+ cmyk->y = byteToCol(out[2]);
+ cmyk->k = byteToCol(out[3]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ c = clip01(gfxColorComp1 - rgb.r);
+ m = clip01(gfxColorComp1 - rgb.g);
+ y = clip01(gfxColorComp1 - rgb.b);
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk->c = c - k;
+ cmyk->m = m - k;
+ cmyk->y = y - k;
+ cmyk->k = k;
+}
+
+void GfxCalRGBColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+ color->c[1] = 0;
+ color->c[2] = 0;
+}
+
+//------------------------------------------------------------------------
+// GfxDeviceCMYKColorSpace
+//------------------------------------------------------------------------
+
+GfxDeviceCMYKColorSpace::GfxDeviceCMYKColorSpace() {
+}
+
+GfxDeviceCMYKColorSpace::~GfxDeviceCMYKColorSpace() {
+}
+
+GfxColorSpace *GfxDeviceCMYKColorSpace::copy() {
+ return new GfxDeviceCMYKColorSpace();
+}
+
+void GfxDeviceCMYKColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ *gray = clip01((GfxColorComp)(gfxColorComp1 - color->c[3]
+ - 0.3 * color->c[0]
+ - 0.59 * color->c[1]
+ - 0.11 * color->c[2] + 0.5));
+}
+
+void GfxDeviceCMYKColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double c, m, y, k, c1, m1, y1, k1, r, g, b;
+
+ c = colToDbl(color->c[0]);
+ m = colToDbl(color->c[1]);
+ y = colToDbl(color->c[2]);
+ k = colToDbl(color->c[3]);
+ c1 = 1 - c;
+ m1 = 1 - m;
+ y1 = 1 - y;
+ k1 = 1 - k;
+ cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b);
+ rgb->r = clip01(dblToCol(r));
+ rgb->g = clip01(dblToCol(g));
+ rgb->b = clip01(dblToCol(b));
+}
+
+void GfxDeviceCMYKColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ cmyk->c = clip01(color->c[0]);
+ cmyk->m = clip01(color->c[1]);
+ cmyk->y = clip01(color->c[2]);
+ cmyk->k = clip01(color->c[3]);
+}
+
+void GfxDeviceCMYKColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+ color->c[1] = 0;
+ color->c[2] = 0;
+ color->c[3] = gfxColorComp1;
+}
+
+//------------------------------------------------------------------------
+// GfxLabColorSpace
+//------------------------------------------------------------------------
+
+GfxLabColorSpace::GfxLabColorSpace() {
+ whiteX = whiteY = whiteZ = 1;
+ blackX = blackY = blackZ = 0;
+ aMin = bMin = -100;
+ aMax = bMax = 100;
+}
+
+GfxLabColorSpace::~GfxLabColorSpace() {
+}
+
+GfxColorSpace *GfxLabColorSpace::copy() {
+ GfxLabColorSpace *cs;
+
+ cs = new GfxLabColorSpace();
+ cs->whiteX = whiteX;
+ cs->whiteY = whiteY;
+ cs->whiteZ = whiteZ;
+ cs->blackX = blackX;
+ cs->blackY = blackY;
+ cs->blackZ = blackZ;
+ cs->aMin = aMin;
+ cs->aMax = aMax;
+ cs->bMin = bMin;
+ cs->bMax = bMax;
+ cs->kr = kr;
+ cs->kg = kg;
+ cs->kb = kb;
+ return cs;
+}
+
+GfxColorSpace *GfxLabColorSpace::parse(Array *arr) {
+ GfxLabColorSpace *cs;
+ Object obj1, obj2, obj3;
+
+ arr->get(1, &obj1);
+ if (!obj1.isDict()) {
+ error(-1, "Bad Lab color space");
+ obj1.free();
+ return NULL;
+ }
+ cs = new GfxLabColorSpace();
+ if (obj1.dictLookup("WhitePoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->whiteX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->whiteY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->whiteZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("BlackPoint", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 3) {
+ obj2.arrayGet(0, &obj3);
+ cs->blackX = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->blackY = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->blackZ = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("Range", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 4) {
+ obj2.arrayGet(0, &obj3);
+ cs->aMin = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(1, &obj3);
+ cs->aMax = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2, &obj3);
+ cs->bMin = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(3, &obj3);
+ cs->bMax = obj3.getNum();
+ obj3.free();
+ }
+ obj2.free();
+ obj1.free();
+
+ cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX +
+ xyzrgb[0][1] * cs->whiteY +
+ xyzrgb[0][2] * cs->whiteZ);
+ cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX +
+ xyzrgb[1][1] * cs->whiteY +
+ xyzrgb[1][2] * cs->whiteZ);
+ cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX +
+ xyzrgb[2][1] * cs->whiteY +
+ xyzrgb[2][2] * cs->whiteZ);
+
+ return cs;
+}
+
+void GfxLabColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ GfxRGB rgb;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_GRAY) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+
+ getXYZ(color, &in[0], &in[1], &in[2]);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ *gray = byteToCol(out[0]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ *gray = clip01((GfxColorComp)(0.299 * rgb.r +
+ 0.587 * rgb.g +
+ 0.114 * rgb.b + 0.5));
+}
+
+// convert L*a*b* to media XYZ color space
+// (not multiply by the white point)
+void GfxLabColorSpace::getXYZ(GfxColor *color,
+ double *pX, double *pY, double *pZ) {
+ double X, Y, Z;
+ double t1, t2;
+
+ t1 = (colToDbl(color->c[0]) + 16) / 116;
+ t2 = t1 + colToDbl(color->c[1]) / 500;
+ if (t2 >= (6.0 / 29.0)) {
+ X = t2 * t2 * t2;
+ } else {
+ X = (108.0 / 841.0) * (t2 - (4.0 / 29.0));
+ }
+ if (t1 >= (6.0 / 29.0)) {
+ Y = t1 * t1 * t1;
+ } else {
+ Y = (108.0 / 841.0) * (t1 - (4.0 / 29.0));
+ }
+ t2 = t1 - colToDbl(color->c[2]) / 200;
+ if (t2 >= (6.0 / 29.0)) {
+ Z = t2 * t2 * t2;
+ } else {
+ Z = (108.0 / 841.0) * (t2 - (4.0 / 29.0));
+ }
+ *pX = X;
+ *pY = Y;
+ *pZ = Z;
+}
+
+void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double X, Y, Z;
+ double r, g, b;
+
+ getXYZ(color, &X, &Y, &Z);
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_RGB) {
+ Guchar out[gfxColorMaxComps];
+ double in[gfxColorMaxComps];
+
+ in[0] = clip01(X);
+ in[1] = clip01(Y);
+ in[2] = clip01(Z);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ rgb->r = byteToCol(out[0]);
+ rgb->g = byteToCol(out[1]);
+ rgb->b = byteToCol(out[2]);
+ return;
+ }
+#endif
+ X *= whiteX;
+ Y *= whiteY;
+ Z *= whiteZ;
+ // convert XYZ to RGB, including gamut mapping and gamma correction
+ r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;
+ g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;
+ b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;
+ rgb->r = dblToCol(pow(clip01(r * kr), 0.5));
+ rgb->g = dblToCol(pow(clip01(g * kg), 0.5));
+ rgb->b = dblToCol(pow(clip01(b * kb), 0.5));
+}
+
+void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ GfxRGB rgb;
+ GfxColorComp c, m, y, k;
+
+#ifdef USE_CMS
+ if (XYZ2DisplayTransform != NULL && displayPixelType == PT_CMYK) {
+ double in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+
+ getXYZ(color, &in[0], &in[1], &in[2]);
+ XYZ2DisplayTransform->doTransform(in,out,1);
+ cmyk->c = byteToCol(out[0]);
+ cmyk->m = byteToCol(out[1]);
+ cmyk->y = byteToCol(out[2]);
+ cmyk->k = byteToCol(out[3]);
+ return;
+ }
+#endif
+ getRGB(color, &rgb);
+ c = clip01(gfxColorComp1 - rgb.r);
+ m = clip01(gfxColorComp1 - rgb.g);
+ y = clip01(gfxColorComp1 - rgb.b);
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk->c = c - k;
+ cmyk->m = m - k;
+ cmyk->y = y - k;
+ cmyk->k = k;
+}
+
+void GfxLabColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+ if (aMin > 0) {
+ color->c[1] = dblToCol(aMin);
+ } else if (aMax < 0) {
+ color->c[1] = dblToCol(aMax);
+ } else {
+ color->c[1] = 0;
+ }
+ if (bMin > 0) {
+ color->c[2] = dblToCol(bMin);
+ } else if (bMax < 0) {
+ color->c[2] = dblToCol(bMax);
+ } else {
+ color->c[2] = 0;
+ }
+}
+
+void GfxLabColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel) {
+ decodeLow[0] = 0;
+ decodeRange[0] = 100;
+ decodeLow[1] = aMin;
+ decodeRange[1] = aMax - aMin;
+ decodeLow[2] = bMin;
+ decodeRange[2] = bMax - bMin;
+}
+
+//------------------------------------------------------------------------
+// GfxICCBasedColorSpace
+//------------------------------------------------------------------------
+
+class GfxICCBasedColorSpaceKey : public PopplerCacheKey
+{
+ public:
+ GfxICCBasedColorSpaceKey(int numA, int genA) : num(numA), gen(genA)
+ {
+ }
+
+ bool operator==(const PopplerCacheKey &key) const
+ {
+ const GfxICCBasedColorSpaceKey *k = static_cast<const GfxICCBasedColorSpaceKey*>(&key);
+ return k->num == num && k->gen == gen;
+ }
+
+ int num, gen;
+};
+
+class GfxICCBasedColorSpaceItem : public PopplerCacheItem
+{
+ public:
+ GfxICCBasedColorSpaceItem(GfxICCBasedColorSpace *csA)
+ {
+ cs = static_cast<GfxICCBasedColorSpace*>(csA->copy());
+ }
+
+ ~GfxICCBasedColorSpaceItem()
+ {
+ delete cs;
+ }
+
+ GfxICCBasedColorSpace *cs;
+};
+
+GfxICCBasedColorSpace::GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
+ Ref *iccProfileStreamA) {
+ nComps = nCompsA;
+ alt = altA;
+ iccProfileStream = *iccProfileStreamA;
+ rangeMin[0] = rangeMin[1] = rangeMin[2] = rangeMin[3] = 0;
+ rangeMax[0] = rangeMax[1] = rangeMax[2] = rangeMax[3] = 1;
+#ifdef USE_CMS
+ transform = NULL;
+ lineTransform = NULL;
+#endif
+}
+
+GfxICCBasedColorSpace::~GfxICCBasedColorSpace() {
+ delete alt;
+#ifdef USE_CMS
+ if (transform != NULL) {
+ if (transform->unref() == 0) delete transform;
+ }
+ if (lineTransform != NULL) {
+ if (lineTransform->unref() == 0) delete lineTransform;
+ }
+#endif
+}
+
+GfxColorSpace *GfxICCBasedColorSpace::copy() {
+ GfxICCBasedColorSpace *cs;
+ int i;
+
+ cs = new GfxICCBasedColorSpace(nComps, alt->copy(), &iccProfileStream);
+ for (i = 0; i < 4; ++i) {
+ cs->rangeMin[i] = rangeMin[i];
+ cs->rangeMax[i] = rangeMax[i];
+ }
+#ifdef USE_CMS
+ cs->transform = transform;
+ if (transform != NULL) transform->ref();
+ cs->lineTransform = lineTransform;
+ if (lineTransform != NULL) lineTransform->ref();
+#endif
+ return cs;
+}
+
+GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, Gfx *gfx) {
+ GfxICCBasedColorSpace *cs;
+ Ref iccProfileStreamA;
+ int nCompsA;
+ GfxColorSpace *altA;
+ Dict *dict;
+ Object obj1, obj2, obj3;
+ int i;
+
+ arr->getNF(1, &obj1);
+ if (obj1.isRef()) {
+ iccProfileStreamA = obj1.getRef();
+ } else {
+ iccProfileStreamA.num = 0;
+ iccProfileStreamA.gen = 0;
+ }
+ obj1.free();
+#ifdef USE_CMS
+ // check cache
+ if (gfx && iccProfileStreamA.num > 0) {
+ GfxICCBasedColorSpaceKey k(iccProfileStreamA.num, iccProfileStreamA.gen);
+ GfxICCBasedColorSpaceItem *item = static_cast<GfxICCBasedColorSpaceItem *>(gfx->getIccColorSpaceCache()->lookup(k));
+ if (item != NULL)
+ {
+ cs = static_cast<GfxICCBasedColorSpace*>(item->cs->copy());
+ return cs;
+ }
+ }
+#endif
+ arr->get(1, &obj1);
+ if (!obj1.isStream()) {
+ error(-1, "Bad ICCBased color space (stream)");
+ obj1.free();
+ return NULL;
+ }
+ dict = obj1.streamGetDict();
+ if (!dict->lookup("N", &obj2)->isInt()) {
+ error(-1, "Bad ICCBased color space (N)");
+ obj2.free();
+ obj1.free();
+ return NULL;
+ }
+ nCompsA = obj2.getInt();
+ obj2.free();
+ if (nCompsA > gfxColorMaxComps) {
+ error(-1, "ICCBased color space with too many (%d > %d) components",
+ nCompsA, gfxColorMaxComps);
+ nCompsA = gfxColorMaxComps;
+ }
+ if (dict->lookup("Alternate", &obj2)->isNull() ||
+ !(altA = GfxColorSpace::parse(&obj2, gfx))) {
+ switch (nCompsA) {
+ case 1:
+ altA = new GfxDeviceGrayColorSpace();
+ break;
+ case 3:
+ altA = new GfxDeviceRGBColorSpace();
+ break;
+ case 4:
+ altA = new GfxDeviceCMYKColorSpace();
+ break;
+ default:
+ error(-1, "Bad ICCBased color space - invalid N");
+ obj2.free();
+ obj1.free();
+ return NULL;
+ }
+ }
+ obj2.free();
+ cs = new GfxICCBasedColorSpace(nCompsA, altA, &iccProfileStreamA);
+ if (dict->lookup("Range", &obj2)->isArray() &&
+ obj2.arrayGetLength() == 2 * nCompsA) {
+ for (i = 0; i < nCompsA; ++i) {
+ obj2.arrayGet(2*i, &obj3);
+ cs->rangeMin[i] = obj3.getNum();
+ obj3.free();
+ obj2.arrayGet(2*i+1, &obj3);
+ cs->rangeMax[i] = obj3.getNum();
+ obj3.free();
+ }
+ }
+ obj2.free();
+ obj1.free();
+
+#ifdef USE_CMS
+ arr->get(1, &obj1);
+ dict = obj1.streamGetDict();
+ Guchar *profBuf;
+ unsigned int bufSize;
+ Stream *iccStream = obj1.getStream();
+ int c;
+ unsigned int size = 0;
+
+ bufSize = 65536;
+ profBuf = (Guchar *)gmallocn(bufSize,1);
+ iccStream->reset();
+ while ((c = iccStream->getChar()) != EOF) {
+ if (bufSize <= size) {
+ bufSize += 65536;
+ profBuf = (Guchar *)greallocn(profBuf,bufSize,1);
+ }
+ profBuf[size++] = c;
+ }
+ cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,size);
+ gfree(profBuf);
+ if (hp == 0) {
+ error(-1, "read ICCBased color space profile error");
+ } else {
+ cmsHPROFILE dhp = displayProfile;
+ if (dhp == NULL) dhp = RGBProfile;
+ unsigned int cst = getCMSColorSpaceType(cmsGetColorSpace(hp));
+ unsigned int dNChannels = getCMSNChannels(cmsGetColorSpace(dhp));
+ unsigned int dcst = getCMSColorSpaceType(cmsGetColorSpace(dhp));
+ cmsHTRANSFORM transform;
+ if ((transform = cmsCreateTransform(hp,
+ COLORSPACE_SH(cst) |CHANNELS_SH(nCompsA) | BYTES_SH(1),
+ dhp,
+ COLORSPACE_SH(dcst) |
+ CHANNELS_SH(dNChannels) | BYTES_SH(1),
+ INTENT_RELATIVE_COLORIMETRIC,0)) == 0) {
+ error(-1, "Can't create transform");
+ cs->transform = NULL;
+ } else {
+ cs->transform = new GfxColorTransform(transform);
+ }
+ if (dcst == PT_RGB) {
+ // create line transform only when the display is RGB type color space
+ if ((transform = cmsCreateTransform(hp,
+ CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp,
+ TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,0)) == 0) {
+ error(-1, "Can't create transform");
+ cs->lineTransform = NULL;
+ } else {
+ cs->lineTransform = new GfxColorTransform(transform);
+ }
+ }
+ cmsCloseProfile(hp);
+ }
+ obj1.free();
+ // put this colorSpace into cache
+ if (gfx && iccProfileStreamA.num > 0) {
+ GfxICCBasedColorSpaceKey *k = new GfxICCBasedColorSpaceKey(iccProfileStreamA.num, iccProfileStreamA.gen);
+ GfxICCBasedColorSpaceItem *item = new GfxICCBasedColorSpaceItem(cs);
+ gfx->getIccColorSpaceCache()->put(k, item);
+ }
+#endif
+ return cs;
+}
+
+void GfxICCBasedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+#ifdef USE_CMS
+ if (transform != 0 && displayPixelType == PT_GRAY) {
+ Guchar in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+
+ for (int i = 0;i < nComps;i++) {
+ in[i] = colToByte(color->c[i]);
+ }
+ transform->doTransform(in,out,1);
+ *gray = byteToCol(out[0]);
+ } else {
+ GfxRGB rgb;
+ getRGB(color,&rgb);
+ *gray = clip01((GfxColorComp)(0.3 * rgb.r +
+ 0.59 * rgb.g +
+ 0.11 * rgb.b + 0.5));
+ }
+#else
+ alt->getGray(color, gray);
+#endif
+}
+
+void GfxICCBasedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+#ifdef USE_CMS
+ if (transform != 0
+ && (displayProfile == NULL || displayPixelType == PT_RGB)) {
+ Guchar in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+
+ for (int i = 0;i < nComps;i++) {
+ in[i] = colToByte(color->c[i]);
+ }
+ transform->doTransform(in,out,1);
+ rgb->r = byteToCol(out[0]);
+ rgb->g = byteToCol(out[1]);
+ rgb->b = byteToCol(out[2]);
+ } else {
+ alt->getRGB(color, rgb);
+ }
+#else
+ alt->getRGB(color, rgb);
+#endif
+}
+
+void GfxICCBasedColorSpace::getRGBLine(Guchar *in, unsigned int *out,
+ int length) {
+#ifdef USE_CMS
+ if (lineTransform != 0) {
+ for (int i = 0;i < length;i++) {
+ Guchar tmp[gfxColorMaxComps];
+
+ lineTransform->doTransform(in,tmp,1);
+ in += nComps;
+ out[i] = (tmp[0] << 16) | (tmp[1] << 8) | tmp[2];
+ }
+ } else {
+ alt->getRGBLine(in, out, length);
+ }
+#else
+ alt->getRGBLine(in, out, length);
+#endif
+}
+
+void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+#ifdef USE_CMS
+ if (transform != NULL && displayPixelType == PT_CMYK) {
+ Guchar in[gfxColorMaxComps];
+ Guchar out[gfxColorMaxComps];
+
+ for (int i = 0;i < nComps;i++) {
+ in[i] = colToByte(color->c[i]);
+ }
+ transform->doTransform(in,out,1);
+ cmyk->c = byteToCol(out[0]);
+ cmyk->m = byteToCol(out[1]);
+ cmyk->y = byteToCol(out[2]);
+ cmyk->k = byteToCol(out[3]);
+ } else {
+ GfxRGB rgb;
+ GfxColorComp c, m, y, k;
+
+ getRGB(color,&rgb);
+ c = clip01(gfxColorComp1 - rgb.r);
+ m = clip01(gfxColorComp1 - rgb.g);
+ y = clip01(gfxColorComp1 - rgb.b);
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk->c = c - k;
+ cmyk->m = m - k;
+ cmyk->y = y - k;
+ cmyk->k = k;
+ }
+#else
+ alt->getCMYK(color, cmyk);
+#endif
+}
+
+GBool GfxICCBasedColorSpace::useGetRGBLine() {
+#ifdef USE_CMS
+ return lineTransform != NULL || alt->useGetRGBLine();
+#else
+ return alt->useGetRGBLine();
+#endif
+}
+
+void GfxICCBasedColorSpace::getDefaultColor(GfxColor *color) {
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ if (rangeMin[i] > 0) {
+ color->c[i] = dblToCol(rangeMin[i]);
+ } else if (rangeMax[i] < 0) {
+ color->c[i] = dblToCol(rangeMax[i]);
+ } else {
+ color->c[i] = 0;
+ }
+ }
+}
+
+void GfxICCBasedColorSpace::getDefaultRanges(double *decodeLow,
+ double *decodeRange,
+ int maxImgPixel) {
+ alt->getDefaultRanges(decodeLow, decodeRange, maxImgPixel);
+
+#if 0
+ // this is nominally correct, but some PDF files don't set the
+ // correct ranges in the ICCBased dict
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ decodeLow[i] = rangeMin[i];
+ decodeRange[i] = rangeMax[i] - rangeMin[i];
+ }
+#endif
+}
+
+//------------------------------------------------------------------------
+// GfxIndexedColorSpace
+//------------------------------------------------------------------------
+
+GfxIndexedColorSpace::GfxIndexedColorSpace(GfxColorSpace *baseA,
+ int indexHighA) {
+ base = baseA;
+ indexHigh = indexHighA;
+ lookup = (Guchar *)gmallocn((indexHigh + 1) * base->getNComps(),
+ sizeof(Guchar));
+}
+
+GfxIndexedColorSpace::~GfxIndexedColorSpace() {
+ delete base;
+ gfree(lookup);
+}
+
+GfxColorSpace *GfxIndexedColorSpace::copy() {
+ GfxIndexedColorSpace *cs;
+
+ cs = new GfxIndexedColorSpace(base->copy(), indexHigh);
+ memcpy(cs->lookup, lookup,
+ (indexHigh + 1) * base->getNComps() * sizeof(Guchar));
+ return cs;
+}
+
+GfxColorSpace *GfxIndexedColorSpace::parse(Array *arr, Gfx *gfx) {
+ GfxIndexedColorSpace *cs;
+ GfxColorSpace *baseA;
+ int indexHighA;
+ Object obj1;
+ int x;
+ char *s;
+ int n, i, j;
+
+ if (arr->getLength() != 4) {
+ error(-1, "Bad Indexed color space");
+ goto err1;
+ }
+ arr->get(1, &obj1);
+ if (!(baseA = GfxColorSpace::parse(&obj1, gfx))) {
+ error(-1, "Bad Indexed color space (base color space)");
+ goto err2;
+ }
+ obj1.free();
+ if (!arr->get(2, &obj1)->isInt()) {
+ error(-1, "Bad Indexed color space (hival)");
+ delete baseA;
+ goto err2;
+ }
+ indexHighA = obj1.getInt();
+ if (indexHighA < 0 || indexHighA > 255) {
+ // the PDF spec requires indexHigh to be in [0,255] -- allowing
+ // values larger than 255 creates a security hole: if nComps *
+ // indexHigh is greater than 2^31, the loop below may overwrite
+ // past the end of the array
+ int previousValue = indexHighA;
+ if (indexHighA < 0) indexHighA = 0;
+ else indexHighA = 255;
+ error(-1, "Bad Indexed color space (invalid indexHigh value, was %d using %d to try to recover)", previousValue, indexHighA);
+ }
+ obj1.free();
+ cs = new GfxIndexedColorSpace(baseA, indexHighA);
+ arr->get(3, &obj1);
+ n = baseA->getNComps();
+ if (obj1.isStream()) {
+ obj1.streamReset();
+ for (i = 0; i <= indexHighA; ++i) {
+ for (j = 0; j < n; ++j) {
+ if ((x = obj1.streamGetChar()) == EOF) {
+ error(-1, "Bad Indexed color space (lookup table stream too short) padding with zeroes");
+ x = 0;
+ }
+ cs->lookup[i*n + j] = (Guchar)x;
+ }
+ }
+ obj1.streamClose();
+ } else if (obj1.isString()) {
+ if (obj1.getString()->getLength() < (indexHighA + 1) * n) {
+ error(-1, "Bad Indexed color space (lookup table string too short)");
+ goto err3;
+ }
+ s = obj1.getString()->getCString();
+ for (i = 0; i <= indexHighA; ++i) {
+ for (j = 0; j < n; ++j) {
+ cs->lookup[i*n + j] = (Guchar)*s++;
+ }
+ }
+ } else {
+ error(-1, "Bad Indexed color space (lookup table)");
+ goto err3;
+ }
+ obj1.free();
+ return cs;
+
+ err3:
+ delete cs;
+ err2:
+ obj1.free();
+ err1:
+ return NULL;
+}
+
+GfxColor *GfxIndexedColorSpace::mapColorToBase(GfxColor *color,
+ GfxColor *baseColor) {
+ Guchar *p;
+ double low[gfxColorMaxComps], range[gfxColorMaxComps];
+ int n, i;
+
+ n = base->getNComps();
+ base->getDefaultRanges(low, range, indexHigh);
+ p = &lookup[(int)(colToDbl(color->c[0]) + 0.5) * n];
+ for (i = 0; i < n; ++i) {
+ baseColor->c[i] = dblToCol(low[i] + (p[i] / 255.0) * range[i]);
+ }
+ return baseColor;
+}
+
+void GfxIndexedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ GfxColor color2;
+
+ base->getGray(mapColorToBase(color, &color2), gray);
+}
+
+void GfxIndexedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ GfxColor color2;
+
+ base->getRGB(mapColorToBase(color, &color2), rgb);
+}
+
+void GfxIndexedColorSpace::getRGBLine(Guchar *in, unsigned int *out, int length) {
+ Guchar *line;
+ int i, j, n;
+
+ n = base->getNComps();
+ line = (Guchar *) gmallocn (length, n);
+ for (i = 0; i < length; i++)
+ for (j = 0; j < n; j++)
+ line[i * n + j] = lookup[in[i] * n + j];
+
+ base->getRGBLine(line, out, length);
+
+ gfree (line);
+}
+
+void GfxIndexedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ GfxColor color2;
+
+ base->getCMYK(mapColorToBase(color, &color2), cmyk);
+}
+
+void GfxIndexedColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = 0;
+}
+
+void GfxIndexedColorSpace::getDefaultRanges(double *decodeLow,
+ double *decodeRange,
+ int maxImgPixel) {
+ decodeLow[0] = 0;
+ decodeRange[0] = maxImgPixel;
+}
+
+//------------------------------------------------------------------------
+// GfxSeparationColorSpace
+//------------------------------------------------------------------------
+
+GfxSeparationColorSpace::GfxSeparationColorSpace(GooString *nameA,
+ GfxColorSpace *altA,
+ Function *funcA) {
+ name = nameA;
+ alt = altA;
+ func = funcA;
+ nonMarking = !name->cmp("None");
+}
+
+GfxSeparationColorSpace::~GfxSeparationColorSpace() {
+ delete name;
+ delete alt;
+ delete func;
+}
+
+GfxColorSpace *GfxSeparationColorSpace::copy() {
+ return new GfxSeparationColorSpace(name->copy(), alt->copy(), func->copy());
+}
+
+//~ handle the 'All' and 'None' colorants
+GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr, Gfx *gfx) {
+ GfxSeparationColorSpace *cs;
+ GooString *nameA;
+ GfxColorSpace *altA;
+ Function *funcA;
+ Object obj1;
+
+ if (arr->getLength() != 4) {
+ error(-1, "Bad Separation color space");
+ goto err1;
+ }
+ if (!arr->get(1, &obj1)->isName()) {
+ error(-1, "Bad Separation color space (name)");
+ goto err2;
+ }
+ nameA = new GooString(obj1.getName());
+ obj1.free();
+ arr->get(2, &obj1);
+ if (!(altA = GfxColorSpace::parse(&obj1, gfx))) {
+ error(-1, "Bad Separation color space (alternate color space)");
+ goto err3;
+ }
+ obj1.free();
+ arr->get(3, &obj1);
+ if (!(funcA = Function::parse(&obj1))) {
+ goto err4;
+ }
+ obj1.free();
+ cs = new GfxSeparationColorSpace(nameA, altA, funcA);
+ return cs;
+
+ err4:
+ delete altA;
+ err3:
+ delete nameA;
+ err2:
+ obj1.free();
+ err1:
+ return NULL;
+}
+
+void GfxSeparationColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ double x;
+ double c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ x = colToDbl(color->c[0]);
+ func->transform(&x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getGray(&color2, gray);
+}
+
+void GfxSeparationColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double x;
+ double c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ x = colToDbl(color->c[0]);
+ func->transform(&x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getRGB(&color2, rgb);
+}
+
+void GfxSeparationColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ double x;
+ double c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ x = colToDbl(color->c[0]);
+ func->transform(&x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getCMYK(&color2, cmyk);
+}
+
+void GfxSeparationColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0] = gfxColorComp1;
+}
+
+//------------------------------------------------------------------------
+// GfxDeviceNColorSpace
+//------------------------------------------------------------------------
+
+GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA,
+ GfxColorSpace *altA,
+ Function *funcA) {
+ nComps = nCompsA;
+ alt = altA;
+ func = funcA;
+ nonMarking = gFalse;
+}
+
+GfxDeviceNColorSpace::~GfxDeviceNColorSpace() {
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ delete names[i];
+ }
+ delete alt;
+ delete func;
+}
+
+GfxColorSpace *GfxDeviceNColorSpace::copy() {
+ GfxDeviceNColorSpace *cs;
+ int i;
+
+ cs = new GfxDeviceNColorSpace(nComps, alt->copy(), func->copy());
+ for (i = 0; i < nComps; ++i) {
+ cs->names[i] = names[i]->copy();
+ }
+ cs->nonMarking = nonMarking;
+ return cs;
+}
+
+//~ handle the 'None' colorant
+GfxColorSpace *GfxDeviceNColorSpace::parse(Array *arr, Gfx *gfx) {
+ GfxDeviceNColorSpace *cs;
+ int nCompsA;
+ GooString *namesA[gfxColorMaxComps];
+ GfxColorSpace *altA;
+ Function *funcA;
+ Object obj1, obj2;
+ int i;
+
+ if (arr->getLength() != 4 && arr->getLength() != 5) {
+ error(-1, "Bad DeviceN color space");
+ goto err1;
+ }
+ if (!arr->get(1, &obj1)->isArray()) {
+ error(-1, "Bad DeviceN color space (names)");
+ goto err2;
+ }
+ nCompsA = obj1.arrayGetLength();
+ if (nCompsA > gfxColorMaxComps) {
+ error(-1, "DeviceN color space with too many (%d > %d) components",
+ nCompsA, gfxColorMaxComps);
+ nCompsA = gfxColorMaxComps;
+ }
+ for (i = 0; i < nCompsA; ++i) {
+ if (!obj1.arrayGet(i, &obj2)->isName()) {
+ error(-1, "Bad DeviceN color space (names)");
+ obj2.free();
+ goto err2;
+ }
+ namesA[i] = new GooString(obj2.getName());
+ obj2.free();
+ }
+ obj1.free();
+ arr->get(2, &obj1);
+ if (!(altA = GfxColorSpace::parse(&obj1, gfx))) {
+ error(-1, "Bad DeviceN color space (alternate color space)");
+ goto err3;
+ }
+ obj1.free();
+ arr->get(3, &obj1);
+ if (!(funcA = Function::parse(&obj1))) {
+ goto err4;
+ }
+ obj1.free();
+ cs = new GfxDeviceNColorSpace(nCompsA, altA, funcA);
+ cs->nonMarking = gTrue;
+ for (i = 0; i < nCompsA; ++i) {
+ cs->names[i] = namesA[i];
+ if (namesA[i]->cmp("None")) {
+ cs->nonMarking = gFalse;
+ }
+ }
+ return cs;
+
+ err4:
+ delete altA;
+ err3:
+ for (i = 0; i < nCompsA; ++i) {
+ delete namesA[i];
+ }
+ err2:
+ obj1.free();
+ err1:
+ return NULL;
+}
+
+void GfxDeviceNColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ double x[gfxColorMaxComps], c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ x[i] = colToDbl(color->c[i]);
+ }
+ func->transform(x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getGray(&color2, gray);
+}
+
+void GfxDeviceNColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ double x[gfxColorMaxComps], c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ x[i] = colToDbl(color->c[i]);
+ }
+ func->transform(x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getRGB(&color2, rgb);
+}
+
+void GfxDeviceNColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ double x[gfxColorMaxComps], c[gfxColorMaxComps];
+ GfxColor color2;
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ x[i] = colToDbl(color->c[i]);
+ }
+ func->transform(x, c);
+ for (i = 0; i < alt->getNComps(); ++i) {
+ color2.c[i] = dblToCol(c[i]);
+ }
+ alt->getCMYK(&color2, cmyk);
+}
+
+void GfxDeviceNColorSpace::getDefaultColor(GfxColor *color) {
+ int i;
+
+ for (i = 0; i < nComps; ++i) {
+ color->c[i] = gfxColorComp1;
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxPatternColorSpace
+//------------------------------------------------------------------------
+
+GfxPatternColorSpace::GfxPatternColorSpace(GfxColorSpace *underA) {
+ under = underA;
+}
+
+GfxPatternColorSpace::~GfxPatternColorSpace() {
+ if (under) {
+ delete under;
+ }
+}
+
+GfxColorSpace *GfxPatternColorSpace::copy() {
+ return new GfxPatternColorSpace(under ? under->copy() :
+ (GfxColorSpace *)NULL);
+}
+
+GfxColorSpace *GfxPatternColorSpace::parse(Array *arr, Gfx *gfx) {
+ GfxPatternColorSpace *cs;
+ GfxColorSpace *underA;
+ Object obj1;
+
+ if (arr->getLength() != 1 && arr->getLength() != 2) {
+ error(-1, "Bad Pattern color space");
+ return NULL;
+ }
+ underA = NULL;
+ if (arr->getLength() == 2) {
+ arr->get(1, &obj1);
+ if (!(underA = GfxColorSpace::parse(&obj1, gfx))) {
+ error(-1, "Bad Pattern color space (underlying color space)");
+ obj1.free();
+ return NULL;
+ }
+ obj1.free();
+ }
+ cs = new GfxPatternColorSpace(underA);
+ return cs;
+}
+
+void GfxPatternColorSpace::getGray(GfxColor *color, GfxGray *gray) {
+ *gray = 0;
+}
+
+void GfxPatternColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
+ rgb->r = rgb->g = rgb->b = 0;
+}
+
+void GfxPatternColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
+ cmyk->c = cmyk->m = cmyk->y = 0;
+ cmyk->k = 1;
+}
+
+void GfxPatternColorSpace::getDefaultColor(GfxColor *color) {
+ color->c[0]=0;
+}
+
+//------------------------------------------------------------------------
+// Pattern
+//------------------------------------------------------------------------
+
+GfxPattern::GfxPattern(int typeA) {
+ type = typeA;
+}
+
+GfxPattern::~GfxPattern() {
+}
+
+GfxPattern *GfxPattern::parse(Object *obj, Gfx *gfx) {
+ GfxPattern *pattern;
+ Object obj1;
+
+ if (obj->isDict()) {
+ obj->dictLookup("PatternType", &obj1);
+ } else if (obj->isStream()) {
+ obj->streamGetDict()->lookup("PatternType", &obj1);
+ } else {
+ return NULL;
+ }
+ pattern = NULL;
+ if (obj1.isInt() && obj1.getInt() == 1) {
+ pattern = GfxTilingPattern::parse(obj);
+ } else if (obj1.isInt() && obj1.getInt() == 2) {
+ pattern = GfxShadingPattern::parse(obj, gfx);
+ }
+ obj1.free();
+ return pattern;
+}
+
+//------------------------------------------------------------------------
+// GfxTilingPattern
+//------------------------------------------------------------------------
+
+GfxTilingPattern *GfxTilingPattern::parse(Object *patObj) {
+ GfxTilingPattern *pat;
+ Dict *dict;
+ int paintTypeA, tilingTypeA;
+ double bboxA[4], matrixA[6];
+ double xStepA, yStepA;
+ Object resDictA;
+ Object obj1, obj2;
+ int i;
+
+ if (!patObj->isStream()) {
+ return NULL;
+ }
+ dict = patObj->streamGetDict();
+
+ if (dict->lookup("PaintType", &obj1)->isInt()) {
+ paintTypeA = obj1.getInt();
+ } else {
+ paintTypeA = 1;
+ error(-1, "Invalid or missing PaintType in pattern");
+ }
+ obj1.free();
+ if (dict->lookup("TilingType", &obj1)->isInt()) {
+ tilingTypeA = obj1.getInt();
+ } else {
+ tilingTypeA = 1;
+ error(-1, "Invalid or missing TilingType in pattern");
+ }
+ obj1.free();
+ bboxA[0] = bboxA[1] = 0;
+ bboxA[2] = bboxA[3] = 1;
+ if (dict->lookup("BBox", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 4) {
+ for (i = 0; i < 4; ++i) {
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ bboxA[i] = obj2.getNum();
+ }
+ obj2.free();
+ }
+ } else {
+ error(-1, "Invalid or missing BBox in pattern");
+ }
+ obj1.free();
+ if (dict->lookup("XStep", &obj1)->isNum()) {
+ xStepA = obj1.getNum();
+ } else {
+ xStepA = 1;
+ error(-1, "Invalid or missing XStep in pattern");
+ }
+ obj1.free();
+ if (dict->lookup("YStep", &obj1)->isNum()) {
+ yStepA = obj1.getNum();
+ } else {
+ yStepA = 1;
+ error(-1, "Invalid or missing YStep in pattern");
+ }
+ obj1.free();
+ if (!dict->lookup("Resources", &resDictA)->isDict()) {
+ resDictA.free();
+ resDictA.initNull();
+ error(-1, "Invalid or missing Resources in pattern");
+ }
+ matrixA[0] = 1; matrixA[1] = 0;
+ matrixA[2] = 0; matrixA[3] = 1;
+ matrixA[4] = 0; matrixA[5] = 0;
+ if (dict->lookup("Matrix", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 6) {
+ for (i = 0; i < 6; ++i) {
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ matrixA[i] = obj2.getNum();
+ }
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ pat = new GfxTilingPattern(paintTypeA, tilingTypeA, bboxA, xStepA, yStepA,
+ &resDictA, matrixA, patObj);
+ resDictA.free();
+ return pat;
+}
+
+GfxTilingPattern::GfxTilingPattern(int paintTypeA, int tilingTypeA,
+ double *bboxA, double xStepA, double yStepA,
+ Object *resDictA, double *matrixA,
+ Object *contentStreamA):
+ GfxPattern(1)
+{
+ int i;
+
+ paintType = paintTypeA;
+ tilingType = tilingTypeA;
+ for (i = 0; i < 4; ++i) {
+ bbox[i] = bboxA[i];
+ }
+ xStep = xStepA;
+ yStep = yStepA;
+ resDictA->copy(&resDict);
+ for (i = 0; i < 6; ++i) {
+ matrix[i] = matrixA[i];
+ }
+ contentStreamA->copy(&contentStream);
+}
+
+GfxTilingPattern::~GfxTilingPattern() {
+ resDict.free();
+ contentStream.free();
+}
+
+GfxPattern *GfxTilingPattern::copy() {
+ return new GfxTilingPattern(paintType, tilingType, bbox, xStep, yStep,
+ &resDict, matrix, &contentStream);
+}
+
+//------------------------------------------------------------------------
+// GfxShadingPattern
+//------------------------------------------------------------------------
+
+GfxShadingPattern *GfxShadingPattern::parse(Object *patObj, Gfx *gfx) {
+ Dict *dict;
+ GfxShading *shadingA;
+ double matrixA[6];
+ Object obj1, obj2;
+ int i;
+
+ if (!patObj->isDict()) {
+ return NULL;
+ }
+ dict = patObj->getDict();
+
+ dict->lookup("Shading", &obj1);
+ shadingA = GfxShading::parse(&obj1, gfx);
+ obj1.free();
+ if (!shadingA) {
+ return NULL;
+ }
+
+ matrixA[0] = 1; matrixA[1] = 0;
+ matrixA[2] = 0; matrixA[3] = 1;
+ matrixA[4] = 0; matrixA[5] = 0;
+ if (dict->lookup("Matrix", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 6) {
+ for (i = 0; i < 6; ++i) {
+ if (obj1.arrayGet(i, &obj2)->isNum()) {
+ matrixA[i] = obj2.getNum();
+ }
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ return new GfxShadingPattern(shadingA, matrixA);
+}
+
+GfxShadingPattern::GfxShadingPattern(GfxShading *shadingA, double *matrixA):
+ GfxPattern(2)
+{
+ int i;
+
+ shading = shadingA;
+ for (i = 0; i < 6; ++i) {
+ matrix[i] = matrixA[i];
+ }
+}
+
+GfxShadingPattern::~GfxShadingPattern() {
+ delete shading;
+}
+
+GfxPattern *GfxShadingPattern::copy() {
+ return new GfxShadingPattern(shading->copy(), matrix);
+}
+
+//------------------------------------------------------------------------
+// GfxShading
+//------------------------------------------------------------------------
+
+GfxShading::GfxShading(int typeA) {
+ type = typeA;
+ colorSpace = NULL;
+}
+
+GfxShading::GfxShading(GfxShading *shading) {
+ int i;
+
+ type = shading->type;
+ colorSpace = shading->colorSpace->copy();
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ background.c[i] = shading->background.c[i];
+ }
+ hasBackground = shading->hasBackground;
+ xMin = shading->xMin;
+ yMin = shading->yMin;
+ xMax = shading->xMax;
+ yMax = shading->yMax;
+ hasBBox = shading->hasBBox;
+}
+
+GfxShading::~GfxShading() {
+ if (colorSpace) {
+ delete colorSpace;
+ }
+}
+
+GfxShading *GfxShading::parse(Object *obj, Gfx *gfx) {
+ GfxShading *shading;
+ Dict *dict;
+ int typeA;
+ Object obj1;
+
+ if (obj->isDict()) {
+ dict = obj->getDict();
+ } else if (obj->isStream()) {
+ dict = obj->streamGetDict();
+ } else {
+ return NULL;
+ }
+
+ if (!dict->lookup("ShadingType", &obj1)->isInt()) {
+ error(-1, "Invalid ShadingType in shading dictionary");
+ obj1.free();
+ return NULL;
+ }
+ typeA = obj1.getInt();
+ obj1.free();
+
+ switch (typeA) {
+ case 1:
+ shading = GfxFunctionShading::parse(dict, gfx);
+ break;
+ case 2:
+ shading = GfxAxialShading::parse(dict, gfx);
+ break;
+ case 3:
+ shading = GfxRadialShading::parse(dict, gfx);
+ break;
+ case 4:
+ if (obj->isStream()) {
+ shading = GfxGouraudTriangleShading::parse(4, dict, obj->getStream(), gfx);
+ } else {
+ error(-1, "Invalid Type 4 shading object");
+ goto err1;
+ }
+ break;
+ case 5:
+ if (obj->isStream()) {
+ shading = GfxGouraudTriangleShading::parse(5, dict, obj->getStream(), gfx);
+ } else {
+ error(-1, "Invalid Type 5 shading object");
+ goto err1;
+ }
+ break;
+ case 6:
+ if (obj->isStream()) {
+ shading = GfxPatchMeshShading::parse(6, dict, obj->getStream(), gfx);
+ } else {
+ error(-1, "Invalid Type 6 shading object");
+ goto err1;
+ }
+ break;
+ case 7:
+ if (obj->isStream()) {
+ shading = GfxPatchMeshShading::parse(7, dict, obj->getStream(), gfx);
+ } else {
+ error(-1, "Invalid Type 7 shading object");
+ goto err1;
+ }
+ break;
+ default:
+ error(-1, "Unimplemented shading type %d", typeA);
+ goto err1;
+ }
+
+ return shading;
+
+ err1:
+ return NULL;
+}
+
+GBool GfxShading::init(Dict *dict, Gfx *gfx) {
+ Object obj1, obj2;
+ int i;
+
+ dict->lookup("ColorSpace", &obj1);
+ if (!(colorSpace = GfxColorSpace::parse(&obj1, gfx))) {
+ error(-1, "Bad color space in shading dictionary");
+ obj1.free();
+ return gFalse;
+ }
+ obj1.free();
+
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ background.c[i] = 0;
+ }
+ hasBackground = gFalse;
+ if (dict->lookup("Background", &obj1)->isArray()) {
+ if (obj1.arrayGetLength() == colorSpace->getNComps()) {
+ hasBackground = gTrue;
+ for (i = 0; i < colorSpace->getNComps(); ++i) {
+ background.c[i] = dblToCol(obj1.arrayGet(i, &obj2)->getNum());
+ obj2.free();
+ }
+ } else {
+ error(-1, "Bad Background in shading dictionary");
+ }
+ }
+ obj1.free();
+
+ xMin = yMin = xMax = yMax = 0;
+ hasBBox = gFalse;
+ if (dict->lookup("BBox", &obj1)->isArray()) {
+ if (obj1.arrayGetLength() == 4) {
+ hasBBox = gTrue;
+ xMin = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ yMin = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ xMax = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ yMax = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ } else {
+ error(-1, "Bad BBox in shading dictionary");
+ }
+ }
+ obj1.free();
+
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// GfxFunctionShading
+//------------------------------------------------------------------------
+
+GfxFunctionShading::GfxFunctionShading(double x0A, double y0A,
+ double x1A, double y1A,
+ double *matrixA,
+ Function **funcsA, int nFuncsA):
+ GfxShading(1)
+{
+ int i;
+
+ x0 = x0A;
+ y0 = y0A;
+ x1 = x1A;
+ y1 = y1A;
+ for (i = 0; i < 6; ++i) {
+ matrix[i] = matrixA[i];
+ }
+ nFuncs = nFuncsA;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = funcsA[i];
+ }
+}
+
+GfxFunctionShading::GfxFunctionShading(GfxFunctionShading *shading):
+ GfxShading(shading)
+{
+ int i;
+
+ x0 = shading->x0;
+ y0 = shading->y0;
+ x1 = shading->x1;
+ y1 = shading->y1;
+ for (i = 0; i < 6; ++i) {
+ matrix[i] = shading->matrix[i];
+ }
+ nFuncs = shading->nFuncs;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = shading->funcs[i]->copy();
+ }
+}
+
+GfxFunctionShading::~GfxFunctionShading() {
+ int i;
+
+ for (i = 0; i < nFuncs; ++i) {
+ delete funcs[i];
+ }
+}
+
+GfxFunctionShading *GfxFunctionShading::parse(Dict *dict, Gfx *gfx) {
+ GfxFunctionShading *shading;
+ double x0A, y0A, x1A, y1A;
+ double matrixA[6];
+ Function *funcsA[gfxColorMaxComps];
+ int nFuncsA;
+ Object obj1, obj2;
+ int i;
+
+ x0A = y0A = 0;
+ x1A = y1A = 1;
+ if (dict->lookup("Domain", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 4) {
+ x0A = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ x1A = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ y0A = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ y1A = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ matrixA[0] = 1; matrixA[1] = 0;
+ matrixA[2] = 0; matrixA[3] = 1;
+ matrixA[4] = 0; matrixA[5] = 0;
+ if (dict->lookup("Matrix", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 6) {
+ matrixA[0] = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ matrixA[1] = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ matrixA[2] = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ matrixA[3] = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ matrixA[4] = obj1.arrayGet(4, &obj2)->getNum();
+ obj2.free();
+ matrixA[5] = obj1.arrayGet(5, &obj2)->getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("Function", &obj1);
+ if (obj1.isArray()) {
+ nFuncsA = obj1.arrayGetLength();
+ if (nFuncsA > gfxColorMaxComps) {
+ error(-1, "Invalid Function array in shading dictionary");
+ goto err1;
+ }
+ for (i = 0; i < nFuncsA; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!(funcsA[i] = Function::parse(&obj2))) {
+ goto err2;
+ }
+ obj2.free();
+ }
+ } else {
+ nFuncsA = 1;
+ if (!(funcsA[0] = Function::parse(&obj1))) {
+ goto err1;
+ }
+ }
+ obj1.free();
+
+ shading = new GfxFunctionShading(x0A, y0A, x1A, y1A, matrixA,
+ funcsA, nFuncsA);
+ if (!shading->init(dict, gfx)) {
+ delete shading;
+ return NULL;
+ }
+ return shading;
+
+ err2:
+ obj2.free();
+ err1:
+ obj1.free();
+ return NULL;
+}
+
+GfxShading *GfxFunctionShading::copy() {
+ return new GfxFunctionShading(this);
+}
+
+void GfxFunctionShading::getColor(double x, double y, GfxColor *color) {
+ double in[2], out[gfxColorMaxComps];
+ int i;
+
+ // NB: there can be one function with n outputs or n functions with
+ // one output each (where n = number of color components)
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ out[i] = 0;
+ }
+ in[0] = x;
+ in[1] = y;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i]->transform(in, &out[i]);
+ }
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ color->c[i] = dblToCol(out[i]);
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxAxialShading
+//------------------------------------------------------------------------
+
+GfxAxialShading::GfxAxialShading(double x0A, double y0A,
+ double x1A, double y1A,
+ double t0A, double t1A,
+ Function **funcsA, int nFuncsA,
+ GBool extend0A, GBool extend1A):
+ GfxShading(2)
+{
+ int i;
+
+ x0 = x0A;
+ y0 = y0A;
+ x1 = x1A;
+ y1 = y1A;
+ t0 = t0A;
+ t1 = t1A;
+ nFuncs = nFuncsA;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = funcsA[i];
+ }
+ extend0 = extend0A;
+ extend1 = extend1A;
+}
+
+GfxAxialShading::GfxAxialShading(GfxAxialShading *shading):
+ GfxShading(shading)
+{
+ int i;
+
+ x0 = shading->x0;
+ y0 = shading->y0;
+ x1 = shading->x1;
+ y1 = shading->y1;
+ t0 = shading->t0;
+ t1 = shading->t1;
+ nFuncs = shading->nFuncs;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = shading->funcs[i]->copy();
+ }
+ extend0 = shading->extend0;
+ extend1 = shading->extend1;
+}
+
+GfxAxialShading::~GfxAxialShading() {
+ int i;
+
+ for (i = 0; i < nFuncs; ++i) {
+ delete funcs[i];
+ }
+}
+
+GfxAxialShading *GfxAxialShading::parse(Dict *dict, Gfx *gfx) {
+ GfxAxialShading *shading;
+ double x0A, y0A, x1A, y1A;
+ double t0A, t1A;
+ Function *funcsA[gfxColorMaxComps];
+ int nFuncsA;
+ GBool extend0A, extend1A;
+ Object obj1, obj2;
+ int i;
+
+ x0A = y0A = x1A = y1A = 0;
+ if (dict->lookup("Coords", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 4) {
+ x0A = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ y0A = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ x1A = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ y1A = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ } else {
+ error(-1, "Missing or invalid Coords in shading dictionary");
+ goto err1;
+ }
+ obj1.free();
+
+ t0A = 0;
+ t1A = 1;
+ if (dict->lookup("Domain", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2) {
+ t0A = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ t1A = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("Function", &obj1);
+ if (obj1.isArray()) {
+ nFuncsA = obj1.arrayGetLength();
+ if (nFuncsA > gfxColorMaxComps) {
+ error(-1, "Invalid Function array in shading dictionary");
+ goto err1;
+ }
+ for (i = 0; i < nFuncsA; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!(funcsA[i] = Function::parse(&obj2))) {
+ obj1.free();
+ obj2.free();
+ goto err1;
+ }
+ obj2.free();
+ }
+ } else {
+ nFuncsA = 1;
+ if (!(funcsA[0] = Function::parse(&obj1))) {
+ obj1.free();
+ goto err1;
+ }
+ }
+ obj1.free();
+
+ extend0A = extend1A = gFalse;
+ if (dict->lookup("Extend", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2) {
+ extend0A = obj1.arrayGet(0, &obj2)->getBool();
+ obj2.free();
+ extend1A = obj1.arrayGet(1, &obj2)->getBool();
+ obj2.free();
+ }
+ obj1.free();
+
+ shading = new GfxAxialShading(x0A, y0A, x1A, y1A, t0A, t1A,
+ funcsA, nFuncsA, extend0A, extend1A);
+ if (!shading->init(dict, gfx)) {
+ delete shading;
+ return NULL;
+ }
+ return shading;
+
+ err1:
+ return NULL;
+}
+
+GfxShading *GfxAxialShading::copy() {
+ return new GfxAxialShading(this);
+}
+
+void GfxAxialShading::getColor(double t, GfxColor *color) {
+ double out[gfxColorMaxComps];
+ int i;
+
+ // NB: there can be one function with n outputs or n functions with
+ // one output each (where n = number of color components)
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ out[i] = 0;
+ }
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i]->transform(&t, &out[i]);
+ }
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ color->c[i] = dblToCol(out[i]);
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxRadialShading
+//------------------------------------------------------------------------
+
+GfxRadialShading::GfxRadialShading(double x0A, double y0A, double r0A,
+ double x1A, double y1A, double r1A,
+ double t0A, double t1A,
+ Function **funcsA, int nFuncsA,
+ GBool extend0A, GBool extend1A):
+ GfxShading(3)
+{
+ int i;
+
+ x0 = x0A;
+ y0 = y0A;
+ r0 = r0A;
+ x1 = x1A;
+ y1 = y1A;
+ r1 = r1A;
+ t0 = t0A;
+ t1 = t1A;
+ nFuncs = nFuncsA;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = funcsA[i];
+ }
+ extend0 = extend0A;
+ extend1 = extend1A;
+}
+
+GfxRadialShading::GfxRadialShading(GfxRadialShading *shading):
+ GfxShading(shading)
+{
+ int i;
+
+ x0 = shading->x0;
+ y0 = shading->y0;
+ r0 = shading->r0;
+ x1 = shading->x1;
+ y1 = shading->y1;
+ r1 = shading->r1;
+ t0 = shading->t0;
+ t1 = shading->t1;
+ nFuncs = shading->nFuncs;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = shading->funcs[i]->copy();
+ }
+ extend0 = shading->extend0;
+ extend1 = shading->extend1;
+}
+
+GfxRadialShading::~GfxRadialShading() {
+ int i;
+
+ for (i = 0; i < nFuncs; ++i) {
+ delete funcs[i];
+ }
+}
+
+GfxRadialShading *GfxRadialShading::parse(Dict *dict, Gfx *gfx) {
+ GfxRadialShading *shading;
+ double x0A, y0A, r0A, x1A, y1A, r1A;
+ double t0A, t1A;
+ Function *funcsA[gfxColorMaxComps];
+ int nFuncsA;
+ GBool extend0A, extend1A;
+ Object obj1, obj2;
+ int i;
+
+ x0A = y0A = r0A = x1A = y1A = r1A = 0;
+ if (dict->lookup("Coords", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 6) {
+ x0A = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ y0A = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ r0A = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ x1A = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ y1A = obj1.arrayGet(4, &obj2)->getNum();
+ obj2.free();
+ r1A = obj1.arrayGet(5, &obj2)->getNum();
+ obj2.free();
+ } else {
+ error(-1, "Missing or invalid Coords in shading dictionary");
+ goto err1;
+ }
+ obj1.free();
+
+ t0A = 0;
+ t1A = 1;
+ if (dict->lookup("Domain", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2) {
+ t0A = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ t1A = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("Function", &obj1);
+ if (obj1.isArray()) {
+ nFuncsA = obj1.arrayGetLength();
+ if (nFuncsA > gfxColorMaxComps) {
+ error(-1, "Invalid Function array in shading dictionary");
+ goto err1;
+ }
+ for (i = 0; i < nFuncsA; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!(funcsA[i] = Function::parse(&obj2))) {
+ obj1.free();
+ obj2.free();
+ goto err1;
+ }
+ obj2.free();
+ }
+ } else {
+ nFuncsA = 1;
+ if (!(funcsA[0] = Function::parse(&obj1))) {
+ obj1.free();
+ goto err1;
+ }
+ }
+ obj1.free();
+
+ extend0A = extend1A = gFalse;
+ if (dict->lookup("Extend", &obj1)->isArray() &&
+ obj1.arrayGetLength() == 2) {
+ extend0A = obj1.arrayGet(0, &obj2)->getBool();
+ obj2.free();
+ extend1A = obj1.arrayGet(1, &obj2)->getBool();
+ obj2.free();
+ }
+ obj1.free();
+
+ shading = new GfxRadialShading(x0A, y0A, r0A, x1A, y1A, r1A, t0A, t1A,
+ funcsA, nFuncsA, extend0A, extend1A);
+ if (!shading->init(dict, gfx)) {
+ delete shading;
+ return NULL;
+ }
+ return shading;
+
+ err1:
+ return NULL;
+}
+
+GfxShading *GfxRadialShading::copy() {
+ return new GfxRadialShading(this);
+}
+
+void GfxRadialShading::getColor(double t, GfxColor *color) {
+ double out[gfxColorMaxComps];
+ int i;
+
+ // NB: there can be one function with n outputs or n functions with
+ // one output each (where n = number of color components)
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ out[i] = 0;
+ }
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i]->transform(&t, &out[i]);
+ }
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ color->c[i] = dblToCol(out[i]);
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxShadingBitBuf
+//------------------------------------------------------------------------
+
+class GfxShadingBitBuf {
+public:
+
+ GfxShadingBitBuf(Stream *strA);
+ ~GfxShadingBitBuf();
+ GBool getBits(int n, Guint *val);
+ void flushBits();
+
+private:
+
+ Stream *str;
+ int bitBuf;
+ int nBits;
+};
+
+GfxShadingBitBuf::GfxShadingBitBuf(Stream *strA) {
+ str = strA;
+ str->reset();
+ bitBuf = 0;
+ nBits = 0;
+}
+
+GfxShadingBitBuf::~GfxShadingBitBuf() {
+ str->close();
+}
+
+GBool GfxShadingBitBuf::getBits(int n, Guint *val) {
+ int x;
+
+ if (nBits >= n) {
+ x = (bitBuf >> (nBits - n)) & ((1 << n) - 1);
+ nBits -= n;
+ } else {
+ x = 0;
+ if (nBits > 0) {
+ x = bitBuf & ((1 << nBits) - 1);
+ n -= nBits;
+ nBits = 0;
+ }
+ while (n > 0) {
+ if ((bitBuf = str->getChar()) == EOF) {
+ nBits = 0;
+ return gFalse;
+ }
+ if (n >= 8) {
+ x = (x << 8) | bitBuf;
+ n -= 8;
+ } else {
+ x = (x << n) | (bitBuf >> (8 - n));
+ nBits = 8 - n;
+ n = 0;
+ }
+ }
+ }
+ *val = x;
+ return gTrue;
+}
+
+void GfxShadingBitBuf::flushBits() {
+ bitBuf = 0;
+ nBits = 0;
+}
+
+//------------------------------------------------------------------------
+// GfxGouraudTriangleShading
+//------------------------------------------------------------------------
+
+GfxGouraudTriangleShading::GfxGouraudTriangleShading(
+ int typeA,
+ GfxGouraudVertex *verticesA, int nVerticesA,
+ int (*trianglesA)[3], int nTrianglesA,
+ Function **funcsA, int nFuncsA):
+ GfxShading(typeA)
+{
+ int i;
+
+ vertices = verticesA;
+ nVertices = nVerticesA;
+ triangles = trianglesA;
+ nTriangles = nTrianglesA;
+ nFuncs = nFuncsA;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = funcsA[i];
+ }
+}
+
+GfxGouraudTriangleShading::GfxGouraudTriangleShading(
+ GfxGouraudTriangleShading *shading):
+ GfxShading(shading)
+{
+ int i;
+
+ nVertices = shading->nVertices;
+ vertices = (GfxGouraudVertex *)gmallocn(nVertices, sizeof(GfxGouraudVertex));
+ memcpy(vertices, shading->vertices, nVertices * sizeof(GfxGouraudVertex));
+ nTriangles = shading->nTriangles;
+ triangles = (int (*)[3])gmallocn(nTriangles * 3, sizeof(int));
+ memcpy(triangles, shading->triangles, nTriangles * 3 * sizeof(int));
+ nFuncs = shading->nFuncs;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = shading->funcs[i]->copy();
+ }
+}
+
+GfxGouraudTriangleShading::~GfxGouraudTriangleShading() {
+ int i;
+
+ gfree(vertices);
+ gfree(triangles);
+ for (i = 0; i < nFuncs; ++i) {
+ delete funcs[i];
+ }
+}
+
+GfxGouraudTriangleShading *GfxGouraudTriangleShading::parse(int typeA,
+ Dict *dict,
+ Stream *str,
+ Gfx *gfx) {
+ GfxGouraudTriangleShading *shading;
+ Function *funcsA[gfxColorMaxComps];
+ int nFuncsA;
+ int coordBits, compBits, flagBits, vertsPerRow, nRows;
+ double xMin, xMax, yMin, yMax;
+ double cMin[gfxColorMaxComps], cMax[gfxColorMaxComps];
+ double xMul, yMul;
+ double cMul[gfxColorMaxComps];
+ GfxGouraudVertex *verticesA;
+ int (*trianglesA)[3];
+ int nComps, nVerticesA, nTrianglesA, vertSize, triSize;
+ Guint x, y, flag;
+ Guint c[gfxColorMaxComps];
+ GfxShadingBitBuf *bitBuf;
+ Object obj1, obj2;
+ int i, j, k, state;
+
+ if (dict->lookup("BitsPerCoordinate", &obj1)->isInt()) {
+ coordBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerCoordinate in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ if (dict->lookup("BitsPerComponent", &obj1)->isInt()) {
+ compBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerComponent in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ flagBits = vertsPerRow = 0; // make gcc happy
+ if (typeA == 4) {
+ if (dict->lookup("BitsPerFlag", &obj1)->isInt()) {
+ flagBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerFlag in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ } else {
+ if (dict->lookup("VerticesPerRow", &obj1)->isInt()) {
+ vertsPerRow = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid VerticesPerRow in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ }
+ if (dict->lookup("Decode", &obj1)->isArray() &&
+ obj1.arrayGetLength() >= 6) {
+ xMin = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ xMax = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ xMul = (xMax - xMin) / (pow(2.0, coordBits) - 1);
+ yMin = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ yMax = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ yMul = (yMax - yMin) / (pow(2.0, coordBits) - 1);
+ for (i = 0; 5 + 2*i < obj1.arrayGetLength() && i < gfxColorMaxComps; ++i) {
+ cMin[i] = obj1.arrayGet(4 + 2*i, &obj2)->getNum();
+ obj2.free();
+ cMax[i] = obj1.arrayGet(5 + 2*i, &obj2)->getNum();
+ obj2.free();
+ cMul[i] = (cMax[i] - cMin[i]) / (double)((1 << compBits) - 1);
+ }
+ nComps = i;
+ } else {
+ error(-1, "Missing or invalid Decode array in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+
+ if (!dict->lookup("Function", &obj1)->isNull()) {
+ if (obj1.isArray()) {
+ nFuncsA = obj1.arrayGetLength();
+ if (nFuncsA > gfxColorMaxComps) {
+ error(-1, "Invalid Function array in shading dictionary");
+ goto err1;
+ }
+ for (i = 0; i < nFuncsA; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!(funcsA[i] = Function::parse(&obj2))) {
+ obj1.free();
+ obj2.free();
+ goto err1;
+ }
+ obj2.free();
+ }
+ } else {
+ nFuncsA = 1;
+ if (!(funcsA[0] = Function::parse(&obj1))) {
+ obj1.free();
+ goto err1;
+ }
+ }
+ } else {
+ nFuncsA = 0;
+ }
+ obj1.free();
+
+ nVerticesA = nTrianglesA = 0;
+ verticesA = NULL;
+ trianglesA = NULL;
+ vertSize = triSize = 0;
+ state = 0;
+ flag = 0; // make gcc happy
+ bitBuf = new GfxShadingBitBuf(str);
+ while (1) {
+ if (typeA == 4) {
+ if (!bitBuf->getBits(flagBits, &flag)) {
+ break;
+ }
+ }
+ if (!bitBuf->getBits(coordBits, &x) ||
+ !bitBuf->getBits(coordBits, &y)) {
+ break;
+ }
+ for (i = 0; i < nComps; ++i) {
+ if (!bitBuf->getBits(compBits, &c[i])) {
+ break;
+ }
+ }
+ if (i < nComps) {
+ break;
+ }
+ if (nVerticesA == vertSize) {
+ int oldVertSize = vertSize;
+ vertSize = (vertSize == 0) ? 16 : 2 * vertSize;
+ verticesA = (GfxGouraudVertex *)
+ greallocn(verticesA, vertSize, sizeof(GfxGouraudVertex));
+ memset(verticesA + oldVertSize, 0, (vertSize - oldVertSize) * sizeof(GfxGouraudVertex));
+ }
+ verticesA[nVerticesA].x = xMin + xMul * (double)x;
+ verticesA[nVerticesA].y = yMin + yMul * (double)y;
+ for (i = 0; i < nComps; ++i) {
+ verticesA[nVerticesA].color.c[i] =
+ dblToCol(cMin[i] + cMul[i] * (double)c[i]);
+ }
+ ++nVerticesA;
+ bitBuf->flushBits();
+ if (typeA == 4) {
+ if (state == 0 || state == 1) {
+ ++state;
+ } else if (state == 2 || flag > 0) {
+ if (nTrianglesA == triSize) {
+ triSize = (triSize == 0) ? 16 : 2 * triSize;
+ trianglesA = (int (*)[3])
+ greallocn(trianglesA, triSize * 3, sizeof(int));
+ }
+ if (state == 2) {
+ trianglesA[nTrianglesA][0] = nVerticesA - 3;
+ trianglesA[nTrianglesA][1] = nVerticesA - 2;
+ trianglesA[nTrianglesA][2] = nVerticesA - 1;
+ ++state;
+ } else if (flag == 1) {
+ trianglesA[nTrianglesA][0] = trianglesA[nTrianglesA - 1][1];
+ trianglesA[nTrianglesA][1] = trianglesA[nTrianglesA - 1][2];
+ trianglesA[nTrianglesA][2] = nVerticesA - 1;
+ } else { // flag == 2
+ trianglesA[nTrianglesA][0] = trianglesA[nTrianglesA - 1][0];
+ trianglesA[nTrianglesA][1] = trianglesA[nTrianglesA - 1][2];
+ trianglesA[nTrianglesA][2] = nVerticesA - 1;
+ }
+ ++nTrianglesA;
+ } else { // state == 3 && flag == 0
+ state = 1;
+ }
+ }
+ }
+ delete bitBuf;
+ if (typeA == 5) {
+ nRows = nVerticesA / vertsPerRow;
+ nTrianglesA = (nRows - 1) * 2 * (vertsPerRow - 1);
+ trianglesA = (int (*)[3])gmallocn(nTrianglesA * 3, sizeof(int));
+ k = 0;
+ for (i = 0; i < nRows - 1; ++i) {
+ for (j = 0; j < vertsPerRow - 1; ++j) {
+ trianglesA[k][0] = i * vertsPerRow + j;
+ trianglesA[k][1] = i * vertsPerRow + j+1;
+ trianglesA[k][2] = (i+1) * vertsPerRow + j;
+ ++k;
+ trianglesA[k][0] = i * vertsPerRow + j+1;
+ trianglesA[k][1] = (i+1) * vertsPerRow + j;
+ trianglesA[k][2] = (i+1) * vertsPerRow + j+1;
+ ++k;
+ }
+ }
+ }
+
+ shading = new GfxGouraudTriangleShading(typeA, verticesA, nVerticesA,
+ trianglesA, nTrianglesA,
+ funcsA, nFuncsA);
+ if (!shading->init(dict, gfx)) {
+ delete shading;
+ return NULL;
+ }
+ return shading;
+
+ err2:
+ obj1.free();
+ err1:
+ return NULL;
+}
+
+GfxShading *GfxGouraudTriangleShading::copy() {
+ return new GfxGouraudTriangleShading(this);
+}
+
+void GfxGouraudTriangleShading::getTriangle(
+ int i,
+ double *x0, double *y0, GfxColor *color0,
+ double *x1, double *y1, GfxColor *color1,
+ double *x2, double *y2, GfxColor *color2) {
+ double in;
+ double out[gfxColorMaxComps];
+ int v, j;
+
+ v = triangles[i][0];
+ *x0 = vertices[v].x;
+ *y0 = vertices[v].y;
+ if (nFuncs > 0) {
+ in = colToDbl(vertices[v].color.c[0]);
+ for (j = 0; j < nFuncs; ++j) {
+ funcs[j]->transform(&in, &out[j]);
+ }
+ for (j = 0; j < gfxColorMaxComps; ++j) {
+ color0->c[j] = dblToCol(out[j]);
+ }
+ } else {
+ *color0 = vertices[v].color;
+ }
+ v = triangles[i][1];
+ *x1 = vertices[v].x;
+ *y1 = vertices[v].y;
+ if (nFuncs > 0) {
+ in = colToDbl(vertices[v].color.c[0]);
+ for (j = 0; j < nFuncs; ++j) {
+ funcs[j]->transform(&in, &out[j]);
+ }
+ for (j = 0; j < gfxColorMaxComps; ++j) {
+ color1->c[j] = dblToCol(out[j]);
+ }
+ } else {
+ *color1 = vertices[v].color;
+ }
+ v = triangles[i][2];
+ *x2 = vertices[v].x;
+ *y2 = vertices[v].y;
+ if (nFuncs > 0) {
+ in = colToDbl(vertices[v].color.c[0]);
+ for (j = 0; j < nFuncs; ++j) {
+ funcs[j]->transform(&in, &out[j]);
+ }
+ for (j = 0; j < gfxColorMaxComps; ++j) {
+ color2->c[j] = dblToCol(out[j]);
+ }
+ } else {
+ *color2 = vertices[v].color;
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxPatchMeshShading
+//------------------------------------------------------------------------
+
+GfxPatchMeshShading::GfxPatchMeshShading(int typeA,
+ GfxPatch *patchesA, int nPatchesA,
+ Function **funcsA, int nFuncsA):
+ GfxShading(typeA)
+{
+ int i;
+
+ patches = patchesA;
+ nPatches = nPatchesA;
+ nFuncs = nFuncsA;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = funcsA[i];
+ }
+}
+
+GfxPatchMeshShading::GfxPatchMeshShading(GfxPatchMeshShading *shading):
+ GfxShading(shading)
+{
+ int i;
+
+ nPatches = shading->nPatches;
+ patches = (GfxPatch *)gmallocn(nPatches, sizeof(GfxPatch));
+ memcpy(patches, shading->patches, nPatches * sizeof(GfxPatch));
+ nFuncs = shading->nFuncs;
+ for (i = 0; i < nFuncs; ++i) {
+ funcs[i] = shading->funcs[i]->copy();
+ }
+}
+
+GfxPatchMeshShading::~GfxPatchMeshShading() {
+ int i;
+
+ gfree(patches);
+ for (i = 0; i < nFuncs; ++i) {
+ delete funcs[i];
+ }
+}
+
+GfxPatchMeshShading *GfxPatchMeshShading::parse(int typeA, Dict *dict,
+ Stream *str, Gfx *gfx) {
+ GfxPatchMeshShading *shading;
+ Function *funcsA[gfxColorMaxComps];
+ int nFuncsA;
+ int coordBits, compBits, flagBits;
+ double xMin, xMax, yMin, yMax;
+ double cMin[gfxColorMaxComps], cMax[gfxColorMaxComps];
+ double xMul, yMul;
+ double cMul[gfxColorMaxComps];
+ GfxPatch *patchesA, *p;
+ int nComps, nPatchesA, patchesSize, nPts, nColors;
+ Guint flag;
+ double x[16], y[16];
+ Guint xi, yi;
+ GfxColorComp c[4][gfxColorMaxComps];
+ Guint ci[4];
+ GfxShadingBitBuf *bitBuf;
+ Object obj1, obj2;
+ int i, j;
+
+ if (dict->lookup("BitsPerCoordinate", &obj1)->isInt()) {
+ coordBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerCoordinate in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ if (dict->lookup("BitsPerComponent", &obj1)->isInt()) {
+ compBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerComponent in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ if (dict->lookup("BitsPerFlag", &obj1)->isInt()) {
+ flagBits = obj1.getInt();
+ } else {
+ error(-1, "Missing or invalid BitsPerFlag in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+ if (dict->lookup("Decode", &obj1)->isArray() &&
+ obj1.arrayGetLength() >= 6) {
+ xMin = obj1.arrayGet(0, &obj2)->getNum();
+ obj2.free();
+ xMax = obj1.arrayGet(1, &obj2)->getNum();
+ obj2.free();
+ xMul = (xMax - xMin) / (pow(2.0, coordBits) - 1);
+ yMin = obj1.arrayGet(2, &obj2)->getNum();
+ obj2.free();
+ yMax = obj1.arrayGet(3, &obj2)->getNum();
+ obj2.free();
+ yMul = (yMax - yMin) / (pow(2.0, coordBits) - 1);
+ for (i = 0; 5 + 2*i < obj1.arrayGetLength() && i < gfxColorMaxComps; ++i) {
+ cMin[i] = obj1.arrayGet(4 + 2*i, &obj2)->getNum();
+ obj2.free();
+ cMax[i] = obj1.arrayGet(5 + 2*i, &obj2)->getNum();
+ obj2.free();
+ cMul[i] = (cMax[i] - cMin[i]) / (double)((1 << compBits) - 1);
+ }
+ nComps = i;
+ } else {
+ error(-1, "Missing or invalid Decode array in shading dictionary");
+ goto err2;
+ }
+ obj1.free();
+
+ if (!dict->lookup("Function", &obj1)->isNull()) {
+ if (obj1.isArray()) {
+ nFuncsA = obj1.arrayGetLength();
+ if (nFuncsA > gfxColorMaxComps) {
+ error(-1, "Invalid Function array in shading dictionary");
+ goto err1;
+ }
+ for (i = 0; i < nFuncsA; ++i) {
+ obj1.arrayGet(i, &obj2);
+ if (!(funcsA[i] = Function::parse(&obj2))) {
+ obj1.free();
+ obj2.free();
+ goto err1;
+ }
+ obj2.free();
+ }
+ } else {
+ nFuncsA = 1;
+ if (!(funcsA[0] = Function::parse(&obj1))) {
+ obj1.free();
+ goto err1;
+ }
+ }
+ } else {
+ nFuncsA = 0;
+ }
+ obj1.free();
+
+ nPatchesA = 0;
+ patchesA = NULL;
+ patchesSize = 0;
+ bitBuf = new GfxShadingBitBuf(str);
+ while (1) {
+ if (!bitBuf->getBits(flagBits, &flag)) {
+ break;
+ }
+ if (typeA == 6) {
+ switch (flag) {
+ case 0: nPts = 12; nColors = 4; break;
+ case 1:
+ case 2:
+ case 3:
+ default: nPts = 8; nColors = 2; break;
+ }
+ } else {
+ switch (flag) {
+ case 0: nPts = 16; nColors = 4; break;
+ case 1:
+ case 2:
+ case 3:
+ default: nPts = 12; nColors = 2; break;
+ }
+ }
+ for (i = 0; i < nPts; ++i) {
+ if (!bitBuf->getBits(coordBits, &xi) ||
+ !bitBuf->getBits(coordBits, &yi)) {
+ break;
+ }
+ x[i] = xMin + xMul * (double)xi;
+ y[i] = yMin + yMul * (double)yi;
+ }
+ if (i < nPts) {
+ break;
+ }
+ for (i = 0; i < nColors; ++i) {
+ for (j = 0; j < nComps; ++j) {
+ if (!bitBuf->getBits(compBits, &ci[j])) {
+ break;
+ }
+ c[i][j] = dblToCol(cMin[j] + cMul[j] * (double)ci[j]);
+ }
+ if (j < nComps) {
+ break;
+ }
+ }
+ if (i < nColors) {
+ break;
+ }
+ if (nPatchesA == patchesSize) {
+ int oldPatchesSize = patchesSize;
+ patchesSize = (patchesSize == 0) ? 16 : 2 * patchesSize;
+ patchesA = (GfxPatch *)greallocn(patchesA,
+ patchesSize, sizeof(GfxPatch));
+ memset(patchesA + oldPatchesSize, 0, (patchesSize - oldPatchesSize) * sizeof(GfxPatch));
+ }
+ p = &patchesA[nPatchesA];
+ if (typeA == 6) {
+ switch (flag) {
+ case 0:
+ p->x[0][0] = x[0];
+ p->y[0][0] = y[0];
+ p->x[0][1] = x[1];
+ p->y[0][1] = y[1];
+ p->x[0][2] = x[2];
+ p->y[0][2] = y[2];
+ p->x[0][3] = x[3];
+ p->y[0][3] = y[3];
+ p->x[1][3] = x[4];
+ p->y[1][3] = y[4];
+ p->x[2][3] = x[5];
+ p->y[2][3] = y[5];
+ p->x[3][3] = x[6];
+ p->y[3][3] = y[6];
+ p->x[3][2] = x[7];
+ p->y[3][2] = y[7];
+ p->x[3][1] = x[8];
+ p->y[3][1] = y[8];
+ p->x[3][0] = x[9];
+ p->y[3][0] = y[9];
+ p->x[2][0] = x[10];
+ p->y[2][0] = y[10];
+ p->x[1][0] = x[11];
+ p->y[1][0] = y[11];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = c[0][j];
+ p->color[0][1].c[j] = c[1][j];
+ p->color[1][1].c[j] = c[2][j];
+ p->color[1][0].c[j] = c[3][j];
+ }
+ break;
+ case 1:
+ p->x[0][0] = patchesA[nPatchesA-1].x[0][3];
+ p->y[0][0] = patchesA[nPatchesA-1].y[0][3];
+ p->x[0][1] = patchesA[nPatchesA-1].x[1][3];
+ p->y[0][1] = patchesA[nPatchesA-1].y[1][3];
+ p->x[0][2] = patchesA[nPatchesA-1].x[2][3];
+ p->y[0][2] = patchesA[nPatchesA-1].y[2][3];
+ p->x[0][3] = patchesA[nPatchesA-1].x[3][3];
+ p->y[0][3] = patchesA[nPatchesA-1].y[3][3];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = patchesA[nPatchesA-1].color[0][1].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][1].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ case 2:
+ p->x[0][0] = patchesA[nPatchesA-1].x[3][3];
+ p->y[0][0] = patchesA[nPatchesA-1].y[3][3];
+ p->x[0][1] = patchesA[nPatchesA-1].x[3][2];
+ p->y[0][1] = patchesA[nPatchesA-1].y[3][2];
+ p->x[0][2] = patchesA[nPatchesA-1].x[3][1];
+ p->y[0][2] = patchesA[nPatchesA-1].y[3][1];
+ p->x[0][3] = patchesA[nPatchesA-1].x[3][0];
+ p->y[0][3] = patchesA[nPatchesA-1].y[3][0];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][1].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ case 3:
+ p->x[0][0] = patchesA[nPatchesA-1].x[3][0];
+ p->y[0][0] = patchesA[nPatchesA-1].y[3][0];
+ p->x[0][1] = patchesA[nPatchesA-1].x[2][0];
+ p->y[0][1] = patchesA[nPatchesA-1].y[2][0];
+ p->x[0][2] = patchesA[nPatchesA-1].x[1][0];
+ p->y[0][2] = patchesA[nPatchesA-1].y[1][0];
+ p->x[0][3] = patchesA[nPatchesA-1].x[0][0];
+ p->y[0][3] = patchesA[nPatchesA-1].y[0][0];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ }
+ } else {
+ switch (flag) {
+ case 0:
+ p->x[0][0] = x[0];
+ p->y[0][0] = y[0];
+ p->x[0][1] = x[1];
+ p->y[0][1] = y[1];
+ p->x[0][2] = x[2];
+ p->y[0][2] = y[2];
+ p->x[0][3] = x[3];
+ p->y[0][3] = y[3];
+ p->x[1][3] = x[4];
+ p->y[1][3] = y[4];
+ p->x[2][3] = x[5];
+ p->y[2][3] = y[5];
+ p->x[3][3] = x[6];
+ p->y[3][3] = y[6];
+ p->x[3][2] = x[7];
+ p->y[3][2] = y[7];
+ p->x[3][1] = x[8];
+ p->y[3][1] = y[8];
+ p->x[3][0] = x[9];
+ p->y[3][0] = y[9];
+ p->x[2][0] = x[10];
+ p->y[2][0] = y[10];
+ p->x[1][0] = x[11];
+ p->y[1][0] = y[11];
+ p->x[1][1] = x[12];
+ p->y[1][1] = y[12];
+ p->x[1][2] = x[13];
+ p->y[1][2] = y[13];
+ p->x[2][2] = x[14];
+ p->y[2][2] = y[14];
+ p->x[2][1] = x[15];
+ p->y[2][1] = y[15];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = c[0][j];
+ p->color[0][1].c[j] = c[1][j];
+ p->color[1][1].c[j] = c[2][j];
+ p->color[1][0].c[j] = c[3][j];
+ }
+ break;
+ case 1:
+ p->x[0][0] = patchesA[nPatchesA-1].x[0][3];
+ p->y[0][0] = patchesA[nPatchesA-1].y[0][3];
+ p->x[0][1] = patchesA[nPatchesA-1].x[1][3];
+ p->y[0][1] = patchesA[nPatchesA-1].y[1][3];
+ p->x[0][2] = patchesA[nPatchesA-1].x[2][3];
+ p->y[0][2] = patchesA[nPatchesA-1].y[2][3];
+ p->x[0][3] = patchesA[nPatchesA-1].x[3][3];
+ p->y[0][3] = patchesA[nPatchesA-1].y[3][3];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ p->x[1][1] = x[8];
+ p->y[1][1] = y[8];
+ p->x[1][2] = x[9];
+ p->y[1][2] = y[9];
+ p->x[2][2] = x[10];
+ p->y[2][2] = y[10];
+ p->x[2][1] = x[11];
+ p->y[2][1] = y[11];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = patchesA[nPatchesA-1].color[0][1].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][1].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ case 2:
+ p->x[0][0] = patchesA[nPatchesA-1].x[3][3];
+ p->y[0][0] = patchesA[nPatchesA-1].y[3][3];
+ p->x[0][1] = patchesA[nPatchesA-1].x[3][2];
+ p->y[0][1] = patchesA[nPatchesA-1].y[3][2];
+ p->x[0][2] = patchesA[nPatchesA-1].x[3][1];
+ p->y[0][2] = patchesA[nPatchesA-1].y[3][1];
+ p->x[0][3] = patchesA[nPatchesA-1].x[3][0];
+ p->y[0][3] = patchesA[nPatchesA-1].y[3][0];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ p->x[1][1] = x[8];
+ p->y[1][1] = y[8];
+ p->x[1][2] = x[9];
+ p->y[1][2] = y[9];
+ p->x[2][2] = x[10];
+ p->y[2][2] = y[10];
+ p->x[2][1] = x[11];
+ p->y[2][1] = y[11];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][1].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ case 3:
+ p->x[0][0] = patchesA[nPatchesA-1].x[3][0];
+ p->y[0][0] = patchesA[nPatchesA-1].y[3][0];
+ p->x[0][1] = patchesA[nPatchesA-1].x[2][0];
+ p->y[0][1] = patchesA[nPatchesA-1].y[2][0];
+ p->x[0][2] = patchesA[nPatchesA-1].x[1][0];
+ p->y[0][2] = patchesA[nPatchesA-1].y[1][0];
+ p->x[0][3] = patchesA[nPatchesA-1].x[0][0];
+ p->y[0][3] = patchesA[nPatchesA-1].y[0][0];
+ p->x[1][3] = x[0];
+ p->y[1][3] = y[0];
+ p->x[2][3] = x[1];
+ p->y[2][3] = y[1];
+ p->x[3][3] = x[2];
+ p->y[3][3] = y[2];
+ p->x[3][2] = x[3];
+ p->y[3][2] = y[3];
+ p->x[3][1] = x[4];
+ p->y[3][1] = y[4];
+ p->x[3][0] = x[5];
+ p->y[3][0] = y[5];
+ p->x[2][0] = x[6];
+ p->y[2][0] = y[6];
+ p->x[1][0] = x[7];
+ p->y[1][0] = y[7];
+ p->x[1][1] = x[8];
+ p->y[1][1] = y[8];
+ p->x[1][2] = x[9];
+ p->y[1][2] = y[9];
+ p->x[2][2] = x[10];
+ p->y[2][2] = y[10];
+ p->x[2][1] = x[11];
+ p->y[2][1] = y[11];
+ for (j = 0; j < nComps; ++j) {
+ p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
+ p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j];
+ p->color[1][1].c[j] = c[0][j];
+ p->color[1][0].c[j] = c[1][j];
+ }
+ break;
+ }
+ }
+ ++nPatchesA;
+ bitBuf->flushBits();
+ }
+ delete bitBuf;
+
+ if (typeA == 6) {
+ for (i = 0; i < nPatchesA; ++i) {
+ p = &patchesA[i];
+ p->x[1][1] = (-4 * p->x[0][0]
+ +6 * (p->x[0][1] + p->x[1][0])
+ -2 * (p->x[0][3] + p->x[3][0])
+ +3 * (p->x[3][1] + p->x[1][3])
+ - p->x[3][3]) / 9;
+ p->y[1][1] = (-4 * p->y[0][0]
+ +6 * (p->y[0][1] + p->y[1][0])
+ -2 * (p->y[0][3] + p->y[3][0])
+ +3 * (p->y[3][1] + p->y[1][3])
+ - p->y[3][3]) / 9;
+ p->x[1][2] = (-4 * p->x[0][3]
+ +6 * (p->x[0][2] + p->x[1][3])
+ -2 * (p->x[0][0] + p->x[3][3])
+ +3 * (p->x[3][2] + p->x[1][0])
+ - p->x[3][0]) / 9;
+ p->y[1][2] = (-4 * p->y[0][3]
+ +6 * (p->y[0][2] + p->y[1][3])
+ -2 * (p->y[0][0] + p->y[3][3])
+ +3 * (p->y[3][2] + p->y[1][0])
+ - p->y[3][0]) / 9;
+ p->x[2][1] = (-4 * p->x[3][0]
+ +6 * (p->x[3][1] + p->x[2][0])
+ -2 * (p->x[3][3] + p->x[0][0])
+ +3 * (p->x[0][1] + p->x[2][3])
+ - p->x[0][3]) / 9;
+ p->y[2][1] = (-4 * p->y[3][0]
+ +6 * (p->y[3][1] + p->y[2][0])
+ -2 * (p->y[3][3] + p->y[0][0])
+ +3 * (p->y[0][1] + p->y[2][3])
+ - p->y[0][3]) / 9;
+ p->x[2][2] = (-4 * p->x[3][3]
+ +6 * (p->x[3][2] + p->x[2][3])
+ -2 * (p->x[3][0] + p->x[0][3])
+ +3 * (p->x[0][2] + p->x[2][0])
+ - p->x[0][0]) / 9;
+ p->y[2][2] = (-4 * p->y[3][3]
+ +6 * (p->y[3][2] + p->y[2][3])
+ -2 * (p->y[3][0] + p->y[0][3])
+ +3 * (p->y[0][2] + p->y[2][0])
+ - p->y[0][0]) / 9;
+ }
+ }
+
+ shading = new GfxPatchMeshShading(typeA, patchesA, nPatchesA,
+ funcsA, nFuncsA);
+ if (!shading->init(dict, gfx)) {
+ delete shading;
+ return NULL;
+ }
+ return shading;
+
+ err2:
+ obj1.free();
+ err1:
+ return NULL;
+}
+
+GfxShading *GfxPatchMeshShading::copy() {
+ return new GfxPatchMeshShading(this);
+}
+
+//------------------------------------------------------------------------
+// GfxImageColorMap
+//------------------------------------------------------------------------
+
+GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
+ GfxColorSpace *colorSpaceA) {
+ GfxIndexedColorSpace *indexedCS;
+ GfxSeparationColorSpace *sepCS;
+ int maxPixel, indexHigh;
+ Guchar *lookup2;
+ Function *sepFunc;
+ Object obj;
+ double x[gfxColorMaxComps];
+ double y[gfxColorMaxComps];
+ int i, j, k;
+ double mapped;
+ GBool useByteLookup;
+
+ ok = gTrue;
+
+ // bits per component and color space
+ bits = bitsA;
+ maxPixel = (1 << bits) - 1;
+ colorSpace = colorSpaceA;
+
+ // this is a hack to support 16 bits images, everywhere
+ // we assume a component fits in 8 bits, with this hack
+ // we treat 16 bit images as 8 bit ones until it's fixed correctly.
+ // The hack has another part on ImageStream::getLine
+ if (maxPixel > 255) maxPixel = 255;
+
+ // initialize
+ for (k = 0; k < gfxColorMaxComps; ++k) {
+ lookup[k] = NULL;
+ }
+ byte_lookup = NULL;
+
+ // get decode map
+ if (decode->isNull()) {
+ nComps = colorSpace->getNComps();
+ colorSpace->getDefaultRanges(decodeLow, decodeRange, maxPixel);
+ } else if (decode->isArray()) {
+ nComps = decode->arrayGetLength() / 2;
+ if (nComps != colorSpace->getNComps()) {
+ goto err1;
+ }
+ for (i = 0; i < nComps; ++i) {
+ decode->arrayGet(2*i, &obj);
+ if (!obj.isNum()) {
+ goto err2;
+ }
+ decodeLow[i] = obj.getNum();
+ obj.free();
+ decode->arrayGet(2*i+1, &obj);
+ if (!obj.isNum()) {
+ goto err2;
+ }
+ decodeRange[i] = obj.getNum() - decodeLow[i];
+ obj.free();
+ }
+ } else {
+ goto err1;
+ }
+
+ // Construct a lookup table -- this stores pre-computed decoded
+ // values for each component, i.e., the result of applying the
+ // decode mapping to each possible image pixel component value.
+ //
+ // Optimization: for Indexed and Separation color spaces (which have
+ // only one component), we store color values in the lookup table
+ // rather than component values.
+ colorSpace2 = NULL;
+ nComps2 = 0;
+ useByteLookup = gFalse;
+ switch (colorSpace->getMode()) {
+ case csIndexed:
+ // Note that indexHigh may not be the same as maxPixel --
+ // Distiller will remove unused palette entries, resulting in
+ // indexHigh < maxPixel.
+ indexedCS = (GfxIndexedColorSpace *)colorSpace;
+ colorSpace2 = indexedCS->getBase();
+ indexHigh = indexedCS->getIndexHigh();
+ nComps2 = colorSpace2->getNComps();
+ lookup2 = indexedCS->getLookup();
+ colorSpace2->getDefaultRanges(x, y, indexHigh);
+ if (colorSpace2->useGetGrayLine() || colorSpace2->useGetRGBLine()) {
+ byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps2);
+ useByteLookup = gTrue;
+ }
+ for (k = 0; k < nComps2; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1,
+ sizeof(GfxColorComp));
+ for (i = 0; i <= maxPixel; ++i) {
+ j = (int)(decodeLow[0] + (i * decodeRange[0]) / maxPixel + 0.5);
+ if (j < 0) {
+ j = 0;
+ } else if (j > indexHigh) {
+ j = indexHigh;
+ }
+
+ mapped = x[k] + (lookup2[j*nComps2 + k] / 255.0) * y[k];
+ lookup[k][i] = dblToCol(mapped);
+ if (useByteLookup)
+ byte_lookup[i * nComps2 + k] = (Guchar) (mapped * 255);
+ }
+ }
+ break;
+ case csSeparation:
+ sepCS = (GfxSeparationColorSpace *)colorSpace;
+ colorSpace2 = sepCS->getAlt();
+ nComps2 = colorSpace2->getNComps();
+ sepFunc = sepCS->getFunc();
+ if (colorSpace2->useGetGrayLine() || colorSpace2->useGetRGBLine()) {
+ byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps2);
+ useByteLookup = gTrue;
+ }
+ for (k = 0; k < nComps2; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1,
+ sizeof(GfxColorComp));
+ for (i = 0; i <= maxPixel; ++i) {
+ x[0] = decodeLow[0] + (i * decodeRange[0]) / maxPixel;
+ sepFunc->transform(x, y);
+ lookup[k][i] = dblToCol(y[k]);
+ if (useByteLookup)
+ byte_lookup[i*nComps2 + k] = (Guchar) (y[k] * 255);
+ }
+ }
+ break;
+ default:
+ if (colorSpace->useGetGrayLine() || colorSpace->useGetRGBLine()) {
+ byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps);
+ useByteLookup = gTrue;
+ }
+ for (k = 0; k < nComps; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1,
+ sizeof(GfxColorComp));
+ for (i = 0; i <= maxPixel; ++i) {
+ mapped = decodeLow[k] + (i * decodeRange[k]) / maxPixel;
+ lookup[k][i] = dblToCol(mapped);
+ if (useByteLookup) {
+ int byte;
+
+ byte = (int) (mapped * 255.0 + 0.5);
+ if (byte < 0)
+ byte = 0;
+ else if (byte > 255)
+ byte = 255;
+ byte_lookup[i * nComps + k] = byte;
+ }
+ }
+ }
+ }
+
+ return;
+
+ err2:
+ obj.free();
+ err1:
+ ok = gFalse;
+}
+
+GfxImageColorMap::GfxImageColorMap(GfxImageColorMap *colorMap) {
+ int n, i, k;
+
+ colorSpace = colorMap->colorSpace->copy();
+ bits = colorMap->bits;
+ nComps = colorMap->nComps;
+ nComps2 = colorMap->nComps2;
+ colorSpace2 = NULL;
+ for (k = 0; k < gfxColorMaxComps; ++k) {
+ lookup[k] = NULL;
+ }
+ n = 1 << bits;
+ if (colorSpace->getMode() == csIndexed) {
+ colorSpace2 = ((GfxIndexedColorSpace *)colorSpace)->getBase();
+ for (k = 0; k < nComps2; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
+ memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
+ }
+ } else if (colorSpace->getMode() == csSeparation) {
+ colorSpace2 = ((GfxSeparationColorSpace *)colorSpace)->getAlt();
+ for (k = 0; k < nComps2; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
+ memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
+ }
+ } else {
+ for (k = 0; k < nComps; ++k) {
+ lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp));
+ memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp));
+ }
+ }
+ if (colorMap->byte_lookup) {
+ int nc = colorSpace2 ? nComps2 : nComps;
+
+ byte_lookup = (Guchar *)gmallocn (n, nc);
+ memcpy(byte_lookup, colorMap->byte_lookup, n * nc);
+ }
+ for (i = 0; i < nComps; ++i) {
+ decodeLow[i] = colorMap->decodeLow[i];
+ decodeRange[i] = colorMap->decodeRange[i];
+ }
+ ok = gTrue;
+}
+
+GfxImageColorMap::~GfxImageColorMap() {
+ int i;
+
+ delete colorSpace;
+ for (i = 0; i < gfxColorMaxComps; ++i) {
+ gfree(lookup[i]);
+ }
+ gfree(byte_lookup);
+}
+
+void GfxImageColorMap::getGray(Guchar *x, GfxGray *gray) {
+ GfxColor color;
+ int i;
+
+ if (colorSpace2) {
+ for (i = 0; i < nComps2; ++i) {
+ color.c[i] = lookup[i][x[0]];
+ }
+ colorSpace2->getGray(&color, gray);
+ } else {
+ for (i = 0; i < nComps; ++i) {
+ color.c[i] = lookup[i][x[i]];
+ }
+ colorSpace->getGray(&color, gray);
+ }
+}
+
+void GfxImageColorMap::getRGB(Guchar *x, GfxRGB *rgb) {
+ GfxColor color;
+ int i;
+
+ if (colorSpace2) {
+ for (i = 0; i < nComps2; ++i) {
+ color.c[i] = lookup[i][x[0]];
+ }
+ colorSpace2->getRGB(&color, rgb);
+ } else {
+ for (i = 0; i < nComps; ++i) {
+ color.c[i] = lookup[i][x[i]];
+ }
+ colorSpace->getRGB(&color, rgb);
+ }
+}
+
+void GfxImageColorMap::getGrayLine(Guchar *in, Guchar *out, int length) {
+ int i, j;
+ Guchar *inp, *tmp_line;
+
+ if ((colorSpace2 && !colorSpace2->useGetGrayLine ()) ||
+ (!colorSpace2 && !colorSpace->useGetGrayLine ())) {
+ GfxGray gray;
+
+ inp = in;
+ for (i = 0; i < length; i++) {
+ getGray (inp, &gray);
+ out[i] = colToByte(gray);
+ inp += nComps;
+ }
+ return;
+ }
+
+ switch (colorSpace->getMode()) {
+ case csIndexed:
+ case csSeparation:
+ tmp_line = (Guchar *) gmallocn (length, nComps2);
+ for (i = 0; i < length; i++) {
+ for (j = 0; j < nComps2; j++) {
+ tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j];
+ }
+ }
+ colorSpace2->getGrayLine(tmp_line, out, length);
+ gfree (tmp_line);
+ break;
+
+ default:
+ inp = in;
+ for (j = 0; j < length; j++)
+ for (i = 0; i < nComps; i++) {
+ *inp = byte_lookup[*inp * nComps + i];
+ inp++;
+ }
+ colorSpace->getGrayLine(in, out, length);
+ break;
+ }
+
+}
+
+void GfxImageColorMap::getRGBLine(Guchar *in, unsigned int *out, int length) {
+ int i, j;
+ Guchar *inp, *tmp_line;
+
+ if ((colorSpace2 && !colorSpace2->useGetRGBLine ()) ||
+ (!colorSpace2 && !colorSpace->useGetRGBLine ())) {
+ GfxRGB rgb;
+
+ inp = in;
+ for (i = 0; i < length; i++) {
+ getRGB (inp, &rgb);
+ out[i] =
+ ((int) colToByte(rgb.r) << 16) |
+ ((int) colToByte(rgb.g) << 8) |
+ ((int) colToByte(rgb.b) << 0);
+ inp += nComps;
+ }
+ return;
+ }
+
+ switch (colorSpace->getMode()) {
+ case csIndexed:
+ case csSeparation:
+ tmp_line = (Guchar *) gmallocn (length, nComps2);
+ for (i = 0; i < length; i++) {
+ for (j = 0; j < nComps2; j++) {
+ tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j];
+ }
+ }
+ colorSpace2->getRGBLine(tmp_line, out, length);
+ gfree (tmp_line);
+ break;
+
+ default:
+ inp = in;
+ for (j = 0; j < length; j++)
+ for (i = 0; i < nComps; i++) {
+ *inp = byte_lookup[*inp * nComps + i];
+ inp++;
+ }
+ colorSpace->getRGBLine(in, out, length);
+ break;
+ }
+
+}
+
+void GfxImageColorMap::getCMYK(Guchar *x, GfxCMYK *cmyk) {
+ GfxColor color;
+ int i;
+
+ if (colorSpace2) {
+ for (i = 0; i < nComps2; ++i) {
+ color.c[i] = lookup[i][x[0]];
+ }
+ colorSpace2->getCMYK(&color, cmyk);
+ } else {
+ for (i = 0; i < nComps; ++i) {
+ color.c[i] = lookup[i][x[i]];
+ }
+ colorSpace->getCMYK(&color, cmyk);
+ }
+}
+
+void GfxImageColorMap::getColor(Guchar *x, GfxColor *color) {
+ int maxPixel, i;
+
+ maxPixel = (1 << bits) - 1;
+ for (i = 0; i < nComps; ++i) {
+ color->c[i] = dblToCol(decodeLow[i] + (x[i] * decodeRange[i]) / maxPixel);
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxSubpath and GfxPath
+//------------------------------------------------------------------------
+
+GfxSubpath::GfxSubpath(double x1, double y1) {
+ size = 16;
+ x = (double *)gmallocn(size, sizeof(double));
+ y = (double *)gmallocn(size, sizeof(double));
+ curve = (GBool *)gmallocn(size, sizeof(GBool));
+ n = 1;
+ x[0] = x1;
+ y[0] = y1;
+ curve[0] = gFalse;
+ closed = gFalse;
+}
+
+GfxSubpath::~GfxSubpath() {
+ gfree(x);
+ gfree(y);
+ gfree(curve);
+}
+
+// Used for copy().
+GfxSubpath::GfxSubpath(GfxSubpath *subpath) {
+ size = subpath->size;
+ n = subpath->n;
+ x = (double *)gmallocn(size, sizeof(double));
+ y = (double *)gmallocn(size, sizeof(double));
+ curve = (GBool *)gmallocn(size, sizeof(GBool));
+ memcpy(x, subpath->x, n * sizeof(double));
+ memcpy(y, subpath->y, n * sizeof(double));
+ memcpy(curve, subpath->curve, n * sizeof(GBool));
+ closed = subpath->closed;
+}
+
+void GfxSubpath::lineTo(double x1, double y1) {
+ if (n >= size) {
+ size += 16;
+ x = (double *)greallocn(x, size, sizeof(double));
+ y = (double *)greallocn(y, size, sizeof(double));
+ curve = (GBool *)greallocn(curve, size, sizeof(GBool));
+ }
+ x[n] = x1;
+ y[n] = y1;
+ curve[n] = gFalse;
+ ++n;
+}
+
+void GfxSubpath::curveTo(double x1, double y1, double x2, double y2,
+ double x3, double y3) {
+ if (n+3 > size) {
+ size += 16;
+ x = (double *)greallocn(x, size, sizeof(double));
+ y = (double *)greallocn(y, size, sizeof(double));
+ curve = (GBool *)greallocn(curve, size, sizeof(GBool));
+ }
+ x[n] = x1;
+ y[n] = y1;
+ x[n+1] = x2;
+ y[n+1] = y2;
+ x[n+2] = x3;
+ y[n+2] = y3;
+ curve[n] = curve[n+1] = gTrue;
+ curve[n+2] = gFalse;
+ n += 3;
+}
+
+void GfxSubpath::close() {
+ if (x[n-1] != x[0] || y[n-1] != y[0]) {
+ lineTo(x[0], y[0]);
+ }
+ closed = gTrue;
+}
+
+void GfxSubpath::offset(double dx, double dy) {
+ int i;
+
+ for (i = 0; i < n; ++i) {
+ x[i] += dx;
+ y[i] += dy;
+ }
+}
+
+GfxPath::GfxPath() {
+ justMoved = gFalse;
+ size = 16;
+ n = 0;
+ firstX = firstY = 0;
+ subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *));
+}
+
+GfxPath::~GfxPath() {
+ int i;
+
+ for (i = 0; i < n; ++i)
+ delete subpaths[i];
+ gfree(subpaths);
+}
+
+// Used for copy().
+GfxPath::GfxPath(GBool justMoved1, double firstX1, double firstY1,
+ GfxSubpath **subpaths1, int n1, int size1) {
+ int i;
+
+ justMoved = justMoved1;
+ firstX = firstX1;
+ firstY = firstY1;
+ size = size1;
+ n = n1;
+ subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *));
+ for (i = 0; i < n; ++i)
+ subpaths[i] = subpaths1[i]->copy();
+}
+
+void GfxPath::moveTo(double x, double y) {
+ justMoved = gTrue;
+ firstX = x;
+ firstY = y;
+}
+
+void GfxPath::lineTo(double x, double y) {
+ if (justMoved) {
+ if (n >= size) {
+ size += 16;
+ subpaths = (GfxSubpath **)
+ greallocn(subpaths, size, sizeof(GfxSubpath *));
+ }
+ subpaths[n] = new GfxSubpath(firstX, firstY);
+ ++n;
+ justMoved = gFalse;
+ }
+ subpaths[n-1]->lineTo(x, y);
+}
+
+void GfxPath::curveTo(double x1, double y1, double x2, double y2,
+ double x3, double y3) {
+ if (justMoved) {
+ if (n >= size) {
+ size += 16;
+ subpaths = (GfxSubpath **)
+ greallocn(subpaths, size, sizeof(GfxSubpath *));
+ }
+ subpaths[n] = new GfxSubpath(firstX, firstY);
+ ++n;
+ justMoved = gFalse;
+ }
+ subpaths[n-1]->curveTo(x1, y1, x2, y2, x3, y3);
+}
+
+void GfxPath::close() {
+ // this is necessary to handle the pathological case of
+ // moveto/closepath/clip, which defines an empty clipping region
+ if (justMoved) {
+ if (n >= size) {
+ size += 16;
+ subpaths = (GfxSubpath **)
+ greallocn(subpaths, size, sizeof(GfxSubpath *));
+ }
+ subpaths[n] = new GfxSubpath(firstX, firstY);
+ ++n;
+ justMoved = gFalse;
+ }
+ subpaths[n-1]->close();
+}
+
+void GfxPath::append(GfxPath *path) {
+ int i;
+
+ if (n + path->n > size) {
+ size = n + path->n;
+ subpaths = (GfxSubpath **)
+ greallocn(subpaths, size, sizeof(GfxSubpath *));
+ }
+ for (i = 0; i < path->n; ++i) {
+ subpaths[n++] = path->subpaths[i]->copy();
+ }
+ justMoved = gFalse;
+}
+
+void GfxPath::offset(double dx, double dy) {
+ int i;
+
+ for (i = 0; i < n; ++i) {
+ subpaths[i]->offset(dx, dy);
+ }
+}
+
+//------------------------------------------------------------------------
+// GfxState
+//------------------------------------------------------------------------
+
+GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
+ int rotateA, GBool upsideDown) {
+ double kx, ky;
+
+ hDPI = hDPIA;
+ vDPI = vDPIA;
+ rotate = rotateA;
+ px1 = pageBox->x1;
+ py1 = pageBox->y1;
+ px2 = pageBox->x2;
+ py2 = pageBox->y2;
+ kx = hDPI / 72.0;
+ ky = vDPI / 72.0;
+ if (rotate == 90) {
+ ctm[0] = 0;
+ ctm[1] = upsideDown ? ky : -ky;
+ ctm[2] = kx;
+ ctm[3] = 0;
+ ctm[4] = -kx * py1;
+ ctm[5] = ky * (upsideDown ? -px1 : px2);
+ pageWidth = kx * (py2 - py1);
+ pageHeight = ky * (px2 - px1);
+ } else if (rotate == 180) {
+ ctm[0] = -kx;
+ ctm[1] = 0;
+ ctm[2] = 0;
+ ctm[3] = upsideDown ? ky : -ky;
+ ctm[4] = kx * px2;
+ ctm[5] = ky * (upsideDown ? -py1 : py2);
+ pageWidth = kx * (px2 - px1);
+ pageHeight = ky * (py2 - py1);
+ } else if (rotate == 270) {
+ ctm[0] = 0;
+ ctm[1] = upsideDown ? -ky : ky;
+ ctm[2] = -kx;
+ ctm[3] = 0;
+ ctm[4] = kx * py2;
+ ctm[5] = ky * (upsideDown ? px2 : -px1);
+ pageWidth = kx * (py2 - py1);
+ pageHeight = ky * (px2 - px1);
+ } else {
+ ctm[0] = kx;
+ ctm[1] = 0;
+ ctm[2] = 0;
+ ctm[3] = upsideDown ? -ky : ky;
+ ctm[4] = -kx * px1;
+ ctm[5] = ky * (upsideDown ? py2 : -py1);
+ pageWidth = kx * (px2 - px1);
+ pageHeight = ky * (py2 - py1);
+ }
+
+ fillColorSpace = new GfxDeviceGrayColorSpace();
+ strokeColorSpace = new GfxDeviceGrayColorSpace();
+ fillColor.c[0] = 0;
+ strokeColor.c[0] = 0;
+ fillPattern = NULL;
+ strokePattern = NULL;
+ blendMode = gfxBlendNormal;
+ fillOpacity = 1;
+ strokeOpacity = 1;
+ fillOverprint = gFalse;
+ strokeOverprint = gFalse;
+ transfer[0] = transfer[1] = transfer[2] = transfer[3] = NULL;
+
+ lineWidth = 1;
+ lineDash = NULL;
+ lineDashLength = 0;
+ lineDashStart = 0;
+ flatness = 1;
+ lineJoin = 0;
+ lineCap = 0;
+ miterLimit = 10;
+ strokeAdjust = gFalse;
+
+ font = NULL;
+ fontSize = 0;
+ textMat[0] = 1; textMat[1] = 0;
+ textMat[2] = 0; textMat[3] = 1;
+ textMat[4] = 0; textMat[5] = 0;
+ charSpace = 0;
+ wordSpace = 0;
+ horizScaling = 1;
+ leading = 0;
+ rise = 0;
+ render = 0;
+
+ path = new GfxPath();
+ curX = curY = 0;
+ lineX = lineY = 0;
+
+ clipXMin = 0;
+ clipYMin = 0;
+ clipXMax = pageWidth;
+ clipYMax = pageHeight;
+
+ saved = NULL;
+#ifdef USE_CMS
+ GfxColorSpace::setupColorProfiles();
+#endif
+}
+
+GfxState::~GfxState() {
+ int i;
+
+ if (fillColorSpace) {
+ delete fillColorSpace;
+ }
+ if (strokeColorSpace) {
+ delete strokeColorSpace;
+ }
+ if (fillPattern) {
+ delete fillPattern;
+ }
+ if (strokePattern) {
+ delete strokePattern;
+ }
+ for (i = 0; i < 4; ++i) {
+ if (transfer[i]) {
+ delete transfer[i];
+ }
+ }
+ gfree(lineDash);
+ if (path) {
+ // this gets set to NULL by restore()
+ delete path;
+ }
+ if (saved) {
+ delete saved;
+ }
+ if (font) {
+ font->decRefCnt();
+ }
+}
+
+// Used for copy();
+GfxState::GfxState(GfxState *state) {
+ int i;
+
+ memcpy(this, state, sizeof(GfxState));
+ if (fillColorSpace) {
+ fillColorSpace = state->fillColorSpace->copy();
+ }
+ if (strokeColorSpace) {
+ strokeColorSpace = state->strokeColorSpace->copy();
+ }
+ if (fillPattern) {
+ fillPattern = state->fillPattern->copy();
+ }
+ if (strokePattern) {
+ strokePattern = state->strokePattern->copy();
+ }
+ for (i = 0; i < 4; ++i) {
+ if (transfer[i]) {
+ transfer[i] = state->transfer[i]->copy();
+ }
+ }
+ if (lineDashLength > 0) {
+ lineDash = (double *)gmallocn(lineDashLength, sizeof(double));
+ memcpy(lineDash, state->lineDash, lineDashLength * sizeof(double));
+ }
+ if (font)
+ font->incRefCnt();
+
+ saved = NULL;
+}
+
+void GfxState::setPath(GfxPath *pathA) {
+ delete path;
+ path = pathA;
+}
+
+void GfxState::getUserClipBBox(double *xMin, double *yMin,
+ double *xMax, double *yMax) {
+ double ictm[6];
+ double xMin1, yMin1, xMax1, yMax1, det, tx, ty;
+
+ // invert the CTM
+ det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]);
+ ictm[0] = ctm[3] * det;
+ ictm[1] = -ctm[1] * det;
+ ictm[2] = -ctm[2] * det;
+ ictm[3] = ctm[0] * det;
+ ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det;
+ ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det;
+
+ // transform all four corners of the clip bbox; find the min and max
+ // x and y values
+ xMin1 = xMax1 = clipXMin * ictm[0] + clipYMin * ictm[2] + ictm[4];
+ yMin1 = yMax1 = clipXMin * ictm[1] + clipYMin * ictm[3] + ictm[5];
+ tx = clipXMin * ictm[0] + clipYMax * ictm[2] + ictm[4];
+ ty = clipXMin * ictm[1] + clipYMax * ictm[3] + ictm[5];
+ if (tx < xMin1) {
+ xMin1 = tx;
+ } else if (tx > xMax1) {
+ xMax1 = tx;
+ }
+ if (ty < yMin1) {
+ yMin1 = ty;
+ } else if (ty > yMax1) {
+ yMax1 = ty;
+ }
+ tx = clipXMax * ictm[0] + clipYMin * ictm[2] + ictm[4];
+ ty = clipXMax * ictm[1] + clipYMin * ictm[3] + ictm[5];
+ if (tx < xMin1) {
+ xMin1 = tx;
+ } else if (tx > xMax1) {
+ xMax1 = tx;
+ }
+ if (ty < yMin1) {
+ yMin1 = ty;
+ } else if (ty > yMax1) {
+ yMax1 = ty;
+ }
+ tx = clipXMax * ictm[0] + clipYMax * ictm[2] + ictm[4];
+ ty = clipXMax * ictm[1] + clipYMax * ictm[3] + ictm[5];
+ if (tx < xMin1) {
+ xMin1 = tx;
+ } else if (tx > xMax1) {
+ xMax1 = tx;
+ }
+ if (ty < yMin1) {
+ yMin1 = ty;
+ } else if (ty > yMax1) {
+ yMax1 = ty;
+ }
+
+ *xMin = xMin1;
+ *yMin = yMin1;
+ *xMax = xMax1;
+ *yMax = yMax1;
+}
+
+double GfxState::transformWidth(double w) {
+ double x, y;
+
+ x = ctm[0] + ctm[2];
+ y = ctm[1] + ctm[3];
+ return w * sqrt(0.5 * (x * x + y * y));
+}
+
+double GfxState::getTransformedFontSize() {
+ double x1, y1, x2, y2;
+
+ x1 = textMat[2] * fontSize;
+ y1 = textMat[3] * fontSize;
+ x2 = ctm[0] * x1 + ctm[2] * y1;
+ y2 = ctm[1] * x1 + ctm[3] * y1;
+ return sqrt(x2 * x2 + y2 * y2);
+}
+
+void GfxState::getFontTransMat(double *m11, double *m12,
+ double *m21, double *m22) {
+ *m11 = (textMat[0] * ctm[0] + textMat[1] * ctm[2]) * fontSize;
+ *m12 = (textMat[0] * ctm[1] + textMat[1] * ctm[3]) * fontSize;
+ *m21 = (textMat[2] * ctm[0] + textMat[3] * ctm[2]) * fontSize;
+ *m22 = (textMat[2] * ctm[1] + textMat[3] * ctm[3]) * fontSize;
+}
+
+void GfxState::setCTM(double a, double b, double c,
+ double d, double e, double f) {
+ int i;
+
+ ctm[0] = a;
+ ctm[1] = b;
+ ctm[2] = c;
+ ctm[3] = d;
+ ctm[4] = e;
+ ctm[5] = f;
+
+ // avoid FP exceptions on badly messed up PDF files
+ for (i = 0; i < 6; ++i) {
+ if (ctm[i] > 1e10) {
+ ctm[i] = 1e10;
+ } else if (ctm[i] < -1e10) {
+ ctm[i] = -1e10;
+ }
+ }
+}
+
+void GfxState::concatCTM(double a, double b, double c,
+ double d, double e, double f) {
+ double a1 = ctm[0];
+ double b1 = ctm[1];
+ double c1 = ctm[2];
+ double d1 = ctm[3];
+ int i;
+
+ ctm[0] = a * a1 + b * c1;
+ ctm[1] = a * b1 + b * d1;
+ ctm[2] = c * a1 + d * c1;
+ ctm[3] = c * b1 + d * d1;
+ ctm[4] = e * a1 + f * c1 + ctm[4];
+ ctm[5] = e * b1 + f * d1 + ctm[5];
+
+ // avoid FP exceptions on badly messed up PDF files
+ for (i = 0; i < 6; ++i) {
+ if (ctm[i] > 1e10) {
+ ctm[i] = 1e10;
+ } else if (ctm[i] < -1e10) {
+ ctm[i] = -1e10;
+ }
+ }
+}
+
+void GfxState::shiftCTM(double tx, double ty) {
+ ctm[4] += tx;
+ ctm[5] += ty;
+ clipXMin += tx;
+ clipYMin += ty;
+ clipXMax += tx;
+ clipYMax += ty;
+}
+
+void GfxState::setFillColorSpace(GfxColorSpace *colorSpace) {
+ if (fillColorSpace) {
+ delete fillColorSpace;
+ }
+ fillColorSpace = colorSpace;
+}
+
+void GfxState::setStrokeColorSpace(GfxColorSpace *colorSpace) {
+ if (strokeColorSpace) {
+ delete strokeColorSpace;
+ }
+ strokeColorSpace = colorSpace;
+}
+
+void GfxState::setFillPattern(GfxPattern *pattern) {
+ if (fillPattern) {
+ delete fillPattern;
+ }
+ fillPattern = pattern;
+}
+
+void GfxState::setStrokePattern(GfxPattern *pattern) {
+ if (strokePattern) {
+ delete strokePattern;
+ }
+ strokePattern = pattern;
+}
+
+void GfxState::setFont(GfxFont *fontA, double fontSizeA) {
+ if (font)
+ font->decRefCnt();
+
+ font = fontA;
+ fontSize = fontSizeA;
+}
+
+void GfxState::setTransfer(Function **funcs) {
+ int i;
+
+ for (i = 0; i < 4; ++i) {
+ if (transfer[i]) {
+ delete transfer[i];
+ }
+ transfer[i] = funcs[i];
+ }
+}
+
+void GfxState::setLineDash(double *dash, int length, double start) {
+ if (lineDash)
+ gfree(lineDash);
+ lineDash = dash;
+ lineDashLength = length;
+ lineDashStart = start;
+}
+
+void GfxState::clearPath() {
+ delete path;
+ path = new GfxPath();
+}
+
+void GfxState::clip() {
+ double xMin, yMin, xMax, yMax, x, y;
+ GfxSubpath *subpath;
+ int i, j;
+
+ xMin = xMax = yMin = yMax = 0; // make gcc happy
+ for (i = 0; i < path->getNumSubpaths(); ++i) {
+ subpath = path->getSubpath(i);
+ for (j = 0; j < subpath->getNumPoints(); ++j) {
+ transform(subpath->getX(j), subpath->getY(j), &x, &y);
+ if (i == 0 && j == 0) {
+ xMin = xMax = x;
+ yMin = yMax = y;
+ } else {
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ }
+ }
+ }
+ if (xMin > clipXMin) {
+ clipXMin = xMin;
+ }
+ if (yMin > clipYMin) {
+ clipYMin = yMin;
+ }
+ if (xMax < clipXMax) {
+ clipXMax = xMax;
+ }
+ if (yMax < clipYMax) {
+ clipYMax = yMax;
+ }
+}
+
+void GfxState::clipToStrokePath() {
+ double xMin, yMin, xMax, yMax, x, y, t0, t1;
+ GfxSubpath *subpath;
+ int i, j;
+
+ xMin = xMax = yMin = yMax = 0; // make gcc happy
+ for (i = 0; i < path->getNumSubpaths(); ++i) {
+ subpath = path->getSubpath(i);
+ for (j = 0; j < subpath->getNumPoints(); ++j) {
+ transform(subpath->getX(j), subpath->getY(j), &x, &y);
+ if (i == 0 && j == 0) {
+ xMin = xMax = x;
+ yMin = yMax = y;
+ } else {
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ }
+ }
+ }
+
+ // allow for the line width
+ //~ miter joins can extend farther than this
+ t0 = fabs(ctm[0]);
+ t1 = fabs(ctm[2]);
+ if (t0 > t1) {
+ xMin -= 0.5 * lineWidth * t0;
+ xMax += 0.5 * lineWidth * t0;
+ } else {
+ xMin -= 0.5 * lineWidth * t1;
+ xMax += 0.5 * lineWidth * t1;
+ }
+ t0 = fabs(ctm[0]);
+ t1 = fabs(ctm[3]);
+ if (t0 > t1) {
+ yMin -= 0.5 * lineWidth * t0;
+ yMax += 0.5 * lineWidth * t0;
+ } else {
+ yMin -= 0.5 * lineWidth * t1;
+ yMax += 0.5 * lineWidth * t1;
+ }
+
+ if (xMin > clipXMin) {
+ clipXMin = xMin;
+ }
+ if (yMin > clipYMin) {
+ clipYMin = yMin;
+ }
+ if (xMax < clipXMax) {
+ clipXMax = xMax;
+ }
+ if (yMax < clipYMax) {
+ clipYMax = yMax;
+ }
+}
+
+void GfxState::textShift(double tx, double ty) {
+ double dx, dy;
+
+ textTransformDelta(tx, ty, &dx, &dy);
+ curX += dx;
+ curY += dy;
+}
+
+void GfxState::shift(double dx, double dy) {
+ curX += dx;
+ curY += dy;
+}
+
+GfxState *GfxState::save() {
+ GfxState *newState;
+
+ newState = copy();
+ newState->saved = this;
+ return newState;
+}
+
+GfxState *GfxState::restore() {
+ GfxState *oldState;
+
+ if (saved) {
+ oldState = saved;
+
+ // these attributes aren't saved/restored by the q/Q operators
+ oldState->path = path;
+ oldState->curX = curX;
+ oldState->curY = curY;
+ oldState->lineX = lineX;
+ oldState->lineY = lineY;
+
+ path = NULL;
+ saved = NULL;
+ delete this;
+
+ } else {
+ oldState = this;
+ }
+
+ return oldState;
+}
+
+GBool GfxState::parseBlendMode(Object *obj, GfxBlendMode *mode) {
+ Object obj2;
+ int i, j;
+
+ if (obj->isName()) {
+ for (i = 0; i < nGfxBlendModeNames; ++i) {
+ if (!strcmp(obj->getName(), gfxBlendModeNames[i].name)) {
+ *mode = gfxBlendModeNames[i].mode;
+ return gTrue;
+ }
+ }
+ return gFalse;
+ } else if (obj->isArray()) {
+ for (i = 0; i < obj->arrayGetLength(); ++i) {
+ obj->arrayGet(i, &obj2);
+ if (!obj2.isName()) {
+ obj2.free();
+ return gFalse;
+ }
+ for (j = 0; j < nGfxBlendModeNames; ++j) {
+ if (!strcmp(obj2.getName(), gfxBlendModeNames[j].name)) {
+ obj2.free();
+ *mode = gfxBlendModeNames[j].mode;
+ return gTrue;
+ }
+ }
+ obj2.free();
+ }
+ *mode = gfxBlendNormal;
+ return gTrue;
+ } else {
+ return gFalse;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.h
new file mode 100644
index 00000000000..74f74ce1184
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState.h
@@ -0,0 +1,1335 @@
+//========================================================================
+//
+// GfxState.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GFXSTATE_H
+#define GFXSTATE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+#include "Function.h"
+
+class Array;
+class Gfx;
+class GfxFont;
+class PDFRectangle;
+class GfxShading;
+class PopplerCache;
+
+class Matrix {
+public:
+ double m[6];
+
+ GBool invertTo(Matrix *other);
+ void transform(double x, double y, double *tx, double *ty);
+};
+
+//------------------------------------------------------------------------
+// GfxBlendMode
+//------------------------------------------------------------------------
+
+enum GfxBlendMode {
+ gfxBlendNormal,
+ gfxBlendMultiply,
+ gfxBlendScreen,
+ gfxBlendOverlay,
+ gfxBlendDarken,
+ gfxBlendLighten,
+ gfxBlendColorDodge,
+ gfxBlendColorBurn,
+ gfxBlendHardLight,
+ gfxBlendSoftLight,
+ gfxBlendDifference,
+ gfxBlendExclusion,
+ gfxBlendHue,
+ gfxBlendSaturation,
+ gfxBlendColor,
+ gfxBlendLuminosity
+};
+
+//------------------------------------------------------------------------
+// GfxColorComp
+//------------------------------------------------------------------------
+
+// 16.16 fixed point color component
+typedef int GfxColorComp;
+
+#define gfxColorComp1 0x10000
+
+static inline GfxColorComp dblToCol(double x) {
+ return (GfxColorComp)(x * gfxColorComp1);
+}
+
+static inline double colToDbl(GfxColorComp x) {
+ return (double)x / (double)gfxColorComp1;
+}
+
+static inline GfxColorComp byteToCol(Guchar x) {
+ // (x / 255) << 16 = (0.0000000100000001... * x) << 16
+ // = ((x << 8) + (x) + (x >> 8) + ...) << 16
+ // = (x << 8) + (x) + (x >> 7)
+ // [for rounding]
+ return (GfxColorComp)((x << 8) + x + (x >> 7));
+}
+
+static inline Guchar colToByte(GfxColorComp x) {
+ // 255 * x + 0.5 = 256 * x - x + 0x8000
+ return (Guchar)(((x << 8) - x + 0x8000) >> 16);
+}
+
+//------------------------------------------------------------------------
+// GfxColor
+//------------------------------------------------------------------------
+
+#define gfxColorMaxComps funcMaxOutputs
+
+struct GfxColor {
+ GfxColorComp c[gfxColorMaxComps];
+};
+
+//------------------------------------------------------------------------
+// GfxGray
+//------------------------------------------------------------------------
+
+typedef GfxColorComp GfxGray;
+
+//------------------------------------------------------------------------
+// GfxRGB
+//------------------------------------------------------------------------
+
+struct GfxRGB {
+ GfxColorComp r, g, b;
+};
+
+//------------------------------------------------------------------------
+// GfxCMYK
+//------------------------------------------------------------------------
+
+struct GfxCMYK {
+ GfxColorComp c, m, y, k;
+};
+
+//------------------------------------------------------------------------
+// GfxColorSpace
+//------------------------------------------------------------------------
+
+// NB: The nGfxColorSpaceModes constant and the gfxColorSpaceModeNames
+// array defined in GfxState.cc must match this enum.
+enum GfxColorSpaceMode {
+ csDeviceGray,
+ csCalGray,
+ csDeviceRGB,
+ csCalRGB,
+ csDeviceCMYK,
+ csLab,
+ csICCBased,
+ csIndexed,
+ csSeparation,
+ csDeviceN,
+ csPattern
+};
+
+// wrapper of cmsHTRANSFORM to copy
+class GfxColorTransform {
+public:
+ void doTransform(void *in, void *out, unsigned int size);
+ // transformA should be a cmsHTRANSFORM
+ GfxColorTransform(void *transformA);
+ ~GfxColorTransform();
+ void ref();
+ unsigned int unref();
+private:
+ GfxColorTransform() {}
+ void *transform;
+ unsigned int refCount;
+};
+
+class GfxColorSpace {
+public:
+
+ GfxColorSpace();
+ virtual ~GfxColorSpace();
+ virtual GfxColorSpace *copy() = 0;
+ virtual GfxColorSpaceMode getMode() = 0;
+
+ // Construct a color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Object *csObj, Gfx *gfx);
+
+ // Convert to gray, RGB, or CMYK.
+ virtual void getGray(GfxColor *color, GfxGray *gray) = 0;
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0;
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0;
+ virtual void getGrayLine(Guchar */*in*/, Guchar */*out*/, int /*length*/) {}
+ virtual void getRGBLine(Guchar */*in*/, unsigned int */*out*/, int /*length*/) {}
+
+ // Does this ColorSpace use getRGBLine?
+ virtual GBool useGetRGBLine() { return gFalse; }
+ // Does this ColorSpace use getGrayLine?
+ virtual GBool useGetGrayLine() { return gFalse; }
+
+ // Return the number of color components.
+ virtual int getNComps() = 0;
+
+ // Get this color space's default color.
+ virtual void getDefaultColor(GfxColor *color) = 0;
+
+ // Return the default ranges for each component, assuming an image
+ // with a max pixel value of <maxImgPixel>.
+ virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel);
+
+ // Returns true if painting operations in this color space never
+ // mark the page (e.g., the "None" colorant).
+ virtual GBool isNonMarking() { return gFalse; }
+
+ // Return the number of color space modes
+ static int getNumColorSpaceModes();
+
+ // Return the name of the <idx>th color space mode.
+ static char *getColorSpaceModeName(int idx);
+
+#ifdef USE_CMS
+ static int setupColorProfiles();
+ // displayProfileA should be a cmsHPROFILE
+ static void setDisplayProfile(void *displayProfileA);
+ static void setDisplayProfileName(GooString *name);
+ // result will be a cmsHPROFILE
+ static void *getRGBProfile();
+ // result will be a cmsHPROFILE
+ static void *getDisplayProfile();
+#endif
+};
+
+//------------------------------------------------------------------------
+// GfxDeviceGrayColorSpace
+//------------------------------------------------------------------------
+
+class GfxDeviceGrayColorSpace: public GfxColorSpace {
+public:
+
+ GfxDeviceGrayColorSpace();
+ virtual ~GfxDeviceGrayColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csDeviceGray; }
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+ virtual void getGrayLine(Guchar *in, Guchar *out, int length);
+ virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
+
+ virtual GBool useGetRGBLine() { return gTrue; }
+ virtual GBool useGetGrayLine() { return gTrue; }
+
+ virtual int getNComps() { return 1; }
+ virtual void getDefaultColor(GfxColor *color);
+
+private:
+};
+
+//------------------------------------------------------------------------
+// GfxCalGrayColorSpace
+//------------------------------------------------------------------------
+
+class GfxCalGrayColorSpace: public GfxColorSpace {
+public:
+
+ GfxCalGrayColorSpace();
+ virtual ~GfxCalGrayColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csCalGray; }
+
+ // Construct a CalGray color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 1; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ // CalGray-specific access.
+ double getWhiteX() { return whiteX; }
+ double getWhiteY() { return whiteY; }
+ double getWhiteZ() { return whiteZ; }
+ double getBlackX() { return blackX; }
+ double getBlackY() { return blackY; }
+ double getBlackZ() { return blackZ; }
+ double getGamma() { return gamma; }
+
+private:
+
+ double whiteX, whiteY, whiteZ; // white point
+ double blackX, blackY, blackZ; // black point
+ double gamma; // gamma value
+ double kr, kg, kb; // gamut mapping mulitpliers
+ void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ);
+};
+
+//------------------------------------------------------------------------
+// GfxDeviceRGBColorSpace
+//------------------------------------------------------------------------
+
+class GfxDeviceRGBColorSpace: public GfxColorSpace {
+public:
+
+ GfxDeviceRGBColorSpace();
+ virtual ~GfxDeviceRGBColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csDeviceRGB; }
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+ virtual void getGrayLine(Guchar *in, Guchar *out, int length);
+ virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
+
+ virtual GBool useGetRGBLine() { return gTrue; }
+ virtual GBool useGetGrayLine() { return gTrue; }
+
+ virtual int getNComps() { return 3; }
+ virtual void getDefaultColor(GfxColor *color);
+
+private:
+};
+
+//------------------------------------------------------------------------
+// GfxCalRGBColorSpace
+//------------------------------------------------------------------------
+
+class GfxCalRGBColorSpace: public GfxColorSpace {
+public:
+
+ GfxCalRGBColorSpace();
+ virtual ~GfxCalRGBColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csCalRGB; }
+
+ // Construct a CalRGB color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 3; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ // CalRGB-specific access.
+ double getWhiteX() { return whiteX; }
+ double getWhiteY() { return whiteY; }
+ double getWhiteZ() { return whiteZ; }
+ double getBlackX() { return blackX; }
+ double getBlackY() { return blackY; }
+ double getBlackZ() { return blackZ; }
+ double getGammaR() { return gammaR; }
+ double getGammaG() { return gammaG; }
+ double getGammaB() { return gammaB; }
+ double *getMatrix() { return mat; }
+
+private:
+
+ double whiteX, whiteY, whiteZ; // white point
+ double blackX, blackY, blackZ; // black point
+ double gammaR, gammaG, gammaB; // gamma values
+ double mat[9]; // ABC -> XYZ transform matrix
+ double kr, kg, kb; // gamut mapping mulitpliers
+ void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ);
+};
+
+//------------------------------------------------------------------------
+// GfxDeviceCMYKColorSpace
+//------------------------------------------------------------------------
+
+class GfxDeviceCMYKColorSpace: public GfxColorSpace {
+public:
+
+ GfxDeviceCMYKColorSpace();
+ virtual ~GfxDeviceCMYKColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csDeviceCMYK; }
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 4; }
+ virtual void getDefaultColor(GfxColor *color);
+
+private:
+};
+
+//------------------------------------------------------------------------
+// GfxLabColorSpace
+//------------------------------------------------------------------------
+
+class GfxLabColorSpace: public GfxColorSpace {
+public:
+
+ GfxLabColorSpace();
+ virtual ~GfxLabColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csLab; }
+
+ // Construct a Lab color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 3; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel);
+
+ // Lab-specific access.
+ double getWhiteX() { return whiteX; }
+ double getWhiteY() { return whiteY; }
+ double getWhiteZ() { return whiteZ; }
+ double getBlackX() { return blackX; }
+ double getBlackY() { return blackY; }
+ double getBlackZ() { return blackZ; }
+ double getAMin() { return aMin; }
+ double getAMax() { return aMax; }
+ double getBMin() { return bMin; }
+ double getBMax() { return bMax; }
+
+private:
+
+ double whiteX, whiteY, whiteZ; // white point
+ double blackX, blackY, blackZ; // black point
+ double aMin, aMax, bMin, bMax; // range for the a and b components
+ double kr, kg, kb; // gamut mapping mulitpliers
+ void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ);
+};
+
+//------------------------------------------------------------------------
+// GfxICCBasedColorSpace
+//------------------------------------------------------------------------
+
+class GfxICCBasedColorSpace: public GfxColorSpace {
+public:
+
+ GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
+ Ref *iccProfileStreamA);
+ virtual ~GfxICCBasedColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csICCBased; }
+
+ // Construct an ICCBased color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr, Gfx *gfx);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+ virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
+
+ virtual GBool useGetRGBLine();
+
+ virtual int getNComps() { return nComps; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel);
+
+ // ICCBased-specific access.
+ GfxColorSpace *getAlt() { return alt; }
+
+private:
+
+ int nComps; // number of color components (1, 3, or 4)
+ GfxColorSpace *alt; // alternate color space
+ double rangeMin[4]; // min values for each component
+ double rangeMax[4]; // max values for each component
+ Ref iccProfileStream; // the ICC profile
+#ifdef USE_CMS
+ GfxColorTransform *transform;
+ GfxColorTransform *lineTransform; // color transform for line
+#endif
+};
+//------------------------------------------------------------------------
+// GfxIndexedColorSpace
+//------------------------------------------------------------------------
+
+class GfxIndexedColorSpace: public GfxColorSpace {
+public:
+
+ GfxIndexedColorSpace(GfxColorSpace *baseA, int indexHighA);
+ virtual ~GfxIndexedColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csIndexed; }
+
+ // Construct a Lab color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr, Gfx *gfx);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+ virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
+
+ virtual GBool useGetRGBLine() { return gTrue; }
+
+ virtual int getNComps() { return 1; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
+ int maxImgPixel);
+
+ // Indexed-specific access.
+ GfxColorSpace *getBase() { return base; }
+ int getIndexHigh() { return indexHigh; }
+ Guchar *getLookup() { return lookup; }
+ GfxColor *mapColorToBase(GfxColor *color, GfxColor *baseColor);
+
+private:
+
+ GfxColorSpace *base; // base color space
+ int indexHigh; // max pixel value
+ Guchar *lookup; // lookup table
+};
+
+//------------------------------------------------------------------------
+// GfxSeparationColorSpace
+//------------------------------------------------------------------------
+
+class GfxSeparationColorSpace: public GfxColorSpace {
+public:
+
+ GfxSeparationColorSpace(GooString *nameA, GfxColorSpace *altA,
+ Function *funcA);
+ virtual ~GfxSeparationColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csSeparation; }
+
+ // Construct a Separation color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr, Gfx *gfx);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 1; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ virtual GBool isNonMarking() { return nonMarking; }
+
+ // Separation-specific access.
+ GooString *getName() { return name; }
+ GfxColorSpace *getAlt() { return alt; }
+ Function *getFunc() { return func; }
+
+private:
+
+ GooString *name; // colorant name
+ GfxColorSpace *alt; // alternate color space
+ Function *func; // tint transform (into alternate color space)
+ GBool nonMarking;
+};
+
+//------------------------------------------------------------------------
+// GfxDeviceNColorSpace
+//------------------------------------------------------------------------
+
+class GfxDeviceNColorSpace: public GfxColorSpace {
+public:
+
+ GfxDeviceNColorSpace(int nCompsA, GfxColorSpace *alt, Function *func);
+ virtual ~GfxDeviceNColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csDeviceN; }
+
+ // Construct a DeviceN color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr, Gfx *gfx);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return nComps; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ virtual GBool isNonMarking() { return nonMarking; }
+
+ // DeviceN-specific access.
+ GooString *getColorantName(int i) { return names[i]; }
+ GfxColorSpace *getAlt() { return alt; }
+ Function *getTintTransformFunc() { return func; }
+
+private:
+
+ int nComps; // number of components
+ GooString // colorant names
+ *names[gfxColorMaxComps];
+ GfxColorSpace *alt; // alternate color space
+ Function *func; // tint transform (into alternate color space)
+ GBool nonMarking;
+};
+
+//------------------------------------------------------------------------
+// GfxPatternColorSpace
+//------------------------------------------------------------------------
+
+class GfxPatternColorSpace: public GfxColorSpace {
+public:
+
+ GfxPatternColorSpace(GfxColorSpace *underA);
+ virtual ~GfxPatternColorSpace();
+ virtual GfxColorSpace *copy();
+ virtual GfxColorSpaceMode getMode() { return csPattern; }
+
+ // Construct a Pattern color space. Returns NULL if unsuccessful.
+ static GfxColorSpace *parse(Array *arr, Gfx *gfx);
+
+ virtual void getGray(GfxColor *color, GfxGray *gray);
+ virtual void getRGB(GfxColor *color, GfxRGB *rgb);
+ virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
+
+ virtual int getNComps() { return 0; }
+ virtual void getDefaultColor(GfxColor *color);
+
+ // Pattern-specific access.
+ GfxColorSpace *getUnder() { return under; }
+
+private:
+
+ GfxColorSpace *under; // underlying color space (for uncolored
+ // patterns)
+};
+
+//------------------------------------------------------------------------
+// GfxPattern
+//------------------------------------------------------------------------
+
+class GfxPattern {
+public:
+
+ GfxPattern(int typeA);
+ virtual ~GfxPattern();
+
+ static GfxPattern *parse(Object *obj, Gfx *gfx);
+
+ virtual GfxPattern *copy() = 0;
+
+ int getType() { return type; }
+
+private:
+
+ int type;
+};
+
+//------------------------------------------------------------------------
+// GfxTilingPattern
+//------------------------------------------------------------------------
+
+class GfxTilingPattern: public GfxPattern {
+public:
+
+ static GfxTilingPattern *parse(Object *patObj);
+ virtual ~GfxTilingPattern();
+
+ virtual GfxPattern *copy();
+
+ int getPaintType() { return paintType; }
+ int getTilingType() { return tilingType; }
+ double *getBBox() { return bbox; }
+ double getXStep() { return xStep; }
+ double getYStep() { return yStep; }
+ Dict *getResDict()
+ { return resDict.isDict() ? resDict.getDict() : (Dict *)NULL; }
+ double *getMatrix() { return matrix; }
+ Object *getContentStream() { return &contentStream; }
+
+private:
+
+ GfxTilingPattern(int paintTypeA, int tilingTypeA,
+ double *bboxA, double xStepA, double yStepA,
+ Object *resDictA, double *matrixA,
+ Object *contentStreamA);
+
+ int paintType;
+ int tilingType;
+ double bbox[4];
+ double xStep, yStep;
+ Object resDict;
+ double matrix[6];
+ Object contentStream;
+};
+
+//------------------------------------------------------------------------
+// GfxShadingPattern
+//------------------------------------------------------------------------
+
+class GfxShadingPattern: public GfxPattern {
+public:
+
+ static GfxShadingPattern *parse(Object *patObj, Gfx *gfx);
+ virtual ~GfxShadingPattern();
+
+ virtual GfxPattern *copy();
+
+ GfxShading *getShading() { return shading; }
+ double *getMatrix() { return matrix; }
+
+private:
+
+ GfxShadingPattern(GfxShading *shadingA, double *matrixA);
+
+ GfxShading *shading;
+ double matrix[6];
+};
+
+//------------------------------------------------------------------------
+// GfxShading
+//------------------------------------------------------------------------
+
+class GfxShading {
+public:
+
+ GfxShading(int typeA);
+ GfxShading(GfxShading *shading);
+ virtual ~GfxShading();
+
+ static GfxShading *parse(Object *obj, Gfx *gfx);
+
+ virtual GfxShading *copy() = 0;
+
+ int getType() { return type; }
+ GfxColorSpace *getColorSpace() { return colorSpace; }
+ GfxColor *getBackground() { return &background; }
+ GBool getHasBackground() { return hasBackground; }
+ void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+ GBool getHasBBox() { return hasBBox; }
+
+protected:
+
+ GBool init(Dict *dict, Gfx *gfx);
+
+ int type;
+ GfxColorSpace *colorSpace;
+ GfxColor background;
+ GBool hasBackground;
+ double xMin, yMin, xMax, yMax;
+ GBool hasBBox;
+};
+
+//------------------------------------------------------------------------
+// GfxFunctionShading
+//------------------------------------------------------------------------
+
+class GfxFunctionShading: public GfxShading {
+public:
+
+ GfxFunctionShading(double x0A, double y0A,
+ double x1A, double y1A,
+ double *matrixA,
+ Function **funcsA, int nFuncsA);
+ GfxFunctionShading(GfxFunctionShading *shading);
+ virtual ~GfxFunctionShading();
+
+ static GfxFunctionShading *parse(Dict *dict, Gfx *gfx);
+
+ virtual GfxShading *copy();
+
+ void getDomain(double *x0A, double *y0A, double *x1A, double *y1A)
+ { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
+ double *getMatrix() { return matrix; }
+ int getNFuncs() { return nFuncs; }
+ Function *getFunc(int i) { return funcs[i]; }
+ void getColor(double x, double y, GfxColor *color);
+
+private:
+
+ double x0, y0, x1, y1;
+ double matrix[6];
+ Function *funcs[gfxColorMaxComps];
+ int nFuncs;
+};
+
+//------------------------------------------------------------------------
+// GfxAxialShading
+//------------------------------------------------------------------------
+
+class GfxAxialShading: public GfxShading {
+public:
+
+ GfxAxialShading(double x0A, double y0A,
+ double x1A, double y1A,
+ double t0A, double t1A,
+ Function **funcsA, int nFuncsA,
+ GBool extend0A, GBool extend1A);
+ GfxAxialShading(GfxAxialShading *shading);
+ virtual ~GfxAxialShading();
+
+ static GfxAxialShading *parse(Dict *dict, Gfx *gfx);
+
+ virtual GfxShading *copy();
+
+ void getCoords(double *x0A, double *y0A, double *x1A, double *y1A)
+ { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
+ double getDomain0() { return t0; }
+ double getDomain1() { return t1; }
+ GBool getExtend0() { return extend0; }
+ GBool getExtend1() { return extend1; }
+ int getNFuncs() { return nFuncs; }
+ Function *getFunc(int i) { return funcs[i]; }
+ void getColor(double t, GfxColor *color);
+
+private:
+
+ double x0, y0, x1, y1;
+ double t0, t1;
+ Function *funcs[gfxColorMaxComps];
+ int nFuncs;
+ GBool extend0, extend1;
+};
+
+//------------------------------------------------------------------------
+// GfxRadialShading
+//------------------------------------------------------------------------
+
+class GfxRadialShading: public GfxShading {
+public:
+
+ GfxRadialShading(double x0A, double y0A, double r0A,
+ double x1A, double y1A, double r1A,
+ double t0A, double t1A,
+ Function **funcsA, int nFuncsA,
+ GBool extend0A, GBool extend1A);
+ GfxRadialShading(GfxRadialShading *shading);
+ virtual ~GfxRadialShading();
+
+ static GfxRadialShading *parse(Dict *dict, Gfx *gfx);
+
+ virtual GfxShading *copy();
+
+ void getCoords(double *x0A, double *y0A, double *r0A,
+ double *x1A, double *y1A, double *r1A)
+ { *x0A = x0; *y0A = y0; *r0A = r0; *x1A = x1; *y1A = y1; *r1A = r1; }
+ double getDomain0() { return t0; }
+ double getDomain1() { return t1; }
+ GBool getExtend0() { return extend0; }
+ GBool getExtend1() { return extend1; }
+ int getNFuncs() { return nFuncs; }
+ Function *getFunc(int i) { return funcs[i]; }
+ void getColor(double t, GfxColor *color);
+
+private:
+
+ double x0, y0, r0, x1, y1, r1;
+ double t0, t1;
+ Function *funcs[gfxColorMaxComps];
+ int nFuncs;
+ GBool extend0, extend1;
+};
+
+//------------------------------------------------------------------------
+// GfxGouraudTriangleShading
+//------------------------------------------------------------------------
+
+struct GfxGouraudVertex {
+ double x, y;
+ GfxColor color;
+};
+
+class GfxGouraudTriangleShading: public GfxShading {
+public:
+
+ GfxGouraudTriangleShading(int typeA,
+ GfxGouraudVertex *verticesA, int nVerticesA,
+ int (*trianglesA)[3], int nTrianglesA,
+ Function **funcsA, int nFuncsA);
+ GfxGouraudTriangleShading(GfxGouraudTriangleShading *shading);
+ virtual ~GfxGouraudTriangleShading();
+
+ static GfxGouraudTriangleShading *parse(int typeA, Dict *dict, Stream *str, Gfx *gfx);
+
+ virtual GfxShading *copy();
+
+ int getNTriangles() { return nTriangles; }
+ void getTriangle(int i, double *x0, double *y0, GfxColor *color0,
+ double *x1, double *y1, GfxColor *color1,
+ double *x2, double *y2, GfxColor *color2);
+
+private:
+
+ GfxGouraudVertex *vertices;
+ int nVertices;
+ int (*triangles)[3];
+ int nTriangles;
+ Function *funcs[gfxColorMaxComps];
+ int nFuncs;
+};
+
+//------------------------------------------------------------------------
+// GfxPatchMeshShading
+//------------------------------------------------------------------------
+
+struct GfxPatch {
+ double x[4][4];
+ double y[4][4];
+ GfxColor color[2][2];
+};
+
+class GfxPatchMeshShading: public GfxShading {
+public:
+
+ GfxPatchMeshShading(int typeA, GfxPatch *patchesA, int nPatchesA,
+ Function **funcsA, int nFuncsA);
+ GfxPatchMeshShading(GfxPatchMeshShading *shading);
+ virtual ~GfxPatchMeshShading();
+
+ static GfxPatchMeshShading *parse(int typeA, Dict *dict, Stream *str, Gfx *gfx);
+
+ virtual GfxShading *copy();
+
+ int getNPatches() { return nPatches; }
+ GfxPatch *getPatch(int i) { return &patches[i]; }
+
+private:
+
+ GfxPatch *patches;
+ int nPatches;
+ Function *funcs[gfxColorMaxComps];
+ int nFuncs;
+};
+
+//------------------------------------------------------------------------
+// GfxImageColorMap
+//------------------------------------------------------------------------
+
+class GfxImageColorMap {
+public:
+
+ // Constructor.
+ GfxImageColorMap(int bitsA, Object *decode, GfxColorSpace *colorSpaceA);
+
+ // Destructor.
+ ~GfxImageColorMap();
+
+ // Return a copy of this color map.
+ GfxImageColorMap *copy() { return new GfxImageColorMap(this); }
+
+ // Is color map valid?
+ GBool isOk() { return ok; }
+
+ // Get the color space.
+ GfxColorSpace *getColorSpace() { return colorSpace; }
+
+ // Get stream decoding info.
+ int getNumPixelComps() { return nComps; }
+ int getBits() { return bits; }
+
+ // Get decode table.
+ double getDecodeLow(int i) { return decodeLow[i]; }
+ double getDecodeHigh(int i) { return decodeLow[i] + decodeRange[i]; }
+
+ // Convert an image pixel to a color.
+ void getGray(Guchar *x, GfxGray *gray);
+ void getRGB(Guchar *x, GfxRGB *rgb);
+ void getRGBLine(Guchar *in, unsigned int *out, int length);
+ void getGrayLine(Guchar *in, Guchar *out, int length);
+ void getCMYK(Guchar *x, GfxCMYK *cmyk);
+ void getColor(Guchar *x, GfxColor *color);
+
+private:
+
+ GfxImageColorMap(GfxImageColorMap *colorMap);
+
+ GfxColorSpace *colorSpace; // the image color space
+ int bits; // bits per component
+ int nComps; // number of components in a pixel
+ GfxColorSpace *colorSpace2; // secondary color space
+ int nComps2; // number of components in colorSpace2
+ GfxColorComp * // lookup table
+ lookup[gfxColorMaxComps];
+ Guchar *byte_lookup;
+ double // minimum values for each component
+ decodeLow[gfxColorMaxComps];
+ double // max - min value for each component
+ decodeRange[gfxColorMaxComps];
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// GfxSubpath and GfxPath
+//------------------------------------------------------------------------
+
+class GfxSubpath {
+public:
+
+ // Constructor.
+ GfxSubpath(double x1, double y1);
+
+ // Destructor.
+ ~GfxSubpath();
+
+ // Copy.
+ GfxSubpath *copy() { return new GfxSubpath(this); }
+
+ // Get points.
+ int getNumPoints() { return n; }
+ double getX(int i) { return x[i]; }
+ double getY(int i) { return y[i]; }
+ GBool getCurve(int i) { return curve[i]; }
+
+ // Get last point.
+ double getLastX() { return x[n-1]; }
+ double getLastY() { return y[n-1]; }
+
+ // Add a line segment.
+ void lineTo(double x1, double y1);
+
+ // Add a Bezier curve.
+ void curveTo(double x1, double y1, double x2, double y2,
+ double x3, double y3);
+
+ // Close the subpath.
+ void close();
+ GBool isClosed() { return closed; }
+
+ // Add (<dx>, <dy>) to each point in the subpath.
+ void offset(double dx, double dy);
+
+private:
+
+ double *x, *y; // points
+ GBool *curve; // curve[i] => point i is a control point
+ // for a Bezier curve
+ int n; // number of points
+ int size; // size of x/y arrays
+ GBool closed; // set if path is closed
+
+ GfxSubpath(GfxSubpath *subpath);
+};
+
+class GfxPath {
+public:
+
+ // Constructor.
+ GfxPath();
+
+ // Destructor.
+ ~GfxPath();
+
+ // Copy.
+ GfxPath *copy()
+ { return new GfxPath(justMoved, firstX, firstY, subpaths, n, size); }
+
+ // Is there a current point?
+ GBool isCurPt() { return n > 0 || justMoved; }
+
+ // Is the path non-empty, i.e., is there at least one segment?
+ GBool isPath() { return n > 0; }
+
+ // Get subpaths.
+ int getNumSubpaths() { return n; }
+ GfxSubpath *getSubpath(int i) { return subpaths[i]; }
+
+ // Get last point on last subpath.
+ double getLastX() { return subpaths[n-1]->getLastX(); }
+ double getLastY() { return subpaths[n-1]->getLastY(); }
+
+ // Move the current point.
+ void moveTo(double x, double y);
+
+ // Add a segment to the last subpath.
+ void lineTo(double x, double y);
+
+ // Add a Bezier curve to the last subpath
+ void curveTo(double x1, double y1, double x2, double y2,
+ double x3, double y3);
+
+ // Close the last subpath.
+ void close();
+
+ // Append <path> to <this>.
+ void append(GfxPath *path);
+
+ // Add (<dx>, <dy>) to each point in the path.
+ void offset(double dx, double dy);
+
+private:
+
+ GBool justMoved; // set if a new subpath was just started
+ double firstX, firstY; // first point in new subpath
+ GfxSubpath **subpaths; // subpaths
+ int n; // number of subpaths
+ int size; // size of subpaths array
+
+ GfxPath(GBool justMoved1, double firstX1, double firstY1,
+ GfxSubpath **subpaths1, int n1, int size1);
+};
+
+//------------------------------------------------------------------------
+// GfxState
+//------------------------------------------------------------------------
+
+class GfxState {
+public:
+
+ // Construct a default GfxState, for a device with resolution <hDPI>
+ // x <vDPI>, page box <pageBox>, page rotation <rotateA>, and
+ // coordinate system specified by <upsideDown>.
+ GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
+ int rotateA, GBool upsideDown);
+
+ // Destructor.
+ ~GfxState();
+
+ // Copy.
+ GfxState *copy() { return new GfxState(this); }
+
+ // Accessors.
+ double getHDPI() { return hDPI; }
+ double getVDPI() { return vDPI; }
+ double *getCTM() { return ctm; }
+ void getCTM(Matrix *m) { memcpy (m->m, ctm, sizeof m->m); }
+ double getX1() { return px1; }
+ double getY1() { return py1; }
+ double getX2() { return px2; }
+ double getY2() { return py2; }
+ double getPageWidth() { return pageWidth; }
+ double getPageHeight() { return pageHeight; }
+ int getRotate() { return rotate; }
+ GfxColor *getFillColor() { return &fillColor; }
+ GfxColor *getStrokeColor() { return &strokeColor; }
+ void getFillGray(GfxGray *gray)
+ { fillColorSpace->getGray(&fillColor, gray); }
+ void getStrokeGray(GfxGray *gray)
+ { strokeColorSpace->getGray(&strokeColor, gray); }
+ void getFillRGB(GfxRGB *rgb)
+ { fillColorSpace->getRGB(&fillColor, rgb); }
+ void getStrokeRGB(GfxRGB *rgb)
+ { strokeColorSpace->getRGB(&strokeColor, rgb); }
+ void getFillCMYK(GfxCMYK *cmyk)
+ { fillColorSpace->getCMYK(&fillColor, cmyk); }
+ void getStrokeCMYK(GfxCMYK *cmyk)
+ { strokeColorSpace->getCMYK(&strokeColor, cmyk); }
+ GfxColorSpace *getFillColorSpace() { return fillColorSpace; }
+ GfxColorSpace *getStrokeColorSpace() { return strokeColorSpace; }
+ GfxPattern *getFillPattern() { return fillPattern; }
+ GfxPattern *getStrokePattern() { return strokePattern; }
+ GfxBlendMode getBlendMode() { return blendMode; }
+ double getFillOpacity() { return fillOpacity; }
+ double getStrokeOpacity() { return strokeOpacity; }
+ GBool getFillOverprint() { return fillOverprint; }
+ GBool getStrokeOverprint() { return strokeOverprint; }
+ Function **getTransfer() { return transfer; }
+ double getLineWidth() { return lineWidth; }
+ void getLineDash(double **dash, int *length, double *start)
+ { *dash = lineDash; *length = lineDashLength; *start = lineDashStart; }
+ int getFlatness() { return flatness; }
+ int getLineJoin() { return lineJoin; }
+ int getLineCap() { return lineCap; }
+ double getMiterLimit() { return miterLimit; }
+ GBool getStrokeAdjust() { return strokeAdjust; }
+ GBool getAlphaIsShape() { return alphaIsShape; }
+ GBool getTextKnockout() { return textKnockout; }
+ GfxFont *getFont() { return font; }
+ double getFontSize() { return fontSize; }
+ double *getTextMat() { return textMat; }
+ double getCharSpace() { return charSpace; }
+ double getWordSpace() { return wordSpace; }
+ double getHorizScaling() { return horizScaling; }
+ double getLeading() { return leading; }
+ double getRise() { return rise; }
+ int getRender() { return render; }
+ GfxPath *getPath() { return path; }
+ void setPath(GfxPath *pathA);
+ double getCurX() { return curX; }
+ double getCurY() { return curY; }
+ void getClipBBox(double *xMin, double *yMin, double *xMax, double *yMax)
+ { *xMin = clipXMin; *yMin = clipYMin; *xMax = clipXMax; *yMax = clipYMax; }
+ void getUserClipBBox(double *xMin, double *yMin, double *xMax, double *yMax);
+ double getLineX() { return lineX; }
+ double getLineY() { return lineY; }
+
+ // Is there a current point/path?
+ GBool isCurPt() { return path->isCurPt(); }
+ GBool isPath() { return path->isPath(); }
+
+ // Transforms.
+ void transform(double x1, double y1, double *x2, double *y2)
+ { *x2 = ctm[0] * x1 + ctm[2] * y1 + ctm[4];
+ *y2 = ctm[1] * x1 + ctm[3] * y1 + ctm[5]; }
+ void transformDelta(double x1, double y1, double *x2, double *y2)
+ { *x2 = ctm[0] * x1 + ctm[2] * y1;
+ *y2 = ctm[1] * x1 + ctm[3] * y1; }
+ void textTransform(double x1, double y1, double *x2, double *y2)
+ { *x2 = textMat[0] * x1 + textMat[2] * y1 + textMat[4];
+ *y2 = textMat[1] * x1 + textMat[3] * y1 + textMat[5]; }
+ void textTransformDelta(double x1, double y1, double *x2, double *y2)
+ { *x2 = textMat[0] * x1 + textMat[2] * y1;
+ *y2 = textMat[1] * x1 + textMat[3] * y1; }
+ double transformWidth(double w);
+ double getTransformedLineWidth()
+ { return transformWidth(lineWidth); }
+ double getTransformedFontSize();
+ void getFontTransMat(double *m11, double *m12, double *m21, double *m22);
+
+ // Change state parameters.
+ void setCTM(double a, double b, double c,
+ double d, double e, double f);
+ void concatCTM(double a, double b, double c,
+ double d, double e, double f);
+ void shiftCTM(double tx, double ty);
+ void setFillColorSpace(GfxColorSpace *colorSpace);
+ void setStrokeColorSpace(GfxColorSpace *colorSpace);
+ void setFillColor(GfxColor *color) { fillColor = *color; }
+ void setStrokeColor(GfxColor *color) { strokeColor = *color; }
+ void setFillPattern(GfxPattern *pattern);
+ void setStrokePattern(GfxPattern *pattern);
+ void setBlendMode(GfxBlendMode mode) { blendMode = mode; }
+ void setFillOpacity(double opac) { fillOpacity = opac; }
+ void setStrokeOpacity(double opac) { strokeOpacity = opac; }
+ void setFillOverprint(GBool op) { fillOverprint = op; }
+ void setStrokeOverprint(GBool op) { strokeOverprint = op; }
+ void setTransfer(Function **funcs);
+ void setLineWidth(double width) { lineWidth = width; }
+ void setLineDash(double *dash, int length, double start);
+ void setFlatness(int flatness1) { flatness = flatness1; }
+ void setLineJoin(int lineJoin1) { lineJoin = lineJoin1; }
+ void setLineCap(int lineCap1) { lineCap = lineCap1; }
+ void setMiterLimit(double limit) { miterLimit = limit; }
+ void setStrokeAdjust(GBool sa) { strokeAdjust = sa; }
+ void setAlphaIsShape(GBool ais) { alphaIsShape = ais; }
+ void setTextKnockout(GBool tk) { textKnockout = tk; }
+ void setFont(GfxFont *fontA, double fontSizeA);
+ void setTextMat(double a, double b, double c,
+ double d, double e, double f)
+ { textMat[0] = a; textMat[1] = b; textMat[2] = c;
+ textMat[3] = d; textMat[4] = e; textMat[5] = f; }
+ void setCharSpace(double space)
+ { charSpace = space; }
+ void setWordSpace(double space)
+ { wordSpace = space; }
+ void setHorizScaling(double scale)
+ { horizScaling = 0.01 * scale; }
+ void setLeading(double leadingA)
+ { leading = leadingA; }
+ void setRise(double riseA)
+ { rise = riseA; }
+ void setRender(int renderA)
+ { render = renderA; }
+
+ // Add to path.
+ void moveTo(double x, double y)
+ { path->moveTo(curX = x, curY = y); }
+ void lineTo(double x, double y)
+ { path->lineTo(curX = x, curY = y); }
+ void curveTo(double x1, double y1, double x2, double y2,
+ double x3, double y3)
+ { path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3); }
+ void closePath()
+ { path->close(); curX = path->getLastX(); curY = path->getLastY(); }
+ void clearPath();
+
+ // Update clip region.
+ void clip();
+ void clipToStrokePath();
+
+ // Text position.
+ void textSetPos(double tx, double ty) { lineX = tx; lineY = ty; }
+ void textMoveTo(double tx, double ty)
+ { lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); }
+ void textShift(double tx, double ty);
+ void shift(double dx, double dy);
+
+ // Push/pop GfxState on/off stack.
+ GfxState *save();
+ GfxState *restore();
+ GBool hasSaves() { return saved != NULL; }
+ GBool isParentState(GfxState *state) { return saved == state || (saved && saved->isParentState(state)); }
+
+ // Misc
+ GBool parseBlendMode(Object *obj, GfxBlendMode *mode);
+
+private:
+
+ double hDPI, vDPI; // resolution
+ double ctm[6]; // coord transform matrix
+ double px1, py1, px2, py2; // page corners (user coords)
+ double pageWidth, pageHeight; // page size (pixels)
+ int rotate; // page rotation angle
+
+ GfxColorSpace *fillColorSpace; // fill color space
+ GfxColorSpace *strokeColorSpace; // stroke color space
+ GfxColor fillColor; // fill color
+ GfxColor strokeColor; // stroke color
+ GfxPattern *fillPattern; // fill pattern
+ GfxPattern *strokePattern; // stroke pattern
+ GfxBlendMode blendMode; // transparency blend mode
+ double fillOpacity; // fill opacity
+ double strokeOpacity; // stroke opacity
+ GBool fillOverprint; // fill overprint
+ GBool strokeOverprint; // stroke overprint
+ Function *transfer[4]; // transfer function (entries may be: all
+ // NULL = identity; last three NULL =
+ // single function; all four non-NULL =
+ // R,G,B,gray functions)
+
+ double lineWidth; // line width
+ double *lineDash; // line dash
+ int lineDashLength;
+ double lineDashStart;
+ int flatness; // curve flatness
+ int lineJoin; // line join style
+ int lineCap; // line cap style
+ double miterLimit; // line miter limit
+ GBool strokeAdjust; // stroke adjustment
+ GBool alphaIsShape; // alpha is shape
+ GBool textKnockout; // text knockout
+
+ GfxFont *font; // font
+ double fontSize; // font size
+ double textMat[6]; // text matrix
+ double charSpace; // character spacing
+ double wordSpace; // word spacing
+ double horizScaling; // horizontal scaling
+ double leading; // text leading
+ double rise; // text rise
+ int render; // text rendering mode
+
+ GfxPath *path; // array of path elements
+ double curX, curY; // current point (user coords)
+ double lineX, lineY; // start of current text line (text coords)
+
+ double clipXMin, clipYMin, // bounding box for clip region
+ clipXMax, clipYMax;
+
+ GfxState *saved; // next GfxState on stack
+
+ GfxState(GfxState *state);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState_helpers.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState_helpers.h
new file mode 100644
index 00000000000..77ac710e174
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GfxState_helpers.h
@@ -0,0 +1,80 @@
+//========================================================================
+//
+// GfxState.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+static inline GfxColorComp clip01(GfxColorComp x) {
+ return (x < 0) ? 0 : (x > gfxColorComp1) ? gfxColorComp1 : x;
+}
+
+static inline double clip01(double x) {
+ return (x < 0) ? 0 : (x > 1) ? 1 : x;
+}
+
+static inline void cmykToRGBMatrixMultiplication(const double &c, const double &m, const double &y, const double &k, const double &c1, const double &m1, const double &y1, const double &k1, double &r, double &g, double &b)
+{
+ double x;
+ // this is a matrix multiplication, unrolled for performance
+ // C M Y K
+ x = c1 * m1 * y1 * k1; // 0 0 0 0
+ r = g = b = x;
+ x = c1 * m1 * y1 * k; // 0 0 0 1
+ r += 0.1373 * x;
+ g += 0.1216 * x;
+ b += 0.1255 * x;
+ x = c1 * m1 * y * k1; // 0 0 1 0
+ r += x;
+ g += 0.9490 * x;
+ x = c1 * m1 * y * k; // 0 0 1 1
+ r += 0.1098 * x;
+ g += 0.1020 * x;
+ x = c1 * m * y1 * k1; // 0 1 0 0
+ r += 0.9255 * x;
+ b += 0.5490 * x;
+ x = c1 * m * y1 * k; // 0 1 0 1
+ r += 0.1412 * x;
+ x = c1 * m * y * k1; // 0 1 1 0
+ r += 0.9294 * x;
+ g += 0.1098 * x;
+ b += 0.1412 * x;
+ x = c1 * m * y * k; // 0 1 1 1
+ r += 0.1333 * x;
+ x = c * m1 * y1 * k1; // 1 0 0 0
+ g += 0.6784 * x;
+ b += 0.9373 * x;
+ x = c * m1 * y1 * k; // 1 0 0 1
+ g += 0.0588 * x;
+ b += 0.1412 * x;
+ x = c * m1 * y * k1; // 1 0 1 0
+ g += 0.6510 * x;
+ b += 0.3137 * x;
+ x = c * m1 * y * k; // 1 0 1 1
+ g += 0.0745 * x;
+ x = c * m * y1 * k1; // 1 1 0 0
+ r += 0.1804 * x;
+ g += 0.1922 * x;
+ b += 0.5725 * x;
+ x = c * m * y1 * k; // 1 1 0 1
+ b += 0.0078 * x;
+ x = c * m * y * k1; // 1 1 1 0
+ r += 0.2118 * x;
+ g += 0.2119 * x;
+ b += 0.2235 * x;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.cc
new file mode 100644
index 00000000000..1a903c50bdb
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.cc
@@ -0,0 +1,1890 @@
+//========================================================================
+//
+// GlobalParams.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005, 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk>
+// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2007, 2009 Jonathan Kew <jonathan_kew@sil.org>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#ifdef ENABLE_PLUGINS
+# ifndef _WIN32
+# include <dlfcn.h>
+# endif
+#endif
+#ifdef _WIN32
+# include <shlobj.h>
+#endif
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "goo/GooHash.h"
+#include "goo/gfile.h"
+#include "Error.h"
+#include "NameToCharCode.h"
+#include "CharCodeToUnicode.h"
+#include "UnicodeMap.h"
+#include "CMap.h"
+#include "BuiltinFontTables.h"
+#include "FontEncodingTables.h"
+#ifdef ENABLE_PLUGINS
+# include "XpdfPluginAPI.h"
+#endif
+#include "GlobalParams.h"
+#include "GfxFont.h"
+
+#ifdef _WIN32
+# define strcasecmp stricmp
+#endif
+
+#if MULTITHREADED
+# define lockGlobalParams gLockMutex(&mutex)
+# define lockUnicodeMapCache gLockMutex(&unicodeMapCacheMutex)
+# define lockCMapCache gLockMutex(&cMapCacheMutex)
+# define unlockGlobalParams gUnlockMutex(&mutex)
+# define unlockUnicodeMapCache gUnlockMutex(&unicodeMapCacheMutex)
+# define unlockCMapCache gUnlockMutex(&cMapCacheMutex)
+#else
+# define lockGlobalParams
+# define lockUnicodeMapCache
+# define lockCMapCache
+# define unlockGlobalParams
+# define unlockUnicodeMapCache
+# define unlockCMapCache
+#endif
+
+#ifndef FC_WEIGHT_BOOK
+#define FC_WEIGHT_BOOK 75
+#endif
+
+#include "NameToUnicodeTable.h"
+#include "UnicodeMapTables.h"
+#include "UTF8.h"
+
+#ifdef ENABLE_PLUGINS
+# ifdef _WIN32
+extern XpdfPluginVecTable xpdfPluginVecTable;
+# endif
+#endif
+
+//------------------------------------------------------------------------
+
+#define cidToUnicodeCacheSize 4
+#define unicodeToUnicodeCacheSize 4
+
+//------------------------------------------------------------------------
+
+GlobalParams *globalParams = NULL;
+
+//------------------------------------------------------------------------
+// DisplayFontParam
+//------------------------------------------------------------------------
+
+DisplayFontParam::DisplayFontParam(GooString *nameA,
+ DisplayFontParamKind kindA) {
+ name = nameA;
+ kind = kindA;
+ switch (kind) {
+ case displayFontT1:
+ t1.fileName = NULL;
+ break;
+ case displayFontTT:
+ tt.fileName = NULL;
+ break;
+ }
+}
+
+DisplayFontParam::~DisplayFontParam() {
+ delete name;
+ switch (kind) {
+ case displayFontT1:
+ if (t1.fileName) {
+ delete t1.fileName;
+ }
+ break;
+ case displayFontTT:
+ if (tt.fileName) {
+ delete tt.fileName;
+ }
+ break;
+ }
+}
+
+#ifndef PDF_PARSER_ONLY
+#ifdef _WIN32
+
+//------------------------------------------------------------------------
+// WinFontInfo
+//------------------------------------------------------------------------
+
+class WinFontInfo: public DisplayFontParam {
+public:
+
+ GBool bold, italic;
+
+ static WinFontInfo *make(GooString *nameA, GBool boldA, GBool italicA,
+ HKEY regKey, char *winFontDir);
+ WinFontInfo(GooString *nameA, GBool boldA, GBool italicA,
+ GooString *fileNameA);
+ virtual ~WinFontInfo();
+ GBool equals(WinFontInfo *fi);
+};
+
+WinFontInfo *WinFontInfo::make(GooString *nameA, GBool boldA, GBool italicA,
+ HKEY regKey, char *winFontDir) {
+ GooString *regName;
+ GooString *fileNameA;
+ char buf[MAX_PATH];
+ DWORD n;
+ char c;
+ int i;
+
+ //----- find the font file
+ fileNameA = NULL;
+ regName = nameA->copy();
+ if (boldA) {
+ regName->append(" Bold");
+ }
+ if (italicA) {
+ regName->append(" Italic");
+ }
+ regName->append(" (TrueType)");
+ n = sizeof(buf);
+ if (RegQueryValueEx(regKey, regName->getCString(), NULL, NULL,
+ (LPBYTE)buf, &n) == ERROR_SUCCESS) {
+ fileNameA = new GooString(winFontDir);
+ fileNameA->append('\\')->append(buf);
+ }
+ delete regName;
+ if (!fileNameA) {
+ delete nameA;
+ return NULL;
+ }
+
+ //----- normalize the font name
+ i = 0;
+ while (i < nameA->getLength()) {
+ c = nameA->getChar(i);
+ if (c == ' ' || c == ',' || c == '-') {
+ nameA->del(i);
+ } else {
+ ++i;
+ }
+ }
+
+ return new WinFontInfo(nameA, boldA, italicA, fileNameA);
+}
+
+WinFontInfo::WinFontInfo(GooString *nameA, GBool boldA, GBool italicA,
+ GooString *fileNameA):
+ DisplayFontParam(nameA, displayFontTT)
+{
+ bold = boldA;
+ italic = italicA;
+ tt.fileName = fileNameA;
+}
+
+WinFontInfo::~WinFontInfo() {
+}
+
+GBool WinFontInfo::equals(WinFontInfo *fi) {
+ return !name->cmp(fi->name) && bold == fi->bold && italic == fi->italic;
+}
+
+//------------------------------------------------------------------------
+// WinFontList
+//------------------------------------------------------------------------
+
+class WinFontList {
+public:
+
+ WinFontList(char *winFontDirA);
+ ~WinFontList();
+ WinFontInfo *find(GooString *font);
+
+private:
+
+ void add(WinFontInfo *fi);
+ static int CALLBACK enumFunc1(CONST LOGFONT *font,
+ CONST TEXTMETRIC *metrics,
+ DWORD type, LPARAM data);
+ static int CALLBACK enumFunc2(CONST LOGFONT *font,
+ CONST TEXTMETRIC *metrics,
+ DWORD type, LPARAM data);
+
+ GooList *fonts; // [WinFontInfo]
+ HDC dc; // (only used during enumeration)
+ HKEY regKey; // (only used during enumeration)
+ char *winFontDir; // (only used during enumeration)
+};
+
+WinFontList::WinFontList(char *winFontDirA) {
+ OSVERSIONINFO version;
+ char *path;
+
+ fonts = new GooList();
+ dc = GetDC(NULL);
+ winFontDir = winFontDirA;
+ version.dwOSVersionInfoSize = sizeof(version);
+ GetVersionEx(&version);
+ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\";
+ } else {
+ path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\";
+ }
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0,
+ KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS,
+ &regKey) == ERROR_SUCCESS) {
+ EnumFonts(dc, NULL, &WinFontList::enumFunc1, (LPARAM)this);
+ RegCloseKey(regKey);
+ }
+ ReleaseDC(NULL, dc);
+}
+
+WinFontList::~WinFontList() {
+ deleteGooList(fonts, WinFontInfo);
+}
+
+void WinFontList::add(WinFontInfo *fi) {
+ int i;
+
+ for (i = 0; i < fonts->getLength(); ++i) {
+ if (((WinFontInfo *)fonts->get(i))->equals(fi)) {
+ delete fi;
+ return;
+ }
+ }
+ fonts->append(fi);
+}
+
+WinFontInfo *WinFontList::find(GooString *font) {
+ GooString *name;
+ GBool bold, italic;
+ WinFontInfo *fi;
+ char c;
+ int n, i;
+
+ name = font->copy();
+
+ // remove space, comma, dash chars
+ i = 0;
+ while (i < name->getLength()) {
+ c = name->getChar(i);
+ if (c == ' ' || c == ',' || c == '-') {
+ name->del(i);
+ } else {
+ ++i;
+ }
+ }
+ n = name->getLength();
+
+ // remove trailing "MT" (Foo-MT, Foo-BoldMT, etc.)
+ if (!strcmp(name->getCString() + n - 2, "MT")) {
+ name->del(n - 2, 2);
+ n -= 2;
+ }
+
+ // look for "Italic"
+ if (!strcmp(name->getCString() + n - 6, "Italic")) {
+ name->del(n - 6, 6);
+ italic = gTrue;
+ n -= 6;
+ } else {
+ italic = gFalse;
+ }
+
+ // look for "Bold"
+ if (!strcmp(name->getCString() + n - 4, "Bold")) {
+ name->del(n - 4, 4);
+ bold = gTrue;
+ n -= 4;
+ } else {
+ bold = gFalse;
+ }
+
+ // remove trailing "MT" (FooMT-Bold, etc.)
+ if (!strcmp(name->getCString() + n - 2, "MT")) {
+ name->del(n - 2, 2);
+ n -= 2;
+ }
+
+ // remove trailing "PS"
+ if (!strcmp(name->getCString() + n - 2, "PS")) {
+ name->del(n - 2, 2);
+ n -= 2;
+ }
+
+ // search for the font
+ fi = NULL;
+ for (i = 0; i < fonts->getLength(); ++i) {
+ fi = (WinFontInfo *)fonts->get(i);
+ if (!fi->name->cmp(name) && fi->bold == bold && fi->italic == italic) {
+ break;
+ }
+ fi = NULL;
+ }
+
+ delete name;
+ return fi;
+}
+
+int CALLBACK WinFontList::enumFunc1(CONST LOGFONT *font,
+ CONST TEXTMETRIC *metrics,
+ DWORD type, LPARAM data) {
+ WinFontList *fl = (WinFontList *)data;
+
+ EnumFonts(fl->dc, font->lfFaceName, &WinFontList::enumFunc2, (LPARAM)fl);
+ return 1;
+}
+
+int CALLBACK WinFontList::enumFunc2(CONST LOGFONT *font,
+ CONST TEXTMETRIC *metrics,
+ DWORD type, LPARAM data) {
+ WinFontList *fl = (WinFontList *)data;
+ WinFontInfo *fi;
+
+ if (type & TRUETYPE_FONTTYPE) {
+ if ((fi = WinFontInfo::make(new GooString(font->lfFaceName),
+ font->lfWeight >= 600,
+ font->lfItalic ? gTrue : gFalse,
+ fl->regKey, fl->winFontDir))) {
+ fl->add(fi);
+ }
+ }
+ return 1;
+}
+
+#endif // _WIN32
+#endif // PDF_PARSER_ONLY
+
+//------------------------------------------------------------------------
+// PSFontParam
+//------------------------------------------------------------------------
+
+PSFontParam::PSFontParam(GooString *pdfFontNameA, int wModeA,
+ GooString *psFontNameA, GooString *encodingA) {
+ pdfFontName = pdfFontNameA;
+ wMode = wModeA;
+ psFontName = psFontNameA;
+ encoding = encodingA;
+}
+
+PSFontParam::~PSFontParam() {
+ delete pdfFontName;
+ delete psFontName;
+ if (encoding) {
+ delete encoding;
+ }
+}
+
+#ifdef ENABLE_PLUGINS
+//------------------------------------------------------------------------
+// Plugin
+//------------------------------------------------------------------------
+
+class Plugin {
+public:
+
+ static Plugin *load(char *type, char *name);
+ ~Plugin();
+
+private:
+
+#ifdef _WIN32
+ Plugin(HMODULE libA);
+ HMODULE lib;
+#else
+ Plugin(void *dlA);
+ void *dl;
+#endif
+};
+
+Plugin *Plugin::load(char *type, char *name) {
+ GooString *path;
+ Plugin *plugin;
+ XpdfPluginVecTable *vt;
+ XpdfBool (*xpdfInitPlugin)(void);
+#ifdef _WIN32
+ HMODULE libA;
+#else
+ void *dlA;
+#endif
+
+ path = globalParams->getBaseDir();
+ appendToPath(path, "plugins");
+ appendToPath(path, type);
+ appendToPath(path, name);
+
+#ifdef _WIN32
+ path->append(".dll");
+ if (!(libA = LoadLibrary(path->getCString()))) {
+ error(-1, "Failed to load plugin '%s'",
+ path->getCString());
+ goto err1;
+ }
+ if (!(vt = (XpdfPluginVecTable *)
+ GetProcAddress(libA, "xpdfPluginVecTable"))) {
+ error(-1, "Failed to find xpdfPluginVecTable in plugin '%s'",
+ path->getCString());
+ goto err2;
+ }
+#else
+ //~ need to deal with other extensions here
+ path->append(".so");
+ if (!(dlA = dlopen(path->getCString(), RTLD_NOW))) {
+ error(-1, "Failed to load plugin '%s': %s",
+ path->getCString(), dlerror());
+ goto err1;
+ }
+ if (!(vt = (XpdfPluginVecTable *)dlsym(dlA, "xpdfPluginVecTable"))) {
+ error(-1, "Failed to find xpdfPluginVecTable in plugin '%s'",
+ path->getCString());
+ goto err2;
+ }
+#endif
+
+ if (vt->version != xpdfPluginVecTable.version) {
+ error(-1, "Plugin '%s' is wrong version", path->getCString());
+ goto err2;
+ }
+ memcpy(vt, &xpdfPluginVecTable, sizeof(xpdfPluginVecTable));
+
+#ifdef _WIN32
+ if (!(xpdfInitPlugin = (XpdfBool (*)(void))
+ GetProcAddress(libA, "xpdfInitPlugin"))) {
+ error(-1, "Failed to find xpdfInitPlugin in plugin '%s'",
+ path->getCString());
+ goto err2;
+ }
+#else
+ if (!(xpdfInitPlugin = (XpdfBool (*)(void))dlsym(dlA, "xpdfInitPlugin"))) {
+ error(-1, "Failed to find xpdfInitPlugin in plugin '%s'",
+ path->getCString());
+ goto err2;
+ }
+#endif
+
+ if (!(*xpdfInitPlugin)()) {
+ error(-1, "Initialization of plugin '%s' failed",
+ path->getCString());
+ goto err2;
+ }
+
+#ifdef _WIN32
+ plugin = new Plugin(libA);
+#else
+ plugin = new Plugin(dlA);
+#endif
+
+ delete path;
+ return plugin;
+
+ err2:
+#ifdef _WIN32
+ FreeLibrary(libA);
+#else
+ dlclose(dlA);
+#endif
+ err1:
+ delete path;
+ return NULL;
+}
+
+#ifdef _WIN32
+Plugin::Plugin(HMODULE libA) {
+ lib = libA;
+}
+#else
+Plugin::Plugin(void *dlA) {
+ dl = dlA;
+}
+#endif
+
+Plugin::~Plugin() {
+ void (*xpdfFreePlugin)(void);
+
+#ifdef _WIN32
+ if ((xpdfFreePlugin = (void (*)(void))
+ GetProcAddress(lib, "xpdfFreePlugin"))) {
+ (*xpdfFreePlugin)();
+ }
+ FreeLibrary(lib);
+#else
+ if ((xpdfFreePlugin = (void (*)(void))dlsym(dl, "xpdfFreePlugin"))) {
+ (*xpdfFreePlugin)();
+ }
+ dlclose(dl);
+#endif
+}
+
+#endif // ENABLE_PLUGINS
+
+//------------------------------------------------------------------------
+// parsing
+//------------------------------------------------------------------------
+
+GlobalParams::GlobalParams(const char *customPopplerDataDir)
+ : popplerDataDir(customPopplerDataDir)
+{
+ UnicodeMap *map;
+ int i;
+
+#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER)
+ FcInit();
+ FCcfg = FcConfigGetCurrent();
+#endif
+
+#if MULTITHREADED
+ gInitMutex(&mutex);
+ gInitMutex(&unicodeMapCacheMutex);
+ gInitMutex(&cMapCacheMutex);
+#endif
+
+ initBuiltinFontTables();
+
+ // scan the encoding in reverse because we want the lowest-numbered
+ // index for each char name ('space' is encoded twice)
+ macRomanReverseMap = new NameToCharCode();
+ for (i = 255; i >= 0; --i) {
+ if (macRomanEncoding[i]) {
+ macRomanReverseMap->add(macRomanEncoding[i], (CharCode)i);
+ }
+ }
+
+#ifdef _WIN32
+ // baseDir will be set by a call to setBaseDir
+ baseDir = new GooString();
+#else
+ baseDir = appendToPath(getHomeDir(), ".xpdf");
+#endif
+ nameToUnicode = new NameToCharCode();
+ cidToUnicodes = new GooHash(gTrue);
+ unicodeToUnicodes = new GooHash(gTrue);
+ residentUnicodeMaps = new GooHash();
+ unicodeMaps = new GooHash(gTrue);
+ cMapDirs = new GooHash(gTrue);
+ toUnicodeDirs = new GooList();
+ displayFonts = new GooHash();
+ psExpandSmaller = gFalse;
+ psShrinkLarger = gTrue;
+ psCenter = gTrue;
+ psLevel = psLevel2;
+ psFonts = new GooHash();
+ psNamedFonts16 = new GooList();
+ psFonts16 = new GooList();
+ psEmbedType1 = gTrue;
+ psEmbedTrueType = gTrue;
+ psEmbedCIDPostScript = gTrue;
+ psEmbedCIDTrueType = gTrue;
+ psSubstFonts = gTrue;
+ psPreload = gFalse;
+ psOPI = gFalse;
+ psASCIIHex = gFalse;
+ textEncoding = new GooString("UTF-8");
+#if defined(_WIN32)
+ textEOL = eolDOS;
+#elif defined(MACOS)
+ textEOL = eolMac;
+#else
+ textEOL = eolUnix;
+#endif
+ textPageBreaks = gTrue;
+ textKeepTinyChars = gFalse;
+ fontDirs = new GooList();
+ enableFreeType = gTrue;
+ antialias = gTrue;
+ vectorAntialias = gTrue;
+ strokeAdjust = gTrue;
+ screenType = screenUnset;
+ screenSize = -1;
+ screenDotRadius = -1;
+ screenGamma = 1.0;
+ screenBlackThreshold = 0.0;
+ screenWhiteThreshold = 1.0;
+ mapNumericCharNames = gTrue;
+ mapUnknownCharNames = gFalse;
+ printCommands = gFalse;
+ profileCommands = gFalse;
+ errQuiet = gFalse;
+
+ cidToUnicodeCache = new CharCodeToUnicodeCache(cidToUnicodeCacheSize);
+ unicodeToUnicodeCache =
+ new CharCodeToUnicodeCache(unicodeToUnicodeCacheSize);
+ unicodeMapCache = new UnicodeMapCache();
+ cMapCache = new CMapCache();
+
+#ifdef _WIN32
+ baseFontsInitialized = gFalse;
+ winFontList = NULL;
+#endif
+
+#ifdef ENABLE_PLUGINS
+ plugins = new GooList();
+ securityHandlers = new GooList();
+#endif
+
+ // set up the initial nameToUnicode table
+ for (i = 0; nameToUnicodeTab[i].name; ++i) {
+ nameToUnicode->add(nameToUnicodeTab[i].name, nameToUnicodeTab[i].u);
+ }
+
+ // set up the residentUnicodeMaps table
+ map = new UnicodeMap("Latin1", gFalse,
+ latin1UnicodeMapRanges, latin1UnicodeMapLen);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+ map = new UnicodeMap("ASCII7", gFalse,
+ ascii7UnicodeMapRanges, ascii7UnicodeMapLen);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+ map = new UnicodeMap("Symbol", gFalse,
+ symbolUnicodeMapRanges, symbolUnicodeMapLen);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+ map = new UnicodeMap("ZapfDingbats", gFalse, zapfDingbatsUnicodeMapRanges,
+ zapfDingbatsUnicodeMapLen);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+ map = new UnicodeMap("UTF-8", gTrue, &mapUTF8);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+ map = new UnicodeMap("UCS-2", gTrue, &mapUCS2);
+ residentUnicodeMaps->add(map->getEncodingName(), map);
+
+ scanEncodingDirs();
+}
+
+void GlobalParams::scanEncodingDirs() {
+ GDir *dir;
+ GDirEntry *entry;
+ const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR;
+
+ // allocate buffer large enough to append "/nameToUnicode"
+ size_t bufSize = strlen(dataRoot) + strlen("/nameToUnicode") + 1;
+ char *dataPathBuffer = new char[bufSize];
+
+ snprintf(dataPathBuffer, bufSize, "%s/nameToUnicode", dataRoot);
+ dir = new GDir(dataPathBuffer, gTrue);
+ while (entry = dir->getNextEntry(), entry != NULL) {
+ if (!entry->isDir()) {
+ parseNameToUnicode(entry->getFullPath());
+ }
+ delete entry;
+ }
+ delete dir;
+
+ snprintf(dataPathBuffer, bufSize, "%s/cidToUnicode", dataRoot);
+ dir = new GDir(dataPathBuffer, gFalse);
+ while (entry = dir->getNextEntry(), entry != NULL) {
+ addCIDToUnicode(entry->getName(), entry->getFullPath());
+ delete entry;
+ }
+ delete dir;
+
+ snprintf(dataPathBuffer, bufSize, "%s/unicodeMap", dataRoot);
+ dir = new GDir(dataPathBuffer, gFalse);
+ while (entry = dir->getNextEntry(), entry != NULL) {
+ addUnicodeMap(entry->getName(), entry->getFullPath());
+ delete entry;
+ }
+ delete dir;
+
+ snprintf(dataPathBuffer, bufSize, "%s/cMap", dataRoot);
+ dir = new GDir(dataPathBuffer, gFalse);
+ while (entry = dir->getNextEntry(), entry != NULL) {
+ addCMapDir(entry->getName(), entry->getFullPath());
+ toUnicodeDirs->append(entry->getFullPath()->copy());
+ delete entry;
+ }
+ delete dir;
+
+ delete[] dataPathBuffer;
+}
+
+void GlobalParams::parseNameToUnicode(GooString *name) {
+ char *tok1, *tok2;
+ FILE *f;
+ char buf[256];
+ int line;
+ Unicode u;
+
+ if (!(f = fopen(name->getCString(), "r"))) {
+ error(-1, "Couldn't open 'nameToUnicode' file '%s'",
+ name->getCString());
+ return;
+ }
+ line = 1;
+ while (getLine(buf, sizeof(buf), f)) {
+ tok1 = strtok(buf, " \t\r\n");
+ tok2 = strtok(NULL, " \t\r\n");
+ if (tok1 && tok2) {
+ sscanf(tok1, "%x", &u);
+ nameToUnicode->add(tok2, u);
+ } else {
+ error(-1, "Bad line in 'nameToUnicode' file (%s:%d)",
+ name->getCString(), line);
+ }
+ ++line;
+ }
+ fclose(f);
+}
+
+void GlobalParams::addCIDToUnicode(GooString *collection,
+ GooString *fileName) {
+ GooString *old;
+
+ if ((old = (GooString *)cidToUnicodes->remove(collection))) {
+ delete old;
+ }
+ cidToUnicodes->add(collection->copy(), fileName->copy());
+}
+
+void GlobalParams::addUnicodeMap(GooString *encodingName, GooString *fileName)
+{
+ GooString *old;
+
+ if ((old = (GooString *)unicodeMaps->remove(encodingName))) {
+ delete old;
+ }
+ unicodeMaps->add(encodingName->copy(), fileName->copy());
+}
+
+void GlobalParams::addCMapDir(GooString *collection, GooString *dir) {
+ GooList *list;
+
+ if (!(list = (GooList *)cMapDirs->lookup(collection))) {
+ list = new GooList();
+ cMapDirs->add(collection->copy(), list);
+ }
+ list->append(dir->copy());
+}
+
+GBool GlobalParams::parseYesNo2(char *token, GBool *flag) {
+ if (!strcmp(token, "yes")) {
+ *flag = gTrue;
+ } else if (!strcmp(token, "no")) {
+ *flag = gFalse;
+ } else {
+ return gFalse;
+ }
+ return gTrue;
+}
+
+GlobalParams::~GlobalParams() {
+ freeBuiltinFontTables();
+
+ delete macRomanReverseMap;
+
+ delete baseDir;
+ delete nameToUnicode;
+ deleteGooHash(cidToUnicodes, GooString);
+ deleteGooHash(unicodeToUnicodes, GooString);
+ deleteGooHash(residentUnicodeMaps, UnicodeMap);
+ deleteGooHash(unicodeMaps, GooString);
+ deleteGooList(toUnicodeDirs, GooString);
+ deleteGooHash(displayFonts, DisplayFontParam);
+#ifdef _WIN32
+ delete winFontList;
+#endif
+ deleteGooHash(psFonts, PSFontParam);
+ deleteGooList(psNamedFonts16, PSFontParam);
+ deleteGooList(psFonts16, PSFontParam);
+ delete textEncoding;
+ deleteGooList(fontDirs, GooString);
+
+ GooHashIter *iter;
+ GooString *key;
+ cMapDirs->startIter(&iter);
+ void *val;
+ while (cMapDirs->getNext(&iter, &key, &val)) {
+ GooList* list = (GooList*)val;
+ deleteGooList(list, GooString);
+ }
+ delete cMapDirs;
+
+ delete cidToUnicodeCache;
+ delete unicodeToUnicodeCache;
+ delete unicodeMapCache;
+ delete cMapCache;
+
+#ifdef ENABLE_PLUGINS
+ delete securityHandlers;
+ deleteGooList(plugins, Plugin);
+#endif
+
+#if MULTITHREADED
+ gDestroyMutex(&mutex);
+ gDestroyMutex(&unicodeMapCacheMutex);
+ gDestroyMutex(&cMapCacheMutex);
+#endif
+}
+
+//------------------------------------------------------------------------
+
+void GlobalParams::setBaseDir(char *dir) {
+ delete baseDir;
+ baseDir = new GooString(dir);
+}
+
+//------------------------------------------------------------------------
+// accessors
+//------------------------------------------------------------------------
+
+CharCode GlobalParams::getMacRomanCharCode(char *charName) {
+ // no need to lock - macRomanReverseMap is constant
+ return macRomanReverseMap->lookup(charName);
+}
+
+GooString *GlobalParams::getBaseDir() {
+ GooString *s;
+
+ lockGlobalParams;
+ s = baseDir->copy();
+ unlockGlobalParams;
+ return s;
+}
+
+Unicode GlobalParams::mapNameToUnicode(char *charName) {
+ // no need to lock - nameToUnicode is constant
+ return nameToUnicode->lookup(charName);
+}
+
+UnicodeMap *GlobalParams::getResidentUnicodeMap(GooString *encodingName) {
+ UnicodeMap *map;
+
+ lockGlobalParams;
+ map = (UnicodeMap *)residentUnicodeMaps->lookup(encodingName);
+ unlockGlobalParams;
+ if (map) {
+ map->incRefCnt();
+ }
+ return map;
+}
+
+FILE *GlobalParams::getUnicodeMapFile(GooString *encodingName) {
+ GooString *fileName;
+ FILE *f;
+
+ lockGlobalParams;
+ if ((fileName = (GooString *)unicodeMaps->lookup(encodingName))) {
+ f = fopen(fileName->getCString(), "r");
+ } else {
+ f = NULL;
+ }
+ unlockGlobalParams;
+ return f;
+}
+
+FILE *GlobalParams::findCMapFile(GooString *collection, GooString *cMapName) {
+ GooList *list;
+ GooString *dir;
+ GooString *fileName;
+ FILE *f;
+ int i;
+
+ lockGlobalParams;
+ if (!(list = (GooList *)cMapDirs->lookup(collection))) {
+ unlockGlobalParams;
+ return NULL;
+ }
+ for (i = 0; i < list->getLength(); ++i) {
+ dir = (GooString *)list->get(i);
+ fileName = appendToPath(dir->copy(), cMapName->getCString());
+ f = fopen(fileName->getCString(), "r");
+ delete fileName;
+ if (f) {
+ unlockGlobalParams;
+ return f;
+ }
+ }
+ unlockGlobalParams;
+ return NULL;
+}
+
+FILE *GlobalParams::findToUnicodeFile(GooString *name) {
+ GooString *dir, *fileName;
+ FILE *f;
+ int i;
+
+ lockGlobalParams;
+ for (i = 0; i < toUnicodeDirs->getLength(); ++i) {
+ dir = (GooString *)toUnicodeDirs->get(i);
+ fileName = appendToPath(dir->copy(), name->getCString());
+ f = fopen(fileName->getCString(), "r");
+ delete fileName;
+ if (f) {
+ unlockGlobalParams;
+ return f;
+ }
+ }
+ unlockGlobalParams;
+ return NULL;
+}
+
+#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER)
+static GBool findModifier(const char *name, const char *modifier, const char **start)
+{
+ const char *match;
+
+ if (name == NULL)
+ return gFalse;
+
+ match = strstr(name, modifier);
+ if (match) {
+ if (*start == NULL || match < *start)
+ *start = match;
+ return gTrue;
+ }
+ else {
+ return gFalse;
+ }
+}
+
+static FcPattern *buildFcPattern(GfxFont *font)
+{
+ int weight = -1,
+ slant = -1,
+ width = -1,
+ spacing = -1;
+ bool deleteFamily = false;
+ char *family, *name, *lang, *modifiers;
+ const char *start;
+ FcPattern *p;
+
+ // this is all heuristics will be overwritten if font had proper info
+ name = font->getName()->getCString();
+
+ modifiers = strchr (name, ',');
+ if (modifiers == NULL)
+ modifiers = strchr (name, '-');
+
+ // remove the - from the names, for some reason, Fontconfig does not
+ // understand "MS-Mincho" but does with "MS Mincho"
+ int len = strlen(name);
+ for (int i = 0; i < len; i++)
+ name[i] = (name[i] == '-' ? ' ' : name[i]);
+
+ start = NULL;
+ findModifier(modifiers, "Regular", &start);
+ findModifier(modifiers, "Roman", &start);
+
+ if (findModifier(modifiers, "Oblique", &start))
+ slant = FC_SLANT_OBLIQUE;
+ if (findModifier(modifiers, "Italic", &start))
+ slant = FC_SLANT_ITALIC;
+ if (findModifier(modifiers, "Bold", &start))
+ weight = FC_WEIGHT_BOLD;
+ if (findModifier(modifiers, "Light", &start))
+ weight = FC_WEIGHT_LIGHT;
+ if (findModifier(modifiers, "Condensed", &start))
+ width = FC_WIDTH_CONDENSED;
+
+ if (start) {
+ // There have been "modifiers" in the name, crop them to obtain
+ // the family name
+ family = new char[len+1];
+ strcpy(family, name);
+ int pos = (modifiers - name);
+ family[pos] = '\0';
+ deleteFamily = true;
+ }
+ else {
+ family = name;
+ }
+
+ // use font flags
+ if (font->isFixedWidth())
+ spacing = FC_MONO;
+ if (font->isBold())
+ weight = FC_WEIGHT_BOLD;
+ if (font->isItalic())
+ slant = FC_SLANT_ITALIC;
+
+ // if the FontDescriptor specified a family name use it
+ if (font->getFamily()) {
+ if (deleteFamily) {
+ delete[] family;
+ deleteFamily = false;
+ }
+ family = font->getFamily()->getCString();
+ }
+
+ // if the FontDescriptor specified a weight use it
+ switch (font -> getWeight())
+ {
+ case GfxFont::W100: weight = FC_WEIGHT_EXTRALIGHT; break;
+ case GfxFont::W200: weight = FC_WEIGHT_LIGHT; break;
+ case GfxFont::W300: weight = FC_WEIGHT_BOOK; break;
+ case GfxFont::W400: weight = FC_WEIGHT_NORMAL; break;
+ case GfxFont::W500: weight = FC_WEIGHT_MEDIUM; break;
+ case GfxFont::W600: weight = FC_WEIGHT_DEMIBOLD; break;
+ case GfxFont::W700: weight = FC_WEIGHT_BOLD; break;
+ case GfxFont::W800: weight = FC_WEIGHT_EXTRABOLD; break;
+ case GfxFont::W900: weight = FC_WEIGHT_BLACK; break;
+ default: break;
+ }
+
+ // if the FontDescriptor specified a width use it
+ switch (font -> getStretch())
+ {
+ case GfxFont::UltraCondensed: width = FC_WIDTH_ULTRACONDENSED; break;
+ case GfxFont::ExtraCondensed: width = FC_WIDTH_EXTRACONDENSED; break;
+ case GfxFont::Condensed: width = FC_WIDTH_CONDENSED; break;
+ case GfxFont::SemiCondensed: width = FC_WIDTH_SEMICONDENSED; break;
+ case GfxFont::Normal: width = FC_WIDTH_NORMAL; break;
+ case GfxFont::SemiExpanded: width = FC_WIDTH_SEMIEXPANDED; break;
+ case GfxFont::Expanded: width = FC_WIDTH_EXPANDED; break;
+ case GfxFont::ExtraExpanded: width = FC_WIDTH_EXTRAEXPANDED; break;
+ case GfxFont::UltraExpanded: width = FC_WIDTH_ULTRAEXPANDED; break;
+ default: break;
+ }
+
+ // find the language we want the font to support
+ if (font->isCIDFont())
+ {
+ GooString *collection = ((GfxCIDFont *)font)->getCollection();
+ if (collection)
+ {
+ if (strcmp(collection->getCString(), "Adobe-GB1") == 0)
+ lang = "zh-cn"; // Simplified Chinese
+ else if (strcmp(collection->getCString(), "Adobe-CNS1") == 0)
+ lang = "zh-tw"; // Traditional Chinese
+ else if (strcmp(collection->getCString(), "Adobe-Japan1") == 0)
+ lang = "ja"; // Japanese
+ else if (strcmp(collection->getCString(), "Adobe-Japan2") == 0)
+ lang = "ja"; // Japanese
+ else if (strcmp(collection->getCString(), "Adobe-Korea1") == 0)
+ lang = "ko"; // Korean
+ else if (strcmp(collection->getCString(), "Adobe-UCS") == 0)
+ lang = "xx";
+ else if (strcmp(collection->getCString(), "Adobe-Identity") == 0)
+ lang = "xx";
+ else
+ {
+ error(-1, "Unknown CID font collection, please report to poppler bugzilla.");
+ lang = "xx";
+ }
+ }
+ else lang = "xx";
+ }
+ else lang = "xx";
+
+ p = FcPatternBuild(NULL,
+ FC_FAMILY, FcTypeString, family,
+ FC_LANG, FcTypeString, lang,
+ NULL);
+ if (slant != -1) FcPatternAddInteger(p, FC_SLANT, slant);
+ if (weight != -1) FcPatternAddInteger(p, FC_WEIGHT, weight);
+ if (width != -1) FcPatternAddInteger(p, FC_WIDTH, width);
+ if (spacing != -1) FcPatternAddInteger(p, FC_SPACING, spacing);
+
+ if (deleteFamily)
+ delete[] family;
+ return p;
+}
+#endif
+
+/* if you can't or don't want to use Fontconfig, you need to implement
+ this function for your platform. For Windows, it's in GlobalParamsWin.cc
+*/
+#ifdef PDF_PARSER_ONLY
+DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
+ return (DisplayFontParam * )NULL;
+}
+#else
+#ifndef _MSC_VER
+DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
+ DisplayFontParam *dfp;
+ FcPattern *p=0;
+
+ GooString *fontName = font->getName();
+ if (!fontName) return NULL;
+
+ lockGlobalParams;
+ dfp = font->dfp;
+ if (!dfp)
+ {
+ FcChar8* s;
+ char * ext;
+ FcResult res;
+ FcFontSet *set;
+ int i;
+ p = buildFcPattern(font);
+
+ if (!p)
+ goto fin;
+ FcConfigSubstitute(FCcfg, p, FcMatchPattern);
+ FcDefaultSubstitute(p);
+ set = FcFontSort(FCcfg, p, FcFalse, NULL, &res);
+ if (!set)
+ goto fin;
+ for (i = 0; i < set->nfont; ++i)
+ {
+ res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s);
+ if (res != FcResultMatch || !s)
+ continue;
+ ext = strrchr((char*)s,'.');
+ if (!ext)
+ continue;
+ if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4))
+ {
+ dfp = new DisplayFontParam(fontName->copy(), displayFontTT);
+ dfp->tt.fileName = new GooString((char*)s);
+ FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, &(dfp->tt.faceIndex));
+ }
+ else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4))
+ {
+ dfp = new DisplayFontParam(fontName->copy(), displayFontT1);
+ dfp->t1.fileName = new GooString((char*)s);
+ }
+ else
+ continue;
+ font->dfp = dfp;
+ break;
+ }
+ FcFontSetDestroy(set);
+ }
+fin:
+ if (p)
+ FcPatternDestroy(p);
+
+ unlockGlobalParams;
+ return dfp;
+}
+#endif
+#endif
+
+GBool GlobalParams::getPSExpandSmaller() {
+ GBool f;
+
+ lockGlobalParams;
+ f = psExpandSmaller;
+ unlockGlobalParams;
+ return f;
+}
+
+GBool GlobalParams::getPSShrinkLarger() {
+ GBool f;
+
+ lockGlobalParams;
+ f = psShrinkLarger;
+ unlockGlobalParams;
+ return f;
+}
+
+GBool GlobalParams::getPSCenter() {
+ GBool f;
+
+ lockGlobalParams;
+ f = psCenter;
+ unlockGlobalParams;
+ return f;
+}
+
+PSLevel GlobalParams::getPSLevel() {
+ PSLevel level;
+
+ lockGlobalParams;
+ level = psLevel;
+ unlockGlobalParams;
+ return level;
+}
+
+PSFontParam *GlobalParams::getPSFont(GooString *fontName) {
+ PSFontParam *p;
+
+ lockGlobalParams;
+ p = (PSFontParam *)psFonts->lookup(fontName);
+ unlockGlobalParams;
+ return p;
+}
+
+PSFontParam *GlobalParams::getPSFont16(GooString *fontName,
+ GooString *collection, int wMode) {
+ PSFontParam *p;
+ int i;
+
+ lockGlobalParams;
+ p = NULL;
+ if (fontName) {
+ for (i = 0; i < psNamedFonts16->getLength(); ++i) {
+ p = (PSFontParam *)psNamedFonts16->get(i);
+ if (!p->pdfFontName->cmp(fontName) &&
+ p->wMode == wMode) {
+ break;
+ }
+ p = NULL;
+ }
+ }
+ if (!p && collection) {
+ for (i = 0; i < psFonts16->getLength(); ++i) {
+ p = (PSFontParam *)psFonts16->get(i);
+ if (!p->pdfFontName->cmp(collection) &&
+ p->wMode == wMode) {
+ break;
+ }
+ p = NULL;
+ }
+ }
+ unlockGlobalParams;
+ return p;
+}
+
+GBool GlobalParams::getPSEmbedType1() {
+ GBool e;
+
+ lockGlobalParams;
+ e = psEmbedType1;
+ unlockGlobalParams;
+ return e;
+}
+
+GBool GlobalParams::getPSEmbedTrueType() {
+ GBool e;
+
+ lockGlobalParams;
+ e = psEmbedTrueType;
+ unlockGlobalParams;
+ return e;
+}
+
+GBool GlobalParams::getPSEmbedCIDPostScript() {
+ GBool e;
+
+ lockGlobalParams;
+ e = psEmbedCIDPostScript;
+ unlockGlobalParams;
+ return e;
+}
+
+GBool GlobalParams::getPSEmbedCIDTrueType() {
+ GBool e;
+
+ lockGlobalParams;
+ e = psEmbedCIDTrueType;
+ unlockGlobalParams;
+ return e;
+}
+
+GBool GlobalParams::getPSSubstFonts() {
+ GBool e;
+
+ lockGlobalParams;
+ e = psSubstFonts;
+ unlockGlobalParams;
+ return e;
+}
+
+GBool GlobalParams::getPSPreload() {
+ GBool preload;
+
+ lockGlobalParams;
+ preload = psPreload;
+ unlockGlobalParams;
+ return preload;
+}
+
+GBool GlobalParams::getPSOPI() {
+ GBool opi;
+
+ lockGlobalParams;
+ opi = psOPI;
+ unlockGlobalParams;
+ return opi;
+}
+
+GBool GlobalParams::getPSASCIIHex() {
+ GBool ah;
+
+ lockGlobalParams;
+ ah = psASCIIHex;
+ unlockGlobalParams;
+ return ah;
+}
+
+GooString *GlobalParams::getTextEncodingName() {
+ GooString *s;
+
+ lockGlobalParams;
+ s = textEncoding->copy();
+ unlockGlobalParams;
+ return s;
+}
+
+EndOfLineKind GlobalParams::getTextEOL() {
+ EndOfLineKind eol;
+
+ lockGlobalParams;
+ eol = textEOL;
+ unlockGlobalParams;
+ return eol;
+}
+
+GBool GlobalParams::getTextPageBreaks() {
+ GBool pageBreaks;
+
+ lockGlobalParams;
+ pageBreaks = textPageBreaks;
+ unlockGlobalParams;
+ return pageBreaks;
+}
+
+GBool GlobalParams::getTextKeepTinyChars() {
+ GBool tiny;
+
+ lockGlobalParams;
+ tiny = textKeepTinyChars;
+ unlockGlobalParams;
+ return tiny;
+}
+
+GooString *GlobalParams::findFontFile(GooString *fontName, char **exts) {
+ GooString *dir, *fileName;
+ char **ext;
+ FILE *f;
+ int i;
+
+ lockGlobalParams;
+ for (i = 0; i < fontDirs->getLength(); ++i) {
+ dir = (GooString *)fontDirs->get(i);
+ for (ext = exts; *ext; ++ext) {
+ fileName = appendToPath(dir->copy(), fontName->getCString());
+ fileName->append(*ext);
+ if ((f = fopen(fileName->getCString(), "rb"))) {
+ fclose(f);
+ unlockGlobalParams;
+ return fileName;
+ }
+ delete fileName;
+ }
+ }
+ unlockGlobalParams;
+ return NULL;
+}
+
+GBool GlobalParams::getEnableFreeType() {
+ GBool f;
+
+ lockGlobalParams;
+ f = enableFreeType;
+ unlockGlobalParams;
+ return f;
+}
+
+
+GBool GlobalParams::getAntialias() {
+ GBool f;
+
+ lockGlobalParams;
+ f = antialias;
+ unlockGlobalParams;
+ return f;
+}
+
+GBool GlobalParams::getVectorAntialias() {
+ GBool f;
+
+ lockGlobalParams;
+ f = vectorAntialias;
+ unlockGlobalParams;
+ return f;
+}
+
+GBool GlobalParams::getStrokeAdjust() {
+ GBool f;
+
+ lockGlobalParams;
+ f = strokeAdjust;
+ unlockGlobalParams;
+ return f;
+}
+
+ScreenType GlobalParams::getScreenType() {
+ ScreenType t;
+
+ lockGlobalParams;
+ t = screenType;
+ unlockGlobalParams;
+ return t;
+}
+
+int GlobalParams::getScreenSize() {
+ int size;
+
+ lockGlobalParams;
+ size = screenSize;
+ unlockGlobalParams;
+ return size;
+}
+
+int GlobalParams::getScreenDotRadius() {
+ int r;
+
+ lockGlobalParams;
+ r = screenDotRadius;
+ unlockGlobalParams;
+ return r;
+}
+
+double GlobalParams::getScreenGamma() {
+ double gamma;
+
+ lockGlobalParams;
+ gamma = screenGamma;
+ unlockGlobalParams;
+ return gamma;
+}
+
+double GlobalParams::getScreenBlackThreshold() {
+ double thresh;
+
+ lockGlobalParams;
+ thresh = screenBlackThreshold;
+ unlockGlobalParams;
+ return thresh;
+}
+
+double GlobalParams::getScreenWhiteThreshold() {
+ double thresh;
+
+ lockGlobalParams;
+ thresh = screenWhiteThreshold;
+ unlockGlobalParams;
+ return thresh;
+}
+
+GBool GlobalParams::getMapNumericCharNames() {
+ GBool map;
+
+ lockGlobalParams;
+ map = mapNumericCharNames;
+ unlockGlobalParams;
+ return map;
+}
+
+GBool GlobalParams::getMapUnknownCharNames() {
+ GBool map;
+
+ lockGlobalParams;
+ map = mapUnknownCharNames;
+ unlockGlobalParams;
+ return map;
+}
+
+GBool GlobalParams::getPrintCommands() {
+ GBool p;
+
+ lockGlobalParams;
+ p = printCommands;
+ unlockGlobalParams;
+ return p;
+}
+
+GBool GlobalParams::getProfileCommands() {
+ GBool p;
+
+ lockGlobalParams;
+ p = profileCommands;
+ unlockGlobalParams;
+ return p;
+}
+
+GBool GlobalParams::getErrQuiet() {
+ // no locking -- this function may get called from inside a locked
+ // section
+ return errQuiet;
+}
+
+CharCodeToUnicode *GlobalParams::getCIDToUnicode(GooString *collection) {
+ GooString *fileName;
+ CharCodeToUnicode *ctu;
+
+ lockGlobalParams;
+ if (!(ctu = cidToUnicodeCache->getCharCodeToUnicode(collection))) {
+ if ((fileName = (GooString *)cidToUnicodes->lookup(collection)) &&
+ (ctu = CharCodeToUnicode::parseCIDToUnicode(fileName, collection))) {
+ cidToUnicodeCache->add(ctu);
+ }
+ }
+ unlockGlobalParams;
+ return ctu;
+}
+
+CharCodeToUnicode *GlobalParams::getUnicodeToUnicode(GooString *fontName) {
+ lockGlobalParams;
+ GooHashIter *iter;
+ unicodeToUnicodes->startIter(&iter);
+ GooString *fileName = NULL;
+ GooString *fontPattern;
+ void *val;
+ while (!fileName && unicodeToUnicodes->getNext(&iter, &fontPattern, &val)) {
+ if (strstr(fontName->getCString(), fontPattern->getCString())) {
+ unicodeToUnicodes->killIter(&iter);
+ fileName = (GooString*)val;
+ }
+ }
+ CharCodeToUnicode *ctu = NULL;
+ if (fileName) {
+ ctu = unicodeToUnicodeCache->getCharCodeToUnicode(fileName);
+ if (!ctu) {
+ ctu = CharCodeToUnicode::parseUnicodeToUnicode(fileName);
+ if (ctu)
+ unicodeToUnicodeCache->add(ctu);
+ }
+ }
+ unlockGlobalParams;
+ return ctu;
+}
+
+UnicodeMap *GlobalParams::getUnicodeMap(GooString *encodingName) {
+ return getUnicodeMap2(encodingName);
+}
+
+UnicodeMap *GlobalParams::getUnicodeMap2(GooString *encodingName) {
+ UnicodeMap *map;
+
+ if (!(map = getResidentUnicodeMap(encodingName))) {
+ lockUnicodeMapCache;
+ map = unicodeMapCache->getUnicodeMap(encodingName);
+ unlockUnicodeMapCache;
+ }
+ return map;
+}
+
+CMap *GlobalParams::getCMap(GooString *collection, GooString *cMapName, Stream *stream) {
+ CMap *cMap;
+
+ lockCMapCache;
+ cMap = cMapCache->getCMap(collection, cMapName, stream);
+ unlockCMapCache;
+ return cMap;
+}
+
+UnicodeMap *GlobalParams::getTextEncoding() {
+ return getUnicodeMap2(textEncoding);
+}
+
+GooList *GlobalParams::getEncodingNames()
+{
+ GooList *result = new GooList;
+ GooHashIter *iter;
+ GooString *key;
+ void *val;
+ residentUnicodeMaps->startIter(&iter);
+ while (residentUnicodeMaps->getNext(&iter, &key, &val)) {
+ result->append(key);
+ }
+ residentUnicodeMaps->killIter(&iter);
+ unicodeMaps->startIter(&iter);
+ while (unicodeMaps->getNext(&iter, &key, &val)) {
+ result->append(key);
+ }
+ unicodeMaps->killIter(&iter);
+ return result;
+}
+
+//------------------------------------------------------------------------
+// functions to set parameters
+//------------------------------------------------------------------------
+
+void GlobalParams::setPSExpandSmaller(GBool expand) {
+ lockGlobalParams;
+ psExpandSmaller = expand;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSShrinkLarger(GBool shrink) {
+ lockGlobalParams;
+ psShrinkLarger = shrink;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSCenter(GBool center) {
+ lockGlobalParams;
+ psCenter = center;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSLevel(PSLevel level) {
+ lockGlobalParams;
+ psLevel = level;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSEmbedType1(GBool embed) {
+ lockGlobalParams;
+ psEmbedType1 = embed;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSEmbedTrueType(GBool embed) {
+ lockGlobalParams;
+ psEmbedTrueType = embed;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSEmbedCIDPostScript(GBool embed) {
+ lockGlobalParams;
+ psEmbedCIDPostScript = embed;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSEmbedCIDTrueType(GBool embed) {
+ lockGlobalParams;
+ psEmbedCIDTrueType = embed;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSSubstFonts(GBool substFonts) {
+ lockGlobalParams;
+ psSubstFonts = substFonts;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSPreload(GBool preload) {
+ lockGlobalParams;
+ psPreload = preload;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSOPI(GBool opi) {
+ lockGlobalParams;
+ psOPI = opi;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPSASCIIHex(GBool hex) {
+ lockGlobalParams;
+ psASCIIHex = hex;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setTextEncoding(char *encodingName) {
+ lockGlobalParams;
+ delete textEncoding;
+ textEncoding = new GooString(encodingName);
+ unlockGlobalParams;
+}
+
+GBool GlobalParams::setTextEOL(char *s) {
+ lockGlobalParams;
+ if (!strcmp(s, "unix")) {
+ textEOL = eolUnix;
+ } else if (!strcmp(s, "dos")) {
+ textEOL = eolDOS;
+ } else if (!strcmp(s, "mac")) {
+ textEOL = eolMac;
+ } else {
+ unlockGlobalParams;
+ return gFalse;
+ }
+ unlockGlobalParams;
+ return gTrue;
+}
+
+void GlobalParams::setTextPageBreaks(GBool pageBreaks) {
+ lockGlobalParams;
+ textPageBreaks = pageBreaks;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setTextKeepTinyChars(GBool keep) {
+ lockGlobalParams;
+ textKeepTinyChars = keep;
+ unlockGlobalParams;
+}
+
+GBool GlobalParams::setEnableFreeType(char *s) {
+ GBool ok;
+
+ lockGlobalParams;
+ ok = parseYesNo2(s, &enableFreeType);
+ unlockGlobalParams;
+ return ok;
+}
+
+
+GBool GlobalParams::setAntialias(char *s) {
+ GBool ok;
+
+ lockGlobalParams;
+ ok = parseYesNo2(s, &antialias);
+ unlockGlobalParams;
+ return ok;
+}
+
+GBool GlobalParams::setVectorAntialias(char *s) {
+ GBool ok;
+
+ lockGlobalParams;
+ ok = parseYesNo2(s, &vectorAntialias);
+ unlockGlobalParams;
+ return ok;
+}
+
+void GlobalParams::setStrokeAdjust(GBool adjust)
+{
+ lockGlobalParams;
+ strokeAdjust = adjust;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenType(ScreenType st)
+{
+ lockGlobalParams;
+ screenType = st;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenSize(int size)
+{
+ lockGlobalParams;
+ screenSize = size;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenDotRadius(int radius)
+{
+ lockGlobalParams;
+ screenDotRadius = radius;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenGamma(double gamma)
+{
+ lockGlobalParams;
+ screenGamma = gamma;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenBlackThreshold(double blackThreshold)
+{
+ lockGlobalParams;
+ screenBlackThreshold = blackThreshold;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setScreenWhiteThreshold(double whiteThreshold)
+{
+ lockGlobalParams;
+ screenWhiteThreshold = whiteThreshold;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setMapNumericCharNames(GBool map) {
+ lockGlobalParams;
+ mapNumericCharNames = map;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setMapUnknownCharNames(GBool map) {
+ lockGlobalParams;
+ mapUnknownCharNames = map;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setPrintCommands(GBool printCommandsA) {
+ lockGlobalParams;
+ printCommands = printCommandsA;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setProfileCommands(GBool profileCommandsA) {
+ lockGlobalParams;
+ profileCommands = profileCommandsA;
+ unlockGlobalParams;
+}
+
+void GlobalParams::setErrQuiet(GBool errQuietA) {
+ lockGlobalParams;
+ errQuiet = errQuietA;
+ unlockGlobalParams;
+}
+
+void GlobalParams::addSecurityHandler(XpdfSecurityHandler *handler) {
+#ifdef ENABLE_PLUGINS
+ lockGlobalParams;
+ securityHandlers->append(handler);
+ unlockGlobalParams;
+#endif
+}
+
+XpdfSecurityHandler *GlobalParams::getSecurityHandler(char *name) {
+#ifdef ENABLE_PLUGINS
+ XpdfSecurityHandler *hdlr;
+ int i;
+
+ lockGlobalParams;
+ for (i = 0; i < securityHandlers->getLength(); ++i) {
+ hdlr = (XpdfSecurityHandler *)securityHandlers->get(i);
+ if (!strcasecmp(hdlr->name, name)) {
+ unlockGlobalParams;
+ return hdlr;
+ }
+ }
+ unlockGlobalParams;
+
+ if (!loadPlugin("security", name)) {
+ return NULL;
+ }
+ deleteGooList(keyBindings, KeyBinding);
+
+ lockGlobalParams;
+ for (i = 0; i < securityHandlers->getLength(); ++i) {
+ hdlr = (XpdfSecurityHandler *)securityHandlers->get(i);
+ if (!strcmp(hdlr->name, name)) {
+ unlockGlobalParams;
+ return hdlr;
+ }
+ }
+ unlockGlobalParams;
+#else
+ (void)name;
+#endif
+
+ return NULL;
+}
+
+#ifdef ENABLE_PLUGINS
+//------------------------------------------------------------------------
+// plugins
+//------------------------------------------------------------------------
+
+GBool GlobalParams::loadPlugin(char *type, char *name) {
+ Plugin *plugin;
+
+ if (!(plugin = Plugin::load(type, name))) {
+ return gFalse;
+ }
+ lockGlobalParams;
+ plugins->append(plugin);
+ unlockGlobalParams;
+ return gTrue;
+}
+
+#endif // ENABLE_PLUGINS
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.h
new file mode 100644
index 00000000000..514fc46682d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParams.h
@@ -0,0 +1,374 @@
+//========================================================================
+//
+// GlobalParams.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2009 Jonathan Kew <jonathan_kew@sil.org>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef GLOBALPARAMS_H
+#define GLOBALPARAMS_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <assert.h>
+#include "poppler-config.h"
+#include <stdio.h>
+#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER)
+#include <fontconfig/fontconfig.h>
+#endif
+#include "goo/gtypes.h"
+#include "CharTypes.h"
+
+#if MULTITHREADED
+#include "goo/GooMutex.h"
+#endif
+
+class GooString;
+class GooList;
+class GooHash;
+class NameToCharCode;
+class CharCodeToUnicode;
+class CharCodeToUnicodeCache;
+class UnicodeMap;
+class UnicodeMapCache;
+class CMap;
+class CMapCache;
+struct XpdfSecurityHandler;
+class GlobalParams;
+class GfxFont;
+class Stream;
+#ifdef _WIN32
+class WinFontList;
+#endif
+
+//------------------------------------------------------------------------
+
+// The global parameters object.
+extern GlobalParams *globalParams;
+
+//------------------------------------------------------------------------
+
+enum DisplayFontParamKind {
+ displayFontT1,
+ displayFontTT
+};
+
+struct DisplayFontParamT1 {
+ GooString *fileName;
+};
+
+struct DisplayFontParamTT {
+ GooString *fileName;
+ int faceIndex;
+};
+
+class DisplayFontParam {
+public:
+
+ GooString *name; // font name for 8-bit fonts and named
+ // CID fonts; collection name for
+ // generic CID fonts
+ DisplayFontParamKind kind;
+ union {
+ DisplayFontParamT1 t1;
+ DisplayFontParamTT tt;
+ };
+
+ DisplayFontParam(GooString *nameA, DisplayFontParamKind kindA);
+ void setFileName(GooString *fileNameA) {
+ if (displayFontT1 == kind)
+ t1.fileName = fileNameA;
+ else {
+ assert(displayFontTT == kind);
+ tt.fileName = fileNameA;
+ }
+ }
+ virtual ~DisplayFontParam();
+};
+
+//------------------------------------------------------------------------
+
+class PSFontParam {
+public:
+
+ GooString *pdfFontName; // PDF font name for 8-bit fonts and
+ // named 16-bit fonts; char collection
+ // name for generic 16-bit fonts
+ int wMode; // writing mode (0=horiz, 1=vert) for
+ // 16-bit fonts
+ GooString *psFontName; // PostScript font name
+ GooString *encoding; // encoding, for 16-bit fonts only
+
+ PSFontParam(GooString *pdfFontNameA, int wModeA,
+ GooString *psFontNameA, GooString *encodingA);
+ ~PSFontParam();
+};
+
+//------------------------------------------------------------------------
+
+enum PSLevel {
+ psLevel1,
+ psLevel1Sep,
+ psLevel2,
+ psLevel2Sep,
+ psLevel3,
+ psLevel3Sep
+};
+
+//------------------------------------------------------------------------
+
+enum EndOfLineKind {
+ eolUnix, // LF
+ eolDOS, // CR+LF
+ eolMac // CR
+};
+
+//------------------------------------------------------------------------
+
+enum ScreenType {
+ screenUnset,
+ screenDispersed,
+ screenClustered,
+ screenStochasticClustered
+};
+
+//------------------------------------------------------------------------
+
+class GlobalParams {
+public:
+
+ // Initialize the global parameters by attempting to read a config
+ // file.
+ GlobalParams(const char *customPopplerDataDir = NULL);
+
+ ~GlobalParams();
+
+ void setBaseDir(char *dir);
+
+#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER)
+ void setupBaseFonts(char *dir);
+#endif
+
+ //----- accessors
+
+ CharCode getMacRomanCharCode(char *charName);
+
+ GooString *getBaseDir();
+ Unicode mapNameToUnicode(char *charName);
+ UnicodeMap *getResidentUnicodeMap(GooString *encodingName);
+ FILE *getUnicodeMapFile(GooString *encodingName);
+ FILE *findCMapFile(GooString *collection, GooString *cMapName);
+ FILE *findToUnicodeFile(GooString *name);
+ DisplayFontParam *getDisplayFont(GfxFont *font);
+ GBool getPSExpandSmaller();
+ GBool getPSShrinkLarger();
+ GBool getPSCenter();
+ PSLevel getPSLevel();
+ PSFontParam *getPSFont(GooString *fontName);
+ PSFontParam *getPSFont16(GooString *fontName, GooString *collection, int wMode);
+ GBool getPSEmbedType1();
+ GBool getPSEmbedTrueType();
+ GBool getPSEmbedCIDPostScript();
+ GBool getPSEmbedCIDTrueType();
+ GBool getPSSubstFonts();
+ GBool getPSPreload();
+ GBool getPSOPI();
+ GBool getPSASCIIHex();
+ GooString *getTextEncodingName();
+ EndOfLineKind getTextEOL();
+ GBool getTextPageBreaks();
+ GBool getTextKeepTinyChars();
+ GooString *findFontFile(GooString *fontName, char **exts);
+ GBool getEnableFreeType();
+ GBool getAntialias();
+ GBool getVectorAntialias();
+ GBool getStrokeAdjust();
+ ScreenType getScreenType();
+ int getScreenSize();
+ int getScreenDotRadius();
+ double getScreenGamma();
+ double getScreenBlackThreshold();
+ double getScreenWhiteThreshold();
+ GBool getMapNumericCharNames();
+ GBool getMapUnknownCharNames();
+ GBool getPrintCommands();
+ GBool getProfileCommands();
+ GBool getErrQuiet();
+
+ CharCodeToUnicode *getCIDToUnicode(GooString *collection);
+ CharCodeToUnicode *getUnicodeToUnicode(GooString *fontName);
+ UnicodeMap *getUnicodeMap(GooString *encodingName);
+ CMap *getCMap(GooString *collection, GooString *cMapName, Stream *stream = NULL);
+ UnicodeMap *getTextEncoding();
+#ifdef ENABLE_PLUGINS
+ GBool loadPlugin(char *type, char *name);
+#endif
+
+ GooList *getEncodingNames();
+
+ //----- functions to set parameters
+ void setPSExpandSmaller(GBool expand);
+ void setPSShrinkLarger(GBool shrink);
+ void setPSCenter(GBool center);
+ void setPSLevel(PSLevel level);
+ void setPSEmbedType1(GBool embed);
+ void setPSEmbedTrueType(GBool embed);
+ void setPSEmbedCIDPostScript(GBool embed);
+ void setPSEmbedCIDTrueType(GBool embed);
+ void setPSSubstFonts(GBool substFonts);
+ void setPSPreload(GBool preload);
+ void setPSOPI(GBool opi);
+ void setPSASCIIHex(GBool hex);
+ void setTextEncoding(char *encodingName);
+ GBool setTextEOL(char *s);
+ void setTextPageBreaks(GBool pageBreaks);
+ void setTextKeepTinyChars(GBool keep);
+ GBool setEnableFreeType(char *s);
+ GBool setAntialias(char *s);
+ GBool setVectorAntialias(char *s);
+ void setStrokeAdjust(GBool strokeAdjust);
+ void setScreenType(ScreenType st);
+ void setScreenSize(int size);
+ void setScreenDotRadius(int radius);
+ void setScreenGamma(double gamma);
+ void setScreenBlackThreshold(double blackThreshold);
+ void setScreenWhiteThreshold(double whiteThreshold);
+ void setMapNumericCharNames(GBool map);
+ void setMapUnknownCharNames(GBool map);
+ void setPrintCommands(GBool printCommandsA);
+ void setProfileCommands(GBool profileCommandsA);
+ void setErrQuiet(GBool errQuietA);
+
+ //----- security handlers
+
+ void addSecurityHandler(XpdfSecurityHandler *handler);
+ XpdfSecurityHandler *getSecurityHandler(char *name);
+
+private:
+
+ void parseNameToUnicode(GooString *name);
+ GBool parseYesNo2(char *token, GBool *flag);
+ UnicodeMap *getUnicodeMap2(GooString *encodingName);
+
+ void scanEncodingDirs();
+ void addCIDToUnicode(GooString *collection, GooString *fileName);
+ void addUnicodeMap(GooString *encodingName, GooString *fileName);
+ void addCMapDir(GooString *collection, GooString *dir);
+
+ //----- static tables
+
+ NameToCharCode * // mapping from char name to
+ macRomanReverseMap; // MacRomanEncoding index
+
+ //----- user-modifiable settings
+
+ GooString *baseDir; // base directory - for plugins, etc.
+ NameToCharCode * // mapping from char name to Unicode
+ nameToUnicode;
+ GooHash *cidToUnicodes; // files for mappings from char collections
+ // to Unicode, indexed by collection name
+ // [GooString]
+ GooHash *unicodeToUnicodes; // files for Unicode-to-Unicode mappings,
+ // indexed by font name pattern [GooString]
+ GooHash *residentUnicodeMaps; // mappings from Unicode to char codes,
+ // indexed by encoding name [UnicodeMap]
+ GooHash *unicodeMaps; // files for mappings from Unicode to char
+ // codes, indexed by encoding name [GooString]
+ GooHash *cMapDirs; // list of CMap dirs, indexed by collection
+ // name [GooList[GooString]]
+ GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString]
+ GooHash *displayFonts; // display font info, indexed by font name
+ // [DisplayFontParam]
+#ifdef _WIN32
+ GBool baseFontsInitialized;
+ WinFontList *winFontList; // system TrueType fonts
+#endif
+ GBool psExpandSmaller; // expand smaller pages to fill paper
+ GBool psShrinkLarger; // shrink larger pages to fit paper
+ GBool psCenter; // center pages on the paper
+ PSLevel psLevel; // PostScript level to generate
+ GooHash *psFonts; // PostScript font info, indexed by PDF
+ // font name [PSFontParam]
+ GooList *psNamedFonts16; // named 16-bit fonts [PSFontParam]
+ GooList *psFonts16; // generic 16-bit fonts [PSFontParam]
+ GBool psEmbedType1; // embed Type 1 fonts?
+ GBool psEmbedTrueType; // embed TrueType fonts?
+ GBool psEmbedCIDPostScript; // embed CID PostScript fonts?
+ GBool psEmbedCIDTrueType; // embed CID TrueType fonts?
+ GBool psSubstFonts; // substitute missing fonts?
+ GBool psPreload; // preload PostScript images and forms into
+ // memory
+ GBool psOPI; // generate PostScript OPI comments?
+ GBool psASCIIHex; // use ASCIIHex instead of ASCII85?
+ GooString *textEncoding; // encoding (unicodeMap) to use for text
+ // output
+ EndOfLineKind textEOL; // type of EOL marker to use for text
+ // output
+ GBool textPageBreaks; // insert end-of-page markers?
+ GBool textKeepTinyChars; // keep all characters in text output
+ GooList *fontDirs; // list of font dirs [GooString]
+ GBool enableFreeType; // FreeType enable flag
+ GBool antialias; // anti-aliasing enable flag
+ GBool vectorAntialias; // vector anti-aliasing enable flag
+ GBool strokeAdjust; // stroke adjustment enable flag
+ ScreenType screenType; // halftone screen type
+ int screenSize; // screen matrix size
+ int screenDotRadius; // screen dot radius
+ double screenGamma; // screen gamma correction
+ double screenBlackThreshold; // screen black clamping threshold
+ double screenWhiteThreshold; // screen white clamping threshold
+ GBool mapNumericCharNames; // map numeric char names (from font subsets)?
+ GBool mapUnknownCharNames; // map unknown char names?
+ GBool printCommands; // print the drawing commands
+ GBool profileCommands; // profile the drawing commands
+ GBool errQuiet; // suppress error messages?
+
+ CharCodeToUnicodeCache *cidToUnicodeCache;
+ CharCodeToUnicodeCache *unicodeToUnicodeCache;
+ UnicodeMapCache *unicodeMapCache;
+ CMapCache *cMapCache;
+
+#if !defined (PDF_PARSER_ONLY) && !defined(_MSC_VER)
+ FcConfig *FCcfg;
+#endif
+
+#ifdef ENABLE_PLUGINS
+ GList *plugins; // list of plugins [Plugin]
+ GList *securityHandlers; // list of loaded security handlers
+ // [XpdfSecurityHandler]
+#endif
+
+#if MULTITHREADED
+ GooMutex mutex;
+ GooMutex unicodeMapCacheMutex;
+ GooMutex cMapCacheMutex;
+#endif
+
+ const char *popplerDataDir;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParamsWin.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParamsWin.cc
new file mode 100644
index 00000000000..19ea5465398
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/GlobalParamsWin.cc
@@ -0,0 +1,284 @@
+/* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info)
+ but mostly based on xpdf code.
+
+TODO: instead of a fixed mapping defined in displayFontTab, it could
+scan the whole fonts directory, parse TTF files and build font
+description for all fonts available in Windows. That's how MuPDF works.
+*/
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <windows.h>
+#include <shlobj.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "goo/GooHash.h"
+#include "goo/gfile.h"
+#include "Error.h"
+#include "NameToCharCode.h"
+#include "CharCodeToUnicode.h"
+#include "UnicodeMap.h"
+#include "CMap.h"
+#include "BuiltinFontTables.h"
+#include "FontEncodingTables.h"
+#include "GlobalParams.h"
+#include "GfxFont.h"
+
+#if MULTITHREADED
+# define lockGlobalParams gLockMutex(&mutex)
+# define lockUnicodeMapCache gLockMutex(&unicodeMapCacheMutex)
+# define lockCMapCache gLockMutex(&cMapCacheMutex)
+# define unlockGlobalParams gUnlockMutex(&mutex)
+# define unlockUnicodeMapCache gUnlockMutex(&unicodeMapCacheMutex)
+# define unlockCMapCache gUnlockMutex(&cMapCacheMutex)
+#else
+# define lockGlobalParams
+# define lockUnicodeMapCache
+# define lockCMapCache
+# define unlockGlobalParams
+# define unlockUnicodeMapCache
+# define unlockCMapCache
+#endif
+
+#define DEFAULT_SUBSTITUTE_FONT "Helvetica"
+
+static struct {
+ char *name;
+ char *t1FileName;
+ char *ttFileName;
+} displayFontTab[] = {
+ {"Courier", "n022003l.pfb", "cour.ttf"},
+ {"Courier-Bold", "n022004l.pfb", "courbd.ttf"},
+ {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf"},
+ {"Courier-Oblique", "n022023l.pfb", "couri.ttf"},
+ {"Helvetica", "n019003l.pfb", "arial.ttf"},
+ {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf"},
+ {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf"},
+ {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf"},
+ // TODO: not sure if "symbol.ttf" is right
+ {"Symbol", "s050000l.pfb", "symbol.ttf"},
+ {"Times-Bold", "n021004l.pfb", "timesbd.ttf"},
+ {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf"},
+ {"Times-Italic", "n021023l.pfb", "timesi.ttf"},
+ {"Times-Roman", "n021003l.pfb", "times.ttf"},
+ // TODO: not sure if "wingding.ttf" is right
+ {"ZapfDingbats", "d050000l.pfb", "wingding.ttf"},
+
+ // those seem to be frequently accessed by PDF files and I kind of guess
+ // which font file do the refer to
+ {"Palatino", NULL, "pala.ttf"},
+ {"Palatino-Roman", NULL, "pala.ttf"},
+ {"Palatino-Bold", NULL, "palab.ttf"},
+ {"Palatino-Italic", NULL, "palai.ttf"},
+ {"Palatino,Italic", NULL, "palai.ttf"},
+ {"Palatino-BoldItalic", NULL, "palabi.ttf"},
+
+ {"ArialBlack", NULL, "arialbd.ttf"},
+
+ {"ArialNarrow", NULL, "arialn.ttf"},
+ {"ArialNarrow,Bold", NULL, "arialnb.ttf"},
+ {"ArialNarrow,Italic", NULL, "arialni.ttf"},
+ {"ArialNarrow,BoldItalic", NULL, "arialnbi.ttf"},
+ {"ArialNarrow-Bold", NULL, "arialnb.ttf"},
+ {"ArialNarrow-Italic", NULL, "arialni.ttf"},
+ {"ArialNarrow-BoldItalic", NULL, "arialnbi.ttf"},
+
+ {"HelveticaNarrow", NULL, "arialn.ttf"},
+ {"HelveticaNarrow,Bold", NULL, "arialnb.ttf"},
+ {"HelveticaNarrow,Italic", NULL, "arialni.ttf"},
+ {"HelveticaNarrow,BoldItalic", NULL, "arialnbi.ttf"},
+ {"HelveticaNarrow-Bold", NULL, "arialnb.ttf"},
+ {"HelveticaNarrow-Italic", NULL, "arialni.ttf"},
+ {"HelveticaNarrow-BoldItalic", NULL, "arialnbi.ttf"},
+
+ {"BookAntiqua", NULL, "bkant.ttf"},
+ {"BookAntiqua,Bold", NULL, "bkant.ttf"},
+ {"BookAntiqua,Italic", NULL, "bkant.ttf"},
+ {"BookAntiqua,BoldItalic", NULL, "bkant.ttf"},
+ {"BookAntiqua-Bold", NULL, "bkant.ttf"},
+ {"BookAntiqua-Italic", NULL, "bkant.ttf"},
+ {"BookAntiqua-BoldItalic", NULL, "bkant.ttf"},
+
+ {"Verdana", NULL, "verdana.ttf"},
+ {"Verdana,Bold", NULL, "verdanab.ttf"},
+ {"Verdana,Italic", NULL, "verdanai.ttf"},
+ {"Verdana,BoldItalic", NULL, "verdanaz.ttf"},
+ {"Verdana-Bold", NULL, "verdanab.ttf"},
+ {"Verdana-Italic", NULL, "verdanai.ttf"},
+ {"Verdana-BoldItalic", NULL, "verdanaz.ttf"},
+
+ {"Tahoma", NULL, "tahoma.ttf"},
+ {"Tahoma,Bold", NULL, "tahomabd.ttf"},
+ {"Tahoma,Italic", NULL, "tahoma.ttf"},
+ {"Tahoma,BoldItalic", NULL, "tahomabd.ttf"},
+ {"Tahoma-Bold", NULL, "tahomabd.ttf"},
+ {"Tahoma-Italic", NULL, "tahoma.ttf"},
+ {"Tahoma-BoldItalic", NULL, "tahomabd.ttf"},
+
+ {"CCRIKH+Verdana", NULL, "verdana.ttf"},
+ {"CCRIKH+Verdana,Bold", NULL, "verdanab.ttf"},
+ {"CCRIKH+Verdana,Italic", NULL, "verdanai.ttf"},
+ {"CCRIKH+Verdana,BoldItalic", NULL, "verdanaz.ttf"},
+ {"CCRIKH+Verdana-Bold", NULL, "verdanab.ttf"},
+ {"CCRIKH+Verdana-Italic", NULL, "verdanai.ttf"},
+ {"CCRIKH+Verdana-BoldItalic", NULL, "verdanaz.ttf"},
+
+ {"Georgia", NULL, "georgia.ttf"},
+ {"Georgia,Bold", NULL, "georgiab.ttf"},
+ {"Georgia,Italic", NULL, "georgiai.ttf"},
+ {"Georgia,BoldItalic", NULL, "georgiaz.ttf"},
+ {"Georgia-Bold", NULL, "georgiab.ttf"},
+ {"Georgia-Italic", NULL, "georgiai.ttf"},
+ {"Georgia-BoldItalic", NULL, "georgiaz.ttf"},
+
+ {NULL}
+};
+
+#define FONTS_SUBDIR "\\fonts"
+
+static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen)
+{
+ BOOL (__stdcall *SHGetSpecialFolderPathFunc)(HWND hwndOwner,
+ LPTSTR lpszPath,
+ int nFolder,
+ BOOL fCreate);
+ HRESULT (__stdcall *SHGetFolderPathFunc)(HWND hwndOwner,
+ int nFolder,
+ HANDLE hToken,
+ DWORD dwFlags,
+ LPTSTR pszPath);
+
+ // SHGetSpecialFolderPath isn't available in older versions of shell32.dll (Win95 and
+ // WinNT4), so do a dynamic load of ANSI versions.
+ winFontDir[0] = '\0';
+
+ HMODULE hLib = LoadLibrary("shell32.dll");
+ if (hLib) {
+ SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPTSTR))
+ GetProcAddress(hLib, "SHGetFolderPathA");
+ if (SHGetFolderPathFunc)
+ (*SHGetFolderPathFunc)(NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, winFontDir);
+
+ if (!winFontDir[0]) {
+ // Try an older function
+ SHGetSpecialFolderPathFunc = (BOOL (__stdcall *)(HWND, LPTSTR, int, BOOL))
+ GetProcAddress(hLib, "SHGetSpecialFolderPathA");
+ if (SHGetSpecialFolderPathFunc)
+ (*SHGetSpecialFolderPathFunc)(NULL, winFontDir, CSIDL_FONTS, FALSE);
+ }
+ FreeLibrary(hLib);
+ }
+ if (winFontDir[0])
+ return;
+
+ // Try older DLL
+ hLib = LoadLibrary("SHFolder.dll");
+ if (hLib) {
+ SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPTSTR))
+ GetProcAddress(hLib, "SHGetFolderPathA");
+ if (SHGetFolderPathFunc)
+ (*SHGetFolderPathFunc)(NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, winFontDir);
+ FreeLibrary(hLib);
+ }
+ if (winFontDir[0])
+ return;
+
+ // Everything else failed so the standard fonts directory.
+ GetWindowsDirectory(winFontDir, cbWinFontDirLen);
+ if (winFontDir[0]) {
+ strncat(winFontDir, FONTS_SUBDIR, cbWinFontDirLen);
+ winFontDir[cbWinFontDirLen-1] = 0;
+ }
+}
+
+static bool FileExists(const char *path)
+{
+ FILE * f = fopen(path, "rb");
+ if (f) {
+ fclose(f);
+ return true;
+ }
+ return false;
+}
+
+static void AddFont(GooHash *displayFonts, char *fontName, GooString *fontPath, DisplayFontParamKind kind)
+{
+ DisplayFontParam *dfp = new DisplayFontParam(new GooString(fontName), kind);
+ dfp->setFileName(fontPath);
+ displayFonts->add(dfp->name, dfp);
+}
+
+void GlobalParams::setupBaseFonts(char * dir)
+{
+ if (baseFontsInitialized)
+ return;
+ baseFontsInitialized = true;
+
+ char winFontDir[MAX_PATH];
+ GetWindowsFontDir(winFontDir, sizeof(winFontDir));
+
+ for (int i = 0; displayFontTab[i].name; ++i) {
+ char *fontName = displayFontTab[i].name;
+ if (displayFonts->lookup(fontName))
+ continue;
+
+ if (dir) {
+ GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName);
+ if (FileExists(fontPath->getCString())) {
+ AddFont(displayFonts, fontName, fontPath, displayFontT1);
+ continue;
+ }
+ delete fontPath;
+ }
+
+ if (winFontDir[0] && displayFontTab[i].ttFileName) {
+ GooString *fontPath = appendToPath(new GooString(winFontDir), displayFontTab[i].ttFileName);
+ if (FileExists(fontPath->getCString())) {
+ AddFont(displayFonts, fontName, fontPath, displayFontTT);
+ continue;
+ }
+ delete fontPath;
+ }
+
+ error(-1, "No display font for '%s'", fontName);
+ }
+}
+
+static char *findSubstituteName(const char *origName)
+{
+ assert(origName);
+ if (!origName) return NULL;
+ /* TODO: try to at least guess bold/italic/bolditalic from the name */
+ return DEFAULT_SUBSTITUTE_FONT;
+}
+
+/* Windows implementation of external font matching code */
+DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
+ DisplayFontParam * dfp;
+ GooString * fontName = font->getName();
+ char * substFontName = NULL;
+
+ if (!fontName) return NULL;
+ lockGlobalParams;
+ setupBaseFonts(NULL);
+ dfp = (DisplayFontParam *)displayFonts->lookup(fontName);
+ if (!dfp) {
+ substFontName = findSubstituteName(fontName->getCString());
+ error(-1, "Couldn't find a font for '%s', subst is '%s'", fontName->getCString(), substFontName);
+ dfp = (DisplayFontParam *)displayFonts->lookup(substFontName);
+ assert(dfp);
+ }
+ unlockGlobalParams;
+ return dfp;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.cc
new file mode 100644
index 00000000000..ec0778e64f4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.cc
@@ -0,0 +1,322 @@
+//========================================================================
+//
+// JArithmeticDecoder.cc
+//
+// Copyright 2002-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "Object.h"
+#include "Stream.h"
+#include "JArithmeticDecoder.h"
+
+//------------------------------------------------------------------------
+// JArithmeticDecoderStates
+//------------------------------------------------------------------------
+
+JArithmeticDecoderStats::JArithmeticDecoderStats(int contextSizeA) {
+ contextSize = contextSizeA;
+ cxTab = (Guchar *)gmallocn(contextSize, sizeof(Guchar));
+ reset();
+}
+
+JArithmeticDecoderStats::~JArithmeticDecoderStats() {
+ gfree(cxTab);
+}
+
+JArithmeticDecoderStats *JArithmeticDecoderStats::copy() {
+ JArithmeticDecoderStats *stats;
+
+ stats = new JArithmeticDecoderStats(contextSize);
+ memcpy(stats->cxTab, cxTab, contextSize);
+ return stats;
+}
+
+void JArithmeticDecoderStats::reset() {
+ memset(cxTab, 0, contextSize);
+}
+
+void JArithmeticDecoderStats::copyFrom(JArithmeticDecoderStats *stats) {
+ memcpy(cxTab, stats->cxTab, contextSize);
+}
+
+void JArithmeticDecoderStats::setEntry(Guint cx, int i, int mps) {
+ cxTab[cx] = (i << 1) + mps;
+}
+
+//------------------------------------------------------------------------
+// JArithmeticDecoder
+//------------------------------------------------------------------------
+
+Guint JArithmeticDecoder::qeTab[47] = {
+ 0x56010000, 0x34010000, 0x18010000, 0x0AC10000,
+ 0x05210000, 0x02210000, 0x56010000, 0x54010000,
+ 0x48010000, 0x38010000, 0x30010000, 0x24010000,
+ 0x1C010000, 0x16010000, 0x56010000, 0x54010000,
+ 0x51010000, 0x48010000, 0x38010000, 0x34010000,
+ 0x30010000, 0x28010000, 0x24010000, 0x22010000,
+ 0x1C010000, 0x18010000, 0x16010000, 0x14010000,
+ 0x12010000, 0x11010000, 0x0AC10000, 0x09C10000,
+ 0x08A10000, 0x05210000, 0x04410000, 0x02A10000,
+ 0x02210000, 0x01410000, 0x01110000, 0x00850000,
+ 0x00490000, 0x00250000, 0x00150000, 0x00090000,
+ 0x00050000, 0x00010000, 0x56010000
+};
+
+int JArithmeticDecoder::nmpsTab[47] = {
+ 1, 2, 3, 4, 5, 38, 7, 8, 9, 10, 11, 12, 13, 29, 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, 45, 46
+};
+
+int JArithmeticDecoder::nlpsTab[47] = {
+ 1, 6, 9, 12, 29, 33, 6, 14, 14, 14, 17, 18, 20, 21, 14, 14,
+ 15, 16, 17, 18, 19, 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, 46
+};
+
+int JArithmeticDecoder::switchTab[47] = {
+ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+JArithmeticDecoder::JArithmeticDecoder() {
+ str = NULL;
+ dataLen = 0;
+ limitStream = gFalse;
+}
+
+inline Guint JArithmeticDecoder::readByte() {
+ if (limitStream) {
+ --dataLen;
+ if (dataLen < 0) {
+ return 0xff;
+ }
+ }
+ return (Guint)str->getChar() & 0xff;
+}
+
+JArithmeticDecoder::~JArithmeticDecoder() {
+ cleanup();
+}
+
+void JArithmeticDecoder::start() {
+ buf0 = readByte();
+ buf1 = readByte();
+
+ // INITDEC
+ c = (buf0 ^ 0xff) << 16;
+ byteIn();
+ c <<= 7;
+ ct -= 7;
+ a = 0x80000000;
+}
+
+void JArithmeticDecoder::restart(int dataLenA) {
+ int oldDataLen;
+
+ oldDataLen = dataLen;
+ dataLen = dataLenA;
+ if (oldDataLen == -1) {
+ buf1 = readByte();
+ } else if (oldDataLen <= -2) {
+ buf0 = readByte();
+ buf1 = readByte();
+ }
+}
+
+void JArithmeticDecoder::cleanup() {
+ if (limitStream) {
+ while (dataLen > 0) {
+ buf0 = buf1;
+ buf1 = readByte();
+ }
+ }
+}
+
+int JArithmeticDecoder::decodeBit(Guint context,
+ JArithmeticDecoderStats *stats) {
+ int bit;
+ Guint qe;
+ int iCX, mpsCX;
+
+ iCX = stats->cxTab[context] >> 1;
+ mpsCX = stats->cxTab[context] & 1;
+ qe = qeTab[iCX];
+ a -= qe;
+ if (c < a) {
+ if (a & 0x80000000) {
+ bit = mpsCX;
+ } else {
+ // MPS_EXCHANGE
+ if (a < qe) {
+ bit = 1 - mpsCX;
+ if (switchTab[iCX]) {
+ stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX);
+ } else {
+ stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX;
+ }
+ } else {
+ bit = mpsCX;
+ stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX;
+ }
+ // RENORMD
+ do {
+ if (ct == 0) {
+ byteIn();
+ }
+ a <<= 1;
+ c <<= 1;
+ --ct;
+ } while (!(a & 0x80000000));
+ }
+ } else {
+ c -= a;
+ // LPS_EXCHANGE
+ if (a < qe) {
+ bit = mpsCX;
+ stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX;
+ } else {
+ bit = 1 - mpsCX;
+ if (switchTab[iCX]) {
+ stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX);
+ } else {
+ stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX;
+ }
+ }
+ a = qe;
+ // RENORMD
+ do {
+ if (ct == 0) {
+ byteIn();
+ }
+ a <<= 1;
+ c <<= 1;
+ --ct;
+ } while (!(a & 0x80000000));
+ }
+ return bit;
+}
+
+int JArithmeticDecoder::decodeByte(Guint context,
+ JArithmeticDecoderStats *stats) {
+ int byte;
+ int i;
+
+ byte = 0;
+ for (i = 0; i < 8; ++i) {
+ byte = (byte << 1) | decodeBit(context, stats);
+ }
+ return byte;
+}
+
+GBool JArithmeticDecoder::decodeInt(int *x, JArithmeticDecoderStats *stats) {
+ int s;
+ Guint v;
+ int i;
+
+ prev = 1;
+ s = decodeIntBit(stats);
+ if (decodeIntBit(stats)) {
+ if (decodeIntBit(stats)) {
+ if (decodeIntBit(stats)) {
+ if (decodeIntBit(stats)) {
+ if (decodeIntBit(stats)) {
+ v = 0;
+ for (i = 0; i < 32; ++i) {
+ v = (v << 1) | decodeIntBit(stats);
+ }
+ v += 4436;
+ } else {
+ v = 0;
+ for (i = 0; i < 12; ++i) {
+ v = (v << 1) | decodeIntBit(stats);
+ }
+ v += 340;
+ }
+ } else {
+ v = 0;
+ for (i = 0; i < 8; ++i) {
+ v = (v << 1) | decodeIntBit(stats);
+ }
+ v += 84;
+ }
+ } else {
+ v = 0;
+ for (i = 0; i < 6; ++i) {
+ v = (v << 1) | decodeIntBit(stats);
+ }
+ v += 20;
+ }
+ } else {
+ v = decodeIntBit(stats);
+ v = (v << 1) | decodeIntBit(stats);
+ v = (v << 1) | decodeIntBit(stats);
+ v = (v << 1) | decodeIntBit(stats);
+ v += 4;
+ }
+ } else {
+ v = decodeIntBit(stats);
+ v = (v << 1) | decodeIntBit(stats);
+ }
+
+ if (s) {
+ if (v == 0) {
+ return gFalse;
+ }
+ *x = -(int)v;
+ } else {
+ *x = (int)v;
+ }
+ return gTrue;
+}
+
+int JArithmeticDecoder::decodeIntBit(JArithmeticDecoderStats *stats) {
+ int bit;
+
+ bit = decodeBit(prev, stats);
+ if (prev < 0x100) {
+ prev = (prev << 1) | bit;
+ } else {
+ prev = (((prev << 1) | bit) & 0x1ff) | 0x100;
+ }
+ return bit;
+}
+
+Guint JArithmeticDecoder::decodeIAID(Guint codeLen,
+ JArithmeticDecoderStats *stats) {
+ Guint i;
+ int bit;
+
+ prev = 1;
+ for (i = 0; i < codeLen; ++i) {
+ bit = decodeBit(prev, stats);
+ prev = (prev << 1) | bit;
+ }
+ return prev - (1 << codeLen);
+}
+
+void JArithmeticDecoder::byteIn() {
+ if (buf0 == 0xff) {
+ if (buf1 > 0x8f) {
+ ct = 8;
+ } else {
+ buf0 = buf1;
+ buf1 = readByte();
+ c = c + 0xfe00 - (buf0 << 9);
+ ct = 7;
+ }
+ } else {
+ buf0 = buf1;
+ buf1 = readByte();
+ c = c + 0xff00 - (buf0 << 8);
+ ct = 8;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.h
new file mode 100644
index 00000000000..0f091b7bd84
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JArithmeticDecoder.h
@@ -0,0 +1,107 @@
+//========================================================================
+//
+// JArithmeticDecoder.h
+//
+// Arithmetic decoder used by the JBIG2 and JPEG2000 decoders.
+//
+// Copyright 2002-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef JARITHMETICDECODER_H
+#define JARITHMETICDECODER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+class Stream;
+
+//------------------------------------------------------------------------
+// JArithmeticDecoderStats
+//------------------------------------------------------------------------
+
+class JArithmeticDecoderStats {
+public:
+
+ JArithmeticDecoderStats(int contextSizeA);
+ ~JArithmeticDecoderStats();
+ JArithmeticDecoderStats *copy();
+ void reset();
+ int getContextSize() { return contextSize; }
+ void copyFrom(JArithmeticDecoderStats *stats);
+ void setEntry(Guint cx, int i, int mps);
+
+private:
+
+ Guchar *cxTab; // cxTab[cx] = (i[cx] << 1) + mps[cx]
+ int contextSize;
+
+ friend class JArithmeticDecoder;
+};
+
+//------------------------------------------------------------------------
+// JArithmeticDecoder
+//------------------------------------------------------------------------
+
+class JArithmeticDecoder {
+public:
+
+ JArithmeticDecoder();
+ ~JArithmeticDecoder();
+
+ void setStream(Stream *strA)
+ { str = strA; dataLen = 0; limitStream = gFalse; }
+ void setStream(Stream *strA, int dataLenA)
+ { str = strA; dataLen = dataLenA; limitStream = gTrue; }
+
+ // Start decoding on a new stream. This fills the byte buffers and
+ // runs INITDEC.
+ void start();
+
+ // Restart decoding on an interrupted stream. This refills the
+ // buffers if needed, but does not run INITDEC. (This is used in
+ // JPEG 2000 streams when codeblock data is split across multiple
+ // packets/layers.)
+ void restart(int dataLenA);
+
+ // Read any leftover data in the stream.
+ void cleanup();
+
+ // Decode one bit.
+ int decodeBit(Guint context, JArithmeticDecoderStats *stats);
+
+ // Decode eight bits.
+ int decodeByte(Guint context, JArithmeticDecoderStats *stats);
+
+ // Returns false for OOB, otherwise sets *<x> and returns true.
+ GBool decodeInt(int *x, JArithmeticDecoderStats *stats);
+
+ Guint decodeIAID(Guint codeLen,
+ JArithmeticDecoderStats *stats);
+
+private:
+
+ Guint readByte();
+ int decodeIntBit(JArithmeticDecoderStats *stats);
+ void byteIn();
+
+ static Guint qeTab[47];
+ static int nmpsTab[47];
+ static int nlpsTab[47];
+ static int switchTab[47];
+
+ Guint buf0, buf1;
+ Guint c, a;
+ int ct;
+
+ Guint prev; // for the integer decoder
+
+ Stream *str;
+ int dataLen;
+ GBool limitStream;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.cc
new file mode 100644
index 00000000000..97994bd2cb8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.cc
@@ -0,0 +1,3730 @@
+//========================================================================
+//
+// JBIG2Stream.cc
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Raj Kumar <rkumar@archive.org>
+// Copyright (C) 2006 Paul Walmsley <paul@booyaka.com>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <limits.h>
+#include "goo/GooList.h"
+#include "Error.h"
+#include "JArithmeticDecoder.h"
+#include "JBIG2Stream.h"
+
+//~ share these tables
+#include "Stream-CCITT.h"
+
+//------------------------------------------------------------------------
+
+static const int contextSize[4] = { 16, 13, 10, 10 };
+static const int refContextSize[2] = { 13, 10 };
+
+//------------------------------------------------------------------------
+// JBIG2HuffmanTable
+//------------------------------------------------------------------------
+
+#define jbig2HuffmanLOW 0xfffffffd
+#define jbig2HuffmanOOB 0xfffffffe
+#define jbig2HuffmanEOT 0xffffffff
+
+struct JBIG2HuffmanTable {
+ int val;
+ Guint prefixLen;
+ Guint rangeLen; // can also be LOW, OOB, or EOT
+ Guint prefix;
+};
+
+static JBIG2HuffmanTable huffTableA[] = {
+ { 0, 1, 4, 0x000 },
+ { 16, 2, 8, 0x002 },
+ { 272, 3, 16, 0x006 },
+ { 65808, 3, 32, 0x007 },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableB[] = {
+ { 0, 1, 0, 0x000 },
+ { 1, 2, 0, 0x002 },
+ { 2, 3, 0, 0x006 },
+ { 3, 4, 3, 0x00e },
+ { 11, 5, 6, 0x01e },
+ { 75, 6, 32, 0x03e },
+ { 0, 6, jbig2HuffmanOOB, 0x03f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableC[] = {
+ { 0, 1, 0, 0x000 },
+ { 1, 2, 0, 0x002 },
+ { 2, 3, 0, 0x006 },
+ { 3, 4, 3, 0x00e },
+ { 11, 5, 6, 0x01e },
+ { 0, 6, jbig2HuffmanOOB, 0x03e },
+ { 75, 7, 32, 0x0fe },
+ { -256, 8, 8, 0x0fe },
+ { -257, 8, jbig2HuffmanLOW, 0x0ff },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableD[] = {
+ { 1, 1, 0, 0x000 },
+ { 2, 2, 0, 0x002 },
+ { 3, 3, 0, 0x006 },
+ { 4, 4, 3, 0x00e },
+ { 12, 5, 6, 0x01e },
+ { 76, 5, 32, 0x01f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableE[] = {
+ { 1, 1, 0, 0x000 },
+ { 2, 2, 0, 0x002 },
+ { 3, 3, 0, 0x006 },
+ { 4, 4, 3, 0x00e },
+ { 12, 5, 6, 0x01e },
+ { 76, 6, 32, 0x03e },
+ { -255, 7, 8, 0x07e },
+ { -256, 7, jbig2HuffmanLOW, 0x07f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableF[] = {
+ { 0, 2, 7, 0x000 },
+ { 128, 3, 7, 0x002 },
+ { 256, 3, 8, 0x003 },
+ { -1024, 4, 9, 0x008 },
+ { -512, 4, 8, 0x009 },
+ { -256, 4, 7, 0x00a },
+ { -32, 4, 5, 0x00b },
+ { 512, 4, 9, 0x00c },
+ { 1024, 4, 10, 0x00d },
+ { -2048, 5, 10, 0x01c },
+ { -128, 5, 6, 0x01d },
+ { -64, 5, 5, 0x01e },
+ { -2049, 6, jbig2HuffmanLOW, 0x03e },
+ { 2048, 6, 32, 0x03f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableG[] = {
+ { -512, 3, 8, 0x000 },
+ { 256, 3, 8, 0x001 },
+ { 512, 3, 9, 0x002 },
+ { 1024, 3, 10, 0x003 },
+ { -1024, 4, 9, 0x008 },
+ { -256, 4, 7, 0x009 },
+ { -32, 4, 5, 0x00a },
+ { 0, 4, 5, 0x00b },
+ { 128, 4, 7, 0x00c },
+ { -128, 5, 6, 0x01a },
+ { -64, 5, 5, 0x01b },
+ { 32, 5, 5, 0x01c },
+ { 64, 5, 6, 0x01d },
+ { -1025, 5, jbig2HuffmanLOW, 0x01e },
+ { 2048, 5, 32, 0x01f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableH[] = {
+ { 0, 2, 1, 0x000 },
+ { 0, 2, jbig2HuffmanOOB, 0x001 },
+ { 4, 3, 4, 0x004 },
+ { -1, 4, 0, 0x00a },
+ { 22, 4, 4, 0x00b },
+ { 38, 4, 5, 0x00c },
+ { 2, 5, 0, 0x01a },
+ { 70, 5, 6, 0x01b },
+ { 134, 5, 7, 0x01c },
+ { 3, 6, 0, 0x03a },
+ { 20, 6, 1, 0x03b },
+ { 262, 6, 7, 0x03c },
+ { 646, 6, 10, 0x03d },
+ { -2, 7, 0, 0x07c },
+ { 390, 7, 8, 0x07d },
+ { -15, 8, 3, 0x0fc },
+ { -5, 8, 1, 0x0fd },
+ { -7, 9, 1, 0x1fc },
+ { -3, 9, 0, 0x1fd },
+ { -16, 9, jbig2HuffmanLOW, 0x1fe },
+ { 1670, 9, 32, 0x1ff },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableI[] = {
+ { 0, 2, jbig2HuffmanOOB, 0x000 },
+ { -1, 3, 1, 0x002 },
+ { 1, 3, 1, 0x003 },
+ { 7, 3, 5, 0x004 },
+ { -3, 4, 1, 0x00a },
+ { 43, 4, 5, 0x00b },
+ { 75, 4, 6, 0x00c },
+ { 3, 5, 1, 0x01a },
+ { 139, 5, 7, 0x01b },
+ { 267, 5, 8, 0x01c },
+ { 5, 6, 1, 0x03a },
+ { 39, 6, 2, 0x03b },
+ { 523, 6, 8, 0x03c },
+ { 1291, 6, 11, 0x03d },
+ { -5, 7, 1, 0x07c },
+ { 779, 7, 9, 0x07d },
+ { -31, 8, 4, 0x0fc },
+ { -11, 8, 2, 0x0fd },
+ { -15, 9, 2, 0x1fc },
+ { -7, 9, 1, 0x1fd },
+ { -32, 9, jbig2HuffmanLOW, 0x1fe },
+ { 3339, 9, 32, 0x1ff },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableJ[] = {
+ { -2, 2, 2, 0x000 },
+ { 6, 2, 6, 0x001 },
+ { 0, 2, jbig2HuffmanOOB, 0x002 },
+ { -3, 5, 0, 0x018 },
+ { 2, 5, 0, 0x019 },
+ { 70, 5, 5, 0x01a },
+ { 3, 6, 0, 0x036 },
+ { 102, 6, 5, 0x037 },
+ { 134, 6, 6, 0x038 },
+ { 198, 6, 7, 0x039 },
+ { 326, 6, 8, 0x03a },
+ { 582, 6, 9, 0x03b },
+ { 1094, 6, 10, 0x03c },
+ { -21, 7, 4, 0x07a },
+ { -4, 7, 0, 0x07b },
+ { 4, 7, 0, 0x07c },
+ { 2118, 7, 11, 0x07d },
+ { -5, 8, 0, 0x0fc },
+ { 5, 8, 0, 0x0fd },
+ { -22, 8, jbig2HuffmanLOW, 0x0fe },
+ { 4166, 8, 32, 0x0ff },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableK[] = {
+ { 1, 1, 0, 0x000 },
+ { 2, 2, 1, 0x002 },
+ { 4, 4, 0, 0x00c },
+ { 5, 4, 1, 0x00d },
+ { 7, 5, 1, 0x01c },
+ { 9, 5, 2, 0x01d },
+ { 13, 6, 2, 0x03c },
+ { 17, 7, 2, 0x07a },
+ { 21, 7, 3, 0x07b },
+ { 29, 7, 4, 0x07c },
+ { 45, 7, 5, 0x07d },
+ { 77, 7, 6, 0x07e },
+ { 141, 7, 32, 0x07f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableL[] = {
+ { 1, 1, 0, 0x000 },
+ { 2, 2, 0, 0x002 },
+ { 3, 3, 1, 0x006 },
+ { 5, 5, 0, 0x01c },
+ { 6, 5, 1, 0x01d },
+ { 8, 6, 1, 0x03c },
+ { 10, 7, 0, 0x07a },
+ { 11, 7, 1, 0x07b },
+ { 13, 7, 2, 0x07c },
+ { 17, 7, 3, 0x07d },
+ { 25, 7, 4, 0x07e },
+ { 41, 8, 5, 0x0fe },
+ { 73, 8, 32, 0x0ff },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableM[] = {
+ { 1, 1, 0, 0x000 },
+ { 2, 3, 0, 0x004 },
+ { 7, 3, 3, 0x005 },
+ { 3, 4, 0, 0x00c },
+ { 5, 4, 1, 0x00d },
+ { 4, 5, 0, 0x01c },
+ { 15, 6, 1, 0x03a },
+ { 17, 6, 2, 0x03b },
+ { 21, 6, 3, 0x03c },
+ { 29, 6, 4, 0x03d },
+ { 45, 6, 5, 0x03e },
+ { 77, 7, 6, 0x07e },
+ { 141, 7, 32, 0x07f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableN[] = {
+ { 0, 1, 0, 0x000 },
+ { -2, 3, 0, 0x004 },
+ { -1, 3, 0, 0x005 },
+ { 1, 3, 0, 0x006 },
+ { 2, 3, 0, 0x007 },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+static JBIG2HuffmanTable huffTableO[] = {
+ { 0, 1, 0, 0x000 },
+ { -1, 3, 0, 0x004 },
+ { 1, 3, 0, 0x005 },
+ { -2, 4, 0, 0x00c },
+ { 2, 4, 0, 0x00d },
+ { -4, 5, 1, 0x01c },
+ { 3, 5, 1, 0x01d },
+ { -8, 6, 2, 0x03c },
+ { 5, 6, 2, 0x03d },
+ { -24, 7, 4, 0x07c },
+ { 9, 7, 4, 0x07d },
+ { -25, 7, jbig2HuffmanLOW, 0x07e },
+ { 25, 7, 32, 0x07f },
+ { 0, 0, jbig2HuffmanEOT, 0 }
+};
+
+//------------------------------------------------------------------------
+// JBIG2HuffmanDecoder
+//------------------------------------------------------------------------
+
+class JBIG2HuffmanDecoder {
+public:
+
+ JBIG2HuffmanDecoder();
+ ~JBIG2HuffmanDecoder();
+ void setStream(Stream *strA) { str = strA; }
+
+ void reset();
+
+ // Returns false for OOB, otherwise sets *<x> and returns true.
+ GBool decodeInt(int *x, JBIG2HuffmanTable *table);
+
+ Guint readBits(Guint n);
+ Guint readBit();
+
+ // Sort the table by prefix length and assign prefix values.
+ void buildTable(JBIG2HuffmanTable *table, Guint len);
+
+private:
+
+ Stream *str;
+ Guint buf;
+ Guint bufLen;
+};
+
+JBIG2HuffmanDecoder::JBIG2HuffmanDecoder() {
+ str = NULL;
+ reset();
+}
+
+JBIG2HuffmanDecoder::~JBIG2HuffmanDecoder() {
+}
+
+void JBIG2HuffmanDecoder::reset() {
+ buf = 0;
+ bufLen = 0;
+}
+
+//~ optimize this
+GBool JBIG2HuffmanDecoder::decodeInt(int *x, JBIG2HuffmanTable *table) {
+ Guint i, len, prefix;
+
+ i = 0;
+ len = 0;
+ prefix = 0;
+ while (table[i].rangeLen != jbig2HuffmanEOT) {
+ while (len < table[i].prefixLen) {
+ prefix = (prefix << 1) | readBit();
+ ++len;
+ }
+ if (prefix == table[i].prefix) {
+ if (table[i].rangeLen == jbig2HuffmanOOB) {
+ return gFalse;
+ }
+ if (table[i].rangeLen == jbig2HuffmanLOW) {
+ *x = table[i].val - readBits(32);
+ } else if (table[i].rangeLen > 0) {
+ *x = table[i].val + readBits(table[i].rangeLen);
+ } else {
+ *x = table[i].val;
+ }
+ return gTrue;
+ }
+ ++i;
+ }
+ return gFalse;
+}
+
+Guint JBIG2HuffmanDecoder::readBits(Guint n) {
+ Guint x, mask, nLeft;
+
+ mask = (n == 32) ? 0xffffffff : ((1 << n) - 1);
+ if (bufLen >= n) {
+ x = (buf >> (bufLen - n)) & mask;
+ bufLen -= n;
+ } else {
+ x = buf & ((1 << bufLen) - 1);
+ nLeft = n - bufLen;
+ bufLen = 0;
+ while (nLeft >= 8) {
+ x = (x << 8) | (str->getChar() & 0xff);
+ nLeft -= 8;
+ }
+ if (nLeft > 0) {
+ buf = str->getChar();
+ bufLen = 8 - nLeft;
+ x = (x << nLeft) | ((buf >> bufLen) & ((1 << nLeft) - 1));
+ }
+ }
+ return x;
+}
+
+Guint JBIG2HuffmanDecoder::readBit() {
+ if (bufLen == 0) {
+ buf = str->getChar();
+ bufLen = 8;
+ }
+ --bufLen;
+ return (buf >> bufLen) & 1;
+}
+
+void JBIG2HuffmanDecoder::buildTable(JBIG2HuffmanTable *table, Guint len) {
+ Guint i, j, k, prefix;
+ JBIG2HuffmanTable tab;
+
+ // stable selection sort:
+ // - entries with prefixLen > 0, in ascending prefixLen order
+ // - entry with prefixLen = 0, rangeLen = EOT
+ // - all other entries with prefixLen = 0
+ // (on entry, table[len] has prefixLen = 0, rangeLen = EOT)
+ for (i = 0; i < len; ++i) {
+ for (j = i; j < len && table[j].prefixLen == 0; ++j) ;
+ if (j == len) {
+ break;
+ }
+ for (k = j + 1; k < len; ++k) {
+ if (table[k].prefixLen > 0 &&
+ table[k].prefixLen < table[j].prefixLen) {
+ j = k;
+ }
+ }
+ if (j != i) {
+ tab = table[j];
+ for (k = j; k > i; --k) {
+ table[k] = table[k - 1];
+ }
+ table[i] = tab;
+ }
+ }
+ table[i] = table[len];
+
+ // assign prefixes
+ if (table[0].rangeLen != jbig2HuffmanEOT) {
+ i = 0;
+ prefix = 0;
+ table[i++].prefix = prefix++;
+ for (; table[i].rangeLen != jbig2HuffmanEOT; ++i) {
+ prefix <<= table[i].prefixLen - table[i-1].prefixLen;
+ table[i].prefix = prefix++;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// JBIG2MMRDecoder
+//------------------------------------------------------------------------
+
+class JBIG2MMRDecoder {
+public:
+
+ JBIG2MMRDecoder();
+ ~JBIG2MMRDecoder();
+ void setStream(Stream *strA) { str = strA; }
+ void reset();
+ int get2DCode();
+ int getBlackCode();
+ int getWhiteCode();
+ Guint get24Bits();
+ void skipTo(Guint length);
+
+private:
+
+ Stream *str;
+ Guint buf;
+ Guint bufLen;
+ Guint nBytesRead;
+};
+
+JBIG2MMRDecoder::JBIG2MMRDecoder() {
+ str = NULL;
+ reset();
+}
+
+JBIG2MMRDecoder::~JBIG2MMRDecoder() {
+}
+
+void JBIG2MMRDecoder::reset() {
+ buf = 0;
+ bufLen = 0;
+ nBytesRead = 0;
+}
+
+int JBIG2MMRDecoder::get2DCode() {
+ const CCITTCode *p;
+
+ if (bufLen == 0) {
+ buf = str->getChar() & 0xff;
+ bufLen = 8;
+ ++nBytesRead;
+ p = &twoDimTab1[(buf >> 1) & 0x7f];
+ } else if (bufLen == 8) {
+ p = &twoDimTab1[(buf >> 1) & 0x7f];
+ } else {
+ p = &twoDimTab1[(buf << (7 - bufLen)) & 0x7f];
+ if (p->bits < 0 || p->bits > (int)bufLen) {
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bufLen += 8;
+ ++nBytesRead;
+ p = &twoDimTab1[(buf >> (bufLen - 7)) & 0x7f];
+ }
+ }
+ if (p->bits < 0) {
+ error(str->getPos(), "Bad two dim code in JBIG2 MMR stream");
+ return EOF;
+ }
+ bufLen -= p->bits;
+ return p->n;
+}
+
+int JBIG2MMRDecoder::getWhiteCode() {
+ const CCITTCode *p;
+ Guint code;
+
+ if (bufLen == 0) {
+ buf = str->getChar() & 0xff;
+ bufLen = 8;
+ ++nBytesRead;
+ }
+ while (1) {
+ if (bufLen >= 11 && ((buf >> (bufLen - 7)) & 0x7f) == 0) {
+ if (bufLen <= 12) {
+ code = buf << (12 - bufLen);
+ } else {
+ code = buf >> (bufLen - 12);
+ }
+ p = &whiteTab1[code & 0x1f];
+ } else {
+ if (bufLen <= 9) {
+ code = buf << (9 - bufLen);
+ } else {
+ code = buf >> (bufLen - 9);
+ }
+ p = &whiteTab2[code & 0x1ff];
+ }
+ if (p->bits > 0 && p->bits <= (int)bufLen) {
+ bufLen -= p->bits;
+ return p->n;
+ }
+ if (bufLen >= 12) {
+ break;
+ }
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bufLen += 8;
+ ++nBytesRead;
+ }
+ error(str->getPos(), "Bad white code in JBIG2 MMR stream");
+ // eat a bit and return a positive number so that the caller doesn't
+ // go into an infinite loop
+ --bufLen;
+ return 1;
+}
+
+int JBIG2MMRDecoder::getBlackCode() {
+ const CCITTCode *p;
+ Guint code;
+
+ if (bufLen == 0) {
+ buf = str->getChar() & 0xff;
+ bufLen = 8;
+ ++nBytesRead;
+ }
+ while (1) {
+ if (bufLen >= 10 && ((buf >> (bufLen - 6)) & 0x3f) == 0) {
+ if (bufLen <= 13) {
+ code = buf << (13 - bufLen);
+ } else {
+ code = buf >> (bufLen - 13);
+ }
+ p = &blackTab1[code & 0x7f];
+ } else if (bufLen >= 7 && ((buf >> (bufLen - 4)) & 0x0f) == 0 &&
+ ((buf >> (bufLen - 6)) & 0x03) != 0) {
+ if (bufLen <= 12) {
+ code = buf << (12 - bufLen);
+ } else {
+ code = buf >> (bufLen - 12);
+ }
+ p = &blackTab2[(code & 0xff) - 64];
+ } else {
+ if (bufLen <= 6) {
+ code = buf << (6 - bufLen);
+ } else {
+ code = buf >> (bufLen - 6);
+ }
+ p = &blackTab3[code & 0x3f];
+ }
+ if (p->bits > 0 && p->bits <= (int)bufLen) {
+ bufLen -= p->bits;
+ return p->n;
+ }
+ if (bufLen >= 13) {
+ break;
+ }
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bufLen += 8;
+ ++nBytesRead;
+ }
+ error(str->getPos(), "Bad black code in JBIG2 MMR stream");
+ // eat a bit and return a positive number so that the caller doesn't
+ // go into an infinite loop
+ --bufLen;
+ return 1;
+}
+
+Guint JBIG2MMRDecoder::get24Bits() {
+ while (bufLen < 24) {
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bufLen += 8;
+ ++nBytesRead;
+ }
+ return (buf >> (bufLen - 24)) & 0xffffff;
+}
+
+void JBIG2MMRDecoder::skipTo(Guint length) {
+ while (nBytesRead < length) {
+ str->getChar();
+ ++nBytesRead;
+ }
+}
+
+//------------------------------------------------------------------------
+// JBIG2Segment
+//------------------------------------------------------------------------
+
+enum JBIG2SegmentType {
+ jbig2SegBitmap,
+ jbig2SegSymbolDict,
+ jbig2SegPatternDict,
+ jbig2SegCodeTable
+};
+
+class JBIG2Segment {
+public:
+
+ JBIG2Segment(Guint segNumA) { segNum = segNumA; }
+ virtual ~JBIG2Segment() {}
+ void setSegNum(Guint segNumA) { segNum = segNumA; }
+ Guint getSegNum() { return segNum; }
+ virtual JBIG2SegmentType getType() = 0;
+
+private:
+
+ Guint segNum;
+};
+
+//------------------------------------------------------------------------
+// JBIG2Bitmap
+//------------------------------------------------------------------------
+
+struct JBIG2BitmapPtr {
+ Guchar *p;
+ int shift;
+ int x;
+};
+
+class JBIG2Bitmap: public JBIG2Segment {
+public:
+
+ JBIG2Bitmap(Guint segNumA, int wA, int hA);
+ virtual ~JBIG2Bitmap();
+ virtual JBIG2SegmentType getType() { return jbig2SegBitmap; }
+ JBIG2Bitmap *copy() { return new JBIG2Bitmap(0, this); }
+ JBIG2Bitmap *getSlice(Guint x, Guint y, Guint wA, Guint hA);
+ void expand(int newH, Guint pixel);
+ void clearToZero();
+ void clearToOne();
+ int getWidth() { return w; }
+ int getHeight() { return h; }
+ int getPixel(int x, int y)
+ { return (x < 0 || x >= w || y < 0 || y >= h) ? 0 :
+ (data[y * line + (x >> 3)] >> (7 - (x & 7))) & 1; }
+ void setPixel(int x, int y)
+ { data[y * line + (x >> 3)] |= 1 << (7 - (x & 7)); }
+ void clearPixel(int x, int y)
+ { data[y * line + (x >> 3)] &= 0x7f7f >> (x & 7); }
+ void getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr);
+ int nextPixel(JBIG2BitmapPtr *ptr);
+ void duplicateRow(int yDest, int ySrc);
+ void combine(JBIG2Bitmap *bitmap, int x, int y, Guint combOp);
+ Guchar *getDataPtr() { return data; }
+ int getDataSize() { return h * line; }
+ GBool isOk() { return data != NULL; }
+
+private:
+
+ JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap);
+
+ int w, h, line;
+ Guchar *data;
+};
+
+JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA):
+ JBIG2Segment(segNumA)
+{
+ w = wA;
+ h = hA;
+ line = (wA + 7) >> 3;
+
+ if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ data = NULL;
+ return;
+ }
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)gmalloc(h * line + 1);
+ data[h * line] = 0;
+}
+
+JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
+ JBIG2Segment(segNumA)
+{
+ w = bitmap->w;
+ h = bitmap->h;
+ line = bitmap->line;
+
+ if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ data = NULL;
+ return;
+ }
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)gmalloc(h * line + 1);
+ memcpy(data, bitmap->data, h * line);
+ data[h * line] = 0;
+}
+
+JBIG2Bitmap::~JBIG2Bitmap() {
+ gfree(data);
+}
+
+//~ optimize this
+JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint x, Guint y, Guint wA, Guint hA) {
+ JBIG2Bitmap *slice;
+ Guint xx, yy;
+
+ slice = new JBIG2Bitmap(0, wA, hA);
+ slice->clearToZero();
+ for (yy = 0; yy < hA; ++yy) {
+ for (xx = 0; xx < wA; ++xx) {
+ if (getPixel(x + xx, y + yy)) {
+ slice->setPixel(xx, yy);
+ }
+ }
+ }
+ return slice;
+}
+
+void JBIG2Bitmap::expand(int newH, Guint pixel) {
+ if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) {
+ error(-1, "invalid width/height");
+ gfree(data);
+ data = NULL;
+ return;
+ }
+ // need to allocate one extra guard byte for use in combine()
+ data = (Guchar *)grealloc(data, newH * line + 1);
+ if (pixel) {
+ memset(data + h * line, 0xff, (newH - h) * line);
+ } else {
+ memset(data + h * line, 0x00, (newH - h) * line);
+ }
+ h = newH;
+ data[h * line] = 0;
+}
+
+void JBIG2Bitmap::clearToZero() {
+ memset(data, 0, h * line);
+}
+
+void JBIG2Bitmap::clearToOne() {
+ memset(data, 0xff, h * line);
+}
+
+inline void JBIG2Bitmap::getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr) {
+ if (y < 0 || y >= h || x >= w) {
+ ptr->p = NULL;
+ ptr->shift = 0; // make gcc happy
+ ptr->x = 0; // make gcc happy
+ } else if (x < 0) {
+ ptr->p = &data[y * line];
+ ptr->shift = 7;
+ ptr->x = x;
+ } else {
+ ptr->p = &data[y * line + (x >> 3)];
+ ptr->shift = 7 - (x & 7);
+ ptr->x = x;
+ }
+}
+
+inline int JBIG2Bitmap::nextPixel(JBIG2BitmapPtr *ptr) {
+ int pix;
+
+ if (!ptr->p) {
+ pix = 0;
+ } else if (ptr->x < 0) {
+ ++ptr->x;
+ pix = 0;
+ } else {
+ pix = (*ptr->p >> ptr->shift) & 1;
+ if (++ptr->x == w) {
+ ptr->p = NULL;
+ } else if (ptr->shift == 0) {
+ ++ptr->p;
+ ptr->shift = 7;
+ } else {
+ --ptr->shift;
+ }
+ }
+ return pix;
+}
+
+void JBIG2Bitmap::duplicateRow(int yDest, int ySrc) {
+ memcpy(data + yDest * line, data + ySrc * line, line);
+}
+
+void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
+ Guint combOp) {
+ int x0, x1, y0, y1, xx, yy;
+ Guchar *srcPtr, *destPtr;
+ Guint src0, src1, src, dest, s1, s2, m1, m2, m3;
+ GBool oneByte;
+
+ // check for the pathological case where y = -2^31
+ if (y < -0x7fffffff) {
+ return;
+ }
+ if (y < 0) {
+ y0 = -y;
+ } else {
+ y0 = 0;
+ }
+ if (y + bitmap->h > h) {
+ y1 = h - y;
+ } else {
+ y1 = bitmap->h;
+ }
+ if (y0 >= y1) {
+ return;
+ }
+
+ if (x >= 0) {
+ x0 = x & ~7;
+ } else {
+ x0 = 0;
+ }
+ x1 = x + bitmap->w;
+ if (x1 > w) {
+ x1 = w;
+ }
+ if (x0 >= x1) {
+ return;
+ }
+
+ s1 = x & 7;
+ s2 = 8 - s1;
+ m1 = 0xff >> (x1 & 7);
+ m2 = 0xff << (((x1 & 7) == 0) ? 0 : 8 - (x1 & 7));
+ m3 = (0xff >> s1) & m2;
+
+ oneByte = x0 == ((x1 - 1) & ~7);
+
+ for (yy = y0; yy < y1; ++yy) {
+
+ // one byte per line -- need to mask both left and right side
+ if (oneByte) {
+ if (x >= 0) {
+ destPtr = data + (y + yy) * line + (x >> 3);
+ srcPtr = bitmap->data + yy * bitmap->line;
+ dest = *destPtr;
+ src1 = *srcPtr;
+ switch (combOp) {
+ case 0: // or
+ dest |= (src1 >> s1) & m2;
+ break;
+ case 1: // and
+ dest &= ((0xff00 | src1) >> s1) | m1;
+ break;
+ case 2: // xor
+ dest ^= (src1 >> s1) & m2;
+ break;
+ case 3: // xnor
+ dest ^= ((src1 ^ 0xff) >> s1) & m2;
+ break;
+ case 4: // replace
+ dest = (dest & ~m3) | ((src1 >> s1) & m3);
+ break;
+ }
+ *destPtr = dest;
+ } else {
+ destPtr = data + (y + yy) * line;
+ srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
+ dest = *destPtr;
+ src1 = *srcPtr;
+ switch (combOp) {
+ case 0: // or
+ dest |= src1 & m2;
+ break;
+ case 1: // and
+ dest &= src1 | m1;
+ break;
+ case 2: // xor
+ dest ^= src1 & m2;
+ break;
+ case 3: // xnor
+ dest ^= (src1 ^ 0xff) & m2;
+ break;
+ case 4: // replace
+ dest = (src1 & m2) | (dest & m1);
+ break;
+ }
+ *destPtr = dest;
+ }
+
+ // multiple bytes per line -- need to mask left side of left-most
+ // byte and right side of right-most byte
+ } else {
+
+ // left-most byte
+ if (x >= 0) {
+ destPtr = data + (y + yy) * line + (x >> 3);
+ srcPtr = bitmap->data + yy * bitmap->line;
+ src1 = *srcPtr++;
+ dest = *destPtr;
+ switch (combOp) {
+ case 0: // or
+ dest |= src1 >> s1;
+ break;
+ case 1: // and
+ dest &= (0xff00 | src1) >> s1;
+ break;
+ case 2: // xor
+ dest ^= src1 >> s1;
+ break;
+ case 3: // xnor
+ dest ^= (src1 ^ 0xff) >> s1;
+ break;
+ case 4: // replace
+ dest = (dest & (0xff << s2)) | (src1 >> s1);
+ break;
+ }
+ *destPtr++ = dest;
+ xx = x0 + 8;
+ } else {
+ destPtr = data + (y + yy) * line;
+ srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
+ src1 = *srcPtr++;
+ xx = x0;
+ }
+
+ // middle bytes
+ for (; xx < x1 - 8; xx += 8) {
+ dest = *destPtr;
+ src0 = src1;
+ src1 = *srcPtr++;
+ src = (((src0 << 8) | src1) >> s1) & 0xff;
+ switch (combOp) {
+ case 0: // or
+ dest |= src;
+ break;
+ case 1: // and
+ dest &= src;
+ break;
+ case 2: // xor
+ dest ^= src;
+ break;
+ case 3: // xnor
+ dest ^= src ^ 0xff;
+ break;
+ case 4: // replace
+ dest = src;
+ break;
+ }
+ *destPtr++ = dest;
+ }
+
+ // right-most byte
+ // note: this last byte (src1) may not actually be used, depending
+ // on the values of s1, m1, and m2 - and in fact, it may be off
+ // the edge of the source bitmap, which means we need to allocate
+ // one extra guard byte at the end of each bitmap
+ dest = *destPtr;
+ src0 = src1;
+ src1 = *srcPtr++;
+ src = (((src0 << 8) | src1) >> s1) & 0xff;
+ switch (combOp) {
+ case 0: // or
+ dest |= src & m2;
+ break;
+ case 1: // and
+ dest &= src | m1;
+ break;
+ case 2: // xor
+ dest ^= src & m2;
+ break;
+ case 3: // xnor
+ dest ^= (src ^ 0xff) & m2;
+ break;
+ case 4: // replace
+ dest = (src & m2) | (dest & m1);
+ break;
+ }
+ *destPtr = dest;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// JBIG2SymbolDict
+//------------------------------------------------------------------------
+
+class JBIG2SymbolDict: public JBIG2Segment {
+public:
+
+ JBIG2SymbolDict(Guint segNumA, Guint sizeA);
+ virtual ~JBIG2SymbolDict();
+ virtual JBIG2SegmentType getType() { return jbig2SegSymbolDict; }
+ Guint getSize() { return size; }
+ void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; }
+ JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; }
+ GBool isOk() { return bitmaps != NULL; }
+ void setGenericRegionStats(JArithmeticDecoderStats *stats)
+ { genericRegionStats = stats; }
+ void setRefinementRegionStats(JArithmeticDecoderStats *stats)
+ { refinementRegionStats = stats; }
+ JArithmeticDecoderStats *getGenericRegionStats()
+ { return genericRegionStats; }
+ JArithmeticDecoderStats *getRefinementRegionStats()
+ { return refinementRegionStats; }
+
+private:
+
+ Guint size;
+ JBIG2Bitmap **bitmaps;
+ JArithmeticDecoderStats *genericRegionStats;
+ JArithmeticDecoderStats *refinementRegionStats;
+};
+
+JBIG2SymbolDict::JBIG2SymbolDict(Guint segNumA, Guint sizeA):
+ JBIG2Segment(segNumA)
+{
+ size = sizeA;
+ bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(size, sizeof(JBIG2Bitmap *));
+ if (!bitmaps) size = 0;
+ genericRegionStats = NULL;
+ refinementRegionStats = NULL;
+}
+
+JBIG2SymbolDict::~JBIG2SymbolDict() {
+ Guint i;
+
+ for (i = 0; i < size; ++i) {
+ delete bitmaps[i];
+ }
+ gfree(bitmaps);
+ if (genericRegionStats) {
+ delete genericRegionStats;
+ }
+ if (refinementRegionStats) {
+ delete refinementRegionStats;
+ }
+}
+
+//------------------------------------------------------------------------
+// JBIG2PatternDict
+//------------------------------------------------------------------------
+
+class JBIG2PatternDict: public JBIG2Segment {
+public:
+
+ JBIG2PatternDict(Guint segNumA, Guint sizeA);
+ virtual ~JBIG2PatternDict();
+ virtual JBIG2SegmentType getType() { return jbig2SegPatternDict; }
+ Guint getSize() { return size; }
+ void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; }
+ JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; }
+
+private:
+
+ Guint size;
+ JBIG2Bitmap **bitmaps;
+};
+
+JBIG2PatternDict::JBIG2PatternDict(Guint segNumA, Guint sizeA):
+ JBIG2Segment(segNumA)
+{
+ size = sizeA;
+ bitmaps = (JBIG2Bitmap **)gmallocn(size, sizeof(JBIG2Bitmap *));
+}
+
+JBIG2PatternDict::~JBIG2PatternDict() {
+ Guint i;
+
+ for (i = 0; i < size; ++i) {
+ delete bitmaps[i];
+ }
+ gfree(bitmaps);
+}
+
+//------------------------------------------------------------------------
+// JBIG2CodeTable
+//------------------------------------------------------------------------
+
+class JBIG2CodeTable: public JBIG2Segment {
+public:
+
+ JBIG2CodeTable(Guint segNumA, JBIG2HuffmanTable *tableA);
+ virtual ~JBIG2CodeTable();
+ virtual JBIG2SegmentType getType() { return jbig2SegCodeTable; }
+ JBIG2HuffmanTable *getHuffTable() { return table; }
+
+private:
+
+ JBIG2HuffmanTable *table;
+};
+
+JBIG2CodeTable::JBIG2CodeTable(Guint segNumA, JBIG2HuffmanTable *tableA):
+ JBIG2Segment(segNumA)
+{
+ table = tableA;
+}
+
+JBIG2CodeTable::~JBIG2CodeTable() {
+ gfree(table);
+}
+
+//------------------------------------------------------------------------
+// JBIG2Stream
+//------------------------------------------------------------------------
+
+JBIG2Stream::JBIG2Stream(Stream *strA, Object *globalsStreamA):
+ FilterStream(strA)
+{
+ pageBitmap = NULL;
+
+ arithDecoder = new JArithmeticDecoder();
+ genericRegionStats = new JArithmeticDecoderStats(1 << 1);
+ refinementRegionStats = new JArithmeticDecoderStats(1 << 1);
+ iadhStats = new JArithmeticDecoderStats(1 << 9);
+ iadwStats = new JArithmeticDecoderStats(1 << 9);
+ iaexStats = new JArithmeticDecoderStats(1 << 9);
+ iaaiStats = new JArithmeticDecoderStats(1 << 9);
+ iadtStats = new JArithmeticDecoderStats(1 << 9);
+ iaitStats = new JArithmeticDecoderStats(1 << 9);
+ iafsStats = new JArithmeticDecoderStats(1 << 9);
+ iadsStats = new JArithmeticDecoderStats(1 << 9);
+ iardxStats = new JArithmeticDecoderStats(1 << 9);
+ iardyStats = new JArithmeticDecoderStats(1 << 9);
+ iardwStats = new JArithmeticDecoderStats(1 << 9);
+ iardhStats = new JArithmeticDecoderStats(1 << 9);
+ iariStats = new JArithmeticDecoderStats(1 << 9);
+ iaidStats = new JArithmeticDecoderStats(1 << 1);
+ huffDecoder = new JBIG2HuffmanDecoder();
+ mmrDecoder = new JBIG2MMRDecoder();
+
+ globalsStreamA->copy(&globalsStream);
+ segments = globalSegments = NULL;
+ curStr = NULL;
+ dataPtr = dataEnd = NULL;
+}
+
+JBIG2Stream::~JBIG2Stream() {
+ close();
+ globalsStream.free();
+ delete arithDecoder;
+ delete genericRegionStats;
+ delete refinementRegionStats;
+ delete iadhStats;
+ delete iadwStats;
+ delete iaexStats;
+ delete iaaiStats;
+ delete iadtStats;
+ delete iaitStats;
+ delete iafsStats;
+ delete iadsStats;
+ delete iardxStats;
+ delete iardyStats;
+ delete iardwStats;
+ delete iardhStats;
+ delete iariStats;
+ delete iaidStats;
+ delete huffDecoder;
+ delete mmrDecoder;
+ delete str;
+}
+
+void JBIG2Stream::reset() {
+ // read the globals stream
+ globalSegments = new GooList();
+ if (globalsStream.isStream()) {
+ segments = globalSegments;
+ curStr = globalsStream.getStream();
+ curStr->reset();
+ arithDecoder->setStream(curStr);
+ huffDecoder->setStream(curStr);
+ mmrDecoder->setStream(curStr);
+ readSegments();
+ curStr->close();
+ }
+
+ // read the main stream
+ segments = new GooList();
+ curStr = str;
+ curStr->reset();
+ arithDecoder->setStream(curStr);
+ huffDecoder->setStream(curStr);
+ mmrDecoder->setStream(curStr);
+ readSegments();
+
+ if (pageBitmap) {
+ dataPtr = pageBitmap->getDataPtr();
+ dataEnd = dataPtr + pageBitmap->getDataSize();
+ } else {
+ dataPtr = dataEnd = NULL;
+ }
+}
+
+void JBIG2Stream::close() {
+ if (pageBitmap) {
+ delete pageBitmap;
+ pageBitmap = NULL;
+ }
+ if (segments) {
+ deleteGooList(segments, JBIG2Segment);
+ segments = NULL;
+ }
+ if (globalSegments) {
+ deleteGooList(globalSegments, JBIG2Segment);
+ globalSegments = NULL;
+ }
+ dataPtr = dataEnd = NULL;
+ FilterStream::close();
+}
+
+int JBIG2Stream::getChar() {
+ if (dataPtr && dataPtr < dataEnd) {
+ return (*dataPtr++ ^ 0xff) & 0xff;
+ }
+ return EOF;
+}
+
+int JBIG2Stream::lookChar() {
+ if (dataPtr && dataPtr < dataEnd) {
+ return (*dataPtr ^ 0xff) & 0xff;
+ }
+ return EOF;
+}
+
+int JBIG2Stream::getPos() {
+ if (pageBitmap == NULL) {
+ return 0;
+ }
+ return dataPtr - pageBitmap->getDataPtr();
+}
+
+GooString *JBIG2Stream::getPSFilter(int psLevel, char *indent) {
+ return NULL;
+}
+
+GBool JBIG2Stream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+void JBIG2Stream::readSegments() {
+ Guint segNum, segFlags, segType, page, segLength;
+ Guint refFlags, nRefSegs;
+ Guint *refSegs;
+ int segDataPos;
+ int c1, c2, c3;
+ Guint i;
+
+ while (readULong(&segNum)) {
+
+ // segment header flags
+ if (!readUByte(&segFlags)) {
+ goto eofError1;
+ }
+ segType = segFlags & 0x3f;
+
+ // referred-to segment count and retention flags
+ if (!readUByte(&refFlags)) {
+ goto eofError1;
+ }
+ nRefSegs = refFlags >> 5;
+ if (nRefSegs == 7) {
+ if ((c1 = curStr->getChar()) == EOF ||
+ (c2 = curStr->getChar()) == EOF ||
+ (c3 = curStr->getChar()) == EOF) {
+ goto eofError1;
+ }
+ refFlags = (refFlags << 24) | (c1 << 16) | (c2 << 8) | c3;
+ nRefSegs = refFlags & 0x1fffffff;
+ for (i = 0; i < (nRefSegs + 9) >> 3; ++i) {
+ c1 = curStr->getChar();
+ }
+ }
+
+ // referred-to segment numbers
+ refSegs = (Guint *)gmallocn(nRefSegs, sizeof(Guint));
+ if (segNum <= 256) {
+ for (i = 0; i < nRefSegs; ++i) {
+ if (!readUByte(&refSegs[i])) {
+ goto eofError2;
+ }
+ }
+ } else if (segNum <= 65536) {
+ for (i = 0; i < nRefSegs; ++i) {
+ if (!readUWord(&refSegs[i])) {
+ goto eofError2;
+ }
+ }
+ } else {
+ for (i = 0; i < nRefSegs; ++i) {
+ if (!readULong(&refSegs[i])) {
+ goto eofError2;
+ }
+ }
+ }
+
+ // segment page association
+ if (segFlags & 0x40) {
+ if (!readULong(&page)) {
+ goto eofError2;
+ }
+ } else {
+ if (!readUByte(&page)) {
+ goto eofError2;
+ }
+ }
+
+ // segment data length
+ if (!readULong(&segLength)) {
+ goto eofError2;
+ }
+
+ // keep track of the start of the segment data
+ segDataPos = curStr->getPos();
+
+ // check for missing page information segment
+ if (!pageBitmap && ((segType >= 4 && segType <= 7) ||
+ (segType >= 20 && segType <= 43))) {
+ error(curStr->getPos(), "First JBIG2 segment associated with a page must be a page information segment");
+ goto syntaxError;
+ }
+
+ // read the segment data
+ switch (segType) {
+ case 0:
+ if (!readSymbolDictSeg(segNum, segLength, refSegs, nRefSegs)) {
+ goto syntaxError;
+ }
+ break;
+ case 4:
+ readTextRegionSeg(segNum, gFalse, gFalse, segLength, refSegs, nRefSegs);
+ break;
+ case 6:
+ readTextRegionSeg(segNum, gTrue, gFalse, segLength, refSegs, nRefSegs);
+ break;
+ case 7:
+ readTextRegionSeg(segNum, gTrue, gTrue, segLength, refSegs, nRefSegs);
+ break;
+ case 16:
+ readPatternDictSeg(segNum, segLength);
+ break;
+ case 20:
+ readHalftoneRegionSeg(segNum, gFalse, gFalse, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 22:
+ readHalftoneRegionSeg(segNum, gTrue, gFalse, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 23:
+ readHalftoneRegionSeg(segNum, gTrue, gTrue, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 36:
+ readGenericRegionSeg(segNum, gFalse, gFalse, segLength);
+ break;
+ case 38:
+ readGenericRegionSeg(segNum, gTrue, gFalse, segLength);
+ break;
+ case 39:
+ readGenericRegionSeg(segNum, gTrue, gTrue, segLength);
+ break;
+ case 40:
+ readGenericRefinementRegionSeg(segNum, gFalse, gFalse, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 42:
+ readGenericRefinementRegionSeg(segNum, gTrue, gFalse, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 43:
+ readGenericRefinementRegionSeg(segNum, gTrue, gTrue, segLength,
+ refSegs, nRefSegs);
+ break;
+ case 48:
+ readPageInfoSeg(segLength);
+ break;
+ case 50:
+ readEndOfStripeSeg(segLength);
+ break;
+ case 52:
+ readProfilesSeg(segLength);
+ break;
+ case 53:
+ readCodeTableSeg(segNum, segLength);
+ break;
+ case 62:
+ readExtensionSeg(segLength);
+ break;
+ default:
+ error(curStr->getPos(), "Unknown segment type in JBIG2 stream");
+ for (i = 0; i < segLength; ++i) {
+ if ((c1 = curStr->getChar()) == EOF) {
+ goto eofError2;
+ }
+ }
+ break;
+ }
+
+ // Make sure the segment handler read all of the bytes in the
+ // segment data, unless this segment is marked as having an
+ // unknown length (section 7.2.7 of the JBIG2 Final Committee Draft)
+
+ if (segLength != 0xffffffff) {
+
+ int segExtraBytes = segDataPos + segLength - curStr->getPos();
+ if (segExtraBytes > 0) {
+
+ // If we didn't read all of the bytes in the segment data,
+ // indicate an error, and throw away the rest of the data.
+
+ // v.3.1.01.13 of the LuraTech PDF Compressor Server will
+ // sometimes generate an extraneous NULL byte at the end of
+ // arithmetic-coded symbol dictionary segments when numNewSyms
+ // == 0. Segments like this often occur for blank pages.
+
+ error(curStr->getPos(), "%d extraneous byte%s after segment",
+ segExtraBytes, (segExtraBytes > 1) ? "s" : "");
+
+ // Burn through the remaining bytes -- inefficient, but
+ // hopefully we're not doing this much
+
+ int trash;
+ for (int i = segExtraBytes; i > 0; i--) {
+ readByte(&trash);
+ }
+
+ } else if (segExtraBytes < 0) {
+
+ // If we read more bytes than we should have, according to the
+ // segment length field, note an error.
+
+ error(curStr->getPos(), "Previous segment handler read too many bytes");
+
+ }
+
+ }
+
+ gfree(refSegs);
+ }
+
+ return;
+
+ syntaxError:
+ gfree(refSegs);
+ return;
+
+ eofError2:
+ gfree(refSegs);
+ eofError1:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
+ Guint *refSegs, Guint nRefSegs) {
+ JBIG2SymbolDict *symbolDict;
+ JBIG2HuffmanTable *huffDHTable, *huffDWTable;
+ JBIG2HuffmanTable *huffBMSizeTable, *huffAggInstTable;
+ JBIG2Segment *seg;
+ GooList *codeTables;
+ JBIG2SymbolDict *inputSymbolDict;
+ Guint flags, sdTemplate, sdrTemplate, huff, refAgg;
+ Guint huffDH, huffDW, huffBMSize, huffAggInst;
+ Guint contextUsed, contextRetained;
+ int sdATX[4], sdATY[4], sdrATX[2], sdrATY[2];
+ Guint numExSyms, numNewSyms, numInputSyms, symCodeLen;
+ JBIG2Bitmap **bitmaps;
+ JBIG2Bitmap *collBitmap, *refBitmap;
+ Guint *symWidths;
+ Guint symHeight, symWidth, totalWidth, x, symID;
+ int dh, dw, refAggNum, refDX, refDY, bmSize;
+ GBool ex;
+ int run, cnt;
+ Guint i, j, k;
+ Guchar *p;
+
+ symWidths = NULL;
+
+ // symbol dictionary flags
+ if (!readUWord(&flags)) {
+ goto eofError;
+ }
+ sdTemplate = (flags >> 10) & 3;
+ sdrTemplate = (flags >> 12) & 1;
+ huff = flags & 1;
+ refAgg = (flags >> 1) & 1;
+ huffDH = (flags >> 2) & 3;
+ huffDW = (flags >> 4) & 3;
+ huffBMSize = (flags >> 6) & 1;
+ huffAggInst = (flags >> 7) & 1;
+ contextUsed = (flags >> 8) & 1;
+ contextRetained = (flags >> 9) & 1;
+
+ // symbol dictionary AT flags
+ if (!huff) {
+ if (sdTemplate == 0) {
+ if (!readByte(&sdATX[0]) ||
+ !readByte(&sdATY[0]) ||
+ !readByte(&sdATX[1]) ||
+ !readByte(&sdATY[1]) ||
+ !readByte(&sdATX[2]) ||
+ !readByte(&sdATY[2]) ||
+ !readByte(&sdATX[3]) ||
+ !readByte(&sdATY[3])) {
+ goto eofError;
+ }
+ } else {
+ if (!readByte(&sdATX[0]) ||
+ !readByte(&sdATY[0])) {
+ goto eofError;
+ }
+ }
+ }
+
+ // symbol dictionary refinement AT flags
+ if (refAgg && !sdrTemplate) {
+ if (!readByte(&sdrATX[0]) ||
+ !readByte(&sdrATY[0]) ||
+ !readByte(&sdrATX[1]) ||
+ !readByte(&sdrATY[1])) {
+ goto eofError;
+ }
+ }
+
+ // SDNUMEXSYMS and SDNUMNEWSYMS
+ if (!readULong(&numExSyms) || !readULong(&numNewSyms)) {
+ goto eofError;
+ }
+
+ // get referenced segments: input symbol dictionaries and code tables
+ codeTables = new GooList();
+ numInputSyms = 0;
+ for (i = 0; i < nRefSegs; ++i) {
+ // This is need by bug 12014, returning gFalse makes it not crash
+ // but we end up with a empty page while acroread is able to render
+ // part of it
+ if ((seg = findSegment(refSegs[i]))) {
+ if (seg->getType() == jbig2SegSymbolDict) {
+ j = ((JBIG2SymbolDict *)seg)->getSize();
+ if (numInputSyms > UINT_MAX - j) {
+ error(curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary");
+ delete codeTables;
+ goto eofError;
+ }
+ numInputSyms += j;
+ } else if (seg->getType() == jbig2SegCodeTable) {
+ codeTables->append(seg);
+ }
+ } else {
+ delete codeTables;
+ return gFalse;
+ }
+ }
+ if (numInputSyms > UINT_MAX - numNewSyms) {
+ error(curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary");
+ delete codeTables;
+ goto eofError;
+ }
+
+ // compute symbol code length, per 6.5.8.2.3
+ // symCodeLen = ceil( log2( numInputSyms + numNewSyms ) )
+ symCodeLen = 1;
+ if (likely(numInputSyms + numNewSyms > 0)) { // don't fail too badly if the sum is 0
+ i = (numInputSyms + numNewSyms - 1) >> 1;
+ while (i) {
+ ++symCodeLen;
+ i >>= 1;
+ }
+ }
+
+ // get the input symbol bitmaps
+ bitmaps = (JBIG2Bitmap **)gmallocn(numInputSyms + numNewSyms,
+ sizeof(JBIG2Bitmap *));
+ for (i = 0; i < numInputSyms + numNewSyms; ++i) {
+ bitmaps[i] = NULL;
+ }
+ k = 0;
+ inputSymbolDict = NULL;
+ for (i = 0; i < nRefSegs; ++i) {
+ seg = findSegment(refSegs[i]);
+ if (seg != NULL && seg->getType() == jbig2SegSymbolDict) {
+ inputSymbolDict = (JBIG2SymbolDict *)seg;
+ for (j = 0; j < inputSymbolDict->getSize(); ++j) {
+ bitmaps[k++] = inputSymbolDict->getBitmap(j);
+ }
+ }
+ }
+
+ // get the Huffman tables
+ huffDHTable = huffDWTable = NULL; // make gcc happy
+ huffBMSizeTable = huffAggInstTable = NULL; // make gcc happy
+ i = 0;
+ if (huff) {
+ if (huffDH == 0) {
+ huffDHTable = huffTableD;
+ } else if (huffDH == 1) {
+ huffDHTable = huffTableE;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffDHTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffDW == 0) {
+ huffDWTable = huffTableB;
+ } else if (huffDW == 1) {
+ huffDWTable = huffTableC;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffDWTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffBMSize == 0) {
+ huffBMSizeTable = huffTableA;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffBMSizeTable =
+ ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffAggInst == 0) {
+ huffAggInstTable = huffTableA;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffAggInstTable =
+ ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ }
+ delete codeTables;
+
+ // set up the Huffman decoder
+ if (huff) {
+ huffDecoder->reset();
+
+ // set up the arithmetic decoder
+ } else {
+ if (contextUsed && inputSymbolDict) {
+ resetGenericStats(sdTemplate, inputSymbolDict->getGenericRegionStats());
+ } else {
+ resetGenericStats(sdTemplate, NULL);
+ }
+ resetIntStats(symCodeLen);
+ arithDecoder->start();
+ }
+
+ // set up the arithmetic decoder for refinement/aggregation
+ if (refAgg) {
+ if (contextUsed && inputSymbolDict) {
+ resetRefinementStats(sdrTemplate,
+ inputSymbolDict->getRefinementRegionStats());
+ } else {
+ resetRefinementStats(sdrTemplate, NULL);
+ }
+ }
+
+ // allocate symbol widths storage
+ if (huff && !refAgg) {
+ symWidths = (Guint *)gmallocn(numNewSyms, sizeof(Guint));
+ }
+
+ symHeight = 0;
+ i = 0;
+ while (i < numNewSyms) {
+
+ // read the height class delta height
+ if (huff) {
+ huffDecoder->decodeInt(&dh, huffDHTable);
+ } else {
+ arithDecoder->decodeInt(&dh, iadhStats);
+ }
+ if (dh < 0 && (Guint)-dh >= symHeight) {
+ error(curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary");
+ goto syntaxError;
+ }
+ symHeight += dh;
+ symWidth = 0;
+ totalWidth = 0;
+ j = i;
+
+ // read the symbols in this height class
+ while (1) {
+
+ // read the delta width
+ if (huff) {
+ if (!huffDecoder->decodeInt(&dw, huffDWTable)) {
+ break;
+ }
+ } else {
+ if (!arithDecoder->decodeInt(&dw, iadwStats)) {
+ break;
+ }
+ }
+ if (dw < 0 && (Guint)-dw >= symWidth) {
+ error(curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary");
+ goto syntaxError;
+ }
+ symWidth += dw;
+ if (i >= numNewSyms) {
+ error(curStr->getPos(), "Too many symbols in JBIG2 symbol dictionary");
+ goto syntaxError;
+ }
+
+ // using a collective bitmap, so don't read a bitmap here
+ if (huff && !refAgg) {
+ symWidths[i] = symWidth;
+ totalWidth += symWidth;
+
+ // refinement/aggregate coding
+ } else if (refAgg) {
+ if (huff) {
+ if (!huffDecoder->decodeInt(&refAggNum, huffAggInstTable)) {
+ break;
+ }
+ } else {
+ if (!arithDecoder->decodeInt(&refAggNum, iaaiStats)) {
+ break;
+ }
+ }
+#if 0 //~ This special case was added about a year before the final draft
+ //~ of the JBIG2 spec was released. I have encountered some old
+ //~ JBIG2 images that predate it.
+ if (0) {
+#else
+ if (refAggNum == 1) {
+#endif
+ if (huff) {
+ symID = huffDecoder->readBits(symCodeLen);
+ huffDecoder->decodeInt(&refDX, huffTableO);
+ huffDecoder->decodeInt(&refDY, huffTableO);
+ huffDecoder->decodeInt(&bmSize, huffTableA);
+ huffDecoder->reset();
+ arithDecoder->start();
+ } else {
+ symID = arithDecoder->decodeIAID(symCodeLen, iaidStats);
+ arithDecoder->decodeInt(&refDX, iardxStats);
+ arithDecoder->decodeInt(&refDY, iardyStats);
+ }
+ if (symID >= numInputSyms + i) {
+ error(curStr->getPos(), "Invalid symbol ID in JBIG2 symbol dictionary");
+ goto syntaxError;
+ }
+ refBitmap = bitmaps[symID];
+ bitmaps[numInputSyms + i] =
+ readGenericRefinementRegion(symWidth, symHeight,
+ sdrTemplate, gFalse,
+ refBitmap, refDX, refDY,
+ sdrATX, sdrATY);
+ //~ do we need to use the bmSize value here (in Huffman mode)?
+ } else {
+ bitmaps[numInputSyms + i] =
+ readTextRegion(huff, gTrue, symWidth, symHeight,
+ refAggNum, 0, numInputSyms + i, NULL,
+ symCodeLen, bitmaps, 0, 0, 0, 1, 0,
+ huffTableF, huffTableH, huffTableK, huffTableO,
+ huffTableO, huffTableO, huffTableO, huffTableA,
+ sdrTemplate, sdrATX, sdrATY);
+ }
+
+ // non-ref/agg coding
+ } else {
+ bitmaps[numInputSyms + i] =
+ readGenericBitmap(gFalse, symWidth, symHeight,
+ sdTemplate, gFalse, gFalse, NULL,
+ sdATX, sdATY, 0);
+ }
+
+ ++i;
+ }
+
+ // read the collective bitmap
+ if (huff && !refAgg) {
+ huffDecoder->decodeInt(&bmSize, huffBMSizeTable);
+ huffDecoder->reset();
+ if (bmSize == 0) {
+ collBitmap = new JBIG2Bitmap(0, totalWidth, symHeight);
+ bmSize = symHeight * ((totalWidth + 7) >> 3);
+ p = collBitmap->getDataPtr();
+ for (k = 0; k < (Guint)bmSize; ++k) {
+ *p++ = curStr->getChar();
+ }
+ } else {
+ collBitmap = readGenericBitmap(gTrue, totalWidth, symHeight,
+ 0, gFalse, gFalse, NULL, NULL, NULL,
+ bmSize);
+ }
+ x = 0;
+ for (; j < i; ++j) {
+ bitmaps[numInputSyms + j] =
+ collBitmap->getSlice(x, 0, symWidths[j], symHeight);
+ x += symWidths[j];
+ }
+ delete collBitmap;
+ }
+ }
+
+ // create the symbol dict object
+ symbolDict = new JBIG2SymbolDict(segNum, numExSyms);
+ if (!symbolDict->isOk()) {
+ delete symbolDict;
+ goto syntaxError;
+ }
+
+ // exported symbol list
+ i = j = 0;
+ ex = gFalse;
+ while (i < numInputSyms + numNewSyms) {
+ if (huff) {
+ huffDecoder->decodeInt(&run, huffTableA);
+ } else {
+ arithDecoder->decodeInt(&run, iaexStats);
+ }
+ if (i + run > numInputSyms + numNewSyms ||
+ (ex && j + run > numExSyms)) {
+ error(curStr->getPos(), "Too many exported symbols in JBIG2 symbol dictionary");
+ for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL);
+ delete symbolDict;
+ goto syntaxError;
+ }
+ if (ex) {
+ for (cnt = 0; cnt < run; ++cnt) {
+ symbolDict->setBitmap(j++, bitmaps[i++]->copy());
+ }
+ } else {
+ i += run;
+ }
+ ex = !ex;
+ }
+ if (j != numExSyms) {
+ error(curStr->getPos(), "Too few symbols in JBIG2 symbol dictionary");
+ for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL);
+ delete symbolDict;
+ goto syntaxError;
+ }
+
+ for (i = 0; i < numNewSyms; ++i) {
+ delete bitmaps[numInputSyms + i];
+ }
+ gfree(bitmaps);
+ if (symWidths) {
+ gfree(symWidths);
+ }
+
+ // save the arithmetic decoder stats
+ if (!huff && contextRetained) {
+ symbolDict->setGenericRegionStats(genericRegionStats->copy());
+ if (refAgg) {
+ symbolDict->setRefinementRegionStats(refinementRegionStats->copy());
+ }
+ }
+
+ // store the new symbol dict
+ segments->append(symbolDict);
+
+ return gTrue;
+
+ codeTableError:
+ error(curStr->getPos(), "Missing code table in JBIG2 symbol dictionary");
+ delete codeTables;
+
+ syntaxError:
+ for (i = 0; i < numNewSyms; ++i) {
+ if (bitmaps[numInputSyms + i]) {
+ delete bitmaps[numInputSyms + i];
+ }
+ }
+ gfree(bitmaps);
+ if (symWidths) {
+ gfree(symWidths);
+ }
+ return gFalse;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+ return gFalse;
+}
+
+void JBIG2Stream::readTextRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs, Guint nRefSegs) {
+ JBIG2Bitmap *bitmap;
+ JBIG2HuffmanTable runLengthTab[36];
+ JBIG2HuffmanTable *symCodeTab;
+ JBIG2HuffmanTable *huffFSTable, *huffDSTable, *huffDTTable;
+ JBIG2HuffmanTable *huffRDWTable, *huffRDHTable;
+ JBIG2HuffmanTable *huffRDXTable, *huffRDYTable, *huffRSizeTable;
+ JBIG2Segment *seg;
+ GooList *codeTables;
+ JBIG2SymbolDict *symbolDict;
+ JBIG2Bitmap **syms;
+ Guint w, h, x, y, segInfoFlags, extCombOp;
+ Guint flags, huff, refine, logStrips, refCorner, transposed;
+ Guint combOp, defPixel, templ;
+ int sOffset;
+ Guint huffFlags, huffFS, huffDS, huffDT;
+ Guint huffRDW, huffRDH, huffRDX, huffRDY, huffRSize;
+ Guint numInstances, numSyms, symCodeLen;
+ int atx[2], aty[2];
+ Guint i, k, kk;
+ int j;
+
+ // region segment info field
+ if (!readULong(&w) || !readULong(&h) ||
+ !readULong(&x) || !readULong(&y) ||
+ !readUByte(&segInfoFlags)) {
+ goto eofError;
+ }
+ extCombOp = segInfoFlags & 7;
+
+ // rest of the text region header
+ if (!readUWord(&flags)) {
+ goto eofError;
+ }
+ huff = flags & 1;
+ refine = (flags >> 1) & 1;
+ logStrips = (flags >> 2) & 3;
+ refCorner = (flags >> 4) & 3;
+ transposed = (flags >> 6) & 1;
+ combOp = (flags >> 7) & 3;
+ defPixel = (flags >> 9) & 1;
+ sOffset = (flags >> 10) & 0x1f;
+ if (sOffset & 0x10) {
+ sOffset |= -1 - 0x0f;
+ }
+ templ = (flags >> 15) & 1;
+ huffFS = huffDS = huffDT = 0; // make gcc happy
+ huffRDW = huffRDH = huffRDX = huffRDY = huffRSize = 0; // make gcc happy
+ if (huff) {
+ if (!readUWord(&huffFlags)) {
+ goto eofError;
+ }
+ huffFS = huffFlags & 3;
+ huffDS = (huffFlags >> 2) & 3;
+ huffDT = (huffFlags >> 4) & 3;
+ huffRDW = (huffFlags >> 6) & 3;
+ huffRDH = (huffFlags >> 8) & 3;
+ huffRDX = (huffFlags >> 10) & 3;
+ huffRDY = (huffFlags >> 12) & 3;
+ huffRSize = (huffFlags >> 14) & 1;
+ }
+ if (refine && templ == 0) {
+ if (!readByte(&atx[0]) || !readByte(&aty[0]) ||
+ !readByte(&atx[1]) || !readByte(&aty[1])) {
+ goto eofError;
+ }
+ }
+ if (!readULong(&numInstances)) {
+ goto eofError;
+ }
+
+ // get symbol dictionaries and tables
+ codeTables = new GooList();
+ numSyms = 0;
+ for (i = 0; i < nRefSegs; ++i) {
+ if ((seg = findSegment(refSegs[i]))) {
+ if (seg->getType() == jbig2SegSymbolDict) {
+ numSyms += ((JBIG2SymbolDict *)seg)->getSize();
+ } else if (seg->getType() == jbig2SegCodeTable) {
+ codeTables->append(seg);
+ }
+ } else {
+ error(curStr->getPos(), "Invalid segment reference in JBIG2 text region");
+ delete codeTables;
+ return;
+ }
+ }
+ symCodeLen = 0;
+ i = 1;
+ while (i < numSyms) {
+ ++symCodeLen;
+ i <<= 1;
+ }
+
+ // get the symbol bitmaps
+ syms = (JBIG2Bitmap **)gmallocn(numSyms, sizeof(JBIG2Bitmap *));
+ kk = 0;
+ for (i = 0; i < nRefSegs; ++i) {
+ if ((seg = findSegment(refSegs[i]))) {
+ if (seg->getType() == jbig2SegSymbolDict) {
+ symbolDict = (JBIG2SymbolDict *)seg;
+ for (k = 0; k < symbolDict->getSize(); ++k) {
+ syms[kk++] = symbolDict->getBitmap(k);
+ }
+ }
+ }
+ }
+
+ // get the Huffman tables
+ huffFSTable = huffDSTable = huffDTTable = NULL; // make gcc happy
+ huffRDWTable = huffRDHTable = NULL; // make gcc happy
+ huffRDXTable = huffRDYTable = huffRSizeTable = NULL; // make gcc happy
+ i = 0;
+ if (huff) {
+ if (huffFS == 0) {
+ huffFSTable = huffTableF;
+ } else if (huffFS == 1) {
+ huffFSTable = huffTableG;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffFSTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffDS == 0) {
+ huffDSTable = huffTableH;
+ } else if (huffDS == 1) {
+ huffDSTable = huffTableI;
+ } else if (huffDS == 2) {
+ huffDSTable = huffTableJ;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffDSTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffDT == 0) {
+ huffDTTable = huffTableK;
+ } else if (huffDT == 1) {
+ huffDTTable = huffTableL;
+ } else if (huffDT == 2) {
+ huffDTTable = huffTableM;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffDTTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffRDW == 0) {
+ huffRDWTable = huffTableN;
+ } else if (huffRDW == 1) {
+ huffRDWTable = huffTableO;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffRDWTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffRDH == 0) {
+ huffRDHTable = huffTableN;
+ } else if (huffRDH == 1) {
+ huffRDHTable = huffTableO;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffRDHTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffRDX == 0) {
+ huffRDXTable = huffTableN;
+ } else if (huffRDX == 1) {
+ huffRDXTable = huffTableO;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffRDXTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffRDY == 0) {
+ huffRDYTable = huffTableN;
+ } else if (huffRDY == 1) {
+ huffRDYTable = huffTableO;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffRDYTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ if (huffRSize == 0) {
+ huffRSizeTable = huffTableA;
+ } else {
+ if (i >= (Guint)codeTables->getLength()) {
+ goto codeTableError;
+ }
+ huffRSizeTable =
+ ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable();
+ }
+ }
+ delete codeTables;
+
+ // symbol ID Huffman decoding table
+ if (huff) {
+ huffDecoder->reset();
+ for (i = 0; i < 32; ++i) {
+ runLengthTab[i].val = i;
+ runLengthTab[i].prefixLen = huffDecoder->readBits(4);
+ runLengthTab[i].rangeLen = 0;
+ }
+ runLengthTab[32].val = 0x103;
+ runLengthTab[32].prefixLen = huffDecoder->readBits(4);
+ runLengthTab[32].rangeLen = 2;
+ runLengthTab[33].val = 0x203;
+ runLengthTab[33].prefixLen = huffDecoder->readBits(4);
+ runLengthTab[33].rangeLen = 3;
+ runLengthTab[34].val = 0x20b;
+ runLengthTab[34].prefixLen = huffDecoder->readBits(4);
+ runLengthTab[34].rangeLen = 7;
+ runLengthTab[35].prefixLen = 0;
+ runLengthTab[35].rangeLen = jbig2HuffmanEOT;
+ huffDecoder->buildTable(runLengthTab, 35);
+ symCodeTab = (JBIG2HuffmanTable *)gmallocn(numSyms + 1,
+ sizeof(JBIG2HuffmanTable));
+ for (i = 0; i < numSyms; ++i) {
+ symCodeTab[i].val = i;
+ symCodeTab[i].rangeLen = 0;
+ }
+ i = 0;
+ while (i < numSyms) {
+ huffDecoder->decodeInt(&j, runLengthTab);
+ if (j > 0x200) {
+ for (j -= 0x200; j && i < numSyms; --j) {
+ symCodeTab[i++].prefixLen = 0;
+ }
+ } else if (j > 0x100) {
+ for (j -= 0x100; j && i < numSyms; --j) {
+ symCodeTab[i].prefixLen = symCodeTab[i-1].prefixLen;
+ ++i;
+ }
+ } else {
+ symCodeTab[i++].prefixLen = j;
+ }
+ }
+ symCodeTab[numSyms].prefixLen = 0;
+ symCodeTab[numSyms].rangeLen = jbig2HuffmanEOT;
+ huffDecoder->buildTable(symCodeTab, numSyms);
+ huffDecoder->reset();
+
+ // set up the arithmetic decoder
+ } else {
+ symCodeTab = NULL;
+ resetIntStats(symCodeLen);
+ arithDecoder->start();
+ }
+ if (refine) {
+ resetRefinementStats(templ, NULL);
+ }
+
+ bitmap = readTextRegion(huff, refine, w, h, numInstances,
+ logStrips, numSyms, symCodeTab, symCodeLen, syms,
+ defPixel, combOp, transposed, refCorner, sOffset,
+ huffFSTable, huffDSTable, huffDTTable,
+ huffRDWTable, huffRDHTable,
+ huffRDXTable, huffRDYTable, huffRSizeTable,
+ templ, atx, aty);
+
+ gfree(syms);
+
+ if (bitmap) {
+ // combine the region bitmap into the page bitmap
+ if (imm) {
+ if (pageH == 0xffffffff && y + h > curPageH) {
+ pageBitmap->expand(y + h, pageDefPixel);
+ }
+ pageBitmap->combine(bitmap, x, y, extCombOp);
+ delete bitmap;
+
+ // store the region bitmap
+ } else {
+ bitmap->setSegNum(segNum);
+ segments->append(bitmap);
+ }
+ }
+
+ // clean up the Huffman decoder
+ if (huff) {
+ gfree(symCodeTab);
+ }
+
+ return;
+
+ codeTableError:
+ error(curStr->getPos(), "Missing code table in JBIG2 text region");
+ gfree(codeTables);
+ delete syms;
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+ return;
+}
+
+JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
+ int w, int h,
+ Guint numInstances,
+ Guint logStrips,
+ int numSyms,
+ JBIG2HuffmanTable *symCodeTab,
+ Guint symCodeLen,
+ JBIG2Bitmap **syms,
+ Guint defPixel, Guint combOp,
+ Guint transposed, Guint refCorner,
+ int sOffset,
+ JBIG2HuffmanTable *huffFSTable,
+ JBIG2HuffmanTable *huffDSTable,
+ JBIG2HuffmanTable *huffDTTable,
+ JBIG2HuffmanTable *huffRDWTable,
+ JBIG2HuffmanTable *huffRDHTable,
+ JBIG2HuffmanTable *huffRDXTable,
+ JBIG2HuffmanTable *huffRDYTable,
+ JBIG2HuffmanTable *huffRSizeTable,
+ Guint templ,
+ int *atx, int *aty) {
+ JBIG2Bitmap *bitmap;
+ JBIG2Bitmap *symbolBitmap;
+ Guint strips;
+ int t, dt, tt, s, ds, sFirst, j;
+ int rdw, rdh, rdx, rdy, ri, refDX, refDY, bmSize;
+ Guint symID, inst, bw, bh;
+
+ strips = 1 << logStrips;
+
+ // allocate the bitmap
+ bitmap = new JBIG2Bitmap(0, w, h);
+ if (!bitmap->isOk()) {
+ delete bitmap;
+ return NULL;
+ }
+ if (defPixel) {
+ bitmap->clearToOne();
+ } else {
+ bitmap->clearToZero();
+ }
+
+ // decode initial T value
+ if (huff) {
+ huffDecoder->decodeInt(&t, huffDTTable);
+ } else {
+ arithDecoder->decodeInt(&t, iadtStats);
+ }
+ t *= -(int)strips;
+
+ inst = 0;
+ sFirst = 0;
+ while (inst < numInstances) {
+
+ // decode delta-T
+ if (huff) {
+ huffDecoder->decodeInt(&dt, huffDTTable);
+ } else {
+ arithDecoder->decodeInt(&dt, iadtStats);
+ }
+ t += dt * strips;
+
+ // first S value
+ if (huff) {
+ huffDecoder->decodeInt(&ds, huffFSTable);
+ } else {
+ arithDecoder->decodeInt(&ds, iafsStats);
+ }
+ sFirst += ds;
+ s = sFirst;
+
+ // read the instances
+ while (1) {
+
+ // T value
+ if (strips == 1) {
+ dt = 0;
+ } else if (huff) {
+ dt = huffDecoder->readBits(logStrips);
+ } else {
+ arithDecoder->decodeInt(&dt, iaitStats);
+ }
+ tt = t + dt;
+
+ // symbol ID
+ if (huff) {
+ if (symCodeTab) {
+ huffDecoder->decodeInt(&j, symCodeTab);
+ symID = (Guint)j;
+ } else {
+ symID = huffDecoder->readBits(symCodeLen);
+ }
+ } else {
+ symID = arithDecoder->decodeIAID(symCodeLen, iaidStats);
+ }
+
+ if (symID >= (Guint)numSyms) {
+ error(curStr->getPos(), "Invalid symbol number in JBIG2 text region");
+ } else {
+
+ // get the symbol bitmap
+ symbolBitmap = NULL;
+ if (refine) {
+ if (huff) {
+ ri = (int)huffDecoder->readBit();
+ } else {
+ arithDecoder->decodeInt(&ri, iariStats);
+ }
+ } else {
+ ri = 0;
+ }
+ if (ri) {
+ GBool decodeSuccess;
+ if (huff) {
+ decodeSuccess = huffDecoder->decodeInt(&rdw, huffRDWTable);
+ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdh, huffRDHTable);
+ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdx, huffRDXTable);
+ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdy, huffRDYTable);
+ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&bmSize, huffRSizeTable);
+ huffDecoder->reset();
+ arithDecoder->start();
+ } else {
+ decodeSuccess = arithDecoder->decodeInt(&rdw, iardwStats);
+ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdh, iardhStats);
+ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdx, iardxStats);
+ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdy, iardyStats);
+ }
+
+ if (decodeSuccess && syms[symID])
+ {
+ refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx;
+ refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy;
+
+ symbolBitmap =
+ readGenericRefinementRegion(rdw + syms[symID]->getWidth(),
+ rdh + syms[symID]->getHeight(),
+ templ, gFalse, syms[symID],
+ refDX, refDY, atx, aty);
+ }
+ //~ do we need to use the bmSize value here (in Huffman mode)?
+ } else {
+ symbolBitmap = syms[symID];
+ }
+
+ if (symbolBitmap) {
+ // combine the symbol bitmap into the region bitmap
+ //~ something is wrong here - refCorner shouldn't degenerate into
+ //~ two cases
+ bw = symbolBitmap->getWidth() - 1;
+ bh = symbolBitmap->getHeight() - 1;
+ if (transposed) {
+ switch (refCorner) {
+ case 0: // bottom left
+ bitmap->combine(symbolBitmap, tt, s, combOp);
+ break;
+ case 1: // top left
+ bitmap->combine(symbolBitmap, tt, s, combOp);
+ break;
+ case 2: // bottom right
+ bitmap->combine(symbolBitmap, tt - bw, s, combOp);
+ break;
+ case 3: // top right
+ bitmap->combine(symbolBitmap, tt - bw, s, combOp);
+ break;
+ }
+ s += bh;
+ } else {
+ switch (refCorner) {
+ case 0: // bottom left
+ bitmap->combine(symbolBitmap, s, tt - bh, combOp);
+ break;
+ case 1: // top left
+ bitmap->combine(symbolBitmap, s, tt, combOp);
+ break;
+ case 2: // bottom right
+ bitmap->combine(symbolBitmap, s, tt - bh, combOp);
+ break;
+ case 3: // top right
+ bitmap->combine(symbolBitmap, s, tt, combOp);
+ break;
+ }
+ s += bw;
+ }
+ if (ri) {
+ delete symbolBitmap;
+ }
+ } else {
+ // NULL symbolBitmap only happens on error
+ delete bitmap;
+ return NULL;
+ }
+ }
+
+ // next instance
+ ++inst;
+
+ // next S value
+ if (huff) {
+ if (!huffDecoder->decodeInt(&ds, huffDSTable)) {
+ break;
+ }
+ } else {
+ if (!arithDecoder->decodeInt(&ds, iadsStats)) {
+ break;
+ }
+ }
+ s += sOffset + ds;
+ }
+ }
+
+ return bitmap;
+}
+
+void JBIG2Stream::readPatternDictSeg(Guint segNum, Guint length) {
+ JBIG2PatternDict *patternDict;
+ JBIG2Bitmap *bitmap;
+ Guint flags, patternW, patternH, grayMax, templ, mmr;
+ int atx[4], aty[4];
+ Guint i, x;
+
+ // halftone dictionary flags, pattern width and height, max gray value
+ if (!readUByte(&flags) ||
+ !readUByte(&patternW) ||
+ !readUByte(&patternH) ||
+ !readULong(&grayMax)) {
+ goto eofError;
+ }
+ templ = (flags >> 1) & 3;
+ mmr = flags & 1;
+
+ // set up the arithmetic decoder
+ if (!mmr) {
+ resetGenericStats(templ, NULL);
+ arithDecoder->start();
+ }
+
+ // read the bitmap
+ atx[0] = -(int)patternW; aty[0] = 0;
+ atx[1] = -3; aty[1] = -1;
+ atx[2] = 2; aty[2] = -2;
+ atx[3] = -2; aty[3] = -2;
+ bitmap = readGenericBitmap(mmr, (grayMax + 1) * patternW, patternH,
+ templ, gFalse, gFalse, NULL,
+ atx, aty, length - 7);
+
+ // create the pattern dict object
+ patternDict = new JBIG2PatternDict(segNum, grayMax + 1);
+
+ // split up the bitmap
+ x = 0;
+ for (i = 0; i <= grayMax; ++i) {
+ patternDict->setBitmap(i, bitmap->getSlice(x, 0, patternW, patternH));
+ x += patternW;
+ }
+
+ // free memory
+ delete bitmap;
+
+ // store the new pattern dict
+ segments->append(patternDict);
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs, Guint nRefSegs) {
+ JBIG2Bitmap *bitmap;
+ JBIG2Segment *seg;
+ JBIG2PatternDict *patternDict;
+ JBIG2Bitmap *skipBitmap;
+ Guint *grayImg;
+ JBIG2Bitmap *grayBitmap;
+ JBIG2Bitmap *patternBitmap;
+ Guint w, h, x, y, segInfoFlags, extCombOp;
+ Guint flags, mmr, templ, enableSkip, combOp;
+ Guint gridW, gridH, stepX, stepY, patW, patH;
+ int atx[4], aty[4];
+ int gridX, gridY, xx, yy, bit, j;
+ Guint bpp, m, n, i;
+
+ // region segment info field
+ if (!readULong(&w) || !readULong(&h) ||
+ !readULong(&x) || !readULong(&y) ||
+ !readUByte(&segInfoFlags)) {
+ goto eofError;
+ }
+ extCombOp = segInfoFlags & 7;
+
+ // rest of the halftone region header
+ if (!readUByte(&flags)) {
+ goto eofError;
+ }
+ mmr = flags & 1;
+ templ = (flags >> 1) & 3;
+ enableSkip = (flags >> 3) & 1;
+ combOp = (flags >> 4) & 7;
+ if (!readULong(&gridW) || !readULong(&gridH) ||
+ !readLong(&gridX) || !readLong(&gridY) ||
+ !readUWord(&stepX) || !readUWord(&stepY)) {
+ goto eofError;
+ }
+ if (w == 0 || h == 0 || w >= INT_MAX / h) {
+ error(curStr->getPos(), "Bad bitmap size in JBIG2 halftone segment");
+ return;
+ }
+ if (gridH == 0 || gridW >= INT_MAX / gridH) {
+ error(curStr->getPos(), "Bad grid size in JBIG2 halftone segment");
+ return;
+ }
+
+ // get pattern dictionary
+ if (nRefSegs != 1) {
+ error(curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
+ return;
+ }
+ seg = findSegment(refSegs[0]);
+ if (seg == NULL || seg->getType() != jbig2SegPatternDict) {
+ error(curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
+ return;
+ }
+
+ patternDict = (JBIG2PatternDict *)seg;
+ bpp = 0;
+ i = 1;
+ while (i < patternDict->getSize()) {
+ ++bpp;
+ i <<= 1;
+ }
+ patW = patternDict->getBitmap(0)->getWidth();
+ patH = patternDict->getBitmap(0)->getHeight();
+
+ // set up the arithmetic decoder
+ if (!mmr) {
+ resetGenericStats(templ, NULL);
+ arithDecoder->start();
+ }
+
+ // allocate the bitmap
+ bitmap = new JBIG2Bitmap(segNum, w, h);
+ if (flags & 0x80) { // HDEFPIXEL
+ bitmap->clearToOne();
+ } else {
+ bitmap->clearToZero();
+ }
+
+ // compute the skip bitmap
+ skipBitmap = NULL;
+ if (enableSkip) {
+ skipBitmap = new JBIG2Bitmap(0, gridW, gridH);
+ skipBitmap->clearToZero();
+ for (m = 0; m < gridH; ++m) {
+ for (n = 0; n < gridW; ++n) {
+ xx = gridX + m * stepY + n * stepX;
+ yy = gridY + m * stepX - n * stepY;
+ if (((xx + (int)patW) >> 8) <= 0 || (xx >> 8) >= (int)w ||
+ ((yy + (int)patH) >> 8) <= 0 || (yy >> 8) >= (int)h) {
+ skipBitmap->setPixel(n, m);
+ }
+ }
+ }
+ }
+
+ // read the gray-scale image
+ grayImg = (Guint *)gmallocn(gridW * gridH, sizeof(Guint));
+ memset(grayImg, 0, gridW * gridH * sizeof(Guint));
+ atx[0] = templ <= 1 ? 3 : 2; aty[0] = -1;
+ atx[1] = -3; aty[1] = -1;
+ atx[2] = 2; aty[2] = -2;
+ atx[3] = -2; aty[3] = -2;
+ for (j = bpp - 1; j >= 0; --j) {
+ grayBitmap = readGenericBitmap(mmr, gridW, gridH, templ, gFalse,
+ enableSkip, skipBitmap, atx, aty, -1);
+ i = 0;
+ for (m = 0; m < gridH; ++m) {
+ for (n = 0; n < gridW; ++n) {
+ bit = grayBitmap->getPixel(n, m) ^ (grayImg[i] & 1);
+ grayImg[i] = (grayImg[i] << 1) | bit;
+ ++i;
+ }
+ }
+ delete grayBitmap;
+ }
+
+ // decode the image
+ i = 0;
+ for (m = 0; m < gridH; ++m) {
+ xx = gridX + m * stepY;
+ yy = gridY + m * stepX;
+ for (n = 0; n < gridW; ++n) {
+ if (!(enableSkip && skipBitmap->getPixel(n, m))) {
+ patternBitmap = patternDict->getBitmap(grayImg[i]);
+ bitmap->combine(patternBitmap, xx >> 8, yy >> 8, combOp);
+ }
+ xx += stepX;
+ yy -= stepY;
+ ++i;
+ }
+ }
+
+ gfree(grayImg);
+ if (skipBitmap) {
+ delete skipBitmap;
+ }
+
+ // combine the region bitmap into the page bitmap
+ if (imm) {
+ if (pageH == 0xffffffff && y + h > curPageH) {
+ pageBitmap->expand(y + h, pageDefPixel);
+ }
+ pageBitmap->combine(bitmap, x, y, extCombOp);
+ delete bitmap;
+
+ // store the region bitmap
+ } else {
+ segments->append(bitmap);
+ }
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+void JBIG2Stream::readGenericRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length) {
+ JBIG2Bitmap *bitmap;
+ Guint w, h, x, y, segInfoFlags, extCombOp;
+ Guint flags, mmr, templ, tpgdOn;
+ int atx[4], aty[4];
+
+ // region segment info field
+ if (!readULong(&w) || !readULong(&h) ||
+ !readULong(&x) || !readULong(&y) ||
+ !readUByte(&segInfoFlags)) {
+ goto eofError;
+ }
+ extCombOp = segInfoFlags & 7;
+
+ // rest of the generic region segment header
+ if (!readUByte(&flags)) {
+ goto eofError;
+ }
+ mmr = flags & 1;
+ templ = (flags >> 1) & 3;
+ tpgdOn = (flags >> 3) & 1;
+
+ // AT flags
+ if (!mmr) {
+ if (templ == 0) {
+ if (!readByte(&atx[0]) ||
+ !readByte(&aty[0]) ||
+ !readByte(&atx[1]) ||
+ !readByte(&aty[1]) ||
+ !readByte(&atx[2]) ||
+ !readByte(&aty[2]) ||
+ !readByte(&atx[3]) ||
+ !readByte(&aty[3])) {
+ goto eofError;
+ }
+ } else {
+ if (!readByte(&atx[0]) ||
+ !readByte(&aty[0])) {
+ goto eofError;
+ }
+ }
+ }
+
+ // set up the arithmetic decoder
+ if (!mmr) {
+ resetGenericStats(templ, NULL);
+ arithDecoder->start();
+ }
+
+ // read the bitmap
+ bitmap = readGenericBitmap(mmr, w, h, templ, tpgdOn, gFalse,
+ NULL, atx, aty, mmr ? length - 18 : 0);
+ if (!bitmap)
+ return;
+
+ // combine the region bitmap into the page bitmap
+ if (imm) {
+ if (pageH == 0xffffffff && y + h > curPageH) {
+ pageBitmap->expand(y + h, pageDefPixel);
+ }
+ pageBitmap->combine(bitmap, x, y, extCombOp);
+ delete bitmap;
+
+ // store the region bitmap
+ } else {
+ bitmap->setSegNum(segNum);
+ segments->append(bitmap);
+ }
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+inline void JBIG2Stream::mmrAddPixels(int a1, int blackPixels,
+ int *codingLine, int *a0i, int w) {
+ if (a1 > codingLine[*a0i]) {
+ if (a1 > w) {
+ error(curStr->getPos(), "JBIG2 MMR row is wrong length (%d)", a1);
+ a1 = w;
+ }
+ if ((*a0i & 1) ^ blackPixels) {
+ ++*a0i;
+ }
+ codingLine[*a0i] = a1;
+ }
+}
+
+inline void JBIG2Stream::mmrAddPixelsNeg(int a1, int blackPixels,
+ int *codingLine, int *a0i, int w) {
+ if (a1 > codingLine[*a0i]) {
+ if (a1 > w) {
+ error(curStr->getPos(), "JBIG2 MMR row is wrong length (%d)", a1);
+ a1 = w;
+ }
+ if ((*a0i & 1) ^ blackPixels) {
+ ++*a0i;
+ }
+ codingLine[*a0i] = a1;
+ } else if (a1 < codingLine[*a0i]) {
+ if (a1 < 0) {
+ error(curStr->getPos(), "Invalid JBIG2 MMR code");
+ a1 = 0;
+ }
+ while (*a0i > 0 && a1 <= codingLine[*a0i - 1]) {
+ --*a0i;
+ }
+ codingLine[*a0i] = a1;
+ }
+}
+
+JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
+ int templ, GBool tpgdOn,
+ GBool useSkip, JBIG2Bitmap *skip,
+ int *atx, int *aty,
+ int mmrDataLength) {
+ JBIG2Bitmap *bitmap;
+ GBool ltp;
+ Guint ltpCX, cx, cx0, cx1, cx2;
+ JBIG2BitmapPtr cxPtr0 = {0}, cxPtr1 = {0};
+ JBIG2BitmapPtr atPtr0 = {0}, atPtr1 = {0}, atPtr2 = {0}, atPtr3 = {0};
+ int *refLine, *codingLine;
+ int code1, code2, code3;
+ int x, y, a0i, b1i, blackPixels, pix, i;
+
+ bitmap = new JBIG2Bitmap(0, w, h);
+ if (!bitmap->isOk()) {
+ delete bitmap;
+ return NULL;
+ }
+ bitmap->clearToZero();
+
+ //----- MMR decode
+
+ if (mmr) {
+
+ mmrDecoder->reset();
+ if (w > INT_MAX - 2) {
+ error(curStr->getPos(), "Bad width in JBIG2 generic bitmap");
+ // force a call to gmalloc(-1), which will throw an exception
+ w = -3;
+ }
+ // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = w
+ // ---> max codingLine size = w + 1
+ // refLine has one extra guard entry at the end
+ // ---> max refLine size = w + 2
+ codingLine = (int *)gmallocn(w + 1, sizeof(int));
+ refLine = (int *)gmallocn(w + 2, sizeof(int));
+ for (i = 0; i < w + 1; ++i) codingLine[i] = w;
+
+ for (y = 0; y < h; ++y) {
+
+ // copy coding line to ref line
+ for (i = 0; codingLine[i] < w; ++i) {
+ refLine[i] = codingLine[i];
+ }
+ refLine[i++] = w;
+ refLine[i] = w;
+
+ // decode a line
+ codingLine[0] = 0;
+ a0i = 0;
+ b1i = 0;
+ blackPixels = 0;
+ // invariant:
+ // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1] <= w
+ // exception at left edge:
+ // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible
+ // exception at right edge:
+ // refLine[b1i] = refLine[b1i+1] = w is possible
+ while (codingLine[a0i] < w) {
+ code1 = mmrDecoder->get2DCode();
+ switch (code1) {
+ case twoDimPass:
+ mmrAddPixels(refLine[b1i + 1], blackPixels, codingLine, &a0i, w);
+ if (refLine[b1i + 1] < w) {
+ b1i += 2;
+ }
+ break;
+ case twoDimHoriz:
+ code1 = code2 = 0;
+ if (blackPixels) {
+ do {
+ code1 += code3 = mmrDecoder->getBlackCode();
+ } while (code3 >= 64);
+ do {
+ code2 += code3 = mmrDecoder->getWhiteCode();
+ } while (code3 >= 64);
+ } else {
+ do {
+ code1 += code3 = mmrDecoder->getWhiteCode();
+ } while (code3 >= 64);
+ do {
+ code2 += code3 = mmrDecoder->getBlackCode();
+ } while (code3 >= 64);
+ }
+ mmrAddPixels(codingLine[a0i] + code1, blackPixels,
+ codingLine, &a0i, w);
+ if (codingLine[a0i] < w) {
+ mmrAddPixels(codingLine[a0i] + code2, blackPixels ^ 1,
+ codingLine, &a0i, w);
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ break;
+ case twoDimVertR3:
+ mmrAddPixels(refLine[b1i] + 3, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertR2:
+ mmrAddPixels(refLine[b1i] + 2, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertR1:
+ mmrAddPixels(refLine[b1i] + 1, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVert0:
+ mmrAddPixels(refLine[b1i], blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL3:
+ mmrAddPixelsNeg(refLine[b1i] - 3, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL2:
+ mmrAddPixelsNeg(refLine[b1i] - 2, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL1:
+ mmrAddPixelsNeg(refLine[b1i] - 1, blackPixels, codingLine, &a0i, w);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < w) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) {
+ b1i += 2;
+ }
+ }
+ break;
+ case EOF:
+ mmrAddPixels(w, 0, codingLine, &a0i, w);
+ break;
+ default:
+ error(curStr->getPos(), "Illegal code in JBIG2 MMR bitmap data");
+ mmrAddPixels(w, 0, codingLine, &a0i, w);
+ break;
+ }
+ }
+
+ // convert the run lengths to a bitmap line
+ i = 0;
+ while (1) {
+ for (x = codingLine[i]; x < codingLine[i+1]; ++x) {
+ bitmap->setPixel(x, y);
+ }
+ if (codingLine[i+1] >= w || codingLine[i+2] >= w) {
+ break;
+ }
+ i += 2;
+ }
+ }
+
+ if (mmrDataLength >= 0) {
+ mmrDecoder->skipTo(mmrDataLength);
+ } else {
+ if (mmrDecoder->get24Bits() != 0x001001) {
+ error(curStr->getPos(), "Missing EOFB in JBIG2 MMR bitmap data");
+ }
+ }
+
+ gfree(refLine);
+ gfree(codingLine);
+
+ //----- arithmetic decode
+
+ } else {
+ // set up the typical row context
+ ltpCX = 0; // make gcc happy
+ if (tpgdOn) {
+ switch (templ) {
+ case 0:
+ ltpCX = 0x3953; // 001 11001 0101 0011
+ break;
+ case 1:
+ ltpCX = 0x079a; // 0011 11001 101 0
+ break;
+ case 2:
+ ltpCX = 0x0e3; // 001 1100 01 1
+ break;
+ case 3:
+ ltpCX = 0x18a; // 01100 0101 1
+ break;
+ }
+ }
+
+ ltp = 0;
+ cx = cx0 = cx1 = cx2 = 0; // make gcc happy
+ for (y = 0; y < h; ++y) {
+
+ // check for a "typical" (duplicate) row
+ if (tpgdOn) {
+ if (arithDecoder->decodeBit(ltpCX, genericRegionStats)) {
+ ltp = !ltp;
+ }
+ if (ltp) {
+ if (y > 0) {
+ bitmap->duplicateRow(y, y-1);
+ }
+ continue;
+ }
+ }
+
+ switch (templ) {
+ case 0:
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-2, &cxPtr0);
+ cx0 = bitmap->nextPixel(&cxPtr0);
+ cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0);
+ bitmap->getPixelPtr(0, y-1, &cxPtr1);
+ cx1 = bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx2 = 0;
+ bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0);
+ bitmap->getPixelPtr(atx[1], y + aty[1], &atPtr1);
+ bitmap->getPixelPtr(atx[2], y + aty[2], &atPtr2);
+ bitmap->getPixelPtr(atx[3], y + aty[3], &atPtr3);
+
+ // decode the row
+ for (x = 0; x < w; ++x) {
+
+ // build the context
+ cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) |
+ (bitmap->nextPixel(&atPtr0) << 3) |
+ (bitmap->nextPixel(&atPtr1) << 2) |
+ (bitmap->nextPixel(&atPtr2) << 1) |
+ bitmap->nextPixel(&atPtr3);
+
+ // check for a skipped pixel
+ if (useSkip && skip->getPixel(x, y)) {
+ pix = 0;
+
+ // decode the pixel
+ } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+
+ // update the context
+ cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x07;
+ cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f;
+ cx2 = ((cx2 << 1) | pix) & 0x0f;
+ }
+ break;
+
+ case 1:
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-2, &cxPtr0);
+ cx0 = bitmap->nextPixel(&cxPtr0);
+ cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0);
+ cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0);
+ bitmap->getPixelPtr(0, y-1, &cxPtr1);
+ cx1 = bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx2 = 0;
+ bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0);
+
+ // decode the row
+ for (x = 0; x < w; ++x) {
+
+ // build the context
+ cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) |
+ bitmap->nextPixel(&atPtr0);
+
+ // check for a skipped pixel
+ if (useSkip && skip->getPixel(x, y)) {
+ pix = 0;
+
+ // decode the pixel
+ } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+
+ // update the context
+ cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x0f;
+ cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f;
+ cx2 = ((cx2 << 1) | pix) & 0x07;
+ }
+ break;
+
+ case 2:
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-2, &cxPtr0);
+ cx0 = bitmap->nextPixel(&cxPtr0);
+ cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0);
+ bitmap->getPixelPtr(0, y-1, &cxPtr1);
+ cx1 = bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx2 = 0;
+ bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0);
+
+ // decode the row
+ for (x = 0; x < w; ++x) {
+
+ // build the context
+ cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) |
+ bitmap->nextPixel(&atPtr0);
+
+ // check for a skipped pixel
+ if (useSkip && skip->getPixel(x, y)) {
+ pix = 0;
+
+ // decode the pixel
+ } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+
+ // update the context
+ cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x07;
+ cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x0f;
+ cx2 = ((cx2 << 1) | pix) & 0x03;
+ }
+ break;
+
+ case 3:
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-1, &cxPtr1);
+ cx1 = bitmap->nextPixel(&cxPtr1);
+ cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1);
+ cx2 = 0;
+ bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0);
+
+ // decode the row
+ for (x = 0; x < w; ++x) {
+
+ // build the context
+ cx = (cx1 << 5) | (cx2 << 1) |
+ bitmap->nextPixel(&atPtr0);
+
+ // check for a skipped pixel
+ if (useSkip && skip->getPixel(x, y)) {
+ pix = 0;
+
+ // decode the pixel
+ } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+
+ // update the context
+ cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f;
+ cx2 = ((cx2 << 1) | pix) & 0x0f;
+ }
+ break;
+ }
+ }
+ }
+
+ return bitmap;
+}
+
+void JBIG2Stream::readGenericRefinementRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs,
+ Guint nRefSegs) {
+ JBIG2Bitmap *bitmap, *refBitmap;
+ Guint w, h, x, y, segInfoFlags, extCombOp;
+ Guint flags, templ, tpgrOn;
+ int atx[2], aty[2];
+ JBIG2Segment *seg;
+
+ // region segment info field
+ if (!readULong(&w) || !readULong(&h) ||
+ !readULong(&x) || !readULong(&y) ||
+ !readUByte(&segInfoFlags)) {
+ goto eofError;
+ }
+ extCombOp = segInfoFlags & 7;
+
+ // rest of the generic refinement region segment header
+ if (!readUByte(&flags)) {
+ goto eofError;
+ }
+ templ = flags & 1;
+ tpgrOn = (flags >> 1) & 1;
+
+ // AT flags
+ if (!templ) {
+ if (!readByte(&atx[0]) || !readByte(&aty[0]) ||
+ !readByte(&atx[1]) || !readByte(&aty[1])) {
+ goto eofError;
+ }
+ }
+
+ // resize the page bitmap if needed
+ if (nRefSegs == 0 || imm) {
+ if (pageH == 0xffffffff && y + h > curPageH) {
+ pageBitmap->expand(y + h, pageDefPixel);
+ }
+ }
+
+ // get referenced bitmap
+ if (nRefSegs > 1) {
+ error(curStr->getPos(), "Bad reference in JBIG2 generic refinement segment");
+ return;
+ }
+ if (nRefSegs == 1) {
+ seg = findSegment(refSegs[0]);
+ if (seg == NULL || seg->getType() != jbig2SegBitmap) {
+ error(curStr->getPos(), "Bad bitmap reference in JBIG2 generic refinement segment");
+ return;
+ }
+ refBitmap = (JBIG2Bitmap *)seg;
+ } else {
+ refBitmap = pageBitmap->getSlice(x, y, w, h);
+ }
+
+ // set up the arithmetic decoder
+ resetRefinementStats(templ, NULL);
+ arithDecoder->start();
+
+ // read
+ bitmap = readGenericRefinementRegion(w, h, templ, tpgrOn,
+ refBitmap, 0, 0, atx, aty);
+
+ // combine the region bitmap into the page bitmap
+ if (imm) {
+ pageBitmap->combine(bitmap, x, y, extCombOp);
+ delete bitmap;
+
+ // store the region bitmap
+ } else {
+ bitmap->setSegNum(segNum);
+ segments->append(bitmap);
+ }
+
+ // delete the referenced bitmap
+ if (nRefSegs == 1) {
+ discardSegment(refSegs[0]);
+ } else {
+ delete refBitmap;
+ }
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
+ int templ, GBool tpgrOn,
+ JBIG2Bitmap *refBitmap,
+ int refDX, int refDY,
+ int *atx, int *aty) {
+ JBIG2Bitmap *bitmap;
+ GBool ltp;
+ Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2;
+ JBIG2BitmapPtr cxPtr0 = {0};
+ JBIG2BitmapPtr cxPtr1 = {0};
+ JBIG2BitmapPtr cxPtr2 = {0};
+ JBIG2BitmapPtr cxPtr3 = {0};
+ JBIG2BitmapPtr cxPtr4 = {0};
+ JBIG2BitmapPtr cxPtr5 = {0};
+ JBIG2BitmapPtr cxPtr6 = {0};
+ JBIG2BitmapPtr tpgrCXPtr0 = {0};
+ JBIG2BitmapPtr tpgrCXPtr1 = {0};
+ JBIG2BitmapPtr tpgrCXPtr2 = {0};
+ int x, y, pix;
+
+ bitmap = new JBIG2Bitmap(0, w, h);
+ if (!bitmap->isOk())
+ {
+ delete bitmap;
+ return NULL;
+ }
+ bitmap->clearToZero();
+
+ // set up the typical row context
+ if (templ) {
+ ltpCX = 0x008;
+ } else {
+ ltpCX = 0x0010;
+ }
+
+ ltp = 0;
+ for (y = 0; y < h; ++y) {
+
+ if (templ) {
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-1, &cxPtr0);
+ cx0 = bitmap->nextPixel(&cxPtr0);
+ bitmap->getPixelPtr(-1, y, &cxPtr1);
+ refBitmap->getPixelPtr(-refDX, y-1-refDY, &cxPtr2);
+ refBitmap->getPixelPtr(-1-refDX, y-refDY, &cxPtr3);
+ cx3 = refBitmap->nextPixel(&cxPtr3);
+ cx3 = (cx3 << 1) | refBitmap->nextPixel(&cxPtr3);
+ refBitmap->getPixelPtr(-refDX, y+1-refDY, &cxPtr4);
+ cx4 = refBitmap->nextPixel(&cxPtr4);
+
+ // set up the typical prediction context
+ tpgrCX0 = tpgrCX1 = tpgrCX2 = 0; // make gcc happy
+ if (tpgrOn) {
+ refBitmap->getPixelPtr(-1-refDX, y-1-refDY, &tpgrCXPtr0);
+ tpgrCX0 = refBitmap->nextPixel(&tpgrCXPtr0);
+ tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0);
+ tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0);
+ refBitmap->getPixelPtr(-1-refDX, y-refDY, &tpgrCXPtr1);
+ tpgrCX1 = refBitmap->nextPixel(&tpgrCXPtr1);
+ tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1);
+ tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1);
+ refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &tpgrCXPtr2);
+ tpgrCX2 = refBitmap->nextPixel(&tpgrCXPtr2);
+ tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
+ tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
+ } else {
+ tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = NULL; // make gcc happy
+ tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0;
+ tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0;
+ }
+
+ for (x = 0; x < w; ++x) {
+
+ // update the context
+ cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 7;
+ cx3 = ((cx3 << 1) | refBitmap->nextPixel(&cxPtr3)) & 7;
+ cx4 = ((cx4 << 1) | refBitmap->nextPixel(&cxPtr4)) & 3;
+
+ if (tpgrOn) {
+ // update the typical predictor context
+ tpgrCX0 = ((tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0)) & 7;
+ tpgrCX1 = ((tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1)) & 7;
+ tpgrCX2 = ((tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2)) & 7;
+
+ // check for a "typical" pixel
+ if (arithDecoder->decodeBit(ltpCX, refinementRegionStats)) {
+ ltp = !ltp;
+ }
+ if (tpgrCX0 == 0 && tpgrCX1 == 0 && tpgrCX2 == 0) {
+ bitmap->clearPixel(x, y);
+ continue;
+ } else if (tpgrCX0 == 7 && tpgrCX1 == 7 && tpgrCX2 == 7) {
+ bitmap->setPixel(x, y);
+ continue;
+ }
+ }
+
+ // build the context
+ cx = (cx0 << 7) | (bitmap->nextPixel(&cxPtr1) << 6) |
+ (refBitmap->nextPixel(&cxPtr2) << 5) |
+ (cx3 << 2) | cx4;
+
+ // decode the pixel
+ if ((pix = arithDecoder->decodeBit(cx, refinementRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+ }
+
+ } else {
+
+ // set up the context
+ bitmap->getPixelPtr(0, y-1, &cxPtr0);
+ cx0 = bitmap->nextPixel(&cxPtr0);
+ bitmap->getPixelPtr(-1, y, &cxPtr1);
+ refBitmap->getPixelPtr(-refDX, y-1-refDY, &cxPtr2);
+ cx2 = refBitmap->nextPixel(&cxPtr2);
+ refBitmap->getPixelPtr(-1-refDX, y-refDY, &cxPtr3);
+ cx3 = refBitmap->nextPixel(&cxPtr3);
+ cx3 = (cx3 << 1) | refBitmap->nextPixel(&cxPtr3);
+ refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &cxPtr4);
+ cx4 = refBitmap->nextPixel(&cxPtr4);
+ cx4 = (cx4 << 1) | refBitmap->nextPixel(&cxPtr4);
+ bitmap->getPixelPtr(atx[0], y+aty[0], &cxPtr5);
+ refBitmap->getPixelPtr(atx[1]-refDX, y+aty[1]-refDY, &cxPtr6);
+
+ // set up the typical prediction context
+ tpgrCX0 = tpgrCX1 = tpgrCX2 = 0; // make gcc happy
+ if (tpgrOn) {
+ refBitmap->getPixelPtr(-1-refDX, y-1-refDY, &tpgrCXPtr0);
+ tpgrCX0 = refBitmap->nextPixel(&tpgrCXPtr0);
+ tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0);
+ tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0);
+ refBitmap->getPixelPtr(-1-refDX, y-refDY, &tpgrCXPtr1);
+ tpgrCX1 = refBitmap->nextPixel(&tpgrCXPtr1);
+ tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1);
+ tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1);
+ refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &tpgrCXPtr2);
+ tpgrCX2 = refBitmap->nextPixel(&tpgrCXPtr2);
+ tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
+ tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
+ } else {
+ tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = NULL; // make gcc happy
+ tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0;
+ tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0;
+ }
+
+ for (x = 0; x < w; ++x) {
+
+ // update the context
+ cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 3;
+ cx2 = ((cx2 << 1) | refBitmap->nextPixel(&cxPtr2)) & 3;
+ cx3 = ((cx3 << 1) | refBitmap->nextPixel(&cxPtr3)) & 7;
+ cx4 = ((cx4 << 1) | refBitmap->nextPixel(&cxPtr4)) & 7;
+
+ if (tpgrOn) {
+ // update the typical predictor context
+ tpgrCX0 = ((tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0)) & 7;
+ tpgrCX1 = ((tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1)) & 7;
+ tpgrCX2 = ((tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2)) & 7;
+
+ // check for a "typical" pixel
+ if (arithDecoder->decodeBit(ltpCX, refinementRegionStats)) {
+ ltp = !ltp;
+ }
+ if (tpgrCX0 == 0 && tpgrCX1 == 0 && tpgrCX2 == 0) {
+ bitmap->clearPixel(x, y);
+ continue;
+ } else if (tpgrCX0 == 7 && tpgrCX1 == 7 && tpgrCX2 == 7) {
+ bitmap->setPixel(x, y);
+ continue;
+ }
+ }
+
+ // build the context
+ cx = (cx0 << 11) | (bitmap->nextPixel(&cxPtr1) << 10) |
+ (cx2 << 8) | (cx3 << 5) | (cx4 << 2) |
+ (bitmap->nextPixel(&cxPtr5) << 1) |
+ refBitmap->nextPixel(&cxPtr6);
+
+ // decode the pixel
+ if ((pix = arithDecoder->decodeBit(cx, refinementRegionStats))) {
+ bitmap->setPixel(x, y);
+ }
+ }
+ }
+ }
+
+ return bitmap;
+}
+
+void JBIG2Stream::readPageInfoSeg(Guint length) {
+ Guint xRes, yRes, flags, striping;
+
+ if (!readULong(&pageW) || !readULong(&pageH) ||
+ !readULong(&xRes) || !readULong(&yRes) ||
+ !readUByte(&flags) || !readUWord(&striping)) {
+ goto eofError;
+ }
+ pageDefPixel = (flags >> 2) & 1;
+ defCombOp = (flags >> 3) & 3;
+
+ // allocate the page bitmap
+ if (pageH == 0xffffffff) {
+ curPageH = striping & 0x7fff;
+ } else {
+ curPageH = pageH;
+ }
+ pageBitmap = new JBIG2Bitmap(0, pageW, curPageH);
+
+ if (!pageBitmap->isOk()) {
+ delete pageBitmap;
+ pageBitmap = NULL;
+ return;
+ }
+
+ // default pixel value
+ if (pageDefPixel) {
+ pageBitmap->clearToOne();
+ } else {
+ pageBitmap->clearToZero();
+ }
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+void JBIG2Stream::readEndOfStripeSeg(Guint length) {
+ Guint i;
+
+ // skip the segment
+ for (i = 0; i < length; ++i) {
+ curStr->getChar();
+ }
+}
+
+void JBIG2Stream::readProfilesSeg(Guint length) {
+ Guint i;
+
+ // skip the segment
+ for (i = 0; i < length; ++i) {
+ curStr->getChar();
+ }
+}
+
+void JBIG2Stream::readCodeTableSeg(Guint segNum, Guint length) {
+ JBIG2HuffmanTable *huffTab;
+ Guint flags, oob, prefixBits, rangeBits;
+ int lowVal, highVal, val;
+ Guint huffTabSize, i;
+
+ if (!readUByte(&flags) || !readLong(&lowVal) || !readLong(&highVal)) {
+ goto eofError;
+ }
+ oob = flags & 1;
+ prefixBits = ((flags >> 1) & 7) + 1;
+ rangeBits = ((flags >> 4) & 7) + 1;
+
+ huffDecoder->reset();
+ huffTabSize = 8;
+ huffTab = (JBIG2HuffmanTable *)
+ gmallocn(huffTabSize, sizeof(JBIG2HuffmanTable));
+ i = 0;
+ val = lowVal;
+ while (val < highVal) {
+ if (i == huffTabSize) {
+ huffTabSize *= 2;
+ huffTab = (JBIG2HuffmanTable *)
+ greallocn(huffTab, huffTabSize, sizeof(JBIG2HuffmanTable));
+ }
+ huffTab[i].val = val;
+ huffTab[i].prefixLen = huffDecoder->readBits(prefixBits);
+ huffTab[i].rangeLen = huffDecoder->readBits(rangeBits);
+ val += 1 << huffTab[i].rangeLen;
+ ++i;
+ }
+ if (i + oob + 3 > huffTabSize) {
+ huffTabSize = i + oob + 3;
+ huffTab = (JBIG2HuffmanTable *)
+ greallocn(huffTab, huffTabSize, sizeof(JBIG2HuffmanTable));
+ }
+ huffTab[i].val = lowVal - 1;
+ huffTab[i].prefixLen = huffDecoder->readBits(prefixBits);
+ huffTab[i].rangeLen = jbig2HuffmanLOW;
+ ++i;
+ huffTab[i].val = highVal;
+ huffTab[i].prefixLen = huffDecoder->readBits(prefixBits);
+ huffTab[i].rangeLen = 32;
+ ++i;
+ if (oob) {
+ huffTab[i].val = 0;
+ huffTab[i].prefixLen = huffDecoder->readBits(prefixBits);
+ huffTab[i].rangeLen = jbig2HuffmanOOB;
+ ++i;
+ }
+ huffTab[i].val = 0;
+ huffTab[i].prefixLen = 0;
+ huffTab[i].rangeLen = jbig2HuffmanEOT;
+ huffDecoder->buildTable(huffTab, i);
+
+ // create and store the new table segment
+ segments->append(new JBIG2CodeTable(segNum, huffTab));
+
+ return;
+
+ eofError:
+ error(curStr->getPos(), "Unexpected EOF in JBIG2 stream");
+}
+
+void JBIG2Stream::readExtensionSeg(Guint length) {
+ Guint i;
+
+ // skip the segment
+ for (i = 0; i < length; ++i) {
+ curStr->getChar();
+ }
+}
+
+JBIG2Segment *JBIG2Stream::findSegment(Guint segNum) {
+ JBIG2Segment *seg;
+ int i;
+
+ for (i = 0; i < globalSegments->getLength(); ++i) {
+ seg = (JBIG2Segment *)globalSegments->get(i);
+ if (seg->getSegNum() == segNum) {
+ return seg;
+ }
+ }
+ for (i = 0; i < segments->getLength(); ++i) {
+ seg = (JBIG2Segment *)segments->get(i);
+ if (seg->getSegNum() == segNum) {
+ return seg;
+ }
+ }
+ return NULL;
+}
+
+void JBIG2Stream::discardSegment(Guint segNum) {
+ JBIG2Segment *seg;
+ int i;
+
+ for (i = 0; i < globalSegments->getLength(); ++i) {
+ seg = (JBIG2Segment *)globalSegments->get(i);
+ if (seg->getSegNum() == segNum) {
+ globalSegments->del(i);
+ return;
+ }
+ }
+ for (i = 0; i < segments->getLength(); ++i) {
+ seg = (JBIG2Segment *)segments->get(i);
+ if (seg->getSegNum() == segNum) {
+ segments->del(i);
+ return;
+ }
+ }
+}
+
+void JBIG2Stream::resetGenericStats(Guint templ,
+ JArithmeticDecoderStats *prevStats) {
+ int size;
+
+ size = contextSize[templ];
+ if (prevStats && prevStats->getContextSize() == size) {
+ if (genericRegionStats->getContextSize() == size) {
+ genericRegionStats->copyFrom(prevStats);
+ } else {
+ delete genericRegionStats;
+ genericRegionStats = prevStats->copy();
+ }
+ } else {
+ if (genericRegionStats->getContextSize() == size) {
+ genericRegionStats->reset();
+ } else {
+ delete genericRegionStats;
+ genericRegionStats = new JArithmeticDecoderStats(1 << size);
+ }
+ }
+}
+
+void JBIG2Stream::resetRefinementStats(Guint templ,
+ JArithmeticDecoderStats *prevStats) {
+ int size;
+
+ size = refContextSize[templ];
+ if (prevStats && prevStats->getContextSize() == size) {
+ if (refinementRegionStats->getContextSize() == size) {
+ refinementRegionStats->copyFrom(prevStats);
+ } else {
+ delete refinementRegionStats;
+ refinementRegionStats = prevStats->copy();
+ }
+ } else {
+ if (refinementRegionStats->getContextSize() == size) {
+ refinementRegionStats->reset();
+ } else {
+ delete refinementRegionStats;
+ refinementRegionStats = new JArithmeticDecoderStats(1 << size);
+ }
+ }
+}
+
+void JBIG2Stream::resetIntStats(int symCodeLen) {
+ iadhStats->reset();
+ iadwStats->reset();
+ iaexStats->reset();
+ iaaiStats->reset();
+ iadtStats->reset();
+ iaitStats->reset();
+ iafsStats->reset();
+ iadsStats->reset();
+ iardxStats->reset();
+ iardyStats->reset();
+ iardwStats->reset();
+ iardhStats->reset();
+ iariStats->reset();
+ if (iaidStats->getContextSize() == 1 << (symCodeLen + 1)) {
+ iaidStats->reset();
+ } else {
+ delete iaidStats;
+ iaidStats = new JArithmeticDecoderStats(1 << (symCodeLen + 1));
+ }
+}
+
+GBool JBIG2Stream::readUByte(Guint *x) {
+ int c0;
+
+ if ((c0 = curStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)c0;
+ return gTrue;
+}
+
+GBool JBIG2Stream::readByte(int *x) {
+ int c0;
+
+ if ((c0 = curStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = c0;
+ if (c0 & 0x80) {
+ *x |= -1 - 0xff;
+ }
+ return gTrue;
+}
+
+GBool JBIG2Stream::readUWord(Guint *x) {
+ int c0, c1;
+
+ if ((c0 = curStr->getChar()) == EOF ||
+ (c1 = curStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)((c0 << 8) | c1);
+ return gTrue;
+}
+
+GBool JBIG2Stream::readULong(Guint *x) {
+ int c0, c1, c2, c3;
+
+ if ((c0 = curStr->getChar()) == EOF ||
+ (c1 = curStr->getChar()) == EOF ||
+ (c2 = curStr->getChar()) == EOF ||
+ (c3 = curStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)((c0 << 24) | (c1 << 16) | (c2 << 8) | c3);
+ return gTrue;
+}
+
+GBool JBIG2Stream::readLong(int *x) {
+ int c0, c1, c2, c3;
+
+ if ((c0 = curStr->getChar()) == EOF ||
+ (c1 = curStr->getChar()) == EOF ||
+ (c2 = curStr->getChar()) == EOF ||
+ (c3 = curStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3);
+ if (c0 & 0x80) {
+ *x |= -1 - (int)0xffffffff;
+ }
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.h
new file mode 100644
index 00000000000..23d3d92d961
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JBIG2Stream.h
@@ -0,0 +1,162 @@
+//========================================================================
+//
+// JBIG2Stream.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef JBIG2STREAM_H
+#define JBIG2STREAM_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+#include "Stream.h"
+
+class GooList;
+class JBIG2Segment;
+class JBIG2Bitmap;
+class JArithmeticDecoder;
+class JArithmeticDecoderStats;
+class JBIG2HuffmanDecoder;
+struct JBIG2HuffmanTable;
+class JBIG2MMRDecoder;
+
+//------------------------------------------------------------------------
+
+class JBIG2Stream: public FilterStream {
+public:
+
+ JBIG2Stream(Stream *strA, Object *globalsStreamA);
+ virtual ~JBIG2Stream();
+ virtual StreamKind getKind() { return strJBIG2; }
+ virtual void reset();
+ virtual void close();
+ virtual int getPos();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+
+ void readSegments();
+ GBool readSymbolDictSeg(Guint segNum, Guint length,
+ Guint *refSegs, Guint nRefSegs);
+ void readTextRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs, Guint nRefSegs);
+ JBIG2Bitmap *readTextRegion(GBool huff, GBool refine,
+ int w, int h,
+ Guint numInstances,
+ Guint logStrips,
+ int numSyms,
+ JBIG2HuffmanTable *symCodeTab,
+ Guint symCodeLen,
+ JBIG2Bitmap **syms,
+ Guint defPixel, Guint combOp,
+ Guint transposed, Guint refCorner,
+ int sOffset,
+ JBIG2HuffmanTable *huffFSTable,
+ JBIG2HuffmanTable *huffDSTable,
+ JBIG2HuffmanTable *huffDTTable,
+ JBIG2HuffmanTable *huffRDWTable,
+ JBIG2HuffmanTable *huffRDHTable,
+ JBIG2HuffmanTable *huffRDXTable,
+ JBIG2HuffmanTable *huffRDYTable,
+ JBIG2HuffmanTable *huffRSizeTable,
+ Guint templ,
+ int *atx, int *aty);
+ void readPatternDictSeg(Guint segNum, Guint length);
+ void readHalftoneRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs, Guint nRefSegs);
+ void readGenericRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length);
+ void mmrAddPixels(int a1, int blackPixels,
+ int *codingLine, int *a0i, int w);
+ void mmrAddPixelsNeg(int a1, int blackPixels,
+ int *codingLine, int *a0i, int w);
+ JBIG2Bitmap *readGenericBitmap(GBool mmr, int w, int h,
+ int templ, GBool tpgdOn,
+ GBool useSkip, JBIG2Bitmap *skip,
+ int *atx, int *aty,
+ int mmrDataLength);
+ void readGenericRefinementRegionSeg(Guint segNum, GBool imm,
+ GBool lossless, Guint length,
+ Guint *refSegs,
+ Guint nRefSegs);
+ JBIG2Bitmap *readGenericRefinementRegion(int w, int h,
+ int templ, GBool tpgrOn,
+ JBIG2Bitmap *refBitmap,
+ int refDX, int refDY,
+ int *atx, int *aty);
+ void readPageInfoSeg(Guint length);
+ void readEndOfStripeSeg(Guint length);
+ void readProfilesSeg(Guint length);
+ void readCodeTableSeg(Guint segNum, Guint length);
+ void readExtensionSeg(Guint length);
+ JBIG2Segment *findSegment(Guint segNum);
+ void discardSegment(Guint segNum);
+ void resetGenericStats(Guint templ,
+ JArithmeticDecoderStats *prevStats);
+ void resetRefinementStats(Guint templ,
+ JArithmeticDecoderStats *prevStats);
+ void resetIntStats(int symCodeLen);
+ GBool readUByte(Guint *x);
+ GBool readByte(int *x);
+ GBool readUWord(Guint *x);
+ GBool readULong(Guint *x);
+ GBool readLong(int *x);
+
+ Object globalsStream;
+ Guint pageW, pageH, curPageH;
+ Guint pageDefPixel;
+ JBIG2Bitmap *pageBitmap;
+ Guint defCombOp;
+ GooList *segments; // [JBIG2Segment]
+ GooList *globalSegments; // [JBIG2Segment]
+ Stream *curStr;
+ Guchar *dataPtr;
+ Guchar *dataEnd;
+
+ JArithmeticDecoder *arithDecoder;
+ JArithmeticDecoderStats *genericRegionStats;
+ JArithmeticDecoderStats *refinementRegionStats;
+ JArithmeticDecoderStats *iadhStats;
+ JArithmeticDecoderStats *iadwStats;
+ JArithmeticDecoderStats *iaexStats;
+ JArithmeticDecoderStats *iaaiStats;
+ JArithmeticDecoderStats *iadtStats;
+ JArithmeticDecoderStats *iaitStats;
+ JArithmeticDecoderStats *iafsStats;
+ JArithmeticDecoderStats *iadsStats;
+ JArithmeticDecoderStats *iardxStats;
+ JArithmeticDecoderStats *iardyStats;
+ JArithmeticDecoderStats *iardwStats;
+ JArithmeticDecoderStats *iardhStats;
+ JArithmeticDecoderStats *iariStats;
+ JArithmeticDecoderStats *iaidStats;
+ JBIG2HuffmanDecoder *huffDecoder;
+ JBIG2MMRDecoder *mmrDecoder;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.cc
new file mode 100644
index 00000000000..3b301f75222
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.cc
@@ -0,0 +1,187 @@
+//========================================================================
+//
+// JPEG2000Stream.cc
+//
+// A JPX stream decoder using OpenJPEG
+//
+// Copyright 2008, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// Licensed under GPLv2 or later
+//
+//========================================================================
+
+#include "JPEG2000Stream.h"
+
+JPXStream::JPXStream(Stream *strA) : FilterStream(strA)
+{
+ inited = gFalse;
+ image = NULL;
+ dinfo = NULL;
+}
+
+JPXStream::~JPXStream() {
+ delete str;
+ close();
+}
+
+void JPXStream::reset() {
+ counter = 0;
+}
+
+void JPXStream::close() {
+ if (image != NULL) {
+ opj_image_destroy(image);
+ image = NULL;
+ }
+ if (dinfo != NULL) {
+ opj_destroy_decompress(dinfo);
+ dinfo = NULL;
+ }
+}
+
+int JPXStream::getPos() {
+ return counter;
+}
+
+int JPXStream::getChar() {
+ int result = lookChar();
+ ++counter;
+ return result;
+}
+
+#define BUFFER_INCREASE 4096
+
+void JPXStream::init()
+{
+ Object oLen;
+ if (getDict()) getDict()->lookup("Length", &oLen);
+
+ int bufSize = BUFFER_INCREASE;
+ if (oLen.isInt()) bufSize = oLen.getInt();
+ oLen.free();
+
+ unsigned char *buf = (unsigned char*)gmallocn(bufSize, sizeof(unsigned char));
+ int index = 0;
+
+ str->reset();
+ int c = str->getChar();
+ while(c != EOF)
+ {
+ if (index >= bufSize)
+ {
+ bufSize += BUFFER_INCREASE;
+ buf = (unsigned char*)greallocn(buf, bufSize, sizeof(unsigned char));
+ }
+ buf[index] = c;
+ ++index;
+ c = str->getChar();
+ }
+
+ init2(buf, index, CODEC_JP2);
+
+ free(buf);
+
+ counter = 0;
+ inited = gTrue;
+}
+
+static void libopenjpeg_error_callback(const char *msg, void * /*client_data*/) {
+ error(-1, "%s", msg);
+}
+
+static void libopenjpeg_warning_callback(const char *msg, void * /*client_data*/) {
+ error(-1, "%s", msg);
+}
+
+void JPXStream::init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format)
+{
+ opj_cio_t *cio = NULL;
+
+ /* Use default decompression parameters */
+ opj_dparameters_t parameters;
+ opj_set_default_decoder_parameters(&parameters);
+
+ /* Configure the event manager to receive errors and warnings */
+ opj_event_mgr_t event_mgr;
+ memset(&event_mgr, 0, sizeof(opj_event_mgr_t));
+ event_mgr.error_handler = libopenjpeg_error_callback;
+ event_mgr.warning_handler = libopenjpeg_warning_callback;
+
+ /* Get the decoder handle of the format */
+ dinfo = opj_create_decompress(format);
+ if (dinfo == NULL) goto error;
+
+ /* Catch events using our callbacks */
+ opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, NULL);
+
+ /* Setup the decoder decoding parameters */
+ opj_setup_decoder(dinfo, &parameters);
+
+ /* Open a byte stream */
+ cio = opj_cio_open((opj_common_ptr)dinfo, buf, bufLen);
+ if (cio == NULL) goto error;
+
+ /* Decode the stream and fill the image structure */
+ image = opj_decode(dinfo, cio);
+
+ /* Close the byte stream */
+ opj_cio_close(cio);
+
+ if (image == NULL) goto error;
+ else return;
+
+error:
+ if (format == CODEC_JP2) {
+ error(-1, "Did no succeed opening JPX Stream as JP2, trying as J2K.");
+ init2(buf, bufLen, CODEC_J2K);
+ } else if (format == CODEC_J2K) {
+ error(-1, "Did no succeed opening JPX Stream as J2K, trying as JPT.");
+ init2(buf, bufLen, CODEC_JPT);
+ } else {
+ error(-1, "Did no succeed opening JPX Stream.");
+ }
+}
+
+int JPXStream::lookChar() {
+ if (inited == gFalse) init();
+
+ if (!image) return EOF;
+
+ int w = image->comps[0].w;
+ int h = image->comps[0].h;
+
+ int y = (counter / image->numcomps) / w;
+ int x = (counter / image->numcomps) % w;
+ if (y >= h) return EOF;
+
+ int component = counter % image->numcomps;
+
+ int adjust = 0;
+ if (image->comps[component].prec > 8) {
+ adjust = image->comps[component].prec - 8;
+ }
+
+ int r = image->comps[component].data[y * w + x];
+ r += (image->comps[component].sgnd ? 1 << (image->comps[0].prec - 1) : 0);
+
+ unsigned char rc = (unsigned char) ((r >> adjust)+((r >> (adjust-1))%2));
+
+ return rc;
+}
+
+GooString *JPXStream::getPSFilter(int psLevel, char *indent) {
+ return NULL;
+}
+
+GBool JPXStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+void JPXStream::getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode) {
+ if (inited == gFalse) init();
+
+ *bitsPerComponent = 8;
+ if (image && image->numcomps == 3) *csMode = streamCSDeviceRGB;
+ else *csMode = streamCSDeviceGray;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.h
new file mode 100644
index 00000000000..ea32093bfd6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPEG2000Stream.h
@@ -0,0 +1,48 @@
+//========================================================================
+//
+// JPEG2000Stream.h
+//
+// A JPX stream decoder using OpenJPEG
+//
+// Copyright 2008 Albert Astals Cid <aacid@kde.org>
+//
+// Licensed under GPLv2 or later
+//
+//========================================================================
+
+
+#ifndef JPEG2000STREAM_H
+#define JPEG2000STREAM_H
+
+#include <openjpeg.h>
+
+#include "goo/gtypes.h"
+#include "Object.h"
+#include "Stream.h"
+
+class JPXStream: public FilterStream {
+public:
+
+ JPXStream(Stream *strA);
+ virtual ~JPXStream();
+ virtual StreamKind getKind() { return strJPX; }
+ virtual void reset();
+ virtual void close();
+ virtual int getPos();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ virtual void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode);
+
+private:
+ void init();
+ void init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format);
+
+ opj_image_t *image;
+ opj_dinfo_t *dinfo;
+ int counter;
+ GBool inited;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.cc
new file mode 100644
index 00000000000..3b8c05d27b0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.cc
@@ -0,0 +1,3158 @@
+//========================================================================
+//
+// JPXStream.cc
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+#include <limits.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "goo/gmem.h"
+#include "Error.h"
+#include "JArithmeticDecoder.h"
+#include "JPXStream.h"
+
+//~ to do:
+// - precincts
+// - ROI
+// - progression order changes
+// - packed packet headers
+// - support for palettes, channel maps, etc.
+// - make sure all needed JP2/JPX subboxes are parsed (readBoxes)
+// - can we assume that QCC segments must come after the QCD segment?
+// - skip EPH markers (readTilePartData)
+// - handle tilePartToEOC in readTilePartData
+// - deal with multiple codeword segments (readTilePartData,
+// readCodeBlockData)
+// - progression orders 2, 3, and 4
+// - in coefficient decoding (readCodeBlockData):
+// - termination pattern: terminate after every coding pass
+// - error resilience segmentation symbol
+// - selective arithmetic coding bypass
+// - vertically causal context formation
+// - coeffs longer than 31 bits (should just ignore the extra bits?)
+// - handle boxes larger than 2^32 bytes
+// - the fixed-point arithmetic won't handle 16-bit pixels
+
+//------------------------------------------------------------------------
+
+// number of contexts for the arithmetic decoder
+#define jpxNContexts 19
+
+#define jpxContextSigProp 0 // 0 - 8: significance prop and cleanup
+#define jpxContextSign 9 // 9 - 13: sign
+#define jpxContextMagRef 14 // 14 -16: magnitude refinement
+#define jpxContextRunLength 17 // cleanup: run length
+#define jpxContextUniform 18 // cleanup: first signif coeff
+
+//------------------------------------------------------------------------
+
+#define jpxPassSigProp 0
+#define jpxPassMagRef 1
+#define jpxPassCleanup 2
+
+//------------------------------------------------------------------------
+
+// arithmetic decoder context for the significance propagation and
+// cleanup passes:
+// [horiz][vert][diag][subband]
+// where subband = 0 for HL
+// = 1 for LH and LL
+// = 2 for HH
+static const Guint sigPropContext[3][3][5][3] = {
+ {{{ 0, 0, 0 }, // horiz=0, vert=0, diag=0
+ { 1, 1, 3 }, // horiz=0, vert=0, diag=1
+ { 2, 2, 6 }, // horiz=0, vert=0, diag=2
+ { 2, 2, 8 }, // horiz=0, vert=0, diag=3
+ { 2, 2, 8 }}, // horiz=0, vert=0, diag=4
+ {{ 5, 3, 1 }, // horiz=0, vert=1, diag=0
+ { 6, 3, 4 }, // horiz=0, vert=1, diag=1
+ { 6, 3, 7 }, // horiz=0, vert=1, diag=2
+ { 6, 3, 8 }, // horiz=0, vert=1, diag=3
+ { 6, 3, 8 }}, // horiz=0, vert=1, diag=4
+ {{ 8, 4, 2 }, // horiz=0, vert=2, diag=0
+ { 8, 4, 5 }, // horiz=0, vert=2, diag=1
+ { 8, 4, 7 }, // horiz=0, vert=2, diag=2
+ { 8, 4, 8 }, // horiz=0, vert=2, diag=3
+ { 8, 4, 8 }}}, // horiz=0, vert=2, diag=4
+ {{{ 3, 5, 1 }, // horiz=1, vert=0, diag=0
+ { 3, 6, 4 }, // horiz=1, vert=0, diag=1
+ { 3, 6, 7 }, // horiz=1, vert=0, diag=2
+ { 3, 6, 8 }, // horiz=1, vert=0, diag=3
+ { 3, 6, 8 }}, // horiz=1, vert=0, diag=4
+ {{ 7, 7, 2 }, // horiz=1, vert=1, diag=0
+ { 7, 7, 5 }, // horiz=1, vert=1, diag=1
+ { 7, 7, 7 }, // horiz=1, vert=1, diag=2
+ { 7, 7, 8 }, // horiz=1, vert=1, diag=3
+ { 7, 7, 8 }}, // horiz=1, vert=1, diag=4
+ {{ 8, 7, 2 }, // horiz=1, vert=2, diag=0
+ { 8, 7, 5 }, // horiz=1, vert=2, diag=1
+ { 8, 7, 7 }, // horiz=1, vert=2, diag=2
+ { 8, 7, 8 }, // horiz=1, vert=2, diag=3
+ { 8, 7, 8 }}}, // horiz=1, vert=2, diag=4
+ {{{ 4, 8, 2 }, // horiz=2, vert=0, diag=0
+ { 4, 8, 5 }, // horiz=2, vert=0, diag=1
+ { 4, 8, 7 }, // horiz=2, vert=0, diag=2
+ { 4, 8, 8 }, // horiz=2, vert=0, diag=3
+ { 4, 8, 8 }}, // horiz=2, vert=0, diag=4
+ {{ 7, 8, 2 }, // horiz=2, vert=1, diag=0
+ { 7, 8, 5 }, // horiz=2, vert=1, diag=1
+ { 7, 8, 7 }, // horiz=2, vert=1, diag=2
+ { 7, 8, 8 }, // horiz=2, vert=1, diag=3
+ { 7, 8, 8 }}, // horiz=2, vert=1, diag=4
+ {{ 8, 8, 2 }, // horiz=2, vert=2, diag=0
+ { 8, 8, 5 }, // horiz=2, vert=2, diag=1
+ { 8, 8, 7 }, // horiz=2, vert=2, diag=2
+ { 8, 8, 8 }, // horiz=2, vert=2, diag=3
+ { 8, 8, 8 }}} // horiz=2, vert=2, diag=4
+};
+
+// arithmetic decoder context and xor bit for the sign bit in the
+// significance propagation pass:
+// [horiz][vert][k]
+// where horiz/vert are offset by 2 (i.e., range is -2 .. 2)
+// and k = 0 for the context
+// = 1 for the xor bit
+static const Guint signContext[5][5][2] = {
+ {{ 13, 1 }, // horiz=-2, vert=-2
+ { 13, 1 }, // horiz=-2, vert=-1
+ { 12, 1 }, // horiz=-2, vert= 0
+ { 11, 1 }, // horiz=-2, vert=+1
+ { 11, 1 }}, // horiz=-2, vert=+2
+ {{ 13, 1 }, // horiz=-1, vert=-2
+ { 13, 1 }, // horiz=-1, vert=-1
+ { 12, 1 }, // horiz=-1, vert= 0
+ { 11, 1 }, // horiz=-1, vert=+1
+ { 11, 1 }}, // horiz=-1, vert=+2
+ {{ 10, 1 }, // horiz= 0, vert=-2
+ { 10, 1 }, // horiz= 0, vert=-1
+ { 9, 0 }, // horiz= 0, vert= 0
+ { 10, 0 }, // horiz= 0, vert=+1
+ { 10, 0 }}, // horiz= 0, vert=+2
+ {{ 11, 0 }, // horiz=+1, vert=-2
+ { 11, 0 }, // horiz=+1, vert=-1
+ { 12, 0 }, // horiz=+1, vert= 0
+ { 13, 0 }, // horiz=+1, vert=+1
+ { 13, 0 }}, // horiz=+1, vert=+2
+ {{ 11, 0 }, // horiz=+2, vert=-2
+ { 11, 0 }, // horiz=+2, vert=-1
+ { 12, 0 }, // horiz=+2, vert= 0
+ { 13, 0 }, // horiz=+2, vert=+1
+ { 13, 0 }}, // horiz=+2, vert=+2
+};
+
+//------------------------------------------------------------------------
+
+// constants used in the IDWT
+#define idwtAlpha -1.586134342059924
+#define idwtBeta -0.052980118572961
+#define idwtGamma 0.882911075530934
+#define idwtDelta 0.443506852043971
+#define idwtKappa 1.230174104914001
+#define idwtIKappa (1.0 / idwtKappa)
+
+// number of bits to the right of the decimal point for the fixed
+// point arithmetic used in the IDWT
+#define fracBits 16
+
+//------------------------------------------------------------------------
+
+// floor(x / y)
+#define jpxFloorDiv(x, y) ((x) / (y))
+
+// floor(x / 2^y)
+#define jpxFloorDivPow2(x, y) ((x) >> (y))
+
+// ceil(x / y)
+#define jpxCeilDiv(x, y) (((x) + (y) - 1) / (y))
+
+// ceil(x / 2^y)
+#define jpxCeilDivPow2(x, y) (((x) + (1 << (y)) - 1) >> (y))
+
+//------------------------------------------------------------------------
+
+#if 1 //----- disable coverage tracking
+
+#define cover(idx)
+
+#else //----- enable coverage tracking
+
+class JPXCover {
+public:
+
+ JPXCover(int sizeA);
+ ~JPXCover();
+ void incr(int idx);
+
+private:
+
+ int size, used;
+ int *data;
+};
+
+JPXCover::JPXCover(int sizeA) {
+ size = sizeA;
+ used = -1;
+ data = (int *)gmallocn(size, sizeof(int));
+ memset(data, 0, size * sizeof(int));
+}
+
+JPXCover::~JPXCover() {
+ int i;
+
+ printf("JPX coverage:\n");
+ for (i = 0; i <= used; ++i) {
+ printf(" %4d: %8d\n", i, data[i]);
+ }
+ gfree(data);
+}
+
+void JPXCover::incr(int idx) {
+ if (idx < size) {
+ ++data[idx];
+ if (idx > used) {
+ used = idx;
+ }
+ }
+}
+
+JPXCover jpxCover(150);
+
+#define cover(idx) jpxCover.incr(idx)
+
+#endif //----- coverage tracking
+
+//------------------------------------------------------------------------
+
+JPXStream::JPXStream(Stream *strA):
+ FilterStream(strA)
+{
+ nComps = 0;
+ bpc = NULL;
+ width = height = 0;
+ haveCS = gFalse;
+ havePalette = gFalse;
+ haveCompMap = gFalse;
+ haveChannelDefn = gFalse;
+
+ img.tiles = NULL;
+ bitBuf = 0;
+ bitBufLen = 0;
+ bitBufSkip = gFalse;
+ byteCount = 0;
+}
+
+JPXStream::~JPXStream() {
+ close();
+ delete str;
+}
+
+void JPXStream::reset() {
+ str->reset();
+ if (readBoxes()) {
+ curY = img.yOffset;
+ } else {
+ // readBoxes reported an error, so we go immediately to EOF
+ curY = img.ySize;
+ }
+ curX = img.xOffset;
+ curComp = 0;
+ readBufLen = 0;
+}
+
+void JPXStream::close() {
+ JPXTile *tile;
+ JPXTileComp *tileComp;
+ JPXResLevel *resLevel;
+ JPXPrecinct *precinct;
+ JPXSubband *subband;
+ JPXCodeBlock *cb;
+ Guint comp, i, k, r, pre, sb;
+
+ gfree(bpc);
+ bpc = NULL;
+ if (havePalette) {
+ gfree(palette.bpc);
+ gfree(palette.c);
+ havePalette = gFalse;
+ }
+ if (haveCompMap) {
+ gfree(compMap.comp);
+ gfree(compMap.type);
+ gfree(compMap.pComp);
+ haveCompMap = gFalse;
+ }
+ if (haveChannelDefn) {
+ gfree(channelDefn.idx);
+ gfree(channelDefn.type);
+ gfree(channelDefn.assoc);
+ haveChannelDefn = gFalse;
+ }
+
+ if (img.tiles) {
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ tile = &img.tiles[i];
+ if (tile->tileComps) {
+ for (comp = 0; comp < img.nComps; ++comp) {
+ tileComp = &tile->tileComps[comp];
+ gfree(tileComp->quantSteps);
+ gfree(tileComp->data);
+ gfree(tileComp->buf);
+ if (tileComp->resLevels) {
+ for (r = 0; r <= tileComp->nDecompLevels; ++r) {
+ resLevel = &tileComp->resLevels[r];
+ if (resLevel->precincts) {
+ for (pre = 0; pre < 1; ++pre) {
+ precinct = &resLevel->precincts[pre];
+ if (precinct->subbands) {
+ for (sb = 0; sb < (Guint)(r == 0 ? 1 : 3); ++sb) {
+ subband = &precinct->subbands[sb];
+ gfree(subband->inclusion);
+ gfree(subband->zeroBitPlane);
+ if (subband->cbs) {
+ for (k = 0; k < subband->nXCBs * subband->nYCBs; ++k) {
+ cb = &subband->cbs[k];
+ gfree(cb->coeffs);
+ if (cb->arithDecoder) {
+ delete cb->arithDecoder;
+ }
+ if (cb->stats) {
+ delete cb->stats;
+ }
+ }
+ gfree(subband->cbs);
+ }
+ }
+ gfree(precinct->subbands);
+ }
+ }
+ gfree(img.tiles[i].tileComps[comp].resLevels[r].precincts);
+ }
+ }
+ gfree(img.tiles[i].tileComps[comp].resLevels);
+ }
+ }
+ gfree(img.tiles[i].tileComps);
+ }
+ }
+ gfree(img.tiles);
+ img.tiles = NULL;
+ }
+ FilterStream::close();
+}
+
+int JPXStream::getChar() {
+ int c;
+
+ if (readBufLen < 8) {
+ fillReadBuf();
+ }
+ if (readBufLen == 8) {
+ c = readBuf & 0xff;
+ readBufLen = 0;
+ } else if (readBufLen > 8) {
+ c = (readBuf >> (readBufLen - 8)) & 0xff;
+ readBufLen -= 8;
+ } else if (readBufLen == 0) {
+ c = EOF;
+ } else {
+ c = (readBuf << (8 - readBufLen)) & 0xff;
+ readBufLen = 0;
+ }
+ return c;
+}
+
+int JPXStream::lookChar() {
+ int c;
+
+ if (readBufLen < 8) {
+ fillReadBuf();
+ }
+ if (readBufLen == 8) {
+ c = readBuf & 0xff;
+ } else if (readBufLen > 8) {
+ c = (readBuf >> (readBufLen - 8)) & 0xff;
+ } else if (readBufLen == 0) {
+ c = EOF;
+ } else {
+ c = (readBuf << (8 - readBufLen)) & 0xff;
+ }
+ return c;
+}
+
+void JPXStream::fillReadBuf() {
+ JPXTileComp *tileComp;
+ Guint tileIdx, tx, ty;
+ int pix, pixBits;
+
+ do {
+ if (curY >= img.ySize) {
+ return;
+ }
+ tileIdx = ((curY - img.yTileOffset) / img.yTileSize) * img.nXTiles
+ + (curX - img.xTileOffset) / img.xTileSize;
+#if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid
+ tileComp = &img.tiles[tileIdx].tileComps[curComp];
+#else
+ tileComp = &img.tiles[tileIdx].tileComps[havePalette ? 0 : curComp];
+#endif
+ tx = jpxCeilDiv((curX - img.xTileOffset) % img.xTileSize, tileComp->hSep);
+ ty = jpxCeilDiv((curY - img.yTileOffset) % img.yTileSize, tileComp->vSep);
+ pix = (int)tileComp->data[ty * (tileComp->x1 - tileComp->x0) + tx];
+ pixBits = tileComp->prec;
+#if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid
+ if (++curComp == img.nComps) {
+#else
+ if (havePalette) {
+ if (pix >= 0 && pix < palette.nEntries) {
+ pix = palette.c[pix * palette.nComps + curComp];
+ } else {
+ pix =
+ pixBits = palette.bpc[curComp];
+ }
+ if (++curComp == (Guint)(havePalette ? palette.nComps : img.nComps)) {
+#endif
+ curComp = 0;
+ if (++curX == img.xSize) {
+ curX = img.xOffset;
+ ++curY;
+ }
+ }
+ if (pixBits == 8) {
+ readBuf = (readBuf << 8) | (pix & 0xff);
+ } else {
+ readBuf = (readBuf << pixBits) | (pix & ((1 << pixBits) - 1));
+ }
+ readBufLen += pixBits;
+ } while (readBufLen < 8);
+}
+
+GooString *JPXStream::getPSFilter(int psLevel, char *indent) {
+ return NULL;
+}
+
+GBool JPXStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+void JPXStream::getImageParams(int *bitsPerComponent,
+ StreamColorSpaceMode *csMode) {
+ Guint boxType, boxLen, dataLen, csEnum;
+ Guint bpc1, dummy, i;
+ int csMeth, csPrec, csPrec1, dummy2;
+ StreamColorSpaceMode csMode1;
+ GBool haveBPC, haveCSMode;
+
+ csPrec = 0; // make gcc happy
+ haveBPC = haveCSMode = gFalse;
+ str->reset();
+ if (str->lookChar() == 0xff) {
+ getImageParams2(bitsPerComponent, csMode);
+ } else {
+ while (readBoxHdr(&boxType, &boxLen, &dataLen)) {
+ if (boxType == 0x6a703268) { // JP2 header
+ cover(0);
+ // skip the superbox
+ } else if (boxType == 0x69686472) { // image header
+ cover(1);
+ if (readULong(&dummy) &&
+ readULong(&dummy) &&
+ readUWord(&dummy) &&
+ readUByte(&bpc1) &&
+ readUByte(&dummy) &&
+ readUByte(&dummy) &&
+ readUByte(&dummy)) {
+ *bitsPerComponent = bpc1 + 1;
+ haveBPC = gTrue;
+ }
+ } else if (boxType == 0x636F6C72) { // color specification
+ cover(2);
+ if (readByte(&csMeth) &&
+ readByte(&csPrec1) &&
+ readByte(&dummy2)) {
+ if (csMeth == 1) {
+ if (readULong(&csEnum)) {
+ csMode1 = streamCSNone;
+ if (csEnum == jpxCSBiLevel ||
+ csEnum == jpxCSGrayscale) {
+ csMode1 = streamCSDeviceGray;
+ } else if (csEnum == jpxCSCMYK) {
+ csMode1 = streamCSDeviceCMYK;
+ } else if (csEnum == jpxCSsRGB ||
+ csEnum == jpxCSCISesRGB ||
+ csEnum == jpxCSROMMRGB) {
+ csMode1 = streamCSDeviceRGB;
+ }
+ if (csMode1 != streamCSNone &&
+ (!haveCSMode || csPrec1 > csPrec)) {
+ *csMode = csMode1;
+ csPrec = csPrec1;
+ haveCSMode = gTrue;
+ }
+ for (i = 0; i < dataLen - 7; ++i) {
+ str->getChar();
+ }
+ }
+ } else {
+ for (i = 0; i < dataLen - 3; ++i) {
+ str->getChar();
+ }
+ }
+ }
+ } else if (boxType == 0x6A703263) { // codestream
+ cover(3);
+ if (!(haveBPC && haveCSMode)) {
+ getImageParams2(bitsPerComponent, csMode);
+ }
+ break;
+ } else {
+ cover(4);
+ for (i = 0; i < dataLen; ++i) {
+ str->getChar();
+ }
+ }
+ }
+ }
+ str->close();
+}
+
+// Get image parameters from the codestream.
+void JPXStream::getImageParams2(int *bitsPerComponent,
+ StreamColorSpaceMode *csMode) {
+ int segType;
+ Guint segLen, nComps1, bpc1, dummy, i;
+
+ while (readMarkerHdr(&segType, &segLen)) {
+ if (segType == 0x51) { // SIZ - image and tile size
+ cover(5);
+ if (readUWord(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readULong(&dummy) &&
+ readUWord(&nComps1) &&
+ readUByte(&bpc1)) {
+ *bitsPerComponent = (bpc1 & 0x7f) + 1;
+ // if there's no color space info, take a guess
+ if (nComps1 == 1) {
+ *csMode = streamCSDeviceGray;
+ } else if (nComps1 == 3) {
+ *csMode = streamCSDeviceRGB;
+ } else if (nComps1 == 4) {
+ *csMode = streamCSDeviceCMYK;
+ }
+ }
+ break;
+ } else {
+ cover(6);
+ if (segLen > 2) {
+ for (i = 0; i < segLen - 2; ++i) {
+ str->getChar();
+ }
+ }
+ }
+ }
+}
+
+GBool JPXStream::readBoxes() {
+ Guint boxType, boxLen, dataLen;
+ Guint bpc1, compression, unknownColorspace, ipr;
+ Guint i, j;
+
+ haveImgHdr = gFalse;
+
+ // check for a naked JPEG 2000 codestream (without the JP2/JPX
+ // wrapper) -- this appears to be a violation of the PDF spec, but
+ // Acrobat allows it
+ if (str->lookChar() == 0xff) {
+ cover(7);
+ error(getPos(), "Naked JPEG 2000 codestream, missing JP2/JPX wrapper");
+ readCodestream(0);
+ nComps = img.nComps;
+ bpc = (Guint *)gmallocn(nComps, sizeof(Guint));
+ for (i = 0; i < nComps; ++i) {
+ bpc[i] = img.tiles[0].tileComps[i].prec;
+ }
+ width = img.xSize - img.xOffset;
+ height = img.ySize - img.yOffset;
+ return gTrue;
+ }
+
+ while (readBoxHdr(&boxType, &boxLen, &dataLen)) {
+ switch (boxType) {
+ case 0x6a703268: // JP2 header
+ // this is a grouping box ('superbox') which has no real
+ // contents and doesn't appear to be used consistently, i.e.,
+ // some things which should be subboxes of the JP2 header box
+ // show up outside of it - so we simply ignore the JP2 header
+ // box
+ cover(8);
+ break;
+ case 0x69686472: // image header
+ cover(9);
+ if (!readULong(&height) ||
+ !readULong(&width) ||
+ !readUWord(&nComps) ||
+ !readUByte(&bpc1) ||
+ !readUByte(&compression) ||
+ !readUByte(&unknownColorspace) ||
+ !readUByte(&ipr)) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ if (compression != 7) {
+ error(getPos(), "Unknown compression type in JPX stream");
+ return gFalse;
+ }
+ bpc = (Guint *)gmallocn(nComps, sizeof(Guint));
+ for (i = 0; i < nComps; ++i) {
+ bpc[i] = bpc1;
+ }
+ haveImgHdr = gTrue;
+ break;
+ case 0x62706363: // bits per component
+ cover(10);
+ if (!haveImgHdr) {
+ error(getPos(), "Found bits per component box before image header box in JPX stream");
+ return gFalse;
+ }
+ if (dataLen != nComps) {
+ error(getPos(), "Invalid bits per component box in JPX stream");
+ return gFalse;
+ }
+ for (i = 0; i < nComps; ++i) {
+ if (!readUByte(&bpc[i])) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x636F6C72: // color specification
+ cover(11);
+ if (!readColorSpecBox(dataLen)) {
+ return gFalse;
+ }
+ break;
+ case 0x70636c72: // palette
+ cover(12);
+ if (!readUWord(&palette.nEntries) ||
+ !readUByte(&palette.nComps)) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ palette.bpc = (Guint *)gmallocn(palette.nComps, sizeof(Guint));
+ palette.c =
+ (int *)gmallocn(palette.nEntries * palette.nComps, sizeof(int));
+ for (i = 0; i < palette.nComps; ++i) {
+ if (!readUByte(&palette.bpc[i])) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ ++palette.bpc[i];
+ }
+ for (i = 0; i < palette.nEntries; ++i) {
+ for (j = 0; j < palette.nComps; ++j) {
+ if (!readNBytes(((palette.bpc[j] & 0x7f) + 7) >> 3,
+ (palette.bpc[j] & 0x80) ? gTrue : gFalse,
+ &palette.c[i * palette.nComps + j])) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ }
+ }
+ havePalette = gTrue;
+ break;
+ case 0x636d6170: // component mapping
+ cover(13);
+ compMap.nChannels = dataLen / 4;
+ compMap.comp = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint));
+ compMap.type = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint));
+ compMap.pComp = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint));
+ for (i = 0; i < compMap.nChannels; ++i) {
+ if (!readUWord(&compMap.comp[i]) ||
+ !readUByte(&compMap.type[i]) ||
+ !readUByte(&compMap.pComp[i])) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ }
+ haveCompMap = gTrue;
+ break;
+ case 0x63646566: // channel definition
+ cover(14);
+ if (!readUWord(&channelDefn.nChannels)) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ channelDefn.idx =
+ (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint));
+ channelDefn.type =
+ (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint));
+ channelDefn.assoc =
+ (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint));
+ for (i = 0; i < channelDefn.nChannels; ++i) {
+ if (!readUWord(&channelDefn.idx[i]) ||
+ !readUWord(&channelDefn.type[i]) ||
+ !readUWord(&channelDefn.assoc[i])) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ }
+ haveChannelDefn = gTrue;
+ break;
+ case 0x6A703263: // contiguous codestream
+ cover(15);
+ if (!bpc) {
+ error(getPos(), "JPX stream is missing the image header box");
+ }
+ if (!haveCS) {
+ error(getPos(), "JPX stream has no supported color spec");
+ }
+ if (!readCodestream(dataLen)) {
+ return gFalse;
+ }
+ break;
+ default:
+ cover(16);
+ for (i = 0; i < dataLen; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Unexpected EOF in JPX stream");
+ return gFalse;
+ }
+ }
+ break;
+ }
+ }
+ return gTrue;
+}
+
+GBool JPXStream::readColorSpecBox(Guint dataLen) {
+ JPXColorSpec newCS;
+ Guint csApprox, csEnum;
+ Guint i;
+ GBool ok;
+
+ ok = gFalse;
+ if (!readUByte(&newCS.meth) ||
+ !readByte(&newCS.prec) ||
+ !readUByte(&csApprox)) {
+ goto err;
+ }
+ switch (newCS.meth) {
+ case 1: // enumerated colorspace
+ cover(17);
+ if (!readULong(&csEnum)) {
+ goto err;
+ }
+ newCS.enumerated.type = (JPXColorSpaceType)csEnum;
+ switch (newCS.enumerated.type) {
+ case jpxCSBiLevel:
+ ok = gTrue;
+ break;
+ case jpxCSYCbCr1:
+ ok = gTrue;
+ break;
+ case jpxCSYCbCr2:
+ ok = gTrue;
+ break;
+ case jpxCSYCBCr3:
+ ok = gTrue;
+ break;
+ case jpxCSPhotoYCC:
+ ok = gTrue;
+ break;
+ case jpxCSCMY:
+ ok = gTrue;
+ break;
+ case jpxCSCMYK:
+ ok = gTrue;
+ break;
+ case jpxCSYCCK:
+ ok = gTrue;
+ break;
+ case jpxCSCIELab:
+ if (dataLen == 7 + 7*4) {
+ if (!readULong(&newCS.enumerated.cieLab.rl) ||
+ !readULong(&newCS.enumerated.cieLab.ol) ||
+ !readULong(&newCS.enumerated.cieLab.ra) ||
+ !readULong(&newCS.enumerated.cieLab.oa) ||
+ !readULong(&newCS.enumerated.cieLab.rb) ||
+ !readULong(&newCS.enumerated.cieLab.ob) ||
+ !readULong(&newCS.enumerated.cieLab.il)) {
+ goto err;
+ }
+ } else if (dataLen == 7) {
+ //~ this assumes the 8-bit case
+ cover(92);
+ newCS.enumerated.cieLab.rl = 100;
+ newCS.enumerated.cieLab.ol = 0;
+ newCS.enumerated.cieLab.ra = 255;
+ newCS.enumerated.cieLab.oa = 128;
+ newCS.enumerated.cieLab.rb = 255;
+ newCS.enumerated.cieLab.ob = 96;
+ newCS.enumerated.cieLab.il = 0x00443530;
+ } else {
+ goto err;
+ }
+ ok = gTrue;
+ break;
+ case jpxCSsRGB:
+ ok = gTrue;
+ break;
+ case jpxCSGrayscale:
+ ok = gTrue;
+ break;
+ case jpxCSBiLevel2:
+ ok = gTrue;
+ break;
+ case jpxCSCIEJab:
+ // not allowed in PDF
+ goto err;
+ case jpxCSCISesRGB:
+ ok = gTrue;
+ break;
+ case jpxCSROMMRGB:
+ ok = gTrue;
+ break;
+ case jpxCSsRGBYCbCr:
+ ok = gTrue;
+ break;
+ case jpxCSYPbPr1125:
+ ok = gTrue;
+ break;
+ case jpxCSYPbPr1250:
+ ok = gTrue;
+ break;
+ default:
+ goto err;
+ }
+ break;
+ case 2: // restricted ICC profile
+ case 3: // any ICC profile (JPX)
+ case 4: // vendor color (JPX)
+ cover(18);
+ for (i = 0; i < dataLen - 3; ++i) {
+ if (str->getChar() == EOF) {
+ goto err;
+ }
+ }
+ break;
+ }
+
+ if (ok && (!haveCS || newCS.prec > cs.prec)) {
+ cs = newCS;
+ haveCS = gTrue;
+ }
+
+ return gTrue;
+
+ err:
+ error(getPos(), "Error in JPX color spec");
+ return gFalse;
+}
+
+GBool JPXStream::readCodestream(Guint len) {
+ JPXTile *tile;
+ JPXTileComp *tileComp;
+ int segType;
+ GBool haveSIZ, haveCOD, haveQCD, haveSOT;
+ Guint precinctSize, style;
+ Guint segLen, capabilities, comp, i, j, r;
+
+ //----- main header
+ haveSIZ = haveCOD = haveQCD = haveSOT = gFalse;
+ do {
+ if (!readMarkerHdr(&segType, &segLen)) {
+ error(getPos(), "Error in JPX codestream");
+ return gFalse;
+ }
+ switch (segType) {
+ case 0x4f: // SOC - start of codestream
+ // marker only
+ cover(19);
+ break;
+ case 0x51: // SIZ - image and tile size
+ cover(20);
+ if (!readUWord(&capabilities) ||
+ !readULong(&img.xSize) ||
+ !readULong(&img.ySize) ||
+ !readULong(&img.xOffset) ||
+ !readULong(&img.yOffset) ||
+ !readULong(&img.xTileSize) ||
+ !readULong(&img.yTileSize) ||
+ !readULong(&img.xTileOffset) ||
+ !readULong(&img.yTileOffset) ||
+ !readUWord(&img.nComps)) {
+ error(getPos(), "Error in JPX SIZ marker segment");
+ return gFalse;
+ }
+ if (haveImgHdr && img.nComps != nComps) {
+ error(getPos(), "Different number of components in JPX SIZ marker segment");
+ return gFalse;
+ }
+ img.nXTiles = (img.xSize - img.xTileOffset + img.xTileSize - 1)
+ / img.xTileSize;
+ img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1)
+ / img.yTileSize;
+ // check for overflow before allocating memory
+ if (img.nXTiles <= 0 || img.nYTiles <= 0 ||
+ img.nXTiles >= INT_MAX / img.nYTiles) {
+ error(getPos(), "Bad tile count in JPX SIZ marker segment");
+ return gFalse;
+ }
+ img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles,
+ sizeof(JPXTile));
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps,
+ sizeof(JPXTileComp));
+ for (comp = 0; comp < img.nComps; ++comp) {
+ img.tiles[i].tileComps[comp].quantSteps = NULL;
+ img.tiles[i].tileComps[comp].data = NULL;
+ img.tiles[i].tileComps[comp].buf = NULL;
+ img.tiles[i].tileComps[comp].resLevels = NULL;
+ }
+ }
+ for (comp = 0; comp < img.nComps; ++comp) {
+ if (!readUByte(&img.tiles[0].tileComps[comp].prec) ||
+ !readUByte(&img.tiles[0].tileComps[comp].hSep) ||
+ !readUByte(&img.tiles[0].tileComps[comp].vSep)) {
+ error(getPos(), "Error in JPX SIZ marker segment");
+ return gFalse;
+ }
+ img.tiles[0].tileComps[comp].sgned =
+ (img.tiles[0].tileComps[comp].prec & 0x80) ? gTrue : gFalse;
+ img.tiles[0].tileComps[comp].prec =
+ (img.tiles[0].tileComps[comp].prec & 0x7f) + 1;
+ for (i = 1; i < img.nXTiles * img.nYTiles; ++i) {
+ img.tiles[i].tileComps[comp] = img.tiles[0].tileComps[comp];
+ }
+ }
+ haveSIZ = gTrue;
+ break;
+ case 0x52: // COD - coding style default
+ cover(21);
+ if (!readUByte(&img.tiles[0].tileComps[0].style) ||
+ !readUByte(&img.tiles[0].progOrder) ||
+ !readUWord(&img.tiles[0].nLayers) ||
+ !readUByte(&img.tiles[0].multiComp) ||
+ !readUByte(&img.tiles[0].tileComps[0].nDecompLevels) ||
+ !readUByte(&img.tiles[0].tileComps[0].codeBlockW) ||
+ !readUByte(&img.tiles[0].tileComps[0].codeBlockH) ||
+ !readUByte(&img.tiles[0].tileComps[0].codeBlockStyle) ||
+ !readUByte(&img.tiles[0].tileComps[0].transform)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[0].tileComps[0].codeBlockW += 2;
+ img.tiles[0].tileComps[0].codeBlockH += 2;
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ if (i != 0) {
+ img.tiles[i].progOrder = img.tiles[0].progOrder;
+ img.tiles[i].nLayers = img.tiles[0].nLayers;
+ img.tiles[i].multiComp = img.tiles[0].multiComp;
+ }
+ for (comp = 0; comp < img.nComps; ++comp) {
+ if (!(i == 0 && comp == 0)) {
+ img.tiles[i].tileComps[comp].style =
+ img.tiles[0].tileComps[0].style;
+ img.tiles[i].tileComps[comp].nDecompLevels =
+ img.tiles[0].tileComps[0].nDecompLevels;
+ img.tiles[i].tileComps[comp].codeBlockW =
+ img.tiles[0].tileComps[0].codeBlockW;
+ img.tiles[i].tileComps[comp].codeBlockH =
+ img.tiles[0].tileComps[0].codeBlockH;
+ img.tiles[i].tileComps[comp].codeBlockStyle =
+ img.tiles[0].tileComps[0].codeBlockStyle;
+ img.tiles[i].tileComps[comp].transform =
+ img.tiles[0].tileComps[0].transform;
+ }
+ img.tiles[i].tileComps[comp].resLevels =
+ (JPXResLevel *)gmallocn(
+ (img.tiles[i].tileComps[comp].nDecompLevels + 1),
+ sizeof(JPXResLevel));
+ for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
+ }
+ }
+ }
+ for (r = 0; r <= img.tiles[0].tileComps[0].nDecompLevels; ++r) {
+ if (img.tiles[0].tileComps[0].style & 0x01) {
+ cover(91);
+ if (!readUByte(&precinctSize)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[0].tileComps[0].resLevels[r].precinctWidth =
+ precinctSize & 0x0f;
+ img.tiles[0].tileComps[0].resLevels[r].precinctHeight =
+ (precinctSize >> 4) & 0x0f;
+ } else {
+ img.tiles[0].tileComps[0].resLevels[r].precinctWidth = 15;
+ img.tiles[0].tileComps[0].resLevels[r].precinctHeight = 15;
+ }
+ }
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ for (comp = 0; comp < img.nComps; ++comp) {
+ if (!(i == 0 && comp == 0)) {
+ for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ img.tiles[i].tileComps[comp].resLevels[r].precinctWidth =
+ img.tiles[0].tileComps[0].resLevels[r].precinctWidth;
+ img.tiles[i].tileComps[comp].resLevels[r].precinctHeight =
+ img.tiles[0].tileComps[0].resLevels[r].precinctHeight;
+ }
+ }
+ }
+ }
+ haveCOD = gTrue;
+ break;
+ case 0x53: // COC - coding style component
+ cover(22);
+ if (!haveCOD) {
+ error(getPos(), "JPX COC marker segment before COD segment");
+ return gFalse;
+ }
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&style) ||
+ !readUByte(&img.tiles[0].tileComps[comp].nDecompLevels) ||
+ !readUByte(&img.tiles[0].tileComps[comp].codeBlockW) ||
+ !readUByte(&img.tiles[0].tileComps[comp].codeBlockH) ||
+ !readUByte(&img.tiles[0].tileComps[comp].codeBlockStyle) ||
+ !readUByte(&img.tiles[0].tileComps[comp].transform)) {
+ error(getPos(), "Error in JPX COC marker segment");
+ return gFalse;
+ }
+ img.tiles[0].tileComps[comp].style =
+ (img.tiles[0].tileComps[comp].style & ~1) | (style & 1);
+ img.tiles[0].tileComps[comp].codeBlockW += 2;
+ img.tiles[0].tileComps[comp].codeBlockH += 2;
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ if (i != 0) {
+ img.tiles[i].tileComps[comp].style =
+ img.tiles[0].tileComps[comp].style;
+ img.tiles[i].tileComps[comp].nDecompLevels =
+ img.tiles[0].tileComps[comp].nDecompLevels;
+ img.tiles[i].tileComps[comp].codeBlockW =
+ img.tiles[0].tileComps[comp].codeBlockW;
+ img.tiles[i].tileComps[comp].codeBlockH =
+ img.tiles[0].tileComps[comp].codeBlockH;
+ img.tiles[i].tileComps[comp].codeBlockStyle =
+ img.tiles[0].tileComps[comp].codeBlockStyle;
+ img.tiles[i].tileComps[comp].transform =
+ img.tiles[0].tileComps[comp].transform;
+ }
+ img.tiles[i].tileComps[comp].resLevels =
+ (JPXResLevel *)greallocn(
+ img.tiles[i].tileComps[comp].resLevels,
+ (img.tiles[i].tileComps[comp].nDecompLevels + 1),
+ sizeof(JPXResLevel));
+ for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
+ }
+ }
+ for (r = 0; r <= img.tiles[0].tileComps[comp].nDecompLevels; ++r) {
+ if (img.tiles[0].tileComps[comp].style & 0x01) {
+ if (!readUByte(&precinctSize)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[0].tileComps[comp].resLevels[r].precinctWidth =
+ precinctSize & 0x0f;
+ img.tiles[0].tileComps[comp].resLevels[r].precinctHeight =
+ (precinctSize >> 4) & 0x0f;
+ } else {
+ img.tiles[0].tileComps[comp].resLevels[r].precinctWidth = 15;
+ img.tiles[0].tileComps[comp].resLevels[r].precinctHeight = 15;
+ }
+ }
+ for (i = 1; i < img.nXTiles * img.nYTiles; ++i) {
+ for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ img.tiles[i].tileComps[comp].resLevels[r].precinctWidth =
+ img.tiles[0].tileComps[comp].resLevels[r].precinctWidth;
+ img.tiles[i].tileComps[comp].resLevels[r].precinctHeight =
+ img.tiles[0].tileComps[comp].resLevels[r].precinctHeight;
+ }
+ }
+ break;
+ case 0x5c: // QCD - quantization default
+ cover(23);
+ if (!readUByte(&img.tiles[0].tileComps[0].quantStyle)) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x00) {
+ img.tiles[0].tileComps[0].nQuantSteps = segLen - 3;
+ img.tiles[0].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps,
+ img.tiles[0].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) {
+ if (!readUByte(&img.tiles[0].tileComps[0].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x01) {
+ img.tiles[0].tileComps[0].nQuantSteps = 1;
+ img.tiles[0].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps,
+ img.tiles[0].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[0])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ } else if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x02) {
+ img.tiles[0].tileComps[0].nQuantSteps = (segLen - 3) / 2;
+ img.tiles[0].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps,
+ img.tiles[0].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) {
+ if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ for (comp = 0; comp < img.nComps; ++comp) {
+ if (!(i == 0 && comp == 0)) {
+ img.tiles[i].tileComps[comp].quantStyle =
+ img.tiles[0].tileComps[0].quantStyle;
+ img.tiles[i].tileComps[comp].nQuantSteps =
+ img.tiles[0].tileComps[0].nQuantSteps;
+ img.tiles[i].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[i].tileComps[comp].quantSteps,
+ img.tiles[0].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (j = 0; j < img.tiles[0].tileComps[0].nQuantSteps; ++j) {
+ img.tiles[i].tileComps[comp].quantSteps[j] =
+ img.tiles[0].tileComps[0].quantSteps[j];
+ }
+ }
+ }
+ }
+ haveQCD = gTrue;
+ break;
+ case 0x5d: // QCC - quantization component
+ cover(24);
+ if (!haveQCD) {
+ error(getPos(), "JPX QCC marker segment before QCD segment");
+ return gFalse;
+ }
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&img.tiles[0].tileComps[comp].quantStyle)) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x00) {
+ img.tiles[0].tileComps[comp].nQuantSteps =
+ segLen - (img.nComps > 256 ? 5 : 4);
+ img.tiles[0].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps,
+ img.tiles[0].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) {
+ if (!readUByte(&img.tiles[0].tileComps[comp].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ }
+ } else if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x01) {
+ img.tiles[0].tileComps[comp].nQuantSteps = 1;
+ img.tiles[0].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps,
+ img.tiles[0].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[0])) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ } else if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x02) {
+ img.tiles[0].tileComps[comp].nQuantSteps =
+ (segLen - (img.nComps > 256 ? 5 : 4)) / 2;
+ img.tiles[0].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps,
+ img.tiles[0].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) {
+ if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ for (i = 1; i < img.nXTiles * img.nYTiles; ++i) {
+ img.tiles[i].tileComps[comp].quantStyle =
+ img.tiles[0].tileComps[comp].quantStyle;
+ img.tiles[i].tileComps[comp].nQuantSteps =
+ img.tiles[0].tileComps[comp].nQuantSteps;
+ img.tiles[i].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[i].tileComps[comp].quantSteps,
+ img.tiles[0].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ for (j = 0; j < img.tiles[0].tileComps[comp].nQuantSteps; ++j) {
+ img.tiles[i].tileComps[comp].quantSteps[j] =
+ img.tiles[0].tileComps[comp].quantSteps[j];
+ }
+ }
+ break;
+ case 0x5e: // RGN - region of interest
+ cover(25);
+#if 1 //~ ROI is unimplemented
+ fprintf(stderr, "RGN\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPM marker segment");
+ return gFalse;
+ }
+ }
+#else
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&compInfo[comp].defROI.style) ||
+ !readUByte(&compInfo[comp].defROI.shift)) {
+ error(getPos(), "Error in JPX RGN marker segment");
+ return gFalse;
+ }
+#endif
+ break;
+ case 0x5f: // POC - progression order change
+ cover(26);
+#if 1 //~ progression order changes are unimplemented
+ fprintf(stderr, "POC\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPM marker segment");
+ return gFalse;
+ }
+ }
+#else
+ nProgs = (segLen - 2) / (img.nComps > 256 ? 9 : 7);
+ progs = (JPXProgOrder *)gmallocn(nProgs, sizeof(JPXProgOrder));
+ for (i = 0; i < nProgs; ++i) {
+ if (!readUByte(&progs[i].startRes) ||
+ !(img.nComps > 256 && readUWord(&progs[i].startComp)) ||
+ !(img.nComps <= 256 && readUByte(&progs[i].startComp)) ||
+ !readUWord(&progs[i].endLayer) ||
+ !readUByte(&progs[i].endRes) ||
+ !(img.nComps > 256 && readUWord(&progs[i].endComp)) ||
+ !(img.nComps <= 256 && readUByte(&progs[i].endComp)) ||
+ !readUByte(&progs[i].progOrder)) {
+ error(getPos(), "Error in JPX POC marker segment");
+ return gFalse;
+ }
+ }
+#endif
+ break;
+ case 0x60: // PPM - packed packet headers, main header
+ cover(27);
+#if 1 //~ packed packet headers are unimplemented
+ fprintf(stderr, "PPM\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPM marker segment");
+ return gFalse;
+ }
+ }
+#endif
+ break;
+ case 0x55: // TLM - tile-part lengths
+ // skipped
+ cover(28);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX TLM marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x57: // PLM - packet length, main header
+ // skipped
+ cover(29);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PLM marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x63: // CRG - component registration
+ // skipped
+ cover(30);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX CRG marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x64: // COM - comment
+ // skipped
+ cover(31);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX COM marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x90: // SOT - start of tile
+ cover(32);
+ haveSOT = gTrue;
+ break;
+ default:
+ cover(33);
+ error(getPos(), "Unknown marker segment %02x in JPX stream", segType);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ break;
+ }
+ }
+ break;
+ }
+ } while (!haveSOT);
+
+ if (!haveSIZ) {
+ error(getPos(), "Missing SIZ marker segment in JPX stream");
+ return gFalse;
+ }
+ if (!haveCOD) {
+ error(getPos(), "Missing COD marker segment in JPX stream");
+ return gFalse;
+ }
+ if (!haveQCD) {
+ error(getPos(), "Missing QCD marker segment in JPX stream");
+ return gFalse;
+ }
+
+ //----- read the tile-parts
+ while (1) {
+ if (!readTilePart()) {
+ return gFalse;
+ }
+ if (!readMarkerHdr(&segType, &segLen)) {
+ error(getPos(), "Error in JPX codestream");
+ return gFalse;
+ }
+ if (segType != 0x90) { // SOT - start of tile
+ break;
+ }
+ }
+
+ if (segType != 0xd9) { // EOC - end of codestream
+ error(getPos(), "Missing EOC marker in JPX codestream");
+ return gFalse;
+ }
+
+ //----- finish decoding the image
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ tile = &img.tiles[i];
+ for (comp = 0; comp < img.nComps; ++comp) {
+ tileComp = &tile->tileComps[comp];
+ inverseTransform(tileComp);
+ }
+ if (!inverseMultiCompAndDC(tile)) {
+ return gFalse;
+ }
+ }
+
+ //~ can free memory below tileComps here, and also tileComp.buf
+
+ return gTrue;
+}
+
+GBool JPXStream::readTilePart() {
+ JPXTile *tile;
+ JPXTileComp *tileComp;
+ JPXResLevel *resLevel;
+ JPXPrecinct *precinct;
+ JPXSubband *subband;
+ JPXCodeBlock *cb;
+ GBool haveSOD;
+ Guint tileIdx, tilePartLen, tilePartIdx, nTileParts;
+ GBool tilePartToEOC;
+ Guint precinctSize, style;
+ Guint n, nSBs, nx, ny, sbx0, sby0, comp, segLen;
+ Guint i, j, k, cbX, cbY, r, pre, sb, cbi;
+ int segType, level;
+
+ // process the SOT marker segment
+ if (!readUWord(&tileIdx) ||
+ !readULong(&tilePartLen) ||
+ !readUByte(&tilePartIdx) ||
+ !readUByte(&nTileParts)) {
+ error(getPos(), "Error in JPX SOT marker segment");
+ return gFalse;
+ }
+
+ if (tileIdx >= img.nXTiles * img.nYTiles) {
+ error(getPos(), "Weird tile index in JPX stream");
+ return gFalse;
+ }
+
+ tilePartToEOC = tilePartLen == 0;
+ tilePartLen -= 12; // subtract size of SOT segment
+
+ haveSOD = gFalse;
+ do {
+ if (!readMarkerHdr(&segType, &segLen)) {
+ error(getPos(), "Error in JPX tile-part codestream");
+ return gFalse;
+ }
+ tilePartLen -= 2 + segLen;
+ switch (segType) {
+ case 0x52: // COD - coding style default
+ cover(34);
+ if (!readUByte(&img.tiles[tileIdx].tileComps[0].style) ||
+ !readUByte(&img.tiles[tileIdx].progOrder) ||
+ !readUWord(&img.tiles[tileIdx].nLayers) ||
+ !readUByte(&img.tiles[tileIdx].multiComp) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[0].nDecompLevels) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockW) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockH) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockStyle) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[0].transform)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[tileIdx].tileComps[0].codeBlockW += 2;
+ img.tiles[tileIdx].tileComps[0].codeBlockH += 2;
+ for (comp = 0; comp < img.nComps; ++comp) {
+ if (comp != 0) {
+ img.tiles[tileIdx].tileComps[comp].style =
+ img.tiles[tileIdx].tileComps[0].style;
+ img.tiles[tileIdx].tileComps[comp].nDecompLevels =
+ img.tiles[tileIdx].tileComps[0].nDecompLevels;
+ img.tiles[tileIdx].tileComps[comp].codeBlockW =
+ img.tiles[tileIdx].tileComps[0].codeBlockW;
+ img.tiles[tileIdx].tileComps[comp].codeBlockH =
+ img.tiles[tileIdx].tileComps[0].codeBlockH;
+ img.tiles[tileIdx].tileComps[comp].codeBlockStyle =
+ img.tiles[tileIdx].tileComps[0].codeBlockStyle;
+ img.tiles[tileIdx].tileComps[comp].transform =
+ img.tiles[tileIdx].tileComps[0].transform;
+ }
+ img.tiles[tileIdx].tileComps[comp].resLevels =
+ (JPXResLevel *)greallocn(
+ img.tiles[tileIdx].tileComps[comp].resLevels,
+ (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1),
+ sizeof(JPXResLevel));
+ for (r = 0;
+ r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels;
+ ++r) {
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
+ }
+ }
+ for (r = 0; r <= img.tiles[tileIdx].tileComps[0].nDecompLevels; ++r) {
+ if (img.tiles[tileIdx].tileComps[0].style & 0x01) {
+ if (!readUByte(&precinctSize)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth =
+ precinctSize & 0x0f;
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight =
+ (precinctSize >> 4) & 0x0f;
+ } else {
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth = 15;
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight = 15;
+ }
+ }
+ for (comp = 1; comp < img.nComps; ++comp) {
+ for (r = 0;
+ r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels;
+ ++r) {
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth =
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth;
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight =
+ img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight;
+ }
+ }
+ break;
+ case 0x53: // COC - coding style component
+ cover(35);
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&style) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].nDecompLevels) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockW) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockH) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockStyle) ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].transform)) {
+ error(getPos(), "Error in JPX COC marker segment");
+ return gFalse;
+ }
+ img.tiles[tileIdx].tileComps[comp].style =
+ (img.tiles[tileIdx].tileComps[comp].style & ~1) | (style & 1);
+ img.tiles[tileIdx].tileComps[comp].codeBlockW += 2;
+ img.tiles[tileIdx].tileComps[comp].codeBlockH += 2;
+ img.tiles[tileIdx].tileComps[comp].resLevels =
+ (JPXResLevel *)greallocn(
+ img.tiles[tileIdx].tileComps[comp].resLevels,
+ (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1),
+ sizeof(JPXResLevel));
+ for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
+ }
+ for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
+ if (img.tiles[tileIdx].tileComps[comp].style & 0x01) {
+ if (!readUByte(&precinctSize)) {
+ error(getPos(), "Error in JPX COD marker segment");
+ return gFalse;
+ }
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth =
+ precinctSize & 0x0f;
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight =
+ (precinctSize >> 4) & 0x0f;
+ } else {
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth = 15;
+ img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight = 15;
+ }
+ }
+ break;
+ case 0x5c: // QCD - quantization default
+ cover(36);
+ if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantStyle)) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x00) {
+ img.tiles[tileIdx].tileComps[0].nQuantSteps =
+ segLen - 3;
+ img.tiles[tileIdx].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps,
+ img.tiles[tileIdx].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) {
+ if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x01) {
+ img.tiles[tileIdx].tileComps[0].nQuantSteps = 1;
+ img.tiles[tileIdx].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps,
+ img.tiles[tileIdx].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[0])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ } else if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x02) {
+ img.tiles[tileIdx].tileComps[0].nQuantSteps = (segLen - 3) / 2;
+ img.tiles[tileIdx].tileComps[0].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps,
+ img.tiles[tileIdx].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) {
+ if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ for (comp = 1; comp < img.nComps; ++comp) {
+ img.tiles[tileIdx].tileComps[comp].quantStyle =
+ img.tiles[tileIdx].tileComps[0].quantStyle;
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps =
+ img.tiles[tileIdx].tileComps[0].nQuantSteps;
+ img.tiles[tileIdx].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps,
+ img.tiles[tileIdx].tileComps[0].nQuantSteps,
+ sizeof(Guint));
+ for (j = 0; j < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++j) {
+ img.tiles[tileIdx].tileComps[comp].quantSteps[j] =
+ img.tiles[tileIdx].tileComps[0].quantSteps[j];
+ }
+ }
+ break;
+ case 0x5d: // QCC - quantization component
+ cover(37);
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&img.tiles[tileIdx].tileComps[comp].quantStyle)) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) == 0x00) {
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps =
+ segLen - (img.nComps > 256 ? 5 : 4);
+ img.tiles[tileIdx].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps,
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) {
+ if (!readUByte(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ }
+ } else if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f)
+ == 0x01) {
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps = 1;
+ img.tiles[tileIdx].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps,
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[0])) {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ } else if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f)
+ == 0x02) {
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps =
+ (segLen - (img.nComps > 256 ? 5 : 4)) / 2;
+ img.tiles[tileIdx].tileComps[comp].quantSteps =
+ (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps,
+ img.tiles[tileIdx].tileComps[comp].nQuantSteps,
+ sizeof(Guint));
+ for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) {
+ if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) {
+ error(getPos(), "Error in JPX QCD marker segment");
+ return gFalse;
+ }
+ }
+ } else {
+ error(getPos(), "Error in JPX QCC marker segment");
+ return gFalse;
+ }
+ break;
+ case 0x5e: // RGN - region of interest
+ cover(38);
+#if 1 //~ ROI is unimplemented
+ fprintf(stderr, "RGN\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPM marker segment");
+ return gFalse;
+ }
+ }
+#else
+ if ((img.nComps > 256 && !readUWord(&comp)) ||
+ (img.nComps <= 256 && !readUByte(&comp)) ||
+ comp >= img.nComps ||
+ !readUByte(&compInfo[comp].roi.style) ||
+ !readUByte(&compInfo[comp].roi.shift)) {
+ error(getPos(), "Error in JPX RGN marker segment");
+ return gFalse;
+ }
+#endif
+ break;
+ case 0x5f: // POC - progression order change
+ cover(39);
+#if 1 //~ progression order changes are unimplemented
+ fprintf(stderr, "POC\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPM marker segment");
+ return gFalse;
+ }
+ }
+#else
+ nTileProgs = (segLen - 2) / (img.nComps > 256 ? 9 : 7);
+ tileProgs = (JPXProgOrder *)gmallocn(nTileProgs, sizeof(JPXProgOrder));
+ for (i = 0; i < nTileProgs; ++i) {
+ if (!readUByte(&tileProgs[i].startRes) ||
+ !(img.nComps > 256 && readUWord(&tileProgs[i].startComp)) ||
+ !(img.nComps <= 256 && readUByte(&tileProgs[i].startComp)) ||
+ !readUWord(&tileProgs[i].endLayer) ||
+ !readUByte(&tileProgs[i].endRes) ||
+ !(img.nComps > 256 && readUWord(&tileProgs[i].endComp)) ||
+ !(img.nComps <= 256 && readUByte(&tileProgs[i].endComp)) ||
+ !readUByte(&tileProgs[i].progOrder)) {
+ error(getPos(), "Error in JPX POC marker segment");
+ return gFalse;
+ }
+ }
+#endif
+ break;
+ case 0x61: // PPT - packed packet headers, tile-part hdr
+ cover(40);
+#if 1 //~ packed packet headers are unimplemented
+ fprintf(stderr, "PPT\n");
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PPT marker segment");
+ return gFalse;
+ }
+ }
+#endif
+ case 0x58: // PLT - packet length, tile-part header
+ // skipped
+ cover(41);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX PLT marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x64: // COM - comment
+ // skipped
+ cover(42);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Error in JPX COM marker segment");
+ return gFalse;
+ }
+ }
+ break;
+ case 0x93: // SOD - start of data
+ cover(43);
+ haveSOD = gTrue;
+ break;
+ default:
+ cover(44);
+ error(getPos(), "Unknown marker segment %02x in JPX tile-part stream",
+ segType);
+ for (i = 0; i < segLen - 2; ++i) {
+ if (str->getChar() == EOF) {
+ break;
+ }
+ }
+ break;
+ }
+ } while (!haveSOD);
+
+ //----- initialize the tile, precincts, and code-blocks
+ if (tilePartIdx == 0) {
+ tile = &img.tiles[tileIdx];
+ i = tileIdx / img.nXTiles;
+ j = tileIdx % img.nXTiles;
+ if ((tile->x0 = img.xTileOffset + j * img.xTileSize) < img.xOffset) {
+ tile->x0 = img.xOffset;
+ }
+ if ((tile->y0 = img.yTileOffset + i * img.yTileSize) < img.yOffset) {
+ tile->y0 = img.yOffset;
+ }
+ if ((tile->x1 = img.xTileOffset + (j + 1) * img.xTileSize) > img.xSize) {
+ tile->x1 = img.xSize;
+ }
+ if ((tile->y1 = img.yTileOffset + (i + 1) * img.yTileSize) > img.ySize) {
+ tile->y1 = img.ySize;
+ }
+ tile->comp = 0;
+ tile->res = 0;
+ tile->precinct = 0;
+ tile->layer = 0;
+ tile->maxNDecompLevels = 0;
+ for (comp = 0; comp < img.nComps; ++comp) {
+ tileComp = &tile->tileComps[comp];
+ if (tileComp->nDecompLevels > tile->maxNDecompLevels) {
+ tile->maxNDecompLevels = tileComp->nDecompLevels;
+ }
+ tileComp->x0 = jpxCeilDiv(tile->x0, tileComp->hSep);
+ tileComp->y0 = jpxCeilDiv(tile->y0, tileComp->hSep);
+ tileComp->x1 = jpxCeilDiv(tile->x1, tileComp->hSep);
+ tileComp->y1 = jpxCeilDiv(tile->y1, tileComp->hSep);
+ tileComp->cbW = 1 << tileComp->codeBlockW;
+ tileComp->cbH = 1 << tileComp->codeBlockH;
+ tileComp->data = (int *)gmallocn((tileComp->x1 - tileComp->x0) *
+ (tileComp->y1 - tileComp->y0),
+ sizeof(int));
+ if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) {
+ n = tileComp->x1 - tileComp->x0;
+ } else {
+ n = tileComp->y1 - tileComp->y0;
+ }
+ tileComp->buf = (int *)gmallocn(n + 8, sizeof(int));
+ for (r = 0; r <= tileComp->nDecompLevels; ++r) {
+ resLevel = &tileComp->resLevels[r];
+ k = r == 0 ? tileComp->nDecompLevels
+ : tileComp->nDecompLevels - r + 1;
+ resLevel->x0 = jpxCeilDivPow2(tileComp->x0, k);
+ resLevel->y0 = jpxCeilDivPow2(tileComp->y0, k);
+ resLevel->x1 = jpxCeilDivPow2(tileComp->x1, k);
+ resLevel->y1 = jpxCeilDivPow2(tileComp->y1, k);
+ if (r == 0) {
+ resLevel->bx0[0] = resLevel->x0;
+ resLevel->by0[0] = resLevel->y0;
+ resLevel->bx1[0] = resLevel->x1;
+ resLevel->by1[0] = resLevel->y1;
+ } else {
+ resLevel->bx0[0] = jpxCeilDivPow2(tileComp->x0 - (1 << (k-1)), k);
+ resLevel->by0[0] = resLevel->y0;
+ resLevel->bx1[0] = jpxCeilDivPow2(tileComp->x1 - (1 << (k-1)), k);
+ resLevel->by1[0] = resLevel->y1;
+ resLevel->bx0[1] = resLevel->x0;
+ resLevel->by0[1] = jpxCeilDivPow2(tileComp->y0 - (1 << (k-1)), k);
+ resLevel->bx1[1] = resLevel->x1;
+ resLevel->by1[1] = jpxCeilDivPow2(tileComp->y1 - (1 << (k-1)), k);
+ resLevel->bx0[2] = jpxCeilDivPow2(tileComp->x0 - (1 << (k-1)), k);
+ resLevel->by0[2] = jpxCeilDivPow2(tileComp->y0 - (1 << (k-1)), k);
+ resLevel->bx1[2] = jpxCeilDivPow2(tileComp->x1 - (1 << (k-1)), k);
+ resLevel->by1[2] = jpxCeilDivPow2(tileComp->y1 - (1 << (k-1)), k);
+ }
+ resLevel->precincts = (JPXPrecinct *)gmallocn(1, sizeof(JPXPrecinct));
+ for (pre = 0; pre < 1; ++pre) {
+ precinct = &resLevel->precincts[pre];
+ precinct->x0 = resLevel->x0;
+ precinct->y0 = resLevel->y0;
+ precinct->x1 = resLevel->x1;
+ precinct->y1 = resLevel->y1;
+ nSBs = r == 0 ? 1 : 3;
+ precinct->subbands =
+ (JPXSubband *)gmallocn(nSBs, sizeof(JPXSubband));
+ for (sb = 0; sb < nSBs; ++sb) {
+ subband = &precinct->subbands[sb];
+ subband->x0 = resLevel->bx0[sb];
+ subband->y0 = resLevel->by0[sb];
+ subband->x1 = resLevel->bx1[sb];
+ subband->y1 = resLevel->by1[sb];
+ subband->nXCBs = jpxCeilDivPow2(subband->x1,
+ tileComp->codeBlockW)
+ - jpxFloorDivPow2(subband->x0,
+ tileComp->codeBlockW);
+ subband->nYCBs = jpxCeilDivPow2(subband->y1,
+ tileComp->codeBlockH)
+ - jpxFloorDivPow2(subband->y0,
+ tileComp->codeBlockH);
+ n = subband->nXCBs > subband->nYCBs ? subband->nXCBs
+ : subband->nYCBs;
+ for (subband->maxTTLevel = 0, --n;
+ n;
+ ++subband->maxTTLevel, n >>= 1) ;
+ n = 0;
+ for (level = subband->maxTTLevel; level >= 0; --level) {
+ nx = jpxCeilDivPow2(subband->nXCBs, level);
+ ny = jpxCeilDivPow2(subband->nYCBs, level);
+ n += nx * ny;
+ }
+ subband->inclusion =
+ (JPXTagTreeNode *)gmallocn(n, sizeof(JPXTagTreeNode));
+ subband->zeroBitPlane =
+ (JPXTagTreeNode *)gmallocn(n, sizeof(JPXTagTreeNode));
+ for (k = 0; k < n; ++k) {
+ subband->inclusion[k].finished = gFalse;
+ subband->inclusion[k].val = 0;
+ subband->zeroBitPlane[k].finished = gFalse;
+ subband->zeroBitPlane[k].val = 0;
+ }
+ subband->cbs = (JPXCodeBlock *)gmallocn(subband->nXCBs *
+ subband->nYCBs,
+ sizeof(JPXCodeBlock));
+ sbx0 = jpxFloorDivPow2(subband->x0, tileComp->codeBlockW);
+ sby0 = jpxFloorDivPow2(subband->y0, tileComp->codeBlockH);
+ cb = subband->cbs;
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ cb->x0 = (sbx0 + cbX) << tileComp->codeBlockW;
+ cb->x1 = cb->x0 + tileComp->cbW;
+ if (subband->x0 > cb->x0) {
+ cb->x0 = subband->x0;
+ }
+ if (subband->x1 < cb->x1) {
+ cb->x1 = subband->x1;
+ }
+ cb->y0 = (sby0 + cbY) << tileComp->codeBlockH;
+ cb->y1 = cb->y0 + tileComp->cbH;
+ if (subband->y0 > cb->y0) {
+ cb->y0 = subband->y0;
+ }
+ if (subband->y1 < cb->y1) {
+ cb->y1 = subband->y1;
+ }
+ cb->seen = gFalse;
+ cb->lBlock = 3;
+ cb->nextPass = jpxPassCleanup;
+ cb->nZeroBitPlanes = 0;
+ cb->coeffs =
+ (JPXCoeff *)gmallocn((1 << (tileComp->codeBlockW
+ + tileComp->codeBlockH)),
+ sizeof(JPXCoeff));
+ for (cbi = 0;
+ cbi < (Guint)(1 << (tileComp->codeBlockW
+ + tileComp->codeBlockH));
+ ++cbi) {
+ cb->coeffs[cbi].flags = 0;
+ cb->coeffs[cbi].len = 0;
+ cb->coeffs[cbi].mag = 0;
+ }
+ cb->arithDecoder = NULL;
+ cb->stats = NULL;
+ ++cb;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return readTilePartData(tileIdx, tilePartLen, tilePartToEOC);
+}
+
+GBool JPXStream::readTilePartData(Guint tileIdx,
+ Guint tilePartLen, GBool tilePartToEOC) {
+ JPXTile *tile;
+ JPXTileComp *tileComp;
+ JPXResLevel *resLevel;
+ JPXPrecinct *precinct;
+ JPXSubband *subband;
+ JPXCodeBlock *cb;
+ Guint ttVal;
+ Guint bits, cbX, cbY, nx, ny, i, j, n, sb;
+ int level;
+
+ tile = &img.tiles[tileIdx];
+
+ // read all packets from this tile-part
+ while (1) {
+ if (tilePartToEOC) {
+ //~ peek for an EOC marker
+ cover(93);
+ } else if (tilePartLen == 0) {
+ break;
+ }
+
+ tileComp = &tile->tileComps[tile->comp];
+ resLevel = &tileComp->resLevels[tile->res];
+ precinct = &resLevel->precincts[tile->precinct];
+
+ //----- packet header
+
+ // setup
+ startBitBuf(tilePartLen);
+
+ // zero-length flag
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (!bits) {
+ // packet is empty -- clear all code-block inclusion flags
+ cover(45);
+ for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) {
+ subband = &precinct->subbands[sb];
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ cb = &subband->cbs[cbY * subband->nXCBs + cbX];
+ cb->included = gFalse;
+ }
+ }
+ }
+ } else {
+
+ for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) {
+ subband = &precinct->subbands[sb];
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ cb = &subband->cbs[cbY * subband->nXCBs + cbX];
+
+ // skip code-blocks with no coefficients
+ if (cb->x0 >= cb->x1 || cb->y0 >= cb->y1) {
+ cover(46);
+ cb->included = gFalse;
+ continue;
+ }
+
+ // code-block inclusion
+ if (cb->seen) {
+ cover(47);
+ if (!readBits(1, &cb->included)) {
+ goto err;
+ }
+ } else {
+ cover(48);
+ ttVal = 0;
+ i = 0;
+ for (level = subband->maxTTLevel; level >= 0; --level) {
+ nx = jpxCeilDivPow2(subband->nXCBs, level);
+ ny = jpxCeilDivPow2(subband->nYCBs, level);
+ j = i + (cbY >> level) * nx + (cbX >> level);
+ if (!subband->inclusion[j].finished &&
+ !subband->inclusion[j].val) {
+ subband->inclusion[j].val = ttVal;
+ } else {
+ ttVal = subband->inclusion[j].val;
+ }
+ while (!subband->inclusion[j].finished &&
+ ttVal <= tile->layer) {
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (bits == 1) {
+ subband->inclusion[j].finished = gTrue;
+ } else {
+ ++ttVal;
+ }
+ }
+ subband->inclusion[j].val = ttVal;
+ if (ttVal > tile->layer) {
+ break;
+ }
+ i += nx * ny;
+ }
+ cb->included = level < 0;
+ }
+
+ if (cb->included) {
+ cover(49);
+
+ // zero bit-plane count
+ if (!cb->seen) {
+ cover(50);
+ ttVal = 0;
+ i = 0;
+ for (level = subband->maxTTLevel; level >= 0; --level) {
+ nx = jpxCeilDivPow2(subband->nXCBs, level);
+ ny = jpxCeilDivPow2(subband->nYCBs, level);
+ j = i + (cbY >> level) * nx + (cbX >> level);
+ if (!subband->zeroBitPlane[j].finished &&
+ !subband->zeroBitPlane[j].val) {
+ subband->zeroBitPlane[j].val = ttVal;
+ } else {
+ ttVal = subband->zeroBitPlane[j].val;
+ }
+ while (!subband->zeroBitPlane[j].finished) {
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (bits == 1) {
+ subband->zeroBitPlane[j].finished = gTrue;
+ } else {
+ ++ttVal;
+ }
+ }
+ subband->zeroBitPlane[j].val = ttVal;
+ i += nx * ny;
+ }
+ cb->nZeroBitPlanes = ttVal;
+ }
+
+ // number of coding passes
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (bits == 0) {
+ cover(51);
+ cb->nCodingPasses = 1;
+ } else {
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (bits == 0) {
+ cover(52);
+ cb->nCodingPasses = 2;
+ } else {
+ cover(53);
+ if (!readBits(2, &bits)) {
+ goto err;
+ }
+ if (bits < 3) {
+ cover(54);
+ cb->nCodingPasses = 3 + bits;
+ } else {
+ cover(55);
+ if (!readBits(5, &bits)) {
+ goto err;
+ }
+ if (bits < 31) {
+ cover(56);
+ cb->nCodingPasses = 6 + bits;
+ } else {
+ cover(57);
+ if (!readBits(7, &bits)) {
+ goto err;
+ }
+ cb->nCodingPasses = 37 + bits;
+ }
+ }
+ }
+ }
+
+ // update Lblock
+ while (1) {
+ if (!readBits(1, &bits)) {
+ goto err;
+ }
+ if (!bits) {
+ break;
+ }
+ ++cb->lBlock;
+ }
+
+ // length of compressed data
+ //~ deal with multiple codeword segments
+ for (n = cb->lBlock, i = cb->nCodingPasses >> 1;
+ i;
+ ++n, i >>= 1) ;
+ if (!readBits(n, &cb->dataLen)) {
+ goto err;
+ }
+ }
+ }
+ }
+ }
+ }
+ tilePartLen = finishBitBuf();
+
+ //----- packet data
+
+ for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) {
+ subband = &precinct->subbands[sb];
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ cb = &subband->cbs[cbY * subband->nXCBs + cbX];
+ if (cb->included) {
+ if (!readCodeBlockData(tileComp, resLevel, precinct, subband,
+ tile->res, sb, cb)) {
+ return gFalse;
+ }
+ tilePartLen -= cb->dataLen;
+ cb->seen = gTrue;
+ }
+ }
+ }
+ }
+
+ //----- next packet
+
+ switch (tile->progOrder) {
+ case 0: // layer, resolution level, component, precinct
+ cover(58);
+ if (++tile->comp == img.nComps) {
+ tile->comp = 0;
+ if (++tile->res == tile->maxNDecompLevels + 1) {
+ tile->res = 0;
+ if (++tile->layer == tile->nLayers) {
+ tile->layer = 0;
+ }
+ }
+ }
+ break;
+ case 1: // resolution level, layer, component, precinct
+ cover(59);
+ if (++tile->comp == img.nComps) {
+ tile->comp = 0;
+ if (++tile->layer == tile->nLayers) {
+ tile->layer = 0;
+ if (++tile->res == tile->maxNDecompLevels + 1) {
+ tile->res = 0;
+ }
+ }
+ }
+ break;
+ case 2: // resolution level, precinct, component, layer
+ //~ this isn't correct -- see B.12.1.3
+ cover(60);
+ if (++tile->layer == tile->nLayers) {
+ tile->layer = 0;
+ if (++tile->comp == img.nComps) {
+ tile->comp = 0;
+ if (++tile->res == tile->maxNDecompLevels + 1) {
+ tile->res = 0;
+ }
+ }
+ }
+ break;
+ case 3: // precinct, component, resolution level, layer
+ //~ this isn't correct -- see B.12.1.4
+ cover(61);
+ if (++tile->layer == tile->nLayers) {
+ tile->layer = 0;
+ if (++tile->res == tile->maxNDecompLevels + 1) {
+ tile->res = 0;
+ if (++tile->comp == img.nComps) {
+ tile->comp = 0;
+ }
+ }
+ }
+ break;
+ case 4: // component, precinct, resolution level, layer
+ //~ this isn't correct -- see B.12.1.5
+ cover(62);
+ if (++tile->layer == tile->nLayers) {
+ tile->layer = 0;
+ if (++tile->res == tile->maxNDecompLevels + 1) {
+ tile->res = 0;
+ if (++tile->comp == img.nComps) {
+ tile->comp = 0;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ return gTrue;
+
+ err:
+ error(getPos(), "Error in JPX stream");
+ return gFalse;
+}
+
+GBool JPXStream::readCodeBlockData(JPXTileComp *tileComp,
+ JPXResLevel *resLevel,
+ JPXPrecinct *precinct,
+ JPXSubband *subband,
+ Guint res, Guint sb,
+ JPXCodeBlock *cb) {
+ JPXCoeff *coeff0, *coeff1, *coeff;
+ Guint horiz, vert, diag, all, cx, xorBit;
+ int horizSign, vertSign;
+ Guint i, x, y0, y1, y2;
+
+ if (cb->arithDecoder) {
+ cover(63);
+ cb->arithDecoder->restart(cb->dataLen);
+ } else {
+ cover(64);
+ cb->arithDecoder = new JArithmeticDecoder();
+ cb->arithDecoder->setStream(str, cb->dataLen);
+ cb->arithDecoder->start();
+ cb->stats = new JArithmeticDecoderStats(jpxNContexts);
+ cb->stats->setEntry(jpxContextSigProp, 4, 0);
+ cb->stats->setEntry(jpxContextRunLength, 3, 0);
+ cb->stats->setEntry(jpxContextUniform, 46, 0);
+ }
+
+ for (i = 0; i < cb->nCodingPasses; ++i) {
+ switch (cb->nextPass) {
+
+ //----- significance propagation pass
+ case jpxPassSigProp:
+ cover(65);
+ for (y0 = cb->y0, coeff0 = cb->coeffs;
+ y0 < cb->y1;
+ y0 += 4, coeff0 += 4 << tileComp->codeBlockW) {
+ for (x = cb->x0, coeff1 = coeff0;
+ x < cb->x1;
+ ++x, ++coeff1) {
+ for (y1 = 0, coeff = coeff1;
+ y1 < 4 && y0+y1 < cb->y1;
+ ++y1, coeff += tileComp->cbW) {
+ if (!(coeff->flags & jpxCoeffSignificant)) {
+ horiz = vert = diag = 0;
+ horizSign = vertSign = 2;
+ if (x > cb->x0) {
+ if (coeff[-1].flags & jpxCoeffSignificant) {
+ ++horiz;
+ horizSign += (coeff[-1].flags & jpxCoeffSign) ? -1 : 1;
+ }
+ if (y0+y1 > cb->y0) {
+ diag += (coeff[-(int)tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ diag += (coeff[tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (x < cb->x1 - 1) {
+ if (coeff[1].flags & jpxCoeffSignificant) {
+ ++horiz;
+ horizSign += (coeff[1].flags & jpxCoeffSign) ? -1 : 1;
+ }
+ if (y0+y1 > cb->y0) {
+ diag += (coeff[-(int)tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ diag += (coeff[tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (y0+y1 > cb->y0) {
+ if (coeff[-(int)tileComp->cbW].flags & jpxCoeffSignificant) {
+ ++vert;
+ vertSign += (coeff[-(int)tileComp->cbW].flags & jpxCoeffSign)
+ ? -1 : 1;
+ }
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ if (coeff[tileComp->cbW].flags & jpxCoeffSignificant) {
+ ++vert;
+ vertSign += (coeff[tileComp->cbW].flags & jpxCoeffSign)
+ ? -1 : 1;
+ }
+ }
+ cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb];
+ if (cx != 0) {
+ if (cb->arithDecoder->decodeBit(cx, cb->stats)) {
+ coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef;
+ coeff->mag = (coeff->mag << 1) | 1;
+ cx = signContext[horizSign][vertSign][0];
+ xorBit = signContext[horizSign][vertSign][1];
+ if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) {
+ coeff->flags |= jpxCoeffSign;
+ }
+ }
+ ++coeff->len;
+ coeff->flags |= jpxCoeffTouched;
+ }
+ }
+ }
+ }
+ }
+ ++cb->nextPass;
+ break;
+
+ //----- magnitude refinement pass
+ case jpxPassMagRef:
+ cover(66);
+ for (y0 = cb->y0, coeff0 = cb->coeffs;
+ y0 < cb->y1;
+ y0 += 4, coeff0 += 4 << tileComp->codeBlockW) {
+ for (x = cb->x0, coeff1 = coeff0;
+ x < cb->x1;
+ ++x, ++coeff1) {
+ for (y1 = 0, coeff = coeff1;
+ y1 < 4 && y0+y1 < cb->y1;
+ ++y1, coeff += tileComp->cbW) {
+ if ((coeff->flags & jpxCoeffSignificant) &&
+ !(coeff->flags & jpxCoeffTouched)) {
+ if (coeff->flags & jpxCoeffFirstMagRef) {
+ all = 0;
+ if (x > cb->x0) {
+ all += (coeff[-1].flags >> jpxCoeffSignificantB) & 1;
+ if (y0+y1 > cb->y0) {
+ all += (coeff[-(int)tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ all += (coeff[tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (x < cb->x1 - 1) {
+ all += (coeff[1].flags >> jpxCoeffSignificantB) & 1;
+ if (y0+y1 > cb->y0) {
+ all += (coeff[-(int)tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ all += (coeff[tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (y0+y1 > cb->y0) {
+ all += (coeff[-(int)tileComp->cbW].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ all += (coeff[tileComp->cbW].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ cx = all ? 15 : 14;
+ } else {
+ cx = 16;
+ }
+ coeff->mag = (coeff->mag << 1) |
+ cb->arithDecoder->decodeBit(cx, cb->stats);
+ ++coeff->len;
+ coeff->flags |= jpxCoeffTouched;
+ coeff->flags &= ~jpxCoeffFirstMagRef;
+ }
+ }
+ }
+ }
+ ++cb->nextPass;
+ break;
+
+ //----- cleanup pass
+ case jpxPassCleanup:
+ cover(67);
+ for (y0 = cb->y0, coeff0 = cb->coeffs;
+ y0 < cb->y1;
+ y0 += 4, coeff0 += 4 << tileComp->codeBlockW) {
+ for (x = cb->x0, coeff1 = coeff0;
+ x < cb->x1;
+ ++x, ++coeff1) {
+ y1 = 0;
+ if (y0 + 3 < cb->y1 &&
+ !(coeff1->flags & jpxCoeffTouched) &&
+ !(coeff1[tileComp->cbW].flags & jpxCoeffTouched) &&
+ !(coeff1[2 * tileComp->cbW].flags & jpxCoeffTouched) &&
+ !(coeff1[3 * tileComp->cbW].flags & jpxCoeffTouched) &&
+ (x == cb->x0 || y0 == cb->y0 ||
+ !(coeff1[-(int)tileComp->cbW - 1].flags
+ & jpxCoeffSignificant)) &&
+ (y0 == cb->y0 ||
+ !(coeff1[-(int)tileComp->cbW].flags
+ & jpxCoeffSignificant)) &&
+ (x == cb->x1 - 1 || y0 == cb->y0 ||
+ !(coeff1[-(int)tileComp->cbW + 1].flags
+ & jpxCoeffSignificant)) &&
+ (x == cb->x0 ||
+ (!(coeff1[-1].flags & jpxCoeffSignificant) &&
+ !(coeff1[tileComp->cbW - 1].flags
+ & jpxCoeffSignificant) &&
+ !(coeff1[2 * tileComp->cbW - 1].flags
+ & jpxCoeffSignificant) &&
+ !(coeff1[3 * tileComp->cbW - 1].flags
+ & jpxCoeffSignificant))) &&
+ (x == cb->x1 - 1 ||
+ (!(coeff1[1].flags & jpxCoeffSignificant) &&
+ !(coeff1[tileComp->cbW + 1].flags
+ & jpxCoeffSignificant) &&
+ !(coeff1[2 * tileComp->cbW + 1].flags
+ & jpxCoeffSignificant) &&
+ !(coeff1[3 * tileComp->cbW + 1].flags
+ & jpxCoeffSignificant))) &&
+ (x == cb->x0 || y0+4 == cb->y1 ||
+ !(coeff1[4 * tileComp->cbW - 1].flags & jpxCoeffSignificant)) &&
+ (y0+4 == cb->y1 ||
+ !(coeff1[4 * tileComp->cbW].flags & jpxCoeffSignificant)) &&
+ (x == cb->x1 - 1 || y0+4 == cb->y1 ||
+ !(coeff1[4 * tileComp->cbW + 1].flags
+ & jpxCoeffSignificant))) {
+ if (cb->arithDecoder->decodeBit(jpxContextRunLength, cb->stats)) {
+ y1 = cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats);
+ y1 = (y1 << 1) |
+ cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats);
+ for (y2 = 0, coeff = coeff1;
+ y2 < y1;
+ ++y2, coeff += tileComp->cbW) {
+ ++coeff->len;
+ }
+ coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef;
+ coeff->mag = (coeff->mag << 1) | 1;
+ ++coeff->len;
+ cx = signContext[2][2][0];
+ xorBit = signContext[2][2][1];
+ if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) {
+ coeff->flags |= jpxCoeffSign;
+ }
+ ++y1;
+ } else {
+ for (y1 = 0, coeff = coeff1;
+ y1 < 4;
+ ++y1, coeff += tileComp->cbW) {
+ ++coeff->len;
+ }
+ y1 = 4;
+ }
+ }
+ for (coeff = &coeff1[y1 << tileComp->codeBlockW];
+ y1 < 4 && y0 + y1 < cb->y1;
+ ++y1, coeff += tileComp->cbW) {
+ if (!(coeff->flags & jpxCoeffTouched)) {
+ horiz = vert = diag = 0;
+ horizSign = vertSign = 2;
+ if (x > cb->x0) {
+ if (coeff[-1].flags & jpxCoeffSignificant) {
+ ++horiz;
+ horizSign += (coeff[-1].flags & jpxCoeffSign) ? -1 : 1;
+ }
+ if (y0+y1 > cb->y0) {
+ diag += (coeff[-(int)tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ diag += (coeff[tileComp->cbW - 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (x < cb->x1 - 1) {
+ if (coeff[1].flags & jpxCoeffSignificant) {
+ ++horiz;
+ horizSign += (coeff[1].flags & jpxCoeffSign) ? -1 : 1;
+ }
+ if (y0+y1 > cb->y0) {
+ diag += (coeff[-(int)tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ diag += (coeff[tileComp->cbW + 1].flags
+ >> jpxCoeffSignificantB) & 1;
+ }
+ }
+ if (y0+y1 > cb->y0) {
+ if (coeff[-(int)tileComp->cbW].flags & jpxCoeffSignificant) {
+ ++vert;
+ vertSign += (coeff[-(int)tileComp->cbW].flags & jpxCoeffSign)
+ ? -1 : 1;
+ }
+ }
+ if (y0+y1 < cb->y1 - 1) {
+ if (coeff[tileComp->cbW].flags & jpxCoeffSignificant) {
+ ++vert;
+ vertSign += (coeff[tileComp->cbW].flags & jpxCoeffSign)
+ ? -1 : 1;
+ }
+ }
+ cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb];
+ if (cb->arithDecoder->decodeBit(cx, cb->stats)) {
+ coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef;
+ coeff->mag = (coeff->mag << 1) | 1;
+ cx = signContext[horizSign][vertSign][0];
+ xorBit = signContext[horizSign][vertSign][1];
+ if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) {
+ coeff->flags |= jpxCoeffSign;
+ }
+ }
+ ++coeff->len;
+ } else {
+ coeff->flags &= ~jpxCoeffTouched;
+ }
+ }
+ }
+ }
+ cb->nextPass = jpxPassSigProp;
+ break;
+ }
+ }
+
+ cb->arithDecoder->cleanup();
+ return gTrue;
+}
+
+// Inverse quantization, and wavelet transform (IDWT). This also does
+// the initial shift to convert to fixed point format.
+void JPXStream::inverseTransform(JPXTileComp *tileComp) {
+ JPXResLevel *resLevel;
+ JPXPrecinct *precinct;
+ JPXSubband *subband;
+ JPXCodeBlock *cb;
+ JPXCoeff *coeff0, *coeff;
+ Guint qStyle, guard, eps, shift;
+ int shift2;
+ double mu;
+ int val;
+ int *dataPtr;
+ Guint nx0, ny0, nx1, ny1;
+ Guint r, cbX, cbY, x, y;
+
+ cover(68);
+
+ //----- (NL)LL subband (resolution level 0)
+
+ resLevel = &tileComp->resLevels[0];
+ precinct = &resLevel->precincts[0];
+ subband = &precinct->subbands[0];
+
+ // i-quant parameters
+ qStyle = tileComp->quantStyle & 0x1f;
+ guard = (tileComp->quantStyle >> 5) & 7;
+ if (qStyle == 0) {
+ cover(69);
+ eps = (tileComp->quantSteps[0] >> 3) & 0x1f;
+ shift = guard + eps - 1;
+ mu = 0; // make gcc happy
+ } else {
+ cover(70);
+ shift = guard - 1 + tileComp->prec;
+ mu = (double)(0x800 + (tileComp->quantSteps[0] & 0x7ff)) / 2048.0;
+ }
+ if (tileComp->transform == 0) {
+ cover(71);
+ shift += fracBits;
+ }
+
+ // copy (NL)LL into the upper-left corner of the data array, doing
+ // the fixed point adjustment and dequantization along the way
+ cb = subband->cbs;
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ for (y = cb->y0, coeff0 = cb->coeffs;
+ y < cb->y1;
+ ++y, coeff0 += tileComp->cbW) {
+ dataPtr = &tileComp->data[(y - subband->y0)
+ * (tileComp->x1 - tileComp->x0)
+ + (cb->x0 - subband->x0)];
+ for (x = cb->x0, coeff = coeff0; x < cb->x1; ++x, ++coeff) {
+ val = (int)coeff->mag;
+ if (val != 0) {
+ shift2 = shift - (cb->nZeroBitPlanes + coeff->len);
+ if (shift2 > 0) {
+ cover(94);
+ val = (val << shift2) + (1 << (shift2 - 1));
+ } else {
+ cover(95);
+ val >>= -shift2;
+ }
+ if (qStyle == 0) {
+ cover(96);
+ if (tileComp->transform == 0) {
+ cover(97);
+ val &= -1 << fracBits;
+ }
+ } else {
+ cover(98);
+ val = (int)((double)val * mu);
+ }
+ if (coeff->flags & jpxCoeffSign) {
+ cover(99);
+ val = -val;
+ }
+ }
+ *dataPtr++ = val;
+ }
+ }
+ ++cb;
+ }
+ }
+
+ //----- IDWT for each level
+
+ for (r = 1; r <= tileComp->nDecompLevels; ++r) {
+ resLevel = &tileComp->resLevels[r];
+
+ // (n)LL is already in the upper-left corner of the
+ // tile-component data array -- interleave with (n)HL/LH/HH
+ // and inverse transform to get (n-1)LL, which will be stored
+ // in the upper-left corner of the tile-component data array
+ if (r == tileComp->nDecompLevels) {
+ cover(72);
+ nx0 = tileComp->x0;
+ ny0 = tileComp->y0;
+ nx1 = tileComp->x1;
+ ny1 = tileComp->y1;
+ } else {
+ cover(73);
+ nx0 = tileComp->resLevels[r+1].x0;
+ ny0 = tileComp->resLevels[r+1].y0;
+ nx1 = tileComp->resLevels[r+1].x1;
+ ny1 = tileComp->resLevels[r+1].y1;
+ }
+ inverseTransformLevel(tileComp, r, resLevel, nx0, ny0, nx1, ny1);
+ }
+}
+
+// Do one level of the inverse transform:
+// - take (n)LL from the tile-component data array
+// - take (n)HL/LH/HH from <resLevel>
+// - leave the resulting (n-1)LL in the tile-component data array
+void JPXStream::inverseTransformLevel(JPXTileComp *tileComp,
+ Guint r, JPXResLevel *resLevel,
+ Guint nx0, Guint ny0,
+ Guint nx1, Guint ny1) {
+ JPXPrecinct *precinct;
+ JPXSubband *subband;
+ JPXCodeBlock *cb;
+ JPXCoeff *coeff0, *coeff;
+ Guint qStyle, guard, eps, shift, t;
+ int shift2;
+ double mu;
+ int val;
+ int *dataPtr;
+ Guint xo, yo;
+ Guint x, y, sb, cbX, cbY;
+ int xx, yy;
+
+ //----- interleave
+
+ // spread out LL
+ for (yy = resLevel->y1 - 1; yy >= (int)resLevel->y0; --yy) {
+ for (xx = resLevel->x1 - 1; xx >= (int)resLevel->x0; --xx) {
+ tileComp->data[(2 * yy - ny0) * (tileComp->x1 - tileComp->x0)
+ + (2 * xx - nx0)] =
+ tileComp->data[(yy - resLevel->y0) * (tileComp->x1 - tileComp->x0)
+ + (xx - resLevel->x0)];
+ }
+ }
+
+ // i-quant parameters
+ qStyle = tileComp->quantStyle & 0x1f;
+ guard = (tileComp->quantStyle >> 5) & 7;
+
+ // interleave HL/LH/HH
+ precinct = &resLevel->precincts[0];
+ for (sb = 0; sb < 3; ++sb) {
+
+ // i-quant parameters
+ if (qStyle == 0) {
+ cover(100);
+ eps = (tileComp->quantSteps[3*r - 2 + sb] >> 3) & 0x1f;
+ shift = guard + eps - 1;
+ mu = 0; // make gcc happy
+ } else {
+ cover(101);
+ shift = guard + tileComp->prec;
+ if (sb == 2) {
+ cover(102);
+ ++shift;
+ }
+ t = tileComp->quantSteps[qStyle == 1 ? 0 : (3*r - 2 + sb)];
+ mu = (double)(0x800 + (t & 0x7ff)) / 2048.0;
+ }
+ if (tileComp->transform == 0) {
+ cover(103);
+ shift += fracBits;
+ }
+
+ // copy the subband coefficients into the data array, doing the
+ // fixed point adjustment and dequantization along the way
+ xo = (sb & 1) ? 0 : 1;
+ yo = (sb > 0) ? 1 : 0;
+ subband = &precinct->subbands[sb];
+ cb = subband->cbs;
+ for (cbY = 0; cbY < subband->nYCBs; ++cbY) {
+ for (cbX = 0; cbX < subband->nXCBs; ++cbX) {
+ for (y = cb->y0, coeff0 = cb->coeffs;
+ y < cb->y1;
+ ++y, coeff0 += tileComp->cbW) {
+ dataPtr = &tileComp->data[(2 * y + yo - ny0)
+ * (tileComp->x1 - tileComp->x0)
+ + (2 * cb->x0 + xo - nx0)];
+ for (x = cb->x0, coeff = coeff0; x < cb->x1; ++x, ++coeff) {
+ val = (int)coeff->mag;
+ if (val != 0) {
+ shift2 = shift - (cb->nZeroBitPlanes + coeff->len);
+ if (shift2 > 0) {
+ cover(74);
+ val = (val << shift2) + (1 << (shift2 - 1));
+ } else {
+ cover(75);
+ val >>= -shift2;
+ }
+ if (qStyle == 0) {
+ cover(76);
+ if (tileComp->transform == 0) {
+ val &= -1 << fracBits;
+ }
+ } else {
+ cover(77);
+ val = (int)((double)val * mu);
+ }
+ if (coeff->flags & jpxCoeffSign) {
+ cover(78);
+ val = -val;
+ }
+ }
+ *dataPtr = val;
+ dataPtr += 2;
+ }
+ }
+ ++cb;
+ }
+ }
+ }
+
+ //----- horizontal (row) transforms
+ dataPtr = tileComp->data;
+ for (y = 0; y < ny1 - ny0; ++y) {
+ inverseTransform1D(tileComp, dataPtr, 1, nx0, nx1);
+ dataPtr += tileComp->x1 - tileComp->x0;
+ }
+
+ //----- vertical (column) transforms
+ dataPtr = tileComp->data;
+ for (x = 0; x < nx1 - nx0; ++x) {
+ inverseTransform1D(tileComp, dataPtr,
+ tileComp->x1 - tileComp->x0, ny0, ny1);
+ ++dataPtr;
+ }
+}
+
+void JPXStream::inverseTransform1D(JPXTileComp *tileComp,
+ int *data, Guint stride,
+ Guint i0, Guint i1) {
+ int *buf;
+ Guint offset, end, i;
+
+ //----- special case for length = 1
+ if (i1 - i0 == 1) {
+ cover(79);
+ if (i0 & 1) {
+ cover(104);
+ *data >>= 1;
+ }
+
+ } else {
+ cover(80);
+
+ // choose an offset: this makes even buf[] indexes correspond to
+ // odd values of i, and vice versa
+ offset = 3 + (i0 & 1);
+ end = offset + i1 - i0;
+
+ //----- gather
+ buf = tileComp->buf;
+ for (i = 0; i < i1 - i0; ++i) {
+ buf[offset + i] = data[i * stride];
+ }
+
+ //----- extend right
+ buf[end] = buf[end - 2];
+ if (i1 - i0 == 2) {
+ cover(81);
+ buf[end+1] = buf[offset + 1];
+ buf[end+2] = buf[offset];
+ buf[end+3] = buf[offset + 1];
+ } else {
+ cover(82);
+ buf[end+1] = buf[end - 3];
+ if (i1 - i0 == 3) {
+ cover(105);
+ buf[end+2] = buf[offset + 1];
+ buf[end+3] = buf[offset + 2];
+ } else {
+ cover(106);
+ buf[end+2] = buf[end - 4];
+ if (i1 - i0 == 4) {
+ cover(107);
+ buf[end+3] = buf[offset + 1];
+ } else {
+ cover(108);
+ buf[end+3] = buf[end - 5];
+ }
+ }
+ }
+
+ //----- extend left
+ buf[offset - 1] = buf[offset + 1];
+ buf[offset - 2] = buf[offset + 2];
+ buf[offset - 3] = buf[offset + 3];
+ if (offset == 4) {
+ cover(83);
+ buf[0] = buf[offset + 4];
+ }
+
+ //----- 9-7 irreversible filter
+
+ if (tileComp->transform == 0) {
+ cover(84);
+ // step 1 (even)
+ for (i = 1; i <= end + 2; i += 2) {
+ buf[i] = (int)(idwtKappa * buf[i]);
+ }
+ // step 2 (odd)
+ for (i = 0; i <= end + 3; i += 2) {
+ buf[i] = (int)(idwtIKappa * buf[i]);
+ }
+ // step 3 (even)
+ for (i = 1; i <= end + 2; i += 2) {
+ buf[i] = (int)(buf[i] - idwtDelta * (buf[i-1] + buf[i+1]));
+ }
+ // step 4 (odd)
+ for (i = 2; i <= end + 1; i += 2) {
+ buf[i] = (int)(buf[i] - idwtGamma * (buf[i-1] + buf[i+1]));
+ }
+ // step 5 (even)
+ for (i = 3; i <= end; i += 2) {
+ buf[i] = (int)(buf[i] - idwtBeta * (buf[i-1] + buf[i+1]));
+ }
+ // step 6 (odd)
+ for (i = 4; i <= end - 1; i += 2) {
+ buf[i] = (int)(buf[i] - idwtAlpha * (buf[i-1] + buf[i+1]));
+ }
+
+ //----- 5-3 reversible filter
+
+ } else {
+ cover(85);
+ // step 1 (even)
+ for (i = 3; i <= end; i += 2) {
+ buf[i] -= (buf[i-1] + buf[i+1] + 2) >> 2;
+ }
+ // step 2 (odd)
+ for (i = 4; i < end; i += 2) {
+ buf[i] += (buf[i-1] + buf[i+1]) >> 1;
+ }
+ }
+
+ //----- scatter
+ for (i = 0; i < i1 - i0; ++i) {
+ data[i * stride] = buf[offset + i];
+ }
+ }
+}
+
+// Inverse multi-component transform and DC level shift. This also
+// converts fixed point samples back to integers.
+GBool JPXStream::inverseMultiCompAndDC(JPXTile *tile) {
+ JPXTileComp *tileComp;
+ int coeff, d0, d1, d2, t, minVal, maxVal, zeroVal;
+ int *dataPtr;
+ Guint j, comp, x, y;
+
+ //----- inverse multi-component transform
+
+ if (tile->multiComp == 1) {
+ cover(86);
+ if (img.nComps < 3 ||
+ tile->tileComps[0].hSep != tile->tileComps[1].hSep ||
+ tile->tileComps[0].vSep != tile->tileComps[1].vSep ||
+ tile->tileComps[1].hSep != tile->tileComps[2].hSep ||
+ tile->tileComps[1].vSep != tile->tileComps[2].vSep) {
+ return gFalse;
+ }
+
+ // inverse irreversible multiple component transform
+ if (tile->tileComps[0].transform == 0) {
+ cover(87);
+ j = 0;
+ for (y = 0; y < tile->tileComps[0].y1 - tile->tileComps[0].y0; ++y) {
+ for (x = 0; x < tile->tileComps[0].x1 - tile->tileComps[0].x0; ++x) {
+ d0 = tile->tileComps[0].data[j];
+ d1 = tile->tileComps[1].data[j];
+ d2 = tile->tileComps[2].data[j];
+ tile->tileComps[0].data[j] = (int)(d0 + 1.402 * d2 + 0.5);
+ tile->tileComps[1].data[j] =
+ (int)(d0 - 0.34413 * d1 - 0.71414 * d2 + 0.5);
+ tile->tileComps[2].data[j] = (int)(d0 + 1.772 * d1 + 0.5);
+ ++j;
+ }
+ }
+
+ // inverse reversible multiple component transform
+ } else {
+ cover(88);
+ j = 0;
+ for (y = 0; y < tile->tileComps[0].y1 - tile->tileComps[0].y0; ++y) {
+ for (x = 0; x < tile->tileComps[0].x1 - tile->tileComps[0].x0; ++x) {
+ d0 = tile->tileComps[0].data[j];
+ d1 = tile->tileComps[1].data[j];
+ d2 = tile->tileComps[2].data[j];
+ tile->tileComps[1].data[j] = t = d0 - ((d2 + d1) >> 2);
+ tile->tileComps[0].data[j] = d2 + t;
+ tile->tileComps[2].data[j] = d1 + t;
+ ++j;
+ }
+ }
+ }
+ }
+
+ //----- DC level shift
+ for (comp = 0; comp < img.nComps; ++comp) {
+ tileComp = &tile->tileComps[comp];
+
+ // signed: clip
+ if (tileComp->sgned) {
+ cover(89);
+ minVal = -(1 << (tileComp->prec - 1));
+ maxVal = (1 << (tileComp->prec - 1)) - 1;
+ dataPtr = tileComp->data;
+ for (y = 0; y < tileComp->y1 - tileComp->y0; ++y) {
+ for (x = 0; x < tileComp->x1 - tileComp->x0; ++x) {
+ coeff = *dataPtr;
+ if (tileComp->transform == 0) {
+ cover(109);
+ coeff >>= fracBits;
+ }
+ if (coeff < minVal) {
+ cover(110);
+ coeff = minVal;
+ } else if (coeff > maxVal) {
+ cover(111);
+ coeff = maxVal;
+ }
+ *dataPtr++ = coeff;
+ }
+ }
+
+ // unsigned: inverse DC level shift and clip
+ } else {
+ cover(90);
+ maxVal = (1 << tileComp->prec) - 1;
+ zeroVal = 1 << (tileComp->prec - 1);
+ dataPtr = tileComp->data;
+ for (y = 0; y < tileComp->y1 - tileComp->y0; ++y) {
+ for (x = 0; x < tileComp->x1 - tileComp->x0; ++x) {
+ coeff = *dataPtr;
+ if (tileComp->transform == 0) {
+ cover(112);
+ coeff >>= fracBits;
+ }
+ coeff += zeroVal;
+ if (coeff < 0) {
+ cover(113);
+ coeff = 0;
+ } else if (coeff > maxVal) {
+ cover(114);
+ coeff = maxVal;
+ }
+ *dataPtr++ = coeff;
+ }
+ }
+ }
+ }
+
+ return gTrue;
+}
+
+GBool JPXStream::readBoxHdr(Guint *boxType, Guint *boxLen, Guint *dataLen) {
+ Guint len, lenH;
+
+ if (!readULong(&len) ||
+ !readULong(boxType)) {
+ return gFalse;
+ }
+ if (len == 1) {
+ if (!readULong(&lenH) || !readULong(&len)) {
+ return gFalse;
+ }
+ if (lenH) {
+ error(getPos(), "JPX stream contains a box larger than 2^32 bytes");
+ return gFalse;
+ }
+ *boxLen = len;
+ *dataLen = len - 16;
+ } else if (len == 0) {
+ *boxLen = 0;
+ *dataLen = 0;
+ } else {
+ *boxLen = len;
+ *dataLen = len - 8;
+ }
+ return gTrue;
+}
+
+int JPXStream::readMarkerHdr(int *segType, Guint *segLen) {
+ int c;
+
+ do {
+ do {
+ if ((c = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ } while (c != 0xff);
+ do {
+ if ((c = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ } while (c == 0xff);
+ } while (c == 0x00);
+ *segType = c;
+ if ((c >= 0x30 && c <= 0x3f) ||
+ c == 0x4f || c == 0x92 || c == 0x93 || c == 0xd9) {
+ *segLen = 0;
+ return gTrue;
+ }
+ return readUWord(segLen);
+}
+
+GBool JPXStream::readUByte(Guint *x) {
+ int c0;
+
+ if ((c0 = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)c0;
+ return gTrue;
+}
+
+GBool JPXStream::readByte(int *x) {
+ int c0;
+
+ if ((c0 = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = c0;
+ if (c0 & 0x80) {
+ *x |= -1 - 0xff;
+ }
+ return gTrue;
+}
+
+GBool JPXStream::readUWord(Guint *x) {
+ int c0, c1;
+
+ if ((c0 = str->getChar()) == EOF ||
+ (c1 = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)((c0 << 8) | c1);
+ return gTrue;
+}
+
+GBool JPXStream::readULong(Guint *x) {
+ int c0, c1, c2, c3;
+
+ if ((c0 = str->getChar()) == EOF ||
+ (c1 = str->getChar()) == EOF ||
+ (c2 = str->getChar()) == EOF ||
+ (c3 = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ *x = (Guint)((c0 << 24) | (c1 << 16) | (c2 << 8) | c3);
+ return gTrue;
+}
+
+GBool JPXStream::readNBytes(int nBytes, GBool signd, int *x) {
+ int y, c, i;
+
+ y = 0;
+ for (i = 0; i < nBytes; ++i) {
+ if ((c = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ y = (y << 8) + c;
+ }
+ if (signd) {
+ if (y & (1 << (8 * nBytes - 1))) {
+ y |= -1 << (8 * nBytes);
+ }
+ }
+ *x = y;
+ return gTrue;
+}
+
+GBool JPXStream::readBits(int nBits, Guint *x) {
+ int c;
+
+ while (bitBufLen < nBits) {
+ if (byteCount == 0 || (c = str->getChar()) == EOF) {
+ return gFalse;
+ }
+ --byteCount;
+ if (bitBufSkip) {
+ bitBuf = (bitBuf << 7) | (c & 0x7f);
+ bitBufLen += 7;
+ } else {
+ bitBuf = (bitBuf << 8) | (c & 0xff);
+ bitBufLen += 8;
+ }
+ bitBufSkip = c == 0xff;
+ }
+ *x = (bitBuf >> (bitBufLen - nBits)) & ((1 << nBits) - 1);
+ bitBufLen -= nBits;
+ return gTrue;
+}
+
+void JPXStream::startBitBuf(Guint byteCountA) {
+ bitBufLen = 0;
+ bitBufSkip = gFalse;
+ byteCount = byteCountA;
+}
+
+Guint JPXStream::finishBitBuf() {
+ if (bitBufSkip) {
+ str->getChar();
+ --byteCount;
+ }
+ return byteCount;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.h
new file mode 100644
index 00000000000..2e0bda32eb3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/JPXStream.h
@@ -0,0 +1,349 @@
+//========================================================================
+//
+// JPXStream.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef JPXSTREAM_H
+#define JPXSTREAM_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+#include "Stream.h"
+
+class JArithmeticDecoder;
+class JArithmeticDecoderStats;
+
+//------------------------------------------------------------------------
+
+enum JPXColorSpaceType {
+ jpxCSBiLevel = 0,
+ jpxCSYCbCr1 = 1,
+ jpxCSYCbCr2 = 3,
+ jpxCSYCBCr3 = 4,
+ jpxCSPhotoYCC = 9,
+ jpxCSCMY = 11,
+ jpxCSCMYK = 12,
+ jpxCSYCCK = 13,
+ jpxCSCIELab = 14,
+ jpxCSsRGB = 16,
+ jpxCSGrayscale = 17,
+ jpxCSBiLevel2 = 18,
+ jpxCSCIEJab = 19,
+ jpxCSCISesRGB = 20,
+ jpxCSROMMRGB = 21,
+ jpxCSsRGBYCbCr = 22,
+ jpxCSYPbPr1125 = 23,
+ jpxCSYPbPr1250 = 24
+};
+
+struct JPXColorSpecCIELab {
+ Guint rl, ol, ra, oa, rb, ob, il;
+};
+
+struct JPXColorSpecEnumerated {
+ JPXColorSpaceType type; // color space type
+ union {
+ JPXColorSpecCIELab cieLab;
+ };
+};
+
+struct JPXColorSpec {
+ Guint meth; // method
+ int prec; // precedence
+ union {
+ JPXColorSpecEnumerated enumerated;
+ };
+};
+
+//------------------------------------------------------------------------
+
+struct JPXPalette {
+ Guint nEntries; // number of entries in the palette
+ Guint nComps; // number of components in each entry
+ Guint *bpc; // bits per component, for each component
+ int *c; // color data:
+ // c[i*nComps+j] = entry i, component j
+};
+
+//------------------------------------------------------------------------
+
+struct JPXCompMap {
+ Guint nChannels; // number of channels
+ Guint *comp; // codestream components mapped to each channel
+ Guint *type; // 0 for direct use, 1 for palette mapping
+ Guint *pComp; // palette components to use
+};
+
+//------------------------------------------------------------------------
+
+struct JPXChannelDefn {
+ Guint nChannels; // number of channels
+ Guint *idx; // channel indexes
+ Guint *type; // channel types
+ Guint *assoc; // channel associations
+};
+
+//------------------------------------------------------------------------
+
+struct JPXTagTreeNode {
+ GBool finished; // true if this node is finished
+ Guint val; // current value
+};
+
+//------------------------------------------------------------------------
+
+struct JPXCoeff {
+ Gushort flags; // flag bits
+ Gushort len; // number of significant bits in mag
+ Guint mag; // magnitude value
+};
+
+// coefficient flags
+#define jpxCoeffSignificantB 0
+#define jpxCoeffTouchedB 1
+#define jpxCoeffFirstMagRefB 2
+#define jpxCoeffSignB 7
+#define jpxCoeffSignificant (1 << jpxCoeffSignificantB)
+#define jpxCoeffTouched (1 << jpxCoeffTouchedB)
+#define jpxCoeffFirstMagRef (1 << jpxCoeffFirstMagRefB)
+#define jpxCoeffSign (1 << jpxCoeffSignB)
+
+//------------------------------------------------------------------------
+
+struct JPXCodeBlock {
+ //----- size
+ Guint x0, y0, x1, y1; // bounds
+
+ //----- persistent state
+ GBool seen; // true if this code-block has already
+ // been seen
+ Guint lBlock; // base number of bits used for pkt data length
+ Guint nextPass; // next coding pass
+
+ //---- info from first packet
+ Guint nZeroBitPlanes; // number of zero bit planes
+
+ //----- info for the current packet
+ Guint included; // code-block inclusion in this packet:
+ // 0=not included, 1=included
+ Guint nCodingPasses; // number of coding passes in this pkt
+ Guint dataLen; // pkt data length
+
+ //----- coefficient data
+ JPXCoeff *coeffs; // the coefficients
+ JArithmeticDecoder // arithmetic decoder
+ *arithDecoder;
+ JArithmeticDecoderStats // arithmetic decoder stats
+ *stats;
+};
+
+//------------------------------------------------------------------------
+
+struct JPXSubband {
+ //----- computed
+ Guint x0, y0, x1, y1; // bounds
+ Guint nXCBs, nYCBs; // number of code-blocks in the x and y
+ // directions
+
+ //----- tag trees
+ Guint maxTTLevel; // max tag tree level
+ JPXTagTreeNode *inclusion; // inclusion tag tree for each subband
+ JPXTagTreeNode *zeroBitPlane; // zero-bit plane tag tree for each
+ // subband
+
+ //----- children
+ JPXCodeBlock *cbs; // the code-blocks (len = nXCBs * nYCBs)
+};
+
+//------------------------------------------------------------------------
+
+struct JPXPrecinct {
+ //----- computed
+ Guint x0, y0, x1, y1; // bounds of the precinct
+
+ //----- children
+ JPXSubband *subbands; // the subbands
+};
+
+//------------------------------------------------------------------------
+
+struct JPXResLevel {
+ //----- from the COD and COC segments (main and tile)
+ Guint precinctWidth; // log2(precinct width)
+ Guint precinctHeight; // log2(precinct height)
+
+ //----- computed
+ Guint x0, y0, x1, y1; // bounds of the tile-comp (for this res level)
+ Guint bx0[3], by0[3], // subband bounds
+ bx1[3], by1[3];
+
+ //---- children
+ JPXPrecinct *precincts; // the precincts
+};
+
+//------------------------------------------------------------------------
+
+struct JPXTileComp {
+ //----- from the SIZ segment
+ GBool sgned; // 1 for signed, 0 for unsigned
+ Guint prec; // precision, in bits
+ Guint hSep; // horizontal separation of samples
+ Guint vSep; // vertical separation of samples
+
+ //----- from the COD and COC segments (main and tile)
+ Guint style; // coding style parameter (Scod / Scoc)
+ Guint nDecompLevels; // number of decomposition levels
+ Guint codeBlockW; // log2(code-block width)
+ Guint codeBlockH; // log2(code-block height)
+ Guint codeBlockStyle; // code-block style
+ Guint transform; // wavelet transformation
+
+ //----- from the QCD and QCC segments (main and tile)
+ Guint quantStyle; // quantization style
+ Guint *quantSteps; // quantization step size for each subband
+ Guint nQuantSteps; // number of entries in quantSteps
+
+ //----- computed
+ Guint x0, y0, x1, y1; // bounds of the tile-comp, in ref coords
+ Guint cbW; // code-block width
+ Guint cbH; // code-block height
+
+ //----- image data
+ int *data; // the decoded image data
+ int *buf; // intermediate buffer for the inverse
+ // transform
+
+ //----- children
+ JPXResLevel *resLevels; // the resolution levels
+ // (len = nDecompLevels + 1)
+};
+
+//------------------------------------------------------------------------
+
+struct JPXTile {
+ //----- from the COD segments (main and tile)
+ Guint progOrder; // progression order
+ Guint nLayers; // number of layers
+ Guint multiComp; // multiple component transformation
+
+ //----- computed
+ Guint x0, y0, x1, y1; // bounds of the tile, in ref coords
+ Guint maxNDecompLevels; // max number of decomposition levels used
+ // in any component in this tile
+
+ //----- progression order loop counters
+ Guint comp; // component
+ Guint res; // resolution level
+ Guint precinct; // precinct
+ Guint layer; // layer
+
+ //----- children
+ JPXTileComp *tileComps; // the tile-components (len = JPXImage.nComps)
+};
+
+//------------------------------------------------------------------------
+
+struct JPXImage {
+ //----- from the SIZ segment
+ Guint xSize, ySize; // size of reference grid
+ Guint xOffset, yOffset; // image offset
+ Guint xTileSize, yTileSize; // size of tiles
+ Guint xTileOffset, // offset of first tile
+ yTileOffset;
+ Guint nComps; // number of components
+
+ //----- computed
+ Guint nXTiles; // number of tiles in x direction
+ Guint nYTiles; // number of tiles in y direction
+
+ //----- children
+ JPXTile *tiles; // the tiles (len = nXTiles * nYTiles)
+};
+
+//------------------------------------------------------------------------
+
+class JPXStream: public FilterStream {
+public:
+
+ JPXStream(Stream *strA);
+ virtual ~JPXStream();
+ virtual StreamKind getKind() { return strJPX; }
+ virtual void reset();
+ virtual void close();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ virtual void getImageParams(int *bitsPerComponent,
+ StreamColorSpaceMode *csMode);
+
+private:
+
+ void fillReadBuf();
+ void getImageParams2(int *bitsPerComponent, StreamColorSpaceMode *csMode);
+ GBool readBoxes();
+ GBool readColorSpecBox(Guint dataLen);
+ GBool readCodestream(Guint len);
+ GBool readTilePart();
+ GBool readTilePartData(Guint tileIdx,
+ Guint tilePartLen, GBool tilePartToEOC);
+ GBool readCodeBlockData(JPXTileComp *tileComp,
+ JPXResLevel *resLevel,
+ JPXPrecinct *precinct,
+ JPXSubband *subband,
+ Guint res, Guint sb,
+ JPXCodeBlock *cb);
+ void inverseTransform(JPXTileComp *tileComp);
+ void inverseTransformLevel(JPXTileComp *tileComp,
+ Guint r, JPXResLevel *resLevel,
+ Guint nx0, Guint ny0,
+ Guint nx1, Guint ny1);
+ void inverseTransform1D(JPXTileComp *tileComp,
+ int *data, Guint stride,
+ Guint i0, Guint i1);
+ GBool inverseMultiCompAndDC(JPXTile *tile);
+ GBool readBoxHdr(Guint *boxType, Guint *boxLen, Guint *dataLen);
+ int readMarkerHdr(int *segType, Guint *segLen);
+ GBool readUByte(Guint *x);
+ GBool readByte(int *x);
+ GBool readUWord(Guint *x);
+ GBool readULong(Guint *x);
+ GBool readNBytes(int nBytes, GBool signd, int *x);
+ GBool readBits(int nBits, Guint *x);
+ void startBitBuf(Guint byteCountA);
+ Guint finishBitBuf();
+
+ Guint nComps; // number of components
+ Guint *bpc; // bits per component, for each component
+ Guint width, height; // image size
+ GBool haveImgHdr; // set if a JP2/JPX image header has been
+ // found
+ JPXColorSpec cs; // color specification
+ GBool haveCS; // set if a color spec has been found
+ JPXPalette palette; // the palette
+ GBool havePalette; // set if a palette has been found
+ JPXCompMap compMap; // the component mapping
+ GBool haveCompMap; // set if a component mapping has been found
+ JPXChannelDefn channelDefn; // channel definition
+ GBool haveChannelDefn; // set if a channel defn has been found
+
+ JPXImage img; // JPEG2000 decoder data
+ Guint bitBuf; // buffer for bit reads
+ int bitBufLen; // number of bits in bitBuf
+ GBool bitBufSkip; // true if next bit should be skipped
+ // (for bit stuffing)
+ Guint byteCount; // number of available bytes left
+
+ Guint curX, curY, curComp; // current position for lookChar/getChar
+ Guint readBuf; // read buffer
+ Guint readBufLen; // number of valid bits in readBuf
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.cc
new file mode 100644
index 00000000000..5962185490b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.cc
@@ -0,0 +1,578 @@
+//========================================================================
+//
+// Lexer.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <limits.h>
+#include <ctype.h>
+#include "Lexer.h"
+#include "Error.h"
+#include "XRef.h"
+
+//------------------------------------------------------------------------
+
+// A '1' in this array means the character is white space. A '1' or
+// '2' means the character ends a name or command.
+static const char specialChars[256] = {
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
+ 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
+};
+
+static const int IntegerSafeLimit = (INT_MAX - 9) / 10;
+
+//------------------------------------------------------------------------
+// Lexer
+//------------------------------------------------------------------------
+
+Lexer::Lexer(XRef *xrefA, Stream *str) {
+ Object obj;
+
+ lookCharLastValueCached = LOOK_VALUE_NOT_CACHED;
+ xref = xrefA;
+
+ curStr.initStream(str);
+ streams = new Array(xref);
+ streams->add(curStr.copy(&obj));
+ strPtr = 0;
+ freeArray = gTrue;
+ curStr.streamReset();
+}
+
+Lexer::Lexer(XRef *xrefA, Object *obj) {
+ Object obj2;
+
+ lookCharLastValueCached = LOOK_VALUE_NOT_CACHED;
+ xref = xrefA;
+
+ if (obj->isStream()) {
+ streams = new Array(xref);
+ freeArray = gTrue;
+ streams->add(obj->copy(&obj2));
+ } else {
+ streams = obj->getArray();
+ freeArray = gFalse;
+ }
+ strPtr = 0;
+ if (streams->getLength() > 0) {
+ streams->get(strPtr, &curStr);
+ curStr.streamReset();
+ }
+}
+
+Lexer::~Lexer() {
+ if (!curStr.isNone()) {
+ curStr.streamClose();
+ curStr.free();
+ }
+ if (freeArray) {
+ delete streams;
+ }
+}
+
+int Lexer::getChar(GBool comesFromLook) {
+ int c;
+
+ if (LOOK_VALUE_NOT_CACHED != lookCharLastValueCached) {
+ c = lookCharLastValueCached;
+ lookCharLastValueCached = LOOK_VALUE_NOT_CACHED;
+ return c;
+ }
+
+ c = EOF;
+ while (!curStr.isNone() && (c = curStr.streamGetChar()) == EOF) {
+ if (comesFromLook == gTrue) {
+ return EOF;
+ } else {
+ curStr.streamClose();
+ curStr.free();
+ ++strPtr;
+ if (strPtr < streams->getLength()) {
+ streams->get(strPtr, &curStr);
+ curStr.streamReset();
+ }
+ }
+ }
+ return c;
+}
+
+int Lexer::lookChar() {
+
+ if (LOOK_VALUE_NOT_CACHED != lookCharLastValueCached) {
+ return lookCharLastValueCached;
+ }
+ lookCharLastValueCached = getChar(gTrue);
+ if (lookCharLastValueCached == EOF) {
+ lookCharLastValueCached = LOOK_VALUE_NOT_CACHED;
+ return EOF;
+ } else {
+ return lookCharLastValueCached;
+ }
+}
+
+Object *Lexer::getObj(Object *obj, int objNum) {
+ char *p;
+ int c, c2;
+ GBool comment, neg, done, overflownInteger;
+ int numParen;
+ int xi;
+ double xf, scale;
+ GooString *s;
+ int n, m;
+
+ // skip whitespace and comments
+ comment = gFalse;
+ while (1) {
+ if ((c = getChar()) == EOF) {
+ return obj->initEOF();
+ }
+ if (comment) {
+ if (c == '\r' || c == '\n')
+ comment = gFalse;
+ } else if (c == '%') {
+ comment = gTrue;
+ } else if (specialChars[c] != 1) {
+ break;
+ }
+ }
+
+ // start reading token
+ switch (c) {
+
+ // number
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case '-': case '.':
+ overflownInteger = gFalse;
+ neg = gFalse;
+ xi = 0;
+ if (c == '-') {
+ neg = gTrue;
+ } else if (c == '.') {
+ goto doReal;
+ } else {
+ xi = c - '0';
+ }
+ while (1) {
+ c = lookChar();
+ if (isdigit(c)) {
+ getChar();
+ if (unlikely(overflownInteger)) {
+ xf = xf * 10.0 + (c - '0');
+ } else {
+ if (unlikely(xi > IntegerSafeLimit) &&
+ (xi > (INT_MAX - (c - '0')) / 10.0)) {
+ overflownInteger = gTrue;
+ xf = xi * 10.0 + (c - '0');
+ } else {
+ xi = xi * 10 + (c - '0');
+ }
+ }
+ } else if (c == '.') {
+ getChar();
+ goto doReal;
+ } else {
+ break;
+ }
+ }
+ if (neg)
+ xi = -xi;
+ if (unlikely(overflownInteger)) {
+ obj->initError();
+ } else {
+ obj->initInt(xi);
+ }
+ break;
+ doReal:
+ if (likely(!overflownInteger)) {
+ xf = xi;
+ }
+ scale = 0.1;
+ while (1) {
+ c = lookChar();
+ if (c == '-') {
+ // ignore minus signs in the middle of numbers to match
+ // Adobe's behavior
+ error(getPos(), "Badly formatted number");
+ getChar();
+ continue;
+ }
+ if (!isdigit(c)) {
+ break;
+ }
+ getChar();
+ xf = xf + scale * (c - '0');
+ scale *= 0.1;
+ }
+ if (neg)
+ xf = -xf;
+ obj->initReal(xf);
+ break;
+
+ // string
+ case '(':
+ p = tokBuf;
+ n = 0;
+ numParen = 1;
+ done = gFalse;
+ s = NULL;
+ do {
+ c2 = EOF;
+ switch (c = getChar()) {
+
+ case EOF:
+#if 0
+ // This breaks some PDF files, e.g., ones from Photoshop.
+ case '\r':
+ case '\n':
+#endif
+ error(getPos(), "Unterminated string");
+ done = gTrue;
+ break;
+
+ case '(':
+ ++numParen;
+ c2 = c;
+ break;
+
+ case ')':
+ if (--numParen == 0) {
+ done = gTrue;
+ } else {
+ c2 = c;
+ }
+ break;
+
+ case '\\':
+ switch (c = getChar()) {
+ case 'n':
+ c2 = '\n';
+ break;
+ case 'r':
+ c2 = '\r';
+ break;
+ case 't':
+ c2 = '\t';
+ break;
+ case 'b':
+ c2 = '\b';
+ break;
+ case 'f':
+ c2 = '\f';
+ break;
+ case '\\':
+ case '(':
+ case ')':
+ c2 = c;
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ c2 = c - '0';
+ c = lookChar();
+ if (c >= '0' && c <= '7') {
+ getChar();
+ c2 = (c2 << 3) + (c - '0');
+ c = lookChar();
+ if (c >= '0' && c <= '7') {
+ getChar();
+ c2 = (c2 << 3) + (c - '0');
+ }
+ }
+ break;
+ case '\r':
+ c = lookChar();
+ if (c == '\n') {
+ getChar();
+ }
+ break;
+ case '\n':
+ break;
+ case EOF:
+ error(getPos(), "Unterminated string");
+ done = gTrue;
+ break;
+ default:
+ c2 = c;
+ break;
+ }
+ break;
+
+ default:
+ c2 = c;
+ break;
+ }
+
+ if (c2 != EOF) {
+ if (n == tokBufSize) {
+ if (!s)
+ s = new GooString(tokBuf, tokBufSize);
+ else
+ s->append(tokBuf, tokBufSize);
+ p = tokBuf;
+ n = 0;
+
+ // we are growing see if the document is not malformed and we are growing too much
+ if (objNum > 0 && xref != NULL)
+ {
+ int newObjNum = xref->getNumEntry(curStr.streamGetPos());
+ if (newObjNum != objNum)
+ {
+ error(getPos(), "Unterminated string");
+ done = gTrue;
+ delete s;
+ n = -2;
+ }
+ }
+ }
+ *p++ = (char)c2;
+ ++n;
+ }
+ } while (!done);
+ if (n >= 0) {
+ if (!s)
+ s = new GooString(tokBuf, n);
+ else
+ s->append(tokBuf, n);
+ obj->initString(s);
+ } else {
+ obj->initEOF();
+ }
+ break;
+
+ // name
+ case '/':
+ p = tokBuf;
+ n = 0;
+ s = NULL;
+ while ((c = lookChar()) != EOF && !specialChars[c]) {
+ getChar();
+ if (c == '#') {
+ c2 = lookChar();
+ if (c2 >= '0' && c2 <= '9') {
+ c = c2 - '0';
+ } else if (c2 >= 'A' && c2 <= 'F') {
+ c = c2 - 'A' + 10;
+ } else if (c2 >= 'a' && c2 <= 'f') {
+ c = c2 - 'a' + 10;
+ } else {
+ goto notEscChar;
+ }
+ getChar();
+ c <<= 4;
+ c2 = getChar();
+ if (c2 >= '0' && c2 <= '9') {
+ c += c2 - '0';
+ } else if (c2 >= 'A' && c2 <= 'F') {
+ c += c2 - 'A' + 10;
+ } else if (c2 >= 'a' && c2 <= 'f') {
+ c += c2 - 'a' + 10;
+ } else {
+ error(getPos(), "Illegal digit in hex char in name");
+ }
+ }
+ notEscChar:
+ if (n == tokBufSize) {
+ if (!s)
+ {
+ error(getPos(), "Warning: name token is longer than what the specification says it can be");
+ s = new GooString(tokBuf, tokBufSize);
+ }
+ else
+ {
+ // the spec says 127 is the maximum, we are already at 256 so bail out
+ error(getPos(), "Name token too long");
+ break;
+ }
+ p = tokBuf;
+ n = 0;
+ }
+ *p++ = c;
+ ++n;
+ }
+ *p = '\0';
+ if (s) {
+ s->append(tokBuf, n);
+ obj->initName(s->getCString());
+ delete s;
+ } else obj->initName(tokBuf);
+ break;
+
+ // array punctuation
+ case '[':
+ case ']':
+ tokBuf[0] = c;
+ tokBuf[1] = '\0';
+ obj->initCmd(tokBuf);
+ break;
+
+ // hex string or dict punctuation
+ case '<':
+ c = lookChar();
+
+ // dict punctuation
+ if (c == '<') {
+ getChar();
+ tokBuf[0] = tokBuf[1] = '<';
+ tokBuf[2] = '\0';
+ obj->initCmd(tokBuf);
+
+ // hex string
+ } else {
+ p = tokBuf;
+ m = n = 0;
+ c2 = 0;
+ s = NULL;
+ while (1) {
+ c = getChar();
+ if (c == '>') {
+ break;
+ } else if (c == EOF) {
+ error(getPos(), "Unterminated hex string");
+ break;
+ } else if (specialChars[c] != 1) {
+ c2 = c2 << 4;
+ if (c >= '0' && c <= '9')
+ c2 += c - '0';
+ else if (c >= 'A' && c <= 'F')
+ c2 += c - 'A' + 10;
+ else if (c >= 'a' && c <= 'f')
+ c2 += c - 'a' + 10;
+ else
+ error(getPos(), "Illegal character <%02x> in hex string", c);
+ if (++m == 2) {
+ if (n == tokBufSize) {
+ if (!s)
+ s = new GooString(tokBuf, tokBufSize);
+ else
+ s->append(tokBuf, tokBufSize);
+ p = tokBuf;
+ n = 0;
+ }
+ *p++ = (char)c2;
+ ++n;
+ c2 = 0;
+ m = 0;
+ }
+ }
+ }
+ if (!s)
+ s = new GooString(tokBuf, n);
+ else
+ s->append(tokBuf, n);
+ if (m == 1)
+ s->append((char)(c2 << 4));
+ obj->initString(s);
+ }
+ break;
+
+ // dict punctuation
+ case '>':
+ c = lookChar();
+ if (c == '>') {
+ getChar();
+ tokBuf[0] = tokBuf[1] = '>';
+ tokBuf[2] = '\0';
+ obj->initCmd(tokBuf);
+ } else {
+ error(getPos(), "Illegal character '>'");
+ obj->initError();
+ }
+ break;
+
+ // error
+ case ')':
+ case '{':
+ case '}':
+ error(getPos(), "Illegal character '%c'", c);
+ obj->initError();
+ break;
+
+ // command
+ default:
+ p = tokBuf;
+ *p++ = c;
+ n = 1;
+ while ((c = lookChar()) != EOF && !specialChars[c]) {
+ getChar();
+ if (++n == tokBufSize) {
+ error(getPos(), "Command token too long");
+ break;
+ }
+ *p++ = c;
+ }
+ *p = '\0';
+ if (tokBuf[0] == 't' && !strcmp(tokBuf, "true")) {
+ obj->initBool(gTrue);
+ } else if (tokBuf[0] == 'f' && !strcmp(tokBuf, "false")) {
+ obj->initBool(gFalse);
+ } else if (tokBuf[0] == 'n' && !strcmp(tokBuf, "null")) {
+ obj->initNull();
+ } else {
+ obj->initCmd(tokBuf);
+ }
+ break;
+ }
+
+ return obj;
+}
+
+void Lexer::skipToNextLine() {
+ int c;
+
+ while (1) {
+ c = getChar();
+ if (c == EOF || c == '\n') {
+ return;
+ }
+ if (c == '\r') {
+ if ((c = lookChar()) == '\n') {
+ getChar();
+ }
+ return;
+ }
+ }
+}
+
+GBool Lexer::isSpace(int c) {
+ return c >= 0 && c <= 0xff && specialChars[c] == 1;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.h
new file mode 100644
index 00000000000..a0fcc6a2d98
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Lexer.h
@@ -0,0 +1,105 @@
+//========================================================================
+//
+// Lexer.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2007 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef LEXER_H
+#define LEXER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+#include "Stream.h"
+
+class XRef;
+
+#define tokBufSize 128 // size of token buffer
+
+//------------------------------------------------------------------------
+// Lexer
+//------------------------------------------------------------------------
+
+class Lexer {
+public:
+
+ // Construct a lexer for a single stream. Deletes the stream when
+ // lexer is deleted.
+ Lexer(XRef *xrefA, Stream *str);
+
+ // Construct a lexer for a stream or array of streams (assumes obj
+ // is either a stream or array of streams).
+ Lexer(XRef *xrefA, Object *obj);
+
+ // Destructor.
+ ~Lexer();
+
+ // Get the next object from the input stream.
+ Object *getObj(Object *obj, int objNum = -1);
+
+ // Skip to the beginning of the next line in the input stream.
+ void skipToNextLine();
+
+ // Skip over one character.
+ void skipChar() { getChar(); }
+
+ // Get stream.
+ Stream *getStream()
+ { return curStr.isNone() ? (Stream *)NULL : curStr.getStream(); }
+
+ // Get current position in file. This is only used for error
+ // messages, so it returns an int instead of a Guint.
+ int getPos()
+ { return curStr.isNone() ? -1 : (int)curStr.streamGetPos(); }
+
+ // Set position in file.
+ void setPos(Guint pos, int dir = 0)
+ { if (!curStr.isNone()) curStr.streamSetPos(pos, dir); }
+
+ // Returns true if <c> is a whitespace character.
+ static GBool isSpace(int c);
+
+
+ // often (e.g. ~30% on PDF Refernce 1.6 pdf file from Adobe site) getChar
+ // is called right after lookChar. In order to avoid expensive re-doing
+ // getChar() of underlying stream, we cache the last value found by
+ // lookChar() in lookCharLastValueCached. A special value
+ // LOOK_VALUE_NOT_CACHED that should never be part of stream indicates
+ // that no value was cached
+ static const int LOOK_VALUE_NOT_CACHED = -3;
+ int lookCharLastValueCached;
+
+private:
+
+ int getChar(GBool comesFromLook = gFalse);
+ int lookChar();
+
+ Array *streams; // array of input streams
+ int strPtr; // index of current stream
+ Object curStr; // current stream
+ GBool freeArray; // should lexer free the streams array?
+ char tokBuf[tokBufSize]; // temporary token buffer
+
+ XRef *xref;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.cc
new file mode 100644
index 00000000000..5f3b8bd800f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.cc
@@ -0,0 +1,923 @@
+//========================================================================
+//
+// Link.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "Error.h"
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Link.h"
+#include "Sound.h"
+#include "Movie.h"
+#include "FileSpec.h"
+
+//------------------------------------------------------------------------
+// LinkAction
+//------------------------------------------------------------------------
+
+LinkAction *LinkAction::parseDest(Object *obj) {
+ LinkAction *action;
+
+ action = new LinkGoTo(obj);
+ if (!action->isOk()) {
+ delete action;
+ return NULL;
+ }
+ return action;
+}
+
+LinkAction *LinkAction::parseAction(Object *obj, GooString *baseURI) {
+ LinkAction *action;
+ Object obj2, obj3, obj4;
+
+ if (!obj->isDict()) {
+ error(-1, "parseAction: Bad annotation action for URI '%s'",
+ baseURI ? baseURI->getCString() : "NULL");
+ return NULL;
+ }
+
+ obj->dictLookup("S", &obj2);
+
+ // GoTo action
+ if (obj2.isName("GoTo")) {
+ obj->dictLookup("D", &obj3);
+ action = new LinkGoTo(&obj3);
+ obj3.free();
+
+ // GoToR action
+ } else if (obj2.isName("GoToR")) {
+ obj->dictLookup("F", &obj3);
+ obj->dictLookup("D", &obj4);
+ action = new LinkGoToR(&obj3, &obj4);
+ obj3.free();
+ obj4.free();
+
+ // Launch action
+ } else if (obj2.isName("Launch")) {
+ action = new LinkLaunch(obj);
+
+ // URI action
+ } else if (obj2.isName("URI")) {
+ obj->dictLookup("URI", &obj3);
+ action = new LinkURI(&obj3, baseURI);
+ obj3.free();
+
+ // Named action
+ } else if (obj2.isName("Named")) {
+ obj->dictLookup("N", &obj3);
+ action = new LinkNamed(&obj3);
+ obj3.free();
+
+ // Movie action
+ } else if (obj2.isName("Movie")) {
+ action = new LinkMovie(obj);
+
+ // Rendition action
+ } else if (obj2.isName("Rendition")) {
+ action = new LinkRendition(obj);
+
+ // Sound action
+ } else if (obj2.isName("Sound")) {
+ action = new LinkSound(obj);
+
+ // JavaScript action
+ } else if (obj2.isName("JavaScript")) {
+ obj->dictLookup("JS", &obj3);
+ action = new LinkJavaScript(&obj3);
+ obj3.free();
+
+ // unknown action
+ } else if (obj2.isName()) {
+ action = new LinkUnknown(obj2.getName());
+
+ // action is missing or wrong type
+ } else {
+ error(-1, "parseAction: Unknown annotation action object: URI = '%s'",
+ baseURI ? baseURI->getCString() : "NULL");
+ action = NULL;
+ }
+
+ obj2.free();
+
+ if (action && !action->isOk()) {
+ delete action;
+ return NULL;
+ }
+ return action;
+}
+
+//------------------------------------------------------------------------
+// LinkDest
+//------------------------------------------------------------------------
+
+LinkDest::LinkDest(Array *a) {
+ Object obj1, obj2;
+
+ // initialize fields
+ left = bottom = right = top = zoom = 0;
+ changeLeft = changeTop = changeZoom = gFalse;
+ ok = gFalse;
+
+ // get page
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
+ return;
+ }
+ a->getNF(0, &obj1);
+ if (obj1.isInt()) {
+ pageNum = obj1.getInt() + 1;
+ pageIsRef = gFalse;
+ } else if (obj1.isRef()) {
+ pageRef.num = obj1.getRefNum();
+ pageRef.gen = obj1.getRefGen();
+ pageIsRef = gTrue;
+ } else {
+ error(-1, "Bad annotation destination");
+ goto err2;
+ }
+ obj1.free();
+
+ // get destination type
+ a->get(1, &obj1);
+
+ // XYZ link
+ if (obj1.isName("XYZ")) {
+ kind = destXYZ;
+ if (a->getLength() < 3) {
+ changeLeft = gFalse;
+ } else {
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeLeft = gFalse;
+ } else if (obj2.isNum()) {
+ changeLeft = gTrue;
+ left = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ goto err1;
+ }
+ obj2.free();
+ }
+ if (a->getLength() < 4) {
+ changeTop = gFalse;
+ } else {
+ a->get(3, &obj2);
+ if (obj2.isNull()) {
+ changeTop = gFalse;
+ } else if (obj2.isNum()) {
+ changeTop = gTrue;
+ top = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ goto err1;
+ }
+ obj2.free();
+ }
+ if (a->getLength() < 5) {
+ changeZoom = gFalse;
+ } else {
+ a->get(4, &obj2);
+ if (obj2.isNull()) {
+ changeZoom = gFalse;
+ } else if (obj2.isNum()) {
+ changeZoom = gTrue;
+ zoom = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ goto err1;
+ }
+ obj2.free();
+ }
+
+ // Fit link
+ } else if (obj1.isName("Fit")) {
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFit;
+
+ // FitH link
+ } else if (obj1.isName("FitH")) {
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitH;
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeTop = gFalse;
+ } else if (obj2.isNum()) {
+ changeTop = gTrue;
+ top = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ obj2.free();
+
+ // FitV link
+ } else if (obj1.isName("FitV")) {
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitV;
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeLeft = gFalse;
+ } else if (obj2.isNum()) {
+ changeLeft = gTrue;
+ left = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ obj2.free();
+
+ // FitR link
+ } else if (obj1.isName("FitR")) {
+ if (a->getLength() < 6) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitR;
+ if (!a->get(2, &obj2)->isNum()) {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ left = obj2.getNum();
+ obj2.free();
+ if (!a->get(3, &obj2)->isNum()) {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ bottom = obj2.getNum();
+ obj2.free();
+ if (!a->get(4, &obj2)->isNum()) {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ right = obj2.getNum();
+ obj2.free();
+ if (!a->get(5, &obj2)->isNum()) {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ top = obj2.getNum();
+ obj2.free();
+
+ // FitB link
+ } else if (obj1.isName("FitB")) {
+ if (a->getLength() < 2) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitB;
+
+ // FitBH link
+ } else if (obj1.isName("FitBH")) {
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitBH;
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeTop = gFalse;
+ } else if (obj2.isNum()) {
+ changeTop = gTrue;
+ top = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ obj2.free();
+
+ // FitBV link
+ } else if (obj1.isName("FitBV")) {
+ if (a->getLength() < 3) {
+ error(-1, "Annotation destination array is too short");
+ goto err2;
+ }
+ kind = destFitBV;
+ a->get(2, &obj2);
+ if (obj2.isNull()) {
+ changeLeft = gFalse;
+ } else if (obj2.isNum()) {
+ changeLeft = gTrue;
+ left = obj2.getNum();
+ } else {
+ error(-1, "Bad annotation destination position");
+ kind = destFit;
+ }
+ obj2.free();
+
+ // unknown link kind
+ } else {
+ error(-1, "Unknown annotation destination type");
+ goto err2;
+ }
+
+ obj1.free();
+ ok = gTrue;
+ return;
+
+ err1:
+ obj2.free();
+ err2:
+ obj1.free();
+}
+
+LinkDest::LinkDest(LinkDest *dest) {
+ kind = dest->kind;
+ pageIsRef = dest->pageIsRef;
+ if (pageIsRef)
+ pageRef = dest->pageRef;
+ else
+ pageNum = dest->pageNum;
+ left = dest->left;
+ bottom = dest->bottom;
+ right = dest->right;
+ top = dest->top;
+ zoom = dest->zoom;
+ changeLeft = dest->changeLeft;
+ changeTop = dest->changeTop;
+ changeZoom = dest->changeZoom;
+ ok = gTrue;
+}
+
+//------------------------------------------------------------------------
+// LinkGoTo
+//------------------------------------------------------------------------
+
+LinkGoTo::LinkGoTo(Object *destObj) {
+ dest = NULL;
+ namedDest = NULL;
+
+ // named destination
+ if (destObj->isName()) {
+ namedDest = new GooString(destObj->getName());
+ } else if (destObj->isString()) {
+ namedDest = destObj->getString()->copy();
+
+ // destination dictionary
+ } else if (destObj->isArray()) {
+ dest = new LinkDest(destObj->getArray());
+ if (!dest->isOk()) {
+ delete dest;
+ dest = NULL;
+ }
+
+ // error
+ } else {
+ error(-1, "Illegal annotation destination");
+ }
+}
+
+LinkGoTo::~LinkGoTo() {
+ if (dest)
+ delete dest;
+ if (namedDest)
+ delete namedDest;
+}
+
+//------------------------------------------------------------------------
+// LinkGoToR
+//------------------------------------------------------------------------
+
+LinkGoToR::LinkGoToR(Object *fileSpecObj, Object *destObj) {
+ fileName = NULL;
+ dest = NULL;
+ namedDest = NULL;
+
+ // get file name
+ Object obj1;
+ if (getFileSpecNameForPlatform (fileSpecObj, &obj1)) {
+ fileName = obj1.getString()->copy();
+ obj1.free();
+ }
+
+ // named destination
+ if (destObj->isName()) {
+ namedDest = new GooString(destObj->getName());
+ } else if (destObj->isString()) {
+ namedDest = destObj->getString()->copy();
+
+ // destination dictionary
+ } else if (destObj->isArray()) {
+ dest = new LinkDest(destObj->getArray());
+ if (!dest->isOk()) {
+ delete dest;
+ dest = NULL;
+ }
+
+ // error
+ } else {
+ error(-1, "Illegal annotation destination");
+ }
+}
+
+LinkGoToR::~LinkGoToR() {
+ if (fileName)
+ delete fileName;
+ if (dest)
+ delete dest;
+ if (namedDest)
+ delete namedDest;
+}
+
+
+//------------------------------------------------------------------------
+// LinkLaunch
+//------------------------------------------------------------------------
+
+LinkLaunch::LinkLaunch(Object *actionObj) {
+ Object obj1, obj2, obj3;
+
+ fileName = NULL;
+ params = NULL;
+
+ if (actionObj->isDict()) {
+ if (!actionObj->dictLookup("F", &obj1)->isNull()) {
+ if (getFileSpecNameForPlatform (&obj1, &obj3)) {
+ fileName = obj3.getString()->copy();
+ obj3.free();
+ }
+ } else {
+ obj1.free();
+#ifdef _WIN32
+ if (actionObj->dictLookup("Win", &obj1)->isDict()) {
+ obj1.dictLookup("F", &obj2);
+ if (getFileSpecNameForPlatform (&obj2, &obj3)) {
+ fileName = obj3.getString()->copy();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("P", &obj2)->isString()) {
+ params = obj2.getString()->copy();
+ }
+ obj2.free();
+ } else {
+ error(-1, "Bad launch-type link action");
+ }
+#else
+ //~ This hasn't been defined by Adobe yet, so assume it looks
+ //~ just like the Win dictionary until they say otherwise.
+ if (actionObj->dictLookup("Unix", &obj1)->isDict()) {
+ obj1.dictLookup("F", &obj2);
+ if (getFileSpecNameForPlatform (&obj2, &obj3)) {
+ fileName = obj3.getString()->copy();
+ obj3.free();
+ }
+ obj2.free();
+ if (obj1.dictLookup("P", &obj2)->isString()) {
+ params = obj2.getString()->copy();
+ }
+ obj2.free();
+ } else {
+ error(-1, "Bad launch-type link action");
+ }
+#endif
+ }
+ obj1.free();
+ }
+}
+
+LinkLaunch::~LinkLaunch() {
+ if (fileName)
+ delete fileName;
+ if (params)
+ delete params;
+}
+
+//------------------------------------------------------------------------
+// LinkURI
+//------------------------------------------------------------------------
+
+LinkURI::LinkURI(Object *uriObj, GooString *baseURI) {
+ GooString *uri2;
+ int n;
+ char c;
+
+ uri = NULL;
+ if (uriObj->isString()) {
+ uri2 = uriObj->getString()->copy();
+ if (baseURI && baseURI->getLength() > 0) {
+ n = strcspn(uri2->getCString(), "/:");
+ if (n == uri2->getLength() || uri2->getChar(n) == '/') {
+ uri = baseURI->copy();
+ c = uri->getChar(uri->getLength() - 1);
+ if (c == '/' || c == '?') {
+ if (uri2->getChar(0) == '/') {
+ uri2->del(0);
+ }
+ } else {
+ if (uri2->getChar(0) != '/') {
+ uri->append('/');
+ }
+ }
+ uri->append(uri2);
+ delete uri2;
+ } else {
+ uri = uri2;
+ }
+ } else {
+ uri = uri2;
+ }
+ } else {
+ error(-1, "Illegal URI-type link");
+ }
+}
+
+LinkURI::~LinkURI() {
+ if (uri)
+ delete uri;
+}
+
+//------------------------------------------------------------------------
+// LinkNamed
+//------------------------------------------------------------------------
+
+LinkNamed::LinkNamed(Object *nameObj) {
+ name = NULL;
+ if (nameObj->isName()) {
+ name = new GooString(nameObj->getName());
+ }
+}
+
+LinkNamed::~LinkNamed() {
+ if (name) {
+ delete name;
+ }
+}
+
+//------------------------------------------------------------------------
+// LinkMovie
+//------------------------------------------------------------------------
+
+LinkMovie::LinkMovie(Object *obj) {
+ annotRef.num = -1;
+ annotTitle = NULL;
+
+ Object tmp;
+ if (obj->dictLookupNF("Annotation", &tmp)->isRef()) {
+ annotRef = tmp.getRef();
+ }
+ tmp.free();
+
+ if (obj->dictLookup("T", &tmp)->isString()) {
+ annotTitle = tmp.getString()->copy();
+ }
+ tmp.free();
+
+ if ((annotTitle == NULL) && (annotRef.num == -1)) {
+ error(-1, "Movie action is missing both the Annot and T keys");
+ }
+
+ if (obj->dictLookup("Operation", &tmp)->isName()) {
+ char *name = tmp.getName();
+
+ if (!strcmp(name, "Play")) {
+ operation = operationTypePlay;
+ }
+ else if (!strcmp(name, "Stop")) {
+ operation = operationTypeStop;
+ }
+ else if (!strcmp(name, "Pause")) {
+ operation = operationTypePause;
+ }
+ else if (!strcmp(name, "Resume")) {
+ operation = operationTypeResume;
+ }
+ }
+ tmp.free();
+}
+
+LinkMovie::~LinkMovie() {
+ if (annotTitle) {
+ delete annotTitle;
+ }
+}
+
+//------------------------------------------------------------------------
+// LinkSound
+//------------------------------------------------------------------------
+
+LinkSound::LinkSound(Object *soundObj) {
+ volume = 1.0;
+ sync = gFalse;
+ repeat = gFalse;
+ mix = gFalse;
+ sound = NULL;
+ if (soundObj->isDict())
+ {
+ Object tmp;
+ // volume
+ soundObj->dictLookup("Volume", &tmp);
+ if (tmp.isNum()) {
+ volume = tmp.getNum();
+ }
+ tmp.free();
+ // sync
+ soundObj->dictLookup("Synchronous", &tmp);
+ if (tmp.isBool()) {
+ sync = tmp.getBool();
+ }
+ tmp.free();
+ // repeat
+ soundObj->dictLookup("Repeat", &tmp);
+ if (tmp.isBool()) {
+ repeat = tmp.getBool();
+ }
+ tmp.free();
+ // mix
+ soundObj->dictLookup("Mix", &tmp);
+ if (tmp.isBool()) {
+ mix = tmp.getBool();
+ }
+ tmp.free();
+ // 'Sound' object
+ soundObj->dictLookup("Sound", &tmp);
+ sound = Sound::parseSound(&tmp);
+ tmp.free();
+ }
+}
+
+LinkSound::~LinkSound() {
+ delete sound;
+}
+
+//------------------------------------------------------------------------
+// LinkRendition
+//------------------------------------------------------------------------
+
+LinkRendition::LinkRendition(Object *Obj) {
+ operation = -1;
+ movie = NULL;
+ screenRef.num = -1;
+
+ if (Obj->isDict())
+ {
+ Object tmp;
+
+ if (Obj->dictLookup("OP", &tmp)->isNull()) {
+ error(-1, "Rendition action : no /OP field defined");
+ tmp.free();
+ } else {
+
+ operation = tmp.getInt();
+ tmp.free();
+
+ // screen annotation reference
+ Obj->dictLookupNF("AN", &tmp);
+ if (tmp.isRef()) {
+ screenRef = tmp.getRef();
+ }
+ tmp.free();
+
+ // retrieve rendition object
+ Obj->dictLookup("R", &renditionObj);
+ if (renditionObj.isDict()) {
+
+ movie = new Movie();
+ movie->parseMediaRendition(&renditionObj);
+
+ if (screenRef.num == -1) {
+ error(-1, "Action Rendition : Rendition without Screen Annotation !");
+ }
+ }
+
+ }
+ }
+
+}
+
+LinkRendition::~LinkRendition() {
+ renditionObj.free();
+
+ if (movie)
+ delete movie;
+}
+
+
+//------------------------------------------------------------------------
+// LinkJavaScript
+//------------------------------------------------------------------------
+
+LinkJavaScript::LinkJavaScript(Object *jsObj) {
+ js = NULL;
+
+ if (jsObj->isString()) {
+ js = new GooString(jsObj->getString());
+ }
+ else if (jsObj->isStream()) {
+ Stream *stream = jsObj->getStream();
+ js = new GooString();
+ stream->reset();
+ int i;
+ while ((i = stream->getChar()) != EOF) {
+ js->append((char)i);
+ }
+ }
+}
+
+LinkJavaScript::~LinkJavaScript() {
+ if (js) {
+ delete js;
+ }
+}
+
+//------------------------------------------------------------------------
+// LinkUnknown
+//------------------------------------------------------------------------
+
+LinkUnknown::LinkUnknown(char *actionA) {
+ action = new GooString(actionA);
+}
+
+LinkUnknown::~LinkUnknown() {
+ delete action;
+}
+
+//------------------------------------------------------------------------
+// Link
+//------------------------------------------------------------------------
+
+Link::Link(Dict *dict, GooString *baseURI) {
+ Object obj1, obj2;
+ double t;
+
+ action = NULL;
+ ok = gFalse;
+
+ // get rectangle
+ if (!dict->lookup("Rect", &obj1)->isArray()) {
+ error(-1, "Annotation rectangle is wrong type");
+ goto err2;
+ }
+ if (!obj1.arrayGet(0, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ x1 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(1, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ y1 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(2, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ x2 = obj2.getNum();
+ obj2.free();
+ if (!obj1.arrayGet(3, &obj2)->isNum()) {
+ error(-1, "Bad annotation rectangle");
+ goto err1;
+ }
+ y2 = obj2.getNum();
+ obj2.free();
+ obj1.free();
+ if (x1 > x2) {
+ t = x1;
+ x1 = x2;
+ x2 = t;
+ }
+ if (y1 > y2) {
+ t = y1;
+ y1 = y2;
+ y2 = t;
+ }
+
+ // look for destination
+ if (!dict->lookup("Dest", &obj1)->isNull()) {
+ action = LinkAction::parseDest(&obj1);
+
+ // look for action
+ } else {
+ obj1.free();
+ if (dict->lookup("A", &obj1)->isDict()) {
+ action = LinkAction::parseAction(&obj1, baseURI);
+ }
+ }
+ obj1.free();
+
+ // check for bad action
+ if (action) {
+ ok = gTrue;
+ }
+
+ return;
+
+ err1:
+ obj2.free();
+ err2:
+ obj1.free();
+}
+
+Link::~Link() {
+ if (action) {
+ delete action;
+ }
+}
+
+//------------------------------------------------------------------------
+// Links
+//------------------------------------------------------------------------
+
+Links::Links(Object *annots, GooString *baseURI) {
+ Link *link;
+ Object obj1, obj2;
+ int size;
+ int i;
+
+ links = NULL;
+ size = 0;
+ numLinks = 0;
+
+ if (annots->isArray()) {
+ for (i = 0; i < annots->arrayGetLength(); ++i) {
+ if (annots->arrayGet(i, &obj1)->isDict()) {
+ if (obj1.dictLookup("Subtype", &obj2)->isName("Link")) {
+ link = new Link(obj1.getDict(), baseURI);
+ if (link->isOk()) {
+ if (numLinks >= size) {
+ size += 16;
+ links = (Link **)greallocn(links, size, sizeof(Link *));
+ }
+ links[numLinks++] = link;
+ } else {
+ delete link;
+ }
+ }
+ obj2.free();
+ }
+ obj1.free();
+ }
+ }
+}
+
+Links::~Links() {
+ int i;
+
+ for (i = 0; i < numLinks; ++i)
+ delete links[i];
+ gfree(links);
+}
+
+LinkAction *Links::find(double x, double y) const {
+ int i;
+
+ for (i = numLinks - 1; i >= 0; --i) {
+ if (links[i]->inRect(x, y)) {
+ return links[i]->getAction();
+ }
+ }
+ return NULL;
+}
+
+GBool Links::onLink(double x, double y) const {
+ int i;
+
+ for (i = 0; i < numLinks; ++i) {
+ if (links[i]->inRect(x, y))
+ return gTrue;
+ }
+ return gFalse;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.h
new file mode 100644
index 00000000000..af42923f72c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Link.h
@@ -0,0 +1,485 @@
+//========================================================================
+//
+// Link.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef LINK_H
+#define LINK_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+
+class GooString;
+class Array;
+class Dict;
+class Sound;
+class Movie;
+
+//------------------------------------------------------------------------
+// LinkAction
+//------------------------------------------------------------------------
+
+enum LinkActionKind {
+ actionGoTo, // go to destination
+ actionGoToR, // go to destination in new file
+ actionLaunch, // launch app (or open document)
+ actionURI, // URI
+ actionNamed, // named action
+ actionMovie, // movie action
+ actionRendition,
+ actionSound, // sound action
+ actionJavaScript, // JavaScript action
+ actionUnknown // anything else
+};
+
+class LinkAction {
+public:
+
+ // Destructor.
+ virtual ~LinkAction() {}
+
+ // Was the LinkAction created successfully?
+ virtual GBool isOk() = 0;
+
+ // Check link action type.
+ virtual LinkActionKind getKind() = 0;
+
+ // Parse a destination (old-style action) name, string, or array.
+ static LinkAction *parseDest(Object *obj);
+
+ // Parse an action dictionary.
+ static LinkAction *parseAction(Object *obj, GooString *baseURI = NULL);
+};
+
+//------------------------------------------------------------------------
+// LinkDest
+//------------------------------------------------------------------------
+
+enum LinkDestKind {
+ destXYZ,
+ destFit,
+ destFitH,
+ destFitV,
+ destFitR,
+ destFitB,
+ destFitBH,
+ destFitBV
+};
+
+class LinkDest {
+public:
+
+ // Build a LinkDest from the array.
+ LinkDest(Array *a);
+
+ // Copy a LinkDest.
+ LinkDest *copy() { return new LinkDest(this); }
+
+ // Was the LinkDest created successfully?
+ GBool isOk() { return ok; }
+
+ // Accessors.
+ LinkDestKind getKind() { return kind; }
+ GBool isPageRef() { return pageIsRef; }
+ int getPageNum() { return pageNum; }
+ Ref getPageRef() { return pageRef; }
+ double getLeft() { return left; }
+ double getBottom() { return bottom; }
+ double getRight() { return right; }
+ double getTop() { return top; }
+ double getZoom() { return zoom; }
+ GBool getChangeLeft() { return changeLeft; }
+ GBool getChangeTop() { return changeTop; }
+ GBool getChangeZoom() { return changeZoom; }
+
+private:
+
+ LinkDestKind kind; // destination type
+ GBool pageIsRef; // is the page a reference or number?
+ union {
+ Ref pageRef; // reference to page
+ int pageNum; // one-relative page number
+ };
+ double left, bottom; // position
+ double right, top;
+ double zoom; // zoom factor
+ GBool changeLeft, changeTop; // for destXYZ links, which position
+ GBool changeZoom; // components to change
+ GBool ok; // set if created successfully
+
+ LinkDest(LinkDest *dest);
+};
+
+//------------------------------------------------------------------------
+// LinkGoTo
+//------------------------------------------------------------------------
+
+class LinkGoTo: public LinkAction {
+public:
+
+ // Build a LinkGoTo from a destination (dictionary, name, or string).
+ LinkGoTo(Object *destObj);
+
+ // Destructor.
+ virtual ~LinkGoTo();
+
+ // Was the LinkGoTo created successfully?
+ virtual GBool isOk() { return dest || namedDest; }
+
+ // Accessors.
+ virtual LinkActionKind getKind() { return actionGoTo; }
+ LinkDest *getDest() { return dest; }
+ GooString *getNamedDest() { return namedDest; }
+
+private:
+
+ LinkDest *dest; // regular destination (NULL for remote
+ // link with bad destination)
+ GooString *namedDest; // named destination (only one of dest and
+ // and namedDest may be non-NULL)
+};
+
+//------------------------------------------------------------------------
+// LinkGoToR
+//------------------------------------------------------------------------
+
+class LinkGoToR: public LinkAction {
+public:
+
+ // Build a LinkGoToR from a file spec (dictionary) and destination
+ // (dictionary, name, or string).
+ LinkGoToR(Object *fileSpecObj, Object *destObj);
+
+ // Destructor.
+ virtual ~LinkGoToR();
+
+ // Was the LinkGoToR created successfully?
+ virtual GBool isOk() { return fileName && (dest || namedDest); }
+
+ // Accessors.
+ virtual LinkActionKind getKind() { return actionGoToR; }
+ GooString *getFileName() { return fileName; }
+ LinkDest *getDest() { return dest; }
+ GooString *getNamedDest() { return namedDest; }
+
+private:
+
+ GooString *fileName; // file name
+ LinkDest *dest; // regular destination (NULL for remote
+ // link with bad destination)
+ GooString *namedDest; // named destination (only one of dest and
+ // and namedDest may be non-NULL)
+};
+
+//------------------------------------------------------------------------
+// LinkLaunch
+//------------------------------------------------------------------------
+
+class LinkLaunch: public LinkAction {
+public:
+
+ // Build a LinkLaunch from an action dictionary.
+ LinkLaunch(Object *actionObj);
+
+ // Destructor.
+ virtual ~LinkLaunch();
+
+ // Was the LinkLaunch created successfully?
+ virtual GBool isOk() { return fileName != NULL; }
+
+ // Accessors.
+ virtual LinkActionKind getKind() { return actionLaunch; }
+ GooString *getFileName() { return fileName; }
+ GooString *getParams() { return params; }
+
+private:
+
+ GooString *fileName; // file name
+ GooString *params; // parameters
+};
+
+//------------------------------------------------------------------------
+// LinkURI
+//------------------------------------------------------------------------
+
+class LinkURI: public LinkAction {
+public:
+
+ // Build a LinkURI given the URI (string) and base URI.
+ LinkURI(Object *uriObj, GooString *baseURI);
+
+ // Destructor.
+ virtual ~LinkURI();
+
+ // Was the LinkURI created successfully?
+ virtual GBool isOk() { return uri != NULL; }
+
+ // Accessors.
+ virtual LinkActionKind getKind() { return actionURI; }
+ GooString *getURI() { return uri; }
+
+private:
+
+ GooString *uri; // the URI
+};
+
+//------------------------------------------------------------------------
+// LinkNamed
+//------------------------------------------------------------------------
+
+class LinkNamed: public LinkAction {
+public:
+
+ // Build a LinkNamed given the action name.
+ LinkNamed(Object *nameObj);
+
+ virtual ~LinkNamed();
+
+ virtual GBool isOk() { return name != NULL; }
+
+ virtual LinkActionKind getKind() { return actionNamed; }
+ GooString *getName() { return name; }
+
+private:
+
+ GooString *name;
+};
+
+
+//------------------------------------------------------------------------
+// LinkMovie
+//------------------------------------------------------------------------
+
+class LinkMovie: public LinkAction {
+public:
+
+ enum OperationType {
+ operationTypePlay,
+ operationTypePause,
+ operationTypeResume,
+ operationTypeStop
+ };
+
+ LinkMovie(Object *obj);
+ virtual ~LinkMovie();
+
+ virtual GBool isOk() { return annotRef.num >= 0 || annotTitle != NULL; }
+ virtual LinkActionKind getKind() { return actionMovie; }
+
+ // a movie action stores either an indirect reference to a movie annotation
+ // or the movie annotation title
+
+ GBool hasAnnotRef() { return annotRef.num >= 0; }
+ GBool hasAnnotTitle() { return annotTitle != NULL; }
+ Ref *getAnnotRef() { return &annotRef; }
+ GooString *getAnnotTitle() { return annotTitle; }
+
+ OperationType getOperation() { return operation; }
+
+private:
+
+ Ref annotRef; // Annotation
+ GooString *annotTitle; // T
+
+ OperationType operation; // Operation
+};
+
+
+//------------------------------------------------------------------------
+// LinkRendition
+//------------------------------------------------------------------------
+
+class LinkRendition: public LinkAction {
+public:
+
+ LinkRendition(Object *Obj);
+
+ virtual ~LinkRendition();
+
+ virtual GBool isOk() { return true; }
+
+ virtual LinkActionKind getKind() { return actionRendition; }
+
+ GBool hasRenditionObject() { return !renditionObj.isNull(); }
+ Object* getRenditionObject() { return &renditionObj; }
+
+ GBool hasScreenAnnot() { return screenRef.num > 0; }
+ Ref* getScreenAnnot() { return &screenRef; }
+
+ int getOperation() { return operation; }
+
+ Movie* getMovie() { return movie; }
+
+private:
+
+ Ref screenRef;
+ Object renditionObj;
+ int operation;
+
+ Movie* movie;
+};
+
+//------------------------------------------------------------------------
+// LinkSound
+//------------------------------------------------------------------------
+
+class LinkSound: public LinkAction {
+public:
+
+ LinkSound(Object *soundObj);
+
+ virtual ~LinkSound();
+
+ virtual GBool isOk() { return sound != NULL; }
+
+ virtual LinkActionKind getKind() { return actionSound; }
+
+ double getVolume() { return volume; }
+ GBool getSynchronous() { return sync; }
+ GBool getRepeat() { return repeat; }
+ GBool getMix() { return mix; }
+ Sound *getSound() { return sound; }
+
+private:
+
+ double volume;
+ GBool sync;
+ GBool repeat;
+ GBool mix;
+ Sound *sound;
+};
+
+//------------------------------------------------------------------------
+// LinkJavaScript
+//------------------------------------------------------------------------
+
+class LinkJavaScript: public LinkAction {
+public:
+
+ // Build a LinkJavaScript given the action name.
+ LinkJavaScript(Object *jsObj);
+
+ virtual ~LinkJavaScript();
+
+ virtual GBool isOk() { return js != NULL; }
+
+ virtual LinkActionKind getKind() { return actionJavaScript; }
+ GooString *getScript() { return js; }
+
+private:
+
+ GooString *js;
+};
+
+//------------------------------------------------------------------------
+// LinkUnknown
+//------------------------------------------------------------------------
+
+class LinkUnknown: public LinkAction {
+public:
+
+ // Build a LinkUnknown with the specified action type.
+ LinkUnknown(char *actionA);
+
+ // Destructor.
+ virtual ~LinkUnknown();
+
+ // Was the LinkUnknown create successfully?
+ virtual GBool isOk() { return action != NULL; }
+
+ // Accessors.
+ virtual LinkActionKind getKind() { return actionUnknown; }
+ GooString *getAction() { return action; }
+
+private:
+
+ GooString *action; // action subtype
+};
+
+//------------------------------------------------------------------------
+// Link
+//------------------------------------------------------------------------
+
+class Link {
+public:
+
+ // Construct a link, given its dictionary.
+ Link(Dict *dict, GooString *baseURI);
+
+ // Destructor.
+ ~Link();
+
+ // Was the link created successfully?
+ GBool isOk() { return ok; }
+
+ // Check if point is inside the link rectangle.
+ GBool inRect(double x, double y)
+ { return x1 <= x && x <= x2 && y1 <= y && y <= y2; }
+
+ // Get action.
+ LinkAction *getAction() { return action; }
+
+ // Get the link rectangle.
+ void getRect(double *xa1, double *ya1, double *xa2, double *ya2)
+ { *xa1 = x1; *ya1 = y1; *xa2 = x2; *ya2 = y2; }
+
+private:
+
+ double x1, y1; // lower left corner
+ double x2, y2; // upper right corner
+ LinkAction *action; // action
+ GBool ok; // is link valid?
+};
+
+//------------------------------------------------------------------------
+// Links
+//------------------------------------------------------------------------
+
+class Links {
+public:
+
+ // Extract links from array of annotations.
+ Links(Object *annots, GooString *baseURI);
+
+ // Destructor.
+ ~Links();
+
+ // Iterate through list of links.
+ int getNumLinks() const { return numLinks; }
+ Link *getLink(int i) const { return links[i]; }
+
+ // If point <x>,<y> is in a link, return the associated action;
+ // else return NULL.
+ LinkAction *find(double x, double y) const;
+
+ // Return true if <x>,<y> is in a link.
+ GBool onLink(double x, double y) const;
+
+private:
+
+ Link **links;
+ int numLinks;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.am
new file mode 100644
index 00000000000..ec79e317335
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.am
@@ -0,0 +1,284 @@
+if BUILD_SPLASH_OUTPUT
+
+splash_sources = \
+ SplashOutputDev.cc
+
+splash_headers = \
+ SplashOutputDev.h
+
+splash_includes = \
+ $(SPLASH_CFLAGS)
+
+splash_libs = \
+ $(SPLASH_LIBS) \
+ $(top_builddir)/splash/libsplash.la
+
+if BUILD_POPPLER_QT4
+
+poppler_arthur = libpoppler-arthur.la
+
+libpoppler_arthur_la_SOURCES = \
+ ArthurOutputDev.h \
+ ArthurOutputDev.cc
+
+arthur_includes = \
+ $(POPPLER_QT4_CFLAGS)
+
+arthur_libs = \
+ $(POPPLER_QT4_LIBS)
+
+endif
+
+endif
+
+
+
+if BUILD_CAIRO_OUTPUT
+
+poppler_cairo = libpoppler-cairo.la
+
+cairo_includes = \
+ $(CAIRO_CFLAGS)
+
+cairo_libs = \
+ $(CAIRO_LIBS)
+
+libpoppler_cairo_la_SOURCES = \
+ CairoFontEngine.cc \
+ CairoFontEngine.h \
+ CairoOutputDev.cc \
+ CairoOutputDev.h
+
+endif
+
+if BUILD_LIBJPEG
+
+libjpeg_sources = \
+ DCTStream.h \
+ DCTStream.cc
+
+libjpeg_libs = \
+ $(LIBJPEG_LIBS)
+
+endif
+
+if BUILD_LIBPNG
+
+libpng_libs = \
+ $(LIBPNG_LIBS)
+
+endif
+
+if BUILD_LIBOPENJPEG
+
+libjpeg2000_sources = \
+ JPEG2000Stream.h \
+ JPEG2000Stream.cc
+
+libjpeg2000_libs = \
+ $(LIBOPENJPEG_LIBS)
+
+else
+
+libjpeg2000_sources = \
+ JPXStream.h \
+ JPXStream.cc
+
+endif
+
+
+if BUILD_ZLIB
+
+zlib_sources = \
+ FlateStream.h \
+ FlateStream.cc
+
+zlib_libs = \
+ $(ZLIB_LIBS)
+
+endif
+
+if BUILD_ABIWORD_OUTPUT
+
+abiword_sources = \
+ ABWOutputDev.h \
+ ABWOutputDev.cc
+
+abiword_includes = \
+ $(ABIWORD_CFLAGS)
+
+abiword_libs = \
+ $(ABIWORD_LIBS)
+
+endif
+
+if USE_CMS
+cms_includes = $(LCMS_CFLAGS)
+cms_libs = $(LCMS_LIBS)
+endif
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ $(cms_includes) \
+ $(splash_includes) \
+ $(cairo_includes) \
+ $(arthur_includes) \
+ $(abiword_includes) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+lib_LTLIBRARIES = libpoppler.la
+
+noinst_LTLIBRARIES = $(poppler_cairo) \
+ $(poppler_arthur)
+
+CFLAGS+=$(PTHREAD_CFLAGS)
+CXXFLAGS+=$(PTHREAD_CFLAGS)
+
+libpoppler_la_LIBADD = \
+ $(top_builddir)/goo/libgoo.la \
+ $(top_builddir)/fofi/libfofi.la \
+ $(cms_libs) \
+ $(splash_libs) \
+ $(libjpeg_libs) \
+ $(libpng_libs) \
+ $(zlib_libs) \
+ $(libjpeg2000_libs) \
+ $(abiword_libs) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(PTHREAD_LIBS) \
+ $(win32_libs)
+
+libpoppler_la_LDFLAGS = -version-info 5:0:0 @create_shared_lib@
+
+if ENABLE_XPDF_HEADERS
+
+poppler_includedir = $(includedir)/poppler
+poppler_include_HEADERS = \
+ $(splash_headers) \
+ Annot.h \
+ Array.h \
+ BuiltinFont.h \
+ BuiltinFontTables.h \
+ Catalog.h \
+ CharCodeToUnicode.h \
+ CMap.h \
+ DateInfo.h \
+ Decrypt.h \
+ Dict.h \
+ Error.h \
+ FileSpec.h \
+ FontEncodingTables.h \
+ FontInfo.h \
+ Form.h \
+ Function.h \
+ Gfx.h \
+ GfxFont.h \
+ GfxState.h \
+ GfxState_helpers.h \
+ GlobalParams.h \
+ JArithmeticDecoder.h \
+ JBIG2Stream.h \
+ Lexer.h \
+ Link.h \
+ Movie.h \
+ NameToCharCode.h \
+ Object.h \
+ OptionalContent.h \
+ Outline.h \
+ OutputDev.h \
+ Page.h \
+ PageTransition.h \
+ Parser.h \
+ PDFDoc.h \
+ PDFDocEncoding.h \
+ PopplerCache.h \
+ ProfileData.h \
+ PreScanOutputDev.h \
+ PSTokenizer.h \
+ Stream-CCITT.h \
+ Stream.h \
+ UnicodeMap.h \
+ UnicodeMapTables.h \
+ UnicodeTypeTable.h \
+ UnicodeCClassTables.h \
+ UnicodeCompTables.h \
+ UnicodeDecompTables.h \
+ XRef.h \
+ CharTypes.h \
+ CompactFontTables.h \
+ ErrorCodes.h \
+ NameToUnicodeTable.h \
+ PSOutputDev.h \
+ TextOutputDev.h \
+ SecurityHandler.h \
+ UTF8.h \
+ XpdfPluginAPI.h \
+ Sound.h \
+ poppler-config.h
+
+endif
+
+libpoppler_la_SOURCES = \
+ $(splash_sources) \
+ $(cairo_sources) \
+ $(arthur_sources) \
+ $(libjpeg_sources) \
+ $(zlib_sources) \
+ $(libjpeg2000_sources) \
+ $(abiword_sources) \
+ Annot.cc \
+ Array.cc \
+ BuiltinFont.cc \
+ BuiltinFontTables.cc \
+ Catalog.cc \
+ CharCodeToUnicode.cc \
+ CMap.cc \
+ DateInfo.cc \
+ Decrypt.cc \
+ Dict.cc \
+ Error.cc \
+ FileSpec.cc \
+ FontEncodingTables.cc \
+ Form.cc \
+ FontInfo.cc \
+ Function.cc \
+ Gfx.cc \
+ GfxFont.cc \
+ GfxState.cc \
+ GlobalParams.cc \
+ JArithmeticDecoder.cc \
+ JBIG2Stream.cc \
+ Lexer.cc \
+ Link.cc \
+ Movie.cc \
+ NameToCharCode.cc \
+ Object.cc \
+ OptionalContent.cc \
+ Outline.cc \
+ OutputDev.cc \
+ Page.cc \
+ PageTransition.cc \
+ Parser.cc \
+ PDFDoc.cc \
+ PDFDocEncoding.cc \
+ PopplerCache.cc \
+ ProfileData.cc \
+ PreScanOutputDev.cc \
+ PSTokenizer.cc \
+ Stream.cc \
+ UnicodeMap.cc \
+ UnicodeTypeTable.cc \
+ XRef.cc \
+ PSOutputDev.cc \
+ TextOutputDev.cc \
+ PageLabelInfo.h \
+ PageLabelInfo.cc \
+ SecurityHandler.cc \
+ Sound.cc \
+ XpdfPluginAPI.cc
+
+EXTRA_DIST = gen-unicode-tables.py \
+ GlobalParamsWin.cc
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.in
new file mode 100644
index 00000000000..0ecd52099d2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Makefile.in
@@ -0,0 +1,1049 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = poppler
+DIST_COMMON = $(am__poppler_include_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/poppler-config.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(poppler_includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+libpoppler_arthur_la_LIBADD =
+am__libpoppler_arthur_la_SOURCES_DIST = ArthurOutputDev.h \
+ ArthurOutputDev.cc
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@am_libpoppler_arthur_la_OBJECTS = ArthurOutputDev.lo
+libpoppler_arthur_la_OBJECTS = $(am_libpoppler_arthur_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@am_libpoppler_arthur_la_rpath =
+libpoppler_cairo_la_LIBADD =
+am__libpoppler_cairo_la_SOURCES_DIST = CairoFontEngine.cc \
+ CairoFontEngine.h CairoOutputDev.cc CairoOutputDev.h
+@BUILD_CAIRO_OUTPUT_TRUE@am_libpoppler_cairo_la_OBJECTS = \
+@BUILD_CAIRO_OUTPUT_TRUE@ CairoFontEngine.lo CairoOutputDev.lo
+libpoppler_cairo_la_OBJECTS = $(am_libpoppler_cairo_la_OBJECTS)
+@BUILD_CAIRO_OUTPUT_TRUE@am_libpoppler_cairo_la_rpath =
+am__DEPENDENCIES_1 =
+@USE_CMS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@BUILD_SPLASH_OUTPUT_TRUE@am__DEPENDENCIES_3 = \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(top_builddir)/splash/libsplash.la
+@BUILD_LIBJPEG_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
+@BUILD_LIBPNG_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
+@BUILD_ZLIB_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
+@BUILD_LIBOPENJPEG_TRUE@am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
+@BUILD_ABIWORD_OUTPUT_TRUE@am__DEPENDENCIES_8 = $(am__DEPENDENCIES_1)
+libpoppler_la_DEPENDENCIES = $(top_builddir)/goo/libgoo.la \
+ $(top_builddir)/fofi/libfofi.la $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \
+ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \
+ $(am__DEPENDENCIES_7) $(am__DEPENDENCIES_8) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__libpoppler_la_SOURCES_DIST = SplashOutputDev.cc DCTStream.h \
+ DCTStream.cc FlateStream.h FlateStream.cc JPXStream.h \
+ JPXStream.cc JPEG2000Stream.h JPEG2000Stream.cc ABWOutputDev.h \
+ ABWOutputDev.cc Annot.cc Array.cc BuiltinFont.cc \
+ BuiltinFontTables.cc Catalog.cc CharCodeToUnicode.cc CMap.cc \
+ DateInfo.cc Decrypt.cc Dict.cc Error.cc FileSpec.cc \
+ FontEncodingTables.cc Form.cc FontInfo.cc Function.cc Gfx.cc \
+ GfxFont.cc GfxState.cc GlobalParams.cc JArithmeticDecoder.cc \
+ JBIG2Stream.cc Lexer.cc Link.cc Movie.cc NameToCharCode.cc \
+ Object.cc OptionalContent.cc Outline.cc OutputDev.cc Page.cc \
+ PageTransition.cc Parser.cc PDFDoc.cc PDFDocEncoding.cc \
+ PopplerCache.cc ProfileData.cc PreScanOutputDev.cc \
+ PSTokenizer.cc Stream.cc UnicodeMap.cc UnicodeTypeTable.cc \
+ XRef.cc PSOutputDev.cc TextOutputDev.cc PageLabelInfo.h \
+ PageLabelInfo.cc SecurityHandler.cc Sound.cc XpdfPluginAPI.cc
+@BUILD_SPLASH_OUTPUT_TRUE@am__objects_1 = SplashOutputDev.lo
+@BUILD_LIBJPEG_TRUE@am__objects_2 = DCTStream.lo
+@BUILD_ZLIB_TRUE@am__objects_3 = FlateStream.lo
+@BUILD_LIBOPENJPEG_FALSE@am__objects_4 = JPXStream.lo
+@BUILD_LIBOPENJPEG_TRUE@am__objects_4 = JPEG2000Stream.lo
+@BUILD_ABIWORD_OUTPUT_TRUE@am__objects_5 = ABWOutputDev.lo
+am_libpoppler_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3) $(am__objects_4) $(am__objects_5) Annot.lo \
+ Array.lo BuiltinFont.lo BuiltinFontTables.lo Catalog.lo \
+ CharCodeToUnicode.lo CMap.lo DateInfo.lo Decrypt.lo Dict.lo \
+ Error.lo FileSpec.lo FontEncodingTables.lo Form.lo FontInfo.lo \
+ Function.lo Gfx.lo GfxFont.lo GfxState.lo GlobalParams.lo \
+ JArithmeticDecoder.lo JBIG2Stream.lo Lexer.lo Link.lo Movie.lo \
+ NameToCharCode.lo Object.lo OptionalContent.lo Outline.lo \
+ OutputDev.lo Page.lo PageTransition.lo Parser.lo PDFDoc.lo \
+ PDFDocEncoding.lo PopplerCache.lo ProfileData.lo \
+ PreScanOutputDev.lo PSTokenizer.lo Stream.lo UnicodeMap.lo \
+ UnicodeTypeTable.lo XRef.lo PSOutputDev.lo TextOutputDev.lo \
+ PageLabelInfo.lo SecurityHandler.lo Sound.lo XpdfPluginAPI.lo
+libpoppler_la_OBJECTS = $(am_libpoppler_la_OBJECTS)
+libpoppler_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libpoppler_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libpoppler_arthur_la_SOURCES) \
+ $(libpoppler_cairo_la_SOURCES) $(libpoppler_la_SOURCES)
+DIST_SOURCES = $(am__libpoppler_arthur_la_SOURCES_DIST) \
+ $(am__libpoppler_cairo_la_SOURCES_DIST) \
+ $(am__libpoppler_la_SOURCES_DIST)
+am__poppler_include_HEADERS_DIST = SplashOutputDev.h Annot.h Array.h \
+ BuiltinFont.h BuiltinFontTables.h Catalog.h \
+ CharCodeToUnicode.h CMap.h DateInfo.h Decrypt.h Dict.h Error.h \
+ FileSpec.h FontEncodingTables.h FontInfo.h Form.h Function.h \
+ Gfx.h GfxFont.h GfxState.h GfxState_helpers.h GlobalParams.h \
+ JArithmeticDecoder.h JBIG2Stream.h Lexer.h Link.h Movie.h \
+ NameToCharCode.h Object.h OptionalContent.h Outline.h \
+ OutputDev.h Page.h PageTransition.h Parser.h PDFDoc.h \
+ PDFDocEncoding.h PopplerCache.h ProfileData.h \
+ PreScanOutputDev.h PSTokenizer.h Stream-CCITT.h Stream.h \
+ UnicodeMap.h UnicodeMapTables.h UnicodeTypeTable.h \
+ UnicodeCClassTables.h UnicodeCompTables.h \
+ UnicodeDecompTables.h XRef.h CharTypes.h CompactFontTables.h \
+ ErrorCodes.h NameToUnicodeTable.h PSOutputDev.h \
+ TextOutputDev.h SecurityHandler.h UTF8.h XpdfPluginAPI.h \
+ Sound.h poppler-config.h
+HEADERS = $(poppler_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@ $(PTHREAD_CFLAGS)
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@ $(PTHREAD_CFLAGS)
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+@BUILD_SPLASH_OUTPUT_TRUE@splash_sources = \
+@BUILD_SPLASH_OUTPUT_TRUE@ SplashOutputDev.cc
+
+@BUILD_SPLASH_OUTPUT_TRUE@splash_headers = \
+@BUILD_SPLASH_OUTPUT_TRUE@ SplashOutputDev.h
+
+@BUILD_SPLASH_OUTPUT_TRUE@splash_includes = \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(SPLASH_CFLAGS)
+
+@BUILD_SPLASH_OUTPUT_TRUE@splash_libs = \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(SPLASH_LIBS) \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(top_builddir)/splash/libsplash.la
+
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@poppler_arthur = libpoppler-arthur.la
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@libpoppler_arthur_la_SOURCES = \
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ ArthurOutputDev.h \
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ ArthurOutputDev.cc
+
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@arthur_includes = \
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ $(POPPLER_QT4_CFLAGS)
+
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@arthur_libs = \
+@BUILD_POPPLER_QT4_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ $(POPPLER_QT4_LIBS)
+
+@BUILD_CAIRO_OUTPUT_TRUE@poppler_cairo = libpoppler-cairo.la
+@BUILD_CAIRO_OUTPUT_TRUE@cairo_includes = \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(CAIRO_CFLAGS)
+
+@BUILD_CAIRO_OUTPUT_TRUE@cairo_libs = \
+@BUILD_CAIRO_OUTPUT_TRUE@ $(CAIRO_LIBS)
+
+@BUILD_CAIRO_OUTPUT_TRUE@libpoppler_cairo_la_SOURCES = \
+@BUILD_CAIRO_OUTPUT_TRUE@ CairoFontEngine.cc \
+@BUILD_CAIRO_OUTPUT_TRUE@ CairoFontEngine.h \
+@BUILD_CAIRO_OUTPUT_TRUE@ CairoOutputDev.cc \
+@BUILD_CAIRO_OUTPUT_TRUE@ CairoOutputDev.h
+
+@BUILD_LIBJPEG_TRUE@libjpeg_sources = \
+@BUILD_LIBJPEG_TRUE@ DCTStream.h \
+@BUILD_LIBJPEG_TRUE@ DCTStream.cc
+
+@BUILD_LIBJPEG_TRUE@libjpeg_libs = \
+@BUILD_LIBJPEG_TRUE@ $(LIBJPEG_LIBS)
+
+@BUILD_LIBPNG_TRUE@libpng_libs = \
+@BUILD_LIBPNG_TRUE@ $(LIBPNG_LIBS)
+
+@BUILD_LIBOPENJPEG_FALSE@libjpeg2000_sources = \
+@BUILD_LIBOPENJPEG_FALSE@ JPXStream.h \
+@BUILD_LIBOPENJPEG_FALSE@ JPXStream.cc
+
+@BUILD_LIBOPENJPEG_TRUE@libjpeg2000_sources = \
+@BUILD_LIBOPENJPEG_TRUE@ JPEG2000Stream.h \
+@BUILD_LIBOPENJPEG_TRUE@ JPEG2000Stream.cc
+
+@BUILD_LIBOPENJPEG_TRUE@libjpeg2000_libs = \
+@BUILD_LIBOPENJPEG_TRUE@ $(LIBOPENJPEG_LIBS)
+
+@BUILD_ZLIB_TRUE@zlib_sources = \
+@BUILD_ZLIB_TRUE@ FlateStream.h \
+@BUILD_ZLIB_TRUE@ FlateStream.cc
+
+@BUILD_ZLIB_TRUE@zlib_libs = \
+@BUILD_ZLIB_TRUE@ $(ZLIB_LIBS)
+
+@BUILD_ABIWORD_OUTPUT_TRUE@abiword_sources = \
+@BUILD_ABIWORD_OUTPUT_TRUE@ ABWOutputDev.h \
+@BUILD_ABIWORD_OUTPUT_TRUE@ ABWOutputDev.cc
+
+@BUILD_ABIWORD_OUTPUT_TRUE@abiword_includes = \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(ABIWORD_CFLAGS)
+
+@BUILD_ABIWORD_OUTPUT_TRUE@abiword_libs = \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(ABIWORD_LIBS)
+
+@USE_CMS_TRUE@cms_includes = $(LCMS_CFLAGS)
+@USE_CMS_TRUE@cms_libs = $(LCMS_LIBS)
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ $(cms_includes) \
+ $(splash_includes) \
+ $(cairo_includes) \
+ $(arthur_includes) \
+ $(abiword_includes) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+lib_LTLIBRARIES = libpoppler.la
+noinst_LTLIBRARIES = $(poppler_cairo) \
+ $(poppler_arthur)
+
+libpoppler_la_LIBADD = \
+ $(top_builddir)/goo/libgoo.la \
+ $(top_builddir)/fofi/libfofi.la \
+ $(cms_libs) \
+ $(splash_libs) \
+ $(libjpeg_libs) \
+ $(libpng_libs) \
+ $(zlib_libs) \
+ $(libjpeg2000_libs) \
+ $(abiword_libs) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS) \
+ $(PTHREAD_LIBS) \
+ $(win32_libs)
+
+libpoppler_la_LDFLAGS = -version-info 5:0:0 @create_shared_lib@
+@ENABLE_XPDF_HEADERS_TRUE@poppler_includedir = $(includedir)/poppler
+@ENABLE_XPDF_HEADERS_TRUE@poppler_include_HEADERS = \
+@ENABLE_XPDF_HEADERS_TRUE@ $(splash_headers) \
+@ENABLE_XPDF_HEADERS_TRUE@ Annot.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Array.h \
+@ENABLE_XPDF_HEADERS_TRUE@ BuiltinFont.h \
+@ENABLE_XPDF_HEADERS_TRUE@ BuiltinFontTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Catalog.h \
+@ENABLE_XPDF_HEADERS_TRUE@ CharCodeToUnicode.h \
+@ENABLE_XPDF_HEADERS_TRUE@ CMap.h \
+@ENABLE_XPDF_HEADERS_TRUE@ DateInfo.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Decrypt.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Dict.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Error.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FileSpec.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FontEncodingTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ FontInfo.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Form.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Function.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Gfx.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GfxFont.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GfxState.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GfxState_helpers.h \
+@ENABLE_XPDF_HEADERS_TRUE@ GlobalParams.h \
+@ENABLE_XPDF_HEADERS_TRUE@ JArithmeticDecoder.h \
+@ENABLE_XPDF_HEADERS_TRUE@ JBIG2Stream.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Lexer.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Link.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Movie.h \
+@ENABLE_XPDF_HEADERS_TRUE@ NameToCharCode.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Object.h \
+@ENABLE_XPDF_HEADERS_TRUE@ OptionalContent.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Outline.h \
+@ENABLE_XPDF_HEADERS_TRUE@ OutputDev.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Page.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PageTransition.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Parser.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PDFDoc.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PDFDocEncoding.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PopplerCache.h \
+@ENABLE_XPDF_HEADERS_TRUE@ ProfileData.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PreScanOutputDev.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PSTokenizer.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Stream-CCITT.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Stream.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeMap.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeMapTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeTypeTable.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeCClassTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeCompTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UnicodeDecompTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ XRef.h \
+@ENABLE_XPDF_HEADERS_TRUE@ CharTypes.h \
+@ENABLE_XPDF_HEADERS_TRUE@ CompactFontTables.h \
+@ENABLE_XPDF_HEADERS_TRUE@ ErrorCodes.h \
+@ENABLE_XPDF_HEADERS_TRUE@ NameToUnicodeTable.h \
+@ENABLE_XPDF_HEADERS_TRUE@ PSOutputDev.h \
+@ENABLE_XPDF_HEADERS_TRUE@ TextOutputDev.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SecurityHandler.h \
+@ENABLE_XPDF_HEADERS_TRUE@ UTF8.h \
+@ENABLE_XPDF_HEADERS_TRUE@ XpdfPluginAPI.h \
+@ENABLE_XPDF_HEADERS_TRUE@ Sound.h \
+@ENABLE_XPDF_HEADERS_TRUE@ poppler-config.h
+
+libpoppler_la_SOURCES = \
+ $(splash_sources) \
+ $(cairo_sources) \
+ $(arthur_sources) \
+ $(libjpeg_sources) \
+ $(zlib_sources) \
+ $(libjpeg2000_sources) \
+ $(abiword_sources) \
+ Annot.cc \
+ Array.cc \
+ BuiltinFont.cc \
+ BuiltinFontTables.cc \
+ Catalog.cc \
+ CharCodeToUnicode.cc \
+ CMap.cc \
+ DateInfo.cc \
+ Decrypt.cc \
+ Dict.cc \
+ Error.cc \
+ FileSpec.cc \
+ FontEncodingTables.cc \
+ Form.cc \
+ FontInfo.cc \
+ Function.cc \
+ Gfx.cc \
+ GfxFont.cc \
+ GfxState.cc \
+ GlobalParams.cc \
+ JArithmeticDecoder.cc \
+ JBIG2Stream.cc \
+ Lexer.cc \
+ Link.cc \
+ Movie.cc \
+ NameToCharCode.cc \
+ Object.cc \
+ OptionalContent.cc \
+ Outline.cc \
+ OutputDev.cc \
+ Page.cc \
+ PageTransition.cc \
+ Parser.cc \
+ PDFDoc.cc \
+ PDFDocEncoding.cc \
+ PopplerCache.cc \
+ ProfileData.cc \
+ PreScanOutputDev.cc \
+ PSTokenizer.cc \
+ Stream.cc \
+ UnicodeMap.cc \
+ UnicodeTypeTable.cc \
+ XRef.cc \
+ PSOutputDev.cc \
+ TextOutputDev.cc \
+ PageLabelInfo.h \
+ PageLabelInfo.cc \
+ SecurityHandler.cc \
+ Sound.cc \
+ XpdfPluginAPI.cc
+
+EXTRA_DIST = gen-unicode-tables.py \
+ GlobalParamsWin.cc
+
+all: poppler-config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign poppler/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign poppler/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+poppler-config.h: stamp-h2
+ @if test ! -f $@; then \
+ rm -f stamp-h2; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \
+ else :; fi
+
+stamp-h2: $(srcdir)/poppler-config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status poppler/poppler-config.h
+$(srcdir)/poppler-config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h2
+ touch $@
+
+distclean-hdr:
+ -rm -f poppler-config.h stamp-h2
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libpoppler-arthur.la: $(libpoppler_arthur_la_OBJECTS) $(libpoppler_arthur_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(am_libpoppler_arthur_la_rpath) $(libpoppler_arthur_la_OBJECTS) $(libpoppler_arthur_la_LIBADD) $(LIBS)
+libpoppler-cairo.la: $(libpoppler_cairo_la_OBJECTS) $(libpoppler_cairo_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(am_libpoppler_cairo_la_rpath) $(libpoppler_cairo_la_OBJECTS) $(libpoppler_cairo_la_LIBADD) $(LIBS)
+libpoppler.la: $(libpoppler_la_OBJECTS) $(libpoppler_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libpoppler_la_LINK) -rpath $(libdir) $(libpoppler_la_OBJECTS) $(libpoppler_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ABWOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Annot.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Array.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ArthurOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BuiltinFont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BuiltinFontTables.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CairoFontEngine.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CairoOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Catalog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CharCodeToUnicode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DCTStream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DateInfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Decrypt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dict.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileSpec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FlateStream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FontEncodingTables.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FontInfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Form.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Function.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Gfx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GfxFont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GfxState.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GlobalParams.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JArithmeticDecoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JBIG2Stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JPEG2000Stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JPXStream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lexer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Link.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Movie.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameToCharCode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Object.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionalContent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Outline.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFDoc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFDocEncoding.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSTokenizer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Page.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageLabelInfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageTransition.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Parser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PopplerCache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PreScanOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProfileData.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SecurityHandler.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sound.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TextOutputDev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnicodeMap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnicodeTypeTable.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XRef.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XpdfPluginAPI.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_includeHEADERS: $(poppler_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)"
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) poppler-config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) poppler-config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) poppler-config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) poppler-config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) poppler-config.h
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-poppler_includeHEADERS
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
+ ctags distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am \
+ install-poppler_includeHEADERS install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-libLTLIBRARIES uninstall-poppler_includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.cc
new file mode 100644
index 00000000000..e29c64e7946
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.cc
@@ -0,0 +1,461 @@
+//*********************************************************************************
+// Movie.cc
+//---------------------------------------------------------------------------------
+//
+//---------------------------------------------------------------------------------
+// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
+// Pino Toscano <pino@kde.org> (c) 2008
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//*********************************************************************************
+
+#include "Movie.h"
+
+#include <GooList.h>
+
+MovieWindowParameters::MovieWindowParameters() {
+ // default values
+ type = movieWindowEmbedded;
+ width = -1;
+ height = -1;
+ relativeTo = windowRelativeToDocument;
+ XPosition = 0.5;
+ YPosition = 0.5;
+ hasTitleBar = gTrue;
+ hasCloseButton = gTrue;
+ isResizeable = gTrue;
+}
+
+MovieWindowParameters::~MovieWindowParameters() {
+}
+
+void MovieWindowParameters::parseFWParams(Object* obj) {
+ Object tmp;
+
+ if (obj->dictLookup("D", &tmp)->isArray()) {
+ Array * dim = tmp.getArray();
+
+ if (dim->getLength() >= 2) {
+ Object dd;
+ if (dim->get(0, &dd)->isInt()) {
+ width = dd.getInt();
+ }
+ dd.free();
+ if (dim->get(1, &dd)->isInt()) {
+ height = dd.getInt();
+ }
+ dd.free();
+ }
+ }
+ tmp.free();
+
+ if (obj->dictLookup("RT", &tmp)->isInt()) {
+ int t = tmp.getInt();
+ switch(t) {
+ case 0: relativeTo = windowRelativeToDocument; break;
+ case 1: relativeTo = windowRelativeToApplication; break;
+ case 2: relativeTo = windowRelativeToDesktop; break;
+ }
+ }
+ tmp.free();
+
+ if (obj->dictLookup("P",&tmp)->isInt()) {
+ int t = tmp.getInt();
+
+ switch(t) {
+ case 0: // Upper left
+ XPosition = 0.0;
+ YPosition = 0.0;
+ break;
+ case 1: // Upper Center
+ XPosition = 0.5;
+ YPosition = 0.0;
+ break;
+ case 2: // Upper Right
+ XPosition = 1.0;
+ YPosition = 0.0;
+ break;
+ case 3: // Center Left
+ XPosition = 0.0;
+ YPosition = 0.5;
+ break;
+ case 4: // Center
+ XPosition = 0.5;
+ YPosition = 0.5;
+ break;
+ case 5: // Center Right
+ XPosition = 1.0;
+ YPosition = 0.5;
+ break;
+ case 6: // Lower Left
+ XPosition = 0.0;
+ YPosition = 1.0;
+ break;
+ case 7: // Lower Center
+ XPosition = 0.5;
+ YPosition = 1.0;
+ break;
+ case 8: // Lower Right
+ XPosition = 1.0;
+ YPosition = 1.0;
+ break;
+ }
+ }
+ tmp.free();
+
+ if (obj->dictLookup("T", &tmp)->isBool()) {
+ hasTitleBar = tmp.getBool();
+ }
+ tmp.free();
+ if (obj->dictLookup("UC", &tmp)->isBool()) {
+ hasCloseButton = tmp.getBool();
+ }
+ tmp.free();
+ if (obj->dictLookup("R", &tmp)->isInt()) {
+ isResizeable = (tmp.getInt() != 0);
+ }
+ tmp.free();
+
+}
+
+MovieParameters::MovieParameters() {
+ // instanciate to default values
+
+ rotationAngle = 0;
+ rate = 1.0;
+ volume = 100;
+ fittingPolicy = fittingUndefined;
+ autoPlay = gTrue;
+ repeatCount = 1.0;
+ opacity = 1.0;
+ showControls = gFalse;
+
+
+ start.units = 0;
+ duration.units = 0;
+}
+
+MovieParameters::~MovieParameters() {
+}
+
+void MovieParameters::parseAnnotMovie(AnnotMovie* annot) {
+ windowParams.relativeTo = MovieWindowParameters::windowRelativeToDesktop;
+
+ if (annot->needFloatingWindow()) {
+ windowParams.type = MovieWindowParameters::movieWindowFloating;
+ }
+ if (annot->needFullscreen()) {
+ windowParams.type = MovieWindowParameters::movieWindowFullscreen;
+ }
+
+ int w, h;
+ int znum, zdenum;
+ annot->getMovieSize(w, h);
+ annot->getZoomFactor(znum, zdenum);
+ windowParams.width = int(w * double(znum) / zdenum);
+ windowParams.height = int(h * double(znum) / zdenum);
+
+ double x,y;
+ annot->getWindowPosition(x,y);
+ windowParams.XPosition = x;
+ windowParams.YPosition = y;
+
+ rate = annot->getRate();
+ // convert volume to [0 100]
+ volume = int((annot->getVolume() + 1.0) * 50);
+
+ AnnotMovie::RepeatMode mode = annot->getRepeatMode();
+ if (mode == AnnotMovie::repeatModeRepeat)
+ repeatCount = 0.0;
+
+ showControls = annot->getShowControls();
+
+ AnnotMovie::Time tStart = annot->getStart();
+ AnnotMovie::Time tDuration = annot->getDuration();
+
+ start.units = tStart.units;
+ start.units_per_second = tStart.units_per_second;
+
+ duration.units = tDuration.units;
+ duration.units_per_second = tDuration.units_per_second;
+}
+
+void MovieParameters::parseMediaPlayParameters(Object* obj) {
+
+ Object tmp;
+
+ if (obj->dictLookup("V", &tmp)->isInt()) {
+ volume = tmp.getInt();
+ }
+ tmp.free();
+
+ if (obj->dictLookup("C", &tmp)->isBool()) {
+ showControls = tmp.getBool();
+ }
+ tmp.free();
+
+ if (obj->dictLookup("F", &tmp)->isInt()) {
+ int t = tmp.getInt();
+
+ switch(t) {
+ case 0: fittingPolicy = fittingMeet; break;
+ case 1: fittingPolicy = fittingSlice; break;
+ case 2: fittingPolicy = fittingFill; break;
+ case 3: fittingPolicy = fittingScroll; break;
+ case 4: fittingPolicy = fittingHidden; break;
+ case 5: fittingPolicy = fittingUndefined; break;
+ }
+ }
+ tmp.free();
+
+ // duration parsing
+ // duration's default value is set to 0, which means : intrinsinc media duration
+ if (obj->dictLookup("D", &tmp)->isDict()) {
+ Object oname, ddict, tmp2;
+ if (tmp.dictLookup("S", &oname)->isName()) {
+ char* name = oname.getName();
+ if (!strcmp(name, "F"))
+ duration.units = -1; // infinity
+ else if (!strcmp(name, "T")) {
+ if (tmp.dictLookup("T", &ddict)->isDict()) {
+ if (ddict.dictLookup("V", &tmp2)->isNum()) {
+ duration.units = Gulong(tmp2.getNum());
+ }
+ tmp2.free();
+ }
+ ddict.free();
+ }
+ }
+ oname.free();
+ }
+ tmp.free();
+
+
+ if (obj->dictLookup("A", &tmp)->isBool()) {
+ autoPlay = tmp.getBool();
+ }
+ tmp.free();
+
+ if (obj->dictLookup("RC", &tmp)->isNum()) {
+ repeatCount = tmp.getNum();
+ }
+ tmp.free();
+
+}
+
+void MovieParameters::parseMediaScreenParameters(Object* obj) {
+ Object tmp;
+
+ if (obj->dictLookup("W", &tmp)->isInt()) {
+ int t = tmp.getInt();
+
+ switch(t) {
+ case 0: windowParams.type = MovieWindowParameters::movieWindowFloating; break;
+ case 1: windowParams.type = MovieWindowParameters::movieWindowFullscreen; break;
+ case 2: windowParams.type = MovieWindowParameters::movieWindowHidden; break;
+ case 3: windowParams.type = MovieWindowParameters::movieWindowEmbedded; break;
+ }
+ }
+ tmp.free();
+
+ // background color
+ if (obj->dictLookup("B", &tmp)->isArray()) {
+ Array* color = tmp.getArray();
+
+ Object component;
+
+ color->get(0, &component);
+ bgColor.r = component.getNum();
+ component.free();
+
+ color->get(1, &component);
+ bgColor.g = component.getNum();
+ component.free();
+
+ color->get(2, &component);
+ bgColor.b = component.getNum();
+ component.free();
+ }
+ tmp.free();
+
+
+ // opacity
+ if (obj->dictLookup("O", &tmp)->isNum()) {
+ opacity = tmp.getNum();
+ }
+ tmp.free();
+
+ if (windowParams.type == MovieWindowParameters::movieWindowFloating) {
+ Object winDict;
+ if (obj->dictLookup("F",&winDict)->isDict()) {
+ windowParams.parseFWParams(&winDict);
+ }
+ }
+}
+
+Movie::Movie() {
+ fileName = NULL;
+ contentType = NULL;
+ isEmbedded = gFalse;
+ embeddedStream = NULL;
+ posterStream = NULL;
+}
+
+Movie::~Movie() {
+ if (fileName)
+ delete fileName;
+ if (contentType)
+ delete contentType;
+
+ if (embeddedStream && (!embeddedStream->decRef())) {
+ delete embeddedStream;
+ }
+ if (posterStream && (!posterStream->decRef())) {
+ delete posterStream;
+ }
+}
+
+void Movie::parseAnnotMovie(AnnotMovie* annot) {
+ // AnnotMovie is not embedded
+ isEmbedded = gFalse;
+
+ fileName = annot->getFileName()->copy();
+
+ if (annot->getPosterStream()) {
+ posterStream = annot->getPosterStream();
+ posterStream->incRef();
+ }
+
+ MH.parseAnnotMovie(annot);
+ // deep copy of MH to BE
+ // (no distinction is made with AnnotMovie)
+ memcpy(&BE, &MH, sizeof(MH));
+}
+
+void Movie::parseMediaRendition(Object* obj) {
+
+ Object tmp, tmp2;
+ if (obj->dictLookup("S", &tmp)->isName()) {
+ if (!strcmp(tmp.getName(), "MR")) { // it's a media rendition
+
+ //
+ // parse Media Play Parameters
+ if (obj->dictLookup("P", &tmp2)->isDict()) { // media play parameters
+ Object params;
+ if (tmp2.dictLookup("MH", &params)->isDict()) {
+ MH.parseMediaPlayParameters(&params);
+ }
+ params.free();
+ if (tmp2.dictLookup("BE", &params)->isDict()) {
+ BE.parseMediaPlayParameters(&params);
+ }
+ params.free();
+ }
+ tmp2.free();
+ //
+ // parse Media Screen Parameters
+ if (obj->dictLookup("SP", &tmp2)->isDict()) { // media screen parameters
+ Object params;
+ if (tmp2.dictLookup("MH", &params)->isDict()) {
+ MH.parseMediaScreenParameters(&params);
+ }
+ params.free();
+ if (tmp2.dictLookup("BE", &params)->isDict()) {
+ BE.parseMediaScreenParameters(&params);
+ }
+ params.free();
+ }
+ tmp2.free();
+
+ //
+ // Parse media clip data
+ //
+ if (obj->dictLookup("C", &tmp2)->isDict()) { // media clip
+
+ tmp.free();
+ if (tmp2.dictLookup("S", &tmp)->isName()) {
+ if (!strcmp(tmp.getName(), "MCD")) { // media clip data
+ Object obj1, obj2;
+ if (tmp2.dictLookup("D", &obj1)->isDict()) {
+ if (obj1.dictLookup("F", &obj2)->isString()) {
+ fileName = obj2.getString()->copy();
+ }
+ obj2.free();
+
+ if (!obj1.dictLookup("EF", &obj2)->isNull()) {
+ tmp.free();
+ Object mref;
+ if (!obj2.dictLookupNF("F", &mref)->isNull()) {
+ isEmbedded = gTrue;
+ Object embedded;
+ obj2.dictLookup("F", &embedded);
+ if (embedded.isStream()) {
+ embeddedStream = embedded.getStream();
+ // "copy" stream
+ embeddedStream->incRef();
+ }
+ embedded.free();
+ }
+ mref.free();
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ if (tmp2.dictLookup("CT", &obj1)->isString()) {
+ contentType = obj1.getString()->copy();
+ }
+ obj1.free();
+ }
+ }
+ tmp.free();
+ }
+ tmp2.free();
+ }
+ }
+}
+
+
+void Movie::outputToFile(FILE* fp) {
+ embeddedStream->reset();
+
+ while (1) {
+ int c = embeddedStream->getChar();
+ if (c == EOF)
+ break;
+
+ fwrite(&c, 1, 1, fp);
+ }
+
+}
+
+Movie* Movie::copy() {
+
+ // call default copy constructor
+ Movie* new_movie = new Movie(*this);
+
+ if (contentType)
+ new_movie->contentType = contentType->copy();
+ if (fileName)
+ new_movie->fileName = fileName->copy();
+
+ if (new_movie->embeddedStream)
+ new_movie->embeddedStream->incRef();
+
+ if (new_movie->posterStream)
+ new_movie->posterStream->incRef();
+
+ return new_movie;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.h
new file mode 100644
index 00000000000..16584ad28dc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Movie.h
@@ -0,0 +1,177 @@
+//*********************************************************************************
+// Movie.h
+//---------------------------------------------------------------------------------
+//
+//---------------------------------------------------------------------------------
+// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//*********************************************************************************
+
+#ifndef _MOVIE_H_
+#define _MOVIE_H_
+
+#include "Object.h"
+#include "Annot.h"
+
+class GooList;
+
+
+struct MovieWindowParameters {
+
+ MovieWindowParameters();
+ ~MovieWindowParameters();
+
+ // parse from a floating window parameters dictionary
+ void parseFWParams(Object* obj);
+
+ enum MovieWindowType {
+ movieWindowFloating = 0,
+ movieWindowFullscreen,
+ movieWindowHidden, // ?
+ movieWindowEmbedded
+ };
+
+ enum MovieWindowRelativeTo {
+ windowRelativeToDocument = 0,
+ windowRelativeToApplication,
+ windowRelativeToDesktop
+ };
+
+
+ // DEFAULT VALUE
+
+ MovieWindowType type; // movieWindowEmbedded
+
+
+ int width; // -1
+ int height; // -1
+
+ // floating window position
+ MovieWindowRelativeTo relativeTo; // windowRelativeToDocument (or to desktop)
+ double XPosition; // 0.5
+ double YPosition; // 0.5
+
+ GBool hasTitleBar; // true
+ GBool hasCloseButton; // true
+ GBool isResizeable; // true
+};
+
+
+struct MovieParameters {
+
+ MovieParameters();
+ ~MovieParameters();
+
+ // parse from a "Media Play Parameters" dictionary
+ void parseMediaPlayParameters(Object* playObj);
+ // parse from a "Media Screen Parameters" dictionary
+ void parseMediaScreenParameters(Object* screenObj);
+ // parse from a AnnotMovie object
+ void parseAnnotMovie(AnnotMovie* annot);
+
+ enum MovieFittingPolicy {
+ fittingMeet = 0,
+ fittingSlice,
+ fittingFill,
+ fittingScroll,
+ fittingHidden,
+ fittingUndefined
+ };
+
+ struct MovieTime {
+ MovieTime() { units_per_second = 0; }
+ Gulong units;
+ int units_per_second; // 0 : defined by movie
+ };
+
+ struct Color {
+ double r, g, b;
+ };
+
+ Gushort rotationAngle; // 0
+
+ MovieTime start; // 0
+ MovieTime duration; // 0
+
+ double rate; // 1.0
+
+ int volume; // 100
+
+ // defined in media play parameters, p 770
+ // correspond to 'fit' SMIL's attribute
+ MovieFittingPolicy fittingPolicy; // fittingUndefined
+
+ GBool autoPlay; // true
+
+ // repeat count, can be real values, 0 means forever
+ double repeatCount; // 1.0
+
+ // background color // black = (0.0 0.0 0.0)
+ Color bgColor;
+
+ // opacity in [0.0 1.0]
+ double opacity; // 1.0
+
+
+ GBool showControls; // false
+
+ MovieWindowParameters windowParams;
+};
+
+class Movie {
+ public:
+ Movie();
+ ~Movie();
+
+ void parseAnnotMovie(AnnotMovie* annot);
+ void parseMediaRendition(Object* obj);
+
+ MovieParameters* getMHParameters() { return &MH; }
+ MovieParameters* getBEParameters() { return &BE; }
+
+ GooString* getContentType() { return contentType; }
+ GooString* getFileName() { return fileName; }
+
+ GBool getIsEmbedded() { return isEmbedded; }
+ Stream* getEmbbededStream() { return embeddedStream; }
+ // write embedded stream to file
+ void outputToFile(FILE*);
+
+ Stream* getPosterStream() { return posterStream; }
+
+ Movie* copy();
+
+ private:
+ // "Must Honor" parameters
+ MovieParameters MH;
+ // "Best Effort" parameters
+ MovieParameters BE;
+
+ Stream* posterStream;
+
+ GBool isEmbedded;
+
+ GooString* contentType;
+
+ // if it's embedded
+ Stream* embeddedStream;
+
+ // if it's not embedded
+ GooString* fileName;
+};
+
+#endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.cc
new file mode 100644
index 00000000000..efe1c4de0bd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.cc
@@ -0,0 +1,116 @@
+//========================================================================
+//
+// NameToCharCode.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include "goo/gmem.h"
+#include "NameToCharCode.h"
+
+//------------------------------------------------------------------------
+
+struct NameToCharCodeEntry {
+ char *name;
+ CharCode c;
+};
+
+//------------------------------------------------------------------------
+
+NameToCharCode::NameToCharCode() {
+ int i;
+
+ size = 31;
+ len = 0;
+ tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry));
+ for (i = 0; i < size; ++i) {
+ tab[i].name = NULL;
+ }
+}
+
+NameToCharCode::~NameToCharCode() {
+ int i;
+
+ for (i = 0; i < size; ++i) {
+ if (tab[i].name) {
+ gfree(tab[i].name);
+ }
+ }
+ gfree(tab);
+}
+
+void NameToCharCode::add(char *name, CharCode c) {
+ NameToCharCodeEntry *oldTab;
+ int h, i, oldSize;
+
+ // expand the table if necessary
+ if (len >= size / 2) {
+ oldSize = size;
+ oldTab = tab;
+ size = 2*size + 1;
+ tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry));
+ for (h = 0; h < size; ++h) {
+ tab[h].name = NULL;
+ }
+ for (i = 0; i < oldSize; ++i) {
+ if (oldTab[i].name) {
+ h = hash(oldTab[i].name);
+ while (tab[h].name) {
+ if (++h == size) {
+ h = 0;
+ }
+ }
+ tab[h] = oldTab[i];
+ }
+ }
+ gfree(oldTab);
+ }
+
+ // add the new name
+ h = hash(name);
+ while (tab[h].name && strcmp(tab[h].name, name)) {
+ if (++h == size) {
+ h = 0;
+ }
+ }
+ if (!tab[h].name) {
+ tab[h].name = copyString(name);
+ }
+ tab[h].c = c;
+
+ ++len;
+}
+
+CharCode NameToCharCode::lookup(char *name) {
+ int h;
+
+ h = hash(name);
+ while (tab[h].name) {
+ if (!strcmp(tab[h].name, name)) {
+ return tab[h].c;
+ }
+ if (++h == size) {
+ h = 0;
+ }
+ }
+ return 0;
+}
+
+int NameToCharCode::hash(char *name) {
+ char *p;
+ unsigned int h;
+
+ h = 0;
+ for (p = name; *p; ++p) {
+ h = 17 * h + (int)(*p & 0xff);
+ }
+ return (int)(h % size);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.h
new file mode 100644
index 00000000000..bc57c3736c1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToCharCode.h
@@ -0,0 +1,40 @@
+//========================================================================
+//
+// NameToCharCode.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef NAMETOCHARCODE_H
+#define NAMETOCHARCODE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "CharTypes.h"
+
+struct NameToCharCodeEntry;
+
+//------------------------------------------------------------------------
+
+class NameToCharCode {
+public:
+
+ NameToCharCode();
+ ~NameToCharCode();
+
+ void add(char *name, CharCode c);
+ CharCode lookup(char *name);
+
+private:
+
+ int hash(char *name);
+
+ NameToCharCodeEntry *tab;
+ int size;
+ int len;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToUnicodeTable.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToUnicodeTable.h
new file mode 100644
index 00000000000..0b1812c0c48
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/NameToUnicodeTable.h
@@ -0,0 +1,1097 @@
+//========================================================================
+//
+// NameToUnicodeTable.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+static struct {
+ Unicode u;
+ char *name;
+} nameToUnicodeTab[] = {
+ {0x0021, "!"},
+ {0x0023, "#"},
+ {0x0024, "$"},
+ {0x0025, "%"},
+ {0x0026, "&"},
+ {0x0027, "'"},
+ {0x0028, "("},
+ {0x0029, ")"},
+ {0x002a, "*"},
+ {0x002b, "+"},
+ {0x002c, ","},
+ {0x002d, "-"},
+ {0x002e, "."},
+ {0x002f, "/"},
+ {0x0030, "0"},
+ {0x0031, "1"},
+ {0x0032, "2"},
+ {0x0033, "3"},
+ {0x0034, "4"},
+ {0x0035, "5"},
+ {0x0036, "6"},
+ {0x0037, "7"},
+ {0x0038, "8"},
+ {0x0039, "9"},
+ {0x003a, ":"},
+ {0x003b, ";"},
+ {0x003c, "<"},
+ {0x003d, "="},
+ {0x003e, ">"},
+ {0x003f, "?"},
+ {0x0040, "@"},
+ {0x0041, "A"},
+ {0x00c6, "AE"},
+ {0x01fc, "AEacute"},
+ {0xf7e6, "AEsmall"},
+ {0x00c1, "Aacute"},
+ {0xf7e1, "Aacutesmall"},
+ {0x0102, "Abreve"},
+ {0x00c2, "Acircumflex"},
+ {0xf7e2, "Acircumflexsmall"},
+ {0xf6c9, "Acute"},
+ {0xf7b4, "Acutesmall"},
+ {0x00c4, "Adieresis"},
+ {0xf7e4, "Adieresissmall"},
+ {0x00c0, "Agrave"},
+ {0xf7e0, "Agravesmall"},
+ {0x0391, "Alpha"},
+ {0x0386, "Alphatonos"},
+ {0x0100, "Amacron"},
+ {0x0104, "Aogonek"},
+ {0x00c5, "Aring"},
+ {0x01fa, "Aringacute"},
+ {0xf7e5, "Aringsmall"},
+ {0xf761, "Asmall"},
+ {0x00c3, "Atilde"},
+ {0xf7e3, "Atildesmall"},
+ {0x0042, "B"},
+ {0x0392, "Beta"},
+ {0xf6f4, "Brevesmall"},
+ {0xf762, "Bsmall"},
+ {0x0043, "C"},
+ {0x0106, "Cacute"},
+ {0xf6ca, "Caron"},
+ {0xf6f5, "Caronsmall"},
+ {0x010c, "Ccaron"},
+ {0x00c7, "Ccedilla"},
+ {0xf7e7, "Ccedillasmall"},
+ {0x0108, "Ccircumflex"},
+ {0x010a, "Cdotaccent"},
+ {0xf7b8, "Cedillasmall"},
+ {0x03a7, "Chi"},
+ {0xf6f6, "Circumflexsmall"},
+ {0xf763, "Csmall"},
+ {0x0044, "D"},
+ {0x010e, "Dcaron"},
+ {0x0110, "Dcroat"},
+ {0x2206, "Delta"},
+ {0xf6cb, "Dieresis"},
+ {0xf6cc, "DieresisAcute"},
+ {0xf6cd, "DieresisGrave"},
+ {0xf7a8, "Dieresissmall"},
+ {0xf6f7, "Dotaccentsmall"},
+ {0xf764, "Dsmall"},
+ {0x0045, "E"},
+ {0x00c9, "Eacute"},
+ {0xf7e9, "Eacutesmall"},
+ {0x0114, "Ebreve"},
+ {0x011a, "Ecaron"},
+ {0x00ca, "Ecircumflex"},
+ {0xf7ea, "Ecircumflexsmall"},
+ {0x00cb, "Edieresis"},
+ {0xf7eb, "Edieresissmall"},
+ {0x0116, "Edotaccent"},
+ {0x00c8, "Egrave"},
+ {0xf7e8, "Egravesmall"},
+ {0x0112, "Emacron"},
+ {0x014a, "Eng"},
+ {0x0118, "Eogonek"},
+ {0x0395, "Epsilon"},
+ {0x0388, "Epsilontonos"},
+ {0xf765, "Esmall"},
+ {0x0397, "Eta"},
+ {0x0389, "Etatonos"},
+ {0x00d0, "Eth"},
+ {0xf7f0, "Ethsmall"},
+ {0x20ac, "Euro"},
+ {0x0046, "F"},
+ {0xf766, "Fsmall"},
+ {0x0047, "G"},
+ {0x0393, "Gamma"},
+ {0x011e, "Gbreve"},
+ {0x01e6, "Gcaron"},
+ {0x011c, "Gcircumflex"},
+ {0x0122, "Gcommaaccent"},
+ {0x0120, "Gdotaccent"},
+ {0xf6ce, "Grave"},
+ {0xf760, "Gravesmall"},
+ {0xf767, "Gsmall"},
+ {0x0048, "H"},
+ {0x25cf, "H18533"},
+ {0x25aa, "H18543"},
+ {0x25ab, "H18551"},
+ {0x25a1, "H22073"},
+ {0x0126, "Hbar"},
+ {0x0124, "Hcircumflex"},
+ {0xf768, "Hsmall"},
+ {0xf6cf, "Hungarumlaut"},
+ {0xf6f8, "Hungarumlautsmall"},
+ {0x0049, "I"},
+ {0x0132, "IJ"},
+ {0x00cd, "Iacute"},
+ {0xf7ed, "Iacutesmall"},
+ {0x012c, "Ibreve"},
+ {0x00ce, "Icircumflex"},
+ {0xf7ee, "Icircumflexsmall"},
+ {0x00cf, "Idieresis"},
+ {0xf7ef, "Idieresissmall"},
+ {0x0130, "Idotaccent"},
+ {0x2111, "Ifraktur"},
+ {0x00cc, "Igrave"},
+ {0xf7ec, "Igravesmall"},
+ {0x012a, "Imacron"},
+ {0x012e, "Iogonek"},
+ {0x0399, "Iota"},
+ {0x03aa, "Iotadieresis"},
+ {0x038a, "Iotatonos"},
+ {0xf769, "Ismall"},
+ {0x0128, "Itilde"},
+ {0x004a, "J"},
+ {0x0134, "Jcircumflex"},
+ {0xf76a, "Jsmall"},
+ {0x004b, "K"},
+ {0x039a, "Kappa"},
+ {0x0136, "Kcommaaccent"},
+ {0xf76b, "Ksmall"},
+ {0x004c, "L"},
+ {0xf6bf, "LL"},
+ {0x0139, "Lacute"},
+ {0x039b, "Lambda"},
+ {0x013d, "Lcaron"},
+ {0x013b, "Lcommaaccent"},
+ {0x013f, "Ldot"},
+ {0x0141, "Lslash"},
+ {0xf6f9, "Lslashsmall"},
+ {0xf76c, "Lsmall"},
+ {0x004d, "M"},
+ {0xf6d0, "Macron"},
+ {0xf7af, "Macronsmall"},
+ {0xf76d, "Msmall"},
+ {0x039c, "Mu"},
+ {0x004e, "N"},
+ {0x0143, "Nacute"},
+ {0x0147, "Ncaron"},
+ {0x0145, "Ncommaaccent"},
+ {0xf76e, "Nsmall"},
+ {0x00d1, "Ntilde"},
+ {0xf7f1, "Ntildesmall"},
+ {0x039d, "Nu"},
+ {0x004f, "O"},
+ {0x0152, "OE"},
+ {0xf6fa, "OEsmall"},
+ {0x00d3, "Oacute"},
+ {0xf7f3, "Oacutesmall"},
+ {0x014e, "Obreve"},
+ {0x00d4, "Ocircumflex"},
+ {0xf7f4, "Ocircumflexsmall"},
+ {0x00d6, "Odieresis"},
+ {0xf7f6, "Odieresissmall"},
+ {0xf6fb, "Ogoneksmall"},
+ {0x00d2, "Ograve"},
+ {0xf7f2, "Ogravesmall"},
+ {0x01a0, "Ohorn"},
+ {0x0150, "Ohungarumlaut"},
+ {0x014c, "Omacron"},
+ {0x2126, "Omega"},
+ {0x038f, "Omegatonos"},
+ {0x039f, "Omicron"},
+ {0x038c, "Omicrontonos"},
+ {0x00d8, "Oslash"},
+ {0x01fe, "Oslashacute"},
+ {0xf7f8, "Oslashsmall"},
+ {0xf76f, "Osmall"},
+ {0x00d5, "Otilde"},
+ {0xf7f5, "Otildesmall"},
+ {0x0050, "P"},
+ {0x03a6, "Phi"},
+ {0x03a0, "Pi"},
+ {0x03a8, "Psi"},
+ {0xf770, "Psmall"},
+ {0x0051, "Q"},
+ {0xf771, "Qsmall"},
+ {0x0052, "R"},
+ {0x0154, "Racute"},
+ {0x0158, "Rcaron"},
+ {0x0156, "Rcommaaccent"},
+ {0x211c, "Rfraktur"},
+ {0x03a1, "Rho"},
+ {0xf6fc, "Ringsmall"},
+ {0xf772, "Rsmall"},
+ {0x0053, "S"},
+ {0x250c, "SF010000"},
+ {0x2514, "SF020000"},
+ {0x2510, "SF030000"},
+ {0x2518, "SF040000"},
+ {0x253c, "SF050000"},
+ {0x252c, "SF060000"},
+ {0x2534, "SF070000"},
+ {0x251c, "SF080000"},
+ {0x2524, "SF090000"},
+ {0x2500, "SF100000"},
+ {0x2502, "SF110000"},
+ {0x2561, "SF190000"},
+ {0x2562, "SF200000"},
+ {0x2556, "SF210000"},
+ {0x2555, "SF220000"},
+ {0x2563, "SF230000"},
+ {0x2551, "SF240000"},
+ {0x2557, "SF250000"},
+ {0x255d, "SF260000"},
+ {0x255c, "SF270000"},
+ {0x255b, "SF280000"},
+ {0x255e, "SF360000"},
+ {0x255f, "SF370000"},
+ {0x255a, "SF380000"},
+ {0x2554, "SF390000"},
+ {0x2569, "SF400000"},
+ {0x2566, "SF410000"},
+ {0x2560, "SF420000"},
+ {0x2550, "SF430000"},
+ {0x256c, "SF440000"},
+ {0x2567, "SF450000"},
+ {0x2568, "SF460000"},
+ {0x2564, "SF470000"},
+ {0x2565, "SF480000"},
+ {0x2559, "SF490000"},
+ {0x2558, "SF500000"},
+ {0x2552, "SF510000"},
+ {0x2553, "SF520000"},
+ {0x256b, "SF530000"},
+ {0x256a, "SF540000"},
+ {0x015a, "Sacute"},
+ {0x0160, "Scaron"},
+ {0xf6fd, "Scaronsmall"},
+ {0x015e, "Scedilla"},
+ {0x015c, "Scircumflex"},
+ {0x0218, "Scommaaccent"},
+ {0x03a3, "Sigma"},
+ {0xf773, "Ssmall"},
+ {0x0054, "T"},
+ {0x03a4, "Tau"},
+ {0x0166, "Tbar"},
+ {0x0164, "Tcaron"},
+ {0x0162, "Tcommaaccent"},
+ {0x0398, "Theta"},
+ {0x00de, "Thorn"},
+ {0xf7fe, "Thornsmall"},
+ {0xf6fe, "Tildesmall"},
+ {0xf774, "Tsmall"},
+ {0x0055, "U"},
+ {0x00da, "Uacute"},
+ {0xf7fa, "Uacutesmall"},
+ {0x016c, "Ubreve"},
+ {0x00db, "Ucircumflex"},
+ {0xf7fb, "Ucircumflexsmall"},
+ {0x00dc, "Udieresis"},
+ {0xf7fc, "Udieresissmall"},
+ {0x00d9, "Ugrave"},
+ {0xf7f9, "Ugravesmall"},
+ {0x01af, "Uhorn"},
+ {0x0170, "Uhungarumlaut"},
+ {0x016a, "Umacron"},
+ {0x0172, "Uogonek"},
+ {0x03a5, "Upsilon"},
+ {0x03d2, "Upsilon1"},
+ {0x03ab, "Upsilondieresis"},
+ {0x038e, "Upsilontonos"},
+ {0x016e, "Uring"},
+ {0xf775, "Usmall"},
+ {0x0168, "Utilde"},
+ {0x0056, "V"},
+ {0xf776, "Vsmall"},
+ {0x0057, "W"},
+ {0x1e82, "Wacute"},
+ {0x0174, "Wcircumflex"},
+ {0x1e84, "Wdieresis"},
+ {0x1e80, "Wgrave"},
+ {0xf777, "Wsmall"},
+ {0x0058, "X"},
+ {0x039e, "Xi"},
+ {0xf778, "Xsmall"},
+ {0x0059, "Y"},
+ {0x00dd, "Yacute"},
+ {0xf7fd, "Yacutesmall"},
+ {0x0176, "Ycircumflex"},
+ {0x0178, "Ydieresis"},
+ {0xf7ff, "Ydieresissmall"},
+ {0x1ef2, "Ygrave"},
+ {0xf779, "Ysmall"},
+ {0x005a, "Z"},
+ {0x0179, "Zacute"},
+ {0x017d, "Zcaron"},
+ {0xf6ff, "Zcaronsmall"},
+ {0x017b, "Zdotaccent"},
+ {0x0396, "Zeta"},
+ {0xf77a, "Zsmall"},
+ {0x0022, "\""},
+ {0x005c, "\\"},
+ {0x005d, "]"},
+ {0x005e, "^"},
+ {0x005f, "_"},
+ {0x0060, "`"},
+ {0x0061, "a"},
+ {0x00e1, "aacute"},
+ {0x0103, "abreve"},
+ {0x00e2, "acircumflex"},
+ {0x00b4, "acute"},
+ {0x0301, "acutecomb"},
+ {0x00e4, "adieresis"},
+ {0x00e6, "ae"},
+ {0x01fd, "aeacute"},
+ {0x2015, "afii00208"},
+ {0x0410, "afii10017"},
+ {0x0411, "afii10018"},
+ {0x0412, "afii10019"},
+ {0x0413, "afii10020"},
+ {0x0414, "afii10021"},
+ {0x0415, "afii10022"},
+ {0x0401, "afii10023"},
+ {0x0416, "afii10024"},
+ {0x0417, "afii10025"},
+ {0x0418, "afii10026"},
+ {0x0419, "afii10027"},
+ {0x041a, "afii10028"},
+ {0x041b, "afii10029"},
+ {0x041c, "afii10030"},
+ {0x041d, "afii10031"},
+ {0x041e, "afii10032"},
+ {0x041f, "afii10033"},
+ {0x0420, "afii10034"},
+ {0x0421, "afii10035"},
+ {0x0422, "afii10036"},
+ {0x0423, "afii10037"},
+ {0x0424, "afii10038"},
+ {0x0425, "afii10039"},
+ {0x0426, "afii10040"},
+ {0x0427, "afii10041"},
+ {0x0428, "afii10042"},
+ {0x0429, "afii10043"},
+ {0x042a, "afii10044"},
+ {0x042b, "afii10045"},
+ {0x042c, "afii10046"},
+ {0x042d, "afii10047"},
+ {0x042e, "afii10048"},
+ {0x042f, "afii10049"},
+ {0x0490, "afii10050"},
+ {0x0402, "afii10051"},
+ {0x0403, "afii10052"},
+ {0x0404, "afii10053"},
+ {0x0405, "afii10054"},
+ {0x0406, "afii10055"},
+ {0x0407, "afii10056"},
+ {0x0408, "afii10057"},
+ {0x0409, "afii10058"},
+ {0x040a, "afii10059"},
+ {0x040b, "afii10060"},
+ {0x040c, "afii10061"},
+ {0x040e, "afii10062"},
+ {0xf6c4, "afii10063"},
+ {0xf6c5, "afii10064"},
+ {0x0430, "afii10065"},
+ {0x0431, "afii10066"},
+ {0x0432, "afii10067"},
+ {0x0433, "afii10068"},
+ {0x0434, "afii10069"},
+ {0x0435, "afii10070"},
+ {0x0451, "afii10071"},
+ {0x0436, "afii10072"},
+ {0x0437, "afii10073"},
+ {0x0438, "afii10074"},
+ {0x0439, "afii10075"},
+ {0x043a, "afii10076"},
+ {0x043b, "afii10077"},
+ {0x043c, "afii10078"},
+ {0x043d, "afii10079"},
+ {0x043e, "afii10080"},
+ {0x043f, "afii10081"},
+ {0x0440, "afii10082"},
+ {0x0441, "afii10083"},
+ {0x0442, "afii10084"},
+ {0x0443, "afii10085"},
+ {0x0444, "afii10086"},
+ {0x0445, "afii10087"},
+ {0x0446, "afii10088"},
+ {0x0447, "afii10089"},
+ {0x0448, "afii10090"},
+ {0x0449, "afii10091"},
+ {0x044a, "afii10092"},
+ {0x044b, "afii10093"},
+ {0x044c, "afii10094"},
+ {0x044d, "afii10095"},
+ {0x044e, "afii10096"},
+ {0x044f, "afii10097"},
+ {0x0491, "afii10098"},
+ {0x0452, "afii10099"},
+ {0x0453, "afii10100"},
+ {0x0454, "afii10101"},
+ {0x0455, "afii10102"},
+ {0x0456, "afii10103"},
+ {0x0457, "afii10104"},
+ {0x0458, "afii10105"},
+ {0x0459, "afii10106"},
+ {0x045a, "afii10107"},
+ {0x045b, "afii10108"},
+ {0x045c, "afii10109"},
+ {0x045e, "afii10110"},
+ {0x040f, "afii10145"},
+ {0x0462, "afii10146"},
+ {0x0472, "afii10147"},
+ {0x0474, "afii10148"},
+ {0xf6c6, "afii10192"},
+ {0x045f, "afii10193"},
+ {0x0463, "afii10194"},
+ {0x0473, "afii10195"},
+ {0x0475, "afii10196"},
+ {0xf6c7, "afii10831"},
+ {0xf6c8, "afii10832"},
+ {0x04d9, "afii10846"},
+ {0x200e, "afii299"},
+ {0x200f, "afii300"},
+ {0x200d, "afii301"},
+ {0x066a, "afii57381"},
+ {0x060c, "afii57388"},
+ {0x0660, "afii57392"},
+ {0x0661, "afii57393"},
+ {0x0662, "afii57394"},
+ {0x0663, "afii57395"},
+ {0x0664, "afii57396"},
+ {0x0665, "afii57397"},
+ {0x0666, "afii57398"},
+ {0x0667, "afii57399"},
+ {0x0668, "afii57400"},
+ {0x0669, "afii57401"},
+ {0x061b, "afii57403"},
+ {0x061f, "afii57407"},
+ {0x0621, "afii57409"},
+ {0x0622, "afii57410"},
+ {0x0623, "afii57411"},
+ {0x0624, "afii57412"},
+ {0x0625, "afii57413"},
+ {0x0626, "afii57414"},
+ {0x0627, "afii57415"},
+ {0x0628, "afii57416"},
+ {0x0629, "afii57417"},
+ {0x062a, "afii57418"},
+ {0x062b, "afii57419"},
+ {0x062c, "afii57420"},
+ {0x062d, "afii57421"},
+ {0x062e, "afii57422"},
+ {0x062f, "afii57423"},
+ {0x0630, "afii57424"},
+ {0x0631, "afii57425"},
+ {0x0632, "afii57426"},
+ {0x0633, "afii57427"},
+ {0x0634, "afii57428"},
+ {0x0635, "afii57429"},
+ {0x0636, "afii57430"},
+ {0x0637, "afii57431"},
+ {0x0638, "afii57432"},
+ {0x0639, "afii57433"},
+ {0x063a, "afii57434"},
+ {0x0640, "afii57440"},
+ {0x0641, "afii57441"},
+ {0x0642, "afii57442"},
+ {0x0643, "afii57443"},
+ {0x0644, "afii57444"},
+ {0x0645, "afii57445"},
+ {0x0646, "afii57446"},
+ {0x0648, "afii57448"},
+ {0x0649, "afii57449"},
+ {0x064a, "afii57450"},
+ {0x064b, "afii57451"},
+ {0x064c, "afii57452"},
+ {0x064d, "afii57453"},
+ {0x064e, "afii57454"},
+ {0x064f, "afii57455"},
+ {0x0650, "afii57456"},
+ {0x0651, "afii57457"},
+ {0x0652, "afii57458"},
+ {0x0647, "afii57470"},
+ {0x06a4, "afii57505"},
+ {0x067e, "afii57506"},
+ {0x0686, "afii57507"},
+ {0x0698, "afii57508"},
+ {0x06af, "afii57509"},
+ {0x0679, "afii57511"},
+ {0x0688, "afii57512"},
+ {0x0691, "afii57513"},
+ {0x06ba, "afii57514"},
+ {0x06d2, "afii57519"},
+ {0x06d5, "afii57534"},
+ {0x20aa, "afii57636"},
+ {0x05be, "afii57645"},
+ {0x05c3, "afii57658"},
+ {0x05d0, "afii57664"},
+ {0x05d1, "afii57665"},
+ {0x05d2, "afii57666"},
+ {0x05d3, "afii57667"},
+ {0x05d4, "afii57668"},
+ {0x05d5, "afii57669"},
+ {0x05d6, "afii57670"},
+ {0x05d7, "afii57671"},
+ {0x05d8, "afii57672"},
+ {0x05d9, "afii57673"},
+ {0x05da, "afii57674"},
+ {0x05db, "afii57675"},
+ {0x05dc, "afii57676"},
+ {0x05dd, "afii57677"},
+ {0x05de, "afii57678"},
+ {0x05df, "afii57679"},
+ {0x05e0, "afii57680"},
+ {0x05e1, "afii57681"},
+ {0x05e2, "afii57682"},
+ {0x05e3, "afii57683"},
+ {0x05e4, "afii57684"},
+ {0x05e5, "afii57685"},
+ {0x05e6, "afii57686"},
+ {0x05e7, "afii57687"},
+ {0x05e8, "afii57688"},
+ {0x05e9, "afii57689"},
+ {0x05ea, "afii57690"},
+ {0xfb2a, "afii57694"},
+ {0xfb2b, "afii57695"},
+ {0xfb4b, "afii57700"},
+ {0xfb1f, "afii57705"},
+ {0x05f0, "afii57716"},
+ {0x05f1, "afii57717"},
+ {0x05f2, "afii57718"},
+ {0xfb35, "afii57723"},
+ {0x05b4, "afii57793"},
+ {0x05b5, "afii57794"},
+ {0x05b6, "afii57795"},
+ {0x05bb, "afii57796"},
+ {0x05b8, "afii57797"},
+ {0x05b7, "afii57798"},
+ {0x05b0, "afii57799"},
+ {0x05b2, "afii57800"},
+ {0x05b1, "afii57801"},
+ {0x05b3, "afii57802"},
+ {0x05c2, "afii57803"},
+ {0x05c1, "afii57804"},
+ {0x05b9, "afii57806"},
+ {0x05bc, "afii57807"},
+ {0x05bd, "afii57839"},
+ {0x05bf, "afii57841"},
+ {0x05c0, "afii57842"},
+ {0x02bc, "afii57929"},
+ {0x2105, "afii61248"},
+ {0x2113, "afii61289"},
+ {0x2116, "afii61352"},
+ {0x202c, "afii61573"},
+ {0x202d, "afii61574"},
+ {0x202e, "afii61575"},
+ {0x200c, "afii61664"},
+ {0x066d, "afii63167"},
+ {0x02bd, "afii64937"},
+ {0x00e0, "agrave"},
+ {0x2135, "aleph"},
+ {0x03b1, "alpha"},
+ {0x03ac, "alphatonos"},
+ {0x0101, "amacron"},
+ {0x0026, "ampersand"},
+ {0xf726, "ampersandsmall"},
+ {0x2220, "angle"},
+ {0x2329, "angleleft"},
+ {0x232a, "angleright"},
+ {0x0387, "anoteleia"},
+ {0x0105, "aogonek"},
+ {0x2248, "approxequal"},
+ {0x00e5, "aring"},
+ {0x01fb, "aringacute"},
+ {0x2194, "arrowboth"},
+ {0x21d4, "arrowdblboth"},
+ {0x21d3, "arrowdbldown"},
+ {0x21d0, "arrowdblleft"},
+ {0x21d2, "arrowdblright"},
+ {0x21d1, "arrowdblup"},
+ {0x2193, "arrowdown"},
+ {0xf8e7, "arrowhorizex"},
+ {0x2190, "arrowleft"},
+ {0x2192, "arrowright"},
+ {0x2191, "arrowup"},
+ {0x2195, "arrowupdn"},
+ {0x21a8, "arrowupdnbse"},
+ {0xf8e6, "arrowvertex"},
+ {0x005e, "asciicircum"},
+ {0x007e, "asciitilde"},
+ {0x002a, "asterisk"},
+ {0x2217, "asteriskmath"},
+ {0xf6e9, "asuperior"},
+ {0x0040, "at"},
+ {0x00e3, "atilde"},
+ {0x0062, "b"},
+ {0x005c, "backslash"},
+ {0x007c, "bar"},
+ {0x03b2, "beta"},
+ {0x2588, "block"},
+ {0xf8f4, "braceex"},
+ {0x007b, "braceleft"},
+ {0xf8f3, "braceleftbt"},
+ {0xf8f2, "braceleftmid"},
+ {0xf8f1, "bracelefttp"},
+ {0x007d, "braceright"},
+ {0xf8fe, "bracerightbt"},
+ {0xf8fd, "bracerightmid"},
+ {0xf8fc, "bracerighttp"},
+ {0x005b, "bracketleft"},
+ {0xf8f0, "bracketleftbt"},
+ {0xf8ef, "bracketleftex"},
+ {0xf8ee, "bracketlefttp"},
+ {0x005d, "bracketright"},
+ {0xf8fb, "bracketrightbt"},
+ {0xf8fa, "bracketrightex"},
+ {0xf8f9, "bracketrighttp"},
+ {0x02d8, "breve"},
+ {0x00a6, "brokenbar"},
+ {0xf6ea, "bsuperior"},
+ {0x2022, "bullet"},
+ {0x0063, "c"},
+ {0x0107, "cacute"},
+ {0x02c7, "caron"},
+ {0x21b5, "carriagereturn"},
+ {0x010d, "ccaron"},
+ {0x00e7, "ccedilla"},
+ {0x0109, "ccircumflex"},
+ {0x010b, "cdotaccent"},
+ {0x00b8, "cedilla"},
+ {0x00a2, "cent"},
+ {0xf6df, "centinferior"},
+ {0xf7a2, "centoldstyle"},
+ {0xf6e0, "centsuperior"},
+ {0x03c7, "chi"},
+ {0x25cb, "circle"},
+ {0x2297, "circlemultiply"},
+ {0x2295, "circleplus"},
+ {0x02c6, "circumflex"},
+ {0x2663, "club"},
+ {0x003a, "colon"},
+ {0x20a1, "colonmonetary"},
+ {0x002c, "comma"},
+ {0xf6c3, "commaaccent"},
+ {0xf6e1, "commainferior"},
+ {0xf6e2, "commasuperior"},
+ {0x2245, "congruent"},
+ {0x00a9, "copyright"},
+ {0x00a9, "copyrightsans"},
+ {0x00a9, "copyrightserif"},
+ {0x00a4, "currency"},
+ {0xf6d1, "cyrBreve"},
+ {0xf6d2, "cyrFlex"},
+ {0xf6d4, "cyrbreve"},
+ {0xf6d5, "cyrflex"},
+ {0x0064, "d"},
+ {0x2020, "dagger"},
+ {0x2021, "daggerdbl"},
+ {0xf6d3, "dblGrave"},
+ {0xf6d6, "dblgrave"},
+ {0x010f, "dcaron"},
+ {0x0111, "dcroat"},
+ {0x00b0, "degree"},
+ {0x03b4, "delta"},
+ {0x2666, "diamond"},
+ {0x00a8, "dieresis"},
+ {0xf6d7, "dieresisacute"},
+ {0xf6d8, "dieresisgrave"},
+ {0x0385, "dieresistonos"},
+ {0x00f7, "divide"},
+ {0x2593, "dkshade"},
+ {0x2584, "dnblock"},
+ {0x0024, "dollar"},
+ {0xf6e3, "dollarinferior"},
+ {0xf724, "dollaroldstyle"},
+ {0xf6e4, "dollarsuperior"},
+ {0x20ab, "dong"},
+ {0x02d9, "dotaccent"},
+ {0x0323, "dotbelowcomb"},
+ {0x0131, "dotlessi"},
+ {0xf6be, "dotlessj"},
+ {0x22c5, "dotmath"},
+ {0xf6eb, "dsuperior"},
+ {0x0065, "e"},
+ {0x00e9, "eacute"},
+ {0x0115, "ebreve"},
+ {0x011b, "ecaron"},
+ {0x00ea, "ecircumflex"},
+ {0x00eb, "edieresis"},
+ {0x0117, "edotaccent"},
+ {0x00e8, "egrave"},
+ {0x0038, "eight"},
+ {0x2088, "eightinferior"},
+ {0xf738, "eightoldstyle"},
+ {0x2078, "eightsuperior"},
+ {0x2208, "element"},
+ {0x2026, "ellipsis"},
+ {0x0113, "emacron"},
+ {0x2014, "emdash"},
+ {0x2205, "emptyset"},
+ {0x2013, "endash"},
+ {0x014b, "eng"},
+ {0x0119, "eogonek"},
+ {0x03b5, "epsilon"},
+ {0x03ad, "epsilontonos"},
+ {0x003d, "equal"},
+ {0x2261, "equivalence"},
+ {0x212e, "estimated"},
+ {0xf6ec, "esuperior"},
+ {0x03b7, "eta"},
+ {0x03ae, "etatonos"},
+ {0x00f0, "eth"},
+ {0x0021, "exclam"},
+ {0x203c, "exclamdbl"},
+ {0x00a1, "exclamdown"},
+ {0xf7a1, "exclamdownsmall"},
+ {0x0021, "exclamleft"},
+ {0xf721, "exclamsmall"},
+ {0x2203, "existential"},
+ {0x0066, "f"},
+ {0x2640, "female"},
+ {0xfb00, "ff"},
+ {0xfb03, "ffi"},
+ {0xfb04, "ffl"},
+ {0xfb01, "fi"},
+ {0x2012, "figuredash"},
+ {0x25a0, "filledbox"},
+ {0x25ac, "filledrect"},
+ {0x0035, "five"},
+ {0x215d, "fiveeighths"},
+ {0x2085, "fiveinferior"},
+ {0xf735, "fiveoldstyle"},
+ {0x2075, "fivesuperior"},
+ {0xfb02, "fl"},
+ {0x0192, "florin"},
+ {0x0034, "four"},
+ {0x2084, "fourinferior"},
+ {0xf734, "fouroldstyle"},
+ {0x2074, "foursuperior"},
+ {0x2044, "fraction"},
+ {0x20a3, "franc"},
+ {0x0067, "g"},
+ {0x03b3, "gamma"},
+ {0x011f, "gbreve"},
+ {0x01e7, "gcaron"},
+ {0x011d, "gcircumflex"},
+ {0x0123, "gcommaaccent"},
+ {0x0121, "gdotaccent"},
+ {0x00df, "germandbls"},
+ {0x2207, "gradient"},
+ {0x0060, "grave"},
+ {0x0300, "gravecomb"},
+ {0x003e, "greater"},
+ {0x2265, "greaterequal"},
+ {0x00ab, "guillemotleft"},
+ {0x00bb, "guillemotright"},
+ {0x2039, "guilsinglleft"},
+ {0x203a, "guilsinglright"},
+ {0x0068, "h"},
+ {0x0127, "hbar"},
+ {0x0125, "hcircumflex"},
+ {0x2665, "heart"},
+ {0x0309, "hookabovecomb"},
+ {0x2302, "house"},
+ {0x02dd, "hungarumlaut"},
+ {0x002d, "hyphen"},
+ {0xf6e5, "hypheninferior"},
+ {0xf6e6, "hyphensuperior"},
+ {0x0069, "i"},
+ {0x00ed, "iacute"},
+ {0x012d, "ibreve"},
+ {0x00ee, "icircumflex"},
+ {0x00ef, "idieresis"},
+ {0x00ec, "igrave"},
+ {0x0133, "ij"},
+ {0x012b, "imacron"},
+ {0x221e, "infinity"},
+ {0x222b, "integral"},
+ {0x2321, "integralbt"},
+ {0xf8f5, "integralex"},
+ {0x2320, "integraltp"},
+ {0x2229, "intersection"},
+ {0x25d8, "invbullet"},
+ {0x25d9, "invcircle"},
+ {0x263b, "invsmileface"},
+ {0x012f, "iogonek"},
+ {0x03b9, "iota"},
+ {0x03ca, "iotadieresis"},
+ {0x0390, "iotadieresistonos"},
+ {0x03af, "iotatonos"},
+ {0xf6ed, "isuperior"},
+ {0x0129, "itilde"},
+ {0x006a, "j"},
+ {0x0135, "jcircumflex"},
+ {0x006b, "k"},
+ {0x03ba, "kappa"},
+ {0x0137, "kcommaaccent"},
+ {0x0138, "kgreenlandic"},
+ {0x006c, "l"},
+ {0x013a, "lacute"},
+ {0x03bb, "lambda"},
+ {0x013e, "lcaron"},
+ {0x013c, "lcommaaccent"},
+ {0x0140, "ldot"},
+ {0x003c, "less"},
+ {0x2264, "lessequal"},
+ {0x258c, "lfblock"},
+ {0x20a4, "lira"},
+ {0xf6c0, "ll"},
+ {0x2227, "logicaland"},
+ {0x00ac, "logicalnot"},
+ {0x2228, "logicalor"},
+ {0x017f, "longs"},
+ {0x25ca, "lozenge"},
+ {0x0142, "lslash"},
+ {0xf6ee, "lsuperior"},
+ {0x2591, "ltshade"},
+ {0x006d, "m"},
+ {0x00af, "macron"},
+ {0x2642, "male"},
+ {0x2212, "minus"},
+ {0x2032, "minute"},
+ {0xf6ef, "msuperior"},
+ {0x00b5, "mu"},
+ {0x00d7, "multiply"},
+ {0x266a, "musicalnote"},
+ {0x266b, "musicalnotedbl"},
+ {0x006e, "n"},
+ {0x0144, "nacute"},
+ {0x0149, "napostrophe"},
+ {0x00a0, "nbspace"},
+ {0x0148, "ncaron"},
+ {0x0146, "ncommaaccent"},
+ {0x0039, "nine"},
+ {0x2089, "nineinferior"},
+ {0xf739, "nineoldstyle"},
+ {0x2079, "ninesuperior"},
+ {0x00a0, "nonbreakingspace"},
+ {0x2209, "notelement"},
+ {0x2260, "notequal"},
+ {0x2284, "notsubset"},
+ {0x207f, "nsuperior"},
+ {0x00f1, "ntilde"},
+ {0x03bd, "nu"},
+ {0x0023, "numbersign"},
+ {0x006f, "o"},
+ {0x00f3, "oacute"},
+ {0x014f, "obreve"},
+ {0x00f4, "ocircumflex"},
+ {0x00f6, "odieresis"},
+ {0x0153, "oe"},
+ {0x02db, "ogonek"},
+ {0x00f2, "ograve"},
+ {0x01a1, "ohorn"},
+ {0x0151, "ohungarumlaut"},
+ {0x014d, "omacron"},
+ {0x03c9, "omega"},
+ {0x03d6, "omega1"},
+ {0x03ce, "omegatonos"},
+ {0x03bf, "omicron"},
+ {0x03cc, "omicrontonos"},
+ {0x0031, "one"},
+ {0x2024, "onedotenleader"},
+ {0x215b, "oneeighth"},
+ {0xf6dc, "onefitted"},
+ {0x00bd, "onehalf"},
+ {0x2081, "oneinferior"},
+ {0xf731, "oneoldstyle"},
+ {0x00bc, "onequarter"},
+ {0x00b9, "onesuperior"},
+ {0x2153, "onethird"},
+ {0x25e6, "openbullet"},
+ {0x00aa, "ordfeminine"},
+ {0x00ba, "ordmasculine"},
+ {0x221f, "orthogonal"},
+ {0x00f8, "oslash"},
+ {0x01ff, "oslashacute"},
+ {0xf6f0, "osuperior"},
+ {0x00f5, "otilde"},
+ {0x0070, "p"},
+ {0x00b6, "paragraph"},
+ {0x0028, "parenleft"},
+ {0xf8ed, "parenleftbt"},
+ {0xf8ec, "parenleftex"},
+ {0x208d, "parenleftinferior"},
+ {0x207d, "parenleftsuperior"},
+ {0xf8eb, "parenlefttp"},
+ {0x0029, "parenright"},
+ {0xf8f8, "parenrightbt"},
+ {0xf8f7, "parenrightex"},
+ {0x208e, "parenrightinferior"},
+ {0x207e, "parenrightsuperior"},
+ {0xf8f6, "parenrighttp"},
+ {0x2202, "partialdiff"},
+ {0x0025, "percent"},
+ {0x002e, "period"},
+ {0x00b7, "periodcentered"},
+ {0xf6e7, "periodinferior"},
+ {0xf6e8, "periodsuperior"},
+ {0x22a5, "perpendicular"},
+ {0x2030, "perthousand"},
+ {0x20a7, "peseta"},
+ {0x03c6, "phi"},
+ {0x03d5, "phi1"},
+ {0x03c0, "pi"},
+ {0x002b, "plus"},
+ {0x00b1, "plusminus"},
+ {0x211e, "prescription"},
+ {0x220f, "product"},
+ {0x2282, "propersubset"},
+ {0x2283, "propersuperset"},
+ {0x221d, "proportional"},
+ {0x03c8, "psi"},
+ {0x0071, "q"},
+ {0x003f, "question"},
+ {0x00bf, "questiondown"},
+ {0xf7bf, "questiondownsmall"},
+ {0xf73f, "questionsmall"},
+ {0x0022, "quotedbl"},
+ {0x201e, "quotedblbase"},
+ {0x201c, "quotedblleft"},
+ {0x201d, "quotedblright"},
+ {0x2018, "quoteleft"},
+ {0x201b, "quotereversed"},
+ {0x2019, "quoteright"},
+ {0x201a, "quotesinglbase"},
+ {0x0027, "quotesingle"},
+ {0x0072, "r"},
+ {0x0155, "racute"},
+ {0x221a, "radical"},
+ {0xf8e5, "radicalex"},
+ {0x0159, "rcaron"},
+ {0x0157, "rcommaaccent"},
+ {0x2286, "reflexsubset"},
+ {0x2287, "reflexsuperset"},
+ {0x00ae, "registered"},
+ {0x00ae, "registersans"},
+ {0x00ae, "registerserif"},
+ {0x2310, "revlogicalnot"},
+ {0x03c1, "rho"},
+ {0x02da, "ring"},
+ {0xf6f1, "rsuperior"},
+ {0x2590, "rtblock"},
+ {0xf6dd, "rupiah"},
+ {0x0073, "s"},
+ {0x015b, "sacute"},
+ {0x0161, "scaron"},
+ {0x015f, "scedilla"},
+ {0x015d, "scircumflex"},
+ {0x0219, "scommaaccent"},
+ {0x2033, "second"},
+ {0x00a7, "section"},
+ {0x003b, "semicolon"},
+ {0x0037, "seven"},
+ {0x215e, "seveneighths"},
+ {0x2087, "seveninferior"},
+ {0xf737, "sevenoldstyle"},
+ {0x2077, "sevensuperior"},
+ {0x2592, "shade"},
+ {0x03c3, "sigma"},
+ {0x03c2, "sigma1"},
+ {0x223c, "similar"},
+ {0x0036, "six"},
+ {0x2086, "sixinferior"},
+ {0xf736, "sixoldstyle"},
+ {0x2076, "sixsuperior"},
+ {0x002f, "slash"},
+ {0x263a, "smileface"},
+ {0x0020, "space"},
+ {0x2660, "spade"},
+ {0xf6f2, "ssuperior"},
+ {0x00a3, "sterling"},
+ {0x220b, "suchthat"},
+ {0x2211, "summation"},
+ {0x263c, "sun"},
+ {0x0074, "t"},
+ {0x03c4, "tau"},
+ {0x0167, "tbar"},
+ {0x0165, "tcaron"},
+ {0x0163, "tcommaaccent"},
+ {0x2234, "therefore"},
+ {0x03b8, "theta"},
+ {0x03d1, "theta1"},
+ {0x00fe, "thorn"},
+ {0x0033, "three"},
+ {0x215c, "threeeighths"},
+ {0x2083, "threeinferior"},
+ {0xf733, "threeoldstyle"},
+ {0x00be, "threequarters"},
+ {0xf6de, "threequartersemdash"},
+ {0x00b3, "threesuperior"},
+ {0x02dc, "tilde"},
+ {0x0303, "tildecomb"},
+ {0x0384, "tonos"},
+ {0x2122, "trademark"},
+ {0x2122, "trademarksans"},
+ {0x2122, "trademarkserif"},
+ {0x25bc, "triagdn"},
+ {0x25c4, "triaglf"},
+ {0x25ba, "triagrt"},
+ {0x25b2, "triagup"},
+ {0xf6f3, "tsuperior"},
+ {0x0032, "two"},
+ {0x2025, "twodotenleader"},
+ {0x2082, "twoinferior"},
+ {0xf732, "twooldstyle"},
+ {0x00b2, "twosuperior"},
+ {0x2154, "twothirds"},
+ {0x0075, "u"},
+ {0x00fa, "uacute"},
+ {0x016d, "ubreve"},
+ {0x00fb, "ucircumflex"},
+ {0x00fc, "udieresis"},
+ {0x00f9, "ugrave"},
+ {0x01b0, "uhorn"},
+ {0x0171, "uhungarumlaut"},
+ {0x016b, "umacron"},
+ {0x005f, "underscore"},
+ {0x2017, "underscoredbl"},
+ {0x222a, "union"},
+ {0x2200, "universal"},
+ {0x0173, "uogonek"},
+ {0x2580, "upblock"},
+ {0x03c5, "upsilon"},
+ {0x03cb, "upsilondieresis"},
+ {0x03b0, "upsilondieresistonos"},
+ {0x03cd, "upsilontonos"},
+ {0x016f, "uring"},
+ {0x0169, "utilde"},
+ {0x0076, "v"},
+ {0x0077, "w"},
+ {0x1e83, "wacute"},
+ {0x0175, "wcircumflex"},
+ {0x1e85, "wdieresis"},
+ {0x2118, "weierstrass"},
+ {0x1e81, "wgrave"},
+ {0x0078, "x"},
+ {0x03be, "xi"},
+ {0x0079, "y"},
+ {0x00fd, "yacute"},
+ {0x0177, "ycircumflex"},
+ {0x00ff, "ydieresis"},
+ {0x00a5, "yen"},
+ {0x1ef3, "ygrave"},
+ {0x007a, "z"},
+ {0x017a, "zacute"},
+ {0x017e, "zcaron"},
+ {0x017c, "zdotaccent"},
+ {0x0030, "zero"},
+ {0x2080, "zeroinferior"},
+ {0xf730, "zerooldstyle"},
+ {0x2070, "zerosuperior"},
+ {0x03b6, "zeta"},
+ {0x007b, "{"},
+ {0x007c, "|"},
+ {0x007d, "}"},
+ {0x007e, "~"},
+ { 0, NULL }
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.cc
new file mode 100644
index 00000000000..49b2d44452c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.cc
@@ -0,0 +1,247 @@
+//========================================================================
+//
+// Object.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Error.h"
+#include "Stream.h"
+#include "XRef.h"
+
+//------------------------------------------------------------------------
+// Object
+//------------------------------------------------------------------------
+
+static char *objTypeNames[numObjTypes] = {
+ "boolean",
+ "integer",
+ "real",
+ "string",
+ "name",
+ "null",
+ "array",
+ "dictionary",
+ "stream",
+ "ref",
+ "cmd",
+ "error",
+ "eof",
+ "none"
+};
+
+#ifdef DEBUG_MEM
+int Object::numAlloc[numObjTypes] =
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+#endif
+
+Object *Object::initArray(XRef *xref) {
+ initObj(objArray);
+ array = new Array(xref);
+ return this;
+}
+
+Object *Object::initDict(XRef *xref) {
+ initObj(objDict);
+ dict = new Dict(xref);
+ return this;
+}
+
+Object *Object::initDict(Dict *dictA) {
+ initObj(objDict);
+ dict = dictA;
+ dict->incRef();
+ return this;
+}
+
+Object *Object::initStream(Stream *streamA) {
+ initObj(objStream);
+ stream = streamA;
+ return this;
+}
+
+Object *Object::copy(Object *obj) {
+ *obj = *this;
+ switch (type) {
+ case objString:
+ obj->string = string->copy();
+ break;
+ case objName:
+ obj->name = copyString(name);
+ break;
+ case objArray:
+ array->incRef();
+ break;
+ case objDict:
+ dict->incRef();
+ break;
+ case objStream:
+ stream->incRef();
+ break;
+ case objCmd:
+ obj->cmd = copyString(cmd);
+ break;
+ default:
+ break;
+ }
+#ifdef DEBUG_MEM
+ ++numAlloc[type];
+#endif
+ return obj;
+}
+
+Object *Object::fetch(XRef *xref, Object *obj) {
+ return (type == objRef && xref) ?
+ xref->fetch(ref.num, ref.gen, obj) : copy(obj);
+}
+
+void Object::free() {
+ switch (type) {
+ case objString:
+ delete string;
+ break;
+ case objName:
+ gfree(name);
+ break;
+ case objArray:
+ if (!array->decRef()) {
+ delete array;
+ }
+ break;
+ case objDict:
+ if (!dict->decRef()) {
+ delete dict;
+ }
+ break;
+ case objStream:
+ if (!stream->decRef()) {
+ delete stream;
+ }
+ break;
+ case objCmd:
+ gfree(cmd);
+ break;
+ default:
+ break;
+ }
+#ifdef DEBUG_MEM
+ --numAlloc[type];
+#endif
+ type = objNone;
+}
+
+char *Object::getTypeName() {
+ return objTypeNames[type];
+}
+
+void Object::print(FILE *f) {
+ Object obj;
+ int i;
+
+ switch (type) {
+ case objBool:
+ fprintf(f, "%s", booln ? "true" : "false");
+ break;
+ case objInt:
+ fprintf(f, "%d", intg);
+ break;
+ case objReal:
+ fprintf(f, "%g", real);
+ break;
+ case objString:
+ fprintf(f, "(");
+ fwrite(string->getCString(), 1, string->getLength(), f);
+ fprintf(f, ")");
+ break;
+ case objName:
+ fprintf(f, "/%s", name);
+ break;
+ case objNull:
+ fprintf(f, "null");
+ break;
+ case objArray:
+ fprintf(f, "[");
+ for (i = 0; i < arrayGetLength(); ++i) {
+ if (i > 0)
+ fprintf(f, " ");
+ arrayGetNF(i, &obj);
+ obj.print(f);
+ obj.free();
+ }
+ fprintf(f, "]");
+ break;
+ case objDict:
+ fprintf(f, "<<");
+ for (i = 0; i < dictGetLength(); ++i) {
+ fprintf(f, " /%s ", dictGetKey(i));
+ dictGetValNF(i, &obj);
+ obj.print(f);
+ obj.free();
+ }
+ fprintf(f, " >>");
+ break;
+ case objStream:
+ fprintf(f, "<stream>");
+ break;
+ case objRef:
+ fprintf(f, "%d %d R", ref.num, ref.gen);
+ break;
+ case objCmd:
+ fprintf(f, "%s", cmd);
+ break;
+ case objError:
+ fprintf(f, "<error>");
+ break;
+ case objEOF:
+ fprintf(f, "<EOF>");
+ break;
+ case objNone:
+ fprintf(f, "<none>");
+ break;
+ }
+}
+
+void Object::memCheck(FILE *f) {
+#ifdef DEBUG_MEM
+ int i;
+ int t;
+
+ t = 0;
+ for (i = 0; i < numObjTypes; ++i)
+ t += numAlloc[i];
+ if (t > 0) {
+ fprintf(f, "Allocated objects:\n");
+ for (i = 0; i < numObjTypes; ++i) {
+ if (numAlloc[i] > 0)
+ fprintf(f, " %-20s: %6d\n", objTypeNames[i], numAlloc[i]);
+ }
+ }
+#else
+ (void)f;
+#endif
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.h
new file mode 100644
index 00000000000..eb3fc33e2b5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Object.h
@@ -0,0 +1,351 @@
+//========================================================================
+//
+// Object.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Kees Cook <kees@outflux.net>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Jakub Wilk <ubanus@users.sf.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef OBJECT_H
+#define OBJECT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "goo/gtypes.h"
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "Error.h"
+
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
+# define likely(x) __builtin_expect((x), 1)
+# define unlikely(x) __builtin_expect((x), 0)
+#else
+# define likely(x) (x)
+# define unlikely(x) (x)
+#endif
+
+#define OBJECT_TYPE_CHECK(wanted_type) \
+ if (unlikely(type != wanted_type)) { \
+ error(0, (char *) "Call to Object where the object was type %d, " \
+ "not the expected type %d", type, wanted_type); \
+ abort(); \
+ }
+
+#define OBJECT_2TYPES_CHECK(wanted_type1, wanted_type2) \
+ if (unlikely(type != wanted_type1) && unlikely(type != wanted_type2)) { \
+ error(0, (char *) "Call to Object where the object was type %d, " \
+ "not the expected type %d or %d", type, wanted_type1, wanted_type2); \
+ abort(); \
+ }
+
+class XRef;
+class Array;
+class Dict;
+class Stream;
+
+//------------------------------------------------------------------------
+// Ref
+//------------------------------------------------------------------------
+
+struct Ref {
+ int num; // object number
+ int gen; // generation number
+};
+
+//------------------------------------------------------------------------
+// object types
+//------------------------------------------------------------------------
+
+enum ObjType {
+ // simple objects
+ objBool, // boolean
+ objInt, // integer
+ objReal, // real
+ objString, // string
+ objName, // name
+ objNull, // null
+
+ // complex objects
+ objArray, // array
+ objDict, // dictionary
+ objStream, // stream
+ objRef, // indirect reference
+
+ // special objects
+ objCmd, // command name
+ objError, // error return from Lexer
+ objEOF, // end of file return from Lexer
+ objNone // uninitialized object
+};
+
+#define numObjTypes 14 // total number of object types
+
+//------------------------------------------------------------------------
+// Object
+//------------------------------------------------------------------------
+
+#ifdef DEBUG_MEM
+#define initObj(t) zeroUnion(); ++numAlloc[type = t]
+#else
+#define initObj(t) zeroUnion(); type = t
+#endif
+
+class Object {
+public:
+ // clear the anonymous union as best we can -- clear at least a pointer
+ void zeroUnion() { this->name = NULL; }
+
+ // Default constructor.
+ Object():
+ type(objNone) { zeroUnion(); }
+
+ // Initialize an object.
+ Object *initBool(GBool boolnA)
+ { initObj(objBool); booln = boolnA; return this; }
+ Object *initInt(int intgA)
+ { initObj(objInt); intg = intgA; return this; }
+ Object *initReal(double realA)
+ { initObj(objReal); real = realA; return this; }
+ Object *initString(GooString *stringA)
+ { initObj(objString); string = stringA; return this; }
+ Object *initName(char *nameA)
+ { initObj(objName); name = copyString(nameA); return this; }
+ Object *initNull()
+ { initObj(objNull); return this; }
+ Object *initArray(XRef *xref);
+ Object *initDict(XRef *xref);
+ Object *initDict(Dict *dictA);
+ Object *initStream(Stream *streamA);
+ Object *initRef(int numA, int genA)
+ { initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
+ Object *initCmd(char *cmdA)
+ { initObj(objCmd); cmd = copyString(cmdA); return this; }
+ Object *initError()
+ { initObj(objError); return this; }
+ Object *initEOF()
+ { initObj(objEOF); return this; }
+
+ // Copy an object.
+ Object *copy(Object *obj);
+ Object *shallowCopy(Object *obj) {
+ *obj = *this;
+ return obj;
+ }
+
+ // If object is a Ref, fetch and return the referenced object.
+ // Otherwise, return a copy of the object.
+ Object *fetch(XRef *xref, Object *obj);
+
+ // Free object contents.
+ void free();
+
+ // Type checking.
+ ObjType getType() { return type; }
+ GBool isBool() { return type == objBool; }
+ GBool isInt() { return type == objInt; }
+ GBool isReal() { return type == objReal; }
+ GBool isNum() { return type == objInt || type == objReal; }
+ GBool isString() { return type == objString; }
+ GBool isName() { return type == objName; }
+ GBool isNull() { return type == objNull; }
+ GBool isArray() { return type == objArray; }
+ GBool isDict() { return type == objDict; }
+ GBool isStream() { return type == objStream; }
+ GBool isRef() { return type == objRef; }
+ GBool isCmd() { return type == objCmd; }
+ GBool isError() { return type == objError; }
+ GBool isEOF() { return type == objEOF; }
+ GBool isNone() { return type == objNone; }
+
+ // Special type checking.
+ GBool isName(char *nameA)
+ { return type == objName && !strcmp(name, nameA); }
+ GBool isDict(char *dictType);
+ GBool isStream(char *dictType);
+ GBool isCmd(char *cmdA)
+ { return type == objCmd && !strcmp(cmd, cmdA); }
+
+ // Accessors.
+ GBool getBool() { OBJECT_TYPE_CHECK(objBool); return booln; }
+ int getInt() { OBJECT_TYPE_CHECK(objInt); return intg; }
+ double getReal() { OBJECT_TYPE_CHECK(objReal); return real; }
+ double getNum() { OBJECT_2TYPES_CHECK(objInt, objReal); return type == objInt ? (double)intg : real; }
+ GooString *getString() { OBJECT_TYPE_CHECK(objString); return string; }
+ char *getName() { OBJECT_TYPE_CHECK(objName); return name; }
+ Array *getArray() { OBJECT_TYPE_CHECK(objArray); return array; }
+ Dict *getDict() { OBJECT_TYPE_CHECK(objDict); return dict; }
+ Stream *getStream() { OBJECT_TYPE_CHECK(objStream); return stream; }
+ Ref getRef() { OBJECT_TYPE_CHECK(objRef); return ref; }
+ int getRefNum() { OBJECT_TYPE_CHECK(objRef); return ref.num; }
+ int getRefGen() { OBJECT_TYPE_CHECK(objRef); return ref.gen; }
+ char *getCmd() { OBJECT_TYPE_CHECK(objCmd); return cmd; }
+
+ // Array accessors.
+ int arrayGetLength();
+ void arrayAdd(Object *elem);
+ Object *arrayGet(int i, Object *obj);
+ Object *arrayGetNF(int i, Object *obj);
+
+ // Dict accessors.
+ int dictGetLength();
+ void dictAdd(char *key, Object *val);
+ void dictSet(char *key, Object *val);
+ GBool dictIs(char *dictType);
+ Object *dictLookup(char *key, Object *obj);
+ Object *dictLookupNF(char *key, Object *obj);
+ char *dictGetKey(int i);
+ Object *dictGetVal(int i, Object *obj);
+ Object *dictGetValNF(int i, Object *obj);
+
+ // Stream accessors.
+ GBool streamIs(char *dictType);
+ void streamReset();
+ void streamClose();
+ int streamGetChar();
+ int streamLookChar();
+ char *streamGetLine(char *buf, int size);
+ Guint streamGetPos();
+ void streamSetPos(Guint pos, int dir = 0);
+ Dict *streamGetDict();
+
+ // Output.
+ char *getTypeName();
+ void print(FILE *f = stdout);
+
+ // Memory testing.
+ static void memCheck(FILE *f);
+
+private:
+
+ ObjType type; // object type
+ union { // value for each type:
+ GBool booln; // boolean
+ int intg; // integer
+ double real; // real
+ GooString *string; // string
+ char *name; // name
+ Array *array; // array
+ Dict *dict; // dictionary
+ Stream *stream; // stream
+ Ref ref; // indirect reference
+ char *cmd; // command
+ };
+
+#ifdef DEBUG_MEM
+ static int // number of each type of object
+ numAlloc[numObjTypes]; // currently allocated
+#endif
+};
+
+//------------------------------------------------------------------------
+// Array accessors.
+//------------------------------------------------------------------------
+
+#include "Array.h"
+
+inline int Object::arrayGetLength()
+ { OBJECT_TYPE_CHECK(objArray); return array->getLength(); }
+
+inline void Object::arrayAdd(Object *elem)
+ { OBJECT_TYPE_CHECK(objArray); array->add(elem); }
+
+inline Object *Object::arrayGet(int i, Object *obj)
+ { OBJECT_TYPE_CHECK(objArray); return array->get(i, obj); }
+
+inline Object *Object::arrayGetNF(int i, Object *obj)
+ { OBJECT_TYPE_CHECK(objArray); return array->getNF(i, obj); }
+
+//------------------------------------------------------------------------
+// Dict accessors.
+//------------------------------------------------------------------------
+
+#include "Dict.h"
+
+inline int Object::dictGetLength()
+ { OBJECT_TYPE_CHECK(objDict); return dict->getLength(); }
+
+inline void Object::dictAdd(char *key, Object *val)
+ { OBJECT_TYPE_CHECK(objDict); dict->add(key, val); }
+
+inline void Object::dictSet(char *key, Object *val)
+ { OBJECT_TYPE_CHECK(objDict); dict->set(key, val); }
+
+inline GBool Object::dictIs(char *dictType)
+ { OBJECT_TYPE_CHECK(objDict); return dict->is(dictType); }
+
+inline GBool Object::isDict(char *dictType)
+ { return type == objDict && dictIs(dictType); }
+
+inline Object *Object::dictLookup(char *key, Object *obj)
+ { OBJECT_TYPE_CHECK(objDict); return dict->lookup(key, obj); }
+
+inline Object *Object::dictLookupNF(char *key, Object *obj)
+ { OBJECT_TYPE_CHECK(objDict); return dict->lookupNF(key, obj); }
+
+inline char *Object::dictGetKey(int i)
+ { OBJECT_TYPE_CHECK(objDict); return dict->getKey(i); }
+
+inline Object *Object::dictGetVal(int i, Object *obj)
+ { OBJECT_TYPE_CHECK(objDict); return dict->getVal(i, obj); }
+
+inline Object *Object::dictGetValNF(int i, Object *obj)
+ { OBJECT_TYPE_CHECK(objDict); return dict->getValNF(i, obj); }
+
+//------------------------------------------------------------------------
+// Stream accessors.
+//------------------------------------------------------------------------
+
+#include "Stream.h"
+
+inline GBool Object::streamIs(char *dictType)
+ { OBJECT_TYPE_CHECK(objStream); return stream->getDict()->is(dictType); }
+
+inline GBool Object::isStream(char *dictType)
+ { return type == objStream && streamIs(dictType); }
+
+inline void Object::streamReset()
+ { OBJECT_TYPE_CHECK(objStream); stream->reset(); }
+
+inline void Object::streamClose()
+ { OBJECT_TYPE_CHECK(objStream); stream->close(); }
+
+inline int Object::streamGetChar()
+ { OBJECT_TYPE_CHECK(objStream); return stream->getChar(); }
+
+inline int Object::streamLookChar()
+ { OBJECT_TYPE_CHECK(objStream); return stream->lookChar(); }
+
+inline char *Object::streamGetLine(char *buf, int size)
+ { OBJECT_TYPE_CHECK(objStream); return stream->getLine(buf, size); }
+
+inline Guint Object::streamGetPos()
+ { OBJECT_TYPE_CHECK(objStream); return stream->getPos(); }
+
+inline void Object::streamSetPos(Guint pos, int dir)
+ { OBJECT_TYPE_CHECK(objStream); stream->setPos(pos, dir); }
+
+inline Dict *Object::streamGetDict()
+ { OBJECT_TYPE_CHECK(objStream); return stream->getDict(); }
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.cc
new file mode 100644
index 00000000000..95686949d49
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.cc
@@ -0,0 +1,321 @@
+//========================================================================
+//
+// OptionalContent.cc
+//
+// Copyright 2007 Brad Hards <bradh@kde.org>
+// Copyright 2008 Pino Toscano <pino@kde.org>
+// Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright 2008, 2010 Albert Astals Cid <aacid@kde.org>
+// Copyright 2008 Mark Kaplan <mkaplan@finjan.com>
+//
+// Released under the GPL (version 2, or later, at your option)
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "Error.h"
+// #include "PDFDocEncoding.h"
+#include "OptionalContent.h"
+
+//------------------------------------------------------------------------
+
+OCGs::OCGs(Object *ocgObject, XRef *xref) :
+ m_xref(xref)
+{
+ // we need to parse the dictionary here, and build optionalContentGroups
+ ok = gTrue;
+ optionalContentGroups = new GooList();
+
+ Object ocgList;
+ ocgObject->dictLookup("OCGs", &ocgList);
+ if (!ocgList.isArray()) {
+ error(-1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array");
+ ocgList.free();
+ ok = gFalse;
+ return;
+ }
+
+ // we now enumerate over the ocgList, and build up the optionalContentGroups list.
+ for(int i = 0; i < ocgList.arrayGetLength(); ++i) {
+ Object ocg;
+ ocgList.arrayGet(i, &ocg);
+ if (!ocg.isDict()) {
+ ocg.free();
+ break;
+ }
+ OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict());
+ ocg.free();
+ ocgList.arrayGetNF(i, &ocg);
+ // TODO: we should create a lookup map from Ref to the OptionalContentGroup
+ thisOptionalContentGroup->setRef( ocg.getRef() );
+ ocg.free();
+ // the default is ON - we change state later, depending on BaseState, ON and OFF
+ thisOptionalContentGroup->setState(OptionalContentGroup::On);
+ optionalContentGroups->append(thisOptionalContentGroup);
+ }
+
+ Object defaultOcgConfig;
+ ocgObject->dictLookup("D", &defaultOcgConfig);
+ if (!defaultOcgConfig.isDict()) {
+ error(-1, "Expected the default config, but wasn't able to find it, or it isn't a Dictionary");
+ defaultOcgConfig.free();
+ ocgList.free();
+ ok = gFalse;
+ return;
+ }
+#if 0
+ // this is untested - we need an example showing BaseState
+ Object baseState;
+ defaultOcgConfig.dictLookup("BaseState", &baseState);
+ if (baseState.isString()) {
+ // read the value, and set each OptionalContentGroup entry appropriately
+ }
+ baseState.free();
+#endif
+ Object on;
+ defaultOcgConfig.dictLookup("ON", &on);
+ if (on.isArray()) {
+ // ON is an optional element
+ for (int i = 0; i < on.arrayGetLength(); ++i) {
+ Object reference;
+ on.arrayGetNF(i, &reference);
+ if (!reference.isRef()) {
+ // there can be null entries
+ reference.free();
+ break;
+ }
+ OptionalContentGroup *group = findOcgByRef( reference.getRef() );
+ reference.free();
+ if (!group) {
+ error(-1, "Couldn't find group for reference");
+ break;
+ }
+ group->setState(OptionalContentGroup::On);
+ }
+ }
+ on.free();
+
+ Object off;
+ defaultOcgConfig.dictLookup("OFF", &off);
+ if (off.isArray()) {
+ // OFF is an optional element
+ for (int i = 0; i < off.arrayGetLength(); ++i) {
+ Object reference;
+ off.arrayGetNF(i, &reference);
+ if (!reference.isRef()) {
+ // there can be null entries
+ reference.free();
+ break;
+ }
+ OptionalContentGroup *group = findOcgByRef( reference.getRef() );
+ reference.free();
+ if (!group) {
+ error(-1, "Couldn't find group for reference to set OFF");
+ break;
+ }
+ group->setState(OptionalContentGroup::Off);
+ }
+ }
+ off.free();
+
+ defaultOcgConfig.dictLookup("Order", &order);
+ defaultOcgConfig.dictLookup("RBGroups", &rbgroups);
+
+ ocgList.free();
+ defaultOcgConfig.free();
+}
+
+OCGs::~OCGs()
+{
+ deleteGooList(optionalContentGroups, OptionalContentGroup);
+ order.free();
+ rbgroups.free();
+}
+
+
+bool OCGs::hasOCGs()
+{
+ return ( optionalContentGroups->getLength() > 0 );
+}
+
+OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref)
+{
+ //TODO: make this more efficient
+ OptionalContentGroup *ocg = NULL;
+ for (int i=0; i < optionalContentGroups->getLength(); ++i) {
+ ocg = (OptionalContentGroup*)optionalContentGroups->get(i);
+ if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) {
+ return ocg;
+ }
+ }
+
+ error(-1, "Could not find a OCG with Ref (%d:%d)", ref.num, ref.gen);
+
+ // not found
+ return NULL;
+}
+
+bool OCGs::optContentIsVisible( Object *dictRef )
+{
+ Object dictObj;
+ Dict *dict;
+ Object dictType;
+ Object ocg;
+ Object policy;
+ bool result = true;
+ dictRef->fetch( m_xref, &dictObj );
+ if ( ! dictObj.isDict() ) {
+ error(-1, "Unexpected oc reference target: %i", dictObj.getType() );
+ dictObj.free();
+ return result;
+ }
+ dict = dictObj.getDict();
+ // printf("checking if optContent is visible\n");
+ dict->lookup("Type", &dictType);
+ if (dictType.isName("OCMD")) {
+ // If we supported Visibility Expressions, we'd check
+ // for a VE entry, and then call out to the parser here...
+ // printf("found OCMD dict\n");
+ dict->lookup("P", &policy);
+ dict->lookupNF("OCGs", &ocg);
+ if (ocg.isArray()) {
+ if (policy.isName("AllOn")) {
+ result = allOn( ocg.getArray() );
+ } else if (policy.isName("AllOff")) {
+ result = allOff( ocg.getArray() );
+ } else if (policy.isName("AnyOff")) {
+ result = anyOff( ocg.getArray() );
+ } else if ( (!policy.isName()) || (policy.isName("AnyOn") ) ) {
+ // this is the default
+ result = anyOn( ocg.getArray() );
+ }
+ } else if (ocg.isRef()) {
+ OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );
+ if ( oc && oc->getState() == OptionalContentGroup::Off ) {
+ result = false;
+ } else {
+ result = true ;
+ }
+ }
+ ocg.free();
+ policy.free();
+ } else if ( dictType.isName("OCG") ) {
+ OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() );
+ if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
+ result=false;
+ }
+ }
+ dictType.free();
+ dictObj.free();
+ // printf("visibility: %s\n", result? "on" : "off");
+ return result;
+}
+
+bool OCGs::allOn( Array *ocgArray )
+{
+ for (int i = 0; i < ocgArray->getLength(); ++i) {
+ Object ocgItem;
+ ocgArray->getNF(i, &ocgItem);
+ if (ocgItem.isRef()) {
+ OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
+ if ( oc && oc->getState() == OptionalContentGroup::Off ) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+bool OCGs::allOff( Array *ocgArray )
+{
+ for (int i = 0; i < ocgArray->getLength(); ++i) {
+ Object ocgItem;
+ ocgArray->getNF(i, &ocgItem);
+ if (ocgItem.isRef()) {
+ OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
+ if ( oc && oc->getState() == OptionalContentGroup::On ) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+bool OCGs::anyOn( Array *ocgArray )
+{
+ for (int i = 0; i < ocgArray->getLength(); ++i) {
+ Object ocgItem;
+ ocgArray->getNF(i, &ocgItem);
+ if (ocgItem.isRef()) {
+ OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
+ if ( oc && oc->getState() == OptionalContentGroup::On ) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool OCGs::anyOff( Array *ocgArray )
+{
+ for (int i = 0; i < ocgArray->getLength(); ++i) {
+ Object ocgItem;
+ ocgArray->getNF(i, &ocgItem);
+ if (ocgItem.isRef()) {
+ OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );
+ if ( oc && oc->getState() == OptionalContentGroup::Off ) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+//------------------------------------------------------------------------
+
+OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL)
+{
+ Object ocgName;
+ ocgDict->lookup("Name", &ocgName);
+ if (!ocgName.isString()) {
+ error(-1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String");
+ } else {
+ m_name = new GooString( ocgName.getString() );
+ }
+ ocgName.free();
+}
+
+OptionalContentGroup::OptionalContentGroup(GooString *label)
+{
+ m_name = label;
+ m_state = On;
+}
+
+GooString* OptionalContentGroup::getName() const
+{
+ return m_name;
+}
+
+void OptionalContentGroup::setRef(const Ref ref)
+{
+ m_ref = ref;
+}
+
+Ref OptionalContentGroup::getRef() const
+{
+ return m_ref;
+}
+
+OptionalContentGroup::~OptionalContentGroup()
+{
+ delete m_name;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.h
new file mode 100644
index 00000000000..7add4a3c11e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/OptionalContent.h
@@ -0,0 +1,93 @@
+//========================================================================
+//
+// OptionalContent.h
+//
+// Copyright 2007 Brad Hards <bradh@kde.org>
+// Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// Released under the GPL (version 2, or later, at your option)
+//
+//========================================================================
+
+#ifndef OPTIONALCONTENT_H
+#define OPTIONALCONTENT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+#include "CharTypes.h"
+
+class GooString;
+class GooList;
+class XRef;
+
+class OptionalContentGroup;
+
+//------------------------------------------------------------------------
+
+class OCGs {
+public:
+
+ OCGs(Object *ocgObject, XRef *xref);
+ ~OCGs();
+
+ // Is OCGS valid?
+ GBool isOk() { return ok; }
+
+ bool hasOCGs();
+ GooList *getOCGs() const { return optionalContentGroups; }
+
+ OptionalContentGroup* findOcgByRef( const Ref &ref);
+
+ Array* getOrderArray()
+ { return (order.isArray() && order.arrayGetLength() > 0) ? order.getArray() : NULL; }
+ Array* getRBGroupsArray()
+ { return (rbgroups.isArray() && rbgroups.arrayGetLength()) ? rbgroups.getArray() : NULL; }
+
+ bool optContentIsVisible( Object *dictRef );
+
+private:
+ GBool ok;
+
+ bool allOn( Array *ocgArray );
+ bool allOff( Array *ocgArray );
+ bool anyOn( Array *ocgArray );
+ bool anyOff( Array *ocgArray );
+
+ GooList *optionalContentGroups;
+
+ Object order;
+ Object rbgroups;
+ XRef *m_xref;
+};
+
+//------------------------------------------------------------------------
+
+class OptionalContentGroup {
+public:
+ enum State { On, Off };
+
+ OptionalContentGroup(Dict *dict);
+
+ OptionalContentGroup(GooString *label);
+
+ ~OptionalContentGroup();
+
+ GooString* getName() const;
+
+ Ref getRef() const;
+ void setRef(const Ref ref);
+
+ State getState() { return m_state; };
+ void setState(State state) { m_state = state; };
+
+private:
+ XRef *xref;
+ GooString *m_name;
+ Ref m_ref;
+ State m_state;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.cc
new file mode 100644
index 00000000000..bd4e6d01b6d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.cc
@@ -0,0 +1,188 @@
+//========================================================================
+//
+// Outline.cc
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Nick Jones <nick.jones@network-box.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "XRef.h"
+#include "Link.h"
+#include "PDFDocEncoding.h"
+#include "Outline.h"
+
+//------------------------------------------------------------------------
+
+Outline::Outline(Object *outlineObj, XRef *xref) {
+ Object first, last;
+
+ items = NULL;
+ if (!outlineObj->isDict()) {
+ return;
+ }
+ items = OutlineItem::readItemList(outlineObj->dictLookupNF("First", &first),
+ outlineObj->dictLookupNF("Last", &last),
+ xref);
+ first.free();
+ last.free();
+}
+
+Outline::~Outline() {
+ if (items) {
+ deleteGooList(items, OutlineItem);
+ }
+}
+
+//------------------------------------------------------------------------
+
+OutlineItem::OutlineItem(Dict *dict, XRef *xrefA) {
+ Object obj1;
+ GooString *s;
+ int i;
+
+ xref = xrefA;
+ title = NULL;
+ action = NULL;
+ kids = NULL;
+
+ if (dict->lookup("Title", &obj1)->isString()) {
+ s = obj1.getString();
+ if ((s->getChar(0) & 0xff) == 0xfe &&
+ (s->getChar(1) & 0xff) == 0xff) {
+ titleLen = (s->getLength() - 2) / 2;
+ title = (Unicode *)gmallocn(titleLen, sizeof(Unicode));
+ for (i = 0; i < titleLen; ++i) {
+ title[i] = ((s->getChar(2 + 2*i) & 0xff) << 8) |
+ (s->getChar(3 + 2*i) & 0xff);
+ }
+ } else {
+ titleLen = s->getLength();
+ title = (Unicode *)gmallocn(titleLen, sizeof(Unicode));
+ for (i = 0; i < titleLen; ++i) {
+ title[i] = pdfDocEncoding[s->getChar(i) & 0xff];
+ }
+ }
+ } else {
+ titleLen = 0;
+ }
+ obj1.free();
+
+ if (!dict->lookup("Dest", &obj1)->isNull()) {
+ action = LinkAction::parseDest(&obj1);
+ } else {
+ obj1.free();
+ if (!dict->lookup("A", &obj1)->isNull()) {
+ action = LinkAction::parseAction(&obj1);
+ }
+ }
+ obj1.free();
+
+ dict->lookupNF("First", &firstRef);
+ dict->lookupNF("Last", &lastRef);
+ dict->lookupNF("Next", &nextRef);
+
+ startsOpen = gFalse;
+ if (dict->lookup("Count", &obj1)->isInt()) {
+ if (obj1.getInt() > 0) {
+ startsOpen = gTrue;
+ }
+ }
+ obj1.free();
+}
+
+OutlineItem::~OutlineItem() {
+ close();
+ if (title) {
+ gfree(title);
+ }
+ if (action) {
+ delete action;
+ }
+ firstRef.free();
+ lastRef.free();
+ nextRef.free();
+}
+
+GooList *OutlineItem::readItemList(Object *firstItemRef, Object *lastItemRef,
+ XRef *xrefA) {
+ GooList *items;
+ char* alreadyRead;
+ OutlineItem *item;
+ Object obj;
+ Object *p;
+
+ if (!lastItemRef->isRef())
+ return NULL;
+
+ items = new GooList();
+
+ alreadyRead = (char *)gmalloc(xrefA->getNumObjects());
+ memset(alreadyRead, 0, xrefA->getNumObjects());
+
+ p = firstItemRef;
+ while (p->isRef() &&
+ (p->getRefNum() >= 0) &&
+ (p->getRefNum() < xrefA->getNumObjects()) &&
+ !alreadyRead[p->getRefNum()]) {
+ if (!p->fetch(xrefA, &obj)->isDict()) {
+ obj.free();
+ break;
+ }
+ alreadyRead[p->getRefNum()] = 1;
+ item = new OutlineItem(obj.getDict(), xrefA);
+ obj.free();
+ items->append(item);
+ if (p->getRef().num == lastItemRef->getRef().num &&
+ p->getRef().gen == lastItemRef->getRef().gen) {
+ break;
+ }
+ p = &item->nextRef;
+ }
+
+ gfree(alreadyRead);
+
+ if (!items->getLength()) {
+ delete items;
+ items = NULL;
+ }
+
+ return items;
+}
+
+void OutlineItem::open() {
+ if (!kids) {
+ kids = readItemList(&firstRef, &lastRef, xref);
+ }
+}
+
+void OutlineItem::close() {
+ if (kids) {
+ deleteGooList(kids, OutlineItem);
+ kids = NULL;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.h
new file mode 100644
index 00000000000..90190e69280
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Outline.h
@@ -0,0 +1,89 @@
+//========================================================================
+//
+// Outline.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef OUTLINE_H
+#define OUTLINE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+#include "CharTypes.h"
+
+class GooString;
+class GooList;
+class XRef;
+class LinkAction;
+
+//------------------------------------------------------------------------
+
+class Outline {
+public:
+
+ Outline(Object *outlineObj, XRef *xref);
+ ~Outline();
+
+ GooList *getItems() { return items; }
+
+private:
+
+ GooList *items; // NULL if document has no outline,
+ // otherwise, a list of OutlineItem
+};
+
+//------------------------------------------------------------------------
+
+class OutlineItem {
+public:
+
+ OutlineItem(Dict *dict, XRef *xrefA);
+ ~OutlineItem();
+
+ static GooList *readItemList(Object *firstItemRef, Object *lastItemRef,
+ XRef *xrefA);
+
+ void open();
+ void close();
+
+ Unicode *getTitle() { return title; }
+ int getTitleLength() { return titleLen; }
+ LinkAction *getAction() { return action; }
+ GBool isOpen() { return startsOpen; }
+ GBool hasKids() { return firstRef.isRef(); }
+ GooList *getKids() { return kids; }
+
+private:
+
+ XRef *xref;
+ Unicode *title;
+ int titleLen;
+ LinkAction *action;
+ Object firstRef;
+ Object lastRef;
+ Object nextRef;
+ GBool startsOpen;
+ GooList *kids; // NULL if this item is closed or has no kids,
+ // otherwise a list of OutlineItem
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.cc
new file mode 100644
index 00000000000..5adc7b87c4c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.cc
@@ -0,0 +1,183 @@
+//========================================================================
+//
+// OutputDev.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no>
+// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include "Object.h"
+#include "Stream.h"
+#include "GfxState.h"
+#include "OutputDev.h"
+#include "goo/GooHash.h"
+
+//------------------------------------------------------------------------
+// OutputDev
+//------------------------------------------------------------------------
+
+void OutputDev::setDefaultCTM(double *ctm) {
+ int i;
+ double det;
+
+ for (i = 0; i < 6; ++i) {
+ defCTM[i] = ctm[i];
+ }
+ det = 1 / (defCTM[0] * defCTM[3] - defCTM[1] * defCTM[2]);
+ defICTM[0] = defCTM[3] * det;
+ defICTM[1] = -defCTM[1] * det;
+ defICTM[2] = -defCTM[2] * det;
+ defICTM[3] = defCTM[0] * det;
+ defICTM[4] = (defCTM[2] * defCTM[5] - defCTM[3] * defCTM[4]) * det;
+ defICTM[5] = (defCTM[1] * defCTM[4] - defCTM[0] * defCTM[5]) * det;
+}
+
+void OutputDev::cvtDevToUser(double dx, double dy, double *ux, double *uy) {
+ *ux = defICTM[0] * dx + defICTM[2] * dy + defICTM[4];
+ *uy = defICTM[1] * dx + defICTM[3] * dy + defICTM[5];
+}
+
+void OutputDev::cvtUserToDev(double ux, double uy, int *dx, int *dy) {
+ *dx = (int)(defCTM[0] * ux + defCTM[2] * uy + defCTM[4] + 0.5);
+ *dy = (int)(defCTM[1] * ux + defCTM[3] * uy + defCTM[5] + 0.5);
+}
+
+void OutputDev::updateAll(GfxState *state) {
+ updateLineDash(state);
+ updateFlatness(state);
+ updateLineJoin(state);
+ updateLineCap(state);
+ updateMiterLimit(state);
+ updateLineWidth(state);
+ updateStrokeAdjust(state);
+ updateFillColorSpace(state);
+ updateFillColor(state);
+ updateStrokeColorSpace(state);
+ updateStrokeColor(state);
+ updateBlendMode(state);
+ updateFillOpacity(state);
+ updateStrokeOpacity(state);
+ updateFillOverprint(state);
+ updateStrokeOverprint(state);
+ updateTransfer(state);
+ updateFont(state);
+}
+
+GBool OutputDev::beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen) {
+ return gFalse;
+}
+
+void OutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ int i, j;
+
+ if (inlineImg) {
+ str->reset();
+ j = height * ((width + 7) / 8);
+ for (i = 0; i < j; ++i)
+ str->getChar();
+ str->close();
+ }
+}
+
+void OutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg) {
+ int i, j;
+
+ if (inlineImg) {
+ str->reset();
+ j = height * ((width * colorMap->getNumPixelComps() *
+ colorMap->getBits() + 7) / 8);
+ for (i = 0; i < j; ++i)
+ str->getChar();
+ str->close();
+ }
+}
+
+void OutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GBool maskInvert,
+ GBool maskInterpolate) {
+ drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+}
+
+void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate) {
+ drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+}
+
+void OutputDev::endMarkedContent(GfxState *state) {
+}
+
+void OutputDev::beginMarkedContent(char *name, Dict *properties) {
+}
+
+void OutputDev::markPoint(char *name) {
+}
+
+void OutputDev::markPoint(char *name, Dict *properties) {
+}
+
+
+#if OPI_SUPPORT
+void OutputDev::opiBegin(GfxState *state, Dict *opiDict) {
+}
+
+void OutputDev::opiEnd(GfxState *state, Dict *opiDict) {
+}
+#endif
+
+void OutputDev::startProfile() {
+ if (profileHash)
+ delete profileHash;
+
+ profileHash = new GooHash (true);
+}
+
+GooHash *OutputDev::endProfile() {
+ GooHash *profile = profileHash;
+
+ profileHash = NULL;
+
+ return profile;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.h
new file mode 100644
index 00000000000..cdc74cf6b5f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/OutputDev.h
@@ -0,0 +1,313 @@
+//========================================================================
+//
+// OutputDev.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
+// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef OUTPUTDEV_H
+#define OUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include "goo/gtypes.h"
+#include "CharTypes.h"
+#include "Object.h"
+
+class Dict;
+class GooHash;
+class GooString;
+class GfxState;
+struct GfxColor;
+class GfxColorSpace;
+class GfxImageColorMap;
+class GfxFunctionShading;
+class GfxAxialShading;
+class GfxRadialShading;
+class Stream;
+class Links;
+class Link;
+class Catalog;
+class Page;
+class Function;
+
+//------------------------------------------------------------------------
+// OutputDev
+//------------------------------------------------------------------------
+
+class OutputDev {
+public:
+
+ // Constructor.
+ OutputDev() { profileHash = NULL; }
+
+ // Destructor.
+ virtual ~OutputDev() {}
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() = 0;
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() = 0;
+
+ // Does this device use tilingPatternFill()? If this returns false,
+ // tiling pattern fills will be reduced to a series of other drawing
+ // operations.
+ virtual GBool useTilingPatternFill() { return gFalse; }
+
+ // Does this device use functionShadedFill(), axialShadedFill(), and
+ // radialShadedFill()? If this returns false, these shaded fills
+ // will be reduced to a series of other drawing operations.
+ virtual GBool useShadedFills() { return gFalse; }
+
+ // Does this device use FillColorStop()?
+ virtual GBool useFillColorStop() { return gFalse; }
+
+ // Does this device use drawForm()? If this returns false,
+ // form-type XObjects will be interpreted (i.e., unrolled).
+ virtual GBool useDrawForm() { return gFalse; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() = 0;
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gTrue; }
+
+ // If current colorspace ist pattern,
+ // does this device support text in pattern colorspace?
+ // Default is false
+ virtual GBool supportTextCSPattern(GfxState * /*state*/) { return gFalse; }
+
+ // If current colorspace ist pattern,
+ // need this device special handling for masks in pattern colorspace?
+ // Default is false
+ virtual GBool fillMaskCSPattern(GfxState * /*state*/) { return gFalse; }
+ virtual void endMaskClip(GfxState * /*state*/) {}
+
+ //----- initialization and control
+
+ // Set default transform matrix.
+ virtual void setDefaultCTM(double *ctm);
+
+ // Check to see if a page slice should be displayed. If this
+ // returns false, the page display is aborted. Typically, an
+ // OutputDev will use some alternate means to display the page
+ // before returning false.
+ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog * catalog,
+ GBool (* abortCheckCbk)(void *data) = NULL,
+ void * abortCheckCbkData = NULL)
+ { return gTrue; }
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state) {}
+
+ // End a page.
+ virtual void endPage() {}
+
+ // Dump page contents to display.
+ virtual void dump() {}
+
+ //----- coordinate conversion
+
+ // Convert between device and user coordinates.
+ virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
+ virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
+
+ double *getDefCTM() { return defCTM; }
+ double *getDefICTM() { return defICTM; }
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState * /*state*/) {}
+ virtual void restoreState(GfxState * /*state*/) {}
+
+ //----- update graphics state
+ virtual void updateAll(GfxState *state);
+ virtual void updateCTM(GfxState * /*state*/, double /*m11*/, double /*m12*/,
+ double /*m21*/, double /*m22*/, double /*m31*/, double /*m32*/) {}
+ virtual void updateLineDash(GfxState * /*state*/) {}
+ virtual void updateFlatness(GfxState * /*state*/) {}
+ virtual void updateLineJoin(GfxState * /*state*/) {}
+ virtual void updateLineCap(GfxState * /*state*/) {}
+ virtual void updateMiterLimit(GfxState * /*state*/) {}
+ virtual void updateLineWidth(GfxState * /*state*/) {}
+ virtual void updateStrokeAdjust(GfxState * /*state*/) {}
+ virtual void updateAlphaIsShape(GfxState * /*state*/) {}
+ virtual void updateTextKnockout(GfxState * /*state*/) {}
+ virtual void updateFillColorSpace(GfxState * /*state*/) {}
+ virtual void updateStrokeColorSpace(GfxState * /*state*/) {}
+ virtual void updateFillColor(GfxState * /*state*/) {}
+ virtual void updateStrokeColor(GfxState * /*state*/) {}
+ virtual void updateBlendMode(GfxState * /*state*/) {}
+ virtual void updateFillOpacity(GfxState * /*state*/) {}
+ virtual void updateStrokeOpacity(GfxState * /*state*/) {}
+ virtual void updateFillOverprint(GfxState * /*state*/) {}
+ virtual void updateStrokeOverprint(GfxState * /*state*/) {}
+ virtual void updateTransfer(GfxState * /*state*/) {}
+ virtual void updateFillColorStop(GfxState * /*state*/, double /*offset*/) {}
+
+ //----- update text state
+ virtual void updateFont(GfxState * /*state*/) {}
+ virtual void updateTextMat(GfxState * /*state*/) {}
+ virtual void updateCharSpace(GfxState * /*state*/) {}
+ virtual void updateRender(GfxState * /*state*/) {}
+ virtual void updateRise(GfxState * /*state*/) {}
+ virtual void updateWordSpace(GfxState * /*state*/) {}
+ virtual void updateHorizScaling(GfxState * /*state*/) {}
+ virtual void updateTextPos(GfxState * /*state*/) {}
+ virtual void updateTextShift(GfxState * /*state*/, double /*shift*/) {}
+
+ //----- path painting
+ virtual void stroke(GfxState * /*state*/) {}
+ virtual void fill(GfxState * /*state*/) {}
+ virtual void eoFill(GfxState * /*state*/) {}
+ virtual GBool tilingPatternFill(GfxState * /*state*/, Object * /*str*/,
+ int /*paintType*/, Dict * /*resDict*/,
+ double * /*mat*/, double * /*bbox*/,
+ int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/,
+ double /*xStep*/, double /*yStep*/)
+ { return gFalse; }
+ virtual GBool functionShadedFill(GfxState * /*state*/,
+ GfxFunctionShading * /*shading*/)
+ { return gFalse; }
+ virtual GBool axialShadedFill(GfxState * /*state*/, GfxAxialShading * /*shading*/, double /*tMin*/, double /*tMax*/)
+ { return gFalse; }
+ virtual GBool axialShadedSupportExtend(GfxState * /*state*/, GfxAxialShading * /*shading*/)
+ { return gFalse; }
+ virtual GBool radialShadedFill(GfxState * /*state*/, GfxRadialShading * /*shading*/, double /*sMin*/, double /*sMax*/)
+ { return gFalse; }
+ virtual GBool radialShadedSupportExtend(GfxState * /*state*/, GfxRadialShading * /*shading*/)
+ { return gFalse; }
+
+ //----- path clipping
+ virtual void clip(GfxState * /*state*/) {}
+ virtual void eoClip(GfxState * /*state*/) {}
+ virtual void clipToStrokePath(GfxState * /*state*/) {}
+
+ //----- text drawing
+ virtual void beginStringOp(GfxState * /*state*/) {}
+ virtual void endStringOp(GfxState * /*state*/) {}
+ virtual void beginString(GfxState * /*state*/, GooString * /*s*/) {}
+ virtual void endString(GfxState * /*state*/) {}
+ virtual void drawChar(GfxState * /*state*/, double /*x*/, double /*y*/,
+ double /*dx*/, double /*dy*/,
+ double /*originX*/, double /*originY*/,
+ CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) {}
+ virtual void drawString(GfxState * /*state*/, GooString * /*s*/) {}
+ virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/,
+ double /*dx*/, double /*dy*/,
+ CharCode /*code*/, Unicode * /*u*/, int /*uLen*/);
+ virtual void endType3Char(GfxState * /*state*/) {}
+ virtual void beginTextObject(GfxState * /*state*/) {}
+ virtual GBool deviceHasTextClip(GfxState * /*state*/) { return gFalse; }
+ virtual void endTextObject(GfxState * /*state*/) {}
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert, GBool interpolate,
+ GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap, GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+
+ //----- grouping operators
+
+ virtual void endMarkedContent(GfxState *state);
+ virtual void beginMarkedContent(char *name, Dict *properties);
+ virtual void markPoint(char *name);
+ virtual void markPoint(char *name, Dict *properties);
+
+
+
+#if OPI_SUPPORT
+ //----- OPI functions
+ virtual void opiBegin(GfxState *state, Dict *opiDict);
+ virtual void opiEnd(GfxState *state, Dict *opiDict);
+#endif
+
+ //----- Type 3 font operators
+ virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) {}
+ virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/,
+ double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
+
+ //----- form XObjects
+ virtual void drawForm(Ref /*id*/) {}
+
+ //----- PostScript XObjects
+ virtual void psXObject(Stream * /*psStream*/, Stream * /*level1Stream*/) {}
+
+ //----- Profiling
+ virtual void startProfile();
+ virtual GooHash *getProfileHash() {return profileHash; }
+ virtual GooHash *endProfile();
+
+ //----- transparency groups and soft masks
+ virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+ GfxColorSpace * /*blendingColorSpace*/,
+ GBool /*isolated*/, GBool /*knockout*/,
+ GBool /*forSoftMask*/) {}
+ virtual void endTransparencyGroup(GfxState * /*state*/) {}
+ virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {}
+ virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
+ Function * /*transferFunc*/, GfxColor * /*backdropColor*/) {}
+ virtual void clearSoftMask(GfxState * /*state*/) {}
+
+ //----- links
+ virtual void processLink(Link * /*link*/, Catalog * /*catalog*/) {}
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ virtual GBool getVectorAntialias() { return gFalse; }
+ virtual void setVectorAntialias(GBool /*vaa*/) {}
+#endif
+
+private:
+
+ double defCTM[6]; // default coordinate transform matrix
+ double defICTM[6]; // inverse of default CTM
+ GooHash *profileHash;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.cc
new file mode 100644
index 00000000000..b088f6cf688
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.cc
@@ -0,0 +1,914 @@
+//========================================================================
+//
+// PDFDoc.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2005, 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+// Copyright (C) 2009 Axel Struebing <axel.struebing@freenet.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <locale.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <time.h>
+#ifdef _WIN32
+# include <windows.h>
+#endif
+#include "goo/gstrtod.h"
+#include "goo/GooString.h"
+#include "poppler-config.h"
+#include "GlobalParams.h"
+#include "Page.h"
+#include "Catalog.h"
+#include "Stream.h"
+#include "XRef.h"
+#include "Link.h"
+#include "OutputDev.h"
+#include "Error.h"
+#include "ErrorCodes.h"
+#include "Lexer.h"
+#include "Parser.h"
+#include "SecurityHandler.h"
+#include "Decrypt.h"
+#ifndef DISABLE_OUTLINE
+#include "Outline.h"
+#endif
+#include "PDFDoc.h"
+
+//------------------------------------------------------------------------
+
+#define headerSearchSize 1024 // read this many bytes at beginning of
+ // file to look for '%PDF'
+
+//------------------------------------------------------------------------
+// PDFDoc
+//------------------------------------------------------------------------
+
+PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
+ GooString *userPassword, void *guiDataA) {
+ Object obj;
+
+ ok = gFalse;
+ errCode = errNone;
+
+ guiData = guiDataA;
+
+ file = NULL;
+ str = NULL;
+ xref = NULL;
+ catalog = NULL;
+#ifndef DISABLE_OUTLINE
+ outline = NULL;
+#endif
+
+ fileName = fileNameA;
+
+ // try to open file
+#ifdef VMS
+ file = fopen(fileName->getCString(), "rb", "ctx=stm");
+#else
+ file = fopen(fileName->getCString(), "rb");
+#endif
+ if (file == NULL) {
+ // fopen() has failed.
+ // Keep a copy of the errno returned by fopen so that it can be
+ // referred to later.
+ fopenErrno = errno;
+ error(-1, "Couldn't open file '%s': %s.", fileName->getCString(),
+ strerror(errno));
+ errCode = errOpenFile;
+ return;
+ }
+
+ // create stream
+ obj.initNull();
+ str = new FileStream(file, 0, gFalse, 0, &obj);
+
+ ok = setup(ownerPassword, userPassword);
+}
+
+#ifdef _WIN32
+PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
+ GooString *userPassword, void *guiDataA) {
+ OSVERSIONINFO version;
+ wchar_t fileName2[_MAX_PATH + 1];
+ Object obj;
+ int i;
+
+ ok = gFalse;
+ errCode = errNone;
+
+ guiData = guiDataA;
+
+ file = NULL;
+ str = NULL;
+ xref = NULL;
+ catalog = NULL;
+#ifndef DISABLE_OUTLINE
+ outline = NULL;
+#endif
+
+ //~ file name should be stored in Unicode (?)
+ fileName = new GooString();
+ for (i = 0; i < fileNameLen; ++i) {
+ fileName->append((char)fileNameA[i]);
+ }
+
+ // zero-terminate the file name string
+ for (i = 0; i < fileNameLen && i < _MAX_PATH; ++i) {
+ fileName2[i] = fileNameA[i];
+ }
+ fileName2[i] = 0;
+
+ // try to open file
+ // NB: _wfopen is only available in NT
+ version.dwOSVersionInfoSize = sizeof(version);
+ GetVersionEx(&version);
+ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ file = _wfopen(fileName2, L"rb");
+ } else {
+ file = fopen(fileName->getCString(), "rb");
+ }
+ if (!file) {
+ error(-1, "Couldn't open file '%s'", fileName->getCString());
+ errCode = errOpenFile;
+ return;
+ }
+
+ // create stream
+ obj.initNull();
+ str = new FileStream(file, 0, gFalse, 0, &obj);
+
+ ok = setup(ownerPassword, userPassword);
+}
+#endif
+
+PDFDoc::PDFDoc(BaseStream *strA, GooString *ownerPassword,
+ GooString *userPassword, void *guiDataA) {
+ ok = gFalse;
+ errCode = errNone;
+ guiData = guiDataA;
+ if (strA->getFileName()) {
+ fileName = strA->getFileName()->copy();
+ } else {
+ fileName = NULL;
+ }
+ file = NULL;
+ str = strA;
+ xref = NULL;
+ catalog = NULL;
+#ifndef DISABLE_OUTLINE
+ outline = NULL;
+#endif
+ ok = setup(ownerPassword, userPassword);
+}
+
+GBool PDFDoc::setup(GooString *ownerPassword, GooString *userPassword) {
+ str->setPos(0, -1);
+ if (str->getPos() < 0)
+ {
+ error(-1, "Document base stream is not seekable");
+ return gFalse;
+ }
+
+ str->reset();
+
+ // check footer
+ // Adobe does not seem to enforce %%EOF, so we do the same
+// if (!checkFooter()) return gFalse;
+
+ // check header
+ checkHeader();
+
+ // read xref table
+ xref = new XRef(str);
+ if (!xref->isOk()) {
+ error(-1, "Couldn't read xref table");
+ errCode = xref->getErrorCode();
+ return gFalse;
+ }
+
+ // check for encryption
+ if (!checkEncryption(ownerPassword, userPassword)) {
+ errCode = errEncrypted;
+ return gFalse;
+ }
+
+ // read catalog
+ catalog = new Catalog(xref);
+ if (!catalog->isOk()) {
+ error(-1, "Couldn't read page catalog");
+ errCode = errBadCatalog;
+ return gFalse;
+ }
+
+#ifndef DISABLE_OUTLINE
+ // read outline
+ outline = new Outline(catalog->getOutline(), xref);
+#endif
+
+ // done
+ return gTrue;
+}
+
+PDFDoc::~PDFDoc() {
+#ifndef DISABLE_OUTLINE
+ if (outline) {
+ delete outline;
+ }
+#endif
+ if (catalog) {
+ delete catalog;
+ }
+ if (xref) {
+ delete xref;
+ }
+ if (str) {
+ delete str;
+ }
+ if (file) {
+ fclose(file);
+ }
+ if (fileName) {
+ delete fileName;
+ }
+}
+
+
+// Check for a %%EOF at the end of this stream
+GBool PDFDoc::checkFooter() {
+ // we look in the last 1024 chars because Adobe does the same
+ char *eof = new char[1025];
+ int pos = str->getPos();
+ str->setPos(1024, -1);
+ int i, ch;
+ for (i = 0; i < 1024; i++)
+ {
+ ch = str->getChar();
+ if (ch == EOF)
+ break;
+ eof[i] = ch;
+ }
+ eof[i] = '\0';
+
+ bool found = false;
+ for (i = i - 5; i >= 0; i--) {
+ if (strncmp (&eof[i], "%%EOF", 5) == 0) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ error(-1, "Document has not the mandatory ending %%EOF");
+ errCode = errDamaged;
+ delete[] eof;
+ return gFalse;
+ }
+ delete[] eof;
+ str->setPos(pos);
+ return gTrue;
+}
+
+// Check for a PDF header on this stream. Skip past some garbage
+// if necessary.
+void PDFDoc::checkHeader() {
+ char hdrBuf[headerSearchSize+1];
+ char *p;
+ int i;
+
+ pdfMajorVersion = 0;
+ pdfMinorVersion = 0;
+ for (i = 0; i < headerSearchSize; ++i) {
+ hdrBuf[i] = str->getChar();
+ }
+ hdrBuf[headerSearchSize] = '\0';
+ for (i = 0; i < headerSearchSize - 5; ++i) {
+ if (!strncmp(&hdrBuf[i], "%PDF-", 5)) {
+ break;
+ }
+ }
+ if (i >= headerSearchSize - 5) {
+ error(-1, "May not be a PDF file (continuing anyway)");
+ return;
+ }
+ str->moveStart(i);
+ if (!(p = strtok(&hdrBuf[i+5], " \t\n\r"))) {
+ error(-1, "May not be a PDF file (continuing anyway)");
+ return;
+ }
+ sscanf(p, "%d.%d", &pdfMajorVersion, &pdfMinorVersion);
+ // We don't do the version check. Don't add it back in.
+}
+
+GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword) {
+ Object encrypt;
+ GBool encrypted;
+ SecurityHandler *secHdlr;
+ GBool ret;
+
+ xref->getTrailerDict()->dictLookup("Encrypt", &encrypt);
+ if ((encrypted = encrypt.isDict())) {
+ if ((secHdlr = SecurityHandler::make(this, &encrypt))) {
+ if (secHdlr->checkEncryption(ownerPassword, userPassword)) {
+ // authorization succeeded
+ xref->setEncryption(secHdlr->getPermissionFlags(),
+ secHdlr->getOwnerPasswordOk(),
+ secHdlr->getFileKey(),
+ secHdlr->getFileKeyLength(),
+ secHdlr->getEncVersion(),
+ secHdlr->getEncRevision(),
+ secHdlr->getEncAlgorithm());
+ ret = gTrue;
+ } else {
+ // authorization failed
+ ret = gFalse;
+ }
+ delete secHdlr;
+ } else {
+ // couldn't find the matching security handler
+ ret = gFalse;
+ }
+ } else {
+ // document is not encrypted
+ ret = gTrue;
+ }
+ encrypt.free();
+ return ret;
+}
+
+void PDFDoc::displayPage(OutputDev *out, int page,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ if (globalParams->getPrintCommands()) {
+ printf("***** page %d *****\n", page);
+ }
+ catalog->getPage(page)->display(out, hDPI, vDPI,
+ rotate, useMediaBox, crop, printing, catalog,
+ abortCheckCbk, abortCheckCbkData,
+ annotDisplayDecideCbk, annotDisplayDecideCbkData);
+}
+
+void PDFDoc::displayPages(OutputDev *out, int firstPage, int lastPage,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ int page;
+
+ for (page = firstPage; page <= lastPage; ++page) {
+ displayPage(out, page, hDPI, vDPI, rotate, useMediaBox, crop, printing,
+ abortCheckCbk, abortCheckCbkData,
+ annotDisplayDecideCbk, annotDisplayDecideCbkData);
+ }
+}
+
+void PDFDoc::displayPageSlice(OutputDev *out, int page,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ catalog->getPage(page)->displaySlice(out, hDPI, vDPI,
+ rotate, useMediaBox, crop,
+ sliceX, sliceY, sliceW, sliceH,
+ printing, catalog,
+ abortCheckCbk, abortCheckCbkData,
+ annotDisplayDecideCbk, annotDisplayDecideCbkData);
+}
+
+Links *PDFDoc::getLinks(int page) {
+ return catalog->getPage(page)->getLinks(catalog);
+}
+
+void PDFDoc::processLinks(OutputDev *out, int page) {
+ catalog->getPage(page)->processLinks(out, catalog);
+}
+
+GBool PDFDoc::isLinearized() {
+ Parser *parser;
+ Object obj1, obj2, obj3, obj4, obj5;
+ GBool lin;
+
+ lin = gFalse;
+ obj1.initNull();
+ parser = new Parser(xref,
+ new Lexer(xref,
+ str->makeSubStream(str->getStart(), gFalse, 0, &obj1)),
+ gTrue);
+ parser->getObj(&obj1);
+ parser->getObj(&obj2);
+ parser->getObj(&obj3);
+ parser->getObj(&obj4);
+ if (obj1.isInt() && obj2.isInt() && obj3.isCmd("obj") &&
+ obj4.isDict()) {
+ obj4.dictLookup("Linearized", &obj5);
+ if (obj5.isNum() && obj5.getNum() > 0) {
+ lin = gTrue;
+ }
+ obj5.free();
+ }
+ obj4.free();
+ obj3.free();
+ obj2.free();
+ obj1.free();
+ delete parser;
+ return lin;
+}
+
+int PDFDoc::saveAs(GooString *name, PDFWriteMode mode) {
+ FILE *f;
+ OutStream *outStr;
+ int res;
+
+ if (!(f = fopen(name->getCString(), "wb"))) {
+ error(-1, "Couldn't open file '%s'", name->getCString());
+ return errOpenFile;
+ }
+ outStr = new FileOutStream(f,0);
+ res = saveAs(outStr, mode);
+ delete outStr;
+ fclose(f);
+ return res;
+}
+
+int PDFDoc::saveAs(OutStream *outStr, PDFWriteMode mode) {
+
+ // we don't support files with Encrypt at the moment
+ Object obj;
+ xref->getTrailerDict()->getDict()->lookupNF("Encrypt", &obj);
+ if (!obj.isNull())
+ {
+ obj.free();
+ return errEncrypted;
+ }
+ obj.free();
+
+ if (mode == writeForceRewrite) {
+ saveCompleteRewrite(outStr);
+ } else if (mode == writeForceIncremental) {
+ saveIncrementalUpdate(outStr);
+ } else { // let poppler decide
+ // find if we have updated objects
+ GBool updated = gFalse;
+ for(int i=0; i<xref->getNumObjects(); i++) {
+ if (xref->getEntry(i)->updated) {
+ updated = gTrue;
+ break;
+ }
+ }
+ if(updated) {
+ saveIncrementalUpdate(outStr);
+ } else {
+ // simply copy the original file
+ saveWithoutChangesAs (outStr);
+ }
+ }
+
+ return errNone;
+}
+
+int PDFDoc::saveWithoutChangesAs(GooString *name) {
+ FILE *f;
+ OutStream *outStr;
+ int res;
+
+ if (!(f = fopen(name->getCString(), "wb"))) {
+ error(-1, "Couldn't open file '%s'", name->getCString());
+ return errOpenFile;
+ }
+
+ outStr = new FileOutStream(f,0);
+ res = saveWithoutChangesAs(outStr);
+ delete outStr;
+
+ fclose(f);
+
+ return res;
+}
+
+int PDFDoc::saveWithoutChangesAs(OutStream *outStr) {
+ int c;
+
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ outStr->put(c);
+ }
+ str->close();
+
+ return errNone;
+}
+
+void PDFDoc::saveIncrementalUpdate (OutStream* outStr)
+{
+ XRef *uxref;
+ int c;
+ //copy the original file
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ outStr->put(c);
+ }
+ str->close();
+
+ uxref = new XRef();
+ uxref->add(0, 65535, 0, gFalse);
+ int objectsCount = 0; //count the number of objects in the XRef(s)
+ for(int i=0; i<xref->getNumObjects(); i++) {
+ if ((xref->getEntry(i)->type == xrefEntryFree) &&
+ (xref->getEntry(i)->gen == 0)) //we skip the irrelevant free objects
+ continue;
+ objectsCount++;
+ if (xref->getEntry(i)->updated) { //we have an updated object
+ Object obj1;
+ Ref ref;
+ ref.num = i;
+ ref.gen = xref->getEntry(i)->gen;
+ xref->fetch(ref.num, ref.gen, &obj1);
+ Guint offset = writeObject(&obj1, &ref, outStr);
+ uxref->add(ref.num, ref.gen, offset, gTrue);
+ obj1.free();
+ }
+ }
+ if (uxref->getSize() == 0) { //we have nothing to update
+ delete uxref;
+ return;
+ }
+
+ Guint uxrefOffset = outStr->getPos();
+ uxref->writeToFile(outStr, gFalse /* do not write unnecessary entries */);
+
+ writeTrailer(uxrefOffset, objectsCount, outStr, gTrue);
+
+ delete uxref;
+}
+
+void PDFDoc::saveCompleteRewrite (OutStream* outStr)
+{
+ outStr->printf("%%PDF-%d.%d\r\n",pdfMajorVersion,pdfMinorVersion);
+ XRef *uxref = new XRef();
+ uxref->add(0, 65535, 0, gFalse);
+ for(int i=0; i<xref->getNumObjects(); i++) {
+ Object obj1;
+ Ref ref;
+ XRefEntryType type = xref->getEntry(i)->type;
+ if (type == xrefEntryFree) {
+ ref.num = i;
+ ref.gen = xref->getEntry(i)->gen;
+ /* the XRef class adds a lot of irrelevant free entries, we only want the significant one
+ and we don't want the one with num=0 because it has already been added (gen = 65535)*/
+ if (ref.gen > 0 && ref.num > 0)
+ uxref->add(ref.num, ref.gen, 0, gFalse);
+ } else if (type == xrefEntryUncompressed){
+ ref.num = i;
+ ref.gen = xref->getEntry(i)->gen;
+ xref->fetch(ref.num, ref.gen, &obj1);
+ Guint offset = writeObject(&obj1, &ref, outStr);
+ uxref->add(ref.num, ref.gen, offset, gTrue);
+ obj1.free();
+ } else if (type == xrefEntryCompressed) {
+ ref.num = i;
+ ref.gen = 0; //compressed entries have gen == 0
+ xref->fetch(ref.num, ref.gen, &obj1);
+ Guint offset = writeObject(&obj1, &ref, outStr);
+ uxref->add(ref.num, ref.gen, offset, gTrue);
+ obj1.free();
+ }
+ }
+ Guint uxrefOffset = outStr->getPos();
+ uxref->writeToFile(outStr, gTrue /* write all entries */);
+
+ writeTrailer(uxrefOffset, uxref->getSize(), outStr, gFalse);
+
+
+ delete uxref;
+
+}
+
+void PDFDoc::writeDictionnary (Dict* dict, OutStream* outStr)
+{
+ Object obj1;
+ outStr->printf("<<");
+ for (int i=0; i<dict->getLength(); i++) {
+ GooString keyName(dict->getKey(i));
+ GooString *keyNameToPrint = keyName.sanitizedName(gFalse /* non ps mode */);
+ outStr->printf("/%s ", keyNameToPrint->getCString());
+ delete keyNameToPrint;
+ writeObject(dict->getValNF(i, &obj1), NULL, outStr);
+ obj1.free();
+ }
+ outStr->printf(">> ");
+}
+
+void PDFDoc::writeStream (Stream* str, OutStream* outStr)
+{
+ outStr->printf("stream\r\n");
+ str->reset();
+ for (int c=str->getChar(); c!= EOF; c=str->getChar()) {
+ outStr->printf("%c", c);
+ }
+ outStr->printf("\r\nendstream\r\n");
+}
+
+void PDFDoc::writeRawStream (Stream* str, OutStream* outStr)
+{
+ Object obj1;
+ str->getDict()->lookup("Length", &obj1);
+ if (!obj1.isInt()) {
+ error (-1, "PDFDoc::writeRawStream, no Length in stream dict");
+ return;
+ }
+
+ const int length = obj1.getInt();
+ obj1.free();
+
+ outStr->printf("stream\r\n");
+ str->unfilteredReset();
+ for (int i=0; i<length; i++) {
+ int c = str->getUnfilteredChar();
+ outStr->printf("%c", c);
+ }
+ str->reset();
+ outStr->printf("\r\nendstream\r\n");
+}
+
+void PDFDoc::writeString (GooString* s, OutStream* outStr)
+{
+ if (s->hasUnicodeMarker()) {
+ //unicode string don't necessary end with \0
+ const char* c = s->getCString();
+ outStr->printf("(");
+ for(int i=0; i<s->getLength(); i++) {
+ char unescaped = *(c+i)&0x000000ff;
+ //escape if needed
+ if (unescaped == '(' || unescaped == ')' || unescaped == '\\')
+ outStr->printf("%c", '\\');
+ outStr->printf("%c", unescaped);
+ }
+ outStr->printf(") ");
+ } else {
+ const char* c = s->getCString();
+ outStr->printf("(");
+ for(int i=0; i<s->getLength(); i++) {
+ char unescaped = (*c)&0x000000ff;
+ //escape if needed
+ if (unescaped == '(' || unescaped == ')' || unescaped == '\\')
+ outStr->printf("%c", '\\');
+ outStr->printf("%c", unescaped);
+ c++;
+ }
+ outStr->printf(") ");
+ }
+}
+
+Guint PDFDoc::writeObject (Object* obj, Ref* ref, OutStream* outStr)
+{
+ Array *array;
+ Object obj1;
+ Guint offset = outStr->getPos();
+ int tmp;
+
+ if(ref)
+ outStr->printf("%i %i obj ", ref->num, ref->gen);
+
+ switch (obj->getType()) {
+ case objBool:
+ outStr->printf("%s ", obj->getBool()?"true":"false");
+ break;
+ case objInt:
+ outStr->printf("%i ", obj->getInt());
+ break;
+ case objReal:
+ {
+ GooString s;
+ s.appendf("{0:.10g}", obj->getReal());
+ outStr->printf("%s ", s.getCString());
+ break;
+ }
+ case objString:
+ writeString(obj->getString(), outStr);
+ break;
+ case objName:
+ {
+ GooString name(obj->getName());
+ GooString *nameToPrint = name.sanitizedName(gFalse /* non ps mode */);
+ outStr->printf("/%s ", nameToPrint->getCString());
+ delete nameToPrint;
+ break;
+ }
+ case objNull:
+ outStr->printf( "null ");
+ break;
+ case objArray:
+ array = obj->getArray();
+ outStr->printf("[");
+ for (int i=0; i<array->getLength(); i++) {
+ writeObject(array->getNF(i, &obj1), NULL,outStr);
+ obj1.free();
+ }
+ outStr->printf("] ");
+ break;
+ case objDict:
+ writeDictionnary (obj->getDict(),outStr);
+ break;
+ case objStream:
+ {
+ //We can't modify stream with the current implementation (no write functions in Stream API)
+ // => the only type of streams which that have been modified are internal streams (=strWeird)
+ Stream *stream = obj->getStream();
+ if (stream->getKind() == strWeird) {
+ //we write the stream unencoded => TODO: write stream encoder
+ stream->reset();
+ //recalculate stream length
+ tmp = 0;
+ for (int c=stream->getChar(); c!=EOF; c=stream->getChar()) {
+ tmp++;
+ }
+ obj1.initInt(tmp);
+ stream->getDict()->set("Length", &obj1);
+
+ //Remove Stream encoding
+ stream->getDict()->remove("Filter");
+ stream->getDict()->remove("DecodeParms");
+
+ writeDictionnary (stream->getDict(),outStr);
+ writeStream (stream,outStr);
+ obj1.free();
+ } else {
+ //raw stream copy
+ FilterStream *fs = dynamic_cast<FilterStream*>(stream);
+ if (fs) {
+ BaseStream *bs = fs->getBaseStream();
+ if (bs) {
+ Guint streamEnd;
+ if (xref->getStreamEnd(bs->getStart(), &streamEnd)) {
+ Object val;
+ val.initInt(streamEnd - bs->getStart());
+ stream->getDict()->set("Length", &val);
+ }
+ }
+ }
+ writeDictionnary (stream->getDict(), outStr);
+ writeRawStream (stream, outStr);
+ }
+ break;
+ }
+ case objRef:
+ outStr->printf("%i %i R ", obj->getRef().num, obj->getRef().gen);
+ break;
+ case objCmd:
+ outStr->printf("cmd\r\n");
+ break;
+ case objError:
+ outStr->printf("error\r\n");
+ break;
+ case objEOF:
+ outStr->printf("eof\r\n");
+ break;
+ case objNone:
+ outStr->printf("none\r\n");
+ break;
+ default:
+ error(-1,"Unhandled objType : %i, please report a bug with a testcase\r\n", obj->getType());
+ break;
+ }
+ if (ref)
+ outStr->printf("endobj\r\n");
+ return offset;
+}
+
+void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, GBool incrUpdate)
+{
+ Dict *trailerDict = new Dict(xref);
+ Object obj1;
+ obj1.initInt(uxrefSize);
+ trailerDict->set("Size", &obj1);
+ obj1.free();
+
+
+ //build a new ID, as recommended in the reference, uses:
+ // - current time
+ // - file name
+ // - file size
+ // - values of entry in information dictionnary
+ GooString message;
+ char buffer[256];
+ sprintf(buffer, "%i", (int)time(NULL));
+ message.append(buffer);
+ if (fileName)
+ message.append(fileName);
+ else
+ message.append("streamwithoutfilename.pdf");
+ // file size
+ unsigned int fileSize = 0;
+ int c;
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ fileSize++;
+ }
+ str->close();
+ sprintf(buffer, "%i", fileSize);
+ message.append(buffer);
+
+ //info dict -- only use text string
+ if (xref->getDocInfo(&obj1)->isDict()) {
+ for(int i=0; i<obj1.getDict()->getLength(); i++) {
+ Object obj2;
+ obj1.getDict()->getVal(i, &obj2);
+ if (obj2.isString()) {
+ message.append(obj2.getString());
+ }
+ obj2.free();
+ }
+ }
+ obj1.free();
+
+ //calculate md5 digest
+ Guchar digest[16];
+ Decrypt::md5((Guchar*)message.getCString(), message.getLength(), digest);
+ obj1.initString(new GooString((const char*)digest, 16));
+
+ //create ID array
+ Object obj2,obj3,obj4,obj5;
+ obj2.initArray(xref);
+
+ if (incrUpdate) {
+ //only update the second part of the array
+ if(xref->getTrailerDict()->getDict()->lookup("ID", &obj4) != NULL) {
+ if (!obj4.isArray()) {
+ error(-1, "PDFDoc::writeTrailer original file's ID entry isn't an array. Trying to continue");
+ } else {
+ //Get the first part of the ID
+ obj4.arrayGet(0,&obj3);
+
+ obj2.arrayAdd(&obj3);
+ obj2.arrayAdd(&obj1);
+ trailerDict->set("ID", &obj2);
+ }
+ }
+ } else {
+ //new file => same values for the two identifiers
+ obj2.arrayAdd(&obj1);
+ obj1.initString(new GooString((const char*)digest, 16));
+ obj2.arrayAdd(&obj1);
+ trailerDict->set("ID", &obj2);
+ }
+
+
+ obj1.initRef(xref->getRootNum(), xref->getRootGen());
+ trailerDict->set("Root", &obj1);
+
+ if (incrUpdate) {
+ obj1.initInt(xref->getLastXRefPos());
+ trailerDict->set("Prev", &obj1);
+ }
+
+ xref->getDocInfoNF(&obj5);
+ if (!obj5.isNull()) {
+ trailerDict->set("Info", &obj5);
+ }
+
+ outStr->printf( "trailer\r\n");
+ writeDictionnary(trailerDict, outStr);
+ outStr->printf( "\r\nstartxref\r\n");
+ outStr->printf( "%i\r\n", uxrefOffset);
+ outStr->printf( "%%%%EOF\r\n");
+
+ delete trailerDict;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.h
new file mode 100644
index 00000000000..3db4b917bcd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDoc.h
@@ -0,0 +1,254 @@
+//========================================================================
+//
+// PDFDoc.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2005, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PDFDOC_H
+#define PDFDOC_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "Annot.h"
+#include "OptionalContent.h"
+
+class GooString;
+class BaseStream;
+class OutputDev;
+class Links;
+class LinkAction;
+class LinkDest;
+class Outline;
+
+enum PDFWriteMode {
+ writeStandard,
+ writeForceRewrite,
+ writeForceIncremental
+};
+
+//------------------------------------------------------------------------
+// PDFDoc
+//------------------------------------------------------------------------
+
+class PDFDoc {
+public:
+
+ PDFDoc(GooString *fileNameA, GooString *ownerPassword = NULL,
+ GooString *userPassword = NULL, void *guiDataA = NULL);
+
+#ifdef _WIN32
+ PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword = NULL,
+ GooString *userPassword = NULL, void *guiDataA = NULL);
+#endif
+
+ PDFDoc(BaseStream *strA, GooString *ownerPassword = NULL,
+ GooString *userPassword = NULL, void *guiDataA = NULL);
+ ~PDFDoc();
+
+ // Was PDF document successfully opened?
+ GBool isOk() { return ok; }
+
+ // Get the error code (if isOk() returns false).
+ int getErrorCode() { return errCode; }
+
+ // Get the error code returned by fopen() (if getErrorCode() ==
+ // errOpenFile).
+ int getFopenErrno() { return fopenErrno; }
+
+ // Get file name.
+ GooString *getFileName() { return fileName; }
+
+ // Get the xref table.
+ XRef *getXRef() { return xref; }
+
+ // Get catalog.
+ Catalog *getCatalog() { return catalog; }
+
+ // Get optional content configuration
+ OCGs *getOptContentConfig() { return catalog->getOptContentConfig(); }
+
+ // Get base stream.
+ BaseStream *getBaseStream() { return str; }
+
+ // Get page parameters.
+ double getPageMediaWidth(int page)
+ { return catalog->getPage(page)->getMediaWidth(); }
+ double getPageMediaHeight(int page)
+ { return catalog->getPage(page)->getMediaHeight(); }
+ double getPageCropWidth(int page)
+ { return catalog->getPage(page)->getCropWidth(); }
+ double getPageCropHeight(int page)
+ { return catalog->getPage(page)->getCropHeight(); }
+ int getPageRotate(int page)
+ { return catalog->getPage(page)->getRotate(); }
+
+ // Get number of pages.
+ int getNumPages() { return catalog->getNumPages(); }
+
+ // Return the contents of the metadata stream, or NULL if there is
+ // no metadata.
+ GooString *readMetadata() { return catalog->readMetadata(); }
+
+ // Return the structure tree root object.
+ Object *getStructTreeRoot() { return catalog->getStructTreeRoot(); }
+
+ // Display a page.
+ void displayPage(OutputDev *out, int page,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+ void *annotDisplayDecideCbkData = NULL);
+
+ // Display a range of pages.
+ void displayPages(OutputDev *out, int firstPage, int lastPage,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+ void *annotDisplayDecideCbkData = NULL);
+
+ // Display part of a page.
+ void displayPageSlice(OutputDev *out, int page,
+ double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool crop, GBool printing,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+ void *annotDisplayDecideCbkData = NULL);
+
+ // Find a page, given its object ID. Returns page number, or 0 if
+ // not found.
+ int findPage(int num, int gen) { return catalog->findPage(num, gen); }
+
+ // Returns the links for the current page, transferring ownership to
+ // the caller.
+ Links *getLinks(int page);
+
+ // Find a named destination. Returns the link destination, or
+ // NULL if <name> is not a destination.
+ LinkDest *findDest(GooString *name)
+ { return catalog->findDest(name); }
+
+ // Process the links for a page.
+ void processLinks(OutputDev *out, int page);
+
+
+#ifndef DISABLE_OUTLINE
+ // Return the outline object.
+ Outline *getOutline() { return outline; }
+#endif
+
+ // Is the file encrypted?
+ GBool isEncrypted() { return xref->isEncrypted(); }
+
+ // Check various permissions.
+ GBool okToPrint(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToPrint(ignoreOwnerPW); }
+ GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToPrintHighRes(ignoreOwnerPW); }
+ GBool okToChange(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToChange(ignoreOwnerPW); }
+ GBool okToCopy(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToCopy(ignoreOwnerPW); }
+ GBool okToAddNotes(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToAddNotes(ignoreOwnerPW); }
+ GBool okToFillForm(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToFillForm(ignoreOwnerPW); }
+ GBool okToAccessibility(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToAccessibility(ignoreOwnerPW); }
+ GBool okToAssemble(GBool ignoreOwnerPW = gFalse)
+ { return xref->okToAssemble(ignoreOwnerPW); }
+
+
+ // Is this document linearized?
+ GBool isLinearized();
+
+ // Return the document's Info dictionary (if any).
+ Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
+ Object *getDocInfoNF(Object *obj) { return xref->getDocInfoNF(obj); }
+
+ // Return the PDF version specified by the file.
+ int getPDFMajorVersion() { return pdfMajorVersion; }
+ int getPDFMinorVersion() { return pdfMinorVersion; }
+
+ // Save this file with another name.
+ int saveAs(GooString *name, PDFWriteMode mode=writeStandard);
+ // Save this file in the given output stream.
+ int saveAs(OutStream *outStr, PDFWriteMode mode=writeStandard);
+ // Save this file with another name without saving changes
+ int saveWithoutChangesAs(GooString *name);
+ // Save this file in the given output stream without saving changes
+ int saveWithoutChangesAs(OutStream *outStr);
+
+ // Return a pointer to the GUI (XPDFCore or WinPDFCore object).
+ void *getGUIData() { return guiData; }
+
+private:
+ // Add object to current file stream and return the offset of the beginning of the object
+ Guint writeObject (Object *obj, Ref *ref, OutStream* outStr);
+ void writeDictionnary (Dict* dict, OutStream* outStr);
+ void writeStream (Stream* str, OutStream* outStr);
+ void writeRawStream (Stream* str, OutStream* outStr);
+ void writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, GBool incrUpdate);
+ void writeString (GooString* s, OutStream* outStr);
+ void saveIncrementalUpdate (OutStream* outStr);
+ void saveCompleteRewrite (OutStream* outStr);
+
+
+ GBool setup(GooString *ownerPassword, GooString *userPassword);
+ GBool checkFooter();
+ void checkHeader();
+ GBool checkEncryption(GooString *ownerPassword, GooString *userPassword);
+
+ GooString *fileName;
+ FILE *file;
+ BaseStream *str;
+ void *guiData;
+ int pdfMajorVersion;
+ int pdfMinorVersion;
+ XRef *xref;
+ Catalog *catalog;
+#ifndef DISABLE_OUTLINE
+ Outline *outline;
+#endif
+
+ GBool ok;
+ int errCode;
+ //If there is an error opening the PDF file with fopen() in the constructor,
+ //then the POSIX errno will be here.
+ int fopenErrno;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.cc
new file mode 100644
index 00000000000..628d3666d09
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.cc
@@ -0,0 +1,69 @@
+//========================================================================
+//
+// PDFDocEncoding.cc
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "PDFDocEncoding.h"
+
+// Mapping of PDFDocEncoding (used to represent text values such as document
+// metadata or annotation text) to Unicode codepoints. Not all 8-bit values in
+// PDFDocEncoding are defined; undefined bytes are mapped to U+FFFD (Unicode
+// replacement character).
+//
+// PDFDocEncoding is only directly defined for printable characters, but some
+// control characters such as carriage return will still be used. We define
+// mappings of the standard whitespace control characters (tabs, newlines) to
+// the corresponding Unicode values. Other control characters are left
+// undefined.
+
+Unicode pdfDocEncoding[256] = {
+ 0x0000, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 00
+ 0xfffd, 0x0009, 0x000a, 0xfffd, 0x000c, 0x000d, 0xfffd, 0xfffd,
+ 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 10
+ 0x02d8, 0x02c7, 0x02c6, 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, // 20
+ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, // 30
+ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, // 40
+ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, // 50
+ 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, // 60
+ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, // 70
+ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0xfffd,
+ 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x0192, 0x2044, // 80
+ 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018,
+ 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x0141, 0x0152, 0x0160, // 90
+ 0x0178, 0x017d, 0x0131, 0x0142, 0x0153, 0x0161, 0x017e, 0xfffd,
+ 0x20ac, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, // a0
+ 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0xfffd, 0x00ae, 0x00af,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, // b0
+ 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, // c0
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, // d0
+ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, // e0
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, // f0
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.h
new file mode 100644
index 00000000000..4f0840bb28a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PDFDocEncoding.h
@@ -0,0 +1,34 @@
+//========================================================================
+//
+// PDFDocEncoding.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PDFDOCENCODING_H
+#define PDFDOCENCODING_H
+
+#include "CharTypes.h"
+
+class GooString;
+
+extern Unicode pdfDocEncoding[256];
+
+char* pdfDocEncodingToUTF16 (GooString* orig, int* length);
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.cc
new file mode 100644
index 00000000000..1cf2eea4876
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.cc
@@ -0,0 +1,6595 @@
+//========================================================================
+//
+// PSOutputDev.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007, 2008 Brad Hards <bradh@kde.org>
+// Copyright (C) 2008, 2009 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdarg.h>
+#include <signal.h>
+#include <math.h>
+#include <limits.h>
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "poppler-config.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Error.h"
+#include "Function.h"
+#include "Gfx.h"
+#include "GfxState.h"
+#include "GfxFont.h"
+#include "UnicodeMap.h"
+#include <fofi/FoFiType1C.h>
+#include <fofi/FoFiTrueType.h>
+#include "Catalog.h"
+#include "Page.h"
+#include "Stream.h"
+#include "Annot.h"
+#include "XRef.h"
+#include "PreScanOutputDev.h"
+#include "FileSpec.h"
+#if HAVE_SPLASH
+# include "splash/Splash.h"
+# include "splash/SplashBitmap.h"
+# include "SplashOutputDev.h"
+#endif
+#include "PSOutputDev.h"
+
+#ifdef MACOS
+// needed for setting type/creator of MacOS files
+#include "ICSupport.h"
+#endif
+
+// the MSVC math.h doesn't define this
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+//------------------------------------------------------------------------
+
+// Resolution at which pages with transparency will be rasterized.
+#define splashDPI 300
+
+//------------------------------------------------------------------------
+// PostScript prolog and setup
+//------------------------------------------------------------------------
+
+// The '~' escapes mark prolog code that is emitted only in certain
+// levels:
+//
+// ~[123][sn]
+// ^ ^----- s=psLevel*Sep, n=psLevel*
+// +----- 1=psLevel1*, 2=psLevel2*, 3=psLevel3*
+
+static char *prolog[] = {
+ "/xpdf 75 dict def xpdf begin",
+ "% PDF special state",
+ "/pdfDictSize 15 def",
+ "~1sn",
+ "/pdfStates 64 array def",
+ " 0 1 63 {",
+ " pdfStates exch pdfDictSize dict",
+ " dup /pdfStateIdx 3 index put",
+ " put",
+ " } for",
+ "~123sn",
+ "/pdfSetup {",
+ " 3 1 roll 2 array astore",
+ " /setpagedevice where {",
+ " pop 3 dict begin",
+ " /PageSize exch def",
+ " /ImagingBBox null def",
+ " /Policies 1 dict dup begin /PageSize 3 def end def",
+ " { /Duplex true def } if",
+ " currentdict end setpagedevice",
+ " } {",
+ " pop pop",
+ " } ifelse",
+ "} def",
+ "~1sn",
+ "/pdfOpNames [",
+ " /pdfFill /pdfStroke /pdfLastFill /pdfLastStroke",
+ " /pdfTextMat /pdfFontSize /pdfCharSpacing /pdfTextRender",
+ " /pdfTextRise /pdfWordSpacing /pdfHorizScaling /pdfTextClipPath",
+ "] def",
+ "~123sn",
+ "/pdfStartPage {",
+ "~1sn",
+ " pdfStates 0 get begin",
+ "~23sn",
+ " pdfDictSize dict begin",
+ "~23n",
+ " /pdfFillCS [] def",
+ " /pdfFillXform {} def",
+ " /pdfStrokeCS [] def",
+ " /pdfStrokeXform {} def",
+ "~1n",
+ " /pdfFill 0 def",
+ " /pdfStroke 0 def",
+ "~1s",
+ " /pdfFill [0 0 0 1] def",
+ " /pdfStroke [0 0 0 1] def",
+ "~23sn",
+ " /pdfFill [0] def",
+ " /pdfStroke [0] def",
+ " /pdfFillOP false def",
+ " /pdfStrokeOP false def",
+ "~123sn",
+ " /pdfLastFill false def",
+ " /pdfLastStroke false def",
+ " /pdfTextMat [1 0 0 1 0 0] def",
+ " /pdfFontSize 0 def",
+ " /pdfCharSpacing 0 def",
+ " /pdfTextRender 0 def",
+ " /pdfTextRise 0 def",
+ " /pdfWordSpacing 0 def",
+ " /pdfHorizScaling 1 def",
+ " /pdfTextClipPath [] def",
+ "} def",
+ "/pdfEndPage { end } def",
+ "~23s",
+ "% separation convention operators",
+ "/findcmykcustomcolor where {",
+ " pop",
+ "}{",
+ " /findcmykcustomcolor { 5 array astore } def",
+ "} ifelse",
+ "/setcustomcolor where {",
+ " pop",
+ "}{",
+ " /setcustomcolor {",
+ " exch",
+ " [ exch /Separation exch dup 4 get exch /DeviceCMYK exch",
+ " 0 4 getinterval cvx",
+ " [ exch /dup load exch { mul exch dup } /forall load",
+ " /pop load dup ] cvx",
+ " ] setcolorspace setcolor",
+ " } def",
+ "} ifelse",
+ "/customcolorimage where {",
+ " pop",
+ "}{",
+ " /customcolorimage {",
+ " gsave",
+ " [ exch /Separation exch dup 4 get exch /DeviceCMYK exch",
+ " 0 4 getinterval",
+ " [ exch /dup load exch { mul exch dup } /forall load",
+ " /pop load dup ] cvx",
+ " ] setcolorspace",
+ " 10 dict begin",
+ " /ImageType 1 def",
+ " /DataSource exch def",
+ " /ImageMatrix exch def",
+ " /BitsPerComponent exch def",
+ " /Height exch def",
+ " /Width exch def",
+ " /Decode [1 0] def",
+ " currentdict end",
+ " image",
+ " grestore",
+ " } def",
+ "} ifelse",
+ "~123sn",
+ "% PDF color state",
+ "~1n",
+ "/g { dup /pdfFill exch def setgray",
+ " /pdfLastFill true def /pdfLastStroke false def } def",
+ "/G { dup /pdfStroke exch def setgray",
+ " /pdfLastStroke true def /pdfLastFill false def } def",
+ "/fCol {",
+ " pdfLastFill not {",
+ " pdfFill setgray",
+ " /pdfLastFill true def /pdfLastStroke false def",
+ " } if",
+ "} def",
+ "/sCol {",
+ " pdfLastStroke not {",
+ " pdfStroke setgray",
+ " /pdfLastStroke true def /pdfLastFill false def",
+ " } if",
+ "} def",
+ "~1s",
+ "/k { 4 copy 4 array astore /pdfFill exch def setcmykcolor",
+ " /pdfLastFill true def /pdfLastStroke false def } def",
+ "/K { 4 copy 4 array astore /pdfStroke exch def setcmykcolor",
+ " /pdfLastStroke true def /pdfLastFill false def } def",
+ "/fCol {",
+ " pdfLastFill not {",
+ " pdfFill aload pop setcmykcolor",
+ " /pdfLastFill true def /pdfLastStroke false def",
+ " } if",
+ "} def",
+ "/sCol {",
+ " pdfLastStroke not {",
+ " pdfStroke aload pop setcmykcolor",
+ " /pdfLastStroke true def /pdfLastFill false def",
+ " } if",
+ "} def",
+ "~23n",
+ "/cs { /pdfFillXform exch def dup /pdfFillCS exch def",
+ " setcolorspace } def",
+ "/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def",
+ " setcolorspace } def",
+ "/sc { pdfLastFill not { pdfFillCS setcolorspace } if",
+ " dup /pdfFill exch def aload pop pdfFillXform setcolor",
+ " /pdfLastFill true def /pdfLastStroke false def } def",
+ "/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if",
+ " dup /pdfStroke exch def aload pop pdfStrokeXform setcolor",
+ " /pdfLastStroke true def /pdfLastFill false def } def",
+ "/op { /pdfFillOP exch def",
+ " pdfLastFill { pdfFillOP setoverprint } if } def",
+ "/OP { /pdfStrokeOP exch def",
+ " pdfLastStroke { pdfStrokeOP setoverprint } if } def",
+ "/fCol {",
+ " pdfLastFill not {",
+ " pdfFillCS setcolorspace",
+ " pdfFill aload pop pdfFillXform setcolor",
+ " pdfFillOP setoverprint",
+ " /pdfLastFill true def /pdfLastStroke false def",
+ " } if",
+ "} def",
+ "/sCol {",
+ " pdfLastStroke not {",
+ " pdfStrokeCS setcolorspace",
+ " pdfStroke aload pop pdfStrokeXform setcolor",
+ " pdfStrokeOP setoverprint",
+ " /pdfLastStroke true def /pdfLastFill false def",
+ " } if",
+ "} def",
+ "~23s",
+ "/k { 4 copy 4 array astore /pdfFill exch def setcmykcolor",
+ " /pdfLastFill true def /pdfLastStroke false def } def",
+ "/K { 4 copy 4 array astore /pdfStroke exch def setcmykcolor",
+ " /pdfLastStroke true def /pdfLastFill false def } def",
+ "/ck { 6 copy 6 array astore /pdfFill exch def",
+ " findcmykcustomcolor exch setcustomcolor",
+ " /pdfLastFill true def /pdfLastStroke false def } def",
+ "/CK { 6 copy 6 array astore /pdfStroke exch def",
+ " findcmykcustomcolor exch setcustomcolor",
+ " /pdfLastStroke true def /pdfLastFill false def } def",
+ "/op { /pdfFillOP exch def",
+ " pdfLastFill { pdfFillOP setoverprint } if } def",
+ "/OP { /pdfStrokeOP exch def",
+ " pdfLastStroke { pdfStrokeOP setoverprint } if } def",
+ "/fCol {",
+ " pdfLastFill not {",
+ " pdfFill aload length 4 eq {",
+ " setcmykcolor",
+ " }{",
+ " findcmykcustomcolor exch setcustomcolor",
+ " } ifelse",
+ " pdfFillOP setoverprint",
+ " /pdfLastFill true def /pdfLastStroke false def",
+ " } if",
+ "} def",
+ "/sCol {",
+ " pdfLastStroke not {",
+ " pdfStroke aload length 4 eq {",
+ " setcmykcolor",
+ " }{",
+ " findcmykcustomcolor exch setcustomcolor",
+ " } ifelse",
+ " pdfStrokeOP setoverprint",
+ " /pdfLastStroke true def /pdfLastFill false def",
+ " } if",
+ "} def",
+ "~123sn",
+ "% build a font",
+ "/pdfMakeFont {",
+ " 4 3 roll findfont",
+ " 4 2 roll matrix scale makefont",
+ " dup length dict begin",
+ " { 1 index /FID ne { def } { pop pop } ifelse } forall",
+ " /Encoding exch def",
+ " currentdict",
+ " end",
+ " definefont pop",
+ "} def",
+ "/pdfMakeFont16 {",
+ " exch findfont",
+ " dup length dict begin",
+ " { 1 index /FID ne { def } { pop pop } ifelse } forall",
+ " /WMode exch def",
+ " currentdict",
+ " end",
+ " definefont pop",
+ "} def",
+ "~3sn",
+ "/pdfMakeFont16L3 {",
+ " 1 index /CIDFont resourcestatus {",
+ " pop pop 1 index /CIDFont findresource /CIDFontType known",
+ " } {",
+ " false",
+ " } ifelse",
+ " {",
+ " 0 eq { /Identity-H } { /Identity-V } ifelse",
+ " exch 1 array astore composefont pop",
+ " } {",
+ " pdfMakeFont16",
+ " } ifelse",
+ "} def",
+ "~123sn",
+ "% graphics state operators",
+ "~1sn",
+ "/q {",
+ " gsave",
+ " pdfOpNames length 1 sub -1 0 { pdfOpNames exch get load } for",
+ " pdfStates pdfStateIdx 1 add get begin",
+ " pdfOpNames { exch def } forall",
+ "} def",
+ "/Q { end grestore } def",
+ "~23sn",
+ "/q { gsave pdfDictSize dict begin } def",
+ "/Q {",
+ " end grestore",
+ " /pdfLastFill where {",
+ " pop",
+ " pdfLastFill {",
+ " pdfFillOP setoverprint",
+ " } {",
+ " pdfStrokeOP setoverprint",
+ " } ifelse",
+ " } if",
+ "} def",
+ "~123sn",
+ "/cm { concat } def",
+ "/d { setdash } def",
+ "/i { setflat } def",
+ "/j { setlinejoin } def",
+ "/J { setlinecap } def",
+ "/M { setmiterlimit } def",
+ "/w { setlinewidth } def",
+ "% path segment operators",
+ "/m { moveto } def",
+ "/l { lineto } def",
+ "/c { curveto } def",
+ "/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto",
+ " neg 0 rlineto closepath } def",
+ "/h { closepath } def",
+ "% path painting operators",
+ "/S { sCol stroke } def",
+ "/Sf { fCol stroke } def",
+ "/f { fCol fill } def",
+ "/f* { fCol eofill } def",
+ "% clipping operators",
+ "/W { clip newpath } def",
+ "/W* { eoclip newpath } def",
+ "/Ws { strokepath clip newpath } def",
+ "% text state operators",
+ "/Tc { /pdfCharSpacing exch def } def",
+ "/Tf { dup /pdfFontSize exch def",
+ " dup pdfHorizScaling mul exch matrix scale",
+ " pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put",
+ " exch findfont exch makefont setfont } def",
+ "/Tr { /pdfTextRender exch def } def",
+ "/Ts { /pdfTextRise exch def } def",
+ "/Tw { /pdfWordSpacing exch def } def",
+ "/Tz { /pdfHorizScaling exch def } def",
+ "% text positioning operators",
+ "/Td { pdfTextMat transform moveto } def",
+ "/Tm { /pdfTextMat exch def } def",
+ "% text string operators",
+ "/cshow where {",
+ " pop",
+ " /cshow2 {",
+ " dup {",
+ " pop pop",
+ " 1 string dup 0 3 index put 3 index exec",
+ " } exch cshow",
+ " pop pop",
+ " } def",
+ "}{",
+ " /cshow2 {",
+ " currentfont /FontType get 0 eq {",
+ " 0 2 2 index length 1 sub {",
+ " 2 copy get exch 1 add 2 index exch get",
+ " 2 copy exch 256 mul add",
+ " 2 string dup 0 6 5 roll put dup 1 5 4 roll put",
+ " 3 index exec",
+ " } for",
+ " } {",
+ " dup {",
+ " 1 string dup 0 3 index put 3 index exec",
+ " } forall",
+ " } ifelse",
+ " pop pop",
+ " } def",
+ "} ifelse",
+ "/awcp {", // awidthcharpath
+ " exch {",
+ " false charpath",
+ " 5 index 5 index rmoveto",
+ " 6 index eq { 7 index 7 index rmoveto } if",
+ " } exch cshow2",
+ " 6 {pop} repeat",
+ "} def",
+ "/Tj {",
+ " fCol", // because stringwidth has to draw Type 3 chars
+ " 1 index stringwidth pdfTextMat idtransform pop",
+ " sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse",
+ " pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32",
+ " 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0",
+ " pdfTextMat dtransform",
+ " 6 5 roll Tj1",
+ "} def",
+ "/Tj16 {",
+ " fCol", // because stringwidth has to draw Type 3 chars
+ " 2 index stringwidth pdfTextMat idtransform pop",
+ " sub exch div",
+ " pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32",
+ " 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0",
+ " pdfTextMat dtransform",
+ " 6 5 roll Tj1",
+ "} def",
+ "/Tj16V {",
+ " fCol", // because stringwidth has to draw Type 3 chars
+ " 2 index stringwidth pdfTextMat idtransform exch pop",
+ " sub exch div",
+ " 0 pdfWordSpacing pdfTextMat dtransform 32",
+ " 4 3 roll pdfCharSpacing add 0 exch",
+ " pdfTextMat dtransform",
+ " 6 5 roll Tj1",
+ "} def",
+ "/Tj1 {",
+ " 0 pdfTextRise pdfTextMat dtransform rmoveto",
+ " currentpoint 8 2 roll",
+ " pdfTextRender 1 and 0 eq {",
+ " 6 copy awidthshow",
+ " } if",
+ " pdfTextRender 3 and dup 1 eq exch 2 eq or {",
+ " 7 index 7 index moveto",
+ " 6 copy",
+ " currentfont /FontType get 3 eq { fCol } { sCol } ifelse",
+ " false awcp currentpoint stroke moveto",
+ " } if",
+ " pdfTextRender 4 and 0 ne {",
+ " 8 6 roll moveto",
+ " false awcp",
+ " /pdfTextClipPath [ pdfTextClipPath aload pop",
+ " {/moveto cvx}",
+ " {/lineto cvx}",
+ " {/curveto cvx}",
+ " {/closepath cvx}",
+ " pathforall ] def",
+ " currentpoint newpath moveto",
+ " } {",
+ " 8 {pop} repeat",
+ " } ifelse",
+ " 0 pdfTextRise neg pdfTextMat dtransform rmoveto",
+ "} def",
+ "/TJm { pdfFontSize 0.001 mul mul neg 0",
+ " pdfTextMat dtransform rmoveto } def",
+ "/TJmV { pdfFontSize 0.001 mul mul neg 0 exch",
+ " pdfTextMat dtransform rmoveto } def",
+ "/Tclip { pdfTextClipPath cvx exec clip newpath",
+ " /pdfTextClipPath [] def } def",
+ "/Tclip* { pdfTextClipPath cvx exec eoclip newpath",
+ " /pdfTextClipPath [] def } def",
+ "~1ns",
+ "% Level 1 image operators",
+ "~1n",
+ "/pdfIm1 {",
+ " /pdfImBuf1 4 index string def",
+ " { currentfile pdfImBuf1 readhexstring pop } image",
+ "} def",
+ "~1s",
+ "/pdfIm1Sep {",
+ " /pdfImBuf1 4 index string def",
+ " /pdfImBuf2 4 index string def",
+ " /pdfImBuf3 4 index string def",
+ " /pdfImBuf4 4 index string def",
+ " { currentfile pdfImBuf1 readhexstring pop }",
+ " { currentfile pdfImBuf2 readhexstring pop }",
+ " { currentfile pdfImBuf3 readhexstring pop }",
+ " { currentfile pdfImBuf4 readhexstring pop }",
+ " true 4 colorimage",
+ "} def",
+ "~1ns",
+ "/pdfImM1 {",
+ " fCol /pdfImBuf1 4 index 7 add 8 idiv string def",
+ " { currentfile pdfImBuf1 readhexstring pop } imagemask",
+ "} def",
+ "/pdfImM1a {",
+ " { 2 copy get exch 1 add exch } imagemask",
+ " pop pop",
+ "} def",
+ "~23sn",
+ "% Level 2 image operators",
+ "/pdfImBuf 100 string def",
+ "/pdfIm {",
+ " image",
+ " { currentfile pdfImBuf readline",
+ " not { pop exit } if",
+ " (%-EOD-) eq { exit } if } loop",
+ "} def",
+ "~23s",
+ "/pdfImSep {",
+ " findcmykcustomcolor exch",
+ " dup /Width get /pdfImBuf1 exch string def",
+ " dup /Decode get aload pop 1 index sub /pdfImDecodeRange exch def",
+ " /pdfImDecodeLow exch def",
+ " begin Width Height BitsPerComponent ImageMatrix DataSource end",
+ " /pdfImData exch def",
+ " { pdfImData pdfImBuf1 readstring pop",
+ " 0 1 2 index length 1 sub {",
+ " 1 index exch 2 copy get",
+ " pdfImDecodeRange mul 255 div pdfImDecodeLow add round cvi",
+ " 255 exch sub put",
+ " } for }",
+ " 6 5 roll customcolorimage",
+ " { currentfile pdfImBuf readline",
+ " not { pop exit } if",
+ " (%-EOD-) eq { exit } if } loop",
+ "} def",
+ "~23sn",
+ "/pdfImM {",
+ " fCol imagemask",
+ " { currentfile pdfImBuf readline",
+ " not { pop exit } if",
+ " (%-EOD-) eq { exit } if } loop",
+ "} def",
+ "/pr { 2 index 2 index 3 2 roll putinterval 4 add } def",
+ "/pdfImClip {",
+ " gsave",
+ " 0 2 4 index length 1 sub {",
+ " dup 4 index exch 2 copy",
+ " get 5 index div put",
+ " 1 add 3 index exch 2 copy",
+ " get 3 index div put",
+ " } for",
+ " pop pop rectclip",
+ "} def",
+ "/pdfImClipEnd { grestore } def",
+ "~23sn",
+ "% shading operators",
+ "/colordelta {",
+ " false 0 1 3 index length 1 sub {",
+ " dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt {",
+ " pop true",
+ " } if",
+ " } for",
+ " exch pop exch pop",
+ "} def",
+ "/funcCol { func n array astore } def",
+ "/funcSH {",
+ " dup 0 eq {",
+ " true",
+ " } {",
+ " dup 6 eq {",
+ " false",
+ " } {",
+ " 4 index 4 index funcCol dup",
+ " 6 index 4 index funcCol dup",
+ " 3 1 roll colordelta 3 1 roll",
+ " 5 index 5 index funcCol dup",
+ " 3 1 roll colordelta 3 1 roll",
+ " 6 index 8 index funcCol dup",
+ " 3 1 roll colordelta 3 1 roll",
+ " colordelta or or or",
+ " } ifelse",
+ " } ifelse",
+ " {",
+ " 1 add",
+ " 4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch",
+ " 6 index 6 index 4 index 4 index 4 index funcSH",
+ " 2 index 6 index 6 index 4 index 4 index funcSH",
+ " 6 index 2 index 4 index 6 index 4 index funcSH",
+ " 5 3 roll 3 2 roll funcSH pop pop",
+ " } {",
+ " pop 3 index 2 index add 0.5 mul 3 index 2 index add 0.5 mul",
+ "~23n",
+ " funcCol sc",
+ "~23s",
+ " funcCol aload pop k",
+ "~23sn",
+ " dup 4 index exch mat transform m",
+ " 3 index 3 index mat transform l",
+ " 1 index 3 index mat transform l",
+ " mat transform l pop pop h f*",
+ " } ifelse",
+ "} def",
+ "/axialCol {",
+ " dup 0 lt {",
+ " pop t0",
+ " } {",
+ " dup 1 gt {",
+ " pop t1",
+ " } {",
+ " dt mul t0 add",
+ " } ifelse",
+ " } ifelse",
+ " func n array astore",
+ "} def",
+ "/axialSH {",
+ " dup 0 eq {",
+ " true",
+ " } {",
+ " dup 8 eq {",
+ " false",
+ " } {",
+ " 2 index axialCol 2 index axialCol colordelta",
+ " } ifelse",
+ " } ifelse",
+ " {",
+ " 1 add 3 1 roll 2 copy add 0.5 mul",
+ " dup 4 3 roll exch 4 index axialSH",
+ " exch 3 2 roll axialSH",
+ " } {",
+ " pop 2 copy add 0.5 mul",
+ "~23n",
+ " axialCol sc",
+ "~23s",
+ " axialCol aload pop k",
+ "~23sn",
+ " exch dup dx mul x0 add exch dy mul y0 add",
+ " 3 2 roll dup dx mul x0 add exch dy mul y0 add",
+ " dx abs dy abs ge {",
+ " 2 copy yMin sub dy mul dx div add yMin m",
+ " yMax sub dy mul dx div add yMax l",
+ " 2 copy yMax sub dy mul dx div add yMax l",
+ " yMin sub dy mul dx div add yMin l",
+ " h f*",
+ " } {",
+ " exch 2 copy xMin sub dx mul dy div add xMin exch m",
+ " xMax sub dx mul dy div add xMax exch l",
+ " exch 2 copy xMax sub dx mul dy div add xMax exch l",
+ " xMin sub dx mul dy div add xMin exch l",
+ " h f*",
+ " } ifelse",
+ " } ifelse",
+ "} def",
+ "/radialCol {",
+ " dup t0 lt {",
+ " pop t0",
+ " } {",
+ " dup t1 gt {",
+ " pop t1",
+ " } if",
+ " } ifelse",
+ " func n array astore",
+ "} def",
+ "/radialSH {",
+ " dup 0 eq {",
+ " true",
+ " } {",
+ " dup 8 eq {",
+ " false",
+ " } {",
+ " 2 index dt mul t0 add radialCol",
+ " 2 index dt mul t0 add radialCol colordelta",
+ " } ifelse",
+ " } ifelse",
+ " {",
+ " 1 add 3 1 roll 2 copy add 0.5 mul",
+ " dup 4 3 roll exch 4 index radialSH",
+ " exch 3 2 roll radialSH",
+ " } {",
+ " pop 2 copy add 0.5 mul dt mul t0 add",
+ "~23n",
+ " radialCol sc",
+ "~23s",
+ " radialCol aload pop k",
+ "~23sn",
+ " encl {",
+ " exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " 0 360 arc h",
+ " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " 360 0 arcn h f",
+ " } {",
+ " 2 copy",
+ " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " a1 a2 arcn",
+ " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " a2 a1 arcn h",
+ " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " a1 a2 arc",
+ " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add",
+ " a2 a1 arc h f",
+ " } ifelse",
+ " } ifelse",
+ "} def",
+ "~123sn",
+ "end",
+ NULL
+};
+
+static char *cmapProlog[] = {
+ "/CIDInit /ProcSet findresource begin",
+ "10 dict begin",
+ " begincmap",
+ " /CMapType 1 def",
+ " /CMapName /Identity-H def",
+ " /CIDSystemInfo 3 dict dup begin",
+ " /Registry (Adobe) def",
+ " /Ordering (Identity) def",
+ " /Supplement 0 def",
+ " end def",
+ " 1 begincodespacerange",
+ " <0000> <ffff>",
+ " endcodespacerange",
+ " 0 usefont",
+ " 1 begincidrange",
+ " <0000> <ffff> 0",
+ " endcidrange",
+ " endcmap",
+ " currentdict CMapName exch /CMap defineresource pop",
+ "end",
+ "10 dict begin",
+ " begincmap",
+ " /CMapType 1 def",
+ " /CMapName /Identity-V def",
+ " /CIDSystemInfo 3 dict dup begin",
+ " /Registry (Adobe) def",
+ " /Ordering (Identity) def",
+ " /Supplement 0 def",
+ " end def",
+ " /WMode 1 def",
+ " 1 begincodespacerange",
+ " <0000> <ffff>",
+ " endcodespacerange",
+ " 0 usefont",
+ " 1 begincidrange",
+ " <0000> <ffff> 0",
+ " endcidrange",
+ " endcmap",
+ " currentdict CMapName exch /CMap defineresource pop",
+ "end",
+ "end",
+ NULL
+};
+
+//------------------------------------------------------------------------
+// Fonts
+//------------------------------------------------------------------------
+
+struct PSSubstFont {
+ char *psName; // PostScript name
+ double mWidth; // width of 'm' character
+};
+
+static const char *psFonts[] = {
+ "Courier",
+ "Courier-Bold",
+ "Courier-Oblique",
+ "Courier-BoldOblique",
+ "Helvetica",
+ "Helvetica-Bold",
+ "Helvetica-Oblique",
+ "Helvetica-BoldOblique",
+ "Symbol",
+ "Times-Roman",
+ "Times-Bold",
+ "Times-Italic",
+ "Times-BoldItalic",
+ "ZapfDingbats",
+ NULL
+};
+
+static const PSSubstFont psSubstFonts[] = {
+ {"Helvetica", 0.833},
+ {"Helvetica-Oblique", 0.833},
+ {"Helvetica-Bold", 0.889},
+ {"Helvetica-BoldOblique", 0.889},
+ {"Times-Roman", 0.788},
+ {"Times-Italic", 0.722},
+ {"Times-Bold", 0.833},
+ {"Times-BoldItalic", 0.778},
+ {"Courier", 0.600},
+ {"Courier-Oblique", 0.600},
+ {"Courier-Bold", 0.600},
+ {"Courier-BoldOblique", 0.600}
+};
+
+// Info for 8-bit fonts
+struct PSFont8Info {
+ Ref fontID;
+ Gushort *codeToGID; // code-to-GID mapping for TrueType fonts
+};
+
+// Encoding info for substitute 16-bit font
+struct PSFont16Enc {
+ Ref fontID;
+ GooString *enc;
+};
+
+//------------------------------------------------------------------------
+// process colors
+//------------------------------------------------------------------------
+
+#define psProcessCyan 1
+#define psProcessMagenta 2
+#define psProcessYellow 4
+#define psProcessBlack 8
+#define psProcessCMYK 15
+
+//------------------------------------------------------------------------
+// PSOutCustomColor
+//------------------------------------------------------------------------
+
+class PSOutCustomColor {
+public:
+
+ PSOutCustomColor(double cA, double mA,
+ double yA, double kA, GooString *nameA);
+ ~PSOutCustomColor();
+
+ double c, m, y, k;
+ GooString *name;
+ PSOutCustomColor *next;
+};
+
+PSOutCustomColor::PSOutCustomColor(double cA, double mA,
+ double yA, double kA, GooString *nameA) {
+ c = cA;
+ m = mA;
+ y = yA;
+ k = kA;
+ name = nameA;
+ next = NULL;
+}
+
+PSOutCustomColor::~PSOutCustomColor() {
+ delete name;
+}
+
+//------------------------------------------------------------------------
+
+struct PSOutImgClipRect {
+ int x0, x1, y0, y1;
+};
+
+//------------------------------------------------------------------------
+// DeviceNRecoder
+//------------------------------------------------------------------------
+
+class DeviceNRecoder: public FilterStream {
+public:
+
+ DeviceNRecoder(Stream *strA, int widthA, int heightA,
+ GfxImageColorMap *colorMapA);
+ virtual ~DeviceNRecoder();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar()
+ { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; }
+ virtual int lookChar()
+ { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx]; }
+ virtual GooString *getPSFilter(int psLevel, char *indent) { return NULL; }
+ virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
+ virtual GBool isEncoder() { return gTrue; }
+
+private:
+
+ GBool fillBuf();
+
+ int width, height;
+ GfxImageColorMap *colorMap;
+ Function *func;
+ ImageStream *imgStr;
+ int buf[gfxColorMaxComps];
+ int pixelIdx;
+ int bufIdx;
+ int bufSize;
+};
+
+DeviceNRecoder::DeviceNRecoder(Stream *strA, int widthA, int heightA,
+ GfxImageColorMap *colorMapA):
+ FilterStream(strA) {
+ width = widthA;
+ height = heightA;
+ colorMap = colorMapA;
+ imgStr = NULL;
+ pixelIdx = 0;
+ bufIdx = gfxColorMaxComps;
+ bufSize = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->
+ getAlt()->getNComps();
+ func = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->
+ getTintTransformFunc();
+}
+
+DeviceNRecoder::~DeviceNRecoder() {
+ if (imgStr) {
+ delete imgStr;
+ }
+}
+
+void DeviceNRecoder::reset() {
+ imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+}
+
+GBool DeviceNRecoder::fillBuf() {
+ Guchar pixBuf[gfxColorMaxComps];
+ GfxColor color;
+ double x[gfxColorMaxComps], y[gfxColorMaxComps];
+ int i;
+
+ if (pixelIdx >= width * height) {
+ return gFalse;
+ }
+ imgStr->getPixel(pixBuf);
+ colorMap->getColor(pixBuf, &color);
+ for (i = 0;
+ i < ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->getNComps();
+ ++i) {
+ x[i] = colToDbl(color.c[i]);
+ }
+ func->transform(x, y);
+ for (i = 0; i < bufSize; ++i) {
+ buf[i] = (int)(y[i] * 255 + 0.5);
+ }
+ bufIdx = 0;
+ ++pixelIdx;
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// PSOutputDev
+//------------------------------------------------------------------------
+
+extern "C" {
+typedef void (*SignalFunc)(int);
+}
+
+static void outputToFile(void *stream, char *data, int len) {
+ fwrite(data, 1, len, (FILE *)stream);
+}
+
+PSOutputDev::PSOutputDev(const char *fileName, XRef *xrefA, Catalog *catalog,
+ char *psTitle,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int paperWidthA, int paperHeightA, GBool duplexA,
+ int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
+ GBool forceRasterizeA,
+ GBool manualCtrlA) {
+ FILE *f;
+ PSFileType fileTypeA;
+
+ underlayCbk = NULL;
+ underlayCbkData = NULL;
+ overlayCbk = NULL;
+ overlayCbkData = NULL;
+
+ fontIDs = NULL;
+ fontFileIDs = NULL;
+ fontFileNames = NULL;
+ font8Info = NULL;
+ font16Enc = NULL;
+ imgIDs = NULL;
+ formIDs = NULL;
+ xobjStack = NULL;
+ embFontList = NULL;
+ customColors = NULL;
+ haveTextClip = gFalse;
+ haveCSPattern = gFalse;
+ t3String = NULL;
+
+ forceRasterize = forceRasterizeA;
+
+ // open file or pipe
+ if (!strcmp(fileName, "-")) {
+ fileTypeA = psStdout;
+ f = stdout;
+ } else if (fileName[0] == '|') {
+ fileTypeA = psPipe;
+#ifdef HAVE_POPEN
+#ifndef _WIN32
+ signal(SIGPIPE, (SignalFunc)SIG_IGN);
+#endif
+ if (!(f = popen(fileName + 1, "w"))) {
+ error(-1, "Couldn't run print command '%s'", fileName);
+ ok = gFalse;
+ return;
+ }
+#else
+ error(-1, "Print commands are not supported ('%s')", fileName);
+ ok = gFalse;
+ return;
+#endif
+ } else {
+ fileTypeA = psFile;
+ if (!(f = fopen(fileName, "w"))) {
+ error(-1, "Couldn't open PostScript file '%s'", fileName);
+ ok = gFalse;
+ return;
+ }
+ }
+
+ init(outputToFile, f, fileTypeA, psTitle,
+ xrefA, catalog, firstPage, lastPage, modeA,
+ imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA,
+ paperWidthA, paperHeightA, duplexA);
+}
+
+PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
+ char *psTitle,
+ XRef *xrefA, Catalog *catalog,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int paperWidthA, int paperHeightA, GBool duplexA,
+ int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
+ GBool forceRasterizeA,
+ GBool manualCtrlA) {
+ underlayCbk = NULL;
+ underlayCbkData = NULL;
+ overlayCbk = NULL;
+ overlayCbkData = NULL;
+
+ fontIDs = NULL;
+ fontFileIDs = NULL;
+ fontFileNames = NULL;
+ font8Info = NULL;
+ font16Enc = NULL;
+ imgIDs = NULL;
+ formIDs = NULL;
+ xobjStack = NULL;
+ embFontList = NULL;
+ customColors = NULL;
+ haveTextClip = gFalse;
+ haveCSPattern = gFalse;
+ t3String = NULL;
+
+ forceRasterize = forceRasterizeA;
+
+ init(outputFuncA, outputStreamA, psGeneric, psTitle,
+ xrefA, catalog, firstPage, lastPage, modeA,
+ imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA,
+ paperWidthA, paperHeightA, duplexA);
+}
+
+void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
+ PSFileType fileTypeA, char *pstitle, XRef *xrefA, Catalog *catalog,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
+ GBool manualCtrlA, int paperWidthA, int paperHeightA,
+ GBool duplexA) {
+ Page *page;
+ PDFRectangle *box;
+
+ // initialize
+ displayText = gTrue;
+ ok = gTrue;
+ outputFunc = outputFuncA;
+ outputStream = outputStreamA;
+ fileType = fileTypeA;
+ m_catalog = catalog;
+ xref = xrefA;
+ level = globalParams->getPSLevel();
+ mode = modeA;
+ paperWidth = paperWidthA;
+ paperHeight = paperHeightA;
+ imgLLX = imgLLXA;
+ imgLLY = imgLLYA;
+ imgURX = imgURXA;
+ imgURY = imgURYA;
+ if (paperWidth < 0 || paperHeight < 0) {
+ // this check is needed in case the document has zero pages
+ if (firstPage > 0 && firstPage <= catalog->getNumPages()) {
+ page = catalog->getPage(firstPage);
+ paperWidth = (int)ceil(page->getMediaWidth());
+ paperHeight = (int)ceil(page->getMediaHeight());
+ } else {
+ paperWidth = 1;
+ paperHeight = 1;
+ }
+ }
+ substFonts = globalParams->getPSSubstFonts();
+ preload = globalParams->getPSPreload();
+ if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
+ imgLLX = imgLLY = 0;
+ imgURX = paperWidth;
+ imgURY = paperHeight;
+ }
+ if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
+ imgLLX = imgLLY = 0;
+ imgURX = paperWidth;
+ imgURY = paperHeight;
+ }
+ manualCtrl = manualCtrlA;
+ if (mode == psModeForm) {
+ lastPage = firstPage;
+ }
+ processColors = 0;
+ inType3Char = gFalse;
+
+#if OPI_SUPPORT
+ // initialize OPI nesting levels
+ opi13Nest = 0;
+ opi20Nest = 0;
+#endif
+
+ tx0 = ty0 = -1;
+ xScale0 = yScale0 = 0;
+ rotate0 = -1;
+ clipLLX0 = clipLLY0 = 0;
+ clipURX0 = clipURY0 = -1;
+
+ // initialize fontIDs, fontFileIDs, and fontFileNames lists
+ fontIDSize = 64;
+ fontIDLen = 0;
+ fontIDs = (Ref *)gmallocn(fontIDSize, sizeof(Ref));
+ fontFileIDSize = 64;
+ fontFileIDLen = 0;
+ fontFileIDs = (Ref *)gmallocn(fontFileIDSize, sizeof(Ref));
+ fontFileNameSize = 64;
+ fontFileNameLen = 0;
+ fontFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *));
+ psFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *));
+ nextTrueTypeNum = 0;
+ font8InfoLen = 0;
+ font8InfoSize = 0;
+ font16EncLen = 0;
+ font16EncSize = 0;
+ imgIDLen = 0;
+ imgIDSize = 0;
+ formIDLen = 0;
+ formIDSize = 0;
+
+ xobjStack = new GooList();
+ numSaves = 0;
+ numTilingPatterns = 0;
+ nextFunc = 0;
+
+ // initialize embedded font resource comment list
+ embFontList = new GooString();
+
+ if (!manualCtrl) {
+ // this check is needed in case the document has zero pages
+ if (firstPage > 0 && firstPage <= catalog->getNumPages()) {
+ writeHeader(firstPage, lastPage,
+ catalog->getPage(firstPage)->getMediaBox(),
+ catalog->getPage(firstPage)->getCropBox(),
+ catalog->getPage(firstPage)->getRotate(),
+ pstitle);
+ } else {
+ box = new PDFRectangle(0, 0, 1, 1);
+ writeHeader(firstPage, lastPage, box, box, 0, pstitle);
+ delete box;
+ }
+ if (mode != psModeForm) {
+ writePS("%%BeginProlog\n");
+ }
+ writeXpdfProcset();
+ if (mode != psModeForm) {
+ writePS("%%EndProlog\n");
+ writePS("%%BeginSetup\n");
+ }
+ writeDocSetup(catalog, firstPage, lastPage, duplexA);
+ if (mode != psModeForm) {
+ writePS("%%EndSetup\n");
+ }
+ }
+
+ // initialize sequential page number
+ seqPage = 1;
+}
+
+PSOutputDev::~PSOutputDev() {
+ PSOutCustomColor *cc;
+ int i;
+
+ if (ok) {
+ if (!manualCtrl) {
+ writePS("%%Trailer\n");
+ writeTrailer();
+ if (mode != psModeForm) {
+ writePS("%%EOF\n");
+ }
+ }
+ if (fileType == psFile) {
+#ifdef MACOS
+ ICS_MapRefNumAndAssign((short)((FILE *)outputStream)->handle);
+#endif
+ fclose((FILE *)outputStream);
+ }
+#ifdef HAVE_POPEN
+ else if (fileType == psPipe) {
+ pclose((FILE *)outputStream);
+#ifndef _WIN32
+ signal(SIGPIPE, (SignalFunc)SIG_DFL);
+#endif
+ }
+#endif
+ }
+ if (embFontList) {
+ delete embFontList;
+ }
+ if (fontIDs) {
+ gfree(fontIDs);
+ }
+ if (fontFileIDs) {
+ gfree(fontFileIDs);
+ }
+ if (fontFileNames) {
+ for (i = 0; i < fontFileNameLen; ++i) {
+ delete fontFileNames[i];
+ }
+ gfree(fontFileNames);
+ }
+ if (font8Info) {
+ for (i = 0; i < font8InfoLen; ++i) {
+ gfree(font8Info[i].codeToGID);
+ }
+ gfree(font8Info);
+ }
+ if (psFileNames) {
+ for (i = 0; i < fontFileNameLen; ++i) {
+ if (psFileNames[i])
+ delete psFileNames[i];
+ }
+ gfree(psFileNames);
+ }
+ if (font16Enc) {
+ for (i = 0; i < font16EncLen; ++i) {
+ delete font16Enc[i].enc;
+ }
+ gfree(font16Enc);
+ }
+ gfree(imgIDs);
+ gfree(formIDs);
+ if (xobjStack) {
+ delete xobjStack;
+ }
+ while (customColors) {
+ cc = customColors;
+ customColors = cc->next;
+ delete cc;
+ }
+}
+
+void PSOutputDev::writeHeader(int firstPage, int lastPage,
+ PDFRectangle *mediaBox, PDFRectangle *cropBox,
+ int pageRotate, char *psTitle) {
+ double x1, y1, x2, y2;
+ Object info, obj1;
+
+ switch (mode) {
+ case psModePSOrigPageSizes:
+ case psModePS:
+ writePS("%!PS-Adobe-3.0\n");
+ break;
+ case psModeEPS:
+ writePS("%!PS-Adobe-3.0 EPSF-3.0\n");
+ break;
+ case psModeForm:
+ writePS("%!PS-Adobe-3.0 Resource-Form\n");
+ break;
+ }
+ xref->getDocInfo(&info);
+ if (info.isDict() && info.dictLookup("Creator", &obj1)->isString()) {
+ writePS("%%Creator: ");
+ writePSTextLine(obj1.getString());
+ }
+ obj1.free();
+ info.free();
+ if(psTitle) {
+ writePSFmt("%%Title: {0:s}\n", psTitle);
+ }
+ writePSFmt("%%LanguageLevel: {0:d}\n",
+ (level == psLevel1 || level == psLevel1Sep) ? 1 :
+ (level == psLevel2 || level == psLevel2Sep) ? 2 : 3);
+ if (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) {
+ writePS("%%DocumentProcessColors: (atend)\n");
+ writePS("%%DocumentCustomColors: (atend)\n");
+ }
+ writePS("%%DocumentSuppliedResources: (atend)\n");
+
+ switch (mode) {
+ case psModePSOrigPageSizes:
+ prevWidth = 0;
+ prevHeight = 0;
+ case psModePS:
+ writePSFmt("%%DocumentMedia: plain {0:d} {1:d} 0 () ()\n",
+ paperWidth, paperHeight);
+ writePSFmt("%%BoundingBox: 0 0 {0:d} {1:d}\n", paperWidth, paperHeight);
+ writePSFmt("%%Pages: {0:d}\n", lastPage - firstPage + 1);
+ writePS("%%EndComments\n");
+ writePS("%%BeginDefaults\n");
+ writePS("%%PageMedia: plain\n");
+ writePS("%%EndDefaults\n");
+ break;
+ case psModeEPS:
+ epsX1 = cropBox->x1;
+ epsY1 = cropBox->y1;
+ epsX2 = cropBox->x2;
+ epsY2 = cropBox->y2;
+ if (pageRotate == 0 || pageRotate == 180) {
+ x1 = epsX1;
+ y1 = epsY1;
+ x2 = epsX2;
+ y2 = epsY2;
+ } else { // pageRotate == 90 || pageRotate == 270
+ x1 = 0;
+ y1 = 0;
+ x2 = epsY2 - epsY1;
+ y2 = epsX2 - epsX1;
+ }
+ writePSFmt("%%BoundingBox: {0:d} {1:d} {2:d} {3:d}\n",
+ (int)floor(x1), (int)floor(y1), (int)ceil(x2), (int)ceil(y2));
+ if (floor(x1) != ceil(x1) || floor(y1) != ceil(y1) ||
+ floor(x2) != ceil(x2) || floor(y2) != ceil(y2)) {
+ writePSFmt("%%HiResBoundingBox: {0:.4g} {1:.4g} {2:.4g} {3:.4g}\n",
+ x1, y1, x2, y2);
+ }
+ writePS("%%DocumentSuppliedResources: (atend)\n");
+ writePS("%%EndComments\n");
+ break;
+ case psModeForm:
+ writePS("%%EndComments\n");
+ writePS("32 dict dup begin\n");
+ writePSFmt("/BBox [{0:d} {1:d} {2:d} {3:d}] def\n",
+ (int)floor(mediaBox->x1), (int)floor(mediaBox->y1),
+ (int)ceil(mediaBox->x2), (int)ceil(mediaBox->y2));
+ writePS("/FormType 1 def\n");
+ writePS("/Matrix [1 0 0 1 0 0] def\n");
+ break;
+ }
+}
+
+void PSOutputDev::writeXpdfProcset() {
+ GBool lev1, lev2, lev3, sep, nonSep;
+ char **p;
+ char *q;
+
+ writePSFmt("%%BeginResource: procset xpdf {0:s} 0\n", "3.00");
+ writePSFmt("%%Copyright: {0:s}\n", xpdfCopyright);
+ lev1 = lev2 = lev3 = sep = nonSep = gTrue;
+ for (p = prolog; *p; ++p) {
+ if ((*p)[0] == '~') {
+ lev1 = lev2 = lev3 = sep = nonSep = gFalse;
+ for (q = *p + 1; *q; ++q) {
+ switch (*q) {
+ case '1': lev1 = gTrue; break;
+ case '2': lev2 = gTrue; break;
+ case '3': lev3 = gTrue; break;
+ case 's': sep = gTrue; break;
+ case 'n': nonSep = gTrue; break;
+ }
+ }
+ } else if ((level == psLevel1 && lev1 && nonSep) ||
+ (level == psLevel1Sep && lev1 && sep) ||
+ (level == psLevel2 && lev2 && nonSep) ||
+ (level == psLevel2Sep && lev2 && sep) ||
+ (level == psLevel3 && lev3 && nonSep) ||
+ (level == psLevel3Sep && lev3 && sep)) {
+ writePSFmt("{0:s}\n", *p);
+ }
+ }
+ writePS("%%EndResource\n");
+
+ if (level >= psLevel3) {
+ for (p = cmapProlog; *p; ++p) {
+ writePSFmt("{0:s}\n", *p);
+ }
+ }
+}
+
+void PSOutputDev::writeDocSetup(Catalog *catalog,
+ int firstPage, int lastPage,
+ GBool duplexA) {
+ Page *page;
+ Dict *resDict;
+ Annots *annots;
+ Object obj1, obj2;
+ int pg, i;
+
+ if (mode == psModeForm) {
+ // swap the form and xpdf dicts
+ writePS("xpdf end begin dup begin\n");
+ } else {
+ writePS("xpdf begin\n");
+ }
+ for (pg = firstPage; pg <= lastPage; ++pg) {
+ page = catalog->getPage(pg);
+ if ((resDict = page->getResourceDict())) {
+ setupResources(resDict);
+ }
+ annots = new Annots(xref, catalog, page->getAnnots(&obj1));
+ obj1.free();
+ for (i = 0; i < annots->getNumAnnots(); ++i) {
+ if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
+ obj1.streamGetDict()->lookup("Resources", &obj2);
+ if (obj2.isDict()) {
+ setupResources(obj2.getDict());
+ }
+ obj2.free();
+ }
+ obj1.free();
+ }
+ delete annots;
+ }
+ if (mode != psModeForm) {
+ if (mode != psModeEPS && !manualCtrl) {
+ writePSFmt("{0:d} {1:d} {2:s} pdfSetup\n",
+ paperWidth, paperHeight, duplexA ? "true" : "false");
+ }
+#if OPI_SUPPORT
+ if (globalParams->getPSOPI()) {
+ writePS("/opiMatrix matrix currentmatrix def\n");
+ }
+#endif
+ }
+}
+
+void PSOutputDev::writePageTrailer() {
+ if (mode != psModeForm) {
+ writePS("pdfEndPage\n");
+ }
+}
+
+void PSOutputDev::writeTrailer() {
+ PSOutCustomColor *cc;
+
+ if (mode == psModeForm) {
+ writePS("/Foo exch /Form defineresource pop\n");
+ } else {
+ writePS("end\n");
+ writePS("%%DocumentSuppliedResources:\n");
+ writePS(embFontList->getCString());
+ if (level == psLevel1Sep || level == psLevel2Sep ||
+ level == psLevel3Sep) {
+ writePS("%%DocumentProcessColors:");
+ if (processColors & psProcessCyan) {
+ writePS(" Cyan");
+ }
+ if (processColors & psProcessMagenta) {
+ writePS(" Magenta");
+ }
+ if (processColors & psProcessYellow) {
+ writePS(" Yellow");
+ }
+ if (processColors & psProcessBlack) {
+ writePS(" Black");
+ }
+ writePS("\n");
+ writePS("%%DocumentCustomColors:");
+ for (cc = customColors; cc; cc = cc->next) {
+ writePSFmt(" ({0:s})", cc->name->getCString());
+ }
+ writePS("\n");
+ writePS("%%CMYKCustomColor:\n");
+ for (cc = customColors; cc; cc = cc->next) {
+ writePSFmt("%%+ {0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t})\n",
+ cc->c, cc->m, cc->y, cc->k, cc->name);
+ }
+ }
+ }
+}
+
+void PSOutputDev::setupResources(Dict *resDict) {
+ Object xObjDict, xObjRef, xObj, patDict, patRef, pat, resObj;
+ Ref ref0, ref1;
+ GBool skip;
+ int i, j;
+
+ setupFonts(resDict);
+ setupImages(resDict);
+ setupForms(resDict);
+
+ //----- recursively scan XObjects
+ resDict->lookup("XObject", &xObjDict);
+ if (xObjDict.isDict()) {
+ for (i = 0; i < xObjDict.dictGetLength(); ++i) {
+
+ // avoid infinite recursion on XObjects
+ skip = gFalse;
+ if ((xObjDict.dictGetValNF(i, &xObjRef)->isRef())) {
+ ref0 = xObjRef.getRef();
+ for (j = 0; j < xobjStack->getLength(); ++j) {
+ ref1 = *(Ref *)xobjStack->get(j);
+ if (ref1.num == ref0.num && ref1.gen == ref0.gen) {
+ skip = gTrue;
+ break;
+ }
+ }
+ if (!skip) {
+ xobjStack->append(&ref0);
+ }
+ }
+ if (!skip) {
+
+ // process the XObject's resource dictionary
+ xObjDict.dictGetVal(i, &xObj);
+ if (xObj.isStream()) {
+ xObj.streamGetDict()->lookup("Resources", &resObj);
+ if (resObj.isDict()) {
+ setupResources(resObj.getDict());
+ }
+ resObj.free();
+ }
+ xObj.free();
+ }
+
+ if (xObjRef.isRef() && !skip) {
+ xobjStack->del(xobjStack->getLength() - 1);
+ }
+ xObjRef.free();
+ }
+ }
+ xObjDict.free();
+
+ //----- recursively scan Patterns
+ resDict->lookup("Pattern", &patDict);
+ if (patDict.isDict()) {
+ inType3Char = gTrue;
+ for (i = 0; i < patDict.dictGetLength(); ++i) {
+
+ // avoid infinite recursion on Patterns
+ skip = gFalse;
+ if ((patDict.dictGetValNF(i, &patRef)->isRef())) {
+ ref0 = patRef.getRef();
+ for (j = 0; j < xobjStack->getLength(); ++j) {
+ ref1 = *(Ref *)xobjStack->get(j);
+ if (ref1.num == ref0.num && ref1.gen == ref0.gen) {
+ skip = gTrue;
+ break;
+ }
+ }
+ if (!skip) {
+ xobjStack->append(&ref0);
+ }
+ }
+ if (!skip) {
+
+ // process the Pattern's resource dictionary
+ patDict.dictGetVal(i, &pat);
+ if (pat.isStream()) {
+ pat.streamGetDict()->lookup("Resources", &resObj);
+ if (resObj.isDict()) {
+ setupResources(resObj.getDict());
+ }
+ resObj.free();
+ }
+ pat.free();
+ }
+
+ if (patRef.isRef() && !skip) {
+ xobjStack->del(xobjStack->getLength() - 1);
+ }
+ patRef.free();
+ }
+ inType3Char = gFalse;
+ }
+ patDict.free();
+}
+
+void PSOutputDev::setupFonts(Dict *resDict) {
+ Object obj1, obj2;
+ Ref r;
+ GfxFontDict *gfxFontDict;
+ GfxFont *font;
+ int i;
+
+ if (forceRasterize) return;
+
+ gfxFontDict = NULL;
+ resDict->lookupNF("Font", &obj1);
+ if (obj1.isRef()) {
+ obj1.fetch(xref, &obj2);
+ if (obj2.isDict()) {
+ r = obj1.getRef();
+ gfxFontDict = new GfxFontDict(xref, &r, obj2.getDict());
+ }
+ obj2.free();
+ } else if (obj1.isDict()) {
+ gfxFontDict = new GfxFontDict(xref, NULL, obj1.getDict());
+ }
+ if (gfxFontDict) {
+ for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
+ if ((font = gfxFontDict->getFont(i))) {
+ setupFont(font, resDict);
+ }
+ }
+ delete gfxFontDict;
+ }
+ obj1.free();
+}
+
+void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
+ Ref fontFileID;
+ GooString *name;
+ PSFontParam *fontParam;
+ GooString *psName;
+ char buf[16];
+ GBool subst;
+ UnicodeMap *uMap;
+ char *charName;
+ double xs, ys;
+ int code;
+ double w1, w2;
+ double *fm;
+ int i, j;
+ DisplayFontParam *dfp;
+
+ // check if font is already set up
+ for (i = 0; i < fontIDLen; ++i) {
+ if (fontIDs[i].num == font->getID()->num &&
+ fontIDs[i].gen == font->getID()->gen) {
+ return;
+ }
+ }
+
+ // add entry to fontIDs list
+ if (fontIDLen >= fontIDSize) {
+ fontIDSize += 64;
+ fontIDs = (Ref *)greallocn(fontIDs, fontIDSize, sizeof(Ref));
+ }
+ fontIDs[fontIDLen++] = *font->getID();
+
+ xs = ys = 1;
+ subst = gFalse;
+
+ // check for resident 8-bit font
+ if (font->getName() &&
+ (fontParam = globalParams->getPSFont(font->getName()))) {
+ psName = new GooString(fontParam->psFontName->getCString());
+
+ // check for embedded Type 1 font
+ } else if (globalParams->getPSEmbedType1() &&
+ font->getType() == fontType1 &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getEmbeddedFontName()) {
+ psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedType1Font(&fontFileID, psName);
+
+ // check for embedded Type 1C font
+ } else if (globalParams->getPSEmbedType1() &&
+ font->getType() == fontType1C &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getOrigName()) {
+ // use the PDF font name because the embedded font name might
+ // not include the subset prefix
+ psName = font->getOrigName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedType1CFont(font, &fontFileID, psName);
+
+ // check for embedded OpenType - Type 1C font
+ } else if (globalParams->getPSEmbedType1() &&
+ font->getType() == fontType1COT &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getOrigName()) {
+ // use the PDF font name because the embedded font name might
+ // not include the subset prefix
+ psName = font->getOrigName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedOpenTypeT1CFont(font, &fontFileID, psName);
+
+ // check for external Type 1 font file
+ } else if (globalParams->getPSEmbedType1() &&
+ font->getType() == fontType1 &&
+ font->getExtFontFile() &&
+ font->getName()) {
+ // this assumes that the PS font name matches the PDF font name
+ psName = font->getName()->copy();
+ setupExternalType1Font(font->getExtFontFile(), psName);
+
+ // check for embedded TrueType font
+ } else if (globalParams->getPSEmbedTrueType() &&
+ (font->getType() == fontTrueType ||
+ font->getType() == fontTrueTypeOT) &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getEmbeddedFontName()) {
+ psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedTrueTypeFont(font, &fontFileID, psName);
+
+ // check for external TrueType font file
+ } else if (globalParams->getPSEmbedTrueType() &&
+ font->getType() == fontTrueType &&
+ font->getExtFontFile()) {
+ psName = setupExternalTrueTypeFont(font);
+
+ // check for embedded CID PostScript font
+ } else if (globalParams->getPSEmbedCIDPostScript() &&
+ font->getType() == fontCIDType0C &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getEmbeddedFontName()) {
+ psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedCIDType0Font(font, &fontFileID, psName);
+
+ // check for embedded CID TrueType font
+ } else if (globalParams->getPSEmbedCIDTrueType() &&
+ (font->getType() == fontCIDType2 ||
+ font->getType() == fontCIDType2OT) &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getEmbeddedFontName()) {
+ psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedCIDTrueTypeFont(font, &fontFileID, psName, gTrue);
+
+ // check for embedded OpenType - CID CFF font
+ } else if (globalParams->getPSEmbedCIDPostScript() &&
+ font->getType() == fontCIDType0COT &&
+ font->getEmbeddedFontID(&fontFileID) &&
+ font->getEmbeddedFontName()) {
+ psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */);
+ setupEmbeddedOpenTypeCFFFont(font, &fontFileID, psName);
+
+ // check for Type 3 font
+ } else if (font->getType() == fontType3) {
+ psName = GooString::format("T3_{0:d}_{1:d}",
+ font->getID()->num, font->getID()->gen);
+ setupType3Font(font, psName, parentResDict);
+
+ // check for external CID TrueType font file
+ } else if (globalParams->getPSEmbedCIDTrueType() &&
+ font->getType() == fontCIDType2 &&
+ font->getExtFontFile()) {
+ psName = setupExternalCIDTrueTypeFont(font, font->getExtFontFile());
+
+ // do 8-bit font substitution
+ } else if (!font->isCIDFont()) {
+ subst = gTrue;
+ name = font->getName();
+ psName = NULL;
+ if (name) {
+ for (i = 0; psFonts[i]; ++i) {
+ if (name->cmp(psFonts[i]) == 0) {
+ psName = new GooString(psFonts[i]);
+ break;
+ }
+ }
+ }
+ if (!psName) {
+ if (substFonts) {
+ if (font->isFixedWidth()) {
+ i = 8;
+ } else if (font->isSerif()) {
+ i = 4;
+ } else {
+ i = 0;
+ }
+ if (font->isBold()) {
+ i += 2;
+ }
+ if (font->isItalic()) {
+ i += 1;
+ }
+ psName = new GooString(psSubstFonts[i].psName);
+ for (code = 0; code < 256; ++code) {
+ if ((charName = ((Gfx8BitFont *)font)->getCharName(code)) &&
+ charName[0] == 'm' && charName[1] == '\0') {
+ break;
+ }
+ }
+ if (code < 256) {
+ w1 = ((Gfx8BitFont *)font)->getWidth(code);
+ } else {
+ w1 = 0;
+ }
+ w2 = psSubstFonts[i].mWidth;
+ xs = w1 / w2;
+ if (xs < 0.1) {
+ xs = 1;
+ }
+ } else {
+ psName = new GooString(name);
+ xs = 1;
+ }
+ if (font->getType() == fontType3) {
+ // This is a hack which makes it possible to substitute for some
+ // Type 3 fonts. The problem is that it's impossible to know what
+ // the base coordinate system used in the font is without actually
+ // rendering the font.
+ ys = xs;
+ fm = font->getFontMatrix();
+ if (fm[0] != 0) {
+ ys *= fm[3] / fm[0];
+ }
+ } else {
+ ys = 1;
+ }
+ }
+
+ // do 16-bit font substitution
+ } else if ((fontParam = globalParams->
+ getPSFont16(font->getName(),
+ ((GfxCIDFont *)font)->getCollection(),
+ font->getWMode()))) {
+ subst = gTrue;
+ psName = fontParam->psFontName->copy();
+ if (font16EncLen >= font16EncSize) {
+ font16EncSize += 16;
+ font16Enc = (PSFont16Enc *)greallocn(font16Enc,
+ font16EncSize, sizeof(PSFont16Enc));
+ }
+ font16Enc[font16EncLen].fontID = *font->getID();
+ font16Enc[font16EncLen].enc = fontParam->encoding->copy();
+ if ((uMap = globalParams->getUnicodeMap(font16Enc[font16EncLen].enc))) {
+ uMap->decRefCnt();
+ ++font16EncLen;
+ } else {
+ error(-1, "Couldn't find Unicode map for 16-bit font encoding '%s'",
+ font16Enc[font16EncLen].enc->getCString());
+ }
+
+ // try the display font for embedding
+ } else if (globalParams->getPSEmbedCIDTrueType() &&
+ ((GfxCIDFont *)font)->getCollection() &&
+ (dfp = globalParams->
+ getDisplayFont(font)) &&
+ dfp->kind == displayFontTT) {
+ psName = setupExternalCIDTrueTypeFont(font, dfp->tt.fileName, dfp->tt.faceIndex);
+
+ // give up - can't do anything with this font
+ } else {
+ error(-1, "Couldn't find a font to substitute for '%s' ('%s' character collection)",
+ font->getName() ? font->getName()->getCString() : "(unnamed)",
+ ((GfxCIDFont *)font)->getCollection()
+ ? ((GfxCIDFont *)font)->getCollection()->getCString()
+ : "(unknown)");
+ return;
+ }
+
+ // generate PostScript code to set up the font
+ if (font->isCIDFont()) {
+ if (level == psLevel3 || level == psLevel3Sep) {
+ writePSFmt("/F{0:d}_{1:d} /{2:t} {3:d} pdfMakeFont16L3\n",
+ font->getID()->num, font->getID()->gen, psName,
+ font->getWMode());
+ } else {
+ writePSFmt("/F{0:d}_{1:d} /{2:t} {3:d} pdfMakeFont16\n",
+ font->getID()->num, font->getID()->gen, psName,
+ font->getWMode());
+ }
+ } else {
+ writePSFmt("/F{0:d}_{1:d} /{2:t} {3:.4g} {4:.4g}\n",
+ font->getID()->num, font->getID()->gen, psName, xs, ys);
+ for (i = 0; i < 256; i += 8) {
+ writePS((char *)((i == 0) ? "[ " : " "));
+ for (j = 0; j < 8; ++j) {
+ if (font->getType() == fontTrueType &&
+ !subst &&
+ !((Gfx8BitFont *)font)->getHasEncoding()) {
+ sprintf(buf, "c%02x", i+j);
+ charName = buf;
+ } else {
+ charName = ((Gfx8BitFont *)font)->getCharName(i+j);
+ // this is a kludge for broken PDF files that encode char 32
+ // as .notdef
+ if (i+j == 32 && charName && !strcmp(charName, ".notdef")) {
+ charName = "space";
+ }
+ }
+ writePS("/");
+ writePSName(charName ? charName : (char *)".notdef");
+ // the empty name is legal in PDF and PostScript, but PostScript
+ // uses a double-slash (//...) for "immediately evaluated names",
+ // so we need to add a space character here
+ if (charName && !charName[0]) {
+ writePS(" ");
+ }
+ }
+ writePS((i == 256-8) ? (char *)"]\n" : (char *)"\n");
+ }
+ writePS("pdfMakeFont\n");
+ }
+
+ delete psName;
+}
+
+void PSOutputDev::setupEmbeddedType1Font(Ref *id, GooString *psName) {
+ static const char hexChar[17] = "0123456789abcdef";
+ Object refObj, strObj, obj1, obj2, obj3;
+ Dict *dict;
+ int length1, length2, length3;
+ int c;
+ int start[4];
+ GBool binMode;
+ GBool writePadding = gTrue;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen)
+ return;
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // get the font stream and info
+ refObj.initRef(id->num, id->gen);
+ refObj.fetch(xref, &strObj);
+ refObj.free();
+ if (!strObj.isStream()) {
+ error(-1, "Embedded font file object is not a stream");
+ goto err1;
+ }
+ if (!(dict = strObj.streamGetDict())) {
+ error(-1, "Embedded font stream is missing its dictionary");
+ goto err1;
+ }
+ dict->lookup("Length1", &obj1);
+ dict->lookup("Length2", &obj2);
+ dict->lookup("Length3", &obj3);
+ if (!obj1.isInt() || !obj2.isInt() || !obj3.isInt()) {
+ error(-1, "Missing length fields in embedded font stream dictionary");
+ obj1.free();
+ obj2.free();
+ obj3.free();
+ goto err1;
+ }
+ length1 = obj1.getInt();
+ length2 = obj2.getInt();
+ length3 = obj3.getInt();
+ obj1.free();
+ obj2.free();
+ obj3.free();
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // copy ASCII portion of font
+ strObj.streamReset();
+ for (i = 0; i < length1 && (c = strObj.streamGetChar()) != EOF; ++i) {
+ writePSChar(c);
+ }
+
+ // figure out if encrypted portion is binary or ASCII
+ binMode = gFalse;
+ for (i = 0; i < 4; ++i) {
+ start[i] = strObj.streamGetChar();
+ if (start[i] == EOF) {
+ error(-1, "Unexpected end of file in embedded font stream");
+ goto err1;
+ }
+ if (!((start[i] >= '0' && start[i] <= '9') ||
+ (start[i] >= 'A' && start[i] <= 'F') ||
+ (start[i] >= 'a' && start[i] <= 'f')))
+ binMode = gTrue;
+ }
+
+ if (length2 == 0)
+ {
+ // length2 == 0 is an error
+ // trying to solve it by just piping all
+ // the stream data
+ error(-1, "Font has length2 as 0, trying to overcome the problem reading the stream until the end");
+ length2 = INT_MAX;
+ writePadding = gFalse;
+ }
+
+
+ // convert binary data to ASCII
+ if (binMode) {
+ for (i = 0; i < 4; ++i) {
+ writePSChar(hexChar[(start[i] >> 4) & 0x0f]);
+ writePSChar(hexChar[start[i] & 0x0f]);
+ }
+#if 0 // this causes trouble for various PostScript printers
+ // if Length2 is incorrect (too small), font data gets chopped, so
+ // we take a few extra characters from the trailer just in case
+ length2 += length3 >= 8 ? 8 : length3;
+#endif
+ while (i < length2) {
+ if ((c = strObj.streamGetChar()) == EOF) {
+ break;
+ }
+ writePSChar(hexChar[(c >> 4) & 0x0f]);
+ writePSChar(hexChar[c & 0x0f]);
+ if (++i % 32 == 0) {
+ writePSChar('\n');
+ }
+ }
+ if (i % 32 > 0) {
+ writePSChar('\n');
+ }
+
+ // already in ASCII format -- just copy it
+ } else {
+ for (i = 0; i < 4; ++i) {
+ writePSChar(start[i]);
+ }
+ for (i = 4; i < length2; ++i) {
+ if ((c = strObj.streamGetChar()) == EOF) {
+ break;
+ }
+ writePSChar(c);
+ }
+ }
+
+ if (writePadding)
+ {
+ // write padding and "cleartomark"
+ for (i = 0; i < 8; ++i) {
+ writePS("00000000000000000000000000000000"
+ "00000000000000000000000000000000\n");
+ }
+ writePS("cleartomark\n");
+ }
+
+ // ending comment
+ writePS("%%EndResource\n");
+
+ err1:
+ strObj.streamClose();
+ strObj.free();
+}
+
+//~ This doesn't handle .pfb files or binary eexec data (which only
+//~ happens in pfb files?).
+void PSOutputDev::setupExternalType1Font(GooString *fileName, GooString *psName) {
+ FILE *fontFile;
+ int c;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileNameLen; ++i) {
+ if (!fontFileNames[i]->cmp(fileName)) {
+ return;
+ }
+ }
+
+ // add entry to fontFileNames list
+ if (fontFileNameLen >= fontFileNameSize) {
+ fontFileNameSize += 64;
+ fontFileNames = (GooString **)greallocn(fontFileNames,
+ fontFileNameSize, sizeof(GooString *));
+ psFileNames = (GooString **)greallocn(psFileNames,
+ fontFileNameSize, sizeof(GooString *));
+ }
+ fontFileNames[fontFileNameLen] = fileName->copy();
+ psFileNames[fontFileNameLen] = psName->copy();
+ fontFileNameLen++;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // copy the font file
+ if (!(fontFile = fopen(fileName->getCString(), "rb"))) {
+ error(-1, "Couldn't open external font file");
+ return;
+ }
+ while ((c = fgetc(fontFile)) != EOF) {
+ writePSChar(c);
+ }
+ fclose(fontFile);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupEmbeddedType1CFont(GfxFont *font, Ref *id,
+ GooString *psName) {
+ char *fontBuf;
+ int fontLen;
+ FoFiType1C *ffT1C;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen)
+ return;
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 1 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) {
+ ffT1C->convertToType1(psName->getCString(), NULL, gTrue,
+ outputFunc, outputStream);
+ delete ffT1C;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id,
+ GooString *psName) {
+ char *fontBuf;
+ int fontLen;
+ FoFiTrueType *ffTT;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen)
+ return;
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 1 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
+ if (ffTT->isOpenTypeCFF()) {
+ ffTT->convertToType1(psName->getCString(), NULL, gTrue,
+ outputFunc, outputStream);
+ }
+ delete ffTT;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id,
+ GooString *psName) {
+ char *fontBuf;
+ int fontLen;
+ FoFiTrueType *ffTT;
+ Gushort *codeToGID;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen) {
+ psName->appendf("_{0:d}", nextTrueTypeNum++);
+ break;
+ }
+ }
+
+ // add entry to fontFileIDs list
+ if (i == fontFileIDLen) {
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+ }
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 42 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
+ codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT);
+ ffTT->convertToType42(psName->getCString(),
+ ((Gfx8BitFont *)font)->getHasEncoding()
+ ? ((Gfx8BitFont *)font)->getEncoding()
+ : (char **)NULL,
+ codeToGID, outputFunc, outputStream);
+ if (codeToGID) {
+ if (font8InfoLen >= font8InfoSize) {
+ font8InfoSize += 16;
+ font8Info = (PSFont8Info *)greallocn(font8Info,
+ font8InfoSize,
+ sizeof(PSFont8Info));
+ }
+ font8Info[font8InfoLen].fontID = *font->getID();
+ font8Info[font8InfoLen].codeToGID = codeToGID;
+ ++font8InfoLen;
+ }
+ delete ffTT;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+GooString *PSOutputDev::setupExternalTrueTypeFont(GfxFont *font) {
+ GooString *fileName;
+ char *fontBuf;
+ int fontLen;
+ FoFiTrueType *ffTT;
+ Gushort *codeToGID;
+ GooString *psName;
+ int i;
+
+ // check if font is already embedded
+ fileName = font->getExtFontFile();
+ for (i = 0; i < fontFileNameLen; ++i) {
+ if (!fontFileNames[i]->cmp(fileName)) {
+ return psFileNames[i]->copy();
+ }
+ }
+
+ psName = font->getName()->sanitizedName(gTrue /* ps mode */);
+ // add entry to fontFileNames list
+ if (i == fontFileNameLen) {
+ if (fontFileNameLen >= fontFileNameSize) {
+ fontFileNameSize += 64;
+ fontFileNames =
+ (GooString **)greallocn(fontFileNames,
+ fontFileNameSize, sizeof(GooString *));
+ psFileNames =
+ (GooString **)greallocn(psFileNames,
+ fontFileNameSize, sizeof(GooString *));
+ }
+ fontFileNames[fontFileNameLen] = fileName->copy();
+ psFileNames[fontFileNameLen] = psName->copy();
+ fontFileNameLen++;
+ }
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 42 font
+ fontBuf = font->readExtFontFile(&fontLen);
+ if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
+ codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT);
+ ffTT->convertToType42(psName->getCString(),
+ ((Gfx8BitFont *)font)->getHasEncoding()
+ ? ((Gfx8BitFont *)font)->getEncoding()
+ : (char **)NULL,
+ codeToGID, outputFunc, outputStream);
+ if (codeToGID) {
+ if (font8InfoLen >= font8InfoSize) {
+ font8InfoSize += 16;
+ font8Info = (PSFont8Info *)greallocn(font8Info,
+ font8InfoSize,
+ sizeof(PSFont8Info));
+ }
+ font8Info[font8InfoLen].fontID = *font->getID();
+ font8Info[font8InfoLen].codeToGID = codeToGID;
+ ++font8InfoLen;
+ }
+ delete ffTT;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+ return psName;
+}
+
+GooString *PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex) {
+ FoFiTrueType *ffTT;
+ Gushort *codeToGID;
+ GooString *psName;
+ int i;
+ GooString *myFileName;
+
+ myFileName = fileName->copy();
+ if (faceIndex > 0) {
+ char tmp[32];
+ sprintf(tmp, ",%d", faceIndex);
+ myFileName->append(tmp);
+ }
+ // check if font is already embedded
+ for (i = 0; i < fontFileNameLen; ++i) {
+ if (!fontFileNames[i]->cmp(myFileName)) {
+ delete myFileName;
+ return psFileNames[i]->copy();
+ }
+ }
+
+ psName = font->getName()->sanitizedName(gTrue /* ps mode */);
+ // add entry to fontFileNames list
+ if (i == fontFileNameLen) {
+ if (fontFileNameLen >= fontFileNameSize) {
+ fontFileNameSize += 64;
+ fontFileNames =
+ (GooString **)grealloc(fontFileNames,
+ fontFileNameSize * sizeof(GooString *));
+ psFileNames =
+ (GooString **)grealloc(psFileNames,
+ fontFileNameSize * sizeof(GooString *));
+ }
+ }
+ fontFileNames[fontFileNameLen] = myFileName;
+ psFileNames[fontFileNameLen] = psName->copy();
+ fontFileNameLen++;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a CID type2 font
+ if ((ffTT = FoFiTrueType::load(fileName->getCString(), faceIndex))) {
+ int n = ((GfxCIDFont *)font)->getCIDToGIDLen();
+ if (n) {
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
+ memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), n * sizeof(Gushort));
+ } else {
+ codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &n);
+ }
+ if (globalParams->getPSLevel() >= psLevel3) {
+ // Level 3: use a CID font
+ ffTT->convertToCIDType2(psName->getCString(),
+ codeToGID, n, gTrue,
+ outputFunc, outputStream);
+ } else {
+ // otherwise: use a non-CID composite font
+ ffTT->convertToType0(psName->getCString(),
+ codeToGID, n, gTrue,
+ outputFunc, outputStream);
+ }
+ gfree(codeToGID);
+ delete ffTT;
+ }
+
+ // ending comment
+ writePS("%%EndResource\n");
+ return psName;
+}
+
+void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id,
+ GooString *psName) {
+ char *fontBuf;
+ int fontLen;
+ FoFiType1C *ffT1C;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen)
+ return;
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 0 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) {
+ if (globalParams->getPSLevel() >= psLevel3) {
+ // Level 3: use a CID font
+ ffT1C->convertToCIDType0(psName->getCString(), outputFunc, outputStream);
+ } else {
+ // otherwise: use a non-CID composite font
+ ffT1C->convertToType0(psName->getCString(), outputFunc, outputStream);
+ }
+ delete ffT1C;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id,
+ GooString *psName,
+ GBool needVerticalMetrics) {
+ char *fontBuf;
+ int fontLen;
+ FoFiTrueType *ffTT;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen) {
+ psName->appendf("_{0:d}", nextTrueTypeNum++);
+ break;
+ }
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 0 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
+ if (globalParams->getPSLevel() >= psLevel3) {
+ // Level 3: use a CID font
+ ffTT->convertToCIDType2(psName->getCString(),
+ ((GfxCIDFont *)font)->getCIDToGID(),
+ ((GfxCIDFont *)font)->getCIDToGIDLen(),
+ needVerticalMetrics,
+ outputFunc, outputStream);
+ } else {
+ // otherwise: use a non-CID composite font
+ ffTT->convertToType0(psName->getCString(),
+ ((GfxCIDFont *)font)->getCIDToGID(),
+ ((GfxCIDFont *)font)->getCIDToGIDLen(),
+ needVerticalMetrics,
+ outputFunc, outputStream);
+ }
+ delete ffTT;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id,
+ GooString *psName) {
+ char *fontBuf;
+ int fontLen;
+ FoFiTrueType *ffTT;
+ int i;
+
+ // check if font is already embedded
+ for (i = 0; i < fontFileIDLen; ++i) {
+ if (fontFileIDs[i].num == id->num &&
+ fontFileIDs[i].gen == id->gen)
+ return;
+ }
+
+ // add entry to fontFileIDs list
+ if (fontFileIDLen >= fontFileIDSize) {
+ fontFileIDSize += 64;
+ fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref));
+ }
+ fontFileIDs[fontFileIDLen++] = *id;
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 0 font
+ fontBuf = font->readEmbFontFile(xref, &fontLen);
+ if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
+ if (ffTT->isOpenTypeCFF()) {
+ if (globalParams->getPSLevel() >= psLevel3) {
+ // Level 3: use a CID font
+ ffTT->convertToCIDType0(psName->getCString(),
+ outputFunc, outputStream);
+ } else {
+ // otherwise: use a non-CID composite font
+ ffTT->convertToType0(psName->getCString(), outputFunc, outputStream);
+ }
+ }
+ delete ffTT;
+ }
+ gfree(fontBuf);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupType3Font(GfxFont *font, GooString *psName,
+ Dict *parentResDict) {
+ Dict *resDict;
+ Dict *charProcs;
+ Object charProc;
+ Gfx *gfx;
+ PDFRectangle box;
+ double *m;
+ GooString *buf;
+ int i;
+
+ // set up resources used by font
+ if ((resDict = ((Gfx8BitFont *)font)->getResources())) {
+ inType3Char = gTrue;
+ setupResources(resDict);
+ inType3Char = gFalse;
+ } else {
+ resDict = parentResDict;
+ }
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // font dictionary
+ writePS("8 dict begin\n");
+ writePS("/FontType 3 def\n");
+ m = font->getFontMatrix();
+ writePSFmt("/FontMatrix [{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g}] def\n",
+ m[0], m[1], m[2], m[3], m[4], m[5]);
+ m = font->getFontBBox();
+ writePSFmt("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n",
+ m[0], m[1], m[2], m[3]);
+ writePS("/Encoding 256 array def\n");
+ writePS(" 0 1 255 { Encoding exch /.notdef put } for\n");
+ writePS("/BuildGlyph {\n");
+ writePS(" exch /CharProcs get exch\n");
+ writePS(" 2 copy known not { pop /.notdef } if\n");
+ writePS(" get exec\n");
+ writePS("} bind def\n");
+ writePS("/BuildChar {\n");
+ writePS(" 1 index /Encoding get exch get\n");
+ writePS(" 1 index /BuildGlyph get exec\n");
+ writePS("} bind def\n");
+ if ((charProcs = ((Gfx8BitFont *)font)->getCharProcs())) {
+ writePSFmt("/CharProcs {0:d} dict def\n", charProcs->getLength());
+ writePS("CharProcs begin\n");
+ box.x1 = m[0];
+ box.y1 = m[1];
+ box.x2 = m[2];
+ box.y2 = m[3];
+ gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL);
+ inType3Char = gTrue;
+ for (i = 0; i < charProcs->getLength(); ++i) {
+ t3Cacheable = gFalse;
+ t3NeedsRestore = gFalse;
+ writePS("/");
+ writePSName(charProcs->getKey(i));
+ writePS(" {\n");
+ gfx->display(charProcs->getVal(i, &charProc));
+ charProc.free();
+ if (t3String) {
+ if (t3Cacheable) {
+ buf = GooString::format("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g} setcachedevice\n",
+ t3WX, t3WY, t3LLX, t3LLY, t3URX, t3URY);
+ } else {
+ buf = GooString::format("{0:.4g} {1:.4g} setcharwidth\n", t3WX, t3WY);
+ }
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ (*outputFunc)(outputStream, t3String->getCString(),
+ t3String->getLength());
+ delete t3String;
+ t3String = NULL;
+ }
+ if (t3NeedsRestore) {
+ (*outputFunc)(outputStream, "Q\n", 2);
+ }
+ writePS("} def\n");
+ }
+ inType3Char = gFalse;
+ delete gfx;
+ writePS("end\n");
+ }
+ writePS("currentdict end\n");
+ writePSFmt("/{0:t} exch definefont pop\n", psName);
+
+ // ending comment
+ writePS("%%EndResource\n");
+}
+
+void PSOutputDev::setupImages(Dict *resDict) {
+ Object xObjDict, xObj, xObjRef, subtypeObj;
+ int i;
+
+ if (!(mode == psModeForm || inType3Char || preload)) {
+ return;
+ }
+
+ //----- recursively scan XObjects
+ resDict->lookup("XObject", &xObjDict);
+ if (xObjDict.isDict()) {
+ for (i = 0; i < xObjDict.dictGetLength(); ++i) {
+ xObjDict.dictGetValNF(i, &xObjRef);
+ xObjDict.dictGetVal(i, &xObj);
+ if (xObj.isStream()) {
+ xObj.streamGetDict()->lookup("Subtype", &subtypeObj);
+ if (subtypeObj.isName("Image")) {
+ if (xObjRef.isRef()) {
+ setupImage(xObjRef.getRef(), xObj.getStream());
+ } else {
+ error(-1, "Image in resource dict is not an indirect reference");
+ }
+ }
+ subtypeObj.free();
+ }
+ xObj.free();
+ xObjRef.free();
+ }
+ }
+ xObjDict.free();
+}
+
+void PSOutputDev::setupImage(Ref id, Stream *str) {
+ GBool useRLE, useCompressed, useASCIIHex;
+ GooString *s;
+ int c;
+ int size, line, col, i;
+ int outerSize, outer;
+
+ // check if image is already setup
+ for (i = 0; i < imgIDLen; ++i) {
+ if (imgIDs[i].num == id.num && imgIDs[i].gen == id.gen) {
+ return;
+ }
+ }
+
+ // add entry to imgIDs list
+ if (imgIDLen >= imgIDSize) {
+ if (imgIDSize == 0) {
+ imgIDSize = 64;
+ } else {
+ imgIDSize *= 2;
+ }
+ imgIDs = (Ref *)greallocn(imgIDs, imgIDSize, sizeof(Ref));
+ }
+ imgIDs[imgIDLen++] = id;
+
+ // filters
+ //~ this does not correctly handle the DeviceN color space
+ //~ -- need to use DeviceNRecoder
+ if (level < psLevel2) {
+ useRLE = gFalse;
+ useCompressed = gFalse;
+ useASCIIHex = gTrue;
+ } else {
+ s = str->getPSFilter(level < psLevel3 ? 2 : 3, "");
+ if (s) {
+ useRLE = gFalse;
+ useCompressed = gTrue;
+ delete s;
+ } else {
+ useRLE = gTrue;
+ useCompressed = gFalse;
+ }
+ useASCIIHex = level == psLevel1 || level == psLevel1Sep ||
+ globalParams->getPSASCIIHex();
+ }
+ if (useCompressed) {
+ str = str->getUndecodedStream();
+ }
+ if (useRLE) {
+ str = new RunLengthEncoder(str);
+ }
+ if (useASCIIHex) {
+ str = new ASCIIHexEncoder(str);
+ } else {
+ str = new ASCII85Encoder(str);
+ }
+
+ // compute image data size
+ str->reset();
+ col = size = 0;
+ do {
+ do {
+ c = str->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ if (c == 'z') {
+ ++col;
+ } else {
+ ++col;
+ for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
+ do {
+ c = str->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ ++col;
+ }
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ }
+ if (col > 225) {
+ ++size;
+ col = 0;
+ }
+ } while (c != (useASCIIHex ? '>' : '~') && c != EOF);
+ // add one entry for the final line of data; add another entry
+ // because the RunLengthDecode filter may read past the end
+ ++size;
+ if (useRLE) {
+ ++size;
+ }
+ outerSize = size/65535 + 1;
+
+ writePSFmt("{0:d} array dup /ImData_{1:d}_{2:d} exch def\n",
+ outerSize, id.num, id.gen);
+ str->close();
+
+ // write the data into the array
+ str->reset();
+ for (outer = 0;outer < outerSize;outer++) {
+ int innerSize = size > 65535 ? 65535 : size;
+
+ // put the inner array into the outer array
+ writePSFmt("{0:d} array 1 index {1:d} 2 index put\n",
+ innerSize, outer);
+ line = col = 0;
+ writePS((char *)(useASCIIHex ? "dup 0 <" : "dup 0 <~"));
+ for (;;) {
+ do {
+ c = str->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ if (c == 'z') {
+ writePSChar(c);
+ ++col;
+ } else {
+ writePSChar(c);
+ ++col;
+ for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
+ do {
+ c = str->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ writePSChar(c);
+ ++col;
+ }
+ }
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ // each line is: "dup nnnnn <~...data...~> put<eol>"
+ // so max data length = 255 - 20 = 235
+ // chunks are 1 or 4 bytes each, so we have to stop at 232
+ // but make it 225 just to be safe
+ if (col > 225) {
+ writePS((char *)(useASCIIHex ? "> put\n" : "~> put\n"));
+ ++line;
+ if (line >= innerSize) break;
+ writePSFmt((char *)(useASCIIHex ? "dup {0:d} <" : "dup {0:d} <~"), line);
+ col = 0;
+ }
+ }
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ writePS((char *)(useASCIIHex ? "> put\n" : "~> put\n"));
+ if (useRLE) {
+ ++line;
+ writePSFmt("{0:d} <> put\n", line);
+ } else {
+ writePS("pop\n");
+ }
+ break;
+ }
+ writePS("pop\n");
+ size -= innerSize;
+ }
+ writePS("pop\n");
+ str->close();
+
+ delete str;
+}
+
+void PSOutputDev::setupForms(Dict *resDict) {
+ Object xObjDict, xObj, xObjRef, subtypeObj;
+ int i;
+
+ if (!preload) {
+ return;
+ }
+
+ resDict->lookup("XObject", &xObjDict);
+ if (xObjDict.isDict()) {
+ for (i = 0; i < xObjDict.dictGetLength(); ++i) {
+ xObjDict.dictGetValNF(i, &xObjRef);
+ xObjDict.dictGetVal(i, &xObj);
+ if (xObj.isStream()) {
+ xObj.streamGetDict()->lookup("Subtype", &subtypeObj);
+ if (subtypeObj.isName("Form")) {
+ if (xObjRef.isRef()) {
+ setupForm(xObjRef.getRef(), &xObj);
+ } else {
+ error(-1, "Form in resource dict is not an indirect reference");
+ }
+ }
+ subtypeObj.free();
+ }
+ xObj.free();
+ xObjRef.free();
+ }
+ }
+ xObjDict.free();
+}
+
+void PSOutputDev::setupForm(Ref id, Object *strObj) {
+ Dict *dict, *resDict;
+ Object matrixObj, bboxObj, resObj, obj1;
+ double m[6], bbox[4];
+ PDFRectangle box;
+ Gfx *gfx;
+ int i;
+
+ // check if form is already defined
+ for (i = 0; i < formIDLen; ++i) {
+ if (formIDs[i].num == id.num && formIDs[i].gen == id.gen) {
+ return;
+ }
+ }
+
+ // add entry to formIDs list
+ if (formIDLen >= formIDSize) {
+ if (formIDSize == 0) {
+ formIDSize = 64;
+ } else {
+ formIDSize *= 2;
+ }
+ formIDs = (Ref *)greallocn(formIDs, formIDSize, sizeof(Ref));
+ }
+ formIDs[formIDLen++] = id;
+
+ dict = strObj->streamGetDict();
+
+ // get bounding box
+ dict->lookup("BBox", &bboxObj);
+ if (!bboxObj.isArray()) {
+ bboxObj.free();
+ error(-1, "Bad form bounding box");
+ return;
+ }
+ for (i = 0; i < 4; ++i) {
+ bboxObj.arrayGet(i, &obj1);
+ bbox[i] = obj1.getNum();
+ obj1.free();
+ }
+ bboxObj.free();
+
+ // get matrix
+ dict->lookup("Matrix", &matrixObj);
+ if (matrixObj.isArray()) {
+ for (i = 0; i < 6; ++i) {
+ matrixObj.arrayGet(i, &obj1);
+ m[i] = obj1.getNum();
+ obj1.free();
+ }
+ } else {
+ m[0] = 1; m[1] = 0;
+ m[2] = 0; m[3] = 1;
+ m[4] = 0; m[5] = 0;
+ }
+ matrixObj.free();
+
+ // get resources
+ dict->lookup("Resources", &resObj);
+ resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+
+ writePSFmt("/f_{0:d}_{1:d} {{\n", id.num, id.gen);
+ writePS("q\n");
+ writePSFmt("[{0:.4gs} {1:.4gs} {2:.4gs} {3:.4gs} {4:.4gs} {5:.4gs}] cm\n",
+ m[0], m[1], m[2], m[3], m[4], m[5]);
+
+ box.x1 = bbox[0];
+ box.y1 = bbox[1];
+ box.x2 = bbox[2];
+ box.y2 = bbox[3];
+ gfx = new Gfx(xref, this, resDict, m_catalog, &box, &box);
+ gfx->display(strObj);
+ delete gfx;
+
+ writePS("Q\n");
+ writePS("} def\n");
+
+ resObj.free();
+}
+
+GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
+ int rotateA, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY,
+ int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData) {
+#if HAVE_SPLASH
+ PreScanOutputDev *scan;
+ GBool rasterize;
+ SplashOutputDev *splashOut;
+ SplashColor paperColor;
+ PDFRectangle box;
+ GfxState *state;
+ SplashBitmap *bitmap;
+ Stream *str0, *str;
+ Object obj;
+ Guchar *p;
+ Guchar col[4];
+ double m0, m1, m2, m3, m4, m5;
+ int c, w, h, x, y, comp, i;
+
+ if (!forceRasterize) {
+ scan = new PreScanOutputDev();
+ page->displaySlice(scan, 72, 72, rotateA, useMediaBox, crop,
+ sliceX, sliceY, sliceW, sliceH,
+ printing, catalog, abortCheckCbk, abortCheckCbkData);
+ rasterize = scan->usesTransparency();
+ delete scan;
+ } else {
+ rasterize = gTrue;
+ }
+ if (!rasterize) {
+ return gTrue;
+ }
+
+ // rasterize the page
+ if (level == psLevel1) {
+ paperColor[0] = 0xff;
+ splashOut = new SplashOutputDev(splashModeMono8, 1, gFalse,
+ paperColor, gTrue, gFalse);
+#if SPLASH_CMYK
+ } else if (level == psLevel1Sep) {
+ paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0;
+ splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse,
+ paperColor, gTrue, gFalse);
+#else
+ } else if (level == psLevel1Sep) {
+ error(-1, "pdftops was built without CMYK support, level1sep needs it to work in this file");
+ return gFalse;
+#endif
+ } else {
+ paperColor[0] = paperColor[1] = paperColor[2] = 0xff;
+ splashOut = new SplashOutputDev(splashModeRGB8, 1, gFalse,
+ paperColor, gTrue, gFalse);
+ }
+ splashOut->startDoc(xref);
+ page->displaySlice(splashOut, splashDPI, splashDPI, rotateA,
+ useMediaBox, crop,
+ sliceX, sliceY, sliceW, sliceH,
+ printing, catalog, abortCheckCbk, abortCheckCbkData);
+
+ // start the PS page
+ page->makeBox(splashDPI, splashDPI, rotateA, useMediaBox, gFalse,
+ sliceX, sliceY, sliceW, sliceH, &box, &crop);
+ rotateA += page->getRotate();
+ if (rotateA >= 360) {
+ rotateA -= 360;
+ } else if (rotateA < 0) {
+ rotateA += 360;
+ }
+ state = new GfxState(splashDPI, splashDPI, &box, rotateA, gFalse);
+ startPage(page->getNum(), state);
+ delete state;
+ switch (rotateA) {
+ case 0:
+ default: // this should never happen
+ m0 = box.x2 - box.x1;
+ m1 = 0;
+ m2 = 0;
+ m3 = box.y2 - box.y1;
+ m4 = box.x1;
+ m5 = box.y1;
+ break;
+ case 90:
+ m0 = 0;
+ m1 = box.y2 - box.y1;
+ m2 = -(box.x2 - box.x1);
+ m3 = 0;
+ m4 = box.x2;
+ m5 = box.y1;
+ break;
+ case 180:
+ m0 = -(box.x2 - box.x1);
+ m1 = 0;
+ m2 = 0;
+ m3 = -(box.y2 - box.y1);
+ m4 = box.x2;
+ m5 = box.y2;
+ break;
+ case 270:
+ m0 = 0;
+ m1 = -(box.y2 - box.y1);
+ m2 = box.x2 - box.x1;
+ m3 = 0;
+ m4 = box.x1;
+ m5 = box.y2;
+ break;
+ }
+
+ //~ need to add the process colors
+
+ // draw the rasterized image
+ bitmap = splashOut->getBitmap();
+ w = bitmap->getWidth();
+ h = bitmap->getHeight();
+ writePS("gsave\n");
+ writePSFmt("[{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g}] concat\n",
+ m0, m1, m2, m3, m4, m5);
+ switch (level) {
+ case psLevel1:
+ writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1\n",
+ w, h, w, -h, h);
+ p = bitmap->getDataPtr();
+ i = 0;
+ for (y = 0; y < h; ++y) {
+ for (x = 0; x < w; ++x) {
+ writePSFmt("{0:02x}", *p++);
+ if (++i == 32) {
+ writePSChar('\n');
+ i = 0;
+ }
+ }
+ }
+ if (i != 0) {
+ writePSChar('\n');
+ }
+ break;
+ case psLevel1Sep:
+ writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1Sep\n",
+ w, h, w, -h, h);
+ p = bitmap->getDataPtr();
+ i = 0;
+ col[0] = col[1] = col[2] = col[3] = 0;
+ for (y = 0; y < h; ++y) {
+ for (comp = 0; comp < 4; ++comp) {
+ for (x = 0; x < w; ++x) {
+ writePSFmt("{0:02x}", p[4*x + comp]);
+ col[comp] |= p[4*x + comp];
+ if (++i == 32) {
+ writePSChar('\n');
+ i = 0;
+ }
+ }
+ }
+ p += bitmap->getRowSize();
+ }
+ if (i != 0) {
+ writePSChar('\n');
+ }
+ if (col[0]) {
+ processColors |= psProcessCyan;
+ }
+ if (col[1]) {
+ processColors |= psProcessMagenta;
+ }
+ if (col[2]) {
+ processColors |= psProcessYellow;
+ }
+ if (col[3]) {
+ processColors |= psProcessBlack;
+ }
+ break;
+ case psLevel2:
+ case psLevel2Sep:
+ case psLevel3:
+ case psLevel3Sep:
+ writePS("/DeviceRGB setcolorspace\n");
+ writePS("<<\n /ImageType 1\n");
+ writePSFmt(" /Width {0:d}\n", bitmap->getWidth());
+ writePSFmt(" /Height {0:d}\n", bitmap->getHeight());
+ writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", w, -h, h);
+ writePS(" /BitsPerComponent 8\n");
+ writePS(" /Decode [0 1 0 1 0 1]\n");
+ writePS(" /DataSource currentfile\n");
+ if (globalParams->getPSASCIIHex()) {
+ writePS(" /ASCIIHexDecode filter\n");
+ } else {
+ writePS(" /ASCII85Decode filter\n");
+ }
+ writePS(" /RunLengthDecode filter\n");
+ writePS(">>\n");
+ writePS("image\n");
+ obj.initNull();
+ str0 = new MemStream((char *)bitmap->getDataPtr(), 0, w * h * 3, &obj);
+ str = new RunLengthEncoder(str0);
+ if (globalParams->getPSASCIIHex()) {
+ str = new ASCIIHexEncoder(str);
+ } else {
+ str = new ASCII85Encoder(str);
+ }
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ writePSChar(c);
+ }
+ str->close();
+ delete str;
+ delete str0;
+ processColors |= psProcessCMYK;
+ break;
+ }
+ delete splashOut;
+ writePS("grestore\n");
+
+ // finish the PS page
+ endPage();
+
+ return gFalse;
+#else
+ return gTrue;
+#endif
+}
+
+void PSOutputDev::startPage(int pageNum, GfxState *state) {
+ int x1, y1, x2, y2, width, height;
+ int imgWidth, imgHeight, imgWidth2, imgHeight2;
+ GBool landscape;
+
+
+ if (mode == psModePS || mode == psModePSOrigPageSizes) {
+ GooString pageLabel;
+ const GBool gotLabel = m_catalog->indexToLabel(pageNum -1, &pageLabel);
+ if (gotLabel) {
+ // See bug13338 for why we try to avoid parentheses...
+ GBool needParens;
+ GooString *filteredString = filterPSLabel(&pageLabel, &needParens);
+ if (needParens) {
+ writePSFmt("%%Page: ({0:t}) {1:d}\n", filteredString, seqPage);
+ } else {
+ writePSFmt("%%Page: {0:t} {1:d}\n", filteredString, seqPage);
+ }
+ delete filteredString;
+ } else {
+ writePSFmt("%%Page: {0:d} {1:d}\n", pageNum, seqPage);
+ }
+ if (mode != psModePSOrigPageSizes)
+ writePS("%%BeginPageSetup\n");
+ }
+
+ // underlays
+ if (underlayCbk) {
+ (*underlayCbk)(this, underlayCbkData);
+ }
+ if (overlayCbk) {
+ saveState(NULL);
+ }
+
+ switch (mode) {
+
+ case psModePSOrigPageSizes:
+ x1 = (int)floor(state->getX1());
+ y1 = (int)floor(state->getY1());
+ x2 = (int)ceil(state->getX2());
+ y2 = (int)ceil(state->getY2());
+ width = x2 - x1;
+ height = y2 - y1;
+ if (width > height) {
+ landscape = gTrue;
+ } else {
+ landscape = gFalse;
+ }
+ writePSFmt("%%PageBoundingBox: {0:d} {1:d} {2:d} {3:d}\n", x1, y1, x2 - x1, y2 - y1);
+ writePS("%%BeginPageSetup\n");
+ writePSFmt("%%PageOrientation: {0:s}\n",
+ landscape ? "Landscape" : "Portrait");
+ if ((width != prevWidth) || (height != prevHeight)) {
+ // Set page size only when it actually changes, as otherwise Duplex
+ // printing does not work
+ writePSFmt("<</PageSize [{0:d} {1:d}]>> setpagedevice\n", width, height);
+ prevWidth = width;
+ prevHeight = height;
+ }
+ writePS("pdfStartPage\n");
+ writePSFmt("{0:d} {1:d} {2:d} {3:d} re W\n", x1, y1, x2 - x1, y2 - y1);
+ writePS("%%EndPageSetup\n");
+ ++seqPage;
+ break;
+
+ case psModePS:
+ // rotate, translate, and scale page
+ imgWidth = imgURX - imgLLX;
+ imgHeight = imgURY - imgLLY;
+ x1 = (int)floor(state->getX1());
+ y1 = (int)floor(state->getY1());
+ x2 = (int)ceil(state->getX2());
+ y2 = (int)ceil(state->getY2());
+ width = x2 - x1;
+ height = y2 - y1;
+ tx = ty = 0;
+ // rotation and portrait/landscape mode
+ if (rotate0 >= 0) {
+ rotate = (360 - rotate0) % 360;
+ landscape = gFalse;
+ } else {
+ rotate = (360 - state->getRotate()) % 360;
+ if (rotate == 0 || rotate == 180) {
+ if (width > height && width > imgWidth) {
+ rotate += 90;
+ landscape = gTrue;
+ } else {
+ landscape = gFalse;
+ }
+ } else { // rotate == 90 || rotate == 270
+ if (height > width && height > imgWidth) {
+ rotate = 270 - rotate;
+ landscape = gTrue;
+ } else {
+ landscape = gFalse;
+ }
+ }
+ }
+ writePSFmt("%%PageOrientation: {0:s}\n",
+ landscape ? "Landscape" : "Portrait");
+ writePS("pdfStartPage\n");
+ if (rotate == 0) {
+ imgWidth2 = imgWidth;
+ imgHeight2 = imgHeight;
+ } else if (rotate == 90) {
+ writePS("90 rotate\n");
+ ty = -imgWidth;
+ imgWidth2 = imgHeight;
+ imgHeight2 = imgWidth;
+ } else if (rotate == 180) {
+ writePS("180 rotate\n");
+ imgWidth2 = imgWidth;
+ imgHeight2 = imgHeight;
+ tx = -imgWidth;
+ ty = -imgHeight;
+ } else { // rotate == 270
+ writePS("270 rotate\n");
+ tx = -imgHeight;
+ imgWidth2 = imgHeight;
+ imgHeight2 = imgWidth;
+ }
+ // shrink or expand
+ if (xScale0 > 0 && yScale0 > 0) {
+ xScale = xScale0;
+ yScale = yScale0;
+ } else if ((globalParams->getPSShrinkLarger() &&
+ (width > imgWidth2 || height > imgHeight2)) ||
+ (globalParams->getPSExpandSmaller() &&
+ (width < imgWidth2 && height < imgHeight2))) {
+ xScale = (double)imgWidth2 / (double)width;
+ yScale = (double)imgHeight2 / (double)height;
+ if (yScale < xScale) {
+ xScale = yScale;
+ } else {
+ yScale = xScale;
+ }
+ } else {
+ xScale = yScale = 1;
+ }
+ // deal with odd bounding boxes or clipping
+ if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
+ tx -= xScale * clipLLX0;
+ ty -= yScale * clipLLY0;
+ } else {
+ tx -= xScale * x1;
+ ty -= yScale * y1;
+ }
+ // center
+ if (tx0 >= 0 && ty0 >= 0) {
+ tx += rotate == 0 ? tx0 : ty0;
+ ty += rotate == 0 ? ty0 : -tx0;
+ } else if (globalParams->getPSCenter()) {
+ if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
+ tx += (imgWidth2 - xScale * (clipURX0 - clipLLX0)) / 2;
+ ty += (imgHeight2 - yScale * (clipURY0 - clipLLY0)) / 2;
+ } else {
+ tx += (imgWidth2 - xScale * width) / 2;
+ ty += (imgHeight2 - yScale * height) / 2;
+ }
+ }
+ tx += rotate == 0 ? imgLLX : imgLLY;
+ ty += rotate == 0 ? imgLLY : -imgLLX;
+ if (tx != 0 || ty != 0) {
+ writePSFmt("{0:.4g} {1:.4g} translate\n", tx, ty);
+ }
+ if (xScale != 1 || yScale != 1) {
+ writePSFmt("{0:.4f} {1:.4f} scale\n", xScale, yScale);
+ }
+ if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re W\n",
+ clipLLX0, clipLLY0, clipURX0 - clipLLX0, clipURY0 - clipLLY0);
+ } else {
+ writePSFmt("{0:d} {1:d} {2:d} {3:d} re W\n", x1, y1, x2 - x1, y2 - y1);
+ }
+
+ writePS("%%EndPageSetup\n");
+ ++seqPage;
+ break;
+
+ case psModeEPS:
+ writePS("pdfStartPage\n");
+ tx = ty = 0;
+ rotate = (360 - state->getRotate()) % 360;
+ if (rotate == 0) {
+ } else if (rotate == 90) {
+ writePS("90 rotate\n");
+ tx = -epsX1;
+ ty = -epsY2;
+ } else if (rotate == 180) {
+ writePS("180 rotate\n");
+ tx = -(epsX1 + epsX2);
+ ty = -(epsY1 + epsY2);
+ } else { // rotate == 270
+ writePS("270 rotate\n");
+ tx = -epsX2;
+ ty = -epsY1;
+ }
+ if (tx != 0 || ty != 0) {
+ writePSFmt("{0:.4g} {1:.4g} translate\n", tx, ty);
+ }
+ xScale = yScale = 1;
+ break;
+
+ case psModeForm:
+ writePS("/PaintProc {\n");
+ writePS("begin xpdf begin\n");
+ writePS("pdfStartPage\n");
+ tx = ty = 0;
+ xScale = yScale = 1;
+ rotate = 0;
+ break;
+ }
+}
+
+void PSOutputDev::endPage() {
+ if (overlayCbk) {
+ restoreState(NULL);
+ (*overlayCbk)(this, overlayCbkData);
+ }
+
+
+ if (mode == psModeForm) {
+ writePS("pdfEndPage\n");
+ writePS("end end\n");
+ writePS("} def\n");
+ writePS("end end\n");
+ } else {
+ if (!manualCtrl) {
+ writePS("showpage\n");
+ }
+ writePS("%%PageTrailer\n");
+ writePageTrailer();
+ }
+}
+
+void PSOutputDev::saveState(GfxState *state) {
+ writePS("q\n");
+ ++numSaves;
+}
+
+void PSOutputDev::restoreState(GfxState *state) {
+ writePS("Q\n");
+ --numSaves;
+}
+
+void PSOutputDev::updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32) {
+ writePSFmt("[{0:.4gs} {1:.4gs} {2:.4gs} {3:.4gs} {4:.4gs} {5:.4gs}] cm\n",
+ m11, m12, m21, m22, m31, m32);
+}
+
+void PSOutputDev::updateLineDash(GfxState *state) {
+ double *dash;
+ double start;
+ int length, i;
+
+ state->getLineDash(&dash, &length, &start);
+ writePS("[");
+ for (i = 0; i < length; ++i) {
+ writePSFmt("{0:.4g}{1:w}",
+ dash[i] < 0 ? 0 : dash[i],
+ (i == length-1) ? 0 : 1);
+ }
+ writePSFmt("] {0:.4g} d\n", start);
+}
+
+void PSOutputDev::updateFlatness(GfxState *state) {
+ writePSFmt("{0:d} i\n", state->getFlatness());
+}
+
+void PSOutputDev::updateLineJoin(GfxState *state) {
+ writePSFmt("{0:d} j\n", state->getLineJoin());
+}
+
+void PSOutputDev::updateLineCap(GfxState *state) {
+ writePSFmt("{0:d} J\n", state->getLineCap());
+}
+
+void PSOutputDev::updateMiterLimit(GfxState *state) {
+ writePSFmt("{0:.4g} M\n", state->getMiterLimit());
+}
+
+void PSOutputDev::updateLineWidth(GfxState *state) {
+ writePSFmt("{0:.4g} w\n", state->getLineWidth());
+}
+
+void PSOutputDev::updateFillColorSpace(GfxState *state) {
+ switch (level) {
+ case psLevel1:
+ case psLevel1Sep:
+ break;
+ case psLevel2:
+ case psLevel3:
+ if (state->getFillColorSpace()->getMode() != csPattern) {
+ dumpColorSpaceL2(state->getFillColorSpace(), gTrue, gFalse, gFalse);
+ writePS(" cs\n");
+ }
+ break;
+ case psLevel2Sep:
+ case psLevel3Sep:
+ break;
+ }
+}
+
+void PSOutputDev::updateStrokeColorSpace(GfxState *state) {
+ switch (level) {
+ case psLevel1:
+ case psLevel1Sep:
+ break;
+ case psLevel2:
+ case psLevel3:
+ if (state->getStrokeColorSpace()->getMode() != csPattern) {
+ dumpColorSpaceL2(state->getStrokeColorSpace(), gTrue, gFalse, gFalse);
+ writePS(" CS\n");
+ }
+ break;
+ case psLevel2Sep:
+ case psLevel3Sep:
+ break;
+ }
+}
+
+void PSOutputDev::updateFillColor(GfxState *state) {
+ GfxColor color;
+ GfxColor *colorPtr;
+ GfxGray gray;
+ GfxCMYK cmyk;
+ GfxSeparationColorSpace *sepCS;
+ double c, m, y, k;
+ int i;
+
+ switch (level) {
+ case psLevel1:
+ state->getFillGray(&gray);
+ writePSFmt("{0:.4g} g\n", colToDbl(gray));
+ break;
+ case psLevel1Sep:
+ state->getFillCMYK(&cmyk);
+ c = colToDbl(cmyk.c);
+ m = colToDbl(cmyk.m);
+ y = colToDbl(cmyk.y);
+ k = colToDbl(cmyk.k);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} k\n", c, m, y, k);
+ addProcessColor(c, m, y, k);
+ break;
+ case psLevel2:
+ case psLevel3:
+ if (state->getFillColorSpace()->getMode() != csPattern) {
+ colorPtr = state->getFillColor();
+ writePS("[");
+ for (i = 0; i < state->getFillColorSpace()->getNComps(); ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePSFmt("{0:.4g}", colToDbl(colorPtr->c[i]));
+ }
+ writePS("] sc\n");
+ }
+ break;
+ case psLevel2Sep:
+ case psLevel3Sep:
+ if (state->getFillColorSpace()->getMode() == csSeparation) {
+ sepCS = (GfxSeparationColorSpace *)state->getFillColorSpace();
+ color.c[0] = gfxColorComp1;
+ sepCS->getCMYK(&color, &cmyk);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} ({5:t}) ck\n",
+ colToDbl(state->getFillColor()->c[0]),
+ colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k),
+ sepCS->getName());
+ addCustomColor(sepCS);
+ } else {
+ state->getFillCMYK(&cmyk);
+ c = colToDbl(cmyk.c);
+ m = colToDbl(cmyk.m);
+ y = colToDbl(cmyk.y);
+ k = colToDbl(cmyk.k);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} k\n", c, m, y, k);
+ addProcessColor(c, m, y, k);
+ }
+ break;
+ }
+ t3Cacheable = gFalse;
+}
+
+void PSOutputDev::updateStrokeColor(GfxState *state) {
+ GfxColor color;
+ GfxColor *colorPtr;
+ GfxGray gray;
+ GfxCMYK cmyk;
+ GfxSeparationColorSpace *sepCS;
+ double c, m, y, k;
+ int i;
+
+ switch (level) {
+ case psLevel1:
+ state->getStrokeGray(&gray);
+ writePSFmt("{0:.4g} G\n", colToDbl(gray));
+ break;
+ case psLevel1Sep:
+ state->getStrokeCMYK(&cmyk);
+ c = colToDbl(cmyk.c);
+ m = colToDbl(cmyk.m);
+ y = colToDbl(cmyk.y);
+ k = colToDbl(cmyk.k);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} K\n", c, m, y, k);
+ addProcessColor(c, m, y, k);
+ break;
+ case psLevel2:
+ case psLevel3:
+ if (state->getStrokeColorSpace()->getMode() != csPattern) {
+ colorPtr = state->getStrokeColor();
+ writePS("[");
+ for (i = 0; i < state->getStrokeColorSpace()->getNComps(); ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePSFmt("{0:.4g}", colToDbl(colorPtr->c[i]));
+ }
+ writePS("] SC\n");
+ }
+ break;
+ case psLevel2Sep:
+ case psLevel3Sep:
+ if (state->getStrokeColorSpace()->getMode() == csSeparation) {
+ sepCS = (GfxSeparationColorSpace *)state->getStrokeColorSpace();
+ color.c[0] = gfxColorComp1;
+ sepCS->getCMYK(&color, &cmyk);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} ({5:t}) CK\n",
+ colToDbl(state->getStrokeColor()->c[0]),
+ colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k),
+ sepCS->getName());
+ addCustomColor(sepCS);
+ } else {
+ state->getStrokeCMYK(&cmyk);
+ c = colToDbl(cmyk.c);
+ m = colToDbl(cmyk.m);
+ y = colToDbl(cmyk.y);
+ k = colToDbl(cmyk.k);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} K\n", c, m, y, k);
+ addProcessColor(c, m, y, k);
+ }
+ break;
+ }
+ t3Cacheable = gFalse;
+}
+
+void PSOutputDev::addProcessColor(double c, double m, double y, double k) {
+ if (c > 0) {
+ processColors |= psProcessCyan;
+ }
+ if (m > 0) {
+ processColors |= psProcessMagenta;
+ }
+ if (y > 0) {
+ processColors |= psProcessYellow;
+ }
+ if (k > 0) {
+ processColors |= psProcessBlack;
+ }
+}
+
+void PSOutputDev::addCustomColor(GfxSeparationColorSpace *sepCS) {
+ PSOutCustomColor *cc;
+ GfxColor color;
+ GfxCMYK cmyk;
+
+ for (cc = customColors; cc; cc = cc->next) {
+ if (!cc->name->cmp(sepCS->getName())) {
+ return;
+ }
+ }
+ color.c[0] = gfxColorComp1;
+ sepCS->getCMYK(&color, &cmyk);
+ cc = new PSOutCustomColor(colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k),
+ sepCS->getName()->copy());
+ cc->next = customColors;
+ customColors = cc;
+}
+
+void PSOutputDev::updateFillOverprint(GfxState *state) {
+ if (level >= psLevel2) {
+ writePSFmt("{0:s} op\n", state->getFillOverprint() ? "true" : "false");
+ }
+}
+
+void PSOutputDev::updateStrokeOverprint(GfxState *state) {
+ if (level >= psLevel2) {
+ writePSFmt("{0:s} OP\n", state->getStrokeOverprint() ? "true" : "false");
+ }
+}
+
+void PSOutputDev::updateTransfer(GfxState *state) {
+ Function **funcs;
+ int i;
+
+ funcs = state->getTransfer();
+ if (funcs[0] && funcs[1] && funcs[2] && funcs[3]) {
+ if (level >= psLevel2) {
+ for (i = 0; i < 4; ++i) {
+ cvtFunction(funcs[i]);
+ }
+ writePS("setcolortransfer\n");
+ } else {
+ cvtFunction(funcs[3]);
+ writePS("settransfer\n");
+ }
+ } else if (funcs[0]) {
+ cvtFunction(funcs[0]);
+ writePS("settransfer\n");
+ } else {
+ writePS("{} settransfer\n");
+ }
+}
+
+void PSOutputDev::updateFont(GfxState *state) {
+ if (state->getFont()) {
+ writePSFmt("/F{0:d}_{1:d} {2:.4g} Tf\n",
+ state->getFont()->getID()->num, state->getFont()->getID()->gen,
+ fabs(state->getFontSize()) < 0.00001 ? 0.00001
+ : state->getFontSize());
+ }
+}
+
+void PSOutputDev::updateTextMat(GfxState *state) {
+ double *mat;
+
+ mat = state->getTextMat();
+ if (fabs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.00001) {
+ // avoid a singular (or close-to-singular) matrix
+ writePSFmt("[0.00001 0 0 0.00001 {0:.4g} {1:.4g}] Tm\n", mat[4], mat[5]);
+ } else {
+ writePSFmt("[{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g}] Tm\n",
+ mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ }
+}
+
+void PSOutputDev::updateCharSpace(GfxState *state) {
+ writePSFmt("{0:.4g} Tc\n", state->getCharSpace());
+}
+
+void PSOutputDev::updateRender(GfxState *state) {
+ int rm;
+
+ rm = state->getRender();
+ if (rm == 7 && haveCSPattern) {
+ haveCSPattern = gFalse;
+ restoreState(state);
+ }
+ writePSFmt("{0:d} Tr\n", rm);
+ rm &= 3;
+ if (rm != 0 && rm != 3) {
+ t3Cacheable = gFalse;
+ }
+}
+
+void PSOutputDev::updateRise(GfxState *state) {
+ writePSFmt("{0:.4g} Ts\n", state->getRise());
+}
+
+void PSOutputDev::updateWordSpace(GfxState *state) {
+ writePSFmt("{0:.4g} Tw\n", state->getWordSpace());
+}
+
+void PSOutputDev::updateHorizScaling(GfxState *state) {
+ double h;
+
+ h = state->getHorizScaling();
+ if (fabs(h) < 0.01) {
+ h = 0.01;
+ }
+ writePSFmt("{0:.4g} Tz\n", h);
+}
+
+void PSOutputDev::updateTextPos(GfxState *state) {
+ writePSFmt("{0:.4g} {1:.4g} Td\n", state->getLineX(), state->getLineY());
+}
+
+void PSOutputDev::updateTextShift(GfxState *state, double shift) {
+ if (state->getFont()->getWMode()) {
+ writePSFmt("{0:.4g} TJmV\n", shift);
+ } else {
+ writePSFmt("{0:.4g} TJm\n", shift);
+ }
+}
+
+void PSOutputDev::stroke(GfxState *state) {
+ doPath(state->getPath());
+ if (t3String) {
+ // if we're construct a cacheable Type 3 glyph, we need to do
+ // everything in the fill color
+ writePS("Sf\n");
+ } else {
+ writePS("S\n");
+ }
+}
+
+void PSOutputDev::fill(GfxState *state) {
+ doPath(state->getPath());
+ writePS("f\n");
+}
+
+void PSOutputDev::eoFill(GfxState *state) {
+ doPath(state->getPath());
+ writePS("f*\n");
+}
+
+GBool PSOutputDev::tilingPatternFill(GfxState *state, Object *str,
+ int paintType, Dict *resDict,
+ double *mat, double *bbox,
+ int x0, int y0, int x1, int y1,
+ double xStep, double yStep) {
+ PDFRectangle box;
+ Gfx *gfx;
+
+ // define a Type 3 font
+ writePS("8 dict begin\n");
+ writePS("/FontType 3 def\n");
+ writePS("/FontMatrix [1 0 0 1 0 0] def\n");
+ writePSFmt("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n",
+ bbox[0], bbox[1], bbox[2], bbox[3]);
+ writePS("/Encoding 256 array def\n");
+ writePS(" 0 1 255 { Encoding exch /.notdef put } for\n");
+ writePS(" Encoding 120 /x put\n");
+ writePS("/BuildGlyph {\n");
+ writePS(" exch /CharProcs get exch\n");
+ writePS(" 2 copy known not { pop /.notdef } if\n");
+ writePS(" get exec\n");
+ writePS("} bind def\n");
+ writePS("/BuildChar {\n");
+ writePS(" 1 index /Encoding get exch get\n");
+ writePS(" 1 index /BuildGlyph get exec\n");
+ writePS("} bind def\n");
+ writePS("/CharProcs 1 dict def\n");
+ writePS("CharProcs begin\n");
+ box.x1 = bbox[0];
+ box.y1 = bbox[1];
+ box.x2 = bbox[2];
+ box.y2 = bbox[3];
+ gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL);
+ writePS("/x {\n");
+ if (paintType == 2) {
+ writePSFmt("{0:.4g} 0 {1:.4g} {2:.4g} {3:.4g} {4:.4g} setcachedevice\n",
+ xStep, bbox[0], bbox[1], bbox[2], bbox[3]);
+ } else {
+ if (x1 - 1 <= x0) {
+ writePS("1 0 setcharwidth\n");
+ } else {
+ writePSFmt("{0:.4g} 0 setcharwidth\n", xStep);
+ }
+ }
+ inType3Char = gTrue;
+ ++numTilingPatterns;
+ gfx->display(str);
+ --numTilingPatterns;
+ inType3Char = gFalse;
+ writePS("} def\n");
+ delete gfx;
+ writePS("end\n");
+ writePS("currentdict end\n");
+ writePSFmt("/xpdfTile{0:d} exch definefont pop\n", numTilingPatterns);
+
+ // draw the tiles
+ writePSFmt("/xpdfTile{0:d} findfont setfont\n", numTilingPatterns);
+ writePSFmt("gsave [{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g}] concat\n",
+ mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ writePSFmt("{0:d} 1 {1:d} {{ {2:.4g} exch {3:.4g} mul m {4:d} 1 {5:d} {{ pop (x) show }} for }} for\n",
+ y0, y1 - 1, x0 * xStep, yStep, x0, x1 - 1);
+ writePS("grestore\n");
+
+ return gTrue;
+}
+
+GBool PSOutputDev::functionShadedFill(GfxState *state,
+ GfxFunctionShading *shading) {
+ double x0, y0, x1, y1;
+ double *mat;
+ int i;
+
+ if (level == psLevel2Sep || level == psLevel3Sep) {
+ if (shading->getColorSpace()->getMode() != csDeviceCMYK) {
+ return gFalse;
+ }
+ processColors |= psProcessCMYK;
+ }
+
+ shading->getDomain(&x0, &y0, &x1, &y1);
+ mat = shading->getMatrix();
+ writePSFmt("/mat [{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g}] def\n",
+ mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps());
+ if (shading->getNFuncs() == 1) {
+ writePS("/func ");
+ cvtFunction(shading->getFunc(0));
+ writePS("def\n");
+ } else {
+ writePS("/func {\n");
+ for (i = 0; i < shading->getNFuncs(); ++i) {
+ if (i < shading->getNFuncs() - 1) {
+ writePS("2 copy\n");
+ }
+ cvtFunction(shading->getFunc(i));
+ writePS("exec\n");
+ if (i < shading->getNFuncs() - 1) {
+ writePS("3 1 roll\n");
+ }
+ }
+ writePS("} def\n");
+ }
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} 0 funcSH\n", x0, y0, x1, y1);
+
+ return gTrue;
+}
+
+GBool PSOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) {
+ double xMin, yMin, xMax, yMax;
+ double x0, y0, x1, y1, dx, dy, mul;
+ double tMin, tMax, t, t0, t1;
+ int i;
+
+ if (level == psLevel2Sep || level == psLevel3Sep) {
+ if (shading->getColorSpace()->getMode() != csDeviceCMYK) {
+ return gFalse;
+ }
+ processColors |= psProcessCMYK;
+ }
+
+ // get the clip region bbox
+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
+
+ // compute min and max t values, based on the four corners of the
+ // clip region bbox
+ shading->getCoords(&x0, &y0, &x1, &y1);
+ dx = x1 - x0;
+ dy = y1 - y0;
+ if (fabs(dx) < 0.01 && fabs(dy) < 0.01) {
+ return gTrue;
+ } else {
+ mul = 1 / (dx * dx + dy * dy);
+ tMin = tMax = ((xMin - x0) * dx + (yMin - y0) * dy) * mul;
+ t = ((xMin - x0) * dx + (yMax - y0) * dy) * mul;
+ if (t < tMin) {
+ tMin = t;
+ } else if (t > tMax) {
+ tMax = t;
+ }
+ t = ((xMax - x0) * dx + (yMin - y0) * dy) * mul;
+ if (t < tMin) {
+ tMin = t;
+ } else if (t > tMax) {
+ tMax = t;
+ }
+ t = ((xMax - x0) * dx + (yMax - y0) * dy) * mul;
+ if (t < tMin) {
+ tMin = t;
+ } else if (t > tMax) {
+ tMax = t;
+ }
+ if (tMin < 0 && !shading->getExtend0()) {
+ tMin = 0;
+ }
+ if (tMax > 1 && !shading->getExtend1()) {
+ tMax = 1;
+ }
+ }
+
+ // get the function domain
+ t0 = shading->getDomain0();
+ t1 = shading->getDomain1();
+
+ // generate the PS code
+ writePSFmt("/t0 {0:.4g} def\n", t0);
+ writePSFmt("/t1 {0:.4g} def\n", t1);
+ writePSFmt("/dt {0:.4g} def\n", t1 - t0);
+ writePSFmt("/x0 {0:.4g} def\n", x0);
+ writePSFmt("/y0 {0:.4g} def\n", y0);
+ writePSFmt("/dx {0:.4g} def\n", x1 - x0);
+ writePSFmt("/x1 {0:.4g} def\n", x1);
+ writePSFmt("/y1 {0:.4g} def\n", y1);
+ writePSFmt("/dy {0:.4g} def\n", y1 - y0);
+ writePSFmt("/xMin {0:.4g} def\n", xMin);
+ writePSFmt("/yMin {0:.4g} def\n", yMin);
+ writePSFmt("/xMax {0:.4g} def\n", xMax);
+ writePSFmt("/yMax {0:.4g} def\n", yMax);
+ writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps());
+ if (shading->getNFuncs() == 1) {
+ writePS("/func ");
+ cvtFunction(shading->getFunc(0));
+ writePS("def\n");
+ } else {
+ writePS("/func {\n");
+ for (i = 0; i < shading->getNFuncs(); ++i) {
+ if (i < shading->getNFuncs() - 1) {
+ writePS("dup\n");
+ }
+ cvtFunction(shading->getFunc(i));
+ writePS("exec\n");
+ if (i < shading->getNFuncs() - 1) {
+ writePS("exch\n");
+ }
+ }
+ writePS("} def\n");
+ }
+ writePSFmt("{0:.4g} {1:.4g} 0 axialSH\n", tMin, tMax);
+
+ return gTrue;
+}
+
+GBool PSOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) {
+ double xMin, yMin, xMax, yMax;
+ double x0, y0, r0, x1, y1, r1, t0, t1;
+ double xa, ya, ra;
+ double sz, xz, yz, sMin, sMax, sa, ta;
+ double theta, alpha, a1, a2;
+ GBool enclosed;
+ int i;
+
+ if (level == psLevel2Sep || level == psLevel3Sep) {
+ if (shading->getColorSpace()->getMode() != csDeviceCMYK) {
+ return gFalse;
+ }
+ processColors |= psProcessCMYK;
+ }
+
+ // get the shading info
+ shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
+ t0 = shading->getDomain0();
+ t1 = shading->getDomain1();
+
+ // Compute the point at which r(s) = 0; check for the enclosed
+ // circles case; and compute the angles for the tangent lines.
+ if (r0 == r1) {
+ enclosed = x0 == x1 && y0 == y1;
+ theta = 0;
+ sz = 0; // make gcc happy
+ } else {
+ sz = -r0 / (r1 - r0);
+ xz = x0 + sz * (x1 - x0);
+ yz = y0 + sz * (y1 - y0);
+ enclosed = (xz - x0) * (xz - x0) + (yz - y0) * (yz - y0) <= r0 * r0;
+ theta = asin(r0 / sqrt((x0 - xz) * (x0 - xz) + (y0 - yz) * (y0 - yz)));
+ if (r0 > r1) {
+ theta = -theta;
+ }
+ }
+ if (enclosed) {
+ a1 = 0;
+ a2 = 360;
+ } else {
+ alpha = atan2(y1 - y0, x1 - x0);
+ a1 = (180 / M_PI) * (alpha + theta) + 90;
+ a2 = (180 / M_PI) * (alpha - theta) - 90;
+ while (a2 < a1) {
+ a2 += 360;
+ }
+ }
+
+ // compute the (possibly extended) s range
+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
+ if (enclosed) {
+ sMin = 0;
+ sMax = 1;
+ } else {
+ sMin = 1;
+ sMax = 0;
+ // solve for x(s) + r(s) = xMin
+ if ((x1 + r1) - (x0 + r0) != 0) {
+ sa = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for x(s) - r(s) = xMax
+ if ((x1 - r1) - (x0 - r0) != 0) {
+ sa = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for y(s) + r(s) = yMin
+ if ((y1 + r1) - (y0 + r0) != 0) {
+ sa = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // solve for y(s) - r(s) = yMax
+ if ((y1 - r1) - (y0 - r0) != 0) {
+ sa = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0));
+ if (sa < sMin) {
+ sMin = sa;
+ } else if (sa > sMax) {
+ sMax = sa;
+ }
+ }
+ // check against sz
+ if (r0 < r1) {
+ if (sMin < sz) {
+ sMin = sz;
+ }
+ } else if (r0 > r1) {
+ if (sMax > sz) {
+ sMax = sz;
+ }
+ }
+ // check the 'extend' flags
+ if (!shading->getExtend0() && sMin < 0) {
+ sMin = 0;
+ }
+ if (!shading->getExtend1() && sMax > 1) {
+ sMax = 1;
+ }
+ }
+
+ // generate the PS code
+ writePSFmt("/x0 {0:.4g} def\n", x0);
+ writePSFmt("/x1 {0:.4g} def\n", x1);
+ writePSFmt("/dx {0:.4g} def\n", x1 - x0);
+ writePSFmt("/y0 {0:.4g} def\n", y0);
+ writePSFmt("/y1 {0:.4g} def\n", y1);
+ writePSFmt("/dy {0:.4g} def\n", y1 - y0);
+ writePSFmt("/r0 {0:.4g} def\n", r0);
+ writePSFmt("/r1 {0:.4g} def\n", r1);
+ writePSFmt("/dr {0:.4g} def\n", r1 - r0);
+ writePSFmt("/t0 {0:.4g} def\n", t0);
+ writePSFmt("/t1 {0:.4g} def\n", t1);
+ writePSFmt("/dt {0:.4g} def\n", t1 - t0);
+ writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps());
+ writePSFmt("/encl {0:s} def\n", enclosed ? "true" : "false");
+ writePSFmt("/a1 {0:.4g} def\n", a1);
+ writePSFmt("/a2 {0:.4g} def\n", a2);
+ if (shading->getNFuncs() == 1) {
+ writePS("/func ");
+ cvtFunction(shading->getFunc(0));
+ writePS("def\n");
+ } else {
+ writePS("/func {\n");
+ for (i = 0; i < shading->getNFuncs(); ++i) {
+ if (i < shading->getNFuncs() - 1) {
+ writePS("dup\n");
+ }
+ cvtFunction(shading->getFunc(i));
+ writePS("exec\n");
+ if (i < shading->getNFuncs() - 1) {
+ writePS("exch\n");
+ }
+ }
+ writePS("} def\n");
+ }
+ writePSFmt("{0:.4g} {1:.4g} 0 radialSH\n", sMin, sMax);
+
+ // extend the 'enclosed' case
+ if (enclosed) {
+ // extend the smaller circle
+ if ((shading->getExtend0() && r0 <= r1) ||
+ (shading->getExtend1() && r1 < r0)) {
+ if (r0 <= r1) {
+ ta = t0;
+ ra = r0;
+ xa = x0;
+ ya = y0;
+ } else {
+ ta = t1;
+ ra = r1;
+ xa = x1;
+ ya = y1;
+ }
+ if (level == psLevel2Sep || level == psLevel3Sep) {
+ writePSFmt("{0:.4g} radialCol aload pop k\n", ta);
+ } else {
+ writePSFmt("{0:.4g} radialCol sc\n", ta);
+ }
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} 0 360 arc h f*\n", xa, ya, ra);
+ }
+
+ // extend the larger circle
+ if ((shading->getExtend0() && r0 > r1) ||
+ (shading->getExtend1() && r1 >= r0)) {
+ if (r0 > r1) {
+ ta = t0;
+ ra = r0;
+ xa = x0;
+ ya = y0;
+ } else {
+ ta = t1;
+ ra = r1;
+ xa = x1;
+ ya = y1;
+ }
+ if (level == psLevel2Sep || level == psLevel3Sep) {
+ writePSFmt("{0:.4g} radialCol aload pop k\n", ta);
+ } else {
+ writePSFmt("{0:.4g} radialCol sc\n", ta);
+ }
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} 0 360 arc h\n", xa, ya, ra);
+ writePSFmt("{0:.4g} {1:.4g} m {2:.4g} {3:.4g} l {4:.4g} {5:.4g} l {6:.4g} {7:.4g} l h f*\n",
+ xMin, yMin, xMin, yMax, xMax, yMax, xMax, yMin);
+ }
+ }
+
+ return gTrue;
+}
+
+void PSOutputDev::clip(GfxState *state) {
+ doPath(state->getPath());
+ writePS("W\n");
+}
+
+void PSOutputDev::eoClip(GfxState *state) {
+ doPath(state->getPath());
+ writePS("W*\n");
+}
+
+void PSOutputDev::clipToStrokePath(GfxState *state) {
+ doPath(state->getPath());
+ writePS("Ws\n");
+}
+
+void PSOutputDev::doPath(GfxPath *path) {
+ GfxSubpath *subpath;
+ double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;
+ int n, m, i, j;
+
+ n = path->getNumSubpaths();
+
+ if (n == 1 && path->getSubpath(0)->getNumPoints() == 5) {
+ subpath = path->getSubpath(0);
+ x0 = subpath->getX(0);
+ y0 = subpath->getY(0);
+ x4 = subpath->getX(4);
+ y4 = subpath->getY(4);
+ if (x4 == x0 && y4 == y0) {
+ x1 = subpath->getX(1);
+ y1 = subpath->getY(1);
+ x2 = subpath->getX(2);
+ y2 = subpath->getY(2);
+ x3 = subpath->getX(3);
+ y3 = subpath->getY(3);
+ if (x0 == x1 && x2 == x3 && y0 == y3 && y1 == y2) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
+ x0 < x2 ? x0 : x2, y0 < y1 ? y0 : y1,
+ fabs(x2 - x0), fabs(y1 - y0));
+ return;
+ } else if (x0 == x3 && x1 == x2 && y0 == y1 && y2 == y3) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
+ x0 < x1 ? x0 : x1, y0 < y2 ? y0 : y2,
+ fabs(x1 - x0), fabs(y2 - y0));
+ return;
+ }
+ }
+ }
+
+ for (i = 0; i < n; ++i) {
+ subpath = path->getSubpath(i);
+ m = subpath->getNumPoints();
+ writePSFmt("{0:.4g} {1:.4g} m\n", subpath->getX(0), subpath->getY(0));
+ j = 1;
+ while (j < m) {
+ if (subpath->getCurve(j)) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g} c\n",
+ subpath->getX(j), subpath->getY(j),
+ subpath->getX(j+1), subpath->getY(j+1),
+ subpath->getX(j+2), subpath->getY(j+2));
+ j += 3;
+ } else {
+ writePSFmt("{0:.4g} {1:.4g} l\n", subpath->getX(j), subpath->getY(j));
+ ++j;
+ }
+ }
+ if (subpath->isClosed()) {
+ writePS("h\n");
+ }
+ }
+}
+
+void PSOutputDev::drawString(GfxState *state, GooString *s) {
+ GfxFont *font;
+ int wMode;
+ Gushort *codeToGID;
+ GooString *s2;
+ double dx, dy, dx2, dy2, originX, originY;
+ char *p;
+ UnicodeMap *uMap;
+ CharCode code;
+ Unicode *u;
+ char buf[8];
+ int len, nChars, uLen, n, m, i, j;
+
+ // for pdftohtml, output PS without text
+ if( displayText == gFalse )
+ return;
+
+ // check for invisible text -- this is used by Acrobat Capture
+ if (state->getRender() == 3) {
+ return;
+ }
+
+ // ignore empty strings
+ if (s->getLength() == 0) {
+ return;
+ }
+
+ // get the font
+ if (!(font = state->getFont())) {
+ return;
+ }
+ wMode = font->getWMode();
+
+ // check for a subtitute 16-bit font
+ uMap = NULL;
+ codeToGID = NULL;
+ if (font->isCIDFont()) {
+ for (i = 0; i < font16EncLen; ++i) {
+ if (font->getID()->num == font16Enc[i].fontID.num &&
+ font->getID()->gen == font16Enc[i].fontID.gen) {
+ uMap = globalParams->getUnicodeMap(font16Enc[i].enc);
+ break;
+ }
+ }
+
+ // check for a code-to-GID map
+ } else {
+ for (i = 0; i < font8InfoLen; ++i) {
+ if (font->getID()->num == font8Info[i].fontID.num &&
+ font->getID()->gen == font8Info[i].fontID.gen) {
+ codeToGID = font8Info[i].codeToGID;
+ break;
+ }
+ }
+ }
+
+ // compute width of chars in string, ignoring char spacing and word
+ // spacing -- the Tj operator will adjust for the metrics of the
+ // font that's actually used
+ dx = dy = 0;
+ nChars = 0;
+ p = s->getCString();
+ len = s->getLength();
+ s2 = new GooString();
+ while (len > 0) {
+ n = font->getNextChar(p, len, &code,
+ &u, &uLen,
+ &dx2, &dy2, &originX, &originY);
+ if (font->isCIDFont()) {
+ if (uMap) {
+ for (i = 0; i < uLen; ++i) {
+ m = uMap->mapUnicode(u[i], buf, (int)sizeof(buf));
+ for (j = 0; j < m; ++j) {
+ s2->append(buf[j]);
+ }
+ }
+ //~ this really needs to get the number of chars in the target
+ //~ encoding - which may be more than the number of Unicode
+ //~ chars
+ nChars += uLen;
+ } else {
+ s2->append((char)((code >> 8) & 0xff));
+ s2->append((char)(code & 0xff));
+ ++nChars;
+ }
+ } else {
+ if (!codeToGID || codeToGID[code]) {
+ s2->append((char)code);
+ }
+ }
+ dx += dx2;
+ dy += dy2;
+ p += n;
+ len -= n;
+ }
+ dx *= state->getFontSize() * state->getHorizScaling();
+ dy *= state->getFontSize();
+ if (uMap) {
+ uMap->decRefCnt();
+ }
+
+ if (s2->getLength() > 0) {
+ writePSString(s2);
+ if (font->isCIDFont()) {
+ if (wMode) {
+ writePSFmt(" {0:d} {1:.4g} Tj16V\n", nChars, dy);
+ } else {
+ writePSFmt(" {0:d} {1:.4g} Tj16\n", nChars, dx);
+ }
+ } else {
+ writePSFmt(" {0:.4g} Tj\n", dx);
+ }
+ }
+ delete s2;
+
+ if (state->getRender() & 4) {
+ haveTextClip = gTrue;
+ }
+}
+
+void PSOutputDev::beginTextObject(GfxState *state) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ saveState(state);
+ haveCSPattern = gTrue;
+ savedRender = state->getRender();
+ state->setRender(7);
+ writePSFmt("{0:d} Tr\n", 7);
+ }
+}
+
+void PSOutputDev::endTextObject(GfxState *state) {
+ if (haveCSPattern) {
+ if (haveTextClip) {
+ writePS("Tclip*\n");
+ haveTextClip = gFalse;
+ state->setRender(savedRender);
+ if (state->getFillColorSpace()->getMode() != csPattern) {
+ double cxMin, cyMin, cxMax, cyMax;
+ state->getClipBBox(&cxMin, &cyMin, &cxMax, &cyMax);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
+ cxMin, cyMin,
+ cxMax, cyMax);
+ writePS("f*\n");
+ restoreState(state);
+ updateFillColor(state);
+ }
+ } else {
+ state->setRender(savedRender);
+ }
+ haveCSPattern = gFalse;
+ } else if (haveTextClip) {
+ writePS("Tclip\n");
+ haveTextClip = gFalse;
+ }
+}
+
+void PSOutputDev::endMaskClip(GfxState * state) {
+ writePS("pdfImClipEnd\n");
+}
+
+void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ int len;
+
+ len = height * ((width + 7) / 8);
+ if (state->getFillColorSpace()->getMode() == csPattern && (level != psLevel1 && level != psLevel1Sep)) {
+ maskToClippingPath(str, width, height, invert);
+ } else {
+ switch (level) {
+ case psLevel1:
+ case psLevel1Sep:
+ doImageL1(ref, NULL, invert, inlineImg, str, width, height, len);
+ break;
+ case psLevel2:
+ case psLevel2Sep:
+ doImageL2(ref, NULL, invert, inlineImg, str, width, height, len,
+ NULL, NULL, 0, 0, gFalse);
+ break;
+ case psLevel3:
+ case psLevel3Sep:
+ doImageL3(ref, NULL, invert, inlineImg, str, width, height, len,
+ NULL, NULL, 0, 0, gFalse);
+ break;
+ }
+ }
+}
+
+void PSOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg) {
+ int len;
+
+ len = height * ((width * colorMap->getNumPixelComps() *
+ colorMap->getBits() + 7) / 8);
+ switch (level) {
+ case psLevel1:
+ doImageL1(ref, colorMap, gFalse, inlineImg, str, width, height, len);
+ break;
+ case psLevel1Sep:
+ //~ handle indexed, separation, ... color spaces
+ doImageL1Sep(colorMap, gFalse, inlineImg, str, width, height, len);
+ break;
+ case psLevel2:
+ case psLevel2Sep:
+ doImageL2(ref, colorMap, gFalse, inlineImg, str,
+ width, height, len, maskColors, NULL, 0, 0, gFalse);
+ break;
+ case psLevel3:
+ case psLevel3Sep:
+ doImageL3(ref, colorMap, gFalse, inlineImg, str,
+ width, height, len, maskColors, NULL, 0, 0, gFalse);
+ break;
+ }
+ t3Cacheable = gFalse;
+}
+
+void PSOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate) {
+ int len;
+
+ len = height * ((width * colorMap->getNumPixelComps() *
+ colorMap->getBits() + 7) / 8);
+ switch (level) {
+ case psLevel1:
+ doImageL1(ref, colorMap, gFalse, gFalse, str, width, height, len);
+ break;
+ case psLevel1Sep:
+ //~ handle indexed, separation, ... color spaces
+ doImageL1Sep(colorMap, gFalse, gFalse, str, width, height, len);
+ break;
+ case psLevel2:
+ case psLevel2Sep:
+ doImageL2(ref, colorMap, gFalse, gFalse, str, width, height, len,
+ NULL, maskStr, maskWidth, maskHeight, maskInvert);
+ break;
+ case psLevel3:
+ case psLevel3Sep:
+ doImageL3(ref, colorMap, gFalse, gFalse, str, width, height, len,
+ NULL, maskStr, maskWidth, maskHeight, maskInvert);
+ break;
+ }
+ t3Cacheable = gFalse;
+}
+
+void PSOutputDev::doImageL1(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len) {
+ ImageStream *imgStr;
+ Guchar pixBuf[gfxColorMaxComps];
+ GfxGray gray;
+ int col, x, y, c, i;
+
+ if ((inType3Char || preload) && !colorMap) {
+ if (inlineImg) {
+ // create an array
+ str = new FixedLengthEncoder(str, len);
+ str = new ASCIIHexEncoder(str);
+ str->reset();
+ col = 0;
+ writePS("[<");
+ do {
+ do {
+ c = str->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == '>' || c == EOF) {
+ break;
+ }
+ writePSChar(c);
+ ++col;
+ // each line is: "<...data...><eol>"
+ // so max data length = 255 - 4 = 251
+ // but make it 240 just to be safe
+ // chunks are 2 bytes each, so we need to stop on an even col number
+ if (col == 240) {
+ writePS(">\n<");
+ col = 0;
+ }
+ } while (c != '>' && c != EOF);
+ writePS(">]\n");
+ writePS("0\n");
+ str->close();
+ delete str;
+ } else {
+ // make sure the image is setup, it sometimes is not like on bug #17645
+ setupImage(ref->getRef(), str);
+ // set up to use the array already created by setupImages()
+ writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen());
+ }
+ }
+
+ // image/imagemask command
+ if ((inType3Char || preload) && !colorMap) {
+ writePSFmt("{0:d} {1:d} {2:s} [{3:d} 0 0 {4:d} 0 {5:d}] pdfImM1a\n",
+ width, height, invert ? "true" : "false",
+ width, -height, height);
+ } else if (colorMap) {
+ writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1\n",
+ width, height,
+ width, -height, height);
+ } else {
+ writePSFmt("{0:d} {1:d} {2:s} [{3:d} 0 0 {4:d} 0 {5:d}] pdfImM1\n",
+ width, height, invert ? "true" : "false",
+ width, -height, height);
+ }
+
+ // image data
+ if (!((inType3Char || preload) && !colorMap)) {
+
+ if (colorMap) {
+
+ // set up to process the data stream
+ imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ // process the data stream
+ i = 0;
+ for (y = 0; y < height; ++y) {
+
+ // write the line
+ for (x = 0; x < width; ++x) {
+ imgStr->getPixel(pixBuf);
+ colorMap->getGray(pixBuf, &gray);
+ writePSFmt("{0:02x}", colToByte(gray));
+ if (++i == 32) {
+ writePSChar('\n');
+ i = 0;
+ }
+ }
+ }
+ if (i != 0) {
+ writePSChar('\n');
+ }
+ str->close();
+ delete imgStr;
+
+ // imagemask
+ } else {
+ str->reset();
+ i = 0;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; x += 8) {
+ writePSFmt("{0:02x}", str->getChar() & 0xff);
+ if (++i == 32) {
+ writePSChar('\n');
+ i = 0;
+ }
+ }
+ }
+ if (i != 0) {
+ writePSChar('\n');
+ }
+ str->close();
+ }
+ }
+}
+
+void PSOutputDev::doImageL1Sep(GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len) {
+ ImageStream *imgStr;
+ Guchar *lineBuf;
+ Guchar pixBuf[gfxColorMaxComps];
+ GfxCMYK cmyk;
+ int x, y, i, comp;
+
+ // width, height, matrix, bits per component
+ writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1Sep\n",
+ width, height,
+ width, -height, height);
+
+ // allocate a line buffer
+ lineBuf = (Guchar *)gmallocn(width, 4);
+
+ // set up to process the data stream
+ imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ // process the data stream
+ i = 0;
+ for (y = 0; y < height; ++y) {
+
+ // read the line
+ for (x = 0; x < width; ++x) {
+ imgStr->getPixel(pixBuf);
+ colorMap->getCMYK(pixBuf, &cmyk);
+ lineBuf[4*x+0] = colToByte(cmyk.c);
+ lineBuf[4*x+1] = colToByte(cmyk.m);
+ lineBuf[4*x+2] = colToByte(cmyk.y);
+ lineBuf[4*x+3] = colToByte(cmyk.k);
+ addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k));
+ }
+
+ // write one line of each color component
+ for (comp = 0; comp < 4; ++comp) {
+ for (x = 0; x < width; ++x) {
+ writePSFmt("{0:02x}", lineBuf[4*x + comp]);
+ if (++i == 32) {
+ writePSChar('\n');
+ i = 0;
+ }
+ }
+ }
+ }
+
+ if (i != 0) {
+ writePSChar('\n');
+ }
+
+ str->close();
+ delete imgStr;
+ gfree(lineBuf);
+}
+
+void PSOutputDev::maskToClippingPath(Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert) {
+ ImageStream *imgStr;
+ Guchar *line;
+ PSOutImgClipRect *rects0, *rects1, *rectsTmp, *rectsOut;
+ int rects0Len, rects1Len, rectsSize, rectsOutLen, rectsOutSize;
+ GBool emitRect, addRect, extendRect;
+ int i, x0, x1, y, maskXor;
+
+ imgStr = new ImageStream(maskStr, maskWidth, 1, 1);
+ imgStr->reset();
+ rects0Len = rects1Len = rectsOutLen = 0;
+ rectsSize = rectsOutSize = 64;
+ rects0 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+ rects1 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+ rectsOut = (PSOutImgClipRect *)gmallocn(rectsOutSize, sizeof(PSOutImgClipRect));
+ maskXor = maskInvert ? 1 : 0;
+ for (y = 0; y < maskHeight; ++y) {
+ if (!(line = imgStr->getLine())) {
+ break;
+ }
+ i = 0;
+ rects1Len = 0;
+ for (x0 = 0; x0 < maskWidth && (line[x0] ^ maskXor); ++x0) ;
+ for (x1 = x0; x1 < maskWidth && !(line[x1] ^ maskXor); ++x1) ;
+ while (x0 < maskWidth || i < rects0Len) {
+ emitRect = addRect = extendRect = gFalse;
+ if (x0 >= maskWidth) {
+ emitRect = gTrue;
+ } else if (i >= rects0Len) {
+ addRect = gTrue;
+ } else if (rects0[i].x0 < x0) {
+ emitRect = gTrue;
+ } else if (x0 < rects0[i].x0) {
+ addRect = gTrue;
+ } else if (rects0[i].x1 == x1) {
+ extendRect = gTrue;
+ } else {
+ emitRect = addRect = gTrue;
+ }
+ if (emitRect) {
+ if (rectsOutLen == rectsOutSize) {
+ rectsOutSize *= 2;
+ rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, sizeof(PSOutImgClipRect));
+ }
+ rectsOut[rectsOutLen].x0 = rects0[i].x0;
+ rectsOut[rectsOutLen].x1 = rects0[i].x1;
+ rectsOut[rectsOutLen].y0 = maskHeight - y - 1;
+ rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1;
+ ++rectsOutLen;
+ ++i;
+ }
+ if (addRect || extendRect) {
+ if (rects1Len == rectsSize) {
+ rectsSize *= 2;
+ rects0 = (PSOutImgClipRect *)greallocn(rects0, rectsSize, sizeof(PSOutImgClipRect));
+ rects1 = (PSOutImgClipRect *)greallocn(rects1, rectsSize, sizeof(PSOutImgClipRect));
+ }
+ rects1[rects1Len].x0 = x0;
+ rects1[rects1Len].x1 = x1;
+ if (addRect) {
+ rects1[rects1Len].y0 = y;
+ }
+ if (extendRect) {
+ rects1[rects1Len].y0 = rects0[i].y0;
+ ++i;
+ }
+ ++rects1Len;
+ for (x0 = x1; x0 < maskWidth && (line[x0] ^ maskXor); ++x0) ;
+ for (x1 = x0; x1 < maskWidth && !(line[x1] ^ maskXor); ++x1) ;
+ }
+ }
+ rectsTmp = rects0;
+ rects0 = rects1;
+ rects1 = rectsTmp;
+ i = rects0Len;
+ rects0Len = rects1Len;
+ rects1Len = i;
+ }
+ for (i = 0; i < rects0Len; ++i) {
+ if (rectsOutLen == rectsOutSize) {
+ rectsOutSize *= 2;
+ rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, sizeof(PSOutImgClipRect));
+ }
+ rectsOut[rectsOutLen].x0 = rects0[i].x0;
+ rectsOut[rectsOutLen].x1 = rects0[i].x1;
+ rectsOut[rectsOutLen].y0 = maskHeight - y - 1;
+ rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1;
+ ++rectsOutLen;
+ }
+ if (rectsOutLen < 65536/4) {
+ writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
+ for (i = 0; i < rectsOutLen; ++i) {
+ writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
+ rectsOut[i].x0, rectsOut[i].y0,
+ rectsOut[i].x1 - rectsOut[i].x0,
+ rectsOut[i].y1 - rectsOut[i].y0);
+ }
+ writePSFmt("pop {0:d} {1:d} pdfImClip\n", maskWidth, maskHeight);
+ } else {
+ // would be over the limit of array size.
+ // make each rectangle path and clip.
+ writePS("gsave newpath\n");
+ for (i = 0; i < rectsOutLen; ++i) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
+ ((double)rectsOut[i].x0)/maskWidth,
+ ((double)rectsOut[i].y0)/maskHeight,
+ ((double)(rectsOut[i].x1 - rectsOut[i].x0))/maskWidth,
+ ((double)(rectsOut[i].y1 - rectsOut[i].y0))/maskHeight);
+ }
+ writePS("clip\n");
+ }
+ gfree(rectsOut);
+ gfree(rects0);
+ gfree(rects1);
+ delete imgStr;
+ maskStr->close();
+}
+
+void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len,
+ int *maskColors, Stream *maskStr,
+ int maskWidth, int maskHeight, GBool maskInvert) {
+ Stream *str2;
+ ImageStream *imgStr;
+ Guchar *line;
+ PSOutImgClipRect *rects0, *rects1, *rectsTmp, *rectsOut;
+ int rects0Len, rects1Len, rectsSize, rectsOutLen, rectsOutSize;
+ GBool emitRect, addRect, extendRect;
+ GooString *s;
+ int n, numComps;
+ GBool useRLE, useASCII, useASCIIHex, useCompressed;
+ GfxSeparationColorSpace *sepCS;
+ GfxColor color;
+ GfxCMYK cmyk;
+ int c;
+ int col, i, j, x0, x1, y;
+
+ rectsOutLen = 0;
+
+ // color key masking
+ if (maskColors && colorMap && !inlineImg) {
+ // can't read the stream twice for inline images -- but masking
+ // isn't allowed with inline images anyway
+ numComps = colorMap->getNumPixelComps();
+ imgStr = new ImageStream(str, width, numComps, colorMap->getBits());
+ imgStr->reset();
+ rects0Len = rects1Len = 0;
+ rectsSize = rectsOutSize = 64;
+ rects0 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+ rects1 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect));
+ rectsOut = (PSOutImgClipRect *)gmallocn(rectsOutSize,
+ sizeof(PSOutImgClipRect));
+ for (y = 0; y < height; ++y) {
+ if (!(line = imgStr->getLine())) {
+ break;
+ }
+ i = 0;
+ rects1Len = 0;
+ for (x0 = 0; x0 < width; ++x0) {
+ for (j = 0; j < numComps; ++j) {
+ if (line[x0*numComps+j] < maskColors[2*j] ||
+ line[x0*numComps+j] > maskColors[2*j+1]) {
+ break;
+ }
+ }
+ if (j < numComps) {
+ break;
+ }
+ }
+ for (x1 = x0; x1 < width; ++x1) {
+ for (j = 0; j < numComps; ++j) {
+ if (line[x1*numComps+j] < maskColors[2*j] ||
+ line[x1*numComps+j] > maskColors[2*j+1]) {
+ break;
+ }
+ }
+ if (j == numComps) {
+ break;
+ }
+ }
+ while (x0 < width || i < rects0Len) {
+ emitRect = addRect = extendRect = gFalse;
+ if (x0 >= width) {
+ emitRect = gTrue;
+ } else if (i >= rects0Len) {
+ addRect = gTrue;
+ } else if (rects0[i].x0 < x0) {
+ emitRect = gTrue;
+ } else if (x0 < rects0[i].x0) {
+ addRect = gTrue;
+ } else if (rects0[i].x1 == x1) {
+ extendRect = gTrue;
+ } else {
+ emitRect = addRect = gTrue;
+ }
+ if (emitRect) {
+ if (rectsOutLen == rectsOutSize) {
+ rectsOutSize *= 2;
+ rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize,
+ sizeof(PSOutImgClipRect));
+ }
+ rectsOut[rectsOutLen].x0 = rects0[i].x0;
+ rectsOut[rectsOutLen].x1 = rects0[i].x1;
+ rectsOut[rectsOutLen].y0 = height - y - 1;
+ rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1;
+ ++rectsOutLen;
+ ++i;
+ }
+ if (addRect || extendRect) {
+ if (rects1Len == rectsSize) {
+ rectsSize *= 2;
+ rects0 = (PSOutImgClipRect *)greallocn(rects0, rectsSize,
+ sizeof(PSOutImgClipRect));
+ rects1 = (PSOutImgClipRect *)greallocn(rects1, rectsSize,
+ sizeof(PSOutImgClipRect));
+ }
+ rects1[rects1Len].x0 = x0;
+ rects1[rects1Len].x1 = x1;
+ if (addRect) {
+ rects1[rects1Len].y0 = y;
+ }
+ if (extendRect) {
+ rects1[rects1Len].y0 = rects0[i].y0;
+ ++i;
+ }
+ ++rects1Len;
+ for (x0 = x1; x0 < width; ++x0) {
+ for (j = 0; j < numComps; ++j) {
+ if (line[x0*numComps+j] < maskColors[2*j] ||
+ line[x0*numComps+j] > maskColors[2*j+1]) {
+ break;
+ }
+ }
+ if (j < numComps) {
+ break;
+ }
+ }
+ for (x1 = x0; x1 < width; ++x1) {
+ for (j = 0; j < numComps; ++j) {
+ if (line[x1*numComps+j] < maskColors[2*j] ||
+ line[x1*numComps+j] > maskColors[2*j+1]) {
+ break;
+ }
+ }
+ if (j == numComps) {
+ break;
+ }
+ }
+ }
+ }
+ rectsTmp = rects0;
+ rects0 = rects1;
+ rects1 = rectsTmp;
+ i = rects0Len;
+ rects0Len = rects1Len;
+ rects1Len = i;
+ }
+ for (i = 0; i < rects0Len; ++i) {
+ if (rectsOutLen == rectsOutSize) {
+ rectsOutSize *= 2;
+ rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize,
+ sizeof(PSOutImgClipRect));
+ }
+ rectsOut[rectsOutLen].x0 = rects0[i].x0;
+ rectsOut[rectsOutLen].x1 = rects0[i].x1;
+ rectsOut[rectsOutLen].y0 = height - y - 1;
+ rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1;
+ ++rectsOutLen;
+ }
+ if (rectsOutLen < 65536/4) {
+ writePSFmt("{0:d} array 0\n", rectsOutLen * 4);
+ for (i = 0; i < rectsOutLen; ++i) {
+ writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n",
+ rectsOut[i].x0, rectsOut[i].y0,
+ rectsOut[i].x1 - rectsOut[i].x0,
+ rectsOut[i].y1 - rectsOut[i].y0);
+ }
+ writePSFmt("pop {0:d} {1:d} pdfImClip\n", width, height);
+ } else {
+ // would be over the limit of array size.
+ // make each rectangle path and clip.
+ writePS("gsave newpath\n");
+ for (i = 0; i < rectsOutLen; ++i) {
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} re\n",
+ ((double)rectsOut[i].x0)/width,
+ ((double)rectsOut[i].y0)/height,
+ ((double)(rectsOut[i].x1 - rectsOut[i].x0))/width,
+ ((double)(rectsOut[i].y1 - rectsOut[i].y0))/height);
+ }
+ writePS("clip\n");
+ }
+ gfree(rectsOut);
+ gfree(rects0);
+ gfree(rects1);
+ delete imgStr;
+ str->close();
+
+ // explicit masking
+ } else if (maskStr) {
+ maskToClippingPath(maskStr, maskWidth, maskHeight, maskInvert);
+ }
+
+ // color space
+ if (colorMap) {
+ dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, gTrue, gFalse);
+ writePS(" setcolorspace\n");
+ }
+
+ useASCIIHex = globalParams->getPSASCIIHex();
+
+ // set up the image data
+ if (mode == psModeForm || inType3Char || preload) {
+ if (inlineImg) {
+ // create an array
+ str2 = new FixedLengthEncoder(str, len);
+ str2 = new RunLengthEncoder(str2);
+ if (useASCIIHex) {
+ str2 = new ASCIIHexEncoder(str2);
+ } else {
+ str2 = new ASCII85Encoder(str2);
+ }
+ str2->reset();
+ col = 0;
+ writePS((char *)(useASCIIHex ? "[<" : "[<~"));
+ do {
+ do {
+ c = str2->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ if (c == 'z') {
+ writePSChar(c);
+ ++col;
+ } else {
+ writePSChar(c);
+ ++col;
+ for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
+ do {
+ c = str2->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ writePSChar(c);
+ ++col;
+ }
+ }
+ // each line is: "<~...data...~><eol>"
+ // so max data length = 255 - 6 = 249
+ // chunks are 1 or 5 bytes each, so we have to stop at 245
+ // but make it 240 just to be safe
+ if (col > 240) {
+ writePS((char *)(useASCIIHex ? ">\n<" : "~>\n<~"));
+ col = 0;
+ }
+ } while (c != (useASCIIHex ? '>' : '~') && c != EOF);
+ writePS((char *)(useASCIIHex ? ">\n" : "~>\n"));
+ // add an extra entry because the RunLengthDecode filter may
+ // read past the end
+ writePS("<>]\n");
+ writePS("0\n");
+ str2->close();
+ delete str2;
+ } else {
+ // make sure the image is setup, it sometimes is not like on bug #17645
+ setupImage(ref->getRef(), str);
+ // set up to use the array already created by setupImages()
+ writePSFmt("ImData_{0:d}_{1:d} 0 0\n",ref->getRefNum(), ref->getRefGen());
+ }
+ }
+
+ // image dictionary
+ writePS("<<\n /ImageType 1\n");
+
+ // width, height, matrix, bits per component
+ writePSFmt(" /Width {0:d}\n", width);
+ writePSFmt(" /Height {0:d}\n", height);
+ writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n",
+ width, -height, height);
+ if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) {
+ writePS(" /BitsPerComponent 8\n");
+ } else {
+ writePSFmt(" /BitsPerComponent {0:d}\n",
+ colorMap ? colorMap->getBits() : 1);
+ }
+
+ // decode
+ if (colorMap) {
+ writePS(" /Decode [");
+ if ((level == psLevel2Sep || level == psLevel3Sep) &&
+ colorMap->getColorSpace()->getMode() == csSeparation) {
+ // this matches up with the code in the pdfImSep operator
+ n = (1 << colorMap->getBits()) - 1;
+ writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(0) * n,
+ colorMap->getDecodeHigh(0) * n);
+ } else if (colorMap->getColorSpace()->getMode() == csDeviceN) {
+ numComps = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->
+ getAlt()->getNComps();
+ for (i = 0; i < numComps; ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePS("0 1");
+ }
+ } else {
+ numComps = colorMap->getNumPixelComps();
+ for (i = 0; i < numComps; ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePSFmt("{0:.4g} {1:.4g}",
+ colorMap->getDecodeLow(i), colorMap->getDecodeHigh(i));
+ }
+ }
+ writePS("]\n");
+ } else {
+ writePSFmt(" /Decode [{0:d} {1:d}]\n", invert ? 1 : 0, invert ? 0 : 1);
+ }
+
+ // data source
+ if (mode == psModeForm || inType3Char || preload) {
+ if (inlineImg) {
+ writePS(" /DataSource { 2 copy get exch 1 add exch }\n");
+ } else {
+ writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2"
+ " index get 1 index get exch 1 add exch }\n");
+ }
+ } else {
+ writePS(" /DataSource currentfile\n");
+ }
+
+ // filters
+ s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3,
+ " ");
+ if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) ||
+ inlineImg || !s) {
+ useRLE = gTrue;
+ useASCII = !(mode == psModeForm || inType3Char || preload);
+ useCompressed = gFalse;
+ } else {
+ useRLE = gFalse;
+ useASCII = str->isBinary() &&
+ !(mode == psModeForm || inType3Char || preload);
+ useCompressed = gTrue;
+ }
+ if (useASCII) {
+ writePSFmt(" /ASCII{0:s}Decode filter\n",
+ useASCIIHex ? "Hex" : "85");
+ }
+ if (useRLE) {
+ writePS(" /RunLengthDecode filter\n");
+ }
+ if (useCompressed) {
+ writePS(s->getCString());
+ }
+ if (s) {
+ delete s;
+ }
+
+ if (mode == psModeForm || inType3Char || preload) {
+
+ // end of image dictionary
+ writePSFmt(">>\n{0:s}\n", colorMap ? "image" : "imagemask");
+
+ // get rid of the array and index
+ if (!inlineImg) writePS("pop ");
+ writePS("pop pop\n");
+
+ } else {
+
+ // cut off inline image streams at appropriate length
+ if (inlineImg) {
+ str = new FixedLengthEncoder(str, len);
+ } else if (useCompressed) {
+ str = str->getUndecodedStream();
+ }
+
+ // recode DeviceN data
+ if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) {
+ str = new DeviceNRecoder(str, width, height, colorMap);
+ }
+
+ // add RunLengthEncode and ASCIIHex/85 encode filters
+ if (useRLE) {
+ str = new RunLengthEncoder(str);
+ }
+ if (useASCII) {
+ if (useASCIIHex) {
+ str = new ASCIIHexEncoder(str);
+ } else {
+ str = new ASCII85Encoder(str);
+ }
+ }
+
+ // end of image dictionary
+ writePS(">>\n");
+#if OPI_SUPPORT
+ if (opi13Nest) {
+ if (inlineImg) {
+ // this can't happen -- OPI dictionaries are in XObjects
+ error(-1, "Internal: OPI in inline image");
+ n = 0;
+ } else {
+ // need to read the stream to count characters -- the length
+ // is data-dependent (because of ASCII and RLE filters)
+ str->reset();
+ n = 0;
+ while ((c = str->getChar()) != EOF) {
+ ++n;
+ }
+ str->close();
+ }
+ // +6/7 for "pdfIm\n" / "pdfImM\n"
+ // +8 for newline + trailer
+ n += colorMap ? 14 : 15;
+ writePSFmt("%%BeginData: {0:d} Hex Bytes\n", n);
+ }
+#endif
+ if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap &&
+ colorMap->getColorSpace()->getMode() == csSeparation) {
+ color.c[0] = gfxColorComp1;
+ sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace();
+ sepCS->getCMYK(&color, &cmyk);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t}) pdfImSep\n",
+ colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k),
+ sepCS->getName());
+ } else {
+ writePSFmt("{0:s}\n", colorMap ? "pdfIm" : "pdfImM");
+ }
+
+ // copy the stream data
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ writePSChar(c);
+ }
+ str->close();
+
+ // add newline and trailer to the end
+ writePSChar('\n');
+ writePS("%-EOD-\n");
+#if OPI_SUPPORT
+ if (opi13Nest) {
+ writePS("%%EndData\n");
+ }
+#endif
+
+ // delete encoders
+ if (useRLE || useASCII || inlineImg) {
+ delete str;
+ }
+ }
+
+ if ((maskColors && colorMap && !inlineImg) || maskStr) {
+ if (rectsOutLen < 65536/4) {
+ writePS("pdfImClipEnd\n");
+ } else {
+ writePS("grestore\n");
+ }
+ }
+}
+
+//~ this doesn't currently support OPI
+void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len,
+ int *maskColors, Stream *maskStr,
+ int maskWidth, int maskHeight, GBool maskInvert) {
+ Stream *str2;
+ GooString *s;
+ int n, numComps;
+ GBool useRLE, useASCII, useASCIIHex, useCompressed;
+ GBool maskUseRLE, maskUseASCII, maskUseCompressed;
+ GfxSeparationColorSpace *sepCS;
+ GfxColor color;
+ GfxCMYK cmyk;
+ int c;
+ int col, i;
+
+ useASCIIHex = globalParams->getPSASCIIHex();
+ useRLE = useASCII = useCompressed = gFalse; // make gcc happy
+ maskUseRLE = maskUseASCII = maskUseCompressed = gFalse; // make gcc happy
+
+ // color space
+ if (colorMap) {
+ dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, gTrue, gFalse);
+ writePS(" setcolorspace\n");
+ }
+
+ // set up the image data
+ if (mode == psModeForm || inType3Char || preload) {
+ if (inlineImg) {
+ // create an array
+ str2 = new FixedLengthEncoder(str, len);
+ str2 = new RunLengthEncoder(str2);
+ if (useASCIIHex) {
+ str2 = new ASCIIHexEncoder(str2);
+ } else {
+ str2 = new ASCII85Encoder(str2);
+ }
+ str2->reset();
+ col = 0;
+ writePS((char *)(useASCIIHex ? "[<" : "[<~"));
+ do {
+ do {
+ c = str2->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ if (c == 'z') {
+ writePSChar(c);
+ ++col;
+ } else {
+ writePSChar(c);
+ ++col;
+ for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
+ do {
+ c = str2->getChar();
+ } while (c == '\n' || c == '\r');
+ if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
+ break;
+ }
+ writePSChar(c);
+ ++col;
+ }
+ }
+ // each line is: "<~...data...~><eol>"
+ // so max data length = 255 - 6 = 249
+ // chunks are 1 or 5 bytes each, so we have to stop at 245
+ // but make it 240 just to be safe
+ if (col > 240) {
+ writePS((char *)(useASCIIHex ? ">\n<" : "~>\n<~"));
+ col = 0;
+ }
+ } while (c != (useASCIIHex ? '>' : '~') && c != EOF);
+ writePS((char *)(useASCIIHex ? ">\n" : "~>\n"));
+ // add an extra entry because the RunLengthDecode filter may
+ // read past the end
+ writePS("<>]\n");
+ writePS("0\n");
+ str2->close();
+ delete str2;
+ } else {
+ // make sure the image is setup, it sometimes is not like on bug #17645
+ setupImage(ref->getRef(), str);
+ // set up to use the array already created by setupImages()
+ writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen());
+ }
+ }
+
+ // explicit masking
+ if (maskStr) {
+ writePS("<<\n /ImageType 3\n");
+ writePS(" /InterleaveType 3\n");
+ writePS(" /DataDict\n");
+ }
+
+ // image (data) dictionary
+ writePSFmt("<<\n /ImageType {0:d}\n", (maskColors && colorMap) ? 4 : 1);
+
+ // color key masking
+ if (maskColors && colorMap) {
+ writePS(" /MaskColor [\n");
+ numComps = colorMap->getNumPixelComps();
+ for (i = 0; i < 2 * numComps; i += 2) {
+ writePSFmt(" {0:d} {1:d}\n", maskColors[i], maskColors[i+1]);
+ }
+ writePS(" ]\n");
+ }
+
+ // width, height, matrix, bits per component
+ writePSFmt(" /Width {0:d}\n", width);
+ writePSFmt(" /Height {0:d}\n", height);
+ writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n",
+ width, -height, height);
+ if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) {
+ writePS(" /BitsPerComponent 8\n");
+ } else {
+ writePSFmt(" /BitsPerComponent {0:d}\n",
+ colorMap ? colorMap->getBits() : 1);
+ }
+
+ // decode
+ if (colorMap) {
+ writePS(" /Decode [");
+ if ((level == psLevel2Sep || level == psLevel3Sep) &&
+ colorMap->getColorSpace()->getMode() == csSeparation) {
+ // this matches up with the code in the pdfImSep operator
+ n = (1 << colorMap->getBits()) - 1;
+ writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(0) * n,
+ colorMap->getDecodeHigh(0) * n);
+ } else if (colorMap->getColorSpace()->getMode() == csDeviceN) {
+ numComps = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->
+ getAlt()->getNComps();
+ for (i = 0; i < numComps; ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePS("0 1");
+ }
+ } else {
+ numComps = colorMap->getNumPixelComps();
+ for (i = 0; i < numComps; ++i) {
+ if (i > 0) {
+ writePS(" ");
+ }
+ writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(i),
+ colorMap->getDecodeHigh(i));
+ }
+ }
+ writePS("]\n");
+ } else {
+ writePSFmt(" /Decode [{0:d} {1:d}]\n", invert ? 1 : 0, invert ? 0 : 1);
+ }
+
+ // data source
+ if (mode == psModeForm || inType3Char || preload) {
+ if (inlineImg) {
+ writePS(" /DataSource { 2 copy get exch 1 add exch }\n");
+ } else {
+ writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2"
+ " index get 1 index get exch 1 add exch }\n");
+ }
+ } else {
+ writePS(" /DataSource currentfile\n");
+ }
+
+ // filters
+ s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3,
+ " ");
+ if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) ||
+ inlineImg || !s) {
+ useRLE = gTrue;
+ useASCII = !(mode == psModeForm || inType3Char || preload);
+ useCompressed = gFalse;
+ } else {
+ useRLE = gFalse;
+ useASCII = str->isBinary() &&
+ !(mode == psModeForm || inType3Char || preload);
+ useCompressed = gTrue;
+ }
+ if (useASCII) {
+ writePSFmt(" /ASCII{0:s}Decode filter\n",
+ useASCIIHex ? "Hex" : "85");
+ }
+ if (useRLE) {
+ writePS(" /RunLengthDecode filter\n");
+ }
+ if (useCompressed) {
+ writePS(s->getCString());
+ }
+ if (s) {
+ delete s;
+ }
+
+ // end of image (data) dictionary
+ writePS(">>\n");
+
+ // explicit masking
+ if (maskStr) {
+ writePS(" /MaskDict\n");
+ writePS("<<\n");
+ writePS(" /ImageType 1\n");
+ writePSFmt(" /Width {0:d}\n", maskWidth);
+ writePSFmt(" /Height {0:d}\n", maskHeight);
+ writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n",
+ maskWidth, -maskHeight, maskHeight);
+ writePS(" /BitsPerComponent 1\n");
+ writePSFmt(" /Decode [{0:d} {1:d}]\n",
+ maskInvert ? 1 : 0, maskInvert ? 0 : 1);
+
+ // mask data source
+ writePS(" /DataSource currentfile\n");
+ s = maskStr->getPSFilter(3, " ");
+ if (!s) {
+ maskUseRLE = gTrue;
+ maskUseASCII = gTrue;
+ maskUseCompressed = gFalse;
+ } else {
+ maskUseRLE = gFalse;
+ maskUseASCII = maskStr->isBinary();
+ maskUseCompressed = gTrue;
+ }
+ if (maskUseASCII) {
+ writePSFmt(" /ASCII{0:s}Decode filter\n",
+ useASCIIHex ? "Hex" : "85");
+ }
+ if (maskUseRLE) {
+ writePS(" /RunLengthDecode filter\n");
+ }
+ if (maskUseCompressed) {
+ writePS(s->getCString());
+ }
+ if (s) {
+ delete s;
+ }
+
+ writePS(">>\n");
+ writePS(">>\n");
+ }
+
+ if (mode == psModeForm || inType3Char || preload) {
+
+ // image command
+ writePSFmt("{0:s}\n", colorMap ? "image" : "imagemask");
+
+ } else {
+
+ if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap &&
+ colorMap->getColorSpace()->getMode() == csSeparation) {
+ color.c[0] = gfxColorComp1;
+ sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace();
+ sepCS->getCMYK(&color, &cmyk);
+ writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t}) pdfImSep\n",
+ colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k),
+ sepCS->getName());
+ } else {
+ writePSFmt("{0:s}\n", colorMap ? "pdfIm" : "pdfImM");
+ }
+
+ }
+
+ // explicit masking
+ if (maskStr) {
+
+ if (maskUseCompressed) {
+ maskStr = maskStr->getUndecodedStream();
+ }
+
+ // add RunLengthEncode and ASCIIHex/85 encode filters
+ if (maskUseRLE) {
+ maskStr = new RunLengthEncoder(maskStr);
+ }
+ if (maskUseASCII) {
+ if (useASCIIHex) {
+ maskStr = new ASCIIHexEncoder(maskStr);
+ } else {
+ maskStr = new ASCII85Encoder(maskStr);
+ }
+ }
+
+ // copy the stream data
+ maskStr->reset();
+ while ((c = maskStr->getChar()) != EOF) {
+ writePSChar(c);
+ }
+ maskStr->close();
+ writePSChar('\n');
+
+ // delete encoders
+ if (maskUseRLE || maskUseASCII) {
+ delete maskStr;
+ }
+ }
+
+ // get rid of the array and index
+ if (mode == psModeForm || inType3Char || preload) {
+ if (!inlineImg) writePS("pop ");
+ writePS("pop pop\n");
+
+ // image data
+ } else {
+
+ // cut off inline image streams at appropriate length
+ if (inlineImg) {
+ str = new FixedLengthEncoder(str, len);
+ } else if (useCompressed) {
+ str = str->getUndecodedStream();
+ }
+
+ // recode DeviceN data
+ if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) {
+ str = new DeviceNRecoder(str, width, height, colorMap);
+ }
+
+ // add RunLengthEncode and ASCIIHex/85 encode filters
+ if (useRLE) {
+ str = new RunLengthEncoder(str);
+ }
+ if (useASCII) {
+ if (useASCIIHex) {
+ str = new ASCIIHexEncoder(str);
+ } else {
+ str = new ASCII85Encoder(str);
+ }
+ }
+
+ // copy the stream data
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ writePSChar(c);
+ }
+ str->close();
+
+ // add newline and trailer to the end
+ writePSChar('\n');
+ writePS("%-EOD-\n");
+
+ // delete encoders
+ if (useRLE || useASCII || inlineImg) {
+ delete str;
+ }
+ }
+}
+
+void PSOutputDev::dumpColorSpaceL2(GfxColorSpace *colorSpace,
+ GBool genXform, GBool updateColors,
+ GBool map01) {
+ GfxCalGrayColorSpace *calGrayCS;
+ GfxCalRGBColorSpace *calRGBCS;
+ GfxLabColorSpace *labCS;
+ GfxIndexedColorSpace *indexedCS;
+ GfxSeparationColorSpace *separationCS;
+ GfxDeviceNColorSpace *deviceNCS;
+ GfxColorSpace *baseCS;
+ Guchar *lookup, *p;
+ double x[gfxColorMaxComps], y[gfxColorMaxComps];
+ double low[gfxColorMaxComps], range[gfxColorMaxComps];
+ GfxColor color;
+ GfxCMYK cmyk;
+ Function *func;
+ int n, numComps, numAltComps;
+ int byte;
+ int i, j, k;
+
+ switch (colorSpace->getMode()) {
+
+ case csDeviceGray:
+ writePS("/DeviceGray");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessBlack;
+ }
+ break;
+
+ case csCalGray:
+ calGrayCS = (GfxCalGrayColorSpace *)colorSpace;
+ writePS("[/CIEBasedA <<\n");
+ writePSFmt(" /DecodeA {{{0:.4g} exp}} bind\n", calGrayCS->getGamma());
+ writePSFmt(" /MatrixA [{0:.4g} {1:.4g} {2:.4g}]\n",
+ calGrayCS->getWhiteX(), calGrayCS->getWhiteY(),
+ calGrayCS->getWhiteZ());
+ writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ calGrayCS->getWhiteX(), calGrayCS->getWhiteY(),
+ calGrayCS->getWhiteZ());
+ writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ calGrayCS->getBlackX(), calGrayCS->getBlackY(),
+ calGrayCS->getBlackZ());
+ writePS(">>]");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessBlack;
+ }
+ break;
+
+ case csDeviceRGB:
+ writePS("/DeviceRGB");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessCMYK;
+ }
+ break;
+
+ case csCalRGB:
+ calRGBCS = (GfxCalRGBColorSpace *)colorSpace;
+ writePS("[/CIEBasedABC <<\n");
+ writePSFmt(" /DecodeABC [{{{0:.4g} exp}} bind {{{1:.4g} exp}} bind {{{2:.4g} exp}} bind]\n",
+ calRGBCS->getGammaR(), calRGBCS->getGammaG(),
+ calRGBCS->getGammaB());
+ writePSFmt(" /MatrixABC [{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g} {6:.4g} {7:.4g} {8:.4g}]\n",
+ calRGBCS->getMatrix()[0], calRGBCS->getMatrix()[1],
+ calRGBCS->getMatrix()[2], calRGBCS->getMatrix()[3],
+ calRGBCS->getMatrix()[4], calRGBCS->getMatrix()[5],
+ calRGBCS->getMatrix()[6], calRGBCS->getMatrix()[7],
+ calRGBCS->getMatrix()[8]);
+ writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ calRGBCS->getWhiteX(), calRGBCS->getWhiteY(),
+ calRGBCS->getWhiteZ());
+ writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ calRGBCS->getBlackX(), calRGBCS->getBlackY(),
+ calRGBCS->getBlackZ());
+ writePS(">>]");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessCMYK;
+ }
+ break;
+
+ case csDeviceCMYK:
+ writePS("/DeviceCMYK");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessCMYK;
+ }
+ break;
+
+ case csLab:
+ labCS = (GfxLabColorSpace *)colorSpace;
+ writePS("[/CIEBasedABC <<\n");
+ if (map01) {
+ writePS(" /RangeABC [0 1 0 1 0 1]\n");
+ writePSFmt(" /DecodeABC [{{100 mul 16 add 116 div}} bind {{{0:.4g} mul {1:.4g} add}} bind {{{2:.4g} mul {3:.4g} add}} bind]\n",
+ (labCS->getAMax() - labCS->getAMin()) / 500.0,
+ labCS->getAMin() / 500.0,
+ (labCS->getBMax() - labCS->getBMin()) / 200.0,
+ labCS->getBMin() / 200.0);
+ } else {
+ writePSFmt(" /RangeABC [0 100 {0:.4g} {1:.4g} {2:.4g} {3:.4g}]\n",
+ labCS->getAMin(), labCS->getAMax(),
+ labCS->getBMin(), labCS->getBMax());
+ writePS(" /DecodeABC [{16 add 116 div} bind {500 div} bind {200 div} bind]\n");
+ }
+ writePS(" /MatrixABC [1 1 1 1 0 0 0 0 -1]\n");
+ writePS(" /DecodeLMN\n");
+ writePS(" [{dup 6 29 div ge {dup dup mul mul}\n");
+ writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind\n",
+ labCS->getWhiteX());
+ writePS(" {dup 6 29 div ge {dup dup mul mul}\n");
+ writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind\n",
+ labCS->getWhiteY());
+ writePS(" {dup 6 29 div ge {dup dup mul mul}\n");
+ writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind]\n",
+ labCS->getWhiteZ());
+ writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ labCS->getWhiteX(), labCS->getWhiteY(), labCS->getWhiteZ());
+ writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n",
+ labCS->getBlackX(), labCS->getBlackY(), labCS->getBlackZ());
+ writePS(">>]");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ processColors |= psProcessCMYK;
+ }
+ break;
+
+ case csICCBased:
+ // there is no transform function to the alternate color space, so
+ // we can use it directly
+ dumpColorSpaceL2(((GfxICCBasedColorSpace *)colorSpace)->getAlt(),
+ genXform, updateColors, gFalse);
+ break;
+
+ case csIndexed:
+ indexedCS = (GfxIndexedColorSpace *)colorSpace;
+ baseCS = indexedCS->getBase();
+ writePS("[/Indexed ");
+ dumpColorSpaceL2(baseCS, gFalse, gFalse, gTrue);
+ n = indexedCS->getIndexHigh();
+ numComps = baseCS->getNComps();
+ lookup = indexedCS->getLookup();
+ writePSFmt(" {0:d} <\n", n);
+ if (baseCS->getMode() == csDeviceN) {
+ func = ((GfxDeviceNColorSpace *)baseCS)->getTintTransformFunc();
+ baseCS->getDefaultRanges(low, range, indexedCS->getIndexHigh());
+ if (((GfxDeviceNColorSpace *)baseCS)->getAlt()->getMode() == csLab) {
+ labCS = (GfxLabColorSpace *)((GfxDeviceNColorSpace *)baseCS)->getAlt();
+ } else {
+ labCS = NULL;
+ }
+ numAltComps = ((GfxDeviceNColorSpace *)baseCS)->getAlt()->getNComps();
+ p = lookup;
+ for (i = 0; i <= n; i += 8) {
+ writePS(" ");
+ for (j = i; j < i+8 && j <= n; ++j) {
+ for (k = 0; k < numComps; ++k) {
+ x[k] = low[k] + (*p++ / 255.0) * range[k];
+ }
+ func->transform(x, y);
+ if (labCS) {
+ y[0] /= 100.0;
+ y[1] = (y[1] - labCS->getAMin()) /
+ (labCS->getAMax() - labCS->getAMin());
+ y[2] = (y[2] - labCS->getBMin()) /
+ (labCS->getBMax() - labCS->getBMin());
+ }
+ for (k = 0; k < numAltComps; ++k) {
+ byte = (int)(y[k] * 255 + 0.5);
+ if (byte < 0) {
+ byte = 0;
+ } else if (byte > 255) {
+ byte = 255;
+ }
+ writePSFmt("{0:02x}", byte);
+ }
+ if (updateColors) {
+ color.c[0] = dblToCol(j);
+ indexedCS->getCMYK(&color, &cmyk);
+ addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k));
+ }
+ }
+ writePS("\n");
+ }
+ } else {
+ for (i = 0; i <= n; i += 8) {
+ writePS(" ");
+ for (j = i; j < i+8 && j <= n; ++j) {
+ for (k = 0; k < numComps; ++k) {
+ writePSFmt("{0:02x}", lookup[j * numComps + k]);
+ }
+ if (updateColors) {
+ color.c[0] = dblToCol(j);
+ indexedCS->getCMYK(&color, &cmyk);
+ addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m),
+ colToDbl(cmyk.y), colToDbl(cmyk.k));
+ }
+ }
+ writePS("\n");
+ }
+ }
+ writePS(">]");
+ if (genXform) {
+ writePS(" {}");
+ }
+ break;
+
+ case csSeparation:
+ separationCS = (GfxSeparationColorSpace *)colorSpace;
+ writePS("[/Separation ");
+ writePSString(separationCS->getName());
+ writePS(" ");
+ dumpColorSpaceL2(separationCS->getAlt(), gFalse, gFalse, gFalse);
+ writePS("\n");
+ cvtFunction(separationCS->getFunc());
+ writePS("]");
+ if (genXform) {
+ writePS(" {}");
+ }
+ if (updateColors) {
+ addCustomColor(separationCS);
+ }
+ break;
+
+ case csDeviceN:
+ // DeviceN color spaces are a Level 3 PostScript feature.
+ deviceNCS = (GfxDeviceNColorSpace *)colorSpace;
+ dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, map01);
+ if (genXform) {
+ writePS(" ");
+ cvtFunction(deviceNCS->getTintTransformFunc());
+ }
+ break;
+
+ case csPattern:
+ //~ unimplemented
+ break;
+ }
+}
+
+#if OPI_SUPPORT
+void PSOutputDev::opiBegin(GfxState *state, Dict *opiDict) {
+ Object dict;
+
+ if (globalParams->getPSOPI()) {
+ opiDict->lookup("2.0", &dict);
+ if (dict.isDict()) {
+ opiBegin20(state, dict.getDict());
+ dict.free();
+ } else {
+ dict.free();
+ opiDict->lookup("1.3", &dict);
+ if (dict.isDict()) {
+ opiBegin13(state, dict.getDict());
+ }
+ dict.free();
+ }
+ }
+}
+
+void PSOutputDev::opiBegin20(GfxState *state, Dict *dict) {
+ Object obj1, obj2, obj3, obj4;
+ double width, height, left, right, top, bottom;
+ int w, h;
+ int i;
+
+ writePS("%%BeginOPI: 2.0\n");
+ writePS("%%Distilled\n");
+
+ dict->lookup("F", &obj1);
+ if (getFileSpecName(&obj1, &obj2)) {
+ writePSFmt("%%ImageFileName: {0:t}\n", obj2.getString());
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("MainImage", &obj1);
+ if (obj1.isString()) {
+ writePSFmt("%%MainImage: {0:t}\n", obj1.getString());
+ }
+ obj1.free();
+
+ //~ ignoring 'Tags' entry
+ //~ need to use writePSString() and deal with >255-char lines
+
+ dict->lookup("Size", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 2) {
+ obj1.arrayGet(0, &obj2);
+ width = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ height = obj2.getNum();
+ obj2.free();
+ writePSFmt("%%ImageDimensions: {0:.4g} {1:.4g}\n", width, height);
+ }
+ obj1.free();
+
+ dict->lookup("CropRect", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 4) {
+ obj1.arrayGet(0, &obj2);
+ left = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ top = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ right = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ bottom = obj2.getNum();
+ obj2.free();
+ writePSFmt("%%ImageCropRect: {0:.4g} {1:.4g} {2:.4g} {3:.4g}\n",
+ left, top, right, bottom);
+ }
+ obj1.free();
+
+ dict->lookup("Overprint", &obj1);
+ if (obj1.isBool()) {
+ writePSFmt("%%ImageOverprint: {0:s}\n", obj1.getBool() ? "true" : "false");
+ }
+ obj1.free();
+
+ dict->lookup("Inks", &obj1);
+ if (obj1.isName()) {
+ writePSFmt("%%ImageInks: {0:s}\n", obj1.getName());
+ } else if (obj1.isArray() && obj1.arrayGetLength() >= 1) {
+ obj1.arrayGet(0, &obj2);
+ if (obj2.isName()) {
+ writePSFmt("%%ImageInks: {0:s} {1:d}",
+ obj2.getName(), (obj1.arrayGetLength() - 1) / 2);
+ for (i = 1; i+1 < obj1.arrayGetLength(); i += 2) {
+ obj1.arrayGet(i, &obj3);
+ obj1.arrayGet(i+1, &obj4);
+ if (obj3.isString() && obj4.isNum()) {
+ writePS(" ");
+ writePSString(obj3.getString());
+ writePSFmt(" {0:.4g}", obj4.getNum());
+ }
+ obj3.free();
+ obj4.free();
+ }
+ writePS("\n");
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ writePS("gsave\n");
+
+ writePS("%%BeginIncludedImage\n");
+
+ dict->lookup("IncludedImageDimensions", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 2) {
+ obj1.arrayGet(0, &obj2);
+ w = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ h = obj2.getInt();
+ obj2.free();
+ writePSFmt("%%IncludedImageDimensions: {0:d} {1:d}\n", w, h);
+ }
+ obj1.free();
+
+ dict->lookup("IncludedImageQuality", &obj1);
+ if (obj1.isNum()) {
+ writePSFmt("%%IncludedImageQuality: {0:.4g}\n", obj1.getNum());
+ }
+ obj1.free();
+
+ ++opi20Nest;
+}
+
+void PSOutputDev::opiBegin13(GfxState *state, Dict *dict) {
+ Object obj1, obj2;
+ int left, right, top, bottom, samples, bits, width, height;
+ double c, m, y, k;
+ double llx, lly, ulx, uly, urx, ury, lrx, lry;
+ double tllx, tlly, tulx, tuly, turx, tury, tlrx, tlry;
+ double horiz, vert;
+ int i, j;
+
+ writePS("save\n");
+ writePS("/opiMatrix2 matrix currentmatrix def\n");
+ writePS("opiMatrix setmatrix\n");
+
+ dict->lookup("F", &obj1);
+ if (getFileSpecName(&obj1, &obj2)) {
+ writePSFmt("%ALDImageFileName: {0:t}\n", obj2.getString());
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("CropRect", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 4) {
+ obj1.arrayGet(0, &obj2);
+ left = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ top = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ right = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ bottom = obj2.getInt();
+ obj2.free();
+ writePSFmt("%ALDImageCropRect: {0:d} {1:d} {2:d} {3:d}\n",
+ left, top, right, bottom);
+ }
+ obj1.free();
+
+ dict->lookup("Color", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 5) {
+ obj1.arrayGet(0, &obj2);
+ c = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ m = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ y = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ k = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(4, &obj2);
+ if (obj2.isString()) {
+ writePSFmt("%ALDImageColor: {0:.4g} {1:.4g} {2:.4g} {3:.4g} ",
+ c, m, y, k);
+ writePSString(obj2.getString());
+ writePS("\n");
+ }
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("ColorType", &obj1);
+ if (obj1.isName()) {
+ writePSFmt("%ALDImageColorType: {0:s}\n", obj1.getName());
+ }
+ obj1.free();
+
+ //~ ignores 'Comments' entry
+ //~ need to handle multiple lines
+
+ dict->lookup("CropFixed", &obj1);
+ if (obj1.isArray()) {
+ obj1.arrayGet(0, &obj2);
+ ulx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ uly = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ lrx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ lry = obj2.getNum();
+ obj2.free();
+ writePSFmt("%ALDImageCropFixed: {0:.4g} {1:.4g} {2:.4g} {3:.4g}\n",
+ ulx, uly, lrx, lry);
+ }
+ obj1.free();
+
+ dict->lookup("GrayMap", &obj1);
+ if (obj1.isArray()) {
+ writePS("%ALDImageGrayMap:");
+ for (i = 0; i < obj1.arrayGetLength(); i += 16) {
+ if (i > 0) {
+ writePS("\n%%+");
+ }
+ for (j = 0; j < 16 && i+j < obj1.arrayGetLength(); ++j) {
+ obj1.arrayGet(i+j, &obj2);
+ writePSFmt(" {0:d}", obj2.getInt());
+ obj2.free();
+ }
+ }
+ writePS("\n");
+ }
+ obj1.free();
+
+ dict->lookup("ID", &obj1);
+ if (obj1.isString()) {
+ writePSFmt("%ALDImageID: {0:t}\n", obj1.getString());
+ }
+ obj1.free();
+
+ dict->lookup("ImageType", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 2) {
+ obj1.arrayGet(0, &obj2);
+ samples = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ bits = obj2.getInt();
+ obj2.free();
+ writePSFmt("%ALDImageType: {0:d} {1:d}\n", samples, bits);
+ }
+ obj1.free();
+
+ dict->lookup("Overprint", &obj1);
+ if (obj1.isBool()) {
+ writePSFmt("%ALDImageOverprint: {0:s}\n",
+ obj1.getBool() ? "true" : "false");
+ }
+ obj1.free();
+
+ dict->lookup("Position", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 8) {
+ obj1.arrayGet(0, &obj2);
+ llx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ lly = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ ulx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ uly = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(4, &obj2);
+ urx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(5, &obj2);
+ ury = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(6, &obj2);
+ lrx = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(7, &obj2);
+ lry = obj2.getNum();
+ obj2.free();
+ opiTransform(state, llx, lly, &tllx, &tlly);
+ opiTransform(state, ulx, uly, &tulx, &tuly);
+ opiTransform(state, urx, ury, &turx, &tury);
+ opiTransform(state, lrx, lry, &tlrx, &tlry);
+ writePSFmt("%ALDImagePosition: {0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g} {6:.4g} {7:.4g}\n",
+ tllx, tlly, tulx, tuly, turx, tury, tlrx, tlry);
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("Resolution", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 2) {
+ obj1.arrayGet(0, &obj2);
+ horiz = obj2.getNum();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ vert = obj2.getNum();
+ obj2.free();
+ writePSFmt("%ALDImageResoution: {0:.4g} {1:.4g}\n", horiz, vert);
+ obj2.free();
+ }
+ obj1.free();
+
+ dict->lookup("Size", &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 2) {
+ obj1.arrayGet(0, &obj2);
+ width = obj2.getInt();
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ height = obj2.getInt();
+ obj2.free();
+ writePSFmt("%ALDImageDimensions: {0:d} {1:d}\n", width, height);
+ }
+ obj1.free();
+
+ //~ ignoring 'Tags' entry
+ //~ need to use writePSString() and deal with >255-char lines
+
+ dict->lookup("Tint", &obj1);
+ if (obj1.isNum()) {
+ writePSFmt("%ALDImageTint: {0:.4g}\n", obj1.getNum());
+ }
+ obj1.free();
+
+ dict->lookup("Transparency", &obj1);
+ if (obj1.isBool()) {
+ writePSFmt("%ALDImageTransparency: {0:s}\n",
+ obj1.getBool() ? "true" : "false");
+ }
+ obj1.free();
+
+ writePS("%%BeginObject: image\n");
+ writePS("opiMatrix2 setmatrix\n");
+ ++opi13Nest;
+}
+
+// Convert PDF user space coordinates to PostScript default user space
+// coordinates. This has to account for both the PDF CTM and the
+// PSOutputDev page-fitting transform.
+void PSOutputDev::opiTransform(GfxState *state, double x0, double y0,
+ double *x1, double *y1) {
+ double t;
+
+ state->transform(x0, y0, x1, y1);
+ *x1 += tx;
+ *y1 += ty;
+ if (rotate == 90) {
+ t = *x1;
+ *x1 = -*y1;
+ *y1 = t;
+ } else if (rotate == 180) {
+ *x1 = -*x1;
+ *y1 = -*y1;
+ } else if (rotate == 270) {
+ t = *x1;
+ *x1 = *y1;
+ *y1 = -t;
+ }
+ *x1 *= xScale;
+ *y1 *= yScale;
+}
+
+void PSOutputDev::opiEnd(GfxState *state, Dict *opiDict) {
+ Object dict;
+
+ if (globalParams->getPSOPI()) {
+ opiDict->lookup("2.0", &dict);
+ if (dict.isDict()) {
+ writePS("%%EndIncludedImage\n");
+ writePS("%%EndOPI\n");
+ writePS("grestore\n");
+ --opi20Nest;
+ dict.free();
+ } else {
+ dict.free();
+ opiDict->lookup("1.3", &dict);
+ if (dict.isDict()) {
+ writePS("%%EndObject\n");
+ writePS("restore\n");
+ --opi13Nest;
+ }
+ dict.free();
+ }
+ }
+}
+#endif // OPI_SUPPORT
+
+void PSOutputDev::type3D0(GfxState *state, double wx, double wy) {
+ writePSFmt("{0:.4g} {1:.4g} setcharwidth\n", wx, wy);
+ writePS("q\n");
+ t3NeedsRestore = gTrue;
+}
+
+void PSOutputDev::type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury) {
+ t3WX = wx;
+ t3WY = wy;
+ t3LLX = llx;
+ t3LLY = lly;
+ t3URX = urx;
+ t3URY = ury;
+ t3String = new GooString();
+ writePS("q\n");
+ t3Cacheable = gTrue;
+ t3NeedsRestore = gTrue;
+}
+
+void PSOutputDev::drawForm(Ref id) {
+ writePSFmt("f_{0:d}_{1:d}\n", id.num, id.gen);
+}
+
+void PSOutputDev::psXObject(Stream *psStream, Stream *level1Stream) {
+ Stream *str;
+ int c;
+
+ if ((level == psLevel1 || level == psLevel1Sep) && level1Stream) {
+ str = level1Stream;
+ } else {
+ str = psStream;
+ }
+ str->reset();
+ while ((c = str->getChar()) != EOF) {
+ writePSChar(c);
+ }
+ str->close();
+}
+
+//~ can nextFunc be reset to 0 -- maybe at the start of each page?
+//~ or maybe at the start of each color space / pattern?
+void PSOutputDev::cvtFunction(Function *func) {
+ SampledFunction *func0;
+ ExponentialFunction *func2;
+ StitchingFunction *func3;
+ PostScriptFunction *func4;
+ int thisFunc, m, n, nSamples, i, j, k;
+
+ switch (func->getType()) {
+
+ case -1: // identity
+ writePS("{}\n");
+ break;
+
+ case 0: // sampled
+ func0 = (SampledFunction *)func;
+ thisFunc = nextFunc++;
+ m = func0->getInputSize();
+ n = func0->getOutputSize();
+ nSamples = n;
+ for (i = 0; i < m; ++i) {
+ nSamples *= func0->getSampleSize(i);
+ }
+ writePSFmt("/xpdfSamples{0:d} [\n", thisFunc);
+ for (i = 0; i < nSamples; ++i) {
+ writePSFmt("{0:.4g}\n", func0->getSamples()[i]);
+ }
+ writePS("] def\n");
+ writePSFmt("{{ {0:d} array {1:d} array {2:d} 2 roll\n", 2*m, m, m+2);
+ // [e01] [efrac] x0 x1 ... xm-1
+ for (i = m-1; i >= 0; --i) {
+ // [e01] [efrac] x0 x1 ... xi
+ writePSFmt("{0:.4g} sub {1:.4g} mul {2:.4g} add\n",
+ func0->getDomainMin(i),
+ (func0->getEncodeMax(i) - func0->getEncodeMin(i)) /
+ (func0->getDomainMax(i) - func0->getDomainMin(i)),
+ func0->getEncodeMin(i));
+ // [e01] [efrac] x0 x1 ... xi-1 xi'
+ writePSFmt("dup 0 lt {{ pop 0 }} {{ dup {0:d} gt {{ pop {1:d} }} if }} ifelse\n",
+ func0->getSampleSize(i) - 1, func0->getSampleSize(i) - 1);
+ // [e01] [efrac] x0 x1 ... xi-1 xi'
+ writePS("dup floor cvi exch dup ceiling cvi exch 2 index sub\n");
+ // [e01] [efrac] x0 x1 ... xi-1 floor(xi') ceiling(xi') xi'-floor(xi')
+ writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+3, i);
+ // [e01] [efrac] x0 x1 ... xi-1 floor(xi') ceiling(xi')
+ writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+3, 2*i+1);
+ // [e01] [efrac] x0 x1 ... xi-1 floor(xi')
+ writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+2, 2*i);
+ // [e01] [efrac] x0 x1 ... xi-1
+ }
+ // [e01] [efrac]
+ for (i = 0; i < n; ++i) {
+ // [e01] [efrac] y(0) ... y(i-1)
+ for (j = 0; j < (1<<m); ++j) {
+ // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(j-1)
+ writePSFmt("xpdfSamples{0:d}\n", thisFunc);
+ k = m - 1;
+ writePSFmt("{0:d} index {1:d} get\n", i+j+2, 2 * k + ((j >> k) & 1));
+ for (k = m - 2; k >= 0; --k) {
+ writePSFmt("{0:d} mul {1:d} index {2:d} get add\n",
+ func0->getSampleSize(k),
+ i + j + 3,
+ 2 * k + ((j >> k) & 1));
+ }
+ if (n > 1) {
+ writePSFmt("{0:d} mul {1:d} add ", n, i);
+ }
+ writePS("get\n");
+ }
+ // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(2^m-1)
+ for (j = 0; j < m; ++j) {
+ // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(2^(m-j)-1)
+ for (k = 0; k < (1 << (m - j)); k += 2) {
+ // [e01] [efrac] y(0) ... y(i-1) <k/2 s' values> <2^(m-j)-k s values>
+ writePSFmt("{0:d} index {1:d} get dup\n",
+ i + k/2 + (1 << (m-j)) - k, j);
+ writePS("3 2 roll mul exch 1 exch sub 3 2 roll mul add\n");
+ writePSFmt("{0:d} 1 roll\n", k/2 + (1 << (m-j)) - k - 1);
+ }
+ // [e01] [efrac] s'(0) s'(1) ... s(2^(m-j-1)-1)
+ }
+ // [e01] [efrac] y(0) ... y(i-1) s
+ writePSFmt("{0:.4g} mul {1:.4g} add\n",
+ func0->getDecodeMax(i) - func0->getDecodeMin(i),
+ func0->getDecodeMin(i));
+ writePSFmt("dup {0:.4g} lt {{ pop {1:.4g} }} {{ dup {2:.4g} gt {{ pop {3:.4g} }} if }} ifelse\n",
+ func0->getRangeMin(i), func0->getRangeMin(i),
+ func0->getRangeMax(i), func0->getRangeMax(i));
+ // [e01] [efrac] y(0) ... y(i-1) y(i)
+ }
+ // [e01] [efrac] y(0) ... y(n-1)
+ writePSFmt("{0:d} {1:d} roll pop pop }}\n", n+2, n);
+ break;
+
+ case 2: // exponential
+ func2 = (ExponentialFunction *)func;
+ n = func2->getOutputSize();
+ writePSFmt("{{ dup {0:.4g} lt {{ pop {1:.4g} }} {{ dup {2:.4g} gt {{ pop {3:.4g} }} if }} ifelse\n",
+ func2->getDomainMin(0), func2->getDomainMin(0),
+ func2->getDomainMax(0), func2->getDomainMax(0));
+ // x
+ for (i = 0; i < n; ++i) {
+ // x y(0) .. y(i-1)
+ writePSFmt("{0:d} index {1:.4g} exp {2:.4g} mul {3:.4g} add\n",
+ i, func2->getE(), func2->getC1()[i] - func2->getC0()[i],
+ func2->getC0()[i]);
+ if (func2->getHasRange()) {
+ writePSFmt("dup {0:.4g} lt {{ pop {1:.4g} }} {{ dup {2:.4g} gt {{ pop {3:.4g} }} if }} ifelse\n",
+ func2->getRangeMin(i), func2->getRangeMin(i),
+ func2->getRangeMax(i), func2->getRangeMax(i));
+ }
+ }
+ // x y(0) .. y(n-1)
+ writePSFmt("{0:d} {1:d} roll pop }}\n", n+1, n);
+ break;
+
+ case 3: // stitching
+ func3 = (StitchingFunction *)func;
+ thisFunc = nextFunc++;
+ for (i = 0; i < func3->getNumFuncs(); ++i) {
+ cvtFunction(func3->getFunc(i));
+ writePSFmt("/xpdfFunc{0:d}_{1:d} exch def\n", thisFunc, i);
+ }
+ writePSFmt("{{ dup {0:.4g} lt {{ pop {1:.4g} }} {{ dup {2:.4g} gt {{ pop {3:.4g} }} if }} ifelse\n",
+ func3->getDomainMin(0), func3->getDomainMin(0),
+ func3->getDomainMax(0), func3->getDomainMax(0));
+ for (i = 0; i < func3->getNumFuncs() - 1; ++i) {
+ writePSFmt("dup {0:.4g} lt {{ {1:.4g} sub {2:.4g} mul {3:.4g} add xpdfFunc{4:d}_{5:d} }} {{\n",
+ func3->getBounds()[i+1],
+ func3->getBounds()[i],
+ func3->getScale()[i],
+ func3->getEncode()[2*i],
+ thisFunc, i);
+ }
+ writePSFmt("{0:.4g} sub {1:.4g} mul {2:.4g} add xpdfFunc{3:d}_{4:d}\n",
+ func3->getBounds()[i],
+ func3->getScale()[i],
+ func3->getEncode()[2*i],
+ thisFunc, i);
+ for (i = 0; i < func3->getNumFuncs() - 1; ++i) {
+ writePS("} ifelse\n");
+ }
+ writePS("}\n");
+ break;
+
+ case 4: // PostScript
+ func4 = (PostScriptFunction *)func;
+ writePS(func4->getCodeString()->getCString());
+ writePS("\n");
+ break;
+ }
+}
+
+void PSOutputDev::writePSChar(char c) {
+ if (t3String) {
+ t3String->append(c);
+ } else {
+ (*outputFunc)(outputStream, &c, 1);
+ }
+}
+
+void PSOutputDev::writePS(char *s) {
+ if (t3String) {
+ t3String->append(s);
+ } else {
+ (*outputFunc)(outputStream, s, strlen(s));
+ }
+}
+
+void PSOutputDev::writePSFmt(const char *fmt, ...) {
+ va_list args;
+ GooString *buf;
+
+ va_start(args, fmt);
+ if (t3String) {
+ t3String->appendfv((char *)fmt, args);
+ } else {
+ buf = GooString::formatv((char *)fmt, args);
+ (*outputFunc)(outputStream, buf->getCString(), buf->getLength());
+ delete buf;
+ }
+ va_end(args);
+}
+
+void PSOutputDev::writePSString(GooString *s) {
+ Guchar *p;
+ int n, line;
+ char buf[8];
+
+ writePSChar('(');
+ line = 1;
+ for (p = (Guchar *)s->getCString(), n = s->getLength(); n; ++p, --n) {
+ if (line >= 64) {
+ writePSChar('\\');
+ writePSChar('\n');
+ line = 0;
+ }
+ if (*p == '(' || *p == ')' || *p == '\\') {
+ writePSChar('\\');
+ writePSChar((char)*p);
+ line += 2;
+ } else if (*p < 0x20 || *p >= 0x80) {
+ sprintf(buf, "\\%03o", *p);
+ writePS(buf);
+ line += 4;
+ } else {
+ writePSChar((char)*p);
+ ++line;
+ }
+ }
+ writePSChar(')');
+}
+
+void PSOutputDev::writePSName(char *s) {
+ char *p;
+ char c;
+
+ p = s;
+ while ((c = *p++)) {
+ if (c <= (char)0x20 || c >= (char)0x7f ||
+ c == '(' || c == ')' || c == '<' || c == '>' ||
+ c == '[' || c == ']' || c == '{' || c == '}' ||
+ c == '/' || c == '%') {
+ writePSFmt("#{0:02x}", c & 0xff);
+ } else {
+ writePSChar(c);
+ }
+ }
+}
+
+// Convert GooString to GooString, with appropriate escaping
+// of things that can't appear in a label
+// This is heavily based on the writePSTextLine() method
+GooString* PSOutputDev::filterPSLabel(GooString *label, GBool *needParens) {
+ int i, step;
+ GBool isNumeric;
+
+ // - DSC comments must be printable ASCII; control chars and
+ // backslashes have to be escaped (we do cheap UCS2-to-ASCII
+ // conversion by simply ignoring the high byte)
+ // - parentheses are escaped. this isn't strictly necessary for matched
+ // parentheses, but shouldn't be a problem
+ // - lines are limited to 255 chars (we limit to 200 here to allow
+ // for the keyword, which was emitted by the caller)
+
+ GooString *label2 = new GooString();
+ int labelLength = label->getLength();
+
+ if (labelLength == 0) {
+ isNumeric = false;
+ } else {
+ // this gets changed later if we find a non-numeric character
+ isNumeric = true;
+ }
+
+ if ( (labelLength >= 2) &&
+ ( (label->getChar(0) & 0xff) == 0xfe) &&
+ ( (label->getChar(1) & 0xff) == 0xff) ) {
+ // UCS2 mode
+ i = 3;
+ step = 2;
+ if ( (label->getChar(labelLength-1) == 0) ) {
+ // prune the trailing null (0x000 for UCS2)
+ labelLength -= 2;
+ }
+ } else {
+ i = 0;
+ step = 1;
+ }
+ for (int j = 0; i < labelLength && j < 200; i += step) {
+ char c = label->getChar(i);
+ if ( (c < '0') || (c > '9') ) {
+ isNumeric = false;
+ }
+ if (c == '\\') {
+ label2->append("\\\\");
+ j += 2;
+ } else if (c == ')') {
+ label2->append("\\)");
+ } else if (c == '(') {
+ label2->append("\\(");
+ } else if (c < 0x20 || c > 0x7e) {
+ label2->append(GooString::format("\\{0:03o}", c));
+ j += 4;
+ } else {
+ label2->append(c);
+ ++j;
+ }
+ }
+ if (needParens) {
+ *needParens = !(isNumeric);
+ }
+ return label2;
+}
+
+// Write a DSC-compliant <textline>.
+void PSOutputDev::writePSTextLine(GooString *s) {
+ int i, j, step;
+ int c;
+
+ // - DSC comments must be printable ASCII; control chars and
+ // backslashes have to be escaped (we do cheap Unicode-to-ASCII
+ // conversion by simply ignoring the high byte)
+ // - lines are limited to 255 chars (we limit to 200 here to allow
+ // for the keyword, which was emitted by the caller)
+ // - lines that start with a left paren are treated as <text>
+ // instead of <textline>, so we escape a leading paren
+ if (s->getLength() >= 2 &&
+ (s->getChar(0) & 0xff) == 0xfe &&
+ (s->getChar(1) & 0xff) == 0xff) {
+ i = 3;
+ step = 2;
+ } else {
+ i = 0;
+ step = 1;
+ }
+ for (j = 0; i < s->getLength() && j < 200; i += step) {
+ c = s->getChar(i) & 0xff;
+ if (c == '\\') {
+ writePS("\\\\");
+ j += 2;
+ } else if (c < 0x20 || c > 0x7e || (j == 0 && c == '(')) {
+ writePSFmt("\\{0:03o}", c);
+ j += 4;
+ } else {
+ writePSChar(c);
+ ++j;
+ }
+ }
+ writePS("\n");
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.h
new file mode 100644
index 00000000000..38c838c0d57
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSOutputDev.h
@@ -0,0 +1,452 @@
+//========================================================================
+//
+// PSOutputDev.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007 Brad Hards <bradh@kde.org>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PSOUTPUTDEV_H
+#define PSOUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include <stddef.h>
+#include "Object.h"
+#include "GfxState.h"
+#include "GlobalParams.h"
+#include "OutputDev.h"
+
+class GfxPath;
+class GfxFont;
+class GfxColorSpace;
+class GfxSeparationColorSpace;
+class PDFRectangle;
+struct PSFont8Info;
+struct PSFont16Enc;
+class PSOutCustomColor;
+class Function;
+
+//------------------------------------------------------------------------
+// PSOutputDev
+//------------------------------------------------------------------------
+
+enum PSOutMode {
+ psModePS,
+ psModeEPS,
+ psModeForm,
+ psModePSOrigPageSizes
+};
+
+enum PSFileType {
+ psFile, // write to file
+ psPipe, // write to pipe
+ psStdout, // write to stdout
+ psGeneric // write to a generic stream
+};
+
+typedef void (*PSOutputFunc)(void *stream, char *data, int len);
+
+class PSOutputDev: public OutputDev {
+public:
+
+ // Open a PostScript output file, and write the prolog.
+ PSOutputDev(const char *fileName, XRef *xrefA, Catalog *catalog,
+ char *psTitle,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int paperWidthA = -1, int paperHeightA = -1,
+ GBool duplexA = gTrue,
+ int imgLLXA = 0, int imgLLYA = 0,
+ int imgURXA = 0, int imgURYA = 0,
+ GBool forceRasterizeA = gFalse,
+ GBool manualCtrlA = gFalse);
+
+ // Open a PSOutputDev that will write to a generic stream.
+ PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
+ char *psTitle,
+ XRef *xrefA, Catalog *catalog,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int paperWidthA = -1, int paperHeightA = -1,
+ GBool duplexA = gTrue,
+ int imgLLXA = 0, int imgLLYA = 0,
+ int imgURXA = 0, int imgURYA = 0,
+ GBool forceRasterizeA = gFalse,
+ GBool manualCtrlA = gFalse);
+
+ // Destructor -- writes the trailer and closes the file.
+ virtual ~PSOutputDev();
+
+ // Check if file was successfully created.
+ virtual GBool isOk() { return ok; }
+
+ //---- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gFalse; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gFalse; }
+
+ // Does this device use tilingPatternFill()? If this returns false,
+ // tiling pattern fills will be reduced to a series of other drawing
+ // operations.
+ virtual GBool useTilingPatternFill() { return gTrue; }
+
+ // Does this device use functionShadedFill(), axialShadedFill(), and
+ // radialShadedFill()? If this returns false, these shaded fills
+ // will be reduced to a series of other drawing operations.
+ virtual GBool useShadedFills()
+ { return level >= psLevel2; }
+
+ // Does this device use drawForm()? If this returns false,
+ // form-type XObjects will be interpreted (i.e., unrolled).
+ virtual GBool useDrawForm() { return preload; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // This device now supports text in pattern colorspace!
+ virtual GBool supportTextCSPattern(GfxState *state)
+ { return state->getFillColorSpace()->getMode() == csPattern; }
+
+ //----- header/trailer (used only if manualCtrl is true)
+
+ // Write the document-level header.
+ void writeHeader(int firstPage, int lastPage,
+ PDFRectangle *mediaBox, PDFRectangle *cropBox,
+ int pageRotate, char *pstitle);
+
+ // Write the Xpdf procset.
+ void writeXpdfProcset();
+
+ // Write the document-level setup.
+ void writeDocSetup(Catalog *catalog, int firstPage, int lastPage, GBool duplexA);
+
+ // Write the trailer for the current page.
+ void writePageTrailer();
+
+ // Write the document trailer.
+ void writeTrailer();
+
+ //----- initialization and control
+
+ // Check to see if a page slice should be displayed. If this
+ // returns false, the page display is aborted. Typically, an
+ // OutputDev will use some alternate means to display the page
+ // before returning false.
+ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL);
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState *state);
+ virtual void restoreState(GfxState *state);
+
+ //----- update graphics state
+ virtual void updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32);
+ virtual void updateLineDash(GfxState *state);
+ virtual void updateFlatness(GfxState *state);
+ virtual void updateLineJoin(GfxState *state);
+ virtual void updateLineCap(GfxState *state);
+ virtual void updateMiterLimit(GfxState *state);
+ virtual void updateLineWidth(GfxState *state);
+ virtual void updateFillColorSpace(GfxState *state);
+ virtual void updateStrokeColorSpace(GfxState *state);
+ virtual void updateFillColor(GfxState *state);
+ virtual void updateStrokeColor(GfxState *state);
+ virtual void updateFillOverprint(GfxState *state);
+ virtual void updateStrokeOverprint(GfxState *state);
+ virtual void updateTransfer(GfxState *state);
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+ virtual void updateTextMat(GfxState *state);
+ virtual void updateCharSpace(GfxState *state);
+ virtual void updateRender(GfxState *state);
+ virtual void updateRise(GfxState *state);
+ virtual void updateWordSpace(GfxState *state);
+ virtual void updateHorizScaling(GfxState *state);
+ virtual void updateTextPos(GfxState *state);
+ virtual void updateTextShift(GfxState *state, double shift);
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+ virtual GBool tilingPatternFill(GfxState *state, Object *str,
+ int paintType, Dict *resDict,
+ double *mat, double *bbox,
+ int x0, int y0, int x1, int y1,
+ double xStep, double yStep);
+ virtual GBool functionShadedFill(GfxState *state,
+ GfxFunctionShading *shading);
+ virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/);
+ virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/);
+
+ //----- path clipping
+ virtual void clip(GfxState *state);
+ virtual void eoClip(GfxState *state);
+ virtual void clipToStrokePath(GfxState *state);
+
+ //----- text drawing
+ virtual void drawString(GfxState *state, GooString *s);
+ virtual void beginTextObject(GfxState *state);
+ virtual GBool deviceHasTextClip(GfxState *state) { return haveTextClip && haveCSPattern; }
+ virtual void endTextObject(GfxState *state);
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+ // If current colorspace ist pattern,
+ // need this device special handling for masks in pattern colorspace?
+ // Default is false
+ virtual GBool fillMaskCSPattern(GfxState * state)
+ { return state->getFillColorSpace()->getMode() == csPattern && (level != psLevel1 && level != psLevel1Sep); }
+ virtual void endMaskClip(GfxState * /*state*/);
+
+#if OPI_SUPPORT
+ //----- OPI functions
+ virtual void opiBegin(GfxState *state, Dict *opiDict);
+ virtual void opiEnd(GfxState *state, Dict *opiDict);
+#endif
+
+ //----- Type 3 font operators
+ virtual void type3D0(GfxState *state, double wx, double wy);
+ virtual void type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury);
+
+ //----- form XObjects
+ virtual void drawForm(Ref ref);
+
+ //----- PostScript XObjects
+ virtual void psXObject(Stream *psStream, Stream *level1Stream);
+
+ //----- miscellaneous
+ void setOffset(double x, double y)
+ { tx0 = x; ty0 = y; }
+ void setScale(double x, double y)
+ { xScale0 = x; yScale0 = y; }
+ void setRotate(int rotateA)
+ { rotate0 = rotateA; }
+ void setClip(double llx, double lly, double urx, double ury)
+ { clipLLX0 = llx; clipLLY0 = lly; clipURX0 = urx; clipURY0 = ury; }
+ void setUnderlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
+ void *data)
+ { underlayCbk = cbk; underlayCbkData = data; }
+ void setOverlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
+ void *data)
+ { overlayCbk = cbk; overlayCbkData = data; }
+ void setDisplayText(GBool display) { displayText = display; }
+
+private:
+
+ void init(PSOutputFunc outputFuncA, void *outputStreamA,
+ PSFileType fileTypeA, char *pstitle, XRef *xrefA, Catalog *catalog,
+ int firstPage, int lastPage, PSOutMode modeA,
+ int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
+ GBool manualCtrlA, int paperWidthA, int paperHeightA,
+ GBool duplexA);
+ void setupResources(Dict *resDict);
+ void setupFonts(Dict *resDict);
+ void setupFont(GfxFont *font, Dict *parentResDict);
+ void setupEmbeddedType1Font(Ref *id, GooString *psName);
+ void setupExternalType1Font(GooString *fileName, GooString *psName);
+ void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName);
+ void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GooString *psName);
+ void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName);
+ GooString *setupExternalTrueTypeFont(GfxFont *font);
+ void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName);
+ void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName,
+ GBool needVerticalMetrics);
+ void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName);
+ GooString *setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex = 0);
+ void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict);
+ void setupImages(Dict *resDict);
+ void setupImage(Ref id, Stream *str);
+ void setupForms(Dict *resDict);
+ void setupForm(Ref id, Object *strObj);
+ void addProcessColor(double c, double m, double y, double k);
+ void addCustomColor(GfxSeparationColorSpace *sepCS);
+ void doPath(GfxPath *path);
+ void maskToClippingPath(Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert);
+ void doImageL1(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len);
+ void doImageL1Sep(GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len);
+ void doImageL2(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len,
+ int *maskColors, Stream *maskStr,
+ int maskWidth, int maskHeight, GBool maskInvert);
+ void doImageL3(Object *ref, GfxImageColorMap *colorMap,
+ GBool invert, GBool inlineImg,
+ Stream *str, int width, int height, int len,
+ int *maskColors, Stream *maskStr,
+ int maskWidth, int maskHeight, GBool maskInvert);
+ void dumpColorSpaceL2(GfxColorSpace *colorSpace,
+ GBool genXform, GBool updateColors,
+ GBool map01);
+#if OPI_SUPPORT
+ void opiBegin20(GfxState *state, Dict *dict);
+ void opiBegin13(GfxState *state, Dict *dict);
+ void opiTransform(GfxState *state, double x0, double y0,
+ double *x1, double *y1);
+#endif
+ void cvtFunction(Function *func);
+ void writePSChar(char c);
+ void writePS(char *s);
+ void writePSFmt(const char *fmt, ...);
+ void writePSString(GooString *s);
+ void writePSName(char *s);
+ GooString *filterPSLabel(GooString *label, GBool *needParens=0);
+ void writePSTextLine(GooString *s);
+
+ PSLevel level; // PostScript level (1, 2, separation)
+ PSOutMode mode; // PostScript mode (PS, EPS, form)
+ int paperWidth; // width of paper, in pts
+ int paperHeight; // height of paper, in pts
+ int prevWidth; // width of previous page
+ // (only psModePSOrigPageSizes output mode)
+ int prevHeight; // height of previous page
+ // (only psModePSOrigPageSizes output mode)
+ int imgLLX, imgLLY, // imageable area, in pts
+ imgURX, imgURY;
+ GBool substFonts; // substitute missing fonts
+ GBool preload; // load all images into memory, and
+ // predefine forms
+
+ PSOutputFunc outputFunc;
+ void *outputStream;
+ PSFileType fileType; // file / pipe / stdout
+ GBool manualCtrl;
+ int seqPage; // current sequential page number
+ void (*underlayCbk)(PSOutputDev *psOut, void *data);
+ void *underlayCbkData;
+ void (*overlayCbk)(PSOutputDev *psOut, void *data);
+ void *overlayCbkData;
+
+ XRef *xref; // the xref table for this PDF file
+ Catalog *m_catalog; // the catalog for this PDF file
+
+ Ref *fontIDs; // list of object IDs of all used fonts
+ int fontIDLen; // number of entries in fontIDs array
+ int fontIDSize; // size of fontIDs array
+ Ref *fontFileIDs; // list of object IDs of all embedded fonts
+ int fontFileIDLen; // number of entries in fontFileIDs array
+ int fontFileIDSize; // size of fontFileIDs array
+ GooString **fontFileNames; // list of names of all embedded external fonts
+ GooString **psFileNames; // list of names of all embedded external fonts
+ int fontFileNameLen; // number of entries in fontFileNames array
+ int fontFileNameSize; // size of fontFileNames array
+ int nextTrueTypeNum; // next unique number to append to a TrueType
+ // font name
+ PSFont8Info *font8Info; // info for 8-bit fonts
+ int font8InfoLen; // number of entries in font8Info array
+ int font8InfoSize; // size of font8Info array
+ PSFont16Enc *font16Enc; // encodings for substitute 16-bit fonts
+ int font16EncLen; // number of entries in font16Enc array
+ int font16EncSize; // size of font16Enc array
+ Ref *imgIDs; // list of image IDs for in-memory images
+ int imgIDLen; // number of entries in imgIDs array
+ int imgIDSize; // size of imgIDs array
+ Ref *formIDs; // list of IDs for predefined forms
+ int formIDLen; // number of entries in formIDs array
+ int formIDSize; // size of formIDs array
+ GooList *xobjStack; // stack of XObject dicts currently being
+ // processed
+ int numSaves; // current number of gsaves
+ int numTilingPatterns; // current number of nested tiling patterns
+ int nextFunc; // next unique number to use for a function
+
+ double tx0, ty0; // global translation
+ double xScale0, yScale0; // global scaling
+ int rotate0; // rotation angle (0, 90, 180, 270)
+ double clipLLX0, clipLLY0,
+ clipURX0, clipURY0;
+ double tx, ty; // global translation for current page
+ double xScale, yScale; // global scaling for current page
+ int rotate; // rotation angle for current page
+ double epsX1, epsY1, // EPS bounding box (unrotated)
+ epsX2, epsY2;
+
+ GooString *embFontList; // resource comments for embedded fonts
+
+ int processColors; // used process colors
+ PSOutCustomColor // used custom colors
+ *customColors;
+
+ GBool haveTextClip; // set if text has been drawn with a
+ // clipping render mode
+ GBool haveCSPattern; // set if text has been drawn with a
+ // clipping render mode because of pattern colorspace
+ int savedRender; // use if pattern colorspace
+
+ GBool inType3Char; // inside a Type 3 CharProc
+ GooString *t3String; // Type 3 content string
+ double t3WX, t3WY, // Type 3 character parameters
+ t3LLX, t3LLY, t3URX, t3URY;
+ GBool t3Cacheable; // cleared if char is not cacheable
+ GBool t3NeedsRestore; // set if a 'q' operator was issued
+ GBool forceRasterize; // forces the page to be rasterized into a image before printing
+ GBool displayText; // displayText
+
+#if OPI_SUPPORT
+ int opi13Nest; // nesting level of OPI 1.3 objects
+ int opi20Nest; // nesting level of OPI 2.0 objects
+#endif
+
+ GBool ok; // set up ok?
+
+
+ friend class WinPDFPrinter;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.cc
new file mode 100644
index 00000000000..05127f0d03c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.cc
@@ -0,0 +1,159 @@
+//========================================================================
+//
+// PSTokenizer.cc
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "PSTokenizer.h"
+
+//------------------------------------------------------------------------
+
+// A '1' in this array means the character is white space. A '1' or
+// '2' means the character ends a name or command.
+static const char specialChars[256] = {
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
+ 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
+};
+
+//------------------------------------------------------------------------
+
+PSTokenizer::PSTokenizer(int (*getCharFuncA)(void *), void *dataA) {
+ getCharFunc = getCharFuncA;
+ data = dataA;
+ charBuf = -1;
+}
+
+PSTokenizer::~PSTokenizer() {
+}
+
+GBool PSTokenizer::getToken(char *buf, int size, int *length) {
+ GBool comment, backslash;
+ int c;
+ int i;
+
+ // skip leading whitespace and comments
+ comment = gFalse;
+ while (1) {
+ if ((c = getChar()) == EOF) {
+ buf[0] = '\0';
+ *length = 0;
+ return gFalse;
+ }
+ if (comment) {
+ if (c == '\x0a' || c == '\x0d') {
+ comment = gFalse;
+ }
+ } else if (c == '%') {
+ comment = gTrue;
+ } else if (specialChars[c] != 1) {
+ break;
+ }
+ }
+
+ // Reserve room for terminating '\0'
+ size--;
+
+ // read a token
+ i = 0;
+ buf[i++] = c;
+ if (c == '(') {
+ backslash = gFalse;
+ while ((c = lookChar()) != EOF) {
+ consumeChar();
+ if (i < size) {
+ buf[i++] = c;
+ }
+ if (c == '\\') {
+ backslash = gTrue;
+ } else if (!backslash && c == ')') {
+ break;
+ } else {
+ backslash = gFalse;
+ }
+ }
+ } else if (c == '<') {
+ while ((c = lookChar()) != EOF) {
+ consumeChar();
+ if (i < size && specialChars[c] != 1) {
+ buf[i++] = c;
+ }
+ if (c == '>') {
+ break;
+ }
+ }
+ } else if (c != '[' && c != ']') {
+ while ((c = lookChar()) != EOF && !specialChars[c]) {
+ consumeChar();
+ if (i < size) {
+ buf[i++] = c;
+ }
+ }
+ }
+ // Zero terminate token string
+ buf[i] = '\0';
+ // Return length of token
+ *length = i;
+
+ return gTrue;
+}
+
+int PSTokenizer::lookChar() {
+ if (charBuf < 0) {
+ charBuf = (*getCharFunc)(data);
+ }
+ return charBuf;
+}
+
+void PSTokenizer::consumeChar() {
+ charBuf = -1;
+}
+
+int PSTokenizer::getChar() {
+ int c = charBuf;
+
+ if (c < 0) {
+ c = (*getCharFunc)(data);
+ } else {
+ charBuf = -1;
+ }
+ return c;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.h
new file mode 100644
index 00000000000..fc2f053d3f2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PSTokenizer.h
@@ -0,0 +1,54 @@
+//========================================================================
+//
+// PSTokenizer.h
+//
+// Copyright 2002-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PSTOKENIZER_H
+#define PSTOKENIZER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+
+class PSTokenizer {
+public:
+
+ PSTokenizer(int (*getCharFuncA)(void *), void *dataA);
+ ~PSTokenizer();
+
+ // Get the next PostScript token. Returns false at end-of-stream.
+ GBool getToken(char *buf, int size, int *length);
+
+private:
+
+ int lookChar();
+ void consumeChar();
+ int getChar();
+
+ int (*getCharFunc)(void *);
+ void *data;
+ int charBuf;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.cc
new file mode 100644
index 00000000000..e63975d9cc0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.cc
@@ -0,0 +1,706 @@
+//========================================================================
+//
+// Page.cc
+//
+// Copyright 1996-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006-2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2006 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+// Copyright (C) 2006-2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Iñigo Martínez <inigomartinez@gmail.com>
+// Copyright (C) 2008 Brad Hards <bradh@kde.org>
+// Copyright (C) 2008 Ilya Gorenbein <igorenbein@finjan.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include <limits.h>
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Link.h"
+#include "OutputDev.h"
+#include "Gfx.h"
+#include "GfxState.h"
+#include "Annot.h"
+#include "TextOutputDev.h"
+#include "Form.h"
+#include "Error.h"
+#include "Page.h"
+#include "Catalog.h"
+#include "Form.h"
+
+//------------------------------------------------------------------------
+// PDFRectangle
+//------------------------------------------------------------------------
+
+void PDFRectangle::clipTo(PDFRectangle *rect) {
+ if (x1 < rect->x1) {
+ x1 = rect->x1;
+ } else if (x1 > rect->x2) {
+ x1 = rect->x2;
+ }
+ if (x2 < rect->x1) {
+ x2 = rect->x1;
+ } else if (x2 > rect->x2) {
+ x2 = rect->x2;
+ }
+ if (y1 < rect->y1) {
+ y1 = rect->y1;
+ } else if (y1 > rect->y2) {
+ y1 = rect->y2;
+ }
+ if (y2 < rect->y1) {
+ y2 = rect->y1;
+ } else if (y2 > rect->y2) {
+ y2 = rect->y2;
+ }
+}
+
+//------------------------------------------------------------------------
+// PageAttrs
+//------------------------------------------------------------------------
+
+PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
+ Object obj1;
+ PDFRectangle mBox;
+
+ // get old/default values
+ if (attrs) {
+ mediaBox = attrs->mediaBox;
+ cropBox = attrs->cropBox;
+ haveCropBox = attrs->haveCropBox;
+ rotate = attrs->rotate;
+ attrs->resources.copy(&resources);
+ } else {
+ // set default MediaBox to 8.5" x 11" -- this shouldn't be necessary
+ // but some (non-compliant) PDF files don't specify a MediaBox
+ mediaBox.x1 = 0;
+ mediaBox.y1 = 0;
+ mediaBox.x2 = 612;
+ mediaBox.y2 = 792;
+ cropBox.x1 = cropBox.y1 = cropBox.x2 = cropBox.y2 = 0;
+ haveCropBox = gFalse;
+ rotate = 0;
+ resources.initNull();
+ }
+
+ // media box
+ if (readBox(dict, "MediaBox", &mBox)) {
+ mediaBox = mBox;
+ }
+
+ // crop box
+ if (readBox(dict, "CropBox", &cropBox)) {
+ haveCropBox = gTrue;
+ }
+ if (!haveCropBox) {
+ cropBox = mediaBox;
+ }
+ else
+ {
+ // cropBox can not be bigger than mediaBox
+ if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1)
+ {
+ cropBox.x1 = mediaBox.x1;
+ cropBox.x2 = mediaBox.x2;
+ }
+ if (cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
+ {
+ cropBox.y1 = mediaBox.y1;
+ cropBox.y2 = mediaBox.y2;
+ }
+ }
+
+ // other boxes
+ bleedBox = cropBox;
+ readBox(dict, "BleedBox", &bleedBox);
+ trimBox = cropBox;
+ readBox(dict, "TrimBox", &trimBox);
+ artBox = cropBox;
+ readBox(dict, "ArtBox", &artBox);
+
+ // clip all other boxes to the media box
+ cropBox.clipTo(&mediaBox);
+ bleedBox.clipTo(&mediaBox);
+ trimBox.clipTo(&mediaBox);
+ artBox.clipTo(&mediaBox);
+
+ // rotate
+ dict->lookup("Rotate", &obj1);
+ if (obj1.isInt()) {
+ rotate = obj1.getInt();
+ }
+ obj1.free();
+ while (rotate < 0) {
+ rotate += 360;
+ }
+ while (rotate >= 360) {
+ rotate -= 360;
+ }
+
+ // misc attributes
+ dict->lookup("LastModified", &lastModified);
+ dict->lookup("BoxColorInfo", &boxColorInfo);
+ dict->lookup("Group", &group);
+ dict->lookup("Metadata", &metadata);
+ dict->lookup("PieceInfo", &pieceInfo);
+ dict->lookup("SeparationInfo", &separationInfo);
+
+ // resource dictionary
+ dict->lookup("Resources", &obj1);
+ if (obj1.isDict()) {
+ resources.free();
+ obj1.copy(&resources);
+ }
+ obj1.free();
+}
+
+PageAttrs::~PageAttrs() {
+ lastModified.free();
+ boxColorInfo.free();
+ group.free();
+ metadata.free();
+ pieceInfo.free();
+ separationInfo.free();
+ resources.free();
+}
+
+GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) {
+ PDFRectangle tmp;
+ double t;
+ Object obj1, obj2;
+ GBool ok;
+
+ dict->lookup(key, &obj1);
+ if (obj1.isArray() && obj1.arrayGetLength() == 4) {
+ ok = gTrue;
+ obj1.arrayGet(0, &obj2);
+ if (obj2.isNum()) {
+ tmp.x1 = obj2.getNum();
+ } else {
+ ok = gFalse;
+ }
+ obj2.free();
+ obj1.arrayGet(1, &obj2);
+ if (obj2.isNum()) {
+ tmp.y1 = obj2.getNum();
+ } else {
+ ok = gFalse;
+ }
+ obj2.free();
+ obj1.arrayGet(2, &obj2);
+ if (obj2.isNum()) {
+ tmp.x2 = obj2.getNum();
+ } else {
+ ok = gFalse;
+ }
+ obj2.free();
+ obj1.arrayGet(3, &obj2);
+ if (obj2.isNum()) {
+ tmp.y2 = obj2.getNum();
+ } else {
+ ok = gFalse;
+ }
+ obj2.free();
+ if (tmp.x1 == 0 && tmp.x2 == 0 && tmp.y1 == 0 && tmp.y2 == 0)
+ ok = gFalse;
+ if (ok) {
+ if (tmp.x1 > tmp.x2) {
+ t = tmp.x1; tmp.x1 = tmp.x2; tmp.x2 = t;
+ }
+ if (tmp.y1 > tmp.y2) {
+ t = tmp.y1; tmp.y1 = tmp.y2; tmp.y2 = t;
+ }
+ *box = tmp;
+ }
+ } else {
+ ok = gFalse;
+ }
+ obj1.free();
+ return ok;
+}
+
+//------------------------------------------------------------------------
+// Page
+//------------------------------------------------------------------------
+
+Page::Page(XRef *xrefA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form) {
+ Object tmp;
+
+ ok = gTrue;
+ xref = xrefA;
+ num = numA;
+ duration = -1;
+ pageWidgets = NULL;
+
+ pageObj.initDict(pageDict);
+ pageRef = pageRefA;
+
+ // get attributes
+ attrs = attrsA;
+
+ // transtion
+ pageDict->lookupNF("Trans", &trans);
+ if (!(trans.isRef() || trans.isDict() || trans.isNull())) {
+ error(-1, "Page transition object (page %d) is wrong type (%s)",
+ num, trans.getTypeName());
+ trans.free();
+ }
+
+ // duration
+ pageDict->lookupNF("Dur", &tmp);
+ if (!(tmp.isNum() || tmp.isNull())) {
+ error(-1, "Page duration object (page %d) is wrong type (%s)",
+ num, tmp.getTypeName());
+ } else if (tmp.isNum()) {
+ duration = tmp.getNum();
+ }
+ tmp.free();
+
+ // annotations
+ pageDict->lookupNF("Annots", &annots);
+ if (!(annots.isRef() || annots.isArray() || annots.isNull())) {
+ error(-1, "Page annotations object (page %d) is wrong type (%s)",
+ num, annots.getTypeName());
+ annots.free();
+ goto err2;
+ }
+
+ // forms
+ pageWidgets = new FormPageWidgets(xrefA, this->getAnnots(&tmp),num,form);
+ tmp.free();
+
+ // contents
+ pageDict->lookupNF("Contents", &contents);
+ if (!(contents.isRef() || contents.isArray() ||
+ contents.isNull())) {
+ error(-1, "Page contents object (page %d) is wrong type (%s)",
+ num, contents.getTypeName());
+ contents.free();
+ goto err1;
+ }
+
+ // thumb
+ pageDict->lookupNF("Thumb", &thumb);
+ if (!(thumb.isStream() || thumb.isNull() || thumb.isRef())) {
+ error(-1, "Page thumb object (page %d) is wrong type (%s)",
+ num, thumb.getTypeName());
+ thumb.initNull();
+ }
+
+ // actions
+ pageDict->lookupNF("AA", &actions);
+ if (!(actions.isDict() || actions.isNull())) {
+ error(-1, "Page additional action object (page %d) is wrong type (%s)",
+ num, actions.getTypeName());
+ actions.initNull();
+ }
+
+ return;
+
+ trans.initNull();
+ err2:
+ annots.initNull();
+ err1:
+ contents.initNull();
+ ok = gFalse;
+}
+
+Page::~Page() {
+ delete pageWidgets;
+ delete attrs;
+ pageObj.free();
+ annots.free();
+ contents.free();
+ trans.free();
+ thumb.free();
+ actions.free();
+}
+
+Annots *Page::getAnnots(Catalog *catalog) {
+ Annots *annots;
+ Object obj;
+
+ annots = new Annots(xref, catalog, getAnnots(&obj));
+ obj.free();
+ return annots;
+}
+
+void Page::addAnnot(Annot *annot) {
+ Object obj1;
+ Object tmp;
+ Ref annotRef = annot->getRef ();
+
+ if (annots.isNull()) {
+ Ref annotsRef;
+ // page doesn't have annots array,
+ // we have to create it
+
+ obj1.initArray(xref);
+ obj1.arrayAdd(tmp.initRef (annotRef.num, annotRef.gen));
+ tmp.free();
+
+ annotsRef = xref->addIndirectObject (&obj1);
+ annots.initRef(annotsRef.num, annotsRef.gen);
+ pageObj.dictSet ("Annots", &annots);
+ xref->setModifiedObject (&pageObj, pageRef);
+ } else {
+ getAnnots(&obj1);
+ if (obj1.isArray()) {
+ obj1.arrayAdd (tmp.initRef (annotRef.num, annotRef.gen));
+ xref->setModifiedObject (&obj1, annots.getRef());
+ }
+ obj1.free();
+ }
+}
+
+Links *Page::getLinks(Catalog *catalog) {
+ Links *links;
+ Object obj;
+
+ links = new Links(getAnnots(&obj), catalog->getBaseURI());
+ obj.free();
+ return links;
+}
+
+void Page::display(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ displaySlice(out, hDPI, vDPI, rotate, useMediaBox, crop, -1, -1, -1, -1, printing, catalog,
+ abortCheckCbk, abortCheckCbkData,
+ annotDisplayDecideCbk, annotDisplayDecideCbkData);
+}
+
+Gfx *Page::createGfx(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ PDFRectangle *mediaBox, *cropBox;
+ PDFRectangle box;
+ Gfx *gfx;
+
+ rotate += getRotate();
+ if (rotate >= 360) {
+ rotate -= 360;
+ } else if (rotate < 0) {
+ rotate += 360;
+ }
+
+ makeBox(hDPI, vDPI, rotate, useMediaBox, out->upsideDown(),
+ sliceX, sliceY, sliceW, sliceH, &box, &crop);
+ cropBox = getCropBox();
+ mediaBox = getMediaBox();
+
+ if (globalParams->getPrintCommands()) {
+ printf("***** MediaBox = ll:%g,%g ur:%g,%g\n",
+ mediaBox->x1, mediaBox->y1, mediaBox->x2, mediaBox->y2);
+ printf("***** CropBox = ll:%g,%g ur:%g,%g\n",
+ cropBox->x1, cropBox->y1, cropBox->x2, cropBox->y2);
+ printf("***** Rotate = %d\n", attrs->getRotate());
+ }
+
+ gfx = new Gfx(xref, out, num, attrs->getResourceDict(), catalog,
+ hDPI, vDPI, &box, crop ? cropBox : (PDFRectangle *)NULL,
+ rotate, abortCheckCbk, abortCheckCbkData);
+
+ return gfx;
+}
+
+void Page::displaySlice(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData) {
+ Gfx *gfx;
+ Object obj;
+ Annots *annotList;
+ int i;
+
+ if (!out->checkPageSlice(this, hDPI, vDPI, rotate, useMediaBox, crop,
+ sliceX, sliceY, sliceW, sliceH,
+ printing, catalog,
+ abortCheckCbk, abortCheckCbkData)) {
+ return;
+ }
+
+ gfx = createGfx(out, hDPI, vDPI, rotate, useMediaBox, crop,
+ sliceX, sliceY, sliceW, sliceH,
+ printing, catalog,
+ abortCheckCbk, abortCheckCbkData,
+ annotDisplayDecideCbk, annotDisplayDecideCbkData);
+
+ contents.fetch(xref, &obj);
+ if (!obj.isNull()) {
+ gfx->saveState();
+ gfx->display(&obj);
+ gfx->restoreState();
+ }
+ obj.free();
+
+ // draw annotations
+ annotList = new Annots(xref, catalog, getAnnots(&obj));
+ obj.free();
+
+ if (annotList->getNumAnnots() > 0) {
+ if (globalParams->getPrintCommands()) {
+ printf("***** Annotations\n");
+ }
+ for (i = 0; i < annotList->getNumAnnots(); ++i) {
+ Annot *annot = annotList->getAnnot(i);
+ if ((annotDisplayDecideCbk &&
+ (*annotDisplayDecideCbk)(annot, annotDisplayDecideCbkData)) ||
+ !annotDisplayDecideCbk) {
+ annotList->getAnnot(i)->draw(gfx, printing);
+ }
+ }
+ out->dump();
+ }
+ delete annotList;
+
+ delete gfx;
+}
+
+void Page::display(Gfx *gfx) {
+ Object obj;
+
+ contents.fetch(xref, &obj);
+ if (!obj.isNull()) {
+ gfx->saveState();
+ gfx->display(&obj);
+ gfx->restoreState();
+ }
+ obj.free();
+}
+
+GBool Page::loadThumb(unsigned char **data_out,
+ int *width_out, int *height_out,
+ int *rowstride_out)
+{
+ unsigned int pixbufdatasize;
+ int width, height, bits;
+ Object obj1, fetched_thumb;
+ Dict *dict;
+ GfxColorSpace *colorSpace;
+ GBool success = gFalse;
+ Stream *str;
+ GfxImageColorMap *colorMap;
+
+ /* Get stream dict */
+ thumb.fetch(xref, &fetched_thumb);
+ if (!fetched_thumb.isStream()) {
+ fetched_thumb.free();
+ return gFalse;
+ }
+
+ dict = fetched_thumb.streamGetDict();
+ str = fetched_thumb.getStream();
+
+ if (!dict->lookupInt("Width", "W", &width))
+ goto fail1;
+ if (!dict->lookupInt("Height", "H", &height))
+ goto fail1;
+ if (!dict->lookupInt("BitsPerComponent", "BPC", &bits))
+ goto fail1;
+
+ /* Check for invalid dimensions and integer overflow. */
+ if (width <= 0 || height <= 0)
+ goto fail1;
+ if (width > INT_MAX / 3 / height)
+ goto fail1;
+ pixbufdatasize = width * height * 3;
+
+ /* Get color space */
+ dict->lookup ("ColorSpace", &obj1);
+ if (obj1.isNull ()) {
+ obj1.free ();
+ dict->lookup ("CS", &obj1);
+ }
+ colorSpace = GfxColorSpace::parse(&obj1, NULL);
+ obj1.free();
+ if (!colorSpace) {
+ fprintf (stderr, "Error: Cannot parse color space\n");
+ goto fail1;
+ }
+
+ dict->lookup("Decode", &obj1);
+ if (obj1.isNull()) {
+ obj1.free();
+ dict->lookup("D", &obj1);
+ }
+ colorMap = new GfxImageColorMap(bits, &obj1, colorSpace);
+ obj1.free();
+ if (!colorMap->isOk()) {
+ fprintf (stderr, "Error: invalid colormap\n");
+ delete colorMap;
+ goto fail1;
+ }
+
+ if (data_out) {
+ unsigned char *pixbufdata = (unsigned char *) gmalloc(pixbufdatasize);
+ unsigned char *p = pixbufdata;
+ ImageStream *imgstr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgstr->reset();
+ for (int row = 0; row < height; ++row) {
+ for (int col = 0; col < width; ++col) {
+ Guchar pix[gfxColorMaxComps];
+ GfxRGB rgb;
+
+ imgstr->getPixel(pix);
+ colorMap->getRGB(pix, &rgb);
+
+ *p++ = colToByte(rgb.r);
+ *p++ = colToByte(rgb.g);
+ *p++ = colToByte(rgb.b);
+ }
+ }
+ *data_out = pixbufdata;
+ imgstr->close();
+ delete imgstr;
+ }
+
+ success = gTrue;
+
+ if (width_out)
+ *width_out = width;
+ if (height_out)
+ *height_out = height;
+ if (rowstride_out)
+ *rowstride_out = width * 3;
+
+ delete colorMap;
+ fail1:
+ fetched_thumb.free();
+
+ return success;
+}
+
+void Page::makeBox(double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool upsideDown,
+ double sliceX, double sliceY, double sliceW, double sliceH,
+ PDFRectangle *box, GBool *crop) {
+ PDFRectangle *mediaBox, *cropBox, *baseBox;
+ double kx, ky;
+
+ mediaBox = getMediaBox();
+ cropBox = getCropBox();
+ if (sliceW >= 0 && sliceH >= 0) {
+ baseBox = useMediaBox ? mediaBox : cropBox;
+ kx = 72.0 / hDPI;
+ ky = 72.0 / vDPI;
+ if (rotate == 90) {
+ if (upsideDown) {
+ box->x1 = baseBox->x1 + ky * sliceY;
+ box->x2 = baseBox->x1 + ky * (sliceY + sliceH);
+ } else {
+ box->x1 = baseBox->x2 - ky * (sliceY + sliceH);
+ box->x2 = baseBox->x2 - ky * sliceY;
+ }
+ box->y1 = baseBox->y1 + kx * sliceX;
+ box->y2 = baseBox->y1 + kx * (sliceX + sliceW);
+ } else if (rotate == 180) {
+ box->x1 = baseBox->x2 - kx * (sliceX + sliceW);
+ box->x2 = baseBox->x2 - kx * sliceX;
+ if (upsideDown) {
+ box->y1 = baseBox->y1 + ky * sliceY;
+ box->y2 = baseBox->y1 + ky * (sliceY + sliceH);
+ } else {
+ box->y1 = baseBox->y2 - ky * (sliceY + sliceH);
+ box->y2 = baseBox->y2 - ky * sliceY;
+ }
+ } else if (rotate == 270) {
+ if (upsideDown) {
+ box->x1 = baseBox->x2 - ky * (sliceY + sliceH);
+ box->x2 = baseBox->x2 - ky * sliceY;
+ } else {
+ box->x1 = baseBox->x1 + ky * sliceY;
+ box->x2 = baseBox->x1 + ky * (sliceY + sliceH);
+ }
+ box->y1 = baseBox->y2 - kx * (sliceX + sliceW);
+ box->y2 = baseBox->y2 - kx * sliceX;
+ } else {
+ box->x1 = baseBox->x1 + kx * sliceX;
+ box->x2 = baseBox->x1 + kx * (sliceX + sliceW);
+ if (upsideDown) {
+ box->y1 = baseBox->y2 - ky * (sliceY + sliceH);
+ box->y2 = baseBox->y2 - ky * sliceY;
+ } else {
+ box->y1 = baseBox->y1 + ky * sliceY;
+ box->y2 = baseBox->y1 + ky * (sliceY + sliceH);
+ }
+ }
+ } else if (useMediaBox) {
+ *box = *mediaBox;
+ } else {
+ *box = *cropBox;
+ *crop = gFalse;
+ }
+}
+
+void Page::processLinks(OutputDev *out, Catalog *catalog) {
+ Links *links;
+ int i;
+
+ links = getLinks(catalog);
+ for (i = 0; i < links->getNumLinks(); ++i) {
+ out->processLink(links->getLink(i), catalog);
+ }
+ delete links;
+}
+
+void Page::getDefaultCTM(double *ctm, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool upsideDown) {
+ GfxState *state;
+ int i;
+ rotate += getRotate();
+ if (rotate >= 360) {
+ rotate -= 360;
+ } else if (rotate < 0) {
+ rotate += 360;
+ }
+ state = new GfxState(hDPI, vDPI,
+ useMediaBox ? getMediaBox() : getCropBox(),
+ rotate, upsideDown);
+ for (i = 0; i < 6; ++i) {
+ ctm[i] = state->getCTM()[i];
+ }
+ delete state;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.h
new file mode 100644
index 00000000000..9d892b17597
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Page.h
@@ -0,0 +1,254 @@
+//========================================================================
+//
+// Page.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006 Pino Toscano <pino@kde.org>
+// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2008 Iñigo Martínez <inigomartinez@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PAGE_H
+#define PAGE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+
+class Dict;
+class XRef;
+class OutputDev;
+class Links;
+class Catalog;
+class Annots;
+class Annot;
+class Gfx;
+class FormPageWidgets;
+class Form;
+
+//------------------------------------------------------------------------
+
+class PDFRectangle {
+public:
+ double x1, y1, x2, y2;
+
+ PDFRectangle() { x1 = y1 = x2 = y2 = 0; }
+ PDFRectangle(double x1A, double y1A, double x2A, double y2A)
+ { x1 = x1A; y1 = y1A; x2 = x2A; y2 = y2A; }
+ GBool isValid() { return x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0; }
+ void clipTo(PDFRectangle *rect);
+};
+
+//------------------------------------------------------------------------
+// PageAttrs
+//------------------------------------------------------------------------
+
+class PageAttrs {
+public:
+
+ // Construct a new PageAttrs object by merging a dictionary
+ // (of type Pages or Page) into another PageAttrs object. If
+ // <attrs> is NULL, uses defaults.
+ PageAttrs(PageAttrs *attrs, Dict *dict);
+
+ // Destructor.
+ ~PageAttrs();
+
+ // Accessors.
+ PDFRectangle *getMediaBox() { return &mediaBox; }
+ PDFRectangle *getCropBox() { return &cropBox; }
+ GBool isCropped() { return haveCropBox; }
+ PDFRectangle *getBleedBox() { return &bleedBox; }
+ PDFRectangle *getTrimBox() { return &trimBox; }
+ PDFRectangle *getArtBox() { return &artBox; }
+ int getRotate() { return rotate; }
+ GooString *getLastModified()
+ { return lastModified.isString()
+ ? lastModified.getString() : (GooString *)NULL; }
+ Dict *getBoxColorInfo()
+ { return boxColorInfo.isDict() ? boxColorInfo.getDict() : (Dict *)NULL; }
+ Dict *getGroup()
+ { return group.isDict() ? group.getDict() : (Dict *)NULL; }
+ Stream *getMetadata()
+ { return metadata.isStream() ? metadata.getStream() : (Stream *)NULL; }
+ Dict *getPieceInfo()
+ { return pieceInfo.isDict() ? pieceInfo.getDict() : (Dict *)NULL; }
+ Dict *getSeparationInfo()
+ { return separationInfo.isDict()
+ ? separationInfo.getDict() : (Dict *)NULL; }
+ Dict *getResourceDict()
+ { return resources.isDict() ? resources.getDict() : (Dict *)NULL; }
+
+private:
+
+ GBool readBox(Dict *dict, char *key, PDFRectangle *box);
+
+ PDFRectangle mediaBox;
+ PDFRectangle cropBox;
+ GBool haveCropBox;
+ PDFRectangle bleedBox;
+ PDFRectangle trimBox;
+ PDFRectangle artBox;
+ int rotate;
+ Object lastModified;
+ Object boxColorInfo;
+ Object group;
+ Object metadata;
+ Object pieceInfo;
+ Object separationInfo;
+ Object resources;
+};
+
+//------------------------------------------------------------------------
+// Page
+//------------------------------------------------------------------------
+
+class Page {
+public:
+
+ // Constructor.
+ Page(XRef *xrefA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form);
+
+ // Destructor.
+ ~Page();
+
+ // Is page valid?
+ GBool isOk() { return ok; }
+
+ // Get page parameters.
+ int getNum() { return num; }
+ PDFRectangle *getMediaBox() { return attrs->getMediaBox(); }
+ PDFRectangle *getCropBox() { return attrs->getCropBox(); }
+ GBool isCropped() { return attrs->isCropped(); }
+ double getMediaWidth()
+ { return attrs->getMediaBox()->x2 - attrs->getMediaBox()->x1; }
+ double getMediaHeight()
+ { return attrs->getMediaBox()->y2 - attrs->getMediaBox()->y1; }
+ double getCropWidth()
+ { return attrs->getCropBox()->x2 - attrs->getCropBox()->x1; }
+ double getCropHeight()
+ { return attrs->getCropBox()->y2 - attrs->getCropBox()->y1; }
+ PDFRectangle *getBleedBox() { return attrs->getBleedBox(); }
+ PDFRectangle *getTrimBox() { return attrs->getTrimBox(); }
+ PDFRectangle *getArtBox() { return attrs->getArtBox(); }
+ int getRotate() { return attrs->getRotate(); }
+ GooString *getLastModified() { return attrs->getLastModified(); }
+ Dict *getBoxColorInfo() { return attrs->getBoxColorInfo(); }
+ Dict *getGroup() { return attrs->getGroup(); }
+ Stream *getMetadata() { return attrs->getMetadata(); }
+ Dict *getPieceInfo() { return attrs->getPieceInfo(); }
+ Dict *getSeparationInfo() { return attrs->getSeparationInfo(); }
+
+ // Get resource dictionary.
+ Dict *getResourceDict() { return attrs->getResourceDict(); }
+
+ // Get annotations array.
+ Object *getAnnots(Object *obj) { return annots.fetch(xref, obj); }
+ // Add a new annotation to the page
+ void addAnnot(Annot *annot);
+
+ // Return a list of links.
+ Links *getLinks(Catalog *catalog);
+
+ // Return a list of annots. Ownership is transferred to the caller.
+ Annots *getAnnots(Catalog *catalog);
+
+ // Get contents.
+ Object *getContents(Object *obj) { return contents.fetch(xref, obj); }
+
+ // Get thumb.
+ Object *getThumb(Object *obj) { return thumb.fetch(xref, obj); }
+ GBool loadThumb(unsigned char **data, int *width, int *height, int *rowstride);
+
+ // Get transition.
+ Object *getTrans(Object *obj) { return trans.fetch(xref, obj); }
+
+ // Get form.
+ FormPageWidgets *getPageWidgets() { return pageWidgets; }
+
+ // Get duration, the maximum length of time, in seconds,
+ // that the page is displayed before the presentation automatically
+ // advances to the next page
+ double getDuration() { return duration; }
+
+ // Get actions
+ Object *getActions(Object *obj) { return actions.fetch(xref, obj); }
+
+ Gfx *createGfx(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data),
+ void *abortCheckCbkData,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+ void *annotDisplayDecideCbkData);
+
+ // Display a page.
+ void display(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+ void *annotDisplayDecideCbkData = NULL);
+
+ // Display part of a page.
+ void displaySlice(OutputDev *out, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog *catalog,
+ GBool (*abortCheckCbk)(void *data) = NULL,
+ void *abortCheckCbkData = NULL,
+ GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+ void *annotDisplayDecideCbkData = NULL);
+
+ void display(Gfx *gfx);
+
+ void makeBox(double hDPI, double vDPI, int rotate,
+ GBool useMediaBox, GBool upsideDown,
+ double sliceX, double sliceY, double sliceW, double sliceH,
+ PDFRectangle *box, GBool *crop);
+
+ void processLinks(OutputDev *out, Catalog *catalog);
+
+ // Get the page's default CTM.
+ void getDefaultCTM(double *ctm, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool upsideDown);
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Object pageObj; // page dictionary
+ Ref pageRef; // page reference
+ int num; // page number
+ PageAttrs *attrs; // page attributes
+ Object annots; // annotations array
+ Object contents; // page contents
+ FormPageWidgets *pageWidgets; // the form for that page
+ Object thumb; // page thumbnail
+ Object trans; // page transition
+ Object actions; // page addiction actions
+ double duration; // page duration
+ GBool ok; // true if page is valid
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.cc
new file mode 100644
index 00000000000..84cb50fceb2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.cc
@@ -0,0 +1,390 @@
+//========================================================================
+//
+// This file is under the GPLv2 or later license
+//
+// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include "PageLabelInfo.h"
+
+/* http://mathworld.wolfram.com/RomanNumerals.html */
+
+static int fromRoman(const char *buffer) {
+ int digit_value, prev_digit_value, value;
+ int i;
+
+ prev_digit_value = INT_MAX;
+ value = 0;
+ for (i = 0; buffer[i] != '\0'; i++) {
+ switch (buffer[i]) {
+ case 'm':
+ case 'M':
+ digit_value = 1000;
+ break;
+ case 'd':
+ case 'D':
+ digit_value = 500;
+ break;
+ case 'c':
+ case 'C':
+ digit_value = 100;
+ break;
+ case 'l':
+ case 'L':
+ digit_value = 50;
+ break;
+ case 'x':
+ case 'X':
+ digit_value = 10;
+ break;
+ case 'v':
+ case 'V':
+ digit_value = 5;
+ break;
+ case 'i':
+ case 'I':
+ digit_value = 1;
+ break;
+ default:
+ return -1;
+ }
+
+ if (digit_value <= prev_digit_value)
+ value += digit_value;
+ else
+ value += digit_value - prev_digit_value * 2;
+ prev_digit_value = digit_value;
+ }
+
+ return value;
+}
+
+static void toRoman(int number, GooString *str, GBool uppercase) {
+ static const char uppercaseNumerals[] = "IVXLCDM";
+ static const char lowercaseNumerals[] = "ivxlcdm";
+ int divisor;
+ int i, j, k;
+ const char *wh;
+
+ if (uppercase)
+ wh = uppercaseNumerals;
+ else
+ wh = lowercaseNumerals;
+
+ divisor = 1000;
+ for (k = 3; k >= 0; k--) {
+ i = number / divisor;
+ number = number % divisor;
+
+ switch (i) {
+ case 0:
+ break;
+ case 5:
+ str->append(wh[2 * k + 1]);
+ break;
+ case 9:
+ str->append(wh[2 * k + 0]);
+ str->append(wh[ 2 * k + 2]);
+ break;
+ case 4:
+ str->append(wh[2 * k + 0]);
+ str->append(wh[2 * k + 1]);
+ break;
+ default:
+ if (i > 5) {
+ str->append(wh[2 * k + 1]);
+ i -= 5;
+ }
+ for (j = 0; j < i; j++) {
+ str->append(wh[2 * k + 0]);
+ }
+ }
+
+ divisor = divisor / 10;
+ }
+}
+
+static int fromLatin(const char *buffer)
+{
+ int count;
+ const char *p;
+
+ for (p = buffer; *p; p++) {
+ if (*p != buffer[0])
+ return -1;
+ }
+
+ count = p - buffer;
+ if (buffer[0] >= 'a' && buffer[0] <= 'z')
+ return 26 * (count - 1) + buffer[0] - 'a' + 1;
+ if (buffer[0] >= 'A' && buffer[0] <= 'Z')
+ return 26 * (count - 1) + buffer[0] - 'A' + 1;
+
+ return -1;
+}
+
+#ifdef TEST
+static void toLatin(int number, GooString *str, GBool uppercase) {
+ char base, letter;
+ int i, count;
+
+ if (uppercase)
+ base = 'A';
+ else
+ base = 'a';
+
+ count = (number - 1) / 26 + 1;
+ letter = base + (number - 1) % 26;
+
+ for (i = 0; i < count; i++)
+ str->append(letter);
+}
+#endif
+
+PageLabelInfo::Interval::Interval(Object *dict, int baseA) {
+ Object obj;
+
+ style = None;
+ if (dict->dictLookup("S", &obj)->isName()) {
+ if (obj.isName("D")) {
+ style = Arabic;
+ } else if (obj.isName("R")) {
+ style = UppercaseRoman;
+ } else if (obj.isName("r")) {
+ style = LowercaseRoman;
+ } else if (obj.isName("A")) {
+ style = UppercaseLatin;
+ } else if (obj.isName("a")) {
+ style = LowercaseLatin;
+ }
+ }
+ obj.free();
+
+ if (dict->dictLookup("P", &obj)->isString())
+ prefix = obj.getString()->copy();
+ else
+ prefix = new GooString("");
+ obj.free();
+
+ if (dict->dictLookup("St", &obj)->isInt())
+ first = obj.getInt();
+ else
+ first = 1;
+ obj.free();
+
+ base = baseA;
+}
+
+PageLabelInfo::Interval::~Interval() {
+ delete prefix;
+}
+
+PageLabelInfo::PageLabelInfo(Object *tree, int numPages) {
+ int i;
+ Interval *interval, *next;
+
+ parse(tree);
+
+ for (i = 0; i < intervals.getLength(); i++) {
+ interval = (Interval *) intervals.get(i);
+
+ if (i + 1 < intervals.getLength()) {
+ next = (Interval *) intervals.get(i + 1);
+ interval->length = next->base - interval->base;
+ } else {
+ interval->length = numPages - interval->base;
+ }
+ if (interval->length < 0) interval->length = 0;
+ }
+}
+
+PageLabelInfo::~PageLabelInfo() {
+ int i;
+ for (i = 0; i < intervals.getLength(); ++i) {
+ delete (Interval*)intervals.get(i);
+ }
+}
+
+void PageLabelInfo::parse(Object *tree) {
+ Object nums, obj;
+ Object kids, kid, limits, low, high;
+ int i, base;
+ Interval *interval;
+
+ // leaf node
+ if (tree->dictLookup("Nums", &nums)->isArray()) {
+ for (i = 0; i < nums.arrayGetLength(); i += 2) {
+ if (!nums.arrayGet(i, &obj)->isInt()) {
+ obj.free();
+ continue;
+ }
+ base = obj.getInt();
+ obj.free();
+ if (!nums.arrayGet(i + 1, &obj)->isDict()) {
+ obj.free();
+ continue;
+ }
+
+ interval = new Interval(&obj, base);
+ obj.free();
+ intervals.append(interval);
+ }
+ }
+ nums.free();
+
+ if (tree->dictLookup("Kids", &kids)->isArray()) {
+ for (i = 0; i < kids.arrayGetLength(); ++i) {
+ if (kids.arrayGet(i, &kid)->isDict())
+ parse(&kid);
+ kid.free();
+ }
+ }
+ kids.free();
+}
+
+GBool PageLabelInfo::labelToIndex(GooString *label, int *index)
+{
+ Interval *interval;
+ char *str = label->getCString(), *end;
+ int prefixLength;
+ int i, base, number;
+
+ base = 0;
+ for (i = 0; i < intervals.getLength(); i++) {
+ interval = (Interval *) intervals.get(i);
+ prefixLength = interval->prefix->getLength();
+ if (label->cmpN(interval->prefix, prefixLength) != 0)
+ continue;
+
+ switch (interval->style) {
+ case Interval::Arabic:
+ number = strtol(str + prefixLength, &end, 10);
+ if (*end == '\0' && number - interval->first < interval->length) {
+ *index = base + number - interval->first;
+ return gTrue;
+ }
+ break;
+ case Interval::LowercaseRoman:
+ case Interval::UppercaseRoman:
+ number = fromRoman(str + prefixLength);
+ if (number >= 0 && number - interval->first < interval->length) {
+ *index = base + number - interval->first;
+ return gTrue;
+ }
+ break;
+ case Interval::UppercaseLatin:
+ case Interval::LowercaseLatin:
+ number = fromLatin(str + prefixLength);
+ if (number >= 0 && number - interval->first < interval->length) {
+ *index = base + number - interval->first;
+ return gTrue;
+ }
+ break;
+ case Interval::None:
+ break;
+ }
+
+ base += interval->length;
+ }
+
+ return gFalse;
+}
+
+GBool PageLabelInfo::indexToLabel(int index, GooString *label)
+{
+ char buffer[32];
+ int i, base, number;
+ Interval *interval;
+ GooString number_string;
+
+ base = 0;
+ interval = NULL;
+ for (i = 0; i < intervals.getLength(); i++) {
+ interval = (Interval *) intervals.get(i);
+ if (base <= index && index < base + interval->length)
+ break;
+ base += interval->length;
+ }
+
+ if (i == intervals.getLength())
+ return gFalse;
+
+ number = index - base + interval->first;
+ switch (interval->style) {
+ case Interval::Arabic:
+ snprintf (buffer, sizeof(buffer), "%d", number);
+ number_string.append(buffer);
+ break;
+ case Interval::LowercaseRoman:
+ toRoman(number, &number_string, gFalse);
+ break;
+ case Interval::UppercaseRoman:
+ toRoman(number, &number_string, gTrue);
+ break;
+ case Interval::UppercaseLatin:
+ case Interval::LowercaseLatin:
+ number = 0;
+ break;
+ case Interval::None:
+ break;
+ }
+
+ label->clear();
+ label->append(interval->prefix);
+ if (label->hasUnicodeMarker()) {
+ int i, len;
+ char ucs2_char[2];
+
+ /* Convert the ascii number string to ucs2 and append. */
+ len = number_string.getLength ();
+ ucs2_char[0] = 0;
+ for (i = 0; i < len; ++i) {
+ ucs2_char[1] = number_string.getChar(i);
+ label->append(ucs2_char, 2);
+ }
+ ucs2_char[1] = 0;
+ label->append(ucs2_char, 2);
+ } else {
+ label->append(&number_string);
+ }
+
+ return gTrue;
+}
+
+#ifdef TEST
+int main(int argc, char *argv[])
+{
+ {
+ GooString str;
+ toRoman(177, &str, gFalse);
+ assert (str.cmp("clxxvii") == 0);
+ }
+
+ {
+ GooString roman("clxxvii");
+ assert (fromRoman(roman.getCString()) == 177);
+ }
+
+ {
+ GooString str;
+ toLatin(54, &str, gFalse);
+ assert (str.cmp("bbb") == 0);
+ }
+
+ {
+ GooString latin("ddd");
+ assert (fromLatin(latin.getCString()) == 56);
+ }
+}
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.h
new file mode 100644
index 00000000000..960e710069d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageLabelInfo.h
@@ -0,0 +1,51 @@
+//========================================================================
+//
+// This file is under the GPLv2 or later license
+//
+// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <limits.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "goo/gtypes.h"
+#include "goo/GooList.h"
+#include "goo/GooString.h"
+#include "Object.h"
+
+class PageLabelInfo {
+public:
+ PageLabelInfo(Object *tree, int numPages);
+ ~PageLabelInfo();
+ GBool labelToIndex(GooString *label, int *index);
+ GBool indexToLabel(int index, GooString *label);
+
+private:
+ void parse(Object *tree);
+
+private:
+ struct Interval {
+ Interval(Object *dict, int baseA);
+ ~Interval();
+ GooString *prefix;
+ enum NumberStyle {
+ None,
+ Arabic,
+ LowercaseRoman,
+ UppercaseRoman,
+ UppercaseLatin,
+ LowercaseLatin
+ } style;
+ int first, base, length;
+ };
+
+ GooList intervals;
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.cc
new file mode 100644
index 00000000000..3fbd0de2802
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.cc
@@ -0,0 +1,137 @@
+/* PageTransition.cc
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2010, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "PageTransition.h"
+
+//------------------------------------------------------------------------
+// PageTransition
+//------------------------------------------------------------------------
+
+PageTransition::PageTransition (Object *trans) {
+ Object obj;
+ Dict *dict;
+
+ type = transitionReplace;
+ duration = 1;
+ alignment = transitionHorizontal;
+ direction = transitionInward;
+ angle = 0;
+ scale = 1.0;
+ rectangular = gFalse;
+ ok = gTrue;
+
+ if (!trans || !trans->isDict ()) {
+ ok = gFalse;
+ return;
+ }
+
+ dict = trans->getDict();
+
+ // get type
+ if (dict->lookup("S", &obj)->isName()) {
+ const char *s = obj.getName();
+
+ if (strcmp("R", s) == 0)
+ type = transitionReplace;
+ else if (strcmp("Split", s) == 0)
+ type = transitionSplit;
+ else if (strcmp("Blinds", s) == 0)
+ type = transitionBlinds;
+ else if (strcmp("Box", s) == 0)
+ type = transitionBox;
+ else if (strcmp("Wipe", s) == 0)
+ type = transitionWipe;
+ else if (strcmp("Dissolve", s) == 0)
+ type = transitionDissolve;
+ else if (strcmp("Glitter", s) == 0)
+ type = transitionGlitter;
+ else if (strcmp("Fly", s) == 0)
+ type = transitionFly;
+ else if (strcmp("Push", s) == 0)
+ type = transitionPush;
+ else if (strcmp("Cover", s) == 0)
+ type = transitionCover;
+ else if (strcmp("Uncover", s) == 0)
+ type = transitionUncover;
+ else if (strcmp("Fade", s) == 0)
+ type = transitionFade;
+ }
+ obj.free();
+
+ // get duration
+ if (dict->lookup("D", &obj)->isInt()) {
+ duration = obj.getInt();
+ }
+ obj.free();
+
+ // get alignment
+ if (dict->lookup("Dm", &obj)->isName()) {
+ const char *dm = obj.getName();
+
+ if (strcmp("H", dm) == 0)
+ alignment = transitionHorizontal;
+ else if (strcmp("V", dm) == 0)
+ alignment = transitionVertical;
+ }
+ obj.free();
+
+ // get direction
+ if (dict->lookup("M", &obj)->isName()) {
+ const char *m = obj.getName();
+
+ if (strcmp("I", m) == 0)
+ direction = transitionInward;
+ else if (strcmp("O", m) == 0)
+ direction = transitionOutward;
+ }
+ obj.free();
+
+ // get angle
+ if (dict->lookup("Di", &obj)->isInt()) {
+ angle = obj.getInt();
+ }
+ obj.free();
+
+ if (dict->lookup("Di", &obj)->isName()) {
+ if (strcmp("None", obj.getName()) == 0)
+ angle = 0;
+ }
+ obj.free();
+
+ // get sacle
+ if (dict->lookup("SS", &obj)->isReal()) {
+ scale = obj.getReal();
+ }
+ obj.free();
+
+ // get rectangular
+ if (dict->lookup("B", &obj)->isBool()) {
+ rectangular = obj.getBool();
+ }
+ obj.free();
+}
+
+PageTransition::~PageTransition()
+{
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.h
new file mode 100644
index 00000000000..e892c6c5051
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PageTransition.h
@@ -0,0 +1,104 @@
+/* PageTransition.cc
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PAGE_TRANSITION_H
+#define PAGE_TRANSITION_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Object.h"
+
+//------------------------------------------------------------------------
+// PageTransition
+//------------------------------------------------------------------------
+
+// if changed remember to keep in sync with frontend enums
+enum PageTransitionType {
+ transitionReplace = 0,
+ transitionSplit,
+ transitionBlinds,
+ transitionBox,
+ transitionWipe,
+ transitionDissolve,
+ transitionGlitter,
+ transitionFly,
+ transitionPush,
+ transitionCover,
+ transitionUncover,
+ transitionFade
+};
+
+// if changed remember to keep in sync with frontend enums
+enum PageTransitionAlignment {
+ transitionHorizontal = 0,
+ transitionVertical
+};
+
+// if changed remember to keep in sync with frontend enums
+enum PageTransitionDirection {
+ transitionInward = 0,
+ transitionOutward
+};
+
+class PageTransition {
+public:
+ // Construct a Page Transition.
+ PageTransition (Object *trans);
+
+ // Destructor.
+ ~PageTransition ();
+
+ // Was the Page Transition created successfully?
+ GBool isOk() { return ok; }
+
+ // Get type
+ PageTransitionType getType() { return type; }
+
+ // Get duration
+ int getDuration() { return duration;}
+
+ // Get alignment
+ PageTransitionAlignment getAlignment() { return alignment; }
+
+ // Get direction
+ PageTransitionDirection getDirection() { return direction; }
+
+ // Get angle
+ int getAngle() { return angle; }
+
+ // Get scale
+ double getScale() { return scale; }
+
+ // Is rectangular?
+ GBool isRectangular() { return rectangular; }
+
+private:
+
+ PageTransitionType type; // transition style
+ int duration; // duration of the effect in seconds
+ PageTransitionAlignment alignment; // dimension of the effect
+ PageTransitionDirection direction; // direction of motion
+ int angle; // direction in degrees
+ double scale; // scale
+ GBool rectangular; // is the area to be flown in rectangular?
+ GBool ok; // set if created successfully
+};
+
+#endif /* PAGE_TRANSITION_H */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.cc
new file mode 100644
index 00000000000..05fba86907b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.cc
@@ -0,0 +1,265 @@
+//========================================================================
+//
+// Parser.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stddef.h>
+#include "Object.h"
+#include "Array.h"
+#include "Dict.h"
+#include "Decrypt.h"
+#include "Parser.h"
+#include "XRef.h"
+#include "Error.h"
+
+Parser::Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA) {
+ xref = xrefA;
+ lexer = lexerA;
+ inlineImg = 0;
+ allowStreams = allowStreamsA;
+ lexer->getObj(&buf1);
+ lexer->getObj(&buf2);
+}
+
+Parser::~Parser() {
+ buf1.free();
+ buf2.free();
+ delete lexer;
+}
+
+Object *Parser::getObj(Object *obj, Guchar *fileKey,
+ CryptAlgorithm encAlgorithm, int keyLength,
+ int objNum, int objGen) {
+ char *key;
+ Stream *str;
+ Object obj2;
+ int num;
+ DecryptStream *decrypt;
+ GooString *s, *s2;
+ int c;
+
+ // refill buffer after inline image data
+ if (inlineImg == 2) {
+ buf1.free();
+ buf2.free();
+ lexer->getObj(&buf1);
+ lexer->getObj(&buf2);
+ inlineImg = 0;
+ }
+
+ // array
+ if (buf1.isCmd("[")) {
+ shift();
+ obj->initArray(xref);
+ while (!buf1.isCmd("]") && !buf1.isEOF())
+ obj->arrayAdd(getObj(&obj2, fileKey, encAlgorithm, keyLength,
+ objNum, objGen));
+ if (buf1.isEOF())
+ error(getPos(), "End of file inside array");
+ shift();
+
+ // dictionary or stream
+ } else if (buf1.isCmd("<<")) {
+ shift(objNum);
+ obj->initDict(xref);
+ while (!buf1.isCmd(">>") && !buf1.isEOF()) {
+ if (!buf1.isName()) {
+ error(getPos(), "Dictionary key must be a name object");
+ shift();
+ } else {
+ // buf1 might go away in shift(), so construct the key
+ key = copyString(buf1.getName());
+ shift();
+ if (buf1.isEOF() || buf1.isError()) {
+ gfree(key);
+ break;
+ }
+ obj->dictAdd(key, getObj(&obj2, fileKey, encAlgorithm, keyLength, objNum, objGen));
+ }
+ }
+ if (buf1.isEOF())
+ error(getPos(), "End of file inside dictionary");
+ // stream objects are not allowed inside content streams or
+ // object streams
+ if (allowStreams && buf2.isCmd("stream")) {
+ if ((str = makeStream(obj, fileKey, encAlgorithm, keyLength,
+ objNum, objGen))) {
+ obj->initStream(str);
+ } else {
+ obj->free();
+ obj->initError();
+ }
+ } else {
+ shift();
+ }
+
+ // indirect reference or integer
+ } else if (buf1.isInt()) {
+ num = buf1.getInt();
+ shift();
+ if (buf1.isInt() && buf2.isCmd("R")) {
+ obj->initRef(num, buf1.getInt());
+ shift();
+ shift();
+ } else {
+ obj->initInt(num);
+ }
+
+ // string
+ } else if (buf1.isString() && fileKey) {
+ s = buf1.getString();
+ s2 = new GooString();
+ obj2.initNull();
+ decrypt = new DecryptStream(new MemStream(s->getCString(), 0,
+ s->getLength(), &obj2),
+ fileKey, encAlgorithm, keyLength,
+ objNum, objGen);
+ decrypt->reset();
+ while ((c = decrypt->getChar()) != EOF) {
+ s2->append((char)c);
+ }
+ delete decrypt;
+ obj->initString(s2);
+ shift();
+
+ // simple object
+ } else {
+ // avoid re-allocating memory for complex objects like strings by
+ // shallow copy of <buf1> to <obj> and nulling <buf1> so that
+ // subsequent buf1.free() won't free this memory
+ buf1.shallowCopy(obj);
+ buf1.initNull();
+ shift();
+ }
+
+ return obj;
+}
+
+Stream *Parser::makeStream(Object *dict, Guchar *fileKey,
+ CryptAlgorithm encAlgorithm, int keyLength,
+ int objNum, int objGen) {
+ Object obj;
+ BaseStream *baseStr;
+ Stream *str;
+ Guint pos, endPos, length;
+
+ // get stream start position
+ lexer->skipToNextLine();
+ pos = lexer->getPos();
+
+ // get length
+ dict->dictLookup("Length", &obj);
+ if (obj.isInt()) {
+ length = (Guint)obj.getInt();
+ obj.free();
+ } else {
+ error(getPos(), "Bad 'Length' attribute in stream");
+ obj.free();
+ return NULL;
+ }
+
+ // check for length in damaged file
+ if (xref && xref->getStreamEnd(pos, &endPos)) {
+ length = endPos - pos;
+ }
+
+ // in badly damaged PDF files, we can run off the end of the input
+ // stream immediately after the "stream" token
+ if (!lexer->getStream()) {
+ return NULL;
+ }
+ baseStr = lexer->getStream()->getBaseStream();
+
+ // skip over stream data
+ if (Lexer::LOOK_VALUE_NOT_CACHED != lexer->lookCharLastValueCached) {
+ // take into account the fact that we've cached one value
+ pos = pos - 1;
+ lexer->lookCharLastValueCached = Lexer::LOOK_VALUE_NOT_CACHED;
+ }
+ lexer->setPos(pos + length);
+
+ // refill token buffers and check for 'endstream'
+ shift(); // kill '>>'
+ shift(); // kill 'stream'
+ if (buf1.isCmd("endstream")) {
+ shift();
+ } else {
+ error(getPos(), "Missing 'endstream'");
+ if (xref) {
+ // shift until we find the proper endstream or we change to another object or reach eof
+ while (!buf1.isCmd("endstream") && xref->getNumEntry(lexer->getPos()) == objNum && !buf1.isEOF()) {
+ shift();
+ }
+ length = lexer->getPos() - pos;
+ if (buf1.isCmd("endstream")) {
+ obj.initInt(length);
+ dict->dictSet("Length", &obj);
+ obj.free();
+ }
+ } else {
+ // When building the xref we can't use it so use this
+ // kludge for broken PDF files: just add 5k to the length, and
+ // hope its enough
+ length += 5000;
+ }
+ }
+
+ // make base stream
+ str = baseStr->makeSubStream(pos, gTrue, length, dict);
+
+ // handle decryption
+ if (fileKey) {
+ str = new DecryptStream(str, fileKey, encAlgorithm, keyLength,
+ objNum, objGen);
+ }
+
+ // get filters
+ str = str->addFilters(dict);
+
+ return str;
+}
+
+void Parser::shift(int objNum) {
+ if (inlineImg > 0) {
+ if (inlineImg < 2) {
+ ++inlineImg;
+ } else {
+ // in a damaged content stream, if 'ID' shows up in the middle
+ // of a dictionary, we need to reset
+ inlineImg = 0;
+ }
+ } else if (buf2.isCmd("ID")) {
+ lexer->skipChar(); // skip char after 'ID' command
+ inlineImg = 1;
+ }
+ buf1.free();
+ buf2.shallowCopy(&buf1);
+ if (inlineImg > 0) // don't buffer inline image data
+ buf2.initNull();
+ else
+ lexer->getObj(&buf2, objNum);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.h
new file mode 100644
index 00000000000..d09b23b4a01
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Parser.h
@@ -0,0 +1,71 @@
+//========================================================================
+//
+// Parser.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "Lexer.h"
+
+//------------------------------------------------------------------------
+// Parser
+//------------------------------------------------------------------------
+
+class Parser {
+public:
+
+ // Constructor.
+ Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA);
+
+ // Destructor.
+ ~Parser();
+
+ // Get the next object from the input stream.
+ Object *getObj(Object *obj, Guchar *fileKey = NULL,
+ CryptAlgorithm encAlgorithm = cryptRC4, int keyLength = 0,
+ int objNum = 0, int objGen = 0);
+
+ // Get stream.
+ Stream *getStream() { return lexer->getStream(); }
+
+ // Get current position in file.
+ int getPos() { return lexer->getPos(); }
+
+private:
+
+ XRef *xref; // the xref table for this PDF file
+ Lexer *lexer; // input stream
+ GBool allowStreams; // parse stream objects?
+ Object buf1, buf2; // next two tokens
+ int inlineImg; // set when inline image data is encountered
+
+ Stream *makeStream(Object *dict, Guchar *fileKey,
+ CryptAlgorithm encAlgorithm, int keyLength,
+ int objNum, int objGen);
+ void shift(int objNum = -1);
+};
+
+#endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.cc
new file mode 100644
index 00000000000..b0859aa383f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.cc
@@ -0,0 +1,102 @@
+//========================================================================
+//
+// PopplerCache.h
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright (C) 2009 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#include "PopplerCache.h"
+
+PopplerCacheKey::~PopplerCacheKey()
+{
+}
+
+PopplerCacheItem::~PopplerCacheItem()
+{
+}
+
+PopplerCache::PopplerCache(int cacheSizeA)
+{
+ cacheSize = cacheSizeA;
+ keys = new PopplerCacheKey*[cacheSize];
+ items = new PopplerCacheItem*[cacheSize];
+ lastValidCacheIndex = -1;
+}
+
+PopplerCache::~PopplerCache()
+{
+ for (int i = 0; i <= lastValidCacheIndex; ++i) {
+ delete keys[i];
+ delete items[i];
+ }
+ delete[] keys;
+ delete[] items;
+}
+
+PopplerCacheItem *PopplerCache::lookup(const PopplerCacheKey &key)
+{
+ if (lastValidCacheIndex < 0)
+ return 0;
+
+ if (*keys[0] == key) {
+ return items[0];
+ }
+ for (int i = 1; i <= lastValidCacheIndex; i++) {
+ if (*keys[i] == key) {
+ PopplerCacheKey *keyHit = keys[i];
+ PopplerCacheItem *itemHit = items[i];
+
+ for (int j = i; j > 0; j--) {
+ keys[j] = keys[j - 1];
+ items[j] = items[j - 1];
+ }
+
+ keys[0] = keyHit;
+ items[0] = itemHit;
+ return itemHit;
+ }
+ }
+ return 0;
+}
+
+void PopplerCache::put(PopplerCacheKey *key, PopplerCacheItem *item)
+{
+ int movingStartIndex = lastValidCacheIndex + 1;
+ if (lastValidCacheIndex == cacheSize - 1) {
+ delete keys[lastValidCacheIndex];
+ delete items[lastValidCacheIndex];
+ movingStartIndex = cacheSize - 1;
+ } else {
+ lastValidCacheIndex++;
+ }
+ for (int i = movingStartIndex; i > 0; i--) {
+ keys[i] = keys[i - 1];
+ items[i] = items[i - 1];
+ }
+ keys[0] = key;
+ items[0] = item;
+}
+
+int PopplerCache::size()
+{
+ return cacheSize;
+}
+
+int PopplerCache::numberOfItems()
+{
+ return lastValidCacheIndex + 1;
+}
+
+PopplerCacheItem *PopplerCache::item(int index)
+{
+ return items[index];
+}
+
+PopplerCacheKey *PopplerCache::key(int index)
+{
+ return keys[index];
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.h
new file mode 100644
index 00000000000..5f22409bbc6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PopplerCache.h
@@ -0,0 +1,61 @@
+//========================================================================
+//
+// PopplerCache.h
+//
+// This file is licensed under the GPLv2 or later
+//
+// Copyright (C) 2009 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+//========================================================================
+
+#ifndef POPPLER_CACHE_H
+#define POPPLER_CACHE_H
+
+class PopplerCacheItem
+{
+ public:
+ virtual ~PopplerCacheItem();
+};
+
+class PopplerCacheKey
+{
+ public:
+ virtual ~PopplerCacheKey();
+ virtual bool operator==(const PopplerCacheKey &key) const = 0;
+};
+
+class PopplerCache
+{
+ public:
+ PopplerCache(int cacheSizeA);
+ ~PopplerCache();
+
+ /* The item returned is owned by the cache */
+ PopplerCacheItem *lookup(const PopplerCacheKey &key);
+
+ /* The key and item pointers ownership is taken by the cache */
+ void put(PopplerCacheKey *key, PopplerCacheItem *item);
+
+ /* The max size of the cache */
+ int size();
+
+ /* The number of items in the cache */
+ int numberOfItems();
+
+ /* The n-th item in the cache */
+ PopplerCacheItem *item(int index);
+
+ /* The n-th key in the cache */
+ PopplerCacheKey *key(int index);
+
+ private:
+ PopplerCache(const PopplerCache &cache); // not allowed
+
+ PopplerCacheKey **keys;
+ PopplerCacheItem **items;
+ int lastValidCacheIndex;
+ int cacheSize;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.cc
new file mode 100644
index 00000000000..7c3f522a153
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.cc
@@ -0,0 +1,272 @@
+//========================================================================
+//
+// PreScanOutputDev.cc
+//
+// Copyright 2005 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <math.h>
+#include "GlobalParams.h"
+#include "GfxFont.h"
+#include "Link.h"
+#include "PreScanOutputDev.h"
+
+//------------------------------------------------------------------------
+// PreScanOutputDev
+//------------------------------------------------------------------------
+
+PreScanOutputDev::PreScanOutputDev() {
+ clearStats();
+}
+
+PreScanOutputDev::~PreScanOutputDev() {
+}
+
+void PreScanOutputDev::startPage(int /*pageNum*/, GfxState * /*state*/) {
+}
+
+void PreScanOutputDev::endPage() {
+}
+
+void PreScanOutputDev::stroke(GfxState *state) {
+ double *dash;
+ int dashLen;
+ double dashStart;
+
+ check(state->getStrokeColorSpace(), state->getStrokeColor(),
+ state->getStrokeOpacity(), state->getBlendMode());
+ state->getLineDash(&dash, &dashLen, &dashStart);
+ if (dashLen != 0) {
+ gdi = gFalse;
+ }
+}
+
+void PreScanOutputDev::fill(GfxState *state) {
+ check(state->getFillColorSpace(), state->getFillColor(),
+ state->getFillOpacity(), state->getBlendMode());
+}
+
+void PreScanOutputDev::eoFill(GfxState *state) {
+ check(state->getFillColorSpace(), state->getFillColor(),
+ state->getFillOpacity(), state->getBlendMode());
+}
+
+void PreScanOutputDev::clip(GfxState * /*state*/) {
+ //~ check for a rectangle "near" the edge of the page;
+ //~ else set gdi to false
+}
+
+void PreScanOutputDev::eoClip(GfxState * /*state*/) {
+ //~ see clip()
+}
+
+void PreScanOutputDev::beginStringOp(GfxState *state) {
+ int render;
+ GfxFont *font;
+ double m11, m12, m21, m22;
+ Ref embRef;
+ DisplayFontParam *dfp;
+ GBool simpleTTF;
+
+ render = state->getRender();
+ if (!(render & 1)) {
+ check(state->getFillColorSpace(), state->getFillColor(),
+ state->getFillOpacity(), state->getBlendMode());
+ }
+ if ((render & 3) == 1 || (render & 3) == 2) {
+ check(state->getStrokeColorSpace(), state->getStrokeColor(),
+ state->getStrokeOpacity(), state->getBlendMode());
+ }
+
+ font = state->getFont();
+ state->getFontTransMat(&m11, &m12, &m21, &m22);
+ simpleTTF = fabs(m11 + m22) < 0.01 &&
+ m11 > 0 &&
+ fabs(m12) < 0.01 &&
+ fabs(m21) < 0.01 &&
+ fabs(state->getHorizScaling() - 1) < 0.001 &&
+ (font->getType() == fontTrueType ||
+ font->getType() == fontTrueTypeOT) &&
+ (font->getEmbeddedFontID(&embRef) ||
+ font->getExtFontFile() ||
+ (font->getName() &&
+ (dfp = globalParams->getDisplayFont(font)) &&
+ dfp->kind == displayFontTT));
+ if (simpleTTF) {
+ //~ need to create a FoFiTrueType object, and check for a Unicode cmap
+ }
+ if (state->getRender() != 0 || !simpleTTF) {
+ gdi = gFalse;
+ }
+}
+
+void PreScanOutputDev::endStringOp(GfxState * /*state*/) {
+}
+
+GBool PreScanOutputDev::beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/,
+ double /*dx*/, double /*dy*/,
+ CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) {
+ // return false so all Type 3 chars get rendered (no caching)
+ return gFalse;
+}
+
+void PreScanOutputDev::endType3Char(GfxState * /*state*/) {
+}
+
+void PreScanOutputDev::drawImageMask(GfxState *state, Object * /*ref*/, Stream *str,
+ int width, int height, GBool /*invert*/,
+ GBool /*interpolate*/, GBool inlineImg) {
+ int i, j;
+
+ check(state->getFillColorSpace(), state->getFillColor(),
+ state->getFillOpacity(), state->getBlendMode());
+ gdi = gFalse;
+
+ if (inlineImg) {
+ str->reset();
+ j = height * ((width + 7) / 8);
+ for (i = 0; i < j; ++i)
+ str->getChar();
+ str->close();
+ }
+}
+
+void PreScanOutputDev::drawImage(GfxState *state, Object * /*ref*/, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool /*interpolate*/, int * /*maskColors*/, GBool inlineImg) {
+ GfxColorSpace *colorSpace;
+ int i, j;
+
+ colorSpace = colorMap->getColorSpace();
+ if (colorSpace->getMode() == csIndexed) {
+ colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase();
+ }
+ if (colorSpace->getMode() != csDeviceGray &&
+ colorSpace->getMode() != csCalGray) {
+ gray = gFalse;
+ }
+ mono = gFalse;
+ if (state->getBlendMode() != gfxBlendNormal) {
+ transparency = gTrue;
+ }
+ gdi = gFalse;
+
+ if (inlineImg) {
+ str->reset();
+ j = height * ((width * colorMap->getNumPixelComps() *
+ colorMap->getBits() + 7) / 8);
+ for (i = 0; i < j; ++i)
+ str->getChar();
+ str->close();
+ }
+}
+
+void PreScanOutputDev::drawMaskedImage(GfxState *state, Object * /*ref*/,
+ Stream * /*str*/,
+ int /*width*/, int /*height*/,
+ GfxImageColorMap *colorMap,
+ GBool /*interpolate*/,
+ Stream * /*maskStr*/,
+ int /*maskWidth*/, int /*maskHeight*/,
+ GBool /*maskInvert*/, GBool /*maskInterpolate*/) {
+ GfxColorSpace *colorSpace;
+
+ colorSpace = colorMap->getColorSpace();
+ if (colorSpace->getMode() == csIndexed) {
+ colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase();
+ }
+ if (colorSpace->getMode() != csDeviceGray &&
+ colorSpace->getMode() != csCalGray) {
+ gray = gFalse;
+ }
+ mono = gFalse;
+ if (state->getBlendMode() != gfxBlendNormal) {
+ transparency = gTrue;
+ }
+ gdi = gFalse;
+}
+
+void PreScanOutputDev::drawSoftMaskedImage(GfxState * /*state*/, Object * /*ref*/,
+ Stream * /*str*/,
+ int /*width*/, int /*height*/,
+ GfxImageColorMap *colorMap,
+ GBool /*interpolate*/,
+ Stream * /*maskStr*/,
+ int /*maskWidth*/, int /*maskHeight*/,
+ GfxImageColorMap * /*maskColorMap*/,
+ GBool /*maskInterpolate*/) {
+ GfxColorSpace *colorSpace;
+
+ colorSpace = colorMap->getColorSpace();
+ if (colorSpace->getMode() == csIndexed) {
+ colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase();
+ }
+ if (colorSpace->getMode() != csDeviceGray &&
+ colorSpace->getMode() != csCalGray) {
+ gray = gFalse;
+ }
+ mono = gFalse;
+ transparency = gTrue;
+ gdi = gFalse;
+}
+
+void PreScanOutputDev::beginTransparencyGroup(
+ GfxState * /*state*/, double * /*bbox*/,
+ GfxColorSpace * /*blendingColorSpace*/,
+ GBool /*isolated*/, GBool /*knockout*/,
+ GBool /*forSoftMask*/) {
+ transparency = gTrue;
+ gdi = gFalse;
+}
+
+void PreScanOutputDev::check(GfxColorSpace *colorSpace, GfxColor *color,
+ double opacity, GfxBlendMode blendMode) {
+ GfxRGB rgb;
+
+ if (colorSpace->getMode() == csPattern) {
+ mono = gFalse;
+ gray = gFalse;
+ gdi = gFalse;
+ } else {
+ colorSpace->getRGB(color, &rgb);
+ if (rgb.r != rgb.g || rgb.g != rgb.b || rgb.b != rgb.r) {
+ mono = gFalse;
+ gray = gFalse;
+ } else if (!((rgb.r == 0 && rgb.g == 0 && rgb.b == 0) ||
+ (rgb.r == gfxColorComp1 &&
+ rgb.g == gfxColorComp1 &&
+ rgb.b == gfxColorComp1))) {
+ mono = gFalse;
+ }
+ }
+ if (opacity != 1 || blendMode != gfxBlendNormal) {
+ transparency = gTrue;
+ }
+}
+
+void PreScanOutputDev::clearStats() {
+ mono = gTrue;
+ gray = gTrue;
+ transparency = gFalse;
+ gdi = gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.h
new file mode 100644
index 00000000000..39c78197d76
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/PreScanOutputDev.h
@@ -0,0 +1,145 @@
+//========================================================================
+//
+// PreScanOutputDev.h
+//
+// Copyright 2005 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PRESCANOUTPUTDEV_H
+#define PRESCANOUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "GfxState.h"
+#include "OutputDev.h"
+
+//------------------------------------------------------------------------
+// PreScanOutputDev
+//------------------------------------------------------------------------
+
+class PreScanOutputDev: public OutputDev {
+public:
+
+ // Constructor.
+ PreScanOutputDev();
+
+ // Destructor.
+ virtual ~PreScanOutputDev();
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gTrue; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+
+ //----- path clipping
+ virtual void clip(GfxState *state);
+ virtual void eoClip(GfxState *state);
+
+ //----- text drawing
+ virtual void beginStringOp(GfxState *state);
+ virtual void endStringOp(GfxState *state);
+ virtual GBool beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen);
+ virtual void endType3Char(GfxState *state);
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+
+ //----- transparency groups and soft masks
+ virtual void beginTransparencyGroup(GfxState *state, double *bbox,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool knockout,
+ GBool forSoftMask);
+
+ //----- special access
+
+ // Returns true if the operations performed since the last call to
+ // clearStats() are all monochrome (black or white).
+ GBool isMonochrome() { return mono; }
+
+ // Returns true if the operations performed since the last call to
+ // clearStats() are all gray.
+ GBool isGray() { return gray; }
+
+ // Returns true if the operations performed since the last call to
+ // clearStats() included any transparency.
+ GBool usesTransparency() { return transparency; }
+
+ // Returns true if the operations performed since the last call to
+ // clearStats() are all rasterizable by GDI calls in GDIOutputDev.
+ GBool isAllGDI() { return gdi; }
+
+ // Clear the stats used by the above functions.
+ void clearStats();
+
+private:
+
+ void check(GfxColorSpace *colorSpace, GfxColor *color,
+ double opacity, GfxBlendMode blendMode);
+
+ GBool mono;
+ GBool gray;
+ GBool transparency;
+ GBool gdi;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.cc
new file mode 100644
index 00000000000..a0c44747a56
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.cc
@@ -0,0 +1,44 @@
+//========================================================================
+//
+// ProfileData.cc
+//
+// Copyright 2005 Jonathan Blandford <jrb@gnome.org>
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include "ProfileData.h"
+
+//------------------------------------------------------------------------
+// ProfileData
+//------------------------------------------------------------------------
+
+ProfileData::ProfileData() {
+ count = 0;
+ total = 0.0;
+ min = 0.0;
+ max = 0.0;
+}
+
+void
+ProfileData::addElement (double elapsed) {
+ if (count == 0) {
+ min = elapsed;
+ max = elapsed;
+ } else {
+ if (elapsed < min)
+ min = elapsed;
+ if (elapsed > max)
+ max = elapsed;
+ }
+ total += elapsed;
+ count ++;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.h
new file mode 100644
index 00000000000..418ee010755
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/ProfileData.h
@@ -0,0 +1,41 @@
+//========================================================================
+//
+// ProfileData.h
+//
+// Copyright 2005 Jonathan Blandford <jrb@gnome.org>
+//
+//========================================================================
+
+#ifndef PROFILE_DATA_H
+#define PROFILE_DATA_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+//------------------------------------------------------------------------
+// ProfileData
+//------------------------------------------------------------------------
+
+class ProfileData {
+public:
+
+ // Constructor.
+ ProfileData ();
+
+ // Destructor.
+ ~ProfileData() {}
+
+ void addElement (double elapsed);
+ int getCount () { return count; }
+ double getTotal () { return total; }
+ double getMin () { return max; }
+ double getMax () { return max; }
+private:
+ int count; // size of <elems> array
+ double total; // number of elements in array
+ double min; // reference count
+ double max; // reference count
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.cc
new file mode 100644
index 00000000000..ea91e2131c2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.cc
@@ -0,0 +1,390 @@
+//========================================================================
+//
+// SecurityHandler.cc
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "GooString.h"
+#include "PDFDoc.h"
+#include "Decrypt.h"
+#include "Error.h"
+#include "GlobalParams.h"
+#if HAVE_XPDFCORE
+# include "XPDFCore.h"
+#elif HAVE_WINPDFCORE
+# include "WinPDFCore.h"
+#endif
+#ifdef ENABLE_PLUGINS
+# include "XpdfPluginAPI.h"
+#endif
+#include "SecurityHandler.h"
+
+//------------------------------------------------------------------------
+// SecurityHandler
+//------------------------------------------------------------------------
+
+SecurityHandler *SecurityHandler::make(PDFDoc *docA, Object *encryptDictA) {
+ Object filterObj;
+ SecurityHandler *secHdlr;
+#ifdef ENABLE_PLUGINS
+ XpdfSecurityHandler *xsh;
+#endif
+
+ encryptDictA->dictLookup("Filter", &filterObj);
+ if (filterObj.isName("Standard")) {
+ secHdlr = new StandardSecurityHandler(docA, encryptDictA);
+ } else if (filterObj.isName()) {
+#ifdef ENABLE_PLUGINS
+ if ((xsh = globalParams->getSecurityHandler(filterObj.getName()))) {
+ secHdlr = new ExternalSecurityHandler(docA, encryptDictA, xsh);
+ } else {
+#endif
+ error(-1, "Couldn't find the '%s' security handler",
+ filterObj.getName());
+ secHdlr = NULL;
+#ifdef ENABLE_PLUGINS
+ }
+#endif
+ } else {
+ error(-1, "Missing or invalid 'Filter' entry in encryption dictionary");
+ secHdlr = NULL;
+ }
+ filterObj.free();
+ return secHdlr;
+}
+
+SecurityHandler::SecurityHandler(PDFDoc *docA) {
+ doc = docA;
+}
+
+SecurityHandler::~SecurityHandler() {
+}
+
+GBool SecurityHandler::checkEncryption(GooString *ownerPassword,
+ GooString *userPassword) {
+ void *authData;
+ GBool ok;
+ int i;
+
+ if (ownerPassword || userPassword) {
+ authData = makeAuthData(ownerPassword, userPassword);
+ } else {
+ authData = NULL;
+ }
+ ok = authorize(authData);
+ if (authData) {
+ freeAuthData(authData);
+ }
+ for (i = 0; !ok && i < 3; ++i) {
+ if (!(authData = getAuthData())) {
+ break;
+ }
+ ok = authorize(authData);
+ if (authData) {
+ freeAuthData(authData);
+ }
+ }
+ if (!ok) {
+ error(-1, "Incorrect password");
+ }
+ return ok;
+}
+
+//------------------------------------------------------------------------
+// StandardSecurityHandler
+//------------------------------------------------------------------------
+
+class StandardAuthData {
+public:
+
+ StandardAuthData(GooString *ownerPasswordA, GooString *userPasswordA) {
+ ownerPassword = ownerPasswordA;
+ userPassword = userPasswordA;
+ }
+
+ ~StandardAuthData() {
+ if (ownerPassword) {
+ delete ownerPassword;
+ }
+ if (userPassword) {
+ delete userPassword;
+ }
+ }
+
+ GooString *ownerPassword;
+ GooString *userPassword;
+};
+
+StandardSecurityHandler::StandardSecurityHandler(PDFDoc *docA,
+ Object *encryptDictA):
+ SecurityHandler(docA)
+{
+ Object versionObj, revisionObj, lengthObj;
+ Object ownerKeyObj, userKeyObj, permObj, fileIDObj;
+ Object fileIDObj1;
+ Object cryptFiltersObj, streamFilterObj, stringFilterObj;
+ Object cryptFilterObj, cfmObj, cfLengthObj;
+ Object encryptMetadataObj;
+
+ ok = gFalse;
+ fileID = NULL;
+ ownerKey = NULL;
+ userKey = NULL;
+
+ encryptDictA->dictLookup("V", &versionObj);
+ encryptDictA->dictLookup("R", &revisionObj);
+ encryptDictA->dictLookup("Length", &lengthObj);
+ encryptDictA->dictLookup("O", &ownerKeyObj);
+ encryptDictA->dictLookup("U", &userKeyObj);
+ encryptDictA->dictLookup("P", &permObj);
+ doc->getXRef()->getTrailerDict()->dictLookup("ID", &fileIDObj);
+ if (versionObj.isInt() &&
+ revisionObj.isInt() &&
+ ownerKeyObj.isString() && ownerKeyObj.getString()->getLength() == 32 &&
+ userKeyObj.isString() && userKeyObj.getString()->getLength() == 32 &&
+ permObj.isInt()) {
+ encVersion = versionObj.getInt();
+ encRevision = revisionObj.getInt();
+ encAlgorithm = cryptRC4;
+ // revision 2 forces a 40-bit key - some buggy PDF generators
+ // set the Length value incorrectly
+ if (encRevision == 2 || !lengthObj.isInt()) {
+ fileKeyLength = 5;
+ } else {
+ fileKeyLength = lengthObj.getInt() / 8;
+ }
+ encryptMetadata = gTrue;
+ //~ this currently only handles a subset of crypt filter functionality
+ if (encVersion == 4 && encRevision == 4) {
+ encryptDictA->dictLookup("CF", &cryptFiltersObj);
+ encryptDictA->dictLookup("StmF", &streamFilterObj);
+ encryptDictA->dictLookup("StrF", &stringFilterObj);
+ if (cryptFiltersObj.isDict() &&
+ streamFilterObj.isName() &&
+ stringFilterObj.isName() &&
+ !strcmp(streamFilterObj.getName(), stringFilterObj.getName())) {
+ if (cryptFiltersObj.dictLookup(streamFilterObj.getName(),
+ &cryptFilterObj)->isDict()) {
+ cryptFilterObj.dictLookup("CFM", &cfmObj);
+ if (cfmObj.isName("V2")) {
+ encVersion = 2;
+ encRevision = 3;
+ if (cryptFilterObj.dictLookup("Length", &cfLengthObj)->isInt()) {
+ //~ according to the spec, this should be cfLengthObj / 8
+ fileKeyLength = cfLengthObj.getInt();
+ }
+ cfLengthObj.free();
+ } else if (cfmObj.isName("AESV2")) {
+ encVersion = 2;
+ encRevision = 3;
+ encAlgorithm = cryptAES;
+ if (cryptFilterObj.dictLookup("Length", &cfLengthObj)->isInt()) {
+ //~ according to the spec, this should be cfLengthObj / 8
+ fileKeyLength = cfLengthObj.getInt();
+ }
+ cfLengthObj.free();
+ }
+ cfmObj.free();
+ }
+ cryptFilterObj.free();
+ }
+ stringFilterObj.free();
+ streamFilterObj.free();
+ cryptFiltersObj.free();
+ if (encryptDictA->dictLookup("EncryptMetadata",
+ &encryptMetadataObj)->isBool()) {
+ encryptMetadata = encryptMetadataObj.getBool();
+ }
+ encryptMetadataObj.free();
+ }
+ permFlags = permObj.getInt();
+ ownerKey = ownerKeyObj.getString()->copy();
+ userKey = userKeyObj.getString()->copy();
+ if (encVersion >= 1 && encVersion <= 2 &&
+ encRevision >= 2 && encRevision <= 3) {
+ if (fileIDObj.isArray()) {
+ if (fileIDObj.arrayGet(0, &fileIDObj1)->isString()) {
+ fileID = fileIDObj1.getString()->copy();
+ } else {
+ fileID = new GooString();
+ }
+ fileIDObj1.free();
+ } else {
+ fileID = new GooString();
+ }
+ ok = gTrue;
+ } else {
+ error(-1, "Unsupported version/revision (%d/%d) of Standard security handler",
+ encVersion, encRevision);
+ }
+ } else {
+ error(-1, "Weird encryption info");
+ }
+ if (fileKeyLength > 16) {
+ fileKeyLength = 16;
+ }
+ fileIDObj.free();
+ permObj.free();
+ userKeyObj.free();
+ ownerKeyObj.free();
+ lengthObj.free();
+ revisionObj.free();
+ versionObj.free();
+}
+
+StandardSecurityHandler::~StandardSecurityHandler() {
+ if (fileID) {
+ delete fileID;
+ }
+ if (ownerKey) {
+ delete ownerKey;
+ }
+ if (userKey) {
+ delete userKey;
+ }
+}
+
+void *StandardSecurityHandler::makeAuthData(GooString *ownerPassword,
+ GooString *userPassword) {
+ return new StandardAuthData(ownerPassword ? ownerPassword->copy()
+ : (GooString *)NULL,
+ userPassword ? userPassword->copy()
+ : (GooString *)NULL);
+}
+
+void *StandardSecurityHandler::getAuthData() {
+#if HAVE_XPDFCORE
+ XPDFCore *core;
+ GooString *password;
+
+ if (!(core = (XPDFCore *)doc->getGUIData()) ||
+ !(password = core->getPassword())) {
+ return NULL;
+ }
+ return new StandardAuthData(password, password->copy());
+#elif HAVE_WINPDFCORE
+ WinPDFCore *core;
+ GooString *password;
+
+ if (!(core = (WinPDFCore *)doc->getGUIData()) ||
+ !(password = core->getPassword())) {
+ return NULL;
+ }
+ return new StandardAuthData(password, password->copy());
+#else
+ return NULL;
+#endif
+}
+
+void StandardSecurityHandler::freeAuthData(void *authData) {
+ delete (StandardAuthData *)authData;
+}
+
+GBool StandardSecurityHandler::authorize(void *authData) {
+ GooString *ownerPassword, *userPassword;
+
+ if (!ok) {
+ return gFalse;
+ }
+ if (authData) {
+ ownerPassword = ((StandardAuthData *)authData)->ownerPassword;
+ userPassword = ((StandardAuthData *)authData)->userPassword;
+ } else {
+ ownerPassword = NULL;
+ userPassword = NULL;
+ }
+ if (!Decrypt::makeFileKey(encVersion, encRevision, fileKeyLength,
+ ownerKey, userKey, permFlags, fileID,
+ ownerPassword, userPassword, fileKey,
+ encryptMetadata, &ownerPasswordOk)) {
+ return gFalse;
+ }
+ return gTrue;
+}
+
+#ifdef ENABLE_PLUGINS
+
+//------------------------------------------------------------------------
+// ExternalSecurityHandler
+//------------------------------------------------------------------------
+
+ExternalSecurityHandler::ExternalSecurityHandler(PDFDoc *docA,
+ Object *encryptDictA,
+ XpdfSecurityHandler *xshA):
+ SecurityHandler(docA)
+{
+ encryptDictA->copy(&encryptDict);
+ xsh = xshA;
+ encAlgorithm = cryptRC4; //~ this should be obtained via getKey
+ ok = gFalse;
+
+ if (!(*xsh->newDoc)(xsh->handlerData, (XpdfDoc)docA,
+ (XpdfObject)encryptDictA, &docData)) {
+ return;
+ }
+
+ ok = gTrue;
+}
+
+ExternalSecurityHandler::~ExternalSecurityHandler() {
+ (*xsh->freeDoc)(xsh->handlerData, docData);
+ encryptDict.free();
+}
+
+void *ExternalSecurityHandler::makeAuthData(GooString *ownerPassword,
+ GooString *userPassword) {
+ char *opw, *upw;
+ void *authData;
+
+ opw = ownerPassword ? ownerPassword->getCString() : (char *)NULL;
+ upw = userPassword ? userPassword->getCString() : (char *)NULL;
+ if (!(*xsh->makeAuthData)(xsh->handlerData, docData, opw, upw, &authData)) {
+ return NULL;
+ }
+ return authData;
+}
+
+void *ExternalSecurityHandler::getAuthData() {
+ void *authData;
+
+ if (!(*xsh->getAuthData)(xsh->handlerData, docData, &authData)) {
+ return NULL;
+ }
+ return authData;
+}
+
+void ExternalSecurityHandler::freeAuthData(void *authData) {
+ (*xsh->freeAuthData)(xsh->handlerData, docData, authData);
+}
+
+GBool ExternalSecurityHandler::authorize(void *authData) {
+ char *key;
+ int length;
+
+ if (!ok) {
+ return gFalse;
+ }
+ permFlags = (*xsh->authorize)(xsh->handlerData, docData, authData);
+ if (!(permFlags & xpdfPermissionOpen)) {
+ return gFalse;
+ }
+ if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion)) {
+ return gFalse;
+ }
+ if ((fileKeyLength = length) > 16) {
+ fileKeyLength = 16;
+ }
+ memcpy(fileKey, key, fileKeyLength);
+ (*xsh->freeKey)(xsh->handlerData, docData, key, length);
+ return gTrue;
+}
+
+#endif // ENABLE_PLUGINS
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.h
new file mode 100644
index 00000000000..5278a6cf10d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/SecurityHandler.h
@@ -0,0 +1,162 @@
+//========================================================================
+//
+// SecurityHandler.h
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef SECURITYHANDLER_H
+#define SECURITYHANDLER_H
+
+#include "poppler-config.h"
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+
+class GooString;
+class PDFDoc;
+struct XpdfSecurityHandler;
+
+//------------------------------------------------------------------------
+// SecurityHandler
+//------------------------------------------------------------------------
+
+class SecurityHandler {
+public:
+
+ static SecurityHandler *make(PDFDoc *docA, Object *encryptDictA);
+
+ SecurityHandler(PDFDoc *docA);
+ virtual ~SecurityHandler();
+
+ // Check the document's encryption. If the document is encrypted,
+ // this will first try <ownerPassword> and <userPassword> (in
+ // "batch" mode), and if those fail, it will attempt to request a
+ // password from the user. This is the high-level function that
+ // calls the lower level functions for the specific security handler
+ // (requesting a password three times, etc.). Returns true if the
+ // document can be opened (if it's unencrypted, or if a correct
+ // password is obtained); false otherwise (encrypted and no correct
+ // password).
+ GBool checkEncryption(GooString *ownerPassword,
+ GooString *userPassword);
+
+ // Create authorization data for the specified owner and user
+ // passwords. If the security handler doesn't support "batch" mode,
+ // this function should return NULL.
+ virtual void *makeAuthData(GooString *ownerPassword,
+ GooString *userPassword) = 0;
+
+ // Construct authorization data, typically by prompting the user for
+ // a password. Returns an authorization data object, or NULL to
+ // cancel.
+ virtual void *getAuthData() = 0;
+
+ // Free the authorization data returned by makeAuthData or
+ // getAuthData.
+ virtual void freeAuthData(void *authData) = 0;
+
+ // Attempt to authorize the document, using the supplied
+ // authorization data (which may be NULL). Returns true if
+ // successful (i.e., if at least the right to open the document was
+ // granted).
+ virtual GBool authorize(void *authData) = 0;
+
+ // Return the various authorization parameters. These are only
+ // valid after authorize has returned true.
+ virtual int getPermissionFlags() = 0;
+ virtual GBool getOwnerPasswordOk() = 0;
+ virtual Guchar *getFileKey() = 0;
+ virtual int getFileKeyLength() = 0;
+ virtual int getEncVersion() = 0;
+ virtual int getEncRevision() = 0;
+ virtual CryptAlgorithm getEncAlgorithm() = 0;
+
+protected:
+
+ PDFDoc *doc;
+};
+
+//------------------------------------------------------------------------
+// StandardSecurityHandler
+//------------------------------------------------------------------------
+
+class StandardSecurityHandler: public SecurityHandler {
+public:
+
+ StandardSecurityHandler(PDFDoc *docA, Object *encryptDictA);
+ virtual ~StandardSecurityHandler();
+
+ virtual void *makeAuthData(GooString *ownerPassword,
+ GooString *userPassword);
+ virtual void *getAuthData();
+ virtual void freeAuthData(void *authData);
+ virtual GBool authorize(void *authData);
+ virtual int getPermissionFlags() { return permFlags; }
+ virtual GBool getOwnerPasswordOk() { return ownerPasswordOk; }
+ virtual Guchar *getFileKey() { return fileKey; }
+ virtual int getFileKeyLength() { return fileKeyLength; }
+ virtual int getEncVersion() { return encVersion; }
+ virtual int getEncRevision() { return encRevision; }
+ virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; }
+
+private:
+
+ int permFlags;
+ GBool ownerPasswordOk;
+ Guchar fileKey[16];
+ int fileKeyLength;
+ int encVersion;
+ int encRevision;
+ GBool encryptMetadata;
+ CryptAlgorithm encAlgorithm;
+
+ GooString *ownerKey, *userKey;
+ GooString *fileID;
+ GBool ok;
+};
+
+#ifdef ENABLE_PLUGINS
+//------------------------------------------------------------------------
+// ExternalSecurityHandler
+//------------------------------------------------------------------------
+
+class ExternalSecurityHandler: public SecurityHandler {
+public:
+
+ ExternalSecurityHandler(PDFDoc *docA, Object *encryptDictA,
+ XpdfSecurityHandler *xshA);
+ virtual ~ExternalSecurityHandler();
+
+ virtual void *makeAuthData(GooString *ownerPassword,
+ GooString *userPassword);
+ virtual void *getAuthData();
+ virtual void freeAuthData(void *authData);
+ virtual GBool authorize(void *authData);
+ virtual int getPermissionFlags() { return permFlags; }
+ virtual GBool getOwnerPasswordOk() { return gFalse; }
+ virtual Guchar *getFileKey() { return fileKey; }
+ virtual int getFileKeyLength() { return fileKeyLength; }
+ virtual int getEncVersion() { return encVersion; }
+ virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; }
+
+private:
+
+ Object encryptDict;
+ XpdfSecurityHandler *xsh;
+ void *docData;
+ int permFlags;
+ Guchar fileKey[16];
+ int fileKeyLength;
+ int encVersion;
+ CryptAlgorithm encAlgorithm;
+ GBool ok;
+};
+#endif // ENABLE_PLUGINS
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.cc
new file mode 100644
index 00000000000..6129fdcb47d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.cc
@@ -0,0 +1,145 @@
+/* Sound.cc - an object that holds the sound structure
+ * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2009, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "GooString.h"
+#include "Object.h"
+#include "Sound.h"
+#include "Stream.h"
+#include "FileSpec.h"
+
+Sound *Sound::parseSound(Object *obj)
+{
+ // let's try to see if this Object is a Sound, according to the PDF specs
+ // (section 9.2)
+ Stream *str = NULL;
+ // the Object must be a Stream
+ if (obj->isStream()) {
+ str = obj->getStream();
+ } else {
+ return NULL;
+ }
+ // the Stream must have a Dict
+ Dict *dict = str->getDict();
+ if (dict == NULL)
+ return NULL;
+ Object tmp;
+ // the Dict must have the 'R' key of type num
+ dict->lookup("R", &tmp);
+ if (tmp.isNum()) {
+ return new Sound(obj);
+ } else {
+ return NULL;
+ }
+}
+
+Sound::Sound(Object *obj, bool readAttrs)
+{
+ streamObj = new Object();
+ streamObj->initNull();
+ obj->copy(streamObj);
+
+ fileName = NULL;
+ samplingRate = 0.0;
+ channels = 1;
+ bitsPerSample = 8;
+ encoding = soundRaw;
+
+ if (readAttrs)
+ {
+ Object tmp;
+ Dict *dict = streamObj->getStream()->getDict();
+ dict->lookup("F", &tmp);
+ if (!tmp.isNull()) {
+ Object obj1;
+ // valid 'F' key -> external file
+ kind = soundExternal;
+ if (getFileSpecNameForPlatform (&tmp, &obj1)) {
+ fileName = obj1.getString()->copy();
+ obj1.free();
+ }
+ } else {
+ // no file specification, then the sound data have to be
+ // extracted from the stream
+ kind = soundEmbedded;
+ }
+ tmp.free();
+ // sampling rate
+ dict->lookup("R", &tmp);
+ if (tmp.isNum()) {
+ samplingRate = tmp.getNum();
+ }
+ tmp.free();
+ // sound channels
+ dict->lookup("C", &tmp);
+ if (tmp.isInt()) {
+ channels = tmp.getInt();
+ }
+ tmp.free();
+ // bits per sample
+ dict->lookup("B", &tmp);
+ if (tmp.isInt()) {
+ bitsPerSample = tmp.getInt();
+ }
+ tmp.free();
+ // encoding format
+ dict->lookup("E", &tmp);
+ if (tmp.isName())
+ {
+ const char *enc = tmp.getName();
+ if (strcmp("Raw", enc) == 0) {
+ encoding = soundRaw;
+ } else if (strcmp("Signed", enc) == 0) {
+ encoding = soundSigned;
+ } else if (strcmp("muLaw", enc) == 0) {
+ encoding = soundMuLaw;
+ } else if (strcmp("ALaw", enc) == 0) {
+ encoding = soundALaw;
+ }
+ }
+ tmp.free();
+ }
+}
+
+Sound::~Sound()
+{
+ delete fileName;
+ streamObj->free();
+ delete streamObj;
+}
+
+Stream *Sound::getStream()
+{
+ return streamObj->getStream();
+}
+
+Sound *Sound::copy()
+{
+ Sound *newsound = new Sound(streamObj, false);
+
+ newsound->kind = kind;
+ if (fileName) {
+ newsound->fileName = fileName->copy();
+ }
+ newsound->samplingRate = samplingRate;
+ newsound->channels = channels;
+ newsound->bitsPerSample = bitsPerSample;
+ newsound->encoding = encoding;
+
+ return newsound;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.h
new file mode 100644
index 00000000000..acb0f8d9acd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Sound.h
@@ -0,0 +1,74 @@
+/* Sound.h - an object that holds the sound structure
+ * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef Sound_H
+#define Sound_H
+
+class GooString;
+class Object;
+class Stream;
+
+//------------------------------------------------------------------------
+
+enum SoundKind {
+ soundEmbedded, // embedded sound
+ soundExternal // external sound
+};
+
+enum SoundEncoding {
+ soundRaw, // raw encoding
+ soundSigned, // twos-complement values
+ soundMuLaw, // mu-law-encoded samples
+ soundALaw // A-law-encoded samples
+};
+
+class Sound
+{
+public:
+ // Try to parse the Object s
+ static Sound *parseSound(Object *s);
+
+ // Destructor
+ ~Sound();
+
+ Object *getObject() { return streamObj; }
+ Stream *getStream();
+
+ SoundKind getSoundKind() { return kind; }
+ GooString *getFileName() { return fileName; }
+ double getSamplingRate() { return samplingRate; }
+ int getChannels() { return channels; }
+ int getBitsPerSample() { return bitsPerSample; }
+ SoundEncoding getEncoding() { return encoding; }
+
+ Sound *copy();
+
+private:
+ // Create a sound. The Object obj is ensured to be a Stream with a Dict
+ Sound(Object *obj, bool readAttrs = true);
+
+ Object *streamObj;
+ SoundKind kind;
+ GooString *fileName;
+ double samplingRate;
+ int channels;
+ int bitsPerSample;
+ SoundEncoding encoding;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.cc
new file mode 100644
index 00000000000..4d51a423932
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.cc
@@ -0,0 +1,3114 @@
+//========================================================================
+//
+// SplashOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
+// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include <math.h>
+#include "goo/gfile.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "Object.h"
+#include "GfxFont.h"
+#include "Link.h"
+#include "CharCodeToUnicode.h"
+#include "FontEncodingTables.h"
+#include "fofi/FoFiTrueType.h"
+#include "splash/SplashBitmap.h"
+#include "splash/SplashGlyphBitmap.h"
+#include "splash/SplashPattern.h"
+#include "splash/SplashScreen.h"
+#include "splash/SplashPath.h"
+#include "splash/SplashState.h"
+#include "splash/SplashErrorCodes.h"
+#include "splash/SplashFontEngine.h"
+#include "splash/SplashFont.h"
+#include "splash/SplashFontFile.h"
+#include "splash/SplashFontFileID.h"
+#include "splash/Splash.h"
+#include "SplashOutputDev.h"
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+//------------------------------------------------------------------------
+
+// Divide a 16-bit value (in [0, 255*255]) by 255, returning an 8-bit result.
+static inline Guchar div255(int x) {
+ return (Guchar)((x + (x >> 8) + 0x80) >> 8);
+}
+
+#if SPLASH_CMYK
+
+#include "GfxState_helpers.h"
+
+//-------------------------------------------------------------------------
+// helper for Blend functions (convert CMYK to RGB, do blend, convert back)
+//-------------------------------------------------------------------------
+
+// based in GfxState.cc
+
+static void cmykToRGB(SplashColorPtr cmyk, SplashColor rgb) {
+ double c, m, y, k, c1, m1, y1, k1, r, g, b;
+
+ c = colToDbl(byteToCol(cmyk[0]));
+ m = colToDbl(byteToCol(cmyk[1]));
+ y = colToDbl(byteToCol(cmyk[2]));
+ k = colToDbl(byteToCol(cmyk[3]));
+ c1 = 1 - c;
+ m1 = 1 - m;
+ y1 = 1 - y;
+ k1 = 1 - k;
+ cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b);
+ rgb[0] = colToByte(clip01(dblToCol(r)));
+ rgb[1] = colToByte(clip01(dblToCol(g)));
+ rgb[2] = colToByte(clip01(dblToCol(b)));
+}
+
+static void rgbToCMYK(SplashColor rgb, SplashColorPtr cmyk) {
+ GfxColorComp c, m, y, k;
+
+ c = clip01(gfxColorComp1 - byteToCol(rgb[0]));
+ m = clip01(gfxColorComp1 - byteToCol(rgb[1]));
+ y = clip01(gfxColorComp1 - byteToCol(rgb[2]));
+ k = c;
+ if (m < k) {
+ k = m;
+ }
+ if (y < k) {
+ k = y;
+ }
+ cmyk[0] = colToByte(c - k);
+ cmyk[1] = colToByte(m - k);
+ cmyk[2] = colToByte(y - k);
+ cmyk[3] = colToByte(k);
+}
+
+#endif
+
+//------------------------------------------------------------------------
+// Blend functions
+//------------------------------------------------------------------------
+
+static void splashOutBlendMultiply(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = (rgbDest[i] * rgbSrc[i]) / 255;
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = (dest[i] * src[i]) / 255;
+ }
+ }
+}
+
+static void splashOutBlendScreen(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbDest[i] + rgbSrc[i] - (rgbDest[i] * rgbSrc[i]) / 255;
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = dest[i] + src[i] - (dest[i] * src[i]) / 255;
+ }
+ }
+}
+
+static void splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbDest[i] < 0x80
+ ? (rgbSrc[i] * 2 * rgbDest[i]) / 255
+ : 255 - 2 * ((255 - rgbSrc[i]) * (255 - rgbDest[i])) / 255;
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = dest[i] < 0x80
+ ? (src[i] * 2 * dest[i]) / 255
+ : 255 - 2 * ((255 - src[i]) * (255 - dest[i])) / 255;
+ }
+ }
+}
+
+static void splashOutBlendDarken(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbDest[i] < rgbSrc[i] ? rgbDest[i] : rgbSrc[i];
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = dest[i] < src[i] ? dest[i] : src[i];
+ }
+ }
+}
+
+static void splashOutBlendLighten(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbDest[i] > rgbSrc[i] ? rgbDest[i] : rgbSrc[i];
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = dest[i] > src[i] ? dest[i] : src[i];
+ }
+ }
+}
+
+static void splashOutBlendColorDodge(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend,
+ SplashColorMode cm) {
+ int i, x;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ if (rgbSrc[i] == 255) {
+ rgbBlend[i] = 255;
+ } else {
+ x = (rgbDest[i] * 255) / (255 - rgbSrc[i]);
+ rgbBlend[i] = x <= 255 ? x : 255;
+ }
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ if (src[i] == 255) {
+ blend[i] = 255;
+ } else {
+ x = (dest[i] * 255) / (255 - src[i]);
+ blend[i] = x <= 255 ? x : 255;
+ }
+ }
+ }
+}
+
+static void splashOutBlendColorBurn(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i, x;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ if (rgbSrc[i] == 0) {
+ rgbBlend[i] = 0;
+ } else {
+ x = ((255 - rgbDest[i]) * 255) / rgbSrc[i];
+ rgbBlend[i] = x <= 255 ? 255 - x : 0;
+ }
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ if (src[i] == 0) {
+ blend[i] = 0;
+ } else {
+ x = ((255 - dest[i]) * 255) / src[i];
+ blend[i] = x <= 255 ? 255 - x : 0;
+ }
+ }
+ }
+}
+
+static void splashOutBlendHardLight(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbSrc[i] < 0x80
+ ? (rgbDest[i] * 2 * rgbSrc[i]) / 255
+ : 255 - 2 * ((255 - rgbDest[i]) * (255 - rgbSrc[i])) / 255;
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = src[i] < 0x80
+ ? (dest[i] * 2 * src[i]) / 255
+ : 255 - 2 * ((255 - dest[i]) * (255 - src[i])) / 255;
+ }
+ }
+}
+
+static void splashOutBlendSoftLight(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i, x;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ if (rgbSrc[i] < 0x80) {
+ rgbBlend[i] = rgbDest[i] - (255 - 2 * rgbSrc[i]) * rgbDest[i] * (255 - rgbDest[i]) / (255 * 255);
+ } else {
+ if (rgbDest[i] < 0x40) {
+ x = (((((16 * rgbDest[i] - 12 * 255) * rgbDest[i]) / 255) + 4 * 255) * rgbDest[i]) / 255;
+ } else {
+ x = (int)sqrt(255.0 * rgbDest[i]);
+ }
+ rgbBlend[i] = rgbDest[i] + (2 * rgbSrc[i] - 255) * (x - rgbDest[i]) / 255;
+ }
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ if (src[i] < 0x80) {
+ blend[i] = dest[i] - (255 - 2 * src[i]) * dest[i] * (255 - dest[i]) / (255 * 255);
+ } else {
+ if (dest[i] < 0x40) {
+ x = (((((16 * dest[i] - 12 * 255) * dest[i]) / 255) + 4 * 255) * dest[i]) / 255;
+ } else {
+ x = (int)sqrt(255.0 * dest[i]);
+ }
+ blend[i] = dest[i] + (2 * src[i] - 255) * (x - dest[i]) / 255;
+ }
+ }
+ }
+}
+
+static void splashOutBlendDifference(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend,
+ SplashColorMode cm) {
+ int i;
+
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8)
+ {
+ blend[i] = dest[i] < src[i] ? 255 - (src[i] - dest[i]) : 255 - (dest[i] - src[i]);
+ }
+ else
+#endif
+ {
+ blend[i] = dest[i] < src[i] ? src[i] - dest[i] : dest[i] - src[i];
+ }
+ }
+}
+
+static void splashOutBlendExclusion(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+#ifdef SPLASH_CMYK
+ if (cm == splashModeCMYK8) {
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ for (i = 0; i < 3; ++i) {
+ rgbBlend[i] = rgbDest[i] + rgbSrc[i] - (2 * rgbDest[i] * rgbSrc[i]) / 255;
+ }
+ rgbToCMYK(rgbBlend, blend);
+ } else
+#endif
+ {
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = dest[i] + src[i] - (2 * dest[i] * src[i]) / 255;
+ }
+ }
+}
+
+static void cvtRGBToHSV(Guchar r, Guchar g, Guchar b, int *h, int *s, int *v) {
+ int cmax, cmid, cmin, x;
+
+ if (r >= g) {
+ if (g >= b) { x = 0; cmax = r; cmid = g; cmin = b; }
+ else if (b >= r) { x = 4; cmax = b; cmid = r; cmin = g; }
+ else { x = 5; cmax = r; cmid = b; cmin = g; }
+ } else {
+ if (r >= b) { x = 1; cmax = g; cmid = r; cmin = b; }
+ else if (g >= b) { x = 2; cmax = g; cmid = b; cmin = r; }
+ else { x = 3; cmax = b; cmid = g; cmin = r; }
+ }
+ if (cmax == cmin) {
+ *h = *s = 0;
+ } else {
+ *h = x * 60;
+ if (x & 1) {
+ *h += ((cmax - cmid) * 60) / (cmax - cmin);
+ } else {
+ *h += ((cmid - cmin) * 60) / (cmax - cmin);
+ }
+ *s = (255 * (cmax - cmin)) / cmax;
+ }
+ *v = cmax;
+}
+
+static void cvtHSVToRGB(int h, int s, int v, Guchar *r, Guchar *g, Guchar *b) {
+ int x, f, cmax, cmid, cmin;
+
+ if (s == 0) {
+ *r = *g = *b = v;
+ } else {
+ x = h / 60;
+ f = h % 60;
+ cmax = v;
+ if (x & 1) {
+ cmid = div255(v * 255 - ((s * f) / 60));
+ } else {
+ cmid = div255(v * (255 - ((s * (60 - f)) / 60)));
+ }
+ cmin = div255(v * (255 - s));
+ switch (x) {
+ case 0: *r = cmax; *g = cmid; *b = cmin; break;
+ case 1: *g = cmax; *r = cmid; *b = cmin; break;
+ case 2: *g = cmax; *b = cmid; *r = cmin; break;
+ case 3: *b = cmax; *g = cmid; *r = cmin; break;
+ case 4: *b = cmax; *r = cmid; *g = cmin; break;
+ case 5: *r = cmax; *b = cmid; *g = cmin; break;
+ }
+ }
+}
+
+static void splashOutBlendHue(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int hs, ss, vs, hd, sd, vd;
+#if SPLASH_CMYK
+ Guchar r, g, b;
+#endif
+
+ switch (cm) {
+ case splashModeMono1:
+ case splashModeMono8:
+ blend[0] = dest[0];
+ break;
+ case splashModeXBGR8:
+ src[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs);
+ cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd);
+ cvtHSVToRGB(hs, sd, vd, &blend[0], &blend[1], &blend[2]);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ //~ (0xff - ...) should be clipped
+ cvtRGBToHSV(0xff - (src[0] + src[3]),
+ 0xff - (src[1] + src[3]),
+ 0xff - (src[2] + src[3]), &hs, &ss, &vs);
+ cvtRGBToHSV(0xff - (dest[0] + dest[3]),
+ 0xff - (dest[1] + dest[3]),
+ 0xff - (dest[2] + dest[3]), &hd, &sd, &vd);
+ cvtHSVToRGB(hs, sd, vd, &r, &g, &b);
+ //~ should do black generation
+ blend[0] = 0xff - r;
+ blend[1] = 0xff - g;
+ blend[2] = 0xff - b;
+ blend[3] = 0;
+ break;
+#endif
+ }
+}
+
+static void splashOutBlendSaturation(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend,
+ SplashColorMode cm) {
+ int hs, ss, vs, hd, sd, vd;
+#if SPLASH_CMYK
+ Guchar r, g, b;
+#endif
+
+ switch (cm) {
+ case splashModeMono1:
+ case splashModeMono8:
+ blend[0] = dest[0];
+ break;
+ case splashModeXBGR8:
+ src[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs);
+ cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd);
+ cvtHSVToRGB(hd, ss, vd, &blend[0], &blend[1], &blend[2]);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ //~ (0xff - ...) should be clipped
+ cvtRGBToHSV(0xff - (src[0] + src[3]),
+ 0xff - (src[1] + src[3]),
+ 0xff - (src[2] + src[3]), &hs, &ss, &vs);
+ cvtRGBToHSV(0xff - (dest[0] + dest[3]),
+ 0xff - (dest[1] + dest[3]),
+ 0xff - (dest[2] + dest[3]), &hd, &sd, &vd);
+ cvtHSVToRGB(hd, ss, vd, &r, &g, &b);
+ //~ should do black generation
+ blend[0] = 0xff - r;
+ blend[1] = 0xff - g;
+ blend[2] = 0xff - b;
+ blend[3] = 0;
+ break;
+#endif
+ }
+}
+
+static void splashOutBlendColor(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int hs, ss, vs, hd, sd, vd;
+
+ switch (cm) {
+ case splashModeMono1:
+ case splashModeMono8:
+ blend[0] = dest[0];
+ break;
+ case splashModeXBGR8:
+ src[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs);
+ cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd);
+ cvtHSVToRGB(hs, ss, vd, &blend[0], &blend[1], &blend[2]);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ SplashColor rgbSrc;
+ SplashColor rgbDest;
+ SplashColor rgbBlend;
+ cmykToRGB(src, rgbSrc);
+ cmykToRGB(dest, rgbDest);
+ cvtRGBToHSV(rgbSrc[0], rgbSrc[1], rgbSrc[2], &hs, &ss, &vs);
+ cvtRGBToHSV(rgbDest[0], rgbDest[1], rgbDest[2], &hd, &sd, &vd);
+ cvtHSVToRGB(hs, ss, vd, &rgbBlend[0], &rgbBlend[1], &rgbBlend[2]);
+ rgbToCMYK(rgbBlend, blend);
+ break;
+#endif
+ }
+}
+
+static void splashOutBlendLuminosity(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend,
+ SplashColorMode cm) {
+ int hs, ss, vs, hd, sd, vd;
+#if SPLASH_CMYK
+ Guchar r, g, b;
+#endif
+
+ switch (cm) {
+ case splashModeMono1:
+ case splashModeMono8:
+ blend[0] = dest[0];
+ break;
+ case splashModeXBGR8:
+ src[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs);
+ cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd);
+ cvtHSVToRGB(hd, sd, vs, &blend[0], &blend[1], &blend[2]);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ //~ (0xff - ...) should be clipped
+ cvtRGBToHSV(0xff - (src[0] + src[3]),
+ 0xff - (src[1] + src[3]),
+ 0xff - (src[2] + src[3]), &hs, &ss, &vs);
+ cvtRGBToHSV(0xff - (dest[0] + dest[3]),
+ 0xff - (dest[1] + dest[3]),
+ 0xff - (dest[2] + dest[3]), &hd, &sd, &vd);
+ cvtHSVToRGB(hd, sd, vs, &r, &g, &b);
+ //~ should do black generation
+ blend[0] = 0xff - r;
+ blend[1] = 0xff - g;
+ blend[2] = 0xff - b;
+ blend[3] = 0;
+ break;
+#endif
+ }
+}
+
+// NB: This must match the GfxBlendMode enum defined in GfxState.h.
+static const SplashBlendFunc splashOutBlendFuncs[] = {
+ NULL,
+ &splashOutBlendMultiply,
+ &splashOutBlendScreen,
+ &splashOutBlendOverlay,
+ &splashOutBlendDarken,
+ &splashOutBlendLighten,
+ &splashOutBlendColorDodge,
+ &splashOutBlendColorBurn,
+ &splashOutBlendHardLight,
+ &splashOutBlendSoftLight,
+ &splashOutBlendDifference,
+ &splashOutBlendExclusion,
+ &splashOutBlendHue,
+ &splashOutBlendSaturation,
+ &splashOutBlendColor,
+ &splashOutBlendLuminosity
+};
+
+//------------------------------------------------------------------------
+// SplashOutFontFileID
+//------------------------------------------------------------------------
+
+class SplashOutFontFileID: public SplashFontFileID {
+public:
+
+ SplashOutFontFileID(Ref *rA) { r = *rA; }
+
+ ~SplashOutFontFileID() {}
+
+ GBool matches(SplashFontFileID *id) {
+ return ((SplashOutFontFileID *)id)->r.num == r.num &&
+ ((SplashOutFontFileID *)id)->r.gen == r.gen;
+ }
+
+private:
+
+ Ref r;
+};
+
+//------------------------------------------------------------------------
+// T3FontCache
+//------------------------------------------------------------------------
+
+struct T3FontCacheTag {
+ Gushort code;
+ Gushort mru; // valid bit (0x8000) and MRU index
+};
+
+class T3FontCache {
+public:
+
+ T3FontCache(Ref *fontID, double m11A, double m12A,
+ double m21A, double m22A,
+ int glyphXA, int glyphYA, int glyphWA, int glyphHA,
+ GBool aa, GBool validBBoxA);
+ ~T3FontCache();
+ GBool matches(Ref *idA, double m11A, double m12A,
+ double m21A, double m22A)
+ { return fontID.num == idA->num && fontID.gen == idA->gen &&
+ m11 == m11A && m12 == m12A && m21 == m21A && m22 == m22A; }
+
+ Ref fontID; // PDF font ID
+ double m11, m12, m21, m22; // transform matrix
+ int glyphX, glyphY; // pixel offset of glyph bitmaps
+ int glyphW, glyphH; // size of glyph bitmaps, in pixels
+ GBool validBBox; // false if the bbox was [0 0 0 0]
+ int glyphSize; // size of glyph bitmaps, in bytes
+ int cacheSets; // number of sets in cache
+ int cacheAssoc; // cache associativity (glyphs per set)
+ Guchar *cacheData; // glyph pixmap cache
+ T3FontCacheTag *cacheTags; // cache tags, i.e., char codes
+};
+
+T3FontCache::T3FontCache(Ref *fontIDA, double m11A, double m12A,
+ double m21A, double m22A,
+ int glyphXA, int glyphYA, int glyphWA, int glyphHA,
+ GBool validBBoxA, GBool aa) {
+ int i;
+
+ fontID = *fontIDA;
+ m11 = m11A;
+ m12 = m12A;
+ m21 = m21A;
+ m22 = m22A;
+ glyphX = glyphXA;
+ glyphY = glyphYA;
+ glyphW = glyphWA;
+ glyphH = glyphHA;
+ validBBox = validBBoxA;
+ if (aa) {
+ glyphSize = glyphW * glyphH;
+ } else {
+ glyphSize = ((glyphW + 7) >> 3) * glyphH;
+ }
+ cacheAssoc = 8;
+ if (glyphSize <= 256) {
+ cacheSets = 8;
+ } else if (glyphSize <= 512) {
+ cacheSets = 4;
+ } else if (glyphSize <= 1024) {
+ cacheSets = 2;
+ } else if (glyphSize <= 2048) {
+ cacheSets = 1;
+ cacheAssoc = 4;
+ } else if (glyphSize <= 4096) {
+ cacheSets = 1;
+ cacheAssoc = 2;
+ } else {
+ cacheSets = 1;
+ cacheAssoc = 1;
+ }
+ if (glyphSize < 10485760 / cacheAssoc / cacheSets) {
+ cacheData = (Guchar *)gmallocn_checkoverflow(cacheSets * cacheAssoc, glyphSize);
+ } else {
+ error(-1, "Not creating cacheData for T3FontCache, it asked for too much memory.\n"
+ " This could teoretically result in wrong rendering,\n"
+ " but most probably the document is bogus.\n"
+ " Please report a bug if you think the rendering may be wrong because of this.");
+ cacheData = NULL;
+ }
+ if (cacheData != NULL)
+ {
+ cacheTags = (T3FontCacheTag *)gmallocn(cacheSets * cacheAssoc,
+ sizeof(T3FontCacheTag));
+ for (i = 0; i < cacheSets * cacheAssoc; ++i) {
+ cacheTags[i].mru = i & (cacheAssoc - 1);
+ }
+ }
+ else
+ {
+ cacheTags = NULL;
+ }
+}
+
+T3FontCache::~T3FontCache() {
+ gfree(cacheData);
+ gfree(cacheTags);
+}
+
+struct T3GlyphStack {
+ Gushort code; // character code
+
+ //----- cache info
+ T3FontCache *cache; // font cache for the current font
+ T3FontCacheTag *cacheTag; // pointer to cache tag for the glyph
+ Guchar *cacheData; // pointer to cache data for the glyph
+
+ //----- saved state
+ SplashBitmap *origBitmap;
+ Splash *origSplash;
+ double origCTM4, origCTM5;
+
+ T3GlyphStack *next; // next object on stack
+};
+
+//------------------------------------------------------------------------
+// SplashTransparencyGroup
+//------------------------------------------------------------------------
+
+struct SplashTransparencyGroup {
+ int tx, ty; // translation coordinates
+ SplashBitmap *tBitmap; // bitmap for transparency group
+ GfxColorSpace *blendingColorSpace;
+ GBool isolated;
+
+ //----- saved state
+ SplashBitmap *origBitmap;
+ Splash *origSplash;
+
+ SplashTransparencyGroup *next;
+};
+
+//------------------------------------------------------------------------
+// SplashOutputDev
+//------------------------------------------------------------------------
+
+SplashOutputDev::SplashOutputDev(SplashColorMode colorModeA,
+ int bitmapRowPadA,
+ GBool reverseVideoA,
+ SplashColorPtr paperColorA,
+ GBool bitmapTopDownA,
+ GBool allowAntialiasA) {
+ colorMode = colorModeA;
+ bitmapRowPad = bitmapRowPadA;
+ bitmapTopDown = bitmapTopDownA;
+ allowAntialias = allowAntialiasA;
+ vectorAntialias = allowAntialias &&
+ globalParams->getVectorAntialias() &&
+ colorMode != splashModeMono1;
+ enableFreeTypeHinting = gFalse;
+ setupScreenParams(72.0, 72.0);
+ reverseVideo = reverseVideoA;
+ if (paperColorA != NULL) {
+ splashColorCopy(paperColor, paperColorA);
+ } else {
+ splashClearColor(paperColor);
+ }
+ keepAlphaChannel = paperColorA == NULL;
+
+ xref = NULL;
+
+ bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode,
+ colorMode != splashModeMono1, bitmapTopDown);
+ splash = new Splash(bitmap, vectorAntialias, &screenParams);
+ splash->clear(paperColor, 0);
+
+ fontEngine = NULL;
+
+ nT3Fonts = 0;
+ t3GlyphStack = NULL;
+
+ font = NULL;
+ needFontUpdate = gFalse;
+ textClipPath = NULL;
+ haveCSPattern = gFalse;
+ transpGroupStack = NULL;
+}
+
+void SplashOutputDev::setupScreenParams(double hDPI, double vDPI) {
+ screenParams.size = globalParams->getScreenSize();
+ screenParams.dotRadius = globalParams->getScreenDotRadius();
+ screenParams.gamma = (SplashCoord)globalParams->getScreenGamma();
+ screenParams.blackThreshold =
+ (SplashCoord)globalParams->getScreenBlackThreshold();
+ screenParams.whiteThreshold =
+ (SplashCoord)globalParams->getScreenWhiteThreshold();
+ switch (globalParams->getScreenType()) {
+ case screenDispersed:
+ screenParams.type = splashScreenDispersed;
+ if (screenParams.size < 0) {
+ screenParams.size = 4;
+ }
+ break;
+ case screenClustered:
+ screenParams.type = splashScreenClustered;
+ if (screenParams.size < 0) {
+ screenParams.size = 10;
+ }
+ break;
+ case screenStochasticClustered:
+ screenParams.type = splashScreenStochasticClustered;
+ if (screenParams.size < 0) {
+ screenParams.size = 100;
+ }
+ if (screenParams.dotRadius < 0) {
+ screenParams.dotRadius = 2;
+ }
+ break;
+ case screenUnset:
+ default:
+ // use clustered dithering for resolution >= 300 dpi
+ // (compare to 299.9 to avoid floating point issues)
+ if (hDPI > 299.9 && vDPI > 299.9) {
+ screenParams.type = splashScreenStochasticClustered;
+ if (screenParams.size < 0) {
+ screenParams.size = 100;
+ }
+ if (screenParams.dotRadius < 0) {
+ screenParams.dotRadius = 2;
+ }
+ } else {
+ screenParams.type = splashScreenDispersed;
+ if (screenParams.size < 0) {
+ screenParams.size = 4;
+ }
+ }
+ }
+}
+
+SplashOutputDev::~SplashOutputDev() {
+ int i;
+
+ for (i = 0; i < nT3Fonts; ++i) {
+ delete t3FontCache[i];
+ }
+ if (fontEngine) {
+ delete fontEngine;
+ }
+ if (splash) {
+ delete splash;
+ }
+ if (bitmap) {
+ delete bitmap;
+ }
+}
+
+void SplashOutputDev::startDoc(XRef *xrefA) {
+ int i;
+
+ xref = xrefA;
+ if (fontEngine) {
+ delete fontEngine;
+ }
+ fontEngine = new SplashFontEngine(
+#if HAVE_T1LIB_H
+ globalParams->getEnableT1lib(),
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ globalParams->getEnableFreeType(),
+ enableFreeTypeHinting,
+#endif
+ allowAntialias &&
+ globalParams->getAntialias() &&
+ colorMode != splashModeMono1);
+ for (i = 0; i < nT3Fonts; ++i) {
+ delete t3FontCache[i];
+ }
+ nT3Fonts = 0;
+}
+
+void SplashOutputDev::startPage(int pageNum, GfxState *state) {
+ int w, h;
+ double *ctm;
+ SplashCoord mat[6];
+ SplashColor color;
+
+ if (state) {
+ setupScreenParams(state->getHDPI(), state->getVDPI());
+ w = (int)(state->getPageWidth() + 0.5);
+ if (w <= 0) {
+ w = 1;
+ }
+ h = (int)(state->getPageHeight() + 0.5);
+ if (h <= 0) {
+ h = 1;
+ }
+ } else {
+ w = h = 1;
+ }
+ if (splash) {
+ delete splash;
+ }
+ if (!bitmap || w != bitmap->getWidth() || h != bitmap->getHeight()) {
+ if (bitmap) {
+ delete bitmap;
+ }
+ bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode,
+ colorMode != splashModeMono1, bitmapTopDown);
+ }
+ splash = new Splash(bitmap, vectorAntialias, &screenParams);
+ if (state) {
+ ctm = state->getCTM();
+ mat[0] = (SplashCoord)ctm[0];
+ mat[1] = (SplashCoord)ctm[1];
+ mat[2] = (SplashCoord)ctm[2];
+ mat[3] = (SplashCoord)ctm[3];
+ mat[4] = (SplashCoord)ctm[4];
+ mat[5] = (SplashCoord)ctm[5];
+ splash->setMatrix(mat);
+ }
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ color[0] = 0;
+ break;
+ case splashModeXBGR8:
+ color[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ color[0] = color[1] = color[2] = 0;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ color[0] = color[1] = color[2] = color[3] = 0;
+ break;
+#endif
+ }
+ splash->setStrokePattern(new SplashSolidColor(color));
+ splash->setFillPattern(new SplashSolidColor(color));
+ splash->setLineCap(splashLineCapButt);
+ splash->setLineJoin(splashLineJoinMiter);
+ splash->setLineDash(NULL, 0, 0);
+ splash->setMiterLimit(10);
+ splash->setFlatness(1);
+ // the SA parameter supposedly defaults to false, but Acrobat
+ // apparently hardwires it to true
+ splash->setStrokeAdjust(globalParams->getStrokeAdjust());
+ splash->clear(paperColor, 0);
+}
+
+void SplashOutputDev::endPage() {
+ if (colorMode != splashModeMono1 && !keepAlphaChannel) {
+ splash->compositeBackground(paperColor);
+ }
+}
+
+void SplashOutputDev::saveState(GfxState *state) {
+ splash->saveState();
+}
+
+void SplashOutputDev::restoreState(GfxState *state) {
+ splash->restoreState();
+ needFontUpdate = gTrue;
+}
+
+void SplashOutputDev::updateAll(GfxState *state) {
+ updateLineDash(state);
+ updateLineJoin(state);
+ updateLineCap(state);
+ updateLineWidth(state);
+ updateFlatness(state);
+ updateMiterLimit(state);
+ updateStrokeAdjust(state);
+ updateFillColor(state);
+ updateStrokeColor(state);
+ needFontUpdate = gTrue;
+}
+
+void SplashOutputDev::updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22,
+ double m31, double m32) {
+ double *ctm;
+ SplashCoord mat[6];
+
+ ctm = state->getCTM();
+ mat[0] = (SplashCoord)ctm[0];
+ mat[1] = (SplashCoord)ctm[1];
+ mat[2] = (SplashCoord)ctm[2];
+ mat[3] = (SplashCoord)ctm[3];
+ mat[4] = (SplashCoord)ctm[4];
+ mat[5] = (SplashCoord)ctm[5];
+ splash->setMatrix(mat);
+}
+
+void SplashOutputDev::updateLineDash(GfxState *state) {
+ double *dashPattern;
+ int dashLength;
+ double dashStart;
+ SplashCoord dash[20];
+ int i;
+
+ state->getLineDash(&dashPattern, &dashLength, &dashStart);
+ if (dashLength > 20) {
+ dashLength = 20;
+ }
+ for (i = 0; i < dashLength; ++i) {
+ dash[i] = (SplashCoord)dashPattern[i];
+ if (dash[i] < 0) {
+ dash[i] = 0;
+ }
+ }
+ splash->setLineDash(dash, dashLength, (SplashCoord)dashStart);
+}
+
+void SplashOutputDev::updateFlatness(GfxState *state) {
+ splash->setFlatness(state->getFlatness());
+}
+
+void SplashOutputDev::updateLineJoin(GfxState *state) {
+ splash->setLineJoin(state->getLineJoin());
+}
+
+void SplashOutputDev::updateLineCap(GfxState *state) {
+ splash->setLineCap(state->getLineCap());
+}
+
+void SplashOutputDev::updateMiterLimit(GfxState *state) {
+ splash->setMiterLimit(state->getMiterLimit());
+}
+
+void SplashOutputDev::updateLineWidth(GfxState *state) {
+ splash->setLineWidth(state->getLineWidth());
+}
+
+void SplashOutputDev::updateStrokeAdjust(GfxState * /*state*/) {
+#if 0 // the SA parameter supposedly defaults to false, but Acrobat
+ // apparently hardwires it to true
+ splash->setStrokeAdjust(state->getStrokeAdjust());
+#endif
+}
+
+void SplashOutputDev::updateFillColor(GfxState *state) {
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+
+ state->getFillGray(&gray);
+ state->getFillRGB(&rgb);
+#if SPLASH_CMYK
+ state->getFillCMYK(&cmyk);
+ splash->setFillPattern(getColor(gray, &rgb, &cmyk));
+#else
+ splash->setFillPattern(getColor(gray, &rgb));
+#endif
+}
+
+void SplashOutputDev::updateStrokeColor(GfxState *state) {
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+
+ state->getStrokeGray(&gray);
+ state->getStrokeRGB(&rgb);
+#if SPLASH_CMYK
+ state->getStrokeCMYK(&cmyk);
+ splash->setStrokePattern(getColor(gray, &rgb, &cmyk));
+#else
+ splash->setStrokePattern(getColor(gray, &rgb));
+#endif
+}
+
+#if SPLASH_CMYK
+SplashPattern *SplashOutputDev::getColor(GfxGray gray, GfxRGB *rgb,
+ GfxCMYK *cmyk) {
+#else
+SplashPattern *SplashOutputDev::getColor(GfxGray gray, GfxRGB *rgb) {
+#endif
+ SplashPattern *pattern;
+ SplashColor color;
+ GfxColorComp r, g, b;
+
+ if (reverseVideo) {
+ gray = gfxColorComp1 - gray;
+ r = gfxColorComp1 - rgb->r;
+ g = gfxColorComp1 - rgb->g;
+ b = gfxColorComp1 - rgb->b;
+ } else {
+ r = rgb->r;
+ g = rgb->g;
+ b = rgb->b;
+ }
+
+ pattern = NULL; // make gcc happy
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ color[0] = colToByte(gray);
+ pattern = new SplashSolidColor(color);
+ break;
+ case splashModeXBGR8:
+ color[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ color[0] = colToByte(r);
+ color[1] = colToByte(g);
+ color[2] = colToByte(b);
+ pattern = new SplashSolidColor(color);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ color[0] = colToByte(cmyk->c);
+ color[1] = colToByte(cmyk->m);
+ color[2] = colToByte(cmyk->y);
+ color[3] = colToByte(cmyk->k);
+ pattern = new SplashSolidColor(color);
+ break;
+#endif
+ }
+
+ return pattern;
+}
+
+void SplashOutputDev::updateBlendMode(GfxState *state) {
+ splash->setBlendFunc(splashOutBlendFuncs[state->getBlendMode()]);
+}
+
+void SplashOutputDev::updateFillOpacity(GfxState *state) {
+ splash->setFillAlpha((SplashCoord)state->getFillOpacity());
+}
+
+void SplashOutputDev::updateStrokeOpacity(GfxState *state) {
+ splash->setStrokeAlpha((SplashCoord)state->getStrokeOpacity());
+}
+
+void SplashOutputDev::updateFont(GfxState * /*state*/) {
+ needFontUpdate = gTrue;
+}
+
+void SplashOutputDev::updateRender(GfxState *state) {
+ int rm;
+ rm = state->getRender();
+ if (rm == 7 && haveCSPattern) {
+ haveCSPattern = gFalse;
+ restoreState(state);
+ }
+}
+
+void SplashOutputDev::doUpdateFont(GfxState *state) {
+ GfxFont *gfxFont;
+ GfxFontType fontType;
+ SplashOutFontFileID *id;
+ SplashFontFile *fontFile;
+ SplashFontSrc *fontsrc = NULL;
+ FoFiTrueType *ff;
+ Ref embRef;
+ Object refObj, strObj;
+ GooString *fileName;
+ char *tmpBuf;
+ int tmpBufLen;
+ Gushort *codeToGID;
+ DisplayFontParam *dfp;
+ double *textMat;
+ double m11, m12, m21, m22, fontSize;
+ SplashCoord mat[4];
+ int substIdx, n;
+ int faceIndex = 0;
+ GBool recreateFont = gFalse;
+ GBool doAdjustFontMatrix = gFalse;
+
+ needFontUpdate = gFalse;
+ font = NULL;
+ fileName = NULL;
+ tmpBuf = NULL;
+ substIdx = -1;
+ dfp = NULL;
+
+ if (!(gfxFont = state->getFont())) {
+ goto err1;
+ }
+ fontType = gfxFont->getType();
+ if (fontType == fontType3) {
+ goto err1;
+ }
+
+ // check the font file cache
+ id = new SplashOutFontFileID(gfxFont->getID());
+ if ((fontFile = fontEngine->getFontFile(id))) {
+ delete id;
+
+ } else {
+
+ // if there is an embedded font, write it to disk
+ if (gfxFont->getEmbeddedFontID(&embRef)) {
+ tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
+ if (! tmpBuf)
+ goto err2;
+
+ // if there is an external font file, use it
+ } else if (!(fileName = gfxFont->getExtFontFile())) {
+
+ // look for a display font mapping or a substitute font
+ dfp = NULL;
+ if (gfxFont->getName()) {
+ dfp = globalParams->getDisplayFont(gfxFont);
+ }
+ if (!dfp) {
+ error(-1, "Couldn't find a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ switch (dfp->kind) {
+ case displayFontT1:
+ fileName = dfp->t1.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1;
+ break;
+ case displayFontTT:
+ fileName = dfp->tt.fileName;
+ fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType;
+ faceIndex = dfp->tt.faceIndex;
+ break;
+ }
+ doAdjustFontMatrix = gTrue;
+ }
+
+ fontsrc = new SplashFontSrc;
+ if (fileName)
+ fontsrc->setFile(fileName, gFalse);
+ else
+ fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
+
+ // load the font file
+ switch (fontType) {
+ case fontType1:
+ if (!(fontFile = fontEngine->loadType1Font(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontType1C:
+ if (!(fontFile = fontEngine->loadType1CFont(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontType1COT:
+ if (!(fontFile = fontEngine->loadOpenTypeT1CFont(
+ id,
+ fontsrc,
+ ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontTrueType:
+ case fontTrueTypeOT:
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+ if (ff) {
+ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+ n = 256;
+ delete ff;
+ } else {
+ codeToGID = NULL;
+ n = 0;
+ }
+ if (!(fontFile = fontEngine->loadTrueTypeFont(
+ id,
+ fontsrc,
+ codeToGID, n))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType0:
+ case fontCIDType0C:
+ if (!(fontFile = fontEngine->loadCIDFont(
+ id,
+ fontsrc))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType0COT:
+ if (!(fontFile = fontEngine->loadOpenTypeCFFFont(
+ id,
+ fontsrc))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ case fontCIDType2:
+ case fontCIDType2OT:
+ codeToGID = NULL;
+ n = 0;
+ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
+ n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
+ if (n) {
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
+ n * sizeof(Gushort));
+ }
+ } else {
+ if (fileName)
+ ff = FoFiTrueType::load(fileName->getCString());
+ else
+ ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+ if (! ff)
+ {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
+ delete ff;
+ }
+ if (!(fontFile = fontEngine->loadTrueTypeFont(
+ id,
+ fontsrc,
+ codeToGID, n, faceIndex))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+ goto err2;
+ }
+ break;
+ default:
+ // this shouldn't happen
+ goto err2;
+ }
+ fontFile->doAdjustMatrix = doAdjustFontMatrix;
+ }
+
+ // get the font matrix
+ textMat = state->getTextMat();
+ fontSize = state->getFontSize();
+ m11 = textMat[0] * fontSize * state->getHorizScaling();
+ m12 = textMat[1] * fontSize * state->getHorizScaling();
+ m21 = textMat[2] * fontSize;
+ m22 = textMat[3] * fontSize;
+
+ // create the scaled font
+ mat[0] = m11; mat[1] = m12;
+ mat[2] = m21; mat[3] = m22;
+ font = fontEngine->getFont(fontFile, mat, splash->getMatrix());
+
+ // for substituted fonts: adjust the font matrix -- compare the
+ // width of 'm' in the original font and the substituted font
+ if (fontFile->doAdjustMatrix && !gfxFont->isCIDFont()) {
+ double w1, w2;
+ CharCode code;
+ char *name;
+ for (code = 0; code < 256; ++code) {
+ if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) &&
+ name[0] == 'm' && name[1] == '\0') {
+ break;
+ }
+ }
+ if (code < 256) {
+ w1 = ((Gfx8BitFont *)gfxFont)->getWidth(code);
+ w2 = font->getGlyphAdvance(code);
+ if (!gfxFont->isSymbolic() && w2 > 0) {
+ // if real font is substantially narrower than substituted
+ // font, reduce the font size accordingly
+ if (w1 > 0.01 && w1 < 0.9 * w2) {
+ w1 /= w2;
+ m11 *= w1;
+ m21 *= w1;
+ recreateFont = gTrue;
+ }
+ }
+ }
+ }
+
+ if (recreateFont)
+ {
+ mat[0] = m11; mat[1] = m12;
+ mat[2] = m21; mat[3] = m22;
+ font = fontEngine->getFont(fontFile, mat, splash->getMatrix());
+ }
+
+ if (fontsrc && !fontsrc->isFile)
+ fontsrc->unref();
+ return;
+
+ err2:
+ delete id;
+ err1:
+ if (fontsrc && !fontsrc->isFile)
+ fontsrc->unref();
+ return;
+}
+
+void SplashOutputDev::stroke(GfxState *state) {
+ SplashPath *path;
+
+ if (state->getStrokeColorSpace()->isNonMarking()) {
+ return;
+ }
+ path = convertPath(state, state->getPath());
+ splash->stroke(path);
+ delete path;
+}
+
+void SplashOutputDev::fill(GfxState *state) {
+ SplashPath *path;
+
+ if (state->getFillColorSpace()->isNonMarking()) {
+ return;
+ }
+ path = convertPath(state, state->getPath());
+ splash->fill(path, gFalse);
+ delete path;
+}
+
+void SplashOutputDev::eoFill(GfxState *state) {
+ SplashPath *path;
+
+ if (state->getFillColorSpace()->isNonMarking()) {
+ return;
+ }
+ path = convertPath(state, state->getPath());
+ splash->fill(path, gTrue);
+ delete path;
+}
+
+void SplashOutputDev::clip(GfxState *state) {
+ SplashPath *path;
+
+ path = convertPath(state, state->getPath());
+ splash->clipToPath(path, gFalse);
+ delete path;
+}
+
+void SplashOutputDev::eoClip(GfxState *state) {
+ SplashPath *path;
+
+ path = convertPath(state, state->getPath());
+ splash->clipToPath(path, gTrue);
+ delete path;
+}
+
+void SplashOutputDev::clipToStrokePath(GfxState *state) {
+ SplashPath *path, *path2;
+
+ path = convertPath(state, state->getPath());
+ path2 = splash->makeStrokePath(path);
+ delete path;
+ splash->clipToPath(path2, gFalse);
+ delete path2;
+}
+
+SplashPath *SplashOutputDev::convertPath(GfxState * /*state*/, GfxPath *path) {
+ SplashPath *sPath;
+ GfxSubpath *subpath;
+ int i, j;
+
+ sPath = new SplashPath();
+ for (i = 0; i < path->getNumSubpaths(); ++i) {
+ subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0) {
+ sPath->moveTo((SplashCoord)subpath->getX(0),
+ (SplashCoord)subpath->getY(0));
+ j = 1;
+ while (j < subpath->getNumPoints()) {
+ if (subpath->getCurve(j)) {
+ sPath->curveTo((SplashCoord)subpath->getX(j),
+ (SplashCoord)subpath->getY(j),
+ (SplashCoord)subpath->getX(j+1),
+ (SplashCoord)subpath->getY(j+1),
+ (SplashCoord)subpath->getX(j+2),
+ (SplashCoord)subpath->getY(j+2));
+ j += 3;
+ } else {
+ sPath->lineTo((SplashCoord)subpath->getX(j),
+ (SplashCoord)subpath->getY(j));
+ ++j;
+ }
+ }
+ if (subpath->isClosed()) {
+ sPath->close();
+ }
+ }
+ }
+ return sPath;
+}
+
+void SplashOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes,
+ Unicode *u, int uLen) {
+ SplashPath *path;
+ int render;
+
+ // check for invisible text -- this is used by Acrobat Capture
+ render = state->getRender();
+ if (render == 3) {
+ return;
+ }
+
+ if (needFontUpdate) {
+ doUpdateFont(state);
+ }
+ if (!font) {
+ return;
+ }
+
+ x -= originX;
+ y -= originY;
+
+ // fill
+ if (!(render & 1)) {
+ if (!state->getFillColorSpace()->isNonMarking()) {
+ splash->fillChar((SplashCoord)x, (SplashCoord)y, code, font);
+ }
+ }
+
+ // stroke
+ if ((render & 3) == 1 || (render & 3) == 2) {
+ if (!state->getStrokeColorSpace()->isNonMarking()) {
+ if ((path = font->getGlyphPath(code))) {
+ path->offset((SplashCoord)x, (SplashCoord)y);
+ splash->stroke(path);
+ delete path;
+ }
+ }
+ }
+
+ // clip
+ if (render & 4) {
+ if ((path = font->getGlyphPath(code))) {
+ path->offset((SplashCoord)x, (SplashCoord)y);
+ if (textClipPath) {
+ textClipPath->append(path);
+ delete path;
+ } else {
+ textClipPath = path;
+ }
+ }
+ }
+}
+
+GBool SplashOutputDev::beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen) {
+ GfxFont *gfxFont;
+ Ref *fontID;
+ double *ctm, *bbox;
+ T3FontCache *t3Font;
+ T3GlyphStack *t3gs;
+ GBool validBBox;
+ double x1, y1, xMin, yMin, xMax, yMax, xt, yt;
+ int i, j;
+
+ if (!(gfxFont = state->getFont())) {
+ return gFalse;
+ }
+ fontID = gfxFont->getID();
+ ctm = state->getCTM();
+ state->transform(0, 0, &xt, &yt);
+
+ // is it the first (MRU) font in the cache?
+ if (!(nT3Fonts > 0 &&
+ t3FontCache[0]->matches(fontID, ctm[0], ctm[1], ctm[2], ctm[3]))) {
+
+ // is the font elsewhere in the cache?
+ for (i = 1; i < nT3Fonts; ++i) {
+ if (t3FontCache[i]->matches(fontID, ctm[0], ctm[1], ctm[2], ctm[3])) {
+ t3Font = t3FontCache[i];
+ for (j = i; j > 0; --j) {
+ t3FontCache[j] = t3FontCache[j - 1];
+ }
+ t3FontCache[0] = t3Font;
+ break;
+ }
+ }
+ if (i >= nT3Fonts) {
+
+ // create new entry in the font cache
+ if (nT3Fonts == splashOutT3FontCacheSize) {
+ delete t3FontCache[nT3Fonts - 1];
+ --nT3Fonts;
+ }
+ for (j = nT3Fonts; j > 0; --j) {
+ t3FontCache[j] = t3FontCache[j - 1];
+ }
+ ++nT3Fonts;
+ bbox = gfxFont->getFontBBox();
+ if (bbox[0] == 0 && bbox[1] == 0 && bbox[2] == 0 && bbox[3] == 0) {
+ // unspecified bounding box -- just take a guess
+ xMin = xt - 5;
+ xMax = xMin + 30;
+ yMax = yt + 15;
+ yMin = yMax - 45;
+ validBBox = gFalse;
+ } else {
+ state->transform(bbox[0], bbox[1], &x1, &y1);
+ xMin = xMax = x1;
+ yMin = yMax = y1;
+ state->transform(bbox[0], bbox[3], &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ state->transform(bbox[2], bbox[1], &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ state->transform(bbox[2], bbox[3], &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ validBBox = gTrue;
+ }
+ t3FontCache[0] = new T3FontCache(fontID, ctm[0], ctm[1], ctm[2], ctm[3],
+ (int)floor(xMin - xt),
+ (int)floor(yMin - yt),
+ (int)ceil(xMax) - (int)floor(xMin) + 3,
+ (int)ceil(yMax) - (int)floor(yMin) + 3,
+ validBBox,
+ colorMode != splashModeMono1);
+ }
+ }
+ t3Font = t3FontCache[0];
+
+ // is the glyph in the cache?
+ i = (code & (t3Font->cacheSets - 1)) * t3Font->cacheAssoc;
+ for (j = 0; j < t3Font->cacheAssoc; ++j) {
+ if (t3Font->cacheTags != NULL) {
+ if ((t3Font->cacheTags[i+j].mru & 0x8000) &&
+ t3Font->cacheTags[i+j].code == code) {
+ drawType3Glyph(t3Font, &t3Font->cacheTags[i+j],
+ t3Font->cacheData + (i+j) * t3Font->glyphSize);
+ return gTrue;
+ }
+ }
+ }
+
+ // push a new Type 3 glyph record
+ t3gs = new T3GlyphStack();
+ t3gs->next = t3GlyphStack;
+ t3GlyphStack = t3gs;
+ t3GlyphStack->code = code;
+ t3GlyphStack->cache = t3Font;
+ t3GlyphStack->cacheTag = NULL;
+ t3GlyphStack->cacheData = NULL;
+
+ return gFalse;
+}
+
+void SplashOutputDev::endType3Char(GfxState *state) {
+ T3GlyphStack *t3gs;
+ double *ctm;
+
+ if (t3GlyphStack->cacheTag) {
+ memcpy(t3GlyphStack->cacheData, bitmap->getDataPtr(),
+ t3GlyphStack->cache->glyphSize);
+ delete bitmap;
+ delete splash;
+ bitmap = t3GlyphStack->origBitmap;
+ splash = t3GlyphStack->origSplash;
+ ctm = state->getCTM();
+ state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3],
+ t3GlyphStack->origCTM4, t3GlyphStack->origCTM5);
+ updateCTM(state, 0, 0, 0, 0, 0, 0);
+ drawType3Glyph(t3GlyphStack->cache,
+ t3GlyphStack->cacheTag, t3GlyphStack->cacheData);
+ }
+ t3gs = t3GlyphStack;
+ t3GlyphStack = t3gs->next;
+ delete t3gs;
+}
+
+void SplashOutputDev::type3D0(GfxState *state, double wx, double wy) {
+}
+
+void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury) {
+ double *ctm;
+ T3FontCache *t3Font;
+ SplashColor color;
+ double xt, yt, xMin, xMax, yMin, yMax, x1, y1;
+ int i, j;
+
+ t3Font = t3GlyphStack->cache;
+
+ // check for a valid bbox
+ state->transform(0, 0, &xt, &yt);
+ state->transform(llx, lly, &x1, &y1);
+ xMin = xMax = x1;
+ yMin = yMax = y1;
+ state->transform(llx, ury, &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ state->transform(urx, lly, &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ state->transform(urx, ury, &x1, &y1);
+ if (x1 < xMin) {
+ xMin = x1;
+ } else if (x1 > xMax) {
+ xMax = x1;
+ }
+ if (y1 < yMin) {
+ yMin = y1;
+ } else if (y1 > yMax) {
+ yMax = y1;
+ }
+ if (xMin - xt < t3Font->glyphX ||
+ yMin - yt < t3Font->glyphY ||
+ xMax - xt > t3Font->glyphX + t3Font->glyphW ||
+ yMax - yt > t3Font->glyphY + t3Font->glyphH) {
+ if (t3Font->validBBox) {
+ error(-1, "Bad bounding box in Type 3 glyph");
+ }
+ return;
+ }
+
+ if (t3Font->cacheTags == NULL)
+ return;
+
+ // allocate a cache entry
+ i = (t3GlyphStack->code & (t3Font->cacheSets - 1)) * t3Font->cacheAssoc;
+ for (j = 0; j < t3Font->cacheAssoc; ++j) {
+ if ((t3Font->cacheTags[i+j].mru & 0x7fff) == t3Font->cacheAssoc - 1) {
+ t3Font->cacheTags[i+j].mru = 0x8000;
+ t3Font->cacheTags[i+j].code = t3GlyphStack->code;
+ t3GlyphStack->cacheTag = &t3Font->cacheTags[i+j];
+ t3GlyphStack->cacheData = t3Font->cacheData + (i+j) * t3Font->glyphSize;
+ } else {
+ ++t3Font->cacheTags[i+j].mru;
+ }
+ }
+
+ // save state
+ t3GlyphStack->origBitmap = bitmap;
+ t3GlyphStack->origSplash = splash;
+ ctm = state->getCTM();
+ t3GlyphStack->origCTM4 = ctm[4];
+ t3GlyphStack->origCTM5 = ctm[5];
+
+ // create the temporary bitmap
+ if (colorMode == splashModeMono1) {
+ bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1,
+ splashModeMono1, gFalse);
+ splash = new Splash(bitmap, gFalse,
+ t3GlyphStack->origSplash->getScreen());
+ color[0] = 0;
+ splash->clear(color);
+ color[0] = 1;
+ } else {
+ bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1,
+ splashModeMono8, gFalse);
+ splash = new Splash(bitmap, vectorAntialias,
+ t3GlyphStack->origSplash->getScreen());
+ color[0] = 0x00;
+ splash->clear(color);
+ color[0] = 0xff;
+ }
+ splash->setFillPattern(new SplashSolidColor(color));
+ splash->setStrokePattern(new SplashSolidColor(color));
+ //~ this should copy other state from t3GlyphStack->origSplash?
+ state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3],
+ -t3Font->glyphX, -t3Font->glyphY);
+ updateCTM(state, 0, 0, 0, 0, 0, 0);
+}
+
+void SplashOutputDev::drawType3Glyph(T3FontCache *t3Font,
+ T3FontCacheTag * /*tag*/, Guchar *data) {
+ SplashGlyphBitmap glyph;
+
+ glyph.x = -t3Font->glyphX;
+ glyph.y = -t3Font->glyphY;
+ glyph.w = t3Font->glyphW;
+ glyph.h = t3Font->glyphH;
+ glyph.aa = colorMode != splashModeMono1;
+ glyph.data = data;
+ glyph.freeData = gFalse;
+ splash->fillGlyph(0, 0, &glyph);
+}
+
+void SplashOutputDev::beginTextObject(GfxState *state) {
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ haveCSPattern = gTrue;
+ saveState(state);
+ savedRender = state->getRender();
+ state->setRender(7);
+ }
+}
+
+void SplashOutputDev::endTextObject(GfxState *state) {
+ if (haveCSPattern) {
+ state->setRender(savedRender);
+ haveCSPattern = gFalse;
+ if (state->getFillColorSpace()->getMode() != csPattern) {
+ if (textClipPath) {
+ splash->fill(textClipPath, gTrue);
+ delete textClipPath;
+ textClipPath = NULL;
+ }
+ restoreState(state);
+ updateFillColor(state);
+ }
+ }
+ if (textClipPath) {
+ splash->clipToPath(textClipPath, gFalse);
+ delete textClipPath;
+ textClipPath = NULL;
+ }
+}
+
+struct SplashOutImageMaskData {
+ ImageStream *imgStr;
+ GBool invert;
+ int width, height, y;
+};
+
+GBool SplashOutputDev::imageMaskSrc(void *data, SplashColorPtr line) {
+ SplashOutImageMaskData *imgMaskData = (SplashOutImageMaskData *)data;
+ Guchar *p;
+ SplashColorPtr q;
+ int x;
+
+ if (imgMaskData->y == imgMaskData->height) {
+ return gFalse;
+ }
+ for (x = 0, p = imgMaskData->imgStr->getLine(), q = line;
+ x < imgMaskData->width;
+ ++x) {
+ *q++ = *p++ ^ imgMaskData->invert;
+ }
+ ++imgMaskData->y;
+ return gTrue;
+}
+
+void SplashOutputDev::endMaskClip(GfxState * state) {
+ splash->setSoftMask(NULL);
+}
+
+void SplashOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ double *ctm;
+ SplashCoord mat[6];
+ SplashOutImageMaskData imgMaskData;
+
+ if (state->getFillColorSpace()->isNonMarking()) {
+ return;
+ }
+
+ ctm = state->getCTM();
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+
+ imgMaskData.imgStr = new ImageStream(str, width, 1, 1);
+ imgMaskData.imgStr->reset();
+ imgMaskData.invert = invert ? 0 : 1;
+ imgMaskData.width = width;
+ imgMaskData.height = height;
+ imgMaskData.y = 0;
+
+ if (state->getFillColorSpace()->getMode() == csPattern) {
+ SplashBitmap *maskBitmap;
+ Splash *maskSplash;
+ SplashColor maskColor;
+
+ maskBitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), 1, splashModeMono8, gFalse);
+ maskSplash = new Splash(maskBitmap, vectorAntialias);
+ maskColor[0] = 0;
+ maskSplash->clear(maskColor);
+ maskColor[0] = 0xff;
+ maskSplash->setFillPattern(new SplashSolidColor(maskColor));
+ maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL);
+ delete maskSplash;
+ splash->setSoftMask(maskBitmap);
+ } else {
+ splash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL);
+ if (inlineImg) {
+ while (imgMaskData.y < height) {
+ imgMaskData.imgStr->getLine();
+ ++imgMaskData.y;
+ }
+ }
+ }
+
+ delete imgMaskData.imgStr;
+ str->close();
+}
+
+struct SplashOutImageData {
+ ImageStream *imgStr;
+ GfxImageColorMap *colorMap;
+ SplashColorPtr lookup;
+ int *maskColors;
+ SplashColorMode colorMode;
+ int width, height, y;
+};
+
+GBool SplashOutputDev::imageSrc(void *data, SplashColorPtr colorLine,
+ Guchar * /*alphaLine*/) {
+ SplashOutImageData *imgData = (SplashOutImageData *)data;
+ Guchar *p;
+ SplashColorPtr q, col;
+ GfxRGB rgb;
+ GfxGray gray;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ int nComps, x;
+
+ if (imgData->y == imgData->height) {
+ return gFalse;
+ }
+
+ nComps = imgData->colorMap->getNumPixelComps();
+
+ if (imgData->lookup) {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, ++p) {
+ *q++ = imgData->lookup[*p];
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, ++p) {
+ col = &imgData->lookup[3 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ }
+ break;
+ case splashModeXBGR8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, ++p) {
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = col[3];
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, ++p) {
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = col[3];
+ }
+ break;
+#endif
+ }
+ } else {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, p += nComps) {
+ imgData->colorMap->getGray(p, &gray);
+ *q++ = colToByte(gray);
+ }
+ break;
+ case splashModeXBGR8:
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, p += nComps) {
+ imgData->colorMap->getRGB(p, &rgb);
+ *q++ = colToByte(rgb.r);
+ *q++ = colToByte(rgb.g);
+ *q++ = colToByte(rgb.b);
+ if (imgData->colorMode == splashModeXBGR8) *q++ = 255;
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine;
+ x < imgData->width;
+ ++x, p += nComps) {
+ imgData->colorMap->getCMYK(p, &cmyk);
+ *q++ = colToByte(cmyk.c);
+ *q++ = colToByte(cmyk.m);
+ *q++ = colToByte(cmyk.y);
+ *q++ = colToByte(cmyk.k);
+ }
+ break;
+#endif
+ }
+ }
+
+ ++imgData->y;
+ return gTrue;
+}
+
+GBool SplashOutputDev::alphaImageSrc(void *data, SplashColorPtr colorLine,
+ Guchar *alphaLine) {
+ SplashOutImageData *imgData = (SplashOutImageData *)data;
+ Guchar *p, *aq;
+ SplashColorPtr q, col;
+ GfxRGB rgb;
+ GfxGray gray;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ Guchar alpha;
+ int nComps, x, i;
+
+ if (imgData->y == imgData->height) {
+ return gFalse;
+ }
+
+ nComps = imgData->colorMap->getNumPixelComps();
+
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine, aq = alphaLine;
+ x < imgData->width;
+ ++x, p += nComps) {
+ alpha = 0;
+ for (i = 0; i < nComps; ++i) {
+ if (p[i] < imgData->maskColors[2*i] ||
+ p[i] > imgData->maskColors[2*i+1]) {
+ alpha = 0xff;
+ break;
+ }
+ }
+ if (imgData->lookup) {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ *q++ = imgData->lookup[*p];
+ *aq++ = alpha;
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ col = &imgData->lookup[3 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *aq++ = alpha;
+ break;
+ case splashModeXBGR8:
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = 255;
+ *aq++ = alpha;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = col[3];
+ *aq++ = alpha;
+ break;
+#endif
+ }
+ } else {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData->colorMap->getGray(p, &gray);
+ *q++ = colToByte(gray);
+ *aq++ = alpha;
+ break;
+ case splashModeXBGR8:
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData->colorMap->getRGB(p, &rgb);
+ *q++ = colToByte(rgb.r);
+ *q++ = colToByte(rgb.g);
+ *q++ = colToByte(rgb.b);
+ if (imgData->colorMode == splashModeXBGR8) *q++ = 255;
+ *aq++ = alpha;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ imgData->colorMap->getCMYK(p, &cmyk);
+ *q++ = colToByte(cmyk.c);
+ *q++ = colToByte(cmyk.m);
+ *q++ = colToByte(cmyk.y);
+ *q++ = colToByte(cmyk.k);
+ *aq++ = alpha;
+ break;
+#endif
+ }
+ }
+ }
+
+ ++imgData->y;
+ return gTrue;
+}
+
+void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ int *maskColors, GBool inlineImg) {
+ double *ctm;
+ SplashCoord mat[6];
+ SplashOutImageData imgData;
+ SplashColorMode srcMode;
+ SplashImageSource src;
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ Guchar pix;
+ int n, i;
+
+ ctm = state->getCTM();
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+
+ imgData.imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgData.imgStr->reset();
+ imgData.colorMap = colorMap;
+ imgData.maskColors = maskColors;
+ imgData.colorMode = colorMode;
+ imgData.width = width;
+ imgData.height = height;
+ imgData.y = 0;
+
+ // special case for one-channel (monochrome/gray/separation) images:
+ // build a lookup table here
+ imgData.lookup = NULL;
+ if (colorMap->getNumPixelComps() == 1) {
+ n = 1 << colorMap->getBits();
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData.lookup = (SplashColorPtr)gmalloc(n);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getGray(&pix, &gray);
+ imgData.lookup[i] = colToByte(gray);
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 3);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[3*i] = colToByte(rgb.r);
+ imgData.lookup[3*i+1] = colToByte(rgb.g);
+ imgData.lookup[3*i+2] = colToByte(rgb.b);
+ }
+ break;
+ case splashModeXBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[4*i] = colToByte(rgb.r);
+ imgData.lookup[4*i+1] = colToByte(rgb.g);
+ imgData.lookup[4*i+2] = colToByte(rgb.b);
+ imgData.lookup[4*i+3] = 255;
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getCMYK(&pix, &cmyk);
+ imgData.lookup[4*i] = colToByte(cmyk.c);
+ imgData.lookup[4*i+1] = colToByte(cmyk.m);
+ imgData.lookup[4*i+2] = colToByte(cmyk.y);
+ imgData.lookup[4*i+3] = colToByte(cmyk.k);
+ }
+ break;
+#endif
+ break;
+ }
+ }
+
+ if (colorMode == splashModeMono1) {
+ srcMode = splashModeMono8;
+ } else {
+ srcMode = colorMode;
+ }
+ src = maskColors ? &alphaImageSrc : &imageSrc;
+ splash->drawImage(src, &imgData, srcMode, maskColors ? gTrue : gFalse,
+ width, height, mat);
+ if (inlineImg) {
+ while (imgData.y < height) {
+ imgData.imgStr->getLine();
+ ++imgData.y;
+ }
+ }
+
+ gfree(imgData.lookup);
+ delete imgData.imgStr;
+ str->close();
+}
+
+struct SplashOutMaskedImageData {
+ ImageStream *imgStr;
+ GfxImageColorMap *colorMap;
+ SplashBitmap *mask;
+ SplashColorPtr lookup;
+ SplashColorMode colorMode;
+ int width, height, y;
+};
+
+GBool SplashOutputDev::maskedImageSrc(void *data, SplashColorPtr colorLine,
+ Guchar *alphaLine) {
+ SplashOutMaskedImageData *imgData = (SplashOutMaskedImageData *)data;
+ Guchar *p, *aq;
+ SplashColor maskColor;
+ SplashColorPtr q, col;
+ GfxRGB rgb;
+ GfxGray gray;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ Guchar alpha;
+ int nComps, x;
+
+ if (imgData->y == imgData->height) {
+ return gFalse;
+ }
+
+ nComps = imgData->colorMap->getNumPixelComps();
+
+ for (x = 0, p = imgData->imgStr->getLine(), q = colorLine, aq = alphaLine;
+ x < imgData->width;
+ ++x, p += nComps) {
+ imgData->mask->getPixel(x, imgData->y, maskColor);
+ alpha = maskColor[0] ? 0xff : 0x00;
+ if (imgData->lookup) {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ *q++ = imgData->lookup[*p];
+ *aq++ = alpha;
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ col = &imgData->lookup[3 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *aq++ = alpha;
+ break;
+ case splashModeXBGR8:
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = 255;
+ *aq++ = alpha;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ col = &imgData->lookup[4 * *p];
+ *q++ = col[0];
+ *q++ = col[1];
+ *q++ = col[2];
+ *q++ = col[3];
+ *aq++ = alpha;
+ break;
+#endif
+ }
+ } else {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData->colorMap->getGray(p, &gray);
+ *q++ = colToByte(gray);
+ *aq++ = alpha;
+ break;
+ case splashModeXBGR8:
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData->colorMap->getRGB(p, &rgb);
+ *q++ = colToByte(rgb.r);
+ *q++ = colToByte(rgb.g);
+ *q++ = colToByte(rgb.b);
+ if (imgData->colorMode == splashModeXBGR8) *q++ = 255;
+ *aq++ = alpha;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ imgData->colorMap->getCMYK(p, &cmyk);
+ *q++ = colToByte(cmyk.c);
+ *q++ = colToByte(cmyk.m);
+ *q++ = colToByte(cmyk.y);
+ *q++ = colToByte(cmyk.k);
+ *aq++ = alpha;
+ break;
+#endif
+ }
+ }
+ }
+
+ ++imgData->y;
+ return gTrue;
+}
+
+void SplashOutputDev::drawMaskedImage(GfxState *state, Object *ref,
+ Stream *str, int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth,
+ int maskHeight, GBool maskInvert,
+ GBool maskInterpolate) {
+ GfxImageColorMap *maskColorMap;
+ Object maskDecode, decodeLow, decodeHigh;
+ double *ctm;
+ SplashCoord mat[6];
+ SplashOutMaskedImageData imgData;
+ SplashOutImageMaskData imgMaskData;
+ SplashColorMode srcMode;
+ SplashBitmap *maskBitmap;
+ Splash *maskSplash;
+ SplashColor maskColor;
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ Guchar pix;
+ int n, i;
+
+ // If the mask is higher resolution than the image, use
+ // drawSoftMaskedImage() instead.
+ if (maskWidth > width || maskHeight > height) {
+ decodeLow.initInt(maskInvert ? 0 : 1);
+ decodeHigh.initInt(maskInvert ? 1 : 0);
+ maskDecode.initArray(xref);
+ maskDecode.arrayAdd(&decodeLow);
+ maskDecode.arrayAdd(&decodeHigh);
+ maskColorMap = new GfxImageColorMap(1, &maskDecode,
+ new GfxDeviceGrayColorSpace());
+ maskDecode.free();
+ drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate,
+ maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
+ delete maskColorMap;
+
+ } else {
+
+ //----- scale the mask image to the same size as the source image
+
+ mat[0] = (SplashCoord)width;
+ mat[1] = 0;
+ mat[2] = 0;
+ mat[3] = (SplashCoord)height;
+ mat[4] = 0;
+ mat[5] = 0;
+ imgMaskData.imgStr = new ImageStream(maskStr, maskWidth, 1, 1);
+ imgMaskData.imgStr->reset();
+ imgMaskData.invert = maskInvert ? 0 : 1;
+ imgMaskData.width = maskWidth;
+ imgMaskData.height = maskHeight;
+ imgMaskData.y = 0;
+ maskBitmap = new SplashBitmap(width, height, 1, splashModeMono1, gFalse);
+ maskSplash = new Splash(maskBitmap, gFalse);
+ maskColor[0] = 0;
+ maskSplash->clear(maskColor);
+ maskColor[0] = 0xff;
+ maskSplash->setFillPattern(new SplashSolidColor(maskColor));
+ maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData,
+ maskWidth, maskHeight, mat, gFalse);
+ delete imgMaskData.imgStr;
+ maskStr->close();
+ delete maskSplash;
+
+ //----- draw the source image
+
+ ctm = state->getCTM();
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+
+ imgData.imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgData.imgStr->reset();
+ imgData.colorMap = colorMap;
+ imgData.mask = maskBitmap;
+ imgData.colorMode = colorMode;
+ imgData.width = width;
+ imgData.height = height;
+ imgData.y = 0;
+
+ // special case for one-channel (monochrome/gray/separation) images:
+ // build a lookup table here
+ imgData.lookup = NULL;
+ if (colorMap->getNumPixelComps() == 1) {
+ n = 1 << colorMap->getBits();
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData.lookup = (SplashColorPtr)gmalloc(n);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getGray(&pix, &gray);
+ imgData.lookup[i] = colToByte(gray);
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 3);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[3*i] = colToByte(rgb.r);
+ imgData.lookup[3*i+1] = colToByte(rgb.g);
+ imgData.lookup[3*i+2] = colToByte(rgb.b);
+ }
+ break;
+ case splashModeXBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[4*i] = colToByte(rgb.r);
+ imgData.lookup[4*i+1] = colToByte(rgb.g);
+ imgData.lookup[4*i+2] = colToByte(rgb.b);
+ imgData.lookup[4*i+3] = 255;
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getCMYK(&pix, &cmyk);
+ imgData.lookup[4*i] = colToByte(cmyk.c);
+ imgData.lookup[4*i+1] = colToByte(cmyk.m);
+ imgData.lookup[4*i+2] = colToByte(cmyk.y);
+ imgData.lookup[4*i+3] = colToByte(cmyk.k);
+ }
+ break;
+#endif
+ }
+ }
+
+ if (colorMode == splashModeMono1) {
+ srcMode = splashModeMono8;
+ } else {
+ srcMode = colorMode;
+ }
+ splash->drawImage(&maskedImageSrc, &imgData, srcMode, gTrue,
+ width, height, mat);
+
+ delete maskBitmap;
+ gfree(imgData.lookup);
+ delete imgData.imgStr;
+ str->close();
+ }
+}
+
+void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
+ Stream *str, int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate) {
+ double *ctm;
+ SplashCoord mat[6];
+ SplashOutImageData imgData;
+ SplashOutImageData imgMaskData;
+ SplashColorMode srcMode;
+ SplashBitmap *maskBitmap;
+ Splash *maskSplash;
+ SplashColor maskColor;
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ Guchar pix;
+ int n, i;
+
+ ctm = state->getCTM();
+ mat[0] = ctm[0];
+ mat[1] = ctm[1];
+ mat[2] = -ctm[2];
+ mat[3] = -ctm[3];
+ mat[4] = ctm[2] + ctm[4];
+ mat[5] = ctm[3] + ctm[5];
+
+ //----- set up the soft mask
+
+ imgMaskData.imgStr = new ImageStream(maskStr, maskWidth,
+ maskColorMap->getNumPixelComps(),
+ maskColorMap->getBits());
+ imgMaskData.imgStr->reset();
+ imgMaskData.colorMap = maskColorMap;
+ imgMaskData.maskColors = NULL;
+ imgMaskData.colorMode = splashModeMono8;
+ imgMaskData.width = maskWidth;
+ imgMaskData.height = maskHeight;
+ imgMaskData.y = 0;
+ n = 1 << maskColorMap->getBits();
+ imgMaskData.lookup = (SplashColorPtr)gmalloc(n);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ maskColorMap->getGray(&pix, &gray);
+ imgMaskData.lookup[i] = colToByte(gray);
+ }
+ maskBitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(),
+ 1, splashModeMono8, gFalse);
+ maskSplash = new Splash(maskBitmap, vectorAntialias);
+ maskColor[0] = 0;
+ maskSplash->clear(maskColor);
+ maskSplash->drawImage(&imageSrc, &imgMaskData, splashModeMono8, gFalse,
+ maskWidth, maskHeight, mat);
+ delete imgMaskData.imgStr;
+ maskStr->close();
+ gfree(imgMaskData.lookup);
+ delete maskSplash;
+ splash->setSoftMask(maskBitmap);
+
+ //----- draw the source image
+
+ imgData.imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgData.imgStr->reset();
+ imgData.colorMap = colorMap;
+ imgData.maskColors = NULL;
+ imgData.colorMode = colorMode;
+ imgData.width = width;
+ imgData.height = height;
+ imgData.y = 0;
+
+ // special case for one-channel (monochrome/gray/separation) images:
+ // build a lookup table here
+ imgData.lookup = NULL;
+ if (colorMap->getNumPixelComps() == 1) {
+ n = 1 << colorMap->getBits();
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData.lookup = (SplashColorPtr)gmalloc(n);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getGray(&pix, &gray);
+ imgData.lookup[i] = colToByte(gray);
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 3);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[3*i] = colToByte(rgb.r);
+ imgData.lookup[3*i+1] = colToByte(rgb.g);
+ imgData.lookup[3*i+2] = colToByte(rgb.b);
+ }
+ break;
+ case splashModeXBGR8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getRGB(&pix, &rgb);
+ imgData.lookup[4*i] = colToByte(rgb.r);
+ imgData.lookup[4*i+1] = colToByte(rgb.g);
+ imgData.lookup[4*i+2] = colToByte(rgb.b);
+ imgData.lookup[4*i+3] = 255;
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ imgData.lookup = (SplashColorPtr)gmallocn(n, 4);
+ for (i = 0; i < n; ++i) {
+ pix = (Guchar)i;
+ colorMap->getCMYK(&pix, &cmyk);
+ imgData.lookup[4*i] = colToByte(cmyk.c);
+ imgData.lookup[4*i+1] = colToByte(cmyk.m);
+ imgData.lookup[4*i+2] = colToByte(cmyk.y);
+ imgData.lookup[4*i+3] = colToByte(cmyk.k);
+ }
+ break;
+#endif
+ }
+ }
+
+ if (colorMode == splashModeMono1) {
+ srcMode = splashModeMono8;
+ } else {
+ srcMode = colorMode;
+ }
+ splash->drawImage(&imageSrc, &imgData, srcMode, gFalse, width, height, mat);
+
+ splash->setSoftMask(NULL);
+ gfree(imgData.lookup);
+ delete imgData.imgStr;
+ str->close();
+}
+
+void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool /*knockout*/,
+ GBool /*forSoftMask*/) {
+ SplashTransparencyGroup *transpGroup;
+ SplashColor color;
+ double xMin, yMin, xMax, yMax, x, y;
+ int tx, ty, w, h;
+
+ // transform the bbox
+ state->transform(bbox[0], bbox[1], &x, &y);
+ xMin = xMax = x;
+ yMin = yMax = y;
+ state->transform(bbox[0], bbox[3], &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ state->transform(bbox[2], bbox[1], &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ state->transform(bbox[2], bbox[3], &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ tx = (int)floor(xMin);
+ if (tx < 0) {
+ tx = 0;
+ } else if (tx > bitmap->getWidth()) {
+ tx = bitmap->getWidth();
+ }
+ ty = (int)floor(yMin);
+ if (ty < 0) {
+ ty = 0;
+ } else if (ty > bitmap->getHeight()) {
+ ty = bitmap->getHeight();
+ }
+ w = (int)ceil(xMax) - tx + 1;
+ if (tx + w > bitmap->getWidth()) {
+ w = bitmap->getWidth() - tx;
+ }
+ if (w < 1) {
+ w = 1;
+ }
+ h = (int)ceil(yMax) - ty + 1;
+ if (ty + h > bitmap->getHeight()) {
+ h = bitmap->getHeight() - ty;
+ }
+ if (h < 1) {
+ h = 1;
+ }
+
+ // push a new stack entry
+ transpGroup = new SplashTransparencyGroup();
+ transpGroup->tx = tx;
+ transpGroup->ty = ty;
+ transpGroup->blendingColorSpace = blendingColorSpace;
+ transpGroup->isolated = isolated;
+ transpGroup->next = transpGroupStack;
+ transpGroupStack = transpGroup;
+
+ // save state
+ transpGroup->origBitmap = bitmap;
+ transpGroup->origSplash = splash;
+
+ //~ this ignores the blendingColorSpace arg
+
+ // create the temporary bitmap
+ bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue,
+ bitmapTopDown);
+ splash = new Splash(bitmap, vectorAntialias,
+ transpGroup->origSplash->getScreen());
+ if (isolated) {
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ color[0] = 0;
+ break;
+ case splashModeXBGR8:
+ color[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ color[0] = color[1] = color[2] = 0;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ color[0] = color[1] = color[2] = color[3] = 0;
+ break;
+#endif
+ default:
+ // make gcc happy
+ break;
+ }
+ splash->clear(color, 0);
+ } else {
+ splash->blitTransparent(transpGroup->origBitmap, tx, ty, 0, 0, w, h);
+ splash->setInNonIsolatedGroup(transpGroup->origBitmap, tx, ty);
+ }
+ transpGroup->tBitmap = bitmap;
+ state->shiftCTM(-tx, -ty);
+ updateCTM(state, 0, 0, 0, 0, 0, 0);
+}
+
+void SplashOutputDev::endTransparencyGroup(GfxState *state) {
+ double *ctm;
+
+ // restore state
+ delete splash;
+ bitmap = transpGroupStack->origBitmap;
+ splash = transpGroupStack->origSplash;
+ ctm = state->getCTM();
+ state->shiftCTM(transpGroupStack->tx, transpGroupStack->ty);
+ updateCTM(state, 0, 0, 0, 0, 0, 0);
+}
+
+void SplashOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {
+ SplashBitmap *tBitmap;
+ SplashTransparencyGroup *transpGroup;
+ GBool isolated;
+ int tx, ty;
+
+ tx = transpGroupStack->tx;
+ ty = transpGroupStack->ty;
+ tBitmap = transpGroupStack->tBitmap;
+ isolated = transpGroupStack->isolated;
+
+ // paint the transparency group onto the parent bitmap
+ // - the clip path was set in the parent's state)
+ splash->composite(tBitmap, 0, 0, tx, ty,
+ tBitmap->getWidth(), tBitmap->getHeight(),
+ gFalse, !isolated);
+
+ // pop the stack
+ transpGroup = transpGroupStack;
+ transpGroupStack = transpGroup->next;
+ delete transpGroup;
+
+ delete tBitmap;
+}
+
+void SplashOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/,
+ GBool alpha, Function *transferFunc,
+ GfxColor *backdropColor) {
+ SplashBitmap *softMask, *tBitmap;
+ Splash *tSplash;
+ SplashTransparencyGroup *transpGroup;
+ SplashColor color;
+ SplashColorPtr p;
+ GfxGray gray;
+ GfxRGB rgb;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+ double lum, lum2;
+ int tx, ty, x, y;
+
+ tx = transpGroupStack->tx;
+ ty = transpGroupStack->ty;
+ tBitmap = transpGroupStack->tBitmap;
+
+ // composite with backdrop color
+ if (!alpha && colorMode != splashModeMono1) {
+ //~ need to correctly handle the case where no blending color
+ //~ space is given
+ if (transpGroupStack->blendingColorSpace) {
+ tSplash = new Splash(tBitmap, vectorAntialias,
+ transpGroupStack->origSplash->getScreen());
+ switch (colorMode) {
+ case splashModeMono1:
+ // transparency is not supported in mono1 mode
+ break;
+ case splashModeMono8:
+ transpGroupStack->blendingColorSpace->getGray(backdropColor, &gray);
+ color[0] = colToByte(gray);
+ tSplash->compositeBackground(color);
+ break;
+ case splashModeXBGR8:
+ color[3] = 255;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ transpGroupStack->blendingColorSpace->getRGB(backdropColor, &rgb);
+ color[0] = colToByte(rgb.r);
+ color[1] = colToByte(rgb.g);
+ color[2] = colToByte(rgb.b);
+ tSplash->compositeBackground(color);
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ transpGroupStack->blendingColorSpace->getCMYK(backdropColor, &cmyk);
+ color[0] = colToByte(cmyk.c);
+ color[1] = colToByte(cmyk.m);
+ color[2] = colToByte(cmyk.y);
+ color[3] = colToByte(cmyk.k);
+ tSplash->compositeBackground(color);
+ break;
+#endif
+ }
+ delete tSplash;
+ }
+ }
+
+ softMask = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(),
+ 1, splashModeMono8, gFalse);
+ memset(softMask->getDataPtr(), 0,
+ softMask->getRowSize() * softMask->getHeight());
+ p = softMask->getDataPtr() + ty * softMask->getRowSize() + tx;
+ int xMax = tBitmap->getWidth();
+ int yMax = tBitmap->getHeight();
+ if (xMax + tx > bitmap->getWidth()) xMax = bitmap->getWidth() - tx;
+ if (yMax + ty > bitmap->getHeight()) yMax = bitmap->getHeight() - ty;
+ for (y = 0; y < yMax; ++y) {
+ for (x = 0; x < xMax; ++x) {
+ if (alpha) {
+ p[x] = tBitmap->getAlpha(x, y);
+ } else {
+ tBitmap->getPixel(x, y, color);
+ // convert to luminosity
+ switch (colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ lum = color[0] / 255.0;
+ break;
+ case splashModeXBGR8:
+ case splashModeRGB8:
+ case splashModeBGR8:
+ lum = (0.3 / 255.0) * color[0] +
+ (0.59 / 255.0) * color[1] +
+ (0.11 / 255.0) * color[2];
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ lum = (1 - color[3] / 255.0)
+ - (0.3 / 255.0) * color[0]
+ - (0.59 / 255.0) * color[1]
+ - (0.11 / 255.0) * color[2];
+ if (lum < 0) {
+ lum = 0;
+ }
+ break;
+#endif
+ }
+ if (transferFunc) {
+ transferFunc->transform(&lum, &lum2);
+ } else {
+ lum2 = lum;
+ }
+ p[x] = (int)(lum2 * 255.0 + 0.5);
+ }
+ }
+ p += softMask->getRowSize();
+ }
+ splash->setSoftMask(softMask);
+
+ // pop the stack
+ transpGroup = transpGroupStack;
+ transpGroupStack = transpGroup->next;
+ delete transpGroup;
+
+ delete tBitmap;
+}
+
+void SplashOutputDev::clearSoftMask(GfxState * /*state*/) {
+ splash->setSoftMask(NULL);
+}
+
+void SplashOutputDev::setPaperColor(SplashColorPtr paperColorA) {
+ splashColorCopy(paperColor, paperColorA);
+}
+
+int SplashOutputDev::getBitmapWidth() {
+ return bitmap->getWidth();
+}
+
+int SplashOutputDev::getBitmapHeight() {
+ return bitmap->getHeight();
+}
+
+SplashBitmap *SplashOutputDev::takeBitmap() {
+ SplashBitmap *ret;
+
+ ret = bitmap;
+ bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode,
+ colorMode != splashModeMono1, bitmapTopDown);
+ return ret;
+}
+
+void SplashOutputDev::getModRegion(int *xMin, int *yMin,
+ int *xMax, int *yMax) {
+ splash->getModRegion(xMin, yMin, xMax, yMax);
+}
+
+void SplashOutputDev::clearModRegion() {
+ splash->clearModRegion();
+}
+
+void SplashOutputDev::setFillColor(int r, int g, int b) {
+ GfxRGB rgb;
+ GfxGray gray;
+#if SPLASH_CMYK
+ GfxCMYK cmyk;
+#endif
+
+ rgb.r = byteToCol(r);
+ rgb.g = byteToCol(g);
+ rgb.b = byteToCol(b);
+ gray = (GfxColorComp)(0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b + 0.5);
+ if (gray > gfxColorComp1) {
+ gray = gfxColorComp1;
+ }
+#if SPLASH_CMYK
+ cmyk.c = gfxColorComp1 - rgb.r;
+ cmyk.m = gfxColorComp1 - rgb.g;
+ cmyk.y = gfxColorComp1 - rgb.b;
+ cmyk.k = 0;
+ splash->setFillPattern(getColor(gray, &rgb, &cmyk));
+#else
+ splash->setFillPattern(getColor(gray, &rgb));
+#endif
+}
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+GBool SplashOutputDev::getVectorAntialias() {
+ return splash->getVectorAntialias();
+}
+
+void SplashOutputDev::setVectorAntialias(GBool vaa) {
+ splash->setVectorAntialias(vaa);
+}
+#endif
+
+void SplashOutputDev::setFreeTypeHinting(GBool enable)
+{
+ enableFreeTypeHinting = enable;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.h
new file mode 100644
index 00000000000..df33850ed3c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/SplashOutputDev.h
@@ -0,0 +1,282 @@
+//========================================================================
+//
+// SplashOutputDev.h
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHOUTPUTDEV_H
+#define SPLASHOUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "splash/SplashTypes.h"
+#include "poppler-config.h"
+#include "OutputDev.h"
+#include "GfxState.h"
+
+class Gfx8BitFont;
+class SplashBitmap;
+class Splash;
+class SplashPath;
+class SplashPattern;
+class SplashFontEngine;
+class SplashFont;
+class T3FontCache;
+struct T3FontCacheTag;
+struct T3GlyphStack;
+struct SplashTransparencyGroup;
+
+//------------------------------------------------------------------------
+
+// number of Type 3 fonts to cache
+#define splashOutT3FontCacheSize 8
+
+//------------------------------------------------------------------------
+// SplashOutputDev
+//------------------------------------------------------------------------
+
+class SplashOutputDev: public OutputDev {
+public:
+
+ // Constructor.
+ SplashOutputDev(SplashColorMode colorModeA, int bitmapRowPadA,
+ GBool reverseVideoA, SplashColorPtr paperColorA,
+ GBool bitmapTopDownA = gTrue,
+ GBool allowAntialiasA = gTrue);
+
+ // Destructor.
+ virtual ~SplashOutputDev();
+
+ //----- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gTrue; }
+
+ // This device now supports text in pattern colorspace!
+ virtual GBool supportTextCSPattern(GfxState *state)
+ { return state->getFillColorSpace()->getMode() == csPattern; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- save/restore graphics state
+ virtual void saveState(GfxState *state);
+ virtual void restoreState(GfxState *state);
+
+ //----- update graphics state
+ virtual void updateAll(GfxState *state);
+ virtual void updateCTM(GfxState *state, double m11, double m12,
+ double m21, double m22, double m31, double m32);
+ virtual void updateLineDash(GfxState *state);
+ virtual void updateFlatness(GfxState *state);
+ virtual void updateLineJoin(GfxState *state);
+ virtual void updateLineCap(GfxState *state);
+ virtual void updateMiterLimit(GfxState *state);
+ virtual void updateLineWidth(GfxState *state);
+ virtual void updateStrokeAdjust(GfxState *state);
+ virtual void updateFillColor(GfxState *state);
+ virtual void updateStrokeColor(GfxState *state);
+ virtual void updateBlendMode(GfxState *state);
+ virtual void updateFillOpacity(GfxState *state);
+ virtual void updateStrokeOpacity(GfxState *state);
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+ virtual void updateRender(GfxState *state);
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+
+ //----- path clipping
+ virtual void clip(GfxState *state);
+ virtual void eoClip(GfxState *state);
+ virtual void clipToStrokePath(GfxState *state);
+
+ //----- text drawing
+ virtual void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen);
+ virtual GBool beginType3Char(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode code, Unicode *u, int uLen);
+ virtual void endType3Char(GfxState *state);
+ virtual void beginTextObject(GfxState *state);
+ virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath && haveCSPattern; }
+ virtual void endTextObject(GfxState *state);
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+ // If current colorspace ist pattern,
+ // need this device special handling for masks in pattern colorspace?
+ // Default is false
+ virtual GBool fillMaskCSPattern(GfxState * state)
+ { return state->getFillColorSpace()->getMode() == csPattern; }
+ virtual void endMaskClip(GfxState * /*state*/);
+
+ //----- Type 3 font operators
+ virtual void type3D0(GfxState *state, double wx, double wy);
+ virtual void type3D1(GfxState *state, double wx, double wy,
+ double llx, double lly, double urx, double ury);
+
+ //----- transparency groups and soft masks
+ virtual void beginTransparencyGroup(GfxState *state, double *bbox,
+ GfxColorSpace *blendingColorSpace,
+ GBool isolated, GBool knockout,
+ GBool forSoftMask);
+ virtual void endTransparencyGroup(GfxState *state);
+ virtual void paintTransparencyGroup(GfxState *state, double *bbox);
+ virtual void setSoftMask(GfxState *state, double *bbox, GBool alpha,
+ Function *transferFunc, GfxColor *backdropColor);
+ virtual void clearSoftMask(GfxState *state);
+
+ //----- special access
+
+ // Called to indicate that a new PDF document has been loaded.
+ void startDoc(XRef *xrefA);
+
+ void setPaperColor(SplashColorPtr paperColorA);
+
+ GBool isReverseVideo() { return reverseVideo; }
+ void setReverseVideo(GBool reverseVideoA) { reverseVideo = reverseVideoA; }
+
+ // Get the bitmap and its size.
+ SplashBitmap *getBitmap() { return bitmap; }
+ int getBitmapWidth();
+ int getBitmapHeight();
+
+ // Returns the last rasterized bitmap, transferring ownership to the
+ // caller.
+ SplashBitmap *takeBitmap();
+
+ // Get the Splash object.
+ Splash *getSplash() { return splash; }
+
+ // Get the modified region.
+ void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax);
+
+ // Clear the modified region.
+ void clearModRegion();
+
+ // Set the Splash fill color.
+ void setFillColor(int r, int g, int b);
+
+ SplashFont *getCurrentFont() { return font; }
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ virtual GBool getVectorAntialias();
+ virtual void setVectorAntialias(GBool vaa);
+#endif
+
+ void setFreeTypeHinting(GBool enable);
+
+private:
+
+ void setupScreenParams(double hDPI, double vDPI);
+#if SPLASH_CMYK
+ SplashPattern *getColor(GfxGray gray, GfxRGB *rgb, GfxCMYK *cmyk);
+#else
+ SplashPattern *getColor(GfxGray gray, GfxRGB *rgb);
+#endif
+ SplashPath *convertPath(GfxState *state, GfxPath *path);
+ void doUpdateFont(GfxState *state);
+ void drawType3Glyph(T3FontCache *t3Font,
+ T3FontCacheTag *tag, Guchar *data);
+ static GBool imageMaskSrc(void *data, SplashColorPtr line);
+ static GBool imageSrc(void *data, SplashColorPtr colorLine,
+ Guchar *alphaLine);
+ static GBool alphaImageSrc(void *data, SplashColorPtr line,
+ Guchar *alphaLine);
+ static GBool maskedImageSrc(void *data, SplashColorPtr line,
+ Guchar *alphaLine);
+
+ GBool haveCSPattern; // set if text has been drawn with a
+ // clipping render mode because of pattern colorspace
+ int savedRender; // use if pattern colorspace
+ GBool keepAlphaChannel; // don't fill with paper color, keep alpha channel
+
+ SplashColorMode colorMode;
+ int bitmapRowPad;
+ GBool bitmapTopDown;
+ GBool allowAntialias;
+ GBool vectorAntialias;
+ GBool enableFreeTypeHinting;
+ GBool reverseVideo; // reverse video mode
+ SplashColor paperColor; // paper color
+ SplashScreenParams screenParams;
+
+ XRef *xref; // xref table for current document
+
+ SplashBitmap *bitmap;
+ Splash *splash;
+ SplashFontEngine *fontEngine;
+
+ T3FontCache * // Type 3 font cache
+ t3FontCache[splashOutT3FontCacheSize];
+ int nT3Fonts; // number of valid entries in t3FontCache
+ T3GlyphStack *t3GlyphStack; // Type 3 glyph context stack
+
+ SplashFont *font; // current font
+ GBool needFontUpdate; // set when the font needs to be updated
+ SplashPath *textClipPath; // clipping path built with text object
+
+ SplashTransparencyGroup * // transparency group stack
+ transpGroupStack;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream-CCITT.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream-CCITT.h
new file mode 100644
index 00000000000..43405b67751
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream-CCITT.h
@@ -0,0 +1,473 @@
+//========================================================================
+//
+// Stream-CCITT.h
+//
+// Tables for CCITT Fax decoding.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+struct CCITTCode {
+ short bits;
+ short n;
+};
+
+#define ccittEOL -2
+
+//------------------------------------------------------------------------
+// 2D codes
+//------------------------------------------------------------------------
+
+#define twoDimPass 0
+#define twoDimHoriz 1
+#define twoDimVert0 2
+#define twoDimVertR1 3
+#define twoDimVertL1 4
+#define twoDimVertR2 5
+#define twoDimVertL2 6
+#define twoDimVertR3 7
+#define twoDimVertL3 8
+
+// 1-7 bit codes
+static const CCITTCode twoDimTab1[128] = {
+ {-1, -1}, {-1, -1}, // 000000x
+ {7, twoDimVertL3}, // 0000010
+ {7, twoDimVertR3}, // 0000011
+ {6, twoDimVertL2}, {6, twoDimVertL2}, // 000010x
+ {6, twoDimVertR2}, {6, twoDimVertR2}, // 000011x
+ {4, twoDimPass}, {4, twoDimPass}, // 0001xxx
+ {4, twoDimPass}, {4, twoDimPass},
+ {4, twoDimPass}, {4, twoDimPass},
+ {4, twoDimPass}, {4, twoDimPass},
+ {3, twoDimHoriz}, {3, twoDimHoriz}, // 001xxxx
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimHoriz}, {3, twoDimHoriz},
+ {3, twoDimVertL1}, {3, twoDimVertL1}, // 010xxxx
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertL1}, {3, twoDimVertL1},
+ {3, twoDimVertR1}, {3, twoDimVertR1}, // 011xxxx
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {3, twoDimVertR1}, {3, twoDimVertR1},
+ {1, twoDimVert0}, {1, twoDimVert0}, // 1xxxxxx
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0},
+ {1, twoDimVert0}, {1, twoDimVert0}
+};
+
+//------------------------------------------------------------------------
+// white run lengths
+//------------------------------------------------------------------------
+
+// 11-12 bit codes (upper 7 bits are 0)
+static const CCITTCode whiteTab1[32] = {
+ {-1, -1}, // 00000
+ {12, ccittEOL}, // 00001
+ {-1, -1}, {-1, -1}, // 0001x
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 001xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 010xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 011xx
+ {11, 1792}, {11, 1792}, // 1000x
+ {12, 1984}, // 10010
+ {12, 2048}, // 10011
+ {12, 2112}, // 10100
+ {12, 2176}, // 10101
+ {12, 2240}, // 10110
+ {12, 2304}, // 10111
+ {11, 1856}, {11, 1856}, // 1100x
+ {11, 1920}, {11, 1920}, // 1101x
+ {12, 2368}, // 11100
+ {12, 2432}, // 11101
+ {12, 2496}, // 11110
+ {12, 2560} // 11111
+};
+
+// 1-9 bit codes
+static const CCITTCode whiteTab2[512] = {
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 0000000xx
+ {8, 29}, {8, 29}, // 00000010x
+ {8, 30}, {8, 30}, // 00000011x
+ {8, 45}, {8, 45}, // 00000100x
+ {8, 46}, {8, 46}, // 00000101x
+ {7, 22}, {7, 22}, {7, 22}, {7, 22}, // 0000011xx
+ {7, 23}, {7, 23}, {7, 23}, {7, 23}, // 0000100xx
+ {8, 47}, {8, 47}, // 00001010x
+ {8, 48}, {8, 48}, // 00001011x
+ {6, 13}, {6, 13}, {6, 13}, {6, 13}, // 000011xxx
+ {6, 13}, {6, 13}, {6, 13}, {6, 13},
+ {7, 20}, {7, 20}, {7, 20}, {7, 20}, // 0001000xx
+ {8, 33}, {8, 33}, // 00010010x
+ {8, 34}, {8, 34}, // 00010011x
+ {8, 35}, {8, 35}, // 00010100x
+ {8, 36}, {8, 36}, // 00010101x
+ {8, 37}, {8, 37}, // 00010110x
+ {8, 38}, {8, 38}, // 00010111x
+ {7, 19}, {7, 19}, {7, 19}, {7, 19}, // 0001100xx
+ {8, 31}, {8, 31}, // 00011010x
+ {8, 32}, {8, 32}, // 00011011x
+ {6, 1}, {6, 1}, {6, 1}, {6, 1}, // 000111xxx
+ {6, 1}, {6, 1}, {6, 1}, {6, 1},
+ {6, 12}, {6, 12}, {6, 12}, {6, 12}, // 001000xxx
+ {6, 12}, {6, 12}, {6, 12}, {6, 12},
+ {8, 53}, {8, 53}, // 00100100x
+ {8, 54}, {8, 54}, // 00100101x
+ {7, 26}, {7, 26}, {7, 26}, {7, 26}, // 0010011xx
+ {8, 39}, {8, 39}, // 00101000x
+ {8, 40}, {8, 40}, // 00101001x
+ {8, 41}, {8, 41}, // 00101010x
+ {8, 42}, {8, 42}, // 00101011x
+ {8, 43}, {8, 43}, // 00101100x
+ {8, 44}, {8, 44}, // 00101101x
+ {7, 21}, {7, 21}, {7, 21}, {7, 21}, // 0010111xx
+ {7, 28}, {7, 28}, {7, 28}, {7, 28}, // 0011000xx
+ {8, 61}, {8, 61}, // 00110010x
+ {8, 62}, {8, 62}, // 00110011x
+ {8, 63}, {8, 63}, // 00110100x
+ {8, 0}, {8, 0}, // 00110101x
+ {8, 320}, {8, 320}, // 00110110x
+ {8, 384}, {8, 384}, // 00110111x
+ {5, 10}, {5, 10}, {5, 10}, {5, 10}, // 00111xxxx
+ {5, 10}, {5, 10}, {5, 10}, {5, 10},
+ {5, 10}, {5, 10}, {5, 10}, {5, 10},
+ {5, 10}, {5, 10}, {5, 10}, {5, 10},
+ {5, 11}, {5, 11}, {5, 11}, {5, 11}, // 01000xxxx
+ {5, 11}, {5, 11}, {5, 11}, {5, 11},
+ {5, 11}, {5, 11}, {5, 11}, {5, 11},
+ {5, 11}, {5, 11}, {5, 11}, {5, 11},
+ {7, 27}, {7, 27}, {7, 27}, {7, 27}, // 0100100xx
+ {8, 59}, {8, 59}, // 01001010x
+ {8, 60}, {8, 60}, // 01001011x
+ {9, 1472}, // 010011000
+ {9, 1536}, // 010011001
+ {9, 1600}, // 010011010
+ {9, 1728}, // 010011011
+ {7, 18}, {7, 18}, {7, 18}, {7, 18}, // 0100111xx
+ {7, 24}, {7, 24}, {7, 24}, {7, 24}, // 0101000xx
+ {8, 49}, {8, 49}, // 01010010x
+ {8, 50}, {8, 50}, // 01010011x
+ {8, 51}, {8, 51}, // 01010100x
+ {8, 52}, {8, 52}, // 01010101x
+ {7, 25}, {7, 25}, {7, 25}, {7, 25}, // 0101011xx
+ {8, 55}, {8, 55}, // 01011000x
+ {8, 56}, {8, 56}, // 01011001x
+ {8, 57}, {8, 57}, // 01011010x
+ {8, 58}, {8, 58}, // 01011011x
+ {6, 192}, {6, 192}, {6, 192}, {6, 192}, // 010111xxx
+ {6, 192}, {6, 192}, {6, 192}, {6, 192},
+ {6, 1664}, {6, 1664}, {6, 1664}, {6, 1664}, // 011000xxx
+ {6, 1664}, {6, 1664}, {6, 1664}, {6, 1664},
+ {8, 448}, {8, 448}, // 01100100x
+ {8, 512}, {8, 512}, // 01100101x
+ {9, 704}, // 011001100
+ {9, 768}, // 011001101
+ {8, 640}, {8, 640}, // 01100111x
+ {8, 576}, {8, 576}, // 01101000x
+ {9, 832}, // 011010010
+ {9, 896}, // 011010011
+ {9, 960}, // 011010100
+ {9, 1024}, // 011010101
+ {9, 1088}, // 011010110
+ {9, 1152}, // 011010111
+ {9, 1216}, // 011011000
+ {9, 1280}, // 011011001
+ {9, 1344}, // 011011010
+ {9, 1408}, // 011011011
+ {7, 256}, {7, 256}, {7, 256}, {7, 256}, // 0110111xx
+ {4, 2}, {4, 2}, {4, 2}, {4, 2}, // 0111xxxxx
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 2}, {4, 2}, {4, 2}, {4, 2},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3}, // 1000xxxxx
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {4, 3}, {4, 3}, {4, 3}, {4, 3},
+ {5, 128}, {5, 128}, {5, 128}, {5, 128}, // 10010xxxx
+ {5, 128}, {5, 128}, {5, 128}, {5, 128},
+ {5, 128}, {5, 128}, {5, 128}, {5, 128},
+ {5, 128}, {5, 128}, {5, 128}, {5, 128},
+ {5, 8}, {5, 8}, {5, 8}, {5, 8}, // 10011xxxx
+ {5, 8}, {5, 8}, {5, 8}, {5, 8},
+ {5, 8}, {5, 8}, {5, 8}, {5, 8},
+ {5, 8}, {5, 8}, {5, 8}, {5, 8},
+ {5, 9}, {5, 9}, {5, 9}, {5, 9}, // 10100xxxx
+ {5, 9}, {5, 9}, {5, 9}, {5, 9},
+ {5, 9}, {5, 9}, {5, 9}, {5, 9},
+ {5, 9}, {5, 9}, {5, 9}, {5, 9},
+ {6, 16}, {6, 16}, {6, 16}, {6, 16}, // 101010xxx
+ {6, 16}, {6, 16}, {6, 16}, {6, 16},
+ {6, 17}, {6, 17}, {6, 17}, {6, 17}, // 101011xxx
+ {6, 17}, {6, 17}, {6, 17}, {6, 17},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4}, // 1011xxxxx
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 4}, {4, 4}, {4, 4}, {4, 4},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5}, // 1100xxxxx
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {4, 5}, {4, 5}, {4, 5}, {4, 5},
+ {6, 14}, {6, 14}, {6, 14}, {6, 14}, // 110100xxx
+ {6, 14}, {6, 14}, {6, 14}, {6, 14},
+ {6, 15}, {6, 15}, {6, 15}, {6, 15}, // 110101xxx
+ {6, 15}, {6, 15}, {6, 15}, {6, 15},
+ {5, 64}, {5, 64}, {5, 64}, {5, 64}, // 11011xxxx
+ {5, 64}, {5, 64}, {5, 64}, {5, 64},
+ {5, 64}, {5, 64}, {5, 64}, {5, 64},
+ {5, 64}, {5, 64}, {5, 64}, {5, 64},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6}, // 1110xxxxx
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 6}, {4, 6}, {4, 6}, {4, 6},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7}, // 1111xxxxx
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7},
+ {4, 7}, {4, 7}, {4, 7}, {4, 7}
+};
+
+//------------------------------------------------------------------------
+// black run lengths
+//------------------------------------------------------------------------
+
+// 10-13 bit codes (upper 6 bits are 0)
+static const CCITTCode blackTab1[128] = {
+ {-1, -1}, {-1, -1}, // 000000000000x
+ {12, ccittEOL}, {12, ccittEOL}, // 000000000001x
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000001xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000010xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000011xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000100xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000101xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000110xx
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000111xx
+ {11, 1792}, {11, 1792}, {11, 1792}, {11, 1792}, // 00000001000xx
+ {12, 1984}, {12, 1984}, // 000000010010x
+ {12, 2048}, {12, 2048}, // 000000010011x
+ {12, 2112}, {12, 2112}, // 000000010100x
+ {12, 2176}, {12, 2176}, // 000000010101x
+ {12, 2240}, {12, 2240}, // 000000010110x
+ {12, 2304}, {12, 2304}, // 000000010111x
+ {11, 1856}, {11, 1856}, {11, 1856}, {11, 1856}, // 00000001100xx
+ {11, 1920}, {11, 1920}, {11, 1920}, {11, 1920}, // 00000001101xx
+ {12, 2368}, {12, 2368}, // 000000011100x
+ {12, 2432}, {12, 2432}, // 000000011101x
+ {12, 2496}, {12, 2496}, // 000000011110x
+ {12, 2560}, {12, 2560}, // 000000011111x
+ {10, 18}, {10, 18}, {10, 18}, {10, 18}, // 0000001000xxx
+ {10, 18}, {10, 18}, {10, 18}, {10, 18},
+ {12, 52}, {12, 52}, // 000000100100x
+ {13, 640}, // 0000001001010
+ {13, 704}, // 0000001001011
+ {13, 768}, // 0000001001100
+ {13, 832}, // 0000001001101
+ {12, 55}, {12, 55}, // 000000100111x
+ {12, 56}, {12, 56}, // 000000101000x
+ {13, 1280}, // 0000001010010
+ {13, 1344}, // 0000001010011
+ {13, 1408}, // 0000001010100
+ {13, 1472}, // 0000001010101
+ {12, 59}, {12, 59}, // 000000101011x
+ {12, 60}, {12, 60}, // 000000101100x
+ {13, 1536}, // 0000001011010
+ {13, 1600}, // 0000001011011
+ {11, 24}, {11, 24}, {11, 24}, {11, 24}, // 00000010111xx
+ {11, 25}, {11, 25}, {11, 25}, {11, 25}, // 00000011000xx
+ {13, 1664}, // 0000001100100
+ {13, 1728}, // 0000001100101
+ {12, 320}, {12, 320}, // 000000110011x
+ {12, 384}, {12, 384}, // 000000110100x
+ {12, 448}, {12, 448}, // 000000110101x
+ {13, 512}, // 0000001101100
+ {13, 576}, // 0000001101101
+ {12, 53}, {12, 53}, // 000000110111x
+ {12, 54}, {12, 54}, // 000000111000x
+ {13, 896}, // 0000001110010
+ {13, 960}, // 0000001110011
+ {13, 1024}, // 0000001110100
+ {13, 1088}, // 0000001110101
+ {13, 1152}, // 0000001110110
+ {13, 1216}, // 0000001110111
+ {10, 64}, {10, 64}, {10, 64}, {10, 64}, // 0000001111xxx
+ {10, 64}, {10, 64}, {10, 64}, {10, 64}
+};
+
+// 7-12 bit codes (upper 4 bits are 0)
+static const CCITTCode blackTab2[192] = {
+ {8, 13}, {8, 13}, {8, 13}, {8, 13}, // 00000100xxxx
+ {8, 13}, {8, 13}, {8, 13}, {8, 13},
+ {8, 13}, {8, 13}, {8, 13}, {8, 13},
+ {8, 13}, {8, 13}, {8, 13}, {8, 13},
+ {11, 23}, {11, 23}, // 00000101000x
+ {12, 50}, // 000001010010
+ {12, 51}, // 000001010011
+ {12, 44}, // 000001010100
+ {12, 45}, // 000001010101
+ {12, 46}, // 000001010110
+ {12, 47}, // 000001010111
+ {12, 57}, // 000001011000
+ {12, 58}, // 000001011001
+ {12, 61}, // 000001011010
+ {12, 256}, // 000001011011
+ {10, 16}, {10, 16}, {10, 16}, {10, 16}, // 0000010111xx
+ {10, 17}, {10, 17}, {10, 17}, {10, 17}, // 0000011000xx
+ {12, 48}, // 000001100100
+ {12, 49}, // 000001100101
+ {12, 62}, // 000001100110
+ {12, 63}, // 000001100111
+ {12, 30}, // 000001101000
+ {12, 31}, // 000001101001
+ {12, 32}, // 000001101010
+ {12, 33}, // 000001101011
+ {12, 40}, // 000001101100
+ {12, 41}, // 000001101101
+ {11, 22}, {11, 22}, // 00000110111x
+ {8, 14}, {8, 14}, {8, 14}, {8, 14}, // 00000111xxxx
+ {8, 14}, {8, 14}, {8, 14}, {8, 14},
+ {8, 14}, {8, 14}, {8, 14}, {8, 14},
+ {8, 14}, {8, 14}, {8, 14}, {8, 14},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10}, // 0000100xxxxx
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 10}, {7, 10}, {7, 10}, {7, 10},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11}, // 0000101xxxxx
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {7, 11}, {7, 11}, {7, 11}, {7, 11},
+ {9, 15}, {9, 15}, {9, 15}, {9, 15}, // 000011000xxx
+ {9, 15}, {9, 15}, {9, 15}, {9, 15},
+ {12, 128}, // 000011001000
+ {12, 192}, // 000011001001
+ {12, 26}, // 000011001010
+ {12, 27}, // 000011001011
+ {12, 28}, // 000011001100
+ {12, 29}, // 000011001101
+ {11, 19}, {11, 19}, // 00001100111x
+ {11, 20}, {11, 20}, // 00001101000x
+ {12, 34}, // 000011010010
+ {12, 35}, // 000011010011
+ {12, 36}, // 000011010100
+ {12, 37}, // 000011010101
+ {12, 38}, // 000011010110
+ {12, 39}, // 000011010111
+ {11, 21}, {11, 21}, // 00001101100x
+ {12, 42}, // 000011011010
+ {12, 43}, // 000011011011
+ {10, 0}, {10, 0}, {10, 0}, {10, 0}, // 0000110111xx
+ {7, 12}, {7, 12}, {7, 12}, {7, 12}, // 0000111xxxxx
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12},
+ {7, 12}, {7, 12}, {7, 12}, {7, 12}
+};
+
+// 2-6 bit codes
+static const CCITTCode blackTab3[64] = {
+ {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 0000xx
+ {6, 9}, // 000100
+ {6, 8}, // 000101
+ {5, 7}, {5, 7}, // 00011x
+ {4, 6}, {4, 6}, {4, 6}, {4, 6}, // 0010xx
+ {4, 5}, {4, 5}, {4, 5}, {4, 5}, // 0011xx
+ {3, 1}, {3, 1}, {3, 1}, {3, 1}, // 010xxx
+ {3, 1}, {3, 1}, {3, 1}, {3, 1},
+ {3, 4}, {3, 4}, {3, 4}, {3, 4}, // 011xxx
+ {3, 4}, {3, 4}, {3, 4}, {3, 4},
+ {2, 3}, {2, 3}, {2, 3}, {2, 3}, // 10xxxx
+ {2, 3}, {2, 3}, {2, 3}, {2, 3},
+ {2, 3}, {2, 3}, {2, 3}, {2, 3},
+ {2, 3}, {2, 3}, {2, 3}, {2, 3},
+ {2, 2}, {2, 2}, {2, 2}, {2, 2}, // 11xxxx
+ {2, 2}, {2, 2}, {2, 2}, {2, 2},
+ {2, 2}, {2, 2}, {2, 2}, {2, 2},
+ {2, 2}, {2, 2}, {2, 2}, {2, 2}
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.cc
new file mode 100644
index 00000000000..6634317ad11
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.cc
@@ -0,0 +1,4810 @@
+//========================================================================
+//
+// Stream.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Glenn Ganz <glenn.ganz@uptime.ch>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <limits.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "poppler-config.h"
+#include "Error.h"
+#include "Object.h"
+#include "Lexer.h"
+#include "GfxState.h"
+#include "Stream.h"
+#include "JBIG2Stream.h"
+#include "Stream-CCITT.h"
+
+#ifdef ENABLE_LIBJPEG
+#include "DCTStream.h"
+#endif
+
+#ifdef ENABLE_ZLIB
+#include "FlateStream.h"
+#endif
+
+#ifdef ENABLE_LIBOPENJPEG
+#include "JPEG2000Stream.h"
+#else
+#include "JPXStream.h"
+#endif
+
+#ifdef __DJGPP__
+static GBool setDJSYSFLAGS = gFalse;
+#endif
+
+#ifdef VMS
+#ifdef __GNUC__
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+#endif
+
+//------------------------------------------------------------------------
+// Stream (base class)
+//------------------------------------------------------------------------
+
+Stream::Stream() {
+ ref = 1;
+}
+
+Stream::~Stream() {
+}
+
+void Stream::close() {
+}
+
+int Stream::getRawChar() {
+ error(-1, "Internal: called getRawChar() on non-predictor stream");
+ return EOF;
+}
+
+char *Stream::getLine(char *buf, int size) {
+ int i;
+ int c;
+
+ if (lookChar() == EOF)
+ return NULL;
+ for (i = 0; i < size - 1; ++i) {
+ c = getChar();
+ if (c == EOF || c == '\n')
+ break;
+ if (c == '\r') {
+ if ((c = lookChar()) == '\n')
+ getChar();
+ break;
+ }
+ buf[i] = c;
+ }
+ buf[i] = '\0';
+ return buf;
+}
+
+GooString *Stream::getPSFilter(int psLevel, char *indent) {
+ return new GooString();
+}
+
+Stream *Stream::addFilters(Object *dict) {
+ Object obj, obj2;
+ Object params, params2;
+ Stream *str;
+ int i;
+
+ str = this;
+ dict->dictLookup("Filter", &obj);
+ if (obj.isNull()) {
+ obj.free();
+ dict->dictLookup("F", &obj);
+ }
+ dict->dictLookup("DecodeParms", &params);
+ if (params.isNull()) {
+ params.free();
+ dict->dictLookup("DP", &params);
+ }
+ if (obj.isName()) {
+ str = makeFilter(obj.getName(), str, &params);
+ } else if (obj.isArray()) {
+ for (i = 0; i < obj.arrayGetLength(); ++i) {
+ obj.arrayGet(i, &obj2);
+ if (params.isArray())
+ params.arrayGet(i, &params2);
+ else
+ params2.initNull();
+ if (obj2.isName()) {
+ str = makeFilter(obj2.getName(), str, &params2);
+ } else {
+ error(getPos(), "Bad filter name");
+ str = new EOFStream(str);
+ }
+ obj2.free();
+ params2.free();
+ }
+ } else if (!obj.isNull()) {
+ error(getPos(), "Bad 'Filter' attribute in stream");
+ }
+ obj.free();
+ params.free();
+
+ return str;
+}
+
+Stream *Stream::makeFilter(char *name, Stream *str, Object *params) {
+ int pred; // parameters
+ int colors;
+ int bits;
+ int early;
+ int encoding;
+ GBool endOfLine, byteAlign, endOfBlock, black;
+ int columns, rows;
+ int colorXform;
+ Object globals, obj;
+
+ if (!strcmp(name, "ASCIIHexDecode") || !strcmp(name, "AHx")) {
+ str = new ASCIIHexStream(str);
+ } else if (!strcmp(name, "ASCII85Decode") || !strcmp(name, "A85")) {
+ str = new ASCII85Stream(str);
+ } else if (!strcmp(name, "LZWDecode") || !strcmp(name, "LZW")) {
+ pred = 1;
+ columns = 1;
+ colors = 1;
+ bits = 8;
+ early = 1;
+ if (params->isDict()) {
+ params->dictLookup("Predictor", &obj);
+ if (obj.isInt())
+ pred = obj.getInt();
+ obj.free();
+ params->dictLookup("Columns", &obj);
+ if (obj.isInt())
+ columns = obj.getInt();
+ obj.free();
+ params->dictLookup("Colors", &obj);
+ if (obj.isInt())
+ colors = obj.getInt();
+ obj.free();
+ params->dictLookup("BitsPerComponent", &obj);
+ if (obj.isInt())
+ bits = obj.getInt();
+ obj.free();
+ params->dictLookup("EarlyChange", &obj);
+ if (obj.isInt())
+ early = obj.getInt();
+ obj.free();
+ }
+ str = new LZWStream(str, pred, columns, colors, bits, early);
+ } else if (!strcmp(name, "RunLengthDecode") || !strcmp(name, "RL")) {
+ str = new RunLengthStream(str);
+ } else if (!strcmp(name, "CCITTFaxDecode") || !strcmp(name, "CCF")) {
+ encoding = 0;
+ endOfLine = gFalse;
+ byteAlign = gFalse;
+ columns = 1728;
+ rows = 0;
+ endOfBlock = gTrue;
+ black = gFalse;
+ if (params->isDict()) {
+ params->dictLookup("K", &obj);
+ if (obj.isInt()) {
+ encoding = obj.getInt();
+ }
+ obj.free();
+ params->dictLookup("EndOfLine", &obj);
+ if (obj.isBool()) {
+ endOfLine = obj.getBool();
+ }
+ obj.free();
+ params->dictLookup("EncodedByteAlign", &obj);
+ if (obj.isBool()) {
+ byteAlign = obj.getBool();
+ }
+ obj.free();
+ params->dictLookup("Columns", &obj);
+ if (obj.isInt()) {
+ columns = obj.getInt();
+ }
+ obj.free();
+ params->dictLookup("Rows", &obj);
+ if (obj.isInt()) {
+ rows = obj.getInt();
+ }
+ obj.free();
+ params->dictLookup("EndOfBlock", &obj);
+ if (obj.isBool()) {
+ endOfBlock = obj.getBool();
+ }
+ obj.free();
+ params->dictLookup("BlackIs1", &obj);
+ if (obj.isBool()) {
+ black = obj.getBool();
+ }
+ obj.free();
+ }
+ str = new CCITTFaxStream(str, encoding, endOfLine, byteAlign,
+ columns, rows, endOfBlock, black);
+ } else if (!strcmp(name, "DCTDecode") || !strcmp(name, "DCT")) {
+ colorXform = -1;
+ if (params->isDict()) {
+ if (params->dictLookup("ColorTransform", &obj)->isInt()) {
+ colorXform = obj.getInt();
+ }
+ obj.free();
+ }
+ str = new DCTStream(str, colorXform);
+ } else if (!strcmp(name, "FlateDecode") || !strcmp(name, "Fl")) {
+ pred = 1;
+ columns = 1;
+ colors = 1;
+ bits = 8;
+ if (params->isDict()) {
+ params->dictLookup("Predictor", &obj);
+ if (obj.isInt())
+ pred = obj.getInt();
+ obj.free();
+ params->dictLookup("Columns", &obj);
+ if (obj.isInt())
+ columns = obj.getInt();
+ obj.free();
+ params->dictLookup("Colors", &obj);
+ if (obj.isInt())
+ colors = obj.getInt();
+ obj.free();
+ params->dictLookup("BitsPerComponent", &obj);
+ if (obj.isInt())
+ bits = obj.getInt();
+ obj.free();
+ }
+ str = new FlateStream(str, pred, columns, colors, bits);
+ } else if (!strcmp(name, "JBIG2Decode")) {
+ if (params->isDict()) {
+ params->dictLookup("JBIG2Globals", &globals);
+ }
+ str = new JBIG2Stream(str, &globals);
+ globals.free();
+ } else if (!strcmp(name, "JPXDecode")) {
+ str = new JPXStream(str);
+ } else {
+ error(getPos(), "Unknown filter '%s'", name);
+ str = new EOFStream(str);
+ }
+ return str;
+}
+
+//------------------------------------------------------------------------
+// OutStream
+//------------------------------------------------------------------------
+OutStream::OutStream ()
+{
+ ref = 1;
+}
+
+OutStream::~OutStream ()
+{
+}
+
+//------------------------------------------------------------------------
+// FileOutStream
+//------------------------------------------------------------------------
+FileOutStream::FileOutStream (FILE* fa, Guint startA)
+{
+ f = fa;
+ start = startA;
+}
+
+FileOutStream::~FileOutStream ()
+{
+ close ();
+}
+
+void FileOutStream::close ()
+{
+
+}
+
+int FileOutStream::getPos ()
+{
+ return ftell(f);
+}
+
+void FileOutStream::put (char c)
+{
+ fputc(c,f);
+}
+
+void FileOutStream::printf(const char *format, ...)
+{
+ va_list argptr;
+ va_start (argptr, format);
+ vfprintf(f, format, argptr);
+ va_end (argptr);
+}
+
+
+//------------------------------------------------------------------------
+// BaseStream
+//------------------------------------------------------------------------
+
+BaseStream::BaseStream(Object *dictA) {
+ dict = *dictA;
+}
+
+BaseStream::~BaseStream() {
+ dict.free();
+}
+
+//------------------------------------------------------------------------
+// FilterStream
+//------------------------------------------------------------------------
+
+FilterStream::FilterStream(Stream *strA) {
+ str = strA;
+}
+
+FilterStream::~FilterStream() {
+}
+
+void FilterStream::close() {
+ str->close();
+}
+
+void FilterStream::setPos(Guint pos, int dir) {
+ error(-1, "Internal: called setPos() on FilterStream");
+}
+
+//------------------------------------------------------------------------
+// ImageStream
+//------------------------------------------------------------------------
+
+ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) {
+ int imgLineSize;
+
+ str = strA;
+ width = widthA;
+ nComps = nCompsA;
+ nBits = nBitsA;
+
+ nVals = width * nComps;
+ if (nBits == 1) {
+ imgLineSize = (nVals + 7) & ~7;
+ } else {
+ imgLineSize = nVals;
+ }
+ if (width > INT_MAX / nComps) {
+ // force a call to gmallocn(-1,...), which will throw an exception
+ imgLineSize = -1;
+ }
+ imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar));
+ imgIdx = nVals;
+}
+
+ImageStream::~ImageStream() {
+ gfree(imgLine);
+}
+
+void ImageStream::reset() {
+ str->reset();
+}
+
+void ImageStream::close() {
+ str->close();
+}
+
+GBool ImageStream::getPixel(Guchar *pix) {
+ int i;
+
+ if (imgIdx >= nVals) {
+ getLine();
+ imgIdx = 0;
+ }
+ for (i = 0; i < nComps; ++i) {
+ pix[i] = imgLine[imgIdx++];
+ }
+ return gTrue;
+}
+
+Guchar *ImageStream::getLine() {
+ Gulong buf, bitMask;
+ int bits;
+ int c;
+ int i;
+
+ if (nBits == 1) {
+ for (i = 0; i < nVals; i += 8) {
+ c = str->getChar();
+ imgLine[i+0] = (Guchar)((c >> 7) & 1);
+ imgLine[i+1] = (Guchar)((c >> 6) & 1);
+ imgLine[i+2] = (Guchar)((c >> 5) & 1);
+ imgLine[i+3] = (Guchar)((c >> 4) & 1);
+ imgLine[i+4] = (Guchar)((c >> 3) & 1);
+ imgLine[i+5] = (Guchar)((c >> 2) & 1);
+ imgLine[i+6] = (Guchar)((c >> 1) & 1);
+ imgLine[i+7] = (Guchar)(c & 1);
+ }
+ } else if (nBits == 8) {
+ Guchar *line = imgLine;
+ for (i = 0; i < nVals; ++i) {
+ *line++ = str->getChar();
+ }
+ } else if (nBits == 16) {
+ // this is a hack to support 16 bits images, everywhere
+ // we assume a component fits in 8 bits, with this hack
+ // we treat 16 bit images as 8 bit ones until it's fixed correctly.
+ // The hack has another part on GfxImageColorMap::GfxImageColorMap
+ for (i = 0; i < nVals; ++i) {
+ imgLine[i] = str->getChar();
+ str->getChar();
+ }
+ } else {
+ bitMask = (1 << nBits) - 1;
+ buf = 0;
+ bits = 0;
+ for (i = 0; i < nVals; ++i) {
+ if (bits < nBits) {
+ buf = (buf << 8) | (str->getChar() & 0xff);
+ bits += 8;
+ }
+ imgLine[i] = (Guchar)((buf >> (bits - nBits)) & bitMask);
+ bits -= nBits;
+ }
+ }
+ return imgLine;
+}
+
+void ImageStream::skipLine() {
+ int n, i;
+
+ n = (nVals * nBits + 7) >> 3;
+ for (i = 0; i < n; ++i) {
+ str->getChar();
+ }
+}
+
+//------------------------------------------------------------------------
+// StreamPredictor
+//------------------------------------------------------------------------
+
+StreamPredictor::StreamPredictor(Stream *strA, int predictorA,
+ int widthA, int nCompsA, int nBitsA) {
+ str = strA;
+ predictor = predictorA;
+ width = widthA;
+ nComps = nCompsA;
+ nBits = nBitsA;
+ predLine = NULL;
+ ok = gFalse;
+
+ nVals = width * nComps;
+ pixBytes = (nComps * nBits + 7) >> 3;
+ rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
+ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+ nComps > gfxColorMaxComps ||
+ nBits > 16 ||
+ width >= INT_MAX / nComps || // check for overflow in nVals
+ nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes
+ return;
+ }
+ predLine = (Guchar *)gmalloc(rowBytes);
+ memset(predLine, 0, rowBytes);
+ predIdx = rowBytes;
+
+ ok = gTrue;
+}
+
+StreamPredictor::~StreamPredictor() {
+ gfree(predLine);
+}
+
+int StreamPredictor::lookChar() {
+ if (predIdx >= rowBytes) {
+ if (!getNextLine()) {
+ return EOF;
+ }
+ }
+ return predLine[predIdx];
+}
+
+int StreamPredictor::getChar() {
+ if (predIdx >= rowBytes) {
+ if (!getNextLine()) {
+ return EOF;
+ }
+ }
+ return predLine[predIdx++];
+}
+
+GBool StreamPredictor::getNextLine() {
+ int curPred;
+ Guchar upLeftBuf[gfxColorMaxComps * 2 + 1];
+ int left, up, upLeft, p, pa, pb, pc;
+ int c;
+ Gulong inBuf, outBuf, bitMask;
+ int inBits, outBits;
+ int i, j, k, kk;
+
+ // get PNG optimum predictor number
+ if (predictor >= 10) {
+ if ((curPred = str->getRawChar()) == EOF) {
+ return gFalse;
+ }
+ curPred += 10;
+ } else {
+ curPred = predictor;
+ }
+
+ // read the raw line, apply PNG (byte) predictor
+ memset(upLeftBuf, 0, pixBytes + 1);
+ for (i = pixBytes; i < rowBytes; ++i) {
+ for (j = pixBytes; j > 0; --j) {
+ upLeftBuf[j] = upLeftBuf[j-1];
+ }
+ upLeftBuf[0] = predLine[i];
+ if ((c = str->getRawChar()) == EOF) {
+ if (i > pixBytes) {
+ // this ought to return false, but some (broken) PDF files
+ // contain truncated image data, and Adobe apparently reads the
+ // last partial line
+ break;
+ }
+ return gFalse;
+ }
+ switch (curPred) {
+ case 11: // PNG sub
+ predLine[i] = predLine[i - pixBytes] + (Guchar)c;
+ break;
+ case 12: // PNG up
+ predLine[i] = predLine[i] + (Guchar)c;
+ break;
+ case 13: // PNG average
+ predLine[i] = ((predLine[i - pixBytes] + predLine[i]) >> 1) +
+ (Guchar)c;
+ break;
+ case 14: // PNG Paeth
+ left = predLine[i - pixBytes];
+ up = predLine[i];
+ upLeft = upLeftBuf[pixBytes];
+ p = left + up - upLeft;
+ if ((pa = p - left) < 0)
+ pa = -pa;
+ if ((pb = p - up) < 0)
+ pb = -pb;
+ if ((pc = p - upLeft) < 0)
+ pc = -pc;
+ if (pa <= pb && pa <= pc)
+ predLine[i] = left + (Guchar)c;
+ else if (pb <= pc)
+ predLine[i] = up + (Guchar)c;
+ else
+ predLine[i] = upLeft + (Guchar)c;
+ break;
+ case 10: // PNG none
+ default: // no predictor or TIFF predictor
+ predLine[i] = (Guchar)c;
+ break;
+ }
+ }
+
+ // apply TIFF (component) predictor
+ if (predictor == 2) {
+ if (nBits == 1) {
+ inBuf = predLine[pixBytes - 1];
+ for (i = pixBytes; i < rowBytes; i += 8) {
+ // 1-bit add is just xor
+ inBuf = (inBuf << 8) | predLine[i];
+ predLine[i] ^= inBuf >> nComps;
+ }
+ } else if (nBits == 8) {
+ for (i = pixBytes; i < rowBytes; ++i) {
+ predLine[i] += predLine[i - nComps];
+ }
+ } else {
+ memset(upLeftBuf, 0, nComps + 1);
+ bitMask = (1 << nBits) - 1;
+ inBuf = outBuf = 0;
+ inBits = outBits = 0;
+ j = k = pixBytes;
+ for (i = 0; i < width; ++i) {
+ for (kk = 0; kk < nComps; ++kk) {
+ if (inBits < nBits) {
+ inBuf = (inBuf << 8) | (predLine[j++] & 0xff);
+ inBits += 8;
+ }
+ upLeftBuf[kk] = (Guchar)((upLeftBuf[kk] +
+ (inBuf >> (inBits - nBits))) & bitMask);
+ inBits -= nBits;
+ outBuf = (outBuf << nBits) | upLeftBuf[kk];
+ outBits += nBits;
+ if (outBits >= 8) {
+ predLine[k++] = (Guchar)(outBuf >> (outBits - 8));
+ outBits -= 8;
+ }
+ }
+ }
+ if (outBits > 0) {
+ predLine[k++] = (Guchar)((outBuf << (8 - outBits)) +
+ (inBuf & ((1 << (8 - outBits)) - 1)));
+ }
+ }
+ }
+
+ // reset to start of line
+ predIdx = pixBytes;
+
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// FileStream
+//------------------------------------------------------------------------
+
+FileStream::FileStream(FILE *fA, Guint startA, GBool limitedA,
+ Guint lengthA, Object *dictA):
+ BaseStream(dictA) {
+ f = fA;
+ start = startA;
+ limited = limitedA;
+ length = lengthA;
+ bufPtr = bufEnd = buf;
+ bufPos = start;
+ savePos = 0;
+ saved = gFalse;
+}
+
+FileStream::~FileStream() {
+ close();
+}
+
+Stream *FileStream::makeSubStream(Guint startA, GBool limitedA,
+ Guint lengthA, Object *dictA) {
+ return new FileStream(f, startA, limitedA, lengthA, dictA);
+}
+
+void FileStream::reset() {
+#if HAVE_FSEEKO
+ savePos = (Guint)ftello(f);
+ fseeko(f, start, SEEK_SET);
+#elif HAVE_FSEEK64
+ savePos = (Guint)ftell64(f);
+ fseek64(f, start, SEEK_SET);
+#else
+ savePos = (Guint)ftell(f);
+ fseek(f, start, SEEK_SET);
+#endif
+ saved = gTrue;
+ bufPtr = bufEnd = buf;
+ bufPos = start;
+}
+
+void FileStream::close() {
+ if (saved) {
+#if HAVE_FSEEKO
+ fseeko(f, savePos, SEEK_SET);
+#elif HAVE_FSEEK64
+ fseek64(f, savePos, SEEK_SET);
+#else
+ fseek(f, savePos, SEEK_SET);
+#endif
+ saved = gFalse;
+ }
+}
+
+GBool FileStream::fillBuf() {
+ int n;
+
+ bufPos += bufEnd - buf;
+ bufPtr = bufEnd = buf;
+ if (limited && bufPos >= start + length) {
+ return gFalse;
+ }
+ if (limited && bufPos + fileStreamBufSize > start + length) {
+ n = start + length - bufPos;
+ } else {
+ n = fileStreamBufSize;
+ }
+ n = fread(buf, 1, n, f);
+ bufEnd = buf + n;
+ if (bufPtr >= bufEnd) {
+ return gFalse;
+ }
+ return gTrue;
+}
+
+void FileStream::setPos(Guint pos, int dir) {
+ Guint size;
+
+ if (dir >= 0) {
+#if HAVE_FSEEKO
+ fseeko(f, pos, SEEK_SET);
+#elif HAVE_FSEEK64
+ fseek64(f, pos, SEEK_SET);
+#else
+ fseek(f, pos, SEEK_SET);
+#endif
+ bufPos = pos;
+ } else {
+#if HAVE_FSEEKO
+ fseeko(f, 0, SEEK_END);
+ size = (Guint)ftello(f);
+#elif HAVE_FSEEK64
+ fseek64(f, 0, SEEK_END);
+ size = (Guint)ftell64(f);
+#else
+ fseek(f, 0, SEEK_END);
+ size = (Guint)ftell(f);
+#endif
+ if (pos > size)
+ pos = (Guint)size;
+#ifdef __CYGWIN32__
+ //~ work around a bug in cygwin's implementation of fseek
+ rewind(f);
+#endif
+#if HAVE_FSEEKO
+ fseeko(f, -(int)pos, SEEK_END);
+ bufPos = (Guint)ftello(f);
+#elif HAVE_FSEEK64
+ fseek64(f, -(int)pos, SEEK_END);
+ bufPos = (Guint)ftell64(f);
+#else
+ fseek(f, -(int)pos, SEEK_END);
+ bufPos = (Guint)ftell(f);
+#endif
+ }
+ bufPtr = bufEnd = buf;
+}
+
+void FileStream::moveStart(int delta) {
+ start += delta;
+ bufPtr = bufEnd = buf;
+ bufPos = start;
+}
+
+//------------------------------------------------------------------------
+// MemStream
+//------------------------------------------------------------------------
+
+MemStream::MemStream(char *bufA, Guint startA, Guint lengthA, Object *dictA):
+ BaseStream(dictA) {
+ buf = bufA;
+ start = startA;
+ length = lengthA;
+ bufEnd = buf + start + length;
+ bufPtr = buf + start;
+ needFree = gFalse;
+}
+
+MemStream::~MemStream() {
+ if (needFree) {
+ gfree(buf);
+ }
+}
+
+Stream *MemStream::makeSubStream(Guint startA, GBool limited,
+ Guint lengthA, Object *dictA) {
+ MemStream *subStr;
+ Guint newLength;
+
+ if (!limited || startA + lengthA > start + length) {
+ newLength = start + length - startA;
+ } else {
+ newLength = lengthA;
+ }
+ subStr = new MemStream(buf, startA, newLength, dictA);
+ return subStr;
+}
+
+void MemStream::reset() {
+ bufPtr = buf + start;
+}
+
+void MemStream::close() {
+}
+
+void MemStream::setPos(Guint pos, int dir) {
+ Guint i;
+
+ if (dir >= 0) {
+ i = pos;
+ } else {
+ i = start + length - pos;
+ }
+ if (i < start) {
+ i = start;
+ } else if (i > start + length) {
+ i = start + length;
+ }
+ bufPtr = buf + i;
+}
+
+void MemStream::moveStart(int delta) {
+ start += delta;
+ length -= delta;
+ bufPtr = buf + start;
+}
+
+//------------------------------------------------------------------------
+// EmbedStream
+//------------------------------------------------------------------------
+
+EmbedStream::EmbedStream(Stream *strA, Object *dictA,
+ GBool limitedA, Guint lengthA):
+ BaseStream(dictA) {
+ str = strA;
+ limited = limitedA;
+ length = lengthA;
+}
+
+EmbedStream::~EmbedStream() {
+}
+
+Stream *EmbedStream::makeSubStream(Guint start, GBool limitedA,
+ Guint lengthA, Object *dictA) {
+ error(-1, "Internal: called makeSubStream() on EmbedStream");
+ return NULL;
+}
+
+int EmbedStream::getChar() {
+ if (limited && !length) {
+ return EOF;
+ }
+ --length;
+ return str->getChar();
+}
+
+int EmbedStream::lookChar() {
+ if (limited && !length) {
+ return EOF;
+ }
+ return str->lookChar();
+}
+
+void EmbedStream::setPos(Guint pos, int dir) {
+ error(-1, "Internal: called setPos() on EmbedStream");
+}
+
+Guint EmbedStream::getStart() {
+ error(-1, "Internal: called getStart() on EmbedStream");
+ return 0;
+}
+
+void EmbedStream::moveStart(int delta) {
+ error(-1, "Internal: called moveStart() on EmbedStream");
+}
+
+//------------------------------------------------------------------------
+// ASCIIHexStream
+//------------------------------------------------------------------------
+
+ASCIIHexStream::ASCIIHexStream(Stream *strA):
+ FilterStream(strA) {
+ buf = EOF;
+ eof = gFalse;
+}
+
+ASCIIHexStream::~ASCIIHexStream() {
+ delete str;
+}
+
+void ASCIIHexStream::reset() {
+ str->reset();
+ buf = EOF;
+ eof = gFalse;
+}
+
+int ASCIIHexStream::lookChar() {
+ int c1, c2, x;
+
+ if (buf != EOF)
+ return buf;
+ if (eof) {
+ buf = EOF;
+ return EOF;
+ }
+ do {
+ c1 = str->getChar();
+ } while (isspace(c1));
+ if (c1 == '>') {
+ eof = gTrue;
+ buf = EOF;
+ return buf;
+ }
+ do {
+ c2 = str->getChar();
+ } while (isspace(c2));
+ if (c2 == '>') {
+ eof = gTrue;
+ c2 = '0';
+ }
+ if (c1 >= '0' && c1 <= '9') {
+ x = (c1 - '0') << 4;
+ } else if (c1 >= 'A' && c1 <= 'F') {
+ x = (c1 - 'A' + 10) << 4;
+ } else if (c1 >= 'a' && c1 <= 'f') {
+ x = (c1 - 'a' + 10) << 4;
+ } else if (c1 == EOF) {
+ eof = gTrue;
+ x = 0;
+ } else {
+ error(getPos(), "Illegal character <%02x> in ASCIIHex stream", c1);
+ x = 0;
+ }
+ if (c2 >= '0' && c2 <= '9') {
+ x += c2 - '0';
+ } else if (c2 >= 'A' && c2 <= 'F') {
+ x += c2 - 'A' + 10;
+ } else if (c2 >= 'a' && c2 <= 'f') {
+ x += c2 - 'a' + 10;
+ } else if (c2 == EOF) {
+ eof = gTrue;
+ x = 0;
+ } else {
+ error(getPos(), "Illegal character <%02x> in ASCIIHex stream", c2);
+ }
+ buf = x & 0xff;
+ return buf;
+}
+
+GooString *ASCIIHexStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("/ASCIIHexDecode filter\n");
+ return s;
+}
+
+GBool ASCIIHexStream::isBinary(GBool last) {
+ return str->isBinary(gFalse);
+}
+
+//------------------------------------------------------------------------
+// ASCII85Stream
+//------------------------------------------------------------------------
+
+ASCII85Stream::ASCII85Stream(Stream *strA):
+ FilterStream(strA) {
+ index = n = 0;
+ eof = gFalse;
+}
+
+ASCII85Stream::~ASCII85Stream() {
+ delete str;
+}
+
+void ASCII85Stream::reset() {
+ str->reset();
+ index = n = 0;
+ eof = gFalse;
+}
+
+int ASCII85Stream::lookChar() {
+ int k;
+ Gulong t;
+
+ if (index >= n) {
+ if (eof)
+ return EOF;
+ index = 0;
+ do {
+ c[0] = str->getChar();
+ } while (Lexer::isSpace(c[0]));
+ if (c[0] == '~' || c[0] == EOF) {
+ eof = gTrue;
+ n = 0;
+ return EOF;
+ } else if (c[0] == 'z') {
+ b[0] = b[1] = b[2] = b[3] = 0;
+ n = 4;
+ } else {
+ for (k = 1; k < 5; ++k) {
+ do {
+ c[k] = str->getChar();
+ } while (Lexer::isSpace(c[k]));
+ if (c[k] == '~' || c[k] == EOF)
+ break;
+ }
+ n = k - 1;
+ if (k < 5 && (c[k] == '~' || c[k] == EOF)) {
+ for (++k; k < 5; ++k)
+ c[k] = 0x21 + 84;
+ eof = gTrue;
+ }
+ t = 0;
+ for (k = 0; k < 5; ++k)
+ t = t * 85 + (c[k] - 0x21);
+ for (k = 3; k >= 0; --k) {
+ b[k] = (int)(t & 0xff);
+ t >>= 8;
+ }
+ }
+ }
+ return b[index];
+}
+
+GooString *ASCII85Stream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("/ASCII85Decode filter\n");
+ return s;
+}
+
+GBool ASCII85Stream::isBinary(GBool last) {
+ return str->isBinary(gFalse);
+}
+
+//------------------------------------------------------------------------
+// LZWStream
+//------------------------------------------------------------------------
+
+LZWStream::LZWStream(Stream *strA, int predictor, int columns, int colors,
+ int bits, int earlyA):
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
+ } else {
+ pred = NULL;
+ }
+ early = earlyA;
+ eof = gFalse;
+ inputBits = 0;
+ clearTable();
+}
+
+LZWStream::~LZWStream() {
+ if (pred) {
+ delete pred;
+ }
+ delete str;
+}
+
+int LZWStream::getChar() {
+ if (pred) {
+ return pred->getChar();
+ }
+ if (eof) {
+ return EOF;
+ }
+ if (seqIndex >= seqLength) {
+ if (!processNextCode()) {
+ return EOF;
+ }
+ }
+ return seqBuf[seqIndex++];
+}
+
+int LZWStream::lookChar() {
+ if (pred) {
+ return pred->lookChar();
+ }
+ if (eof) {
+ return EOF;
+ }
+ if (seqIndex >= seqLength) {
+ if (!processNextCode()) {
+ return EOF;
+ }
+ }
+ return seqBuf[seqIndex];
+}
+
+int LZWStream::getRawChar() {
+ if (eof) {
+ return EOF;
+ }
+ if (seqIndex >= seqLength) {
+ if (!processNextCode()) {
+ return EOF;
+ }
+ }
+ return seqBuf[seqIndex++];
+}
+
+void LZWStream::reset() {
+ str->reset();
+ eof = gFalse;
+ inputBits = 0;
+ clearTable();
+}
+
+GBool LZWStream::processNextCode() {
+ int code;
+ int nextLength;
+ int i, j;
+
+ // check for EOF
+ if (eof) {
+ return gFalse;
+ }
+
+ // check for eod and clear-table codes
+ start:
+ code = getCode();
+ if (code == EOF || code == 257) {
+ eof = gTrue;
+ return gFalse;
+ }
+ if (code == 256) {
+ clearTable();
+ goto start;
+ }
+ if (nextCode >= 4097) {
+ error(getPos(), "Bad LZW stream - expected clear-table code");
+ clearTable();
+ }
+
+ // process the next code
+ nextLength = seqLength + 1;
+ if (code < 256) {
+ seqBuf[0] = code;
+ seqLength = 1;
+ } else if (code < nextCode) {
+ seqLength = table[code].length;
+ for (i = seqLength - 1, j = code; i > 0; --i) {
+ seqBuf[i] = table[j].tail;
+ j = table[j].head;
+ }
+ seqBuf[0] = j;
+ } else if (code == nextCode) {
+ seqBuf[seqLength] = newChar;
+ ++seqLength;
+ } else {
+ error(getPos(), "Bad LZW stream - unexpected code");
+ eof = gTrue;
+ return gFalse;
+ }
+ newChar = seqBuf[0];
+ if (first) {
+ first = gFalse;
+ } else {
+ table[nextCode].length = nextLength;
+ table[nextCode].head = prevCode;
+ table[nextCode].tail = newChar;
+ ++nextCode;
+ if (nextCode + early == 512)
+ nextBits = 10;
+ else if (nextCode + early == 1024)
+ nextBits = 11;
+ else if (nextCode + early == 2048)
+ nextBits = 12;
+ }
+ prevCode = code;
+
+ // reset buffer
+ seqIndex = 0;
+
+ return gTrue;
+}
+
+void LZWStream::clearTable() {
+ nextCode = 258;
+ nextBits = 9;
+ seqIndex = seqLength = 0;
+ first = gTrue;
+}
+
+int LZWStream::getCode() {
+ int c;
+ int code;
+
+ while (inputBits < nextBits) {
+ if ((c = str->getChar()) == EOF)
+ return EOF;
+ inputBuf = (inputBuf << 8) | (c & 0xff);
+ inputBits += 8;
+ }
+ code = (inputBuf >> (inputBits - nextBits)) & ((1 << nextBits) - 1);
+ inputBits -= nextBits;
+ return code;
+}
+
+GooString *LZWStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2 || pred) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< ");
+ if (!early) {
+ s->append("/EarlyChange 0 ");
+ }
+ s->append(">> /LZWDecode filter\n");
+ return s;
+}
+
+GBool LZWStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+//------------------------------------------------------------------------
+// RunLengthStream
+//------------------------------------------------------------------------
+
+RunLengthStream::RunLengthStream(Stream *strA):
+ FilterStream(strA) {
+ bufPtr = bufEnd = buf;
+ eof = gFalse;
+}
+
+RunLengthStream::~RunLengthStream() {
+ delete str;
+}
+
+void RunLengthStream::reset() {
+ str->reset();
+ bufPtr = bufEnd = buf;
+ eof = gFalse;
+}
+
+GooString *RunLengthStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("/RunLengthDecode filter\n");
+ return s;
+}
+
+GBool RunLengthStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+GBool RunLengthStream::fillBuf() {
+ int c;
+ int n, i;
+
+ if (eof)
+ return gFalse;
+ c = str->getChar();
+ if (c == 0x80 || c == EOF) {
+ eof = gTrue;
+ return gFalse;
+ }
+ if (c < 0x80) {
+ n = c + 1;
+ for (i = 0; i < n; ++i)
+ buf[i] = (char)str->getChar();
+ } else {
+ n = 0x101 - c;
+ c = str->getChar();
+ for (i = 0; i < n; ++i)
+ buf[i] = (char)c;
+ }
+ bufPtr = buf;
+ bufEnd = buf + n;
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// CCITTFaxStream
+//------------------------------------------------------------------------
+
+CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
+ GBool byteAlignA, int columnsA, int rowsA,
+ GBool endOfBlockA, GBool blackA):
+ FilterStream(strA) {
+ encoding = encodingA;
+ endOfLine = endOfLineA;
+ byteAlign = byteAlignA;
+ columns = columnsA;
+ if (columns < 1) {
+ columns = 1;
+ } else if (columns > INT_MAX - 2) {
+ columns = INT_MAX - 2;
+ }
+ rows = rowsA;
+ endOfBlock = endOfBlockA;
+ black = blackA;
+ // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns
+ // ---> max codingLine size = columns + 1
+ // refLine has one extra guard entry at the end
+ // ---> max refLine size = columns + 2
+ codingLine = (int *)gmallocn_checkoverflow(columns + 1, sizeof(int));
+ refLine = (int *)gmallocn_checkoverflow(columns + 2, sizeof(int));
+
+ if (codingLine != NULL && refLine != NULL) {
+ eof = gFalse;
+ codingLine[0] = columns;
+ } else {
+ eof = gTrue;
+ }
+ row = 0;
+ nextLine2D = encoding < 0;
+ inputBits = 0;
+ a0i = 0;
+ outputBits = 0;
+
+ buf = EOF;
+}
+
+CCITTFaxStream::~CCITTFaxStream() {
+ delete str;
+ gfree(refLine);
+ gfree(codingLine);
+}
+
+void CCITTFaxStream::unfilteredReset () {
+ str->reset();
+
+ row = 0;
+ nextLine2D = encoding < 0;
+ inputBits = 0;
+ a0i = 0;
+ outputBits = 0;
+ buf = EOF;
+}
+
+void CCITTFaxStream::reset() {
+ short code1;
+
+ unfilteredReset();
+
+ if (codingLine != NULL && refLine != NULL) {
+ eof = gFalse;
+ codingLine[0] = columns;
+ } else {
+ eof = gTrue;
+ }
+
+ // skip any initial zero bits and end-of-line marker, and get the 2D
+ // encoding tag
+ while ((code1 = lookBits(12)) == 0) {
+ eatBits(1);
+ }
+ if (code1 == 0x001) {
+ eatBits(12);
+ }
+ if (encoding > 0) {
+ nextLine2D = !lookBits(1);
+ eatBits(1);
+ }
+}
+
+inline void CCITTFaxStream::addPixels(int a1, int blackPixels) {
+ if (a1 > codingLine[a0i]) {
+ if (a1 > columns) {
+ error(getPos(), "CCITTFax row is wrong length (%d)", a1);
+ err = gTrue;
+ a1 = columns;
+ }
+ if ((a0i & 1) ^ blackPixels) {
+ ++a0i;
+ }
+ codingLine[a0i] = a1;
+ }
+}
+
+inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) {
+ if (a1 > codingLine[a0i]) {
+ if (a1 > columns) {
+ error(getPos(), "CCITTFax row is wrong length (%d)", a1);
+ err = gTrue;
+ a1 = columns;
+ }
+ if ((a0i & 1) ^ blackPixels) {
+ ++a0i;
+ }
+ codingLine[a0i] = a1;
+ } else if (a1 < codingLine[a0i]) {
+ if (a1 < 0) {
+ error(getPos(), "Invalid CCITTFax code");
+ err = gTrue;
+ a1 = 0;
+ }
+ while (a0i > 0 && a1 <= codingLine[a0i - 1]) {
+ --a0i;
+ }
+ codingLine[a0i] = a1;
+ }
+}
+
+int CCITTFaxStream::lookChar() {
+ short code1, code2, code3;
+ int b1i, blackPixels, i, bits;
+ GBool gotEOL;
+
+ if (buf != EOF) {
+ return buf;
+ }
+
+ // read the next row
+ if (outputBits == 0) {
+
+ // if at eof just return EOF
+ if (eof) {
+ return EOF;
+ }
+
+ err = gFalse;
+
+ // 2-D encoding
+ if (nextLine2D) {
+ for (i = 0; codingLine[i] < columns; ++i) {
+ refLine[i] = codingLine[i];
+ }
+ refLine[i++] = columns;
+ refLine[i] = columns;
+ codingLine[0] = 0;
+ a0i = 0;
+ b1i = 0;
+ blackPixels = 0;
+ // invariant:
+ // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1]
+ // <= columns
+ // exception at left edge:
+ // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible
+ // exception at right edge:
+ // refLine[b1i] = refLine[b1i+1] = columns is possible
+ while (codingLine[a0i] < columns) {
+ code1 = getTwoDimCode();
+ switch (code1) {
+ case twoDimPass:
+ addPixels(refLine[b1i + 1], blackPixels);
+ if (refLine[b1i + 1] < columns) {
+ b1i += 2;
+ }
+ break;
+ case twoDimHoriz:
+ code1 = code2 = 0;
+ if (blackPixels) {
+ do {
+ code1 += code3 = getBlackCode();
+ } while (code3 >= 64);
+ do {
+ code2 += code3 = getWhiteCode();
+ } while (code3 >= 64);
+ } else {
+ do {
+ code1 += code3 = getWhiteCode();
+ } while (code3 >= 64);
+ do {
+ code2 += code3 = getBlackCode();
+ } while (code3 >= 64);
+ }
+ addPixels(codingLine[a0i] + code1, blackPixels);
+ if (codingLine[a0i] < columns) {
+ addPixels(codingLine[a0i] + code2, blackPixels ^ 1);
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ break;
+ case twoDimVertR3:
+ addPixels(refLine[b1i] + 3, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertR2:
+ addPixels(refLine[b1i] + 2, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertR1:
+ addPixels(refLine[b1i] + 1, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVert0:
+ addPixels(refLine[b1i], blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ ++b1i;
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL3:
+ addPixelsNeg(refLine[b1i] - 3, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL2:
+ addPixelsNeg(refLine[b1i] - 2, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case twoDimVertL1:
+ addPixelsNeg(refLine[b1i] - 1, blackPixels);
+ blackPixels ^= 1;
+ if (codingLine[a0i] < columns) {
+ if (b1i > 0) {
+ --b1i;
+ } else {
+ ++b1i;
+ }
+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+ b1i += 2;
+ }
+ }
+ break;
+ case EOF:
+ addPixels(columns, 0);
+ eof = gTrue;
+ break;
+ default:
+ error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1);
+ addPixels(columns, 0);
+ err = gTrue;
+ break;
+ }
+ }
+
+ // 1-D encoding
+ } else {
+ codingLine[0] = 0;
+ a0i = 0;
+ blackPixels = 0;
+ while (codingLine[a0i] < columns) {
+ code1 = 0;
+ if (blackPixels) {
+ do {
+ code1 += code3 = getBlackCode();
+ } while (code3 >= 64);
+ } else {
+ do {
+ code1 += code3 = getWhiteCode();
+ } while (code3 >= 64);
+ }
+ addPixels(codingLine[a0i] + code1, blackPixels);
+ blackPixels ^= 1;
+ }
+ }
+
+ // byte-align the row
+ if (byteAlign) {
+ inputBits &= ~7;
+ }
+
+ // check for end-of-line marker, skipping over any extra zero bits
+ gotEOL = gFalse;
+ if (!endOfBlock && row == rows - 1) {
+ eof = gTrue;
+ } else {
+ code1 = lookBits(12);
+ while (code1 == 0) {
+ eatBits(1);
+ code1 = lookBits(12);
+ }
+ if (code1 == 0x001) {
+ eatBits(12);
+ gotEOL = gTrue;
+ } else if (code1 == EOF) {
+ eof = gTrue;
+ }
+ }
+
+ // get 2D encoding tag
+ if (!eof && encoding > 0) {
+ nextLine2D = !lookBits(1);
+ eatBits(1);
+ }
+
+ // check for end-of-block marker
+ if (endOfBlock && gotEOL) {
+ code1 = lookBits(12);
+ if (code1 == 0x001) {
+ eatBits(12);
+ if (encoding > 0) {
+ lookBits(1);
+ eatBits(1);
+ }
+ if (encoding >= 0) {
+ for (i = 0; i < 4; ++i) {
+ code1 = lookBits(12);
+ if (code1 != 0x001) {
+ error(getPos(), "Bad RTC code in CCITTFax stream");
+ }
+ eatBits(12);
+ if (encoding > 0) {
+ lookBits(1);
+ eatBits(1);
+ }
+ }
+ }
+ eof = gTrue;
+ }
+
+ // look for an end-of-line marker after an error -- we only do
+ // this if we know the stream contains end-of-line markers because
+ // the "just plow on" technique tends to work better otherwise
+ } else if (err && endOfLine) {
+ while (1) {
+ code1 = lookBits(13);
+ if (code1 == EOF) {
+ eof = gTrue;
+ return EOF;
+ }
+ if ((code1 >> 1) == 0x001) {
+ break;
+ }
+ eatBits(1);
+ }
+ eatBits(12);
+ if (encoding > 0) {
+ eatBits(1);
+ nextLine2D = !(code1 & 1);
+ }
+ }
+
+ // set up for output
+ if (codingLine[0] > 0) {
+ outputBits = codingLine[a0i = 0];
+ } else {
+ outputBits = codingLine[a0i = 1];
+ }
+
+ ++row;
+ }
+
+ // get a byte
+ if (outputBits >= 8) {
+ buf = (a0i & 1) ? 0x00 : 0xff;
+ outputBits -= 8;
+ if (outputBits == 0 && codingLine[a0i] < columns) {
+ ++a0i;
+ outputBits = codingLine[a0i] - codingLine[a0i - 1];
+ }
+ } else {
+ bits = 8;
+ buf = 0;
+ do {
+ if (outputBits > bits) {
+ buf <<= bits;
+ if (!(a0i & 1)) {
+ buf |= 0xff >> (8 - bits);
+ }
+ outputBits -= bits;
+ bits = 0;
+ } else {
+ buf <<= outputBits;
+ if (!(a0i & 1)) {
+ buf |= 0xff >> (8 - outputBits);
+ }
+ bits -= outputBits;
+ outputBits = 0;
+ if (codingLine[a0i] < columns) {
+ ++a0i;
+ outputBits = codingLine[a0i] - codingLine[a0i - 1];
+ } else if (bits > 0) {
+ buf <<= bits;
+ bits = 0;
+ }
+ }
+ } while (bits);
+ }
+ if (black) {
+ buf ^= 0xff;
+ }
+ return buf;
+}
+
+short CCITTFaxStream::getTwoDimCode() {
+ short code;
+ const CCITTCode *p;
+ int n;
+
+ code = 0; // make gcc happy
+ if (endOfBlock) {
+ code = lookBits(7);
+ p = &twoDimTab1[code];
+ if (p->bits > 0) {
+ eatBits(p->bits);
+ return p->n;
+ }
+ } else {
+ for (n = 1; n <= 7; ++n) {
+ code = lookBits(n);
+ if (n < 7) {
+ code <<= 7 - n;
+ }
+ p = &twoDimTab1[code];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ }
+ error(getPos(), "Bad two dim code (%04x) in CCITTFax stream", code);
+ return EOF;
+}
+
+short CCITTFaxStream::getWhiteCode() {
+ short code;
+ const CCITTCode *p;
+ int n;
+
+ code = 0; // make gcc happy
+ if (endOfBlock) {
+ code = lookBits(12);
+ if (code == EOF) {
+ return 1;
+ }
+ if ((code >> 5) == 0) {
+ p = &whiteTab1[code];
+ } else {
+ p = &whiteTab2[code >> 3];
+ }
+ if (p->bits > 0) {
+ eatBits(p->bits);
+ return p->n;
+ }
+ } else {
+ for (n = 1; n <= 9; ++n) {
+ code = lookBits(n);
+ if (code == EOF) {
+ return 1;
+ }
+ if (n < 9) {
+ code <<= 9 - n;
+ }
+ p = &whiteTab2[code];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ for (n = 11; n <= 12; ++n) {
+ code = lookBits(n);
+ if (code == EOF) {
+ return 1;
+ }
+ if (n < 12) {
+ code <<= 12 - n;
+ }
+ p = &whiteTab1[code];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ }
+ error(getPos(), "Bad white code (%04x) in CCITTFax stream", code);
+ // eat a bit and return a positive number so that the caller doesn't
+ // go into an infinite loop
+ eatBits(1);
+ return 1;
+}
+
+short CCITTFaxStream::getBlackCode() {
+ short code;
+ const CCITTCode *p;
+ int n;
+
+ code = 0; // make gcc happy
+ if (endOfBlock) {
+ code = lookBits(13);
+ if (code == EOF) {
+ return 1;
+ }
+ if ((code >> 7) == 0) {
+ p = &blackTab1[code];
+ } else if ((code >> 9) == 0 && (code >> 7) != 0) {
+ p = &blackTab2[(code >> 1) - 64];
+ } else {
+ p = &blackTab3[code >> 7];
+ }
+ if (p->bits > 0) {
+ eatBits(p->bits);
+ return p->n;
+ }
+ } else {
+ for (n = 2; n <= 6; ++n) {
+ code = lookBits(n);
+ if (code == EOF) {
+ return 1;
+ }
+ if (n < 6) {
+ code <<= 6 - n;
+ }
+ p = &blackTab3[code];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ for (n = 7; n <= 12; ++n) {
+ code = lookBits(n);
+ if (code == EOF) {
+ return 1;
+ }
+ if (n < 12) {
+ code <<= 12 - n;
+ }
+ if (code >= 64) {
+ p = &blackTab2[code - 64];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ }
+ for (n = 10; n <= 13; ++n) {
+ code = lookBits(n);
+ if (code == EOF) {
+ return 1;
+ }
+ if (n < 13) {
+ code <<= 13 - n;
+ }
+ p = &blackTab1[code];
+ if (p->bits == n) {
+ eatBits(n);
+ return p->n;
+ }
+ }
+ }
+ error(getPos(), "Bad black code (%04x) in CCITTFax stream", code);
+ // eat a bit and return a positive number so that the caller doesn't
+ // go into an infinite loop
+ eatBits(1);
+ return 1;
+}
+
+short CCITTFaxStream::lookBits(int n) {
+ int c;
+
+ while (inputBits < n) {
+ if ((c = str->getChar()) == EOF) {
+ if (inputBits == 0) {
+ return EOF;
+ }
+ // near the end of the stream, the caller may ask for more bits
+ // than are available, but there may still be a valid code in
+ // however many bits are available -- we need to return correct
+ // data in this case
+ return (inputBuf << (n - inputBits)) & (0xffff >> (16 - n));
+ }
+ inputBuf = (inputBuf << 8) + c;
+ inputBits += 8;
+ }
+ return (inputBuf >> (inputBits - n)) & (0xffff >> (16 - n));
+}
+
+GooString *CCITTFaxStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+ char s1[50];
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< ");
+ if (encoding != 0) {
+ sprintf(s1, "/K %d ", encoding);
+ s->append(s1);
+ }
+ if (endOfLine) {
+ s->append("/EndOfLine true ");
+ }
+ if (byteAlign) {
+ s->append("/EncodedByteAlign true ");
+ }
+ sprintf(s1, "/Columns %d ", columns);
+ s->append(s1);
+ if (rows != 0) {
+ sprintf(s1, "/Rows %d ", rows);
+ s->append(s1);
+ }
+ if (!endOfBlock) {
+ s->append("/EndOfBlock false ");
+ }
+ if (black) {
+ s->append("/BlackIs1 true ");
+ }
+ s->append(">> /CCITTFaxDecode filter\n");
+ return s;
+}
+
+GBool CCITTFaxStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+#ifndef ENABLE_LIBJPEG
+
+//------------------------------------------------------------------------
+// DCTStream
+//------------------------------------------------------------------------
+
+// IDCT constants (20.12 fixed point format)
+#define dctCos1 4017 // cos(pi/16)
+#define dctSin1 799 // sin(pi/16)
+#define dctCos3 3406 // cos(3*pi/16)
+#define dctSin3 2276 // sin(3*pi/16)
+#define dctCos6 1567 // cos(6*pi/16)
+#define dctSin6 3784 // sin(6*pi/16)
+#define dctSqrt2 5793 // sqrt(2)
+#define dctSqrt1d2 2896 // sqrt(2) / 2
+
+// color conversion parameters (16.16 fixed point format)
+#define dctCrToR 91881 // 1.4020
+#define dctCbToG -22553 // -0.3441363
+#define dctCrToG -46802 // -0.71413636
+#define dctCbToB 116130 // 1.772
+
+// clip [-256,511] --> [0,255]
+#define dctClipOffset 256
+static Guchar dctClip[768];
+static int dctClipInit = 0;
+
+// zig zag decode map
+static const int dctZigZag[64] = {
+ 0,
+ 1, 8,
+ 16, 9, 2,
+ 3, 10, 17, 24,
+ 32, 25, 18, 11, 4,
+ 5, 12, 19, 26, 33, 40,
+ 48, 41, 34, 27, 20, 13, 6,
+ 7, 14, 21, 28, 35, 42, 49, 56,
+ 57, 50, 43, 36, 29, 22, 15,
+ 23, 30, 37, 44, 51, 58,
+ 59, 52, 45, 38, 31,
+ 39, 46, 53, 60,
+ 61, 54, 47,
+ 55, 62,
+ 63
+};
+
+DCTStream::DCTStream(Stream *strA, int colorXformA):
+ FilterStream(strA) {
+ int i, j;
+
+ colorXform = colorXformA;
+ progressive = interleaved = gFalse;
+ width = height = 0;
+ mcuWidth = mcuHeight = 0;
+ numComps = 0;
+ comp = 0;
+ x = y = dy = 0;
+ for (i = 0; i < 4; ++i) {
+ for (j = 0; j < 32; ++j) {
+ rowBuf[i][j] = NULL;
+ }
+ frameBuf[i] = NULL;
+ }
+
+ if (!dctClipInit) {
+ for (i = -256; i < 0; ++i)
+ dctClip[dctClipOffset + i] = 0;
+ for (i = 0; i < 256; ++i)
+ dctClip[dctClipOffset + i] = i;
+ for (i = 256; i < 512; ++i)
+ dctClip[dctClipOffset + i] = 255;
+ dctClipInit = 1;
+ }
+}
+
+DCTStream::~DCTStream() {
+ close();
+ delete str;
+}
+
+void DCTStream::unfilteredReset() {
+ str->reset();
+
+ progressive = interleaved = gFalse;
+ width = height = 0;
+ numComps = 0;
+ numQuantTables = 0;
+ numDCHuffTables = 0;
+ numACHuffTables = 0;
+ gotJFIFMarker = gFalse;
+ gotAdobeMarker = gFalse;
+ restartInterval = 0;
+}
+
+
+void DCTStream::reset() {
+ int i, j;
+
+ unfilteredReset();
+
+ if (!readHeader()) {
+ y = height;
+ return;
+ }
+
+ // compute MCU size
+ if (numComps == 1) {
+ compInfo[0].hSample = compInfo[0].vSample = 1;
+ }
+ mcuWidth = compInfo[0].hSample;
+ mcuHeight = compInfo[0].vSample;
+ for (i = 1; i < numComps; ++i) {
+ if (compInfo[i].hSample > mcuWidth) {
+ mcuWidth = compInfo[i].hSample;
+ }
+ if (compInfo[i].vSample > mcuHeight) {
+ mcuHeight = compInfo[i].vSample;
+ }
+ }
+ mcuWidth *= 8;
+ mcuHeight *= 8;
+
+ // figure out color transform
+ if (colorXform == -1) {
+ if (numComps == 3) {
+ if (gotJFIFMarker) {
+ colorXform = 1;
+ } else if (compInfo[0].id == 82 && compInfo[1].id == 71 &&
+ compInfo[2].id == 66) { // ASCII "RGB"
+ colorXform = 0;
+ } else {
+ colorXform = 1;
+ }
+ } else {
+ colorXform = 0;
+ }
+ }
+
+ if (progressive || !interleaved) {
+
+ // allocate a buffer for the whole image
+ bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth;
+ bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight;
+ if (bufWidth <= 0 || bufHeight <= 0 ||
+ bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) {
+ error(getPos(), "Invalid image size in DCT stream");
+ y = height;
+ return;
+ }
+ for (i = 0; i < numComps; ++i) {
+ frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int));
+ memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int));
+ }
+
+ // read the image data
+ do {
+ restartMarker = 0xd0;
+ restart();
+ readScan();
+ } while (readHeader());
+
+ // decode
+ decodeImage();
+
+ // initialize counters
+ comp = 0;
+ x = 0;
+ y = 0;
+
+ } else {
+
+ // allocate a buffer for one row of MCUs
+ bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth;
+ for (i = 0; i < numComps; ++i) {
+ for (j = 0; j < mcuHeight; ++j) {
+ rowBuf[i][j] = (Guchar *)gmallocn(bufWidth, sizeof(Guchar));
+ }
+ }
+
+ // initialize counters
+ comp = 0;
+ x = 0;
+ y = 0;
+ dy = mcuHeight;
+
+ restartMarker = 0xd0;
+ restart();
+ }
+}
+
+void DCTStream::close() {
+ int i, j;
+
+ for (i = 0; i < 4; ++i) {
+ for (j = 0; j < 32; ++j) {
+ gfree(rowBuf[i][j]);
+ rowBuf[i][j] = NULL;
+ }
+ gfree(frameBuf[i]);
+ frameBuf[i] = NULL;
+ }
+ FilterStream::close();
+}
+
+int DCTStream::getChar() {
+ int c;
+
+ if (y >= height) {
+ return EOF;
+ }
+ if (progressive || !interleaved) {
+ c = frameBuf[comp][y * bufWidth + x];
+ if (++comp == numComps) {
+ comp = 0;
+ if (++x == width) {
+ x = 0;
+ ++y;
+ }
+ }
+ } else {
+ if (dy >= mcuHeight) {
+ if (!readMCURow()) {
+ y = height;
+ return EOF;
+ }
+ comp = 0;
+ x = 0;
+ dy = 0;
+ }
+ c = rowBuf[comp][dy][x];
+ if (++comp == numComps) {
+ comp = 0;
+ if (++x == width) {
+ x = 0;
+ ++y;
+ ++dy;
+ if (y == height) {
+ readTrailer();
+ }
+ }
+ }
+ }
+ return c;
+}
+
+int DCTStream::lookChar() {
+ if (y >= height) {
+ return EOF;
+ }
+ if (progressive || !interleaved) {
+ return frameBuf[comp][y * bufWidth + x];
+ } else {
+ if (dy >= mcuHeight) {
+ if (!readMCURow()) {
+ y = height;
+ return EOF;
+ }
+ comp = 0;
+ x = 0;
+ dy = 0;
+ }
+ return rowBuf[comp][dy][x];
+ }
+}
+
+void DCTStream::restart() {
+ int i;
+
+ inputBits = 0;
+ restartCtr = restartInterval;
+ for (i = 0; i < numComps; ++i) {
+ compInfo[i].prevDC = 0;
+ }
+ eobRun = 0;
+}
+
+// Read one row of MCUs from a sequential JPEG stream.
+GBool DCTStream::readMCURow() {
+ int data1[64];
+ Guchar data2[64];
+ Guchar *p1, *p2;
+ int pY, pCb, pCr, pR, pG, pB;
+ int h, v, horiz, vert, hSub, vSub;
+ int x1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i;
+ int c;
+
+ for (x1 = 0; x1 < width; x1 += mcuWidth) {
+
+ // deal with restart marker
+ if (restartInterval > 0 && restartCtr == 0) {
+ c = readMarker();
+ if (c != restartMarker) {
+ error(getPos(), "Bad DCT data: incorrect restart marker");
+ return gFalse;
+ }
+ if (++restartMarker == 0xd8)
+ restartMarker = 0xd0;
+ restart();
+ }
+
+ // read one MCU
+ for (cc = 0; cc < numComps; ++cc) {
+ h = compInfo[cc].hSample;
+ v = compInfo[cc].vSample;
+ horiz = mcuWidth / h;
+ vert = mcuHeight / v;
+ hSub = horiz / 8;
+ vSub = vert / 8;
+ for (y2 = 0; y2 < mcuHeight; y2 += vert) {
+ for (x2 = 0; x2 < mcuWidth; x2 += horiz) {
+ if (!readDataUnit(&dcHuffTables[scanInfo.dcHuffTable[cc]],
+ &acHuffTables[scanInfo.acHuffTable[cc]],
+ &compInfo[cc].prevDC,
+ data1)) {
+ return gFalse;
+ }
+ transformDataUnit(quantTables[compInfo[cc].quantTable],
+ data1, data2);
+ if (hSub == 1 && vSub == 1) {
+ for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) {
+ p1 = &rowBuf[cc][y2+y3][x1+x2];
+ p1[0] = data2[i];
+ p1[1] = data2[i+1];
+ p1[2] = data2[i+2];
+ p1[3] = data2[i+3];
+ p1[4] = data2[i+4];
+ p1[5] = data2[i+5];
+ p1[6] = data2[i+6];
+ p1[7] = data2[i+7];
+ }
+ } else if (hSub == 2 && vSub == 2) {
+ for (y3 = 0, i = 0; y3 < 16; y3 += 2, i += 8) {
+ p1 = &rowBuf[cc][y2+y3][x1+x2];
+ p2 = &rowBuf[cc][y2+y3+1][x1+x2];
+ p1[0] = p1[1] = p2[0] = p2[1] = data2[i];
+ p1[2] = p1[3] = p2[2] = p2[3] = data2[i+1];
+ p1[4] = p1[5] = p2[4] = p2[5] = data2[i+2];
+ p1[6] = p1[7] = p2[6] = p2[7] = data2[i+3];
+ p1[8] = p1[9] = p2[8] = p2[9] = data2[i+4];
+ p1[10] = p1[11] = p2[10] = p2[11] = data2[i+5];
+ p1[12] = p1[13] = p2[12] = p2[13] = data2[i+6];
+ p1[14] = p1[15] = p2[14] = p2[15] = data2[i+7];
+ }
+ } else {
+ i = 0;
+ for (y3 = 0, y4 = 0; y3 < 8; ++y3, y4 += vSub) {
+ for (x3 = 0, x4 = 0; x3 < 8; ++x3, x4 += hSub) {
+ for (y5 = 0; y5 < vSub; ++y5)
+ for (x5 = 0; x5 < hSub; ++x5)
+ rowBuf[cc][y2+y4+y5][x1+x2+x4+x5] = data2[i];
+ ++i;
+ }
+ }
+ }
+ }
+ }
+ }
+ --restartCtr;
+
+ // color space conversion
+ if (colorXform) {
+ // convert YCbCr to RGB
+ if (numComps == 3) {
+ for (y2 = 0; y2 < mcuHeight; ++y2) {
+ for (x2 = 0; x2 < mcuWidth; ++x2) {
+ pY = rowBuf[0][y2][x1+x2];
+ pCb = rowBuf[1][y2][x1+x2] - 128;
+ pCr = rowBuf[2][y2][x1+x2] - 128;
+ pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16;
+ rowBuf[0][y2][x1+x2] = dctClip[dctClipOffset + pR];
+ pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + 32768) >> 16;
+ rowBuf[1][y2][x1+x2] = dctClip[dctClipOffset + pG];
+ pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16;
+ rowBuf[2][y2][x1+x2] = dctClip[dctClipOffset + pB];
+ }
+ }
+ // convert YCbCrK to CMYK (K is passed through unchanged)
+ } else if (numComps == 4) {
+ for (y2 = 0; y2 < mcuHeight; ++y2) {
+ for (x2 = 0; x2 < mcuWidth; ++x2) {
+ pY = rowBuf[0][y2][x1+x2];
+ pCb = rowBuf[1][y2][x1+x2] - 128;
+ pCr = rowBuf[2][y2][x1+x2] - 128;
+ pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16;
+ rowBuf[0][y2][x1+x2] = 255 - dctClip[dctClipOffset + pR];
+ pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + 32768) >> 16;
+ rowBuf[1][y2][x1+x2] = 255 - dctClip[dctClipOffset + pG];
+ pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16;
+ rowBuf[2][y2][x1+x2] = 255 - dctClip[dctClipOffset + pB];
+ }
+ }
+ }
+ }
+ }
+ return gTrue;
+}
+
+// Read one scan from a progressive or non-interleaved JPEG stream.
+void DCTStream::readScan() {
+ int data[64];
+ int x1, y1, dx1, dy1, x2, y2, y3, cc, i;
+ int h, v, horiz, vert, vSub;
+ int *p1;
+ int c;
+
+ if (scanInfo.numComps == 1) {
+ for (cc = 0; cc < numComps; ++cc) {
+ if (scanInfo.comp[cc]) {
+ break;
+ }
+ }
+ dx1 = mcuWidth / compInfo[cc].hSample;
+ dy1 = mcuHeight / compInfo[cc].vSample;
+ } else {
+ dx1 = mcuWidth;
+ dy1 = mcuHeight;
+ }
+
+ for (y1 = 0; y1 < height; y1 += dy1) {
+ for (x1 = 0; x1 < width; x1 += dx1) {
+
+ // deal with restart marker
+ if (restartInterval > 0 && restartCtr == 0) {
+ c = readMarker();
+ if (c != restartMarker) {
+ error(getPos(), "Bad DCT data: incorrect restart marker");
+ return;
+ }
+ if (++restartMarker == 0xd8) {
+ restartMarker = 0xd0;
+ }
+ restart();
+ }
+
+ // read one MCU
+ for (cc = 0; cc < numComps; ++cc) {
+ if (!scanInfo.comp[cc]) {
+ continue;
+ }
+
+ h = compInfo[cc].hSample;
+ v = compInfo[cc].vSample;
+ horiz = mcuWidth / h;
+ vert = mcuHeight / v;
+ vSub = vert / 8;
+ for (y2 = 0; y2 < dy1; y2 += vert) {
+ for (x2 = 0; x2 < dx1; x2 += horiz) {
+
+ // pull out the current values
+ p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)];
+ for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) {
+ data[i] = p1[0];
+ data[i+1] = p1[1];
+ data[i+2] = p1[2];
+ data[i+3] = p1[3];
+ data[i+4] = p1[4];
+ data[i+5] = p1[5];
+ data[i+6] = p1[6];
+ data[i+7] = p1[7];
+ p1 += bufWidth * vSub;
+ }
+
+ // read one data unit
+ if (progressive) {
+ if (!readProgressiveDataUnit(
+ &dcHuffTables[scanInfo.dcHuffTable[cc]],
+ &acHuffTables[scanInfo.acHuffTable[cc]],
+ &compInfo[cc].prevDC,
+ data)) {
+ return;
+ }
+ } else {
+ if (!readDataUnit(&dcHuffTables[scanInfo.dcHuffTable[cc]],
+ &acHuffTables[scanInfo.acHuffTable[cc]],
+ &compInfo[cc].prevDC,
+ data)) {
+ return;
+ }
+ }
+
+ // add the data unit into frameBuf
+ p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)];
+ for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) {
+ p1[0] = data[i];
+ p1[1] = data[i+1];
+ p1[2] = data[i+2];
+ p1[3] = data[i+3];
+ p1[4] = data[i+4];
+ p1[5] = data[i+5];
+ p1[6] = data[i+6];
+ p1[7] = data[i+7];
+ p1 += bufWidth * vSub;
+ }
+ }
+ }
+ }
+ --restartCtr;
+ }
+ }
+}
+
+// Read one data unit from a sequential JPEG stream.
+GBool DCTStream::readDataUnit(DCTHuffTable *dcHuffTable,
+ DCTHuffTable *acHuffTable,
+ int *prevDC, int data[64]) {
+ int run, size, amp;
+ int c;
+ int i, j;
+
+ if ((size = readHuffSym(dcHuffTable)) == 9999) {
+ return gFalse;
+ }
+ if (size > 0) {
+ if ((amp = readAmp(size)) == 9999) {
+ return gFalse;
+ }
+ } else {
+ amp = 0;
+ }
+ data[0] = *prevDC += amp;
+ for (i = 1; i < 64; ++i) {
+ data[i] = 0;
+ }
+ i = 1;
+ while (i < 64) {
+ run = 0;
+ while ((c = readHuffSym(acHuffTable)) == 0xf0 && run < 0x30) {
+ run += 0x10;
+ }
+ if (c == 9999) {
+ return gFalse;
+ }
+ if (c == 0x00) {
+ break;
+ } else {
+ run += (c >> 4) & 0x0f;
+ size = c & 0x0f;
+ amp = readAmp(size);
+ if (amp == 9999) {
+ return gFalse;
+ }
+ i += run;
+ if (i < 64) {
+ j = dctZigZag[i++];
+ data[j] = amp;
+ }
+ }
+ }
+ return gTrue;
+}
+
+// Read one data unit from a sequential JPEG stream.
+GBool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable,
+ DCTHuffTable *acHuffTable,
+ int *prevDC, int data[64]) {
+ int run, size, amp, bit, c;
+ int i, j, k;
+
+ // get the DC coefficient
+ i = scanInfo.firstCoeff;
+ if (i == 0) {
+ if (scanInfo.ah == 0) {
+ if ((size = readHuffSym(dcHuffTable)) == 9999) {
+ return gFalse;
+ }
+ if (size > 0) {
+ if ((amp = readAmp(size)) == 9999) {
+ return gFalse;
+ }
+ } else {
+ amp = 0;
+ }
+ data[0] += (*prevDC += amp) << scanInfo.al;
+ } else {
+ if ((bit = readBit()) == 9999) {
+ return gFalse;
+ }
+ data[0] += bit << scanInfo.al;
+ }
+ ++i;
+ }
+ if (scanInfo.lastCoeff == 0) {
+ return gTrue;
+ }
+
+ // check for an EOB run
+ if (eobRun > 0) {
+ while (i <= scanInfo.lastCoeff) {
+ j = dctZigZag[i++];
+ if (data[j] != 0) {
+ if ((bit = readBit()) == EOF) {
+ return gFalse;
+ }
+ if (bit) {
+ data[j] += 1 << scanInfo.al;
+ }
+ }
+ }
+ --eobRun;
+ return gTrue;
+ }
+
+ // read the AC coefficients
+ while (i <= scanInfo.lastCoeff) {
+ if ((c = readHuffSym(acHuffTable)) == 9999) {
+ return gFalse;
+ }
+
+ // ZRL
+ if (c == 0xf0) {
+ k = 0;
+ while (k < 16) {
+ j = dctZigZag[i++];
+ if (data[j] == 0) {
+ ++k;
+ } else {
+ if ((bit = readBit()) == EOF) {
+ return gFalse;
+ }
+ if (bit) {
+ data[j] += 1 << scanInfo.al;
+ }
+ }
+ }
+
+ // EOB run
+ } else if ((c & 0x0f) == 0x00) {
+ j = c >> 4;
+ eobRun = 0;
+ for (k = 0; k < j; ++k) {
+ if ((bit = readBit()) == EOF) {
+ return gFalse;
+ }
+ eobRun = (eobRun << 1) | bit;
+ }
+ eobRun += 1 << j;
+ while (i <= scanInfo.lastCoeff) {
+ j = dctZigZag[i++];
+ if (data[j] != 0) {
+ if ((bit = readBit()) == EOF) {
+ return gFalse;
+ }
+ if (bit) {
+ data[j] += 1 << scanInfo.al;
+ }
+ }
+ }
+ --eobRun;
+ break;
+
+ // zero run and one AC coefficient
+ } else {
+ run = (c >> 4) & 0x0f;
+ size = c & 0x0f;
+ if ((amp = readAmp(size)) == 9999) {
+ return gFalse;
+ }
+ k = 0;
+ do {
+ j = dctZigZag[i++];
+ while (data[j] != 0) {
+ if ((bit = readBit()) == EOF) {
+ return gFalse;
+ }
+ if (bit) {
+ data[j] += 1 << scanInfo.al;
+ }
+ j = dctZigZag[i++];
+ }
+ ++k;
+ } while (k <= run);
+ data[j] = amp << scanInfo.al;
+ }
+ }
+
+ return gTrue;
+}
+
+// Decode a progressive JPEG image.
+void DCTStream::decodeImage() {
+ int dataIn[64];
+ Guchar dataOut[64];
+ Gushort *quantTable;
+ int pY, pCb, pCr, pR, pG, pB;
+ int x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i;
+ int h, v, horiz, vert, hSub, vSub;
+ int *p0, *p1, *p2;
+
+ for (y1 = 0; y1 < bufHeight; y1 += mcuHeight) {
+ for (x1 = 0; x1 < bufWidth; x1 += mcuWidth) {
+ for (cc = 0; cc < numComps; ++cc) {
+ quantTable = quantTables[compInfo[cc].quantTable];
+ h = compInfo[cc].hSample;
+ v = compInfo[cc].vSample;
+ horiz = mcuWidth / h;
+ vert = mcuHeight / v;
+ hSub = horiz / 8;
+ vSub = vert / 8;
+ for (y2 = 0; y2 < mcuHeight; y2 += vert) {
+ for (x2 = 0; x2 < mcuWidth; x2 += horiz) {
+
+ // pull out the coded data unit
+ p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)];
+ for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) {
+ dataIn[i] = p1[0];
+ dataIn[i+1] = p1[1];
+ dataIn[i+2] = p1[2];
+ dataIn[i+3] = p1[3];
+ dataIn[i+4] = p1[4];
+ dataIn[i+5] = p1[5];
+ dataIn[i+6] = p1[6];
+ dataIn[i+7] = p1[7];
+ p1 += bufWidth * vSub;
+ }
+
+ // transform
+ transformDataUnit(quantTable, dataIn, dataOut);
+
+ // store back into frameBuf, doing replication for
+ // subsampled components
+ p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)];
+ if (hSub == 1 && vSub == 1) {
+ for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) {
+ p1[0] = dataOut[i] & 0xff;
+ p1[1] = dataOut[i+1] & 0xff;
+ p1[2] = dataOut[i+2] & 0xff;
+ p1[3] = dataOut[i+3] & 0xff;
+ p1[4] = dataOut[i+4] & 0xff;
+ p1[5] = dataOut[i+5] & 0xff;
+ p1[6] = dataOut[i+6] & 0xff;
+ p1[7] = dataOut[i+7] & 0xff;
+ p1 += bufWidth;
+ }
+ } else if (hSub == 2 && vSub == 2) {
+ p2 = p1 + bufWidth;
+ for (y3 = 0, i = 0; y3 < 16; y3 += 2, i += 8) {
+ p1[0] = p1[1] = p2[0] = p2[1] = dataOut[i] & 0xff;
+ p1[2] = p1[3] = p2[2] = p2[3] = dataOut[i+1] & 0xff;
+ p1[4] = p1[5] = p2[4] = p2[5] = dataOut[i+2] & 0xff;
+ p1[6] = p1[7] = p2[6] = p2[7] = dataOut[i+3] & 0xff;
+ p1[8] = p1[9] = p2[8] = p2[9] = dataOut[i+4] & 0xff;
+ p1[10] = p1[11] = p2[10] = p2[11] = dataOut[i+5] & 0xff;
+ p1[12] = p1[13] = p2[12] = p2[13] = dataOut[i+6] & 0xff;
+ p1[14] = p1[15] = p2[14] = p2[15] = dataOut[i+7] & 0xff;
+ p1 += bufWidth * 2;
+ p2 += bufWidth * 2;
+ }
+ } else {
+ i = 0;
+ for (y3 = 0, y4 = 0; y3 < 8; ++y3, y4 += vSub) {
+ for (x3 = 0, x4 = 0; x3 < 8; ++x3, x4 += hSub) {
+ p2 = p1 + x4;
+ for (y5 = 0; y5 < vSub; ++y5) {
+ for (x5 = 0; x5 < hSub; ++x5) {
+ p2[x5] = dataOut[i] & 0xff;
+ }
+ p2 += bufWidth;
+ }
+ ++i;
+ }
+ p1 += bufWidth * vSub;
+ }
+ }
+ }
+ }
+ }
+
+ // color space conversion
+ if (colorXform) {
+ // convert YCbCr to RGB
+ if (numComps == 3) {
+ for (y2 = 0; y2 < mcuHeight; ++y2) {
+ p0 = &frameBuf[0][(y1+y2) * bufWidth + x1];
+ p1 = &frameBuf[1][(y1+y2) * bufWidth + x1];
+ p2 = &frameBuf[2][(y1+y2) * bufWidth + x1];
+ for (x2 = 0; x2 < mcuWidth; ++x2) {
+ pY = *p0;
+ pCb = *p1 - 128;
+ pCr = *p2 - 128;
+ pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16;
+ *p0++ = dctClip[dctClipOffset + pR];
+ pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr +
+ 32768) >> 16;
+ *p1++ = dctClip[dctClipOffset + pG];
+ pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16;
+ *p2++ = dctClip[dctClipOffset + pB];
+ }
+ }
+ // convert YCbCrK to CMYK (K is passed through unchanged)
+ } else if (numComps == 4) {
+ for (y2 = 0; y2 < mcuHeight; ++y2) {
+ p0 = &frameBuf[0][(y1+y2) * bufWidth + x1];
+ p1 = &frameBuf[1][(y1+y2) * bufWidth + x1];
+ p2 = &frameBuf[2][(y1+y2) * bufWidth + x1];
+ for (x2 = 0; x2 < mcuWidth; ++x2) {
+ pY = *p0;
+ pCb = *p1 - 128;
+ pCr = *p2 - 128;
+ pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16;
+ *p0++ = 255 - dctClip[dctClipOffset + pR];
+ pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr +
+ 32768) >> 16;
+ *p1++ = 255 - dctClip[dctClipOffset + pG];
+ pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16;
+ *p2++ = 255 - dctClip[dctClipOffset + pB];
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+// Transform one data unit -- this performs the dequantization and
+// IDCT steps. This IDCT algorithm is taken from:
+// Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,
+// "Practical Fast 1-D DCT Algorithms with 11 Multiplications",
+// IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,
+// 988-991.
+// The stage numbers mentioned in the comments refer to Figure 1 in this
+// paper.
+void DCTStream::transformDataUnit(Gushort *quantTable,
+ int dataIn[64], Guchar dataOut[64]) {
+ int v0, v1, v2, v3, v4, v5, v6, v7, t;
+ int *p;
+ int i;
+
+ // dequant
+ for (i = 0; i < 64; ++i) {
+ dataIn[i] *= quantTable[i];
+ }
+
+ // inverse DCT on rows
+ for (i = 0; i < 64; i += 8) {
+ p = dataIn + i;
+
+ // check for all-zero AC coefficients
+ if (p[1] == 0 && p[2] == 0 && p[3] == 0 &&
+ p[4] == 0 && p[5] == 0 && p[6] == 0 && p[7] == 0) {
+ t = (dctSqrt2 * p[0] + 512) >> 10;
+ p[0] = t;
+ p[1] = t;
+ p[2] = t;
+ p[3] = t;
+ p[4] = t;
+ p[5] = t;
+ p[6] = t;
+ p[7] = t;
+ continue;
+ }
+
+ // stage 4
+ v0 = (dctSqrt2 * p[0] + 128) >> 8;
+ v1 = (dctSqrt2 * p[4] + 128) >> 8;
+ v2 = p[2];
+ v3 = p[6];
+ v4 = (dctSqrt1d2 * (p[1] - p[7]) + 128) >> 8;
+ v7 = (dctSqrt1d2 * (p[1] + p[7]) + 128) >> 8;
+ v5 = p[3] << 4;
+ v6 = p[5] << 4;
+
+ // stage 3
+ t = (v0 - v1+ 1) >> 1;
+ v0 = (v0 + v1 + 1) >> 1;
+ v1 = t;
+ t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;
+ v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;
+ v3 = t;
+ t = (v4 - v6 + 1) >> 1;
+ v4 = (v4 + v6 + 1) >> 1;
+ v6 = t;
+ t = (v7 + v5 + 1) >> 1;
+ v5 = (v7 - v5 + 1) >> 1;
+ v7 = t;
+
+ // stage 2
+ t = (v0 - v3 + 1) >> 1;
+ v0 = (v0 + v3 + 1) >> 1;
+ v3 = t;
+ t = (v1 - v2 + 1) >> 1;
+ v1 = (v1 + v2 + 1) >> 1;
+ v2 = t;
+ t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
+ v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
+ v7 = t;
+ t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
+ v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
+ v6 = t;
+
+ // stage 1
+ p[0] = v0 + v7;
+ p[7] = v0 - v7;
+ p[1] = v1 + v6;
+ p[6] = v1 - v6;
+ p[2] = v2 + v5;
+ p[5] = v2 - v5;
+ p[3] = v3 + v4;
+ p[4] = v3 - v4;
+ }
+
+ // inverse DCT on columns
+ for (i = 0; i < 8; ++i) {
+ p = dataIn + i;
+
+ // check for all-zero AC coefficients
+ if (p[1*8] == 0 && p[2*8] == 0 && p[3*8] == 0 &&
+ p[4*8] == 0 && p[5*8] == 0 && p[6*8] == 0 && p[7*8] == 0) {
+ t = (dctSqrt2 * dataIn[i+0] + 8192) >> 14;
+ p[0*8] = t;
+ p[1*8] = t;
+ p[2*8] = t;
+ p[3*8] = t;
+ p[4*8] = t;
+ p[5*8] = t;
+ p[6*8] = t;
+ p[7*8] = t;
+ continue;
+ }
+
+ // stage 4
+ v0 = (dctSqrt2 * p[0*8] + 2048) >> 12;
+ v1 = (dctSqrt2 * p[4*8] + 2048) >> 12;
+ v2 = p[2*8];
+ v3 = p[6*8];
+ v4 = (dctSqrt1d2 * (p[1*8] - p[7*8]) + 2048) >> 12;
+ v7 = (dctSqrt1d2 * (p[1*8] + p[7*8]) + 2048) >> 12;
+ v5 = p[3*8];
+ v6 = p[5*8];
+
+ // stage 3
+ t = (v0 - v1 + 1) >> 1;
+ v0 = (v0 + v1 + 1) >> 1;
+ v1 = t;
+ t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;
+ v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;
+ v3 = t;
+ t = (v4 - v6 + 1) >> 1;
+ v4 = (v4 + v6 + 1) >> 1;
+ v6 = t;
+ t = (v7 + v5 + 1) >> 1;
+ v5 = (v7 - v5 + 1) >> 1;
+ v7 = t;
+
+ // stage 2
+ t = (v0 - v3 + 1) >> 1;
+ v0 = (v0 + v3 + 1) >> 1;
+ v3 = t;
+ t = (v1 - v2 + 1) >> 1;
+ v1 = (v1 + v2 + 1) >> 1;
+ v2 = t;
+ t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
+ v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
+ v7 = t;
+ t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
+ v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
+ v6 = t;
+
+ // stage 1
+ p[0*8] = v0 + v7;
+ p[7*8] = v0 - v7;
+ p[1*8] = v1 + v6;
+ p[6*8] = v1 - v6;
+ p[2*8] = v2 + v5;
+ p[5*8] = v2 - v5;
+ p[3*8] = v3 + v4;
+ p[4*8] = v3 - v4;
+ }
+
+ // convert to 8-bit integers
+ for (i = 0; i < 64; ++i) {
+ dataOut[i] = dctClip[dctClipOffset + 128 + ((dataIn[i] + 8) >> 4)];
+ }
+}
+
+int DCTStream::readHuffSym(DCTHuffTable *table) {
+ Gushort code;
+ int bit;
+ int codeBits;
+
+ code = 0;
+ codeBits = 0;
+ do {
+ // add a bit to the code
+ if ((bit = readBit()) == EOF)
+ return 9999;
+ code = (code << 1) + bit;
+ ++codeBits;
+
+ // look up code
+ if (code - table->firstCode[codeBits] < table->numCodes[codeBits]) {
+ code -= table->firstCode[codeBits];
+ return table->sym[table->firstSym[codeBits] + code];
+ }
+ } while (codeBits < 16);
+
+ error(getPos(), "Bad Huffman code in DCT stream");
+ return 9999;
+}
+
+int DCTStream::readAmp(int size) {
+ int amp, bit;
+ int bits;
+
+ amp = 0;
+ for (bits = 0; bits < size; ++bits) {
+ if ((bit = readBit()) == EOF)
+ return 9999;
+ amp = (amp << 1) + bit;
+ }
+ if (amp < (1 << (size - 1)))
+ amp -= (1 << size) - 1;
+ return amp;
+}
+
+int DCTStream::readBit() {
+ int bit;
+ int c, c2;
+
+ if (inputBits == 0) {
+ if ((c = str->getChar()) == EOF)
+ return EOF;
+ if (c == 0xff) {
+ do {
+ c2 = str->getChar();
+ } while (c2 == 0xff);
+ if (c2 != 0x00) {
+ error(getPos(), "Bad DCT data: missing 00 after ff");
+ return EOF;
+ }
+ }
+ inputBuf = c;
+ inputBits = 8;
+ }
+ bit = (inputBuf >> (inputBits - 1)) & 1;
+ --inputBits;
+ return bit;
+}
+
+GBool DCTStream::readHeader() {
+ GBool doScan;
+ int n;
+ int c = 0;
+ int i;
+
+ // read headers
+ doScan = gFalse;
+ while (!doScan) {
+ c = readMarker();
+ switch (c) {
+ case 0xc0: // SOF0 (sequential)
+ case 0xc1: // SOF1 (extended sequential)
+ if (!readBaselineSOF()) {
+ return gFalse;
+ }
+ break;
+ case 0xc2: // SOF2 (progressive)
+ if (!readProgressiveSOF()) {
+ return gFalse;
+ }
+ break;
+ case 0xc4: // DHT
+ if (!readHuffmanTables()) {
+ return gFalse;
+ }
+ break;
+ case 0xd8: // SOI
+ break;
+ case 0xd9: // EOI
+ return gFalse;
+ case 0xda: // SOS
+ if (!readScanInfo()) {
+ return gFalse;
+ }
+ doScan = gTrue;
+ break;
+ case 0xdb: // DQT
+ if (!readQuantTables()) {
+ return gFalse;
+ }
+ break;
+ case 0xdd: // DRI
+ if (!readRestartInterval()) {
+ return gFalse;
+ }
+ break;
+ case 0xe0: // APP0
+ if (!readJFIFMarker()) {
+ return gFalse;
+ }
+ break;
+ case 0xee: // APP14
+ if (!readAdobeMarker()) {
+ return gFalse;
+ }
+ break;
+ case EOF:
+ error(getPos(), "Bad DCT header");
+ return gFalse;
+ default:
+ // skip APPn / COM / etc.
+ if (c >= 0xe0) {
+ n = read16() - 2;
+ for (i = 0; i < n; ++i) {
+ str->getChar();
+ }
+ } else {
+ error(getPos(), "Unknown DCT marker <%02x>", c);
+ return gFalse;
+ }
+ break;
+ }
+ }
+
+ return gTrue;
+}
+
+GBool DCTStream::readBaselineSOF() {
+ int length;
+ int prec;
+ int i;
+ int c;
+
+ length = read16();
+ prec = str->getChar();
+ height = read16();
+ width = read16();
+ numComps = str->getChar();
+ if (numComps <= 0 || numComps > 4) {
+ error(getPos(), "Bad number of components in DCT stream");
+ numComps = 0;
+ return gFalse;
+ }
+ if (prec != 8) {
+ error(getPos(), "Bad DCT precision %d", prec);
+ return gFalse;
+ }
+ for (i = 0; i < numComps; ++i) {
+ compInfo[i].id = str->getChar();
+ c = str->getChar();
+ compInfo[i].hSample = (c >> 4) & 0x0f;
+ compInfo[i].vSample = c & 0x0f;
+ compInfo[i].quantTable = str->getChar();
+ }
+ progressive = gFalse;
+ return gTrue;
+}
+
+GBool DCTStream::readProgressiveSOF() {
+ int length;
+ int prec;
+ int i;
+ int c;
+
+ length = read16();
+ prec = str->getChar();
+ height = read16();
+ width = read16();
+ numComps = str->getChar();
+ if (prec != 8) {
+ error(getPos(), "Bad DCT precision %d", prec);
+ return gFalse;
+ }
+ for (i = 0; i < numComps; ++i) {
+ compInfo[i].id = str->getChar();
+ c = str->getChar();
+ compInfo[i].hSample = (c >> 4) & 0x0f;
+ compInfo[i].vSample = c & 0x0f;
+ compInfo[i].quantTable = str->getChar();
+ }
+ progressive = gTrue;
+ return gTrue;
+}
+
+GBool DCTStream::readScanInfo() {
+ int length;
+ int id, c;
+ int i, j;
+
+ length = read16() - 2;
+ scanInfo.numComps = str->getChar();
+ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) {
+ error(getPos(), "Bad number of components in DCT stream");
+ scanInfo.numComps = 0;
+ return gFalse;
+ }
+ --length;
+ if (length != 2 * scanInfo.numComps + 3) {
+ error(getPos(), "Bad DCT scan info block");
+ return gFalse;
+ }
+ interleaved = scanInfo.numComps == numComps;
+ for (j = 0; j < numComps; ++j) {
+ scanInfo.comp[j] = gFalse;
+ }
+ for (i = 0; i < scanInfo.numComps; ++i) {
+ id = str->getChar();
+ // some (broken) DCT streams reuse ID numbers, but at least they
+ // keep the components in order, so we check compInfo[i] first to
+ // work around the problem
+ if (id == compInfo[i].id) {
+ j = i;
+ } else {
+ for (j = 0; j < numComps; ++j) {
+ if (id == compInfo[j].id) {
+ break;
+ }
+ }
+ if (j == numComps) {
+ error(getPos(), "Bad DCT component ID in scan info block");
+ return gFalse;
+ }
+ }
+ scanInfo.comp[j] = gTrue;
+ c = str->getChar();
+ scanInfo.dcHuffTable[j] = (c >> 4) & 0x0f;
+ scanInfo.acHuffTable[j] = c & 0x0f;
+ }
+ scanInfo.firstCoeff = str->getChar();
+ scanInfo.lastCoeff = str->getChar();
+ if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 ||
+ scanInfo.firstCoeff > scanInfo.lastCoeff) {
+ error(getPos(), "Bad DCT coefficient numbers in scan info block");
+ return gFalse;
+ }
+ c = str->getChar();
+ scanInfo.ah = (c >> 4) & 0x0f;
+ scanInfo.al = c & 0x0f;
+ return gTrue;
+}
+
+GBool DCTStream::readQuantTables() {
+ int length, prec, i, index;
+
+ length = read16() - 2;
+ while (length > 0) {
+ index = str->getChar();
+ prec = (index >> 4) & 0x0f;
+ index &= 0x0f;
+ if (prec > 1 || index >= 4) {
+ error(getPos(), "Bad DCT quantization table");
+ return gFalse;
+ }
+ if (index == numQuantTables) {
+ numQuantTables = index + 1;
+ }
+ for (i = 0; i < 64; ++i) {
+ if (prec) {
+ quantTables[index][dctZigZag[i]] = read16();
+ } else {
+ quantTables[index][dctZigZag[i]] = str->getChar();
+ }
+ }
+ if (prec) {
+ length -= 129;
+ } else {
+ length -= 65;
+ }
+ }
+ return gTrue;
+}
+
+GBool DCTStream::readHuffmanTables() {
+ DCTHuffTable *tbl;
+ int length;
+ int index;
+ Gushort code;
+ Guchar sym;
+ int i;
+ int c;
+
+ length = read16() - 2;
+ while (length > 0) {
+ index = str->getChar();
+ --length;
+ if ((index & 0x0f) >= 4) {
+ error(getPos(), "Bad DCT Huffman table");
+ return gFalse;
+ }
+ if (index & 0x10) {
+ index &= 0x0f;
+ if (index >= numACHuffTables)
+ numACHuffTables = index+1;
+ tbl = &acHuffTables[index];
+ } else {
+ index &= 0x0f;
+ if (index >= numDCHuffTables)
+ numDCHuffTables = index+1;
+ tbl = &dcHuffTables[index];
+ }
+ sym = 0;
+ code = 0;
+ for (i = 1; i <= 16; ++i) {
+ c = str->getChar();
+ tbl->firstSym[i] = sym;
+ tbl->firstCode[i] = code;
+ tbl->numCodes[i] = c;
+ sym += c;
+ code = (code + c) << 1;
+ }
+ length -= 16;
+ for (i = 0; i < sym; ++i)
+ tbl->sym[i] = str->getChar();
+ length -= sym;
+ }
+ return gTrue;
+}
+
+GBool DCTStream::readRestartInterval() {
+ int length;
+
+ length = read16();
+ if (length != 4) {
+ error(getPos(), "Bad DCT restart interval");
+ return gFalse;
+ }
+ restartInterval = read16();
+ return gTrue;
+}
+
+GBool DCTStream::readJFIFMarker() {
+ int length, i;
+ char buf[5];
+ int c;
+
+ length = read16();
+ length -= 2;
+ if (length >= 5) {
+ for (i = 0; i < 5; ++i) {
+ if ((c = str->getChar()) == EOF) {
+ error(getPos(), "Bad DCT APP0 marker");
+ return gFalse;
+ }
+ buf[i] = c;
+ }
+ length -= 5;
+ if (!memcmp(buf, "JFIF\0", 5)) {
+ gotJFIFMarker = gTrue;
+ }
+ }
+ while (length > 0) {
+ if (str->getChar() == EOF) {
+ error(getPos(), "Bad DCT APP0 marker");
+ return gFalse;
+ }
+ --length;
+ }
+ return gTrue;
+}
+
+GBool DCTStream::readAdobeMarker() {
+ int length, i;
+ char buf[12];
+ int c;
+
+ length = read16();
+ if (length < 14) {
+ goto err;
+ }
+ for (i = 0; i < 12; ++i) {
+ if ((c = str->getChar()) == EOF) {
+ goto err;
+ }
+ buf[i] = c;
+ }
+ if (strncmp(buf, "Adobe", 5)) {
+ goto err;
+ }
+ colorXform = buf[11];
+ gotAdobeMarker = gTrue;
+ for (i = 14; i < length; ++i) {
+ if (str->getChar() == EOF) {
+ goto err;
+ }
+ }
+ return gTrue;
+
+ err:
+ error(getPos(), "Bad DCT Adobe APP14 marker");
+ return gFalse;
+}
+
+GBool DCTStream::readTrailer() {
+ int c;
+
+ c = readMarker();
+ if (c != 0xd9) { // EOI
+ error(getPos(), "Bad DCT trailer");
+ return gFalse;
+ }
+ return gTrue;
+}
+
+int DCTStream::readMarker() {
+ int c;
+
+ do {
+ do {
+ c = str->getChar();
+ } while (c != 0xff && c != EOF);
+ while (c == 0xff) {
+ c = str->getChar();
+ }
+ } while (c == 0x00);
+ return c;
+}
+
+int DCTStream::read16() {
+ int c1, c2;
+
+ if ((c1 = str->getChar()) == EOF)
+ return EOF;
+ if ((c2 = str->getChar()) == EOF)
+ return EOF;
+ return (c1 << 8) + c2;
+}
+
+GooString *DCTStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 2) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< >> /DCTDecode filter\n");
+ return s;
+}
+
+GBool DCTStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+#endif
+
+#ifndef ENABLE_ZLIB
+//------------------------------------------------------------------------
+// FlateStream
+//------------------------------------------------------------------------
+
+int FlateStream::codeLenCodeMap[flateMaxCodeLenCodes] = {
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
+};
+
+FlateDecode FlateStream::lengthDecode[flateMaxLitCodes-257] = {
+ {0, 3},
+ {0, 4},
+ {0, 5},
+ {0, 6},
+ {0, 7},
+ {0, 8},
+ {0, 9},
+ {0, 10},
+ {1, 11},
+ {1, 13},
+ {1, 15},
+ {1, 17},
+ {2, 19},
+ {2, 23},
+ {2, 27},
+ {2, 31},
+ {3, 35},
+ {3, 43},
+ {3, 51},
+ {3, 59},
+ {4, 67},
+ {4, 83},
+ {4, 99},
+ {4, 115},
+ {5, 131},
+ {5, 163},
+ {5, 195},
+ {5, 227},
+ {0, 258},
+ {0, 258},
+ {0, 258}
+};
+
+FlateDecode FlateStream::distDecode[flateMaxDistCodes] = {
+ { 0, 1},
+ { 0, 2},
+ { 0, 3},
+ { 0, 4},
+ { 1, 5},
+ { 1, 7},
+ { 2, 9},
+ { 2, 13},
+ { 3, 17},
+ { 3, 25},
+ { 4, 33},
+ { 4, 49},
+ { 5, 65},
+ { 5, 97},
+ { 6, 129},
+ { 6, 193},
+ { 7, 257},
+ { 7, 385},
+ { 8, 513},
+ { 8, 769},
+ { 9, 1025},
+ { 9, 1537},
+ {10, 2049},
+ {10, 3073},
+ {11, 4097},
+ {11, 6145},
+ {12, 8193},
+ {12, 12289},
+ {13, 16385},
+ {13, 24577}
+};
+
+static FlateCode flateFixedLitCodeTabCodes[512] = {
+ {7, 0x0100},
+ {8, 0x0050},
+ {8, 0x0010},
+ {8, 0x0118},
+ {7, 0x0110},
+ {8, 0x0070},
+ {8, 0x0030},
+ {9, 0x00c0},
+ {7, 0x0108},
+ {8, 0x0060},
+ {8, 0x0020},
+ {9, 0x00a0},
+ {8, 0x0000},
+ {8, 0x0080},
+ {8, 0x0040},
+ {9, 0x00e0},
+ {7, 0x0104},
+ {8, 0x0058},
+ {8, 0x0018},
+ {9, 0x0090},
+ {7, 0x0114},
+ {8, 0x0078},
+ {8, 0x0038},
+ {9, 0x00d0},
+ {7, 0x010c},
+ {8, 0x0068},
+ {8, 0x0028},
+ {9, 0x00b0},
+ {8, 0x0008},
+ {8, 0x0088},
+ {8, 0x0048},
+ {9, 0x00f0},
+ {7, 0x0102},
+ {8, 0x0054},
+ {8, 0x0014},
+ {8, 0x011c},
+ {7, 0x0112},
+ {8, 0x0074},
+ {8, 0x0034},
+ {9, 0x00c8},
+ {7, 0x010a},
+ {8, 0x0064},
+ {8, 0x0024},
+ {9, 0x00a8},
+ {8, 0x0004},
+ {8, 0x0084},
+ {8, 0x0044},
+ {9, 0x00e8},
+ {7, 0x0106},
+ {8, 0x005c},
+ {8, 0x001c},
+ {9, 0x0098},
+ {7, 0x0116},
+ {8, 0x007c},
+ {8, 0x003c},
+ {9, 0x00d8},
+ {7, 0x010e},
+ {8, 0x006c},
+ {8, 0x002c},
+ {9, 0x00b8},
+ {8, 0x000c},
+ {8, 0x008c},
+ {8, 0x004c},
+ {9, 0x00f8},
+ {7, 0x0101},
+ {8, 0x0052},
+ {8, 0x0012},
+ {8, 0x011a},
+ {7, 0x0111},
+ {8, 0x0072},
+ {8, 0x0032},
+ {9, 0x00c4},
+ {7, 0x0109},
+ {8, 0x0062},
+ {8, 0x0022},
+ {9, 0x00a4},
+ {8, 0x0002},
+ {8, 0x0082},
+ {8, 0x0042},
+ {9, 0x00e4},
+ {7, 0x0105},
+ {8, 0x005a},
+ {8, 0x001a},
+ {9, 0x0094},
+ {7, 0x0115},
+ {8, 0x007a},
+ {8, 0x003a},
+ {9, 0x00d4},
+ {7, 0x010d},
+ {8, 0x006a},
+ {8, 0x002a},
+ {9, 0x00b4},
+ {8, 0x000a},
+ {8, 0x008a},
+ {8, 0x004a},
+ {9, 0x00f4},
+ {7, 0x0103},
+ {8, 0x0056},
+ {8, 0x0016},
+ {8, 0x011e},
+ {7, 0x0113},
+ {8, 0x0076},
+ {8, 0x0036},
+ {9, 0x00cc},
+ {7, 0x010b},
+ {8, 0x0066},
+ {8, 0x0026},
+ {9, 0x00ac},
+ {8, 0x0006},
+ {8, 0x0086},
+ {8, 0x0046},
+ {9, 0x00ec},
+ {7, 0x0107},
+ {8, 0x005e},
+ {8, 0x001e},
+ {9, 0x009c},
+ {7, 0x0117},
+ {8, 0x007e},
+ {8, 0x003e},
+ {9, 0x00dc},
+ {7, 0x010f},
+ {8, 0x006e},
+ {8, 0x002e},
+ {9, 0x00bc},
+ {8, 0x000e},
+ {8, 0x008e},
+ {8, 0x004e},
+ {9, 0x00fc},
+ {7, 0x0100},
+ {8, 0x0051},
+ {8, 0x0011},
+ {8, 0x0119},
+ {7, 0x0110},
+ {8, 0x0071},
+ {8, 0x0031},
+ {9, 0x00c2},
+ {7, 0x0108},
+ {8, 0x0061},
+ {8, 0x0021},
+ {9, 0x00a2},
+ {8, 0x0001},
+ {8, 0x0081},
+ {8, 0x0041},
+ {9, 0x00e2},
+ {7, 0x0104},
+ {8, 0x0059},
+ {8, 0x0019},
+ {9, 0x0092},
+ {7, 0x0114},
+ {8, 0x0079},
+ {8, 0x0039},
+ {9, 0x00d2},
+ {7, 0x010c},
+ {8, 0x0069},
+ {8, 0x0029},
+ {9, 0x00b2},
+ {8, 0x0009},
+ {8, 0x0089},
+ {8, 0x0049},
+ {9, 0x00f2},
+ {7, 0x0102},
+ {8, 0x0055},
+ {8, 0x0015},
+ {8, 0x011d},
+ {7, 0x0112},
+ {8, 0x0075},
+ {8, 0x0035},
+ {9, 0x00ca},
+ {7, 0x010a},
+ {8, 0x0065},
+ {8, 0x0025},
+ {9, 0x00aa},
+ {8, 0x0005},
+ {8, 0x0085},
+ {8, 0x0045},
+ {9, 0x00ea},
+ {7, 0x0106},
+ {8, 0x005d},
+ {8, 0x001d},
+ {9, 0x009a},
+ {7, 0x0116},
+ {8, 0x007d},
+ {8, 0x003d},
+ {9, 0x00da},
+ {7, 0x010e},
+ {8, 0x006d},
+ {8, 0x002d},
+ {9, 0x00ba},
+ {8, 0x000d},
+ {8, 0x008d},
+ {8, 0x004d},
+ {9, 0x00fa},
+ {7, 0x0101},
+ {8, 0x0053},
+ {8, 0x0013},
+ {8, 0x011b},
+ {7, 0x0111},
+ {8, 0x0073},
+ {8, 0x0033},
+ {9, 0x00c6},
+ {7, 0x0109},
+ {8, 0x0063},
+ {8, 0x0023},
+ {9, 0x00a6},
+ {8, 0x0003},
+ {8, 0x0083},
+ {8, 0x0043},
+ {9, 0x00e6},
+ {7, 0x0105},
+ {8, 0x005b},
+ {8, 0x001b},
+ {9, 0x0096},
+ {7, 0x0115},
+ {8, 0x007b},
+ {8, 0x003b},
+ {9, 0x00d6},
+ {7, 0x010d},
+ {8, 0x006b},
+ {8, 0x002b},
+ {9, 0x00b6},
+ {8, 0x000b},
+ {8, 0x008b},
+ {8, 0x004b},
+ {9, 0x00f6},
+ {7, 0x0103},
+ {8, 0x0057},
+ {8, 0x0017},
+ {8, 0x011f},
+ {7, 0x0113},
+ {8, 0x0077},
+ {8, 0x0037},
+ {9, 0x00ce},
+ {7, 0x010b},
+ {8, 0x0067},
+ {8, 0x0027},
+ {9, 0x00ae},
+ {8, 0x0007},
+ {8, 0x0087},
+ {8, 0x0047},
+ {9, 0x00ee},
+ {7, 0x0107},
+ {8, 0x005f},
+ {8, 0x001f},
+ {9, 0x009e},
+ {7, 0x0117},
+ {8, 0x007f},
+ {8, 0x003f},
+ {9, 0x00de},
+ {7, 0x010f},
+ {8, 0x006f},
+ {8, 0x002f},
+ {9, 0x00be},
+ {8, 0x000f},
+ {8, 0x008f},
+ {8, 0x004f},
+ {9, 0x00fe},
+ {7, 0x0100},
+ {8, 0x0050},
+ {8, 0x0010},
+ {8, 0x0118},
+ {7, 0x0110},
+ {8, 0x0070},
+ {8, 0x0030},
+ {9, 0x00c1},
+ {7, 0x0108},
+ {8, 0x0060},
+ {8, 0x0020},
+ {9, 0x00a1},
+ {8, 0x0000},
+ {8, 0x0080},
+ {8, 0x0040},
+ {9, 0x00e1},
+ {7, 0x0104},
+ {8, 0x0058},
+ {8, 0x0018},
+ {9, 0x0091},
+ {7, 0x0114},
+ {8, 0x0078},
+ {8, 0x0038},
+ {9, 0x00d1},
+ {7, 0x010c},
+ {8, 0x0068},
+ {8, 0x0028},
+ {9, 0x00b1},
+ {8, 0x0008},
+ {8, 0x0088},
+ {8, 0x0048},
+ {9, 0x00f1},
+ {7, 0x0102},
+ {8, 0x0054},
+ {8, 0x0014},
+ {8, 0x011c},
+ {7, 0x0112},
+ {8, 0x0074},
+ {8, 0x0034},
+ {9, 0x00c9},
+ {7, 0x010a},
+ {8, 0x0064},
+ {8, 0x0024},
+ {9, 0x00a9},
+ {8, 0x0004},
+ {8, 0x0084},
+ {8, 0x0044},
+ {9, 0x00e9},
+ {7, 0x0106},
+ {8, 0x005c},
+ {8, 0x001c},
+ {9, 0x0099},
+ {7, 0x0116},
+ {8, 0x007c},
+ {8, 0x003c},
+ {9, 0x00d9},
+ {7, 0x010e},
+ {8, 0x006c},
+ {8, 0x002c},
+ {9, 0x00b9},
+ {8, 0x000c},
+ {8, 0x008c},
+ {8, 0x004c},
+ {9, 0x00f9},
+ {7, 0x0101},
+ {8, 0x0052},
+ {8, 0x0012},
+ {8, 0x011a},
+ {7, 0x0111},
+ {8, 0x0072},
+ {8, 0x0032},
+ {9, 0x00c5},
+ {7, 0x0109},
+ {8, 0x0062},
+ {8, 0x0022},
+ {9, 0x00a5},
+ {8, 0x0002},
+ {8, 0x0082},
+ {8, 0x0042},
+ {9, 0x00e5},
+ {7, 0x0105},
+ {8, 0x005a},
+ {8, 0x001a},
+ {9, 0x0095},
+ {7, 0x0115},
+ {8, 0x007a},
+ {8, 0x003a},
+ {9, 0x00d5},
+ {7, 0x010d},
+ {8, 0x006a},
+ {8, 0x002a},
+ {9, 0x00b5},
+ {8, 0x000a},
+ {8, 0x008a},
+ {8, 0x004a},
+ {9, 0x00f5},
+ {7, 0x0103},
+ {8, 0x0056},
+ {8, 0x0016},
+ {8, 0x011e},
+ {7, 0x0113},
+ {8, 0x0076},
+ {8, 0x0036},
+ {9, 0x00cd},
+ {7, 0x010b},
+ {8, 0x0066},
+ {8, 0x0026},
+ {9, 0x00ad},
+ {8, 0x0006},
+ {8, 0x0086},
+ {8, 0x0046},
+ {9, 0x00ed},
+ {7, 0x0107},
+ {8, 0x005e},
+ {8, 0x001e},
+ {9, 0x009d},
+ {7, 0x0117},
+ {8, 0x007e},
+ {8, 0x003e},
+ {9, 0x00dd},
+ {7, 0x010f},
+ {8, 0x006e},
+ {8, 0x002e},
+ {9, 0x00bd},
+ {8, 0x000e},
+ {8, 0x008e},
+ {8, 0x004e},
+ {9, 0x00fd},
+ {7, 0x0100},
+ {8, 0x0051},
+ {8, 0x0011},
+ {8, 0x0119},
+ {7, 0x0110},
+ {8, 0x0071},
+ {8, 0x0031},
+ {9, 0x00c3},
+ {7, 0x0108},
+ {8, 0x0061},
+ {8, 0x0021},
+ {9, 0x00a3},
+ {8, 0x0001},
+ {8, 0x0081},
+ {8, 0x0041},
+ {9, 0x00e3},
+ {7, 0x0104},
+ {8, 0x0059},
+ {8, 0x0019},
+ {9, 0x0093},
+ {7, 0x0114},
+ {8, 0x0079},
+ {8, 0x0039},
+ {9, 0x00d3},
+ {7, 0x010c},
+ {8, 0x0069},
+ {8, 0x0029},
+ {9, 0x00b3},
+ {8, 0x0009},
+ {8, 0x0089},
+ {8, 0x0049},
+ {9, 0x00f3},
+ {7, 0x0102},
+ {8, 0x0055},
+ {8, 0x0015},
+ {8, 0x011d},
+ {7, 0x0112},
+ {8, 0x0075},
+ {8, 0x0035},
+ {9, 0x00cb},
+ {7, 0x010a},
+ {8, 0x0065},
+ {8, 0x0025},
+ {9, 0x00ab},
+ {8, 0x0005},
+ {8, 0x0085},
+ {8, 0x0045},
+ {9, 0x00eb},
+ {7, 0x0106},
+ {8, 0x005d},
+ {8, 0x001d},
+ {9, 0x009b},
+ {7, 0x0116},
+ {8, 0x007d},
+ {8, 0x003d},
+ {9, 0x00db},
+ {7, 0x010e},
+ {8, 0x006d},
+ {8, 0x002d},
+ {9, 0x00bb},
+ {8, 0x000d},
+ {8, 0x008d},
+ {8, 0x004d},
+ {9, 0x00fb},
+ {7, 0x0101},
+ {8, 0x0053},
+ {8, 0x0013},
+ {8, 0x011b},
+ {7, 0x0111},
+ {8, 0x0073},
+ {8, 0x0033},
+ {9, 0x00c7},
+ {7, 0x0109},
+ {8, 0x0063},
+ {8, 0x0023},
+ {9, 0x00a7},
+ {8, 0x0003},
+ {8, 0x0083},
+ {8, 0x0043},
+ {9, 0x00e7},
+ {7, 0x0105},
+ {8, 0x005b},
+ {8, 0x001b},
+ {9, 0x0097},
+ {7, 0x0115},
+ {8, 0x007b},
+ {8, 0x003b},
+ {9, 0x00d7},
+ {7, 0x010d},
+ {8, 0x006b},
+ {8, 0x002b},
+ {9, 0x00b7},
+ {8, 0x000b},
+ {8, 0x008b},
+ {8, 0x004b},
+ {9, 0x00f7},
+ {7, 0x0103},
+ {8, 0x0057},
+ {8, 0x0017},
+ {8, 0x011f},
+ {7, 0x0113},
+ {8, 0x0077},
+ {8, 0x0037},
+ {9, 0x00cf},
+ {7, 0x010b},
+ {8, 0x0067},
+ {8, 0x0027},
+ {9, 0x00af},
+ {8, 0x0007},
+ {8, 0x0087},
+ {8, 0x0047},
+ {9, 0x00ef},
+ {7, 0x0107},
+ {8, 0x005f},
+ {8, 0x001f},
+ {9, 0x009f},
+ {7, 0x0117},
+ {8, 0x007f},
+ {8, 0x003f},
+ {9, 0x00df},
+ {7, 0x010f},
+ {8, 0x006f},
+ {8, 0x002f},
+ {9, 0x00bf},
+ {8, 0x000f},
+ {8, 0x008f},
+ {8, 0x004f},
+ {9, 0x00ff}
+};
+
+FlateHuffmanTab FlateStream::fixedLitCodeTab = {
+ flateFixedLitCodeTabCodes, 9
+};
+
+static FlateCode flateFixedDistCodeTabCodes[32] = {
+ {5, 0x0000},
+ {5, 0x0010},
+ {5, 0x0008},
+ {5, 0x0018},
+ {5, 0x0004},
+ {5, 0x0014},
+ {5, 0x000c},
+ {5, 0x001c},
+ {5, 0x0002},
+ {5, 0x0012},
+ {5, 0x000a},
+ {5, 0x001a},
+ {5, 0x0006},
+ {5, 0x0016},
+ {5, 0x000e},
+ {0, 0x0000},
+ {5, 0x0001},
+ {5, 0x0011},
+ {5, 0x0009},
+ {5, 0x0019},
+ {5, 0x0005},
+ {5, 0x0015},
+ {5, 0x000d},
+ {5, 0x001d},
+ {5, 0x0003},
+ {5, 0x0013},
+ {5, 0x000b},
+ {5, 0x001b},
+ {5, 0x0007},
+ {5, 0x0017},
+ {5, 0x000f},
+ {0, 0x0000}
+};
+
+FlateHuffmanTab FlateStream::fixedDistCodeTab = {
+ flateFixedDistCodeTabCodes, 5
+};
+
+FlateStream::FlateStream(Stream *strA, int predictor, int columns,
+ int colors, int bits):
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
+ if (!pred->isOk()) {
+ delete pred;
+ pred = NULL;
+ }
+ } else {
+ pred = NULL;
+ }
+ litCodeTab.codes = NULL;
+ distCodeTab.codes = NULL;
+ memset(buf, 0, flateWindow);
+}
+
+FlateStream::~FlateStream() {
+ if (litCodeTab.codes != fixedLitCodeTab.codes) {
+ gfree(litCodeTab.codes);
+ }
+ if (distCodeTab.codes != fixedDistCodeTab.codes) {
+ gfree(distCodeTab.codes);
+ }
+ if (pred) {
+ delete pred;
+ }
+ delete str;
+}
+
+void FlateStream::unfilteredReset() {
+ index = 0;
+ remain = 0;
+ codeBuf = 0;
+ codeSize = 0;
+ compressedBlock = gFalse;
+ endOfBlock = gTrue;
+ eof = gTrue;
+
+ str->reset();
+}
+
+void FlateStream::reset() {
+ int cmf, flg;
+
+ unfilteredReset();
+
+ // read header
+ //~ need to look at window size?
+ endOfBlock = eof = gTrue;
+ cmf = str->getChar();
+ flg = str->getChar();
+ if (cmf == EOF || flg == EOF)
+ return;
+ if ((cmf & 0x0f) != 0x08) {
+ error(getPos(), "Unknown compression method in flate stream");
+ return;
+ }
+ if ((((cmf << 8) + flg) % 31) != 0) {
+ error(getPos(), "Bad FCHECK in flate stream");
+ return;
+ }
+ if (flg & 0x20) {
+ error(getPos(), "FDICT bit set in flate stream");
+ return;
+ }
+
+ eof = gFalse;
+}
+
+int FlateStream::getChar() {
+ int c;
+
+ if (pred) {
+ return pred->getChar();
+ }
+ while (remain == 0) {
+ if (endOfBlock && eof)
+ return EOF;
+ readSome();
+ }
+ c = buf[index];
+ index = (index + 1) & flateMask;
+ --remain;
+ return c;
+}
+
+int FlateStream::lookChar() {
+ int c;
+
+ if (pred) {
+ return pred->lookChar();
+ }
+ while (remain == 0) {
+ if (endOfBlock && eof)
+ return EOF;
+ readSome();
+ }
+ c = buf[index];
+ return c;
+}
+
+int FlateStream::getRawChar() {
+ int c;
+
+ while (remain == 0) {
+ if (endOfBlock && eof)
+ return EOF;
+ readSome();
+ }
+ c = buf[index];
+ index = (index + 1) & flateMask;
+ --remain;
+ return c;
+}
+
+GooString *FlateStream::getPSFilter(int psLevel, char *indent) {
+ GooString *s;
+
+ if (psLevel < 3 || pred) {
+ return NULL;
+ }
+ if (!(s = str->getPSFilter(psLevel, indent))) {
+ return NULL;
+ }
+ s->append(indent)->append("<< >> /FlateDecode filter\n");
+ return s;
+}
+
+GBool FlateStream::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+void FlateStream::readSome() {
+ int code1, code2;
+ int len, dist;
+ int i, j, k;
+ int c;
+
+ if (endOfBlock) {
+ if (!startBlock())
+ return;
+ }
+
+ if (compressedBlock) {
+ if ((code1 = getHuffmanCodeWord(&litCodeTab)) == EOF)
+ goto err;
+ if (code1 < 256) {
+ buf[index] = code1;
+ remain = 1;
+ } else if (code1 == 256) {
+ endOfBlock = gTrue;
+ remain = 0;
+ } else {
+ code1 -= 257;
+ code2 = lengthDecode[code1].bits;
+ if (code2 > 0 && (code2 = getCodeWord(code2)) == EOF)
+ goto err;
+ len = lengthDecode[code1].first + code2;
+ if ((code1 = getHuffmanCodeWord(&distCodeTab)) == EOF)
+ goto err;
+ code2 = distDecode[code1].bits;
+ if (code2 > 0 && (code2 = getCodeWord(code2)) == EOF)
+ goto err;
+ dist = distDecode[code1].first + code2;
+ i = index;
+ j = (index - dist) & flateMask;
+ for (k = 0; k < len; ++k) {
+ buf[i] = buf[j];
+ i = (i + 1) & flateMask;
+ j = (j + 1) & flateMask;
+ }
+ remain = len;
+ }
+
+ } else {
+ len = (blockLen < flateWindow) ? blockLen : flateWindow;
+ for (i = 0, j = index; i < len; ++i, j = (j + 1) & flateMask) {
+ if ((c = str->getChar()) == EOF) {
+ endOfBlock = eof = gTrue;
+ break;
+ }
+ buf[j] = c & 0xff;
+ }
+ remain = i;
+ blockLen -= len;
+ if (blockLen == 0)
+ endOfBlock = gTrue;
+ }
+
+ return;
+
+err:
+ error(getPos(), "Unexpected end of file in flate stream");
+ endOfBlock = eof = gTrue;
+ remain = 0;
+}
+
+GBool FlateStream::startBlock() {
+ int blockHdr;
+ int c;
+ int check;
+
+ // free the code tables from the previous block
+ if (litCodeTab.codes != fixedLitCodeTab.codes) {
+ gfree(litCodeTab.codes);
+ }
+ litCodeTab.codes = NULL;
+ if (distCodeTab.codes != fixedDistCodeTab.codes) {
+ gfree(distCodeTab.codes);
+ }
+ distCodeTab.codes = NULL;
+
+ // read block header
+ blockHdr = getCodeWord(3);
+ if (blockHdr & 1)
+ eof = gTrue;
+ blockHdr >>= 1;
+
+ // uncompressed block
+ if (blockHdr == 0) {
+ compressedBlock = gFalse;
+ if ((c = str->getChar()) == EOF)
+ goto err;
+ blockLen = c & 0xff;
+ if ((c = str->getChar()) == EOF)
+ goto err;
+ blockLen |= (c & 0xff) << 8;
+ if ((c = str->getChar()) == EOF)
+ goto err;
+ check = c & 0xff;
+ if ((c = str->getChar()) == EOF)
+ goto err;
+ check |= (c & 0xff) << 8;
+ if (check != (~blockLen & 0xffff))
+ error(getPos(), "Bad uncompressed block length in flate stream");
+ codeBuf = 0;
+ codeSize = 0;
+
+ // compressed block with fixed codes
+ } else if (blockHdr == 1) {
+ compressedBlock = gTrue;
+ loadFixedCodes();
+
+ // compressed block with dynamic codes
+ } else if (blockHdr == 2) {
+ compressedBlock = gTrue;
+ if (!readDynamicCodes()) {
+ goto err;
+ }
+
+ // unknown block type
+ } else {
+ goto err;
+ }
+
+ endOfBlock = gFalse;
+ return gTrue;
+
+err:
+ error(getPos(), "Bad block header in flate stream");
+ endOfBlock = eof = gTrue;
+ return gFalse;
+}
+
+void FlateStream::loadFixedCodes() {
+ litCodeTab.codes = fixedLitCodeTab.codes;
+ litCodeTab.maxLen = fixedLitCodeTab.maxLen;
+ distCodeTab.codes = fixedDistCodeTab.codes;
+ distCodeTab.maxLen = fixedDistCodeTab.maxLen;
+}
+
+GBool FlateStream::readDynamicCodes() {
+ int numCodeLenCodes;
+ int numLitCodes;
+ int numDistCodes;
+ int codeLenCodeLengths[flateMaxCodeLenCodes];
+ FlateHuffmanTab codeLenCodeTab;
+ int len, repeat, code;
+ int i;
+
+ codeLenCodeTab.codes = NULL;
+
+ // read lengths
+ if ((numLitCodes = getCodeWord(5)) == EOF) {
+ goto err;
+ }
+ numLitCodes += 257;
+ if ((numDistCodes = getCodeWord(5)) == EOF) {
+ goto err;
+ }
+ numDistCodes += 1;
+ if ((numCodeLenCodes = getCodeWord(4)) == EOF) {
+ goto err;
+ }
+ numCodeLenCodes += 4;
+ if (numLitCodes > flateMaxLitCodes ||
+ numDistCodes > flateMaxDistCodes ||
+ numCodeLenCodes > flateMaxCodeLenCodes) {
+ goto err;
+ }
+
+ // build the code length code table
+ for (i = 0; i < flateMaxCodeLenCodes; ++i) {
+ codeLenCodeLengths[i] = 0;
+ }
+ for (i = 0; i < numCodeLenCodes; ++i) {
+ if ((codeLenCodeLengths[codeLenCodeMap[i]] = getCodeWord(3)) == -1) {
+ goto err;
+ }
+ }
+ compHuffmanCodes(codeLenCodeLengths, flateMaxCodeLenCodes, &codeLenCodeTab);
+
+ // build the literal and distance code tables
+ len = 0;
+ repeat = 0;
+ i = 0;
+ while (i < numLitCodes + numDistCodes) {
+ if ((code = getHuffmanCodeWord(&codeLenCodeTab)) == EOF) {
+ goto err;
+ }
+ if (code == 16) {
+ if ((repeat = getCodeWord(2)) == EOF) {
+ goto err;
+ }
+ repeat += 3;
+ if (i + repeat > numLitCodes + numDistCodes) {
+ goto err;
+ }
+ for (; repeat > 0; --repeat) {
+ codeLengths[i++] = len;
+ }
+ } else if (code == 17) {
+ if ((repeat = getCodeWord(3)) == EOF) {
+ goto err;
+ }
+ repeat += 3;
+ if (i + repeat > numLitCodes + numDistCodes) {
+ goto err;
+ }
+ len = 0;
+ for (; repeat > 0; --repeat) {
+ codeLengths[i++] = 0;
+ }
+ } else if (code == 18) {
+ if ((repeat = getCodeWord(7)) == EOF) {
+ goto err;
+ }
+ repeat += 11;
+ if (i + repeat > numLitCodes + numDistCodes) {
+ goto err;
+ }
+ len = 0;
+ for (; repeat > 0; --repeat) {
+ codeLengths[i++] = 0;
+ }
+ } else {
+ codeLengths[i++] = len = code;
+ }
+ }
+ compHuffmanCodes(codeLengths, numLitCodes, &litCodeTab);
+ compHuffmanCodes(codeLengths + numLitCodes, numDistCodes, &distCodeTab);
+
+ gfree(codeLenCodeTab.codes);
+ return gTrue;
+
+err:
+ error(getPos(), "Bad dynamic code table in flate stream");
+ gfree(codeLenCodeTab.codes);
+ return gFalse;
+}
+
+// Convert an array <lengths> of <n> lengths, in value order, into a
+// Huffman code lookup table.
+void FlateStream::compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab) {
+ int tabSize, len, code, code2, skip, val, i, t;
+
+ // find max code length
+ tab->maxLen = 0;
+ for (val = 0; val < n; ++val) {
+ if (lengths[val] > tab->maxLen) {
+ tab->maxLen = lengths[val];
+ }
+ }
+
+ // allocate the table
+ tabSize = 1 << tab->maxLen;
+ tab->codes = (FlateCode *)gmallocn(tabSize, sizeof(FlateCode));
+
+ // clear the table
+ for (i = 0; i < tabSize; ++i) {
+ tab->codes[i].len = 0;
+ tab->codes[i].val = 0;
+ }
+
+ // build the table
+ for (len = 1, code = 0, skip = 2;
+ len <= tab->maxLen;
+ ++len, code <<= 1, skip <<= 1) {
+ for (val = 0; val < n; ++val) {
+ if (lengths[val] == len) {
+
+ // bit-reverse the code
+ code2 = 0;
+ t = code;
+ for (i = 0; i < len; ++i) {
+ code2 = (code2 << 1) | (t & 1);
+ t >>= 1;
+ }
+
+ // fill in the table entries
+ for (i = code2; i < tabSize; i += skip) {
+ tab->codes[i].len = (Gushort)len;
+ tab->codes[i].val = (Gushort)val;
+ }
+
+ ++code;
+ }
+ }
+ }
+}
+
+int FlateStream::getHuffmanCodeWord(FlateHuffmanTab *tab) {
+ FlateCode *code;
+ int c;
+
+ while (codeSize < tab->maxLen) {
+ if ((c = str->getChar()) == EOF) {
+ break;
+ }
+ codeBuf |= (c & 0xff) << codeSize;
+ codeSize += 8;
+ }
+ code = &tab->codes[codeBuf & ((1 << tab->maxLen) - 1)];
+ if (codeSize == 0 || codeSize < code->len || code->len == 0) {
+ return EOF;
+ }
+ codeBuf >>= code->len;
+ codeSize -= code->len;
+ return (int)code->val;
+}
+
+int FlateStream::getCodeWord(int bits) {
+ int c;
+
+ while (codeSize < bits) {
+ if ((c = str->getChar()) == EOF)
+ return EOF;
+ codeBuf |= (c & 0xff) << codeSize;
+ codeSize += 8;
+ }
+ c = codeBuf & ((1 << bits) - 1);
+ codeBuf >>= bits;
+ codeSize -= bits;
+ return c;
+}
+#endif
+
+//------------------------------------------------------------------------
+// EOFStream
+//------------------------------------------------------------------------
+
+EOFStream::EOFStream(Stream *strA):
+ FilterStream(strA) {
+}
+
+EOFStream::~EOFStream() {
+ delete str;
+}
+
+//------------------------------------------------------------------------
+// FixedLengthEncoder
+//------------------------------------------------------------------------
+
+FixedLengthEncoder::FixedLengthEncoder(Stream *strA, int lengthA):
+ FilterStream(strA) {
+ length = lengthA;
+ count = 0;
+}
+
+FixedLengthEncoder::~FixedLengthEncoder() {
+ if (str->isEncoder())
+ delete str;
+}
+
+void FixedLengthEncoder::reset() {
+ str->reset();
+ count = 0;
+}
+
+int FixedLengthEncoder::getChar() {
+ if (length >= 0 && count >= length)
+ return EOF;
+ ++count;
+ return str->getChar();
+}
+
+int FixedLengthEncoder::lookChar() {
+ if (length >= 0 && count >= length)
+ return EOF;
+ return str->getChar();
+}
+
+GBool FixedLengthEncoder::isBinary(GBool last) {
+ return str->isBinary(gTrue);
+}
+
+//------------------------------------------------------------------------
+// ASCIIHexEncoder
+//------------------------------------------------------------------------
+
+ASCIIHexEncoder::ASCIIHexEncoder(Stream *strA):
+ FilterStream(strA) {
+ bufPtr = bufEnd = buf;
+ lineLen = 0;
+ eof = gFalse;
+}
+
+ASCIIHexEncoder::~ASCIIHexEncoder() {
+ if (str->isEncoder()) {
+ delete str;
+ }
+}
+
+void ASCIIHexEncoder::reset() {
+ str->reset();
+ bufPtr = bufEnd = buf;
+ lineLen = 0;
+ eof = gFalse;
+}
+
+GBool ASCIIHexEncoder::fillBuf() {
+ static const char *hex = "0123456789abcdef";
+ int c;
+
+ if (eof) {
+ return gFalse;
+ }
+ bufPtr = bufEnd = buf;
+ if ((c = str->getChar()) == EOF) {
+ *bufEnd++ = '>';
+ eof = gTrue;
+ } else {
+ if (lineLen >= 64) {
+ *bufEnd++ = '\n';
+ lineLen = 0;
+ }
+ *bufEnd++ = hex[(c >> 4) & 0x0f];
+ *bufEnd++ = hex[c & 0x0f];
+ lineLen += 2;
+ }
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// ASCII85Encoder
+//------------------------------------------------------------------------
+
+ASCII85Encoder::ASCII85Encoder(Stream *strA):
+ FilterStream(strA) {
+ bufPtr = bufEnd = buf;
+ lineLen = 0;
+ eof = gFalse;
+}
+
+ASCII85Encoder::~ASCII85Encoder() {
+ if (str->isEncoder())
+ delete str;
+}
+
+void ASCII85Encoder::reset() {
+ str->reset();
+ bufPtr = bufEnd = buf;
+ lineLen = 0;
+ eof = gFalse;
+}
+
+GBool ASCII85Encoder::fillBuf() {
+ Guint t;
+ char buf1[5];
+ int c0, c1, c2, c3;
+ int n, i;
+
+ if (eof) {
+ return gFalse;
+ }
+ c0 = str->getChar();
+ c1 = str->getChar();
+ c2 = str->getChar();
+ c3 = str->getChar();
+ bufPtr = bufEnd = buf;
+ if (c3 == EOF) {
+ if (c0 == EOF) {
+ n = 0;
+ t = 0;
+ } else {
+ if (c1 == EOF) {
+ n = 1;
+ t = c0 << 24;
+ } else if (c2 == EOF) {
+ n = 2;
+ t = (c0 << 24) | (c1 << 16);
+ } else {
+ n = 3;
+ t = (c0 << 24) | (c1 << 16) | (c2 << 8);
+ }
+ for (i = 4; i >= 0; --i) {
+ buf1[i] = (char)(t % 85 + 0x21);
+ t /= 85;
+ }
+ for (i = 0; i <= n; ++i) {
+ *bufEnd++ = buf1[i];
+ if (++lineLen == 65) {
+ *bufEnd++ = '\n';
+ lineLen = 0;
+ }
+ }
+ }
+ *bufEnd++ = '~';
+ *bufEnd++ = '>';
+ eof = gTrue;
+ } else {
+ t = (c0 << 24) | (c1 << 16) | (c2 << 8) | c3;
+ if (t == 0) {
+ *bufEnd++ = 'z';
+ if (++lineLen == 65) {
+ *bufEnd++ = '\n';
+ lineLen = 0;
+ }
+ } else {
+ for (i = 4; i >= 0; --i) {
+ buf1[i] = (char)(t % 85 + 0x21);
+ t /= 85;
+ }
+ for (i = 0; i <= 4; ++i) {
+ *bufEnd++ = buf1[i];
+ if (++lineLen == 65) {
+ *bufEnd++ = '\n';
+ lineLen = 0;
+ }
+ }
+ }
+ }
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+// RunLengthEncoder
+//------------------------------------------------------------------------
+
+RunLengthEncoder::RunLengthEncoder(Stream *strA):
+ FilterStream(strA) {
+ bufPtr = bufEnd = nextEnd = buf;
+ eof = gFalse;
+}
+
+RunLengthEncoder::~RunLengthEncoder() {
+ if (str->isEncoder())
+ delete str;
+}
+
+void RunLengthEncoder::reset() {
+ str->reset();
+ bufPtr = bufEnd = nextEnd = buf;
+ eof = gFalse;
+}
+
+//
+// When fillBuf finishes, buf[] looks like this:
+// +-----+--------------+-----------------+--
+// + tag | ... data ... | next 0, 1, or 2 |
+// +-----+--------------+-----------------+--
+// ^ ^ ^
+// bufPtr bufEnd nextEnd
+//
+GBool RunLengthEncoder::fillBuf() {
+ int c, c1, c2;
+ int n;
+
+ // already hit EOF?
+ if (eof)
+ return gFalse;
+
+ // grab two bytes
+ if (nextEnd < bufEnd + 1) {
+ if ((c1 = str->getChar()) == EOF) {
+ eof = gTrue;
+ return gFalse;
+ }
+ } else {
+ c1 = bufEnd[0] & 0xff;
+ }
+ if (nextEnd < bufEnd + 2) {
+ if ((c2 = str->getChar()) == EOF) {
+ eof = gTrue;
+ buf[0] = 0;
+ buf[1] = c1;
+ bufPtr = buf;
+ bufEnd = &buf[2];
+ return gTrue;
+ }
+ } else {
+ c2 = bufEnd[1] & 0xff;
+ }
+
+ // check for repeat
+ c = 0; // make gcc happy
+ if (c1 == c2) {
+ n = 2;
+ while (n < 128 && (c = str->getChar()) == c1)
+ ++n;
+ buf[0] = (char)(257 - n);
+ buf[1] = c1;
+ bufEnd = &buf[2];
+ if (c == EOF) {
+ eof = gTrue;
+ } else if (n < 128) {
+ buf[2] = c;
+ nextEnd = &buf[3];
+ } else {
+ nextEnd = bufEnd;
+ }
+
+ // get up to 128 chars
+ } else {
+ buf[1] = c1;
+ buf[2] = c2;
+ n = 2;
+ while (n < 128) {
+ if ((c = str->getChar()) == EOF) {
+ eof = gTrue;
+ break;
+ }
+ ++n;
+ buf[n] = c;
+ if (buf[n] == buf[n-1])
+ break;
+ }
+ if (buf[n] == buf[n-1]) {
+ buf[0] = (char)(n-2-1);
+ bufEnd = &buf[n-1];
+ nextEnd = &buf[n+1];
+ } else {
+ buf[0] = (char)(n-1);
+ bufEnd = nextEnd = &buf[n+1];
+ }
+ }
+ bufPtr = buf;
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.h
new file mode 100644
index 00000000000..9c0068e47f5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/Stream.h
@@ -0,0 +1,972 @@
+//========================================================================
+//
+// Stream.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef STREAM_H
+#define STREAM_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include "goo/gtypes.h"
+#include "Object.h"
+
+class BaseStream;
+
+//------------------------------------------------------------------------
+
+enum StreamKind {
+ strFile,
+ strASCIIHex,
+ strASCII85,
+ strLZW,
+ strRunLength,
+ strCCITTFax,
+ strDCT,
+ strFlate,
+ strJBIG2,
+ strJPX,
+ strWeird // internal-use stream types
+};
+
+enum StreamColorSpaceMode {
+ streamCSNone,
+ streamCSDeviceGray,
+ streamCSDeviceRGB,
+ streamCSDeviceCMYK
+};
+
+//------------------------------------------------------------------------
+
+// This is in Stream.h instead of Decrypt.h to avoid really annoying
+// include file dependency loops.
+enum CryptAlgorithm {
+ cryptRC4,
+ cryptAES
+};
+
+//------------------------------------------------------------------------
+// Stream (base class)
+//------------------------------------------------------------------------
+
+class Stream {
+public:
+
+ // Constructor.
+ Stream();
+
+ // Destructor.
+ virtual ~Stream();
+
+ // Reference counting.
+ int incRef() { return ++ref; }
+ int decRef() { return --ref; }
+
+ // Get kind of stream.
+ virtual StreamKind getKind() = 0;
+
+ // Reset stream to beginning.
+ virtual void reset() = 0;
+
+ // Close down the stream.
+ virtual void close();
+
+ // Get next char from stream.
+ virtual int getChar() = 0;
+
+ // Peek at next char in stream.
+ virtual int lookChar() = 0;
+
+ // Get next char from stream without using the predictor.
+ // This is only used by StreamPredictor.
+ virtual int getRawChar();
+
+ // Get next char directly from stream source, without filtering it
+ virtual int getUnfilteredChar () = 0;
+
+ // Resets the stream without reading anything (even not the headers)
+ // WARNING: Reading the stream with something else than getUnfilteredChar
+ // may lead to unexcepted behaviour until you call reset ()
+ virtual void unfilteredReset () = 0;
+
+ // Get next line from stream.
+ virtual char *getLine(char *buf, int size);
+
+ // Get current position in file.
+ virtual int getPos() = 0;
+
+ // Go to a position in the stream. If <dir> is negative, the
+ // position is from the end of the file; otherwise the position is
+ // from the start of the file.
+ virtual void setPos(Guint pos, int dir = 0) = 0;
+
+ // Get PostScript command for the filter(s).
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+
+ // Does this stream type potentially contain non-printable chars?
+ virtual GBool isBinary(GBool last = gTrue) = 0;
+
+ // Get the BaseStream of this stream.
+ virtual BaseStream *getBaseStream() = 0;
+
+ // Get the stream after the last decoder (this may be a BaseStream
+ // or a DecryptStream).
+ virtual Stream *getUndecodedStream() = 0;
+
+ // Get the dictionary associated with this stream.
+ virtual Dict *getDict() = 0;
+
+ // Is this an encoding filter?
+ virtual GBool isEncoder() { return gFalse; }
+
+ // Get image parameters which are defined by the stream contents.
+ virtual void getImageParams(int * /*bitsPerComponent*/,
+ StreamColorSpaceMode * /*csMode*/) {}
+
+ // Return the next stream in the "stack".
+ virtual Stream *getNextStream() { return NULL; }
+
+ // Add filters to this stream according to the parameters in <dict>.
+ // Returns the new stream.
+ Stream *addFilters(Object *dict);
+
+private:
+
+ Stream *makeFilter(char *name, Stream *str, Object *params);
+
+ int ref; // reference count
+};
+
+
+ //------------------------------------------------------------------------
+// OutStream
+//
+// This is the base class for all streams that output to a file
+//------------------------------------------------------------------------
+class OutStream {
+public:
+ // Constructor.
+ OutStream ();
+
+ // Desctructor.
+ virtual ~OutStream ();
+
+ // Reference counting.
+ int incRef() { return ++ref; }
+ int decRef() { return --ref; }
+
+ // Close the stream
+ virtual void close() = 0;
+
+ // Return position in stream
+ virtual int getPos() = 0;
+
+ // Put a char in the stream
+ virtual void put (char c) = 0;
+
+ //FIXME
+ // Printf-like function 2,3 because the first arg is class instance ?
+ virtual void printf (const char *format, ...) = 0 ; //__attribute__((format(printf, 2,3))) = 0;
+
+private:
+ int ref; // reference count
+
+};
+
+//------------------------------------------------------------------------
+// FileOutStream
+//------------------------------------------------------------------------
+class FileOutStream : public OutStream {
+public:
+ FileOutStream (FILE* fa, Guint startA);
+
+ virtual ~FileOutStream ();
+
+ virtual void close();
+
+ virtual int getPos();
+
+ virtual void put (char c);
+
+ virtual void printf (const char *format, ...);
+private:
+ FILE *f;
+ Guint start;
+
+};
+
+
+//------------------------------------------------------------------------
+// BaseStream
+//
+// This is the base class for all streams that read directly from a file.
+//------------------------------------------------------------------------
+
+class BaseStream: public Stream {
+public:
+
+ BaseStream(Object *dictA);
+ virtual ~BaseStream();
+ virtual Stream *makeSubStream(Guint start, GBool limited,
+ Guint length, Object *dict) = 0;
+ virtual void setPos(Guint pos, int dir = 0) = 0;
+ virtual GBool isBinary(GBool last = gTrue) { return last; }
+ virtual BaseStream *getBaseStream() { return this; }
+ virtual Stream *getUndecodedStream() { return this; }
+ virtual Dict *getDict() { return dict.getDict(); }
+ virtual GooString *getFileName() { return NULL; }
+
+ // Get/set position of first byte of stream within the file.
+ virtual Guint getStart() = 0;
+ virtual void moveStart(int delta) = 0;
+
+private:
+
+ Object dict;
+};
+
+//------------------------------------------------------------------------
+// FilterStream
+//
+// This is the base class for all streams that filter another stream.
+//------------------------------------------------------------------------
+
+class FilterStream: public Stream {
+public:
+
+ FilterStream(Stream *strA);
+ virtual ~FilterStream();
+ virtual void close();
+ virtual int getPos() { return str->getPos(); }
+ virtual void setPos(Guint pos, int dir = 0);
+ virtual BaseStream *getBaseStream() { return str->getBaseStream(); }
+ virtual Stream *getUndecodedStream() { return str->getUndecodedStream(); }
+ virtual Dict *getDict() { return str->getDict(); }
+ virtual Stream *getNextStream() { return str; }
+
+ virtual int getUnfilteredChar () { return str->getUnfilteredChar(); }
+ virtual void unfilteredReset () { str->unfilteredReset(); }
+
+protected:
+
+ Stream *str;
+};
+
+//------------------------------------------------------------------------
+// ImageStream
+//------------------------------------------------------------------------
+
+class ImageStream {
+public:
+
+ // Create an image stream object for an image with the specified
+ // parameters. Note that these are the actual image parameters,
+ // which may be different from the predictor parameters.
+ ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA);
+
+ ~ImageStream();
+
+ // Reset the stream.
+ void reset();
+
+ // Close the stream previously reset
+ void close();
+
+ // Gets the next pixel from the stream. <pix> should be able to hold
+ // at least nComps elements. Returns false at end of file.
+ GBool getPixel(Guchar *pix);
+
+ // Returns a pointer to the next line of pixels. Returns NULL at
+ // end of file.
+ Guchar *getLine();
+
+ // Skip an entire line from the image.
+ void skipLine();
+
+private:
+
+ Stream *str; // base stream
+ int width; // pixels per line
+ int nComps; // components per pixel
+ int nBits; // bits per component
+ int nVals; // components per line
+ Guchar *imgLine; // line buffer
+ int imgIdx; // current index in imgLine
+};
+
+//------------------------------------------------------------------------
+// StreamPredictor
+//------------------------------------------------------------------------
+
+class StreamPredictor {
+public:
+
+ // Create a predictor object. Note that the parameters are for the
+ // predictor, and may not match the actual image parameters.
+ StreamPredictor(Stream *strA, int predictorA,
+ int widthA, int nCompsA, int nBitsA);
+
+ ~StreamPredictor();
+
+ GBool isOk() { return ok; }
+
+ int lookChar();
+ int getChar();
+
+private:
+
+ GBool getNextLine();
+
+ Stream *str; // base stream
+ int predictor; // predictor
+ int width; // pixels per line
+ int nComps; // components per pixel
+ int nBits; // bits per component
+ int nVals; // components per line
+ int pixBytes; // bytes per pixel
+ int rowBytes; // bytes per line
+ Guchar *predLine; // line buffer
+ int predIdx; // current index in predLine
+ GBool ok;
+};
+
+//------------------------------------------------------------------------
+// FileStream
+//------------------------------------------------------------------------
+
+#define fileStreamBufSize 256
+
+class FileStream: public BaseStream {
+public:
+
+ FileStream(FILE *fA, Guint startA, GBool limitedA,
+ Guint lengthA, Object *dictA);
+ virtual ~FileStream();
+ virtual Stream *makeSubStream(Guint startA, GBool limitedA,
+ Guint lengthA, Object *dictA);
+ virtual StreamKind getKind() { return strFile; }
+ virtual void reset();
+ virtual void close();
+ virtual int getChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
+ virtual int lookChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
+ virtual int getPos() { return bufPos + (bufPtr - buf); }
+ virtual void setPos(Guint pos, int dir = 0);
+ virtual Guint getStart() { return start; }
+ virtual void moveStart(int delta);
+
+ virtual int getUnfilteredChar () { return getChar(); }
+ virtual void unfilteredReset () { reset(); }
+
+private:
+
+ GBool fillBuf();
+
+ FILE *f;
+ Guint start;
+ GBool limited;
+ Guint length;
+ char buf[fileStreamBufSize];
+ char *bufPtr;
+ char *bufEnd;
+ Guint bufPos;
+ int savePos;
+ GBool saved;
+};
+
+//------------------------------------------------------------------------
+// MemStream
+//------------------------------------------------------------------------
+
+class MemStream: public BaseStream {
+public:
+
+ MemStream(char *bufA, Guint startA, Guint lengthA, Object *dictA);
+ virtual ~MemStream();
+ virtual Stream *makeSubStream(Guint start, GBool limited,
+ Guint lengthA, Object *dictA);
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual void close();
+ virtual int getChar()
+ { return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF; }
+ virtual int lookChar()
+ { return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF; }
+ virtual int getPos() { return (int)(bufPtr - buf); }
+ virtual void setPos(Guint pos, int dir = 0);
+ virtual Guint getStart() { return start; }
+ virtual void moveStart(int delta);
+
+ //if needFree = true, the stream will delete buf when it is destroyed
+ //otherwise it will not touch it. Default value is false
+ virtual void setNeedFree (GBool val) { needFree = val; }
+
+ virtual int getUnfilteredChar () { return getChar(); }
+ virtual void unfilteredReset () { reset (); }
+
+private:
+
+ char *buf;
+ Guint start;
+ Guint length;
+ char *bufEnd;
+ char *bufPtr;
+ GBool needFree;
+};
+
+//------------------------------------------------------------------------
+// EmbedStream
+//
+// This is a special stream type used for embedded streams (inline
+// images). It reads directly from the base stream -- after the
+// EmbedStream is deleted, reads from the base stream will proceed where
+// the BaseStream left off. Note that this is very different behavior
+// that creating a new FileStream (using makeSubStream).
+//------------------------------------------------------------------------
+
+class EmbedStream: public BaseStream {
+public:
+
+ EmbedStream(Stream *strA, Object *dictA, GBool limitedA, Guint lengthA);
+ virtual ~EmbedStream();
+ virtual Stream *makeSubStream(Guint start, GBool limitedA,
+ Guint lengthA, Object *dictA);
+ virtual StreamKind getKind() { return str->getKind(); }
+ virtual void reset() {}
+ virtual int getChar();
+ virtual int lookChar();
+ virtual int getPos() { return str->getPos(); }
+ virtual void setPos(Guint pos, int dir = 0);
+ virtual Guint getStart();
+ virtual void moveStart(int delta);
+
+ virtual int getUnfilteredChar () { return str->getUnfilteredChar(); }
+ virtual void unfilteredReset () { str->unfilteredReset(); }
+
+
+private:
+
+ Stream *str;
+ GBool limited;
+ Guint length;
+};
+
+//------------------------------------------------------------------------
+// ASCIIHexStream
+//------------------------------------------------------------------------
+
+class ASCIIHexStream: public FilterStream {
+public:
+
+ ASCIIHexStream(Stream *strA);
+ virtual ~ASCIIHexStream();
+ virtual StreamKind getKind() { return strASCIIHex; }
+ virtual void reset();
+ virtual int getChar()
+ { int c = lookChar(); buf = EOF; return c; }
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+
+ int buf;
+ GBool eof;
+};
+
+//------------------------------------------------------------------------
+// ASCII85Stream
+//------------------------------------------------------------------------
+
+class ASCII85Stream: public FilterStream {
+public:
+
+ ASCII85Stream(Stream *strA);
+ virtual ~ASCII85Stream();
+ virtual StreamKind getKind() { return strASCII85; }
+ virtual void reset();
+ virtual int getChar()
+ { int ch = lookChar(); ++index; return ch; }
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+
+ int c[5];
+ int b[4];
+ int index, n;
+ GBool eof;
+};
+
+//------------------------------------------------------------------------
+// LZWStream
+//------------------------------------------------------------------------
+
+class LZWStream: public FilterStream {
+public:
+
+ LZWStream(Stream *strA, int predictor, int columns, int colors,
+ int bits, int earlyA);
+ virtual ~LZWStream();
+ virtual StreamKind getKind() { return strLZW; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual int getRawChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+
+ StreamPredictor *pred; // predictor
+ int early; // early parameter
+ GBool eof; // true if at eof
+ int inputBuf; // input buffer
+ int inputBits; // number of bits in input buffer
+ struct { // decoding table
+ int length;
+ int head;
+ Guchar tail;
+ } table[4097];
+ int nextCode; // next code to be used
+ int nextBits; // number of bits in next code word
+ int prevCode; // previous code used in stream
+ int newChar; // next char to be added to table
+ Guchar seqBuf[4097]; // buffer for current sequence
+ int seqLength; // length of current sequence
+ int seqIndex; // index into current sequence
+ GBool first; // first code after a table clear
+
+ GBool processNextCode();
+ void clearTable();
+ int getCode();
+};
+
+//------------------------------------------------------------------------
+// RunLengthStream
+//------------------------------------------------------------------------
+
+class RunLengthStream: public FilterStream {
+public:
+
+ RunLengthStream(Stream *strA);
+ virtual ~RunLengthStream();
+ virtual StreamKind getKind() { return strRunLength; }
+ virtual void reset();
+ virtual int getChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
+ virtual int lookChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+private:
+
+ char buf[128]; // buffer
+ char *bufPtr; // next char to read
+ char *bufEnd; // end of buffer
+ GBool eof;
+
+ GBool fillBuf();
+};
+
+//------------------------------------------------------------------------
+// CCITTFaxStream
+//------------------------------------------------------------------------
+
+struct CCITTCodeTable;
+
+class CCITTFaxStream: public FilterStream {
+public:
+
+ CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
+ GBool byteAlignA, int columnsA, int rowsA,
+ GBool endOfBlockA, GBool blackA);
+ virtual ~CCITTFaxStream();
+ virtual StreamKind getKind() { return strCCITTFax; }
+ virtual void reset();
+ virtual int getChar()
+ { int c = lookChar(); buf = EOF; return c; }
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+
+ virtual void unfilteredReset ();
+
+private:
+
+ int encoding; // 'K' parameter
+ GBool endOfLine; // 'EndOfLine' parameter
+ GBool byteAlign; // 'EncodedByteAlign' parameter
+ int columns; // 'Columns' parameter
+ int rows; // 'Rows' parameter
+ GBool endOfBlock; // 'EndOfBlock' parameter
+ GBool black; // 'BlackIs1' parameter
+ GBool eof; // true if at eof
+ GBool nextLine2D; // true if next line uses 2D encoding
+ int row; // current row
+ int inputBuf; // input buffer
+ int inputBits; // number of bits in input buffer
+ int *codingLine; // coding line changing elements
+ int *refLine; // reference line changing elements
+ int a0i; // index into codingLine
+ GBool err; // error on current line
+ int outputBits; // remaining ouput bits
+ int buf; // character buffer
+
+ void addPixels(int a1, int black);
+ void addPixelsNeg(int a1, int black);
+ short getTwoDimCode();
+ short getWhiteCode();
+ short getBlackCode();
+ short lookBits(int n);
+ void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; }
+};
+
+#ifndef ENABLE_LIBJPEG
+//------------------------------------------------------------------------
+// DCTStream
+//------------------------------------------------------------------------
+
+// DCT component info
+struct DCTCompInfo {
+ int id; // component ID
+ int hSample, vSample; // horiz/vert sampling resolutions
+ int quantTable; // quantization table number
+ int prevDC; // DC coefficient accumulator
+};
+
+struct DCTScanInfo {
+ GBool comp[4]; // comp[i] is set if component i is
+ // included in this scan
+ int numComps; // number of components in the scan
+ int dcHuffTable[4]; // DC Huffman table numbers
+ int acHuffTable[4]; // AC Huffman table numbers
+ int firstCoeff, lastCoeff; // first and last DCT coefficient
+ int ah, al; // successive approximation parameters
+};
+
+// DCT Huffman decoding table
+struct DCTHuffTable {
+ Guchar firstSym[17]; // first symbol for this bit length
+ Gushort firstCode[17]; // first code for this bit length
+ Gushort numCodes[17]; // number of codes of this bit length
+ Guchar sym[256]; // symbols
+};
+
+class DCTStream: public FilterStream {
+public:
+
+ DCTStream(Stream *strA, int colorXformA);
+ virtual ~DCTStream();
+ virtual StreamKind getKind() { return strDCT; }
+ virtual void reset();
+ virtual void close();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ Stream *getRawStream() { return str; }
+
+ virtual void unfilteredReset();
+
+private:
+
+ GBool progressive; // set if in progressive mode
+ GBool interleaved; // set if in interleaved mode
+ int width, height; // image size
+ int mcuWidth, mcuHeight; // size of min coding unit, in data units
+ int bufWidth, bufHeight; // frameBuf size
+ DCTCompInfo compInfo[4]; // info for each component
+ DCTScanInfo scanInfo; // info for the current scan
+ int numComps; // number of components in image
+ int colorXform; // color transform: -1 = unspecified
+ // 0 = none
+ // 1 = YUV/YUVK -> RGB/CMYK
+ GBool gotJFIFMarker; // set if APP0 JFIF marker was present
+ GBool gotAdobeMarker; // set if APP14 Adobe marker was present
+ int restartInterval; // restart interval, in MCUs
+ Gushort quantTables[4][64]; // quantization tables
+ int numQuantTables; // number of quantization tables
+ DCTHuffTable dcHuffTables[4]; // DC Huffman tables
+ DCTHuffTable acHuffTables[4]; // AC Huffman tables
+ int numDCHuffTables; // number of DC Huffman tables
+ int numACHuffTables; // number of AC Huffman tables
+ Guchar *rowBuf[4][32]; // buffer for one MCU (non-progressive mode)
+ int *frameBuf[4]; // buffer for frame (progressive mode)
+ int comp, x, y, dy; // current position within image/MCU
+ int restartCtr; // MCUs left until restart
+ int restartMarker; // next restart marker
+ int eobRun; // number of EOBs left in the current run
+ int inputBuf; // input buffer for variable length codes
+ int inputBits; // number of valid bits in input buffer
+
+ void restart();
+ GBool readMCURow();
+ void readScan();
+ GBool readDataUnit(DCTHuffTable *dcHuffTable,
+ DCTHuffTable *acHuffTable,
+ int *prevDC, int data[64]);
+ GBool readProgressiveDataUnit(DCTHuffTable *dcHuffTable,
+ DCTHuffTable *acHuffTable,
+ int *prevDC, int data[64]);
+ void decodeImage();
+ void transformDataUnit(Gushort *quantTable,
+ int dataIn[64], Guchar dataOut[64]);
+ int readHuffSym(DCTHuffTable *table);
+ int readAmp(int size);
+ int readBit();
+ GBool readHeader();
+ GBool readBaselineSOF();
+ GBool readProgressiveSOF();
+ GBool readScanInfo();
+ GBool readQuantTables();
+ GBool readHuffmanTables();
+ GBool readRestartInterval();
+ GBool readJFIFMarker();
+ GBool readAdobeMarker();
+ GBool readTrailer();
+ int readMarker();
+ int read16();
+};
+
+#endif
+
+#ifndef ENABLE_ZLIB
+//------------------------------------------------------------------------
+// FlateStream
+//------------------------------------------------------------------------
+
+#define flateWindow 32768 // buffer size
+#define flateMask (flateWindow-1)
+#define flateMaxHuffman 15 // max Huffman code length
+#define flateMaxCodeLenCodes 19 // max # code length codes
+#define flateMaxLitCodes 288 // max # literal codes
+#define flateMaxDistCodes 30 // max # distance codes
+
+// Huffman code table entry
+struct FlateCode {
+ Gushort len; // code length, in bits
+ Gushort val; // value represented by this code
+};
+
+struct FlateHuffmanTab {
+ FlateCode *codes;
+ int maxLen;
+};
+
+// Decoding info for length and distance code words
+struct FlateDecode {
+ int bits; // # extra bits
+ int first; // first length/distance
+};
+
+class FlateStream: public FilterStream {
+public:
+
+ FlateStream(Stream *strA, int predictor, int columns,
+ int colors, int bits);
+ virtual ~FlateStream();
+ virtual StreamKind getKind() { return strFlate; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual int getRawChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ virtual void unfilteredReset ();
+
+private:
+
+ StreamPredictor *pred; // predictor
+ Guchar buf[flateWindow]; // output data buffer
+ int index; // current index into output buffer
+ int remain; // number valid bytes in output buffer
+ int codeBuf; // input buffer
+ int codeSize; // number of bits in input buffer
+ int // literal and distance code lengths
+ codeLengths[flateMaxLitCodes + flateMaxDistCodes];
+ FlateHuffmanTab litCodeTab; // literal code table
+ FlateHuffmanTab distCodeTab; // distance code table
+ GBool compressedBlock; // set if reading a compressed block
+ int blockLen; // remaining length of uncompressed block
+ GBool endOfBlock; // set when end of block is reached
+ GBool eof; // set when end of stream is reached
+
+ static int // code length code reordering
+ codeLenCodeMap[flateMaxCodeLenCodes];
+ static FlateDecode // length decoding info
+ lengthDecode[flateMaxLitCodes-257];
+ static FlateDecode // distance decoding info
+ distDecode[flateMaxDistCodes];
+ static FlateHuffmanTab // fixed literal code table
+ fixedLitCodeTab;
+ static FlateHuffmanTab // fixed distance code table
+ fixedDistCodeTab;
+
+ void readSome();
+ GBool startBlock();
+ void loadFixedCodes();
+ GBool readDynamicCodes();
+ void compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab);
+ int getHuffmanCodeWord(FlateHuffmanTab *tab);
+ int getCodeWord(int bits);
+};
+#endif
+
+//------------------------------------------------------------------------
+// EOFStream
+//------------------------------------------------------------------------
+
+class EOFStream: public FilterStream {
+public:
+
+ EOFStream(Stream *strA);
+ virtual ~EOFStream();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset() {}
+ virtual int getChar() { return EOF; }
+ virtual int lookChar() { return EOF; }
+ virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; }
+ virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
+};
+
+//------------------------------------------------------------------------
+// FixedLengthEncoder
+//------------------------------------------------------------------------
+
+class FixedLengthEncoder: public FilterStream {
+public:
+
+ FixedLengthEncoder(Stream *strA, int lengthA);
+ ~FixedLengthEncoder();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; }
+ virtual GBool isBinary(GBool /*last = gTrue*/);
+ virtual GBool isEncoder() { return gTrue; }
+
+private:
+
+ int length;
+ int count;
+};
+
+//------------------------------------------------------------------------
+// ASCIIHexEncoder
+//------------------------------------------------------------------------
+
+class ASCIIHexEncoder: public FilterStream {
+public:
+
+ ASCIIHexEncoder(Stream *strA);
+ virtual ~ASCIIHexEncoder();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
+ virtual int lookChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
+ virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; }
+ virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
+ virtual GBool isEncoder() { return gTrue; }
+
+private:
+
+ char buf[4];
+ char *bufPtr;
+ char *bufEnd;
+ int lineLen;
+ GBool eof;
+
+ GBool fillBuf();
+};
+
+//------------------------------------------------------------------------
+// ASCII85Encoder
+//------------------------------------------------------------------------
+
+class ASCII85Encoder: public FilterStream {
+public:
+
+ ASCII85Encoder(Stream *strA);
+ virtual ~ASCII85Encoder();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
+ virtual int lookChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
+ virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; }
+ virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
+ virtual GBool isEncoder() { return gTrue; }
+
+private:
+
+ char buf[8];
+ char *bufPtr;
+ char *bufEnd;
+ int lineLen;
+ GBool eof;
+
+ GBool fillBuf();
+};
+
+//------------------------------------------------------------------------
+// RunLengthEncoder
+//------------------------------------------------------------------------
+
+class RunLengthEncoder: public FilterStream {
+public:
+
+ RunLengthEncoder(Stream *strA);
+ virtual ~RunLengthEncoder();
+ virtual StreamKind getKind() { return strWeird; }
+ virtual void reset();
+ virtual int getChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
+ virtual int lookChar()
+ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
+ virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; }
+ virtual GBool isBinary(GBool /*last = gTrue*/) { return gTrue; }
+ virtual GBool isEncoder() { return gTrue; }
+
+private:
+
+ char buf[131];
+ char *bufPtr;
+ char *bufEnd;
+ char *nextEnd;
+ GBool eof;
+
+ GBool fillBuf();
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.cc
new file mode 100644
index 00000000000..442ace2dbad
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.cc
@@ -0,0 +1,4923 @@
+//========================================================================
+//
+// TextOutputDev.cc
+//
+// Copyright 1997-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2005-2007 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+// Copyright (C) 2006-2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2006, 2007 Ed Catmur <ed@catmur.co.uk>
+// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2007, 2008 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Pino Toscano <pino@kde.org>
+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2009 Ross Moore <ross@maths.mq.edu.au>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <math.h>
+#include <ctype.h>
+#ifdef _WIN32
+#include <fcntl.h> // for O_BINARY
+#include <io.h> // for setmode
+#endif
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "poppler-config.h"
+#include "Error.h"
+#include "GlobalParams.h"
+#include "UnicodeMap.h"
+#include "UnicodeTypeTable.h"
+#include "Link.h"
+#include "TextOutputDev.h"
+#include "Page.h"
+#include "PDFDocEncoding.h"
+
+#ifdef MACOS
+// needed for setting type/creator of MacOS files
+#include "ICSupport.h"
+#endif
+
+//------------------------------------------------------------------------
+// parameters
+//------------------------------------------------------------------------
+
+// Each bucket in a text pool includes baselines within a range of
+// this many points.
+#define textPoolStep 4
+
+// Inter-character space width which will cause addChar to start a new
+// word.
+#define minWordBreakSpace 0.1
+
+// Negative inter-character space width, i.e., overlap, which will
+// cause addChar to start a new word.
+#define minDupBreakOverlap 0.2
+
+// Max distance between baselines of two lines within a block, as a
+// fraction of the font size.
+#define maxLineSpacingDelta 1.5
+
+// Max difference in primary font sizes on two lines in the same
+// block. Delta1 is used when examining new lines above and below the
+// current block; delta2 is used when examining text that overlaps the
+// current block; delta3 is used when examining text to the left and
+// right of the current block.
+#define maxBlockFontSizeDelta1 0.05
+#define maxBlockFontSizeDelta2 0.6
+#define maxBlockFontSizeDelta3 0.2
+
+// Max difference in font sizes inside a word.
+#define maxWordFontSizeDelta 0.05
+
+// Maximum distance between baselines of two words on the same line,
+// e.g., distance between subscript or superscript and the primary
+// baseline, as a fraction of the font size.
+#define maxIntraLineDelta 0.5
+
+// Minimum inter-word spacing, as a fraction of the font size. (Only
+// used for raw ordering.)
+#define minWordSpacing 0.15
+
+// Maximum inter-word spacing, as a fraction of the font size.
+#define maxWordSpacing 1.5
+
+// Maximum horizontal spacing which will allow a word to be pulled
+// into a block.
+#define minColSpacing1 0.3
+
+// Minimum spacing between columns, as a fraction of the font size.
+#define minColSpacing2 1.0
+
+// Maximum vertical spacing between blocks within a flow, as a
+// multiple of the font size.
+#define maxBlockSpacing 2.5
+
+// Minimum spacing between characters within a word, as a fraction of
+// the font size.
+#define minCharSpacing -0.2
+
+// Maximum spacing between characters within a word, as a fraction of
+// the font size, when there is no obvious extra-wide character
+// spacing.
+#define maxCharSpacing 0.03
+
+// When extra-wide character spacing is detected, the inter-character
+// space threshold is set to the minimum inter-character space
+// multiplied by this constant.
+#define maxWideCharSpacingMul 1.3
+
+// Upper limit on spacing between characters in a word.
+#define maxWideCharSpacing 0.4
+
+// Max difference in primary,secondary coordinates (as a fraction of
+// the font size) allowed for duplicated text (fake boldface, drop
+// shadows) which is to be discarded.
+#define dupMaxPriDelta 0.1
+#define dupMaxSecDelta 0.2
+
+// Max width of underlines (in points).
+#define maxUnderlineWidth 3
+
+// Min distance between baseline and underline (in points).
+//~ this should be font-size-dependent
+#define minUnderlineGap -2
+
+// Max distance between baseline and underline (in points).
+//~ this should be font-size-dependent
+#define maxUnderlineGap 4
+
+// Max horizontal distance between edge of word and start of underline
+// (in points).
+//~ this should be font-size-dependent
+#define underlineSlack 1
+
+// Max distance between edge of text and edge of link border
+#define hyperlinkSlack 2
+
+//------------------------------------------------------------------------
+// TextUnderline
+//------------------------------------------------------------------------
+
+class TextUnderline {
+public:
+
+ TextUnderline(double x0A, double y0A, double x1A, double y1A)
+ { x0 = x0A; y0 = y0A; x1 = x1A; y1 = y1A; horiz = y0 == y1; }
+ ~TextUnderline() {}
+
+ double x0, y0, x1, y1;
+ GBool horiz;
+};
+
+//------------------------------------------------------------------------
+// TextLink
+//------------------------------------------------------------------------
+
+class TextLink {
+public:
+
+ TextLink(int xMinA, int yMinA, int xMaxA, int yMaxA, Link *linkA)
+ { xMin = xMinA; yMin = yMinA; xMax = xMaxA; yMax = yMaxA; link = linkA; }
+ ~TextLink() {}
+
+ int xMin, yMin, xMax, yMax;
+ Link *link;
+};
+
+//------------------------------------------------------------------------
+// TextFontInfo
+//------------------------------------------------------------------------
+
+TextFontInfo::TextFontInfo(GfxState *state) {
+ gfxFont = state->getFont();
+ if (gfxFont)
+ gfxFont->incRefCnt();
+#if TEXTOUT_WORD_LIST
+ fontName = (gfxFont && gfxFont->getOrigName())
+ ? gfxFont->getOrigName()->copy()
+ : (GooString *)NULL;
+ flags = gfxFont ? gfxFont->getFlags() : 0;
+#endif
+}
+
+TextFontInfo::~TextFontInfo() {
+ if (gfxFont)
+ gfxFont->decRefCnt();
+#if TEXTOUT_WORD_LIST
+ if (fontName) {
+ delete fontName;
+ }
+#endif
+}
+
+GBool TextFontInfo::matches(GfxState *state) {
+ return state->getFont() == gfxFont;
+}
+
+//------------------------------------------------------------------------
+// TextWord
+//------------------------------------------------------------------------
+
+TextWord::TextWord(GfxState *state, int rotA, double x0, double y0,
+ int charPosA, TextFontInfo *fontA, double fontSizeA) {
+ GfxFont *gfxFont;
+ double x, y, ascent, descent;
+
+ rot = rotA;
+ charPos = charPosA;
+ charLen = 0;
+ font = fontA;
+ fontSize = fontSizeA;
+ state->transform(x0, y0, &x, &y);
+ if ((gfxFont = font->gfxFont)) {
+ ascent = gfxFont->getAscent() * fontSize;
+ descent = gfxFont->getDescent() * fontSize;
+ } else {
+ // this means that the PDF file draws text without a current font,
+ // which should never happen
+ ascent = 0.95 * fontSize;
+ descent = -0.35 * fontSize;
+ }
+ switch (rot) {
+ case 0:
+ yMin = y - ascent;
+ yMax = y - descent;
+ if (yMin == yMax) {
+ // this is a sanity check for a case that shouldn't happen -- but
+ // if it does happen, we want to avoid dividing by zero later
+ yMin = y;
+ yMax = y + 1;
+ }
+ base = y;
+ break;
+ case 1:
+ xMin = x + descent;
+ xMax = x + ascent;
+ if (xMin == xMax) {
+ // this is a sanity check for a case that shouldn't happen -- but
+ // if it does happen, we want to avoid dividing by zero later
+ xMin = x;
+ xMax = x + 1;
+ }
+ base = x;
+ break;
+ case 2:
+ yMin = y + descent;
+ yMax = y + ascent;
+ if (yMin == yMax) {
+ // this is a sanity check for a case that shouldn't happen -- but
+ // if it does happen, we want to avoid dividing by zero later
+ yMin = y;
+ yMax = y + 1;
+ }
+ base = y;
+ break;
+ case 3:
+ xMin = x - ascent;
+ xMax = x - descent;
+ if (xMin == xMax) {
+ // this is a sanity check for a case that shouldn't happen -- but
+ // if it does happen, we want to avoid dividing by zero later
+ xMin = x;
+ xMax = x + 1;
+ }
+ base = x;
+ break;
+ }
+ text = NULL;
+ charcode = NULL;
+ edge = NULL;
+ len = size = 0;
+ spaceAfter = gFalse;
+ next = NULL;
+
+#if TEXTOUT_WORD_LIST
+ GfxRGB rgb;
+
+ if ((state->getRender() & 3) == 1) {
+ state->getStrokeRGB(&rgb);
+ } else {
+ state->getFillRGB(&rgb);
+ }
+ colorR = colToDbl(rgb.r);
+ colorG = colToDbl(rgb.g);
+ colorB = colToDbl(rgb.b);
+#endif
+
+ underlined = gFalse;
+ link = NULL;
+}
+
+TextWord::~TextWord() {
+ gfree(text);
+ gfree(charcode);
+ gfree(edge);
+}
+
+void TextWord::addChar(GfxState *state, double x, double y,
+ double dx, double dy, CharCode c, Unicode u) {
+ if (len == size) {
+ size += 16;
+ text = (Unicode *)greallocn(text, size, sizeof(Unicode));
+ charcode = (Unicode *)greallocn(charcode, size, sizeof(CharCode));
+ edge = (double *)greallocn(edge, (size + 1), sizeof(double));
+ }
+ text[len] = u;
+ charcode[len] = c;
+ switch (rot) {
+ case 0:
+ if (len == 0) {
+ xMin = x;
+ }
+ edge[len] = x;
+ xMax = edge[len+1] = x + dx;
+ break;
+ case 1:
+ if (len == 0) {
+ yMin = y;
+ }
+ edge[len] = y;
+ yMax = edge[len+1] = y + dy;
+ break;
+ case 2:
+ if (len == 0) {
+ xMax = x;
+ }
+ edge[len] = x;
+ xMin = edge[len+1] = x + dx;
+ break;
+ case 3:
+ if (len == 0) {
+ yMax = y;
+ }
+ edge[len] = y;
+ yMin = edge[len+1] = y + dy;
+ break;
+ }
+ ++len;
+}
+
+void TextWord::merge(TextWord *word) {
+ int i;
+
+ if (word->xMin < xMin) {
+ xMin = word->xMin;
+ }
+ if (word->yMin < yMin) {
+ yMin = word->yMin;
+ }
+ if (word->xMax > xMax) {
+ xMax = word->xMax;
+ }
+ if (word->yMax > yMax) {
+ yMax = word->yMax;
+ }
+ if (len + word->len > size) {
+ size = len + word->len;
+ text = (Unicode *)greallocn(text, size, sizeof(Unicode));
+ charcode = (CharCode *)greallocn(charcode, (size + 1), sizeof(CharCode));
+ edge = (double *)greallocn(edge, (size + 1), sizeof(double));
+ }
+ for (i = 0; i < word->len; ++i) {
+ text[len + i] = word->text[i];
+ charcode[len + i] = word->charcode[i];
+ edge[len + i] = word->edge[i];
+ }
+ edge[len + word->len] = word->edge[word->len];
+ len += word->len;
+ charLen += word->charLen;
+}
+
+inline int TextWord::primaryCmp(TextWord *word) {
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ cmp = xMin - word->xMin;
+ break;
+ case 1:
+ cmp = yMin - word->yMin;
+ break;
+ case 2:
+ cmp = word->xMax - xMax;
+ break;
+ case 3:
+ cmp = word->yMax - yMax;
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+double TextWord::primaryDelta(TextWord *word) {
+ double delta;
+
+ delta = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ delta = word->xMin - xMax;
+ break;
+ case 1:
+ delta = word->yMin - yMax;
+ break;
+ case 2:
+ delta = xMin - word->xMax;
+ break;
+ case 3:
+ delta = yMin - word->yMax;
+ break;
+ }
+ return delta;
+}
+
+int TextWord::cmpYX(const void *p1, const void *p2) {
+ TextWord *word1 = *(TextWord **)p1;
+ TextWord *word2 = *(TextWord **)p2;
+ double cmp;
+
+ cmp = word1->yMin - word2->yMin;
+ if (cmp == 0) {
+ cmp = word1->xMin - word2->xMin;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+#if TEXTOUT_WORD_LIST
+
+GooString *TextWord::getText() {
+ GooString *s;
+ UnicodeMap *uMap;
+ char buf[8];
+ int n, i;
+
+ s = new GooString();
+ if (!(uMap = globalParams->getTextEncoding())) {
+ return s;
+ }
+ for (i = 0; i < len; ++i) {
+ n = uMap->mapUnicode(text[i], buf, sizeof(buf));
+ s->append(buf, n);
+ }
+ uMap->decRefCnt();
+ return s;
+}
+
+void TextWord::getCharBBox(int charIdx, double *xMinA, double *yMinA,
+ double *xMaxA, double *yMaxA) {
+ if (charIdx < 0 || charIdx >= len) {
+ return;
+ }
+ switch (rot) {
+ case 0:
+ *xMinA = edge[charIdx];
+ *xMaxA = edge[charIdx + 1];
+ *yMinA = yMin;
+ *yMaxA = yMax;
+ break;
+ case 1:
+ *xMinA = xMin;
+ *xMaxA = xMax;
+ *yMinA = edge[charIdx];
+ *yMaxA = edge[charIdx + 1];
+ break;
+ case 2:
+ *xMinA = edge[charIdx + 1];
+ *xMaxA = edge[charIdx];
+ *yMinA = yMin;
+ *yMaxA = yMax;
+ break;
+ case 3:
+ *xMinA = xMin;
+ *xMaxA = xMax;
+ *yMinA = edge[charIdx + 1];
+ *yMaxA = edge[charIdx];
+ break;
+ }
+}
+
+#endif // TEXTOUT_WORD_LIST
+
+//------------------------------------------------------------------------
+// TextPool
+//------------------------------------------------------------------------
+
+TextPool::TextPool() {
+ minBaseIdx = 0;
+ maxBaseIdx = -1;
+ pool = NULL;
+ cursor = NULL;
+ cursorBaseIdx = -1;
+}
+
+TextPool::~TextPool() {
+ int baseIdx;
+ TextWord *word, *word2;
+
+ for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) {
+ for (word = pool[baseIdx - minBaseIdx]; word; word = word2) {
+ word2 = word->next;
+ delete word;
+ }
+ }
+ gfree(pool);
+}
+
+int TextPool::getBaseIdx(double base) {
+ int baseIdx;
+
+ baseIdx = (int)(base / textPoolStep);
+ if (baseIdx < minBaseIdx) {
+ return minBaseIdx;
+ }
+ if (baseIdx > maxBaseIdx) {
+ return maxBaseIdx;
+ }
+ return baseIdx;
+}
+
+void TextPool::addWord(TextWord *word) {
+ TextWord **newPool;
+ int wordBaseIdx, newMinBaseIdx, newMaxBaseIdx, baseIdx;
+ TextWord *w0, *w1;
+
+ // expand the array if needed
+ wordBaseIdx = (int)(word->base / textPoolStep);
+ if (minBaseIdx > maxBaseIdx) {
+ minBaseIdx = wordBaseIdx - 128;
+ maxBaseIdx = wordBaseIdx + 128;
+ pool = (TextWord **)gmallocn(maxBaseIdx - minBaseIdx + 1,
+ sizeof(TextWord *));
+ for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) {
+ pool[baseIdx - minBaseIdx] = NULL;
+ }
+ } else if (wordBaseIdx < minBaseIdx) {
+ newMinBaseIdx = wordBaseIdx - 128;
+ newPool = (TextWord **)gmallocn(maxBaseIdx - newMinBaseIdx + 1,
+ sizeof(TextWord *));
+ for (baseIdx = newMinBaseIdx; baseIdx < minBaseIdx; ++baseIdx) {
+ newPool[baseIdx - newMinBaseIdx] = NULL;
+ }
+ memcpy(&newPool[minBaseIdx - newMinBaseIdx], pool,
+ (maxBaseIdx - minBaseIdx + 1) * sizeof(TextWord *));
+ gfree(pool);
+ pool = newPool;
+ minBaseIdx = newMinBaseIdx;
+ } else if (wordBaseIdx > maxBaseIdx) {
+ newMaxBaseIdx = wordBaseIdx + 128;
+ pool = (TextWord **)greallocn(pool, newMaxBaseIdx - minBaseIdx + 1,
+ sizeof(TextWord *));
+ for (baseIdx = maxBaseIdx + 1; baseIdx <= newMaxBaseIdx; ++baseIdx) {
+ pool[baseIdx - minBaseIdx] = NULL;
+ }
+ maxBaseIdx = newMaxBaseIdx;
+ }
+
+ // insert the new word
+ if (cursor && wordBaseIdx == cursorBaseIdx &&
+ word->primaryCmp(cursor) > 0) {
+ w0 = cursor;
+ w1 = cursor->next;
+ } else {
+ w0 = NULL;
+ w1 = pool[wordBaseIdx - minBaseIdx];
+ }
+ for (; w1 && word->primaryCmp(w1) > 0; w0 = w1, w1 = w1->next) ;
+ word->next = w1;
+ if (w0) {
+ w0->next = word;
+ } else {
+ pool[wordBaseIdx - minBaseIdx] = word;
+ }
+ cursor = word;
+ cursorBaseIdx = wordBaseIdx;
+}
+
+//------------------------------------------------------------------------
+// TextLine
+//------------------------------------------------------------------------
+
+TextLine::TextLine(TextBlock *blkA, int rotA, double baseA) {
+ blk = blkA;
+ rot = rotA;
+ base = baseA;
+ words = lastWord = NULL;
+ text = NULL;
+ edge = NULL;
+ col = NULL;
+ len = 0;
+ convertedLen = 0;
+ hyphenated = gFalse;
+ next = NULL;
+ xMin = yMin = 0;
+ xMax = yMax = -1;
+ normalized = NULL;
+ normalized_len = 0;
+ normalized_idx = NULL;
+}
+
+TextLine::~TextLine() {
+ TextWord *word;
+
+ while (words) {
+ word = words;
+ words = words->next;
+ delete word;
+ }
+ gfree(text);
+ gfree(edge);
+ gfree(col);
+ if (normalized) {
+ gfree(normalized);
+ gfree(normalized_idx);
+ }
+}
+
+void TextLine::addWord(TextWord *word) {
+ if (lastWord) {
+ lastWord->next = word;
+ } else {
+ words = word;
+ }
+ lastWord = word;
+
+ if (xMin > xMax) {
+ xMin = word->xMin;
+ xMax = word->xMax;
+ yMin = word->yMin;
+ yMax = word->yMax;
+ } else {
+ if (word->xMin < xMin) {
+ xMin = word->xMin;
+ }
+ if (word->xMax > xMax) {
+ xMax = word->xMax;
+ }
+ if (word->yMin < yMin) {
+ yMin = word->yMin;
+ }
+ if (word->yMax > yMax) {
+ yMax = word->yMax;
+ }
+ }
+}
+
+double TextLine::primaryDelta(TextLine *line) {
+ double delta;
+
+ delta = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ delta = line->xMin - xMax;
+ break;
+ case 1:
+ delta = line->yMin - yMax;
+ break;
+ case 2:
+ delta = xMin - line->xMax;
+ break;
+ case 3:
+ delta = yMin - line->yMax;
+ break;
+ }
+ return delta;
+}
+
+int TextLine::primaryCmp(TextLine *line) {
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ cmp = xMin - line->xMin;
+ break;
+ case 1:
+ cmp = yMin - line->yMin;
+ break;
+ case 2:
+ cmp = line->xMax - xMax;
+ break;
+ case 3:
+ cmp = line->yMax - yMax;
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextLine::secondaryCmp(TextLine *line) {
+ double cmp;
+
+ cmp = (rot == 0 || rot == 3) ? base - line->base : line->base - base;
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextLine::cmpYX(TextLine *line) {
+ int cmp;
+
+ if ((cmp = secondaryCmp(line))) {
+ return cmp;
+ }
+ return primaryCmp(line);
+}
+
+int TextLine::cmpXY(const void *p1, const void *p2) {
+ TextLine *line1 = *(TextLine **)p1;
+ TextLine *line2 = *(TextLine **)p2;
+ int cmp;
+
+ if ((cmp = line1->primaryCmp(line2))) {
+ return cmp;
+ }
+ return line1->secondaryCmp(line2);
+}
+
+void TextLine::coalesce(UnicodeMap *uMap) {
+ TextWord *word0, *word1;
+ double space, delta, minSpace;
+ GBool isUnicode;
+ char buf[8];
+ int i, j;
+
+ if (words->next) {
+
+ // compute the inter-word space threshold
+ if (words->len > 1 || words->next->len > 1) {
+ minSpace = 0;
+ } else {
+ minSpace = words->primaryDelta(words->next);
+ for (word0 = words->next, word1 = word0->next;
+ word1 && minSpace > 0;
+ word0 = word1, word1 = word0->next) {
+ if (word1->len > 1) {
+ minSpace = 0;
+ }
+ delta = word0->primaryDelta(word1);
+ if (delta < minSpace) {
+ minSpace = delta;
+ }
+ }
+ }
+ if (minSpace <= 0) {
+ space = maxCharSpacing * words->fontSize;
+ } else {
+ space = maxWideCharSpacingMul * minSpace;
+ if (space > maxWideCharSpacing * words->fontSize) {
+ space = maxWideCharSpacing * words->fontSize;
+ }
+ }
+
+ // merge words
+ word0 = words;
+ word1 = words->next;
+ while (word1) {
+ if (word0->primaryDelta(word1) >= space) {
+ word0->spaceAfter = gTrue;
+ word0 = word1;
+ word1 = word1->next;
+ } else if (word0->font == word1->font &&
+ word0->underlined == word1->underlined &&
+ fabs(word0->fontSize - word1->fontSize) <
+ maxWordFontSizeDelta * words->fontSize &&
+ word1->charPos == word0->charPos + word0->charLen) {
+ word0->merge(word1);
+ word0->next = word1->next;
+ delete word1;
+ word1 = word0->next;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+
+ // build the line text
+ isUnicode = uMap ? uMap->isUnicode() : gFalse;
+ len = 0;
+ for (word1 = words; word1; word1 = word1->next) {
+ len += word1->len;
+ if (word1->spaceAfter) {
+ ++len;
+ }
+ }
+ text = (Unicode *)gmallocn(len, sizeof(Unicode));
+ edge = (double *)gmallocn(len + 1, sizeof(double));
+ i = 0;
+ for (word1 = words; word1; word1 = word1->next) {
+ for (j = 0; j < word1->len; ++j) {
+ text[i] = word1->text[j];
+ edge[i] = word1->edge[j];
+ ++i;
+ }
+ edge[i] = word1->edge[word1->len];
+ if (word1->spaceAfter) {
+ text[i] = (Unicode)0x0020;
+ ++i;
+ }
+ }
+
+ // compute convertedLen and set up the col array
+ col = (int *)gmallocn(len + 1, sizeof(int));
+ convertedLen = 0;
+ for (i = 0; i < len; ++i) {
+ col[i] = convertedLen;
+ if (isUnicode) {
+ ++convertedLen;
+ } else if (uMap) {
+ convertedLen += uMap->mapUnicode(text[i], buf, sizeof(buf));
+ }
+ }
+ col[len] = convertedLen;
+
+ // check for hyphen at end of line
+ //~ need to check for other chars used as hyphens
+ hyphenated = text[len - 1] == (Unicode)'-';
+}
+
+//------------------------------------------------------------------------
+// TextLineFrag
+//------------------------------------------------------------------------
+
+class TextLineFrag {
+public:
+
+ TextLine *line; // the line object
+ int start, len; // offset and length of this fragment
+ // (in Unicode chars)
+ double xMin, xMax; // bounding box coordinates
+ double yMin, yMax;
+ double base; // baseline virtual coordinate
+ int col; // first column
+
+ void init(TextLine *lineA, int startA, int lenA);
+ void computeCoords(GBool oneRot);
+
+ static int cmpYXPrimaryRot(const void *p1, const void *p2);
+ static int cmpYXLineRot(const void *p1, const void *p2);
+ static int cmpXYLineRot(const void *p1, const void *p2);
+ static int cmpXYColumnPrimaryRot(const void *p1, const void *p2);
+ static int cmpXYColumnLineRot(const void *p1, const void *p2);
+};
+
+void TextLineFrag::init(TextLine *lineA, int startA, int lenA) {
+ line = lineA;
+ start = startA;
+ len = lenA;
+ col = line->col[start];
+}
+
+void TextLineFrag::computeCoords(GBool oneRot) {
+ TextBlock *blk;
+ double d0, d1, d2, d3, d4;
+
+ if (oneRot) {
+
+ switch (line->rot) {
+ case 0:
+ xMin = line->edge[start];
+ xMax = line->edge[start + len];
+ yMin = line->yMin;
+ yMax = line->yMax;
+ break;
+ case 1:
+ xMin = line->xMin;
+ xMax = line->xMax;
+ yMin = line->edge[start];
+ yMax = line->edge[start + len];
+ break;
+ case 2:
+ xMin = line->edge[start + len];
+ xMax = line->edge[start];
+ yMin = line->yMin;
+ yMax = line->yMax;
+ break;
+ case 3:
+ xMin = line->xMin;
+ xMax = line->xMax;
+ yMin = line->edge[start + len];
+ yMax = line->edge[start];
+ break;
+ }
+ base = line->base;
+
+ } else {
+
+ if (line->rot == 0 && line->blk->page->primaryRot == 0) {
+
+ xMin = line->edge[start];
+ xMax = line->edge[start + len];
+ yMin = line->yMin;
+ yMax = line->yMax;
+ base = line->base;
+
+ } else {
+
+ blk = line->blk;
+ d0 = line->edge[start];
+ d1 = line->edge[start + len];
+ d2 = d3 = d4 = 0; // make gcc happy
+
+ switch (line->rot) {
+ case 0:
+ d2 = line->yMin;
+ d3 = line->yMax;
+ d4 = line->base;
+ d0 = (d0 - blk->xMin) / (blk->xMax - blk->xMin);
+ d1 = (d1 - blk->xMin) / (blk->xMax - blk->xMin);
+ d2 = (d2 - blk->yMin) / (blk->yMax - blk->yMin);
+ d3 = (d3 - blk->yMin) / (blk->yMax - blk->yMin);
+ d4 = (d4 - blk->yMin) / (blk->yMax - blk->yMin);
+ break;
+ case 1:
+ d2 = line->xMax;
+ d3 = line->xMin;
+ d4 = line->base;
+ d0 = (d0 - blk->yMin) / (blk->yMax - blk->yMin);
+ d1 = (d1 - blk->yMin) / (blk->yMax - blk->yMin);
+ d2 = (blk->xMax - d2) / (blk->xMax - blk->xMin);
+ d3 = (blk->xMax - d3) / (blk->xMax - blk->xMin);
+ d4 = (blk->xMax - d4) / (blk->xMax - blk->xMin);
+ break;
+ case 2:
+ d2 = line->yMax;
+ d3 = line->yMin;
+ d4 = line->base;
+ d0 = (blk->xMax - d0) / (blk->xMax - blk->xMin);
+ d1 = (blk->xMax - d1) / (blk->xMax - blk->xMin);
+ d2 = (blk->yMax - d2) / (blk->yMax - blk->yMin);
+ d3 = (blk->yMax - d3) / (blk->yMax - blk->yMin);
+ d4 = (blk->yMax - d4) / (blk->yMax - blk->yMin);
+ break;
+ case 3:
+ d2 = line->xMin;
+ d3 = line->xMax;
+ d4 = line->base;
+ d0 = (blk->yMax - d0) / (blk->yMax - blk->yMin);
+ d1 = (blk->yMax - d1) / (blk->yMax - blk->yMin);
+ d2 = (d2 - blk->xMin) / (blk->xMax - blk->xMin);
+ d3 = (d3 - blk->xMin) / (blk->xMax - blk->xMin);
+ d4 = (d4 - blk->xMin) / (blk->xMax - blk->xMin);
+ break;
+ }
+
+ switch (line->blk->page->primaryRot) {
+ case 0:
+ xMin = blk->xMin + d0 * (blk->xMax - blk->xMin);
+ xMax = blk->xMin + d1 * (blk->xMax - blk->xMin);
+ yMin = blk->yMin + d2 * (blk->yMax - blk->yMin);
+ yMax = blk->yMin + d3 * (blk->yMax - blk->yMin);
+ base = blk->yMin + base * (blk->yMax - blk->yMin);
+ break;
+ case 1:
+ xMin = blk->xMax - d3 * (blk->xMax - blk->xMin);
+ xMax = blk->xMax - d2 * (blk->xMax - blk->xMin);
+ yMin = blk->yMin + d0 * (blk->yMax - blk->yMin);
+ yMax = blk->yMin + d1 * (blk->yMax - blk->yMin);
+ base = blk->xMax - d4 * (blk->xMax - blk->xMin);
+ break;
+ case 2:
+ xMin = blk->xMax - d1 * (blk->xMax - blk->xMin);
+ xMax = blk->xMax - d0 * (blk->xMax - blk->xMin);
+ yMin = blk->yMax - d3 * (blk->yMax - blk->yMin);
+ yMax = blk->yMax - d2 * (blk->yMax - blk->yMin);
+ base = blk->yMax - d4 * (blk->yMax - blk->yMin);
+ break;
+ case 3:
+ xMin = blk->xMin + d2 * (blk->xMax - blk->xMin);
+ xMax = blk->xMin + d3 * (blk->xMax - blk->xMin);
+ yMin = blk->yMax - d1 * (blk->yMax - blk->yMin);
+ yMax = blk->yMax - d0 * (blk->yMax - blk->yMin);
+ base = blk->xMin + d4 * (blk->xMax - blk->xMin);
+ break;
+ }
+
+ }
+ }
+}
+
+int TextLineFrag::cmpYXPrimaryRot(const void *p1, const void *p2) {
+ TextLineFrag *frag1 = (TextLineFrag *)p1;
+ TextLineFrag *frag2 = (TextLineFrag *)p2;
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (frag1->line->blk->page->primaryRot) {
+ case 0:
+ if (fabs(cmp = frag1->yMin - frag2->yMin) < 0.01) {
+ cmp = frag1->xMin - frag2->xMin;
+ }
+ break;
+ case 1:
+ if (fabs(cmp = frag2->xMax - frag1->xMax) < 0.01) {
+ cmp = frag1->yMin - frag2->yMin;
+ }
+ break;
+ case 2:
+ if (fabs(cmp = frag2->yMin - frag1->yMin) < 0.01) {
+ cmp = frag2->xMax - frag1->xMax;
+ }
+ break;
+ case 3:
+ if (fabs(cmp = frag1->xMax - frag2->xMax) < 0.01) {
+ cmp = frag2->yMax - frag1->yMax;
+ }
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextLineFrag::cmpYXLineRot(const void *p1, const void *p2) {
+ TextLineFrag *frag1 = (TextLineFrag *)p1;
+ TextLineFrag *frag2 = (TextLineFrag *)p2;
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (frag1->line->rot) {
+ case 0:
+ if ((cmp = frag1->yMin - frag2->yMin) == 0) {
+ cmp = frag1->xMin - frag2->xMin;
+ }
+ break;
+ case 1:
+ if ((cmp = frag2->xMax - frag1->xMax) == 0) {
+ cmp = frag1->yMin - frag2->yMin;
+ }
+ break;
+ case 2:
+ if ((cmp = frag2->yMin - frag1->yMin) == 0) {
+ cmp = frag2->xMax - frag1->xMax;
+ }
+ break;
+ case 3:
+ if ((cmp = frag1->xMax - frag2->xMax) == 0) {
+ cmp = frag2->yMax - frag1->yMax;
+ }
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextLineFrag::cmpXYLineRot(const void *p1, const void *p2) {
+ TextLineFrag *frag1 = (TextLineFrag *)p1;
+ TextLineFrag *frag2 = (TextLineFrag *)p2;
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (frag1->line->rot) {
+ case 0:
+ if ((cmp = frag1->xMin - frag2->xMin) == 0) {
+ cmp = frag1->yMin - frag2->yMin;
+ }
+ break;
+ case 1:
+ if ((cmp = frag1->yMin - frag2->yMin) == 0) {
+ cmp = frag2->xMax - frag1->xMax;
+ }
+ break;
+ case 2:
+ if ((cmp = frag2->xMax - frag1->xMax) == 0) {
+ cmp = frag2->yMin - frag1->yMin;
+ }
+ break;
+ case 3:
+ if ((cmp = frag2->yMax - frag1->yMax) == 0) {
+ cmp = frag1->xMax - frag2->xMax;
+ }
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextLineFrag::cmpXYColumnPrimaryRot(const void *p1, const void *p2) {
+ TextLineFrag *frag1 = (TextLineFrag *)p1;
+ TextLineFrag *frag2 = (TextLineFrag *)p2;
+ double cmp;
+
+ // if columns overlap, compare y values
+ if (frag1->col < frag2->col + (frag2->line->col[frag2->start + frag2->len] -
+ frag2->line->col[frag2->start]) &&
+ frag2->col < frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start])) {
+ cmp = 0; // make gcc happy
+ switch (frag1->line->blk->page->primaryRot) {
+ case 0: cmp = frag1->yMin - frag2->yMin; break;
+ case 1: cmp = frag2->xMax - frag1->xMax; break;
+ case 2: cmp = frag2->yMin - frag1->yMin; break;
+ case 3: cmp = frag1->xMax - frag2->xMax; break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+ }
+
+ // otherwise, compare starting column
+ return frag1->col - frag2->col;
+}
+
+int TextLineFrag::cmpXYColumnLineRot(const void *p1, const void *p2) {
+ TextLineFrag *frag1 = (TextLineFrag *)p1;
+ TextLineFrag *frag2 = (TextLineFrag *)p2;
+ double cmp;
+
+ // if columns overlap, compare y values
+ if (frag1->col < frag2->col + (frag2->line->col[frag2->start + frag2->len] -
+ frag2->line->col[frag2->start]) &&
+ frag2->col < frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start])) {
+ cmp = 0; // make gcc happy
+ switch (frag1->line->rot) {
+ case 0: cmp = frag1->yMin - frag2->yMin; break;
+ case 1: cmp = frag2->xMax - frag1->xMax; break;
+ case 2: cmp = frag2->yMin - frag1->yMin; break;
+ case 3: cmp = frag1->xMax - frag2->xMax; break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+ }
+
+ // otherwise, compare starting column
+ return frag1->col - frag2->col;
+}
+
+//------------------------------------------------------------------------
+// TextBlock
+//------------------------------------------------------------------------
+
+TextBlock::TextBlock(TextPage *pageA, int rotA) {
+ page = pageA;
+ rot = rotA;
+ xMin = yMin = 0;
+ xMax = yMax = -1;
+ priMin = 0;
+ priMax = page->pageWidth;
+ pool = new TextPool();
+ lines = NULL;
+ curLine = NULL;
+ next = NULL;
+ stackNext = NULL;
+}
+
+TextBlock::~TextBlock() {
+ TextLine *line;
+
+ delete pool;
+ while (lines) {
+ line = lines;
+ lines = lines->next;
+ delete line;
+ }
+}
+
+void TextBlock::addWord(TextWord *word) {
+ pool->addWord(word);
+ if (xMin > xMax) {
+ xMin = word->xMin;
+ xMax = word->xMax;
+ yMin = word->yMin;
+ yMax = word->yMax;
+ } else {
+ if (word->xMin < xMin) {
+ xMin = word->xMin;
+ }
+ if (word->xMax > xMax) {
+ xMax = word->xMax;
+ }
+ if (word->yMin < yMin) {
+ yMin = word->yMin;
+ }
+ if (word->yMax > yMax) {
+ yMax = word->yMax;
+ }
+ }
+}
+
+void TextBlock::coalesce(UnicodeMap *uMap) {
+ TextWord *word0, *word1, *word2, *bestWord0, *bestWord1, *lastWord;
+ TextLine *line, *line0, *line1;
+ int poolMinBaseIdx, startBaseIdx, minBaseIdx, maxBaseIdx;
+ int baseIdx, bestWordBaseIdx, idx0, idx1;
+ double minBase, maxBase;
+ double fontSize, delta, priDelta, secDelta;
+ TextLine **lineArray;
+ GBool found;
+ int col1, col2;
+ int i, j, k;
+
+ // discard duplicated text (fake boldface, drop shadows)
+ for (idx0 = pool->minBaseIdx; idx0 <= pool->maxBaseIdx; ++idx0) {
+ word0 = pool->getPool(idx0);
+ while (word0) {
+ priDelta = dupMaxPriDelta * word0->fontSize;
+ secDelta = dupMaxSecDelta * word0->fontSize;
+ if (rot == 0 || rot == 3) {
+ maxBaseIdx = pool->getBaseIdx(word0->base + secDelta);
+ } else {
+ maxBaseIdx = pool->getBaseIdx(word0->base - secDelta);
+ }
+ found = gFalse;
+ word1 = word2 = NULL; // make gcc happy
+ for (idx1 = idx0; idx1 <= maxBaseIdx; ++idx1) {
+ if (idx1 == idx0) {
+ word1 = word0;
+ word2 = word0->next;
+ } else {
+ word1 = NULL;
+ word2 = pool->getPool(idx1);
+ }
+ for (; word2; word1 = word2, word2 = word2->next) {
+ if (word2->len == word0->len &&
+ !memcmp(word2->text, word0->text,
+ word0->len * sizeof(Unicode))) {
+ switch (rot) {
+ case 0:
+ case 2:
+ found = fabs(word0->xMin - word2->xMin) < priDelta &&
+ fabs(word0->xMax - word2->xMax) < priDelta &&
+ fabs(word0->yMin - word2->yMin) < secDelta &&
+ fabs(word0->yMax - word2->yMax) < secDelta;
+ break;
+ case 1:
+ case 3:
+ found = fabs(word0->xMin - word2->xMin) < secDelta &&
+ fabs(word0->xMax - word2->xMax) < secDelta &&
+ fabs(word0->yMin - word2->yMin) < priDelta &&
+ fabs(word0->yMax - word2->yMax) < priDelta;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ if (found) {
+ if (word1) {
+ word1->next = word2->next;
+ } else {
+ pool->setPool(idx1, word2->next);
+ }
+ delete word2;
+ } else {
+ word0 = word0->next;
+ }
+ }
+ }
+
+ // build the lines
+ curLine = NULL;
+ poolMinBaseIdx = pool->minBaseIdx;
+ charCount = 0;
+ nLines = 0;
+ while (1) {
+
+ // find the first non-empty line in the pool
+ for (;
+ poolMinBaseIdx <= pool->maxBaseIdx && !pool->getPool(poolMinBaseIdx);
+ ++poolMinBaseIdx) ;
+ if (poolMinBaseIdx > pool->maxBaseIdx) {
+ break;
+ }
+
+ // look for the left-most word in the first four lines of the
+ // pool -- this avoids starting with a superscript word
+ startBaseIdx = poolMinBaseIdx;
+ for (baseIdx = poolMinBaseIdx + 1;
+ baseIdx < poolMinBaseIdx + 4 && baseIdx <= pool->maxBaseIdx;
+ ++baseIdx) {
+ if (!pool->getPool(baseIdx)) {
+ continue;
+ }
+ if (pool->getPool(baseIdx)->primaryCmp(pool->getPool(startBaseIdx))
+ < 0) {
+ startBaseIdx = baseIdx;
+ }
+ }
+
+ // create a new line
+ word0 = pool->getPool(startBaseIdx);
+ pool->setPool(startBaseIdx, word0->next);
+ word0->next = NULL;
+ line = new TextLine(this, word0->rot, word0->base);
+ line->addWord(word0);
+ lastWord = word0;
+
+ // compute the search range
+ fontSize = word0->fontSize;
+ minBase = word0->base - maxIntraLineDelta * fontSize;
+ maxBase = word0->base + maxIntraLineDelta * fontSize;
+ minBaseIdx = pool->getBaseIdx(minBase);
+ maxBaseIdx = pool->getBaseIdx(maxBase);
+
+ // find the rest of the words in this line
+ while (1) {
+
+ // find the left-most word whose baseline is in the range for
+ // this line
+ bestWordBaseIdx = 0;
+ bestWord0 = bestWord1 = NULL;
+ for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) {
+ for (word0 = NULL, word1 = pool->getPool(baseIdx);
+ word1;
+ word0 = word1, word1 = word1->next) {
+ if (word1->base >= minBase &&
+ word1->base <= maxBase &&
+ (delta = lastWord->primaryDelta(word1)) >=
+ minCharSpacing * fontSize) {
+ if (delta < maxWordSpacing * fontSize &&
+ (!bestWord1 || word1->primaryCmp(bestWord1) < 0)) {
+ bestWordBaseIdx = baseIdx;
+ bestWord0 = word0;
+ bestWord1 = word1;
+ }
+ break;
+ }
+ }
+ }
+ if (!bestWord1) {
+ break;
+ }
+
+ // remove it from the pool, and add it to the line
+ if (bestWord0) {
+ bestWord0->next = bestWord1->next;
+ } else {
+ pool->setPool(bestWordBaseIdx, bestWord1->next);
+ }
+ bestWord1->next = NULL;
+ line->addWord(bestWord1);
+ lastWord = bestWord1;
+ }
+
+ // add the line
+ if (curLine && line->cmpYX(curLine) > 0) {
+ line0 = curLine;
+ line1 = curLine->next;
+ } else {
+ line0 = NULL;
+ line1 = lines;
+ }
+ for (;
+ line1 && line->cmpYX(line1) > 0;
+ line0 = line1, line1 = line1->next) ;
+ if (line0) {
+ line0->next = line;
+ } else {
+ lines = line;
+ }
+ line->next = line1;
+ curLine = line;
+ line->coalesce(uMap);
+ charCount += line->len;
+ ++nLines;
+ }
+
+ // sort lines into xy order for column assignment
+ lineArray = (TextLine **)gmallocn(nLines, sizeof(TextLine *));
+ for (line = lines, i = 0; line; line = line->next, ++i) {
+ lineArray[i] = line;
+ }
+ qsort(lineArray, nLines, sizeof(TextLine *), &TextLine::cmpXY);
+
+ // column assignment
+ nColumns = 0;
+ for (i = 0; i < nLines; ++i) {
+ line0 = lineArray[i];
+ col1 = 0;
+ for (j = 0; j < i; ++j) {
+ line1 = lineArray[j];
+ if (line1->primaryDelta(line0) >= 0) {
+ col2 = line1->col[line1->len] + 1;
+ } else {
+ k = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ for (k = 0;
+ k < line1->len &&
+ line0->xMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]);
+ ++k) ;
+ break;
+ case 1:
+ for (k = 0;
+ k < line1->len &&
+ line0->yMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]);
+ ++k) ;
+ break;
+ case 2:
+ for (k = 0;
+ k < line1->len &&
+ line0->xMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]);
+ ++k) ;
+ break;
+ case 3:
+ for (k = 0;
+ k < line1->len &&
+ line0->yMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]);
+ ++k) ;
+ break;
+ }
+ col2 = line1->col[k];
+ }
+ if (col2 > col1) {
+ col1 = col2;
+ }
+ }
+ for (k = 0; k <= line0->len; ++k) {
+ line0->col[k] += col1;
+ }
+ if (line0->col[line0->len] > nColumns) {
+ nColumns = line0->col[line0->len];
+ }
+ }
+ gfree(lineArray);
+}
+
+void TextBlock::updatePriMinMax(TextBlock *blk) {
+ double newPriMin, newPriMax;
+ GBool gotPriMin, gotPriMax;
+
+ gotPriMin = gotPriMax = gFalse;
+ newPriMin = newPriMax = 0; // make gcc happy
+ switch (page->primaryRot) {
+ case 0:
+ case 2:
+ if (blk->yMin < yMax && blk->yMax > yMin) {
+ if (blk->xMin < xMin) {
+ newPriMin = blk->xMax;
+ gotPriMin = gTrue;
+ }
+ if (blk->xMax > xMax) {
+ newPriMax = blk->xMin;
+ gotPriMax = gTrue;
+ }
+ }
+ break;
+ case 1:
+ case 3:
+ if (blk->xMin < xMax && blk->xMax > xMin) {
+ if (blk->yMin < yMin) {
+ newPriMin = blk->yMax;
+ gotPriMin = gTrue;
+ }
+ if (blk->yMax > yMax) {
+ newPriMax = blk->yMin;
+ gotPriMax = gTrue;
+ }
+ }
+ break;
+ }
+ if (gotPriMin) {
+ if (newPriMin > xMin) {
+ newPriMin = xMin;
+ }
+ if (newPriMin > priMin) {
+ priMin = newPriMin;
+ }
+ }
+ if (gotPriMax) {
+ if (newPriMax < xMax) {
+ newPriMax = xMax;
+ }
+ if (newPriMax < priMax) {
+ priMax = newPriMax;
+ }
+ }
+}
+
+int TextBlock::cmpXYPrimaryRot(const void *p1, const void *p2) {
+ TextBlock *blk1 = *(TextBlock **)p1;
+ TextBlock *blk2 = *(TextBlock **)p2;
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (blk1->page->primaryRot) {
+ case 0:
+ if ((cmp = blk1->xMin - blk2->xMin) == 0) {
+ cmp = blk1->yMin - blk2->yMin;
+ }
+ break;
+ case 1:
+ if ((cmp = blk1->yMin - blk2->yMin) == 0) {
+ cmp = blk2->xMax - blk1->xMax;
+ }
+ break;
+ case 2:
+ if ((cmp = blk2->xMax - blk1->xMax) == 0) {
+ cmp = blk2->yMin - blk1->yMin;
+ }
+ break;
+ case 3:
+ if ((cmp = blk2->yMax - blk1->yMax) == 0) {
+ cmp = blk1->xMax - blk2->xMax;
+ }
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextBlock::cmpYXPrimaryRot(const void *p1, const void *p2) {
+ TextBlock *blk1 = *(TextBlock **)p1;
+ TextBlock *blk2 = *(TextBlock **)p2;
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (blk1->page->primaryRot) {
+ case 0:
+ if ((cmp = blk1->yMin - blk2->yMin) == 0) {
+ cmp = blk1->xMin - blk2->xMin;
+ }
+ break;
+ case 1:
+ if ((cmp = blk2->xMax - blk1->xMax) == 0) {
+ cmp = blk1->yMin - blk2->yMin;
+ }
+ break;
+ case 2:
+ if ((cmp = blk2->yMin - blk1->yMin) == 0) {
+ cmp = blk2->xMax - blk1->xMax;
+ }
+ break;
+ case 3:
+ if ((cmp = blk1->xMax - blk2->xMax) == 0) {
+ cmp = blk2->yMax - blk1->yMax;
+ }
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+int TextBlock::primaryCmp(TextBlock *blk) {
+ double cmp;
+
+ cmp = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ cmp = xMin - blk->xMin;
+ break;
+ case 1:
+ cmp = yMin - blk->yMin;
+ break;
+ case 2:
+ cmp = blk->xMax - xMax;
+ break;
+ case 3:
+ cmp = blk->yMax - yMax;
+ break;
+ }
+ return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
+
+double TextBlock::secondaryDelta(TextBlock *blk) {
+ double delta;
+
+ delta = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ delta = blk->yMin - yMax;
+ break;
+ case 1:
+ delta = xMin - blk->xMax;
+ break;
+ case 2:
+ delta = yMin - blk->yMax;
+ break;
+ case 3:
+ delta = blk->xMin - xMax;
+ break;
+ }
+ return delta;
+}
+
+GBool TextBlock::isBelow(TextBlock *blk) {
+ GBool below;
+
+ below = gFalse; // make gcc happy
+ switch (page->primaryRot) {
+ case 0:
+ below = xMin >= blk->priMin && xMax <= blk->priMax &&
+ yMin > blk->yMin;
+ break;
+ case 1:
+ below = yMin >= blk->priMin && yMax <= blk->priMax &&
+ xMax < blk->xMax;
+ break;
+ case 2:
+ below = xMin >= blk->priMin && xMax <= blk->priMax &&
+ yMax < blk->yMax;
+ break;
+ case 3:
+ below = yMin >= blk->priMin && yMax <= blk->priMax &&
+ xMin > blk->xMin;
+ break;
+ }
+
+ return below;
+}
+
+//------------------------------------------------------------------------
+// TextFlow
+//------------------------------------------------------------------------
+
+TextFlow::TextFlow(TextPage *pageA, TextBlock *blk) {
+ page = pageA;
+ xMin = blk->xMin;
+ xMax = blk->xMax;
+ yMin = blk->yMin;
+ yMax = blk->yMax;
+ priMin = blk->priMin;
+ priMax = blk->priMax;
+ blocks = lastBlk = blk;
+ next = NULL;
+}
+
+TextFlow::~TextFlow() {
+ TextBlock *blk;
+
+ while (blocks) {
+ blk = blocks;
+ blocks = blocks->next;
+ delete blk;
+ }
+}
+
+void TextFlow::addBlock(TextBlock *blk) {
+ if (lastBlk) {
+ lastBlk->next = blk;
+ } else {
+ blocks = blk;
+ }
+ lastBlk = blk;
+ if (blk->xMin < xMin) {
+ xMin = blk->xMin;
+ }
+ if (blk->xMax > xMax) {
+ xMax = blk->xMax;
+ }
+ if (blk->yMin < yMin) {
+ yMin = blk->yMin;
+ }
+ if (blk->yMax > yMax) {
+ yMax = blk->yMax;
+ }
+}
+
+GBool TextFlow::blockFits(TextBlock *blk, TextBlock *prevBlk) {
+ GBool fits;
+
+ // lower blocks must use smaller fonts
+ if (blk->lines->words->fontSize > lastBlk->lines->words->fontSize) {
+ return gFalse;
+ }
+
+ fits = gFalse; // make gcc happy
+ switch (page->primaryRot) {
+ case 0:
+ fits = blk->xMin >= priMin && blk->xMax <= priMax;
+ break;
+ case 1:
+ fits = blk->yMin >= priMin && blk->yMax <= priMax;
+ break;
+ case 2:
+ fits = blk->xMin >= priMin && blk->xMax <= priMax;
+ break;
+ case 3:
+ fits = blk->yMin >= priMin && blk->yMax <= priMax;
+ break;
+ }
+ return fits;
+}
+
+#if TEXTOUT_WORD_LIST
+
+//------------------------------------------------------------------------
+// TextWordList
+//------------------------------------------------------------------------
+
+TextWordList::TextWordList(TextPage *text, GBool physLayout) {
+ TextFlow *flow;
+ TextBlock *blk;
+ TextLine *line;
+ TextWord *word;
+ TextWord **wordArray;
+ int nWords, i;
+
+ words = new GooList();
+
+ if (text->rawOrder) {
+ for (word = text->rawWords; word; word = word->next) {
+ words->append(word);
+ }
+
+ } else if (physLayout) {
+ // this is inefficient, but it's also the least useful of these
+ // three cases
+ nWords = 0;
+ for (flow = text->flows; flow; flow = flow->next) {
+ for (blk = flow->blocks; blk; blk = blk->next) {
+ for (line = blk->lines; line; line = line->next) {
+ for (word = line->words; word; word = word->next) {
+ ++nWords;
+ }
+ }
+ }
+ }
+ wordArray = (TextWord **)gmallocn(nWords, sizeof(TextWord *));
+ i = 0;
+ for (flow = text->flows; flow; flow = flow->next) {
+ for (blk = flow->blocks; blk; blk = blk->next) {
+ for (line = blk->lines; line; line = line->next) {
+ for (word = line->words; word; word = word->next) {
+ wordArray[i++] = word;
+ }
+ }
+ }
+ }
+ qsort(wordArray, nWords, sizeof(TextWord *), &TextWord::cmpYX);
+ for (i = 0; i < nWords; ++i) {
+ words->append(wordArray[i]);
+ }
+ gfree(wordArray);
+
+ } else {
+ for (flow = text->flows; flow; flow = flow->next) {
+ for (blk = flow->blocks; blk; blk = blk->next) {
+ for (line = blk->lines; line; line = line->next) {
+ for (word = line->words; word; word = word->next) {
+ words->append(word);
+ }
+ }
+ }
+ }
+ }
+}
+
+TextWordList::~TextWordList() {
+ delete words;
+}
+
+int TextWordList::getLength() {
+ return words->getLength();
+}
+
+TextWord *TextWordList::get(int idx) {
+ if (idx < 0 || idx >= words->getLength()) {
+ return NULL;
+ }
+ return (TextWord *)words->get(idx);
+}
+
+#endif // TEXTOUT_WORD_LIST
+
+//------------------------------------------------------------------------
+// TextPage
+//------------------------------------------------------------------------
+
+TextPage::TextPage(GBool rawOrderA) {
+ int rot;
+
+ refCnt = 1;
+ rawOrder = rawOrderA;
+ curWord = NULL;
+ charPos = 0;
+ curFont = NULL;
+ curFontSize = 0;
+ nest = 0;
+ nTinyChars = 0;
+ lastCharOverlap = gFalse;
+ if (!rawOrder) {
+ for (rot = 0; rot < 4; ++rot) {
+ pools[rot] = new TextPool();
+ }
+ }
+ flows = NULL;
+ blocks = NULL;
+ rawWords = NULL;
+ rawLastWord = NULL;
+ fonts = new GooList();
+ lastFindXMin = lastFindYMin = 0;
+ haveLastFind = gFalse;
+ underlines = new GooList();
+ links = new GooList();
+}
+
+TextPage::~TextPage() {
+ int rot;
+
+ clear();
+ if (!rawOrder) {
+ for (rot = 0; rot < 4; ++rot) {
+ delete pools[rot];
+ }
+ }
+ delete fonts;
+ deleteGooList(underlines, TextUnderline);
+ deleteGooList(links, TextLink);
+}
+
+void TextPage::incRefCnt() {
+ refCnt++;
+}
+
+void TextPage::decRefCnt() {
+ if (--refCnt == 0)
+ delete this;
+}
+
+void TextPage::startPage(GfxState *state) {
+ clear();
+ if (state) {
+ pageWidth = state->getPageWidth();
+ pageHeight = state->getPageHeight();
+ } else {
+ pageWidth = pageHeight = 0;
+ }
+}
+
+void TextPage::endPage() {
+ if (curWord) {
+ endWord();
+ }
+}
+
+void TextPage::clear() {
+ int rot;
+ TextFlow *flow;
+ TextWord *word;
+
+ if (curWord) {
+ delete curWord;
+ curWord = NULL;
+ }
+ if (rawOrder) {
+ while (rawWords) {
+ word = rawWords;
+ rawWords = rawWords->next;
+ delete word;
+ }
+ } else {
+ for (rot = 0; rot < 4; ++rot) {
+ delete pools[rot];
+ }
+ while (flows) {
+ flow = flows;
+ flows = flows->next;
+ delete flow;
+ }
+ gfree(blocks);
+ }
+ deleteGooList(fonts, TextFontInfo);
+
+ curWord = NULL;
+ charPos = 0;
+ curFont = NULL;
+ curFontSize = 0;
+ nest = 0;
+ nTinyChars = 0;
+ if (!rawOrder) {
+ for (rot = 0; rot < 4; ++rot) {
+ pools[rot] = new TextPool();
+ }
+ }
+ flows = NULL;
+ blocks = NULL;
+ rawWords = NULL;
+ rawLastWord = NULL;
+ fonts = new GooList();
+}
+
+void TextPage::updateFont(GfxState *state) {
+ GfxFont *gfxFont;
+ double *fm;
+ char *name;
+ int code, mCode, letterCode, anyCode;
+ double w;
+ int i;
+
+ // get the font info object
+ curFont = NULL;
+ for (i = 0; i < fonts->getLength(); ++i) {
+ curFont = (TextFontInfo *)fonts->get(i);
+ if (curFont->matches(state)) {
+ break;
+ }
+ curFont = NULL;
+ }
+ if (!curFont) {
+ curFont = new TextFontInfo(state);
+ fonts->append(curFont);
+ }
+
+ // adjust the font size
+ gfxFont = state->getFont();
+ curFontSize = state->getTransformedFontSize();
+ if (gfxFont && gfxFont->getType() == fontType3) {
+ // This is a hack which makes it possible to deal with some Type 3
+ // fonts. The problem is that it's impossible to know what the
+ // base coordinate system used in the font is without actually
+ // rendering the font. This code tries to guess by looking at the
+ // width of the character 'm' (which breaks if the font is a
+ // subset that doesn't contain 'm').
+ mCode = letterCode = anyCode = -1;
+ for (code = 0; code < 256; ++code) {
+ name = ((Gfx8BitFont *)gfxFont)->getCharName(code);
+ if (name && name[0] == 'm' && name[1] == '\0') {
+ mCode = code;
+ }
+ if (letterCode < 0 && name && name[1] == '\0' &&
+ ((name[0] >= 'A' && name[0] <= 'Z') ||
+ (name[0] >= 'a' && name[0] <= 'z'))) {
+ letterCode = code;
+ }
+ if (anyCode < 0 && name &&
+ ((Gfx8BitFont *)gfxFont)->getWidth(code) > 0) {
+ anyCode = code;
+ }
+ }
+ if (mCode >= 0 &&
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth(mCode)) > 0) {
+ // 0.6 is a generic average 'm' width -- yes, this is a hack
+ curFontSize *= w / 0.6;
+ } else if (letterCode >= 0 &&
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth(letterCode)) > 0) {
+ // even more of a hack: 0.5 is a generic letter width
+ curFontSize *= w / 0.5;
+ } else if (anyCode >= 0 &&
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth(anyCode)) > 0) {
+ // better than nothing: 0.5 is a generic character width
+ curFontSize *= w / 0.5;
+ }
+ fm = gfxFont->getFontMatrix();
+ if (fm[0] != 0) {
+ curFontSize *= fabs(fm[3] / fm[0]);
+ }
+ }
+}
+
+void TextPage::beginWord(GfxState *state, double x0, double y0) {
+ GfxFont *gfxFont;
+ double *fontm;
+ double m[4], m2[4];
+ int rot;
+
+ // This check is needed because Type 3 characters can contain
+ // text-drawing operations (when TextPage is being used via
+ // {X,Win}SplashOutputDev rather than TextOutputDev).
+ if (curWord) {
+ ++nest;
+ return;
+ }
+
+ // compute the rotation
+ state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]);
+ gfxFont = state->getFont();
+ if (gfxFont && gfxFont->getType() == fontType3) {
+ fontm = state->getFont()->getFontMatrix();
+ m2[0] = fontm[0] * m[0] + fontm[1] * m[2];
+ m2[1] = fontm[0] * m[1] + fontm[1] * m[3];
+ m2[2] = fontm[2] * m[0] + fontm[3] * m[2];
+ m2[3] = fontm[2] * m[1] + fontm[3] * m[3];
+ m[0] = m2[0];
+ m[1] = m2[1];
+ m[2] = m2[2];
+ m[3] = m2[3];
+ }
+ if (fabs(m[0] * m[3]) > fabs(m[1] * m[2])) {
+ rot = (m[3] < 0) ? 0 : 2;
+ } else {
+ rot = (m[2] > 0) ? 1 : 3;
+ }
+
+ curWord = new TextWord(state, rot, x0, y0, charPos, curFont, curFontSize);
+}
+
+void TextPage::addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode c, int nBytes, Unicode *u, int uLen) {
+ double x1, y1, w1, h1, dx2, dy2, base, sp, delta;
+ GBool overlap;
+ int i;
+
+ // subtract char and word spacing from the dx,dy values
+ sp = state->getCharSpace();
+ if (c == (CharCode)0x20) {
+ sp += state->getWordSpace();
+ }
+ state->textTransformDelta(sp * state->getHorizScaling(), 0, &dx2, &dy2);
+ dx -= dx2;
+ dy -= dy2;
+ state->transformDelta(dx, dy, &w1, &h1);
+
+ // throw away chars that aren't inside the page bounds
+ // (and also do a sanity check on the character size)
+ state->transform(x, y, &x1, &y1);
+ if (x1 + w1 < 0 || x1 > pageWidth ||
+ y1 + h1 < 0 || y1 > pageHeight ||
+ w1 > pageWidth || h1 > pageHeight) {
+ charPos += nBytes;
+ return;
+ }
+
+ // check the tiny chars limit
+ if (!globalParams->getTextKeepTinyChars() &&
+ fabs(w1) < 3 && fabs(h1) < 3) {
+ if (++nTinyChars > 50000) {
+ charPos += nBytes;
+ return;
+ }
+ }
+
+ // break words at space character
+ if (uLen == 1 && u[0] == (Unicode)0x20) {
+ if (curWord) {
+ ++curWord->charLen;
+ }
+ charPos += nBytes;
+ endWord();
+ return;
+ }
+
+ // start a new word if:
+ // (1) this character doesn't fall in the right place relative to
+ // the end of the previous word (this places upper and lower
+ // constraints on the position deltas along both the primary
+ // and secondary axes), or
+ // (2) this character overlaps the previous one (duplicated text), or
+ // (3) the previous character was an overlap (we want each duplicated
+ // character to be in a word by itself at this stage),
+ // (4) the font size has changed
+ if (curWord && curWord->len > 0) {
+ base = sp = delta = 0; // make gcc happy
+ switch (curWord->rot) {
+ case 0:
+ base = y1;
+ sp = x1 - curWord->xMax;
+ delta = x1 - curWord->edge[curWord->len - 1];
+ break;
+ case 1:
+ base = x1;
+ sp = y1 - curWord->yMax;
+ delta = y1 - curWord->edge[curWord->len - 1];
+ break;
+ case 2:
+ base = y1;
+ sp = curWord->xMin - x1;
+ delta = curWord->edge[curWord->len - 1] - x1;
+ break;
+ case 3:
+ base = x1;
+ sp = curWord->yMin - y1;
+ delta = curWord->edge[curWord->len - 1] - y1;
+ break;
+ }
+ overlap = fabs(delta) < dupMaxPriDelta * curWord->fontSize &&
+ fabs(base - curWord->base) < dupMaxSecDelta * curWord->fontSize;
+ if (overlap || lastCharOverlap ||
+ sp < -minDupBreakOverlap * curWord->fontSize ||
+ sp > minWordBreakSpace * curWord->fontSize ||
+ fabs(base - curWord->base) > 0.5 ||
+ curFontSize != curWord->fontSize) {
+ endWord();
+ }
+ lastCharOverlap = overlap;
+ } else {
+ lastCharOverlap = gFalse;
+ }
+
+ if (uLen != 0) {
+ // start a new word if needed
+ if (!curWord) {
+ beginWord(state, x, y);
+ }
+
+ // page rotation and/or transform matrices can cause text to be
+ // drawn in reverse order -- in this case, swap the begin/end
+ // coordinates and break text into individual chars
+ if ((curWord->rot == 0 && w1 < 0) ||
+ (curWord->rot == 1 && h1 < 0) ||
+ (curWord->rot == 2 && w1 > 0) ||
+ (curWord->rot == 3 && h1 > 0)) {
+ endWord();
+ beginWord(state, x + dx, y + dy);
+ x1 += w1;
+ y1 += h1;
+ w1 = -w1;
+ h1 = -h1;
+ }
+
+ // add the characters to the current word
+ w1 /= uLen;
+ h1 /= uLen;
+ for (i = 0; i < uLen; ++i) {
+ if (u[i] >= 0xd800 && u[i] < 0xdc00) { /* surrogate pair */
+ if (i + 1 < uLen && u[i+1] >= 0xdc00 && u[i+1] < 0xe000) {
+ /* next code is a low surrogate */
+ Unicode uu = (((u[i] & 0x3ff) << 10) | (u[i+1] & 0x3ff)) + 0x10000;
+ i++;
+ curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, uu);
+ } else {
+ /* missing low surrogate
+ replace it with REPLACEMENT CHARACTER (U+FFFD) */
+ curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, 0xfffd);
+ }
+ } else if (u[i] >= 0xdc00 && u[i] < 0xe000) {
+ /* invalid low surrogate
+ replace it with REPLACEMENT CHARACTER (U+FFFD) */
+ curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, 0xfffd);
+ } else {
+ curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, u[i]);
+ }
+ }
+ }
+ if (curWord) {
+ curWord->charLen += nBytes;
+ }
+ charPos += nBytes;
+}
+
+void TextPage::endWord() {
+ // This check is needed because Type 3 characters can contain
+ // text-drawing operations (when TextPage is being used via
+ // {X,Win}SplashOutputDev rather than TextOutputDev).
+ if (nest > 0) {
+ --nest;
+ return;
+ }
+
+ if (curWord) {
+ addWord(curWord);
+ curWord = NULL;
+ }
+}
+
+void TextPage::addWord(TextWord *word) {
+ // throw away zero-length words -- they don't have valid xMin/xMax
+ // values, and they're useless anyway
+ if (word->len == 0) {
+ delete word;
+ return;
+ }
+
+ if (rawOrder) {
+ if (rawLastWord) {
+ rawLastWord->next = word;
+ } else {
+ rawWords = word;
+ }
+ rawLastWord = word;
+ } else {
+ pools[word->rot]->addWord(word);
+ }
+}
+
+void TextPage::addUnderline(double x0, double y0, double x1, double y1) {
+ underlines->append(new TextUnderline(x0, y0, x1, y1));
+}
+
+void TextPage::addLink(int xMin, int yMin, int xMax, int yMax, Link *link) {
+ links->append(new TextLink(xMin, yMin, xMax, yMax, link));
+}
+
+void TextPage::coalesce(GBool physLayout, GBool doHTML) {
+ UnicodeMap *uMap;
+ TextPool *pool;
+ TextWord *word0, *word1, *word2;
+ TextLine *line;
+ TextBlock *blkList, *blkStack, *blk, *lastBlk, *blk0, *blk1;
+ TextBlock **blkArray;
+ TextFlow *flow, *lastFlow;
+ TextUnderline *underline;
+ TextLink *link;
+ int rot, poolMinBaseIdx, baseIdx, startBaseIdx, endBaseIdx;
+ double minBase, maxBase, newMinBase, newMaxBase;
+ double fontSize, colSpace1, colSpace2, lineSpace, intraLineSpace, blkSpace;
+ GBool found;
+ int count[4];
+ int lrCount;
+ int firstBlkIdx, nBlocksLeft;
+ int col1, col2;
+ int i, j, n;
+
+ if (rawOrder) {
+ primaryRot = 0;
+ primaryLR = gTrue;
+ return;
+ }
+
+ uMap = globalParams->getTextEncoding();
+ blkList = NULL;
+ lastBlk = NULL;
+ nBlocks = 0;
+ primaryRot = -1;
+
+#if 0 // for debugging
+ printf("*** initial words ***\n");
+ for (rot = 0; rot < 4; ++rot) {
+ pool = pools[rot];
+ for (baseIdx = pool->minBaseIdx; baseIdx <= pool->maxBaseIdx; ++baseIdx) {
+ for (word0 = pool->getPool(baseIdx); word0; word0 = word0->next) {
+ printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f rot=%d link=%p '",
+ word0->xMin, word0->xMax, word0->yMin, word0->yMax,
+ word0->base, word0->fontSize, rot*90, word0->link);
+ for (i = 0; i < word0->len; ++i) {
+ fputc(word0->text[i] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ }
+ }
+ printf("\n");
+#endif
+
+#if 0 //~ for debugging
+ for (i = 0; i < underlines->getLength(); ++i) {
+ underline = (TextUnderline *)underlines->get(i);
+ printf("underline: x=%g..%g y=%g..%g horiz=%d\n",
+ underline->x0, underline->x1, underline->y0, underline->y1,
+ underline->horiz);
+ }
+#endif
+
+ if (doHTML) {
+
+ //----- handle underlining
+ for (i = 0; i < underlines->getLength(); ++i) {
+ underline = (TextUnderline *)underlines->get(i);
+ if (underline->horiz) {
+ // rot = 0
+ if (pools[0]->minBaseIdx <= pools[0]->maxBaseIdx) {
+ startBaseIdx = pools[0]->getBaseIdx(underline->y0 + minUnderlineGap);
+ endBaseIdx = pools[0]->getBaseIdx(underline->y0 + maxUnderlineGap);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[0]->getPool(j); word0; word0 = word0->next) {
+ //~ need to check the y value against the word baseline
+ if (underline->x0 < word0->xMin + underlineSlack &&
+ word0->xMax - underlineSlack < underline->x1) {
+ word0->underlined = gTrue;
+ }
+ }
+ }
+ }
+
+ // rot = 2
+ if (pools[2]->minBaseIdx <= pools[2]->maxBaseIdx) {
+ startBaseIdx = pools[2]->getBaseIdx(underline->y0 - maxUnderlineGap);
+ endBaseIdx = pools[2]->getBaseIdx(underline->y0 - minUnderlineGap);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[2]->getPool(j); word0; word0 = word0->next) {
+ if (underline->x0 < word0->xMin + underlineSlack &&
+ word0->xMax - underlineSlack < underline->x1) {
+ word0->underlined = gTrue;
+ }
+ }
+ }
+ }
+ } else {
+ // rot = 1
+ if (pools[1]->minBaseIdx <= pools[1]->maxBaseIdx) {
+ startBaseIdx = pools[1]->getBaseIdx(underline->x0 - maxUnderlineGap);
+ endBaseIdx = pools[1]->getBaseIdx(underline->x0 - minUnderlineGap);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[1]->getPool(j); word0; word0 = word0->next) {
+ if (underline->y0 < word0->yMin + underlineSlack &&
+ word0->yMax - underlineSlack < underline->y1) {
+ word0->underlined = gTrue;
+ }
+ }
+ }
+ }
+
+ // rot = 3
+ if (pools[3]->minBaseIdx <= pools[3]->maxBaseIdx) {
+ startBaseIdx = pools[3]->getBaseIdx(underline->x0 + minUnderlineGap);
+ endBaseIdx = pools[3]->getBaseIdx(underline->x0 + maxUnderlineGap);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[3]->getPool(j); word0; word0 = word0->next) {
+ if (underline->y0 < word0->yMin + underlineSlack &&
+ word0->yMax - underlineSlack < underline->y1) {
+ word0->underlined = gTrue;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //----- handle links
+ for (i = 0; i < links->getLength(); ++i) {
+ link = (TextLink *)links->get(i);
+
+ // rot = 0
+ if (pools[0]->minBaseIdx <= pools[0]->maxBaseIdx) {
+ startBaseIdx = pools[0]->getBaseIdx(link->yMin);
+ endBaseIdx = pools[0]->getBaseIdx(link->yMax);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[0]->getPool(j); word0; word0 = word0->next) {
+ if (link->xMin < word0->xMin + hyperlinkSlack &&
+ word0->xMax - hyperlinkSlack < link->xMax &&
+ link->yMin < word0->yMin + hyperlinkSlack &&
+ word0->yMax - hyperlinkSlack < link->yMax) {
+ word0->link = link->link;
+ }
+ }
+ }
+ }
+
+ // rot = 2
+ if (pools[2]->minBaseIdx <= pools[2]->maxBaseIdx) {
+ startBaseIdx = pools[2]->getBaseIdx(link->yMin);
+ endBaseIdx = pools[2]->getBaseIdx(link->yMax);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[2]->getPool(j); word0; word0 = word0->next) {
+ if (link->xMin < word0->xMin + hyperlinkSlack &&
+ word0->xMax - hyperlinkSlack < link->xMax &&
+ link->yMin < word0->yMin + hyperlinkSlack &&
+ word0->yMax - hyperlinkSlack < link->yMax) {
+ word0->link = link->link;
+ }
+ }
+ }
+ }
+
+ // rot = 1
+ if (pools[1]->minBaseIdx <= pools[1]->maxBaseIdx) {
+ startBaseIdx = pools[1]->getBaseIdx(link->xMin);
+ endBaseIdx = pools[1]->getBaseIdx(link->xMax);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[1]->getPool(j); word0; word0 = word0->next) {
+ if (link->yMin < word0->yMin + hyperlinkSlack &&
+ word0->yMax - hyperlinkSlack < link->yMax &&
+ link->xMin < word0->xMin + hyperlinkSlack &&
+ word0->xMax - hyperlinkSlack < link->xMax) {
+ word0->link = link->link;
+ }
+ }
+ }
+ }
+
+ // rot = 3
+ if (pools[3]->minBaseIdx <= pools[3]->maxBaseIdx) {
+ startBaseIdx = pools[3]->getBaseIdx(link->xMin);
+ endBaseIdx = pools[3]->getBaseIdx(link->xMax);
+ for (j = startBaseIdx; j <= endBaseIdx; ++j) {
+ for (word0 = pools[3]->getPool(j); word0; word0 = word0->next) {
+ if (link->yMin < word0->yMin + hyperlinkSlack &&
+ word0->yMax - hyperlinkSlack < link->yMax &&
+ link->xMin < word0->xMin + hyperlinkSlack &&
+ word0->xMax - hyperlinkSlack < link->xMax) {
+ word0->link = link->link;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //----- assemble the blocks
+
+ //~ add an outer loop for writing mode (vertical text)
+
+ // build blocks for each rotation value
+ for (rot = 0; rot < 4; ++rot) {
+ pool = pools[rot];
+ poolMinBaseIdx = pool->minBaseIdx;
+ count[rot] = 0;
+
+ // add blocks until no more words are left
+ while (1) {
+
+ // find the first non-empty line in the pool
+ for (;
+ poolMinBaseIdx <= pool->maxBaseIdx &&
+ !pool->getPool(poolMinBaseIdx);
+ ++poolMinBaseIdx) ;
+ if (poolMinBaseIdx > pool->maxBaseIdx) {
+ break;
+ }
+
+ // look for the left-most word in the first four lines of the
+ // pool -- this avoids starting with a superscript word
+ startBaseIdx = poolMinBaseIdx;
+ for (baseIdx = poolMinBaseIdx + 1;
+ baseIdx < poolMinBaseIdx + 4 && baseIdx <= pool->maxBaseIdx;
+ ++baseIdx) {
+ if (!pool->getPool(baseIdx)) {
+ continue;
+ }
+ if (pool->getPool(baseIdx)->primaryCmp(pool->getPool(startBaseIdx))
+ < 0) {
+ startBaseIdx = baseIdx;
+ }
+ }
+
+ // create a new block
+ word0 = pool->getPool(startBaseIdx);
+ pool->setPool(startBaseIdx, word0->next);
+ word0->next = NULL;
+ blk = new TextBlock(this, rot);
+ blk->addWord(word0);
+
+ fontSize = word0->fontSize;
+ minBase = maxBase = word0->base;
+ colSpace1 = minColSpacing1 * fontSize;
+ colSpace2 = minColSpacing2 * fontSize;
+ lineSpace = maxLineSpacingDelta * fontSize;
+ intraLineSpace = maxIntraLineDelta * fontSize;
+
+ // add words to the block
+ do {
+ found = gFalse;
+
+ // look for words on the line above the current top edge of
+ // the block
+ newMinBase = minBase;
+ for (baseIdx = pool->getBaseIdx(minBase);
+ baseIdx >= pool->getBaseIdx(minBase - lineSpace);
+ --baseIdx) {
+ word0 = NULL;
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base < minBase &&
+ word1->base >= minBase - lineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMin < blk->xMax && word1->xMax > blk->xMin)
+ : (word1->yMin < blk->yMax && word1->yMax > blk->yMin)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta1 * fontSize) {
+ word2 = word1;
+ if (word0) {
+ word0->next = word1->next;
+ } else {
+ pool->setPool(baseIdx, word1->next);
+ }
+ word1 = word1->next;
+ word2->next = NULL;
+ blk->addWord(word2);
+ found = gTrue;
+ newMinBase = word2->base;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+ minBase = newMinBase;
+
+ // look for words on the line below the current bottom edge of
+ // the block
+ newMaxBase = maxBase;
+ for (baseIdx = pool->getBaseIdx(maxBase);
+ baseIdx <= pool->getBaseIdx(maxBase + lineSpace);
+ ++baseIdx) {
+ word0 = NULL;
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base > maxBase &&
+ word1->base <= maxBase + lineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMin < blk->xMax && word1->xMax > blk->xMin)
+ : (word1->yMin < blk->yMax && word1->yMax > blk->yMin)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta1 * fontSize) {
+ word2 = word1;
+ if (word0) {
+ word0->next = word1->next;
+ } else {
+ pool->setPool(baseIdx, word1->next);
+ }
+ word1 = word1->next;
+ word2->next = NULL;
+ blk->addWord(word2);
+ found = gTrue;
+ newMaxBase = word2->base;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+ maxBase = newMaxBase;
+
+ // look for words that are on lines already in the block, and
+ // that overlap the block horizontally
+ for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace);
+ baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace);
+ ++baseIdx) {
+ word0 = NULL;
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base >= minBase - intraLineSpace &&
+ word1->base <= maxBase + intraLineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMin < blk->xMax + colSpace1 &&
+ word1->xMax > blk->xMin - colSpace1)
+ : (word1->yMin < blk->yMax + colSpace1 &&
+ word1->yMax > blk->yMin - colSpace1)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta2 * fontSize) {
+ word2 = word1;
+ if (word0) {
+ word0->next = word1->next;
+ } else {
+ pool->setPool(baseIdx, word1->next);
+ }
+ word1 = word1->next;
+ word2->next = NULL;
+ blk->addWord(word2);
+ found = gTrue;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+
+ // only check for outlying words (the next two chunks of code)
+ // if we didn't find anything else
+ if (found) {
+ continue;
+ }
+
+ // scan down the left side of the block, looking for words
+ // that are near (but not overlapping) the block; if there are
+ // three or fewer, add them to the block
+ n = 0;
+ for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace);
+ baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace);
+ ++baseIdx) {
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base >= minBase - intraLineSpace &&
+ word1->base <= maxBase + intraLineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMax <= blk->xMin &&
+ word1->xMax > blk->xMin - colSpace2)
+ : (word1->yMax <= blk->yMin &&
+ word1->yMax > blk->yMin - colSpace2)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta3 * fontSize) {
+ ++n;
+ break;
+ }
+ word1 = word1->next;
+ }
+ }
+ if (n > 0 && n <= 3) {
+ for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace);
+ baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace);
+ ++baseIdx) {
+ word0 = NULL;
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base >= minBase - intraLineSpace &&
+ word1->base <= maxBase + intraLineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMax <= blk->xMin &&
+ word1->xMax > blk->xMin - colSpace2)
+ : (word1->yMax <= blk->yMin &&
+ word1->yMax > blk->yMin - colSpace2)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta3 * fontSize) {
+ word2 = word1;
+ if (word0) {
+ word0->next = word1->next;
+ } else {
+ pool->setPool(baseIdx, word1->next);
+ }
+ word1 = word1->next;
+ word2->next = NULL;
+ blk->addWord(word2);
+ if (word2->base < minBase) {
+ minBase = word2->base;
+ } else if (word2->base > maxBase) {
+ maxBase = word2->base;
+ }
+ found = gTrue;
+ break;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+ }
+
+ // scan down the right side of the block, looking for words
+ // that are near (but not overlapping) the block; if there are
+ // three or fewer, add them to the block
+ n = 0;
+ for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace);
+ baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace);
+ ++baseIdx) {
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base >= minBase - intraLineSpace &&
+ word1->base <= maxBase + intraLineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMin >= blk->xMax &&
+ word1->xMin < blk->xMax + colSpace2)
+ : (word1->yMin >= blk->yMax &&
+ word1->yMin < blk->yMax + colSpace2)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta3 * fontSize) {
+ ++n;
+ break;
+ }
+ word1 = word1->next;
+ }
+ }
+ if (n > 0 && n <= 3) {
+ for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace);
+ baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace);
+ ++baseIdx) {
+ word0 = NULL;
+ word1 = pool->getPool(baseIdx);
+ while (word1) {
+ if (word1->base >= minBase - intraLineSpace &&
+ word1->base <= maxBase + intraLineSpace &&
+ ((rot == 0 || rot == 2)
+ ? (word1->xMin >= blk->xMax &&
+ word1->xMin < blk->xMax + colSpace2)
+ : (word1->yMin >= blk->yMax &&
+ word1->yMin < blk->yMax + colSpace2)) &&
+ fabs(word1->fontSize - fontSize) <
+ maxBlockFontSizeDelta3 * fontSize) {
+ word2 = word1;
+ if (word0) {
+ word0->next = word1->next;
+ } else {
+ pool->setPool(baseIdx, word1->next);
+ }
+ word1 = word1->next;
+ word2->next = NULL;
+ blk->addWord(word2);
+ if (word2->base < minBase) {
+ minBase = word2->base;
+ } else if (word2->base > maxBase) {
+ maxBase = word2->base;
+ }
+ found = gTrue;
+ break;
+ } else {
+ word0 = word1;
+ word1 = word1->next;
+ }
+ }
+ }
+ }
+
+ } while (found);
+
+ //~ need to compute the primary writing mode (horiz/vert) in
+ //~ addition to primary rotation
+
+ // coalesce the block, and add it to the list
+ blk->coalesce(uMap);
+ if (lastBlk) {
+ lastBlk->next = blk;
+ } else {
+ blkList = blk;
+ }
+ lastBlk = blk;
+ count[rot] += blk->charCount;
+ if (primaryRot < 0 || count[rot] > count[primaryRot]) {
+ primaryRot = rot;
+ }
+ ++nBlocks;
+ }
+ }
+
+#if 0 // for debugging
+ printf("*** rotation ***\n");
+ for (rot = 0; rot < 4; ++rot) {
+ printf(" %d: %6d\n", rot, count[rot]);
+ }
+ printf(" primary rot = %d\n", primaryRot);
+ printf("\n");
+#endif
+
+#if 0 // for debugging
+ printf("*** blocks ***\n");
+ for (blk = blkList; blk; blk = blk->next) {
+ printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f\n",
+ blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax);
+ for (line = blk->lines; line; line = line->next) {
+ printf(" line: x=%.2f..%.2f y=%.2f..%.2f base=%.2f\n",
+ line->xMin, line->xMax, line->yMin, line->yMax, line->base);
+ for (word0 = line->words; word0; word0 = word0->next) {
+ printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '",
+ word0->xMin, word0->xMax, word0->yMin, word0->yMax,
+ word0->base, word0->fontSize, word0->spaceAfter);
+ for (i = 0; i < word0->len; ++i) {
+ fputc(word0->text[i] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ }
+ }
+ printf("\n");
+#endif
+
+ // determine the primary direction
+ lrCount = 0;
+ for (blk = blkList; blk; blk = blk->next) {
+ for (line = blk->lines; line; line = line->next) {
+ for (word0 = line->words; word0; word0 = word0->next) {
+ for (i = 0; i < word0->len; ++i) {
+ if (unicodeTypeL(word0->text[i])) {
+ ++lrCount;
+ } else if (unicodeTypeR(word0->text[i])) {
+ --lrCount;
+ }
+ }
+ }
+ }
+ }
+ primaryLR = lrCount >= 0;
+
+#if 0 // for debugging
+ printf("*** direction ***\n");
+ printf("lrCount = %d\n", lrCount);
+ printf("primaryLR = %d\n", primaryLR);
+#endif
+
+ //----- column assignment
+
+ // sort blocks into xy order for column assignment
+ if (blocks)
+ gfree (blocks);
+ blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *));
+ for (blk = blkList, i = 0; blk; blk = blk->next, ++i) {
+ blocks[i] = blk;
+ }
+ qsort(blocks, nBlocks, sizeof(TextBlock *), &TextBlock::cmpXYPrimaryRot);
+
+ // column assignment
+ for (i = 0; i < nBlocks; ++i) {
+ blk0 = blocks[i];
+ col1 = 0;
+ for (j = 0; j < i; ++j) {
+ blk1 = blocks[j];
+ col2 = 0; // make gcc happy
+ switch (primaryRot) {
+ case 0:
+ if (blk0->xMin > blk1->xMax) {
+ col2 = blk1->col + blk1->nColumns + 3;
+ } else if (blk1->xMax == blk1->xMin) {
+ col2 = blk1->col;
+ } else {
+ col2 = blk1->col + (int)(((blk0->xMin - blk1->xMin) /
+ (blk1->xMax - blk1->xMin)) *
+ blk1->nColumns);
+ }
+ break;
+ case 1:
+ if (blk0->yMin > blk1->yMax) {
+ col2 = blk1->col + blk1->nColumns + 3;
+ } else if (blk1->yMax == blk1->yMin) {
+ col2 = blk1->col;
+ } else {
+ col2 = blk1->col + (int)(((blk0->yMin - blk1->yMin) /
+ (blk1->yMax - blk1->yMin)) *
+ blk1->nColumns);
+ }
+ break;
+ case 2:
+ if (blk0->xMax < blk1->xMin) {
+ col2 = blk1->col + blk1->nColumns + 3;
+ } else if (blk1->xMin == blk1->xMax) {
+ col2 = blk1->col;
+ } else {
+ col2 = blk1->col + (int)(((blk0->xMax - blk1->xMax) /
+ (blk1->xMin - blk1->xMax)) *
+ blk1->nColumns);
+ }
+ break;
+ case 3:
+ if (blk0->yMax < blk1->yMin) {
+ col2 = blk1->col + blk1->nColumns + 3;
+ } else if (blk1->yMin == blk1->yMax) {
+ col2 = blk1->col;
+ } else {
+ col2 = blk1->col + (int)(((blk0->yMax - blk1->yMax) /
+ (blk1->yMin - blk1->yMax)) *
+ blk1->nColumns);
+ }
+ break;
+ }
+ if (col2 > col1) {
+ col1 = col2;
+ }
+ }
+ blk0->col = col1;
+ for (line = blk0->lines; line; line = line->next) {
+ for (j = 0; j <= line->len; ++j) {
+ line->col[j] += col1;
+ }
+ }
+ }
+
+#if 0 // for debugging
+ printf("*** blocks, after column assignment ***\n");
+ for (blk = blkList; blk; blk = blk->next) {
+ printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f col=%d nCols=%d\n",
+ blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax, blk->col,
+ blk->nColumns);
+ for (line = blk->lines; line; line = line->next) {
+ printf(" line:\n");
+ for (word0 = line->words; word0; word0 = word0->next) {
+ printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '",
+ word0->xMin, word0->xMax, word0->yMin, word0->yMax,
+ word0->base, word0->fontSize, word0->spaceAfter);
+ for (i = 0; i < word0->len; ++i) {
+ fputc(word0->text[i] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ }
+ }
+ printf("\n");
+#endif
+
+ //----- reading order sort
+
+ // sort blocks into yx order (in preparation for reading order sort)
+ qsort(blocks, nBlocks, sizeof(TextBlock *), &TextBlock::cmpYXPrimaryRot);
+
+ // compute space on left and right sides of each block
+ for (i = 0; i < nBlocks; ++i) {
+ blk0 = blocks[i];
+ for (j = 0; j < nBlocks; ++j) {
+ blk1 = blocks[j];
+ if (blk1 != blk0) {
+ blk0->updatePriMinMax(blk1);
+ }
+ }
+ }
+
+#if 0 // for debugging
+ printf("*** blocks, after yx sort ***\n");
+ for (i = 0; i < nBlocks; ++i) {
+ blk = blocks[i];
+ printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f space=%.2f..%.2f\n",
+ blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax,
+ blk->priMin, blk->priMax);
+ for (line = blk->lines; line; line = line->next) {
+ printf(" line:\n");
+ for (word0 = line->words; word0; word0 = word0->next) {
+ printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '",
+ word0->xMin, word0->xMax, word0->yMin, word0->yMax,
+ word0->base, word0->fontSize, word0->spaceAfter);
+ for (j = 0; j < word0->len; ++j) {
+ fputc(word0->text[j] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ }
+ }
+ printf("\n");
+#endif
+
+ // build the flows
+ //~ this needs to be adjusted for writing mode (vertical text)
+ //~ this also needs to account for right-to-left column ordering
+ blkArray = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *));
+ memcpy(blkArray, blocks, nBlocks * sizeof(TextBlock *));
+ while (flows) {
+ flow = flows;
+ flows = flows->next;
+ delete flow;
+ }
+ flows = lastFlow = NULL;
+ firstBlkIdx = 0;
+ nBlocksLeft = nBlocks;
+ while (nBlocksLeft > 0) {
+
+ // find the upper-left-most block
+ for (; !blkArray[firstBlkIdx]; ++firstBlkIdx) ;
+ i = firstBlkIdx;
+ blk = blkArray[i];
+ for (j = firstBlkIdx + 1; j < nBlocks; ++j) {
+ blk1 = blkArray[j];
+ if (blk1) {
+ if (blk && blk->secondaryDelta(blk1) > 0) {
+ break;
+ }
+ if (blk1->primaryCmp(blk) < 0) {
+ i = j;
+ blk = blk1;
+ }
+ }
+ }
+ blkArray[i] = NULL;
+ --nBlocksLeft;
+ blk->next = NULL;
+
+ // create a new flow, starting with the upper-left-most block
+ flow = new TextFlow(this, blk);
+ if (lastFlow) {
+ lastFlow->next = flow;
+ } else {
+ flows = flow;
+ }
+ lastFlow = flow;
+ fontSize = blk->lines->words->fontSize;
+
+ // push the upper-left-most block on the stack
+ blk->stackNext = NULL;
+ blkStack = blk;
+
+ // find the other blocks in this flow
+ while (blkStack) {
+
+ // find the upper-left-most block under (but within
+ // maxBlockSpacing of) the top block on the stack
+ blkSpace = maxBlockSpacing * blkStack->lines->words->fontSize;
+ blk = NULL;
+ i = -1;
+ for (j = firstBlkIdx; j < nBlocks; ++j) {
+ blk1 = blkArray[j];
+ if (blk1) {
+ if (blkStack->secondaryDelta(blk1) > blkSpace) {
+ break;
+ }
+ if (blk && blk->secondaryDelta(blk1) > 0) {
+ break;
+ }
+ if (blk1->isBelow(blkStack) &&
+ (!blk || blk1->primaryCmp(blk) < 0)) {
+ i = j;
+ blk = blk1;
+ }
+ }
+ }
+
+ // if a suitable block was found, add it to the flow and push it
+ // onto the stack
+ if (blk && flow->blockFits(blk, blkStack)) {
+ blkArray[i] = NULL;
+ --nBlocksLeft;
+ blk->next = NULL;
+ flow->addBlock(blk);
+ fontSize = blk->lines->words->fontSize;
+ blk->stackNext = blkStack;
+ blkStack = blk;
+
+ // otherwise (if there is no block under the top block or the
+ // block is not suitable), pop the stack
+ } else {
+ blkStack = blkStack->stackNext;
+ }
+ }
+ }
+ gfree(blkArray);
+
+#if 0 // for debugging
+ printf("*** flows ***\n");
+ for (flow = flows; flow; flow = flow->next) {
+ printf("flow: x=%.2f..%.2f y=%.2f..%.2f pri:%.2f..%.2f\n",
+ flow->xMin, flow->xMax, flow->yMin, flow->yMax,
+ flow->priMin, flow->priMax);
+ for (blk = flow->blocks; blk; blk = blk->next) {
+ printf(" block: rot=%d x=%.2f..%.2f y=%.2f..%.2f pri=%.2f..%.2f\n",
+ blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax,
+ blk->priMin, blk->priMax);
+ for (line = blk->lines; line; line = line->next) {
+ printf(" line:\n");
+ for (word0 = line->words; word0; word0 = word0->next) {
+ printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '",
+ word0->xMin, word0->xMax, word0->yMin, word0->yMax,
+ word0->base, word0->fontSize, word0->spaceAfter);
+ for (i = 0; i < word0->len; ++i) {
+ fputc(word0->text[i] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ }
+ }
+ }
+ printf("\n");
+#endif
+
+ if (uMap) {
+ uMap->decRefCnt();
+ }
+}
+
+GBool TextPage::findText(Unicode *s, int len,
+ GBool startAtTop, GBool stopAtBottom,
+ GBool startAtLast, GBool stopAtLast,
+ GBool caseSensitive, GBool backward,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax) {
+ TextBlock *blk;
+ TextLine *line;
+ Unicode *s2, *txt;
+ Unicode *p;
+ int txtSize, m, i, j, k;
+ double xStart, yStart, xStop, yStop;
+ double xMin0, yMin0, xMax0, yMax0;
+ double xMin1, yMin1, xMax1, yMax1;
+ GBool found;
+
+ //~ needs to handle right-to-left text
+
+ if (rawOrder) {
+ return gFalse;
+ }
+
+ // convert the search string to uppercase
+ if (!caseSensitive) {
+ s2 = unicodeNormalizeNFKC(s, len, &len, NULL);
+ for (i = 0; i < len; ++i) {
+ s2[i] = unicodeToUpper(s2[i]);
+ }
+ } else {
+ s2 = unicodeNormalizeNFKC(s, len, &len, NULL);
+ }
+
+ txt = NULL;
+ txtSize = 0;
+
+ xStart = yStart = xStop = yStop = 0;
+ if (startAtLast && haveLastFind) {
+ xStart = lastFindXMin;
+ yStart = lastFindYMin;
+ } else if (!startAtTop) {
+ xStart = *xMin;
+ yStart = *yMin;
+ }
+ if (stopAtLast && haveLastFind) {
+ xStop = lastFindXMin;
+ yStop = lastFindYMin;
+ } else if (!stopAtBottom) {
+ xStop = *xMax;
+ yStop = *yMax;
+ }
+
+ found = gFalse;
+ xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy
+ xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy
+
+ for (i = backward ? nBlocks - 1 : 0;
+ backward ? i >= 0 : i < nBlocks;
+ i += backward ? -1 : 1) {
+ blk = blocks[i];
+
+ // check: is the block above the top limit?
+ if (!startAtTop && (backward ? blk->yMin > yStart : blk->yMax < yStart)) {
+ continue;
+ }
+
+ // check: is the block below the bottom limit?
+ if (!stopAtBottom && (backward ? blk->yMax < yStop : blk->yMin > yStop)) {
+ break;
+ }
+
+ for (line = blk->lines; line; line = line->next) {
+
+ // check: is the line above the top limit?
+ if (!startAtTop &&
+ (backward ? line->yMin > yStart : line->yMin < yStart)) {
+ continue;
+ }
+
+ // check: is the line below the bottom limit?
+ if (!stopAtBottom &&
+ (backward ? line->yMin < yStop : line->yMin > yStop)) {
+ continue;
+ }
+
+ if (!line->normalized)
+ line->normalized = unicodeNormalizeNFKC(line->text, line->len,
+ &line->normalized_len,
+ &line->normalized_idx);
+ // convert the line to uppercase
+ m = line->normalized_len;
+ if (!caseSensitive) {
+ if (m > txtSize) {
+ txt = (Unicode *)greallocn(txt, m, sizeof(Unicode));
+ txtSize = m;
+ }
+ for (k = 0; k < m; ++k) {
+ txt[k] = unicodeToUpper(line->normalized[k]);
+ }
+ } else {
+ txt = line->normalized;
+ }
+
+ // search each position in this line
+ j = backward ? m - len : 0;
+ p = txt + j;
+ while (backward ? j >= 0 : j <= m - len) {
+
+ // compare the strings
+ for (k = 0; k < len; ++k) {
+ if (p[k] != s2[k]) {
+ break;
+ }
+ }
+
+ // found it
+ if (k == len) {
+ // where s2 matches a subsequence of a compatibility equivalence
+ // decomposition, highlight the entire glyph, since we don't know
+ // the internal layout of subglyph components
+ int normStart = line->normalized_idx[j];
+ int normAfterEnd = line->normalized_idx[j + len - 1] + 1;
+ switch (line->rot) {
+ case 0:
+ xMin1 = line->edge[normStart];
+ xMax1 = line->edge[normAfterEnd];
+ yMin1 = line->yMin;
+ yMax1 = line->yMax;
+ break;
+ case 1:
+ xMin1 = line->xMin;
+ xMax1 = line->xMax;
+ yMin1 = line->edge[normStart];
+ yMax1 = line->edge[normAfterEnd];
+ break;
+ case 2:
+ xMin1 = line->edge[normAfterEnd];
+ xMax1 = line->edge[normStart];
+ yMin1 = line->yMin;
+ yMax1 = line->yMax;
+ break;
+ case 3:
+ xMin1 = line->xMin;
+ xMax1 = line->xMax;
+ yMin1 = line->edge[normAfterEnd];
+ yMax1 = line->edge[normStart];
+ break;
+ }
+ if (backward) {
+ if ((startAtTop ||
+ yMin1 < yStart || (yMin1 == yStart && xMin1 < xStart)) &&
+ (stopAtBottom ||
+ yMin1 > yStop || (yMin1 == yStop && xMin1 > xStop))) {
+ if (!found ||
+ yMin1 > yMin0 || (yMin1 == yMin0 && xMin1 > xMin0)) {
+ xMin0 = xMin1;
+ xMax0 = xMax1;
+ yMin0 = yMin1;
+ yMax0 = yMax1;
+ found = gTrue;
+ }
+ }
+ } else {
+ if ((startAtTop ||
+ yMin1 > yStart || (yMin1 == yStart && xMin1 > xStart)) &&
+ (stopAtBottom ||
+ yMin1 < yStop || (yMin1 == yStop && xMin1 < xStop))) {
+ if (!found ||
+ yMin1 < yMin0 || (yMin1 == yMin0 && xMin1 < xMin0)) {
+ xMin0 = xMin1;
+ xMax0 = xMax1;
+ yMin0 = yMin1;
+ yMax0 = yMax1;
+ found = gTrue;
+ }
+ }
+ }
+ }
+ if (backward) {
+ --j;
+ --p;
+ } else {
+ ++j;
+ ++p;
+ }
+ }
+ }
+ }
+
+ gfree(s2);
+ if (!caseSensitive) {
+ gfree(txt);
+ }
+
+ if (found) {
+ *xMin = xMin0;
+ *xMax = xMax0;
+ *yMin = yMin0;
+ *yMax = yMax0;
+ lastFindXMin = xMin0;
+ lastFindYMin = yMin0;
+ haveLastFind = gTrue;
+ return gTrue;
+ }
+
+ return gFalse;
+}
+
+GooString *TextPage::getText(double xMin, double yMin,
+ double xMax, double yMax) {
+ GooString *s;
+ UnicodeMap *uMap;
+ GBool isUnicode;
+ TextBlock *blk;
+ TextLine *line;
+ TextLineFrag *frags;
+ int nFrags, fragsSize;
+ TextLineFrag *frag;
+ char space[8], eol[16];
+ int spaceLen, eolLen;
+ int lastRot;
+ double x, y, delta;
+ int col, idx0, idx1, i, j;
+ GBool multiLine, oneRot;
+
+ s = new GooString();
+
+ if (rawOrder) {
+ return s;
+ }
+
+ // get the output encoding
+ if (!(uMap = globalParams->getTextEncoding())) {
+ return s;
+ }
+ isUnicode = uMap->isUnicode();
+ spaceLen = uMap->mapUnicode(0x20, space, sizeof(space));
+ eolLen = 0; // make gcc happy
+ switch (globalParams->getTextEOL()) {
+ case eolUnix:
+ eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol));
+ break;
+ case eolDOS:
+ eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
+ eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen);
+ break;
+ case eolMac:
+ eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
+ break;
+ }
+
+ //~ writing mode (horiz/vert)
+
+ // collect the line fragments that are in the rectangle
+ fragsSize = 256;
+ frags = (TextLineFrag *)gmallocn(fragsSize, sizeof(TextLineFrag));
+ nFrags = 0;
+ lastRot = -1;
+ oneRot = gTrue;
+ for (i = 0; i < nBlocks; ++i) {
+ blk = blocks[i];
+ if (xMin < blk->xMax && blk->xMin < xMax &&
+ yMin < blk->yMax && blk->yMin < yMax) {
+ for (line = blk->lines; line; line = line->next) {
+ if (xMin < line->xMax && line->xMin < xMax &&
+ yMin < line->yMax && line->yMin < yMax) {
+ idx0 = idx1 = -1;
+ switch (line->rot) {
+ case 0:
+ y = 0.5 * (line->yMin + line->yMax);
+ if (yMin < y && y < yMax) {
+ j = 0;
+ while (j < line->len) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) > xMin) {
+ idx0 = j;
+ break;
+ }
+ ++j;
+ }
+ j = line->len - 1;
+ while (j >= 0) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) < xMax) {
+ idx1 = j;
+ break;
+ }
+ --j;
+ }
+ }
+ break;
+ case 1:
+ x = 0.5 * (line->xMin + line->xMax);
+ if (xMin < x && x < xMax) {
+ j = 0;
+ while (j < line->len) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) > yMin) {
+ idx0 = j;
+ break;
+ }
+ ++j;
+ }
+ j = line->len - 1;
+ while (j >= 0) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) < yMax) {
+ idx1 = j;
+ break;
+ }
+ --j;
+ }
+ }
+ break;
+ case 2:
+ y = 0.5 * (line->yMin + line->yMax);
+ if (yMin < y && y < yMax) {
+ j = 0;
+ while (j < line->len) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) < xMax) {
+ idx0 = j;
+ break;
+ }
+ ++j;
+ }
+ j = line->len - 1;
+ while (j >= 0) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) > xMin) {
+ idx1 = j;
+ break;
+ }
+ --j;
+ }
+ }
+ break;
+ case 3:
+ x = 0.5 * (line->xMin + line->xMax);
+ if (xMin < x && x < xMax) {
+ j = 0;
+ while (j < line->len) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) < yMax) {
+ idx0 = j;
+ break;
+ }
+ ++j;
+ }
+ j = line->len - 1;
+ while (j >= 0) {
+ if (0.5 * (line->edge[j] + line->edge[j+1]) > yMin) {
+ idx1 = j;
+ break;
+ }
+ --j;
+ }
+ }
+ break;
+ }
+ if (idx0 >= 0 && idx1 >= 0) {
+ if (nFrags == fragsSize) {
+ fragsSize *= 2;
+ frags = (TextLineFrag *)
+ greallocn(frags, fragsSize, sizeof(TextLineFrag));
+ }
+ frags[nFrags].init(line, idx0, idx1 - idx0 + 1);
+ ++nFrags;
+ if (lastRot >= 0 && line->rot != lastRot) {
+ oneRot = gFalse;
+ }
+ lastRot = line->rot;
+ }
+ }
+ }
+ }
+ }
+
+ // sort the fragments and generate the string
+ if (nFrags > 0) {
+
+ for (i = 0; i < nFrags; ++i) {
+ frags[i].computeCoords(oneRot);
+ }
+ assignColumns(frags, nFrags, oneRot);
+
+ // if all lines in the region have the same rotation, use it;
+ // otherwise, use the page's primary rotation
+ if (oneRot) {
+ qsort(frags, nFrags, sizeof(TextLineFrag),
+ &TextLineFrag::cmpYXLineRot);
+ } else {
+ qsort(frags, nFrags, sizeof(TextLineFrag),
+ &TextLineFrag::cmpYXPrimaryRot);
+ }
+ i = 0;
+ while (i < nFrags) {
+ delta = maxIntraLineDelta * frags[i].line->words->fontSize;
+ for (j = i+1;
+ j < nFrags && fabs(frags[j].base - frags[i].base) < delta;
+ ++j) ;
+ qsort(frags + i, j - i, sizeof(TextLineFrag),
+ oneRot ? &TextLineFrag::cmpXYColumnLineRot
+ : &TextLineFrag::cmpXYColumnPrimaryRot);
+ i = j;
+ }
+
+ col = 0;
+ multiLine = gFalse;
+ for (i = 0; i < nFrags; ++i) {
+ frag = &frags[i];
+
+ // insert a return
+ if (frag->col < col ||
+ (i > 0 && fabs(frag->base - frags[i-1].base) >
+ maxIntraLineDelta * frags[i-1].line->words->fontSize)) {
+ s->append(eol, eolLen);
+ col = 0;
+ multiLine = gTrue;
+ }
+
+ // column alignment
+ for (; col < frag->col; ++col) {
+ s->append(space, spaceLen);
+ }
+
+ // get the fragment text
+ col += dumpFragment(frag->line->text + frag->start, frag->len, uMap, s);
+ }
+
+ if (multiLine) {
+ s->append(eol, eolLen);
+ }
+ }
+
+ gfree(frags);
+ uMap->decRefCnt();
+
+ return s;
+}
+
+class TextSelectionVisitor {
+public:
+ TextSelectionVisitor (TextPage *page);
+ virtual ~TextSelectionVisitor () { }
+ virtual void visitBlock (TextBlock *block,
+ TextLine *begin,
+ TextLine *end,
+ PDFRectangle *selection) = 0;
+ virtual void visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection) = 0;
+ virtual void visitWord (TextWord *word, int begin, int end,
+ PDFRectangle *selection) = 0;
+
+protected:
+ TextPage *page;
+};
+
+TextSelectionVisitor::TextSelectionVisitor (TextPage *page)
+ : page(page)
+{
+}
+
+
+class TextSelectionDumper : public TextSelectionVisitor {
+public:
+ TextSelectionDumper(TextPage *page);
+ virtual ~TextSelectionDumper();
+
+ virtual void visitBlock (TextBlock *block,
+ TextLine *begin,
+ TextLine *end,
+ PDFRectangle *selection) { };
+ virtual void visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection);
+ virtual void visitWord (TextWord *word, int begin, int end,
+ PDFRectangle *selection) { };
+
+ GooString *getText(void);
+
+private:
+ TextLineFrag *frags;
+ int nFrags, fragsSize;
+};
+
+TextSelectionDumper::TextSelectionDumper(TextPage *page)
+ : TextSelectionVisitor(page)
+{
+ fragsSize = 256;
+ frags = (TextLineFrag *)gmallocn(fragsSize, sizeof(TextLineFrag));
+ nFrags = 0;
+}
+
+TextSelectionDumper::~TextSelectionDumper()
+{
+ gfree(frags);
+}
+
+void TextSelectionDumper::visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection)
+{
+ if (nFrags == fragsSize) {
+ fragsSize *= 2;
+ frags = (TextLineFrag *) grealloc(frags, fragsSize * sizeof(TextLineFrag));
+ }
+
+ frags[nFrags].init(line, edge_begin, edge_end - edge_begin);
+ ++nFrags;
+
+}
+
+GooString *TextSelectionDumper::getText (void)
+{
+ GBool oneRot = gTrue;
+ GooString *s;
+ TextLineFrag *frag;
+ int i, col;
+ GBool multiLine;
+ UnicodeMap *uMap;
+ char space[8], eol[16];
+ int spaceLen, eolLen;
+
+ s = new GooString();
+
+ uMap = globalParams->getTextEncoding();
+
+ if (uMap == NULL)
+ return s;
+
+ spaceLen = uMap->mapUnicode(0x20, space, sizeof(space));
+ eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol));
+
+ if (nFrags > 0) {
+ for (i = 0; i < nFrags; ++i) {
+ frags[i].computeCoords(oneRot);
+ }
+ page->assignColumns(frags, nFrags, oneRot);
+
+ // if all lines in the region have the same rotation, use it;
+ // otherwise, use the page's primary rotation
+ if (oneRot) {
+ qsort(frags, nFrags, sizeof(TextLineFrag),
+ &TextLineFrag::cmpYXLineRot);
+ } else {
+ qsort(frags, nFrags, sizeof(TextLineFrag),
+ &TextLineFrag::cmpYXPrimaryRot);
+ }
+
+ col = 0;
+ multiLine = gFalse;
+ for (i = 0; i < nFrags; ++i) {
+ frag = &frags[i];
+
+ // insert a return
+ if (frag->col < col ||
+ (i > 0 && fabs(frag->base - frags[i-1].base) >
+ maxIntraLineDelta * frags[i-1].line->words->fontSize)) {
+ s->append(eol, eolLen);
+ col = 0;
+ multiLine = gTrue;
+ }
+
+ // column alignment
+ for (; col < frag->col; ++col) {
+ s->append(space, spaceLen);
+ }
+
+ // get the fragment text
+ col += page->dumpFragment(frag->line->text + frag->start, frag->len, uMap, s);
+ }
+
+ if (multiLine) {
+ s->append(eol, eolLen);
+ }
+ }
+
+ uMap->decRefCnt();
+
+ return s;
+}
+
+class TextSelectionSizer : public TextSelectionVisitor {
+public:
+ TextSelectionSizer(TextPage *page, double scale);
+ ~TextSelectionSizer() { }
+
+ virtual void visitBlock (TextBlock *block,
+ TextLine *begin,
+ TextLine *end,
+ PDFRectangle *selection) { };
+ virtual void visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection);
+ virtual void visitWord (TextWord *word, int begin, int end,
+ PDFRectangle *selection) { };
+
+ GooList *getRegion () { return list; }
+
+private:
+ GooList *list;
+ double scale;
+};
+
+TextSelectionSizer::TextSelectionSizer(TextPage *page, double scale)
+ : TextSelectionVisitor(page),
+ scale(scale)
+{
+ list = new GooList();
+}
+
+void TextSelectionSizer::visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection)
+{
+ PDFRectangle *rect;
+ double x1, y1, x2, y2, margin;
+
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ x2 = line->edge[edge_end];
+ y2 = line->yMax + margin;
+
+ rect = new PDFRectangle (floor (x1 * scale),
+ floor (y1 * scale),
+ ceil (x2 * scale),
+ ceil (y2 * scale));
+ list->append (rect);
+}
+
+
+class TextSelectionPainter : public TextSelectionVisitor {
+public:
+ TextSelectionPainter(TextPage *page,
+ double scale,
+ int rotation,
+ OutputDev *out,
+ GfxColor *box_color,
+ GfxColor *glyph_color);
+ ~TextSelectionPainter();
+
+ virtual void visitBlock (TextBlock *block,
+ TextLine *begin,
+ TextLine *end,
+ PDFRectangle *selection) { };
+ virtual void visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection);
+ virtual void visitWord (TextWord *word, int begin, int end,
+ PDFRectangle *selection);
+
+private:
+ OutputDev *out;
+ GfxColor *box_color, *glyph_color;
+ GfxState *state;
+};
+
+TextSelectionPainter::TextSelectionPainter(TextPage *page,
+ double scale,
+ int rotation,
+ OutputDev *out,
+ GfxColor *box_color,
+ GfxColor *glyph_color)
+ : TextSelectionVisitor(page),
+ out(out),
+ box_color(box_color),
+ glyph_color(glyph_color)
+{
+ PDFRectangle box(0, 0, page->pageWidth, page->pageHeight);
+
+ state = new GfxState(72 * scale, 72 * scale, &box, rotation, gFalse);
+
+ out->startPage (0, state);
+ out->setDefaultCTM (state->getCTM());
+
+ state->setTextMat(1, 0, 0, -1, 0, 0);
+ state->setFillColorSpace(new GfxDeviceRGBColorSpace());
+
+}
+
+TextSelectionPainter::~TextSelectionPainter()
+{
+ out->endPage ();
+
+ delete state;
+}
+
+void TextSelectionPainter::visitLine (TextLine *line,
+ TextWord *begin,
+ TextWord *end,
+ int edge_begin,
+ int edge_end,
+ PDFRectangle *selection)
+{
+ double x1, y1, x2, y2, margin;
+ Matrix ctm, ictm;
+
+ state->setFillColor(box_color);
+ out->updateFillColor(state);
+
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = floor (line->edge[edge_begin]);
+ y1 = floor (line->yMin - margin);
+ x2 = ceil (line->edge[edge_end]);
+ y2 = ceil (line->yMax + margin);
+
+ state->getCTM (&ctm);
+ ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1);
+ ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2);
+
+ x1 = floor (x1);
+ y1 = floor (y1);
+ x2 = ceil (x2);
+ y2 = ceil (y2);
+
+ ctm.invertTo (&ictm);
+ ictm.transform(x1, y1, &x1, &y1);
+ ictm.transform(x2, y2, &x2, &y2);
+
+ state->moveTo(x1, y1);
+ state->lineTo(x2, y1);
+ state->lineTo(x2, y2);
+ state->lineTo(x1, y2);
+ state->closePath();
+
+ out->fill(state);
+ state->clearPath();
+}
+
+void TextSelectionPainter::visitWord (TextWord *word, int begin, int end,
+ PDFRectangle *selection)
+{
+ GooString *string;
+ int i;
+
+ state->setFillColor(glyph_color);
+ out->updateFillColor(state);
+ word->font->gfxFont->incRefCnt();
+ state->setFont(word->font->gfxFont, word->fontSize);
+ out->updateFont(state);
+
+ /* The only purpose of this string is to let the output device query
+ * it's length. Might want to change this interface later. */
+
+ string = new GooString ((char *) word->charcode, end - begin);
+
+ out->beginString(state, string);
+
+ for (i = begin; i < end; i++)
+ out->drawChar(state, word->edge[i], word->base, 0, 0, 0, 0,
+ word->charcode[i], 1, NULL, 0);
+
+ out->endString(state);
+
+ delete string;
+}
+
+void TextWord::visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style)
+{
+ int i, begin, end;
+ double mid;
+
+ begin = len;
+ end = 0;
+ for (i = 0; i < len; i++) {
+ mid = (edge[i] + edge[i + 1]) / 2;
+ if (selection->x1 < mid || selection->x2 < mid)
+ if (i < begin)
+ begin = i;
+ if (mid < selection->x1 || mid < selection->x2)
+ end = i + 1;
+ }
+
+ /* Skip empty selection. */
+ if (end <= begin)
+ return;
+
+ visitor->visitWord (this, begin, end, selection);
+}
+
+void TextLine::visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style) {
+ TextWord *p, *begin, *end, *current;
+ int i, edge_begin, edge_end;
+ PDFRectangle child_selection;
+
+ begin = NULL;
+ end = NULL;
+ current = NULL;
+ for (p = words; p != NULL; p = p->next) {
+ if ((selection->x1 < p->xMax && selection->y1 < p->yMax) ||
+ (selection->x2 < p->xMax && selection->y2 < p->yMax))
+ if (begin == NULL)
+ begin = p;
+ if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
+ (selection->x2 > p->xMin && selection->y2 > p->yMin)) && (begin != NULL)) {
+ end = p->next;
+ current = p;
+ }
+ }
+
+ if (!current)
+ current = begin;
+
+ child_selection = *selection;
+ if (style == selectionStyleWord) {
+ child_selection.x1 = begin ? begin->xMin : xMin;
+ if (end && end->xMax != -1) {
+ child_selection.x2 = current->xMax;
+ } else {
+ child_selection.x2 = xMax;
+ }
+ }
+
+ edge_begin = len;
+ edge_end = 0;
+ for (i = 0; i < len; i++) {
+ double mid = (edge[i] + edge[i + 1]) / 2;
+ if (child_selection.x1 < mid || child_selection.x2 < mid)
+ if (i < edge_begin)
+ edge_begin = i;
+ if (mid < child_selection.x2 || mid < child_selection.x1)
+ edge_end = i + 1;
+ }
+
+ /* Skip empty selection. */
+ if (edge_end <= edge_begin)
+ return;
+
+ visitor->visitLine (this, begin, end, edge_begin, edge_end,
+ &child_selection);
+
+ for (p = begin; p != end; p = p->next)
+ p->visitSelection (visitor, &child_selection, style);
+}
+
+void TextBlock::visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style) {
+ TextLine *p, *begin, *end;
+ PDFRectangle child_selection;
+ double start_x, start_y, stop_x, stop_y;
+
+ begin = NULL;
+ end = NULL;
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+
+ for (p = lines; p != NULL; p = p->next) {
+ if (selection->x1 < p->xMax && selection->y1 < p->yMax &&
+ selection->x2 < p->xMax && selection->y2 < p->yMax && begin == NULL) {
+ begin = p;
+ if (selection->x1 < selection->x2) {
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+ } else {
+ start_x = selection->x2;
+ start_y = selection->y2;
+ stop_x = selection->x1;
+ stop_y = selection->y1;
+ }
+ } else if (selection->x1 < p->xMax && selection->y1 < p->yMax && begin == NULL) {
+ begin = p;
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+ } else if (selection->x2 < p->xMax && selection->y2 < p->yMax && begin == NULL) {
+ begin = p;
+ start_x = selection->x2;
+ start_y = selection->y2;
+ stop_x = selection->x1;
+ stop_y = selection->y1;
+ }
+
+ if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
+ (selection->x2 > p->xMin && selection->y2 > p->yMin))
+ && (begin != NULL))
+ end = p->next;
+ }
+
+ /* Skip empty selection. */
+ if (end == begin)
+ return;
+
+ visitor->visitBlock (this, begin, end, selection);
+
+ for (p = begin; p != end; p = p->next) {
+ if (p == begin && style != selectionStyleLine) {
+ child_selection.x1 = start_x;
+ child_selection.y1 = start_y;
+ } else {
+ child_selection.x1 = 0;
+ child_selection.y1 = 0;
+ }
+ if (p->next == end && style != selectionStyleLine) {
+ child_selection.x2 = stop_x;
+ child_selection.y2 = stop_y;
+ } else {
+ child_selection.x2 = page->pageWidth;
+ child_selection.y2 = page->pageHeight;
+ }
+
+ p->visitSelection(visitor, &child_selection, style);
+ }
+}
+
+void TextPage::visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style)
+{
+ int i, begin, end;
+ PDFRectangle child_selection;
+ double start_x, start_y, stop_x, stop_y;
+ TextBlock *b;
+
+ begin = nBlocks;
+ end = 0;
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+
+ for (i = 0; i < nBlocks; i++) {
+ b = blocks[i];
+
+ if (selection->x1 < b->xMax && selection->y1 < b->yMax &&
+ selection->x2 < b->xMax && selection->y2 < b->yMax && i < begin) {
+ begin = i;
+ if (selection->y1 < selection->y2) {
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+ } else {
+ start_x = selection->x2;
+ start_y = selection->y2;
+ stop_x = selection->x1;
+ stop_y = selection->y1;
+ }
+ } else if (selection->x1 < b->xMax && selection->y1 < b->yMax && i < begin) {
+ begin = i;
+ start_x = selection->x1;
+ start_y = selection->y1;
+ stop_x = selection->x2;
+ stop_y = selection->y2;
+ } else if (selection->x2 < b->xMax && selection->y2 < b->yMax && i < begin) {
+ begin = i;
+ start_x = selection->x2;
+ start_y = selection->y2;
+ stop_x = selection->x1;
+ stop_y = selection->y1;
+ }
+
+ if ((selection->x1 > b->xMin && selection->y1 > b->yMin) ||
+ (selection->x2 > b->xMin && selection->y2 > b->yMin))
+ end = i + 1;
+ }
+
+ for (i = begin; i < end; i++) {
+ if (blocks[i]->xMin < start_x && start_x < blocks[i]->xMax &&
+ blocks[i]->yMin < start_y && start_y < blocks[i]->yMax) {
+ child_selection.x1 = start_x;
+ child_selection.y1 = start_y;
+ } else {
+ child_selection.x1 = 0;
+ child_selection.y1 = 0;
+ }
+ if (blocks[i]->xMin < stop_x && stop_x < blocks[i]->xMax &&
+ blocks[i]->yMin < stop_y && stop_y < blocks[i]->yMax) {
+ child_selection.x2 = stop_x;
+ child_selection.y2 = stop_y;
+ } else {
+ child_selection.x2 = pageWidth;
+ child_selection.y2 = pageHeight;
+ }
+
+ blocks[i]->visitSelection(visitor, &child_selection, style);
+ }
+}
+
+void TextPage::drawSelection(OutputDev *out,
+ double scale,
+ int rotation,
+ PDFRectangle *selection,
+ SelectionStyle style,
+ GfxColor *glyph_color, GfxColor *box_color)
+{
+ TextSelectionPainter painter(this, scale, rotation,
+ out, box_color, glyph_color);
+
+ visitSelection(&painter, selection, style);
+}
+
+GooList *TextPage::getSelectionRegion(PDFRectangle *selection,
+ SelectionStyle style,
+ double scale) {
+ TextSelectionSizer sizer(this, scale);
+
+ visitSelection(&sizer, selection, style);
+
+ return sizer.getRegion();
+}
+
+GooString *TextPage::getSelectionText(PDFRectangle *selection,
+ SelectionStyle style)
+{
+ TextSelectionDumper dumper(this);
+
+ visitSelection(&dumper, selection, style);
+
+ return dumper.getText();
+}
+
+GBool TextPage::findCharRange(int pos, int length,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax) {
+ TextBlock *blk;
+ TextLine *line;
+ TextWord *word;
+ double xMin0, xMax0, yMin0, yMax0;
+ double xMin1, xMax1, yMin1, yMax1;
+ GBool first;
+ int i, j0, j1;
+
+ if (rawOrder) {
+ return gFalse;
+ }
+
+ //~ this doesn't correctly handle:
+ //~ - ranges split across multiple lines (the highlighted region
+ //~ is the bounding box of all the parts of the range)
+ //~ - cases where characters don't convert one-to-one into Unicode
+ first = gTrue;
+ xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy
+ xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy
+ for (i = 0; i < nBlocks; ++i) {
+ blk = blocks[i];
+ for (line = blk->lines; line; line = line->next) {
+ for (word = line->words; word; word = word->next) {
+ if (pos < word->charPos + word->charLen &&
+ word->charPos < pos + length) {
+ j0 = pos - word->charPos;
+ if (j0 < 0) {
+ j0 = 0;
+ }
+ j1 = pos + length - 1 - word->charPos;
+ if (j1 >= word->len) {
+ j1 = word->len - 1;
+ }
+ switch (line->rot) {
+ case 0:
+ xMin1 = word->edge[j0];
+ xMax1 = word->edge[j1 + 1];
+ yMin1 = word->yMin;
+ yMax1 = word->yMax;
+ break;
+ case 1:
+ xMin1 = word->xMin;
+ xMax1 = word->xMax;
+ yMin1 = word->edge[j0];
+ yMax1 = word->edge[j1 + 1];
+ break;
+ case 2:
+ xMin1 = word->edge[j1 + 1];
+ xMax1 = word->edge[j0];
+ yMin1 = word->yMin;
+ yMax1 = word->yMax;
+ break;
+ case 3:
+ xMin1 = word->xMin;
+ xMax1 = word->xMax;
+ yMin1 = word->edge[j1 + 1];
+ yMax1 = word->edge[j0];
+ break;
+ }
+ if (first || xMin1 < xMin0) {
+ xMin0 = xMin1;
+ }
+ if (first || xMax1 > xMax0) {
+ xMax0 = xMax1;
+ }
+ if (first || yMin1 < yMin0) {
+ yMin0 = yMin1;
+ }
+ if (first || yMax1 > yMax0) {
+ yMax0 = yMax1;
+ }
+ first = gFalse;
+ }
+ }
+ }
+ }
+ if (!first) {
+ *xMin = xMin0;
+ *xMax = xMax0;
+ *yMin = yMin0;
+ *yMax = yMax0;
+ return gTrue;
+ }
+ return gFalse;
+}
+
+void TextPage::dump(void *outputStream, TextOutputFunc outputFunc,
+ GBool physLayout) {
+ UnicodeMap *uMap;
+ TextFlow *flow;
+ TextBlock *blk;
+ TextLine *line;
+ TextLineFrag *frags;
+ TextWord *word;
+ int nFrags, fragsSize;
+ TextLineFrag *frag;
+ char space[8], eol[16], eop[8];
+ int spaceLen, eolLen, eopLen;
+ GBool pageBreaks;
+ GooString *s;
+ double delta;
+ int col, i, j, d, n;
+
+ // get the output encoding
+ if (!(uMap = globalParams->getTextEncoding())) {
+ return;
+ }
+ spaceLen = uMap->mapUnicode(0x20, space, sizeof(space));
+ eolLen = 0; // make gcc happy
+ switch (globalParams->getTextEOL()) {
+ case eolUnix:
+ eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol));
+ break;
+ case eolDOS:
+ eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
+ eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen);
+ break;
+ case eolMac:
+ eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
+ break;
+ }
+ eopLen = uMap->mapUnicode(0x0c, eop, sizeof(eop));
+ pageBreaks = globalParams->getTextPageBreaks();
+
+ //~ writing mode (horiz/vert)
+
+ // output the page in raw (content stream) order
+ if (rawOrder) {
+
+ for (word = rawWords; word; word = word->next) {
+ s = new GooString();
+ dumpFragment(word->text, word->len, uMap, s);
+ (*outputFunc)(outputStream, s->getCString(), s->getLength());
+ delete s;
+ if (word->next &&
+ fabs(word->next->base - word->base) <
+ maxIntraLineDelta * word->fontSize) {
+ if (word->next->xMin > word->xMax + minWordSpacing * word->fontSize) {
+ (*outputFunc)(outputStream, space, spaceLen);
+ }
+ } else {
+ (*outputFunc)(outputStream, eol, eolLen);
+ }
+ }
+
+ // output the page, maintaining the original physical layout
+ } else if (physLayout) {
+
+ // collect the line fragments for the page and sort them
+ fragsSize = 256;
+ frags = (TextLineFrag *)gmallocn(fragsSize, sizeof(TextLineFrag));
+ nFrags = 0;
+ for (i = 0; i < nBlocks; ++i) {
+ blk = blocks[i];
+ for (line = blk->lines; line; line = line->next) {
+ if (nFrags == fragsSize) {
+ fragsSize *= 2;
+ frags = (TextLineFrag *)greallocn(frags,
+ fragsSize, sizeof(TextLineFrag));
+ }
+ frags[nFrags].init(line, 0, line->len);
+ frags[nFrags].computeCoords(gTrue);
+ ++nFrags;
+ }
+ }
+ qsort(frags, nFrags, sizeof(TextLineFrag), &TextLineFrag::cmpYXPrimaryRot);
+ i = 0;
+ while (i < nFrags) {
+ delta = maxIntraLineDelta * frags[i].line->words->fontSize;
+ for (j = i+1;
+ j < nFrags && fabs(frags[j].base - frags[i].base) < delta;
+ ++j) ;
+ qsort(frags + i, j - i, sizeof(TextLineFrag),
+ &TextLineFrag::cmpXYColumnPrimaryRot);
+ i = j;
+ }
+
+#if 0 // for debugging
+ printf("*** line fragments ***\n");
+ for (i = 0; i < nFrags; ++i) {
+ frag = &frags[i];
+ printf("frag: x=%.2f..%.2f y=%.2f..%.2f base=%.2f '",
+ frag->xMin, frag->xMax, frag->yMin, frag->yMax, frag->base);
+ for (n = 0; n < frag->len; ++n) {
+ fputc(frag->line->text[frag->start + n] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ printf("\n");
+#endif
+
+ // generate output
+ col = 0;
+ for (i = 0; i < nFrags; ++i) {
+ frag = &frags[i];
+
+ // column alignment
+ for (; col < frag->col; ++col) {
+ (*outputFunc)(outputStream, space, spaceLen);
+ }
+
+ // print the line
+ s = new GooString();
+ col += dumpFragment(frag->line->text + frag->start, frag->len, uMap, s);
+ (*outputFunc)(outputStream, s->getCString(), s->getLength());
+ delete s;
+
+ // print one or more returns if necessary
+ if (i == nFrags - 1 ||
+ frags[i+1].col < col ||
+ fabs(frags[i+1].base - frag->base) >
+ maxIntraLineDelta * frag->line->words->fontSize) {
+ if (i < nFrags - 1) {
+ d = (int)((frags[i+1].base - frag->base) /
+ frag->line->words->fontSize);
+ if (d < 1) {
+ d = 1;
+ } else if (d > 5) {
+ d = 5;
+ }
+ } else {
+ d = 1;
+ }
+ for (; d > 0; --d) {
+ (*outputFunc)(outputStream, eol, eolLen);
+ }
+ col = 0;
+ }
+ }
+
+ gfree(frags);
+
+ // output the page, "undoing" the layout
+ } else {
+ for (flow = flows; flow; flow = flow->next) {
+ for (blk = flow->blocks; blk; blk = blk->next) {
+ for (line = blk->lines; line; line = line->next) {
+ n = line->len;
+ if (line->hyphenated && (line->next || blk->next)) {
+ --n;
+ }
+ s = new GooString();
+ dumpFragment(line->text, n, uMap, s);
+ (*outputFunc)(outputStream, s->getCString(), s->getLength());
+ delete s;
+ if (!line->hyphenated) {
+ if (line->next) {
+ (*outputFunc)(outputStream, space, spaceLen);
+ } else if (blk->next) {
+ //~ this is a bit of a kludge - we should really do a more
+ //~ intelligent determination of paragraphs
+ if (blk->next->lines->words->fontSize ==
+ blk->lines->words->fontSize) {
+ (*outputFunc)(outputStream, space, spaceLen);
+ } else {
+ (*outputFunc)(outputStream, eol, eolLen);
+ }
+ }
+ }
+ }
+ }
+ (*outputFunc)(outputStream, eol, eolLen);
+ (*outputFunc)(outputStream, eol, eolLen);
+ }
+ }
+
+ // end of page
+ if (pageBreaks) {
+ (*outputFunc)(outputStream, eop, eopLen);
+ }
+
+ uMap->decRefCnt();
+}
+
+void TextPage::assignColumns(TextLineFrag *frags, int nFrags, GBool oneRot) {
+ TextLineFrag *frag0, *frag1;
+ int rot, col1, col2, i, j, k;
+
+ // all text in the region has the same rotation -- recompute the
+ // column numbers based only on the text in the region
+ if (oneRot) {
+ qsort(frags, nFrags, sizeof(TextLineFrag), &TextLineFrag::cmpXYLineRot);
+ rot = frags[0].line->rot;
+ for (i = 0; i < nFrags; ++i) {
+ frag0 = &frags[i];
+ col1 = 0;
+ for (j = 0; j < i; ++j) {
+ frag1 = &frags[j];
+ col2 = 0; // make gcc happy
+ switch (rot) {
+ case 0:
+ if (frag0->xMin >= frag1->xMax) {
+ col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start]) + 1;
+ } else {
+ for (k = frag1->start;
+ k < frag1->start + frag1->len &&
+ frag0->xMin >= 0.5 * (frag1->line->edge[k] +
+ frag1->line->edge[k+1]);
+ ++k) ;
+ col2 = frag1->col +
+ frag1->line->col[k] - frag1->line->col[frag1->start];
+ }
+ break;
+ case 1:
+ if (frag0->yMin >= frag1->yMax) {
+ col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start]) + 1;
+ } else {
+ for (k = frag1->start;
+ k < frag1->start + frag1->len &&
+ frag0->yMin >= 0.5 * (frag1->line->edge[k] +
+ frag1->line->edge[k+1]);
+ ++k) ;
+ col2 = frag1->col +
+ frag1->line->col[k] - frag1->line->col[frag1->start];
+ }
+ break;
+ case 2:
+ if (frag0->xMax <= frag1->xMin) {
+ col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start]) + 1;
+ } else {
+ for (k = frag1->start;
+ k < frag1->start + frag1->len &&
+ frag0->xMax <= 0.5 * (frag1->line->edge[k] +
+ frag1->line->edge[k+1]);
+ ++k) ;
+ col2 = frag1->col +
+ frag1->line->col[k] - frag1->line->col[frag1->start];
+ }
+ break;
+ case 3:
+ if (frag0->yMax <= frag1->yMin) {
+ col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] -
+ frag1->line->col[frag1->start]) + 1;
+ } else {
+ for (k = frag1->start;
+ k < frag1->start + frag1->len &&
+ frag0->yMax <= 0.5 * (frag1->line->edge[k] +
+ frag1->line->edge[k+1]);
+ ++k) ;
+ col2 = frag1->col +
+ frag1->line->col[k] - frag1->line->col[frag1->start];
+ }
+ break;
+ }
+ if (col2 > col1) {
+ col1 = col2;
+ }
+ }
+ frag0->col = col1;
+ }
+
+ // the region includes text at different rotations -- use the
+ // globally assigned column numbers, offset by the minimum column
+ // number (i.e., shift everything over to column 0)
+ } else {
+ col1 = frags[0].col;
+ for (i = 1; i < nFrags; ++i) {
+ if (frags[i].col < col1) {
+ col1 = frags[i].col;
+ }
+ }
+ for (i = 0; i < nFrags; ++i) {
+ frags[i].col -= col1;
+ }
+ }
+}
+
+int TextPage::dumpFragment(Unicode *text, int len, UnicodeMap *uMap,
+ GooString *s) {
+ char lre[8], rle[8], popdf[8], buf[8];
+ int lreLen, rleLen, popdfLen, n;
+ int nCols, i, j, k;
+
+ nCols = 0;
+
+ if (uMap->isUnicode()) {
+
+ lreLen = uMap->mapUnicode(0x202a, lre, sizeof(lre));
+ rleLen = uMap->mapUnicode(0x202b, rle, sizeof(rle));
+ popdfLen = uMap->mapUnicode(0x202c, popdf, sizeof(popdf));
+
+ if (primaryLR) {
+
+ i = 0;
+ while (i < len) {
+ // output a left-to-right section
+ for (j = i; j < len && !unicodeTypeR(text[j]); ++j) ;
+ for (k = i; k < j; ++k) {
+ n = uMap->mapUnicode(text[k], buf, sizeof(buf));
+ s->append(buf, n);
+ ++nCols;
+ }
+ i = j;
+ // output a right-to-left section
+ for (j = i; j < len && !unicodeTypeL(text[j]); ++j) ;
+ if (j > i) {
+ s->append(rle, rleLen);
+ for (k = j - 1; k >= i; --k) {
+ n = uMap->mapUnicode(text[k], buf, sizeof(buf));
+ s->append(buf, n);
+ ++nCols;
+ }
+ s->append(popdf, popdfLen);
+ i = j;
+ }
+ }
+
+ } else {
+
+ s->append(rle, rleLen);
+ i = len - 1;
+ while (i >= 0) {
+ // output a right-to-left section
+ for (j = i; j >= 0 && !unicodeTypeL(text[j]); --j) ;
+ for (k = i; k > j; --k) {
+ n = uMap->mapUnicode(text[k], buf, sizeof(buf));
+ s->append(buf, n);
+ ++nCols;
+ }
+ i = j;
+ // output a left-to-right section
+ for (j = i; j >= 0 && !unicodeTypeR(text[j]); --j) ;
+ if (j < i) {
+ s->append(lre, lreLen);
+ for (k = j + 1; k <= i; ++k) {
+ n = uMap->mapUnicode(text[k], buf, sizeof(buf));
+ s->append(buf, n);
+ ++nCols;
+ }
+ s->append(popdf, popdfLen);
+ i = j;
+ }
+ }
+ s->append(popdf, popdfLen);
+
+ }
+
+ } else {
+ for (i = 0; i < len; ++i) {
+ n = uMap->mapUnicode(text[i], buf, sizeof(buf));
+ s->append(buf, n);
+ nCols += n;
+ }
+ }
+
+ return nCols;
+}
+
+#if TEXTOUT_WORD_LIST
+TextWordList *TextPage::makeWordList(GBool physLayout) {
+ return new TextWordList(this, physLayout);
+}
+#endif
+
+//------------------------------------------------------------------------
+// ActualText
+//------------------------------------------------------------------------
+ActualText::ActualText(TextPage *out) {
+ out->incRefCnt();
+ text = out;
+ actualText = NULL;
+ actualTextBMCLevel = 0;
+}
+
+ActualText::~ActualText() {
+ if (actualText)
+ delete actualText;
+ text->decRefCnt();
+}
+
+void ActualText::addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode c, int nBytes, Unicode *u, int uLen) {
+ if (actualTextBMCLevel == 0) {
+ text->addChar(state, x, y, dx, dy, c, nBytes, u, uLen);
+ } else {
+ // Inside ActualText span.
+ if (newActualTextSpan) {
+ actualText_x = x;
+ actualText_y = y;
+ actualText_dx = dx;
+ actualText_dy = dy;
+ newActualTextSpan = gFalse;
+ } else {
+ if (x < actualText_x)
+ actualText_x = x;
+ if (y < actualText_y)
+ actualText_y = y;
+ if (x + dx > actualText_x + actualText_dx)
+ actualText_dx = x + dx - actualText_x;
+ if (y + dy > actualText_y + actualText_dy)
+ actualText_dy = y + dy - actualText_y;
+ }
+ }
+}
+
+void ActualText::beginMC(Dict *properties) {
+ if (actualTextBMCLevel > 0) {
+ // Already inside a ActualText span.
+ actualTextBMCLevel++;
+ return;
+ }
+
+ Object obj;
+ if (properties->lookup("ActualText", &obj)) {
+ if (obj.isString()) {
+ actualText = obj.getString();
+ actualTextBMCLevel = 1;
+ newActualTextSpan = gTrue;
+ }
+ }
+}
+
+void ActualText::endMC(GfxState *state) {
+ char *uniString = NULL;
+ Unicode *uni;
+ int length, i;
+
+ if (actualTextBMCLevel > 0) {
+ actualTextBMCLevel--;
+ if (actualTextBMCLevel == 0) {
+ // ActualText span closed. Output the span text and the
+ // extents of all the glyphs inside the span
+
+ if (newActualTextSpan) {
+ // No content inside span.
+ actualText_x = state->getCurX();
+ actualText_y = state->getCurY();
+ actualText_dx = 0;
+ actualText_dy = 0;
+ }
+
+ if (!actualText->hasUnicodeMarker()) {
+ if (actualText->getLength() > 0) {
+ //non-unicode string -- assume pdfDocEncoding and
+ //try to convert to UTF16BE
+ uniString = pdfDocEncodingToUTF16(actualText, &length);
+ } else {
+ length = 0;
+ }
+ } else {
+ uniString = actualText->getCString();
+ length = actualText->getLength();
+ }
+
+ if (length < 3)
+ length = 0;
+ else
+ length = length/2 - 1;
+ uni = new Unicode[length];
+ for (i = 0 ; i < length; i++)
+ uni[i] = ((uniString[2 + i*2] & 0xff)<<8)|(uniString[3 + i*2] & 0xff);
+
+ text->addChar(state,
+ actualText_x, actualText_y,
+ actualText_dx, actualText_dy,
+ 0, 1, uni, length);
+
+ delete [] uni;
+ if (!actualText->hasUnicodeMarker())
+ delete [] uniString;
+ delete actualText;
+ actualText = NULL;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// TextOutputDev
+//------------------------------------------------------------------------
+
+static void TextOutputDev_outputToFile(void *stream, char *text, int len) {
+ fwrite(text, 1, len, (FILE *)stream);
+}
+
+TextOutputDev::TextOutputDev(char *fileName, GBool physLayoutA,
+ GBool rawOrderA, GBool append) {
+ text = NULL;
+ physLayout = physLayoutA;
+ rawOrder = rawOrderA;
+ doHTML = gFalse;
+ ok = gTrue;
+
+ // open file
+ needClose = gFalse;
+ if (fileName) {
+ if (!strcmp(fileName, "-")) {
+ outputStream = stdout;
+#ifdef _WIN32
+ // keep DOS from munging the end-of-line characters
+ setmode(fileno(stdout), O_BINARY);
+#endif
+ } else if ((outputStream = fopen(fileName, append ? "ab" : "wb"))) {
+ needClose = gTrue;
+ } else {
+ error(-1, "Couldn't open text file '%s'", fileName);
+ ok = gFalse;
+ return;
+ }
+ outputFunc = &TextOutputDev_outputToFile;
+ } else {
+ outputStream = NULL;
+ }
+
+ // set up text object
+ text = new TextPage(rawOrderA);
+ actualText = new ActualText(text);
+}
+
+TextOutputDev::TextOutputDev(TextOutputFunc func, void *stream,
+ GBool physLayoutA, GBool rawOrderA) {
+ outputFunc = func;
+ outputStream = stream;
+ needClose = gFalse;
+ physLayout = physLayoutA;
+ rawOrder = rawOrderA;
+ doHTML = gFalse;
+ text = new TextPage(rawOrderA);
+ actualText = new ActualText(text);
+ ok = gTrue;
+}
+
+TextOutputDev::~TextOutputDev() {
+ if (needClose) {
+#ifdef MACOS
+ ICS_MapRefNumAndAssign((short)((FILE *)outputStream)->handle);
+#endif
+ fclose((FILE *)outputStream);
+ }
+ if (text) {
+ text->decRefCnt();
+ }
+ delete actualText;
+}
+
+void TextOutputDev::startPage(int pageNum, GfxState *state) {
+ text->startPage(state);
+}
+
+void TextOutputDev::endPage() {
+ text->endPage();
+ text->coalesce(physLayout, doHTML);
+ if (outputStream) {
+ text->dump(outputStream, outputFunc, physLayout);
+ }
+}
+
+void TextOutputDev::updateFont(GfxState *state) {
+ text->updateFont(state);
+}
+
+void TextOutputDev::beginString(GfxState *state, GooString *s) {
+}
+
+void TextOutputDev::endString(GfxState *state) {
+}
+
+void TextOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode c, int nBytes, Unicode *u, int uLen) {
+ actualText->addChar(state, x, y, dx, dy, c, nBytes, u, uLen);
+}
+
+void TextOutputDev::beginMarkedContent(char *name, Dict *properties)
+{
+ actualText->beginMC(properties);
+}
+
+void TextOutputDev::endMarkedContent(GfxState *state)
+{
+ actualText->endMC(state);
+}
+
+void TextOutputDev::stroke(GfxState *state) {
+ GfxPath *path;
+ GfxSubpath *subpath;
+ double x[2], y[2];
+
+ if (!doHTML) {
+ return;
+ }
+ path = state->getPath();
+ if (path->getNumSubpaths() != 1) {
+ return;
+ }
+ subpath = path->getSubpath(0);
+ if (subpath->getNumPoints() != 2) {
+ return;
+ }
+ state->transform(subpath->getX(0), subpath->getY(0), &x[0], &y[0]);
+ state->transform(subpath->getX(1), subpath->getY(1), &x[1], &y[1]);
+
+ // look for a vertical or horizontal line
+ if (x[0] == x[1] || y[0] == y[1]) {
+ text->addUnderline(x[0], y[0], x[1], y[1]);
+ }
+}
+
+void TextOutputDev::fill(GfxState *state) {
+ GfxPath *path;
+ GfxSubpath *subpath;
+ double x[5], y[5];
+ double rx0, ry0, rx1, ry1, t;
+ int i;
+
+ if (!doHTML) {
+ return;
+ }
+ path = state->getPath();
+ if (path->getNumSubpaths() != 1) {
+ return;
+ }
+ subpath = path->getSubpath(0);
+ if (subpath->getNumPoints() != 5) {
+ return;
+ }
+ for (i = 0; i < 5; ++i) {
+ if (subpath->getCurve(i)) {
+ return;
+ }
+ state->transform(subpath->getX(i), subpath->getY(i), &x[i], &y[i]);
+ }
+
+ // look for a rectangle
+ if (x[0] == x[1] && y[1] == y[2] && x[2] == x[3] && y[3] == y[4] &&
+ x[0] == x[4] && y[0] == y[4]) {
+ rx0 = x[0];
+ ry0 = y[0];
+ rx1 = x[2];
+ ry1 = y[1];
+ } else if (y[0] == y[1] && x[1] == x[2] && y[2] == y[3] && x[3] == x[4] &&
+ x[0] == x[4] && y[0] == y[4]) {
+ rx0 = x[0];
+ ry0 = y[0];
+ rx1 = x[1];
+ ry1 = y[2];
+ } else {
+ return;
+ }
+ if (rx1 < rx0) {
+ t = rx0;
+ rx0 = rx1;
+ rx1 = t;
+ }
+ if (ry1 < ry0) {
+ t = ry0;
+ ry0 = ry1;
+ ry1 = t;
+ }
+
+ // skinny horizontal rectangle
+ if (ry1 - ry0 < rx1 - rx0) {
+ if (ry1 - ry0 < maxUnderlineWidth) {
+ ry0 = 0.5 * (ry0 + ry1);
+ text->addUnderline(rx0, ry0, rx1, ry0);
+ }
+
+ // skinny vertical rectangle
+ } else {
+ if (rx1 - rx0 < maxUnderlineWidth) {
+ rx0 = 0.5 * (rx0 + rx1);
+ text->addUnderline(rx0, ry0, rx0, ry1);
+ }
+ }
+}
+
+void TextOutputDev::eoFill(GfxState *state) {
+ if (!doHTML) {
+ return;
+ }
+ fill(state);
+}
+
+void TextOutputDev::processLink(Link *link, Catalog * /*catalog*/) {
+ double x1, y1, x2, y2;
+ int xMin, yMin, xMax, yMax, x, y;
+
+ if (!doHTML) {
+ return;
+ }
+ link->getRect(&x1, &y1, &x2, &y2);
+ cvtUserToDev(x1, y1, &x, &y);
+ xMin = xMax = x;
+ yMin = yMax = y;
+ cvtUserToDev(x1, y2, &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ cvtUserToDev(x2, y1, &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ cvtUserToDev(x2, y2, &x, &y);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ text->addLink(xMin, yMin, xMax, yMax, link);
+}
+
+GBool TextOutputDev::findText(Unicode *s, int len,
+ GBool startAtTop, GBool stopAtBottom,
+ GBool startAtLast, GBool stopAtLast,
+ GBool caseSensitive, GBool backward,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax) {
+ return text->findText(s, len, startAtTop, stopAtBottom,
+ startAtLast, stopAtLast, caseSensitive, backward,
+ xMin, yMin, xMax, yMax);
+}
+
+GooString *TextOutputDev::getText(double xMin, double yMin,
+ double xMax, double yMax) {
+ return text->getText(xMin, yMin, xMax, yMax);
+}
+
+void TextOutputDev::drawSelection(OutputDev *out,
+ double scale,
+ int rotation,
+ PDFRectangle *selection,
+ SelectionStyle style,
+ GfxColor *glyph_color, GfxColor *box_color) {
+ text->drawSelection(out, scale, rotation, selection, style, glyph_color, box_color);
+}
+
+GooList *TextOutputDev::getSelectionRegion(PDFRectangle *selection,
+ SelectionStyle style,
+ double scale) {
+ return text->getSelectionRegion(selection, style, scale);
+}
+
+GooString *TextOutputDev::getSelectionText(PDFRectangle *selection,
+ SelectionStyle style)
+{
+ return text->getSelectionText(selection, style);
+}
+
+GBool TextOutputDev::findCharRange(int pos, int length,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax) {
+ return text->findCharRange(pos, length, xMin, yMin, xMax, yMax);
+}
+
+#if TEXTOUT_WORD_LIST
+TextWordList *TextOutputDev::makeWordList() {
+ return text->makeWordList(physLayout);
+}
+#endif
+
+TextPage *TextOutputDev::takeText() {
+ TextPage *ret;
+
+ ret = text;
+ text = new TextPage(rawOrder);
+ return ret;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.h
new file mode 100644
index 00000000000..d3ae2f9a696
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/TextOutputDev.h
@@ -0,0 +1,788 @@
+//========================================================================
+//
+// TextOutputDev.h
+//
+// Copyright 1997-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2005-2007 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk>
+// Copyright (C) 2007-2008 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef TEXTOUTPUTDEV_H
+#define TEXTOUTPUTDEV_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include <stdio.h>
+#include "goo/gtypes.h"
+#include "GfxFont.h"
+#include "GfxState.h"
+#include "OutputDev.h"
+
+class GooString;
+class GooList;
+class Gfx;
+class GfxFont;
+class GfxState;
+class UnicodeMap;
+class Link;
+
+class TextWord;
+class TextPool;
+class TextLine;
+class TextLineFrag;
+class TextBlock;
+class TextFlow;
+class TextWordList;
+class TextPage;
+class TextSelectionVisitor;
+
+//------------------------------------------------------------------------
+
+typedef void (*TextOutputFunc)(void *stream, char *text, int len);
+
+enum SelectionStyle {
+ selectionStyleGlyph,
+ selectionStyleWord,
+ selectionStyleLine
+};
+
+//------------------------------------------------------------------------
+// TextFontInfo
+//------------------------------------------------------------------------
+
+class TextFontInfo {
+public:
+
+ TextFontInfo(GfxState *state);
+ ~TextFontInfo();
+
+ GBool matches(GfxState *state);
+
+#if TEXTOUT_WORD_LIST
+ // Get the font name (which may be NULL).
+ GooString *getFontName() { return fontName; }
+
+ // Get font descriptor flags.
+ GBool isFixedWidth() { return flags & fontFixedWidth; }
+ GBool isSerif() { return flags & fontSerif; }
+ GBool isSymbolic() { return flags & fontSymbolic; }
+ GBool isItalic() { return flags & fontItalic; }
+ GBool isBold() { return flags & fontBold; }
+#endif
+
+private:
+
+ GfxFont *gfxFont;
+#if TEXTOUT_WORD_LIST
+ GooString *fontName;
+ int flags;
+#endif
+
+ friend class TextWord;
+ friend class TextPage;
+ friend class TextSelectionPainter;
+};
+
+//------------------------------------------------------------------------
+// TextWord
+//------------------------------------------------------------------------
+
+class TextWord {
+public:
+
+ // Constructor.
+ TextWord(GfxState *state, int rotA, double x0, double y0,
+ int charPosA, TextFontInfo *fontA, double fontSize);
+
+ // Destructor.
+ ~TextWord();
+
+ // Add a character to the word.
+ void addChar(GfxState *state, double x, double y,
+ double dx, double dy, CharCode c, Unicode u);
+
+ // Merge <word> onto the end of <this>.
+ void merge(TextWord *word);
+
+ // Compares <this> to <word>, returning -1 (<), 0 (=), or +1 (>),
+ // based on a primary-axis comparison, e.g., x ordering if rot=0.
+ int primaryCmp(TextWord *word);
+
+ // Return the distance along the primary axis between <this> and
+ // <word>.
+ double primaryDelta(TextWord *word);
+
+ static int cmpYX(const void *p1, const void *p2);
+
+ void visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style);
+
+ // Get the TextFontInfo object associated with this word.
+ TextFontInfo *getFontInfo() { return font; }
+
+ // Get the next TextWord on the linked list.
+ TextWord *getNext() { return next; }
+
+#if TEXTOUT_WORD_LIST
+ int getLength() { return len; }
+ const Unicode *getChar(int idx) { return &text[idx]; }
+ GooString *getText();
+ GooString *getFontName() { return font->fontName; }
+ void getColor(double *r, double *g, double *b)
+ { *r = colorR; *g = colorG; *b = colorB; }
+ void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+ void getCharBBox(int charIdx, double *xMinA, double *yMinA,
+ double *xMaxA, double *yMaxA);
+ double getFontSize() { return fontSize; }
+ int getRotation() { return rot; }
+ int getCharPos() { return charPos; }
+ int getCharLen() { return charLen; }
+ GBool getSpaceAfter() { return spaceAfter; }
+#endif
+ GBool isUnderlined() { return underlined; }
+ Link *getLink() { return link; }
+ double getEdge(int i) { return edge[i]; }
+ double getBaseline () { return base; }
+ GBool hasSpaceAfter () { return spaceAfter; }
+ TextWord* nextWord () { return next; };
+private:
+
+ int rot; // rotation, multiple of 90 degrees
+ // (0, 1, 2, or 3)
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ double base; // baseline x or y coordinate
+ Unicode *text; // the text
+ CharCode *charcode; // glyph indices
+ double *edge; // "near" edge x or y coord of each char
+ // (plus one extra entry for the last char)
+ int len; // length of text and edge arrays
+ int size; // size of text and edge arrays
+ int charPos; // character position (within content stream)
+ int charLen; // number of content stream characters in
+ // this word
+ TextFontInfo *font; // font information
+ double fontSize; // font size
+ GBool spaceAfter; // set if there is a space between this
+ // word and the next word on the line
+ TextWord *next; // next word in line
+
+#if TEXTOUT_WORD_LIST
+ double colorR, // word color
+ colorG,
+ colorB;
+#endif
+
+ GBool underlined;
+ Link *link;
+
+ friend class TextPool;
+ friend class TextLine;
+ friend class TextBlock;
+ friend class TextFlow;
+ friend class TextWordList;
+ friend class TextPage;
+
+ friend class TextSelectionPainter;
+ friend class TextSelectionDumper;
+};
+
+//------------------------------------------------------------------------
+// TextPool
+//------------------------------------------------------------------------
+
+class TextPool {
+public:
+
+ TextPool();
+ ~TextPool();
+
+ TextWord *getPool(int baseIdx) { return pool[baseIdx - minBaseIdx]; }
+ void setPool(int baseIdx, TextWord *p) { pool[baseIdx - minBaseIdx] = p; }
+
+ int getBaseIdx(double base);
+
+ void addWord(TextWord *word);
+
+private:
+
+ int minBaseIdx; // min baseline bucket index
+ int maxBaseIdx; // max baseline bucket index
+ TextWord **pool; // array of linked lists, one for each
+ // baseline value (multiple of 4 pts)
+ TextWord *cursor; // pointer to last-accessed word
+ int cursorBaseIdx; // baseline bucket index of last-accessed word
+
+ friend class TextBlock;
+ friend class TextPage;
+};
+
+struct TextFlowData;
+
+//------------------------------------------------------------------------
+// TextLine
+//------------------------------------------------------------------------
+
+class TextLine {
+public:
+
+ TextLine(TextBlock *blkA, int rotA, double baseA);
+ ~TextLine();
+
+ void addWord(TextWord *word);
+
+ // Return the distance along the primary axis between <this> and
+ // <line>.
+ double primaryDelta(TextLine *line);
+
+ // Compares <this> to <line>, returning -1 (<), 0 (=), or +1 (>),
+ // based on a primary-axis comparison, e.g., x ordering if rot=0.
+ int primaryCmp(TextLine *line);
+
+ // Compares <this> to <line>, returning -1 (<), 0 (=), or +1 (>),
+ // based on a secondary-axis comparison of the baselines, e.g., y
+ // ordering if rot=0.
+ int secondaryCmp(TextLine *line);
+
+ int cmpYX(TextLine *line);
+
+ static int cmpXY(const void *p1, const void *p2);
+
+ void coalesce(UnicodeMap *uMap);
+
+ void visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style);
+
+ // Get the head of the linked list of TextWords.
+ TextWord *getWords() { return words; }
+
+ // Get the next TextLine on the linked list.
+ TextLine *getNext() { return next; }
+
+ // Returns true if the last char of the line is a hyphen.
+ GBool isHyphenated() { return hyphenated; }
+
+private:
+
+ TextBlock *blk; // parent block
+ int rot; // text rotation
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ double base; // baseline x or y coordinate
+ TextWord *words; // words in this line
+ TextWord *lastWord; // last word in this line
+ Unicode *text; // Unicode text of the line, including
+ // spaces between words
+ double *edge; // "near" edge x or y coord of each char
+ // (plus one extra entry for the last char)
+ int *col; // starting column number of each Unicode char
+ int len; // number of Unicode chars
+ int convertedLen; // total number of converted characters
+ GBool hyphenated; // set if last char is a hyphen
+ TextLine *next; // next line in block
+ Unicode *normalized; // normalized form of Unicode text
+ int normalized_len; // number of normalized Unicode chars
+ int *normalized_idx; // indices of normalized chars into Unicode text
+
+ friend class TextLineFrag;
+ friend class TextBlock;
+ friend class TextFlow;
+ friend class TextWordList;
+ friend class TextPage;
+
+ friend class TextSelectionPainter;
+ friend class TextSelectionSizer;
+ friend class TextSelectionDumper;
+};
+
+//------------------------------------------------------------------------
+// TextBlock
+//------------------------------------------------------------------------
+
+class TextBlock {
+public:
+
+ TextBlock(TextPage *pageA, int rotA);
+ ~TextBlock();
+
+ void addWord(TextWord *word);
+
+ void coalesce(UnicodeMap *uMap);
+
+ // Update this block's priMin and priMax values, looking at <blk>.
+ void updatePriMinMax(TextBlock *blk);
+
+ static int cmpXYPrimaryRot(const void *p1, const void *p2);
+
+ static int cmpYXPrimaryRot(const void *p1, const void *p2);
+
+ int primaryCmp(TextBlock *blk);
+
+ double secondaryDelta(TextBlock *blk);
+
+ // Returns true if <this> is below <blk>, relative to the page's
+ // primary rotation.
+ GBool isBelow(TextBlock *blk);
+
+ void visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style);
+
+ // Get the head of the linked list of TextLines.
+ TextLine *getLines() { return lines; }
+
+ // Get the next TextBlock on the linked list.
+ TextBlock *getNext() { return next; }
+
+ void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+
+ int getLineCount() { return nLines; }
+
+private:
+
+ TextPage *page; // the parent page
+ int rot; // text rotation
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ double priMin, priMax; // whitespace bounding box along primary axis
+
+ TextPool *pool; // pool of words (used only until lines
+ // are built)
+ TextLine *lines; // linked list of lines
+ TextLine *curLine; // most recently added line
+ int nLines; // number of lines
+ int charCount; // number of characters in the block
+ int col; // starting column
+ int nColumns; // number of columns in the block
+
+ TextBlock *next;
+ TextBlock *stackNext;
+
+ friend class TextLine;
+ friend class TextLineFrag;
+ friend class TextFlow;
+ friend class TextWordList;
+ friend class TextPage;
+ friend class TextSelectionPainter;
+};
+
+//------------------------------------------------------------------------
+// TextFlow
+//------------------------------------------------------------------------
+
+class TextFlow {
+public:
+
+ TextFlow(TextPage *pageA, TextBlock *blk);
+ ~TextFlow();
+
+ // Add a block to the end of this flow.
+ void addBlock(TextBlock *blk);
+
+ // Returns true if <blk> fits below <prevBlk> in the flow, i.e., (1)
+ // it uses a font no larger than the last block added to the flow,
+ // and (2) it fits within the flow's [priMin, priMax] along the
+ // primary axis.
+ GBool blockFits(TextBlock *blk, TextBlock *prevBlk);
+
+ // Get the head of the linked list of TextBlocks.
+ TextBlock *getBlocks() { return blocks; }
+
+ // Get the next TextFlow on the linked list.
+ TextFlow *getNext() { return next; }
+
+private:
+
+ TextPage *page; // the parent page
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ double priMin, priMax; // whitespace bounding box along primary axis
+ TextBlock *blocks; // blocks in flow
+ TextBlock *lastBlk; // last block in this flow
+ TextFlow *next;
+
+ friend class TextWordList;
+ friend class TextPage;
+};
+
+#if TEXTOUT_WORD_LIST
+
+//------------------------------------------------------------------------
+// TextWordList
+//------------------------------------------------------------------------
+
+class TextWordList {
+public:
+
+ // Build a flat word list, in content stream order (if
+ // text->rawOrder is true), physical layout order (if <physLayout>
+ // is true and text->rawOrder is false), or reading order (if both
+ // flags are false).
+ TextWordList(TextPage *text, GBool physLayout);
+
+ ~TextWordList();
+
+ // Return the number of words on the list.
+ int getLength();
+
+ // Return the <idx>th word from the list.
+ TextWord *get(int idx);
+
+private:
+
+ GooList *words; // [TextWord]
+};
+
+#endif // TEXTOUT_WORD_LIST
+
+//------------------------------------------------------------------------
+// TextPage
+//------------------------------------------------------------------------
+
+class TextPage {
+public:
+
+ // Constructor.
+ TextPage(GBool rawOrderA);
+
+ void incRefCnt();
+ void decRefCnt();
+
+ // Start a new page.
+ void startPage(GfxState *state);
+
+ // End the current page.
+ void endPage();
+
+ // Update the current font.
+ void updateFont(GfxState *state);
+
+ // Begin a new word.
+ void beginWord(GfxState *state, double x0, double y0);
+
+ // Add a character to the current word.
+ void addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode c, int nBytes, Unicode *u, int uLen);
+
+ // End the current word, sorting it into the list of words.
+ void endWord();
+
+ // Add a word, sorting it into the list of words.
+ void addWord(TextWord *word);
+
+ // Add a (potential) underline.
+ void addUnderline(double x0, double y0, double x1, double y1);
+
+ // Add a hyperlink.
+ void addLink(int xMin, int yMin, int xMax, int yMax, Link *link);
+
+ // Coalesce strings that look like parts of the same line.
+ void coalesce(GBool physLayout, GBool doHTML);
+
+ // Find a string. If <startAtTop> is true, starts looking at the
+ // top of the page; else if <startAtLast> is true, starts looking
+ // immediately after the last find result; else starts looking at
+ // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the
+ // bottom of the page; else if <stopAtLast> is true, stops looking
+ // just before the last find result; else stops looking at
+ // <xMax>,<yMax>.
+ GBool findText(Unicode *s, int len,
+ GBool startAtTop, GBool stopAtBottom,
+ GBool startAtLast, GBool stopAtLast,
+ GBool caseSensitive, GBool backward,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax);
+
+ // Get the text which is inside the specified rectangle.
+ GooString *getText(double xMin, double yMin,
+ double xMax, double yMax);
+
+ void visitSelection(TextSelectionVisitor *visitor,
+ PDFRectangle *selection,
+ SelectionStyle style);
+
+ void drawSelection(OutputDev *out,
+ double scale,
+ int rotation,
+ PDFRectangle *selection,
+ SelectionStyle style,
+ GfxColor *glyph_color, GfxColor *box_color);
+
+ GooList *getSelectionRegion(PDFRectangle *selection,
+ SelectionStyle style,
+ double scale);
+
+ GooString *getSelectionText(PDFRectangle *selection,
+ SelectionStyle style);
+
+ // Find a string by character position and length. If found, sets
+ // the text bounding rectangle and returns true; otherwise returns
+ // false.
+ GBool findCharRange(int pos, int length,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax);
+
+ // Dump contents of page to a file.
+ void dump(void *outputStream, TextOutputFunc outputFunc,
+ GBool physLayout);
+
+ // Get the head of the linked list of TextFlows.
+ TextFlow *getFlows() { return flows; }
+
+#if TEXTOUT_WORD_LIST
+ // Build a flat word list, in content stream order (if
+ // this->rawOrder is true), physical layout order (if <physLayout>
+ // is true and this->rawOrder is false), or reading order (if both
+ // flags are false).
+ TextWordList *makeWordList(GBool physLayout);
+#endif
+
+private:
+
+ // Destructor.
+ ~TextPage();
+
+ void clear();
+ void assignColumns(TextLineFrag *frags, int nFrags, int rot);
+ int dumpFragment(Unicode *text, int len, UnicodeMap *uMap, GooString *s);
+
+ GBool rawOrder; // keep text in content stream order
+
+ double pageWidth, pageHeight; // width and height of current page
+ TextWord *curWord; // currently active string
+ int charPos; // next character position (within content
+ // stream)
+ TextFontInfo *curFont; // current font
+ double curFontSize; // current font size
+ int nest; // current nesting level (for Type 3 fonts)
+ int nTinyChars; // number of "tiny" chars seen so far
+ GBool lastCharOverlap; // set if the last added char overlapped the
+ // previous char
+
+ TextPool *pools[4]; // a "pool" of TextWords for each rotation
+ TextFlow *flows; // linked list of flows
+ TextBlock **blocks; // array of blocks, in yx order
+ int nBlocks; // number of blocks
+ int primaryRot; // primary rotation
+ GBool primaryLR; // primary direction (true means L-to-R,
+ // false means R-to-L)
+ TextWord *rawWords; // list of words, in raw order (only if
+ // rawOrder is set)
+ TextWord *rawLastWord; // last word on rawWords list
+
+ GooList *fonts; // all font info objects used on this
+ // page [TextFontInfo]
+
+ double lastFindXMin, // coordinates of the last "find" result
+ lastFindYMin;
+ GBool haveLastFind;
+
+ GooList *underlines; // [TextUnderline]
+ GooList *links; // [TextLink]
+
+ int refCnt;
+
+ friend class TextLine;
+ friend class TextLineFrag;
+ friend class TextBlock;
+ friend class TextFlow;
+ friend class TextWordList;
+ friend class TextSelectionPainter;
+ friend class TextSelectionDumper;
+};
+
+//------------------------------------------------------------------------
+// ActualText
+//------------------------------------------------------------------------
+
+class ActualText {
+public:
+ // Create an ActualText
+ ActualText(TextPage *out);
+ ~ActualText();
+
+ void addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ CharCode c, int nBytes, Unicode *u, int uLen);
+ void beginMC(Dict *properties);
+ void endMC(GfxState *state);
+
+private:
+ TextPage *text;
+ int actualTextBMCLevel; // > 0 when inside ActualText span. Incremented
+ // for each nested BMC inside the span.
+ GooString *actualText; // replacement text for the span
+ GBool newActualTextSpan; // true at start of span. used to init the extent
+ double actualText_x, actualText_y; // extent of the text inside the span
+ double actualText_dx, actualText_dy;
+};
+
+
+//------------------------------------------------------------------------
+// TextOutputDev
+//------------------------------------------------------------------------
+
+class TextOutputDev: public OutputDev {
+public:
+
+ // Open a text output file. If <fileName> is NULL, no file is
+ // written (this is useful, e.g., for searching text). If
+ // <physLayoutA> is true, the original physical layout of the text
+ // is maintained. If <rawOrder> is true, the text is kept in
+ // content stream order.
+ TextOutputDev(char *fileName, GBool physLayoutA,
+ GBool rawOrderA, GBool append);
+
+ // Create a TextOutputDev which will write to a generic stream. If
+ // <physLayoutA> is true, the original physical layout of the text
+ // is maintained. If <rawOrder> is true, the text is kept in
+ // content stream order.
+ TextOutputDev(TextOutputFunc func, void *stream,
+ GBool physLayoutA, GBool rawOrderA);
+
+ // Destructor.
+ virtual ~TextOutputDev();
+
+ // Check if file was successfully created.
+ virtual GBool isOk() { return ok; }
+
+ //---- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gFalse; }
+
+ //----- initialization and control
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+
+ //----- text drawing
+ virtual void beginString(GfxState *state, GooString *s);
+ virtual void endString(GfxState *state);
+ virtual void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode c, int nBytes, Unicode *u, int uLen);
+
+ //----- grouping operators
+ virtual void beginMarkedContent(char *name, Dict *properties);
+ virtual void endMarkedContent(GfxState *state);
+
+ //----- path painting
+ virtual void stroke(GfxState *state);
+ virtual void fill(GfxState *state);
+ virtual void eoFill(GfxState *state);
+
+ //----- link borders
+ virtual void processLink(Link *link, Catalog *catalog);
+
+ //----- special access
+
+ // Find a string. If <startAtTop> is true, starts looking at the
+ // top of the page; else if <startAtLast> is true, starts looking
+ // immediately after the last find result; else starts looking at
+ // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the
+ // bottom of the page; else if <stopAtLast> is true, stops looking
+ // just before the last find result; else stops looking at
+ // <xMax>,<yMax>.
+ GBool findText(Unicode *s, int len,
+ GBool startAtTop, GBool stopAtBottom,
+ GBool startAtLast, GBool stopAtLast,
+ GBool caseSensitive, GBool backward,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax);
+
+ // Get the text which is inside the specified rectangle.
+ GooString *getText(double xMin, double yMin,
+ double xMax, double yMax);
+
+ // Find a string by character position and length. If found, sets
+ // the text bounding rectangle and returns true; otherwise returns
+ // false.
+ GBool findCharRange(int pos, int length,
+ double *xMin, double *yMin,
+ double *xMax, double *yMax);
+
+ void drawSelection(OutputDev *out, double scale, int rotation,
+ PDFRectangle *selection,
+ SelectionStyle style,
+ GfxColor *glyph_color, GfxColor *box_color);
+
+ GooList *getSelectionRegion(PDFRectangle *selection,
+ SelectionStyle style,
+ double scale);
+
+ GooString *getSelectionText(PDFRectangle *selection,
+ SelectionStyle style);
+
+#if TEXTOUT_WORD_LIST
+ // Build a flat word list, in content stream order (if
+ // this->rawOrder is true), physical layout order (if
+ // this->physLayout is true and this->rawOrder is false), or reading
+ // order (if both flags are false).
+ TextWordList *makeWordList();
+#endif
+
+ // Returns the TextPage object for the last rasterized page,
+ // transferring ownership to the caller.
+ TextPage *takeText();
+
+ // Turn extra processing for HTML conversion on or off.
+ void enableHTMLExtras(GBool doHTMLA) { doHTML = doHTMLA; }
+
+private:
+
+ TextOutputFunc outputFunc; // output function
+ void *outputStream; // output stream
+ GBool needClose; // need to close the output file?
+ // (only if outputStream is a FILE*)
+ TextPage *text; // text for the current page
+ GBool physLayout; // maintain original physical layout when
+ // dumping text
+ GBool rawOrder; // keep text in content stream order
+ GBool doHTML; // extra processing for HTML conversion
+ GBool ok; // set up ok?
+
+ ActualText *actualText;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UTF8.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UTF8.h
new file mode 100644
index 00000000000..34a07d4082f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UTF8.h
@@ -0,0 +1,84 @@
+//========================================================================
+//
+// UTF8.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+static int mapUTF8(Unicode u, char *buf, int bufSize) {
+ if (u <= 0x0000007f) {
+ if (bufSize < 1) {
+ return 0;
+ }
+ buf[0] = (char)u;
+ return 1;
+ } else if (u <= 0x000007ff) {
+ if (bufSize < 2) {
+ return 0;
+ }
+ buf[0] = (char)(0xc0 + (u >> 6));
+ buf[1] = (char)(0x80 + (u & 0x3f));
+ return 2;
+ } else if (u <= 0x0000ffff) {
+ if (bufSize < 3) {
+ return 0;
+ }
+ buf[0] = (char)(0xe0 + (u >> 12));
+ buf[1] = (char)(0x80 + ((u >> 6) & 0x3f));
+ buf[2] = (char)(0x80 + (u & 0x3f));
+ return 3;
+ } else if (u <= 0x0010ffff) {
+ if (bufSize < 4) {
+ return 0;
+ }
+ buf[0] = (char)(0xf0 + (u >> 18));
+ buf[1] = (char)(0x80 + ((u >> 12) & 0x3f));
+ buf[2] = (char)(0x80 + ((u >> 6) & 0x3f));
+ buf[3] = (char)(0x80 + (u & 0x3f));
+ return 4;
+ } else {
+ return 0;
+ }
+}
+
+static int mapUCS2(Unicode u, char *buf, int bufSize) {
+ if (u <= 0xffff) {
+ if (bufSize < 2) {
+ return 0;
+ }
+ buf[0] = (char)((u >> 8) & 0xff);
+ buf[1] = (char)(u & 0xff);
+ return 2;
+ } else if (u < 0x110000) {
+ Unicode uu;
+
+ /* using surrogate pair */
+ if (bufSize < 4) {
+ return 0;
+ }
+ uu = ((u - 0x10000) >> 10) + 0xd800;
+ buf[0] = (char)((uu >> 8) & 0xff);
+ buf[1] = (char)(uu & 0xff);
+ uu = (u & 0x3ff)+0xdc00;
+ buf[2] = (char)((uu >> 8) & 0xff);
+ buf[3] = (char)(uu & 0xff);
+ return 4;
+ } else {
+ return 0;
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCClassTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCClassTables.h
new file mode 100644
index 00000000000..62f9ecc3657
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCClassTables.h
@@ -0,0 +1,1827 @@
+// Copied from gunidecomp.h in GLib:
+// s/[G]_UNICODE_MAX_TABLE_INDEX/UNICODE_MAX_TABLE_INDEX/g
+// s/[g]uchar/Unicode/g
+// s/[g]int16/short/g
+// Can be regenerated from gen-unicode-tables.pl, also in GLib, with relevant
+// Unicode data tables from ftp.unicode.org.
+
+static const Unicode cclass_data[][256] = {
+ { /* page 3, index 0 */
+ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216,
+ 220, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 202, 202, 220,
+ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, 1, 1, 1, 220,
+ 220, 220, 220, 230, 230, 230, 230, 230, 230, 230, 230, 240, 230, 220,
+ 220, 220, 230, 230, 230, 220, 220, 0, 230, 230, 230, 220, 220, 220, 220,
+ 230, 0, 0, 0, 0, 0, 234, 234, 233, 234, 234, 233, 230, 230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 4, index 1 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 5, index 2 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 220, 230, 230, 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230,
+ 230, 230, 230, 0, 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222,
+ 228, 230, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 20, 21, 22, 0, 23,
+ 0, 24, 25, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 6, index 3 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230,
+ 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, 220,
+ 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 230,
+ 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, 230, 230, 220, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 7, index 4 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 230, 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230,
+ 220, 230, 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 9, index 5 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 10, index 6 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 11, index 7 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 12, index 8 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 13, index 9 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 14, index 10 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 107, 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 15, index 11 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 220, 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, 0,
+ 132, 0, 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, 130, 0, 230, 230, 9, 0,
+ 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0
+ },
+ { /* page 16, index 12 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 23, index 13 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 24, index 14 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 25, index 15 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 32, index 16 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230,
+ 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, 0, 230, 0, 0, 0, 1, 1, 230, 220,
+ 230, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 48, index 17 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 228, 232, 222,
+ 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 251, index 18 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 254, index 19 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 465, index 20 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 216, 216, 1, 1, 1, 0, 0, 0, 226, 216, 216, 216, 216, 216,
+ 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, 220, 220, 220, 0, 0,
+ 230, 230, 230, 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+};
+
+static const short combining_class_table_part1[763] = {
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 /* page 3 */,
+ 1 /* page 4 */,
+ 2 /* page 5 */,
+ 3 /* page 6 */,
+ 4 /* page 7 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 5 /* page 9 */,
+ 6 /* page 10 */,
+ 7 /* page 11 */,
+ 8 /* page 12 */,
+ 9 /* page 13 */,
+ 10 /* page 14 */,
+ 11 /* page 15 */,
+ 12 /* page 16 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 13 /* page 23 */,
+ 14 /* page 24 */,
+ 15 /* page 25 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 16 /* page 32 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 17 /* page 48 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 18 /* page 251 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 19 /* page 254 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 20 /* page 465 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX
+};
+
+static const short combining_class_table_part2[768] = {
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCompTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCompTables.h
new file mode 100644
index 00000000000..68e2f86aee9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeCompTables.h
@@ -0,0 +1,665 @@
+// Copied from gunicomp.h in GLib:
+// s/[G]_UNICODE_MAX_TABLE_INDEX/UNICODE_MAX_TABLE_INDEX/g
+// s/[g]uint16/unsigned short/g
+// s/[g]int16/short/g
+// Can be regenerated from gen-unicode-tables.pl, also in GLib, with relevant
+// Unicode data tables from ftp.unicode.org.
+
+#define COMPOSE_FIRST_START 1
+#define COMPOSE_FIRST_SINGLE_START 147
+#define COMPOSE_SECOND_START 357
+#define COMPOSE_SECOND_SINGLE_START 388
+
+#define COMPOSE_TABLE_LAST 48
+
+static const unsigned short compose_data[][256] = {
+ { /* page 0, index 0 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 148, 149, 0, 0, 1, 2, 3, 4, 5,
+ 150, 6, 7, 8, 151, 9, 10, 11, 12, 13, 14, 0, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 152, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 153, 154,
+ 50, 155, 0, 0, 51, 0, 0, 0, 0, 156, 0, 0, 0, 0, 52, 53, 157, 0, 158, 0,
+ 0, 0, 54, 0, 0, 0, 0, 0, 55, 0, 159, 160, 56, 161, 0, 0, 57, 0, 0, 0, 0,
+ 162, 0, 0, 0, 0, 58, 59, 163, 0, 164, 0, 0, 0, 60, 0, 0, 0
+ },
+ { /* page 1, index 1 */
+ 0, 0, 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 166, 0,
+ 0, 0, 0, 167, 168, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
+ 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 0, 0, 0, 0, 0, 0, 174,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0
+ },
+ { /* page 2, index 2 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 179, 180, 0, 0, 0, 0,
+ 181, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 3, index 3 */
+ 357, 358, 359, 360, 361, 0, 362, 363, 364, 365, 366, 367, 368, 0, 0, 369,
+ 0, 370, 0, 371, 372, 0, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 374,
+ 375, 376, 377, 378, 379, 0, 0, 0, 0, 380, 381, 0, 382, 383, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 385, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0,
+ 72, 0, 73, 0, 74, 0, 0, 0, 0, 0, 75, 0, 184, 0, 0, 0, 76, 0, 0, 0, 77, 0,
+ 0, 185, 0, 186, 0, 0, 78, 0, 0, 0, 79, 0, 80, 0, 81, 0, 0, 0, 0, 0, 82,
+ 0, 83, 0, 0, 0, 84, 0, 0, 0, 85, 86, 87, 0, 0, 187, 0, 0, 0, 88, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 4, index 4 */
+ 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 189, 0, 90,
+ 91, 190, 92, 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, 93, 0, 0, 0, 193, 0, 0, 0,
+ 194, 0, 195, 0, 0, 94, 0, 0, 196, 0, 95, 96, 197, 97, 0, 198, 0, 0, 0,
+ 199, 0, 0, 0, 0, 98, 0, 0, 0, 200, 0, 0, 0, 201, 0, 202, 0, 0, 0, 0, 0,
+ 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 208, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 6, index 5 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 210, 0, 211, 0, 0, 0, 0, 0, 0, 0, 0, 388, 389, 390, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 0,
+ 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 9, index 6 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, 0, 0,
+ 216, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 391,
+ 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 11, index 7 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0,
+ 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 394, 395, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 396, 0, 0, 0, 0, 0, 0, 0, 102, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 12, index 8 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221,
+ 0, 0, 398, 0, 0, 0, 103, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399,
+ 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 13, index 9 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 0, 0, 0, 0, 0, 0, 0, 104,
+ 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 105, 0, 0, 224, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 16, index 10 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 30, index 11 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 226, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 229, 0, 0,
+ 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 107, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 235, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 31, index 12 */
+ 108, 109, 236, 237, 238, 239, 240, 241, 110, 111, 242, 243, 244, 245,
+ 246, 247, 112, 113, 0, 0, 0, 0, 0, 0, 114, 115, 0, 0, 0, 0, 0, 0, 116,
+ 117, 248, 249, 250, 251, 252, 253, 118, 119, 254, 255, 256, 257, 258,
+ 259, 120, 121, 0, 0, 0, 0, 0, 0, 122, 123, 0, 0, 0, 0, 0, 0, 124, 125, 0,
+ 0, 0, 0, 0, 0, 126, 127, 0, 0, 0, 0, 0, 0, 128, 129, 0, 0, 0, 0, 0, 0, 0,
+ 130, 0, 0, 0, 0, 0, 0, 131, 132, 260, 261, 262, 263, 264, 265, 133, 134,
+ 266, 267, 268, 269, 270, 271, 272, 0, 0, 0, 273, 0, 0, 0, 0, 0, 0, 0,
+ 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, 135, 0, 0, 0,
+ 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, 0, 136, 0
+ },
+ { /* page 33, index 13 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 278, 0, 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, 0, 282, 0,
+ 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 34, index 14 */
+ 0, 0, 0, 284, 0, 0, 0, 0, 285, 0, 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, 288, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 0, 0, 0, 0, 0, 290,
+ 0, 291, 0, 0, 292, 0, 0, 0, 0, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 294, 0, 0, 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 297, 298, 0, 0, 299, 300, 0, 0, 301, 302, 303, 304, 0, 0, 0, 0,
+ 305, 306, 0, 0, 307, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 310, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 312, 313, 0, 314,
+ 0, 0, 0, 0, 0, 0, 315, 316, 317, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ },
+ { /* page 48, index 15 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 0,
+ 0, 0, 0, 320, 0, 321, 0, 322, 0, 323, 0, 324, 0, 325, 0, 326, 0, 327, 0,
+ 328, 0, 329, 0, 330, 0, 331, 0, 0, 332, 0, 333, 0, 334, 0, 0, 0, 0, 0, 0,
+ 137, 0, 0, 138, 0, 0, 139, 0, 0, 140, 0, 0, 141, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 387,
+ 0, 0, 335, 0, 0, 0, 0, 0, 0, 0, 0, 336, 0, 0, 0, 0, 337, 0, 338, 0, 339,
+ 0, 340, 0, 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, 346, 0, 347, 0, 348,
+ 0, 0, 349, 0, 350, 0, 351, 0, 0, 0, 0, 0, 0, 142, 0, 0, 143, 0, 0, 144,
+ 0, 0, 145, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 352, 353, 354, 355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 0, 0
+ }
+};
+
+static const short compose_table[COMPOSE_TABLE_LAST + 1] = {
+ 0 /* page 0 */,
+ 1 /* page 1 */,
+ 2 /* page 2 */,
+ 3 /* page 3 */,
+ 4 /* page 4 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 5 /* page 6 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 6 /* page 9 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 7 /* page 11 */,
+ 8 /* page 12 */,
+ 9 /* page 13 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 10 /* page 16 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 11 /* page 30 */,
+ 12 /* page 31 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 13 /* page 33 */,
+ 14 /* page 34 */,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 0 + UNICODE_MAX_TABLE_INDEX,
+ 15 /* page 48 */
+};
+
+static const unsigned short compose_first_single[][2] = {
+ { 0x0338, 0x226e },
+ { 0x0338, 0x2260 },
+ { 0x0338, 0x226f },
+ { 0x0307, 0x1e1e },
+ { 0x0302, 0x0134 },
+ { 0x0307, 0x1e1f },
+ { 0x0304, 0x01de },
+ { 0x0301, 0x01fa },
+ { 0x0301, 0x1e08 },
+ { 0x0301, 0x1e2e },
+ { 0x0304, 0x022a },
+ { 0x0301, 0x01fe },
+ { 0x0304, 0x01df },
+ { 0x0301, 0x01fb },
+ { 0x0301, 0x1e09 },
+ { 0x0301, 0x1e2f },
+ { 0x0304, 0x022b },
+ { 0x0301, 0x01ff },
+ { 0x0307, 0x1e64 },
+ { 0x0307, 0x1e65 },
+ { 0x0307, 0x1e66 },
+ { 0x0307, 0x1e67 },
+ { 0x0301, 0x1e78 },
+ { 0x0301, 0x1e79 },
+ { 0x0308, 0x1e7a },
+ { 0x0308, 0x1e7b },
+ { 0x0307, 0x1e9b },
+ { 0x030c, 0x01ee },
+ { 0x0304, 0x01ec },
+ { 0x0304, 0x01ed },
+ { 0x0304, 0x01e0 },
+ { 0x0304, 0x01e1 },
+ { 0x0306, 0x1e1c },
+ { 0x0306, 0x1e1d },
+ { 0x0304, 0x0230 },
+ { 0x0304, 0x0231 },
+ { 0x030c, 0x01ef },
+ { 0x0314, 0x1fec },
+ { 0x0345, 0x1fb4 },
+ { 0x0345, 0x1fc4 },
+ { 0x0345, 0x1ff4 },
+ { 0x0308, 0x0407 },
+ { 0x0301, 0x0403 },
+ { 0x0308, 0x04de },
+ { 0x0301, 0x040c },
+ { 0x0308, 0x04e6 },
+ { 0x0308, 0x04f4 },
+ { 0x0308, 0x04f8 },
+ { 0x0308, 0x04ec },
+ { 0x0301, 0x0453 },
+ { 0x0308, 0x04df },
+ { 0x0301, 0x045c },
+ { 0x0308, 0x04e7 },
+ { 0x0308, 0x04f5 },
+ { 0x0308, 0x04f9 },
+ { 0x0308, 0x04ed },
+ { 0x0308, 0x0457 },
+ { 0x030f, 0x0476 },
+ { 0x030f, 0x0477 },
+ { 0x0308, 0x04da },
+ { 0x0308, 0x04db },
+ { 0x0308, 0x04ea },
+ { 0x0308, 0x04eb },
+ { 0x0654, 0x0624 },
+ { 0x0654, 0x0626 },
+ { 0x0654, 0x06c2 },
+ { 0x0654, 0x06d3 },
+ { 0x0654, 0x06c0 },
+ { 0x093c, 0x0929 },
+ { 0x093c, 0x0931 },
+ { 0x093c, 0x0934 },
+ { 0x0bd7, 0x0b94 },
+ { 0x0bbe, 0x0bcb },
+ { 0x0c56, 0x0c48 },
+ { 0x0cd5, 0x0cc0 },
+ { 0x0cd5, 0x0ccb },
+ { 0x0d3e, 0x0d4b },
+ { 0x0dca, 0x0ddd },
+ { 0x102e, 0x1026 },
+ { 0x0304, 0x1e38 },
+ { 0x0304, 0x1e39 },
+ { 0x0304, 0x1e5c },
+ { 0x0304, 0x1e5d },
+ { 0x0307, 0x1e68 },
+ { 0x0307, 0x1e69 },
+ { 0x0302, 0x1ec6 },
+ { 0x0302, 0x1ec7 },
+ { 0x0302, 0x1ed8 },
+ { 0x0302, 0x1ed9 },
+ { 0x0345, 0x1f82 },
+ { 0x0345, 0x1f83 },
+ { 0x0345, 0x1f84 },
+ { 0x0345, 0x1f85 },
+ { 0x0345, 0x1f86 },
+ { 0x0345, 0x1f87 },
+ { 0x0345, 0x1f8a },
+ { 0x0345, 0x1f8b },
+ { 0x0345, 0x1f8c },
+ { 0x0345, 0x1f8d },
+ { 0x0345, 0x1f8e },
+ { 0x0345, 0x1f8f },
+ { 0x0345, 0x1f92 },
+ { 0x0345, 0x1f93 },
+ { 0x0345, 0x1f94 },
+ { 0x0345, 0x1f95 },
+ { 0x0345, 0x1f96 },
+ { 0x0345, 0x1f97 },
+ { 0x0345, 0x1f9a },
+ { 0x0345, 0x1f9b },
+ { 0x0345, 0x1f9c },
+ { 0x0345, 0x1f9d },
+ { 0x0345, 0x1f9e },
+ { 0x0345, 0x1f9f },
+ { 0x0345, 0x1fa2 },
+ { 0x0345, 0x1fa3 },
+ { 0x0345, 0x1fa4 },
+ { 0x0345, 0x1fa5 },
+ { 0x0345, 0x1fa6 },
+ { 0x0345, 0x1fa7 },
+ { 0x0345, 0x1faa },
+ { 0x0345, 0x1fab },
+ { 0x0345, 0x1fac },
+ { 0x0345, 0x1fad },
+ { 0x0345, 0x1fae },
+ { 0x0345, 0x1faf },
+ { 0x0345, 0x1fb2 },
+ { 0x0345, 0x1fc2 },
+ { 0x0345, 0x1ff2 },
+ { 0x0345, 0x1fb7 },
+ { 0x0345, 0x1fc7 },
+ { 0x0345, 0x1ff7 },
+ { 0x0338, 0x219a },
+ { 0x0338, 0x219b },
+ { 0x0338, 0x21ae },
+ { 0x0338, 0x21cd },
+ { 0x0338, 0x21cf },
+ { 0x0338, 0x21ce },
+ { 0x0338, 0x2204 },
+ { 0x0338, 0x2209 },
+ { 0x0338, 0x220c },
+ { 0x0338, 0x2224 },
+ { 0x0338, 0x2226 },
+ { 0x0338, 0x2241 },
+ { 0x0338, 0x2244 },
+ { 0x0338, 0x2247 },
+ { 0x0338, 0x2249 },
+ { 0x0338, 0x226d },
+ { 0x0338, 0x2262 },
+ { 0x0338, 0x2270 },
+ { 0x0338, 0x2271 },
+ { 0x0338, 0x2274 },
+ { 0x0338, 0x2275 },
+ { 0x0338, 0x2278 },
+ { 0x0338, 0x2279 },
+ { 0x0338, 0x2280 },
+ { 0x0338, 0x2281 },
+ { 0x0338, 0x22e0 },
+ { 0x0338, 0x22e1 },
+ { 0x0338, 0x2284 },
+ { 0x0338, 0x2285 },
+ { 0x0338, 0x2288 },
+ { 0x0338, 0x2289 },
+ { 0x0338, 0x22e2 },
+ { 0x0338, 0x22e3 },
+ { 0x0338, 0x22ac },
+ { 0x0338, 0x22ad },
+ { 0x0338, 0x22ae },
+ { 0x0338, 0x22af },
+ { 0x0338, 0x22ea },
+ { 0x0338, 0x22eb },
+ { 0x0338, 0x22ec },
+ { 0x0338, 0x22ed },
+ { 0x3099, 0x3094 },
+ { 0x3099, 0x304c },
+ { 0x3099, 0x304e },
+ { 0x3099, 0x3050 },
+ { 0x3099, 0x3052 },
+ { 0x3099, 0x3054 },
+ { 0x3099, 0x3056 },
+ { 0x3099, 0x3058 },
+ { 0x3099, 0x305a },
+ { 0x3099, 0x305c },
+ { 0x3099, 0x305e },
+ { 0x3099, 0x3060 },
+ { 0x3099, 0x3062 },
+ { 0x3099, 0x3065 },
+ { 0x3099, 0x3067 },
+ { 0x3099, 0x3069 },
+ { 0x3099, 0x309e },
+ { 0x3099, 0x30f4 },
+ { 0x3099, 0x30ac },
+ { 0x3099, 0x30ae },
+ { 0x3099, 0x30b0 },
+ { 0x3099, 0x30b2 },
+ { 0x3099, 0x30b4 },
+ { 0x3099, 0x30b6 },
+ { 0x3099, 0x30b8 },
+ { 0x3099, 0x30ba },
+ { 0x3099, 0x30bc },
+ { 0x3099, 0x30be },
+ { 0x3099, 0x30c0 },
+ { 0x3099, 0x30c2 },
+ { 0x3099, 0x30c5 },
+ { 0x3099, 0x30c7 },
+ { 0x3099, 0x30c9 },
+ { 0x3099, 0x30f7 },
+ { 0x3099, 0x30f8 },
+ { 0x3099, 0x30f9 },
+ { 0x3099, 0x30fa },
+ { 0x3099, 0x30fe }
+};
+static const unsigned short compose_second_single[][2] = {
+ { 0x0627, 0x0622 },
+ { 0x0627, 0x0623 },
+ { 0x0627, 0x0625 },
+ { 0x09c7, 0x09cb },
+ { 0x09c7, 0x09cc },
+ { 0x0b47, 0x0b4b },
+ { 0x0b47, 0x0b48 },
+ { 0x0b47, 0x0b4c },
+ { 0x0bc6, 0x0bca },
+ { 0x0bc6, 0x0bcc },
+ { 0x0cc6, 0x0cca },
+ { 0x0cc6, 0x0cc7 },
+ { 0x0cc6, 0x0cc8 },
+ { 0x0d46, 0x0d4a },
+ { 0x0d46, 0x0d4c },
+ { 0x0dd9, 0x0dda },
+ { 0x0dd9, 0x0ddc },
+ { 0x0dd9, 0x0dde }
+};
+static const unsigned short compose_array[146][31] = {
+ { 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x0100, 0x0102, 0x0226, 0x00c4, 0x1ea2, 0x00c5, 0, 0x01cd, 0x0200, 0x0202, 0, 0, 0, 0x1ea0, 0, 0x1e00, 0, 0, 0x0104, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e04, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e06, 0, 0, 0, 0 },
+ { 0, 0x0106, 0x0108, 0, 0, 0, 0x010a, 0, 0, 0, 0, 0x010c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00c7, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e0a, 0, 0, 0, 0, 0x010e, 0, 0, 0, 0, 0, 0x1e0c, 0, 0, 0, 0x1e10, 0, 0x1e12, 0, 0, 0x1e0e, 0, 0, 0, 0 },
+ { 0x00c8, 0x00c9, 0x00ca, 0x1ebc, 0x0112, 0x0114, 0x0116, 0x00cb, 0x1eba, 0, 0, 0x011a, 0x0204, 0x0206, 0, 0, 0, 0x1eb8, 0, 0, 0, 0x0228, 0x0118, 0x1e18, 0, 0x1e1a, 0, 0, 0, 0, 0 },
+ { 0, 0x01f4, 0x011c, 0, 0x1e20, 0x011e, 0x0120, 0, 0, 0, 0, 0x01e6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0122, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0x0124, 0, 0, 0, 0x1e22, 0x1e26, 0, 0, 0, 0x021e, 0, 0, 0, 0, 0, 0x1e24, 0, 0, 0, 0x1e28, 0, 0, 0x1e2a, 0, 0, 0, 0, 0, 0 },
+ { 0x00cc, 0x00cd, 0x00ce, 0x0128, 0x012a, 0x012c, 0x0130, 0x00cf, 0x1ec8, 0, 0, 0x01cf, 0x0208, 0x020a, 0, 0, 0, 0x1eca, 0, 0, 0, 0, 0x012e, 0, 0, 0x1e2c, 0, 0, 0, 0, 0 },
+ { 0, 0x1e30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e8, 0, 0, 0, 0, 0, 0x1e32, 0, 0, 0, 0x0136, 0, 0, 0, 0, 0x1e34, 0, 0, 0, 0 },
+ { 0, 0x0139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013d, 0, 0, 0, 0, 0, 0x1e36, 0, 0, 0, 0x013b, 0, 0x1e3c, 0, 0, 0x1e3a, 0, 0, 0, 0 },
+ { 0, 0x1e3e, 0, 0, 0, 0, 0x1e40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x01f8, 0x0143, 0, 0x00d1, 0, 0, 0x1e44, 0, 0, 0, 0, 0x0147, 0, 0, 0, 0, 0, 0x1e46, 0, 0, 0, 0x0145, 0, 0x1e4a, 0, 0, 0x1e48, 0, 0, 0, 0 },
+ { 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x014c, 0x014e, 0x022e, 0x00d6, 0x1ece, 0, 0x0150, 0x01d1, 0x020c, 0x020e, 0, 0, 0x01a0, 0x1ecc, 0, 0, 0, 0, 0x01ea, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x1e54, 0, 0, 0, 0, 0x1e56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x0154, 0, 0, 0, 0, 0x1e58, 0, 0, 0, 0, 0x0158, 0x0210, 0x0212, 0, 0, 0, 0x1e5a, 0, 0, 0, 0x0156, 0, 0, 0, 0, 0x1e5e, 0, 0, 0, 0 },
+ { 0, 0x015a, 0x015c, 0, 0, 0, 0x1e60, 0, 0, 0, 0, 0x0160, 0, 0, 0, 0, 0, 0x1e62, 0, 0, 0x0218, 0x015e, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e6a, 0, 0, 0, 0, 0x0164, 0, 0, 0, 0, 0, 0x1e6c, 0, 0, 0x021a, 0x0162, 0, 0x1e70, 0, 0, 0x1e6e, 0, 0, 0, 0 },
+ { 0x00d9, 0x00da, 0x00db, 0x0168, 0x016a, 0x016c, 0, 0x00dc, 0x1ee6, 0x016e, 0x0170, 0x01d3, 0x0214, 0x0216, 0, 0, 0x01af, 0x1ee4, 0x1e72, 0, 0, 0, 0x0172, 0x1e76, 0, 0x1e74, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0x1e7c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e80, 0x1e82, 0x0174, 0, 0, 0, 0x1e86, 0x1e84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e8a, 0x1e8c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ef2, 0x00dd, 0x0176, 0x1ef8, 0x0232, 0, 0x1e8e, 0x0178, 0x1ef6, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x0179, 0x1e90, 0, 0, 0, 0x017b, 0, 0, 0, 0, 0x017d, 0, 0, 0, 0, 0, 0x1e92, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e94, 0, 0, 0, 0 },
+ { 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x0101, 0x0103, 0x0227, 0x00e4, 0x1ea3, 0x00e5, 0, 0x01ce, 0x0201, 0x0203, 0, 0, 0, 0x1ea1, 0, 0x1e01, 0, 0, 0x0105, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e05, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e07, 0, 0, 0, 0 },
+ { 0, 0x0107, 0x0109, 0, 0, 0, 0x010b, 0, 0, 0, 0, 0x010d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00e7, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e0b, 0, 0, 0, 0, 0x010f, 0, 0, 0, 0, 0, 0x1e0d, 0, 0, 0, 0x1e11, 0, 0x1e13, 0, 0, 0x1e0f, 0, 0, 0, 0 },
+ { 0x00e8, 0x00e9, 0x00ea, 0x1ebd, 0x0113, 0x0115, 0x0117, 0x00eb, 0x1ebb, 0, 0, 0x011b, 0x0205, 0x0207, 0, 0, 0, 0x1eb9, 0, 0, 0, 0x0229, 0x0119, 0x1e19, 0, 0x1e1b, 0, 0, 0, 0, 0 },
+ { 0, 0x01f5, 0x011d, 0, 0x1e21, 0x011f, 0x0121, 0, 0, 0, 0, 0x01e7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0123, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0x0125, 0, 0, 0, 0x1e23, 0x1e27, 0, 0, 0, 0x021f, 0, 0, 0, 0, 0, 0x1e25, 0, 0, 0, 0x1e29, 0, 0, 0x1e2b, 0, 0x1e96, 0, 0, 0, 0 },
+ { 0x00ec, 0x00ed, 0x00ee, 0x0129, 0x012b, 0x012d, 0, 0x00ef, 0x1ec9, 0, 0, 0x01d0, 0x0209, 0x020b, 0, 0, 0, 0x1ecb, 0, 0, 0, 0, 0x012f, 0, 0, 0x1e2d, 0, 0, 0, 0, 0 },
+ { 0, 0, 0x0135, 0, 0, 0, 0, 0, 0, 0, 0, 0x01f0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x1e31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e9, 0, 0, 0, 0, 0, 0x1e33, 0, 0, 0, 0x0137, 0, 0, 0, 0, 0x1e35, 0, 0, 0, 0 },
+ { 0, 0x013a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013e, 0, 0, 0, 0, 0, 0x1e37, 0, 0, 0, 0x013c, 0, 0x1e3d, 0, 0, 0x1e3b, 0, 0, 0, 0 },
+ { 0, 0x1e3f, 0, 0, 0, 0, 0x1e41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x01f9, 0x0144, 0, 0x00f1, 0, 0, 0x1e45, 0, 0, 0, 0, 0x0148, 0, 0, 0, 0, 0, 0x1e47, 0, 0, 0, 0x0146, 0, 0x1e4b, 0, 0, 0x1e49, 0, 0, 0, 0 },
+ { 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x014d, 0x014f, 0x022f, 0x00f6, 0x1ecf, 0, 0x0151, 0x01d2, 0x020d, 0x020f, 0, 0, 0x01a1, 0x1ecd, 0, 0, 0, 0, 0x01eb, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x1e55, 0, 0, 0, 0, 0x1e57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x0155, 0, 0, 0, 0, 0x1e59, 0, 0, 0, 0, 0x0159, 0x0211, 0x0213, 0, 0, 0, 0x1e5b, 0, 0, 0, 0x0157, 0, 0, 0, 0, 0x1e5f, 0, 0, 0, 0 },
+ { 0, 0x015b, 0x015d, 0, 0, 0, 0x1e61, 0, 0, 0, 0, 0x0161, 0, 0, 0, 0, 0, 0x1e63, 0, 0, 0x0219, 0x015f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e6b, 0x1e97, 0, 0, 0, 0x0165, 0, 0, 0, 0, 0, 0x1e6d, 0, 0, 0x021b, 0x0163, 0, 0x1e71, 0, 0, 0x1e6f, 0, 0, 0, 0 },
+ { 0x00f9, 0x00fa, 0x00fb, 0x0169, 0x016b, 0x016d, 0, 0x00fc, 0x1ee7, 0x016f, 0x0171, 0x01d4, 0x0215, 0x0217, 0, 0, 0x01b0, 0x1ee5, 0x1e73, 0, 0, 0, 0x0173, 0x1e77, 0, 0x1e75, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0x1e7d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e81, 0x1e83, 0x0175, 0, 0, 0, 0x1e87, 0x1e85, 0, 0x1e98, 0, 0, 0, 0, 0, 0, 0, 0x1e89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0x1e8b, 0x1e8d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ef3, 0x00fd, 0x0177, 0x1ef9, 0x0233, 0, 0x1e8f, 0x00ff, 0x1ef7, 0x1e99, 0, 0, 0, 0, 0, 0, 0, 0x1ef5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x017a, 0x1e91, 0, 0, 0, 0x017c, 0, 0, 0, 0, 0x017e, 0, 0, 0, 0, 0, 0x1e93, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e95, 0, 0, 0, 0 },
+ { 0x1fed, 0x0385, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc1, 0, 0, 0 },
+ { 0x1ea6, 0x1ea4, 0, 0x1eaa, 0, 0, 0, 0, 0x1ea8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x01fc, 0, 0, 0x01e2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ec0, 0x1ebe, 0, 0x1ec4, 0, 0, 0, 0, 0x1ec2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ed2, 0x1ed0, 0, 0x1ed6, 0, 0, 0, 0, 0x1ed4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x1e4c, 0, 0, 0x022c, 0, 0, 0x1e4e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x01db, 0x01d7, 0, 0, 0x01d5, 0, 0, 0, 0, 0, 0, 0x01d9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ea7, 0x1ea5, 0, 0x1eab, 0, 0, 0, 0, 0x1ea9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x01fd, 0, 0, 0x01e3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ec1, 0x1ebf, 0, 0x1ec5, 0, 0, 0, 0, 0x1ec3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ed3, 0x1ed1, 0, 0x1ed7, 0, 0, 0, 0, 0x1ed5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0x1e4d, 0, 0, 0x022d, 0, 0, 0x1e4f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x01dc, 0x01d8, 0, 0, 0x01d6, 0, 0, 0, 0, 0, 0, 0x01da, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1eb0, 0x1eae, 0, 0x1eb4, 0, 0, 0, 0, 0x1eb2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1eb1, 0x1eaf, 0, 0x1eb5, 0, 0, 0, 0, 0x1eb3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e14, 0x1e16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e15, 0x1e17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e50, 0x1e52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e51, 0x1e53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1edc, 0x1eda, 0, 0x1ee0, 0, 0, 0, 0, 0x1ede, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1edd, 0x1edb, 0, 0x1ee1, 0, 0, 0, 0, 0x1edf, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1eea, 0x1ee8, 0, 0x1eee, 0, 0, 0, 0, 0x1eec, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1eeb, 0x1ee9, 0, 0x1eef, 0, 0, 0, 0, 0x1eed, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1fba, 0x0386, 0, 0, 0x1fb9, 0x1fb8, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f08, 0x1f09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fbc, 0, 0 },
+ { 0x1fc8, 0x0388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f18, 0x1f19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1fca, 0x0389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f28, 0x1f29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcc, 0, 0 },
+ { 0x1fda, 0x038a, 0, 0, 0x1fd9, 0x1fd8, 0, 0x03aa, 0, 0, 0, 0, 0, 0, 0x1f38, 0x1f39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ff8, 0x038c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f48, 0x1f49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1fea, 0x038e, 0, 0, 0x1fe9, 0x1fe8, 0, 0x03ab, 0, 0, 0, 0, 0, 0, 0, 0x1f59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1ffa, 0x038f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f68, 0x1f69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ffc, 0, 0 },
+ { 0x1f70, 0x03ac, 0, 0, 0x1fb1, 0x1fb0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f00, 0x1f01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fb6, 0x1fb3, 0, 0 },
+ { 0x1f72, 0x03ad, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f10, 0x1f11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f74, 0x03ae, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f20, 0x1f21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc6, 0x1fc3, 0, 0 },
+ { 0x1f76, 0x03af, 0, 0, 0x1fd1, 0x1fd0, 0, 0x03ca, 0, 0, 0, 0, 0, 0, 0x1f30, 0x1f31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd6, 0, 0, 0 },
+ { 0x1f78, 0x03cc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f40, 0x1f41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe4, 0x1fe5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f7a, 0x03cd, 0, 0, 0x1fe1, 0x1fe0, 0, 0x03cb, 0, 0, 0, 0, 0, 0, 0x1f50, 0x1f51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe6, 0, 0, 0 },
+ { 0x1f7c, 0x03ce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f60, 0x1f61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ff6, 0x1ff3, 0, 0 },
+ { 0x1fd2, 0x0390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd7, 0, 0, 0 },
+ { 0x1fe2, 0x03b0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe7, 0, 0, 0 },
+ { 0, 0x03d3, 0, 0, 0, 0, 0, 0x03d4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0x04d0, 0, 0x04d2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x0400, 0, 0, 0, 0, 0x04d6, 0, 0x0401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0x04c1, 0, 0x04dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x040d, 0, 0, 0, 0x04e2, 0x0419, 0, 0x04e4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0x04ee, 0x040e, 0, 0x04f0, 0, 0, 0x04f2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0x04d1, 0, 0x04d3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x0450, 0, 0, 0, 0, 0x04d7, 0, 0x0451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0x04c2, 0, 0x04dd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x045d, 0, 0, 0, 0x04e3, 0x0439, 0, 0x04e5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0x04ef, 0x045e, 0, 0x04f1, 0, 0, 0x04f3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0x1eac, 0, 0, 0x1eb6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0x1ead, 0, 0, 0x1eb7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f02, 0x1f04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f06, 0x1f80, 0, 0 },
+ { 0x1f03, 0x1f05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f07, 0x1f81, 0, 0 },
+ { 0x1f0a, 0x1f0c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0e, 0x1f88, 0, 0 },
+ { 0x1f0b, 0x1f0d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0f, 0x1f89, 0, 0 },
+ { 0x1f12, 0x1f14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f13, 0x1f15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f1a, 0x1f1c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f1b, 0x1f1d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f22, 0x1f24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f26, 0x1f90, 0, 0 },
+ { 0x1f23, 0x1f25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f27, 0x1f91, 0, 0 },
+ { 0x1f2a, 0x1f2c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2e, 0x1f98, 0, 0 },
+ { 0x1f2b, 0x1f2d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2f, 0x1f99, 0, 0 },
+ { 0x1f32, 0x1f34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f36, 0, 0, 0 },
+ { 0x1f33, 0x1f35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f37, 0, 0, 0 },
+ { 0x1f3a, 0x1f3c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3e, 0, 0, 0 },
+ { 0x1f3b, 0x1f3d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3f, 0, 0, 0 },
+ { 0x1f42, 0x1f44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f43, 0x1f45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f4a, 0x1f4c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f4b, 0x1f4d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1f52, 0x1f54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f56, 0, 0, 0 },
+ { 0x1f53, 0x1f55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f57, 0, 0, 0 },
+ { 0x1f5b, 0x1f5d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f5f, 0, 0, 0 },
+ { 0x1f62, 0x1f64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f66, 0x1fa0, 0, 0 },
+ { 0x1f63, 0x1f65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f67, 0x1fa1, 0, 0 },
+ { 0x1f6a, 0x1f6c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6e, 0x1fa8, 0, 0 },
+ { 0x1f6b, 0x1f6d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6f, 0x1fa9, 0, 0 },
+ { 0x1fcd, 0x1fce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcf, 0, 0, 0 },
+ { 0x1fdd, 0x1fde, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fdf, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3070, 0x3071 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3073, 0x3074 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3076, 0x3077 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3079, 0x307a },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x307c, 0x307d },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d0, 0x30d1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d3, 0x30d4 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d6, 0x30d7 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d9, 0x30da },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30dc, 0x30dd }
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeDecompTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeDecompTables.h
new file mode 100644
index 00000000000..4bc34b18d99
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeDecompTables.h
@@ -0,0 +1,8526 @@
+// Generated by gen-unicode-tables.py
+
+typedef struct {
+ Unicode character;
+ int length;
+ int offset;
+} decomposition;
+
+#define DECOMP_TABLE_LENGTH 5143
+
+static const decomposition decomp_table[] = {
+ { 0xa0, 1, 0 },
+ { 0xa8, 2, 1 },
+ { 0xaa, 1, 3 },
+ { 0xaf, 2, 4 },
+ { 0xb2, 1, 6 },
+ { 0xb3, 1, 7 },
+ { 0xb4, 2, 8 },
+ { 0xb5, 1, 10 },
+ { 0xb8, 2, 11 },
+ { 0xb9, 1, 13 },
+ { 0xba, 1, 14 },
+ { 0xbc, 3, 15 },
+ { 0xbd, 3, 18 },
+ { 0xbe, 3, 21 },
+ { 0xc0, 2, 24 },
+ { 0xc1, 2, 26 },
+ { 0xc2, 2, 28 },
+ { 0xc3, 2, 30 },
+ { 0xc4, 2, 32 },
+ { 0xc5, 2, 34 },
+ { 0xc7, 2, 36 },
+ { 0xc8, 2, 38 },
+ { 0xc9, 2, 40 },
+ { 0xca, 2, 42 },
+ { 0xcb, 2, 44 },
+ { 0xcc, 2, 46 },
+ { 0xcd, 2, 48 },
+ { 0xce, 2, 50 },
+ { 0xcf, 2, 52 },
+ { 0xd1, 2, 54 },
+ { 0xd2, 2, 56 },
+ { 0xd3, 2, 58 },
+ { 0xd4, 2, 60 },
+ { 0xd5, 2, 62 },
+ { 0xd6, 2, 64 },
+ { 0xd9, 2, 66 },
+ { 0xda, 2, 68 },
+ { 0xdb, 2, 70 },
+ { 0xdc, 2, 72 },
+ { 0xdd, 2, 74 },
+ { 0xe0, 2, 76 },
+ { 0xe1, 2, 78 },
+ { 0xe2, 2, 80 },
+ { 0xe3, 2, 82 },
+ { 0xe4, 2, 84 },
+ { 0xe5, 2, 86 },
+ { 0xe7, 2, 88 },
+ { 0xe8, 2, 90 },
+ { 0xe9, 2, 92 },
+ { 0xea, 2, 94 },
+ { 0xeb, 2, 96 },
+ { 0xec, 2, 98 },
+ { 0xed, 2, 100 },
+ { 0xee, 2, 102 },
+ { 0xef, 2, 104 },
+ { 0xf1, 2, 106 },
+ { 0xf2, 2, 108 },
+ { 0xf3, 2, 110 },
+ { 0xf4, 2, 112 },
+ { 0xf5, 2, 114 },
+ { 0xf6, 2, 116 },
+ { 0xf9, 2, 118 },
+ { 0xfa, 2, 120 },
+ { 0xfb, 2, 122 },
+ { 0xfc, 2, 124 },
+ { 0xfd, 2, 126 },
+ { 0xff, 2, 128 },
+ { 0x100, 2, 130 },
+ { 0x101, 2, 132 },
+ { 0x102, 2, 134 },
+ { 0x103, 2, 136 },
+ { 0x104, 2, 138 },
+ { 0x105, 2, 140 },
+ { 0x106, 2, 142 },
+ { 0x107, 2, 144 },
+ { 0x108, 2, 146 },
+ { 0x109, 2, 148 },
+ { 0x10a, 2, 150 },
+ { 0x10b, 2, 152 },
+ { 0x10c, 2, 154 },
+ { 0x10d, 2, 156 },
+ { 0x10e, 2, 158 },
+ { 0x10f, 2, 160 },
+ { 0x112, 2, 162 },
+ { 0x113, 2, 164 },
+ { 0x114, 2, 166 },
+ { 0x115, 2, 168 },
+ { 0x116, 2, 170 },
+ { 0x117, 2, 172 },
+ { 0x118, 2, 174 },
+ { 0x119, 2, 176 },
+ { 0x11a, 2, 178 },
+ { 0x11b, 2, 180 },
+ { 0x11c, 2, 182 },
+ { 0x11d, 2, 184 },
+ { 0x11e, 2, 186 },
+ { 0x11f, 2, 188 },
+ { 0x120, 2, 190 },
+ { 0x121, 2, 192 },
+ { 0x122, 2, 194 },
+ { 0x123, 2, 196 },
+ { 0x124, 2, 198 },
+ { 0x125, 2, 200 },
+ { 0x128, 2, 202 },
+ { 0x129, 2, 204 },
+ { 0x12a, 2, 206 },
+ { 0x12b, 2, 208 },
+ { 0x12c, 2, 210 },
+ { 0x12d, 2, 212 },
+ { 0x12e, 2, 214 },
+ { 0x12f, 2, 216 },
+ { 0x130, 2, 218 },
+ { 0x132, 2, 220 },
+ { 0x133, 2, 222 },
+ { 0x134, 2, 224 },
+ { 0x135, 2, 226 },
+ { 0x136, 2, 228 },
+ { 0x137, 2, 230 },
+ { 0x139, 2, 232 },
+ { 0x13a, 2, 234 },
+ { 0x13b, 2, 236 },
+ { 0x13c, 2, 238 },
+ { 0x13d, 2, 240 },
+ { 0x13e, 2, 242 },
+ { 0x13f, 2, 244 },
+ { 0x140, 2, 246 },
+ { 0x143, 2, 248 },
+ { 0x144, 2, 250 },
+ { 0x145, 2, 252 },
+ { 0x146, 2, 254 },
+ { 0x147, 2, 256 },
+ { 0x148, 2, 258 },
+ { 0x149, 2, 260 },
+ { 0x14c, 2, 262 },
+ { 0x14d, 2, 264 },
+ { 0x14e, 2, 266 },
+ { 0x14f, 2, 268 },
+ { 0x150, 2, 270 },
+ { 0x151, 2, 272 },
+ { 0x154, 2, 274 },
+ { 0x155, 2, 276 },
+ { 0x156, 2, 278 },
+ { 0x157, 2, 280 },
+ { 0x158, 2, 282 },
+ { 0x159, 2, 284 },
+ { 0x15a, 2, 286 },
+ { 0x15b, 2, 288 },
+ { 0x15c, 2, 290 },
+ { 0x15d, 2, 292 },
+ { 0x15e, 2, 294 },
+ { 0x15f, 2, 296 },
+ { 0x160, 2, 298 },
+ { 0x161, 2, 300 },
+ { 0x162, 2, 302 },
+ { 0x163, 2, 304 },
+ { 0x164, 2, 306 },
+ { 0x165, 2, 308 },
+ { 0x168, 2, 310 },
+ { 0x169, 2, 312 },
+ { 0x16a, 2, 314 },
+ { 0x16b, 2, 316 },
+ { 0x16c, 2, 318 },
+ { 0x16d, 2, 320 },
+ { 0x16e, 2, 322 },
+ { 0x16f, 2, 324 },
+ { 0x170, 2, 326 },
+ { 0x171, 2, 328 },
+ { 0x172, 2, 330 },
+ { 0x173, 2, 332 },
+ { 0x174, 2, 334 },
+ { 0x175, 2, 336 },
+ { 0x176, 2, 338 },
+ { 0x177, 2, 340 },
+ { 0x178, 2, 342 },
+ { 0x179, 2, 344 },
+ { 0x17a, 2, 346 },
+ { 0x17b, 2, 348 },
+ { 0x17c, 2, 350 },
+ { 0x17d, 2, 352 },
+ { 0x17e, 2, 354 },
+ { 0x17f, 1, 356 },
+ { 0x1a0, 2, 357 },
+ { 0x1a1, 2, 359 },
+ { 0x1af, 2, 361 },
+ { 0x1b0, 2, 363 },
+ { 0x1c4, 3, 365 },
+ { 0x1c5, 3, 368 },
+ { 0x1c6, 3, 371 },
+ { 0x1c7, 2, 374 },
+ { 0x1c8, 2, 376 },
+ { 0x1c9, 2, 378 },
+ { 0x1ca, 2, 380 },
+ { 0x1cb, 2, 382 },
+ { 0x1cc, 2, 384 },
+ { 0x1cd, 2, 386 },
+ { 0x1ce, 2, 388 },
+ { 0x1cf, 2, 390 },
+ { 0x1d0, 2, 392 },
+ { 0x1d1, 2, 394 },
+ { 0x1d2, 2, 396 },
+ { 0x1d3, 2, 398 },
+ { 0x1d4, 2, 400 },
+ { 0x1d5, 3, 402 },
+ { 0x1d6, 3, 405 },
+ { 0x1d7, 3, 408 },
+ { 0x1d8, 3, 411 },
+ { 0x1d9, 3, 414 },
+ { 0x1da, 3, 417 },
+ { 0x1db, 3, 420 },
+ { 0x1dc, 3, 423 },
+ { 0x1de, 3, 426 },
+ { 0x1df, 3, 429 },
+ { 0x1e0, 3, 432 },
+ { 0x1e1, 3, 435 },
+ { 0x1e2, 2, 438 },
+ { 0x1e3, 2, 440 },
+ { 0x1e6, 2, 442 },
+ { 0x1e7, 2, 444 },
+ { 0x1e8, 2, 446 },
+ { 0x1e9, 2, 448 },
+ { 0x1ea, 2, 450 },
+ { 0x1eb, 2, 452 },
+ { 0x1ec, 3, 454 },
+ { 0x1ed, 3, 457 },
+ { 0x1ee, 2, 460 },
+ { 0x1ef, 2, 462 },
+ { 0x1f0, 2, 464 },
+ { 0x1f1, 2, 466 },
+ { 0x1f2, 2, 468 },
+ { 0x1f3, 2, 470 },
+ { 0x1f4, 2, 472 },
+ { 0x1f5, 2, 474 },
+ { 0x1f8, 2, 476 },
+ { 0x1f9, 2, 478 },
+ { 0x1fa, 3, 480 },
+ { 0x1fb, 3, 483 },
+ { 0x1fc, 2, 486 },
+ { 0x1fd, 2, 488 },
+ { 0x1fe, 2, 490 },
+ { 0x1ff, 2, 492 },
+ { 0x200, 2, 494 },
+ { 0x201, 2, 496 },
+ { 0x202, 2, 498 },
+ { 0x203, 2, 500 },
+ { 0x204, 2, 502 },
+ { 0x205, 2, 504 },
+ { 0x206, 2, 506 },
+ { 0x207, 2, 508 },
+ { 0x208, 2, 510 },
+ { 0x209, 2, 512 },
+ { 0x20a, 2, 514 },
+ { 0x20b, 2, 516 },
+ { 0x20c, 2, 518 },
+ { 0x20d, 2, 520 },
+ { 0x20e, 2, 522 },
+ { 0x20f, 2, 524 },
+ { 0x210, 2, 526 },
+ { 0x211, 2, 528 },
+ { 0x212, 2, 530 },
+ { 0x213, 2, 532 },
+ { 0x214, 2, 534 },
+ { 0x215, 2, 536 },
+ { 0x216, 2, 538 },
+ { 0x217, 2, 540 },
+ { 0x218, 2, 542 },
+ { 0x219, 2, 544 },
+ { 0x21a, 2, 546 },
+ { 0x21b, 2, 548 },
+ { 0x21e, 2, 550 },
+ { 0x21f, 2, 552 },
+ { 0x226, 2, 554 },
+ { 0x227, 2, 556 },
+ { 0x228, 2, 558 },
+ { 0x229, 2, 560 },
+ { 0x22a, 3, 562 },
+ { 0x22b, 3, 565 },
+ { 0x22c, 3, 568 },
+ { 0x22d, 3, 571 },
+ { 0x22e, 2, 574 },
+ { 0x22f, 2, 576 },
+ { 0x230, 3, 578 },
+ { 0x231, 3, 581 },
+ { 0x232, 2, 584 },
+ { 0x233, 2, 586 },
+ { 0x2b0, 1, 588 },
+ { 0x2b1, 1, 589 },
+ { 0x2b2, 1, 590 },
+ { 0x2b3, 1, 591 },
+ { 0x2b4, 1, 592 },
+ { 0x2b5, 1, 593 },
+ { 0x2b6, 1, 594 },
+ { 0x2b7, 1, 595 },
+ { 0x2b8, 1, 596 },
+ { 0x2d8, 2, 597 },
+ { 0x2d9, 2, 599 },
+ { 0x2da, 2, 601 },
+ { 0x2db, 2, 603 },
+ { 0x2dc, 2, 605 },
+ { 0x2dd, 2, 607 },
+ { 0x2e0, 1, 609 },
+ { 0x2e1, 1, 610 },
+ { 0x2e2, 1, 356 },
+ { 0x2e3, 1, 611 },
+ { 0x2e4, 1, 612 },
+ { 0x340, 1, 613 },
+ { 0x341, 1, 614 },
+ { 0x343, 1, 615 },
+ { 0x344, 2, 616 },
+ { 0x374, 1, 618 },
+ { 0x37a, 2, 619 },
+ { 0x37e, 1, 621 },
+ { 0x384, 2, 8 },
+ { 0x385, 3, 622 },
+ { 0x386, 2, 625 },
+ { 0x387, 1, 627 },
+ { 0x388, 2, 628 },
+ { 0x389, 2, 630 },
+ { 0x38a, 2, 632 },
+ { 0x38c, 2, 634 },
+ { 0x38e, 2, 636 },
+ { 0x38f, 2, 638 },
+ { 0x390, 3, 640 },
+ { 0x3aa, 2, 643 },
+ { 0x3ab, 2, 645 },
+ { 0x3ac, 2, 647 },
+ { 0x3ad, 2, 649 },
+ { 0x3ae, 2, 651 },
+ { 0x3af, 2, 653 },
+ { 0x3b0, 3, 655 },
+ { 0x3ca, 2, 658 },
+ { 0x3cb, 2, 660 },
+ { 0x3cc, 2, 662 },
+ { 0x3cd, 2, 664 },
+ { 0x3ce, 2, 666 },
+ { 0x3d0, 1, 668 },
+ { 0x3d1, 1, 669 },
+ { 0x3d2, 1, 670 },
+ { 0x3d3, 2, 636 },
+ { 0x3d4, 2, 645 },
+ { 0x3d5, 1, 671 },
+ { 0x3d6, 1, 672 },
+ { 0x3f0, 1, 673 },
+ { 0x3f1, 1, 674 },
+ { 0x3f2, 1, 675 },
+ { 0x3f4, 1, 676 },
+ { 0x3f5, 1, 677 },
+ { 0x400, 2, 678 },
+ { 0x401, 2, 680 },
+ { 0x403, 2, 682 },
+ { 0x407, 2, 684 },
+ { 0x40c, 2, 686 },
+ { 0x40d, 2, 688 },
+ { 0x40e, 2, 690 },
+ { 0x419, 2, 692 },
+ { 0x439, 2, 694 },
+ { 0x450, 2, 696 },
+ { 0x451, 2, 698 },
+ { 0x453, 2, 700 },
+ { 0x457, 2, 702 },
+ { 0x45c, 2, 704 },
+ { 0x45d, 2, 706 },
+ { 0x45e, 2, 708 },
+ { 0x476, 2, 710 },
+ { 0x477, 2, 712 },
+ { 0x4c1, 2, 714 },
+ { 0x4c2, 2, 716 },
+ { 0x4d0, 2, 718 },
+ { 0x4d1, 2, 720 },
+ { 0x4d2, 2, 722 },
+ { 0x4d3, 2, 724 },
+ { 0x4d6, 2, 726 },
+ { 0x4d7, 2, 728 },
+ { 0x4da, 2, 730 },
+ { 0x4db, 2, 732 },
+ { 0x4dc, 2, 734 },
+ { 0x4dd, 2, 736 },
+ { 0x4de, 2, 738 },
+ { 0x4df, 2, 740 },
+ { 0x4e2, 2, 742 },
+ { 0x4e3, 2, 744 },
+ { 0x4e4, 2, 746 },
+ { 0x4e5, 2, 748 },
+ { 0x4e6, 2, 750 },
+ { 0x4e7, 2, 752 },
+ { 0x4ea, 2, 754 },
+ { 0x4eb, 2, 756 },
+ { 0x4ec, 2, 758 },
+ { 0x4ed, 2, 760 },
+ { 0x4ee, 2, 762 },
+ { 0x4ef, 2, 764 },
+ { 0x4f0, 2, 766 },
+ { 0x4f1, 2, 768 },
+ { 0x4f2, 2, 770 },
+ { 0x4f3, 2, 772 },
+ { 0x4f4, 2, 774 },
+ { 0x4f5, 2, 776 },
+ { 0x4f8, 2, 778 },
+ { 0x4f9, 2, 780 },
+ { 0x587, 2, 782 },
+ { 0x622, 2, 784 },
+ { 0x623, 2, 786 },
+ { 0x624, 2, 788 },
+ { 0x625, 2, 790 },
+ { 0x626, 2, 792 },
+ { 0x675, 2, 794 },
+ { 0x676, 2, 796 },
+ { 0x677, 2, 798 },
+ { 0x678, 2, 800 },
+ { 0x6c0, 2, 802 },
+ { 0x6c2, 2, 804 },
+ { 0x6d3, 2, 806 },
+ { 0x929, 2, 808 },
+ { 0x931, 2, 810 },
+ { 0x934, 2, 812 },
+ { 0x958, 2, 814 },
+ { 0x959, 2, 816 },
+ { 0x95a, 2, 818 },
+ { 0x95b, 2, 820 },
+ { 0x95c, 2, 822 },
+ { 0x95d, 2, 824 },
+ { 0x95e, 2, 826 },
+ { 0x95f, 2, 828 },
+ { 0x9cb, 2, 830 },
+ { 0x9cc, 2, 832 },
+ { 0x9dc, 2, 834 },
+ { 0x9dd, 2, 836 },
+ { 0x9df, 2, 838 },
+ { 0xa33, 2, 840 },
+ { 0xa36, 2, 842 },
+ { 0xa59, 2, 844 },
+ { 0xa5a, 2, 846 },
+ { 0xa5b, 2, 848 },
+ { 0xa5e, 2, 850 },
+ { 0xb48, 2, 852 },
+ { 0xb4b, 2, 854 },
+ { 0xb4c, 2, 856 },
+ { 0xb5c, 2, 858 },
+ { 0xb5d, 2, 860 },
+ { 0xb94, 2, 862 },
+ { 0xbca, 2, 864 },
+ { 0xbcb, 2, 866 },
+ { 0xbcc, 2, 868 },
+ { 0xc48, 2, 870 },
+ { 0xcc0, 2, 872 },
+ { 0xcc7, 2, 874 },
+ { 0xcc8, 2, 876 },
+ { 0xcca, 2, 878 },
+ { 0xccb, 3, 880 },
+ { 0xd4a, 2, 883 },
+ { 0xd4b, 2, 885 },
+ { 0xd4c, 2, 887 },
+ { 0xdda, 2, 889 },
+ { 0xddc, 2, 891 },
+ { 0xddd, 3, 893 },
+ { 0xdde, 2, 896 },
+ { 0xe33, 2, 898 },
+ { 0xeb3, 2, 900 },
+ { 0xedc, 2, 902 },
+ { 0xedd, 2, 904 },
+ { 0xf0c, 1, 906 },
+ { 0xf43, 2, 907 },
+ { 0xf4d, 2, 909 },
+ { 0xf52, 2, 911 },
+ { 0xf57, 2, 913 },
+ { 0xf5c, 2, 915 },
+ { 0xf69, 2, 917 },
+ { 0xf73, 2, 919 },
+ { 0xf75, 2, 921 },
+ { 0xf76, 2, 923 },
+ { 0xf77, 3, 925 },
+ { 0xf78, 2, 928 },
+ { 0xf79, 3, 930 },
+ { 0xf81, 2, 933 },
+ { 0xf93, 2, 935 },
+ { 0xf9d, 2, 937 },
+ { 0xfa2, 2, 939 },
+ { 0xfa7, 2, 941 },
+ { 0xfac, 2, 943 },
+ { 0xfb9, 2, 945 },
+ { 0x1026, 2, 947 },
+ { 0x1e00, 2, 949 },
+ { 0x1e01, 2, 951 },
+ { 0x1e02, 2, 953 },
+ { 0x1e03, 2, 955 },
+ { 0x1e04, 2, 957 },
+ { 0x1e05, 2, 959 },
+ { 0x1e06, 2, 961 },
+ { 0x1e07, 2, 963 },
+ { 0x1e08, 3, 965 },
+ { 0x1e09, 3, 968 },
+ { 0x1e0a, 2, 971 },
+ { 0x1e0b, 2, 973 },
+ { 0x1e0c, 2, 975 },
+ { 0x1e0d, 2, 977 },
+ { 0x1e0e, 2, 979 },
+ { 0x1e0f, 2, 981 },
+ { 0x1e10, 2, 983 },
+ { 0x1e11, 2, 985 },
+ { 0x1e12, 2, 987 },
+ { 0x1e13, 2, 989 },
+ { 0x1e14, 3, 991 },
+ { 0x1e15, 3, 994 },
+ { 0x1e16, 3, 997 },
+ { 0x1e17, 3, 1000 },
+ { 0x1e18, 2, 1003 },
+ { 0x1e19, 2, 1005 },
+ { 0x1e1a, 2, 1007 },
+ { 0x1e1b, 2, 1009 },
+ { 0x1e1c, 3, 1011 },
+ { 0x1e1d, 3, 1014 },
+ { 0x1e1e, 2, 1017 },
+ { 0x1e1f, 2, 1019 },
+ { 0x1e20, 2, 1021 },
+ { 0x1e21, 2, 1023 },
+ { 0x1e22, 2, 1025 },
+ { 0x1e23, 2, 1027 },
+ { 0x1e24, 2, 1029 },
+ { 0x1e25, 2, 1031 },
+ { 0x1e26, 2, 1033 },
+ { 0x1e27, 2, 1035 },
+ { 0x1e28, 2, 1037 },
+ { 0x1e29, 2, 1039 },
+ { 0x1e2a, 2, 1041 },
+ { 0x1e2b, 2, 1043 },
+ { 0x1e2c, 2, 1045 },
+ { 0x1e2d, 2, 1047 },
+ { 0x1e2e, 3, 1049 },
+ { 0x1e2f, 3, 1052 },
+ { 0x1e30, 2, 1055 },
+ { 0x1e31, 2, 1057 },
+ { 0x1e32, 2, 1059 },
+ { 0x1e33, 2, 1061 },
+ { 0x1e34, 2, 1063 },
+ { 0x1e35, 2, 1065 },
+ { 0x1e36, 2, 1067 },
+ { 0x1e37, 2, 1069 },
+ { 0x1e38, 3, 1071 },
+ { 0x1e39, 3, 1074 },
+ { 0x1e3a, 2, 1077 },
+ { 0x1e3b, 2, 1079 },
+ { 0x1e3c, 2, 1081 },
+ { 0x1e3d, 2, 1083 },
+ { 0x1e3e, 2, 1085 },
+ { 0x1e3f, 2, 1087 },
+ { 0x1e40, 2, 1089 },
+ { 0x1e41, 2, 1091 },
+ { 0x1e42, 2, 1093 },
+ { 0x1e43, 2, 1095 },
+ { 0x1e44, 2, 1097 },
+ { 0x1e45, 2, 1099 },
+ { 0x1e46, 2, 1101 },
+ { 0x1e47, 2, 1103 },
+ { 0x1e48, 2, 1105 },
+ { 0x1e49, 2, 1107 },
+ { 0x1e4a, 2, 1109 },
+ { 0x1e4b, 2, 1111 },
+ { 0x1e4c, 3, 1113 },
+ { 0x1e4d, 3, 1116 },
+ { 0x1e4e, 3, 1119 },
+ { 0x1e4f, 3, 1122 },
+ { 0x1e50, 3, 1125 },
+ { 0x1e51, 3, 1128 },
+ { 0x1e52, 3, 1131 },
+ { 0x1e53, 3, 1134 },
+ { 0x1e54, 2, 1137 },
+ { 0x1e55, 2, 1139 },
+ { 0x1e56, 2, 1141 },
+ { 0x1e57, 2, 1143 },
+ { 0x1e58, 2, 1145 },
+ { 0x1e59, 2, 1147 },
+ { 0x1e5a, 2, 1149 },
+ { 0x1e5b, 2, 1151 },
+ { 0x1e5c, 3, 1153 },
+ { 0x1e5d, 3, 1156 },
+ { 0x1e5e, 2, 1159 },
+ { 0x1e5f, 2, 1161 },
+ { 0x1e60, 2, 1163 },
+ { 0x1e61, 2, 1165 },
+ { 0x1e62, 2, 1167 },
+ { 0x1e63, 2, 1169 },
+ { 0x1e64, 3, 1171 },
+ { 0x1e65, 3, 1174 },
+ { 0x1e66, 3, 1177 },
+ { 0x1e67, 3, 1180 },
+ { 0x1e68, 3, 1183 },
+ { 0x1e69, 3, 1186 },
+ { 0x1e6a, 2, 1189 },
+ { 0x1e6b, 2, 1191 },
+ { 0x1e6c, 2, 1193 },
+ { 0x1e6d, 2, 1195 },
+ { 0x1e6e, 2, 1197 },
+ { 0x1e6f, 2, 1199 },
+ { 0x1e70, 2, 1201 },
+ { 0x1e71, 2, 1203 },
+ { 0x1e72, 2, 1205 },
+ { 0x1e73, 2, 1207 },
+ { 0x1e74, 2, 1209 },
+ { 0x1e75, 2, 1211 },
+ { 0x1e76, 2, 1213 },
+ { 0x1e77, 2, 1215 },
+ { 0x1e78, 3, 1217 },
+ { 0x1e79, 3, 1220 },
+ { 0x1e7a, 3, 1223 },
+ { 0x1e7b, 3, 1226 },
+ { 0x1e7c, 2, 1229 },
+ { 0x1e7d, 2, 1231 },
+ { 0x1e7e, 2, 1233 },
+ { 0x1e7f, 2, 1235 },
+ { 0x1e80, 2, 1237 },
+ { 0x1e81, 2, 1239 },
+ { 0x1e82, 2, 1241 },
+ { 0x1e83, 2, 1243 },
+ { 0x1e84, 2, 1245 },
+ { 0x1e85, 2, 1247 },
+ { 0x1e86, 2, 1249 },
+ { 0x1e87, 2, 1251 },
+ { 0x1e88, 2, 1253 },
+ { 0x1e89, 2, 1255 },
+ { 0x1e8a, 2, 1257 },
+ { 0x1e8b, 2, 1259 },
+ { 0x1e8c, 2, 1261 },
+ { 0x1e8d, 2, 1263 },
+ { 0x1e8e, 2, 1265 },
+ { 0x1e8f, 2, 1267 },
+ { 0x1e90, 2, 1269 },
+ { 0x1e91, 2, 1271 },
+ { 0x1e92, 2, 1273 },
+ { 0x1e93, 2, 1275 },
+ { 0x1e94, 2, 1277 },
+ { 0x1e95, 2, 1279 },
+ { 0x1e96, 2, 1281 },
+ { 0x1e97, 2, 1283 },
+ { 0x1e98, 2, 1285 },
+ { 0x1e99, 2, 1287 },
+ { 0x1e9a, 2, 1289 },
+ { 0x1e9b, 2, 1165 },
+ { 0x1ea0, 2, 1291 },
+ { 0x1ea1, 2, 1293 },
+ { 0x1ea2, 2, 1295 },
+ { 0x1ea3, 2, 1297 },
+ { 0x1ea4, 3, 1299 },
+ { 0x1ea5, 3, 1302 },
+ { 0x1ea6, 3, 1305 },
+ { 0x1ea7, 3, 1308 },
+ { 0x1ea8, 3, 1311 },
+ { 0x1ea9, 3, 1314 },
+ { 0x1eaa, 3, 1317 },
+ { 0x1eab, 3, 1320 },
+ { 0x1eac, 3, 1323 },
+ { 0x1ead, 3, 1326 },
+ { 0x1eae, 3, 1329 },
+ { 0x1eaf, 3, 1332 },
+ { 0x1eb0, 3, 1335 },
+ { 0x1eb1, 3, 1338 },
+ { 0x1eb2, 3, 1341 },
+ { 0x1eb3, 3, 1344 },
+ { 0x1eb4, 3, 1347 },
+ { 0x1eb5, 3, 1350 },
+ { 0x1eb6, 3, 1353 },
+ { 0x1eb7, 3, 1356 },
+ { 0x1eb8, 2, 1359 },
+ { 0x1eb9, 2, 1361 },
+ { 0x1eba, 2, 1363 },
+ { 0x1ebb, 2, 1365 },
+ { 0x1ebc, 2, 1367 },
+ { 0x1ebd, 2, 1369 },
+ { 0x1ebe, 3, 1371 },
+ { 0x1ebf, 3, 1374 },
+ { 0x1ec0, 3, 1377 },
+ { 0x1ec1, 3, 1380 },
+ { 0x1ec2, 3, 1383 },
+ { 0x1ec3, 3, 1386 },
+ { 0x1ec4, 3, 1389 },
+ { 0x1ec5, 3, 1392 },
+ { 0x1ec6, 3, 1395 },
+ { 0x1ec7, 3, 1398 },
+ { 0x1ec8, 2, 1401 },
+ { 0x1ec9, 2, 1403 },
+ { 0x1eca, 2, 1405 },
+ { 0x1ecb, 2, 1407 },
+ { 0x1ecc, 2, 1409 },
+ { 0x1ecd, 2, 1411 },
+ { 0x1ece, 2, 1413 },
+ { 0x1ecf, 2, 1415 },
+ { 0x1ed0, 3, 1417 },
+ { 0x1ed1, 3, 1420 },
+ { 0x1ed2, 3, 1423 },
+ { 0x1ed3, 3, 1426 },
+ { 0x1ed4, 3, 1429 },
+ { 0x1ed5, 3, 1432 },
+ { 0x1ed6, 3, 1435 },
+ { 0x1ed7, 3, 1438 },
+ { 0x1ed8, 3, 1441 },
+ { 0x1ed9, 3, 1444 },
+ { 0x1eda, 3, 1447 },
+ { 0x1edb, 3, 1450 },
+ { 0x1edc, 3, 1453 },
+ { 0x1edd, 3, 1456 },
+ { 0x1ede, 3, 1459 },
+ { 0x1edf, 3, 1462 },
+ { 0x1ee0, 3, 1465 },
+ { 0x1ee1, 3, 1468 },
+ { 0x1ee2, 3, 1471 },
+ { 0x1ee3, 3, 1474 },
+ { 0x1ee4, 2, 1477 },
+ { 0x1ee5, 2, 1479 },
+ { 0x1ee6, 2, 1481 },
+ { 0x1ee7, 2, 1483 },
+ { 0x1ee8, 3, 1485 },
+ { 0x1ee9, 3, 1488 },
+ { 0x1eea, 3, 1491 },
+ { 0x1eeb, 3, 1494 },
+ { 0x1eec, 3, 1497 },
+ { 0x1eed, 3, 1500 },
+ { 0x1eee, 3, 1503 },
+ { 0x1eef, 3, 1506 },
+ { 0x1ef0, 3, 1509 },
+ { 0x1ef1, 3, 1512 },
+ { 0x1ef2, 2, 1515 },
+ { 0x1ef3, 2, 1517 },
+ { 0x1ef4, 2, 1519 },
+ { 0x1ef5, 2, 1521 },
+ { 0x1ef6, 2, 1523 },
+ { 0x1ef7, 2, 1525 },
+ { 0x1ef8, 2, 1527 },
+ { 0x1ef9, 2, 1529 },
+ { 0x1f00, 2, 1531 },
+ { 0x1f01, 2, 1533 },
+ { 0x1f02, 3, 1535 },
+ { 0x1f03, 3, 1538 },
+ { 0x1f04, 3, 1541 },
+ { 0x1f05, 3, 1544 },
+ { 0x1f06, 3, 1547 },
+ { 0x1f07, 3, 1550 },
+ { 0x1f08, 2, 1553 },
+ { 0x1f09, 2, 1555 },
+ { 0x1f0a, 3, 1557 },
+ { 0x1f0b, 3, 1560 },
+ { 0x1f0c, 3, 1563 },
+ { 0x1f0d, 3, 1566 },
+ { 0x1f0e, 3, 1569 },
+ { 0x1f0f, 3, 1572 },
+ { 0x1f10, 2, 1575 },
+ { 0x1f11, 2, 1577 },
+ { 0x1f12, 3, 1579 },
+ { 0x1f13, 3, 1582 },
+ { 0x1f14, 3, 1585 },
+ { 0x1f15, 3, 1588 },
+ { 0x1f18, 2, 1591 },
+ { 0x1f19, 2, 1593 },
+ { 0x1f1a, 3, 1595 },
+ { 0x1f1b, 3, 1598 },
+ { 0x1f1c, 3, 1601 },
+ { 0x1f1d, 3, 1604 },
+ { 0x1f20, 2, 1607 },
+ { 0x1f21, 2, 1609 },
+ { 0x1f22, 3, 1611 },
+ { 0x1f23, 3, 1614 },
+ { 0x1f24, 3, 1617 },
+ { 0x1f25, 3, 1620 },
+ { 0x1f26, 3, 1623 },
+ { 0x1f27, 3, 1626 },
+ { 0x1f28, 2, 1629 },
+ { 0x1f29, 2, 1631 },
+ { 0x1f2a, 3, 1633 },
+ { 0x1f2b, 3, 1636 },
+ { 0x1f2c, 3, 1639 },
+ { 0x1f2d, 3, 1642 },
+ { 0x1f2e, 3, 1645 },
+ { 0x1f2f, 3, 1648 },
+ { 0x1f30, 2, 1651 },
+ { 0x1f31, 2, 1653 },
+ { 0x1f32, 3, 1655 },
+ { 0x1f33, 3, 1658 },
+ { 0x1f34, 3, 1661 },
+ { 0x1f35, 3, 1664 },
+ { 0x1f36, 3, 1667 },
+ { 0x1f37, 3, 1670 },
+ { 0x1f38, 2, 1673 },
+ { 0x1f39, 2, 1675 },
+ { 0x1f3a, 3, 1677 },
+ { 0x1f3b, 3, 1680 },
+ { 0x1f3c, 3, 1683 },
+ { 0x1f3d, 3, 1686 },
+ { 0x1f3e, 3, 1689 },
+ { 0x1f3f, 3, 1692 },
+ { 0x1f40, 2, 1695 },
+ { 0x1f41, 2, 1697 },
+ { 0x1f42, 3, 1699 },
+ { 0x1f43, 3, 1702 },
+ { 0x1f44, 3, 1705 },
+ { 0x1f45, 3, 1708 },
+ { 0x1f48, 2, 1711 },
+ { 0x1f49, 2, 1713 },
+ { 0x1f4a, 3, 1715 },
+ { 0x1f4b, 3, 1718 },
+ { 0x1f4c, 3, 1721 },
+ { 0x1f4d, 3, 1724 },
+ { 0x1f50, 2, 1727 },
+ { 0x1f51, 2, 1729 },
+ { 0x1f52, 3, 1731 },
+ { 0x1f53, 3, 1734 },
+ { 0x1f54, 3, 1737 },
+ { 0x1f55, 3, 1740 },
+ { 0x1f56, 3, 1743 },
+ { 0x1f57, 3, 1746 },
+ { 0x1f59, 2, 1749 },
+ { 0x1f5b, 3, 1751 },
+ { 0x1f5d, 3, 1754 },
+ { 0x1f5f, 3, 1757 },
+ { 0x1f60, 2, 1760 },
+ { 0x1f61, 2, 1762 },
+ { 0x1f62, 3, 1764 },
+ { 0x1f63, 3, 1767 },
+ { 0x1f64, 3, 1770 },
+ { 0x1f65, 3, 1773 },
+ { 0x1f66, 3, 1776 },
+ { 0x1f67, 3, 1779 },
+ { 0x1f68, 2, 1782 },
+ { 0x1f69, 2, 1784 },
+ { 0x1f6a, 3, 1786 },
+ { 0x1f6b, 3, 1789 },
+ { 0x1f6c, 3, 1792 },
+ { 0x1f6d, 3, 1795 },
+ { 0x1f6e, 3, 1798 },
+ { 0x1f6f, 3, 1801 },
+ { 0x1f70, 2, 1804 },
+ { 0x1f71, 2, 647 },
+ { 0x1f72, 2, 1806 },
+ { 0x1f73, 2, 649 },
+ { 0x1f74, 2, 1808 },
+ { 0x1f75, 2, 651 },
+ { 0x1f76, 2, 1810 },
+ { 0x1f77, 2, 653 },
+ { 0x1f78, 2, 1812 },
+ { 0x1f79, 2, 662 },
+ { 0x1f7a, 2, 1814 },
+ { 0x1f7b, 2, 664 },
+ { 0x1f7c, 2, 1816 },
+ { 0x1f7d, 2, 666 },
+ { 0x1f80, 3, 1818 },
+ { 0x1f81, 3, 1821 },
+ { 0x1f82, 4, 1824 },
+ { 0x1f83, 4, 1828 },
+ { 0x1f84, 4, 1832 },
+ { 0x1f85, 4, 1836 },
+ { 0x1f86, 4, 1840 },
+ { 0x1f87, 4, 1844 },
+ { 0x1f88, 3, 1848 },
+ { 0x1f89, 3, 1851 },
+ { 0x1f8a, 4, 1854 },
+ { 0x1f8b, 4, 1858 },
+ { 0x1f8c, 4, 1862 },
+ { 0x1f8d, 4, 1866 },
+ { 0x1f8e, 4, 1870 },
+ { 0x1f8f, 4, 1874 },
+ { 0x1f90, 3, 1878 },
+ { 0x1f91, 3, 1881 },
+ { 0x1f92, 4, 1884 },
+ { 0x1f93, 4, 1888 },
+ { 0x1f94, 4, 1892 },
+ { 0x1f95, 4, 1896 },
+ { 0x1f96, 4, 1900 },
+ { 0x1f97, 4, 1904 },
+ { 0x1f98, 3, 1908 },
+ { 0x1f99, 3, 1911 },
+ { 0x1f9a, 4, 1914 },
+ { 0x1f9b, 4, 1918 },
+ { 0x1f9c, 4, 1922 },
+ { 0x1f9d, 4, 1926 },
+ { 0x1f9e, 4, 1930 },
+ { 0x1f9f, 4, 1934 },
+ { 0x1fa0, 3, 1938 },
+ { 0x1fa1, 3, 1941 },
+ { 0x1fa2, 4, 1944 },
+ { 0x1fa3, 4, 1948 },
+ { 0x1fa4, 4, 1952 },
+ { 0x1fa5, 4, 1956 },
+ { 0x1fa6, 4, 1960 },
+ { 0x1fa7, 4, 1964 },
+ { 0x1fa8, 3, 1968 },
+ { 0x1fa9, 3, 1971 },
+ { 0x1faa, 4, 1974 },
+ { 0x1fab, 4, 1978 },
+ { 0x1fac, 4, 1982 },
+ { 0x1fad, 4, 1986 },
+ { 0x1fae, 4, 1990 },
+ { 0x1faf, 4, 1994 },
+ { 0x1fb0, 2, 1998 },
+ { 0x1fb1, 2, 2000 },
+ { 0x1fb2, 3, 2002 },
+ { 0x1fb3, 2, 2005 },
+ { 0x1fb4, 3, 2007 },
+ { 0x1fb6, 2, 2010 },
+ { 0x1fb7, 3, 2012 },
+ { 0x1fb8, 2, 2015 },
+ { 0x1fb9, 2, 2017 },
+ { 0x1fba, 2, 2019 },
+ { 0x1fbb, 2, 625 },
+ { 0x1fbc, 2, 2021 },
+ { 0x1fbd, 2, 2023 },
+ { 0x1fbe, 1, 2025 },
+ { 0x1fbf, 2, 2023 },
+ { 0x1fc0, 2, 2026 },
+ { 0x1fc1, 3, 2028 },
+ { 0x1fc2, 3, 2031 },
+ { 0x1fc3, 2, 2034 },
+ { 0x1fc4, 3, 2036 },
+ { 0x1fc6, 2, 2039 },
+ { 0x1fc7, 3, 2041 },
+ { 0x1fc8, 2, 2044 },
+ { 0x1fc9, 2, 628 },
+ { 0x1fca, 2, 2046 },
+ { 0x1fcb, 2, 630 },
+ { 0x1fcc, 2, 2048 },
+ { 0x1fcd, 3, 2050 },
+ { 0x1fce, 3, 2053 },
+ { 0x1fcf, 3, 2056 },
+ { 0x1fd0, 2, 2059 },
+ { 0x1fd1, 2, 2061 },
+ { 0x1fd2, 3, 2063 },
+ { 0x1fd3, 3, 640 },
+ { 0x1fd6, 2, 2066 },
+ { 0x1fd7, 3, 2068 },
+ { 0x1fd8, 2, 2071 },
+ { 0x1fd9, 2, 2073 },
+ { 0x1fda, 2, 2075 },
+ { 0x1fdb, 2, 632 },
+ { 0x1fdd, 3, 2077 },
+ { 0x1fde, 3, 2080 },
+ { 0x1fdf, 3, 2083 },
+ { 0x1fe0, 2, 2086 },
+ { 0x1fe1, 2, 2088 },
+ { 0x1fe2, 3, 2090 },
+ { 0x1fe3, 3, 655 },
+ { 0x1fe4, 2, 2093 },
+ { 0x1fe5, 2, 2095 },
+ { 0x1fe6, 2, 2097 },
+ { 0x1fe7, 3, 2099 },
+ { 0x1fe8, 2, 2102 },
+ { 0x1fe9, 2, 2104 },
+ { 0x1fea, 2, 2106 },
+ { 0x1feb, 2, 636 },
+ { 0x1fec, 2, 2108 },
+ { 0x1fed, 3, 2110 },
+ { 0x1fee, 3, 622 },
+ { 0x1fef, 1, 2113 },
+ { 0x1ff2, 3, 2114 },
+ { 0x1ff3, 2, 2117 },
+ { 0x1ff4, 3, 2119 },
+ { 0x1ff6, 2, 2122 },
+ { 0x1ff7, 3, 2124 },
+ { 0x1ff8, 2, 2127 },
+ { 0x1ff9, 2, 634 },
+ { 0x1ffa, 2, 2129 },
+ { 0x1ffb, 2, 638 },
+ { 0x1ffc, 2, 2131 },
+ { 0x1ffd, 2, 8 },
+ { 0x1ffe, 2, 2133 },
+ { 0x2000, 1, 0 },
+ { 0x2001, 1, 0 },
+ { 0x2002, 1, 0 },
+ { 0x2003, 1, 0 },
+ { 0x2004, 1, 0 },
+ { 0x2005, 1, 0 },
+ { 0x2006, 1, 0 },
+ { 0x2007, 1, 0 },
+ { 0x2008, 1, 0 },
+ { 0x2009, 1, 0 },
+ { 0x200a, 1, 0 },
+ { 0x2011, 1, 2135 },
+ { 0x2017, 2, 2136 },
+ { 0x2024, 1, 2138 },
+ { 0x2025, 2, 2139 },
+ { 0x2026, 3, 2141 },
+ { 0x202f, 1, 0 },
+ { 0x2033, 2, 2144 },
+ { 0x2034, 3, 2146 },
+ { 0x2036, 2, 2149 },
+ { 0x2037, 3, 2151 },
+ { 0x203c, 2, 2154 },
+ { 0x203e, 2, 2156 },
+ { 0x2047, 2, 2158 },
+ { 0x2048, 2, 2160 },
+ { 0x2049, 2, 2162 },
+ { 0x2057, 4, 2164 },
+ { 0x205f, 1, 0 },
+ { 0x2070, 1, 2168 },
+ { 0x2071, 1, 2169 },
+ { 0x2074, 1, 2170 },
+ { 0x2075, 1, 2171 },
+ { 0x2076, 1, 2172 },
+ { 0x2077, 1, 2173 },
+ { 0x2078, 1, 2174 },
+ { 0x2079, 1, 2175 },
+ { 0x207a, 1, 2176 },
+ { 0x207b, 1, 2177 },
+ { 0x207c, 1, 2178 },
+ { 0x207d, 1, 2179 },
+ { 0x207e, 1, 2180 },
+ { 0x207f, 1, 2181 },
+ { 0x2080, 1, 2168 },
+ { 0x2081, 1, 13 },
+ { 0x2082, 1, 6 },
+ { 0x2083, 1, 7 },
+ { 0x2084, 1, 2170 },
+ { 0x2085, 1, 2171 },
+ { 0x2086, 1, 2172 },
+ { 0x2087, 1, 2173 },
+ { 0x2088, 1, 2174 },
+ { 0x2089, 1, 2175 },
+ { 0x208a, 1, 2176 },
+ { 0x208b, 1, 2177 },
+ { 0x208c, 1, 2178 },
+ { 0x208d, 1, 2179 },
+ { 0x208e, 1, 2180 },
+ { 0x20a8, 2, 2182 },
+ { 0x2100, 3, 2184 },
+ { 0x2101, 3, 2187 },
+ { 0x2102, 1, 2190 },
+ { 0x2103, 2, 2191 },
+ { 0x2105, 3, 2193 },
+ { 0x2106, 3, 2196 },
+ { 0x2107, 1, 2199 },
+ { 0x2109, 2, 2200 },
+ { 0x210a, 1, 2202 },
+ { 0x210b, 1, 2203 },
+ { 0x210c, 1, 2203 },
+ { 0x210d, 1, 2203 },
+ { 0x210e, 1, 588 },
+ { 0x210f, 1, 2204 },
+ { 0x2110, 1, 2205 },
+ { 0x2111, 1, 2205 },
+ { 0x2112, 1, 2206 },
+ { 0x2113, 1, 610 },
+ { 0x2115, 1, 2207 },
+ { 0x2116, 2, 2208 },
+ { 0x2119, 1, 2210 },
+ { 0x211a, 1, 2211 },
+ { 0x211b, 1, 2212 },
+ { 0x211c, 1, 2212 },
+ { 0x211d, 1, 2212 },
+ { 0x2120, 2, 2213 },
+ { 0x2121, 3, 2215 },
+ { 0x2122, 2, 2218 },
+ { 0x2124, 1, 2220 },
+ { 0x2126, 1, 2221 },
+ { 0x2128, 1, 2220 },
+ { 0x212a, 1, 2222 },
+ { 0x212b, 2, 34 },
+ { 0x212c, 1, 2223 },
+ { 0x212d, 1, 2190 },
+ { 0x212f, 1, 2224 },
+ { 0x2130, 1, 2225 },
+ { 0x2131, 1, 2226 },
+ { 0x2133, 1, 2227 },
+ { 0x2134, 1, 14 },
+ { 0x2135, 1, 2228 },
+ { 0x2136, 1, 2229 },
+ { 0x2137, 1, 2230 },
+ { 0x2138, 1, 2231 },
+ { 0x2139, 1, 2169 },
+ { 0x213d, 1, 2232 },
+ { 0x213e, 1, 2233 },
+ { 0x213f, 1, 2234 },
+ { 0x2140, 1, 2235 },
+ { 0x2145, 1, 2236 },
+ { 0x2146, 1, 2237 },
+ { 0x2147, 1, 2224 },
+ { 0x2148, 1, 2169 },
+ { 0x2149, 1, 590 },
+ { 0x2153, 3, 2238 },
+ { 0x2154, 3, 2241 },
+ { 0x2155, 3, 2244 },
+ { 0x2156, 3, 2247 },
+ { 0x2157, 3, 2250 },
+ { 0x2158, 3, 2253 },
+ { 0x2159, 3, 2256 },
+ { 0x215a, 3, 2259 },
+ { 0x215b, 3, 2262 },
+ { 0x215c, 3, 2265 },
+ { 0x215d, 3, 2268 },
+ { 0x215e, 3, 2271 },
+ { 0x215f, 2, 2274 },
+ { 0x2160, 1, 2205 },
+ { 0x2161, 2, 2276 },
+ { 0x2162, 3, 2278 },
+ { 0x2163, 2, 2281 },
+ { 0x2164, 1, 2283 },
+ { 0x2165, 2, 2284 },
+ { 0x2166, 3, 2286 },
+ { 0x2167, 4, 2289 },
+ { 0x2168, 2, 2293 },
+ { 0x2169, 1, 2295 },
+ { 0x216a, 2, 2296 },
+ { 0x216b, 3, 2298 },
+ { 0x216c, 1, 2206 },
+ { 0x216d, 1, 2190 },
+ { 0x216e, 1, 2236 },
+ { 0x216f, 1, 2227 },
+ { 0x2170, 1, 2169 },
+ { 0x2171, 2, 2301 },
+ { 0x2172, 3, 2303 },
+ { 0x2173, 2, 2306 },
+ { 0x2174, 1, 2308 },
+ { 0x2175, 2, 2309 },
+ { 0x2176, 3, 2311 },
+ { 0x2177, 4, 2314 },
+ { 0x2178, 2, 2318 },
+ { 0x2179, 1, 611 },
+ { 0x217a, 2, 2320 },
+ { 0x217b, 3, 2322 },
+ { 0x217c, 1, 610 },
+ { 0x217d, 1, 2325 },
+ { 0x217e, 1, 2237 },
+ { 0x217f, 1, 2326 },
+ { 0x219a, 2, 2327 },
+ { 0x219b, 2, 2329 },
+ { 0x21ae, 2, 2331 },
+ { 0x21cd, 2, 2333 },
+ { 0x21ce, 2, 2335 },
+ { 0x21cf, 2, 2337 },
+ { 0x2204, 2, 2339 },
+ { 0x2209, 2, 2341 },
+ { 0x220c, 2, 2343 },
+ { 0x2224, 2, 2345 },
+ { 0x2226, 2, 2347 },
+ { 0x222c, 2, 2349 },
+ { 0x222d, 3, 2351 },
+ { 0x222f, 2, 2354 },
+ { 0x2230, 3, 2356 },
+ { 0x2241, 2, 2359 },
+ { 0x2244, 2, 2361 },
+ { 0x2247, 2, 2363 },
+ { 0x2249, 2, 2365 },
+ { 0x2260, 2, 2367 },
+ { 0x2262, 2, 2369 },
+ { 0x226d, 2, 2371 },
+ { 0x226e, 2, 2373 },
+ { 0x226f, 2, 2375 },
+ { 0x2270, 2, 2377 },
+ { 0x2271, 2, 2379 },
+ { 0x2274, 2, 2381 },
+ { 0x2275, 2, 2383 },
+ { 0x2278, 2, 2385 },
+ { 0x2279, 2, 2387 },
+ { 0x2280, 2, 2389 },
+ { 0x2281, 2, 2391 },
+ { 0x2284, 2, 2393 },
+ { 0x2285, 2, 2395 },
+ { 0x2288, 2, 2397 },
+ { 0x2289, 2, 2399 },
+ { 0x22ac, 2, 2401 },
+ { 0x22ad, 2, 2403 },
+ { 0x22ae, 2, 2405 },
+ { 0x22af, 2, 2407 },
+ { 0x22e0, 2, 2409 },
+ { 0x22e1, 2, 2411 },
+ { 0x22e2, 2, 2413 },
+ { 0x22e3, 2, 2415 },
+ { 0x22ea, 2, 2417 },
+ { 0x22eb, 2, 2419 },
+ { 0x22ec, 2, 2421 },
+ { 0x22ed, 2, 2423 },
+ { 0x2329, 1, 2425 },
+ { 0x232a, 1, 2426 },
+ { 0x2460, 1, 13 },
+ { 0x2461, 1, 6 },
+ { 0x2462, 1, 7 },
+ { 0x2463, 1, 2170 },
+ { 0x2464, 1, 2171 },
+ { 0x2465, 1, 2172 },
+ { 0x2466, 1, 2173 },
+ { 0x2467, 1, 2174 },
+ { 0x2468, 1, 2175 },
+ { 0x2469, 2, 2427 },
+ { 0x246a, 2, 2429 },
+ { 0x246b, 2, 2431 },
+ { 0x246c, 2, 2433 },
+ { 0x246d, 2, 2435 },
+ { 0x246e, 2, 2437 },
+ { 0x246f, 2, 2439 },
+ { 0x2470, 2, 2441 },
+ { 0x2471, 2, 2443 },
+ { 0x2472, 2, 2445 },
+ { 0x2473, 2, 2447 },
+ { 0x2474, 3, 2449 },
+ { 0x2475, 3, 2452 },
+ { 0x2476, 3, 2455 },
+ { 0x2477, 3, 2458 },
+ { 0x2478, 3, 2461 },
+ { 0x2479, 3, 2464 },
+ { 0x247a, 3, 2467 },
+ { 0x247b, 3, 2470 },
+ { 0x247c, 3, 2473 },
+ { 0x247d, 4, 2476 },
+ { 0x247e, 4, 2480 },
+ { 0x247f, 4, 2484 },
+ { 0x2480, 4, 2488 },
+ { 0x2481, 4, 2492 },
+ { 0x2482, 4, 2496 },
+ { 0x2483, 4, 2500 },
+ { 0x2484, 4, 2504 },
+ { 0x2485, 4, 2508 },
+ { 0x2486, 4, 2512 },
+ { 0x2487, 4, 2516 },
+ { 0x2488, 2, 2520 },
+ { 0x2489, 2, 2522 },
+ { 0x248a, 2, 2524 },
+ { 0x248b, 2, 2526 },
+ { 0x248c, 2, 2528 },
+ { 0x248d, 2, 2530 },
+ { 0x248e, 2, 2532 },
+ { 0x248f, 2, 2534 },
+ { 0x2490, 2, 2536 },
+ { 0x2491, 3, 2538 },
+ { 0x2492, 3, 2541 },
+ { 0x2493, 3, 2544 },
+ { 0x2494, 3, 2547 },
+ { 0x2495, 3, 2550 },
+ { 0x2496, 3, 2553 },
+ { 0x2497, 3, 2556 },
+ { 0x2498, 3, 2559 },
+ { 0x2499, 3, 2562 },
+ { 0x249a, 3, 2565 },
+ { 0x249b, 3, 2568 },
+ { 0x249c, 3, 2571 },
+ { 0x249d, 3, 2574 },
+ { 0x249e, 3, 2577 },
+ { 0x249f, 3, 2580 },
+ { 0x24a0, 3, 2583 },
+ { 0x24a1, 3, 2586 },
+ { 0x24a2, 3, 2589 },
+ { 0x24a3, 3, 2592 },
+ { 0x24a4, 3, 2595 },
+ { 0x24a5, 3, 2598 },
+ { 0x24a6, 3, 2601 },
+ { 0x24a7, 3, 2604 },
+ { 0x24a8, 3, 2607 },
+ { 0x24a9, 3, 2610 },
+ { 0x24aa, 3, 2613 },
+ { 0x24ab, 3, 2616 },
+ { 0x24ac, 3, 2619 },
+ { 0x24ad, 3, 2622 },
+ { 0x24ae, 3, 2625 },
+ { 0x24af, 3, 2628 },
+ { 0x24b0, 3, 2631 },
+ { 0x24b1, 3, 2634 },
+ { 0x24b2, 3, 2637 },
+ { 0x24b3, 3, 2640 },
+ { 0x24b4, 3, 2643 },
+ { 0x24b5, 3, 2646 },
+ { 0x24b6, 1, 2649 },
+ { 0x24b7, 1, 2223 },
+ { 0x24b8, 1, 2190 },
+ { 0x24b9, 1, 2236 },
+ { 0x24ba, 1, 2225 },
+ { 0x24bb, 1, 2226 },
+ { 0x24bc, 1, 2650 },
+ { 0x24bd, 1, 2203 },
+ { 0x24be, 1, 2205 },
+ { 0x24bf, 1, 2651 },
+ { 0x24c0, 1, 2222 },
+ { 0x24c1, 1, 2206 },
+ { 0x24c2, 1, 2227 },
+ { 0x24c3, 1, 2207 },
+ { 0x24c4, 1, 2652 },
+ { 0x24c5, 1, 2210 },
+ { 0x24c6, 1, 2211 },
+ { 0x24c7, 1, 2212 },
+ { 0x24c8, 1, 2653 },
+ { 0x24c9, 1, 2654 },
+ { 0x24ca, 1, 2655 },
+ { 0x24cb, 1, 2283 },
+ { 0x24cc, 1, 2656 },
+ { 0x24cd, 1, 2295 },
+ { 0x24ce, 1, 2657 },
+ { 0x24cf, 1, 2220 },
+ { 0x24d0, 1, 3 },
+ { 0x24d1, 1, 2658 },
+ { 0x24d2, 1, 2325 },
+ { 0x24d3, 1, 2237 },
+ { 0x24d4, 1, 2224 },
+ { 0x24d5, 1, 2659 },
+ { 0x24d6, 1, 2202 },
+ { 0x24d7, 1, 588 },
+ { 0x24d8, 1, 2169 },
+ { 0x24d9, 1, 590 },
+ { 0x24da, 1, 2660 },
+ { 0x24db, 1, 610 },
+ { 0x24dc, 1, 2326 },
+ { 0x24dd, 1, 2181 },
+ { 0x24de, 1, 14 },
+ { 0x24df, 1, 2661 },
+ { 0x24e0, 1, 2662 },
+ { 0x24e1, 1, 591 },
+ { 0x24e2, 1, 356 },
+ { 0x24e3, 1, 2663 },
+ { 0x24e4, 1, 2664 },
+ { 0x24e5, 1, 2308 },
+ { 0x24e6, 1, 595 },
+ { 0x24e7, 1, 611 },
+ { 0x24e8, 1, 596 },
+ { 0x24e9, 1, 2665 },
+ { 0x24ea, 1, 2168 },
+ { 0x2a0c, 4, 2666 },
+ { 0x2a74, 3, 2670 },
+ { 0x2a75, 2, 2673 },
+ { 0x2a76, 3, 2675 },
+ { 0x2adc, 2, 2678 },
+ { 0x2e9f, 1, 2680 },
+ { 0x2ef3, 1, 2681 },
+ { 0x2f00, 1, 2682 },
+ { 0x2f01, 1, 2683 },
+ { 0x2f02, 1, 2684 },
+ { 0x2f03, 1, 2685 },
+ { 0x2f04, 1, 2686 },
+ { 0x2f05, 1, 2687 },
+ { 0x2f06, 1, 2688 },
+ { 0x2f07, 1, 2689 },
+ { 0x2f08, 1, 2690 },
+ { 0x2f09, 1, 2691 },
+ { 0x2f0a, 1, 2692 },
+ { 0x2f0b, 1, 2693 },
+ { 0x2f0c, 1, 2694 },
+ { 0x2f0d, 1, 2695 },
+ { 0x2f0e, 1, 2696 },
+ { 0x2f0f, 1, 2697 },
+ { 0x2f10, 1, 2698 },
+ { 0x2f11, 1, 2699 },
+ { 0x2f12, 1, 2700 },
+ { 0x2f13, 1, 2701 },
+ { 0x2f14, 1, 2702 },
+ { 0x2f15, 1, 2703 },
+ { 0x2f16, 1, 2704 },
+ { 0x2f17, 1, 2705 },
+ { 0x2f18, 1, 2706 },
+ { 0x2f19, 1, 2707 },
+ { 0x2f1a, 1, 2708 },
+ { 0x2f1b, 1, 2709 },
+ { 0x2f1c, 1, 2710 },
+ { 0x2f1d, 1, 2711 },
+ { 0x2f1e, 1, 2712 },
+ { 0x2f1f, 1, 2713 },
+ { 0x2f20, 1, 2714 },
+ { 0x2f21, 1, 2715 },
+ { 0x2f22, 1, 2716 },
+ { 0x2f23, 1, 2717 },
+ { 0x2f24, 1, 2718 },
+ { 0x2f25, 1, 2719 },
+ { 0x2f26, 1, 2720 },
+ { 0x2f27, 1, 2721 },
+ { 0x2f28, 1, 2722 },
+ { 0x2f29, 1, 2723 },
+ { 0x2f2a, 1, 2724 },
+ { 0x2f2b, 1, 2725 },
+ { 0x2f2c, 1, 2726 },
+ { 0x2f2d, 1, 2727 },
+ { 0x2f2e, 1, 2728 },
+ { 0x2f2f, 1, 2729 },
+ { 0x2f30, 1, 2730 },
+ { 0x2f31, 1, 2731 },
+ { 0x2f32, 1, 2732 },
+ { 0x2f33, 1, 2733 },
+ { 0x2f34, 1, 2734 },
+ { 0x2f35, 1, 2735 },
+ { 0x2f36, 1, 2736 },
+ { 0x2f37, 1, 2737 },
+ { 0x2f38, 1, 2738 },
+ { 0x2f39, 1, 2739 },
+ { 0x2f3a, 1, 2740 },
+ { 0x2f3b, 1, 2741 },
+ { 0x2f3c, 1, 2742 },
+ { 0x2f3d, 1, 2743 },
+ { 0x2f3e, 1, 2744 },
+ { 0x2f3f, 1, 2745 },
+ { 0x2f40, 1, 2746 },
+ { 0x2f41, 1, 2747 },
+ { 0x2f42, 1, 2748 },
+ { 0x2f43, 1, 2749 },
+ { 0x2f44, 1, 2750 },
+ { 0x2f45, 1, 2751 },
+ { 0x2f46, 1, 2752 },
+ { 0x2f47, 1, 2753 },
+ { 0x2f48, 1, 2754 },
+ { 0x2f49, 1, 2755 },
+ { 0x2f4a, 1, 2756 },
+ { 0x2f4b, 1, 2757 },
+ { 0x2f4c, 1, 2758 },
+ { 0x2f4d, 1, 2759 },
+ { 0x2f4e, 1, 2760 },
+ { 0x2f4f, 1, 2761 },
+ { 0x2f50, 1, 2762 },
+ { 0x2f51, 1, 2763 },
+ { 0x2f52, 1, 2764 },
+ { 0x2f53, 1, 2765 },
+ { 0x2f54, 1, 2766 },
+ { 0x2f55, 1, 2767 },
+ { 0x2f56, 1, 2768 },
+ { 0x2f57, 1, 2769 },
+ { 0x2f58, 1, 2770 },
+ { 0x2f59, 1, 2771 },
+ { 0x2f5a, 1, 2772 },
+ { 0x2f5b, 1, 2773 },
+ { 0x2f5c, 1, 2774 },
+ { 0x2f5d, 1, 2775 },
+ { 0x2f5e, 1, 2776 },
+ { 0x2f5f, 1, 2777 },
+ { 0x2f60, 1, 2778 },
+ { 0x2f61, 1, 2779 },
+ { 0x2f62, 1, 2780 },
+ { 0x2f63, 1, 2781 },
+ { 0x2f64, 1, 2782 },
+ { 0x2f65, 1, 2783 },
+ { 0x2f66, 1, 2784 },
+ { 0x2f67, 1, 2785 },
+ { 0x2f68, 1, 2786 },
+ { 0x2f69, 1, 2787 },
+ { 0x2f6a, 1, 2788 },
+ { 0x2f6b, 1, 2789 },
+ { 0x2f6c, 1, 2790 },
+ { 0x2f6d, 1, 2791 },
+ { 0x2f6e, 1, 2792 },
+ { 0x2f6f, 1, 2793 },
+ { 0x2f70, 1, 2794 },
+ { 0x2f71, 1, 2795 },
+ { 0x2f72, 1, 2796 },
+ { 0x2f73, 1, 2797 },
+ { 0x2f74, 1, 2798 },
+ { 0x2f75, 1, 2799 },
+ { 0x2f76, 1, 2800 },
+ { 0x2f77, 1, 2801 },
+ { 0x2f78, 1, 2802 },
+ { 0x2f79, 1, 2803 },
+ { 0x2f7a, 1, 2804 },
+ { 0x2f7b, 1, 2805 },
+ { 0x2f7c, 1, 2806 },
+ { 0x2f7d, 1, 2807 },
+ { 0x2f7e, 1, 2808 },
+ { 0x2f7f, 1, 2809 },
+ { 0x2f80, 1, 2810 },
+ { 0x2f81, 1, 2811 },
+ { 0x2f82, 1, 2812 },
+ { 0x2f83, 1, 2813 },
+ { 0x2f84, 1, 2814 },
+ { 0x2f85, 1, 2815 },
+ { 0x2f86, 1, 2816 },
+ { 0x2f87, 1, 2817 },
+ { 0x2f88, 1, 2818 },
+ { 0x2f89, 1, 2819 },
+ { 0x2f8a, 1, 2820 },
+ { 0x2f8b, 1, 2821 },
+ { 0x2f8c, 1, 2822 },
+ { 0x2f8d, 1, 2823 },
+ { 0x2f8e, 1, 2824 },
+ { 0x2f8f, 1, 2825 },
+ { 0x2f90, 1, 2826 },
+ { 0x2f91, 1, 2827 },
+ { 0x2f92, 1, 2828 },
+ { 0x2f93, 1, 2829 },
+ { 0x2f94, 1, 2830 },
+ { 0x2f95, 1, 2831 },
+ { 0x2f96, 1, 2832 },
+ { 0x2f97, 1, 2833 },
+ { 0x2f98, 1, 2834 },
+ { 0x2f99, 1, 2835 },
+ { 0x2f9a, 1, 2836 },
+ { 0x2f9b, 1, 2837 },
+ { 0x2f9c, 1, 2838 },
+ { 0x2f9d, 1, 2839 },
+ { 0x2f9e, 1, 2840 },
+ { 0x2f9f, 1, 2841 },
+ { 0x2fa0, 1, 2842 },
+ { 0x2fa1, 1, 2843 },
+ { 0x2fa2, 1, 2844 },
+ { 0x2fa3, 1, 2845 },
+ { 0x2fa4, 1, 2846 },
+ { 0x2fa5, 1, 2847 },
+ { 0x2fa6, 1, 2848 },
+ { 0x2fa7, 1, 2849 },
+ { 0x2fa8, 1, 2850 },
+ { 0x2fa9, 1, 2851 },
+ { 0x2faa, 1, 2852 },
+ { 0x2fab, 1, 2853 },
+ { 0x2fac, 1, 2854 },
+ { 0x2fad, 1, 2855 },
+ { 0x2fae, 1, 2856 },
+ { 0x2faf, 1, 2857 },
+ { 0x2fb0, 1, 2858 },
+ { 0x2fb1, 1, 2859 },
+ { 0x2fb2, 1, 2860 },
+ { 0x2fb3, 1, 2861 },
+ { 0x2fb4, 1, 2862 },
+ { 0x2fb5, 1, 2863 },
+ { 0x2fb6, 1, 2864 },
+ { 0x2fb7, 1, 2865 },
+ { 0x2fb8, 1, 2866 },
+ { 0x2fb9, 1, 2867 },
+ { 0x2fba, 1, 2868 },
+ { 0x2fbb, 1, 2869 },
+ { 0x2fbc, 1, 2870 },
+ { 0x2fbd, 1, 2871 },
+ { 0x2fbe, 1, 2872 },
+ { 0x2fbf, 1, 2873 },
+ { 0x2fc0, 1, 2874 },
+ { 0x2fc1, 1, 2875 },
+ { 0x2fc2, 1, 2876 },
+ { 0x2fc3, 1, 2877 },
+ { 0x2fc4, 1, 2878 },
+ { 0x2fc5, 1, 2879 },
+ { 0x2fc6, 1, 2880 },
+ { 0x2fc7, 1, 2881 },
+ { 0x2fc8, 1, 2882 },
+ { 0x2fc9, 1, 2883 },
+ { 0x2fca, 1, 2884 },
+ { 0x2fcb, 1, 2885 },
+ { 0x2fcc, 1, 2886 },
+ { 0x2fcd, 1, 2887 },
+ { 0x2fce, 1, 2888 },
+ { 0x2fcf, 1, 2889 },
+ { 0x2fd0, 1, 2890 },
+ { 0x2fd1, 1, 2891 },
+ { 0x2fd2, 1, 2892 },
+ { 0x2fd3, 1, 2893 },
+ { 0x2fd4, 1, 2894 },
+ { 0x2fd5, 1, 2895 },
+ { 0x3000, 1, 0 },
+ { 0x3036, 1, 2896 },
+ { 0x3038, 1, 2705 },
+ { 0x3039, 1, 2897 },
+ { 0x303a, 1, 2898 },
+ { 0x304c, 2, 2899 },
+ { 0x304e, 2, 2901 },
+ { 0x3050, 2, 2903 },
+ { 0x3052, 2, 2905 },
+ { 0x3054, 2, 2907 },
+ { 0x3056, 2, 2909 },
+ { 0x3058, 2, 2911 },
+ { 0x305a, 2, 2913 },
+ { 0x305c, 2, 2915 },
+ { 0x305e, 2, 2917 },
+ { 0x3060, 2, 2919 },
+ { 0x3062, 2, 2921 },
+ { 0x3065, 2, 2923 },
+ { 0x3067, 2, 2925 },
+ { 0x3069, 2, 2927 },
+ { 0x3070, 2, 2929 },
+ { 0x3071, 2, 2931 },
+ { 0x3073, 2, 2933 },
+ { 0x3074, 2, 2935 },
+ { 0x3076, 2, 2937 },
+ { 0x3077, 2, 2939 },
+ { 0x3079, 2, 2941 },
+ { 0x307a, 2, 2943 },
+ { 0x307c, 2, 2945 },
+ { 0x307d, 2, 2947 },
+ { 0x3094, 2, 2949 },
+ { 0x309b, 2, 2951 },
+ { 0x309c, 2, 2953 },
+ { 0x309e, 2, 2955 },
+ { 0x309f, 2, 2957 },
+ { 0x30ac, 2, 2959 },
+ { 0x30ae, 2, 2961 },
+ { 0x30b0, 2, 2963 },
+ { 0x30b2, 2, 2965 },
+ { 0x30b4, 2, 2967 },
+ { 0x30b6, 2, 2969 },
+ { 0x30b8, 2, 2971 },
+ { 0x30ba, 2, 2973 },
+ { 0x30bc, 2, 2975 },
+ { 0x30be, 2, 2977 },
+ { 0x30c0, 2, 2979 },
+ { 0x30c2, 2, 2981 },
+ { 0x30c5, 2, 2983 },
+ { 0x30c7, 2, 2985 },
+ { 0x30c9, 2, 2987 },
+ { 0x30d0, 2, 2989 },
+ { 0x30d1, 2, 2991 },
+ { 0x30d3, 2, 2993 },
+ { 0x30d4, 2, 2995 },
+ { 0x30d6, 2, 2997 },
+ { 0x30d7, 2, 2999 },
+ { 0x30d9, 2, 3001 },
+ { 0x30da, 2, 3003 },
+ { 0x30dc, 2, 3005 },
+ { 0x30dd, 2, 3007 },
+ { 0x30f4, 2, 3009 },
+ { 0x30f7, 2, 3011 },
+ { 0x30f8, 2, 3013 },
+ { 0x30f9, 2, 3015 },
+ { 0x30fa, 2, 3017 },
+ { 0x30fe, 2, 3019 },
+ { 0x30ff, 2, 3021 },
+ { 0x3131, 1, 3023 },
+ { 0x3132, 1, 3024 },
+ { 0x3133, 1, 3025 },
+ { 0x3134, 1, 3026 },
+ { 0x3135, 1, 3027 },
+ { 0x3136, 1, 3028 },
+ { 0x3137, 1, 3029 },
+ { 0x3138, 1, 3030 },
+ { 0x3139, 1, 3031 },
+ { 0x313a, 1, 3032 },
+ { 0x313b, 1, 3033 },
+ { 0x313c, 1, 3034 },
+ { 0x313d, 1, 3035 },
+ { 0x313e, 1, 3036 },
+ { 0x313f, 1, 3037 },
+ { 0x3140, 1, 3038 },
+ { 0x3141, 1, 3039 },
+ { 0x3142, 1, 3040 },
+ { 0x3143, 1, 3041 },
+ { 0x3144, 1, 3042 },
+ { 0x3145, 1, 3043 },
+ { 0x3146, 1, 3044 },
+ { 0x3147, 1, 3045 },
+ { 0x3148, 1, 3046 },
+ { 0x3149, 1, 3047 },
+ { 0x314a, 1, 3048 },
+ { 0x314b, 1, 3049 },
+ { 0x314c, 1, 3050 },
+ { 0x314d, 1, 3051 },
+ { 0x314e, 1, 3052 },
+ { 0x314f, 1, 3053 },
+ { 0x3150, 1, 3054 },
+ { 0x3151, 1, 3055 },
+ { 0x3152, 1, 3056 },
+ { 0x3153, 1, 3057 },
+ { 0x3154, 1, 3058 },
+ { 0x3155, 1, 3059 },
+ { 0x3156, 1, 3060 },
+ { 0x3157, 1, 3061 },
+ { 0x3158, 1, 3062 },
+ { 0x3159, 1, 3063 },
+ { 0x315a, 1, 3064 },
+ { 0x315b, 1, 3065 },
+ { 0x315c, 1, 3066 },
+ { 0x315d, 1, 3067 },
+ { 0x315e, 1, 3068 },
+ { 0x315f, 1, 3069 },
+ { 0x3160, 1, 3070 },
+ { 0x3161, 1, 3071 },
+ { 0x3162, 1, 3072 },
+ { 0x3163, 1, 3073 },
+ { 0x3164, 1, 3074 },
+ { 0x3165, 1, 3075 },
+ { 0x3166, 1, 3076 },
+ { 0x3167, 1, 3077 },
+ { 0x3168, 1, 3078 },
+ { 0x3169, 1, 3079 },
+ { 0x316a, 1, 3080 },
+ { 0x316b, 1, 3081 },
+ { 0x316c, 1, 3082 },
+ { 0x316d, 1, 3083 },
+ { 0x316e, 1, 3084 },
+ { 0x316f, 1, 3085 },
+ { 0x3170, 1, 3086 },
+ { 0x3171, 1, 3087 },
+ { 0x3172, 1, 3088 },
+ { 0x3173, 1, 3089 },
+ { 0x3174, 1, 3090 },
+ { 0x3175, 1, 3091 },
+ { 0x3176, 1, 3092 },
+ { 0x3177, 1, 3093 },
+ { 0x3178, 1, 3094 },
+ { 0x3179, 1, 3095 },
+ { 0x317a, 1, 3096 },
+ { 0x317b, 1, 3097 },
+ { 0x317c, 1, 3098 },
+ { 0x317d, 1, 3099 },
+ { 0x317e, 1, 3100 },
+ { 0x317f, 1, 3101 },
+ { 0x3180, 1, 3102 },
+ { 0x3181, 1, 3103 },
+ { 0x3182, 1, 3104 },
+ { 0x3183, 1, 3105 },
+ { 0x3184, 1, 3106 },
+ { 0x3185, 1, 3107 },
+ { 0x3186, 1, 3108 },
+ { 0x3187, 1, 3109 },
+ { 0x3188, 1, 3110 },
+ { 0x3189, 1, 3111 },
+ { 0x318a, 1, 3112 },
+ { 0x318b, 1, 3113 },
+ { 0x318c, 1, 3114 },
+ { 0x318d, 1, 3115 },
+ { 0x318e, 1, 3116 },
+ { 0x3192, 1, 2682 },
+ { 0x3193, 1, 2688 },
+ { 0x3194, 1, 3117 },
+ { 0x3195, 1, 3118 },
+ { 0x3196, 1, 3119 },
+ { 0x3197, 1, 3120 },
+ { 0x3198, 1, 3121 },
+ { 0x3199, 1, 3122 },
+ { 0x319a, 1, 2686 },
+ { 0x319b, 1, 3123 },
+ { 0x319c, 1, 3124 },
+ { 0x319d, 1, 3125 },
+ { 0x319e, 1, 3126 },
+ { 0x319f, 1, 2690 },
+ { 0x3200, 3, 3127 },
+ { 0x3201, 3, 3130 },
+ { 0x3202, 3, 3133 },
+ { 0x3203, 3, 3136 },
+ { 0x3204, 3, 3139 },
+ { 0x3205, 3, 3142 },
+ { 0x3206, 3, 3145 },
+ { 0x3207, 3, 3148 },
+ { 0x3208, 3, 3151 },
+ { 0x3209, 3, 3154 },
+ { 0x320a, 3, 3157 },
+ { 0x320b, 3, 3160 },
+ { 0x320c, 3, 3163 },
+ { 0x320d, 3, 3166 },
+ { 0x320e, 4, 3169 },
+ { 0x320f, 4, 3173 },
+ { 0x3210, 4, 3177 },
+ { 0x3211, 4, 3181 },
+ { 0x3212, 4, 3185 },
+ { 0x3213, 4, 3189 },
+ { 0x3214, 4, 3193 },
+ { 0x3215, 4, 3197 },
+ { 0x3216, 4, 3201 },
+ { 0x3217, 4, 3205 },
+ { 0x3218, 4, 3209 },
+ { 0x3219, 4, 3213 },
+ { 0x321a, 4, 3217 },
+ { 0x321b, 4, 3221 },
+ { 0x321c, 4, 3225 },
+ { 0x3220, 3, 3229 },
+ { 0x3221, 3, 3232 },
+ { 0x3222, 3, 3235 },
+ { 0x3223, 3, 3238 },
+ { 0x3224, 3, 3241 },
+ { 0x3225, 3, 3244 },
+ { 0x3226, 3, 3247 },
+ { 0x3227, 3, 3250 },
+ { 0x3228, 3, 3253 },
+ { 0x3229, 3, 3256 },
+ { 0x322a, 3, 3259 },
+ { 0x322b, 3, 3262 },
+ { 0x322c, 3, 3265 },
+ { 0x322d, 3, 3268 },
+ { 0x322e, 3, 3271 },
+ { 0x322f, 3, 3274 },
+ { 0x3230, 3, 3277 },
+ { 0x3231, 3, 3280 },
+ { 0x3232, 3, 3283 },
+ { 0x3233, 3, 3286 },
+ { 0x3234, 3, 3289 },
+ { 0x3235, 3, 3292 },
+ { 0x3236, 3, 3295 },
+ { 0x3237, 3, 3298 },
+ { 0x3238, 3, 3301 },
+ { 0x3239, 3, 3304 },
+ { 0x323a, 3, 3307 },
+ { 0x323b, 3, 3310 },
+ { 0x323c, 3, 3313 },
+ { 0x323d, 3, 3316 },
+ { 0x323e, 3, 3319 },
+ { 0x323f, 3, 3322 },
+ { 0x3240, 3, 3325 },
+ { 0x3241, 3, 3328 },
+ { 0x3242, 3, 3331 },
+ { 0x3243, 3, 3334 },
+ { 0x3251, 2, 3337 },
+ { 0x3252, 2, 3339 },
+ { 0x3253, 2, 3341 },
+ { 0x3254, 2, 3343 },
+ { 0x3255, 2, 3345 },
+ { 0x3256, 2, 3347 },
+ { 0x3257, 2, 3349 },
+ { 0x3258, 2, 3351 },
+ { 0x3259, 2, 3353 },
+ { 0x325a, 2, 3355 },
+ { 0x325b, 2, 3357 },
+ { 0x325c, 2, 3359 },
+ { 0x325d, 2, 3361 },
+ { 0x325e, 2, 3363 },
+ { 0x325f, 2, 3365 },
+ { 0x3260, 1, 3023 },
+ { 0x3261, 1, 3026 },
+ { 0x3262, 1, 3029 },
+ { 0x3263, 1, 3031 },
+ { 0x3264, 1, 3039 },
+ { 0x3265, 1, 3040 },
+ { 0x3266, 1, 3043 },
+ { 0x3267, 1, 3045 },
+ { 0x3268, 1, 3046 },
+ { 0x3269, 1, 3048 },
+ { 0x326a, 1, 3049 },
+ { 0x326b, 1, 3050 },
+ { 0x326c, 1, 3051 },
+ { 0x326d, 1, 3052 },
+ { 0x326e, 2, 3367 },
+ { 0x326f, 2, 3369 },
+ { 0x3270, 2, 3371 },
+ { 0x3271, 2, 3373 },
+ { 0x3272, 2, 3375 },
+ { 0x3273, 2, 3377 },
+ { 0x3274, 2, 3379 },
+ { 0x3275, 2, 3381 },
+ { 0x3276, 2, 3383 },
+ { 0x3277, 2, 3385 },
+ { 0x3278, 2, 3387 },
+ { 0x3279, 2, 3389 },
+ { 0x327a, 2, 3391 },
+ { 0x327b, 2, 3393 },
+ { 0x3280, 1, 2682 },
+ { 0x3281, 1, 2688 },
+ { 0x3282, 1, 3117 },
+ { 0x3283, 1, 3118 },
+ { 0x3284, 1, 3395 },
+ { 0x3285, 1, 3396 },
+ { 0x3286, 1, 3397 },
+ { 0x3287, 1, 2693 },
+ { 0x3288, 1, 3398 },
+ { 0x3289, 1, 2705 },
+ { 0x328a, 1, 2755 },
+ { 0x328b, 1, 2767 },
+ { 0x328c, 1, 2766 },
+ { 0x328d, 1, 2756 },
+ { 0x328e, 1, 2848 },
+ { 0x328f, 1, 2713 },
+ { 0x3290, 1, 2753 },
+ { 0x3291, 1, 3399 },
+ { 0x3292, 1, 3400 },
+ { 0x3293, 1, 3401 },
+ { 0x3294, 1, 3402 },
+ { 0x3295, 1, 3403 },
+ { 0x3296, 1, 3404 },
+ { 0x3297, 1, 3405 },
+ { 0x3298, 1, 3406 },
+ { 0x3299, 1, 3407 },
+ { 0x329a, 1, 3408 },
+ { 0x329b, 1, 2719 },
+ { 0x329c, 1, 3409 },
+ { 0x329d, 1, 3410 },
+ { 0x329e, 1, 3411 },
+ { 0x329f, 1, 3412 },
+ { 0x32a0, 1, 3413 },
+ { 0x32a1, 1, 3414 },
+ { 0x32a2, 1, 3415 },
+ { 0x32a3, 1, 3416 },
+ { 0x32a4, 1, 3119 },
+ { 0x32a5, 1, 3120 },
+ { 0x32a6, 1, 3121 },
+ { 0x32a7, 1, 3417 },
+ { 0x32a8, 1, 3418 },
+ { 0x32a9, 1, 3419 },
+ { 0x32aa, 1, 3420 },
+ { 0x32ab, 1, 3421 },
+ { 0x32ac, 1, 3422 },
+ { 0x32ad, 1, 3423 },
+ { 0x32ae, 1, 3424 },
+ { 0x32af, 1, 3425 },
+ { 0x32b0, 1, 3426 },
+ { 0x32b1, 2, 3427 },
+ { 0x32b2, 2, 3429 },
+ { 0x32b3, 2, 3431 },
+ { 0x32b4, 2, 3433 },
+ { 0x32b5, 2, 3435 },
+ { 0x32b6, 2, 3437 },
+ { 0x32b7, 2, 3439 },
+ { 0x32b8, 2, 3441 },
+ { 0x32b9, 2, 3443 },
+ { 0x32ba, 2, 3445 },
+ { 0x32bb, 2, 3447 },
+ { 0x32bc, 2, 3449 },
+ { 0x32bd, 2, 3451 },
+ { 0x32be, 2, 3453 },
+ { 0x32bf, 2, 3455 },
+ { 0x32c0, 2, 3457 },
+ { 0x32c1, 2, 3459 },
+ { 0x32c2, 2, 3461 },
+ { 0x32c3, 2, 3463 },
+ { 0x32c4, 2, 3465 },
+ { 0x32c5, 2, 3467 },
+ { 0x32c6, 2, 3469 },
+ { 0x32c7, 2, 3471 },
+ { 0x32c8, 2, 3473 },
+ { 0x32c9, 3, 3475 },
+ { 0x32ca, 3, 3478 },
+ { 0x32cb, 3, 3481 },
+ { 0x32d0, 1, 3484 },
+ { 0x32d1, 1, 3485 },
+ { 0x32d2, 1, 3486 },
+ { 0x32d3, 1, 3487 },
+ { 0x32d4, 1, 3488 },
+ { 0x32d5, 1, 3489 },
+ { 0x32d6, 1, 3490 },
+ { 0x32d7, 1, 3491 },
+ { 0x32d8, 1, 3492 },
+ { 0x32d9, 1, 3493 },
+ { 0x32da, 1, 3494 },
+ { 0x32db, 1, 3495 },
+ { 0x32dc, 1, 3496 },
+ { 0x32dd, 1, 3497 },
+ { 0x32de, 1, 3498 },
+ { 0x32df, 1, 3499 },
+ { 0x32e0, 1, 3500 },
+ { 0x32e1, 1, 3501 },
+ { 0x32e2, 1, 3502 },
+ { 0x32e3, 1, 3503 },
+ { 0x32e4, 1, 3504 },
+ { 0x32e5, 1, 3505 },
+ { 0x32e6, 1, 3506 },
+ { 0x32e7, 1, 3507 },
+ { 0x32e8, 1, 3508 },
+ { 0x32e9, 1, 3509 },
+ { 0x32ea, 1, 3510 },
+ { 0x32eb, 1, 3511 },
+ { 0x32ec, 1, 3512 },
+ { 0x32ed, 1, 3513 },
+ { 0x32ee, 1, 3514 },
+ { 0x32ef, 1, 3515 },
+ { 0x32f0, 1, 3516 },
+ { 0x32f1, 1, 3517 },
+ { 0x32f2, 1, 3518 },
+ { 0x32f3, 1, 3519 },
+ { 0x32f4, 1, 3520 },
+ { 0x32f5, 1, 3521 },
+ { 0x32f6, 1, 3522 },
+ { 0x32f7, 1, 3523 },
+ { 0x32f8, 1, 3524 },
+ { 0x32f9, 1, 3525 },
+ { 0x32fa, 1, 3526 },
+ { 0x32fb, 1, 3527 },
+ { 0x32fc, 1, 3528 },
+ { 0x32fd, 1, 3529 },
+ { 0x32fe, 1, 3530 },
+ { 0x3300, 5, 3531 },
+ { 0x3301, 4, 3536 },
+ { 0x3302, 5, 3540 },
+ { 0x3303, 3, 3545 },
+ { 0x3304, 5, 3548 },
+ { 0x3305, 3, 3553 },
+ { 0x3306, 3, 3556 },
+ { 0x3307, 6, 3559 },
+ { 0x3308, 4, 3565 },
+ { 0x3309, 3, 3569 },
+ { 0x330a, 3, 3572 },
+ { 0x330b, 3, 3575 },
+ { 0x330c, 4, 3578 },
+ { 0x330d, 4, 3582 },
+ { 0x330e, 4, 3586 },
+ { 0x330f, 4, 3590 },
+ { 0x3310, 4, 3594 },
+ { 0x3311, 4, 3598 },
+ { 0x3312, 4, 3602 },
+ { 0x3313, 6, 3606 },
+ { 0x3314, 2, 3612 },
+ { 0x3315, 6, 3614 },
+ { 0x3316, 6, 3620 },
+ { 0x3317, 5, 3626 },
+ { 0x3318, 4, 3631 },
+ { 0x3319, 6, 3635 },
+ { 0x331a, 6, 3641 },
+ { 0x331b, 4, 3647 },
+ { 0x331c, 3, 3651 },
+ { 0x331d, 3, 3654 },
+ { 0x331e, 4, 3657 },
+ { 0x331f, 4, 3661 },
+ { 0x3320, 5, 3665 },
+ { 0x3321, 5, 3670 },
+ { 0x3322, 3, 3675 },
+ { 0x3323, 3, 3678 },
+ { 0x3324, 4, 3681 },
+ { 0x3325, 3, 3685 },
+ { 0x3326, 3, 3688 },
+ { 0x3327, 2, 3691 },
+ { 0x3328, 2, 3693 },
+ { 0x3329, 3, 3695 },
+ { 0x332a, 3, 3698 },
+ { 0x332b, 6, 3701 },
+ { 0x332c, 4, 3707 },
+ { 0x332d, 5, 3711 },
+ { 0x332e, 6, 3716 },
+ { 0x332f, 4, 3722 },
+ { 0x3330, 3, 3726 },
+ { 0x3331, 3, 3729 },
+ { 0x3332, 6, 3732 },
+ { 0x3333, 4, 3738 },
+ { 0x3334, 6, 3742 },
+ { 0x3335, 3, 3748 },
+ { 0x3336, 5, 3751 },
+ { 0x3337, 3, 3756 },
+ { 0x3338, 4, 3759 },
+ { 0x3339, 3, 3763 },
+ { 0x333a, 4, 3766 },
+ { 0x333b, 5, 3770 },
+ { 0x333c, 4, 3775 },
+ { 0x333d, 5, 3779 },
+ { 0x333e, 4, 3784 },
+ { 0x333f, 2, 3788 },
+ { 0x3340, 5, 3790 },
+ { 0x3341, 3, 3795 },
+ { 0x3342, 3, 3798 },
+ { 0x3343, 4, 3801 },
+ { 0x3344, 3, 3805 },
+ { 0x3345, 3, 3808 },
+ { 0x3346, 3, 3811 },
+ { 0x3347, 5, 3814 },
+ { 0x3348, 4, 3819 },
+ { 0x3349, 2, 3823 },
+ { 0x334a, 6, 3825 },
+ { 0x334b, 3, 3831 },
+ { 0x334c, 5, 3834 },
+ { 0x334d, 4, 3839 },
+ { 0x334e, 4, 3843 },
+ { 0x334f, 3, 3847 },
+ { 0x3350, 3, 3850 },
+ { 0x3351, 4, 3853 },
+ { 0x3352, 2, 3857 },
+ { 0x3353, 4, 3859 },
+ { 0x3354, 5, 3863 },
+ { 0x3355, 2, 3868 },
+ { 0x3356, 6, 3870 },
+ { 0x3357, 3, 3876 },
+ { 0x3358, 2, 3879 },
+ { 0x3359, 2, 3881 },
+ { 0x335a, 2, 3883 },
+ { 0x335b, 2, 3885 },
+ { 0x335c, 2, 3887 },
+ { 0x335d, 2, 3889 },
+ { 0x335e, 2, 3891 },
+ { 0x335f, 2, 3893 },
+ { 0x3360, 2, 3895 },
+ { 0x3361, 2, 3897 },
+ { 0x3362, 3, 3899 },
+ { 0x3363, 3, 3902 },
+ { 0x3364, 3, 3905 },
+ { 0x3365, 3, 3908 },
+ { 0x3366, 3, 3911 },
+ { 0x3367, 3, 3914 },
+ { 0x3368, 3, 3917 },
+ { 0x3369, 3, 3920 },
+ { 0x336a, 3, 3923 },
+ { 0x336b, 3, 3926 },
+ { 0x336c, 3, 3929 },
+ { 0x336d, 3, 3932 },
+ { 0x336e, 3, 3935 },
+ { 0x336f, 3, 3938 },
+ { 0x3370, 3, 3941 },
+ { 0x3371, 3, 3944 },
+ { 0x3372, 2, 3947 },
+ { 0x3373, 2, 3949 },
+ { 0x3374, 3, 3951 },
+ { 0x3375, 2, 3954 },
+ { 0x3376, 2, 3956 },
+ { 0x337b, 2, 3958 },
+ { 0x337c, 2, 3960 },
+ { 0x337d, 2, 3962 },
+ { 0x337e, 2, 3964 },
+ { 0x337f, 4, 3966 },
+ { 0x3380, 2, 3970 },
+ { 0x3381, 2, 3972 },
+ { 0x3382, 2, 3974 },
+ { 0x3383, 2, 3976 },
+ { 0x3384, 2, 3978 },
+ { 0x3385, 2, 3980 },
+ { 0x3386, 2, 3982 },
+ { 0x3387, 2, 3984 },
+ { 0x3388, 3, 3986 },
+ { 0x3389, 4, 3989 },
+ { 0x338a, 2, 3993 },
+ { 0x338b, 2, 3995 },
+ { 0x338c, 2, 3997 },
+ { 0x338d, 2, 3999 },
+ { 0x338e, 2, 4001 },
+ { 0x338f, 2, 4003 },
+ { 0x3390, 2, 4005 },
+ { 0x3391, 3, 4007 },
+ { 0x3392, 3, 4010 },
+ { 0x3393, 3, 4013 },
+ { 0x3394, 3, 4016 },
+ { 0x3395, 2, 4019 },
+ { 0x3396, 2, 4021 },
+ { 0x3397, 2, 4023 },
+ { 0x3398, 2, 4025 },
+ { 0x3399, 2, 4027 },
+ { 0x339a, 2, 4029 },
+ { 0x339b, 2, 4031 },
+ { 0x339c, 2, 4033 },
+ { 0x339d, 2, 4035 },
+ { 0x339e, 2, 4037 },
+ { 0x339f, 3, 4039 },
+ { 0x33a0, 3, 4042 },
+ { 0x33a1, 2, 4045 },
+ { 0x33a2, 3, 4047 },
+ { 0x33a3, 3, 4050 },
+ { 0x33a4, 3, 4053 },
+ { 0x33a5, 2, 4056 },
+ { 0x33a6, 3, 4058 },
+ { 0x33a7, 3, 4061 },
+ { 0x33a8, 4, 4064 },
+ { 0x33a9, 2, 4068 },
+ { 0x33aa, 3, 4070 },
+ { 0x33ab, 3, 4073 },
+ { 0x33ac, 3, 4076 },
+ { 0x33ad, 3, 4079 },
+ { 0x33ae, 5, 4082 },
+ { 0x33af, 6, 4087 },
+ { 0x33b0, 2, 4093 },
+ { 0x33b1, 2, 4095 },
+ { 0x33b2, 2, 4097 },
+ { 0x33b3, 2, 4099 },
+ { 0x33b4, 2, 4101 },
+ { 0x33b5, 2, 4103 },
+ { 0x33b6, 2, 4105 },
+ { 0x33b7, 2, 4107 },
+ { 0x33b8, 2, 4109 },
+ { 0x33b9, 2, 4111 },
+ { 0x33ba, 2, 4113 },
+ { 0x33bb, 2, 4115 },
+ { 0x33bc, 2, 4117 },
+ { 0x33bd, 2, 4119 },
+ { 0x33be, 2, 4121 },
+ { 0x33bf, 2, 4123 },
+ { 0x33c0, 2, 4125 },
+ { 0x33c1, 2, 4127 },
+ { 0x33c2, 4, 4129 },
+ { 0x33c3, 2, 4133 },
+ { 0x33c4, 2, 4135 },
+ { 0x33c5, 2, 4137 },
+ { 0x33c6, 4, 4139 },
+ { 0x33c7, 3, 4143 },
+ { 0x33c8, 2, 4146 },
+ { 0x33c9, 2, 4148 },
+ { 0x33ca, 2, 4150 },
+ { 0x33cb, 2, 4152 },
+ { 0x33cc, 2, 4154 },
+ { 0x33cd, 2, 4156 },
+ { 0x33ce, 2, 4158 },
+ { 0x33cf, 2, 4160 },
+ { 0x33d0, 2, 4162 },
+ { 0x33d1, 2, 4164 },
+ { 0x33d2, 3, 4166 },
+ { 0x33d3, 2, 4169 },
+ { 0x33d4, 2, 4171 },
+ { 0x33d5, 3, 4173 },
+ { 0x33d6, 3, 4176 },
+ { 0x33d7, 2, 4179 },
+ { 0x33d8, 4, 4181 },
+ { 0x33d9, 3, 4185 },
+ { 0x33da, 2, 4188 },
+ { 0x33db, 2, 4190 },
+ { 0x33dc, 2, 4192 },
+ { 0x33dd, 2, 4194 },
+ { 0x33e0, 2, 4196 },
+ { 0x33e1, 2, 4198 },
+ { 0x33e2, 2, 4200 },
+ { 0x33e3, 2, 4202 },
+ { 0x33e4, 2, 4204 },
+ { 0x33e5, 2, 4206 },
+ { 0x33e6, 2, 4208 },
+ { 0x33e7, 2, 4210 },
+ { 0x33e8, 2, 4212 },
+ { 0x33e9, 3, 4214 },
+ { 0x33ea, 3, 4217 },
+ { 0x33eb, 3, 4220 },
+ { 0x33ec, 3, 4223 },
+ { 0x33ed, 3, 4226 },
+ { 0x33ee, 3, 4229 },
+ { 0x33ef, 3, 4232 },
+ { 0x33f0, 3, 4235 },
+ { 0x33f1, 3, 4238 },
+ { 0x33f2, 3, 4241 },
+ { 0x33f3, 3, 4244 },
+ { 0x33f4, 3, 4247 },
+ { 0x33f5, 3, 4250 },
+ { 0x33f6, 3, 4253 },
+ { 0x33f7, 3, 4256 },
+ { 0x33f8, 3, 4259 },
+ { 0x33f9, 3, 4262 },
+ { 0x33fa, 3, 4265 },
+ { 0x33fb, 3, 4268 },
+ { 0x33fc, 3, 4271 },
+ { 0x33fd, 3, 4274 },
+ { 0x33fe, 3, 4277 },
+ { 0xf900, 1, 4280 },
+ { 0xf901, 1, 4281 },
+ { 0xf902, 1, 2840 },
+ { 0xf903, 1, 4282 },
+ { 0xf904, 1, 4283 },
+ { 0xf905, 1, 4284 },
+ { 0xf906, 1, 4285 },
+ { 0xf907, 1, 2894 },
+ { 0xf908, 1, 2894 },
+ { 0xf909, 1, 4286 },
+ { 0xf90a, 1, 2848 },
+ { 0xf90b, 1, 4287 },
+ { 0xf90c, 1, 4288 },
+ { 0xf90d, 1, 4289 },
+ { 0xf90e, 1, 4290 },
+ { 0xf90f, 1, 4291 },
+ { 0xf910, 1, 4292 },
+ { 0xf911, 1, 4293 },
+ { 0xf912, 1, 4294 },
+ { 0xf913, 1, 4295 },
+ { 0xf914, 1, 4296 },
+ { 0xf915, 1, 4297 },
+ { 0xf916, 1, 4298 },
+ { 0xf917, 1, 4299 },
+ { 0xf918, 1, 4300 },
+ { 0xf919, 1, 4301 },
+ { 0xf91a, 1, 4302 },
+ { 0xf91b, 1, 4303 },
+ { 0xf91c, 1, 4304 },
+ { 0xf91d, 1, 4305 },
+ { 0xf91e, 1, 4306 },
+ { 0xf91f, 1, 4307 },
+ { 0xf920, 1, 4308 },
+ { 0xf921, 1, 4309 },
+ { 0xf922, 1, 4310 },
+ { 0xf923, 1, 4311 },
+ { 0xf924, 1, 4312 },
+ { 0xf925, 1, 4313 },
+ { 0xf926, 1, 4314 },
+ { 0xf927, 1, 4315 },
+ { 0xf928, 1, 4316 },
+ { 0xf929, 1, 4317 },
+ { 0xf92a, 1, 4318 },
+ { 0xf92b, 1, 4319 },
+ { 0xf92c, 1, 4320 },
+ { 0xf92d, 1, 4321 },
+ { 0xf92e, 1, 4322 },
+ { 0xf92f, 1, 4323 },
+ { 0xf930, 1, 4324 },
+ { 0xf931, 1, 4325 },
+ { 0xf932, 1, 4326 },
+ { 0xf933, 1, 4327 },
+ { 0xf934, 1, 2806 },
+ { 0xf935, 1, 4328 },
+ { 0xf936, 1, 4329 },
+ { 0xf937, 1, 4330 },
+ { 0xf938, 1, 4331 },
+ { 0xf939, 1, 4332 },
+ { 0xf93a, 1, 4333 },
+ { 0xf93b, 1, 4334 },
+ { 0xf93c, 1, 4335 },
+ { 0xf93d, 1, 4336 },
+ { 0xf93e, 1, 4337 },
+ { 0xf93f, 1, 4338 },
+ { 0xf940, 1, 2879 },
+ { 0xf941, 1, 4339 },
+ { 0xf942, 1, 4340 },
+ { 0xf943, 1, 4341 },
+ { 0xf944, 1, 4342 },
+ { 0xf945, 1, 4343 },
+ { 0xf946, 1, 4344 },
+ { 0xf947, 1, 4345 },
+ { 0xf948, 1, 4346 },
+ { 0xf949, 1, 4347 },
+ { 0xf94a, 1, 4348 },
+ { 0xf94b, 1, 4349 },
+ { 0xf94c, 1, 4350 },
+ { 0xf94d, 1, 4351 },
+ { 0xf94e, 1, 4352 },
+ { 0xf94f, 1, 4353 },
+ { 0xf950, 1, 4354 },
+ { 0xf951, 1, 4355 },
+ { 0xf952, 1, 4356 },
+ { 0xf953, 1, 4357 },
+ { 0xf954, 1, 4358 },
+ { 0xf955, 1, 4359 },
+ { 0xf956, 1, 4360 },
+ { 0xf957, 1, 4361 },
+ { 0xf958, 1, 4362 },
+ { 0xf959, 1, 4363 },
+ { 0xf95a, 1, 4364 },
+ { 0xf95b, 1, 4365 },
+ { 0xf95c, 1, 4296 },
+ { 0xf95d, 1, 4366 },
+ { 0xf95e, 1, 4367 },
+ { 0xf95f, 1, 4368 },
+ { 0xf960, 1, 4369 },
+ { 0xf961, 1, 4370 },
+ { 0xf962, 1, 4371 },
+ { 0xf963, 1, 4372 },
+ { 0xf964, 1, 4373 },
+ { 0xf965, 1, 4374 },
+ { 0xf966, 1, 4375 },
+ { 0xf967, 1, 4376 },
+ { 0xf968, 1, 4377 },
+ { 0xf969, 1, 4378 },
+ { 0xf96a, 1, 4379 },
+ { 0xf96b, 1, 4380 },
+ { 0xf96c, 1, 4381 },
+ { 0xf96d, 1, 4382 },
+ { 0xf96e, 1, 4383 },
+ { 0xf96f, 1, 4384 },
+ { 0xf970, 1, 4385 },
+ { 0xf971, 1, 2842 },
+ { 0xf972, 1, 4386 },
+ { 0xf973, 1, 4387 },
+ { 0xf974, 1, 4388 },
+ { 0xf975, 1, 4389 },
+ { 0xf976, 1, 4390 },
+ { 0xf977, 1, 4391 },
+ { 0xf978, 1, 4392 },
+ { 0xf979, 1, 4393 },
+ { 0xf97a, 1, 4394 },
+ { 0xf97b, 1, 4395 },
+ { 0xf97c, 1, 4396 },
+ { 0xf97d, 1, 4397 },
+ { 0xf97e, 1, 4398 },
+ { 0xf97f, 1, 4399 },
+ { 0xf980, 1, 4400 },
+ { 0xf981, 1, 2719 },
+ { 0xf982, 1, 4401 },
+ { 0xf983, 1, 4402 },
+ { 0xf984, 1, 4403 },
+ { 0xf985, 1, 4404 },
+ { 0xf986, 1, 4405 },
+ { 0xf987, 1, 4406 },
+ { 0xf988, 1, 4407 },
+ { 0xf989, 1, 4408 },
+ { 0xf98a, 1, 2700 },
+ { 0xf98b, 1, 4409 },
+ { 0xf98c, 1, 4410 },
+ { 0xf98d, 1, 4411 },
+ { 0xf98e, 1, 4412 },
+ { 0xf98f, 1, 4413 },
+ { 0xf990, 1, 4414 },
+ { 0xf991, 1, 4415 },
+ { 0xf992, 1, 4416 },
+ { 0xf993, 1, 4417 },
+ { 0xf994, 1, 4418 },
+ { 0xf995, 1, 4419 },
+ { 0xf996, 1, 4420 },
+ { 0xf997, 1, 4421 },
+ { 0xf998, 1, 4422 },
+ { 0xf999, 1, 4423 },
+ { 0xf99a, 1, 4424 },
+ { 0xf99b, 1, 4425 },
+ { 0xf99c, 1, 4426 },
+ { 0xf99d, 1, 4427 },
+ { 0xf99e, 1, 4428 },
+ { 0xf99f, 1, 4429 },
+ { 0xf9a0, 1, 4430 },
+ { 0xf9a1, 1, 4384 },
+ { 0xf9a2, 1, 4431 },
+ { 0xf9a3, 1, 4432 },
+ { 0xf9a4, 1, 4433 },
+ { 0xf9a5, 1, 4434 },
+ { 0xf9a6, 1, 4435 },
+ { 0xf9a7, 1, 4436 },
+ { 0xf9a8, 1, 4437 },
+ { 0xf9a9, 1, 4438 },
+ { 0xf9aa, 1, 4368 },
+ { 0xf9ab, 1, 4439 },
+ { 0xf9ac, 1, 4440 },
+ { 0xf9ad, 1, 4441 },
+ { 0xf9ae, 1, 4442 },
+ { 0xf9af, 1, 4443 },
+ { 0xf9b0, 1, 4444 },
+ { 0xf9b1, 1, 4445 },
+ { 0xf9b2, 1, 4446 },
+ { 0xf9b3, 1, 4447 },
+ { 0xf9b4, 1, 4448 },
+ { 0xf9b5, 1, 4449 },
+ { 0xf9b6, 1, 4450 },
+ { 0xf9b7, 1, 4451 },
+ { 0xf9b8, 1, 4452 },
+ { 0xf9b9, 1, 4453 },
+ { 0xf9ba, 1, 4454 },
+ { 0xf9bb, 1, 4455 },
+ { 0xf9bc, 1, 4456 },
+ { 0xf9bd, 1, 4457 },
+ { 0xf9be, 1, 4458 },
+ { 0xf9bf, 1, 4296 },
+ { 0xf9c0, 1, 4459 },
+ { 0xf9c1, 1, 4460 },
+ { 0xf9c2, 1, 4461 },
+ { 0xf9c3, 1, 4462 },
+ { 0xf9c4, 1, 2893 },
+ { 0xf9c5, 1, 4463 },
+ { 0xf9c6, 1, 4464 },
+ { 0xf9c7, 1, 4465 },
+ { 0xf9c8, 1, 4466 },
+ { 0xf9c9, 1, 4467 },
+ { 0xf9ca, 1, 4468 },
+ { 0xf9cb, 1, 4469 },
+ { 0xf9cc, 1, 4470 },
+ { 0xf9cd, 1, 4471 },
+ { 0xf9ce, 1, 4472 },
+ { 0xf9cf, 1, 4473 },
+ { 0xf9d0, 1, 4474 },
+ { 0xf9d1, 1, 3396 },
+ { 0xf9d2, 1, 4475 },
+ { 0xf9d3, 1, 4476 },
+ { 0xf9d4, 1, 4477 },
+ { 0xf9d5, 1, 4478 },
+ { 0xf9d6, 1, 4479 },
+ { 0xf9d7, 1, 4480 },
+ { 0xf9d8, 1, 4481 },
+ { 0xf9d9, 1, 4482 },
+ { 0xf9da, 1, 4483 },
+ { 0xf9db, 1, 4370 },
+ { 0xf9dc, 1, 4484 },
+ { 0xf9dd, 1, 4485 },
+ { 0xf9de, 1, 4486 },
+ { 0xf9df, 1, 4487 },
+ { 0xf9e0, 1, 4488 },
+ { 0xf9e1, 1, 4489 },
+ { 0xf9e2, 1, 4490 },
+ { 0xf9e3, 1, 4491 },
+ { 0xf9e4, 1, 4492 },
+ { 0xf9e5, 1, 4493 },
+ { 0xf9e6, 1, 4494 },
+ { 0xf9e7, 1, 4495 },
+ { 0xf9e8, 1, 4496 },
+ { 0xf9e9, 1, 2847 },
+ { 0xf9ea, 1, 4497 },
+ { 0xf9eb, 1, 4498 },
+ { 0xf9ec, 1, 4499 },
+ { 0xf9ed, 1, 4500 },
+ { 0xf9ee, 1, 4501 },
+ { 0xf9ef, 1, 4502 },
+ { 0xf9f0, 1, 4503 },
+ { 0xf9f1, 1, 4504 },
+ { 0xf9f2, 1, 4505 },
+ { 0xf9f3, 1, 4506 },
+ { 0xf9f4, 1, 4507 },
+ { 0xf9f5, 1, 4508 },
+ { 0xf9f6, 1, 4509 },
+ { 0xf9f7, 1, 2798 },
+ { 0xf9f8, 1, 4510 },
+ { 0xf9f9, 1, 4511 },
+ { 0xf9fa, 1, 4512 },
+ { 0xf9fb, 1, 4513 },
+ { 0xf9fc, 1, 4514 },
+ { 0xf9fd, 1, 4515 },
+ { 0xf9fe, 1, 4516 },
+ { 0xf9ff, 1, 4517 },
+ { 0xfa00, 1, 4518 },
+ { 0xfa01, 1, 4519 },
+ { 0xfa02, 1, 4520 },
+ { 0xfa03, 1, 4521 },
+ { 0xfa04, 1, 4522 },
+ { 0xfa05, 1, 4523 },
+ { 0xfa06, 1, 4524 },
+ { 0xfa07, 1, 4525 },
+ { 0xfa08, 1, 2825 },
+ { 0xfa09, 1, 4526 },
+ { 0xfa0a, 1, 2828 },
+ { 0xfa0b, 1, 4527 },
+ { 0xfa0c, 1, 4528 },
+ { 0xfa0d, 1, 4529 },
+ { 0xfa10, 1, 4530 },
+ { 0xfa12, 1, 4531 },
+ { 0xfa15, 1, 4532 },
+ { 0xfa16, 1, 4533 },
+ { 0xfa17, 1, 4534 },
+ { 0xfa18, 1, 4535 },
+ { 0xfa19, 1, 4536 },
+ { 0xfa1a, 1, 4537 },
+ { 0xfa1b, 1, 4538 },
+ { 0xfa1c, 1, 4539 },
+ { 0xfa1d, 1, 4540 },
+ { 0xfa1e, 1, 2805 },
+ { 0xfa20, 1, 4541 },
+ { 0xfa22, 1, 4542 },
+ { 0xfa25, 1, 4543 },
+ { 0xfa26, 1, 4544 },
+ { 0xfa2a, 1, 4545 },
+ { 0xfa2b, 1, 4546 },
+ { 0xfa2c, 1, 4547 },
+ { 0xfa2d, 1, 4548 },
+ { 0xfa30, 1, 4549 },
+ { 0xfa31, 1, 4550 },
+ { 0xfa32, 1, 4551 },
+ { 0xfa33, 1, 4552 },
+ { 0xfa34, 1, 4553 },
+ { 0xfa35, 1, 4554 },
+ { 0xfa36, 1, 4555 },
+ { 0xfa37, 1, 4556 },
+ { 0xfa38, 1, 4557 },
+ { 0xfa39, 1, 4558 },
+ { 0xfa3a, 1, 4559 },
+ { 0xfa3b, 1, 4560 },
+ { 0xfa3c, 1, 2726 },
+ { 0xfa3d, 1, 4561 },
+ { 0xfa3e, 1, 4562 },
+ { 0xfa3f, 1, 4563 },
+ { 0xfa40, 1, 4564 },
+ { 0xfa41, 1, 4565 },
+ { 0xfa42, 1, 4566 },
+ { 0xfa43, 1, 4567 },
+ { 0xfa44, 1, 4568 },
+ { 0xfa45, 1, 4569 },
+ { 0xfa46, 1, 4570 },
+ { 0xfa47, 1, 4571 },
+ { 0xfa48, 1, 4572 },
+ { 0xfa49, 1, 4573 },
+ { 0xfa4a, 1, 4574 },
+ { 0xfa4b, 1, 4575 },
+ { 0xfa4c, 1, 3401 },
+ { 0xfa4d, 1, 4576 },
+ { 0xfa4e, 1, 4577 },
+ { 0xfa4f, 1, 4578 },
+ { 0xfa50, 1, 4579 },
+ { 0xfa51, 1, 3405 },
+ { 0xfa52, 1, 4580 },
+ { 0xfa53, 1, 4581 },
+ { 0xfa54, 1, 4582 },
+ { 0xfa55, 1, 4583 },
+ { 0xfa56, 1, 4584 },
+ { 0xfa57, 1, 4420 },
+ { 0xfa58, 1, 4585 },
+ { 0xfa59, 1, 4586 },
+ { 0xfa5a, 1, 4587 },
+ { 0xfa5b, 1, 4588 },
+ { 0xfa5c, 1, 4589 },
+ { 0xfa5d, 1, 4590 },
+ { 0xfa5e, 1, 4590 },
+ { 0xfa5f, 1, 4591 },
+ { 0xfa60, 1, 4592 },
+ { 0xfa61, 1, 4593 },
+ { 0xfa62, 1, 4594 },
+ { 0xfa63, 1, 4595 },
+ { 0xfa64, 1, 4596 },
+ { 0xfa65, 1, 4597 },
+ { 0xfa66, 1, 4598 },
+ { 0xfa67, 1, 4543 },
+ { 0xfa68, 1, 4599 },
+ { 0xfa69, 1, 4600 },
+ { 0xfa6a, 1, 4601 },
+ { 0xfb00, 2, 4602 },
+ { 0xfb01, 2, 4604 },
+ { 0xfb02, 2, 4606 },
+ { 0xfb03, 3, 4608 },
+ { 0xfb04, 3, 4611 },
+ { 0xfb05, 2, 4614 },
+ { 0xfb06, 2, 4614 },
+ { 0xfb13, 2, 4616 },
+ { 0xfb14, 2, 4618 },
+ { 0xfb15, 2, 4620 },
+ { 0xfb16, 2, 4622 },
+ { 0xfb17, 2, 4624 },
+ { 0xfb1d, 2, 4626 },
+ { 0xfb1f, 2, 4628 },
+ { 0xfb20, 1, 4630 },
+ { 0xfb21, 1, 2228 },
+ { 0xfb22, 1, 2231 },
+ { 0xfb23, 1, 4631 },
+ { 0xfb24, 1, 4632 },
+ { 0xfb25, 1, 4633 },
+ { 0xfb26, 1, 4634 },
+ { 0xfb27, 1, 4635 },
+ { 0xfb28, 1, 4636 },
+ { 0xfb29, 1, 2176 },
+ { 0xfb2a, 2, 4637 },
+ { 0xfb2b, 2, 4639 },
+ { 0xfb2c, 3, 4641 },
+ { 0xfb2d, 3, 4644 },
+ { 0xfb2e, 2, 4647 },
+ { 0xfb2f, 2, 4649 },
+ { 0xfb30, 2, 4651 },
+ { 0xfb31, 2, 4653 },
+ { 0xfb32, 2, 4655 },
+ { 0xfb33, 2, 4657 },
+ { 0xfb34, 2, 4659 },
+ { 0xfb35, 2, 4661 },
+ { 0xfb36, 2, 4663 },
+ { 0xfb38, 2, 4665 },
+ { 0xfb39, 2, 4667 },
+ { 0xfb3a, 2, 4669 },
+ { 0xfb3b, 2, 4671 },
+ { 0xfb3c, 2, 4673 },
+ { 0xfb3e, 2, 4675 },
+ { 0xfb40, 2, 4677 },
+ { 0xfb41, 2, 4679 },
+ { 0xfb43, 2, 4681 },
+ { 0xfb44, 2, 4683 },
+ { 0xfb46, 2, 4685 },
+ { 0xfb47, 2, 4687 },
+ { 0xfb48, 2, 4689 },
+ { 0xfb49, 2, 4691 },
+ { 0xfb4a, 2, 4693 },
+ { 0xfb4b, 2, 4695 },
+ { 0xfb4c, 2, 4697 },
+ { 0xfb4d, 2, 4699 },
+ { 0xfb4e, 2, 4701 },
+ { 0xfb4f, 2, 4703 },
+ { 0xfb50, 1, 4705 },
+ { 0xfb51, 1, 4705 },
+ { 0xfb52, 1, 4706 },
+ { 0xfb53, 1, 4706 },
+ { 0xfb54, 1, 4706 },
+ { 0xfb55, 1, 4706 },
+ { 0xfb56, 1, 4707 },
+ { 0xfb57, 1, 4707 },
+ { 0xfb58, 1, 4707 },
+ { 0xfb59, 1, 4707 },
+ { 0xfb5a, 1, 4708 },
+ { 0xfb5b, 1, 4708 },
+ { 0xfb5c, 1, 4708 },
+ { 0xfb5d, 1, 4708 },
+ { 0xfb5e, 1, 4709 },
+ { 0xfb5f, 1, 4709 },
+ { 0xfb60, 1, 4709 },
+ { 0xfb61, 1, 4709 },
+ { 0xfb62, 1, 4710 },
+ { 0xfb63, 1, 4710 },
+ { 0xfb64, 1, 4710 },
+ { 0xfb65, 1, 4710 },
+ { 0xfb66, 1, 4711 },
+ { 0xfb67, 1, 4711 },
+ { 0xfb68, 1, 4711 },
+ { 0xfb69, 1, 4711 },
+ { 0xfb6a, 1, 4712 },
+ { 0xfb6b, 1, 4712 },
+ { 0xfb6c, 1, 4712 },
+ { 0xfb6d, 1, 4712 },
+ { 0xfb6e, 1, 4713 },
+ { 0xfb6f, 1, 4713 },
+ { 0xfb70, 1, 4713 },
+ { 0xfb71, 1, 4713 },
+ { 0xfb72, 1, 4714 },
+ { 0xfb73, 1, 4714 },
+ { 0xfb74, 1, 4714 },
+ { 0xfb75, 1, 4714 },
+ { 0xfb76, 1, 4715 },
+ { 0xfb77, 1, 4715 },
+ { 0xfb78, 1, 4715 },
+ { 0xfb79, 1, 4715 },
+ { 0xfb7a, 1, 4716 },
+ { 0xfb7b, 1, 4716 },
+ { 0xfb7c, 1, 4716 },
+ { 0xfb7d, 1, 4716 },
+ { 0xfb7e, 1, 4717 },
+ { 0xfb7f, 1, 4717 },
+ { 0xfb80, 1, 4717 },
+ { 0xfb81, 1, 4717 },
+ { 0xfb82, 1, 4718 },
+ { 0xfb83, 1, 4718 },
+ { 0xfb84, 1, 4719 },
+ { 0xfb85, 1, 4719 },
+ { 0xfb86, 1, 4720 },
+ { 0xfb87, 1, 4720 },
+ { 0xfb88, 1, 4721 },
+ { 0xfb89, 1, 4721 },
+ { 0xfb8a, 1, 4722 },
+ { 0xfb8b, 1, 4722 },
+ { 0xfb8c, 1, 4723 },
+ { 0xfb8d, 1, 4723 },
+ { 0xfb8e, 1, 4724 },
+ { 0xfb8f, 1, 4724 },
+ { 0xfb90, 1, 4724 },
+ { 0xfb91, 1, 4724 },
+ { 0xfb92, 1, 4725 },
+ { 0xfb93, 1, 4725 },
+ { 0xfb94, 1, 4725 },
+ { 0xfb95, 1, 4725 },
+ { 0xfb96, 1, 4726 },
+ { 0xfb97, 1, 4726 },
+ { 0xfb98, 1, 4726 },
+ { 0xfb99, 1, 4726 },
+ { 0xfb9a, 1, 4727 },
+ { 0xfb9b, 1, 4727 },
+ { 0xfb9c, 1, 4727 },
+ { 0xfb9d, 1, 4727 },
+ { 0xfb9e, 1, 4728 },
+ { 0xfb9f, 1, 4728 },
+ { 0xfba0, 1, 4729 },
+ { 0xfba1, 1, 4729 },
+ { 0xfba2, 1, 4729 },
+ { 0xfba3, 1, 4729 },
+ { 0xfba4, 2, 802 },
+ { 0xfba5, 2, 802 },
+ { 0xfba6, 1, 4730 },
+ { 0xfba7, 1, 4730 },
+ { 0xfba8, 1, 4730 },
+ { 0xfba9, 1, 4730 },
+ { 0xfbaa, 1, 4731 },
+ { 0xfbab, 1, 4731 },
+ { 0xfbac, 1, 4731 },
+ { 0xfbad, 1, 4731 },
+ { 0xfbae, 1, 4732 },
+ { 0xfbaf, 1, 4732 },
+ { 0xfbb0, 2, 806 },
+ { 0xfbb1, 2, 806 },
+ { 0xfbd3, 1, 4733 },
+ { 0xfbd4, 1, 4733 },
+ { 0xfbd5, 1, 4733 },
+ { 0xfbd6, 1, 4733 },
+ { 0xfbd7, 1, 4734 },
+ { 0xfbd8, 1, 4734 },
+ { 0xfbd9, 1, 4735 },
+ { 0xfbda, 1, 4735 },
+ { 0xfbdb, 1, 4736 },
+ { 0xfbdc, 1, 4736 },
+ { 0xfbdd, 2, 798 },
+ { 0xfbde, 1, 4737 },
+ { 0xfbdf, 1, 4737 },
+ { 0xfbe0, 1, 4738 },
+ { 0xfbe1, 1, 4738 },
+ { 0xfbe2, 1, 4739 },
+ { 0xfbe3, 1, 4739 },
+ { 0xfbe4, 1, 4740 },
+ { 0xfbe5, 1, 4740 },
+ { 0xfbe6, 1, 4740 },
+ { 0xfbe7, 1, 4740 },
+ { 0xfbe8, 1, 4741 },
+ { 0xfbe9, 1, 4741 },
+ { 0xfbea, 3, 4742 },
+ { 0xfbeb, 3, 4742 },
+ { 0xfbec, 3, 4745 },
+ { 0xfbed, 3, 4745 },
+ { 0xfbee, 3, 4748 },
+ { 0xfbef, 3, 4748 },
+ { 0xfbf0, 3, 4751 },
+ { 0xfbf1, 3, 4751 },
+ { 0xfbf2, 3, 4754 },
+ { 0xfbf3, 3, 4754 },
+ { 0xfbf4, 3, 4757 },
+ { 0xfbf5, 3, 4757 },
+ { 0xfbf6, 3, 4760 },
+ { 0xfbf7, 3, 4760 },
+ { 0xfbf8, 3, 4760 },
+ { 0xfbf9, 3, 4763 },
+ { 0xfbfa, 3, 4763 },
+ { 0xfbfb, 3, 4763 },
+ { 0xfbfc, 1, 4766 },
+ { 0xfbfd, 1, 4766 },
+ { 0xfbfe, 1, 4766 },
+ { 0xfbff, 1, 4766 },
+ { 0xfc00, 3, 4767 },
+ { 0xfc01, 3, 4770 },
+ { 0xfc02, 3, 4773 },
+ { 0xfc03, 3, 4763 },
+ { 0xfc04, 3, 4776 },
+ { 0xfc05, 2, 4779 },
+ { 0xfc06, 2, 4781 },
+ { 0xfc07, 2, 4783 },
+ { 0xfc08, 2, 4785 },
+ { 0xfc09, 2, 4787 },
+ { 0xfc0a, 2, 4789 },
+ { 0xfc0b, 2, 4791 },
+ { 0xfc0c, 2, 4793 },
+ { 0xfc0d, 2, 4795 },
+ { 0xfc0e, 2, 4797 },
+ { 0xfc0f, 2, 4799 },
+ { 0xfc10, 2, 4801 },
+ { 0xfc11, 2, 4803 },
+ { 0xfc12, 2, 4805 },
+ { 0xfc13, 2, 4807 },
+ { 0xfc14, 2, 4809 },
+ { 0xfc15, 2, 4811 },
+ { 0xfc16, 2, 4813 },
+ { 0xfc17, 2, 4815 },
+ { 0xfc18, 2, 4817 },
+ { 0xfc19, 2, 4819 },
+ { 0xfc1a, 2, 4821 },
+ { 0xfc1b, 2, 4823 },
+ { 0xfc1c, 2, 4825 },
+ { 0xfc1d, 2, 4827 },
+ { 0xfc1e, 2, 4829 },
+ { 0xfc1f, 2, 4831 },
+ { 0xfc20, 2, 4833 },
+ { 0xfc21, 2, 4835 },
+ { 0xfc22, 2, 4837 },
+ { 0xfc23, 2, 4839 },
+ { 0xfc24, 2, 4841 },
+ { 0xfc25, 2, 4843 },
+ { 0xfc26, 2, 4845 },
+ { 0xfc27, 2, 4847 },
+ { 0xfc28, 2, 4849 },
+ { 0xfc29, 2, 4851 },
+ { 0xfc2a, 2, 4853 },
+ { 0xfc2b, 2, 4855 },
+ { 0xfc2c, 2, 4857 },
+ { 0xfc2d, 2, 4859 },
+ { 0xfc2e, 2, 4861 },
+ { 0xfc2f, 2, 4863 },
+ { 0xfc30, 2, 4865 },
+ { 0xfc31, 2, 4867 },
+ { 0xfc32, 2, 4869 },
+ { 0xfc33, 2, 4871 },
+ { 0xfc34, 2, 4873 },
+ { 0xfc35, 2, 4875 },
+ { 0xfc36, 2, 4877 },
+ { 0xfc37, 2, 4879 },
+ { 0xfc38, 2, 4881 },
+ { 0xfc39, 2, 4883 },
+ { 0xfc3a, 2, 4885 },
+ { 0xfc3b, 2, 4887 },
+ { 0xfc3c, 2, 4889 },
+ { 0xfc3d, 2, 4891 },
+ { 0xfc3e, 2, 4893 },
+ { 0xfc3f, 2, 4895 },
+ { 0xfc40, 2, 4897 },
+ { 0xfc41, 2, 4899 },
+ { 0xfc42, 2, 4901 },
+ { 0xfc43, 2, 4903 },
+ { 0xfc44, 2, 4905 },
+ { 0xfc45, 2, 4907 },
+ { 0xfc46, 2, 4909 },
+ { 0xfc47, 2, 4911 },
+ { 0xfc48, 2, 4913 },
+ { 0xfc49, 2, 4915 },
+ { 0xfc4a, 2, 4917 },
+ { 0xfc4b, 2, 4919 },
+ { 0xfc4c, 2, 4921 },
+ { 0xfc4d, 2, 4923 },
+ { 0xfc4e, 2, 4925 },
+ { 0xfc4f, 2, 4927 },
+ { 0xfc50, 2, 4929 },
+ { 0xfc51, 2, 4931 },
+ { 0xfc52, 2, 4933 },
+ { 0xfc53, 2, 4935 },
+ { 0xfc54, 2, 4937 },
+ { 0xfc55, 2, 4939 },
+ { 0xfc56, 2, 4941 },
+ { 0xfc57, 2, 4943 },
+ { 0xfc58, 2, 4945 },
+ { 0xfc59, 2, 4947 },
+ { 0xfc5a, 2, 4949 },
+ { 0xfc5b, 2, 4951 },
+ { 0xfc5c, 2, 4953 },
+ { 0xfc5d, 2, 4955 },
+ { 0xfc5e, 3, 4957 },
+ { 0xfc5f, 3, 4960 },
+ { 0xfc60, 3, 4963 },
+ { 0xfc61, 3, 4966 },
+ { 0xfc62, 3, 4969 },
+ { 0xfc63, 3, 4972 },
+ { 0xfc64, 3, 4975 },
+ { 0xfc65, 3, 4978 },
+ { 0xfc66, 3, 4773 },
+ { 0xfc67, 3, 4981 },
+ { 0xfc68, 3, 4763 },
+ { 0xfc69, 3, 4776 },
+ { 0xfc6a, 2, 4984 },
+ { 0xfc6b, 2, 4986 },
+ { 0xfc6c, 2, 4785 },
+ { 0xfc6d, 2, 4988 },
+ { 0xfc6e, 2, 4787 },
+ { 0xfc6f, 2, 4789 },
+ { 0xfc70, 2, 4990 },
+ { 0xfc71, 2, 4992 },
+ { 0xfc72, 2, 4797 },
+ { 0xfc73, 2, 4994 },
+ { 0xfc74, 2, 4799 },
+ { 0xfc75, 2, 4801 },
+ { 0xfc76, 2, 4996 },
+ { 0xfc77, 2, 4998 },
+ { 0xfc78, 2, 4805 },
+ { 0xfc79, 2, 5000 },
+ { 0xfc7a, 2, 4807 },
+ { 0xfc7b, 2, 4809 },
+ { 0xfc7c, 2, 4867 },
+ { 0xfc7d, 2, 4869 },
+ { 0xfc7e, 2, 4875 },
+ { 0xfc7f, 2, 4877 },
+ { 0xfc80, 2, 4879 },
+ { 0xfc81, 2, 4887 },
+ { 0xfc82, 2, 4889 },
+ { 0xfc83, 2, 4891 },
+ { 0xfc84, 2, 4893 },
+ { 0xfc85, 2, 4901 },
+ { 0xfc86, 2, 4903 },
+ { 0xfc87, 2, 4905 },
+ { 0xfc88, 2, 5002 },
+ { 0xfc89, 2, 4913 },
+ { 0xfc8a, 2, 5004 },
+ { 0xfc8b, 2, 5006 },
+ { 0xfc8c, 2, 4925 },
+ { 0xfc8d, 2, 5008 },
+ { 0xfc8e, 2, 4927 },
+ { 0xfc8f, 2, 4929 },
+ { 0xfc90, 2, 4955 },
+ { 0xfc91, 2, 5010 },
+ { 0xfc92, 2, 5012 },
+ { 0xfc93, 2, 4945 },
+ { 0xfc94, 2, 5014 },
+ { 0xfc95, 2, 4947 },
+ { 0xfc96, 2, 4949 },
+ { 0xfc97, 3, 4767 },
+ { 0xfc98, 3, 4770 },
+ { 0xfc99, 3, 5016 },
+ { 0xfc9a, 3, 4773 },
+ { 0xfc9b, 3, 5019 },
+ { 0xfc9c, 2, 4779 },
+ { 0xfc9d, 2, 4781 },
+ { 0xfc9e, 2, 4783 },
+ { 0xfc9f, 2, 4785 },
+ { 0xfca0, 2, 5022 },
+ { 0xfca1, 2, 4791 },
+ { 0xfca2, 2, 4793 },
+ { 0xfca3, 2, 4795 },
+ { 0xfca4, 2, 4797 },
+ { 0xfca5, 2, 5024 },
+ { 0xfca6, 2, 4805 },
+ { 0xfca7, 2, 4811 },
+ { 0xfca8, 2, 4813 },
+ { 0xfca9, 2, 4815 },
+ { 0xfcaa, 2, 4817 },
+ { 0xfcab, 2, 4819 },
+ { 0xfcac, 2, 4823 },
+ { 0xfcad, 2, 4825 },
+ { 0xfcae, 2, 4827 },
+ { 0xfcaf, 2, 4829 },
+ { 0xfcb0, 2, 4831 },
+ { 0xfcb1, 2, 4833 },
+ { 0xfcb2, 2, 5026 },
+ { 0xfcb3, 2, 4835 },
+ { 0xfcb4, 2, 4837 },
+ { 0xfcb5, 2, 4839 },
+ { 0xfcb6, 2, 4841 },
+ { 0xfcb7, 2, 4843 },
+ { 0xfcb8, 2, 4845 },
+ { 0xfcb9, 2, 4849 },
+ { 0xfcba, 2, 4851 },
+ { 0xfcbb, 2, 4853 },
+ { 0xfcbc, 2, 4855 },
+ { 0xfcbd, 2, 4857 },
+ { 0xfcbe, 2, 4859 },
+ { 0xfcbf, 2, 4861 },
+ { 0xfcc0, 2, 4863 },
+ { 0xfcc1, 2, 4865 },
+ { 0xfcc2, 2, 4871 },
+ { 0xfcc3, 2, 4873 },
+ { 0xfcc4, 2, 4881 },
+ { 0xfcc5, 2, 4883 },
+ { 0xfcc6, 2, 4885 },
+ { 0xfcc7, 2, 4887 },
+ { 0xfcc8, 2, 4889 },
+ { 0xfcc9, 2, 4895 },
+ { 0xfcca, 2, 4897 },
+ { 0xfccb, 2, 4899 },
+ { 0xfccc, 2, 4901 },
+ { 0xfccd, 2, 5028 },
+ { 0xfcce, 2, 4907 },
+ { 0xfccf, 2, 4909 },
+ { 0xfcd0, 2, 4911 },
+ { 0xfcd1, 2, 4913 },
+ { 0xfcd2, 2, 4919 },
+ { 0xfcd3, 2, 4921 },
+ { 0xfcd4, 2, 4923 },
+ { 0xfcd5, 2, 4925 },
+ { 0xfcd6, 2, 5030 },
+ { 0xfcd7, 2, 4931 },
+ { 0xfcd8, 2, 4933 },
+ { 0xfcd9, 2, 5032 },
+ { 0xfcda, 2, 4939 },
+ { 0xfcdb, 2, 4941 },
+ { 0xfcdc, 2, 4943 },
+ { 0xfcdd, 2, 4945 },
+ { 0xfcde, 2, 5034 },
+ { 0xfcdf, 3, 4773 },
+ { 0xfce0, 3, 5019 },
+ { 0xfce1, 2, 4785 },
+ { 0xfce2, 2, 5022 },
+ { 0xfce3, 2, 4797 },
+ { 0xfce4, 2, 5024 },
+ { 0xfce5, 2, 4805 },
+ { 0xfce6, 2, 5036 },
+ { 0xfce7, 2, 4831 },
+ { 0xfce8, 2, 5038 },
+ { 0xfce9, 2, 5040 },
+ { 0xfcea, 2, 5042 },
+ { 0xfceb, 2, 4887 },
+ { 0xfcec, 2, 4889 },
+ { 0xfced, 2, 4901 },
+ { 0xfcee, 2, 4925 },
+ { 0xfcef, 2, 5030 },
+ { 0xfcf0, 2, 4945 },
+ { 0xfcf1, 2, 5034 },
+ { 0xfcf2, 3, 5044 },
+ { 0xfcf3, 3, 5047 },
+ { 0xfcf4, 3, 5050 },
+ { 0xfcf5, 2, 5053 },
+ { 0xfcf6, 2, 5055 },
+ { 0xfcf7, 2, 5057 },
+ { 0xfcf8, 2, 5059 },
+ { 0xfcf9, 2, 5061 },
+ { 0xfcfa, 2, 5063 },
+ { 0xfcfb, 2, 5065 },
+ { 0xfcfc, 2, 5067 },
+ { 0xfcfd, 2, 5069 },
+ { 0xfcfe, 2, 5071 },
+ { 0xfcff, 2, 5073 },
+ { 0xfd00, 2, 5075 },
+ { 0xfd01, 2, 5077 },
+ { 0xfd02, 2, 5079 },
+ { 0xfd03, 2, 5081 },
+ { 0xfd04, 2, 5083 },
+ { 0xfd05, 2, 5085 },
+ { 0xfd06, 2, 5087 },
+ { 0xfd07, 2, 5089 },
+ { 0xfd08, 2, 5091 },
+ { 0xfd09, 2, 5093 },
+ { 0xfd0a, 2, 5095 },
+ { 0xfd0b, 2, 5097 },
+ { 0xfd0c, 2, 5040 },
+ { 0xfd0d, 2, 5099 },
+ { 0xfd0e, 2, 5101 },
+ { 0xfd0f, 2, 5103 },
+ { 0xfd10, 2, 5105 },
+ { 0xfd11, 2, 5053 },
+ { 0xfd12, 2, 5055 },
+ { 0xfd13, 2, 5057 },
+ { 0xfd14, 2, 5059 },
+ { 0xfd15, 2, 5061 },
+ { 0xfd16, 2, 5063 },
+ { 0xfd17, 2, 5065 },
+ { 0xfd18, 2, 5067 },
+ { 0xfd19, 2, 5069 },
+ { 0xfd1a, 2, 5071 },
+ { 0xfd1b, 2, 5073 },
+ { 0xfd1c, 2, 5075 },
+ { 0xfd1d, 2, 5077 },
+ { 0xfd1e, 2, 5079 },
+ { 0xfd1f, 2, 5081 },
+ { 0xfd20, 2, 5083 },
+ { 0xfd21, 2, 5085 },
+ { 0xfd22, 2, 5087 },
+ { 0xfd23, 2, 5089 },
+ { 0xfd24, 2, 5091 },
+ { 0xfd25, 2, 5093 },
+ { 0xfd26, 2, 5095 },
+ { 0xfd27, 2, 5097 },
+ { 0xfd28, 2, 5040 },
+ { 0xfd29, 2, 5099 },
+ { 0xfd2a, 2, 5101 },
+ { 0xfd2b, 2, 5103 },
+ { 0xfd2c, 2, 5105 },
+ { 0xfd2d, 2, 5093 },
+ { 0xfd2e, 2, 5095 },
+ { 0xfd2f, 2, 5097 },
+ { 0xfd30, 2, 5040 },
+ { 0xfd31, 2, 5038 },
+ { 0xfd32, 2, 5042 },
+ { 0xfd33, 2, 4847 },
+ { 0xfd34, 2, 4825 },
+ { 0xfd35, 2, 4827 },
+ { 0xfd36, 2, 4829 },
+ { 0xfd37, 2, 5093 },
+ { 0xfd38, 2, 5095 },
+ { 0xfd39, 2, 5097 },
+ { 0xfd3a, 2, 4847 },
+ { 0xfd3b, 2, 4849 },
+ { 0xfd3c, 2, 5107 },
+ { 0xfd3d, 2, 5107 },
+ { 0xfd50, 3, 5109 },
+ { 0xfd51, 3, 5112 },
+ { 0xfd52, 3, 5112 },
+ { 0xfd53, 3, 5115 },
+ { 0xfd54, 3, 5118 },
+ { 0xfd55, 3, 5121 },
+ { 0xfd56, 3, 5124 },
+ { 0xfd57, 3, 5127 },
+ { 0xfd58, 3, 5130 },
+ { 0xfd59, 3, 5130 },
+ { 0xfd5a, 3, 5133 },
+ { 0xfd5b, 3, 5136 },
+ { 0xfd5c, 3, 5139 },
+ { 0xfd5d, 3, 5142 },
+ { 0xfd5e, 3, 5145 },
+ { 0xfd5f, 3, 5148 },
+ { 0xfd60, 3, 5148 },
+ { 0xfd61, 3, 5151 },
+ { 0xfd62, 3, 5154 },
+ { 0xfd63, 3, 5154 },
+ { 0xfd64, 3, 5157 },
+ { 0xfd65, 3, 5157 },
+ { 0xfd66, 3, 5160 },
+ { 0xfd67, 3, 5163 },
+ { 0xfd68, 3, 5163 },
+ { 0xfd69, 3, 5166 },
+ { 0xfd6a, 3, 5169 },
+ { 0xfd6b, 3, 5169 },
+ { 0xfd6c, 3, 5172 },
+ { 0xfd6d, 3, 5172 },
+ { 0xfd6e, 3, 5175 },
+ { 0xfd6f, 3, 5178 },
+ { 0xfd70, 3, 5178 },
+ { 0xfd71, 3, 5181 },
+ { 0xfd72, 3, 5181 },
+ { 0xfd73, 3, 5184 },
+ { 0xfd74, 3, 5187 },
+ { 0xfd75, 3, 5190 },
+ { 0xfd76, 3, 5193 },
+ { 0xfd77, 3, 5193 },
+ { 0xfd78, 3, 5196 },
+ { 0xfd79, 3, 5199 },
+ { 0xfd7a, 3, 5202 },
+ { 0xfd7b, 3, 5205 },
+ { 0xfd7c, 3, 5208 },
+ { 0xfd7d, 3, 5208 },
+ { 0xfd7e, 3, 5211 },
+ { 0xfd7f, 3, 5214 },
+ { 0xfd80, 3, 5217 },
+ { 0xfd81, 3, 5220 },
+ { 0xfd82, 3, 5223 },
+ { 0xfd83, 3, 5226 },
+ { 0xfd84, 3, 5226 },
+ { 0xfd85, 3, 5229 },
+ { 0xfd86, 3, 5229 },
+ { 0xfd87, 3, 5232 },
+ { 0xfd88, 3, 5232 },
+ { 0xfd89, 3, 5235 },
+ { 0xfd8a, 3, 5238 },
+ { 0xfd8b, 3, 5241 },
+ { 0xfd8c, 3, 5244 },
+ { 0xfd8d, 3, 5247 },
+ { 0xfd8e, 3, 5250 },
+ { 0xfd8f, 3, 5253 },
+ { 0xfd92, 3, 5256 },
+ { 0xfd93, 3, 5259 },
+ { 0xfd94, 3, 5262 },
+ { 0xfd95, 3, 5265 },
+ { 0xfd96, 3, 5268 },
+ { 0xfd97, 3, 5271 },
+ { 0xfd98, 3, 5271 },
+ { 0xfd99, 3, 5274 },
+ { 0xfd9a, 3, 5277 },
+ { 0xfd9b, 3, 5280 },
+ { 0xfd9c, 3, 5283 },
+ { 0xfd9d, 3, 5283 },
+ { 0xfd9e, 3, 5286 },
+ { 0xfd9f, 3, 5289 },
+ { 0xfda0, 3, 5292 },
+ { 0xfda1, 3, 5295 },
+ { 0xfda2, 3, 5298 },
+ { 0xfda3, 3, 5301 },
+ { 0xfda4, 3, 5304 },
+ { 0xfda5, 3, 5307 },
+ { 0xfda6, 3, 5310 },
+ { 0xfda7, 3, 5313 },
+ { 0xfda8, 3, 5316 },
+ { 0xfda9, 3, 5319 },
+ { 0xfdaa, 3, 5322 },
+ { 0xfdab, 3, 5325 },
+ { 0xfdac, 3, 5328 },
+ { 0xfdad, 3, 5331 },
+ { 0xfdae, 3, 5334 },
+ { 0xfdaf, 3, 5337 },
+ { 0xfdb0, 3, 5340 },
+ { 0xfdb1, 3, 5343 },
+ { 0xfdb2, 3, 5346 },
+ { 0xfdb3, 3, 5349 },
+ { 0xfdb4, 3, 5211 },
+ { 0xfdb5, 3, 5217 },
+ { 0xfdb6, 3, 5352 },
+ { 0xfdb7, 3, 5355 },
+ { 0xfdb8, 3, 5358 },
+ { 0xfdb9, 3, 5361 },
+ { 0xfdba, 3, 5364 },
+ { 0xfdbb, 3, 5367 },
+ { 0xfdbc, 3, 5364 },
+ { 0xfdbd, 3, 5358 },
+ { 0xfdbe, 3, 5370 },
+ { 0xfdbf, 3, 5373 },
+ { 0xfdc0, 3, 5376 },
+ { 0xfdc1, 3, 5379 },
+ { 0xfdc2, 3, 5382 },
+ { 0xfdc3, 3, 5367 },
+ { 0xfdc4, 3, 5190 },
+ { 0xfdc5, 3, 5160 },
+ { 0xfdc6, 3, 5385 },
+ { 0xfdc7, 3, 5388 },
+ { 0xfdf0, 3, 5391 },
+ { 0xfdf1, 3, 5394 },
+ { 0xfdf2, 4, 5397 },
+ { 0xfdf3, 4, 5401 },
+ { 0xfdf4, 4, 5405 },
+ { 0xfdf5, 4, 5409 },
+ { 0xfdf6, 4, 5413 },
+ { 0xfdf7, 4, 5417 },
+ { 0xfdf8, 4, 5421 },
+ { 0xfdf9, 3, 5425 },
+ { 0xfdfa, 18, 5428 },
+ { 0xfdfb, 8, 5446 },
+ { 0xfdfc, 4, 5454 },
+ { 0xfe30, 2, 2139 },
+ { 0xfe31, 1, 5458 },
+ { 0xfe32, 1, 5459 },
+ { 0xfe33, 1, 5460 },
+ { 0xfe34, 1, 5460 },
+ { 0xfe35, 1, 2179 },
+ { 0xfe36, 1, 2180 },
+ { 0xfe37, 1, 5461 },
+ { 0xfe38, 1, 5462 },
+ { 0xfe39, 1, 5463 },
+ { 0xfe3a, 1, 5464 },
+ { 0xfe3b, 1, 5465 },
+ { 0xfe3c, 1, 5466 },
+ { 0xfe3d, 1, 5467 },
+ { 0xfe3e, 1, 5468 },
+ { 0xfe3f, 1, 2425 },
+ { 0xfe40, 1, 2426 },
+ { 0xfe41, 1, 5469 },
+ { 0xfe42, 1, 5470 },
+ { 0xfe43, 1, 5471 },
+ { 0xfe44, 1, 5472 },
+ { 0xfe49, 2, 2156 },
+ { 0xfe4a, 2, 2156 },
+ { 0xfe4b, 2, 2156 },
+ { 0xfe4c, 2, 2156 },
+ { 0xfe4d, 1, 5460 },
+ { 0xfe4e, 1, 5460 },
+ { 0xfe4f, 1, 5460 },
+ { 0xfe50, 1, 5473 },
+ { 0xfe51, 1, 5474 },
+ { 0xfe52, 1, 2138 },
+ { 0xfe54, 1, 621 },
+ { 0xfe55, 1, 5475 },
+ { 0xfe56, 1, 5476 },
+ { 0xfe57, 1, 5477 },
+ { 0xfe58, 1, 5458 },
+ { 0xfe59, 1, 2179 },
+ { 0xfe5a, 1, 2180 },
+ { 0xfe5b, 1, 5461 },
+ { 0xfe5c, 1, 5462 },
+ { 0xfe5d, 1, 5463 },
+ { 0xfe5e, 1, 5464 },
+ { 0xfe5f, 1, 5478 },
+ { 0xfe60, 1, 5479 },
+ { 0xfe61, 1, 5480 },
+ { 0xfe62, 1, 2176 },
+ { 0xfe63, 1, 5481 },
+ { 0xfe64, 1, 5482 },
+ { 0xfe65, 1, 5483 },
+ { 0xfe66, 1, 2178 },
+ { 0xfe68, 1, 5484 },
+ { 0xfe69, 1, 5485 },
+ { 0xfe6a, 1, 5486 },
+ { 0xfe6b, 1, 5487 },
+ { 0xfe70, 2, 5488 },
+ { 0xfe71, 2, 5490 },
+ { 0xfe72, 2, 5492 },
+ { 0xfe74, 2, 5494 },
+ { 0xfe76, 2, 5496 },
+ { 0xfe77, 2, 5498 },
+ { 0xfe78, 2, 5500 },
+ { 0xfe79, 2, 5502 },
+ { 0xfe7a, 2, 5504 },
+ { 0xfe7b, 2, 5506 },
+ { 0xfe7c, 2, 5508 },
+ { 0xfe7d, 2, 5510 },
+ { 0xfe7e, 2, 5512 },
+ { 0xfe7f, 2, 5514 },
+ { 0xfe80, 1, 5516 },
+ { 0xfe81, 2, 784 },
+ { 0xfe82, 2, 784 },
+ { 0xfe83, 2, 786 },
+ { 0xfe84, 2, 786 },
+ { 0xfe85, 2, 788 },
+ { 0xfe86, 2, 788 },
+ { 0xfe87, 2, 790 },
+ { 0xfe88, 2, 790 },
+ { 0xfe89, 2, 792 },
+ { 0xfe8a, 2, 792 },
+ { 0xfe8b, 2, 792 },
+ { 0xfe8c, 2, 792 },
+ { 0xfe8d, 1, 5517 },
+ { 0xfe8e, 1, 5517 },
+ { 0xfe8f, 1, 5518 },
+ { 0xfe90, 1, 5518 },
+ { 0xfe91, 1, 5518 },
+ { 0xfe92, 1, 5518 },
+ { 0xfe93, 1, 5519 },
+ { 0xfe94, 1, 5519 },
+ { 0xfe95, 1, 5520 },
+ { 0xfe96, 1, 5520 },
+ { 0xfe97, 1, 5520 },
+ { 0xfe98, 1, 5520 },
+ { 0xfe99, 1, 5521 },
+ { 0xfe9a, 1, 5521 },
+ { 0xfe9b, 1, 5521 },
+ { 0xfe9c, 1, 5521 },
+ { 0xfe9d, 1, 5522 },
+ { 0xfe9e, 1, 5522 },
+ { 0xfe9f, 1, 5522 },
+ { 0xfea0, 1, 5522 },
+ { 0xfea1, 1, 5523 },
+ { 0xfea2, 1, 5523 },
+ { 0xfea3, 1, 5523 },
+ { 0xfea4, 1, 5523 },
+ { 0xfea5, 1, 5524 },
+ { 0xfea6, 1, 5524 },
+ { 0xfea7, 1, 5524 },
+ { 0xfea8, 1, 5524 },
+ { 0xfea9, 1, 5525 },
+ { 0xfeaa, 1, 5525 },
+ { 0xfeab, 1, 5526 },
+ { 0xfeac, 1, 5526 },
+ { 0xfead, 1, 5527 },
+ { 0xfeae, 1, 5527 },
+ { 0xfeaf, 1, 5528 },
+ { 0xfeb0, 1, 5528 },
+ { 0xfeb1, 1, 5529 },
+ { 0xfeb2, 1, 5529 },
+ { 0xfeb3, 1, 5529 },
+ { 0xfeb4, 1, 5529 },
+ { 0xfeb5, 1, 5530 },
+ { 0xfeb6, 1, 5530 },
+ { 0xfeb7, 1, 5530 },
+ { 0xfeb8, 1, 5530 },
+ { 0xfeb9, 1, 5531 },
+ { 0xfeba, 1, 5531 },
+ { 0xfebb, 1, 5531 },
+ { 0xfebc, 1, 5531 },
+ { 0xfebd, 1, 5532 },
+ { 0xfebe, 1, 5532 },
+ { 0xfebf, 1, 5532 },
+ { 0xfec0, 1, 5532 },
+ { 0xfec1, 1, 5533 },
+ { 0xfec2, 1, 5533 },
+ { 0xfec3, 1, 5533 },
+ { 0xfec4, 1, 5533 },
+ { 0xfec5, 1, 5534 },
+ { 0xfec6, 1, 5534 },
+ { 0xfec7, 1, 5534 },
+ { 0xfec8, 1, 5534 },
+ { 0xfec9, 1, 5535 },
+ { 0xfeca, 1, 5535 },
+ { 0xfecb, 1, 5535 },
+ { 0xfecc, 1, 5535 },
+ { 0xfecd, 1, 5536 },
+ { 0xfece, 1, 5536 },
+ { 0xfecf, 1, 5536 },
+ { 0xfed0, 1, 5536 },
+ { 0xfed1, 1, 5537 },
+ { 0xfed2, 1, 5537 },
+ { 0xfed3, 1, 5537 },
+ { 0xfed4, 1, 5537 },
+ { 0xfed5, 1, 5538 },
+ { 0xfed6, 1, 5538 },
+ { 0xfed7, 1, 5538 },
+ { 0xfed8, 1, 5538 },
+ { 0xfed9, 1, 5539 },
+ { 0xfeda, 1, 5539 },
+ { 0xfedb, 1, 5539 },
+ { 0xfedc, 1, 5539 },
+ { 0xfedd, 1, 5540 },
+ { 0xfede, 1, 5540 },
+ { 0xfedf, 1, 5540 },
+ { 0xfee0, 1, 5540 },
+ { 0xfee1, 1, 5541 },
+ { 0xfee2, 1, 5541 },
+ { 0xfee3, 1, 5541 },
+ { 0xfee4, 1, 5541 },
+ { 0xfee5, 1, 5542 },
+ { 0xfee6, 1, 5542 },
+ { 0xfee7, 1, 5542 },
+ { 0xfee8, 1, 5542 },
+ { 0xfee9, 1, 5543 },
+ { 0xfeea, 1, 5543 },
+ { 0xfeeb, 1, 5543 },
+ { 0xfeec, 1, 5543 },
+ { 0xfeed, 1, 5544 },
+ { 0xfeee, 1, 5544 },
+ { 0xfeef, 1, 4741 },
+ { 0xfef0, 1, 4741 },
+ { 0xfef1, 1, 5545 },
+ { 0xfef2, 1, 5545 },
+ { 0xfef3, 1, 5545 },
+ { 0xfef4, 1, 5545 },
+ { 0xfef5, 3, 5546 },
+ { 0xfef6, 3, 5546 },
+ { 0xfef7, 3, 5549 },
+ { 0xfef8, 3, 5549 },
+ { 0xfef9, 3, 5552 },
+ { 0xfefa, 3, 5552 },
+ { 0xfefb, 2, 5555 },
+ { 0xfefc, 2, 5555 },
+ { 0xff01, 1, 5477 },
+ { 0xff02, 1, 5557 },
+ { 0xff03, 1, 5478 },
+ { 0xff04, 1, 5485 },
+ { 0xff05, 1, 5486 },
+ { 0xff06, 1, 5479 },
+ { 0xff07, 1, 5558 },
+ { 0xff08, 1, 2179 },
+ { 0xff09, 1, 2180 },
+ { 0xff0a, 1, 5480 },
+ { 0xff0b, 1, 2176 },
+ { 0xff0c, 1, 5473 },
+ { 0xff0d, 1, 5481 },
+ { 0xff0e, 1, 2138 },
+ { 0xff0f, 1, 5559 },
+ { 0xff10, 1, 2168 },
+ { 0xff11, 1, 13 },
+ { 0xff12, 1, 6 },
+ { 0xff13, 1, 7 },
+ { 0xff14, 1, 2170 },
+ { 0xff15, 1, 2171 },
+ { 0xff16, 1, 2172 },
+ { 0xff17, 1, 2173 },
+ { 0xff18, 1, 2174 },
+ { 0xff19, 1, 2175 },
+ { 0xff1a, 1, 5475 },
+ { 0xff1b, 1, 621 },
+ { 0xff1c, 1, 5482 },
+ { 0xff1d, 1, 2178 },
+ { 0xff1e, 1, 5483 },
+ { 0xff1f, 1, 5476 },
+ { 0xff20, 1, 5487 },
+ { 0xff21, 1, 2649 },
+ { 0xff22, 1, 2223 },
+ { 0xff23, 1, 2190 },
+ { 0xff24, 1, 2236 },
+ { 0xff25, 1, 2225 },
+ { 0xff26, 1, 2226 },
+ { 0xff27, 1, 2650 },
+ { 0xff28, 1, 2203 },
+ { 0xff29, 1, 2205 },
+ { 0xff2a, 1, 2651 },
+ { 0xff2b, 1, 2222 },
+ { 0xff2c, 1, 2206 },
+ { 0xff2d, 1, 2227 },
+ { 0xff2e, 1, 2207 },
+ { 0xff2f, 1, 2652 },
+ { 0xff30, 1, 2210 },
+ { 0xff31, 1, 2211 },
+ { 0xff32, 1, 2212 },
+ { 0xff33, 1, 2653 },
+ { 0xff34, 1, 2654 },
+ { 0xff35, 1, 2655 },
+ { 0xff36, 1, 2283 },
+ { 0xff37, 1, 2656 },
+ { 0xff38, 1, 2295 },
+ { 0xff39, 1, 2657 },
+ { 0xff3a, 1, 2220 },
+ { 0xff3b, 1, 5560 },
+ { 0xff3c, 1, 5484 },
+ { 0xff3d, 1, 5561 },
+ { 0xff3e, 1, 5562 },
+ { 0xff3f, 1, 5460 },
+ { 0xff40, 1, 2113 },
+ { 0xff41, 1, 3 },
+ { 0xff42, 1, 2658 },
+ { 0xff43, 1, 2325 },
+ { 0xff44, 1, 2237 },
+ { 0xff45, 1, 2224 },
+ { 0xff46, 1, 2659 },
+ { 0xff47, 1, 2202 },
+ { 0xff48, 1, 588 },
+ { 0xff49, 1, 2169 },
+ { 0xff4a, 1, 590 },
+ { 0xff4b, 1, 2660 },
+ { 0xff4c, 1, 610 },
+ { 0xff4d, 1, 2326 },
+ { 0xff4e, 1, 2181 },
+ { 0xff4f, 1, 14 },
+ { 0xff50, 1, 2661 },
+ { 0xff51, 1, 2662 },
+ { 0xff52, 1, 591 },
+ { 0xff53, 1, 356 },
+ { 0xff54, 1, 2663 },
+ { 0xff55, 1, 2664 },
+ { 0xff56, 1, 2308 },
+ { 0xff57, 1, 595 },
+ { 0xff58, 1, 611 },
+ { 0xff59, 1, 596 },
+ { 0xff5a, 1, 2665 },
+ { 0xff5b, 1, 5461 },
+ { 0xff5c, 1, 5563 },
+ { 0xff5d, 1, 5462 },
+ { 0xff5e, 1, 5564 },
+ { 0xff5f, 1, 5565 },
+ { 0xff60, 1, 5566 },
+ { 0xff61, 1, 5567 },
+ { 0xff62, 1, 5469 },
+ { 0xff63, 1, 5470 },
+ { 0xff64, 1, 5474 },
+ { 0xff65, 1, 5568 },
+ { 0xff66, 1, 3530 },
+ { 0xff67, 1, 5569 },
+ { 0xff68, 1, 5570 },
+ { 0xff69, 1, 5571 },
+ { 0xff6a, 1, 5572 },
+ { 0xff6b, 1, 5573 },
+ { 0xff6c, 1, 5574 },
+ { 0xff6d, 1, 5575 },
+ { 0xff6e, 1, 5576 },
+ { 0xff6f, 1, 5577 },
+ { 0xff70, 1, 5578 },
+ { 0xff71, 1, 3484 },
+ { 0xff72, 1, 3485 },
+ { 0xff73, 1, 3486 },
+ { 0xff74, 1, 3487 },
+ { 0xff75, 1, 3488 },
+ { 0xff76, 1, 3489 },
+ { 0xff77, 1, 3490 },
+ { 0xff78, 1, 3491 },
+ { 0xff79, 1, 3492 },
+ { 0xff7a, 1, 3493 },
+ { 0xff7b, 1, 3494 },
+ { 0xff7c, 1, 3495 },
+ { 0xff7d, 1, 3496 },
+ { 0xff7e, 1, 3497 },
+ { 0xff7f, 1, 3498 },
+ { 0xff80, 1, 3499 },
+ { 0xff81, 1, 3500 },
+ { 0xff82, 1, 3501 },
+ { 0xff83, 1, 3502 },
+ { 0xff84, 1, 3503 },
+ { 0xff85, 1, 3504 },
+ { 0xff86, 1, 3505 },
+ { 0xff87, 1, 3506 },
+ { 0xff88, 1, 3507 },
+ { 0xff89, 1, 3508 },
+ { 0xff8a, 1, 3509 },
+ { 0xff8b, 1, 3510 },
+ { 0xff8c, 1, 3511 },
+ { 0xff8d, 1, 3512 },
+ { 0xff8e, 1, 3513 },
+ { 0xff8f, 1, 3514 },
+ { 0xff90, 1, 3515 },
+ { 0xff91, 1, 3516 },
+ { 0xff92, 1, 3517 },
+ { 0xff93, 1, 3518 },
+ { 0xff94, 1, 3519 },
+ { 0xff95, 1, 3520 },
+ { 0xff96, 1, 3521 },
+ { 0xff97, 1, 3522 },
+ { 0xff98, 1, 3523 },
+ { 0xff99, 1, 3524 },
+ { 0xff9a, 1, 3525 },
+ { 0xff9b, 1, 3526 },
+ { 0xff9c, 1, 3527 },
+ { 0xff9d, 1, 5579 },
+ { 0xff9e, 1, 5580 },
+ { 0xff9f, 1, 5581 },
+ { 0xffa0, 1, 3074 },
+ { 0xffa1, 1, 3023 },
+ { 0xffa2, 1, 3024 },
+ { 0xffa3, 1, 3025 },
+ { 0xffa4, 1, 3026 },
+ { 0xffa5, 1, 3027 },
+ { 0xffa6, 1, 3028 },
+ { 0xffa7, 1, 3029 },
+ { 0xffa8, 1, 3030 },
+ { 0xffa9, 1, 3031 },
+ { 0xffaa, 1, 3032 },
+ { 0xffab, 1, 3033 },
+ { 0xffac, 1, 3034 },
+ { 0xffad, 1, 3035 },
+ { 0xffae, 1, 3036 },
+ { 0xffaf, 1, 3037 },
+ { 0xffb0, 1, 3038 },
+ { 0xffb1, 1, 3039 },
+ { 0xffb2, 1, 3040 },
+ { 0xffb3, 1, 3041 },
+ { 0xffb4, 1, 3042 },
+ { 0xffb5, 1, 3043 },
+ { 0xffb6, 1, 3044 },
+ { 0xffb7, 1, 3045 },
+ { 0xffb8, 1, 3046 },
+ { 0xffb9, 1, 3047 },
+ { 0xffba, 1, 3048 },
+ { 0xffbb, 1, 3049 },
+ { 0xffbc, 1, 3050 },
+ { 0xffbd, 1, 3051 },
+ { 0xffbe, 1, 3052 },
+ { 0xffc2, 1, 3053 },
+ { 0xffc3, 1, 3054 },
+ { 0xffc4, 1, 3055 },
+ { 0xffc5, 1, 3056 },
+ { 0xffc6, 1, 3057 },
+ { 0xffc7, 1, 3058 },
+ { 0xffca, 1, 3059 },
+ { 0xffcb, 1, 3060 },
+ { 0xffcc, 1, 3061 },
+ { 0xffcd, 1, 3062 },
+ { 0xffce, 1, 3063 },
+ { 0xffcf, 1, 3064 },
+ { 0xffd2, 1, 3065 },
+ { 0xffd3, 1, 3066 },
+ { 0xffd4, 1, 3067 },
+ { 0xffd5, 1, 3068 },
+ { 0xffd6, 1, 3069 },
+ { 0xffd7, 1, 3070 },
+ { 0xffda, 1, 3071 },
+ { 0xffdb, 1, 3072 },
+ { 0xffdc, 1, 3073 },
+ { 0xffe0, 1, 5582 },
+ { 0xffe1, 1, 5583 },
+ { 0xffe2, 1, 5584 },
+ { 0xffe3, 2, 4 },
+ { 0xffe4, 1, 5585 },
+ { 0xffe5, 1, 5586 },
+ { 0xffe6, 1, 5587 },
+ { 0xffe8, 1, 5588 },
+ { 0xffe9, 1, 5589 },
+ { 0xffea, 1, 5590 },
+ { 0xffeb, 1, 5591 },
+ { 0xffec, 1, 5592 },
+ { 0xffed, 1, 5593 },
+ { 0xffee, 1, 5594 },
+ { 0x1d15e, 2, 5595 },
+ { 0x1d15f, 2, 5597 },
+ { 0x1d160, 3, 5599 },
+ { 0x1d161, 3, 5602 },
+ { 0x1d162, 3, 5605 },
+ { 0x1d163, 3, 5608 },
+ { 0x1d164, 3, 5611 },
+ { 0x1d1bb, 2, 5614 },
+ { 0x1d1bc, 2, 5616 },
+ { 0x1d1bd, 3, 5618 },
+ { 0x1d1be, 3, 5621 },
+ { 0x1d1bf, 3, 5624 },
+ { 0x1d1c0, 3, 5627 },
+ { 0x1d400, 1, 2649 },
+ { 0x1d401, 1, 2223 },
+ { 0x1d402, 1, 2190 },
+ { 0x1d403, 1, 2236 },
+ { 0x1d404, 1, 2225 },
+ { 0x1d405, 1, 2226 },
+ { 0x1d406, 1, 2650 },
+ { 0x1d407, 1, 2203 },
+ { 0x1d408, 1, 2205 },
+ { 0x1d409, 1, 2651 },
+ { 0x1d40a, 1, 2222 },
+ { 0x1d40b, 1, 2206 },
+ { 0x1d40c, 1, 2227 },
+ { 0x1d40d, 1, 2207 },
+ { 0x1d40e, 1, 2652 },
+ { 0x1d40f, 1, 2210 },
+ { 0x1d410, 1, 2211 },
+ { 0x1d411, 1, 2212 },
+ { 0x1d412, 1, 2653 },
+ { 0x1d413, 1, 2654 },
+ { 0x1d414, 1, 2655 },
+ { 0x1d415, 1, 2283 },
+ { 0x1d416, 1, 2656 },
+ { 0x1d417, 1, 2295 },
+ { 0x1d418, 1, 2657 },
+ { 0x1d419, 1, 2220 },
+ { 0x1d41a, 1, 3 },
+ { 0x1d41b, 1, 2658 },
+ { 0x1d41c, 1, 2325 },
+ { 0x1d41d, 1, 2237 },
+ { 0x1d41e, 1, 2224 },
+ { 0x1d41f, 1, 2659 },
+ { 0x1d420, 1, 2202 },
+ { 0x1d421, 1, 588 },
+ { 0x1d422, 1, 2169 },
+ { 0x1d423, 1, 590 },
+ { 0x1d424, 1, 2660 },
+ { 0x1d425, 1, 610 },
+ { 0x1d426, 1, 2326 },
+ { 0x1d427, 1, 2181 },
+ { 0x1d428, 1, 14 },
+ { 0x1d429, 1, 2661 },
+ { 0x1d42a, 1, 2662 },
+ { 0x1d42b, 1, 591 },
+ { 0x1d42c, 1, 356 },
+ { 0x1d42d, 1, 2663 },
+ { 0x1d42e, 1, 2664 },
+ { 0x1d42f, 1, 2308 },
+ { 0x1d430, 1, 595 },
+ { 0x1d431, 1, 611 },
+ { 0x1d432, 1, 596 },
+ { 0x1d433, 1, 2665 },
+ { 0x1d434, 1, 2649 },
+ { 0x1d435, 1, 2223 },
+ { 0x1d436, 1, 2190 },
+ { 0x1d437, 1, 2236 },
+ { 0x1d438, 1, 2225 },
+ { 0x1d439, 1, 2226 },
+ { 0x1d43a, 1, 2650 },
+ { 0x1d43b, 1, 2203 },
+ { 0x1d43c, 1, 2205 },
+ { 0x1d43d, 1, 2651 },
+ { 0x1d43e, 1, 2222 },
+ { 0x1d43f, 1, 2206 },
+ { 0x1d440, 1, 2227 },
+ { 0x1d441, 1, 2207 },
+ { 0x1d442, 1, 2652 },
+ { 0x1d443, 1, 2210 },
+ { 0x1d444, 1, 2211 },
+ { 0x1d445, 1, 2212 },
+ { 0x1d446, 1, 2653 },
+ { 0x1d447, 1, 2654 },
+ { 0x1d448, 1, 2655 },
+ { 0x1d449, 1, 2283 },
+ { 0x1d44a, 1, 2656 },
+ { 0x1d44b, 1, 2295 },
+ { 0x1d44c, 1, 2657 },
+ { 0x1d44d, 1, 2220 },
+ { 0x1d44e, 1, 3 },
+ { 0x1d44f, 1, 2658 },
+ { 0x1d450, 1, 2325 },
+ { 0x1d451, 1, 2237 },
+ { 0x1d452, 1, 2224 },
+ { 0x1d453, 1, 2659 },
+ { 0x1d454, 1, 2202 },
+ { 0x1d456, 1, 2169 },
+ { 0x1d457, 1, 590 },
+ { 0x1d458, 1, 2660 },
+ { 0x1d459, 1, 610 },
+ { 0x1d45a, 1, 2326 },
+ { 0x1d45b, 1, 2181 },
+ { 0x1d45c, 1, 14 },
+ { 0x1d45d, 1, 2661 },
+ { 0x1d45e, 1, 2662 },
+ { 0x1d45f, 1, 591 },
+ { 0x1d460, 1, 356 },
+ { 0x1d461, 1, 2663 },
+ { 0x1d462, 1, 2664 },
+ { 0x1d463, 1, 2308 },
+ { 0x1d464, 1, 595 },
+ { 0x1d465, 1, 611 },
+ { 0x1d466, 1, 596 },
+ { 0x1d467, 1, 2665 },
+ { 0x1d468, 1, 2649 },
+ { 0x1d469, 1, 2223 },
+ { 0x1d46a, 1, 2190 },
+ { 0x1d46b, 1, 2236 },
+ { 0x1d46c, 1, 2225 },
+ { 0x1d46d, 1, 2226 },
+ { 0x1d46e, 1, 2650 },
+ { 0x1d46f, 1, 2203 },
+ { 0x1d470, 1, 2205 },
+ { 0x1d471, 1, 2651 },
+ { 0x1d472, 1, 2222 },
+ { 0x1d473, 1, 2206 },
+ { 0x1d474, 1, 2227 },
+ { 0x1d475, 1, 2207 },
+ { 0x1d476, 1, 2652 },
+ { 0x1d477, 1, 2210 },
+ { 0x1d478, 1, 2211 },
+ { 0x1d479, 1, 2212 },
+ { 0x1d47a, 1, 2653 },
+ { 0x1d47b, 1, 2654 },
+ { 0x1d47c, 1, 2655 },
+ { 0x1d47d, 1, 2283 },
+ { 0x1d47e, 1, 2656 },
+ { 0x1d47f, 1, 2295 },
+ { 0x1d480, 1, 2657 },
+ { 0x1d481, 1, 2220 },
+ { 0x1d482, 1, 3 },
+ { 0x1d483, 1, 2658 },
+ { 0x1d484, 1, 2325 },
+ { 0x1d485, 1, 2237 },
+ { 0x1d486, 1, 2224 },
+ { 0x1d487, 1, 2659 },
+ { 0x1d488, 1, 2202 },
+ { 0x1d489, 1, 588 },
+ { 0x1d48a, 1, 2169 },
+ { 0x1d48b, 1, 590 },
+ { 0x1d48c, 1, 2660 },
+ { 0x1d48d, 1, 610 },
+ { 0x1d48e, 1, 2326 },
+ { 0x1d48f, 1, 2181 },
+ { 0x1d490, 1, 14 },
+ { 0x1d491, 1, 2661 },
+ { 0x1d492, 1, 2662 },
+ { 0x1d493, 1, 591 },
+ { 0x1d494, 1, 356 },
+ { 0x1d495, 1, 2663 },
+ { 0x1d496, 1, 2664 },
+ { 0x1d497, 1, 2308 },
+ { 0x1d498, 1, 595 },
+ { 0x1d499, 1, 611 },
+ { 0x1d49a, 1, 596 },
+ { 0x1d49b, 1, 2665 },
+ { 0x1d49c, 1, 2649 },
+ { 0x1d49e, 1, 2190 },
+ { 0x1d49f, 1, 2236 },
+ { 0x1d4a2, 1, 2650 },
+ { 0x1d4a5, 1, 2651 },
+ { 0x1d4a6, 1, 2222 },
+ { 0x1d4a9, 1, 2207 },
+ { 0x1d4aa, 1, 2652 },
+ { 0x1d4ab, 1, 2210 },
+ { 0x1d4ac, 1, 2211 },
+ { 0x1d4ae, 1, 2653 },
+ { 0x1d4af, 1, 2654 },
+ { 0x1d4b0, 1, 2655 },
+ { 0x1d4b1, 1, 2283 },
+ { 0x1d4b2, 1, 2656 },
+ { 0x1d4b3, 1, 2295 },
+ { 0x1d4b4, 1, 2657 },
+ { 0x1d4b5, 1, 2220 },
+ { 0x1d4b6, 1, 3 },
+ { 0x1d4b7, 1, 2658 },
+ { 0x1d4b8, 1, 2325 },
+ { 0x1d4b9, 1, 2237 },
+ { 0x1d4bb, 1, 2659 },
+ { 0x1d4bd, 1, 588 },
+ { 0x1d4be, 1, 2169 },
+ { 0x1d4bf, 1, 590 },
+ { 0x1d4c0, 1, 2660 },
+ { 0x1d4c2, 1, 2326 },
+ { 0x1d4c3, 1, 2181 },
+ { 0x1d4c5, 1, 2661 },
+ { 0x1d4c6, 1, 2662 },
+ { 0x1d4c7, 1, 591 },
+ { 0x1d4c8, 1, 356 },
+ { 0x1d4c9, 1, 2663 },
+ { 0x1d4ca, 1, 2664 },
+ { 0x1d4cb, 1, 2308 },
+ { 0x1d4cc, 1, 595 },
+ { 0x1d4cd, 1, 611 },
+ { 0x1d4ce, 1, 596 },
+ { 0x1d4cf, 1, 2665 },
+ { 0x1d4d0, 1, 2649 },
+ { 0x1d4d1, 1, 2223 },
+ { 0x1d4d2, 1, 2190 },
+ { 0x1d4d3, 1, 2236 },
+ { 0x1d4d4, 1, 2225 },
+ { 0x1d4d5, 1, 2226 },
+ { 0x1d4d6, 1, 2650 },
+ { 0x1d4d7, 1, 2203 },
+ { 0x1d4d8, 1, 2205 },
+ { 0x1d4d9, 1, 2651 },
+ { 0x1d4da, 1, 2222 },
+ { 0x1d4db, 1, 2206 },
+ { 0x1d4dc, 1, 2227 },
+ { 0x1d4dd, 1, 2207 },
+ { 0x1d4de, 1, 2652 },
+ { 0x1d4df, 1, 2210 },
+ { 0x1d4e0, 1, 2211 },
+ { 0x1d4e1, 1, 2212 },
+ { 0x1d4e2, 1, 2653 },
+ { 0x1d4e3, 1, 2654 },
+ { 0x1d4e4, 1, 2655 },
+ { 0x1d4e5, 1, 2283 },
+ { 0x1d4e6, 1, 2656 },
+ { 0x1d4e7, 1, 2295 },
+ { 0x1d4e8, 1, 2657 },
+ { 0x1d4e9, 1, 2220 },
+ { 0x1d4ea, 1, 3 },
+ { 0x1d4eb, 1, 2658 },
+ { 0x1d4ec, 1, 2325 },
+ { 0x1d4ed, 1, 2237 },
+ { 0x1d4ee, 1, 2224 },
+ { 0x1d4ef, 1, 2659 },
+ { 0x1d4f0, 1, 2202 },
+ { 0x1d4f1, 1, 588 },
+ { 0x1d4f2, 1, 2169 },
+ { 0x1d4f3, 1, 590 },
+ { 0x1d4f4, 1, 2660 },
+ { 0x1d4f5, 1, 610 },
+ { 0x1d4f6, 1, 2326 },
+ { 0x1d4f7, 1, 2181 },
+ { 0x1d4f8, 1, 14 },
+ { 0x1d4f9, 1, 2661 },
+ { 0x1d4fa, 1, 2662 },
+ { 0x1d4fb, 1, 591 },
+ { 0x1d4fc, 1, 356 },
+ { 0x1d4fd, 1, 2663 },
+ { 0x1d4fe, 1, 2664 },
+ { 0x1d4ff, 1, 2308 },
+ { 0x1d500, 1, 595 },
+ { 0x1d501, 1, 611 },
+ { 0x1d502, 1, 596 },
+ { 0x1d503, 1, 2665 },
+ { 0x1d504, 1, 2649 },
+ { 0x1d505, 1, 2223 },
+ { 0x1d507, 1, 2236 },
+ { 0x1d508, 1, 2225 },
+ { 0x1d509, 1, 2226 },
+ { 0x1d50a, 1, 2650 },
+ { 0x1d50d, 1, 2651 },
+ { 0x1d50e, 1, 2222 },
+ { 0x1d50f, 1, 2206 },
+ { 0x1d510, 1, 2227 },
+ { 0x1d511, 1, 2207 },
+ { 0x1d512, 1, 2652 },
+ { 0x1d513, 1, 2210 },
+ { 0x1d514, 1, 2211 },
+ { 0x1d516, 1, 2653 },
+ { 0x1d517, 1, 2654 },
+ { 0x1d518, 1, 2655 },
+ { 0x1d519, 1, 2283 },
+ { 0x1d51a, 1, 2656 },
+ { 0x1d51b, 1, 2295 },
+ { 0x1d51c, 1, 2657 },
+ { 0x1d51e, 1, 3 },
+ { 0x1d51f, 1, 2658 },
+ { 0x1d520, 1, 2325 },
+ { 0x1d521, 1, 2237 },
+ { 0x1d522, 1, 2224 },
+ { 0x1d523, 1, 2659 },
+ { 0x1d524, 1, 2202 },
+ { 0x1d525, 1, 588 },
+ { 0x1d526, 1, 2169 },
+ { 0x1d527, 1, 590 },
+ { 0x1d528, 1, 2660 },
+ { 0x1d529, 1, 610 },
+ { 0x1d52a, 1, 2326 },
+ { 0x1d52b, 1, 2181 },
+ { 0x1d52c, 1, 14 },
+ { 0x1d52d, 1, 2661 },
+ { 0x1d52e, 1, 2662 },
+ { 0x1d52f, 1, 591 },
+ { 0x1d530, 1, 356 },
+ { 0x1d531, 1, 2663 },
+ { 0x1d532, 1, 2664 },
+ { 0x1d533, 1, 2308 },
+ { 0x1d534, 1, 595 },
+ { 0x1d535, 1, 611 },
+ { 0x1d536, 1, 596 },
+ { 0x1d537, 1, 2665 },
+ { 0x1d538, 1, 2649 },
+ { 0x1d539, 1, 2223 },
+ { 0x1d53b, 1, 2236 },
+ { 0x1d53c, 1, 2225 },
+ { 0x1d53d, 1, 2226 },
+ { 0x1d53e, 1, 2650 },
+ { 0x1d540, 1, 2205 },
+ { 0x1d541, 1, 2651 },
+ { 0x1d542, 1, 2222 },
+ { 0x1d543, 1, 2206 },
+ { 0x1d544, 1, 2227 },
+ { 0x1d546, 1, 2652 },
+ { 0x1d54a, 1, 2653 },
+ { 0x1d54b, 1, 2654 },
+ { 0x1d54c, 1, 2655 },
+ { 0x1d54d, 1, 2283 },
+ { 0x1d54e, 1, 2656 },
+ { 0x1d54f, 1, 2295 },
+ { 0x1d550, 1, 2657 },
+ { 0x1d552, 1, 3 },
+ { 0x1d553, 1, 2658 },
+ { 0x1d554, 1, 2325 },
+ { 0x1d555, 1, 2237 },
+ { 0x1d556, 1, 2224 },
+ { 0x1d557, 1, 2659 },
+ { 0x1d558, 1, 2202 },
+ { 0x1d559, 1, 588 },
+ { 0x1d55a, 1, 2169 },
+ { 0x1d55b, 1, 590 },
+ { 0x1d55c, 1, 2660 },
+ { 0x1d55d, 1, 610 },
+ { 0x1d55e, 1, 2326 },
+ { 0x1d55f, 1, 2181 },
+ { 0x1d560, 1, 14 },
+ { 0x1d561, 1, 2661 },
+ { 0x1d562, 1, 2662 },
+ { 0x1d563, 1, 591 },
+ { 0x1d564, 1, 356 },
+ { 0x1d565, 1, 2663 },
+ { 0x1d566, 1, 2664 },
+ { 0x1d567, 1, 2308 },
+ { 0x1d568, 1, 595 },
+ { 0x1d569, 1, 611 },
+ { 0x1d56a, 1, 596 },
+ { 0x1d56b, 1, 2665 },
+ { 0x1d56c, 1, 2649 },
+ { 0x1d56d, 1, 2223 },
+ { 0x1d56e, 1, 2190 },
+ { 0x1d56f, 1, 2236 },
+ { 0x1d570, 1, 2225 },
+ { 0x1d571, 1, 2226 },
+ { 0x1d572, 1, 2650 },
+ { 0x1d573, 1, 2203 },
+ { 0x1d574, 1, 2205 },
+ { 0x1d575, 1, 2651 },
+ { 0x1d576, 1, 2222 },
+ { 0x1d577, 1, 2206 },
+ { 0x1d578, 1, 2227 },
+ { 0x1d579, 1, 2207 },
+ { 0x1d57a, 1, 2652 },
+ { 0x1d57b, 1, 2210 },
+ { 0x1d57c, 1, 2211 },
+ { 0x1d57d, 1, 2212 },
+ { 0x1d57e, 1, 2653 },
+ { 0x1d57f, 1, 2654 },
+ { 0x1d580, 1, 2655 },
+ { 0x1d581, 1, 2283 },
+ { 0x1d582, 1, 2656 },
+ { 0x1d583, 1, 2295 },
+ { 0x1d584, 1, 2657 },
+ { 0x1d585, 1, 2220 },
+ { 0x1d586, 1, 3 },
+ { 0x1d587, 1, 2658 },
+ { 0x1d588, 1, 2325 },
+ { 0x1d589, 1, 2237 },
+ { 0x1d58a, 1, 2224 },
+ { 0x1d58b, 1, 2659 },
+ { 0x1d58c, 1, 2202 },
+ { 0x1d58d, 1, 588 },
+ { 0x1d58e, 1, 2169 },
+ { 0x1d58f, 1, 590 },
+ { 0x1d590, 1, 2660 },
+ { 0x1d591, 1, 610 },
+ { 0x1d592, 1, 2326 },
+ { 0x1d593, 1, 2181 },
+ { 0x1d594, 1, 14 },
+ { 0x1d595, 1, 2661 },
+ { 0x1d596, 1, 2662 },
+ { 0x1d597, 1, 591 },
+ { 0x1d598, 1, 356 },
+ { 0x1d599, 1, 2663 },
+ { 0x1d59a, 1, 2664 },
+ { 0x1d59b, 1, 2308 },
+ { 0x1d59c, 1, 595 },
+ { 0x1d59d, 1, 611 },
+ { 0x1d59e, 1, 596 },
+ { 0x1d59f, 1, 2665 },
+ { 0x1d5a0, 1, 2649 },
+ { 0x1d5a1, 1, 2223 },
+ { 0x1d5a2, 1, 2190 },
+ { 0x1d5a3, 1, 2236 },
+ { 0x1d5a4, 1, 2225 },
+ { 0x1d5a5, 1, 2226 },
+ { 0x1d5a6, 1, 2650 },
+ { 0x1d5a7, 1, 2203 },
+ { 0x1d5a8, 1, 2205 },
+ { 0x1d5a9, 1, 2651 },
+ { 0x1d5aa, 1, 2222 },
+ { 0x1d5ab, 1, 2206 },
+ { 0x1d5ac, 1, 2227 },
+ { 0x1d5ad, 1, 2207 },
+ { 0x1d5ae, 1, 2652 },
+ { 0x1d5af, 1, 2210 },
+ { 0x1d5b0, 1, 2211 },
+ { 0x1d5b1, 1, 2212 },
+ { 0x1d5b2, 1, 2653 },
+ { 0x1d5b3, 1, 2654 },
+ { 0x1d5b4, 1, 2655 },
+ { 0x1d5b5, 1, 2283 },
+ { 0x1d5b6, 1, 2656 },
+ { 0x1d5b7, 1, 2295 },
+ { 0x1d5b8, 1, 2657 },
+ { 0x1d5b9, 1, 2220 },
+ { 0x1d5ba, 1, 3 },
+ { 0x1d5bb, 1, 2658 },
+ { 0x1d5bc, 1, 2325 },
+ { 0x1d5bd, 1, 2237 },
+ { 0x1d5be, 1, 2224 },
+ { 0x1d5bf, 1, 2659 },
+ { 0x1d5c0, 1, 2202 },
+ { 0x1d5c1, 1, 588 },
+ { 0x1d5c2, 1, 2169 },
+ { 0x1d5c3, 1, 590 },
+ { 0x1d5c4, 1, 2660 },
+ { 0x1d5c5, 1, 610 },
+ { 0x1d5c6, 1, 2326 },
+ { 0x1d5c7, 1, 2181 },
+ { 0x1d5c8, 1, 14 },
+ { 0x1d5c9, 1, 2661 },
+ { 0x1d5ca, 1, 2662 },
+ { 0x1d5cb, 1, 591 },
+ { 0x1d5cc, 1, 356 },
+ { 0x1d5cd, 1, 2663 },
+ { 0x1d5ce, 1, 2664 },
+ { 0x1d5cf, 1, 2308 },
+ { 0x1d5d0, 1, 595 },
+ { 0x1d5d1, 1, 611 },
+ { 0x1d5d2, 1, 596 },
+ { 0x1d5d3, 1, 2665 },
+ { 0x1d5d4, 1, 2649 },
+ { 0x1d5d5, 1, 2223 },
+ { 0x1d5d6, 1, 2190 },
+ { 0x1d5d7, 1, 2236 },
+ { 0x1d5d8, 1, 2225 },
+ { 0x1d5d9, 1, 2226 },
+ { 0x1d5da, 1, 2650 },
+ { 0x1d5db, 1, 2203 },
+ { 0x1d5dc, 1, 2205 },
+ { 0x1d5dd, 1, 2651 },
+ { 0x1d5de, 1, 2222 },
+ { 0x1d5df, 1, 2206 },
+ { 0x1d5e0, 1, 2227 },
+ { 0x1d5e1, 1, 2207 },
+ { 0x1d5e2, 1, 2652 },
+ { 0x1d5e3, 1, 2210 },
+ { 0x1d5e4, 1, 2211 },
+ { 0x1d5e5, 1, 2212 },
+ { 0x1d5e6, 1, 2653 },
+ { 0x1d5e7, 1, 2654 },
+ { 0x1d5e8, 1, 2655 },
+ { 0x1d5e9, 1, 2283 },
+ { 0x1d5ea, 1, 2656 },
+ { 0x1d5eb, 1, 2295 },
+ { 0x1d5ec, 1, 2657 },
+ { 0x1d5ed, 1, 2220 },
+ { 0x1d5ee, 1, 3 },
+ { 0x1d5ef, 1, 2658 },
+ { 0x1d5f0, 1, 2325 },
+ { 0x1d5f1, 1, 2237 },
+ { 0x1d5f2, 1, 2224 },
+ { 0x1d5f3, 1, 2659 },
+ { 0x1d5f4, 1, 2202 },
+ { 0x1d5f5, 1, 588 },
+ { 0x1d5f6, 1, 2169 },
+ { 0x1d5f7, 1, 590 },
+ { 0x1d5f8, 1, 2660 },
+ { 0x1d5f9, 1, 610 },
+ { 0x1d5fa, 1, 2326 },
+ { 0x1d5fb, 1, 2181 },
+ { 0x1d5fc, 1, 14 },
+ { 0x1d5fd, 1, 2661 },
+ { 0x1d5fe, 1, 2662 },
+ { 0x1d5ff, 1, 591 },
+ { 0x1d600, 1, 356 },
+ { 0x1d601, 1, 2663 },
+ { 0x1d602, 1, 2664 },
+ { 0x1d603, 1, 2308 },
+ { 0x1d604, 1, 595 },
+ { 0x1d605, 1, 611 },
+ { 0x1d606, 1, 596 },
+ { 0x1d607, 1, 2665 },
+ { 0x1d608, 1, 2649 },
+ { 0x1d609, 1, 2223 },
+ { 0x1d60a, 1, 2190 },
+ { 0x1d60b, 1, 2236 },
+ { 0x1d60c, 1, 2225 },
+ { 0x1d60d, 1, 2226 },
+ { 0x1d60e, 1, 2650 },
+ { 0x1d60f, 1, 2203 },
+ { 0x1d610, 1, 2205 },
+ { 0x1d611, 1, 2651 },
+ { 0x1d612, 1, 2222 },
+ { 0x1d613, 1, 2206 },
+ { 0x1d614, 1, 2227 },
+ { 0x1d615, 1, 2207 },
+ { 0x1d616, 1, 2652 },
+ { 0x1d617, 1, 2210 },
+ { 0x1d618, 1, 2211 },
+ { 0x1d619, 1, 2212 },
+ { 0x1d61a, 1, 2653 },
+ { 0x1d61b, 1, 2654 },
+ { 0x1d61c, 1, 2655 },
+ { 0x1d61d, 1, 2283 },
+ { 0x1d61e, 1, 2656 },
+ { 0x1d61f, 1, 2295 },
+ { 0x1d620, 1, 2657 },
+ { 0x1d621, 1, 2220 },
+ { 0x1d622, 1, 3 },
+ { 0x1d623, 1, 2658 },
+ { 0x1d624, 1, 2325 },
+ { 0x1d625, 1, 2237 },
+ { 0x1d626, 1, 2224 },
+ { 0x1d627, 1, 2659 },
+ { 0x1d628, 1, 2202 },
+ { 0x1d629, 1, 588 },
+ { 0x1d62a, 1, 2169 },
+ { 0x1d62b, 1, 590 },
+ { 0x1d62c, 1, 2660 },
+ { 0x1d62d, 1, 610 },
+ { 0x1d62e, 1, 2326 },
+ { 0x1d62f, 1, 2181 },
+ { 0x1d630, 1, 14 },
+ { 0x1d631, 1, 2661 },
+ { 0x1d632, 1, 2662 },
+ { 0x1d633, 1, 591 },
+ { 0x1d634, 1, 356 },
+ { 0x1d635, 1, 2663 },
+ { 0x1d636, 1, 2664 },
+ { 0x1d637, 1, 2308 },
+ { 0x1d638, 1, 595 },
+ { 0x1d639, 1, 611 },
+ { 0x1d63a, 1, 596 },
+ { 0x1d63b, 1, 2665 },
+ { 0x1d63c, 1, 2649 },
+ { 0x1d63d, 1, 2223 },
+ { 0x1d63e, 1, 2190 },
+ { 0x1d63f, 1, 2236 },
+ { 0x1d640, 1, 2225 },
+ { 0x1d641, 1, 2226 },
+ { 0x1d642, 1, 2650 },
+ { 0x1d643, 1, 2203 },
+ { 0x1d644, 1, 2205 },
+ { 0x1d645, 1, 2651 },
+ { 0x1d646, 1, 2222 },
+ { 0x1d647, 1, 2206 },
+ { 0x1d648, 1, 2227 },
+ { 0x1d649, 1, 2207 },
+ { 0x1d64a, 1, 2652 },
+ { 0x1d64b, 1, 2210 },
+ { 0x1d64c, 1, 2211 },
+ { 0x1d64d, 1, 2212 },
+ { 0x1d64e, 1, 2653 },
+ { 0x1d64f, 1, 2654 },
+ { 0x1d650, 1, 2655 },
+ { 0x1d651, 1, 2283 },
+ { 0x1d652, 1, 2656 },
+ { 0x1d653, 1, 2295 },
+ { 0x1d654, 1, 2657 },
+ { 0x1d655, 1, 2220 },
+ { 0x1d656, 1, 3 },
+ { 0x1d657, 1, 2658 },
+ { 0x1d658, 1, 2325 },
+ { 0x1d659, 1, 2237 },
+ { 0x1d65a, 1, 2224 },
+ { 0x1d65b, 1, 2659 },
+ { 0x1d65c, 1, 2202 },
+ { 0x1d65d, 1, 588 },
+ { 0x1d65e, 1, 2169 },
+ { 0x1d65f, 1, 590 },
+ { 0x1d660, 1, 2660 },
+ { 0x1d661, 1, 610 },
+ { 0x1d662, 1, 2326 },
+ { 0x1d663, 1, 2181 },
+ { 0x1d664, 1, 14 },
+ { 0x1d665, 1, 2661 },
+ { 0x1d666, 1, 2662 },
+ { 0x1d667, 1, 591 },
+ { 0x1d668, 1, 356 },
+ { 0x1d669, 1, 2663 },
+ { 0x1d66a, 1, 2664 },
+ { 0x1d66b, 1, 2308 },
+ { 0x1d66c, 1, 595 },
+ { 0x1d66d, 1, 611 },
+ { 0x1d66e, 1, 596 },
+ { 0x1d66f, 1, 2665 },
+ { 0x1d670, 1, 2649 },
+ { 0x1d671, 1, 2223 },
+ { 0x1d672, 1, 2190 },
+ { 0x1d673, 1, 2236 },
+ { 0x1d674, 1, 2225 },
+ { 0x1d675, 1, 2226 },
+ { 0x1d676, 1, 2650 },
+ { 0x1d677, 1, 2203 },
+ { 0x1d678, 1, 2205 },
+ { 0x1d679, 1, 2651 },
+ { 0x1d67a, 1, 2222 },
+ { 0x1d67b, 1, 2206 },
+ { 0x1d67c, 1, 2227 },
+ { 0x1d67d, 1, 2207 },
+ { 0x1d67e, 1, 2652 },
+ { 0x1d67f, 1, 2210 },
+ { 0x1d680, 1, 2211 },
+ { 0x1d681, 1, 2212 },
+ { 0x1d682, 1, 2653 },
+ { 0x1d683, 1, 2654 },
+ { 0x1d684, 1, 2655 },
+ { 0x1d685, 1, 2283 },
+ { 0x1d686, 1, 2656 },
+ { 0x1d687, 1, 2295 },
+ { 0x1d688, 1, 2657 },
+ { 0x1d689, 1, 2220 },
+ { 0x1d68a, 1, 3 },
+ { 0x1d68b, 1, 2658 },
+ { 0x1d68c, 1, 2325 },
+ { 0x1d68d, 1, 2237 },
+ { 0x1d68e, 1, 2224 },
+ { 0x1d68f, 1, 2659 },
+ { 0x1d690, 1, 2202 },
+ { 0x1d691, 1, 588 },
+ { 0x1d692, 1, 2169 },
+ { 0x1d693, 1, 590 },
+ { 0x1d694, 1, 2660 },
+ { 0x1d695, 1, 610 },
+ { 0x1d696, 1, 2326 },
+ { 0x1d697, 1, 2181 },
+ { 0x1d698, 1, 14 },
+ { 0x1d699, 1, 2661 },
+ { 0x1d69a, 1, 2662 },
+ { 0x1d69b, 1, 591 },
+ { 0x1d69c, 1, 356 },
+ { 0x1d69d, 1, 2663 },
+ { 0x1d69e, 1, 2664 },
+ { 0x1d69f, 1, 2308 },
+ { 0x1d6a0, 1, 595 },
+ { 0x1d6a1, 1, 611 },
+ { 0x1d6a2, 1, 596 },
+ { 0x1d6a3, 1, 2665 },
+ { 0x1d6a8, 1, 5630 },
+ { 0x1d6a9, 1, 5631 },
+ { 0x1d6aa, 1, 2233 },
+ { 0x1d6ab, 1, 5632 },
+ { 0x1d6ac, 1, 5633 },
+ { 0x1d6ad, 1, 5634 },
+ { 0x1d6ae, 1, 5635 },
+ { 0x1d6af, 1, 676 },
+ { 0x1d6b0, 1, 5636 },
+ { 0x1d6b1, 1, 5637 },
+ { 0x1d6b2, 1, 5638 },
+ { 0x1d6b3, 1, 5639 },
+ { 0x1d6b4, 1, 5640 },
+ { 0x1d6b5, 1, 5641 },
+ { 0x1d6b6, 1, 5642 },
+ { 0x1d6b7, 1, 2234 },
+ { 0x1d6b8, 1, 5643 },
+ { 0x1d6b9, 1, 676 },
+ { 0x1d6ba, 1, 5644 },
+ { 0x1d6bb, 1, 5645 },
+ { 0x1d6bc, 1, 670 },
+ { 0x1d6bd, 1, 5646 },
+ { 0x1d6be, 1, 5647 },
+ { 0x1d6bf, 1, 5648 },
+ { 0x1d6c0, 1, 2221 },
+ { 0x1d6c1, 1, 5649 },
+ { 0x1d6c2, 1, 5650 },
+ { 0x1d6c3, 1, 668 },
+ { 0x1d6c4, 1, 2232 },
+ { 0x1d6c5, 1, 5651 },
+ { 0x1d6c6, 1, 677 },
+ { 0x1d6c7, 1, 5652 },
+ { 0x1d6c8, 1, 5653 },
+ { 0x1d6c9, 1, 669 },
+ { 0x1d6ca, 1, 2025 },
+ { 0x1d6cb, 1, 673 },
+ { 0x1d6cc, 1, 5654 },
+ { 0x1d6cd, 1, 10 },
+ { 0x1d6ce, 1, 5655 },
+ { 0x1d6cf, 1, 5656 },
+ { 0x1d6d0, 1, 5657 },
+ { 0x1d6d1, 1, 672 },
+ { 0x1d6d2, 1, 674 },
+ { 0x1d6d3, 1, 675 },
+ { 0x1d6d4, 1, 5658 },
+ { 0x1d6d5, 1, 5659 },
+ { 0x1d6d6, 1, 5660 },
+ { 0x1d6d7, 1, 671 },
+ { 0x1d6d8, 1, 5661 },
+ { 0x1d6d9, 1, 5662 },
+ { 0x1d6da, 1, 5663 },
+ { 0x1d6db, 1, 5664 },
+ { 0x1d6dc, 1, 677 },
+ { 0x1d6dd, 1, 669 },
+ { 0x1d6de, 1, 673 },
+ { 0x1d6df, 1, 671 },
+ { 0x1d6e0, 1, 674 },
+ { 0x1d6e1, 1, 672 },
+ { 0x1d6e2, 1, 5630 },
+ { 0x1d6e3, 1, 5631 },
+ { 0x1d6e4, 1, 2233 },
+ { 0x1d6e5, 1, 5632 },
+ { 0x1d6e6, 1, 5633 },
+ { 0x1d6e7, 1, 5634 },
+ { 0x1d6e8, 1, 5635 },
+ { 0x1d6e9, 1, 676 },
+ { 0x1d6ea, 1, 5636 },
+ { 0x1d6eb, 1, 5637 },
+ { 0x1d6ec, 1, 5638 },
+ { 0x1d6ed, 1, 5639 },
+ { 0x1d6ee, 1, 5640 },
+ { 0x1d6ef, 1, 5641 },
+ { 0x1d6f0, 1, 5642 },
+ { 0x1d6f1, 1, 2234 },
+ { 0x1d6f2, 1, 5643 },
+ { 0x1d6f3, 1, 676 },
+ { 0x1d6f4, 1, 5644 },
+ { 0x1d6f5, 1, 5645 },
+ { 0x1d6f6, 1, 670 },
+ { 0x1d6f7, 1, 5646 },
+ { 0x1d6f8, 1, 5647 },
+ { 0x1d6f9, 1, 5648 },
+ { 0x1d6fa, 1, 2221 },
+ { 0x1d6fb, 1, 5649 },
+ { 0x1d6fc, 1, 5650 },
+ { 0x1d6fd, 1, 668 },
+ { 0x1d6fe, 1, 2232 },
+ { 0x1d6ff, 1, 5651 },
+ { 0x1d700, 1, 677 },
+ { 0x1d701, 1, 5652 },
+ { 0x1d702, 1, 5653 },
+ { 0x1d703, 1, 669 },
+ { 0x1d704, 1, 2025 },
+ { 0x1d705, 1, 673 },
+ { 0x1d706, 1, 5654 },
+ { 0x1d707, 1, 10 },
+ { 0x1d708, 1, 5655 },
+ { 0x1d709, 1, 5656 },
+ { 0x1d70a, 1, 5657 },
+ { 0x1d70b, 1, 672 },
+ { 0x1d70c, 1, 674 },
+ { 0x1d70d, 1, 675 },
+ { 0x1d70e, 1, 5658 },
+ { 0x1d70f, 1, 5659 },
+ { 0x1d710, 1, 5660 },
+ { 0x1d711, 1, 671 },
+ { 0x1d712, 1, 5661 },
+ { 0x1d713, 1, 5662 },
+ { 0x1d714, 1, 5663 },
+ { 0x1d715, 1, 5664 },
+ { 0x1d716, 1, 677 },
+ { 0x1d717, 1, 669 },
+ { 0x1d718, 1, 673 },
+ { 0x1d719, 1, 671 },
+ { 0x1d71a, 1, 674 },
+ { 0x1d71b, 1, 672 },
+ { 0x1d71c, 1, 5630 },
+ { 0x1d71d, 1, 5631 },
+ { 0x1d71e, 1, 2233 },
+ { 0x1d71f, 1, 5632 },
+ { 0x1d720, 1, 5633 },
+ { 0x1d721, 1, 5634 },
+ { 0x1d722, 1, 5635 },
+ { 0x1d723, 1, 676 },
+ { 0x1d724, 1, 5636 },
+ { 0x1d725, 1, 5637 },
+ { 0x1d726, 1, 5638 },
+ { 0x1d727, 1, 5639 },
+ { 0x1d728, 1, 5640 },
+ { 0x1d729, 1, 5641 },
+ { 0x1d72a, 1, 5642 },
+ { 0x1d72b, 1, 2234 },
+ { 0x1d72c, 1, 5643 },
+ { 0x1d72d, 1, 676 },
+ { 0x1d72e, 1, 5644 },
+ { 0x1d72f, 1, 5645 },
+ { 0x1d730, 1, 670 },
+ { 0x1d731, 1, 5646 },
+ { 0x1d732, 1, 5647 },
+ { 0x1d733, 1, 5648 },
+ { 0x1d734, 1, 2221 },
+ { 0x1d735, 1, 5649 },
+ { 0x1d736, 1, 5650 },
+ { 0x1d737, 1, 668 },
+ { 0x1d738, 1, 2232 },
+ { 0x1d739, 1, 5651 },
+ { 0x1d73a, 1, 677 },
+ { 0x1d73b, 1, 5652 },
+ { 0x1d73c, 1, 5653 },
+ { 0x1d73d, 1, 669 },
+ { 0x1d73e, 1, 2025 },
+ { 0x1d73f, 1, 673 },
+ { 0x1d740, 1, 5654 },
+ { 0x1d741, 1, 10 },
+ { 0x1d742, 1, 5655 },
+ { 0x1d743, 1, 5656 },
+ { 0x1d744, 1, 5657 },
+ { 0x1d745, 1, 672 },
+ { 0x1d746, 1, 674 },
+ { 0x1d747, 1, 675 },
+ { 0x1d748, 1, 5658 },
+ { 0x1d749, 1, 5659 },
+ { 0x1d74a, 1, 5660 },
+ { 0x1d74b, 1, 671 },
+ { 0x1d74c, 1, 5661 },
+ { 0x1d74d, 1, 5662 },
+ { 0x1d74e, 1, 5663 },
+ { 0x1d74f, 1, 5664 },
+ { 0x1d750, 1, 677 },
+ { 0x1d751, 1, 669 },
+ { 0x1d752, 1, 673 },
+ { 0x1d753, 1, 671 },
+ { 0x1d754, 1, 674 },
+ { 0x1d755, 1, 672 },
+ { 0x1d756, 1, 5630 },
+ { 0x1d757, 1, 5631 },
+ { 0x1d758, 1, 2233 },
+ { 0x1d759, 1, 5632 },
+ { 0x1d75a, 1, 5633 },
+ { 0x1d75b, 1, 5634 },
+ { 0x1d75c, 1, 5635 },
+ { 0x1d75d, 1, 676 },
+ { 0x1d75e, 1, 5636 },
+ { 0x1d75f, 1, 5637 },
+ { 0x1d760, 1, 5638 },
+ { 0x1d761, 1, 5639 },
+ { 0x1d762, 1, 5640 },
+ { 0x1d763, 1, 5641 },
+ { 0x1d764, 1, 5642 },
+ { 0x1d765, 1, 2234 },
+ { 0x1d766, 1, 5643 },
+ { 0x1d767, 1, 676 },
+ { 0x1d768, 1, 5644 },
+ { 0x1d769, 1, 5645 },
+ { 0x1d76a, 1, 670 },
+ { 0x1d76b, 1, 5646 },
+ { 0x1d76c, 1, 5647 },
+ { 0x1d76d, 1, 5648 },
+ { 0x1d76e, 1, 2221 },
+ { 0x1d76f, 1, 5649 },
+ { 0x1d770, 1, 5650 },
+ { 0x1d771, 1, 668 },
+ { 0x1d772, 1, 2232 },
+ { 0x1d773, 1, 5651 },
+ { 0x1d774, 1, 677 },
+ { 0x1d775, 1, 5652 },
+ { 0x1d776, 1, 5653 },
+ { 0x1d777, 1, 669 },
+ { 0x1d778, 1, 2025 },
+ { 0x1d779, 1, 673 },
+ { 0x1d77a, 1, 5654 },
+ { 0x1d77b, 1, 10 },
+ { 0x1d77c, 1, 5655 },
+ { 0x1d77d, 1, 5656 },
+ { 0x1d77e, 1, 5657 },
+ { 0x1d77f, 1, 672 },
+ { 0x1d780, 1, 674 },
+ { 0x1d781, 1, 675 },
+ { 0x1d782, 1, 5658 },
+ { 0x1d783, 1, 5659 },
+ { 0x1d784, 1, 5660 },
+ { 0x1d785, 1, 671 },
+ { 0x1d786, 1, 5661 },
+ { 0x1d787, 1, 5662 },
+ { 0x1d788, 1, 5663 },
+ { 0x1d789, 1, 5664 },
+ { 0x1d78a, 1, 677 },
+ { 0x1d78b, 1, 669 },
+ { 0x1d78c, 1, 673 },
+ { 0x1d78d, 1, 671 },
+ { 0x1d78e, 1, 674 },
+ { 0x1d78f, 1, 672 },
+ { 0x1d790, 1, 5630 },
+ { 0x1d791, 1, 5631 },
+ { 0x1d792, 1, 2233 },
+ { 0x1d793, 1, 5632 },
+ { 0x1d794, 1, 5633 },
+ { 0x1d795, 1, 5634 },
+ { 0x1d796, 1, 5635 },
+ { 0x1d797, 1, 676 },
+ { 0x1d798, 1, 5636 },
+ { 0x1d799, 1, 5637 },
+ { 0x1d79a, 1, 5638 },
+ { 0x1d79b, 1, 5639 },
+ { 0x1d79c, 1, 5640 },
+ { 0x1d79d, 1, 5641 },
+ { 0x1d79e, 1, 5642 },
+ { 0x1d79f, 1, 2234 },
+ { 0x1d7a0, 1, 5643 },
+ { 0x1d7a1, 1, 676 },
+ { 0x1d7a2, 1, 5644 },
+ { 0x1d7a3, 1, 5645 },
+ { 0x1d7a4, 1, 670 },
+ { 0x1d7a5, 1, 5646 },
+ { 0x1d7a6, 1, 5647 },
+ { 0x1d7a7, 1, 5648 },
+ { 0x1d7a8, 1, 2221 },
+ { 0x1d7a9, 1, 5649 },
+ { 0x1d7aa, 1, 5650 },
+ { 0x1d7ab, 1, 668 },
+ { 0x1d7ac, 1, 2232 },
+ { 0x1d7ad, 1, 5651 },
+ { 0x1d7ae, 1, 677 },
+ { 0x1d7af, 1, 5652 },
+ { 0x1d7b0, 1, 5653 },
+ { 0x1d7b1, 1, 669 },
+ { 0x1d7b2, 1, 2025 },
+ { 0x1d7b3, 1, 673 },
+ { 0x1d7b4, 1, 5654 },
+ { 0x1d7b5, 1, 10 },
+ { 0x1d7b6, 1, 5655 },
+ { 0x1d7b7, 1, 5656 },
+ { 0x1d7b8, 1, 5657 },
+ { 0x1d7b9, 1, 672 },
+ { 0x1d7ba, 1, 674 },
+ { 0x1d7bb, 1, 675 },
+ { 0x1d7bc, 1, 5658 },
+ { 0x1d7bd, 1, 5659 },
+ { 0x1d7be, 1, 5660 },
+ { 0x1d7bf, 1, 671 },
+ { 0x1d7c0, 1, 5661 },
+ { 0x1d7c1, 1, 5662 },
+ { 0x1d7c2, 1, 5663 },
+ { 0x1d7c3, 1, 5664 },
+ { 0x1d7c4, 1, 677 },
+ { 0x1d7c5, 1, 669 },
+ { 0x1d7c6, 1, 673 },
+ { 0x1d7c7, 1, 671 },
+ { 0x1d7c8, 1, 674 },
+ { 0x1d7c9, 1, 672 },
+ { 0x1d7ce, 1, 2168 },
+ { 0x1d7cf, 1, 13 },
+ { 0x1d7d0, 1, 6 },
+ { 0x1d7d1, 1, 7 },
+ { 0x1d7d2, 1, 2170 },
+ { 0x1d7d3, 1, 2171 },
+ { 0x1d7d4, 1, 2172 },
+ { 0x1d7d5, 1, 2173 },
+ { 0x1d7d6, 1, 2174 },
+ { 0x1d7d7, 1, 2175 },
+ { 0x1d7d8, 1, 2168 },
+ { 0x1d7d9, 1, 13 },
+ { 0x1d7da, 1, 6 },
+ { 0x1d7db, 1, 7 },
+ { 0x1d7dc, 1, 2170 },
+ { 0x1d7dd, 1, 2171 },
+ { 0x1d7de, 1, 2172 },
+ { 0x1d7df, 1, 2173 },
+ { 0x1d7e0, 1, 2174 },
+ { 0x1d7e1, 1, 2175 },
+ { 0x1d7e2, 1, 2168 },
+ { 0x1d7e3, 1, 13 },
+ { 0x1d7e4, 1, 6 },
+ { 0x1d7e5, 1, 7 },
+ { 0x1d7e6, 1, 2170 },
+ { 0x1d7e7, 1, 2171 },
+ { 0x1d7e8, 1, 2172 },
+ { 0x1d7e9, 1, 2173 },
+ { 0x1d7ea, 1, 2174 },
+ { 0x1d7eb, 1, 2175 },
+ { 0x1d7ec, 1, 2168 },
+ { 0x1d7ed, 1, 13 },
+ { 0x1d7ee, 1, 6 },
+ { 0x1d7ef, 1, 7 },
+ { 0x1d7f0, 1, 2170 },
+ { 0x1d7f1, 1, 2171 },
+ { 0x1d7f2, 1, 2172 },
+ { 0x1d7f3, 1, 2173 },
+ { 0x1d7f4, 1, 2174 },
+ { 0x1d7f5, 1, 2175 },
+ { 0x1d7f6, 1, 2168 },
+ { 0x1d7f7, 1, 13 },
+ { 0x1d7f8, 1, 6 },
+ { 0x1d7f9, 1, 7 },
+ { 0x1d7fa, 1, 2170 },
+ { 0x1d7fb, 1, 2171 },
+ { 0x1d7fc, 1, 2172 },
+ { 0x1d7fd, 1, 2173 },
+ { 0x1d7fe, 1, 2174 },
+ { 0x1d7ff, 1, 2175 },
+ { 0x2f800, 1, 5665 },
+ { 0x2f801, 1, 5666 },
+ { 0x2f802, 1, 5667 },
+ { 0x2f803, 1, 5668 },
+ { 0x2f804, 1, 5669 },
+ { 0x2f805, 1, 4549 },
+ { 0x2f806, 1, 5670 },
+ { 0x2f807, 1, 5671 },
+ { 0x2f808, 1, 5672 },
+ { 0x2f809, 1, 5673 },
+ { 0x2f80a, 1, 4550 },
+ { 0x2f80b, 1, 5674 },
+ { 0x2f80c, 1, 5675 },
+ { 0x2f80d, 1, 5676 },
+ { 0x2f80e, 1, 4551 },
+ { 0x2f80f, 1, 5677 },
+ { 0x2f810, 1, 5678 },
+ { 0x2f811, 1, 5679 },
+ { 0x2f812, 1, 5680 },
+ { 0x2f813, 1, 5681 },
+ { 0x2f814, 1, 5682 },
+ { 0x2f815, 1, 5683 },
+ { 0x2f816, 1, 5684 },
+ { 0x2f817, 1, 5685 },
+ { 0x2f818, 1, 5686 },
+ { 0x2f819, 1, 5687 },
+ { 0x2f81a, 1, 5688 },
+ { 0x2f81b, 1, 5689 },
+ { 0x2f81c, 1, 5690 },
+ { 0x2f81d, 1, 2698 },
+ { 0x2f81e, 1, 5691 },
+ { 0x2f81f, 1, 5692 },
+ { 0x2f820, 1, 5693 },
+ { 0x2f821, 1, 5694 },
+ { 0x2f822, 1, 5695 },
+ { 0x2f823, 1, 5696 },
+ { 0x2f824, 1, 5697 },
+ { 0x2f825, 1, 5698 },
+ { 0x2f826, 1, 4552 },
+ { 0x2f827, 1, 4553 },
+ { 0x2f828, 1, 5699 },
+ { 0x2f829, 1, 5700 },
+ { 0x2f82a, 1, 5701 },
+ { 0x2f82b, 1, 4372 },
+ { 0x2f82c, 1, 5702 },
+ { 0x2f82d, 1, 4554 },
+ { 0x2f82e, 1, 5703 },
+ { 0x2f82f, 1, 5704 },
+ { 0x2f830, 1, 5705 },
+ { 0x2f831, 1, 5706 },
+ { 0x2f832, 1, 5706 },
+ { 0x2f833, 1, 5706 },
+ { 0x2f834, 1, 5707 },
+ { 0x2f835, 1, 5708 },
+ { 0x2f836, 1, 5709 },
+ { 0x2f837, 1, 5710 },
+ { 0x2f838, 1, 5711 },
+ { 0x2f839, 1, 5712 },
+ { 0x2f83a, 1, 5713 },
+ { 0x2f83b, 1, 5714 },
+ { 0x2f83c, 1, 5715 },
+ { 0x2f83d, 1, 5716 },
+ { 0x2f83e, 1, 5717 },
+ { 0x2f83f, 1, 5718 },
+ { 0x2f840, 1, 5719 },
+ { 0x2f841, 1, 5720 },
+ { 0x2f842, 1, 5721 },
+ { 0x2f843, 1, 5722 },
+ { 0x2f844, 1, 5723 },
+ { 0x2f845, 1, 5724 },
+ { 0x2f846, 1, 5724 },
+ { 0x2f847, 1, 5725 },
+ { 0x2f848, 1, 5726 },
+ { 0x2f849, 1, 5727 },
+ { 0x2f84a, 1, 5728 },
+ { 0x2f84b, 1, 5729 },
+ { 0x2f84c, 1, 4556 },
+ { 0x2f84d, 1, 5730 },
+ { 0x2f84e, 1, 5731 },
+ { 0x2f84f, 1, 5732 },
+ { 0x2f850, 1, 4518 },
+ { 0x2f851, 1, 5733 },
+ { 0x2f852, 1, 5734 },
+ { 0x2f853, 1, 5735 },
+ { 0x2f854, 1, 5736 },
+ { 0x2f855, 1, 5737 },
+ { 0x2f856, 1, 5738 },
+ { 0x2f857, 1, 5739 },
+ { 0x2f858, 1, 5740 },
+ { 0x2f859, 1, 5741 },
+ { 0x2f85a, 1, 5742 },
+ { 0x2f85b, 1, 5743 },
+ { 0x2f85c, 1, 5744 },
+ { 0x2f85d, 1, 5745 },
+ { 0x2f85e, 1, 5746 },
+ { 0x2f85f, 1, 5747 },
+ { 0x2f860, 1, 5748 },
+ { 0x2f861, 1, 5749 },
+ { 0x2f862, 1, 5750 },
+ { 0x2f863, 1, 5751 },
+ { 0x2f864, 1, 5752 },
+ { 0x2f865, 1, 5753 },
+ { 0x2f866, 1, 5754 },
+ { 0x2f867, 1, 5755 },
+ { 0x2f868, 1, 5756 },
+ { 0x2f869, 1, 5757 },
+ { 0x2f86a, 1, 5758 },
+ { 0x2f86b, 1, 5758 },
+ { 0x2f86c, 1, 5759 },
+ { 0x2f86d, 1, 5760 },
+ { 0x2f86e, 1, 5761 },
+ { 0x2f86f, 1, 4368 },
+ { 0x2f870, 1, 5762 },
+ { 0x2f871, 1, 5763 },
+ { 0x2f872, 1, 5764 },
+ { 0x2f873, 1, 5765 },
+ { 0x2f874, 1, 5766 },
+ { 0x2f875, 1, 2724 },
+ { 0x2f876, 1, 5767 },
+ { 0x2f877, 1, 5768 },
+ { 0x2f878, 1, 2726 },
+ { 0x2f879, 1, 5769 },
+ { 0x2f87a, 1, 5770 },
+ { 0x2f87b, 1, 5771 },
+ { 0x2f87c, 1, 5772 },
+ { 0x2f87d, 1, 5773 },
+ { 0x2f87e, 1, 5774 },
+ { 0x2f87f, 1, 5775 },
+ { 0x2f880, 1, 5776 },
+ { 0x2f881, 1, 5777 },
+ { 0x2f882, 1, 5778 },
+ { 0x2f883, 1, 5779 },
+ { 0x2f884, 1, 5780 },
+ { 0x2f885, 1, 5781 },
+ { 0x2f886, 1, 5782 },
+ { 0x2f887, 1, 5783 },
+ { 0x2f888, 1, 5784 },
+ { 0x2f889, 1, 5785 },
+ { 0x2f88a, 1, 5786 },
+ { 0x2f88b, 1, 5787 },
+ { 0x2f88c, 1, 5788 },
+ { 0x2f88d, 1, 5789 },
+ { 0x2f88e, 1, 4316 },
+ { 0x2f88f, 1, 5790 },
+ { 0x2f890, 1, 2736 },
+ { 0x2f891, 1, 5791 },
+ { 0x2f892, 1, 5791 },
+ { 0x2f893, 1, 5792 },
+ { 0x2f894, 1, 5793 },
+ { 0x2f895, 1, 5793 },
+ { 0x2f896, 1, 5794 },
+ { 0x2f897, 1, 5795 },
+ { 0x2f898, 1, 5796 },
+ { 0x2f899, 1, 5797 },
+ { 0x2f89a, 1, 5798 },
+ { 0x2f89b, 1, 5799 },
+ { 0x2f89c, 1, 5800 },
+ { 0x2f89d, 1, 5801 },
+ { 0x2f89e, 1, 5802 },
+ { 0x2f89f, 1, 5803 },
+ { 0x2f8a0, 1, 5804 },
+ { 0x2f8a1, 1, 5805 },
+ { 0x2f8a2, 1, 5806 },
+ { 0x2f8a3, 1, 4561 },
+ { 0x2f8a4, 1, 5807 },
+ { 0x2f8a5, 1, 5808 },
+ { 0x2f8a6, 1, 5809 },
+ { 0x2f8a7, 1, 5810 },
+ { 0x2f8a8, 1, 5811 },
+ { 0x2f8a9, 1, 5810 },
+ { 0x2f8aa, 1, 5812 },
+ { 0x2f8ab, 1, 4563 },
+ { 0x2f8ac, 1, 5813 },
+ { 0x2f8ad, 1, 5814 },
+ { 0x2f8ae, 1, 5815 },
+ { 0x2f8af, 1, 5816 },
+ { 0x2f8b0, 1, 4564 },
+ { 0x2f8b1, 1, 4289 },
+ { 0x2f8b2, 1, 5817 },
+ { 0x2f8b3, 1, 5818 },
+ { 0x2f8b4, 1, 5819 },
+ { 0x2f8b5, 1, 5820 },
+ { 0x2f8b6, 1, 5821 },
+ { 0x2f8b7, 1, 5822 },
+ { 0x2f8b8, 1, 5823 },
+ { 0x2f8b9, 1, 5824 },
+ { 0x2f8ba, 1, 5825 },
+ { 0x2f8bb, 1, 5826 },
+ { 0x2f8bc, 1, 5827 },
+ { 0x2f8bd, 1, 5828 },
+ { 0x2f8be, 1, 5829 },
+ { 0x2f8bf, 1, 5830 },
+ { 0x2f8c0, 1, 5831 },
+ { 0x2f8c1, 1, 5832 },
+ { 0x2f8c2, 1, 5833 },
+ { 0x2f8c3, 1, 5834 },
+ { 0x2f8c4, 1, 5835 },
+ { 0x2f8c5, 1, 5836 },
+ { 0x2f8c6, 1, 5837 },
+ { 0x2f8c7, 1, 5838 },
+ { 0x2f8c8, 1, 4565 },
+ { 0x2f8c9, 1, 5839 },
+ { 0x2f8ca, 1, 5840 },
+ { 0x2f8cb, 1, 5841 },
+ { 0x2f8cc, 1, 5842 },
+ { 0x2f8cd, 1, 5843 },
+ { 0x2f8ce, 1, 5844 },
+ { 0x2f8cf, 1, 4567 },
+ { 0x2f8d0, 1, 5845 },
+ { 0x2f8d1, 1, 5846 },
+ { 0x2f8d2, 1, 5847 },
+ { 0x2f8d3, 1, 5848 },
+ { 0x2f8d4, 1, 5849 },
+ { 0x2f8d5, 1, 5850 },
+ { 0x2f8d6, 1, 5851 },
+ { 0x2f8d7, 1, 5852 },
+ { 0x2f8d8, 1, 4317 },
+ { 0x2f8d9, 1, 5853 },
+ { 0x2f8da, 1, 5854 },
+ { 0x2f8db, 1, 5855 },
+ { 0x2f8dc, 1, 5856 },
+ { 0x2f8dd, 1, 5857 },
+ { 0x2f8de, 1, 5858 },
+ { 0x2f8df, 1, 5859 },
+ { 0x2f8e0, 1, 5860 },
+ { 0x2f8e1, 1, 5861 },
+ { 0x2f8e2, 1, 4568 },
+ { 0x2f8e3, 1, 5862 },
+ { 0x2f8e4, 1, 5863 },
+ { 0x2f8e5, 1, 5864 },
+ { 0x2f8e6, 1, 5865 },
+ { 0x2f8e7, 1, 5866 },
+ { 0x2f8e8, 1, 5867 },
+ { 0x2f8e9, 1, 5868 },
+ { 0x2f8ea, 1, 5869 },
+ { 0x2f8eb, 1, 5870 },
+ { 0x2f8ec, 1, 5871 },
+ { 0x2f8ed, 1, 5872 },
+ { 0x2f8ee, 1, 5873 },
+ { 0x2f8ef, 1, 5874 },
+ { 0x2f8f0, 1, 5875 },
+ { 0x2f8f1, 1, 5876 },
+ { 0x2f8f2, 1, 5877 },
+ { 0x2f8f3, 1, 5878 },
+ { 0x2f8f4, 1, 5879 },
+ { 0x2f8f5, 1, 4385 },
+ { 0x2f8f6, 1, 5880 },
+ { 0x2f8f7, 1, 5881 },
+ { 0x2f8f8, 1, 5882 },
+ { 0x2f8f9, 1, 5883 },
+ { 0x2f8fa, 1, 5884 },
+ { 0x2f8fb, 1, 5885 },
+ { 0x2f8fc, 1, 5886 },
+ { 0x2f8fd, 1, 5887 },
+ { 0x2f8fe, 1, 5888 },
+ { 0x2f8ff, 1, 5889 },
+ { 0x2f900, 1, 5890 },
+ { 0x2f901, 1, 4569 },
+ { 0x2f902, 1, 4468 },
+ { 0x2f903, 1, 5891 },
+ { 0x2f904, 1, 5892 },
+ { 0x2f905, 1, 5893 },
+ { 0x2f906, 1, 5894 },
+ { 0x2f907, 1, 5895 },
+ { 0x2f908, 1, 5896 },
+ { 0x2f909, 1, 5897 },
+ { 0x2f90a, 1, 5898 },
+ { 0x2f90b, 1, 5899 },
+ { 0x2f90c, 1, 5900 },
+ { 0x2f90d, 1, 5901 },
+ { 0x2f90e, 1, 5902 },
+ { 0x2f90f, 1, 5903 },
+ { 0x2f910, 1, 5904 },
+ { 0x2f911, 1, 5905 },
+ { 0x2f912, 1, 5906 },
+ { 0x2f913, 1, 5907 },
+ { 0x2f914, 1, 5908 },
+ { 0x2f915, 1, 5909 },
+ { 0x2f916, 1, 5910 },
+ { 0x2f917, 1, 5911 },
+ { 0x2f918, 1, 5912 },
+ { 0x2f919, 1, 5913 },
+ { 0x2f91a, 1, 5914 },
+ { 0x2f91b, 1, 5915 },
+ { 0x2f91c, 1, 5916 },
+ { 0x2f91d, 1, 5917 },
+ { 0x2f91e, 1, 5918 },
+ { 0x2f91f, 1, 5919 },
+ { 0x2f920, 1, 5920 },
+ { 0x2f921, 1, 5921 },
+ { 0x2f922, 1, 5922 },
+ { 0x2f923, 1, 5923 },
+ { 0x2f924, 1, 5924 },
+ { 0x2f925, 1, 5925 },
+ { 0x2f926, 1, 5926 },
+ { 0x2f927, 1, 5927 },
+ { 0x2f928, 1, 5928 },
+ { 0x2f929, 1, 5929 },
+ { 0x2f92a, 1, 5930 },
+ { 0x2f92b, 1, 5931 },
+ { 0x2f92c, 1, 5932 },
+ { 0x2f92d, 1, 5932 },
+ { 0x2f92e, 1, 5933 },
+ { 0x2f92f, 1, 5934 },
+ { 0x2f930, 1, 5935 },
+ { 0x2f931, 1, 5936 },
+ { 0x2f932, 1, 5937 },
+ { 0x2f933, 1, 5938 },
+ { 0x2f934, 1, 5939 },
+ { 0x2f935, 1, 5940 },
+ { 0x2f936, 1, 5941 },
+ { 0x2f937, 1, 5942 },
+ { 0x2f938, 1, 4371 },
+ { 0x2f939, 1, 5943 },
+ { 0x2f93a, 1, 5944 },
+ { 0x2f93b, 1, 5945 },
+ { 0x2f93c, 1, 5946 },
+ { 0x2f93d, 1, 5947 },
+ { 0x2f93e, 1, 5948 },
+ { 0x2f93f, 1, 5949 },
+ { 0x2f940, 1, 5950 },
+ { 0x2f941, 1, 5951 },
+ { 0x2f942, 1, 5952 },
+ { 0x2f943, 1, 5953 },
+ { 0x2f944, 1, 5954 },
+ { 0x2f945, 1, 5955 },
+ { 0x2f946, 1, 5956 },
+ { 0x2f947, 1, 5956 },
+ { 0x2f948, 1, 5957 },
+ { 0x2f949, 1, 5958 },
+ { 0x2f94a, 1, 5959 },
+ { 0x2f94b, 1, 5960 },
+ { 0x2f94c, 1, 5961 },
+ { 0x2f94d, 1, 5962 },
+ { 0x2f94e, 1, 5963 },
+ { 0x2f94f, 1, 4334 },
+ { 0x2f950, 1, 5964 },
+ { 0x2f951, 1, 5965 },
+ { 0x2f952, 1, 5966 },
+ { 0x2f953, 1, 4579 },
+ { 0x2f954, 1, 5967 },
+ { 0x2f955, 1, 5968 },
+ { 0x2f956, 1, 4538 },
+ { 0x2f957, 1, 5969 },
+ { 0x2f958, 1, 5970 },
+ { 0x2f959, 1, 4582 },
+ { 0x2f95a, 1, 5971 },
+ { 0x2f95b, 1, 5972 },
+ { 0x2f95c, 1, 5973 },
+ { 0x2f95d, 1, 5974 },
+ { 0x2f95e, 1, 5974 },
+ { 0x2f95f, 1, 5975 },
+ { 0x2f960, 1, 5976 },
+ { 0x2f961, 1, 5977 },
+ { 0x2f962, 1, 5978 },
+ { 0x2f963, 1, 5979 },
+ { 0x2f964, 1, 5980 },
+ { 0x2f965, 1, 5981 },
+ { 0x2f966, 1, 5982 },
+ { 0x2f967, 1, 5983 },
+ { 0x2f968, 1, 5984 },
+ { 0x2f969, 1, 5985 },
+ { 0x2f96a, 1, 5986 },
+ { 0x2f96b, 1, 5987 },
+ { 0x2f96c, 1, 5988 },
+ { 0x2f96d, 1, 5989 },
+ { 0x2f96e, 1, 5990 },
+ { 0x2f96f, 1, 5991 },
+ { 0x2f970, 1, 5992 },
+ { 0x2f971, 1, 5993 },
+ { 0x2f972, 1, 5994 },
+ { 0x2f973, 1, 5995 },
+ { 0x2f974, 1, 5996 },
+ { 0x2f975, 1, 5997 },
+ { 0x2f976, 1, 5998 },
+ { 0x2f977, 1, 5999 },
+ { 0x2f978, 1, 6000 },
+ { 0x2f979, 1, 6001 },
+ { 0x2f97a, 1, 4588 },
+ { 0x2f97b, 1, 6002 },
+ { 0x2f97c, 1, 6003 },
+ { 0x2f97d, 1, 6004 },
+ { 0x2f97e, 1, 6005 },
+ { 0x2f97f, 1, 6006 },
+ { 0x2f980, 1, 6007 },
+ { 0x2f981, 1, 6008 },
+ { 0x2f982, 1, 6009 },
+ { 0x2f983, 1, 6010 },
+ { 0x2f984, 1, 6011 },
+ { 0x2f985, 1, 6012 },
+ { 0x2f986, 1, 6013 },
+ { 0x2f987, 1, 6014 },
+ { 0x2f988, 1, 6015 },
+ { 0x2f989, 1, 6016 },
+ { 0x2f98a, 1, 6017 },
+ { 0x2f98b, 1, 5792 },
+ { 0x2f98c, 1, 6018 },
+ { 0x2f98d, 1, 6019 },
+ { 0x2f98e, 1, 6020 },
+ { 0x2f98f, 1, 6021 },
+ { 0x2f990, 1, 6022 },
+ { 0x2f991, 1, 6023 },
+ { 0x2f992, 1, 6024 },
+ { 0x2f993, 1, 6025 },
+ { 0x2f994, 1, 6026 },
+ { 0x2f995, 1, 6027 },
+ { 0x2f996, 1, 6028 },
+ { 0x2f997, 1, 6029 },
+ { 0x2f998, 1, 4388 },
+ { 0x2f999, 1, 6030 },
+ { 0x2f99a, 1, 6031 },
+ { 0x2f99b, 1, 6032 },
+ { 0x2f99c, 1, 6033 },
+ { 0x2f99d, 1, 6034 },
+ { 0x2f99e, 1, 6035 },
+ { 0x2f99f, 1, 4591 },
+ { 0x2f9a0, 1, 6036 },
+ { 0x2f9a1, 1, 6037 },
+ { 0x2f9a2, 1, 6038 },
+ { 0x2f9a3, 1, 6039 },
+ { 0x2f9a4, 1, 6040 },
+ { 0x2f9a5, 1, 6041 },
+ { 0x2f9a6, 1, 6042 },
+ { 0x2f9a7, 1, 6043 },
+ { 0x2f9a8, 1, 6044 },
+ { 0x2f9a9, 1, 6045 },
+ { 0x2f9aa, 1, 6046 },
+ { 0x2f9ab, 1, 6047 },
+ { 0x2f9ac, 1, 6048 },
+ { 0x2f9ad, 1, 6049 },
+ { 0x2f9ae, 1, 6050 },
+ { 0x2f9af, 1, 6051 },
+ { 0x2f9b0, 1, 6052 },
+ { 0x2f9b1, 1, 6053 },
+ { 0x2f9b2, 1, 6054 },
+ { 0x2f9b3, 1, 6055 },
+ { 0x2f9b4, 1, 4329 },
+ { 0x2f9b5, 1, 6056 },
+ { 0x2f9b6, 1, 6057 },
+ { 0x2f9b7, 1, 6058 },
+ { 0x2f9b8, 1, 6059 },
+ { 0x2f9b9, 1, 6060 },
+ { 0x2f9ba, 1, 6061 },
+ { 0x2f9bb, 1, 6062 },
+ { 0x2f9bc, 1, 6063 },
+ { 0x2f9bd, 1, 6064 },
+ { 0x2f9be, 1, 6065 },
+ { 0x2f9bf, 1, 6066 },
+ { 0x2f9c0, 1, 6067 },
+ { 0x2f9c1, 1, 6068 },
+ { 0x2f9c2, 1, 6069 },
+ { 0x2f9c3, 1, 6070 },
+ { 0x2f9c4, 1, 2826 },
+ { 0x2f9c5, 1, 6071 },
+ { 0x2f9c6, 1, 6072 },
+ { 0x2f9c7, 1, 6073 },
+ { 0x2f9c8, 1, 6074 },
+ { 0x2f9c9, 1, 6075 },
+ { 0x2f9ca, 1, 6076 },
+ { 0x2f9cb, 1, 6077 },
+ { 0x2f9cc, 1, 6078 },
+ { 0x2f9cd, 1, 6079 },
+ { 0x2f9ce, 1, 6080 },
+ { 0x2f9cf, 1, 6081 },
+ { 0x2f9d0, 1, 6082 },
+ { 0x2f9d1, 1, 6083 },
+ { 0x2f9d2, 1, 2833 },
+ { 0x2f9d3, 1, 6084 },
+ { 0x2f9d4, 1, 6085 },
+ { 0x2f9d5, 1, 6086 },
+ { 0x2f9d6, 1, 6087 },
+ { 0x2f9d7, 1, 6088 },
+ { 0x2f9d8, 1, 6089 },
+ { 0x2f9d9, 1, 6090 },
+ { 0x2f9da, 1, 6091 },
+ { 0x2f9db, 1, 6092 },
+ { 0x2f9dc, 1, 6093 },
+ { 0x2f9dd, 1, 6094 },
+ { 0x2f9de, 1, 6095 },
+ { 0x2f9df, 1, 6096 },
+ { 0x2f9e0, 1, 6097 },
+ { 0x2f9e1, 1, 6098 },
+ { 0x2f9e2, 1, 6099 },
+ { 0x2f9e3, 1, 6100 },
+ { 0x2f9e4, 1, 6101 },
+ { 0x2f9e5, 1, 6102 },
+ { 0x2f9e6, 1, 6103 },
+ { 0x2f9e7, 1, 6104 },
+ { 0x2f9e8, 1, 6105 },
+ { 0x2f9e9, 1, 6106 },
+ { 0x2f9ea, 1, 6107 },
+ { 0x2f9eb, 1, 6108 },
+ { 0x2f9ec, 1, 6109 },
+ { 0x2f9ed, 1, 6110 },
+ { 0x2f9ee, 1, 6111 },
+ { 0x2f9ef, 1, 6112 },
+ { 0x2f9f0, 1, 6113 },
+ { 0x2f9f1, 1, 6114 },
+ { 0x2f9f2, 1, 6115 },
+ { 0x2f9f3, 1, 6116 },
+ { 0x2f9f4, 1, 6117 },
+ { 0x2f9f5, 1, 6118 },
+ { 0x2f9f6, 1, 6119 },
+ { 0x2f9f7, 1, 6120 },
+ { 0x2f9f8, 1, 6121 },
+ { 0x2f9f9, 1, 6122 },
+ { 0x2f9fa, 1, 6123 },
+ { 0x2f9fb, 1, 6124 },
+ { 0x2f9fc, 1, 6125 },
+ { 0x2f9fd, 1, 6126 },
+ { 0x2f9fe, 1, 6127 },
+ { 0x2f9ff, 1, 6127 },
+ { 0x2fa00, 1, 6128 },
+ { 0x2fa01, 1, 6129 },
+ { 0x2fa02, 1, 6130 },
+ { 0x2fa03, 1, 6131 },
+ { 0x2fa04, 1, 6132 },
+ { 0x2fa05, 1, 6133 },
+ { 0x2fa06, 1, 6134 },
+ { 0x2fa07, 1, 6135 },
+ { 0x2fa08, 1, 6136 },
+ { 0x2fa09, 1, 6137 },
+ { 0x2fa0a, 1, 6138 },
+ { 0x2fa0b, 1, 6139 },
+ { 0x2fa0c, 1, 6140 },
+ { 0x2fa0d, 1, 6141 },
+ { 0x2fa0e, 1, 6142 },
+ { 0x2fa0f, 1, 6143 },
+ { 0x2fa10, 1, 6144 },
+ { 0x2fa11, 1, 6145 },
+ { 0x2fa12, 1, 6146 },
+ { 0x2fa13, 1, 6147 },
+ { 0x2fa14, 1, 6148 },
+ { 0x2fa15, 1, 2881 },
+ { 0x2fa16, 1, 6149 },
+ { 0x2fa17, 1, 2885 },
+ { 0x2fa18, 1, 6150 },
+ { 0x2fa19, 1, 6151 },
+ { 0x2fa1a, 1, 6152 },
+ { 0x2fa1b, 1, 6153 },
+ { 0x2fa1c, 1, 2890 },
+ { 0x2fa1d, 1, 6154 }
+};
+
+static const Unicode decomp_expansion[] = {
+ 0x20 /* offset 0 */ ,
+ 0x20, 0x308 /* offset 1 */ ,
+ 0x61 /* offset 3 */ ,
+ 0x20, 0x304 /* offset 4 */ ,
+ 0x32 /* offset 6 */ ,
+ 0x33 /* offset 7 */ ,
+ 0x20, 0x301 /* offset 8 */ ,
+ 0x3bc /* offset 10 */ ,
+ 0x20, 0x327 /* offset 11 */ ,
+ 0x31 /* offset 13 */ ,
+ 0x6f /* offset 14 */ ,
+ 0x31, 0x2044, 0x34 /* offset 15 */ ,
+ 0x31, 0x2044, 0x32 /* offset 18 */ ,
+ 0x33, 0x2044, 0x34 /* offset 21 */ ,
+ 0x41, 0x300 /* offset 24 */ ,
+ 0x41, 0x301 /* offset 26 */ ,
+ 0x41, 0x302 /* offset 28 */ ,
+ 0x41, 0x303 /* offset 30 */ ,
+ 0x41, 0x308 /* offset 32 */ ,
+ 0x41, 0x30a /* offset 34 */ ,
+ 0x43, 0x327 /* offset 36 */ ,
+ 0x45, 0x300 /* offset 38 */ ,
+ 0x45, 0x301 /* offset 40 */ ,
+ 0x45, 0x302 /* offset 42 */ ,
+ 0x45, 0x308 /* offset 44 */ ,
+ 0x49, 0x300 /* offset 46 */ ,
+ 0x49, 0x301 /* offset 48 */ ,
+ 0x49, 0x302 /* offset 50 */ ,
+ 0x49, 0x308 /* offset 52 */ ,
+ 0x4e, 0x303 /* offset 54 */ ,
+ 0x4f, 0x300 /* offset 56 */ ,
+ 0x4f, 0x301 /* offset 58 */ ,
+ 0x4f, 0x302 /* offset 60 */ ,
+ 0x4f, 0x303 /* offset 62 */ ,
+ 0x4f, 0x308 /* offset 64 */ ,
+ 0x55, 0x300 /* offset 66 */ ,
+ 0x55, 0x301 /* offset 68 */ ,
+ 0x55, 0x302 /* offset 70 */ ,
+ 0x55, 0x308 /* offset 72 */ ,
+ 0x59, 0x301 /* offset 74 */ ,
+ 0x61, 0x300 /* offset 76 */ ,
+ 0x61, 0x301 /* offset 78 */ ,
+ 0x61, 0x302 /* offset 80 */ ,
+ 0x61, 0x303 /* offset 82 */ ,
+ 0x61, 0x308 /* offset 84 */ ,
+ 0x61, 0x30a /* offset 86 */ ,
+ 0x63, 0x327 /* offset 88 */ ,
+ 0x65, 0x300 /* offset 90 */ ,
+ 0x65, 0x301 /* offset 92 */ ,
+ 0x65, 0x302 /* offset 94 */ ,
+ 0x65, 0x308 /* offset 96 */ ,
+ 0x69, 0x300 /* offset 98 */ ,
+ 0x69, 0x301 /* offset 100 */ ,
+ 0x69, 0x302 /* offset 102 */ ,
+ 0x69, 0x308 /* offset 104 */ ,
+ 0x6e, 0x303 /* offset 106 */ ,
+ 0x6f, 0x300 /* offset 108 */ ,
+ 0x6f, 0x301 /* offset 110 */ ,
+ 0x6f, 0x302 /* offset 112 */ ,
+ 0x6f, 0x303 /* offset 114 */ ,
+ 0x6f, 0x308 /* offset 116 */ ,
+ 0x75, 0x300 /* offset 118 */ ,
+ 0x75, 0x301 /* offset 120 */ ,
+ 0x75, 0x302 /* offset 122 */ ,
+ 0x75, 0x308 /* offset 124 */ ,
+ 0x79, 0x301 /* offset 126 */ ,
+ 0x79, 0x308 /* offset 128 */ ,
+ 0x41, 0x304 /* offset 130 */ ,
+ 0x61, 0x304 /* offset 132 */ ,
+ 0x41, 0x306 /* offset 134 */ ,
+ 0x61, 0x306 /* offset 136 */ ,
+ 0x41, 0x328 /* offset 138 */ ,
+ 0x61, 0x328 /* offset 140 */ ,
+ 0x43, 0x301 /* offset 142 */ ,
+ 0x63, 0x301 /* offset 144 */ ,
+ 0x43, 0x302 /* offset 146 */ ,
+ 0x63, 0x302 /* offset 148 */ ,
+ 0x43, 0x307 /* offset 150 */ ,
+ 0x63, 0x307 /* offset 152 */ ,
+ 0x43, 0x30c /* offset 154 */ ,
+ 0x63, 0x30c /* offset 156 */ ,
+ 0x44, 0x30c /* offset 158 */ ,
+ 0x64, 0x30c /* offset 160 */ ,
+ 0x45, 0x304 /* offset 162 */ ,
+ 0x65, 0x304 /* offset 164 */ ,
+ 0x45, 0x306 /* offset 166 */ ,
+ 0x65, 0x306 /* offset 168 */ ,
+ 0x45, 0x307 /* offset 170 */ ,
+ 0x65, 0x307 /* offset 172 */ ,
+ 0x45, 0x328 /* offset 174 */ ,
+ 0x65, 0x328 /* offset 176 */ ,
+ 0x45, 0x30c /* offset 178 */ ,
+ 0x65, 0x30c /* offset 180 */ ,
+ 0x47, 0x302 /* offset 182 */ ,
+ 0x67, 0x302 /* offset 184 */ ,
+ 0x47, 0x306 /* offset 186 */ ,
+ 0x67, 0x306 /* offset 188 */ ,
+ 0x47, 0x307 /* offset 190 */ ,
+ 0x67, 0x307 /* offset 192 */ ,
+ 0x47, 0x327 /* offset 194 */ ,
+ 0x67, 0x327 /* offset 196 */ ,
+ 0x48, 0x302 /* offset 198 */ ,
+ 0x68, 0x302 /* offset 200 */ ,
+ 0x49, 0x303 /* offset 202 */ ,
+ 0x69, 0x303 /* offset 204 */ ,
+ 0x49, 0x304 /* offset 206 */ ,
+ 0x69, 0x304 /* offset 208 */ ,
+ 0x49, 0x306 /* offset 210 */ ,
+ 0x69, 0x306 /* offset 212 */ ,
+ 0x49, 0x328 /* offset 214 */ ,
+ 0x69, 0x328 /* offset 216 */ ,
+ 0x49, 0x307 /* offset 218 */ ,
+ 0x49, 0x4a /* offset 220 */ ,
+ 0x69, 0x6a /* offset 222 */ ,
+ 0x4a, 0x302 /* offset 224 */ ,
+ 0x6a, 0x302 /* offset 226 */ ,
+ 0x4b, 0x327 /* offset 228 */ ,
+ 0x6b, 0x327 /* offset 230 */ ,
+ 0x4c, 0x301 /* offset 232 */ ,
+ 0x6c, 0x301 /* offset 234 */ ,
+ 0x4c, 0x327 /* offset 236 */ ,
+ 0x6c, 0x327 /* offset 238 */ ,
+ 0x4c, 0x30c /* offset 240 */ ,
+ 0x6c, 0x30c /* offset 242 */ ,
+ 0x4c, 0xb7 /* offset 244 */ ,
+ 0x6c, 0xb7 /* offset 246 */ ,
+ 0x4e, 0x301 /* offset 248 */ ,
+ 0x6e, 0x301 /* offset 250 */ ,
+ 0x4e, 0x327 /* offset 252 */ ,
+ 0x6e, 0x327 /* offset 254 */ ,
+ 0x4e, 0x30c /* offset 256 */ ,
+ 0x6e, 0x30c /* offset 258 */ ,
+ 0x2bc, 0x6e /* offset 260 */ ,
+ 0x4f, 0x304 /* offset 262 */ ,
+ 0x6f, 0x304 /* offset 264 */ ,
+ 0x4f, 0x306 /* offset 266 */ ,
+ 0x6f, 0x306 /* offset 268 */ ,
+ 0x4f, 0x30b /* offset 270 */ ,
+ 0x6f, 0x30b /* offset 272 */ ,
+ 0x52, 0x301 /* offset 274 */ ,
+ 0x72, 0x301 /* offset 276 */ ,
+ 0x52, 0x327 /* offset 278 */ ,
+ 0x72, 0x327 /* offset 280 */ ,
+ 0x52, 0x30c /* offset 282 */ ,
+ 0x72, 0x30c /* offset 284 */ ,
+ 0x53, 0x301 /* offset 286 */ ,
+ 0x73, 0x301 /* offset 288 */ ,
+ 0x53, 0x302 /* offset 290 */ ,
+ 0x73, 0x302 /* offset 292 */ ,
+ 0x53, 0x327 /* offset 294 */ ,
+ 0x73, 0x327 /* offset 296 */ ,
+ 0x53, 0x30c /* offset 298 */ ,
+ 0x73, 0x30c /* offset 300 */ ,
+ 0x54, 0x327 /* offset 302 */ ,
+ 0x74, 0x327 /* offset 304 */ ,
+ 0x54, 0x30c /* offset 306 */ ,
+ 0x74, 0x30c /* offset 308 */ ,
+ 0x55, 0x303 /* offset 310 */ ,
+ 0x75, 0x303 /* offset 312 */ ,
+ 0x55, 0x304 /* offset 314 */ ,
+ 0x75, 0x304 /* offset 316 */ ,
+ 0x55, 0x306 /* offset 318 */ ,
+ 0x75, 0x306 /* offset 320 */ ,
+ 0x55, 0x30a /* offset 322 */ ,
+ 0x75, 0x30a /* offset 324 */ ,
+ 0x55, 0x30b /* offset 326 */ ,
+ 0x75, 0x30b /* offset 328 */ ,
+ 0x55, 0x328 /* offset 330 */ ,
+ 0x75, 0x328 /* offset 332 */ ,
+ 0x57, 0x302 /* offset 334 */ ,
+ 0x77, 0x302 /* offset 336 */ ,
+ 0x59, 0x302 /* offset 338 */ ,
+ 0x79, 0x302 /* offset 340 */ ,
+ 0x59, 0x308 /* offset 342 */ ,
+ 0x5a, 0x301 /* offset 344 */ ,
+ 0x7a, 0x301 /* offset 346 */ ,
+ 0x5a, 0x307 /* offset 348 */ ,
+ 0x7a, 0x307 /* offset 350 */ ,
+ 0x5a, 0x30c /* offset 352 */ ,
+ 0x7a, 0x30c /* offset 354 */ ,
+ 0x73 /* offset 356 */ ,
+ 0x4f, 0x31b /* offset 357 */ ,
+ 0x6f, 0x31b /* offset 359 */ ,
+ 0x55, 0x31b /* offset 361 */ ,
+ 0x75, 0x31b /* offset 363 */ ,
+ 0x44, 0x5a, 0x30c /* offset 365 */ ,
+ 0x44, 0x7a, 0x30c /* offset 368 */ ,
+ 0x64, 0x7a, 0x30c /* offset 371 */ ,
+ 0x4c, 0x4a /* offset 374 */ ,
+ 0x4c, 0x6a /* offset 376 */ ,
+ 0x6c, 0x6a /* offset 378 */ ,
+ 0x4e, 0x4a /* offset 380 */ ,
+ 0x4e, 0x6a /* offset 382 */ ,
+ 0x6e, 0x6a /* offset 384 */ ,
+ 0x41, 0x30c /* offset 386 */ ,
+ 0x61, 0x30c /* offset 388 */ ,
+ 0x49, 0x30c /* offset 390 */ ,
+ 0x69, 0x30c /* offset 392 */ ,
+ 0x4f, 0x30c /* offset 394 */ ,
+ 0x6f, 0x30c /* offset 396 */ ,
+ 0x55, 0x30c /* offset 398 */ ,
+ 0x75, 0x30c /* offset 400 */ ,
+ 0x55, 0x308, 0x304 /* offset 402 */ ,
+ 0x75, 0x308, 0x304 /* offset 405 */ ,
+ 0x55, 0x308, 0x301 /* offset 408 */ ,
+ 0x75, 0x308, 0x301 /* offset 411 */ ,
+ 0x55, 0x308, 0x30c /* offset 414 */ ,
+ 0x75, 0x308, 0x30c /* offset 417 */ ,
+ 0x55, 0x308, 0x300 /* offset 420 */ ,
+ 0x75, 0x308, 0x300 /* offset 423 */ ,
+ 0x41, 0x308, 0x304 /* offset 426 */ ,
+ 0x61, 0x308, 0x304 /* offset 429 */ ,
+ 0x41, 0x307, 0x304 /* offset 432 */ ,
+ 0x61, 0x307, 0x304 /* offset 435 */ ,
+ 0xc6, 0x304 /* offset 438 */ ,
+ 0xe6, 0x304 /* offset 440 */ ,
+ 0x47, 0x30c /* offset 442 */ ,
+ 0x67, 0x30c /* offset 444 */ ,
+ 0x4b, 0x30c /* offset 446 */ ,
+ 0x6b, 0x30c /* offset 448 */ ,
+ 0x4f, 0x328 /* offset 450 */ ,
+ 0x6f, 0x328 /* offset 452 */ ,
+ 0x4f, 0x328, 0x304 /* offset 454 */ ,
+ 0x6f, 0x328, 0x304 /* offset 457 */ ,
+ 0x1b7, 0x30c /* offset 460 */ ,
+ 0x292, 0x30c /* offset 462 */ ,
+ 0x6a, 0x30c /* offset 464 */ ,
+ 0x44, 0x5a /* offset 466 */ ,
+ 0x44, 0x7a /* offset 468 */ ,
+ 0x64, 0x7a /* offset 470 */ ,
+ 0x47, 0x301 /* offset 472 */ ,
+ 0x67, 0x301 /* offset 474 */ ,
+ 0x4e, 0x300 /* offset 476 */ ,
+ 0x6e, 0x300 /* offset 478 */ ,
+ 0x41, 0x30a, 0x301 /* offset 480 */ ,
+ 0x61, 0x30a, 0x301 /* offset 483 */ ,
+ 0xc6, 0x301 /* offset 486 */ ,
+ 0xe6, 0x301 /* offset 488 */ ,
+ 0xd8, 0x301 /* offset 490 */ ,
+ 0xf8, 0x301 /* offset 492 */ ,
+ 0x41, 0x30f /* offset 494 */ ,
+ 0x61, 0x30f /* offset 496 */ ,
+ 0x41, 0x311 /* offset 498 */ ,
+ 0x61, 0x311 /* offset 500 */ ,
+ 0x45, 0x30f /* offset 502 */ ,
+ 0x65, 0x30f /* offset 504 */ ,
+ 0x45, 0x311 /* offset 506 */ ,
+ 0x65, 0x311 /* offset 508 */ ,
+ 0x49, 0x30f /* offset 510 */ ,
+ 0x69, 0x30f /* offset 512 */ ,
+ 0x49, 0x311 /* offset 514 */ ,
+ 0x69, 0x311 /* offset 516 */ ,
+ 0x4f, 0x30f /* offset 518 */ ,
+ 0x6f, 0x30f /* offset 520 */ ,
+ 0x4f, 0x311 /* offset 522 */ ,
+ 0x6f, 0x311 /* offset 524 */ ,
+ 0x52, 0x30f /* offset 526 */ ,
+ 0x72, 0x30f /* offset 528 */ ,
+ 0x52, 0x311 /* offset 530 */ ,
+ 0x72, 0x311 /* offset 532 */ ,
+ 0x55, 0x30f /* offset 534 */ ,
+ 0x75, 0x30f /* offset 536 */ ,
+ 0x55, 0x311 /* offset 538 */ ,
+ 0x75, 0x311 /* offset 540 */ ,
+ 0x53, 0x326 /* offset 542 */ ,
+ 0x73, 0x326 /* offset 544 */ ,
+ 0x54, 0x326 /* offset 546 */ ,
+ 0x74, 0x326 /* offset 548 */ ,
+ 0x48, 0x30c /* offset 550 */ ,
+ 0x68, 0x30c /* offset 552 */ ,
+ 0x41, 0x307 /* offset 554 */ ,
+ 0x61, 0x307 /* offset 556 */ ,
+ 0x45, 0x327 /* offset 558 */ ,
+ 0x65, 0x327 /* offset 560 */ ,
+ 0x4f, 0x308, 0x304 /* offset 562 */ ,
+ 0x6f, 0x308, 0x304 /* offset 565 */ ,
+ 0x4f, 0x303, 0x304 /* offset 568 */ ,
+ 0x6f, 0x303, 0x304 /* offset 571 */ ,
+ 0x4f, 0x307 /* offset 574 */ ,
+ 0x6f, 0x307 /* offset 576 */ ,
+ 0x4f, 0x307, 0x304 /* offset 578 */ ,
+ 0x6f, 0x307, 0x304 /* offset 581 */ ,
+ 0x59, 0x304 /* offset 584 */ ,
+ 0x79, 0x304 /* offset 586 */ ,
+ 0x68 /* offset 588 */ ,
+ 0x266 /* offset 589 */ ,
+ 0x6a /* offset 590 */ ,
+ 0x72 /* offset 591 */ ,
+ 0x279 /* offset 592 */ ,
+ 0x27b /* offset 593 */ ,
+ 0x281 /* offset 594 */ ,
+ 0x77 /* offset 595 */ ,
+ 0x79 /* offset 596 */ ,
+ 0x20, 0x306 /* offset 597 */ ,
+ 0x20, 0x307 /* offset 599 */ ,
+ 0x20, 0x30a /* offset 601 */ ,
+ 0x20, 0x328 /* offset 603 */ ,
+ 0x20, 0x303 /* offset 605 */ ,
+ 0x20, 0x30b /* offset 607 */ ,
+ 0x263 /* offset 609 */ ,
+ 0x6c /* offset 610 */ ,
+ 0x78 /* offset 611 */ ,
+ 0x295 /* offset 612 */ ,
+ 0x300 /* offset 613 */ ,
+ 0x301 /* offset 614 */ ,
+ 0x313 /* offset 615 */ ,
+ 0x308, 0x301 /* offset 616 */ ,
+ 0x2b9 /* offset 618 */ ,
+ 0x20, 0x345 /* offset 619 */ ,
+ 0x3b /* offset 621 */ ,
+ 0x20, 0x308, 0x301 /* offset 622 */ ,
+ 0x391, 0x301 /* offset 625 */ ,
+ 0xb7 /* offset 627 */ ,
+ 0x395, 0x301 /* offset 628 */ ,
+ 0x397, 0x301 /* offset 630 */ ,
+ 0x399, 0x301 /* offset 632 */ ,
+ 0x39f, 0x301 /* offset 634 */ ,
+ 0x3a5, 0x301 /* offset 636 */ ,
+ 0x3a9, 0x301 /* offset 638 */ ,
+ 0x3b9, 0x308, 0x301 /* offset 640 */ ,
+ 0x399, 0x308 /* offset 643 */ ,
+ 0x3a5, 0x308 /* offset 645 */ ,
+ 0x3b1, 0x301 /* offset 647 */ ,
+ 0x3b5, 0x301 /* offset 649 */ ,
+ 0x3b7, 0x301 /* offset 651 */ ,
+ 0x3b9, 0x301 /* offset 653 */ ,
+ 0x3c5, 0x308, 0x301 /* offset 655 */ ,
+ 0x3b9, 0x308 /* offset 658 */ ,
+ 0x3c5, 0x308 /* offset 660 */ ,
+ 0x3bf, 0x301 /* offset 662 */ ,
+ 0x3c5, 0x301 /* offset 664 */ ,
+ 0x3c9, 0x301 /* offset 666 */ ,
+ 0x3b2 /* offset 668 */ ,
+ 0x3b8 /* offset 669 */ ,
+ 0x3a5 /* offset 670 */ ,
+ 0x3c6 /* offset 671 */ ,
+ 0x3c0 /* offset 672 */ ,
+ 0x3ba /* offset 673 */ ,
+ 0x3c1 /* offset 674 */ ,
+ 0x3c2 /* offset 675 */ ,
+ 0x398 /* offset 676 */ ,
+ 0x3b5 /* offset 677 */ ,
+ 0x415, 0x300 /* offset 678 */ ,
+ 0x415, 0x308 /* offset 680 */ ,
+ 0x413, 0x301 /* offset 682 */ ,
+ 0x406, 0x308 /* offset 684 */ ,
+ 0x41a, 0x301 /* offset 686 */ ,
+ 0x418, 0x300 /* offset 688 */ ,
+ 0x423, 0x306 /* offset 690 */ ,
+ 0x418, 0x306 /* offset 692 */ ,
+ 0x438, 0x306 /* offset 694 */ ,
+ 0x435, 0x300 /* offset 696 */ ,
+ 0x435, 0x308 /* offset 698 */ ,
+ 0x433, 0x301 /* offset 700 */ ,
+ 0x456, 0x308 /* offset 702 */ ,
+ 0x43a, 0x301 /* offset 704 */ ,
+ 0x438, 0x300 /* offset 706 */ ,
+ 0x443, 0x306 /* offset 708 */ ,
+ 0x474, 0x30f /* offset 710 */ ,
+ 0x475, 0x30f /* offset 712 */ ,
+ 0x416, 0x306 /* offset 714 */ ,
+ 0x436, 0x306 /* offset 716 */ ,
+ 0x410, 0x306 /* offset 718 */ ,
+ 0x430, 0x306 /* offset 720 */ ,
+ 0x410, 0x308 /* offset 722 */ ,
+ 0x430, 0x308 /* offset 724 */ ,
+ 0x415, 0x306 /* offset 726 */ ,
+ 0x435, 0x306 /* offset 728 */ ,
+ 0x4d8, 0x308 /* offset 730 */ ,
+ 0x4d9, 0x308 /* offset 732 */ ,
+ 0x416, 0x308 /* offset 734 */ ,
+ 0x436, 0x308 /* offset 736 */ ,
+ 0x417, 0x308 /* offset 738 */ ,
+ 0x437, 0x308 /* offset 740 */ ,
+ 0x418, 0x304 /* offset 742 */ ,
+ 0x438, 0x304 /* offset 744 */ ,
+ 0x418, 0x308 /* offset 746 */ ,
+ 0x438, 0x308 /* offset 748 */ ,
+ 0x41e, 0x308 /* offset 750 */ ,
+ 0x43e, 0x308 /* offset 752 */ ,
+ 0x4e8, 0x308 /* offset 754 */ ,
+ 0x4e9, 0x308 /* offset 756 */ ,
+ 0x42d, 0x308 /* offset 758 */ ,
+ 0x44d, 0x308 /* offset 760 */ ,
+ 0x423, 0x304 /* offset 762 */ ,
+ 0x443, 0x304 /* offset 764 */ ,
+ 0x423, 0x308 /* offset 766 */ ,
+ 0x443, 0x308 /* offset 768 */ ,
+ 0x423, 0x30b /* offset 770 */ ,
+ 0x443, 0x30b /* offset 772 */ ,
+ 0x427, 0x308 /* offset 774 */ ,
+ 0x447, 0x308 /* offset 776 */ ,
+ 0x42b, 0x308 /* offset 778 */ ,
+ 0x44b, 0x308 /* offset 780 */ ,
+ 0x565, 0x582 /* offset 782 */ ,
+ 0x627, 0x653 /* offset 784 */ ,
+ 0x627, 0x654 /* offset 786 */ ,
+ 0x648, 0x654 /* offset 788 */ ,
+ 0x627, 0x655 /* offset 790 */ ,
+ 0x64a, 0x654 /* offset 792 */ ,
+ 0x627, 0x674 /* offset 794 */ ,
+ 0x648, 0x674 /* offset 796 */ ,
+ 0x6c7, 0x674 /* offset 798 */ ,
+ 0x64a, 0x674 /* offset 800 */ ,
+ 0x6d5, 0x654 /* offset 802 */ ,
+ 0x6c1, 0x654 /* offset 804 */ ,
+ 0x6d2, 0x654 /* offset 806 */ ,
+ 0x928, 0x93c /* offset 808 */ ,
+ 0x930, 0x93c /* offset 810 */ ,
+ 0x933, 0x93c /* offset 812 */ ,
+ 0x915, 0x93c /* offset 814 */ ,
+ 0x916, 0x93c /* offset 816 */ ,
+ 0x917, 0x93c /* offset 818 */ ,
+ 0x91c, 0x93c /* offset 820 */ ,
+ 0x921, 0x93c /* offset 822 */ ,
+ 0x922, 0x93c /* offset 824 */ ,
+ 0x92b, 0x93c /* offset 826 */ ,
+ 0x92f, 0x93c /* offset 828 */ ,
+ 0x9c7, 0x9be /* offset 830 */ ,
+ 0x9c7, 0x9d7 /* offset 832 */ ,
+ 0x9a1, 0x9bc /* offset 834 */ ,
+ 0x9a2, 0x9bc /* offset 836 */ ,
+ 0x9af, 0x9bc /* offset 838 */ ,
+ 0xa32, 0xa3c /* offset 840 */ ,
+ 0xa38, 0xa3c /* offset 842 */ ,
+ 0xa16, 0xa3c /* offset 844 */ ,
+ 0xa17, 0xa3c /* offset 846 */ ,
+ 0xa1c, 0xa3c /* offset 848 */ ,
+ 0xa2b, 0xa3c /* offset 850 */ ,
+ 0xb47, 0xb56 /* offset 852 */ ,
+ 0xb47, 0xb3e /* offset 854 */ ,
+ 0xb47, 0xb57 /* offset 856 */ ,
+ 0xb21, 0xb3c /* offset 858 */ ,
+ 0xb22, 0xb3c /* offset 860 */ ,
+ 0xb92, 0xbd7 /* offset 862 */ ,
+ 0xbc6, 0xbbe /* offset 864 */ ,
+ 0xbc7, 0xbbe /* offset 866 */ ,
+ 0xbc6, 0xbd7 /* offset 868 */ ,
+ 0xc46, 0xc56 /* offset 870 */ ,
+ 0xcbf, 0xcd5 /* offset 872 */ ,
+ 0xcc6, 0xcd5 /* offset 874 */ ,
+ 0xcc6, 0xcd6 /* offset 876 */ ,
+ 0xcc6, 0xcc2 /* offset 878 */ ,
+ 0xcc6, 0xcc2, 0xcd5 /* offset 880 */ ,
+ 0xd46, 0xd3e /* offset 883 */ ,
+ 0xd47, 0xd3e /* offset 885 */ ,
+ 0xd46, 0xd57 /* offset 887 */ ,
+ 0xdd9, 0xdca /* offset 889 */ ,
+ 0xdd9, 0xdcf /* offset 891 */ ,
+ 0xdd9, 0xdcf, 0xdca /* offset 893 */ ,
+ 0xdd9, 0xddf /* offset 896 */ ,
+ 0xe4d, 0xe32 /* offset 898 */ ,
+ 0xecd, 0xeb2 /* offset 900 */ ,
+ 0xeab, 0xe99 /* offset 902 */ ,
+ 0xeab, 0xea1 /* offset 904 */ ,
+ 0xf0b /* offset 906 */ ,
+ 0xf42, 0xfb7 /* offset 907 */ ,
+ 0xf4c, 0xfb7 /* offset 909 */ ,
+ 0xf51, 0xfb7 /* offset 911 */ ,
+ 0xf56, 0xfb7 /* offset 913 */ ,
+ 0xf5b, 0xfb7 /* offset 915 */ ,
+ 0xf40, 0xfb5 /* offset 917 */ ,
+ 0xf71, 0xf72 /* offset 919 */ ,
+ 0xf71, 0xf74 /* offset 921 */ ,
+ 0xfb2, 0xf80 /* offset 923 */ ,
+ 0xfb2, 0xf71, 0xf80 /* offset 925 */ ,
+ 0xfb3, 0xf80 /* offset 928 */ ,
+ 0xfb3, 0xf71, 0xf80 /* offset 930 */ ,
+ 0xf71, 0xf80 /* offset 933 */ ,
+ 0xf92, 0xfb7 /* offset 935 */ ,
+ 0xf9c, 0xfb7 /* offset 937 */ ,
+ 0xfa1, 0xfb7 /* offset 939 */ ,
+ 0xfa6, 0xfb7 /* offset 941 */ ,
+ 0xfab, 0xfb7 /* offset 943 */ ,
+ 0xf90, 0xfb5 /* offset 945 */ ,
+ 0x1025, 0x102e /* offset 947 */ ,
+ 0x41, 0x325 /* offset 949 */ ,
+ 0x61, 0x325 /* offset 951 */ ,
+ 0x42, 0x307 /* offset 953 */ ,
+ 0x62, 0x307 /* offset 955 */ ,
+ 0x42, 0x323 /* offset 957 */ ,
+ 0x62, 0x323 /* offset 959 */ ,
+ 0x42, 0x331 /* offset 961 */ ,
+ 0x62, 0x331 /* offset 963 */ ,
+ 0x43, 0x327, 0x301 /* offset 965 */ ,
+ 0x63, 0x327, 0x301 /* offset 968 */ ,
+ 0x44, 0x307 /* offset 971 */ ,
+ 0x64, 0x307 /* offset 973 */ ,
+ 0x44, 0x323 /* offset 975 */ ,
+ 0x64, 0x323 /* offset 977 */ ,
+ 0x44, 0x331 /* offset 979 */ ,
+ 0x64, 0x331 /* offset 981 */ ,
+ 0x44, 0x327 /* offset 983 */ ,
+ 0x64, 0x327 /* offset 985 */ ,
+ 0x44, 0x32d /* offset 987 */ ,
+ 0x64, 0x32d /* offset 989 */ ,
+ 0x45, 0x304, 0x300 /* offset 991 */ ,
+ 0x65, 0x304, 0x300 /* offset 994 */ ,
+ 0x45, 0x304, 0x301 /* offset 997 */ ,
+ 0x65, 0x304, 0x301 /* offset 1000 */ ,
+ 0x45, 0x32d /* offset 1003 */ ,
+ 0x65, 0x32d /* offset 1005 */ ,
+ 0x45, 0x330 /* offset 1007 */ ,
+ 0x65, 0x330 /* offset 1009 */ ,
+ 0x45, 0x327, 0x306 /* offset 1011 */ ,
+ 0x65, 0x327, 0x306 /* offset 1014 */ ,
+ 0x46, 0x307 /* offset 1017 */ ,
+ 0x66, 0x307 /* offset 1019 */ ,
+ 0x47, 0x304 /* offset 1021 */ ,
+ 0x67, 0x304 /* offset 1023 */ ,
+ 0x48, 0x307 /* offset 1025 */ ,
+ 0x68, 0x307 /* offset 1027 */ ,
+ 0x48, 0x323 /* offset 1029 */ ,
+ 0x68, 0x323 /* offset 1031 */ ,
+ 0x48, 0x308 /* offset 1033 */ ,
+ 0x68, 0x308 /* offset 1035 */ ,
+ 0x48, 0x327 /* offset 1037 */ ,
+ 0x68, 0x327 /* offset 1039 */ ,
+ 0x48, 0x32e /* offset 1041 */ ,
+ 0x68, 0x32e /* offset 1043 */ ,
+ 0x49, 0x330 /* offset 1045 */ ,
+ 0x69, 0x330 /* offset 1047 */ ,
+ 0x49, 0x308, 0x301 /* offset 1049 */ ,
+ 0x69, 0x308, 0x301 /* offset 1052 */ ,
+ 0x4b, 0x301 /* offset 1055 */ ,
+ 0x6b, 0x301 /* offset 1057 */ ,
+ 0x4b, 0x323 /* offset 1059 */ ,
+ 0x6b, 0x323 /* offset 1061 */ ,
+ 0x4b, 0x331 /* offset 1063 */ ,
+ 0x6b, 0x331 /* offset 1065 */ ,
+ 0x4c, 0x323 /* offset 1067 */ ,
+ 0x6c, 0x323 /* offset 1069 */ ,
+ 0x4c, 0x323, 0x304 /* offset 1071 */ ,
+ 0x6c, 0x323, 0x304 /* offset 1074 */ ,
+ 0x4c, 0x331 /* offset 1077 */ ,
+ 0x6c, 0x331 /* offset 1079 */ ,
+ 0x4c, 0x32d /* offset 1081 */ ,
+ 0x6c, 0x32d /* offset 1083 */ ,
+ 0x4d, 0x301 /* offset 1085 */ ,
+ 0x6d, 0x301 /* offset 1087 */ ,
+ 0x4d, 0x307 /* offset 1089 */ ,
+ 0x6d, 0x307 /* offset 1091 */ ,
+ 0x4d, 0x323 /* offset 1093 */ ,
+ 0x6d, 0x323 /* offset 1095 */ ,
+ 0x4e, 0x307 /* offset 1097 */ ,
+ 0x6e, 0x307 /* offset 1099 */ ,
+ 0x4e, 0x323 /* offset 1101 */ ,
+ 0x6e, 0x323 /* offset 1103 */ ,
+ 0x4e, 0x331 /* offset 1105 */ ,
+ 0x6e, 0x331 /* offset 1107 */ ,
+ 0x4e, 0x32d /* offset 1109 */ ,
+ 0x6e, 0x32d /* offset 1111 */ ,
+ 0x4f, 0x303, 0x301 /* offset 1113 */ ,
+ 0x6f, 0x303, 0x301 /* offset 1116 */ ,
+ 0x4f, 0x303, 0x308 /* offset 1119 */ ,
+ 0x6f, 0x303, 0x308 /* offset 1122 */ ,
+ 0x4f, 0x304, 0x300 /* offset 1125 */ ,
+ 0x6f, 0x304, 0x300 /* offset 1128 */ ,
+ 0x4f, 0x304, 0x301 /* offset 1131 */ ,
+ 0x6f, 0x304, 0x301 /* offset 1134 */ ,
+ 0x50, 0x301 /* offset 1137 */ ,
+ 0x70, 0x301 /* offset 1139 */ ,
+ 0x50, 0x307 /* offset 1141 */ ,
+ 0x70, 0x307 /* offset 1143 */ ,
+ 0x52, 0x307 /* offset 1145 */ ,
+ 0x72, 0x307 /* offset 1147 */ ,
+ 0x52, 0x323 /* offset 1149 */ ,
+ 0x72, 0x323 /* offset 1151 */ ,
+ 0x52, 0x323, 0x304 /* offset 1153 */ ,
+ 0x72, 0x323, 0x304 /* offset 1156 */ ,
+ 0x52, 0x331 /* offset 1159 */ ,
+ 0x72, 0x331 /* offset 1161 */ ,
+ 0x53, 0x307 /* offset 1163 */ ,
+ 0x73, 0x307 /* offset 1165 */ ,
+ 0x53, 0x323 /* offset 1167 */ ,
+ 0x73, 0x323 /* offset 1169 */ ,
+ 0x53, 0x301, 0x307 /* offset 1171 */ ,
+ 0x73, 0x301, 0x307 /* offset 1174 */ ,
+ 0x53, 0x30c, 0x307 /* offset 1177 */ ,
+ 0x73, 0x30c, 0x307 /* offset 1180 */ ,
+ 0x53, 0x323, 0x307 /* offset 1183 */ ,
+ 0x73, 0x323, 0x307 /* offset 1186 */ ,
+ 0x54, 0x307 /* offset 1189 */ ,
+ 0x74, 0x307 /* offset 1191 */ ,
+ 0x54, 0x323 /* offset 1193 */ ,
+ 0x74, 0x323 /* offset 1195 */ ,
+ 0x54, 0x331 /* offset 1197 */ ,
+ 0x74, 0x331 /* offset 1199 */ ,
+ 0x54, 0x32d /* offset 1201 */ ,
+ 0x74, 0x32d /* offset 1203 */ ,
+ 0x55, 0x324 /* offset 1205 */ ,
+ 0x75, 0x324 /* offset 1207 */ ,
+ 0x55, 0x330 /* offset 1209 */ ,
+ 0x75, 0x330 /* offset 1211 */ ,
+ 0x55, 0x32d /* offset 1213 */ ,
+ 0x75, 0x32d /* offset 1215 */ ,
+ 0x55, 0x303, 0x301 /* offset 1217 */ ,
+ 0x75, 0x303, 0x301 /* offset 1220 */ ,
+ 0x55, 0x304, 0x308 /* offset 1223 */ ,
+ 0x75, 0x304, 0x308 /* offset 1226 */ ,
+ 0x56, 0x303 /* offset 1229 */ ,
+ 0x76, 0x303 /* offset 1231 */ ,
+ 0x56, 0x323 /* offset 1233 */ ,
+ 0x76, 0x323 /* offset 1235 */ ,
+ 0x57, 0x300 /* offset 1237 */ ,
+ 0x77, 0x300 /* offset 1239 */ ,
+ 0x57, 0x301 /* offset 1241 */ ,
+ 0x77, 0x301 /* offset 1243 */ ,
+ 0x57, 0x308 /* offset 1245 */ ,
+ 0x77, 0x308 /* offset 1247 */ ,
+ 0x57, 0x307 /* offset 1249 */ ,
+ 0x77, 0x307 /* offset 1251 */ ,
+ 0x57, 0x323 /* offset 1253 */ ,
+ 0x77, 0x323 /* offset 1255 */ ,
+ 0x58, 0x307 /* offset 1257 */ ,
+ 0x78, 0x307 /* offset 1259 */ ,
+ 0x58, 0x308 /* offset 1261 */ ,
+ 0x78, 0x308 /* offset 1263 */ ,
+ 0x59, 0x307 /* offset 1265 */ ,
+ 0x79, 0x307 /* offset 1267 */ ,
+ 0x5a, 0x302 /* offset 1269 */ ,
+ 0x7a, 0x302 /* offset 1271 */ ,
+ 0x5a, 0x323 /* offset 1273 */ ,
+ 0x7a, 0x323 /* offset 1275 */ ,
+ 0x5a, 0x331 /* offset 1277 */ ,
+ 0x7a, 0x331 /* offset 1279 */ ,
+ 0x68, 0x331 /* offset 1281 */ ,
+ 0x74, 0x308 /* offset 1283 */ ,
+ 0x77, 0x30a /* offset 1285 */ ,
+ 0x79, 0x30a /* offset 1287 */ ,
+ 0x61, 0x2be /* offset 1289 */ ,
+ 0x41, 0x323 /* offset 1291 */ ,
+ 0x61, 0x323 /* offset 1293 */ ,
+ 0x41, 0x309 /* offset 1295 */ ,
+ 0x61, 0x309 /* offset 1297 */ ,
+ 0x41, 0x302, 0x301 /* offset 1299 */ ,
+ 0x61, 0x302, 0x301 /* offset 1302 */ ,
+ 0x41, 0x302, 0x300 /* offset 1305 */ ,
+ 0x61, 0x302, 0x300 /* offset 1308 */ ,
+ 0x41, 0x302, 0x309 /* offset 1311 */ ,
+ 0x61, 0x302, 0x309 /* offset 1314 */ ,
+ 0x41, 0x302, 0x303 /* offset 1317 */ ,
+ 0x61, 0x302, 0x303 /* offset 1320 */ ,
+ 0x41, 0x323, 0x302 /* offset 1323 */ ,
+ 0x61, 0x323, 0x302 /* offset 1326 */ ,
+ 0x41, 0x306, 0x301 /* offset 1329 */ ,
+ 0x61, 0x306, 0x301 /* offset 1332 */ ,
+ 0x41, 0x306, 0x300 /* offset 1335 */ ,
+ 0x61, 0x306, 0x300 /* offset 1338 */ ,
+ 0x41, 0x306, 0x309 /* offset 1341 */ ,
+ 0x61, 0x306, 0x309 /* offset 1344 */ ,
+ 0x41, 0x306, 0x303 /* offset 1347 */ ,
+ 0x61, 0x306, 0x303 /* offset 1350 */ ,
+ 0x41, 0x323, 0x306 /* offset 1353 */ ,
+ 0x61, 0x323, 0x306 /* offset 1356 */ ,
+ 0x45, 0x323 /* offset 1359 */ ,
+ 0x65, 0x323 /* offset 1361 */ ,
+ 0x45, 0x309 /* offset 1363 */ ,
+ 0x65, 0x309 /* offset 1365 */ ,
+ 0x45, 0x303 /* offset 1367 */ ,
+ 0x65, 0x303 /* offset 1369 */ ,
+ 0x45, 0x302, 0x301 /* offset 1371 */ ,
+ 0x65, 0x302, 0x301 /* offset 1374 */ ,
+ 0x45, 0x302, 0x300 /* offset 1377 */ ,
+ 0x65, 0x302, 0x300 /* offset 1380 */ ,
+ 0x45, 0x302, 0x309 /* offset 1383 */ ,
+ 0x65, 0x302, 0x309 /* offset 1386 */ ,
+ 0x45, 0x302, 0x303 /* offset 1389 */ ,
+ 0x65, 0x302, 0x303 /* offset 1392 */ ,
+ 0x45, 0x323, 0x302 /* offset 1395 */ ,
+ 0x65, 0x323, 0x302 /* offset 1398 */ ,
+ 0x49, 0x309 /* offset 1401 */ ,
+ 0x69, 0x309 /* offset 1403 */ ,
+ 0x49, 0x323 /* offset 1405 */ ,
+ 0x69, 0x323 /* offset 1407 */ ,
+ 0x4f, 0x323 /* offset 1409 */ ,
+ 0x6f, 0x323 /* offset 1411 */ ,
+ 0x4f, 0x309 /* offset 1413 */ ,
+ 0x6f, 0x309 /* offset 1415 */ ,
+ 0x4f, 0x302, 0x301 /* offset 1417 */ ,
+ 0x6f, 0x302, 0x301 /* offset 1420 */ ,
+ 0x4f, 0x302, 0x300 /* offset 1423 */ ,
+ 0x6f, 0x302, 0x300 /* offset 1426 */ ,
+ 0x4f, 0x302, 0x309 /* offset 1429 */ ,
+ 0x6f, 0x302, 0x309 /* offset 1432 */ ,
+ 0x4f, 0x302, 0x303 /* offset 1435 */ ,
+ 0x6f, 0x302, 0x303 /* offset 1438 */ ,
+ 0x4f, 0x323, 0x302 /* offset 1441 */ ,
+ 0x6f, 0x323, 0x302 /* offset 1444 */ ,
+ 0x4f, 0x31b, 0x301 /* offset 1447 */ ,
+ 0x6f, 0x31b, 0x301 /* offset 1450 */ ,
+ 0x4f, 0x31b, 0x300 /* offset 1453 */ ,
+ 0x6f, 0x31b, 0x300 /* offset 1456 */ ,
+ 0x4f, 0x31b, 0x309 /* offset 1459 */ ,
+ 0x6f, 0x31b, 0x309 /* offset 1462 */ ,
+ 0x4f, 0x31b, 0x303 /* offset 1465 */ ,
+ 0x6f, 0x31b, 0x303 /* offset 1468 */ ,
+ 0x4f, 0x31b, 0x323 /* offset 1471 */ ,
+ 0x6f, 0x31b, 0x323 /* offset 1474 */ ,
+ 0x55, 0x323 /* offset 1477 */ ,
+ 0x75, 0x323 /* offset 1479 */ ,
+ 0x55, 0x309 /* offset 1481 */ ,
+ 0x75, 0x309 /* offset 1483 */ ,
+ 0x55, 0x31b, 0x301 /* offset 1485 */ ,
+ 0x75, 0x31b, 0x301 /* offset 1488 */ ,
+ 0x55, 0x31b, 0x300 /* offset 1491 */ ,
+ 0x75, 0x31b, 0x300 /* offset 1494 */ ,
+ 0x55, 0x31b, 0x309 /* offset 1497 */ ,
+ 0x75, 0x31b, 0x309 /* offset 1500 */ ,
+ 0x55, 0x31b, 0x303 /* offset 1503 */ ,
+ 0x75, 0x31b, 0x303 /* offset 1506 */ ,
+ 0x55, 0x31b, 0x323 /* offset 1509 */ ,
+ 0x75, 0x31b, 0x323 /* offset 1512 */ ,
+ 0x59, 0x300 /* offset 1515 */ ,
+ 0x79, 0x300 /* offset 1517 */ ,
+ 0x59, 0x323 /* offset 1519 */ ,
+ 0x79, 0x323 /* offset 1521 */ ,
+ 0x59, 0x309 /* offset 1523 */ ,
+ 0x79, 0x309 /* offset 1525 */ ,
+ 0x59, 0x303 /* offset 1527 */ ,
+ 0x79, 0x303 /* offset 1529 */ ,
+ 0x3b1, 0x313 /* offset 1531 */ ,
+ 0x3b1, 0x314 /* offset 1533 */ ,
+ 0x3b1, 0x313, 0x300 /* offset 1535 */ ,
+ 0x3b1, 0x314, 0x300 /* offset 1538 */ ,
+ 0x3b1, 0x313, 0x301 /* offset 1541 */ ,
+ 0x3b1, 0x314, 0x301 /* offset 1544 */ ,
+ 0x3b1, 0x313, 0x342 /* offset 1547 */ ,
+ 0x3b1, 0x314, 0x342 /* offset 1550 */ ,
+ 0x391, 0x313 /* offset 1553 */ ,
+ 0x391, 0x314 /* offset 1555 */ ,
+ 0x391, 0x313, 0x300 /* offset 1557 */ ,
+ 0x391, 0x314, 0x300 /* offset 1560 */ ,
+ 0x391, 0x313, 0x301 /* offset 1563 */ ,
+ 0x391, 0x314, 0x301 /* offset 1566 */ ,
+ 0x391, 0x313, 0x342 /* offset 1569 */ ,
+ 0x391, 0x314, 0x342 /* offset 1572 */ ,
+ 0x3b5, 0x313 /* offset 1575 */ ,
+ 0x3b5, 0x314 /* offset 1577 */ ,
+ 0x3b5, 0x313, 0x300 /* offset 1579 */ ,
+ 0x3b5, 0x314, 0x300 /* offset 1582 */ ,
+ 0x3b5, 0x313, 0x301 /* offset 1585 */ ,
+ 0x3b5, 0x314, 0x301 /* offset 1588 */ ,
+ 0x395, 0x313 /* offset 1591 */ ,
+ 0x395, 0x314 /* offset 1593 */ ,
+ 0x395, 0x313, 0x300 /* offset 1595 */ ,
+ 0x395, 0x314, 0x300 /* offset 1598 */ ,
+ 0x395, 0x313, 0x301 /* offset 1601 */ ,
+ 0x395, 0x314, 0x301 /* offset 1604 */ ,
+ 0x3b7, 0x313 /* offset 1607 */ ,
+ 0x3b7, 0x314 /* offset 1609 */ ,
+ 0x3b7, 0x313, 0x300 /* offset 1611 */ ,
+ 0x3b7, 0x314, 0x300 /* offset 1614 */ ,
+ 0x3b7, 0x313, 0x301 /* offset 1617 */ ,
+ 0x3b7, 0x314, 0x301 /* offset 1620 */ ,
+ 0x3b7, 0x313, 0x342 /* offset 1623 */ ,
+ 0x3b7, 0x314, 0x342 /* offset 1626 */ ,
+ 0x397, 0x313 /* offset 1629 */ ,
+ 0x397, 0x314 /* offset 1631 */ ,
+ 0x397, 0x313, 0x300 /* offset 1633 */ ,
+ 0x397, 0x314, 0x300 /* offset 1636 */ ,
+ 0x397, 0x313, 0x301 /* offset 1639 */ ,
+ 0x397, 0x314, 0x301 /* offset 1642 */ ,
+ 0x397, 0x313, 0x342 /* offset 1645 */ ,
+ 0x397, 0x314, 0x342 /* offset 1648 */ ,
+ 0x3b9, 0x313 /* offset 1651 */ ,
+ 0x3b9, 0x314 /* offset 1653 */ ,
+ 0x3b9, 0x313, 0x300 /* offset 1655 */ ,
+ 0x3b9, 0x314, 0x300 /* offset 1658 */ ,
+ 0x3b9, 0x313, 0x301 /* offset 1661 */ ,
+ 0x3b9, 0x314, 0x301 /* offset 1664 */ ,
+ 0x3b9, 0x313, 0x342 /* offset 1667 */ ,
+ 0x3b9, 0x314, 0x342 /* offset 1670 */ ,
+ 0x399, 0x313 /* offset 1673 */ ,
+ 0x399, 0x314 /* offset 1675 */ ,
+ 0x399, 0x313, 0x300 /* offset 1677 */ ,
+ 0x399, 0x314, 0x300 /* offset 1680 */ ,
+ 0x399, 0x313, 0x301 /* offset 1683 */ ,
+ 0x399, 0x314, 0x301 /* offset 1686 */ ,
+ 0x399, 0x313, 0x342 /* offset 1689 */ ,
+ 0x399, 0x314, 0x342 /* offset 1692 */ ,
+ 0x3bf, 0x313 /* offset 1695 */ ,
+ 0x3bf, 0x314 /* offset 1697 */ ,
+ 0x3bf, 0x313, 0x300 /* offset 1699 */ ,
+ 0x3bf, 0x314, 0x300 /* offset 1702 */ ,
+ 0x3bf, 0x313, 0x301 /* offset 1705 */ ,
+ 0x3bf, 0x314, 0x301 /* offset 1708 */ ,
+ 0x39f, 0x313 /* offset 1711 */ ,
+ 0x39f, 0x314 /* offset 1713 */ ,
+ 0x39f, 0x313, 0x300 /* offset 1715 */ ,
+ 0x39f, 0x314, 0x300 /* offset 1718 */ ,
+ 0x39f, 0x313, 0x301 /* offset 1721 */ ,
+ 0x39f, 0x314, 0x301 /* offset 1724 */ ,
+ 0x3c5, 0x313 /* offset 1727 */ ,
+ 0x3c5, 0x314 /* offset 1729 */ ,
+ 0x3c5, 0x313, 0x300 /* offset 1731 */ ,
+ 0x3c5, 0x314, 0x300 /* offset 1734 */ ,
+ 0x3c5, 0x313, 0x301 /* offset 1737 */ ,
+ 0x3c5, 0x314, 0x301 /* offset 1740 */ ,
+ 0x3c5, 0x313, 0x342 /* offset 1743 */ ,
+ 0x3c5, 0x314, 0x342 /* offset 1746 */ ,
+ 0x3a5, 0x314 /* offset 1749 */ ,
+ 0x3a5, 0x314, 0x300 /* offset 1751 */ ,
+ 0x3a5, 0x314, 0x301 /* offset 1754 */ ,
+ 0x3a5, 0x314, 0x342 /* offset 1757 */ ,
+ 0x3c9, 0x313 /* offset 1760 */ ,
+ 0x3c9, 0x314 /* offset 1762 */ ,
+ 0x3c9, 0x313, 0x300 /* offset 1764 */ ,
+ 0x3c9, 0x314, 0x300 /* offset 1767 */ ,
+ 0x3c9, 0x313, 0x301 /* offset 1770 */ ,
+ 0x3c9, 0x314, 0x301 /* offset 1773 */ ,
+ 0x3c9, 0x313, 0x342 /* offset 1776 */ ,
+ 0x3c9, 0x314, 0x342 /* offset 1779 */ ,
+ 0x3a9, 0x313 /* offset 1782 */ ,
+ 0x3a9, 0x314 /* offset 1784 */ ,
+ 0x3a9, 0x313, 0x300 /* offset 1786 */ ,
+ 0x3a9, 0x314, 0x300 /* offset 1789 */ ,
+ 0x3a9, 0x313, 0x301 /* offset 1792 */ ,
+ 0x3a9, 0x314, 0x301 /* offset 1795 */ ,
+ 0x3a9, 0x313, 0x342 /* offset 1798 */ ,
+ 0x3a9, 0x314, 0x342 /* offset 1801 */ ,
+ 0x3b1, 0x300 /* offset 1804 */ ,
+ 0x3b5, 0x300 /* offset 1806 */ ,
+ 0x3b7, 0x300 /* offset 1808 */ ,
+ 0x3b9, 0x300 /* offset 1810 */ ,
+ 0x3bf, 0x300 /* offset 1812 */ ,
+ 0x3c5, 0x300 /* offset 1814 */ ,
+ 0x3c9, 0x300 /* offset 1816 */ ,
+ 0x3b1, 0x313, 0x345 /* offset 1818 */ ,
+ 0x3b1, 0x314, 0x345 /* offset 1821 */ ,
+ 0x3b1, 0x313, 0x300, 0x345 /* offset 1824 */ ,
+ 0x3b1, 0x314, 0x300, 0x345 /* offset 1828 */ ,
+ 0x3b1, 0x313, 0x301, 0x345 /* offset 1832 */ ,
+ 0x3b1, 0x314, 0x301, 0x345 /* offset 1836 */ ,
+ 0x3b1, 0x313, 0x342, 0x345 /* offset 1840 */ ,
+ 0x3b1, 0x314, 0x342, 0x345 /* offset 1844 */ ,
+ 0x391, 0x313, 0x345 /* offset 1848 */ ,
+ 0x391, 0x314, 0x345 /* offset 1851 */ ,
+ 0x391, 0x313, 0x300, 0x345 /* offset 1854 */ ,
+ 0x391, 0x314, 0x300, 0x345 /* offset 1858 */ ,
+ 0x391, 0x313, 0x301, 0x345 /* offset 1862 */ ,
+ 0x391, 0x314, 0x301, 0x345 /* offset 1866 */ ,
+ 0x391, 0x313, 0x342, 0x345 /* offset 1870 */ ,
+ 0x391, 0x314, 0x342, 0x345 /* offset 1874 */ ,
+ 0x3b7, 0x313, 0x345 /* offset 1878 */ ,
+ 0x3b7, 0x314, 0x345 /* offset 1881 */ ,
+ 0x3b7, 0x313, 0x300, 0x345 /* offset 1884 */ ,
+ 0x3b7, 0x314, 0x300, 0x345 /* offset 1888 */ ,
+ 0x3b7, 0x313, 0x301, 0x345 /* offset 1892 */ ,
+ 0x3b7, 0x314, 0x301, 0x345 /* offset 1896 */ ,
+ 0x3b7, 0x313, 0x342, 0x345 /* offset 1900 */ ,
+ 0x3b7, 0x314, 0x342, 0x345 /* offset 1904 */ ,
+ 0x397, 0x313, 0x345 /* offset 1908 */ ,
+ 0x397, 0x314, 0x345 /* offset 1911 */ ,
+ 0x397, 0x313, 0x300, 0x345 /* offset 1914 */ ,
+ 0x397, 0x314, 0x300, 0x345 /* offset 1918 */ ,
+ 0x397, 0x313, 0x301, 0x345 /* offset 1922 */ ,
+ 0x397, 0x314, 0x301, 0x345 /* offset 1926 */ ,
+ 0x397, 0x313, 0x342, 0x345 /* offset 1930 */ ,
+ 0x397, 0x314, 0x342, 0x345 /* offset 1934 */ ,
+ 0x3c9, 0x313, 0x345 /* offset 1938 */ ,
+ 0x3c9, 0x314, 0x345 /* offset 1941 */ ,
+ 0x3c9, 0x313, 0x300, 0x345 /* offset 1944 */ ,
+ 0x3c9, 0x314, 0x300, 0x345 /* offset 1948 */ ,
+ 0x3c9, 0x313, 0x301, 0x345 /* offset 1952 */ ,
+ 0x3c9, 0x314, 0x301, 0x345 /* offset 1956 */ ,
+ 0x3c9, 0x313, 0x342, 0x345 /* offset 1960 */ ,
+ 0x3c9, 0x314, 0x342, 0x345 /* offset 1964 */ ,
+ 0x3a9, 0x313, 0x345 /* offset 1968 */ ,
+ 0x3a9, 0x314, 0x345 /* offset 1971 */ ,
+ 0x3a9, 0x313, 0x300, 0x345 /* offset 1974 */ ,
+ 0x3a9, 0x314, 0x300, 0x345 /* offset 1978 */ ,
+ 0x3a9, 0x313, 0x301, 0x345 /* offset 1982 */ ,
+ 0x3a9, 0x314, 0x301, 0x345 /* offset 1986 */ ,
+ 0x3a9, 0x313, 0x342, 0x345 /* offset 1990 */ ,
+ 0x3a9, 0x314, 0x342, 0x345 /* offset 1994 */ ,
+ 0x3b1, 0x306 /* offset 1998 */ ,
+ 0x3b1, 0x304 /* offset 2000 */ ,
+ 0x3b1, 0x300, 0x345 /* offset 2002 */ ,
+ 0x3b1, 0x345 /* offset 2005 */ ,
+ 0x3b1, 0x301, 0x345 /* offset 2007 */ ,
+ 0x3b1, 0x342 /* offset 2010 */ ,
+ 0x3b1, 0x342, 0x345 /* offset 2012 */ ,
+ 0x391, 0x306 /* offset 2015 */ ,
+ 0x391, 0x304 /* offset 2017 */ ,
+ 0x391, 0x300 /* offset 2019 */ ,
+ 0x391, 0x345 /* offset 2021 */ ,
+ 0x20, 0x313 /* offset 2023 */ ,
+ 0x3b9 /* offset 2025 */ ,
+ 0x20, 0x342 /* offset 2026 */ ,
+ 0x20, 0x308, 0x342 /* offset 2028 */ ,
+ 0x3b7, 0x300, 0x345 /* offset 2031 */ ,
+ 0x3b7, 0x345 /* offset 2034 */ ,
+ 0x3b7, 0x301, 0x345 /* offset 2036 */ ,
+ 0x3b7, 0x342 /* offset 2039 */ ,
+ 0x3b7, 0x342, 0x345 /* offset 2041 */ ,
+ 0x395, 0x300 /* offset 2044 */ ,
+ 0x397, 0x300 /* offset 2046 */ ,
+ 0x397, 0x345 /* offset 2048 */ ,
+ 0x20, 0x313, 0x300 /* offset 2050 */ ,
+ 0x20, 0x313, 0x301 /* offset 2053 */ ,
+ 0x20, 0x313, 0x342 /* offset 2056 */ ,
+ 0x3b9, 0x306 /* offset 2059 */ ,
+ 0x3b9, 0x304 /* offset 2061 */ ,
+ 0x3b9, 0x308, 0x300 /* offset 2063 */ ,
+ 0x3b9, 0x342 /* offset 2066 */ ,
+ 0x3b9, 0x308, 0x342 /* offset 2068 */ ,
+ 0x399, 0x306 /* offset 2071 */ ,
+ 0x399, 0x304 /* offset 2073 */ ,
+ 0x399, 0x300 /* offset 2075 */ ,
+ 0x20, 0x314, 0x300 /* offset 2077 */ ,
+ 0x20, 0x314, 0x301 /* offset 2080 */ ,
+ 0x20, 0x314, 0x342 /* offset 2083 */ ,
+ 0x3c5, 0x306 /* offset 2086 */ ,
+ 0x3c5, 0x304 /* offset 2088 */ ,
+ 0x3c5, 0x308, 0x300 /* offset 2090 */ ,
+ 0x3c1, 0x313 /* offset 2093 */ ,
+ 0x3c1, 0x314 /* offset 2095 */ ,
+ 0x3c5, 0x342 /* offset 2097 */ ,
+ 0x3c5, 0x308, 0x342 /* offset 2099 */ ,
+ 0x3a5, 0x306 /* offset 2102 */ ,
+ 0x3a5, 0x304 /* offset 2104 */ ,
+ 0x3a5, 0x300 /* offset 2106 */ ,
+ 0x3a1, 0x314 /* offset 2108 */ ,
+ 0x20, 0x308, 0x300 /* offset 2110 */ ,
+ 0x60 /* offset 2113 */ ,
+ 0x3c9, 0x300, 0x345 /* offset 2114 */ ,
+ 0x3c9, 0x345 /* offset 2117 */ ,
+ 0x3c9, 0x301, 0x345 /* offset 2119 */ ,
+ 0x3c9, 0x342 /* offset 2122 */ ,
+ 0x3c9, 0x342, 0x345 /* offset 2124 */ ,
+ 0x39f, 0x300 /* offset 2127 */ ,
+ 0x3a9, 0x300 /* offset 2129 */ ,
+ 0x3a9, 0x345 /* offset 2131 */ ,
+ 0x20, 0x314 /* offset 2133 */ ,
+ 0x2010 /* offset 2135 */ ,
+ 0x20, 0x333 /* offset 2136 */ ,
+ 0x2e /* offset 2138 */ ,
+ 0x2e, 0x2e /* offset 2139 */ ,
+ 0x2e, 0x2e, 0x2e /* offset 2141 */ ,
+ 0x2032, 0x2032 /* offset 2144 */ ,
+ 0x2032, 0x2032, 0x2032 /* offset 2146 */ ,
+ 0x2035, 0x2035 /* offset 2149 */ ,
+ 0x2035, 0x2035, 0x2035 /* offset 2151 */ ,
+ 0x21, 0x21 /* offset 2154 */ ,
+ 0x20, 0x305 /* offset 2156 */ ,
+ 0x3f, 0x3f /* offset 2158 */ ,
+ 0x3f, 0x21 /* offset 2160 */ ,
+ 0x21, 0x3f /* offset 2162 */ ,
+ 0x2032, 0x2032, 0x2032, 0x2032 /* offset 2164 */ ,
+ 0x30 /* offset 2168 */ ,
+ 0x69 /* offset 2169 */ ,
+ 0x34 /* offset 2170 */ ,
+ 0x35 /* offset 2171 */ ,
+ 0x36 /* offset 2172 */ ,
+ 0x37 /* offset 2173 */ ,
+ 0x38 /* offset 2174 */ ,
+ 0x39 /* offset 2175 */ ,
+ 0x2b /* offset 2176 */ ,
+ 0x2212 /* offset 2177 */ ,
+ 0x3d /* offset 2178 */ ,
+ 0x28 /* offset 2179 */ ,
+ 0x29 /* offset 2180 */ ,
+ 0x6e /* offset 2181 */ ,
+ 0x52, 0x73 /* offset 2182 */ ,
+ 0x61, 0x2f, 0x63 /* offset 2184 */ ,
+ 0x61, 0x2f, 0x73 /* offset 2187 */ ,
+ 0x43 /* offset 2190 */ ,
+ 0xb0, 0x43 /* offset 2191 */ ,
+ 0x63, 0x2f, 0x6f /* offset 2193 */ ,
+ 0x63, 0x2f, 0x75 /* offset 2196 */ ,
+ 0x190 /* offset 2199 */ ,
+ 0xb0, 0x46 /* offset 2200 */ ,
+ 0x67 /* offset 2202 */ ,
+ 0x48 /* offset 2203 */ ,
+ 0x127 /* offset 2204 */ ,
+ 0x49 /* offset 2205 */ ,
+ 0x4c /* offset 2206 */ ,
+ 0x4e /* offset 2207 */ ,
+ 0x4e, 0x6f /* offset 2208 */ ,
+ 0x50 /* offset 2210 */ ,
+ 0x51 /* offset 2211 */ ,
+ 0x52 /* offset 2212 */ ,
+ 0x53, 0x4d /* offset 2213 */ ,
+ 0x54, 0x45, 0x4c /* offset 2215 */ ,
+ 0x54, 0x4d /* offset 2218 */ ,
+ 0x5a /* offset 2220 */ ,
+ 0x3a9 /* offset 2221 */ ,
+ 0x4b /* offset 2222 */ ,
+ 0x42 /* offset 2223 */ ,
+ 0x65 /* offset 2224 */ ,
+ 0x45 /* offset 2225 */ ,
+ 0x46 /* offset 2226 */ ,
+ 0x4d /* offset 2227 */ ,
+ 0x5d0 /* offset 2228 */ ,
+ 0x5d1 /* offset 2229 */ ,
+ 0x5d2 /* offset 2230 */ ,
+ 0x5d3 /* offset 2231 */ ,
+ 0x3b3 /* offset 2232 */ ,
+ 0x393 /* offset 2233 */ ,
+ 0x3a0 /* offset 2234 */ ,
+ 0x2211 /* offset 2235 */ ,
+ 0x44 /* offset 2236 */ ,
+ 0x64 /* offset 2237 */ ,
+ 0x31, 0x2044, 0x33 /* offset 2238 */ ,
+ 0x32, 0x2044, 0x33 /* offset 2241 */ ,
+ 0x31, 0x2044, 0x35 /* offset 2244 */ ,
+ 0x32, 0x2044, 0x35 /* offset 2247 */ ,
+ 0x33, 0x2044, 0x35 /* offset 2250 */ ,
+ 0x34, 0x2044, 0x35 /* offset 2253 */ ,
+ 0x31, 0x2044, 0x36 /* offset 2256 */ ,
+ 0x35, 0x2044, 0x36 /* offset 2259 */ ,
+ 0x31, 0x2044, 0x38 /* offset 2262 */ ,
+ 0x33, 0x2044, 0x38 /* offset 2265 */ ,
+ 0x35, 0x2044, 0x38 /* offset 2268 */ ,
+ 0x37, 0x2044, 0x38 /* offset 2271 */ ,
+ 0x31, 0x2044 /* offset 2274 */ ,
+ 0x49, 0x49 /* offset 2276 */ ,
+ 0x49, 0x49, 0x49 /* offset 2278 */ ,
+ 0x49, 0x56 /* offset 2281 */ ,
+ 0x56 /* offset 2283 */ ,
+ 0x56, 0x49 /* offset 2284 */ ,
+ 0x56, 0x49, 0x49 /* offset 2286 */ ,
+ 0x56, 0x49, 0x49, 0x49 /* offset 2289 */ ,
+ 0x49, 0x58 /* offset 2293 */ ,
+ 0x58 /* offset 2295 */ ,
+ 0x58, 0x49 /* offset 2296 */ ,
+ 0x58, 0x49, 0x49 /* offset 2298 */ ,
+ 0x69, 0x69 /* offset 2301 */ ,
+ 0x69, 0x69, 0x69 /* offset 2303 */ ,
+ 0x69, 0x76 /* offset 2306 */ ,
+ 0x76 /* offset 2308 */ ,
+ 0x76, 0x69 /* offset 2309 */ ,
+ 0x76, 0x69, 0x69 /* offset 2311 */ ,
+ 0x76, 0x69, 0x69, 0x69 /* offset 2314 */ ,
+ 0x69, 0x78 /* offset 2318 */ ,
+ 0x78, 0x69 /* offset 2320 */ ,
+ 0x78, 0x69, 0x69 /* offset 2322 */ ,
+ 0x63 /* offset 2325 */ ,
+ 0x6d /* offset 2326 */ ,
+ 0x2190, 0x338 /* offset 2327 */ ,
+ 0x2192, 0x338 /* offset 2329 */ ,
+ 0x2194, 0x338 /* offset 2331 */ ,
+ 0x21d0, 0x338 /* offset 2333 */ ,
+ 0x21d4, 0x338 /* offset 2335 */ ,
+ 0x21d2, 0x338 /* offset 2337 */ ,
+ 0x2203, 0x338 /* offset 2339 */ ,
+ 0x2208, 0x338 /* offset 2341 */ ,
+ 0x220b, 0x338 /* offset 2343 */ ,
+ 0x2223, 0x338 /* offset 2345 */ ,
+ 0x2225, 0x338 /* offset 2347 */ ,
+ 0x222b, 0x222b /* offset 2349 */ ,
+ 0x222b, 0x222b, 0x222b /* offset 2351 */ ,
+ 0x222e, 0x222e /* offset 2354 */ ,
+ 0x222e, 0x222e, 0x222e /* offset 2356 */ ,
+ 0x223c, 0x338 /* offset 2359 */ ,
+ 0x2243, 0x338 /* offset 2361 */ ,
+ 0x2245, 0x338 /* offset 2363 */ ,
+ 0x2248, 0x338 /* offset 2365 */ ,
+ 0x3d, 0x338 /* offset 2367 */ ,
+ 0x2261, 0x338 /* offset 2369 */ ,
+ 0x224d, 0x338 /* offset 2371 */ ,
+ 0x3c, 0x338 /* offset 2373 */ ,
+ 0x3e, 0x338 /* offset 2375 */ ,
+ 0x2264, 0x338 /* offset 2377 */ ,
+ 0x2265, 0x338 /* offset 2379 */ ,
+ 0x2272, 0x338 /* offset 2381 */ ,
+ 0x2273, 0x338 /* offset 2383 */ ,
+ 0x2276, 0x338 /* offset 2385 */ ,
+ 0x2277, 0x338 /* offset 2387 */ ,
+ 0x227a, 0x338 /* offset 2389 */ ,
+ 0x227b, 0x338 /* offset 2391 */ ,
+ 0x2282, 0x338 /* offset 2393 */ ,
+ 0x2283, 0x338 /* offset 2395 */ ,
+ 0x2286, 0x338 /* offset 2397 */ ,
+ 0x2287, 0x338 /* offset 2399 */ ,
+ 0x22a2, 0x338 /* offset 2401 */ ,
+ 0x22a8, 0x338 /* offset 2403 */ ,
+ 0x22a9, 0x338 /* offset 2405 */ ,
+ 0x22ab, 0x338 /* offset 2407 */ ,
+ 0x227c, 0x338 /* offset 2409 */ ,
+ 0x227d, 0x338 /* offset 2411 */ ,
+ 0x2291, 0x338 /* offset 2413 */ ,
+ 0x2292, 0x338 /* offset 2415 */ ,
+ 0x22b2, 0x338 /* offset 2417 */ ,
+ 0x22b3, 0x338 /* offset 2419 */ ,
+ 0x22b4, 0x338 /* offset 2421 */ ,
+ 0x22b5, 0x338 /* offset 2423 */ ,
+ 0x3008 /* offset 2425 */ ,
+ 0x3009 /* offset 2426 */ ,
+ 0x31, 0x30 /* offset 2427 */ ,
+ 0x31, 0x31 /* offset 2429 */ ,
+ 0x31, 0x32 /* offset 2431 */ ,
+ 0x31, 0x33 /* offset 2433 */ ,
+ 0x31, 0x34 /* offset 2435 */ ,
+ 0x31, 0x35 /* offset 2437 */ ,
+ 0x31, 0x36 /* offset 2439 */ ,
+ 0x31, 0x37 /* offset 2441 */ ,
+ 0x31, 0x38 /* offset 2443 */ ,
+ 0x31, 0x39 /* offset 2445 */ ,
+ 0x32, 0x30 /* offset 2447 */ ,
+ 0x28, 0x31, 0x29 /* offset 2449 */ ,
+ 0x28, 0x32, 0x29 /* offset 2452 */ ,
+ 0x28, 0x33, 0x29 /* offset 2455 */ ,
+ 0x28, 0x34, 0x29 /* offset 2458 */ ,
+ 0x28, 0x35, 0x29 /* offset 2461 */ ,
+ 0x28, 0x36, 0x29 /* offset 2464 */ ,
+ 0x28, 0x37, 0x29 /* offset 2467 */ ,
+ 0x28, 0x38, 0x29 /* offset 2470 */ ,
+ 0x28, 0x39, 0x29 /* offset 2473 */ ,
+ 0x28, 0x31, 0x30, 0x29 /* offset 2476 */ ,
+ 0x28, 0x31, 0x31, 0x29 /* offset 2480 */ ,
+ 0x28, 0x31, 0x32, 0x29 /* offset 2484 */ ,
+ 0x28, 0x31, 0x33, 0x29 /* offset 2488 */ ,
+ 0x28, 0x31, 0x34, 0x29 /* offset 2492 */ ,
+ 0x28, 0x31, 0x35, 0x29 /* offset 2496 */ ,
+ 0x28, 0x31, 0x36, 0x29 /* offset 2500 */ ,
+ 0x28, 0x31, 0x37, 0x29 /* offset 2504 */ ,
+ 0x28, 0x31, 0x38, 0x29 /* offset 2508 */ ,
+ 0x28, 0x31, 0x39, 0x29 /* offset 2512 */ ,
+ 0x28, 0x32, 0x30, 0x29 /* offset 2516 */ ,
+ 0x31, 0x2e /* offset 2520 */ ,
+ 0x32, 0x2e /* offset 2522 */ ,
+ 0x33, 0x2e /* offset 2524 */ ,
+ 0x34, 0x2e /* offset 2526 */ ,
+ 0x35, 0x2e /* offset 2528 */ ,
+ 0x36, 0x2e /* offset 2530 */ ,
+ 0x37, 0x2e /* offset 2532 */ ,
+ 0x38, 0x2e /* offset 2534 */ ,
+ 0x39, 0x2e /* offset 2536 */ ,
+ 0x31, 0x30, 0x2e /* offset 2538 */ ,
+ 0x31, 0x31, 0x2e /* offset 2541 */ ,
+ 0x31, 0x32, 0x2e /* offset 2544 */ ,
+ 0x31, 0x33, 0x2e /* offset 2547 */ ,
+ 0x31, 0x34, 0x2e /* offset 2550 */ ,
+ 0x31, 0x35, 0x2e /* offset 2553 */ ,
+ 0x31, 0x36, 0x2e /* offset 2556 */ ,
+ 0x31, 0x37, 0x2e /* offset 2559 */ ,
+ 0x31, 0x38, 0x2e /* offset 2562 */ ,
+ 0x31, 0x39, 0x2e /* offset 2565 */ ,
+ 0x32, 0x30, 0x2e /* offset 2568 */ ,
+ 0x28, 0x61, 0x29 /* offset 2571 */ ,
+ 0x28, 0x62, 0x29 /* offset 2574 */ ,
+ 0x28, 0x63, 0x29 /* offset 2577 */ ,
+ 0x28, 0x64, 0x29 /* offset 2580 */ ,
+ 0x28, 0x65, 0x29 /* offset 2583 */ ,
+ 0x28, 0x66, 0x29 /* offset 2586 */ ,
+ 0x28, 0x67, 0x29 /* offset 2589 */ ,
+ 0x28, 0x68, 0x29 /* offset 2592 */ ,
+ 0x28, 0x69, 0x29 /* offset 2595 */ ,
+ 0x28, 0x6a, 0x29 /* offset 2598 */ ,
+ 0x28, 0x6b, 0x29 /* offset 2601 */ ,
+ 0x28, 0x6c, 0x29 /* offset 2604 */ ,
+ 0x28, 0x6d, 0x29 /* offset 2607 */ ,
+ 0x28, 0x6e, 0x29 /* offset 2610 */ ,
+ 0x28, 0x6f, 0x29 /* offset 2613 */ ,
+ 0x28, 0x70, 0x29 /* offset 2616 */ ,
+ 0x28, 0x71, 0x29 /* offset 2619 */ ,
+ 0x28, 0x72, 0x29 /* offset 2622 */ ,
+ 0x28, 0x73, 0x29 /* offset 2625 */ ,
+ 0x28, 0x74, 0x29 /* offset 2628 */ ,
+ 0x28, 0x75, 0x29 /* offset 2631 */ ,
+ 0x28, 0x76, 0x29 /* offset 2634 */ ,
+ 0x28, 0x77, 0x29 /* offset 2637 */ ,
+ 0x28, 0x78, 0x29 /* offset 2640 */ ,
+ 0x28, 0x79, 0x29 /* offset 2643 */ ,
+ 0x28, 0x7a, 0x29 /* offset 2646 */ ,
+ 0x41 /* offset 2649 */ ,
+ 0x47 /* offset 2650 */ ,
+ 0x4a /* offset 2651 */ ,
+ 0x4f /* offset 2652 */ ,
+ 0x53 /* offset 2653 */ ,
+ 0x54 /* offset 2654 */ ,
+ 0x55 /* offset 2655 */ ,
+ 0x57 /* offset 2656 */ ,
+ 0x59 /* offset 2657 */ ,
+ 0x62 /* offset 2658 */ ,
+ 0x66 /* offset 2659 */ ,
+ 0x6b /* offset 2660 */ ,
+ 0x70 /* offset 2661 */ ,
+ 0x71 /* offset 2662 */ ,
+ 0x74 /* offset 2663 */ ,
+ 0x75 /* offset 2664 */ ,
+ 0x7a /* offset 2665 */ ,
+ 0x222b, 0x222b, 0x222b, 0x222b /* offset 2666 */ ,
+ 0x3a, 0x3a, 0x3d /* offset 2670 */ ,
+ 0x3d, 0x3d /* offset 2673 */ ,
+ 0x3d, 0x3d, 0x3d /* offset 2675 */ ,
+ 0x2add, 0x338 /* offset 2678 */ ,
+ 0x6bcd /* offset 2680 */ ,
+ 0x9f9f /* offset 2681 */ ,
+ 0x4e00 /* offset 2682 */ ,
+ 0x4e28 /* offset 2683 */ ,
+ 0x4e36 /* offset 2684 */ ,
+ 0x4e3f /* offset 2685 */ ,
+ 0x4e59 /* offset 2686 */ ,
+ 0x4e85 /* offset 2687 */ ,
+ 0x4e8c /* offset 2688 */ ,
+ 0x4ea0 /* offset 2689 */ ,
+ 0x4eba /* offset 2690 */ ,
+ 0x513f /* offset 2691 */ ,
+ 0x5165 /* offset 2692 */ ,
+ 0x516b /* offset 2693 */ ,
+ 0x5182 /* offset 2694 */ ,
+ 0x5196 /* offset 2695 */ ,
+ 0x51ab /* offset 2696 */ ,
+ 0x51e0 /* offset 2697 */ ,
+ 0x51f5 /* offset 2698 */ ,
+ 0x5200 /* offset 2699 */ ,
+ 0x529b /* offset 2700 */ ,
+ 0x52f9 /* offset 2701 */ ,
+ 0x5315 /* offset 2702 */ ,
+ 0x531a /* offset 2703 */ ,
+ 0x5338 /* offset 2704 */ ,
+ 0x5341 /* offset 2705 */ ,
+ 0x535c /* offset 2706 */ ,
+ 0x5369 /* offset 2707 */ ,
+ 0x5382 /* offset 2708 */ ,
+ 0x53b6 /* offset 2709 */ ,
+ 0x53c8 /* offset 2710 */ ,
+ 0x53e3 /* offset 2711 */ ,
+ 0x56d7 /* offset 2712 */ ,
+ 0x571f /* offset 2713 */ ,
+ 0x58eb /* offset 2714 */ ,
+ 0x5902 /* offset 2715 */ ,
+ 0x590a /* offset 2716 */ ,
+ 0x5915 /* offset 2717 */ ,
+ 0x5927 /* offset 2718 */ ,
+ 0x5973 /* offset 2719 */ ,
+ 0x5b50 /* offset 2720 */ ,
+ 0x5b80 /* offset 2721 */ ,
+ 0x5bf8 /* offset 2722 */ ,
+ 0x5c0f /* offset 2723 */ ,
+ 0x5c22 /* offset 2724 */ ,
+ 0x5c38 /* offset 2725 */ ,
+ 0x5c6e /* offset 2726 */ ,
+ 0x5c71 /* offset 2727 */ ,
+ 0x5ddb /* offset 2728 */ ,
+ 0x5de5 /* offset 2729 */ ,
+ 0x5df1 /* offset 2730 */ ,
+ 0x5dfe /* offset 2731 */ ,
+ 0x5e72 /* offset 2732 */ ,
+ 0x5e7a /* offset 2733 */ ,
+ 0x5e7f /* offset 2734 */ ,
+ 0x5ef4 /* offset 2735 */ ,
+ 0x5efe /* offset 2736 */ ,
+ 0x5f0b /* offset 2737 */ ,
+ 0x5f13 /* offset 2738 */ ,
+ 0x5f50 /* offset 2739 */ ,
+ 0x5f61 /* offset 2740 */ ,
+ 0x5f73 /* offset 2741 */ ,
+ 0x5fc3 /* offset 2742 */ ,
+ 0x6208 /* offset 2743 */ ,
+ 0x6236 /* offset 2744 */ ,
+ 0x624b /* offset 2745 */ ,
+ 0x652f /* offset 2746 */ ,
+ 0x6534 /* offset 2747 */ ,
+ 0x6587 /* offset 2748 */ ,
+ 0x6597 /* offset 2749 */ ,
+ 0x65a4 /* offset 2750 */ ,
+ 0x65b9 /* offset 2751 */ ,
+ 0x65e0 /* offset 2752 */ ,
+ 0x65e5 /* offset 2753 */ ,
+ 0x66f0 /* offset 2754 */ ,
+ 0x6708 /* offset 2755 */ ,
+ 0x6728 /* offset 2756 */ ,
+ 0x6b20 /* offset 2757 */ ,
+ 0x6b62 /* offset 2758 */ ,
+ 0x6b79 /* offset 2759 */ ,
+ 0x6bb3 /* offset 2760 */ ,
+ 0x6bcb /* offset 2761 */ ,
+ 0x6bd4 /* offset 2762 */ ,
+ 0x6bdb /* offset 2763 */ ,
+ 0x6c0f /* offset 2764 */ ,
+ 0x6c14 /* offset 2765 */ ,
+ 0x6c34 /* offset 2766 */ ,
+ 0x706b /* offset 2767 */ ,
+ 0x722a /* offset 2768 */ ,
+ 0x7236 /* offset 2769 */ ,
+ 0x723b /* offset 2770 */ ,
+ 0x723f /* offset 2771 */ ,
+ 0x7247 /* offset 2772 */ ,
+ 0x7259 /* offset 2773 */ ,
+ 0x725b /* offset 2774 */ ,
+ 0x72ac /* offset 2775 */ ,
+ 0x7384 /* offset 2776 */ ,
+ 0x7389 /* offset 2777 */ ,
+ 0x74dc /* offset 2778 */ ,
+ 0x74e6 /* offset 2779 */ ,
+ 0x7518 /* offset 2780 */ ,
+ 0x751f /* offset 2781 */ ,
+ 0x7528 /* offset 2782 */ ,
+ 0x7530 /* offset 2783 */ ,
+ 0x758b /* offset 2784 */ ,
+ 0x7592 /* offset 2785 */ ,
+ 0x7676 /* offset 2786 */ ,
+ 0x767d /* offset 2787 */ ,
+ 0x76ae /* offset 2788 */ ,
+ 0x76bf /* offset 2789 */ ,
+ 0x76ee /* offset 2790 */ ,
+ 0x77db /* offset 2791 */ ,
+ 0x77e2 /* offset 2792 */ ,
+ 0x77f3 /* offset 2793 */ ,
+ 0x793a /* offset 2794 */ ,
+ 0x79b8 /* offset 2795 */ ,
+ 0x79be /* offset 2796 */ ,
+ 0x7a74 /* offset 2797 */ ,
+ 0x7acb /* offset 2798 */ ,
+ 0x7af9 /* offset 2799 */ ,
+ 0x7c73 /* offset 2800 */ ,
+ 0x7cf8 /* offset 2801 */ ,
+ 0x7f36 /* offset 2802 */ ,
+ 0x7f51 /* offset 2803 */ ,
+ 0x7f8a /* offset 2804 */ ,
+ 0x7fbd /* offset 2805 */ ,
+ 0x8001 /* offset 2806 */ ,
+ 0x800c /* offset 2807 */ ,
+ 0x8012 /* offset 2808 */ ,
+ 0x8033 /* offset 2809 */ ,
+ 0x807f /* offset 2810 */ ,
+ 0x8089 /* offset 2811 */ ,
+ 0x81e3 /* offset 2812 */ ,
+ 0x81ea /* offset 2813 */ ,
+ 0x81f3 /* offset 2814 */ ,
+ 0x81fc /* offset 2815 */ ,
+ 0x820c /* offset 2816 */ ,
+ 0x821b /* offset 2817 */ ,
+ 0x821f /* offset 2818 */ ,
+ 0x826e /* offset 2819 */ ,
+ 0x8272 /* offset 2820 */ ,
+ 0x8278 /* offset 2821 */ ,
+ 0x864d /* offset 2822 */ ,
+ 0x866b /* offset 2823 */ ,
+ 0x8840 /* offset 2824 */ ,
+ 0x884c /* offset 2825 */ ,
+ 0x8863 /* offset 2826 */ ,
+ 0x897e /* offset 2827 */ ,
+ 0x898b /* offset 2828 */ ,
+ 0x89d2 /* offset 2829 */ ,
+ 0x8a00 /* offset 2830 */ ,
+ 0x8c37 /* offset 2831 */ ,
+ 0x8c46 /* offset 2832 */ ,
+ 0x8c55 /* offset 2833 */ ,
+ 0x8c78 /* offset 2834 */ ,
+ 0x8c9d /* offset 2835 */ ,
+ 0x8d64 /* offset 2836 */ ,
+ 0x8d70 /* offset 2837 */ ,
+ 0x8db3 /* offset 2838 */ ,
+ 0x8eab /* offset 2839 */ ,
+ 0x8eca /* offset 2840 */ ,
+ 0x8f9b /* offset 2841 */ ,
+ 0x8fb0 /* offset 2842 */ ,
+ 0x8fb5 /* offset 2843 */ ,
+ 0x9091 /* offset 2844 */ ,
+ 0x9149 /* offset 2845 */ ,
+ 0x91c6 /* offset 2846 */ ,
+ 0x91cc /* offset 2847 */ ,
+ 0x91d1 /* offset 2848 */ ,
+ 0x9577 /* offset 2849 */ ,
+ 0x9580 /* offset 2850 */ ,
+ 0x961c /* offset 2851 */ ,
+ 0x96b6 /* offset 2852 */ ,
+ 0x96b9 /* offset 2853 */ ,
+ 0x96e8 /* offset 2854 */ ,
+ 0x9751 /* offset 2855 */ ,
+ 0x975e /* offset 2856 */ ,
+ 0x9762 /* offset 2857 */ ,
+ 0x9769 /* offset 2858 */ ,
+ 0x97cb /* offset 2859 */ ,
+ 0x97ed /* offset 2860 */ ,
+ 0x97f3 /* offset 2861 */ ,
+ 0x9801 /* offset 2862 */ ,
+ 0x98a8 /* offset 2863 */ ,
+ 0x98db /* offset 2864 */ ,
+ 0x98df /* offset 2865 */ ,
+ 0x9996 /* offset 2866 */ ,
+ 0x9999 /* offset 2867 */ ,
+ 0x99ac /* offset 2868 */ ,
+ 0x9aa8 /* offset 2869 */ ,
+ 0x9ad8 /* offset 2870 */ ,
+ 0x9adf /* offset 2871 */ ,
+ 0x9b25 /* offset 2872 */ ,
+ 0x9b2f /* offset 2873 */ ,
+ 0x9b32 /* offset 2874 */ ,
+ 0x9b3c /* offset 2875 */ ,
+ 0x9b5a /* offset 2876 */ ,
+ 0x9ce5 /* offset 2877 */ ,
+ 0x9e75 /* offset 2878 */ ,
+ 0x9e7f /* offset 2879 */ ,
+ 0x9ea5 /* offset 2880 */ ,
+ 0x9ebb /* offset 2881 */ ,
+ 0x9ec3 /* offset 2882 */ ,
+ 0x9ecd /* offset 2883 */ ,
+ 0x9ed1 /* offset 2884 */ ,
+ 0x9ef9 /* offset 2885 */ ,
+ 0x9efd /* offset 2886 */ ,
+ 0x9f0e /* offset 2887 */ ,
+ 0x9f13 /* offset 2888 */ ,
+ 0x9f20 /* offset 2889 */ ,
+ 0x9f3b /* offset 2890 */ ,
+ 0x9f4a /* offset 2891 */ ,
+ 0x9f52 /* offset 2892 */ ,
+ 0x9f8d /* offset 2893 */ ,
+ 0x9f9c /* offset 2894 */ ,
+ 0x9fa0 /* offset 2895 */ ,
+ 0x3012 /* offset 2896 */ ,
+ 0x5344 /* offset 2897 */ ,
+ 0x5345 /* offset 2898 */ ,
+ 0x304b, 0x3099 /* offset 2899 */ ,
+ 0x304d, 0x3099 /* offset 2901 */ ,
+ 0x304f, 0x3099 /* offset 2903 */ ,
+ 0x3051, 0x3099 /* offset 2905 */ ,
+ 0x3053, 0x3099 /* offset 2907 */ ,
+ 0x3055, 0x3099 /* offset 2909 */ ,
+ 0x3057, 0x3099 /* offset 2911 */ ,
+ 0x3059, 0x3099 /* offset 2913 */ ,
+ 0x305b, 0x3099 /* offset 2915 */ ,
+ 0x305d, 0x3099 /* offset 2917 */ ,
+ 0x305f, 0x3099 /* offset 2919 */ ,
+ 0x3061, 0x3099 /* offset 2921 */ ,
+ 0x3064, 0x3099 /* offset 2923 */ ,
+ 0x3066, 0x3099 /* offset 2925 */ ,
+ 0x3068, 0x3099 /* offset 2927 */ ,
+ 0x306f, 0x3099 /* offset 2929 */ ,
+ 0x306f, 0x309a /* offset 2931 */ ,
+ 0x3072, 0x3099 /* offset 2933 */ ,
+ 0x3072, 0x309a /* offset 2935 */ ,
+ 0x3075, 0x3099 /* offset 2937 */ ,
+ 0x3075, 0x309a /* offset 2939 */ ,
+ 0x3078, 0x3099 /* offset 2941 */ ,
+ 0x3078, 0x309a /* offset 2943 */ ,
+ 0x307b, 0x3099 /* offset 2945 */ ,
+ 0x307b, 0x309a /* offset 2947 */ ,
+ 0x3046, 0x3099 /* offset 2949 */ ,
+ 0x20, 0x3099 /* offset 2951 */ ,
+ 0x20, 0x309a /* offset 2953 */ ,
+ 0x309d, 0x3099 /* offset 2955 */ ,
+ 0x3088, 0x308a /* offset 2957 */ ,
+ 0x30ab, 0x3099 /* offset 2959 */ ,
+ 0x30ad, 0x3099 /* offset 2961 */ ,
+ 0x30af, 0x3099 /* offset 2963 */ ,
+ 0x30b1, 0x3099 /* offset 2965 */ ,
+ 0x30b3, 0x3099 /* offset 2967 */ ,
+ 0x30b5, 0x3099 /* offset 2969 */ ,
+ 0x30b7, 0x3099 /* offset 2971 */ ,
+ 0x30b9, 0x3099 /* offset 2973 */ ,
+ 0x30bb, 0x3099 /* offset 2975 */ ,
+ 0x30bd, 0x3099 /* offset 2977 */ ,
+ 0x30bf, 0x3099 /* offset 2979 */ ,
+ 0x30c1, 0x3099 /* offset 2981 */ ,
+ 0x30c4, 0x3099 /* offset 2983 */ ,
+ 0x30c6, 0x3099 /* offset 2985 */ ,
+ 0x30c8, 0x3099 /* offset 2987 */ ,
+ 0x30cf, 0x3099 /* offset 2989 */ ,
+ 0x30cf, 0x309a /* offset 2991 */ ,
+ 0x30d2, 0x3099 /* offset 2993 */ ,
+ 0x30d2, 0x309a /* offset 2995 */ ,
+ 0x30d5, 0x3099 /* offset 2997 */ ,
+ 0x30d5, 0x309a /* offset 2999 */ ,
+ 0x30d8, 0x3099 /* offset 3001 */ ,
+ 0x30d8, 0x309a /* offset 3003 */ ,
+ 0x30db, 0x3099 /* offset 3005 */ ,
+ 0x30db, 0x309a /* offset 3007 */ ,
+ 0x30a6, 0x3099 /* offset 3009 */ ,
+ 0x30ef, 0x3099 /* offset 3011 */ ,
+ 0x30f0, 0x3099 /* offset 3013 */ ,
+ 0x30f1, 0x3099 /* offset 3015 */ ,
+ 0x30f2, 0x3099 /* offset 3017 */ ,
+ 0x30fd, 0x3099 /* offset 3019 */ ,
+ 0x30b3, 0x30c8 /* offset 3021 */ ,
+ 0x1100 /* offset 3023 */ ,
+ 0x1101 /* offset 3024 */ ,
+ 0x11aa /* offset 3025 */ ,
+ 0x1102 /* offset 3026 */ ,
+ 0x11ac /* offset 3027 */ ,
+ 0x11ad /* offset 3028 */ ,
+ 0x1103 /* offset 3029 */ ,
+ 0x1104 /* offset 3030 */ ,
+ 0x1105 /* offset 3031 */ ,
+ 0x11b0 /* offset 3032 */ ,
+ 0x11b1 /* offset 3033 */ ,
+ 0x11b2 /* offset 3034 */ ,
+ 0x11b3 /* offset 3035 */ ,
+ 0x11b4 /* offset 3036 */ ,
+ 0x11b5 /* offset 3037 */ ,
+ 0x111a /* offset 3038 */ ,
+ 0x1106 /* offset 3039 */ ,
+ 0x1107 /* offset 3040 */ ,
+ 0x1108 /* offset 3041 */ ,
+ 0x1121 /* offset 3042 */ ,
+ 0x1109 /* offset 3043 */ ,
+ 0x110a /* offset 3044 */ ,
+ 0x110b /* offset 3045 */ ,
+ 0x110c /* offset 3046 */ ,
+ 0x110d /* offset 3047 */ ,
+ 0x110e /* offset 3048 */ ,
+ 0x110f /* offset 3049 */ ,
+ 0x1110 /* offset 3050 */ ,
+ 0x1111 /* offset 3051 */ ,
+ 0x1112 /* offset 3052 */ ,
+ 0x1161 /* offset 3053 */ ,
+ 0x1162 /* offset 3054 */ ,
+ 0x1163 /* offset 3055 */ ,
+ 0x1164 /* offset 3056 */ ,
+ 0x1165 /* offset 3057 */ ,
+ 0x1166 /* offset 3058 */ ,
+ 0x1167 /* offset 3059 */ ,
+ 0x1168 /* offset 3060 */ ,
+ 0x1169 /* offset 3061 */ ,
+ 0x116a /* offset 3062 */ ,
+ 0x116b /* offset 3063 */ ,
+ 0x116c /* offset 3064 */ ,
+ 0x116d /* offset 3065 */ ,
+ 0x116e /* offset 3066 */ ,
+ 0x116f /* offset 3067 */ ,
+ 0x1170 /* offset 3068 */ ,
+ 0x1171 /* offset 3069 */ ,
+ 0x1172 /* offset 3070 */ ,
+ 0x1173 /* offset 3071 */ ,
+ 0x1174 /* offset 3072 */ ,
+ 0x1175 /* offset 3073 */ ,
+ 0x1160 /* offset 3074 */ ,
+ 0x1114 /* offset 3075 */ ,
+ 0x1115 /* offset 3076 */ ,
+ 0x11c7 /* offset 3077 */ ,
+ 0x11c8 /* offset 3078 */ ,
+ 0x11cc /* offset 3079 */ ,
+ 0x11ce /* offset 3080 */ ,
+ 0x11d3 /* offset 3081 */ ,
+ 0x11d7 /* offset 3082 */ ,
+ 0x11d9 /* offset 3083 */ ,
+ 0x111c /* offset 3084 */ ,
+ 0x11dd /* offset 3085 */ ,
+ 0x11df /* offset 3086 */ ,
+ 0x111d /* offset 3087 */ ,
+ 0x111e /* offset 3088 */ ,
+ 0x1120 /* offset 3089 */ ,
+ 0x1122 /* offset 3090 */ ,
+ 0x1123 /* offset 3091 */ ,
+ 0x1127 /* offset 3092 */ ,
+ 0x1129 /* offset 3093 */ ,
+ 0x112b /* offset 3094 */ ,
+ 0x112c /* offset 3095 */ ,
+ 0x112d /* offset 3096 */ ,
+ 0x112e /* offset 3097 */ ,
+ 0x112f /* offset 3098 */ ,
+ 0x1132 /* offset 3099 */ ,
+ 0x1136 /* offset 3100 */ ,
+ 0x1140 /* offset 3101 */ ,
+ 0x1147 /* offset 3102 */ ,
+ 0x114c /* offset 3103 */ ,
+ 0x11f1 /* offset 3104 */ ,
+ 0x11f2 /* offset 3105 */ ,
+ 0x1157 /* offset 3106 */ ,
+ 0x1158 /* offset 3107 */ ,
+ 0x1159 /* offset 3108 */ ,
+ 0x1184 /* offset 3109 */ ,
+ 0x1185 /* offset 3110 */ ,
+ 0x1188 /* offset 3111 */ ,
+ 0x1191 /* offset 3112 */ ,
+ 0x1192 /* offset 3113 */ ,
+ 0x1194 /* offset 3114 */ ,
+ 0x119e /* offset 3115 */ ,
+ 0x11a1 /* offset 3116 */ ,
+ 0x4e09 /* offset 3117 */ ,
+ 0x56db /* offset 3118 */ ,
+ 0x4e0a /* offset 3119 */ ,
+ 0x4e2d /* offset 3120 */ ,
+ 0x4e0b /* offset 3121 */ ,
+ 0x7532 /* offset 3122 */ ,
+ 0x4e19 /* offset 3123 */ ,
+ 0x4e01 /* offset 3124 */ ,
+ 0x5929 /* offset 3125 */ ,
+ 0x5730 /* offset 3126 */ ,
+ 0x28, 0x1100, 0x29 /* offset 3127 */ ,
+ 0x28, 0x1102, 0x29 /* offset 3130 */ ,
+ 0x28, 0x1103, 0x29 /* offset 3133 */ ,
+ 0x28, 0x1105, 0x29 /* offset 3136 */ ,
+ 0x28, 0x1106, 0x29 /* offset 3139 */ ,
+ 0x28, 0x1107, 0x29 /* offset 3142 */ ,
+ 0x28, 0x1109, 0x29 /* offset 3145 */ ,
+ 0x28, 0x110b, 0x29 /* offset 3148 */ ,
+ 0x28, 0x110c, 0x29 /* offset 3151 */ ,
+ 0x28, 0x110e, 0x29 /* offset 3154 */ ,
+ 0x28, 0x110f, 0x29 /* offset 3157 */ ,
+ 0x28, 0x1110, 0x29 /* offset 3160 */ ,
+ 0x28, 0x1111, 0x29 /* offset 3163 */ ,
+ 0x28, 0x1112, 0x29 /* offset 3166 */ ,
+ 0x28, 0x1100, 0x1161, 0x29 /* offset 3169 */ ,
+ 0x28, 0x1102, 0x1161, 0x29 /* offset 3173 */ ,
+ 0x28, 0x1103, 0x1161, 0x29 /* offset 3177 */ ,
+ 0x28, 0x1105, 0x1161, 0x29 /* offset 3181 */ ,
+ 0x28, 0x1106, 0x1161, 0x29 /* offset 3185 */ ,
+ 0x28, 0x1107, 0x1161, 0x29 /* offset 3189 */ ,
+ 0x28, 0x1109, 0x1161, 0x29 /* offset 3193 */ ,
+ 0x28, 0x110b, 0x1161, 0x29 /* offset 3197 */ ,
+ 0x28, 0x110c, 0x1161, 0x29 /* offset 3201 */ ,
+ 0x28, 0x110e, 0x1161, 0x29 /* offset 3205 */ ,
+ 0x28, 0x110f, 0x1161, 0x29 /* offset 3209 */ ,
+ 0x28, 0x1110, 0x1161, 0x29 /* offset 3213 */ ,
+ 0x28, 0x1111, 0x1161, 0x29 /* offset 3217 */ ,
+ 0x28, 0x1112, 0x1161, 0x29 /* offset 3221 */ ,
+ 0x28, 0x110c, 0x116e, 0x29 /* offset 3225 */ ,
+ 0x28, 0x4e00, 0x29 /* offset 3229 */ ,
+ 0x28, 0x4e8c, 0x29 /* offset 3232 */ ,
+ 0x28, 0x4e09, 0x29 /* offset 3235 */ ,
+ 0x28, 0x56db, 0x29 /* offset 3238 */ ,
+ 0x28, 0x4e94, 0x29 /* offset 3241 */ ,
+ 0x28, 0x516d, 0x29 /* offset 3244 */ ,
+ 0x28, 0x4e03, 0x29 /* offset 3247 */ ,
+ 0x28, 0x516b, 0x29 /* offset 3250 */ ,
+ 0x28, 0x4e5d, 0x29 /* offset 3253 */ ,
+ 0x28, 0x5341, 0x29 /* offset 3256 */ ,
+ 0x28, 0x6708, 0x29 /* offset 3259 */ ,
+ 0x28, 0x706b, 0x29 /* offset 3262 */ ,
+ 0x28, 0x6c34, 0x29 /* offset 3265 */ ,
+ 0x28, 0x6728, 0x29 /* offset 3268 */ ,
+ 0x28, 0x91d1, 0x29 /* offset 3271 */ ,
+ 0x28, 0x571f, 0x29 /* offset 3274 */ ,
+ 0x28, 0x65e5, 0x29 /* offset 3277 */ ,
+ 0x28, 0x682a, 0x29 /* offset 3280 */ ,
+ 0x28, 0x6709, 0x29 /* offset 3283 */ ,
+ 0x28, 0x793e, 0x29 /* offset 3286 */ ,
+ 0x28, 0x540d, 0x29 /* offset 3289 */ ,
+ 0x28, 0x7279, 0x29 /* offset 3292 */ ,
+ 0x28, 0x8ca1, 0x29 /* offset 3295 */ ,
+ 0x28, 0x795d, 0x29 /* offset 3298 */ ,
+ 0x28, 0x52b4, 0x29 /* offset 3301 */ ,
+ 0x28, 0x4ee3, 0x29 /* offset 3304 */ ,
+ 0x28, 0x547c, 0x29 /* offset 3307 */ ,
+ 0x28, 0x5b66, 0x29 /* offset 3310 */ ,
+ 0x28, 0x76e3, 0x29 /* offset 3313 */ ,
+ 0x28, 0x4f01, 0x29 /* offset 3316 */ ,
+ 0x28, 0x8cc7, 0x29 /* offset 3319 */ ,
+ 0x28, 0x5354, 0x29 /* offset 3322 */ ,
+ 0x28, 0x796d, 0x29 /* offset 3325 */ ,
+ 0x28, 0x4f11, 0x29 /* offset 3328 */ ,
+ 0x28, 0x81ea, 0x29 /* offset 3331 */ ,
+ 0x28, 0x81f3, 0x29 /* offset 3334 */ ,
+ 0x32, 0x31 /* offset 3337 */ ,
+ 0x32, 0x32 /* offset 3339 */ ,
+ 0x32, 0x33 /* offset 3341 */ ,
+ 0x32, 0x34 /* offset 3343 */ ,
+ 0x32, 0x35 /* offset 3345 */ ,
+ 0x32, 0x36 /* offset 3347 */ ,
+ 0x32, 0x37 /* offset 3349 */ ,
+ 0x32, 0x38 /* offset 3351 */ ,
+ 0x32, 0x39 /* offset 3353 */ ,
+ 0x33, 0x30 /* offset 3355 */ ,
+ 0x33, 0x31 /* offset 3357 */ ,
+ 0x33, 0x32 /* offset 3359 */ ,
+ 0x33, 0x33 /* offset 3361 */ ,
+ 0x33, 0x34 /* offset 3363 */ ,
+ 0x33, 0x35 /* offset 3365 */ ,
+ 0x1100, 0x1161 /* offset 3367 */ ,
+ 0x1102, 0x1161 /* offset 3369 */ ,
+ 0x1103, 0x1161 /* offset 3371 */ ,
+ 0x1105, 0x1161 /* offset 3373 */ ,
+ 0x1106, 0x1161 /* offset 3375 */ ,
+ 0x1107, 0x1161 /* offset 3377 */ ,
+ 0x1109, 0x1161 /* offset 3379 */ ,
+ 0x110b, 0x1161 /* offset 3381 */ ,
+ 0x110c, 0x1161 /* offset 3383 */ ,
+ 0x110e, 0x1161 /* offset 3385 */ ,
+ 0x110f, 0x1161 /* offset 3387 */ ,
+ 0x1110, 0x1161 /* offset 3389 */ ,
+ 0x1111, 0x1161 /* offset 3391 */ ,
+ 0x1112, 0x1161 /* offset 3393 */ ,
+ 0x4e94 /* offset 3395 */ ,
+ 0x516d /* offset 3396 */ ,
+ 0x4e03 /* offset 3397 */ ,
+ 0x4e5d /* offset 3398 */ ,
+ 0x682a /* offset 3399 */ ,
+ 0x6709 /* offset 3400 */ ,
+ 0x793e /* offset 3401 */ ,
+ 0x540d /* offset 3402 */ ,
+ 0x7279 /* offset 3403 */ ,
+ 0x8ca1 /* offset 3404 */ ,
+ 0x795d /* offset 3405 */ ,
+ 0x52b4 /* offset 3406 */ ,
+ 0x79d8 /* offset 3407 */ ,
+ 0x7537 /* offset 3408 */ ,
+ 0x9069 /* offset 3409 */ ,
+ 0x512a /* offset 3410 */ ,
+ 0x5370 /* offset 3411 */ ,
+ 0x6ce8 /* offset 3412 */ ,
+ 0x9805 /* offset 3413 */ ,
+ 0x4f11 /* offset 3414 */ ,
+ 0x5199 /* offset 3415 */ ,
+ 0x6b63 /* offset 3416 */ ,
+ 0x5de6 /* offset 3417 */ ,
+ 0x53f3 /* offset 3418 */ ,
+ 0x533b /* offset 3419 */ ,
+ 0x5b97 /* offset 3420 */ ,
+ 0x5b66 /* offset 3421 */ ,
+ 0x76e3 /* offset 3422 */ ,
+ 0x4f01 /* offset 3423 */ ,
+ 0x8cc7 /* offset 3424 */ ,
+ 0x5354 /* offset 3425 */ ,
+ 0x591c /* offset 3426 */ ,
+ 0x33, 0x36 /* offset 3427 */ ,
+ 0x33, 0x37 /* offset 3429 */ ,
+ 0x33, 0x38 /* offset 3431 */ ,
+ 0x33, 0x39 /* offset 3433 */ ,
+ 0x34, 0x30 /* offset 3435 */ ,
+ 0x34, 0x31 /* offset 3437 */ ,
+ 0x34, 0x32 /* offset 3439 */ ,
+ 0x34, 0x33 /* offset 3441 */ ,
+ 0x34, 0x34 /* offset 3443 */ ,
+ 0x34, 0x35 /* offset 3445 */ ,
+ 0x34, 0x36 /* offset 3447 */ ,
+ 0x34, 0x37 /* offset 3449 */ ,
+ 0x34, 0x38 /* offset 3451 */ ,
+ 0x34, 0x39 /* offset 3453 */ ,
+ 0x35, 0x30 /* offset 3455 */ ,
+ 0x31, 0x6708 /* offset 3457 */ ,
+ 0x32, 0x6708 /* offset 3459 */ ,
+ 0x33, 0x6708 /* offset 3461 */ ,
+ 0x34, 0x6708 /* offset 3463 */ ,
+ 0x35, 0x6708 /* offset 3465 */ ,
+ 0x36, 0x6708 /* offset 3467 */ ,
+ 0x37, 0x6708 /* offset 3469 */ ,
+ 0x38, 0x6708 /* offset 3471 */ ,
+ 0x39, 0x6708 /* offset 3473 */ ,
+ 0x31, 0x30, 0x6708 /* offset 3475 */ ,
+ 0x31, 0x31, 0x6708 /* offset 3478 */ ,
+ 0x31, 0x32, 0x6708 /* offset 3481 */ ,
+ 0x30a2 /* offset 3484 */ ,
+ 0x30a4 /* offset 3485 */ ,
+ 0x30a6 /* offset 3486 */ ,
+ 0x30a8 /* offset 3487 */ ,
+ 0x30aa /* offset 3488 */ ,
+ 0x30ab /* offset 3489 */ ,
+ 0x30ad /* offset 3490 */ ,
+ 0x30af /* offset 3491 */ ,
+ 0x30b1 /* offset 3492 */ ,
+ 0x30b3 /* offset 3493 */ ,
+ 0x30b5 /* offset 3494 */ ,
+ 0x30b7 /* offset 3495 */ ,
+ 0x30b9 /* offset 3496 */ ,
+ 0x30bb /* offset 3497 */ ,
+ 0x30bd /* offset 3498 */ ,
+ 0x30bf /* offset 3499 */ ,
+ 0x30c1 /* offset 3500 */ ,
+ 0x30c4 /* offset 3501 */ ,
+ 0x30c6 /* offset 3502 */ ,
+ 0x30c8 /* offset 3503 */ ,
+ 0x30ca /* offset 3504 */ ,
+ 0x30cb /* offset 3505 */ ,
+ 0x30cc /* offset 3506 */ ,
+ 0x30cd /* offset 3507 */ ,
+ 0x30ce /* offset 3508 */ ,
+ 0x30cf /* offset 3509 */ ,
+ 0x30d2 /* offset 3510 */ ,
+ 0x30d5 /* offset 3511 */ ,
+ 0x30d8 /* offset 3512 */ ,
+ 0x30db /* offset 3513 */ ,
+ 0x30de /* offset 3514 */ ,
+ 0x30df /* offset 3515 */ ,
+ 0x30e0 /* offset 3516 */ ,
+ 0x30e1 /* offset 3517 */ ,
+ 0x30e2 /* offset 3518 */ ,
+ 0x30e4 /* offset 3519 */ ,
+ 0x30e6 /* offset 3520 */ ,
+ 0x30e8 /* offset 3521 */ ,
+ 0x30e9 /* offset 3522 */ ,
+ 0x30ea /* offset 3523 */ ,
+ 0x30eb /* offset 3524 */ ,
+ 0x30ec /* offset 3525 */ ,
+ 0x30ed /* offset 3526 */ ,
+ 0x30ef /* offset 3527 */ ,
+ 0x30f0 /* offset 3528 */ ,
+ 0x30f1 /* offset 3529 */ ,
+ 0x30f2 /* offset 3530 */ ,
+ 0x30a2, 0x30cf, 0x309a, 0x30fc, 0x30c8 /* offset 3531 */ ,
+ 0x30a2, 0x30eb, 0x30d5, 0x30a1 /* offset 3536 */ ,
+ 0x30a2, 0x30f3, 0x30d8, 0x309a, 0x30a2 /* offset 3540 */ ,
+ 0x30a2, 0x30fc, 0x30eb /* offset 3545 */ ,
+ 0x30a4, 0x30cb, 0x30f3, 0x30af, 0x3099 /* offset 3548 */ ,
+ 0x30a4, 0x30f3, 0x30c1 /* offset 3553 */ ,
+ 0x30a6, 0x30a9, 0x30f3 /* offset 3556 */ ,
+ 0x30a8, 0x30b9, 0x30af, 0x30fc, 0x30c8, 0x3099 /* offset 3559 */ ,
+ 0x30a8, 0x30fc, 0x30ab, 0x30fc /* offset 3565 */ ,
+ 0x30aa, 0x30f3, 0x30b9 /* offset 3569 */ ,
+ 0x30aa, 0x30fc, 0x30e0 /* offset 3572 */ ,
+ 0x30ab, 0x30a4, 0x30ea /* offset 3575 */ ,
+ 0x30ab, 0x30e9, 0x30c3, 0x30c8 /* offset 3578 */ ,
+ 0x30ab, 0x30ed, 0x30ea, 0x30fc /* offset 3582 */ ,
+ 0x30ab, 0x3099, 0x30ed, 0x30f3 /* offset 3586 */ ,
+ 0x30ab, 0x3099, 0x30f3, 0x30de /* offset 3590 */ ,
+ 0x30ad, 0x3099, 0x30ab, 0x3099 /* offset 3594 */ ,
+ 0x30ad, 0x3099, 0x30cb, 0x30fc /* offset 3598 */ ,
+ 0x30ad, 0x30e5, 0x30ea, 0x30fc /* offset 3602 */ ,
+ 0x30ad, 0x3099, 0x30eb, 0x30bf, 0x3099, 0x30fc /* offset 3606 */ ,
+ 0x30ad, 0x30ed /* offset 3612 */ ,
+ 0x30ad, 0x30ed, 0x30af, 0x3099, 0x30e9, 0x30e0 /* offset 3614 */ ,
+ 0x30ad, 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb /* offset 3620 */ ,
+ 0x30ad, 0x30ed, 0x30ef, 0x30c3, 0x30c8 /* offset 3626 */ ,
+ 0x30af, 0x3099, 0x30e9, 0x30e0 /* offset 3631 */ ,
+ 0x30af, 0x3099, 0x30e9, 0x30e0, 0x30c8, 0x30f3 /* offset 3635 */ ,
+ 0x30af, 0x30eb, 0x30bb, 0x3099, 0x30a4, 0x30ed /* offset 3641 */ ,
+ 0x30af, 0x30ed, 0x30fc, 0x30cd /* offset 3647 */ ,
+ 0x30b1, 0x30fc, 0x30b9 /* offset 3651 */ ,
+ 0x30b3, 0x30eb, 0x30ca /* offset 3654 */ ,
+ 0x30b3, 0x30fc, 0x30db, 0x309a /* offset 3657 */ ,
+ 0x30b5, 0x30a4, 0x30af, 0x30eb /* offset 3661 */ ,
+ 0x30b5, 0x30f3, 0x30c1, 0x30fc, 0x30e0 /* offset 3665 */ ,
+ 0x30b7, 0x30ea, 0x30f3, 0x30af, 0x3099 /* offset 3670 */ ,
+ 0x30bb, 0x30f3, 0x30c1 /* offset 3675 */ ,
+ 0x30bb, 0x30f3, 0x30c8 /* offset 3678 */ ,
+ 0x30bf, 0x3099, 0x30fc, 0x30b9 /* offset 3681 */ ,
+ 0x30c6, 0x3099, 0x30b7 /* offset 3685 */ ,
+ 0x30c8, 0x3099, 0x30eb /* offset 3688 */ ,
+ 0x30c8, 0x30f3 /* offset 3691 */ ,
+ 0x30ca, 0x30ce /* offset 3693 */ ,
+ 0x30ce, 0x30c3, 0x30c8 /* offset 3695 */ ,
+ 0x30cf, 0x30a4, 0x30c4 /* offset 3698 */ ,
+ 0x30cf, 0x309a, 0x30fc, 0x30bb, 0x30f3, 0x30c8 /* offset 3701 */ ,
+ 0x30cf, 0x309a, 0x30fc, 0x30c4 /* offset 3707 */ ,
+ 0x30cf, 0x3099, 0x30fc, 0x30ec, 0x30eb /* offset 3711 */ ,
+ 0x30d2, 0x309a, 0x30a2, 0x30b9, 0x30c8, 0x30eb /* offset 3716 */ ,
+ 0x30d2, 0x309a, 0x30af, 0x30eb /* offset 3722 */ ,
+ 0x30d2, 0x309a, 0x30b3 /* offset 3726 */ ,
+ 0x30d2, 0x3099, 0x30eb /* offset 3729 */ ,
+ 0x30d5, 0x30a1, 0x30e9, 0x30c3, 0x30c8, 0x3099 /* offset 3732 */ ,
+ 0x30d5, 0x30a3, 0x30fc, 0x30c8 /* offset 3738 */ ,
+ 0x30d5, 0x3099, 0x30c3, 0x30b7, 0x30a7, 0x30eb /* offset 3742 */ ,
+ 0x30d5, 0x30e9, 0x30f3 /* offset 3748 */ ,
+ 0x30d8, 0x30af, 0x30bf, 0x30fc, 0x30eb /* offset 3751 */ ,
+ 0x30d8, 0x309a, 0x30bd /* offset 3756 */ ,
+ 0x30d8, 0x309a, 0x30cb, 0x30d2 /* offset 3759 */ ,
+ 0x30d8, 0x30eb, 0x30c4 /* offset 3763 */ ,
+ 0x30d8, 0x309a, 0x30f3, 0x30b9 /* offset 3766 */ ,
+ 0x30d8, 0x309a, 0x30fc, 0x30b7, 0x3099 /* offset 3770 */ ,
+ 0x30d8, 0x3099, 0x30fc, 0x30bf /* offset 3775 */ ,
+ 0x30db, 0x309a, 0x30a4, 0x30f3, 0x30c8 /* offset 3779 */ ,
+ 0x30db, 0x3099, 0x30eb, 0x30c8 /* offset 3784 */ ,
+ 0x30db, 0x30f3 /* offset 3788 */ ,
+ 0x30db, 0x309a, 0x30f3, 0x30c8, 0x3099 /* offset 3790 */ ,
+ 0x30db, 0x30fc, 0x30eb /* offset 3795 */ ,
+ 0x30db, 0x30fc, 0x30f3 /* offset 3798 */ ,
+ 0x30de, 0x30a4, 0x30af, 0x30ed /* offset 3801 */ ,
+ 0x30de, 0x30a4, 0x30eb /* offset 3805 */ ,
+ 0x30de, 0x30c3, 0x30cf /* offset 3808 */ ,
+ 0x30de, 0x30eb, 0x30af /* offset 3811 */ ,
+ 0x30de, 0x30f3, 0x30b7, 0x30e7, 0x30f3 /* offset 3814 */ ,
+ 0x30df, 0x30af, 0x30ed, 0x30f3 /* offset 3819 */ ,
+ 0x30df, 0x30ea /* offset 3823 */ ,
+ 0x30df, 0x30ea, 0x30cf, 0x3099, 0x30fc, 0x30eb /* offset 3825 */ ,
+ 0x30e1, 0x30ab, 0x3099 /* offset 3831 */ ,
+ 0x30e1, 0x30ab, 0x3099, 0x30c8, 0x30f3 /* offset 3834 */ ,
+ 0x30e1, 0x30fc, 0x30c8, 0x30eb /* offset 3839 */ ,
+ 0x30e4, 0x30fc, 0x30c8, 0x3099 /* offset 3843 */ ,
+ 0x30e4, 0x30fc, 0x30eb /* offset 3847 */ ,
+ 0x30e6, 0x30a2, 0x30f3 /* offset 3850 */ ,
+ 0x30ea, 0x30c3, 0x30c8, 0x30eb /* offset 3853 */ ,
+ 0x30ea, 0x30e9 /* offset 3857 */ ,
+ 0x30eb, 0x30d2, 0x309a, 0x30fc /* offset 3859 */ ,
+ 0x30eb, 0x30fc, 0x30d5, 0x3099, 0x30eb /* offset 3863 */ ,
+ 0x30ec, 0x30e0 /* offset 3868 */ ,
+ 0x30ec, 0x30f3, 0x30c8, 0x30b1, 0x3099, 0x30f3 /* offset 3870 */ ,
+ 0x30ef, 0x30c3, 0x30c8 /* offset 3876 */ ,
+ 0x30, 0x70b9 /* offset 3879 */ ,
+ 0x31, 0x70b9 /* offset 3881 */ ,
+ 0x32, 0x70b9 /* offset 3883 */ ,
+ 0x33, 0x70b9 /* offset 3885 */ ,
+ 0x34, 0x70b9 /* offset 3887 */ ,
+ 0x35, 0x70b9 /* offset 3889 */ ,
+ 0x36, 0x70b9 /* offset 3891 */ ,
+ 0x37, 0x70b9 /* offset 3893 */ ,
+ 0x38, 0x70b9 /* offset 3895 */ ,
+ 0x39, 0x70b9 /* offset 3897 */ ,
+ 0x31, 0x30, 0x70b9 /* offset 3899 */ ,
+ 0x31, 0x31, 0x70b9 /* offset 3902 */ ,
+ 0x31, 0x32, 0x70b9 /* offset 3905 */ ,
+ 0x31, 0x33, 0x70b9 /* offset 3908 */ ,
+ 0x31, 0x34, 0x70b9 /* offset 3911 */ ,
+ 0x31, 0x35, 0x70b9 /* offset 3914 */ ,
+ 0x31, 0x36, 0x70b9 /* offset 3917 */ ,
+ 0x31, 0x37, 0x70b9 /* offset 3920 */ ,
+ 0x31, 0x38, 0x70b9 /* offset 3923 */ ,
+ 0x31, 0x39, 0x70b9 /* offset 3926 */ ,
+ 0x32, 0x30, 0x70b9 /* offset 3929 */ ,
+ 0x32, 0x31, 0x70b9 /* offset 3932 */ ,
+ 0x32, 0x32, 0x70b9 /* offset 3935 */ ,
+ 0x32, 0x33, 0x70b9 /* offset 3938 */ ,
+ 0x32, 0x34, 0x70b9 /* offset 3941 */ ,
+ 0x68, 0x50, 0x61 /* offset 3944 */ ,
+ 0x64, 0x61 /* offset 3947 */ ,
+ 0x41, 0x55 /* offset 3949 */ ,
+ 0x62, 0x61, 0x72 /* offset 3951 */ ,
+ 0x6f, 0x56 /* offset 3954 */ ,
+ 0x70, 0x63 /* offset 3956 */ ,
+ 0x5e73, 0x6210 /* offset 3958 */ ,
+ 0x662d, 0x548c /* offset 3960 */ ,
+ 0x5927, 0x6b63 /* offset 3962 */ ,
+ 0x660e, 0x6cbb /* offset 3964 */ ,
+ 0x682a, 0x5f0f, 0x4f1a, 0x793e /* offset 3966 */ ,
+ 0x70, 0x41 /* offset 3970 */ ,
+ 0x6e, 0x41 /* offset 3972 */ ,
+ 0x3bc, 0x41 /* offset 3974 */ ,
+ 0x6d, 0x41 /* offset 3976 */ ,
+ 0x6b, 0x41 /* offset 3978 */ ,
+ 0x4b, 0x42 /* offset 3980 */ ,
+ 0x4d, 0x42 /* offset 3982 */ ,
+ 0x47, 0x42 /* offset 3984 */ ,
+ 0x63, 0x61, 0x6c /* offset 3986 */ ,
+ 0x6b, 0x63, 0x61, 0x6c /* offset 3989 */ ,
+ 0x70, 0x46 /* offset 3993 */ ,
+ 0x6e, 0x46 /* offset 3995 */ ,
+ 0x3bc, 0x46 /* offset 3997 */ ,
+ 0x3bc, 0x67 /* offset 3999 */ ,
+ 0x6d, 0x67 /* offset 4001 */ ,
+ 0x6b, 0x67 /* offset 4003 */ ,
+ 0x48, 0x7a /* offset 4005 */ ,
+ 0x6b, 0x48, 0x7a /* offset 4007 */ ,
+ 0x4d, 0x48, 0x7a /* offset 4010 */ ,
+ 0x47, 0x48, 0x7a /* offset 4013 */ ,
+ 0x54, 0x48, 0x7a /* offset 4016 */ ,
+ 0x3bc, 0x6c /* offset 4019 */ ,
+ 0x6d, 0x6c /* offset 4021 */ ,
+ 0x64, 0x6c /* offset 4023 */ ,
+ 0x6b, 0x6c /* offset 4025 */ ,
+ 0x66, 0x6d /* offset 4027 */ ,
+ 0x6e, 0x6d /* offset 4029 */ ,
+ 0x3bc, 0x6d /* offset 4031 */ ,
+ 0x6d, 0x6d /* offset 4033 */ ,
+ 0x63, 0x6d /* offset 4035 */ ,
+ 0x6b, 0x6d /* offset 4037 */ ,
+ 0x6d, 0x6d, 0x32 /* offset 4039 */ ,
+ 0x63, 0x6d, 0x32 /* offset 4042 */ ,
+ 0x6d, 0x32 /* offset 4045 */ ,
+ 0x6b, 0x6d, 0x32 /* offset 4047 */ ,
+ 0x6d, 0x6d, 0x33 /* offset 4050 */ ,
+ 0x63, 0x6d, 0x33 /* offset 4053 */ ,
+ 0x6d, 0x33 /* offset 4056 */ ,
+ 0x6b, 0x6d, 0x33 /* offset 4058 */ ,
+ 0x6d, 0x2215, 0x73 /* offset 4061 */ ,
+ 0x6d, 0x2215, 0x73, 0x32 /* offset 4064 */ ,
+ 0x50, 0x61 /* offset 4068 */ ,
+ 0x6b, 0x50, 0x61 /* offset 4070 */ ,
+ 0x4d, 0x50, 0x61 /* offset 4073 */ ,
+ 0x47, 0x50, 0x61 /* offset 4076 */ ,
+ 0x72, 0x61, 0x64 /* offset 4079 */ ,
+ 0x72, 0x61, 0x64, 0x2215, 0x73 /* offset 4082 */ ,
+ 0x72, 0x61, 0x64, 0x2215, 0x73, 0x32 /* offset 4087 */ ,
+ 0x70, 0x73 /* offset 4093 */ ,
+ 0x6e, 0x73 /* offset 4095 */ ,
+ 0x3bc, 0x73 /* offset 4097 */ ,
+ 0x6d, 0x73 /* offset 4099 */ ,
+ 0x70, 0x56 /* offset 4101 */ ,
+ 0x6e, 0x56 /* offset 4103 */ ,
+ 0x3bc, 0x56 /* offset 4105 */ ,
+ 0x6d, 0x56 /* offset 4107 */ ,
+ 0x6b, 0x56 /* offset 4109 */ ,
+ 0x4d, 0x56 /* offset 4111 */ ,
+ 0x70, 0x57 /* offset 4113 */ ,
+ 0x6e, 0x57 /* offset 4115 */ ,
+ 0x3bc, 0x57 /* offset 4117 */ ,
+ 0x6d, 0x57 /* offset 4119 */ ,
+ 0x6b, 0x57 /* offset 4121 */ ,
+ 0x4d, 0x57 /* offset 4123 */ ,
+ 0x6b, 0x3a9 /* offset 4125 */ ,
+ 0x4d, 0x3a9 /* offset 4127 */ ,
+ 0x61, 0x2e, 0x6d, 0x2e /* offset 4129 */ ,
+ 0x42, 0x71 /* offset 4133 */ ,
+ 0x63, 0x63 /* offset 4135 */ ,
+ 0x63, 0x64 /* offset 4137 */ ,
+ 0x43, 0x2215, 0x6b, 0x67 /* offset 4139 */ ,
+ 0x43, 0x6f, 0x2e /* offset 4143 */ ,
+ 0x64, 0x42 /* offset 4146 */ ,
+ 0x47, 0x79 /* offset 4148 */ ,
+ 0x68, 0x61 /* offset 4150 */ ,
+ 0x48, 0x50 /* offset 4152 */ ,
+ 0x69, 0x6e /* offset 4154 */ ,
+ 0x4b, 0x4b /* offset 4156 */ ,
+ 0x4b, 0x4d /* offset 4158 */ ,
+ 0x6b, 0x74 /* offset 4160 */ ,
+ 0x6c, 0x6d /* offset 4162 */ ,
+ 0x6c, 0x6e /* offset 4164 */ ,
+ 0x6c, 0x6f, 0x67 /* offset 4166 */ ,
+ 0x6c, 0x78 /* offset 4169 */ ,
+ 0x6d, 0x62 /* offset 4171 */ ,
+ 0x6d, 0x69, 0x6c /* offset 4173 */ ,
+ 0x6d, 0x6f, 0x6c /* offset 4176 */ ,
+ 0x50, 0x48 /* offset 4179 */ ,
+ 0x70, 0x2e, 0x6d, 0x2e /* offset 4181 */ ,
+ 0x50, 0x50, 0x4d /* offset 4185 */ ,
+ 0x50, 0x52 /* offset 4188 */ ,
+ 0x73, 0x72 /* offset 4190 */ ,
+ 0x53, 0x76 /* offset 4192 */ ,
+ 0x57, 0x62 /* offset 4194 */ ,
+ 0x31, 0x65e5 /* offset 4196 */ ,
+ 0x32, 0x65e5 /* offset 4198 */ ,
+ 0x33, 0x65e5 /* offset 4200 */ ,
+ 0x34, 0x65e5 /* offset 4202 */ ,
+ 0x35, 0x65e5 /* offset 4204 */ ,
+ 0x36, 0x65e5 /* offset 4206 */ ,
+ 0x37, 0x65e5 /* offset 4208 */ ,
+ 0x38, 0x65e5 /* offset 4210 */ ,
+ 0x39, 0x65e5 /* offset 4212 */ ,
+ 0x31, 0x30, 0x65e5 /* offset 4214 */ ,
+ 0x31, 0x31, 0x65e5 /* offset 4217 */ ,
+ 0x31, 0x32, 0x65e5 /* offset 4220 */ ,
+ 0x31, 0x33, 0x65e5 /* offset 4223 */ ,
+ 0x31, 0x34, 0x65e5 /* offset 4226 */ ,
+ 0x31, 0x35, 0x65e5 /* offset 4229 */ ,
+ 0x31, 0x36, 0x65e5 /* offset 4232 */ ,
+ 0x31, 0x37, 0x65e5 /* offset 4235 */ ,
+ 0x31, 0x38, 0x65e5 /* offset 4238 */ ,
+ 0x31, 0x39, 0x65e5 /* offset 4241 */ ,
+ 0x32, 0x30, 0x65e5 /* offset 4244 */ ,
+ 0x32, 0x31, 0x65e5 /* offset 4247 */ ,
+ 0x32, 0x32, 0x65e5 /* offset 4250 */ ,
+ 0x32, 0x33, 0x65e5 /* offset 4253 */ ,
+ 0x32, 0x34, 0x65e5 /* offset 4256 */ ,
+ 0x32, 0x35, 0x65e5 /* offset 4259 */ ,
+ 0x32, 0x36, 0x65e5 /* offset 4262 */ ,
+ 0x32, 0x37, 0x65e5 /* offset 4265 */ ,
+ 0x32, 0x38, 0x65e5 /* offset 4268 */ ,
+ 0x32, 0x39, 0x65e5 /* offset 4271 */ ,
+ 0x33, 0x30, 0x65e5 /* offset 4274 */ ,
+ 0x33, 0x31, 0x65e5 /* offset 4277 */ ,
+ 0x8c48 /* offset 4280 */ ,
+ 0x66f4 /* offset 4281 */ ,
+ 0x8cc8 /* offset 4282 */ ,
+ 0x6ed1 /* offset 4283 */ ,
+ 0x4e32 /* offset 4284 */ ,
+ 0x53e5 /* offset 4285 */ ,
+ 0x5951 /* offset 4286 */ ,
+ 0x5587 /* offset 4287 */ ,
+ 0x5948 /* offset 4288 */ ,
+ 0x61f6 /* offset 4289 */ ,
+ 0x7669 /* offset 4290 */ ,
+ 0x7f85 /* offset 4291 */ ,
+ 0x863f /* offset 4292 */ ,
+ 0x87ba /* offset 4293 */ ,
+ 0x88f8 /* offset 4294 */ ,
+ 0x908f /* offset 4295 */ ,
+ 0x6a02 /* offset 4296 */ ,
+ 0x6d1b /* offset 4297 */ ,
+ 0x70d9 /* offset 4298 */ ,
+ 0x73de /* offset 4299 */ ,
+ 0x843d /* offset 4300 */ ,
+ 0x916a /* offset 4301 */ ,
+ 0x99f1 /* offset 4302 */ ,
+ 0x4e82 /* offset 4303 */ ,
+ 0x5375 /* offset 4304 */ ,
+ 0x6b04 /* offset 4305 */ ,
+ 0x721b /* offset 4306 */ ,
+ 0x862d /* offset 4307 */ ,
+ 0x9e1e /* offset 4308 */ ,
+ 0x5d50 /* offset 4309 */ ,
+ 0x6feb /* offset 4310 */ ,
+ 0x85cd /* offset 4311 */ ,
+ 0x8964 /* offset 4312 */ ,
+ 0x62c9 /* offset 4313 */ ,
+ 0x81d8 /* offset 4314 */ ,
+ 0x881f /* offset 4315 */ ,
+ 0x5eca /* offset 4316 */ ,
+ 0x6717 /* offset 4317 */ ,
+ 0x6d6a /* offset 4318 */ ,
+ 0x72fc /* offset 4319 */ ,
+ 0x90ce /* offset 4320 */ ,
+ 0x4f86 /* offset 4321 */ ,
+ 0x51b7 /* offset 4322 */ ,
+ 0x52de /* offset 4323 */ ,
+ 0x64c4 /* offset 4324 */ ,
+ 0x6ad3 /* offset 4325 */ ,
+ 0x7210 /* offset 4326 */ ,
+ 0x76e7 /* offset 4327 */ ,
+ 0x8606 /* offset 4328 */ ,
+ 0x865c /* offset 4329 */ ,
+ 0x8def /* offset 4330 */ ,
+ 0x9732 /* offset 4331 */ ,
+ 0x9b6f /* offset 4332 */ ,
+ 0x9dfa /* offset 4333 */ ,
+ 0x788c /* offset 4334 */ ,
+ 0x797f /* offset 4335 */ ,
+ 0x7da0 /* offset 4336 */ ,
+ 0x83c9 /* offset 4337 */ ,
+ 0x9304 /* offset 4338 */ ,
+ 0x8ad6 /* offset 4339 */ ,
+ 0x58df /* offset 4340 */ ,
+ 0x5f04 /* offset 4341 */ ,
+ 0x7c60 /* offset 4342 */ ,
+ 0x807e /* offset 4343 */ ,
+ 0x7262 /* offset 4344 */ ,
+ 0x78ca /* offset 4345 */ ,
+ 0x8cc2 /* offset 4346 */ ,
+ 0x96f7 /* offset 4347 */ ,
+ 0x58d8 /* offset 4348 */ ,
+ 0x5c62 /* offset 4349 */ ,
+ 0x6a13 /* offset 4350 */ ,
+ 0x6dda /* offset 4351 */ ,
+ 0x6f0f /* offset 4352 */ ,
+ 0x7d2f /* offset 4353 */ ,
+ 0x7e37 /* offset 4354 */ ,
+ 0x964b /* offset 4355 */ ,
+ 0x52d2 /* offset 4356 */ ,
+ 0x808b /* offset 4357 */ ,
+ 0x51dc /* offset 4358 */ ,
+ 0x51cc /* offset 4359 */ ,
+ 0x7a1c /* offset 4360 */ ,
+ 0x7dbe /* offset 4361 */ ,
+ 0x83f1 /* offset 4362 */ ,
+ 0x9675 /* offset 4363 */ ,
+ 0x8b80 /* offset 4364 */ ,
+ 0x62cf /* offset 4365 */ ,
+ 0x8afe /* offset 4366 */ ,
+ 0x4e39 /* offset 4367 */ ,
+ 0x5be7 /* offset 4368 */ ,
+ 0x6012 /* offset 4369 */ ,
+ 0x7387 /* offset 4370 */ ,
+ 0x7570 /* offset 4371 */ ,
+ 0x5317 /* offset 4372 */ ,
+ 0x78fb /* offset 4373 */ ,
+ 0x4fbf /* offset 4374 */ ,
+ 0x5fa9 /* offset 4375 */ ,
+ 0x4e0d /* offset 4376 */ ,
+ 0x6ccc /* offset 4377 */ ,
+ 0x6578 /* offset 4378 */ ,
+ 0x7d22 /* offset 4379 */ ,
+ 0x53c3 /* offset 4380 */ ,
+ 0x585e /* offset 4381 */ ,
+ 0x7701 /* offset 4382 */ ,
+ 0x8449 /* offset 4383 */ ,
+ 0x8aaa /* offset 4384 */ ,
+ 0x6bba /* offset 4385 */ ,
+ 0x6c88 /* offset 4386 */ ,
+ 0x62fe /* offset 4387 */ ,
+ 0x82e5 /* offset 4388 */ ,
+ 0x63a0 /* offset 4389 */ ,
+ 0x7565 /* offset 4390 */ ,
+ 0x4eae /* offset 4391 */ ,
+ 0x5169 /* offset 4392 */ ,
+ 0x51c9 /* offset 4393 */ ,
+ 0x6881 /* offset 4394 */ ,
+ 0x7ce7 /* offset 4395 */ ,
+ 0x826f /* offset 4396 */ ,
+ 0x8ad2 /* offset 4397 */ ,
+ 0x91cf /* offset 4398 */ ,
+ 0x52f5 /* offset 4399 */ ,
+ 0x5442 /* offset 4400 */ ,
+ 0x5eec /* offset 4401 */ ,
+ 0x65c5 /* offset 4402 */ ,
+ 0x6ffe /* offset 4403 */ ,
+ 0x792a /* offset 4404 */ ,
+ 0x95ad /* offset 4405 */ ,
+ 0x9a6a /* offset 4406 */ ,
+ 0x9e97 /* offset 4407 */ ,
+ 0x9ece /* offset 4408 */ ,
+ 0x66c6 /* offset 4409 */ ,
+ 0x6b77 /* offset 4410 */ ,
+ 0x8f62 /* offset 4411 */ ,
+ 0x5e74 /* offset 4412 */ ,
+ 0x6190 /* offset 4413 */ ,
+ 0x6200 /* offset 4414 */ ,
+ 0x649a /* offset 4415 */ ,
+ 0x6f23 /* offset 4416 */ ,
+ 0x7149 /* offset 4417 */ ,
+ 0x7489 /* offset 4418 */ ,
+ 0x79ca /* offset 4419 */ ,
+ 0x7df4 /* offset 4420 */ ,
+ 0x806f /* offset 4421 */ ,
+ 0x8f26 /* offset 4422 */ ,
+ 0x84ee /* offset 4423 */ ,
+ 0x9023 /* offset 4424 */ ,
+ 0x934a /* offset 4425 */ ,
+ 0x5217 /* offset 4426 */ ,
+ 0x52a3 /* offset 4427 */ ,
+ 0x54bd /* offset 4428 */ ,
+ 0x70c8 /* offset 4429 */ ,
+ 0x88c2 /* offset 4430 */ ,
+ 0x5ec9 /* offset 4431 */ ,
+ 0x5ff5 /* offset 4432 */ ,
+ 0x637b /* offset 4433 */ ,
+ 0x6bae /* offset 4434 */ ,
+ 0x7c3e /* offset 4435 */ ,
+ 0x7375 /* offset 4436 */ ,
+ 0x4ee4 /* offset 4437 */ ,
+ 0x56f9 /* offset 4438 */ ,
+ 0x5dba /* offset 4439 */ ,
+ 0x601c /* offset 4440 */ ,
+ 0x73b2 /* offset 4441 */ ,
+ 0x7469 /* offset 4442 */ ,
+ 0x7f9a /* offset 4443 */ ,
+ 0x8046 /* offset 4444 */ ,
+ 0x9234 /* offset 4445 */ ,
+ 0x96f6 /* offset 4446 */ ,
+ 0x9748 /* offset 4447 */ ,
+ 0x9818 /* offset 4448 */ ,
+ 0x4f8b /* offset 4449 */ ,
+ 0x79ae /* offset 4450 */ ,
+ 0x91b4 /* offset 4451 */ ,
+ 0x96b8 /* offset 4452 */ ,
+ 0x60e1 /* offset 4453 */ ,
+ 0x4e86 /* offset 4454 */ ,
+ 0x50da /* offset 4455 */ ,
+ 0x5bee /* offset 4456 */ ,
+ 0x5c3f /* offset 4457 */ ,
+ 0x6599 /* offset 4458 */ ,
+ 0x71ce /* offset 4459 */ ,
+ 0x7642 /* offset 4460 */ ,
+ 0x84fc /* offset 4461 */ ,
+ 0x907c /* offset 4462 */ ,
+ 0x6688 /* offset 4463 */ ,
+ 0x962e /* offset 4464 */ ,
+ 0x5289 /* offset 4465 */ ,
+ 0x677b /* offset 4466 */ ,
+ 0x67f3 /* offset 4467 */ ,
+ 0x6d41 /* offset 4468 */ ,
+ 0x6e9c /* offset 4469 */ ,
+ 0x7409 /* offset 4470 */ ,
+ 0x7559 /* offset 4471 */ ,
+ 0x786b /* offset 4472 */ ,
+ 0x7d10 /* offset 4473 */ ,
+ 0x985e /* offset 4474 */ ,
+ 0x622e /* offset 4475 */ ,
+ 0x9678 /* offset 4476 */ ,
+ 0x502b /* offset 4477 */ ,
+ 0x5d19 /* offset 4478 */ ,
+ 0x6dea /* offset 4479 */ ,
+ 0x8f2a /* offset 4480 */ ,
+ 0x5f8b /* offset 4481 */ ,
+ 0x6144 /* offset 4482 */ ,
+ 0x6817 /* offset 4483 */ ,
+ 0x9686 /* offset 4484 */ ,
+ 0x5229 /* offset 4485 */ ,
+ 0x540f /* offset 4486 */ ,
+ 0x5c65 /* offset 4487 */ ,
+ 0x6613 /* offset 4488 */ ,
+ 0x674e /* offset 4489 */ ,
+ 0x68a8 /* offset 4490 */ ,
+ 0x6ce5 /* offset 4491 */ ,
+ 0x7406 /* offset 4492 */ ,
+ 0x75e2 /* offset 4493 */ ,
+ 0x7f79 /* offset 4494 */ ,
+ 0x88cf /* offset 4495 */ ,
+ 0x88e1 /* offset 4496 */ ,
+ 0x96e2 /* offset 4497 */ ,
+ 0x533f /* offset 4498 */ ,
+ 0x6eba /* offset 4499 */ ,
+ 0x541d /* offset 4500 */ ,
+ 0x71d0 /* offset 4501 */ ,
+ 0x7498 /* offset 4502 */ ,
+ 0x85fa /* offset 4503 */ ,
+ 0x96a3 /* offset 4504 */ ,
+ 0x9c57 /* offset 4505 */ ,
+ 0x9e9f /* offset 4506 */ ,
+ 0x6797 /* offset 4507 */ ,
+ 0x6dcb /* offset 4508 */ ,
+ 0x81e8 /* offset 4509 */ ,
+ 0x7b20 /* offset 4510 */ ,
+ 0x7c92 /* offset 4511 */ ,
+ 0x72c0 /* offset 4512 */ ,
+ 0x7099 /* offset 4513 */ ,
+ 0x8b58 /* offset 4514 */ ,
+ 0x4ec0 /* offset 4515 */ ,
+ 0x8336 /* offset 4516 */ ,
+ 0x523a /* offset 4517 */ ,
+ 0x5207 /* offset 4518 */ ,
+ 0x5ea6 /* offset 4519 */ ,
+ 0x62d3 /* offset 4520 */ ,
+ 0x7cd6 /* offset 4521 */ ,
+ 0x5b85 /* offset 4522 */ ,
+ 0x6d1e /* offset 4523 */ ,
+ 0x66b4 /* offset 4524 */ ,
+ 0x8f3b /* offset 4525 */ ,
+ 0x964d /* offset 4526 */ ,
+ 0x5ed3 /* offset 4527 */ ,
+ 0x5140 /* offset 4528 */ ,
+ 0x55c0 /* offset 4529 */ ,
+ 0x585a /* offset 4530 */ ,
+ 0x6674 /* offset 4531 */ ,
+ 0x51de /* offset 4532 */ ,
+ 0x732a /* offset 4533 */ ,
+ 0x76ca /* offset 4534 */ ,
+ 0x793c /* offset 4535 */ ,
+ 0x795e /* offset 4536 */ ,
+ 0x7965 /* offset 4537 */ ,
+ 0x798f /* offset 4538 */ ,
+ 0x9756 /* offset 4539 */ ,
+ 0x7cbe /* offset 4540 */ ,
+ 0x8612 /* offset 4541 */ ,
+ 0x8af8 /* offset 4542 */ ,
+ 0x9038 /* offset 4543 */ ,
+ 0x90fd /* offset 4544 */ ,
+ 0x98ef /* offset 4545 */ ,
+ 0x98fc /* offset 4546 */ ,
+ 0x9928 /* offset 4547 */ ,
+ 0x9db4 /* offset 4548 */ ,
+ 0x4fae /* offset 4549 */ ,
+ 0x50e7 /* offset 4550 */ ,
+ 0x514d /* offset 4551 */ ,
+ 0x52c9 /* offset 4552 */ ,
+ 0x52e4 /* offset 4553 */ ,
+ 0x5351 /* offset 4554 */ ,
+ 0x559d /* offset 4555 */ ,
+ 0x5606 /* offset 4556 */ ,
+ 0x5668 /* offset 4557 */ ,
+ 0x5840 /* offset 4558 */ ,
+ 0x58a8 /* offset 4559 */ ,
+ 0x5c64 /* offset 4560 */ ,
+ 0x6094 /* offset 4561 */ ,
+ 0x6168 /* offset 4562 */ ,
+ 0x618e /* offset 4563 */ ,
+ 0x61f2 /* offset 4564 */ ,
+ 0x654f /* offset 4565 */ ,
+ 0x65e2 /* offset 4566 */ ,
+ 0x6691 /* offset 4567 */ ,
+ 0x6885 /* offset 4568 */ ,
+ 0x6d77 /* offset 4569 */ ,
+ 0x6e1a /* offset 4570 */ ,
+ 0x6f22 /* offset 4571 */ ,
+ 0x716e /* offset 4572 */ ,
+ 0x722b /* offset 4573 */ ,
+ 0x7422 /* offset 4574 */ ,
+ 0x7891 /* offset 4575 */ ,
+ 0x7949 /* offset 4576 */ ,
+ 0x7948 /* offset 4577 */ ,
+ 0x7950 /* offset 4578 */ ,
+ 0x7956 /* offset 4579 */ ,
+ 0x798d /* offset 4580 */ ,
+ 0x798e /* offset 4581 */ ,
+ 0x7a40 /* offset 4582 */ ,
+ 0x7a81 /* offset 4583 */ ,
+ 0x7bc0 /* offset 4584 */ ,
+ 0x7e09 /* offset 4585 */ ,
+ 0x7e41 /* offset 4586 */ ,
+ 0x7f72 /* offset 4587 */ ,
+ 0x8005 /* offset 4588 */ ,
+ 0x81ed /* offset 4589 */ ,
+ 0x8279 /* offset 4590 */ ,
+ 0x8457 /* offset 4591 */ ,
+ 0x8910 /* offset 4592 */ ,
+ 0x8996 /* offset 4593 */ ,
+ 0x8b01 /* offset 4594 */ ,
+ 0x8b39 /* offset 4595 */ ,
+ 0x8cd3 /* offset 4596 */ ,
+ 0x8d08 /* offset 4597 */ ,
+ 0x8fb6 /* offset 4598 */ ,
+ 0x96e3 /* offset 4599 */ ,
+ 0x97ff /* offset 4600 */ ,
+ 0x983b /* offset 4601 */ ,
+ 0x66, 0x66 /* offset 4602 */ ,
+ 0x66, 0x69 /* offset 4604 */ ,
+ 0x66, 0x6c /* offset 4606 */ ,
+ 0x66, 0x66, 0x69 /* offset 4608 */ ,
+ 0x66, 0x66, 0x6c /* offset 4611 */ ,
+ 0x73, 0x74 /* offset 4614 */ ,
+ 0x574, 0x576 /* offset 4616 */ ,
+ 0x574, 0x565 /* offset 4618 */ ,
+ 0x574, 0x56b /* offset 4620 */ ,
+ 0x57e, 0x576 /* offset 4622 */ ,
+ 0x574, 0x56d /* offset 4624 */ ,
+ 0x5d9, 0x5b4 /* offset 4626 */ ,
+ 0x5f2, 0x5b7 /* offset 4628 */ ,
+ 0x5e2 /* offset 4630 */ ,
+ 0x5d4 /* offset 4631 */ ,
+ 0x5db /* offset 4632 */ ,
+ 0x5dc /* offset 4633 */ ,
+ 0x5dd /* offset 4634 */ ,
+ 0x5e8 /* offset 4635 */ ,
+ 0x5ea /* offset 4636 */ ,
+ 0x5e9, 0x5c1 /* offset 4637 */ ,
+ 0x5e9, 0x5c2 /* offset 4639 */ ,
+ 0x5e9, 0x5bc, 0x5c1 /* offset 4641 */ ,
+ 0x5e9, 0x5bc, 0x5c2 /* offset 4644 */ ,
+ 0x5d0, 0x5b7 /* offset 4647 */ ,
+ 0x5d0, 0x5b8 /* offset 4649 */ ,
+ 0x5d0, 0x5bc /* offset 4651 */ ,
+ 0x5d1, 0x5bc /* offset 4653 */ ,
+ 0x5d2, 0x5bc /* offset 4655 */ ,
+ 0x5d3, 0x5bc /* offset 4657 */ ,
+ 0x5d4, 0x5bc /* offset 4659 */ ,
+ 0x5d5, 0x5bc /* offset 4661 */ ,
+ 0x5d6, 0x5bc /* offset 4663 */ ,
+ 0x5d8, 0x5bc /* offset 4665 */ ,
+ 0x5d9, 0x5bc /* offset 4667 */ ,
+ 0x5da, 0x5bc /* offset 4669 */ ,
+ 0x5db, 0x5bc /* offset 4671 */ ,
+ 0x5dc, 0x5bc /* offset 4673 */ ,
+ 0x5de, 0x5bc /* offset 4675 */ ,
+ 0x5e0, 0x5bc /* offset 4677 */ ,
+ 0x5e1, 0x5bc /* offset 4679 */ ,
+ 0x5e3, 0x5bc /* offset 4681 */ ,
+ 0x5e4, 0x5bc /* offset 4683 */ ,
+ 0x5e6, 0x5bc /* offset 4685 */ ,
+ 0x5e7, 0x5bc /* offset 4687 */ ,
+ 0x5e8, 0x5bc /* offset 4689 */ ,
+ 0x5e9, 0x5bc /* offset 4691 */ ,
+ 0x5ea, 0x5bc /* offset 4693 */ ,
+ 0x5d5, 0x5b9 /* offset 4695 */ ,
+ 0x5d1, 0x5bf /* offset 4697 */ ,
+ 0x5db, 0x5bf /* offset 4699 */ ,
+ 0x5e4, 0x5bf /* offset 4701 */ ,
+ 0x5d0, 0x5dc /* offset 4703 */ ,
+ 0x671 /* offset 4705 */ ,
+ 0x67b /* offset 4706 */ ,
+ 0x67e /* offset 4707 */ ,
+ 0x680 /* offset 4708 */ ,
+ 0x67a /* offset 4709 */ ,
+ 0x67f /* offset 4710 */ ,
+ 0x679 /* offset 4711 */ ,
+ 0x6a4 /* offset 4712 */ ,
+ 0x6a6 /* offset 4713 */ ,
+ 0x684 /* offset 4714 */ ,
+ 0x683 /* offset 4715 */ ,
+ 0x686 /* offset 4716 */ ,
+ 0x687 /* offset 4717 */ ,
+ 0x68d /* offset 4718 */ ,
+ 0x68c /* offset 4719 */ ,
+ 0x68e /* offset 4720 */ ,
+ 0x688 /* offset 4721 */ ,
+ 0x698 /* offset 4722 */ ,
+ 0x691 /* offset 4723 */ ,
+ 0x6a9 /* offset 4724 */ ,
+ 0x6af /* offset 4725 */ ,
+ 0x6b3 /* offset 4726 */ ,
+ 0x6b1 /* offset 4727 */ ,
+ 0x6ba /* offset 4728 */ ,
+ 0x6bb /* offset 4729 */ ,
+ 0x6c1 /* offset 4730 */ ,
+ 0x6be /* offset 4731 */ ,
+ 0x6d2 /* offset 4732 */ ,
+ 0x6ad /* offset 4733 */ ,
+ 0x6c7 /* offset 4734 */ ,
+ 0x6c6 /* offset 4735 */ ,
+ 0x6c8 /* offset 4736 */ ,
+ 0x6cb /* offset 4737 */ ,
+ 0x6c5 /* offset 4738 */ ,
+ 0x6c9 /* offset 4739 */ ,
+ 0x6d0 /* offset 4740 */ ,
+ 0x649 /* offset 4741 */ ,
+ 0x64a, 0x654, 0x627 /* offset 4742 */ ,
+ 0x64a, 0x654, 0x6d5 /* offset 4745 */ ,
+ 0x64a, 0x654, 0x648 /* offset 4748 */ ,
+ 0x64a, 0x654, 0x6c7 /* offset 4751 */ ,
+ 0x64a, 0x654, 0x6c6 /* offset 4754 */ ,
+ 0x64a, 0x654, 0x6c8 /* offset 4757 */ ,
+ 0x64a, 0x654, 0x6d0 /* offset 4760 */ ,
+ 0x64a, 0x654, 0x649 /* offset 4763 */ ,
+ 0x6cc /* offset 4766 */ ,
+ 0x64a, 0x654, 0x62c /* offset 4767 */ ,
+ 0x64a, 0x654, 0x62d /* offset 4770 */ ,
+ 0x64a, 0x654, 0x645 /* offset 4773 */ ,
+ 0x64a, 0x654, 0x64a /* offset 4776 */ ,
+ 0x628, 0x62c /* offset 4779 */ ,
+ 0x628, 0x62d /* offset 4781 */ ,
+ 0x628, 0x62e /* offset 4783 */ ,
+ 0x628, 0x645 /* offset 4785 */ ,
+ 0x628, 0x649 /* offset 4787 */ ,
+ 0x628, 0x64a /* offset 4789 */ ,
+ 0x62a, 0x62c /* offset 4791 */ ,
+ 0x62a, 0x62d /* offset 4793 */ ,
+ 0x62a, 0x62e /* offset 4795 */ ,
+ 0x62a, 0x645 /* offset 4797 */ ,
+ 0x62a, 0x649 /* offset 4799 */ ,
+ 0x62a, 0x64a /* offset 4801 */ ,
+ 0x62b, 0x62c /* offset 4803 */ ,
+ 0x62b, 0x645 /* offset 4805 */ ,
+ 0x62b, 0x649 /* offset 4807 */ ,
+ 0x62b, 0x64a /* offset 4809 */ ,
+ 0x62c, 0x62d /* offset 4811 */ ,
+ 0x62c, 0x645 /* offset 4813 */ ,
+ 0x62d, 0x62c /* offset 4815 */ ,
+ 0x62d, 0x645 /* offset 4817 */ ,
+ 0x62e, 0x62c /* offset 4819 */ ,
+ 0x62e, 0x62d /* offset 4821 */ ,
+ 0x62e, 0x645 /* offset 4823 */ ,
+ 0x633, 0x62c /* offset 4825 */ ,
+ 0x633, 0x62d /* offset 4827 */ ,
+ 0x633, 0x62e /* offset 4829 */ ,
+ 0x633, 0x645 /* offset 4831 */ ,
+ 0x635, 0x62d /* offset 4833 */ ,
+ 0x635, 0x645 /* offset 4835 */ ,
+ 0x636, 0x62c /* offset 4837 */ ,
+ 0x636, 0x62d /* offset 4839 */ ,
+ 0x636, 0x62e /* offset 4841 */ ,
+ 0x636, 0x645 /* offset 4843 */ ,
+ 0x637, 0x62d /* offset 4845 */ ,
+ 0x637, 0x645 /* offset 4847 */ ,
+ 0x638, 0x645 /* offset 4849 */ ,
+ 0x639, 0x62c /* offset 4851 */ ,
+ 0x639, 0x645 /* offset 4853 */ ,
+ 0x63a, 0x62c /* offset 4855 */ ,
+ 0x63a, 0x645 /* offset 4857 */ ,
+ 0x641, 0x62c /* offset 4859 */ ,
+ 0x641, 0x62d /* offset 4861 */ ,
+ 0x641, 0x62e /* offset 4863 */ ,
+ 0x641, 0x645 /* offset 4865 */ ,
+ 0x641, 0x649 /* offset 4867 */ ,
+ 0x641, 0x64a /* offset 4869 */ ,
+ 0x642, 0x62d /* offset 4871 */ ,
+ 0x642, 0x645 /* offset 4873 */ ,
+ 0x642, 0x649 /* offset 4875 */ ,
+ 0x642, 0x64a /* offset 4877 */ ,
+ 0x643, 0x627 /* offset 4879 */ ,
+ 0x643, 0x62c /* offset 4881 */ ,
+ 0x643, 0x62d /* offset 4883 */ ,
+ 0x643, 0x62e /* offset 4885 */ ,
+ 0x643, 0x644 /* offset 4887 */ ,
+ 0x643, 0x645 /* offset 4889 */ ,
+ 0x643, 0x649 /* offset 4891 */ ,
+ 0x643, 0x64a /* offset 4893 */ ,
+ 0x644, 0x62c /* offset 4895 */ ,
+ 0x644, 0x62d /* offset 4897 */ ,
+ 0x644, 0x62e /* offset 4899 */ ,
+ 0x644, 0x645 /* offset 4901 */ ,
+ 0x644, 0x649 /* offset 4903 */ ,
+ 0x644, 0x64a /* offset 4905 */ ,
+ 0x645, 0x62c /* offset 4907 */ ,
+ 0x645, 0x62d /* offset 4909 */ ,
+ 0x645, 0x62e /* offset 4911 */ ,
+ 0x645, 0x645 /* offset 4913 */ ,
+ 0x645, 0x649 /* offset 4915 */ ,
+ 0x645, 0x64a /* offset 4917 */ ,
+ 0x646, 0x62c /* offset 4919 */ ,
+ 0x646, 0x62d /* offset 4921 */ ,
+ 0x646, 0x62e /* offset 4923 */ ,
+ 0x646, 0x645 /* offset 4925 */ ,
+ 0x646, 0x649 /* offset 4927 */ ,
+ 0x646, 0x64a /* offset 4929 */ ,
+ 0x647, 0x62c /* offset 4931 */ ,
+ 0x647, 0x645 /* offset 4933 */ ,
+ 0x647, 0x649 /* offset 4935 */ ,
+ 0x647, 0x64a /* offset 4937 */ ,
+ 0x64a, 0x62c /* offset 4939 */ ,
+ 0x64a, 0x62d /* offset 4941 */ ,
+ 0x64a, 0x62e /* offset 4943 */ ,
+ 0x64a, 0x645 /* offset 4945 */ ,
+ 0x64a, 0x649 /* offset 4947 */ ,
+ 0x64a, 0x64a /* offset 4949 */ ,
+ 0x630, 0x670 /* offset 4951 */ ,
+ 0x631, 0x670 /* offset 4953 */ ,
+ 0x649, 0x670 /* offset 4955 */ ,
+ 0x20, 0x64c, 0x651 /* offset 4957 */ ,
+ 0x20, 0x64d, 0x651 /* offset 4960 */ ,
+ 0x20, 0x64e, 0x651 /* offset 4963 */ ,
+ 0x20, 0x64f, 0x651 /* offset 4966 */ ,
+ 0x20, 0x650, 0x651 /* offset 4969 */ ,
+ 0x20, 0x651, 0x670 /* offset 4972 */ ,
+ 0x64a, 0x654, 0x631 /* offset 4975 */ ,
+ 0x64a, 0x654, 0x632 /* offset 4978 */ ,
+ 0x64a, 0x654, 0x646 /* offset 4981 */ ,
+ 0x628, 0x631 /* offset 4984 */ ,
+ 0x628, 0x632 /* offset 4986 */ ,
+ 0x628, 0x646 /* offset 4988 */ ,
+ 0x62a, 0x631 /* offset 4990 */ ,
+ 0x62a, 0x632 /* offset 4992 */ ,
+ 0x62a, 0x646 /* offset 4994 */ ,
+ 0x62b, 0x631 /* offset 4996 */ ,
+ 0x62b, 0x632 /* offset 4998 */ ,
+ 0x62b, 0x646 /* offset 5000 */ ,
+ 0x645, 0x627 /* offset 5002 */ ,
+ 0x646, 0x631 /* offset 5004 */ ,
+ 0x646, 0x632 /* offset 5006 */ ,
+ 0x646, 0x646 /* offset 5008 */ ,
+ 0x64a, 0x631 /* offset 5010 */ ,
+ 0x64a, 0x632 /* offset 5012 */ ,
+ 0x64a, 0x646 /* offset 5014 */ ,
+ 0x64a, 0x654, 0x62e /* offset 5016 */ ,
+ 0x64a, 0x654, 0x647 /* offset 5019 */ ,
+ 0x628, 0x647 /* offset 5022 */ ,
+ 0x62a, 0x647 /* offset 5024 */ ,
+ 0x635, 0x62e /* offset 5026 */ ,
+ 0x644, 0x647 /* offset 5028 */ ,
+ 0x646, 0x647 /* offset 5030 */ ,
+ 0x647, 0x670 /* offset 5032 */ ,
+ 0x64a, 0x647 /* offset 5034 */ ,
+ 0x62b, 0x647 /* offset 5036 */ ,
+ 0x633, 0x647 /* offset 5038 */ ,
+ 0x634, 0x645 /* offset 5040 */ ,
+ 0x634, 0x647 /* offset 5042 */ ,
+ 0x640, 0x64e, 0x651 /* offset 5044 */ ,
+ 0x640, 0x64f, 0x651 /* offset 5047 */ ,
+ 0x640, 0x650, 0x651 /* offset 5050 */ ,
+ 0x637, 0x649 /* offset 5053 */ ,
+ 0x637, 0x64a /* offset 5055 */ ,
+ 0x639, 0x649 /* offset 5057 */ ,
+ 0x639, 0x64a /* offset 5059 */ ,
+ 0x63a, 0x649 /* offset 5061 */ ,
+ 0x63a, 0x64a /* offset 5063 */ ,
+ 0x633, 0x649 /* offset 5065 */ ,
+ 0x633, 0x64a /* offset 5067 */ ,
+ 0x634, 0x649 /* offset 5069 */ ,
+ 0x634, 0x64a /* offset 5071 */ ,
+ 0x62d, 0x649 /* offset 5073 */ ,
+ 0x62d, 0x64a /* offset 5075 */ ,
+ 0x62c, 0x649 /* offset 5077 */ ,
+ 0x62c, 0x64a /* offset 5079 */ ,
+ 0x62e, 0x649 /* offset 5081 */ ,
+ 0x62e, 0x64a /* offset 5083 */ ,
+ 0x635, 0x649 /* offset 5085 */ ,
+ 0x635, 0x64a /* offset 5087 */ ,
+ 0x636, 0x649 /* offset 5089 */ ,
+ 0x636, 0x64a /* offset 5091 */ ,
+ 0x634, 0x62c /* offset 5093 */ ,
+ 0x634, 0x62d /* offset 5095 */ ,
+ 0x634, 0x62e /* offset 5097 */ ,
+ 0x634, 0x631 /* offset 5099 */ ,
+ 0x633, 0x631 /* offset 5101 */ ,
+ 0x635, 0x631 /* offset 5103 */ ,
+ 0x636, 0x631 /* offset 5105 */ ,
+ 0x627, 0x64b /* offset 5107 */ ,
+ 0x62a, 0x62c, 0x645 /* offset 5109 */ ,
+ 0x62a, 0x62d, 0x62c /* offset 5112 */ ,
+ 0x62a, 0x62d, 0x645 /* offset 5115 */ ,
+ 0x62a, 0x62e, 0x645 /* offset 5118 */ ,
+ 0x62a, 0x645, 0x62c /* offset 5121 */ ,
+ 0x62a, 0x645, 0x62d /* offset 5124 */ ,
+ 0x62a, 0x645, 0x62e /* offset 5127 */ ,
+ 0x62c, 0x645, 0x62d /* offset 5130 */ ,
+ 0x62d, 0x645, 0x64a /* offset 5133 */ ,
+ 0x62d, 0x645, 0x649 /* offset 5136 */ ,
+ 0x633, 0x62d, 0x62c /* offset 5139 */ ,
+ 0x633, 0x62c, 0x62d /* offset 5142 */ ,
+ 0x633, 0x62c, 0x649 /* offset 5145 */ ,
+ 0x633, 0x645, 0x62d /* offset 5148 */ ,
+ 0x633, 0x645, 0x62c /* offset 5151 */ ,
+ 0x633, 0x645, 0x645 /* offset 5154 */ ,
+ 0x635, 0x62d, 0x62d /* offset 5157 */ ,
+ 0x635, 0x645, 0x645 /* offset 5160 */ ,
+ 0x634, 0x62d, 0x645 /* offset 5163 */ ,
+ 0x634, 0x62c, 0x64a /* offset 5166 */ ,
+ 0x634, 0x645, 0x62e /* offset 5169 */ ,
+ 0x634, 0x645, 0x645 /* offset 5172 */ ,
+ 0x636, 0x62d, 0x649 /* offset 5175 */ ,
+ 0x636, 0x62e, 0x645 /* offset 5178 */ ,
+ 0x637, 0x645, 0x62d /* offset 5181 */ ,
+ 0x637, 0x645, 0x645 /* offset 5184 */ ,
+ 0x637, 0x645, 0x64a /* offset 5187 */ ,
+ 0x639, 0x62c, 0x645 /* offset 5190 */ ,
+ 0x639, 0x645, 0x645 /* offset 5193 */ ,
+ 0x639, 0x645, 0x649 /* offset 5196 */ ,
+ 0x63a, 0x645, 0x645 /* offset 5199 */ ,
+ 0x63a, 0x645, 0x64a /* offset 5202 */ ,
+ 0x63a, 0x645, 0x649 /* offset 5205 */ ,
+ 0x641, 0x62e, 0x645 /* offset 5208 */ ,
+ 0x642, 0x645, 0x62d /* offset 5211 */ ,
+ 0x642, 0x645, 0x645 /* offset 5214 */ ,
+ 0x644, 0x62d, 0x645 /* offset 5217 */ ,
+ 0x644, 0x62d, 0x64a /* offset 5220 */ ,
+ 0x644, 0x62d, 0x649 /* offset 5223 */ ,
+ 0x644, 0x62c, 0x62c /* offset 5226 */ ,
+ 0x644, 0x62e, 0x645 /* offset 5229 */ ,
+ 0x644, 0x645, 0x62d /* offset 5232 */ ,
+ 0x645, 0x62d, 0x62c /* offset 5235 */ ,
+ 0x645, 0x62d, 0x645 /* offset 5238 */ ,
+ 0x645, 0x62d, 0x64a /* offset 5241 */ ,
+ 0x645, 0x62c, 0x62d /* offset 5244 */ ,
+ 0x645, 0x62c, 0x645 /* offset 5247 */ ,
+ 0x645, 0x62e, 0x62c /* offset 5250 */ ,
+ 0x645, 0x62e, 0x645 /* offset 5253 */ ,
+ 0x645, 0x62c, 0x62e /* offset 5256 */ ,
+ 0x647, 0x645, 0x62c /* offset 5259 */ ,
+ 0x647, 0x645, 0x645 /* offset 5262 */ ,
+ 0x646, 0x62d, 0x645 /* offset 5265 */ ,
+ 0x646, 0x62d, 0x649 /* offset 5268 */ ,
+ 0x646, 0x62c, 0x645 /* offset 5271 */ ,
+ 0x646, 0x62c, 0x649 /* offset 5274 */ ,
+ 0x646, 0x645, 0x64a /* offset 5277 */ ,
+ 0x646, 0x645, 0x649 /* offset 5280 */ ,
+ 0x64a, 0x645, 0x645 /* offset 5283 */ ,
+ 0x628, 0x62e, 0x64a /* offset 5286 */ ,
+ 0x62a, 0x62c, 0x64a /* offset 5289 */ ,
+ 0x62a, 0x62c, 0x649 /* offset 5292 */ ,
+ 0x62a, 0x62e, 0x64a /* offset 5295 */ ,
+ 0x62a, 0x62e, 0x649 /* offset 5298 */ ,
+ 0x62a, 0x645, 0x64a /* offset 5301 */ ,
+ 0x62a, 0x645, 0x649 /* offset 5304 */ ,
+ 0x62c, 0x645, 0x64a /* offset 5307 */ ,
+ 0x62c, 0x62d, 0x649 /* offset 5310 */ ,
+ 0x62c, 0x645, 0x649 /* offset 5313 */ ,
+ 0x633, 0x62e, 0x649 /* offset 5316 */ ,
+ 0x635, 0x62d, 0x64a /* offset 5319 */ ,
+ 0x634, 0x62d, 0x64a /* offset 5322 */ ,
+ 0x636, 0x62d, 0x64a /* offset 5325 */ ,
+ 0x644, 0x62c, 0x64a /* offset 5328 */ ,
+ 0x644, 0x645, 0x64a /* offset 5331 */ ,
+ 0x64a, 0x62d, 0x64a /* offset 5334 */ ,
+ 0x64a, 0x62c, 0x64a /* offset 5337 */ ,
+ 0x64a, 0x645, 0x64a /* offset 5340 */ ,
+ 0x645, 0x645, 0x64a /* offset 5343 */ ,
+ 0x642, 0x645, 0x64a /* offset 5346 */ ,
+ 0x646, 0x62d, 0x64a /* offset 5349 */ ,
+ 0x639, 0x645, 0x64a /* offset 5352 */ ,
+ 0x643, 0x645, 0x64a /* offset 5355 */ ,
+ 0x646, 0x62c, 0x62d /* offset 5358 */ ,
+ 0x645, 0x62e, 0x64a /* offset 5361 */ ,
+ 0x644, 0x62c, 0x645 /* offset 5364 */ ,
+ 0x643, 0x645, 0x645 /* offset 5367 */ ,
+ 0x62c, 0x62d, 0x64a /* offset 5370 */ ,
+ 0x62d, 0x62c, 0x64a /* offset 5373 */ ,
+ 0x645, 0x62c, 0x64a /* offset 5376 */ ,
+ 0x641, 0x645, 0x64a /* offset 5379 */ ,
+ 0x628, 0x62d, 0x64a /* offset 5382 */ ,
+ 0x633, 0x62e, 0x64a /* offset 5385 */ ,
+ 0x646, 0x62c, 0x64a /* offset 5388 */ ,
+ 0x635, 0x644, 0x6d2 /* offset 5391 */ ,
+ 0x642, 0x644, 0x6d2 /* offset 5394 */ ,
+ 0x627, 0x644, 0x644, 0x647 /* offset 5397 */ ,
+ 0x627, 0x643, 0x628, 0x631 /* offset 5401 */ ,
+ 0x645, 0x62d, 0x645, 0x62f /* offset 5405 */ ,
+ 0x635, 0x644, 0x639, 0x645 /* offset 5409 */ ,
+ 0x631, 0x633, 0x648, 0x644 /* offset 5413 */ ,
+ 0x639, 0x644, 0x64a, 0x647 /* offset 5417 */ ,
+ 0x648, 0x633, 0x644, 0x645 /* offset 5421 */ ,
+ 0x635, 0x644, 0x649 /* offset 5425 */ ,
+ 0x635, 0x644, 0x649, 0x20, 0x627, 0x644, 0x644, 0x647, 0x20, 0x639, 0x644, 0x64a, 0x647, 0x20, 0x648, 0x633, 0x644, 0x645 /* offset 5428 */ ,
+ 0x62c, 0x644, 0x20, 0x62c, 0x644, 0x627, 0x644, 0x647 /* offset 5446 */ ,
+ 0x631, 0x6cc, 0x627, 0x644 /* offset 5454 */ ,
+ 0x2014 /* offset 5458 */ ,
+ 0x2013 /* offset 5459 */ ,
+ 0x5f /* offset 5460 */ ,
+ 0x7b /* offset 5461 */ ,
+ 0x7d /* offset 5462 */ ,
+ 0x3014 /* offset 5463 */ ,
+ 0x3015 /* offset 5464 */ ,
+ 0x3010 /* offset 5465 */ ,
+ 0x3011 /* offset 5466 */ ,
+ 0x300a /* offset 5467 */ ,
+ 0x300b /* offset 5468 */ ,
+ 0x300c /* offset 5469 */ ,
+ 0x300d /* offset 5470 */ ,
+ 0x300e /* offset 5471 */ ,
+ 0x300f /* offset 5472 */ ,
+ 0x2c /* offset 5473 */ ,
+ 0x3001 /* offset 5474 */ ,
+ 0x3a /* offset 5475 */ ,
+ 0x3f /* offset 5476 */ ,
+ 0x21 /* offset 5477 */ ,
+ 0x23 /* offset 5478 */ ,
+ 0x26 /* offset 5479 */ ,
+ 0x2a /* offset 5480 */ ,
+ 0x2d /* offset 5481 */ ,
+ 0x3c /* offset 5482 */ ,
+ 0x3e /* offset 5483 */ ,
+ 0x5c /* offset 5484 */ ,
+ 0x24 /* offset 5485 */ ,
+ 0x25 /* offset 5486 */ ,
+ 0x40 /* offset 5487 */ ,
+ 0x20, 0x64b /* offset 5488 */ ,
+ 0x640, 0x64b /* offset 5490 */ ,
+ 0x20, 0x64c /* offset 5492 */ ,
+ 0x20, 0x64d /* offset 5494 */ ,
+ 0x20, 0x64e /* offset 5496 */ ,
+ 0x640, 0x64e /* offset 5498 */ ,
+ 0x20, 0x64f /* offset 5500 */ ,
+ 0x640, 0x64f /* offset 5502 */ ,
+ 0x20, 0x650 /* offset 5504 */ ,
+ 0x640, 0x650 /* offset 5506 */ ,
+ 0x20, 0x651 /* offset 5508 */ ,
+ 0x640, 0x651 /* offset 5510 */ ,
+ 0x20, 0x652 /* offset 5512 */ ,
+ 0x640, 0x652 /* offset 5514 */ ,
+ 0x621 /* offset 5516 */ ,
+ 0x627 /* offset 5517 */ ,
+ 0x628 /* offset 5518 */ ,
+ 0x629 /* offset 5519 */ ,
+ 0x62a /* offset 5520 */ ,
+ 0x62b /* offset 5521 */ ,
+ 0x62c /* offset 5522 */ ,
+ 0x62d /* offset 5523 */ ,
+ 0x62e /* offset 5524 */ ,
+ 0x62f /* offset 5525 */ ,
+ 0x630 /* offset 5526 */ ,
+ 0x631 /* offset 5527 */ ,
+ 0x632 /* offset 5528 */ ,
+ 0x633 /* offset 5529 */ ,
+ 0x634 /* offset 5530 */ ,
+ 0x635 /* offset 5531 */ ,
+ 0x636 /* offset 5532 */ ,
+ 0x637 /* offset 5533 */ ,
+ 0x638 /* offset 5534 */ ,
+ 0x639 /* offset 5535 */ ,
+ 0x63a /* offset 5536 */ ,
+ 0x641 /* offset 5537 */ ,
+ 0x642 /* offset 5538 */ ,
+ 0x643 /* offset 5539 */ ,
+ 0x644 /* offset 5540 */ ,
+ 0x645 /* offset 5541 */ ,
+ 0x646 /* offset 5542 */ ,
+ 0x647 /* offset 5543 */ ,
+ 0x648 /* offset 5544 */ ,
+ 0x64a /* offset 5545 */ ,
+ 0x644, 0x627, 0x653 /* offset 5546 */ ,
+ 0x644, 0x627, 0x654 /* offset 5549 */ ,
+ 0x644, 0x627, 0x655 /* offset 5552 */ ,
+ 0x644, 0x627 /* offset 5555 */ ,
+ 0x22 /* offset 5557 */ ,
+ 0x27 /* offset 5558 */ ,
+ 0x2f /* offset 5559 */ ,
+ 0x5b /* offset 5560 */ ,
+ 0x5d /* offset 5561 */ ,
+ 0x5e /* offset 5562 */ ,
+ 0x7c /* offset 5563 */ ,
+ 0x7e /* offset 5564 */ ,
+ 0x2985 /* offset 5565 */ ,
+ 0x2986 /* offset 5566 */ ,
+ 0x3002 /* offset 5567 */ ,
+ 0x30fb /* offset 5568 */ ,
+ 0x30a1 /* offset 5569 */ ,
+ 0x30a3 /* offset 5570 */ ,
+ 0x30a5 /* offset 5571 */ ,
+ 0x30a7 /* offset 5572 */ ,
+ 0x30a9 /* offset 5573 */ ,
+ 0x30e3 /* offset 5574 */ ,
+ 0x30e5 /* offset 5575 */ ,
+ 0x30e7 /* offset 5576 */ ,
+ 0x30c3 /* offset 5577 */ ,
+ 0x30fc /* offset 5578 */ ,
+ 0x30f3 /* offset 5579 */ ,
+ 0x3099 /* offset 5580 */ ,
+ 0x309a /* offset 5581 */ ,
+ 0xa2 /* offset 5582 */ ,
+ 0xa3 /* offset 5583 */ ,
+ 0xac /* offset 5584 */ ,
+ 0xa6 /* offset 5585 */ ,
+ 0xa5 /* offset 5586 */ ,
+ 0x20a9 /* offset 5587 */ ,
+ 0x2502 /* offset 5588 */ ,
+ 0x2190 /* offset 5589 */ ,
+ 0x2191 /* offset 5590 */ ,
+ 0x2192 /* offset 5591 */ ,
+ 0x2193 /* offset 5592 */ ,
+ 0x25a0 /* offset 5593 */ ,
+ 0x25cb /* offset 5594 */ ,
+ 0x1d157, 0x1d165 /* offset 5595 */ ,
+ 0x1d158, 0x1d165 /* offset 5597 */ ,
+ 0x1d158, 0x1d165, 0x1d16e /* offset 5599 */ ,
+ 0x1d158, 0x1d165, 0x1d16f /* offset 5602 */ ,
+ 0x1d158, 0x1d165, 0x1d170 /* offset 5605 */ ,
+ 0x1d158, 0x1d165, 0x1d171 /* offset 5608 */ ,
+ 0x1d158, 0x1d165, 0x1d172 /* offset 5611 */ ,
+ 0x1d1b9, 0x1d165 /* offset 5614 */ ,
+ 0x1d1ba, 0x1d165 /* offset 5616 */ ,
+ 0x1d1b9, 0x1d165, 0x1d16e /* offset 5618 */ ,
+ 0x1d1ba, 0x1d165, 0x1d16e /* offset 5621 */ ,
+ 0x1d1b9, 0x1d165, 0x1d16f /* offset 5624 */ ,
+ 0x1d1ba, 0x1d165, 0x1d16f /* offset 5627 */ ,
+ 0x391 /* offset 5630 */ ,
+ 0x392 /* offset 5631 */ ,
+ 0x394 /* offset 5632 */ ,
+ 0x395 /* offset 5633 */ ,
+ 0x396 /* offset 5634 */ ,
+ 0x397 /* offset 5635 */ ,
+ 0x399 /* offset 5636 */ ,
+ 0x39a /* offset 5637 */ ,
+ 0x39b /* offset 5638 */ ,
+ 0x39c /* offset 5639 */ ,
+ 0x39d /* offset 5640 */ ,
+ 0x39e /* offset 5641 */ ,
+ 0x39f /* offset 5642 */ ,
+ 0x3a1 /* offset 5643 */ ,
+ 0x3a3 /* offset 5644 */ ,
+ 0x3a4 /* offset 5645 */ ,
+ 0x3a6 /* offset 5646 */ ,
+ 0x3a7 /* offset 5647 */ ,
+ 0x3a8 /* offset 5648 */ ,
+ 0x2207 /* offset 5649 */ ,
+ 0x3b1 /* offset 5650 */ ,
+ 0x3b4 /* offset 5651 */ ,
+ 0x3b6 /* offset 5652 */ ,
+ 0x3b7 /* offset 5653 */ ,
+ 0x3bb /* offset 5654 */ ,
+ 0x3bd /* offset 5655 */ ,
+ 0x3be /* offset 5656 */ ,
+ 0x3bf /* offset 5657 */ ,
+ 0x3c3 /* offset 5658 */ ,
+ 0x3c4 /* offset 5659 */ ,
+ 0x3c5 /* offset 5660 */ ,
+ 0x3c7 /* offset 5661 */ ,
+ 0x3c8 /* offset 5662 */ ,
+ 0x3c9 /* offset 5663 */ ,
+ 0x2202 /* offset 5664 */ ,
+ 0x4e3d /* offset 5665 */ ,
+ 0x4e38 /* offset 5666 */ ,
+ 0x4e41 /* offset 5667 */ ,
+ 0x20122 /* offset 5668 */ ,
+ 0x4f60 /* offset 5669 */ ,
+ 0x4fbb /* offset 5670 */ ,
+ 0x5002 /* offset 5671 */ ,
+ 0x507a /* offset 5672 */ ,
+ 0x5099 /* offset 5673 */ ,
+ 0x50cf /* offset 5674 */ ,
+ 0x349e /* offset 5675 */ ,
+ 0x2063a /* offset 5676 */ ,
+ 0x5154 /* offset 5677 */ ,
+ 0x5164 /* offset 5678 */ ,
+ 0x5177 /* offset 5679 */ ,
+ 0x2051c /* offset 5680 */ ,
+ 0x34b9 /* offset 5681 */ ,
+ 0x5167 /* offset 5682 */ ,
+ 0x518d /* offset 5683 */ ,
+ 0x2054b /* offset 5684 */ ,
+ 0x5197 /* offset 5685 */ ,
+ 0x51a4 /* offset 5686 */ ,
+ 0x4ecc /* offset 5687 */ ,
+ 0x51ac /* offset 5688 */ ,
+ 0x51b5 /* offset 5689 */ ,
+ 0x291df /* offset 5690 */ ,
+ 0x5203 /* offset 5691 */ ,
+ 0x34df /* offset 5692 */ ,
+ 0x523b /* offset 5693 */ ,
+ 0x5246 /* offset 5694 */ ,
+ 0x5272 /* offset 5695 */ ,
+ 0x5277 /* offset 5696 */ ,
+ 0x3515 /* offset 5697 */ ,
+ 0x52c7 /* offset 5698 */ ,
+ 0x52fa /* offset 5699 */ ,
+ 0x5305 /* offset 5700 */ ,
+ 0x5306 /* offset 5701 */ ,
+ 0x5349 /* offset 5702 */ ,
+ 0x535a /* offset 5703 */ ,
+ 0x5373 /* offset 5704 */ ,
+ 0x537d /* offset 5705 */ ,
+ 0x537f /* offset 5706 */ ,
+ 0x20a2c /* offset 5707 */ ,
+ 0x7070 /* offset 5708 */ ,
+ 0x53ca /* offset 5709 */ ,
+ 0x53df /* offset 5710 */ ,
+ 0x20b63 /* offset 5711 */ ,
+ 0x53eb /* offset 5712 */ ,
+ 0x53f1 /* offset 5713 */ ,
+ 0x5406 /* offset 5714 */ ,
+ 0x549e /* offset 5715 */ ,
+ 0x5438 /* offset 5716 */ ,
+ 0x5448 /* offset 5717 */ ,
+ 0x5468 /* offset 5718 */ ,
+ 0x54a2 /* offset 5719 */ ,
+ 0x54f6 /* offset 5720 */ ,
+ 0x5510 /* offset 5721 */ ,
+ 0x5553 /* offset 5722 */ ,
+ 0x5563 /* offset 5723 */ ,
+ 0x5584 /* offset 5724 */ ,
+ 0x5599 /* offset 5725 */ ,
+ 0x55ab /* offset 5726 */ ,
+ 0x55b3 /* offset 5727 */ ,
+ 0x55c2 /* offset 5728 */ ,
+ 0x5716 /* offset 5729 */ ,
+ 0x5717 /* offset 5730 */ ,
+ 0x5651 /* offset 5731 */ ,
+ 0x5674 /* offset 5732 */ ,
+ 0x58ee /* offset 5733 */ ,
+ 0x57ce /* offset 5734 */ ,
+ 0x57f4 /* offset 5735 */ ,
+ 0x580d /* offset 5736 */ ,
+ 0x578b /* offset 5737 */ ,
+ 0x5832 /* offset 5738 */ ,
+ 0x5831 /* offset 5739 */ ,
+ 0x58ac /* offset 5740 */ ,
+ 0x214e4 /* offset 5741 */ ,
+ 0x58f2 /* offset 5742 */ ,
+ 0x58f7 /* offset 5743 */ ,
+ 0x5906 /* offset 5744 */ ,
+ 0x591a /* offset 5745 */ ,
+ 0x5922 /* offset 5746 */ ,
+ 0x5962 /* offset 5747 */ ,
+ 0x216a8 /* offset 5748 */ ,
+ 0x216ea /* offset 5749 */ ,
+ 0x59ec /* offset 5750 */ ,
+ 0x5a1b /* offset 5751 */ ,
+ 0x5a27 /* offset 5752 */ ,
+ 0x59d8 /* offset 5753 */ ,
+ 0x5a66 /* offset 5754 */ ,
+ 0x36ee /* offset 5755 */ ,
+ 0x2136a /* offset 5756 */ ,
+ 0x5b08 /* offset 5757 */ ,
+ 0x5b3e /* offset 5758 */ ,
+ 0x219c8 /* offset 5759 */ ,
+ 0x5bc3 /* offset 5760 */ ,
+ 0x5bd8 /* offset 5761 */ ,
+ 0x5bf3 /* offset 5762 */ ,
+ 0x21b18 /* offset 5763 */ ,
+ 0x5bff /* offset 5764 */ ,
+ 0x5c06 /* offset 5765 */ ,
+ 0x5f33 /* offset 5766 */ ,
+ 0x3781 /* offset 5767 */ ,
+ 0x5c60 /* offset 5768 */ ,
+ 0x5cc0 /* offset 5769 */ ,
+ 0x5c8d /* offset 5770 */ ,
+ 0x21de4 /* offset 5771 */ ,
+ 0x5d43 /* offset 5772 */ ,
+ 0x21de6 /* offset 5773 */ ,
+ 0x5d6e /* offset 5774 */ ,
+ 0x5d6b /* offset 5775 */ ,
+ 0x5d7c /* offset 5776 */ ,
+ 0x5de1 /* offset 5777 */ ,
+ 0x5de2 /* offset 5778 */ ,
+ 0x382f /* offset 5779 */ ,
+ 0x5dfd /* offset 5780 */ ,
+ 0x5e28 /* offset 5781 */ ,
+ 0x5e3d /* offset 5782 */ ,
+ 0x5e69 /* offset 5783 */ ,
+ 0x3862 /* offset 5784 */ ,
+ 0x22183 /* offset 5785 */ ,
+ 0x387c /* offset 5786 */ ,
+ 0x5eb0 /* offset 5787 */ ,
+ 0x5eb3 /* offset 5788 */ ,
+ 0x5eb6 /* offset 5789 */ ,
+ 0x2a392 /* offset 5790 */ ,
+ 0x22331 /* offset 5791 */ ,
+ 0x8201 /* offset 5792 */ ,
+ 0x5f22 /* offset 5793 */ ,
+ 0x38c7 /* offset 5794 */ ,
+ 0x232b8 /* offset 5795 */ ,
+ 0x261da /* offset 5796 */ ,
+ 0x5f62 /* offset 5797 */ ,
+ 0x5f6b /* offset 5798 */ ,
+ 0x38e3 /* offset 5799 */ ,
+ 0x5f9a /* offset 5800 */ ,
+ 0x5fcd /* offset 5801 */ ,
+ 0x5fd7 /* offset 5802 */ ,
+ 0x5ff9 /* offset 5803 */ ,
+ 0x6081 /* offset 5804 */ ,
+ 0x393a /* offset 5805 */ ,
+ 0x391c /* offset 5806 */ ,
+ 0x226d4 /* offset 5807 */ ,
+ 0x60c7 /* offset 5808 */ ,
+ 0x6148 /* offset 5809 */ ,
+ 0x614c /* offset 5810 */ ,
+ 0x614e /* offset 5811 */ ,
+ 0x617a /* offset 5812 */ ,
+ 0x61b2 /* offset 5813 */ ,
+ 0x61a4 /* offset 5814 */ ,
+ 0x61af /* offset 5815 */ ,
+ 0x61de /* offset 5816 */ ,
+ 0x6210 /* offset 5817 */ ,
+ 0x621b /* offset 5818 */ ,
+ 0x625d /* offset 5819 */ ,
+ 0x62b1 /* offset 5820 */ ,
+ 0x62d4 /* offset 5821 */ ,
+ 0x6350 /* offset 5822 */ ,
+ 0x22b0c /* offset 5823 */ ,
+ 0x633d /* offset 5824 */ ,
+ 0x62fc /* offset 5825 */ ,
+ 0x6368 /* offset 5826 */ ,
+ 0x6383 /* offset 5827 */ ,
+ 0x63e4 /* offset 5828 */ ,
+ 0x22bf1 /* offset 5829 */ ,
+ 0x6422 /* offset 5830 */ ,
+ 0x63c5 /* offset 5831 */ ,
+ 0x63a9 /* offset 5832 */ ,
+ 0x3a2e /* offset 5833 */ ,
+ 0x6469 /* offset 5834 */ ,
+ 0x647e /* offset 5835 */ ,
+ 0x649d /* offset 5836 */ ,
+ 0x6477 /* offset 5837 */ ,
+ 0x3a6c /* offset 5838 */ ,
+ 0x656c /* offset 5839 */ ,
+ 0x2300a /* offset 5840 */ ,
+ 0x65e3 /* offset 5841 */ ,
+ 0x66f8 /* offset 5842 */ ,
+ 0x6649 /* offset 5843 */ ,
+ 0x3b19 /* offset 5844 */ ,
+ 0x3b08 /* offset 5845 */ ,
+ 0x3ae4 /* offset 5846 */ ,
+ 0x5192 /* offset 5847 */ ,
+ 0x5195 /* offset 5848 */ ,
+ 0x6700 /* offset 5849 */ ,
+ 0x669c /* offset 5850 */ ,
+ 0x80ad /* offset 5851 */ ,
+ 0x43d9 /* offset 5852 */ ,
+ 0x671b /* offset 5853 */ ,
+ 0x6721 /* offset 5854 */ ,
+ 0x675e /* offset 5855 */ ,
+ 0x6753 /* offset 5856 */ ,
+ 0x233c3 /* offset 5857 */ ,
+ 0x3b49 /* offset 5858 */ ,
+ 0x67fa /* offset 5859 */ ,
+ 0x6785 /* offset 5860 */ ,
+ 0x6852 /* offset 5861 */ ,
+ 0x2346d /* offset 5862 */ ,
+ 0x688e /* offset 5863 */ ,
+ 0x681f /* offset 5864 */ ,
+ 0x6914 /* offset 5865 */ ,
+ 0x3b9d /* offset 5866 */ ,
+ 0x6942 /* offset 5867 */ ,
+ 0x69a3 /* offset 5868 */ ,
+ 0x69ea /* offset 5869 */ ,
+ 0x6aa8 /* offset 5870 */ ,
+ 0x236a3 /* offset 5871 */ ,
+ 0x6adb /* offset 5872 */ ,
+ 0x3c18 /* offset 5873 */ ,
+ 0x6b21 /* offset 5874 */ ,
+ 0x238a7 /* offset 5875 */ ,
+ 0x6b54 /* offset 5876 */ ,
+ 0x3c4e /* offset 5877 */ ,
+ 0x6b72 /* offset 5878 */ ,
+ 0x6b9f /* offset 5879 */ ,
+ 0x6bbb /* offset 5880 */ ,
+ 0x23a8d /* offset 5881 */ ,
+ 0x21d0b /* offset 5882 */ ,
+ 0x23afa /* offset 5883 */ ,
+ 0x6c4e /* offset 5884 */ ,
+ 0x23cbc /* offset 5885 */ ,
+ 0x6cbf /* offset 5886 */ ,
+ 0x6ccd /* offset 5887 */ ,
+ 0x6c67 /* offset 5888 */ ,
+ 0x6d16 /* offset 5889 */ ,
+ 0x6d3e /* offset 5890 */ ,
+ 0x6d69 /* offset 5891 */ ,
+ 0x6d78 /* offset 5892 */ ,
+ 0x6d85 /* offset 5893 */ ,
+ 0x23d1e /* offset 5894 */ ,
+ 0x6d34 /* offset 5895 */ ,
+ 0x6e2f /* offset 5896 */ ,
+ 0x6e6e /* offset 5897 */ ,
+ 0x3d33 /* offset 5898 */ ,
+ 0x6ecb /* offset 5899 */ ,
+ 0x6ec7 /* offset 5900 */ ,
+ 0x23ed1 /* offset 5901 */ ,
+ 0x6df9 /* offset 5902 */ ,
+ 0x6f6e /* offset 5903 */ ,
+ 0x23f5e /* offset 5904 */ ,
+ 0x23f8e /* offset 5905 */ ,
+ 0x6fc6 /* offset 5906 */ ,
+ 0x7039 /* offset 5907 */ ,
+ 0x701e /* offset 5908 */ ,
+ 0x701b /* offset 5909 */ ,
+ 0x3d96 /* offset 5910 */ ,
+ 0x704a /* offset 5911 */ ,
+ 0x707d /* offset 5912 */ ,
+ 0x7077 /* offset 5913 */ ,
+ 0x70ad /* offset 5914 */ ,
+ 0x20525 /* offset 5915 */ ,
+ 0x7145 /* offset 5916 */ ,
+ 0x24263 /* offset 5917 */ ,
+ 0x719c /* offset 5918 */ ,
+ 0x43ab /* offset 5919 */ ,
+ 0x7228 /* offset 5920 */ ,
+ 0x7235 /* offset 5921 */ ,
+ 0x7250 /* offset 5922 */ ,
+ 0x24608 /* offset 5923 */ ,
+ 0x7280 /* offset 5924 */ ,
+ 0x7295 /* offset 5925 */ ,
+ 0x24735 /* offset 5926 */ ,
+ 0x24814 /* offset 5927 */ ,
+ 0x737a /* offset 5928 */ ,
+ 0x738b /* offset 5929 */ ,
+ 0x3eac /* offset 5930 */ ,
+ 0x73a5 /* offset 5931 */ ,
+ 0x3eb8 /* offset 5932 */ ,
+ 0x7447 /* offset 5933 */ ,
+ 0x745c /* offset 5934 */ ,
+ 0x7471 /* offset 5935 */ ,
+ 0x7485 /* offset 5936 */ ,
+ 0x74ca /* offset 5937 */ ,
+ 0x3f1b /* offset 5938 */ ,
+ 0x7524 /* offset 5939 */ ,
+ 0x24c36 /* offset 5940 */ ,
+ 0x753e /* offset 5941 */ ,
+ 0x24c92 /* offset 5942 */ ,
+ 0x2219f /* offset 5943 */ ,
+ 0x7610 /* offset 5944 */ ,
+ 0x24fa1 /* offset 5945 */ ,
+ 0x24fb8 /* offset 5946 */ ,
+ 0x25044 /* offset 5947 */ ,
+ 0x3ffc /* offset 5948 */ ,
+ 0x4008 /* offset 5949 */ ,
+ 0x76f4 /* offset 5950 */ ,
+ 0x250f3 /* offset 5951 */ ,
+ 0x250f2 /* offset 5952 */ ,
+ 0x25119 /* offset 5953 */ ,
+ 0x25133 /* offset 5954 */ ,
+ 0x771e /* offset 5955 */ ,
+ 0x771f /* offset 5956 */ ,
+ 0x774a /* offset 5957 */ ,
+ 0x4039 /* offset 5958 */ ,
+ 0x778b /* offset 5959 */ ,
+ 0x4046 /* offset 5960 */ ,
+ 0x4096 /* offset 5961 */ ,
+ 0x2541d /* offset 5962 */ ,
+ 0x784e /* offset 5963 */ ,
+ 0x78cc /* offset 5964 */ ,
+ 0x40e3 /* offset 5965 */ ,
+ 0x25626 /* offset 5966 */ ,
+ 0x2569a /* offset 5967 */ ,
+ 0x256c5 /* offset 5968 */ ,
+ 0x79eb /* offset 5969 */ ,
+ 0x412f /* offset 5970 */ ,
+ 0x7a4a /* offset 5971 */ ,
+ 0x7a4f /* offset 5972 */ ,
+ 0x2597c /* offset 5973 */ ,
+ 0x25aa7 /* offset 5974 */ ,
+ 0x7aae /* offset 5975 */ ,
+ 0x4202 /* offset 5976 */ ,
+ 0x25bab /* offset 5977 */ ,
+ 0x7bc6 /* offset 5978 */ ,
+ 0x7bc9 /* offset 5979 */ ,
+ 0x4227 /* offset 5980 */ ,
+ 0x25c80 /* offset 5981 */ ,
+ 0x7cd2 /* offset 5982 */ ,
+ 0x42a0 /* offset 5983 */ ,
+ 0x7ce8 /* offset 5984 */ ,
+ 0x7ce3 /* offset 5985 */ ,
+ 0x7d00 /* offset 5986 */ ,
+ 0x25f86 /* offset 5987 */ ,
+ 0x7d63 /* offset 5988 */ ,
+ 0x4301 /* offset 5989 */ ,
+ 0x7dc7 /* offset 5990 */ ,
+ 0x7e02 /* offset 5991 */ ,
+ 0x7e45 /* offset 5992 */ ,
+ 0x4334 /* offset 5993 */ ,
+ 0x26228 /* offset 5994 */ ,
+ 0x26247 /* offset 5995 */ ,
+ 0x4359 /* offset 5996 */ ,
+ 0x262d9 /* offset 5997 */ ,
+ 0x7f7a /* offset 5998 */ ,
+ 0x2633e /* offset 5999 */ ,
+ 0x7f95 /* offset 6000 */ ,
+ 0x7ffa /* offset 6001 */ ,
+ 0x264da /* offset 6002 */ ,
+ 0x26523 /* offset 6003 */ ,
+ 0x8060 /* offset 6004 */ ,
+ 0x265a8 /* offset 6005 */ ,
+ 0x8070 /* offset 6006 */ ,
+ 0x2335f /* offset 6007 */ ,
+ 0x43d5 /* offset 6008 */ ,
+ 0x80b2 /* offset 6009 */ ,
+ 0x8103 /* offset 6010 */ ,
+ 0x440b /* offset 6011 */ ,
+ 0x813e /* offset 6012 */ ,
+ 0x5ab5 /* offset 6013 */ ,
+ 0x267a7 /* offset 6014 */ ,
+ 0x267b5 /* offset 6015 */ ,
+ 0x23393 /* offset 6016 */ ,
+ 0x2339c /* offset 6017 */ ,
+ 0x8204 /* offset 6018 */ ,
+ 0x8f9e /* offset 6019 */ ,
+ 0x446b /* offset 6020 */ ,
+ 0x8291 /* offset 6021 */ ,
+ 0x828b /* offset 6022 */ ,
+ 0x829d /* offset 6023 */ ,
+ 0x52b3 /* offset 6024 */ ,
+ 0x82b1 /* offset 6025 */ ,
+ 0x82b3 /* offset 6026 */ ,
+ 0x82bd /* offset 6027 */ ,
+ 0x82e6 /* offset 6028 */ ,
+ 0x26b3c /* offset 6029 */ ,
+ 0x831d /* offset 6030 */ ,
+ 0x8363 /* offset 6031 */ ,
+ 0x83ad /* offset 6032 */ ,
+ 0x8323 /* offset 6033 */ ,
+ 0x83bd /* offset 6034 */ ,
+ 0x83e7 /* offset 6035 */ ,
+ 0x8353 /* offset 6036 */ ,
+ 0x83ca /* offset 6037 */ ,
+ 0x83cc /* offset 6038 */ ,
+ 0x83dc /* offset 6039 */ ,
+ 0x26c36 /* offset 6040 */ ,
+ 0x26d6b /* offset 6041 */ ,
+ 0x26cd5 /* offset 6042 */ ,
+ 0x452b /* offset 6043 */ ,
+ 0x84f1 /* offset 6044 */ ,
+ 0x84f3 /* offset 6045 */ ,
+ 0x8516 /* offset 6046 */ ,
+ 0x273ca /* offset 6047 */ ,
+ 0x8564 /* offset 6048 */ ,
+ 0x26f2c /* offset 6049 */ ,
+ 0x455d /* offset 6050 */ ,
+ 0x4561 /* offset 6051 */ ,
+ 0x26fb1 /* offset 6052 */ ,
+ 0x270d2 /* offset 6053 */ ,
+ 0x456b /* offset 6054 */ ,
+ 0x8650 /* offset 6055 */ ,
+ 0x8667 /* offset 6056 */ ,
+ 0x8669 /* offset 6057 */ ,
+ 0x86a9 /* offset 6058 */ ,
+ 0x8688 /* offset 6059 */ ,
+ 0x870e /* offset 6060 */ ,
+ 0x86e2 /* offset 6061 */ ,
+ 0x8779 /* offset 6062 */ ,
+ 0x8728 /* offset 6063 */ ,
+ 0x876b /* offset 6064 */ ,
+ 0x8786 /* offset 6065 */ ,
+ 0x4d57 /* offset 6066 */ ,
+ 0x87e1 /* offset 6067 */ ,
+ 0x8801 /* offset 6068 */ ,
+ 0x45f9 /* offset 6069 */ ,
+ 0x8860 /* offset 6070 */ ,
+ 0x27667 /* offset 6071 */ ,
+ 0x88d7 /* offset 6072 */ ,
+ 0x88de /* offset 6073 */ ,
+ 0x4635 /* offset 6074 */ ,
+ 0x88fa /* offset 6075 */ ,
+ 0x34bb /* offset 6076 */ ,
+ 0x278ae /* offset 6077 */ ,
+ 0x27966 /* offset 6078 */ ,
+ 0x46be /* offset 6079 */ ,
+ 0x46c7 /* offset 6080 */ ,
+ 0x8aa0 /* offset 6081 */ ,
+ 0x8aed /* offset 6082 */ ,
+ 0x8b8a /* offset 6083 */ ,
+ 0x27ca8 /* offset 6084 */ ,
+ 0x8cab /* offset 6085 */ ,
+ 0x8cc1 /* offset 6086 */ ,
+ 0x8d1b /* offset 6087 */ ,
+ 0x8d77 /* offset 6088 */ ,
+ 0x27f2f /* offset 6089 */ ,
+ 0x20804 /* offset 6090 */ ,
+ 0x8dcb /* offset 6091 */ ,
+ 0x8dbc /* offset 6092 */ ,
+ 0x8df0 /* offset 6093 */ ,
+ 0x208de /* offset 6094 */ ,
+ 0x8ed4 /* offset 6095 */ ,
+ 0x8f38 /* offset 6096 */ ,
+ 0x285d2 /* offset 6097 */ ,
+ 0x285ed /* offset 6098 */ ,
+ 0x9094 /* offset 6099 */ ,
+ 0x90f1 /* offset 6100 */ ,
+ 0x9111 /* offset 6101 */ ,
+ 0x2872e /* offset 6102 */ ,
+ 0x911b /* offset 6103 */ ,
+ 0x9238 /* offset 6104 */ ,
+ 0x92d7 /* offset 6105 */ ,
+ 0x92d8 /* offset 6106 */ ,
+ 0x927c /* offset 6107 */ ,
+ 0x93f9 /* offset 6108 */ ,
+ 0x9415 /* offset 6109 */ ,
+ 0x28bfa /* offset 6110 */ ,
+ 0x958b /* offset 6111 */ ,
+ 0x4995 /* offset 6112 */ ,
+ 0x95b7 /* offset 6113 */ ,
+ 0x28d77 /* offset 6114 */ ,
+ 0x49e6 /* offset 6115 */ ,
+ 0x96c3 /* offset 6116 */ ,
+ 0x5db2 /* offset 6117 */ ,
+ 0x9723 /* offset 6118 */ ,
+ 0x29145 /* offset 6119 */ ,
+ 0x2921a /* offset 6120 */ ,
+ 0x4a6e /* offset 6121 */ ,
+ 0x4a76 /* offset 6122 */ ,
+ 0x97e0 /* offset 6123 */ ,
+ 0x2940a /* offset 6124 */ ,
+ 0x4ab2 /* offset 6125 */ ,
+ 0x29496 /* offset 6126 */ ,
+ 0x980b /* offset 6127 */ ,
+ 0x9829 /* offset 6128 */ ,
+ 0x295b6 /* offset 6129 */ ,
+ 0x98e2 /* offset 6130 */ ,
+ 0x4b33 /* offset 6131 */ ,
+ 0x9929 /* offset 6132 */ ,
+ 0x99a7 /* offset 6133 */ ,
+ 0x99c2 /* offset 6134 */ ,
+ 0x99fe /* offset 6135 */ ,
+ 0x4bce /* offset 6136 */ ,
+ 0x29b30 /* offset 6137 */ ,
+ 0x9b12 /* offset 6138 */ ,
+ 0x9c40 /* offset 6139 */ ,
+ 0x9cfd /* offset 6140 */ ,
+ 0x4cce /* offset 6141 */ ,
+ 0x4ced /* offset 6142 */ ,
+ 0x9d67 /* offset 6143 */ ,
+ 0x2a0ce /* offset 6144 */ ,
+ 0x4cf8 /* offset 6145 */ ,
+ 0x2a105 /* offset 6146 */ ,
+ 0x2a20e /* offset 6147 */ ,
+ 0x2a291 /* offset 6148 */ ,
+ 0x4d56 /* offset 6149 */ ,
+ 0x9efe /* offset 6150 */ ,
+ 0x9f05 /* offset 6151 */ ,
+ 0x9f0f /* offset 6152 */ ,
+ 0x9f16 /* offset 6153 */ ,
+ 0x2a600 /* offset 6154 */
+};
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.cc
new file mode 100644
index 00000000000..381e4ca1fce
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.cc
@@ -0,0 +1,293 @@
+//========================================================================
+//
+// UnicodeMap.cc
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "Error.h"
+#include "GlobalParams.h"
+#include "UnicodeMap.h"
+
+//------------------------------------------------------------------------
+
+#define maxExtCode 16
+
+struct UnicodeMapExt {
+ Unicode u; // Unicode char
+ char code[maxExtCode];
+ Guint nBytes;
+};
+
+//------------------------------------------------------------------------
+
+UnicodeMap *UnicodeMap::parse(GooString *encodingNameA) {
+ FILE *f;
+ UnicodeMap *map;
+ UnicodeMapRange *range;
+ UnicodeMapExt *eMap;
+ int size, eMapsSize;
+ char buf[256];
+ int line, nBytes, i, x;
+ char *tok1, *tok2, *tok3;
+
+ if (!(f = globalParams->getUnicodeMapFile(encodingNameA))) {
+ error(-1, "Couldn't find unicodeMap file for the '%s' encoding",
+ encodingNameA->getCString());
+ return NULL;
+ }
+
+ map = new UnicodeMap(encodingNameA->copy());
+
+ size = 8;
+ map->ranges = (UnicodeMapRange *)gmallocn(size, sizeof(UnicodeMapRange));
+ eMapsSize = 0;
+
+ line = 1;
+ while (getLine(buf, sizeof(buf), f)) {
+ if ((tok1 = strtok(buf, " \t\r\n")) &&
+ (tok2 = strtok(NULL, " \t\r\n"))) {
+ if (!(tok3 = strtok(NULL, " \t\r\n"))) {
+ tok3 = tok2;
+ tok2 = tok1;
+ }
+ nBytes = strlen(tok3) / 2;
+ if (nBytes <= 4) {
+ if (map->len == size) {
+ size *= 2;
+ map->ranges = (UnicodeMapRange *)
+ greallocn(map->ranges, size, sizeof(UnicodeMapRange));
+ }
+ range = &map->ranges[map->len];
+ sscanf(tok1, "%x", &range->start);
+ sscanf(tok2, "%x", &range->end);
+ sscanf(tok3, "%x", &range->code);
+ range->nBytes = nBytes;
+ ++map->len;
+ } else if (tok2 == tok1) {
+ if (map->eMapsLen == eMapsSize) {
+ eMapsSize += 16;
+ map->eMaps = (UnicodeMapExt *)
+ greallocn(map->eMaps, eMapsSize, sizeof(UnicodeMapExt));
+ }
+ eMap = &map->eMaps[map->eMapsLen];
+ sscanf(tok1, "%x", &eMap->u);
+ for (i = 0; i < nBytes; ++i) {
+ sscanf(tok3 + i*2, "%2x", &x);
+ eMap->code[i] = (char)x;
+ }
+ eMap->nBytes = nBytes;
+ ++map->eMapsLen;
+ } else {
+ error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding",
+ line, encodingNameA->getCString());
+ }
+ } else {
+ error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding",
+ line, encodingNameA->getCString());
+ }
+ ++line;
+ }
+
+ fclose(f);
+
+ return map;
+}
+
+UnicodeMap::UnicodeMap(GooString *encodingNameA) {
+ encodingName = encodingNameA;
+ unicodeOut = gFalse;
+ kind = unicodeMapUser;
+ ranges = NULL;
+ len = 0;
+ eMaps = NULL;
+ eMapsLen = 0;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+ UnicodeMapRange *rangesA, int lenA) {
+ encodingName = new GooString(encodingNameA);
+ unicodeOut = unicodeOutA;
+ kind = unicodeMapResident;
+ ranges = rangesA;
+ len = lenA;
+ eMaps = NULL;
+ eMapsLen = 0;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+ UnicodeMapFunc funcA) {
+ encodingName = new GooString(encodingNameA);
+ unicodeOut = unicodeOutA;
+ kind = unicodeMapFunc;
+ func = funcA;
+ eMaps = NULL;
+ eMapsLen = 0;
+ refCnt = 1;
+#if MULTITHREADED
+ gInitMutex(&mutex);
+#endif
+}
+
+UnicodeMap::~UnicodeMap() {
+ delete encodingName;
+ if (kind == unicodeMapUser && ranges) {
+ gfree(ranges);
+ }
+ if (eMaps) {
+ gfree(eMaps);
+ }
+#if MULTITHREADED
+ gDestroyMutex(&mutex);
+#endif
+}
+
+void UnicodeMap::incRefCnt() {
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ ++refCnt;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+}
+
+void UnicodeMap::decRefCnt() {
+ GBool done;
+
+#if MULTITHREADED
+ gLockMutex(&mutex);
+#endif
+ done = --refCnt == 0;
+#if MULTITHREADED
+ gUnlockMutex(&mutex);
+#endif
+ if (done) {
+ delete this;
+ }
+}
+
+GBool UnicodeMap::match(GooString *encodingNameA) {
+ return !encodingName->cmp(encodingNameA);
+}
+
+int UnicodeMap::mapUnicode(Unicode u, char *buf, int bufSize) {
+ int a, b, m, n, i, j;
+ Guint code;
+
+ if (kind == unicodeMapFunc) {
+ return (*func)(u, buf, bufSize);
+ }
+
+ a = 0;
+ b = len;
+ if (u >= ranges[a].start) {
+ // invariant: ranges[a].start <= u < ranges[b].start
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (u >= ranges[m].start) {
+ a = m;
+ } else if (u < ranges[m].start) {
+ b = m;
+ }
+ }
+ if (u <= ranges[a].end) {
+ n = ranges[a].nBytes;
+ if (n > bufSize) {
+ return 0;
+ }
+ code = ranges[a].code + (u - ranges[a].start);
+ for (i = n - 1; i >= 0; --i) {
+ buf[i] = (char)(code & 0xff);
+ code >>= 8;
+ }
+ return n;
+ }
+ }
+
+ for (i = 0; i < eMapsLen; ++i) {
+ if (eMaps[i].u == u) {
+ n = eMaps[i].nBytes;
+ for (j = 0; j < n; ++j) {
+ buf[j] = eMaps[i].code[j];
+ }
+ return n;
+ }
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+UnicodeMapCache::UnicodeMapCache() {
+ int i;
+
+ for (i = 0; i < unicodeMapCacheSize; ++i) {
+ cache[i] = NULL;
+ }
+}
+
+UnicodeMapCache::~UnicodeMapCache() {
+ int i;
+
+ for (i = 0; i < unicodeMapCacheSize; ++i) {
+ if (cache[i]) {
+ cache[i]->decRefCnt();
+ }
+ }
+}
+
+UnicodeMap *UnicodeMapCache::getUnicodeMap(GooString *encodingName) {
+ UnicodeMap *map;
+ int i, j;
+
+ if (cache[0] && cache[0]->match(encodingName)) {
+ cache[0]->incRefCnt();
+ return cache[0];
+ }
+ for (i = 1; i < unicodeMapCacheSize; ++i) {
+ if (cache[i] && cache[i]->match(encodingName)) {
+ map = cache[i];
+ for (j = i; j >= 1; --j) {
+ cache[j] = cache[j - 1];
+ }
+ cache[0] = map;
+ map->incRefCnt();
+ return map;
+ }
+ }
+ if ((map = UnicodeMap::parse(encodingName))) {
+ if (cache[unicodeMapCacheSize - 1]) {
+ cache[unicodeMapCacheSize - 1]->decRefCnt();
+ }
+ for (j = unicodeMapCacheSize - 1; j >= 1; --j) {
+ cache[j] = cache[j - 1];
+ }
+ cache[0] = map;
+ map->incRefCnt();
+ return map;
+ }
+ return NULL;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.h
new file mode 100644
index 00000000000..6f031634e03
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMap.h
@@ -0,0 +1,122 @@
+//========================================================================
+//
+// UnicodeMap.h
+//
+// Mapping from Unicode to an encoding.
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef UNICODEMAP_H
+#define UNICODEMAP_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "poppler-config.h"
+#include "goo/gtypes.h"
+#include "CharTypes.h"
+
+#if MULTITHREADED
+#include "goo/GooMutex.h"
+#endif
+
+class GooString;
+
+//------------------------------------------------------------------------
+
+enum UnicodeMapKind {
+ unicodeMapUser, // read from a file
+ unicodeMapResident, // static list of ranges
+ unicodeMapFunc // function pointer
+};
+
+typedef int (*UnicodeMapFunc)(Unicode u, char *buf, int bufSize);
+
+struct UnicodeMapRange {
+ Unicode start, end; // range of Unicode chars
+ Guint code, nBytes; // first output code
+};
+
+struct UnicodeMapExt;
+
+//------------------------------------------------------------------------
+
+class UnicodeMap {
+public:
+
+ // Create the UnicodeMap specified by <encodingName>. Sets the
+ // initial reference count to 1. Returns NULL on failure.
+ static UnicodeMap *parse(GooString *encodingNameA);
+
+ // Create a resident UnicodeMap.
+ UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+ UnicodeMapRange *rangesA, int lenA);
+
+ // Create a resident UnicodeMap that uses a function instead of a
+ // list of ranges.
+ UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+ UnicodeMapFunc funcA);
+
+ ~UnicodeMap();
+
+ void incRefCnt();
+ void decRefCnt();
+
+ GooString *getEncodingName() { return encodingName; }
+
+ GBool isUnicode() { return unicodeOut; }
+
+ // Return true if this UnicodeMap matches the specified
+ // <encodingNameA>.
+ GBool match(GooString *encodingNameA);
+
+ // Map Unicode to the target encoding. Fills in <buf> with the
+ // output and returns the number of bytes used. Output will be
+ // truncated at <bufSize> bytes. No string terminator is written.
+ // Returns 0 if no mapping is found.
+ int mapUnicode(Unicode u, char *buf, int bufSize);
+
+private:
+
+ UnicodeMap(GooString *encodingNameA);
+
+ GooString *encodingName;
+ UnicodeMapKind kind;
+ GBool unicodeOut;
+ union {
+ UnicodeMapRange *ranges; // (user, resident)
+ UnicodeMapFunc func; // (func)
+ };
+ int len; // (user, resident)
+ UnicodeMapExt *eMaps; // (user)
+ int eMapsLen; // (user)
+ int refCnt;
+#if MULTITHREADED
+ GooMutex mutex;
+#endif
+};
+
+//------------------------------------------------------------------------
+
+#define unicodeMapCacheSize 4
+
+class UnicodeMapCache {
+public:
+
+ UnicodeMapCache();
+ ~UnicodeMapCache();
+
+ // Get the UnicodeMap for <encodingName>. Increments its reference
+ // count; there will be one reference for the cache plus one for the
+ // caller of this function. Returns NULL on failure.
+ UnicodeMap *getUnicodeMap(GooString *encodingName);
+
+private:
+
+ UnicodeMap *cache[unicodeMapCacheSize];
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMapTables.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMapTables.h
new file mode 100644
index 00000000000..9c510346164
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeMapTables.h
@@ -0,0 +1,361 @@
+//========================================================================
+//
+// UnicodeMapTables.h
+//
+// Copyright 2001-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+static UnicodeMapRange latin1UnicodeMapRanges[] = {
+ { 0x000a, 0x000a, 0x0a, 1 },
+ { 0x000c, 0x000d, 0x0c, 1 },
+ { 0x0020, 0x007e, 0x20, 1 },
+ { 0x00a0, 0x00a0, 0x20, 1 },
+ { 0x00a1, 0x00ac, 0xa1, 1 },
+ { 0x00ae, 0x00ff, 0xae, 1 },
+ { 0x010c, 0x010c, 0x43, 1 },
+ { 0x010d, 0x010d, 0x63, 1 },
+ { 0x0131, 0x0131, 0x69, 1 },
+ { 0x0141, 0x0141, 0x4c, 1 },
+ { 0x0142, 0x0142, 0x6c, 1 },
+ { 0x0152, 0x0152, 0x4f45, 2 },
+ { 0x0153, 0x0153, 0x6f65, 2 },
+ { 0x0160, 0x0160, 0x53, 1 },
+ { 0x0161, 0x0161, 0x73, 1 },
+ { 0x0178, 0x0178, 0x59, 1 },
+ { 0x017d, 0x017d, 0x5a, 1 },
+ { 0x017e, 0x017e, 0x7a, 1 },
+ { 0x02c6, 0x02c6, 0x5e, 1 },
+ { 0x02da, 0x02da, 0xb0, 1 },
+ { 0x02dc, 0x02dc, 0x7e, 1 },
+ { 0x2013, 0x2013, 0xad, 1 },
+ { 0x2014, 0x2014, 0x2d2d, 2 },
+ { 0x2018, 0x2018, 0x60, 1 },
+ { 0x2019, 0x2019, 0x27, 1 },
+ { 0x201a, 0x201a, 0x2c, 1 },
+ { 0x201c, 0x201c, 0x22, 1 },
+ { 0x201d, 0x201d, 0x22, 1 },
+ { 0x201e, 0x201e, 0x2c2c, 2 },
+ { 0x2022, 0x2022, 0xb7, 1 },
+ { 0x2026, 0x2026, 0x2e2e2e, 3 },
+ { 0x2039, 0x2039, 0x3c, 1 },
+ { 0x203a, 0x203a, 0x3e, 1 },
+ { 0x2044, 0x2044, 0x2f, 1 },
+ { 0x2122, 0x2122, 0x544d, 2 },
+ { 0x2212, 0x2212, 0x2d, 1 },
+ { 0xf6f9, 0xf6f9, 0x4c, 1 },
+ { 0xf6fa, 0xf6fa, 0x4f45, 2 },
+ { 0xf6fc, 0xf6fc, 0xb0, 1 },
+ { 0xf6fd, 0xf6fd, 0x53, 1 },
+ { 0xf6fe, 0xf6fe, 0x7e, 1 },
+ { 0xf6ff, 0xf6ff, 0x5a, 1 },
+ { 0xf721, 0xf721, 0x21, 1 },
+ { 0xf724, 0xf724, 0x24, 1 },
+ { 0xf726, 0xf726, 0x26, 1 },
+ { 0xf730, 0xf739, 0x30, 1 },
+ { 0xf73f, 0xf73f, 0x3f, 1 },
+ { 0xf761, 0xf77a, 0x41, 1 },
+ { 0xf7a1, 0xf7a2, 0xa1, 1 },
+ { 0xf7bf, 0xf7bf, 0xbf, 1 },
+ { 0xf7e0, 0xf7f6, 0xc0, 1 },
+ { 0xf7f8, 0xf7fe, 0xd8, 1 },
+ { 0xf7ff, 0xf7ff, 0x59, 1 },
+ { 0xfb00, 0xfb00, 0x6666, 2 },
+ { 0xfb01, 0xfb01, 0x6669, 2 },
+ { 0xfb02, 0xfb02, 0x666c, 2 },
+ { 0xfb03, 0xfb03, 0x666669, 3 },
+ { 0xfb04, 0xfb04, 0x66666c, 3 }
+};
+#define latin1UnicodeMapLen (sizeof(latin1UnicodeMapRanges) / sizeof(UnicodeMapRange))
+
+static UnicodeMapRange ascii7UnicodeMapRanges[] = {
+ { 0x000a, 0x000a, 0x0a, 1 },
+ { 0x000c, 0x000d, 0x0c, 1 },
+ { 0x0020, 0x005f, 0x20, 1 },
+ { 0x0061, 0x007e, 0x61, 1 },
+ { 0x00a6, 0x00a6, 0x7c, 1 },
+ { 0x00a9, 0x00a9, 0x286329, 3 },
+ { 0x00ae, 0x00ae, 0x285229, 3 },
+ { 0x00b7, 0x00b7, 0x2a, 1 },
+ { 0x00bc, 0x00bc, 0x312f34, 3 },
+ { 0x00bd, 0x00bd, 0x312f32, 3 },
+ { 0x00be, 0x00be, 0x332f34, 3 },
+ { 0x00c0, 0x00c0, 0x41, 1 },
+ { 0x00c1, 0x00c1, 0x41, 1 },
+ { 0x00c2, 0x00c2, 0x41, 1 },
+ { 0x00c3, 0x00c3, 0x41, 1 },
+ { 0x00c4, 0x00c4, 0x41, 1 },
+ { 0x00c5, 0x00c5, 0x41, 1 },
+ { 0x00c6, 0x00c6, 0x4145, 2 },
+ { 0x00c7, 0x00c7, 0x43, 1 },
+ { 0x00c8, 0x00c8, 0x45, 1 },
+ { 0x00c9, 0x00c9, 0x45, 1 },
+ { 0x00ca, 0x00ca, 0x45, 1 },
+ { 0x00cb, 0x00cb, 0x45, 1 },
+ { 0x00cc, 0x00cc, 0x49, 1 },
+ { 0x00cd, 0x00cd, 0x49, 1 },
+ { 0x00ce, 0x00ce, 0x49, 1 },
+ { 0x00cf, 0x00cf, 0x49, 1 },
+ { 0x00d1, 0x00d2, 0x4e, 1 },
+ { 0x00d3, 0x00d3, 0x4f, 1 },
+ { 0x00d4, 0x00d4, 0x4f, 1 },
+ { 0x00d5, 0x00d5, 0x4f, 1 },
+ { 0x00d6, 0x00d6, 0x4f, 1 },
+ { 0x00d7, 0x00d7, 0x78, 1 },
+ { 0x00d8, 0x00d8, 0x4f, 1 },
+ { 0x00d9, 0x00d9, 0x55, 1 },
+ { 0x00da, 0x00da, 0x55, 1 },
+ { 0x00db, 0x00db, 0x55, 1 },
+ { 0x00dc, 0x00dc, 0x55, 1 },
+ { 0x00dd, 0x00dd, 0x59, 1 },
+ { 0x00e0, 0x00e0, 0x61, 1 },
+ { 0x00e1, 0x00e1, 0x61, 1 },
+ { 0x00e2, 0x00e2, 0x61, 1 },
+ { 0x00e3, 0x00e3, 0x61, 1 },
+ { 0x00e4, 0x00e4, 0x61, 1 },
+ { 0x00e5, 0x00e5, 0x61, 1 },
+ { 0x00e6, 0x00e6, 0x6165, 2 },
+ { 0x00e7, 0x00e7, 0x63, 1 },
+ { 0x00e8, 0x00e8, 0x65, 1 },
+ { 0x00e9, 0x00e9, 0x65, 1 },
+ { 0x00ea, 0x00ea, 0x65, 1 },
+ { 0x00eb, 0x00eb, 0x65, 1 },
+ { 0x00ec, 0x00ec, 0x69, 1 },
+ { 0x00ed, 0x00ed, 0x69, 1 },
+ { 0x00ee, 0x00ee, 0x69, 1 },
+ { 0x00ef, 0x00ef, 0x69, 1 },
+ { 0x00f1, 0x00f2, 0x6e, 1 },
+ { 0x00f3, 0x00f3, 0x6f, 1 },
+ { 0x00f4, 0x00f4, 0x6f, 1 },
+ { 0x00f5, 0x00f5, 0x6f, 1 },
+ { 0x00f6, 0x00f6, 0x6f, 1 },
+ { 0x00f7, 0x00f7, 0x2f, 1 },
+ { 0x00f8, 0x00f8, 0x6f, 1 },
+ { 0x00f9, 0x00f9, 0x75, 1 },
+ { 0x00fa, 0x00fa, 0x75, 1 },
+ { 0x00fb, 0x00fb, 0x75, 1 },
+ { 0x00fc, 0x00fc, 0x75, 1 },
+ { 0x00fd, 0x00fd, 0x79, 1 },
+ { 0x00ff, 0x00ff, 0x79, 1 },
+ { 0x0131, 0x0131, 0x69, 1 },
+ { 0x0141, 0x0141, 0x4c, 1 },
+ { 0x0152, 0x0152, 0x4f45, 2 },
+ { 0x0153, 0x0153, 0x6f65, 2 },
+ { 0x0160, 0x0160, 0x53, 1 },
+ { 0x0178, 0x0178, 0x59, 1 },
+ { 0x017d, 0x017d, 0x5a, 1 },
+ { 0x2013, 0x2013, 0x2d, 1 },
+ { 0x2014, 0x2014, 0x2d2d, 2 },
+ { 0x2018, 0x2018, 0x60, 1 },
+ { 0x2019, 0x2019, 0x27, 1 },
+ { 0x201c, 0x201c, 0x22, 1 },
+ { 0x201d, 0x201d, 0x22, 1 },
+ { 0x2022, 0x2022, 0x2a, 1 },
+ { 0x2026, 0x2026, 0x2e2e2e, 3 },
+ { 0x2122, 0x2122, 0x544d, 2 },
+ { 0x2212, 0x2212, 0x2d, 1 },
+ { 0xf6f9, 0xf6f9, 0x4c, 1 },
+ { 0xf6fa, 0xf6fa, 0x4f45, 2 },
+ { 0xf6fd, 0xf6fd, 0x53, 1 },
+ { 0xf6fe, 0xf6fe, 0x7e, 1 },
+ { 0xf6ff, 0xf6ff, 0x5a, 1 },
+ { 0xf721, 0xf721, 0x21, 1 },
+ { 0xf724, 0xf724, 0x24, 1 },
+ { 0xf726, 0xf726, 0x26, 1 },
+ { 0xf730, 0xf739, 0x30, 1 },
+ { 0xf73f, 0xf73f, 0x3f, 1 },
+ { 0xf761, 0xf77a, 0x41, 1 },
+ { 0xf7e0, 0xf7e0, 0x41, 1 },
+ { 0xf7e1, 0xf7e1, 0x41, 1 },
+ { 0xf7e2, 0xf7e2, 0x41, 1 },
+ { 0xf7e3, 0xf7e3, 0x41, 1 },
+ { 0xf7e4, 0xf7e4, 0x41, 1 },
+ { 0xf7e5, 0xf7e5, 0x41, 1 },
+ { 0xf7e6, 0xf7e6, 0x4145, 2 },
+ { 0xf7e7, 0xf7e7, 0x43, 1 },
+ { 0xf7e8, 0xf7e8, 0x45, 1 },
+ { 0xf7e9, 0xf7e9, 0x45, 1 },
+ { 0xf7ea, 0xf7ea, 0x45, 1 },
+ { 0xf7eb, 0xf7eb, 0x45, 1 },
+ { 0xf7ec, 0xf7ec, 0x49, 1 },
+ { 0xf7ed, 0xf7ed, 0x49, 1 },
+ { 0xf7ee, 0xf7ee, 0x49, 1 },
+ { 0xf7ef, 0xf7ef, 0x49, 1 },
+ { 0xf7f1, 0xf7f2, 0x4e, 1 },
+ { 0xf7f3, 0xf7f3, 0x4f, 1 },
+ { 0xf7f4, 0xf7f4, 0x4f, 1 },
+ { 0xf7f5, 0xf7f5, 0x4f, 1 },
+ { 0xf7f6, 0xf7f6, 0x4f, 1 },
+ { 0xf7f8, 0xf7f8, 0x4f, 1 },
+ { 0xf7f9, 0xf7f9, 0x55, 1 },
+ { 0xf7fa, 0xf7fa, 0x55, 1 },
+ { 0xf7fb, 0xf7fb, 0x55, 1 },
+ { 0xf7fc, 0xf7fc, 0x55, 1 },
+ { 0xf7fd, 0xf7fd, 0x59, 1 },
+ { 0xf7ff, 0xf7ff, 0x59, 1 },
+ { 0xfb00, 0xfb00, 0x6666, 2 },
+ { 0xfb01, 0xfb01, 0x6669, 2 },
+ { 0xfb02, 0xfb02, 0x666c, 2 },
+ { 0xfb03, 0xfb03, 0x666669, 3 },
+ { 0xfb04, 0xfb04, 0x66666c, 3 }
+};
+#define ascii7UnicodeMapLen (sizeof(ascii7UnicodeMapRanges) / sizeof(UnicodeMapRange))
+
+static UnicodeMapRange symbolUnicodeMapRanges[] = {
+ { 0x0020, 0x0021, 0x20, 1 },
+ { 0x0023, 0x0023, 0x23, 1 },
+ { 0x0025, 0x0026, 0x25, 1 },
+ { 0x0028, 0x0029, 0x28, 1 },
+ { 0x002b, 0x002c, 0x2b, 1 },
+ { 0x002e, 0x003f, 0x2e, 1 },
+ { 0x005b, 0x005b, 0x5b, 1 },
+ { 0x005d, 0x005d, 0x5d, 1 },
+ { 0x005f, 0x005f, 0x5f, 1 },
+ { 0x007b, 0x007d, 0x7b, 1 },
+ { 0x00ac, 0x00ac, 0xd8, 1 },
+ { 0x00b0, 0x00b1, 0xb0, 1 },
+ { 0x00b5, 0x00b5, 0x6d, 1 },
+ { 0x00d7, 0x00d7, 0xb4, 1 },
+ { 0x00f7, 0x00f7, 0xb8, 1 },
+ { 0x0192, 0x0192, 0xa6, 1 },
+ { 0x0391, 0x0392, 0x41, 1 },
+ { 0x0393, 0x0393, 0x47, 1 },
+ { 0x0395, 0x0395, 0x45, 1 },
+ { 0x0396, 0x0396, 0x5a, 1 },
+ { 0x0397, 0x0397, 0x48, 1 },
+ { 0x0398, 0x0398, 0x51, 1 },
+ { 0x0399, 0x0399, 0x49, 1 },
+ { 0x039a, 0x039d, 0x4b, 1 },
+ { 0x039e, 0x039e, 0x58, 1 },
+ { 0x039f, 0x03a0, 0x4f, 1 },
+ { 0x03a1, 0x03a1, 0x52, 1 },
+ { 0x03a3, 0x03a5, 0x53, 1 },
+ { 0x03a6, 0x03a6, 0x46, 1 },
+ { 0x03a7, 0x03a7, 0x43, 1 },
+ { 0x03a8, 0x03a8, 0x59, 1 },
+ { 0x03b1, 0x03b2, 0x61, 1 },
+ { 0x03b3, 0x03b3, 0x67, 1 },
+ { 0x03b4, 0x03b5, 0x64, 1 },
+ { 0x03b6, 0x03b6, 0x7a, 1 },
+ { 0x03b7, 0x03b7, 0x68, 1 },
+ { 0x03b8, 0x03b8, 0x71, 1 },
+ { 0x03b9, 0x03b9, 0x69, 1 },
+ { 0x03ba, 0x03bb, 0x6b, 1 },
+ { 0x03bd, 0x03bd, 0x6e, 1 },
+ { 0x03be, 0x03be, 0x78, 1 },
+ { 0x03bf, 0x03c0, 0x6f, 1 },
+ { 0x03c1, 0x03c1, 0x72, 1 },
+ { 0x03c2, 0x03c2, 0x56, 1 },
+ { 0x03c3, 0x03c5, 0x73, 1 },
+ { 0x03c6, 0x03c6, 0x66, 1 },
+ { 0x03c7, 0x03c7, 0x63, 1 },
+ { 0x03c8, 0x03c8, 0x79, 1 },
+ { 0x03c9, 0x03c9, 0x77, 1 },
+ { 0x03d1, 0x03d1, 0x4a, 1 },
+ { 0x03d2, 0x03d2, 0xa1, 1 },
+ { 0x03d5, 0x03d5, 0x6a, 1 },
+ { 0x03d6, 0x03d6, 0x76, 1 },
+ { 0x2022, 0x2022, 0xb7, 1 },
+ { 0x2026, 0x2026, 0xbc, 1 },
+ { 0x2032, 0x2032, 0xa2, 1 },
+ { 0x2033, 0x2033, 0xb2, 1 },
+ { 0x2044, 0x2044, 0xa4, 1 },
+ { 0x2111, 0x2111, 0xc1, 1 },
+ { 0x2118, 0x2118, 0xc3, 1 },
+ { 0x211c, 0x211c, 0xc2, 1 },
+ { 0x2126, 0x2126, 0x57, 1 },
+ { 0x2135, 0x2135, 0xc0, 1 },
+ { 0x2190, 0x2193, 0xac, 1 },
+ { 0x2194, 0x2194, 0xab, 1 },
+ { 0x21b5, 0x21b5, 0xbf, 1 },
+ { 0x21d0, 0x21d3, 0xdc, 1 },
+ { 0x21d4, 0x21d4, 0xdb, 1 },
+ { 0x2200, 0x2200, 0x22, 1 },
+ { 0x2202, 0x2202, 0xb6, 1 },
+ { 0x2203, 0x2203, 0x24, 1 },
+ { 0x2205, 0x2205, 0xc6, 1 },
+ { 0x2206, 0x2206, 0x44, 1 },
+ { 0x2207, 0x2207, 0xd1, 1 },
+ { 0x2208, 0x2209, 0xce, 1 },
+ { 0x220b, 0x220b, 0x27, 1 },
+ { 0x220f, 0x220f, 0xd5, 1 },
+ { 0x2211, 0x2211, 0xe5, 1 },
+ { 0x2212, 0x2212, 0x2d, 1 },
+ { 0x2217, 0x2217, 0x2a, 1 },
+ { 0x221a, 0x221a, 0xd6, 1 },
+ { 0x221d, 0x221d, 0xb5, 1 },
+ { 0x221e, 0x221e, 0xa5, 1 },
+ { 0x2220, 0x2220, 0xd0, 1 },
+ { 0x2227, 0x2228, 0xd9, 1 },
+ { 0x2229, 0x222a, 0xc7, 1 },
+ { 0x222b, 0x222b, 0xf2, 1 },
+ { 0x2234, 0x2234, 0x5c, 1 },
+ { 0x223c, 0x223c, 0x7e, 1 },
+ { 0x2245, 0x2245, 0x40, 1 },
+ { 0x2248, 0x2248, 0xbb, 1 },
+ { 0x2260, 0x2261, 0xb9, 1 },
+ { 0x2264, 0x2264, 0xa3, 1 },
+ { 0x2265, 0x2265, 0xb3, 1 },
+ { 0x2282, 0x2282, 0xcc, 1 },
+ { 0x2283, 0x2283, 0xc9, 1 },
+ { 0x2284, 0x2284, 0xcb, 1 },
+ { 0x2286, 0x2286, 0xcd, 1 },
+ { 0x2287, 0x2287, 0xca, 1 },
+ { 0x2295, 0x2295, 0xc5, 1 },
+ { 0x2297, 0x2297, 0xc4, 1 },
+ { 0x22a5, 0x22a5, 0x5e, 1 },
+ { 0x22c5, 0x22c5, 0xd7, 1 },
+ { 0x2320, 0x2320, 0xf3, 1 },
+ { 0x2321, 0x2321, 0xf5, 1 },
+ { 0x2329, 0x2329, 0xe1, 1 },
+ { 0x232a, 0x232a, 0xf1, 1 },
+ { 0x25ca, 0x25ca, 0xe0, 1 },
+ { 0x2660, 0x2660, 0xaa, 1 },
+ { 0x2663, 0x2663, 0xa7, 1 },
+ { 0x2665, 0x2665, 0xa9, 1 },
+ { 0x2666, 0x2666, 0xa8, 1 },
+ { 0xf6d9, 0xf6d9, 0xd3, 1 },
+ { 0xf6da, 0xf6da, 0xd2, 1 },
+ { 0xf6db, 0xf6db, 0xd4, 1 },
+ { 0xf8e5, 0xf8e5, 0x60, 1 },
+ { 0xf8e6, 0xf8e7, 0xbd, 1 },
+ { 0xf8e8, 0xf8ea, 0xe2, 1 },
+ { 0xf8eb, 0xf8f4, 0xe6, 1 },
+ { 0xf8f5, 0xf8f5, 0xf4, 1 },
+ { 0xf8f6, 0xf8fe, 0xf6, 1 }
+};
+#define symbolUnicodeMapLen (sizeof(symbolUnicodeMapRanges) / sizeof(UnicodeMapRange))
+
+static UnicodeMapRange zapfDingbatsUnicodeMapRanges[] = {
+ { 0x0020, 0x0020, 0x20, 1 },
+ { 0x2192, 0x2192, 0xd5, 1 },
+ { 0x2194, 0x2195, 0xd6, 1 },
+ { 0x2460, 0x2469, 0xac, 1 },
+ { 0x25a0, 0x25a0, 0x6e, 1 },
+ { 0x25b2, 0x25b2, 0x73, 1 },
+ { 0x25bc, 0x25bc, 0x74, 1 },
+ { 0x25c6, 0x25c6, 0x75, 1 },
+ { 0x25cf, 0x25cf, 0x6c, 1 },
+ { 0x25d7, 0x25d7, 0x77, 1 },
+ { 0x2605, 0x2605, 0x48, 1 },
+ { 0x260e, 0x260e, 0x25, 1 },
+ { 0x261b, 0x261b, 0x2a, 1 },
+ { 0x261e, 0x261e, 0x2b, 1 },
+ { 0x2660, 0x2660, 0xab, 1 },
+ { 0x2663, 0x2663, 0xa8, 1 },
+ { 0x2665, 0x2665, 0xaa, 1 },
+ { 0x2666, 0x2666, 0xa9, 1 },
+ { 0x2701, 0x2704, 0x21, 1 },
+ { 0x2706, 0x2709, 0x26, 1 },
+ { 0x270c, 0x2727, 0x2c, 1 },
+ { 0x2729, 0x274b, 0x49, 1 },
+ { 0x274d, 0x274d, 0x6d, 1 },
+ { 0x274f, 0x2752, 0x6f, 1 },
+ { 0x2756, 0x2756, 0x76, 1 },
+ { 0x2758, 0x275e, 0x78, 1 },
+ { 0x2761, 0x2767, 0xa1, 1 },
+ { 0x2776, 0x2794, 0xb6, 1 },
+ { 0x2798, 0x27af, 0xd8, 1 },
+ { 0x27b1, 0x27be, 0xf1, 1 }
+};
+#define zapfDingbatsUnicodeMapLen (sizeof(zapfDingbatsUnicodeMapRanges) / sizeof(UnicodeMapRange))
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.cc
new file mode 100644
index 00000000000..c0483a5ef61
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.cc
@@ -0,0 +1,1200 @@
+//========================================================================
+//
+// UnicodeTypeTable.cc
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2006, 2007 Ed Catmur <ed@catmur.co.uk>
+// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <stdlib.h>
+#include "CharTypes.h"
+#include "UnicodeTypeTable.h"
+#include "goo/gmem.h"
+
+struct UnicodeMapTableEntry {
+ char *vector;
+ char type;
+};
+
+struct UnicodeCaseTableVector {
+ Unicode codes[256];
+};
+
+static const UnicodeMapTableEntry typeTable[256] = {
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNLNNNNLNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL", 'X' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLNNNNNNNNNNNNNNLLNNNNNNNNNNNNNNLLLLLNNNNNNNNNLNNNNNNNNNNNNNNNNN", 'X' },
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLNNNNNNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRNRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' },
+ { "RRRRNNNNNNNNNRNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNRNNNNNNNRRNNNNNNNRRNNNNNNNNNNRRRRRR", 'X' },
+ { "RRRRRRRRRRRRRRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { NULL, 'N' },
+ { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLNNNNLLLLLLLLLLLLLNNLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNLLLLLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLNNLLLLLLLNNNNN", 'X' },
+ { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLNNNNNNNNNNNNNNNN", 'X' },
+ { "NNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLNLNNNLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLLLLLLLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNNNNLLLLLLLNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNLNNNNNLNNLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLNLLNNNNNNNNNNNLLLLLLLNLNLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { "NNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLNNNNNLLLLLLNLLLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNNNLLLLLLLLLLLNNNLLLLLLLLLLLLNNNNLLLLLLLLLLLLLNNNLLLLLLLLLLLLLNNN", 'X' },
+ { "NNNNNNNNNNNNNNLRNNNNNNNNNNNNNNNNNNNNNNNNNNLRNLRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNNNNLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { "NNLNNNNLNNLLLLLLLLLLNLNNNLLLLLNNNNNNLNLNLNLLLLNLLLNLLLLLLLNNLLLLNNNNNLLLLLNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { NULL, 'N' },
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'L' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { NULL, 'N' },
+ { "NNNNNLLLNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLNNNNNNNLLLLLNNLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLL", 'X' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNLLLLLLLLLLLLNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", 'X' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { NULL, 'L' },
+ { "LLLLLLLLLLLLLLLLLLLLLLLLRRRRRRNRRRRRRRRRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' },
+ { NULL, 'R' },
+ { "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' },
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' },
+ { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLL", 'X' }
+};
+
+static const UnicodeCaseTableVector caseTable00 = {{
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
+ 0x0040, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f,
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+ 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x03bc, 0x00b6, 0x00b7,
+ 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00d7,
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
+}};
+static const UnicodeCaseTableVector caseTable01 = {{
+ 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107,
+ 0x0109, 0x0109, 0x010b, 0x010b, 0x010d, 0x010d, 0x010f, 0x010f,
+ 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117,
+ 0x0119, 0x0119, 0x011b, 0x011b, 0x011d, 0x011d, 0x011f, 0x011f,
+ 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127,
+ 0x0129, 0x0129, 0x012b, 0x012b, 0x012d, 0x012d, 0x012f, 0x012f,
+ 0x0130, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137,
+ 0x0138, 0x013a, 0x013a, 0x013c, 0x013c, 0x013e, 0x013e, 0x0140,
+ 0x0140, 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148,
+ 0x0148, 0x0149, 0x014b, 0x014b, 0x014d, 0x014d, 0x014f, 0x014f,
+ 0x0151, 0x0151, 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157,
+ 0x0159, 0x0159, 0x015b, 0x015b, 0x015d, 0x015d, 0x015f, 0x015f,
+ 0x0161, 0x0161, 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167,
+ 0x0169, 0x0169, 0x016b, 0x016b, 0x016d, 0x016d, 0x016f, 0x016f,
+ 0x0171, 0x0171, 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177,
+ 0x00ff, 0x017a, 0x017a, 0x017c, 0x017c, 0x017e, 0x017e, 0x0073,
+ 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188,
+ 0x0188, 0x0256, 0x0257, 0x018c, 0x018c, 0x018d, 0x01dd, 0x0259,
+ 0x025b, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268,
+ 0x0199, 0x0199, 0x019a, 0x019b, 0x026f, 0x0272, 0x019e, 0x0275,
+ 0x01a1, 0x01a1, 0x01a3, 0x01a3, 0x01a5, 0x01a5, 0x0280, 0x01a8,
+ 0x01a8, 0x0283, 0x01aa, 0x01ab, 0x01ad, 0x01ad, 0x0288, 0x01b0,
+ 0x01b0, 0x028a, 0x028b, 0x01b4, 0x01b4, 0x01b6, 0x01b6, 0x0292,
+ 0x01b9, 0x01b9, 0x01ba, 0x01bb, 0x01bd, 0x01bd, 0x01be, 0x01bf,
+ 0x01c0, 0x01c1, 0x01c2, 0x01c3, 0x01c6, 0x01c6, 0x01c6, 0x01c9,
+ 0x01c9, 0x01c9, 0x01cc, 0x01cc, 0x01cc, 0x01ce, 0x01ce, 0x01d0,
+ 0x01d0, 0x01d2, 0x01d2, 0x01d4, 0x01d4, 0x01d6, 0x01d6, 0x01d8,
+ 0x01d8, 0x01da, 0x01da, 0x01dc, 0x01dc, 0x01dd, 0x01df, 0x01df,
+ 0x01e1, 0x01e1, 0x01e3, 0x01e3, 0x01e5, 0x01e5, 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9, 0x01eb, 0x01eb, 0x01ed, 0x01ed, 0x01ef, 0x01ef,
+ 0x01f0, 0x01f3, 0x01f3, 0x01f3, 0x01f5, 0x01f5, 0x0195, 0x01bf,
+ 0x01f9, 0x01f9, 0x01fb, 0x01fb, 0x01fd, 0x01fd, 0x01ff, 0x01ff
+}};
+static const UnicodeCaseTableVector caseTable02 = {{
+ 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207,
+ 0x0209, 0x0209, 0x020b, 0x020b, 0x020d, 0x020d, 0x020f, 0x020f,
+ 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217,
+ 0x0219, 0x0219, 0x021b, 0x021b, 0x021d, 0x021d, 0x021f, 0x021f,
+ 0x019e, 0x0221, 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227,
+ 0x0229, 0x0229, 0x022b, 0x022b, 0x022d, 0x022d, 0x022f, 0x022f,
+ 0x0231, 0x0231, 0x0233, 0x0233, 0x0234, 0x0235, 0x0236, 0x0237,
+ 0x0238, 0x0239, 0x023a, 0x023b, 0x023c, 0x023d, 0x023e, 0x023f,
+ 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247,
+ 0x0248, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, 0x024f,
+ 0x0250, 0x0251, 0x0252, 0x0253, 0x0254, 0x0255, 0x0256, 0x0257,
+ 0x0258, 0x0259, 0x025a, 0x025b, 0x025c, 0x025d, 0x025e, 0x025f,
+ 0x0260, 0x0261, 0x0262, 0x0263, 0x0264, 0x0265, 0x0266, 0x0267,
+ 0x0268, 0x0269, 0x026a, 0x026b, 0x026c, 0x026d, 0x026e, 0x026f,
+ 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277,
+ 0x0278, 0x0279, 0x027a, 0x027b, 0x027c, 0x027d, 0x027e, 0x027f,
+ 0x0280, 0x0281, 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287,
+ 0x0288, 0x0289, 0x028a, 0x028b, 0x028c, 0x028d, 0x028e, 0x028f,
+ 0x0290, 0x0291, 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297,
+ 0x0298, 0x0299, 0x029a, 0x029b, 0x029c, 0x029d, 0x029e, 0x029f,
+ 0x02a0, 0x02a1, 0x02a2, 0x02a3, 0x02a4, 0x02a5, 0x02a6, 0x02a7,
+ 0x02a8, 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x02ae, 0x02af,
+ 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x02b5, 0x02b6, 0x02b7,
+ 0x02b8, 0x02b9, 0x02ba, 0x02bb, 0x02bc, 0x02bd, 0x02be, 0x02bf,
+ 0x02c0, 0x02c1, 0x02c2, 0x02c3, 0x02c4, 0x02c5, 0x02c6, 0x02c7,
+ 0x02c8, 0x02c9, 0x02ca, 0x02cb, 0x02cc, 0x02cd, 0x02ce, 0x02cf,
+ 0x02d0, 0x02d1, 0x02d2, 0x02d3, 0x02d4, 0x02d5, 0x02d6, 0x02d7,
+ 0x02d8, 0x02d9, 0x02da, 0x02db, 0x02dc, 0x02dd, 0x02de, 0x02df,
+ 0x02e0, 0x02e1, 0x02e2, 0x02e3, 0x02e4, 0x02e5, 0x02e6, 0x02e7,
+ 0x02e8, 0x02e9, 0x02ea, 0x02eb, 0x02ec, 0x02ed, 0x02ee, 0x02ef,
+ 0x02f0, 0x02f1, 0x02f2, 0x02f3, 0x02f4, 0x02f5, 0x02f6, 0x02f7,
+ 0x02f8, 0x02f9, 0x02fa, 0x02fb, 0x02fc, 0x02fd, 0x02fe, 0x02ff
+}};
+static const UnicodeCaseTableVector caseTable03 = {{
+ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307,
+ 0x0308, 0x0309, 0x030a, 0x030b, 0x030c, 0x030d, 0x030e, 0x030f,
+ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,
+ 0x0318, 0x0319, 0x031a, 0x031b, 0x031c, 0x031d, 0x031e, 0x031f,
+ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327,
+ 0x0328, 0x0329, 0x032a, 0x032b, 0x032c, 0x032d, 0x032e, 0x032f,
+ 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337,
+ 0x0338, 0x0339, 0x033a, 0x033b, 0x033c, 0x033d, 0x033e, 0x033f,
+ 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x03b9, 0x0346, 0x0347,
+ 0x0348, 0x0349, 0x034a, 0x034b, 0x034c, 0x034d, 0x034e, 0x034f,
+ 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357,
+ 0x0358, 0x0359, 0x035a, 0x035b, 0x035c, 0x035d, 0x035e, 0x035f,
+ 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367,
+ 0x0368, 0x0369, 0x036a, 0x036b, 0x036c, 0x036d, 0x036e, 0x036f,
+ 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377,
+ 0x0378, 0x0379, 0x037a, 0x037b, 0x037c, 0x037d, 0x037e, 0x037f,
+ 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x03ac, 0x0387,
+ 0x03ad, 0x03ae, 0x03af, 0x038b, 0x03cc, 0x038d, 0x03cd, 0x03ce,
+ 0x0390, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
+ 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
+ 0x03c0, 0x03c1, 0x03a2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
+ 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03ac, 0x03ad, 0x03ae, 0x03af,
+ 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
+ 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
+ 0x03c0, 0x03c1, 0x03c3, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
+ 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x03cf,
+ 0x03b2, 0x03b8, 0x03d2, 0x03d3, 0x03d4, 0x03c6, 0x03c0, 0x03d7,
+ 0x03d9, 0x03d9, 0x03db, 0x03db, 0x03dd, 0x03dd, 0x03df, 0x03df,
+ 0x03e1, 0x03e1, 0x03e3, 0x03e3, 0x03e5, 0x03e5, 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9, 0x03eb, 0x03eb, 0x03ed, 0x03ed, 0x03ef, 0x03ef,
+ 0x03ba, 0x03c1, 0x03f2, 0x03f3, 0x03b8, 0x03b5, 0x03f6, 0x03f8,
+ 0x03f8, 0x03f2, 0x03fb, 0x03fb, 0x03fc, 0x03fd, 0x03fe, 0x03ff
+}};
+static const UnicodeCaseTableVector caseTable04 = {{
+ 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+ 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f,
+ 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467,
+ 0x0469, 0x0469, 0x046b, 0x046b, 0x046d, 0x046d, 0x046f, 0x046f,
+ 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, 0x0477, 0x0477,
+ 0x0479, 0x0479, 0x047b, 0x047b, 0x047d, 0x047d, 0x047f, 0x047f,
+ 0x0481, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487,
+ 0x0488, 0x0489, 0x048b, 0x048b, 0x048d, 0x048d, 0x048f, 0x048f,
+ 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497,
+ 0x0499, 0x0499, 0x049b, 0x049b, 0x049d, 0x049d, 0x049f, 0x049f,
+ 0x04a1, 0x04a1, 0x04a3, 0x04a3, 0x04a5, 0x04a5, 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9, 0x04ab, 0x04ab, 0x04ad, 0x04ad, 0x04af, 0x04af,
+ 0x04b1, 0x04b1, 0x04b3, 0x04b3, 0x04b5, 0x04b5, 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9, 0x04bb, 0x04bb, 0x04bd, 0x04bd, 0x04bf, 0x04bf,
+ 0x04c0, 0x04c2, 0x04c2, 0x04c4, 0x04c4, 0x04c6, 0x04c6, 0x04c8,
+ 0x04c8, 0x04ca, 0x04ca, 0x04cc, 0x04cc, 0x04ce, 0x04ce, 0x04cf,
+ 0x04d1, 0x04d1, 0x04d3, 0x04d3, 0x04d5, 0x04d5, 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9, 0x04db, 0x04db, 0x04dd, 0x04dd, 0x04df, 0x04df,
+ 0x04e1, 0x04e1, 0x04e3, 0x04e3, 0x04e5, 0x04e5, 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9, 0x04eb, 0x04eb, 0x04ed, 0x04ed, 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1, 0x04f3, 0x04f3, 0x04f5, 0x04f5, 0x04f6, 0x04f7,
+ 0x04f9, 0x04f9, 0x04fa, 0x04fb, 0x04fc, 0x04fd, 0x04fe, 0x04ff
+}};
+static const UnicodeCaseTableVector caseTable05 = {{
+ 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, 0x0507, 0x0507,
+ 0x0509, 0x0509, 0x050b, 0x050b, 0x050d, 0x050d, 0x050f, 0x050f,
+ 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517,
+ 0x0518, 0x0519, 0x051a, 0x051b, 0x051c, 0x051d, 0x051e, 0x051f,
+ 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527,
+ 0x0528, 0x0529, 0x052a, 0x052b, 0x052c, 0x052d, 0x052e, 0x052f,
+ 0x0530, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
+ 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, 0x056f,
+ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
+ 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f,
+ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0557,
+ 0x0558, 0x0559, 0x055a, 0x055b, 0x055c, 0x055d, 0x055e, 0x055f,
+ 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567,
+ 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, 0x056f,
+ 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577,
+ 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f,
+ 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587,
+ 0x0588, 0x0589, 0x058a, 0x058b, 0x058c, 0x058d, 0x058e, 0x058f,
+ 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597,
+ 0x0598, 0x0599, 0x059a, 0x059b, 0x059c, 0x059d, 0x059e, 0x059f,
+ 0x05a0, 0x05a1, 0x05a2, 0x05a3, 0x05a4, 0x05a5, 0x05a6, 0x05a7,
+ 0x05a8, 0x05a9, 0x05aa, 0x05ab, 0x05ac, 0x05ad, 0x05ae, 0x05af,
+ 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7,
+ 0x05b8, 0x05b9, 0x05ba, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf,
+ 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05c4, 0x05c5, 0x05c6, 0x05c7,
+ 0x05c8, 0x05c9, 0x05ca, 0x05cb, 0x05cc, 0x05cd, 0x05ce, 0x05cf,
+ 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
+ 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
+ 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
+ 0x05e8, 0x05e9, 0x05ea, 0x05eb, 0x05ec, 0x05ed, 0x05ee, 0x05ef,
+ 0x05f0, 0x05f1, 0x05f2, 0x05f3, 0x05f4, 0x05f5, 0x05f6, 0x05f7,
+ 0x05f8, 0x05f9, 0x05fa, 0x05fb, 0x05fc, 0x05fd, 0x05fe, 0x05ff
+}};
+static const UnicodeCaseTableVector caseTable1e = {{
+ 0x1e01, 0x1e01, 0x1e03, 0x1e03, 0x1e05, 0x1e05, 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09, 0x1e0b, 0x1e0b, 0x1e0d, 0x1e0d, 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11, 0x1e13, 0x1e13, 0x1e15, 0x1e15, 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19, 0x1e1b, 0x1e1b, 0x1e1d, 0x1e1d, 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21, 0x1e23, 0x1e23, 0x1e25, 0x1e25, 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29, 0x1e2b, 0x1e2b, 0x1e2d, 0x1e2d, 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31, 0x1e33, 0x1e33, 0x1e35, 0x1e35, 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39, 0x1e3b, 0x1e3b, 0x1e3d, 0x1e3d, 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41, 0x1e43, 0x1e43, 0x1e45, 0x1e45, 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49, 0x1e4b, 0x1e4b, 0x1e4d, 0x1e4d, 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51, 0x1e53, 0x1e53, 0x1e55, 0x1e55, 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59, 0x1e5b, 0x1e5b, 0x1e5d, 0x1e5d, 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61, 0x1e63, 0x1e63, 0x1e65, 0x1e65, 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69, 0x1e6b, 0x1e6b, 0x1e6d, 0x1e6d, 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71, 0x1e73, 0x1e73, 0x1e75, 0x1e75, 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79, 0x1e7b, 0x1e7b, 0x1e7d, 0x1e7d, 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81, 0x1e83, 0x1e83, 0x1e85, 0x1e85, 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89, 0x1e8b, 0x1e8b, 0x1e8d, 0x1e8d, 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91, 0x1e93, 0x1e93, 0x1e95, 0x1e95, 0x1e96, 0x1e97,
+ 0x1e98, 0x1e99, 0x1e9a, 0x1e61, 0x1e9c, 0x1e9d, 0x1e9e, 0x1e9f,
+ 0x1ea1, 0x1ea1, 0x1ea3, 0x1ea3, 0x1ea5, 0x1ea5, 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9, 0x1eab, 0x1eab, 0x1ead, 0x1ead, 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1, 0x1eb3, 0x1eb3, 0x1eb5, 0x1eb5, 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9, 0x1ebb, 0x1ebb, 0x1ebd, 0x1ebd, 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1, 0x1ec3, 0x1ec3, 0x1ec5, 0x1ec5, 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9, 0x1ecb, 0x1ecb, 0x1ecd, 0x1ecd, 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1, 0x1ed3, 0x1ed3, 0x1ed5, 0x1ed5, 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9, 0x1edb, 0x1edb, 0x1edd, 0x1edd, 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1, 0x1ee3, 0x1ee3, 0x1ee5, 0x1ee5, 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9, 0x1eeb, 0x1eeb, 0x1eed, 0x1eed, 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1, 0x1ef3, 0x1ef3, 0x1ef5, 0x1ef5, 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9, 0x1efa, 0x1efb, 0x1efc, 0x1efd, 0x1efe, 0x1eff
+}};
+static const UnicodeCaseTableVector caseTable1f = {{
+ 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07,
+ 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07,
+ 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0x1f16, 0x1f17,
+ 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0x1f1e, 0x1f1f,
+ 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27,
+ 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27,
+ 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37,
+ 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37,
+ 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x1f46, 0x1f47,
+ 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x1f4e, 0x1f4f,
+ 0x1f50, 0x1f51, 0x1f52, 0x1f53, 0x1f54, 0x1f55, 0x1f56, 0x1f57,
+ 0x1f58, 0x1f51, 0x1f5a, 0x1f53, 0x1f5c, 0x1f55, 0x1f5e, 0x1f57,
+ 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67,
+ 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67,
+ 0x1f70, 0x1f71, 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1f76, 0x1f77,
+ 0x1f78, 0x1f79, 0x1f7a, 0x1f7b, 0x1f7c, 0x1f7d, 0x1f7e, 0x1f7f,
+ 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87,
+ 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87,
+ 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97,
+ 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97,
+ 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7,
+ 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7,
+ 0x1fb0, 0x1fb1, 0x1fb2, 0x1fb3, 0x1fb4, 0x1fb5, 0x1fb6, 0x1fb7,
+ 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x1fb3, 0x1fbd, 0x03b9, 0x1fbf,
+ 0x1fc0, 0x1fc1, 0x1fc2, 0x1fc3, 0x1fc4, 0x1fc5, 0x1fc6, 0x1fc7,
+ 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1fc3, 0x1fcd, 0x1fce, 0x1fcf,
+ 0x1fd0, 0x1fd1, 0x1fd2, 0x1fd3, 0x1fd4, 0x1fd5, 0x1fd6, 0x1fd7,
+ 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0x1fdc, 0x1fdd, 0x1fde, 0x1fdf,
+ 0x1fe0, 0x1fe1, 0x1fe2, 0x1fe3, 0x1fe4, 0x1fe5, 0x1fe6, 0x1fe7,
+ 0x1fe0, 0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0x1fed, 0x1fee, 0x1fef,
+ 0x1ff0, 0x1ff1, 0x1ff2, 0x1ff3, 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7,
+ 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x1ff3, 0x1ffd, 0x1ffe, 0x1fff
+}};
+static const UnicodeCaseTableVector caseTable21 = {{
+ 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107,
+ 0x2108, 0x2109, 0x210a, 0x210b, 0x210c, 0x210d, 0x210e, 0x210f,
+ 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117,
+ 0x2118, 0x2119, 0x211a, 0x211b, 0x211c, 0x211d, 0x211e, 0x211f,
+ 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x03c9, 0x2127,
+ 0x2128, 0x2129, 0x006b, 0x00e5, 0x212c, 0x212d, 0x212e, 0x212f,
+ 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137,
+ 0x2138, 0x2139, 0x213a, 0x213b, 0x213c, 0x213d, 0x213e, 0x213f,
+ 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147,
+ 0x2148, 0x2149, 0x214a, 0x214b, 0x214c, 0x214d, 0x214e, 0x214f,
+ 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157,
+ 0x2158, 0x2159, 0x215a, 0x215b, 0x215c, 0x215d, 0x215e, 0x215f,
+ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+ 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f,
+ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+ 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f,
+ 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187,
+ 0x2188, 0x2189, 0x218a, 0x218b, 0x218c, 0x218d, 0x218e, 0x218f,
+ 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197,
+ 0x2198, 0x2199, 0x219a, 0x219b, 0x219c, 0x219d, 0x219e, 0x219f,
+ 0x21a0, 0x21a1, 0x21a2, 0x21a3, 0x21a4, 0x21a5, 0x21a6, 0x21a7,
+ 0x21a8, 0x21a9, 0x21aa, 0x21ab, 0x21ac, 0x21ad, 0x21ae, 0x21af,
+ 0x21b0, 0x21b1, 0x21b2, 0x21b3, 0x21b4, 0x21b5, 0x21b6, 0x21b7,
+ 0x21b8, 0x21b9, 0x21ba, 0x21bb, 0x21bc, 0x21bd, 0x21be, 0x21bf,
+ 0x21c0, 0x21c1, 0x21c2, 0x21c3, 0x21c4, 0x21c5, 0x21c6, 0x21c7,
+ 0x21c8, 0x21c9, 0x21ca, 0x21cb, 0x21cc, 0x21cd, 0x21ce, 0x21cf,
+ 0x21d0, 0x21d1, 0x21d2, 0x21d3, 0x21d4, 0x21d5, 0x21d6, 0x21d7,
+ 0x21d8, 0x21d9, 0x21da, 0x21db, 0x21dc, 0x21dd, 0x21de, 0x21df,
+ 0x21e0, 0x21e1, 0x21e2, 0x21e3, 0x21e4, 0x21e5, 0x21e6, 0x21e7,
+ 0x21e8, 0x21e9, 0x21ea, 0x21eb, 0x21ec, 0x21ed, 0x21ee, 0x21ef,
+ 0x21f0, 0x21f1, 0x21f2, 0x21f3, 0x21f4, 0x21f5, 0x21f6, 0x21f7,
+ 0x21f8, 0x21f9, 0x21fa, 0x21fb, 0x21fc, 0x21fd, 0x21fe, 0x21ff
+}};
+static const UnicodeCaseTableVector caseTable24 = {{
+ 0x2400, 0x2401, 0x2402, 0x2403, 0x2404, 0x2405, 0x2406, 0x2407,
+ 0x2408, 0x2409, 0x240a, 0x240b, 0x240c, 0x240d, 0x240e, 0x240f,
+ 0x2410, 0x2411, 0x2412, 0x2413, 0x2414, 0x2415, 0x2416, 0x2417,
+ 0x2418, 0x2419, 0x241a, 0x241b, 0x241c, 0x241d, 0x241e, 0x241f,
+ 0x2420, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427,
+ 0x2428, 0x2429, 0x242a, 0x242b, 0x242c, 0x242d, 0x242e, 0x242f,
+ 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437,
+ 0x2438, 0x2439, 0x243a, 0x243b, 0x243c, 0x243d, 0x243e, 0x243f,
+ 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447,
+ 0x2448, 0x2449, 0x244a, 0x244b, 0x244c, 0x244d, 0x244e, 0x244f,
+ 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457,
+ 0x2458, 0x2459, 0x245a, 0x245b, 0x245c, 0x245d, 0x245e, 0x245f,
+ 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
+ 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f,
+ 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477,
+ 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f,
+ 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487,
+ 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f,
+ 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497,
+ 0x2498, 0x2499, 0x249a, 0x249b, 0x249c, 0x249d, 0x249e, 0x249f,
+ 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7,
+ 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af,
+ 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x24d0, 0x24d1,
+ 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9,
+ 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1,
+ 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9,
+ 0x24d0, 0x24d1, 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7,
+ 0x24d8, 0x24d9, 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df,
+ 0x24e0, 0x24e1, 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7,
+ 0x24e8, 0x24e9, 0x24ea, 0x24eb, 0x24ec, 0x24ed, 0x24ee, 0x24ef,
+ 0x24f0, 0x24f1, 0x24f2, 0x24f3, 0x24f4, 0x24f5, 0x24f6, 0x24f7,
+ 0x24f8, 0x24f9, 0x24fa, 0x24fb, 0x24fc, 0x24fd, 0x24fe, 0x24ff
+}};
+static const UnicodeCaseTableVector caseTableff = {{
+ 0xff00, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07,
+ 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f,
+ 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17,
+ 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f,
+ 0xff20, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
+ 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f,
+ 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57,
+ 0xff58, 0xff59, 0xff5a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f,
+ 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
+ 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f,
+ 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57,
+ 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xff5e, 0xff5f,
+ 0xff60, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67,
+ 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f,
+ 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77,
+ 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f,
+ 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87,
+ 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f,
+ 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97,
+ 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f,
+ 0xffa0, 0xffa1, 0xffa2, 0xffa3, 0xffa4, 0xffa5, 0xffa6, 0xffa7,
+ 0xffa8, 0xffa9, 0xffaa, 0xffab, 0xffac, 0xffad, 0xffae, 0xffaf,
+ 0xffb0, 0xffb1, 0xffb2, 0xffb3, 0xffb4, 0xffb5, 0xffb6, 0xffb7,
+ 0xffb8, 0xffb9, 0xffba, 0xffbb, 0xffbc, 0xffbd, 0xffbe, 0xffbf,
+ 0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc4, 0xffc5, 0xffc6, 0xffc7,
+ 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf,
+ 0xffd0, 0xffd1, 0xffd2, 0xffd3, 0xffd4, 0xffd5, 0xffd6, 0xffd7,
+ 0xffd8, 0xffd9, 0xffda, 0xffdb, 0xffdc, 0xffdd, 0xffde, 0xffdf,
+ 0xffe0, 0xffe1, 0xffe2, 0xffe3, 0xffe4, 0xffe5, 0xffe6, 0xffe7,
+ 0xffe8, 0xffe9, 0xffea, 0xffeb, 0xffec, 0xffed, 0xffee, 0xffef,
+ 0xfff0, 0xfff1, 0xfff2, 0xfff3, 0xfff4, 0xfff5, 0xfff6, 0xfff7,
+ 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc, 0xfffd, 0xfffe, 0xffff
+}};
+static const UnicodeCaseTableVector *caseTable[256] = {
+ &caseTable00,
+ &caseTable01,
+ &caseTable02,
+ &caseTable03,
+ &caseTable04,
+ &caseTable05,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &caseTable1e,
+ &caseTable1f,
+ NULL,
+ &caseTable21,
+ NULL,
+ NULL,
+ &caseTable24,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &caseTableff
+};
+
+static inline char getType(Unicode c) {
+ int i;
+ char type;
+
+ if (c > 0xffff) {
+ type = 'X';
+ } else {
+ i = (c >> 8) & 0xff;
+ if ((type = typeTable[i].type) == 'X') {
+ type = typeTable[i].vector[c & 0xff];
+ }
+ }
+ return type;
+}
+
+GBool unicodeTypeL(Unicode c) {
+ return getType(c) == 'L';
+}
+
+GBool unicodeTypeR(Unicode c) {
+ return getType(c) == 'R';
+}
+
+Unicode unicodeToUpper(Unicode c) {
+ int i;
+
+ if (c > 0xffff) {
+ return c;
+ }
+ i = (c >> 8) & 0xff;
+ if (caseTable[i]) {
+ return caseTable[i]->codes[c & 0xff];
+ }
+ return c;
+}
+
+#define UNICODE_LAST_CHAR 0x10FFFF
+#define UNICODE_MAX_TABLE_INDEX (UNICODE_LAST_CHAR / 256 + 1)
+// large empty block between U+2FA1D and U+E0001
+#define UNICODE_LAST_CHAR_PART1 0x2FAFF
+#define UNICODE_LAST_PAGE_PART1 (UNICODE_LAST_CHAR_PART1 / 256)
+#define UNICODE_PART2_START 0xE0000
+
+#include "UnicodeCClassTables.h"
+#include "UnicodeCompTables.h"
+#include "UnicodeDecompTables.h"
+
+#define CC_PART1(Page, Char) \
+ ((combining_class_table_part1[Page] >= UNICODE_MAX_TABLE_INDEX) \
+ ? (combining_class_table_part1[Page] - UNICODE_MAX_TABLE_INDEX) \
+ : (cclass_data[combining_class_table_part1[Page]][Char]))
+
+#define CC_PART2(Page, Char) \
+ ((combining_class_table_part2[Page] >= UNICODE_MAX_TABLE_INDEX) \
+ ? (combining_class_table_part2[Page] - UNICODE_MAX_TABLE_INDEX) \
+ : (cclass_data[combining_class_table_part2[Page]][Char]))
+
+#define COMBINING_CLASS(u) (((u) <= UNICODE_LAST_CHAR_PART1) \
+ ? CC_PART1((u) / 256, (u) % 256) \
+ : (((u) >= UNICODE_PART2_START && (u) <= UNICODE_LAST_CHAR) \
+ ? CC_PART2(((u) - UNICODE_PART2_START) / 256, (u) % 256) \
+ : 0))
+
+// Write the compatibility decomposition of @u into @buf, returning the number
+// of characters written. @buf may be NULL, in which case the length of the
+// decomposition is returned but nothing is written. If @u is its own
+// decomposition, write @u into @buf and return 1.
+static int decomp_compat(Unicode u, Unicode *buf) {
+ // decomposition tables stored as lists {character, decomp_length, offset}
+ // so we do a binary search
+ int start = 0, end = DECOMP_TABLE_LENGTH;
+ if (u >= decomp_table[start].character
+ && u <= decomp_table[end - 1].character)
+ while (gTrue) {
+ int midpoint = (start + end) / 2;
+ if (u == decomp_table[midpoint].character) {
+ int offset = decomp_table[midpoint].offset;
+ if (offset == -1)
+ break;
+ else {
+ int length = decomp_table[midpoint].length, i;
+ if (buf)
+ for (i = 0; i < length; ++i)
+ buf[i] = decomp_expansion[offset + i];
+ return length;
+ }
+ } else if (midpoint == start)
+ break;
+ else if (u > decomp_table[midpoint].character)
+ start = midpoint;
+ else
+ end = midpoint;
+ }
+ if (buf)
+ *buf = u;
+ return 1;
+}
+
+#define CI(Page, Char) \
+ ((compose_table[Page] >= UNICODE_MAX_TABLE_INDEX) \
+ ? (compose_table[Page] - UNICODE_MAX_TABLE_INDEX) \
+ : (compose_data[compose_table[Page]][Char]))
+
+#define COMPOSE_INDEX(u) \
+ ((((u) / 256) > (COMPOSE_TABLE_LAST)) ? 0 : CI((u) / 256, (u) % 256))
+
+// If @add combines with @base, write the combination to @out and return
+// gTrue. Otherwise return gFalse.
+static GBool combine(Unicode base, Unicode add, Unicode *out) {
+ unsigned short idx_base, idx_add;
+
+ idx_base = COMPOSE_INDEX(base);
+ if (idx_base >= COMPOSE_FIRST_SINGLE_START
+ && idx_base < COMPOSE_SECOND_START) {
+ if (compose_first_single[idx_base - COMPOSE_FIRST_SINGLE_START][0]
+ == add) {
+ *out = compose_first_single[idx_base - COMPOSE_FIRST_SINGLE_START][1];
+ return gTrue;
+ } else
+ return gFalse;
+ }
+
+ idx_add = COMPOSE_INDEX(add);
+ if (idx_add >= COMPOSE_SECOND_SINGLE_START) {
+ if (compose_second_single[idx_add - COMPOSE_SECOND_SINGLE_START][0]
+ == base) {
+ *out = compose_second_single[idx_add - COMPOSE_SECOND_SINGLE_START][1];
+ return gTrue;
+ } else
+ return gFalse;
+ }
+
+ if (idx_base >= COMPOSE_FIRST_START && idx_base < COMPOSE_FIRST_SINGLE_START
+ && idx_add >= COMPOSE_SECOND_START
+ && idx_add < COMPOSE_SECOND_SINGLE_START) {
+ Unicode o = compose_array[idx_base - COMPOSE_FIRST_START]
+ [idx_add - COMPOSE_SECOND_START];
+ if (o) {
+ *out = o;
+ return gTrue;
+ }
+ }
+
+ return gFalse;
+}
+
+#define HANGUL_S_BASE 0xAC00
+#define HANGUL_L_BASE 0x1100
+#define HANGUL_V_BASE 0x1161
+#define HANGUL_T_BASE 0x11A7
+#define HANGUL_L_COUNT 19
+#define HANGUL_V_COUNT 21
+#define HANGUL_T_COUNT 28
+#define HANGUL_S_COUNT (HANGUL_L_COUNT * HANGUL_V_COUNT * HANGUL_T_COUNT)
+#define HANGUL_N_COUNT (HANGUL_V_COUNT * HANGUL_T_COUNT)
+#define HANGUL_IS_L(u) (((u) >= HANGUL_L_BASE) \
+ && ((u) < HANGUL_L_BASE + HANGUL_L_COUNT))
+#define HANGUL_IS_V(u) (((u) >= HANGUL_V_BASE) \
+ && ((u) < HANGUL_V_BASE + HANGUL_V_COUNT))
+#define HANGUL_IS_T(u) (((u) >= HANGUL_T_BASE) \
+ && ((u) < HANGUL_T_BASE + HANGUL_T_COUNT))
+#define HANGUL_IS_SYLLABLE(u) (((u) >= HANGUL_S_BASE) \
+ && ((u) < HANGUL_S_BASE + HANGUL_S_COUNT))
+#define HANGUL_SYLLABLE_IS_LV(u) (((u) - HANGUL_S_BASE) % HANGUL_T_COUNT == 0)
+#define IS_HANGUL(u) (HANGUL_IS_L(u) || HANGUL_IS_V(u) || HANGUL_IS_T(u) \
+ || HANGUL_IS_SYLLABLE(u))
+#define HANGUL_COMPOSE_L_V(l, v) (HANGUL_S_BASE + (HANGUL_T_COUNT * \
+ (((v) - HANGUL_V_BASE) + (HANGUL_V_COUNT * ((l) - HANGUL_L_BASE)))))
+#define HANGUL_COMPOSE_LV_T(lv, t) ((lv) + ((t) - HANGUL_T_BASE))
+
+// Converts Unicode string @in of length @len to its normalization in form
+// NFKC (compatibility decomposition + canonical composition). The length of
+// the resulting Unicode string is returned in @out_len. If non-NULL, @indices
+// is assigned the location of a newly-allocated array of length @out_len + 1,
+// for each character in the normalized string giving the index in @in of the
+// corresponding unnormalized character. @indices is not guaranteed monotone or
+// onto.
+Unicode *unicodeNormalizeNFKC(Unicode *in, int len,
+ int *out_len, int **indices) {
+ Unicode *out;
+ int i, o, *classes, *idx = NULL;
+
+ for (i = 0, o = 0; i < len; ++i) {
+ if (HANGUL_IS_L(in[i]) || HANGUL_IS_SYLLABLE(in[i])) {
+ o += 1;
+ } else
+ o += decomp_compat(in[i], NULL);
+ }
+
+ out = (Unicode *) gmallocn(o, sizeof(Unicode));
+ classes = (int *) gmallocn(o, sizeof(int));
+ if (indices)
+ idx = (int *) gmallocn(o + 1, sizeof(int));
+
+ for (i = 0, o = 0; i < len; ) {
+ Unicode u = in[i];
+ if (IS_HANGUL(u)) {
+ if (HANGUL_IS_L(u)) {
+ Unicode l = u;
+ if (i+1 < len && HANGUL_IS_V(in[i+1])) {
+ Unicode lv = HANGUL_COMPOSE_L_V(l, in[++i]);
+ if (i+1 < len && HANGUL_IS_T(in[i+1]))
+ out[o] = HANGUL_COMPOSE_LV_T(lv, in[++i]);
+ else
+ out[o] = lv;
+ } else
+ out[o] = l;
+ } else if (HANGUL_SYLLABLE_IS_LV(u)) {
+ Unicode lv = u;
+ if (i+1 < len && HANGUL_IS_T(in[i+1]))
+ out[o] = HANGUL_COMPOSE_LV_T(lv, in[++i]);
+ else
+ out[o] = lv;
+ } else
+ out[o] = u;
+ if (indices)
+ idx[o] = i;
+ ++i; ++o;
+ } else {
+ int j, p, q, r, s, dlen;
+ // write compatibility decompositions into out (we have enough space)
+ // chomp in until a starter is reached
+ for (j = i, p = o; j < len; ++j) {
+ u = in[j];
+ if (j != i && COMBINING_CLASS(u) == 0)
+ break;
+ dlen = decomp_compat(u, out + p);
+ for (q = p; q < p + dlen; ++q) {
+ classes[q] = COMBINING_CLASS(out[q]);
+ if (indices)
+ idx[q] = j;
+ }
+ p += dlen;
+ }
+ // put out[o, p) in canonical ordering
+ for (q = o + 1; q < p; ++q)
+ for (r = q; r > o + 1; --r) { // FIXME worth using a better sort?
+ int swap;
+ if (classes[r] >= classes[r-1])
+ break;
+ u = out[r]; out[r] = out[r - 1]; out[r - 1] = u;
+ swap = classes[r]; classes[r] = classes[r - 1]; classes[r - 1] = swap;
+ if (indices) {
+ swap = idx[r];
+ idx[r] = idx[r - 1];
+ idx[r - 1] = swap;
+ }
+ }
+ // canonical compose out[o, p)
+ for (q = o + 1; q < p; ++q)
+ if (!combine(out[o], out[q], &out[o]))
+ break;
+ // move out[q, p) back to [o+1, ?)
+ if (q != o + 1)
+ for (r = q, s = o + 1; r < p; ++r, ++s) {
+ out[s] = out[r];
+ if (indices)
+ idx[s] = idx[r];
+ }
+ else
+ s = p;
+ i = j; o = s;
+ }
+ }
+
+ *out_len = o;
+ gfree(classes);
+ if (indices) {
+ idx[o] = len;
+ *indices = idx;
+ }
+ return out;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.h
new file mode 100644
index 00000000000..939e9160f58
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/UnicodeTypeTable.h
@@ -0,0 +1,34 @@
+//========================================================================
+//
+// UnicodeTypeTable.h
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef UNICODETYPETABLE_H
+#define UNICODETYPETABLE_H
+
+#include "goo/gtypes.h"
+
+extern GBool unicodeTypeL(Unicode c);
+
+extern GBool unicodeTypeR(Unicode c);
+
+extern Unicode unicodeToUpper(Unicode c);
+
+extern Unicode *unicodeNormalizeNFKC(Unicode *in, int len,
+ int *out_len, int **offsets);
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.cc
new file mode 100644
index 00000000000..3ab23d9b88a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.cc
@@ -0,0 +1,1199 @@
+//========================================================================
+//
+// XRef.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Dan Sheridan <dan.sheridan@postman.org.uk>
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2006, 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <ctype.h>
+#include <limits.h>
+#include "goo/gmem.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Lexer.h"
+#include "Parser.h"
+#include "Dict.h"
+#include "Error.h"
+#include "ErrorCodes.h"
+#include "XRef.h"
+
+//------------------------------------------------------------------------
+
+#define xrefSearchSize 1024 // read this many bytes at end of file
+ // to look for 'startxref'
+
+//------------------------------------------------------------------------
+// Permission bits
+// Note that the PDF spec uses 1 base (eg bit 3 is 1<<2)
+//------------------------------------------------------------------------
+
+#define permPrint (1<<2) // bit 3
+#define permChange (1<<3) // bit 4
+#define permCopy (1<<4) // bit 5
+#define permNotes (1<<5) // bit 6
+#define permFillForm (1<<8) // bit 9
+#define permAccessibility (1<<9) // bit 10
+#define permAssemble (1<<10) // bit 11
+#define permHighResPrint (1<<11) // bit 12
+#define defPermFlags 0xfffc
+
+//------------------------------------------------------------------------
+// ObjectStream
+//------------------------------------------------------------------------
+
+class ObjectStream {
+public:
+
+ // Create an object stream, using object number <objStrNum>,
+ // generation 0.
+ ObjectStream(XRef *xref, int objStrNumA);
+
+ GBool isOk() { return ok; }
+
+ ~ObjectStream();
+
+ // Return the object number of this object stream.
+ int getObjStrNum() { return objStrNum; }
+
+ // Get the <objIdx>th object from this stream, which should be
+ // object number <objNum>, generation 0.
+ Object *getObject(int objIdx, int objNum, Object *obj);
+
+private:
+
+ int objStrNum; // object number of the object stream
+ int nObjects; // number of objects in the stream
+ Object *objs; // the objects (length = nObjects)
+ int *objNums; // the object numbers (length = nObjects)
+ GBool ok;
+};
+
+ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
+ Stream *str;
+ Parser *parser;
+ int *offsets;
+ Object objStr, obj1, obj2;
+ int first, i;
+
+ objStrNum = objStrNumA;
+ nObjects = 0;
+ objs = NULL;
+ objNums = NULL;
+ ok = gFalse;
+
+ if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
+ goto err1;
+ }
+
+ if (!objStr.streamGetDict()->lookup("N", &obj1)->isInt()) {
+ obj1.free();
+ goto err1;
+ }
+ nObjects = obj1.getInt();
+ obj1.free();
+ if (nObjects <= 0) {
+ goto err1;
+ }
+
+ if (!objStr.streamGetDict()->lookup("First", &obj1)->isInt()) {
+ obj1.free();
+ goto err1;
+ }
+ first = obj1.getInt();
+ obj1.free();
+ if (first < 0) {
+ goto err1;
+ }
+
+ // this is an arbitrary limit to avoid integer overflow problems
+ // in the 'new Object[nObjects]' call (Acrobat apparently limits
+ // object streams to 100-200 objects)
+ if (nObjects > 1000000) {
+ error(-1, "Too many objects in an object stream");
+ goto err1;
+ }
+ objs = new Object[nObjects];
+ objNums = (int *)gmallocn(nObjects, sizeof(int));
+ offsets = (int *)gmallocn(nObjects, sizeof(int));
+
+ // parse the header: object numbers and offsets
+ objStr.streamReset();
+ obj1.initNull();
+ str = new EmbedStream(objStr.getStream(), &obj1, gTrue, first);
+ parser = new Parser(xref, new Lexer(xref, str), gFalse);
+ for (i = 0; i < nObjects; ++i) {
+ parser->getObj(&obj1);
+ parser->getObj(&obj2);
+ if (!obj1.isInt() || !obj2.isInt()) {
+ obj1.free();
+ obj2.free();
+ delete parser;
+ gfree(offsets);
+ goto err1;
+ }
+ objNums[i] = obj1.getInt();
+ offsets[i] = obj2.getInt();
+ obj1.free();
+ obj2.free();
+ if (objNums[i] < 0 || offsets[i] < 0 ||
+ (i > 0 && offsets[i] < offsets[i-1])) {
+ delete parser;
+ gfree(offsets);
+ goto err1;
+ }
+ }
+ while (str->getChar() != EOF) ;
+ delete parser;
+
+ // skip to the first object - this shouldn't be necessary because
+ // the First key is supposed to be equal to offsets[0], but just in
+ // case...
+ for (i = first; i < offsets[0]; ++i) {
+ objStr.getStream()->getChar();
+ }
+
+ // parse the objects
+ for (i = 0; i < nObjects; ++i) {
+ obj1.initNull();
+ if (i == nObjects - 1) {
+ str = new EmbedStream(objStr.getStream(), &obj1, gFalse, 0);
+ } else {
+ str = new EmbedStream(objStr.getStream(), &obj1, gTrue,
+ offsets[i+1] - offsets[i]);
+ }
+ parser = new Parser(xref, new Lexer(xref, str), gFalse);
+ parser->getObj(&objs[i]);
+ while (str->getChar() != EOF) ;
+ delete parser;
+ }
+
+ gfree(offsets);
+ ok = gTrue;
+
+ err1:
+ objStr.free();
+}
+
+ObjectStream::~ObjectStream() {
+ int i;
+
+ if (objs) {
+ for (i = 0; i < nObjects; ++i) {
+ objs[i].free();
+ }
+ delete[] objs;
+ }
+ gfree(objNums);
+}
+
+Object *ObjectStream::getObject(int objIdx, int objNum, Object *obj) {
+ if (objIdx < 0 || objIdx >= nObjects || objNum != objNums[objIdx]) {
+ return obj->initNull();
+ }
+ return objs[objIdx].copy(obj);
+}
+
+//------------------------------------------------------------------------
+// XRef
+//------------------------------------------------------------------------
+
+XRef::XRef() {
+ ok = gTrue;
+ errCode = errNone;
+ entries = NULL;
+ size = 0;
+ streamEnds = NULL;
+ streamEndsLen = 0;
+ objStr = NULL;
+}
+
+XRef::XRef(BaseStream *strA) {
+ Guint pos;
+ Object obj;
+
+ ok = gTrue;
+ errCode = errNone;
+ size = 0;
+ entries = NULL;
+ streamEnds = NULL;
+ streamEndsLen = 0;
+ objStr = NULL;
+
+ encrypted = gFalse;
+ permFlags = defPermFlags;
+ ownerPasswordOk = gFalse;
+
+ // read the trailer
+ str = strA;
+ start = str->getStart();
+ pos = getStartXref();
+
+ // if there was a problem with the 'startxref' position, try to
+ // reconstruct the xref table
+ if (pos == 0) {
+ if (!(ok = constructXRef())) {
+ errCode = errDamaged;
+ return;
+ }
+
+ // read the xref table
+ } else {
+ while (readXRef(&pos)) ;
+
+ // if there was a problem with the xref table,
+ // try to reconstruct it
+ if (!ok) {
+ if (!(ok = constructXRef())) {
+ errCode = errDamaged;
+ return;
+ }
+ }
+ }
+
+ // get the root dictionary (catalog) object
+ trailerDict.dictLookupNF("Root", &obj);
+ if (obj.isRef()) {
+ rootNum = obj.getRefNum();
+ rootGen = obj.getRefGen();
+ obj.free();
+ } else {
+ obj.free();
+ if (!(ok = constructXRef())) {
+ errCode = errDamaged;
+ return;
+ }
+ }
+
+ // now set the trailer dictionary's xref pointer so we can fetch
+ // indirect objects from it
+ trailerDict.getDict()->setXRef(this);
+}
+
+XRef::~XRef() {
+ for(int i=0; i<size; i++) {
+ entries[i].obj.free ();
+ }
+ gfree(entries);
+
+ trailerDict.free();
+ if (streamEnds) {
+ gfree(streamEnds);
+ }
+ if (objStr) {
+ delete objStr;
+ }
+}
+
+// Read the 'startxref' position.
+Guint XRef::getStartXref() {
+ char buf[xrefSearchSize+1];
+ char *p;
+ int c, n, i;
+
+ // read last xrefSearchSize bytes
+ str->setPos(xrefSearchSize, -1);
+ for (n = 0; n < xrefSearchSize; ++n) {
+ if ((c = str->getChar()) == EOF) {
+ break;
+ }
+ buf[n] = c;
+ }
+ buf[n] = '\0';
+
+ // find startxref
+ for (i = n - 9; i >= 0; --i) {
+ if (!strncmp(&buf[i], "startxref", 9)) {
+ break;
+ }
+ }
+ if (i < 0) {
+ return 0;
+ }
+ for (p = &buf[i+9]; isspace(*p); ++p) ;
+ lastXRefPos = strToUnsigned(p);
+
+ return lastXRefPos;
+}
+
+// Read one xref table section. Also reads the associated trailer
+// dictionary, and returns the prev pointer (if any).
+GBool XRef::readXRef(Guint *pos) {
+ Parser *parser;
+ Object obj;
+ GBool more;
+
+ // start up a parser, parse one token
+ obj.initNull();
+ parser = new Parser(NULL,
+ new Lexer(NULL,
+ str->makeSubStream(start + *pos, gFalse, 0, &obj)),
+ gTrue);
+ parser->getObj(&obj);
+
+ // parse an old-style xref table
+ if (obj.isCmd("xref")) {
+ obj.free();
+ more = readXRefTable(parser, pos);
+
+ // parse an xref stream
+ } else if (obj.isInt()) {
+ obj.free();
+ if (!parser->getObj(&obj)->isInt()) {
+ goto err1;
+ }
+ obj.free();
+ if (!parser->getObj(&obj)->isCmd("obj")) {
+ goto err1;
+ }
+ obj.free();
+ if (!parser->getObj(&obj)->isStream()) {
+ goto err1;
+ }
+ more = readXRefStream(obj.getStream(), pos);
+ obj.free();
+
+ } else {
+ goto err1;
+ }
+
+ delete parser;
+ return more;
+
+ err1:
+ obj.free();
+ delete parser;
+ ok = gFalse;
+ return gFalse;
+}
+
+GBool XRef::readXRefTable(Parser *parser, Guint *pos) {
+ XRefEntry entry;
+ GBool more;
+ Object obj, obj2;
+ Guint pos2;
+ int first, n, newSize, i;
+
+ while (1) {
+ parser->getObj(&obj);
+ if (obj.isCmd("trailer")) {
+ obj.free();
+ break;
+ }
+ if (!obj.isInt()) {
+ goto err1;
+ }
+ first = obj.getInt();
+ obj.free();
+ if (!parser->getObj(&obj)->isInt()) {
+ goto err1;
+ }
+ n = obj.getInt();
+ obj.free();
+ if (first < 0 || n < 0 || first + n < 0) {
+ goto err1;
+ }
+ if (first + n > size) {
+ for (newSize = size ? 2 * size : 1024;
+ first + n > newSize && newSize > 0;
+ newSize <<= 1) ;
+ if (newSize < 0) {
+ goto err1;
+ }
+ if (newSize >= INT_MAX / (int)sizeof(XRefEntry)) {
+ error(-1, "Invalid 'obj' parameters'");
+ goto err1;
+ }
+
+ entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
+ for (i = size; i < newSize; ++i) {
+ entries[i].offset = 0xffffffff;
+ entries[i].type = xrefEntryFree;
+ entries[i].obj.initNull ();
+ entries[i].updated = false;
+ entries[i].gen = 0;
+ }
+ size = newSize;
+ }
+ for (i = first; i < first + n; ++i) {
+ if (!parser->getObj(&obj)->isInt()) {
+ goto err1;
+ }
+ entry.offset = (Guint)obj.getInt();
+ obj.free();
+ if (!parser->getObj(&obj)->isInt()) {
+ goto err1;
+ }
+ entry.gen = obj.getInt();
+ entry.obj.initNull ();
+ entry.updated = false;
+ obj.free();
+ parser->getObj(&obj);
+ if (obj.isCmd("n")) {
+ entry.type = xrefEntryUncompressed;
+ } else if (obj.isCmd("f")) {
+ entry.type = xrefEntryFree;
+ } else {
+ goto err1;
+ }
+ obj.free();
+ if (entries[i].offset == 0xffffffff) {
+ entries[i] = entry;
+ // PDF files of patents from the IBM Intellectual Property
+ // Network have a bug: the xref table claims to start at 1
+ // instead of 0.
+ if (i == 1 && first == 1 &&
+ entries[1].offset == 0 && entries[1].gen == 65535 &&
+ entries[1].type == xrefEntryFree) {
+ i = first = 0;
+ entries[0] = entries[1];
+ entries[1].offset = 0xffffffff;
+ }
+ }
+ }
+ }
+
+ // read the trailer dictionary
+ if (!parser->getObj(&obj)->isDict()) {
+ goto err1;
+ }
+
+ // get the 'Prev' pointer
+ obj.getDict()->lookupNF("Prev", &obj2);
+ if (obj2.isInt()) {
+ *pos = (Guint)obj2.getInt();
+ more = gTrue;
+ } else if (obj2.isRef()) {
+ // certain buggy PDF generators generate "/Prev NNN 0 R" instead
+ // of "/Prev NNN"
+ *pos = (Guint)obj2.getRefNum();
+ more = gTrue;
+ } else {
+ more = gFalse;
+ }
+ obj2.free();
+
+ // save the first trailer dictionary
+ if (trailerDict.isNone()) {
+ obj.copy(&trailerDict);
+ }
+
+ // check for an 'XRefStm' key
+ if (obj.getDict()->lookup("XRefStm", &obj2)->isInt()) {
+ pos2 = (Guint)obj2.getInt();
+ readXRef(&pos2);
+ if (!ok) {
+ obj2.free();
+ goto err1;
+ }
+ }
+ obj2.free();
+
+ obj.free();
+ return more;
+
+ err1:
+ obj.free();
+ ok = gFalse;
+ return gFalse;
+}
+
+GBool XRef::readXRefStream(Stream *xrefStr, Guint *pos) {
+ Dict *dict;
+ int w[3];
+ GBool more;
+ Object obj, obj2, idx;
+ int newSize, first, n, i;
+
+ dict = xrefStr->getDict();
+
+ if (!dict->lookupNF("Size", &obj)->isInt()) {
+ goto err1;
+ }
+ newSize = obj.getInt();
+ obj.free();
+ if (newSize < 0) {
+ goto err1;
+ }
+ if (newSize > size) {
+ if (newSize >= INT_MAX / (int)sizeof(XRefEntry)) {
+ error(-1, "Invalid 'size' parameter.");
+ return gFalse;
+ }
+ entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
+ for (i = size; i < newSize; ++i) {
+ entries[i].offset = 0xffffffff;
+ entries[i].type = xrefEntryFree;
+ entries[i].obj.initNull ();
+ entries[i].updated = false;
+ entries[i].gen = 0;
+ }
+ size = newSize;
+ }
+
+ if (!dict->lookupNF("W", &obj)->isArray() ||
+ obj.arrayGetLength() < 3) {
+ goto err1;
+ }
+ for (i = 0; i < 3; ++i) {
+ if (!obj.arrayGet(i, &obj2)->isInt()) {
+ obj2.free();
+ goto err1;
+ }
+ w[i] = obj2.getInt();
+ obj2.free();
+ if (w[i] < 0 || w[i] > 4) {
+ goto err1;
+ }
+ }
+ obj.free();
+
+ xrefStr->reset();
+ dict->lookupNF("Index", &idx);
+ if (idx.isArray()) {
+ for (i = 0; i+1 < idx.arrayGetLength(); i += 2) {
+ if (!idx.arrayGet(i, &obj)->isInt()) {
+ idx.free();
+ goto err1;
+ }
+ first = obj.getInt();
+ obj.free();
+ if (!idx.arrayGet(i+1, &obj)->isInt()) {
+ idx.free();
+ goto err1;
+ }
+ n = obj.getInt();
+ obj.free();
+ if (first < 0 || n < 0 ||
+ !readXRefStreamSection(xrefStr, w, first, n)) {
+ idx.free();
+ goto err0;
+ }
+ }
+ } else {
+ if (!readXRefStreamSection(xrefStr, w, 0, newSize)) {
+ idx.free();
+ goto err0;
+ }
+ }
+ idx.free();
+
+ dict->lookupNF("Prev", &obj);
+ if (obj.isInt()) {
+ *pos = (Guint)obj.getInt();
+ more = gTrue;
+ } else {
+ more = gFalse;
+ }
+ obj.free();
+ if (trailerDict.isNone()) {
+ trailerDict.initDict(dict);
+ }
+
+ return more;
+
+ err1:
+ obj.free();
+ err0:
+ ok = gFalse;
+ return gFalse;
+}
+
+GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) {
+ Guint offset;
+ int type, gen, c, newSize, i, j;
+
+ if (first + n < 0) {
+ return gFalse;
+ }
+ if (first + n > size) {
+ for (newSize = size ? 2 * size : 1024;
+ first + n > newSize && newSize > 0;
+ newSize <<= 1) ;
+ if (newSize < 0) {
+ return gFalse;
+ }
+ if (newSize >= INT_MAX / (int)sizeof(XRefEntry)) {
+ error(-1, "Invalid 'size' inside xref table.");
+ return gFalse;
+ }
+ entries = (XRefEntry *)greallocn(entries, newSize, sizeof(XRefEntry));
+ for (i = size; i < newSize; ++i) {
+ entries[i].offset = 0xffffffff;
+ entries[i].type = xrefEntryFree;
+ entries[i].obj.initNull ();
+ entries[i].updated = false;
+ entries[i].gen = 0;
+ }
+ size = newSize;
+ }
+ for (i = first; i < first + n; ++i) {
+ if (w[0] == 0) {
+ type = 1;
+ } else {
+ for (type = 0, j = 0; j < w[0]; ++j) {
+ if ((c = xrefStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ type = (type << 8) + c;
+ }
+ }
+ for (offset = 0, j = 0; j < w[1]; ++j) {
+ if ((c = xrefStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ offset = (offset << 8) + c;
+ }
+ for (gen = 0, j = 0; j < w[2]; ++j) {
+ if ((c = xrefStr->getChar()) == EOF) {
+ return gFalse;
+ }
+ gen = (gen << 8) + c;
+ }
+ if (entries[i].offset == 0xffffffff) {
+ switch (type) {
+ case 0:
+ entries[i].offset = offset;
+ entries[i].gen = gen;
+ entries[i].type = xrefEntryFree;
+ break;
+ case 1:
+ entries[i].offset = offset;
+ entries[i].gen = gen;
+ entries[i].type = xrefEntryUncompressed;
+ break;
+ case 2:
+ entries[i].offset = offset;
+ entries[i].gen = gen;
+ entries[i].type = xrefEntryCompressed;
+ break;
+ default:
+ return gFalse;
+ }
+ }
+ }
+
+ return gTrue;
+}
+
+// Attempt to construct an xref table for a damaged file.
+GBool XRef::constructXRef() {
+ Parser *parser;
+ Object newTrailerDict, obj;
+ char buf[256];
+ Guint pos;
+ int num, gen;
+ int newSize;
+ int streamEndsSize;
+ char *p;
+ int i;
+ GBool gotRoot;
+ char* token = NULL;
+ bool oneCycle = true;
+ int offset = 0;
+
+ gfree(entries);
+ size = 0;
+ entries = NULL;
+
+ error(-1, "PDF file is damaged - attempting to reconstruct xref table...");
+ gotRoot = gFalse;
+ streamEndsLen = streamEndsSize = 0;
+
+ str->reset();
+ while (1) {
+ pos = str->getPos();
+ if (!str->getLine(buf, 256)) {
+ break;
+ }
+ p = buf;
+
+ // skip whitespace
+ while (*p && Lexer::isSpace(*p & 0xff)) ++p;
+
+ oneCycle = true;
+ offset = 0;
+
+ while( ( token = strstr( p, "endobj" ) ) || oneCycle ) {
+ oneCycle = false;
+
+ if( token ) {
+ oneCycle = true;
+ token[0] = '\0';
+ offset = token - p;
+ }
+
+ // got trailer dictionary
+ if (!strncmp(p, "trailer", 7)) {
+ obj.initNull();
+ parser = new Parser(NULL,
+ new Lexer(NULL,
+ str->makeSubStream(pos + 7, gFalse, 0, &obj)),
+ gFalse);
+ parser->getObj(&newTrailerDict);
+ if (newTrailerDict.isDict()) {
+ newTrailerDict.dictLookupNF("Root", &obj);
+ if (obj.isRef()) {
+ rootNum = obj.getRefNum();
+ rootGen = obj.getRefGen();
+ if (!trailerDict.isNone()) {
+ trailerDict.free();
+ }
+ newTrailerDict.copy(&trailerDict);
+ gotRoot = gTrue;
+ }
+ obj.free();
+ }
+ newTrailerDict.free();
+ delete parser;
+
+ // look for object
+ } else if (isdigit(*p)) {
+ num = atoi(p);
+ if (num > 0) {
+ do {
+ ++p;
+ } while (*p && isdigit(*p));
+ if (isspace(*p)) {
+ do {
+ ++p;
+ } while (*p && isspace(*p));
+ if (isdigit(*p)) {
+ gen = atoi(p);
+ do {
+ ++p;
+ } while (*p && isdigit(*p));
+ if (isspace(*p)) {
+ do {
+ ++p;
+ } while (*p && isspace(*p));
+ if (!strncmp(p, "obj", 3)) {
+ if (num >= size) {
+ newSize = (num + 1 + 255) & ~255;
+ if (newSize < 0) {
+ error(-1, "Bad object number");
+ return gFalse;
+ }
+ if (newSize >= INT_MAX / (int)sizeof(XRefEntry)) {
+ error(-1, "Invalid 'obj' parameters.");
+ return gFalse;
+ }
+ entries = (XRefEntry *)
+ greallocn(entries, newSize, sizeof(XRefEntry));
+ for (i = size; i < newSize; ++i) {
+ entries[i].offset = 0xffffffff;
+ entries[i].type = xrefEntryFree;
+ entries[i].obj.initNull ();
+ entries[i].updated = false;
+ }
+ size = newSize;
+ }
+ if (entries[num].type == xrefEntryFree ||
+ gen >= entries[num].gen) {
+ entries[num].offset = pos - start;
+ entries[num].gen = gen;
+ entries[num].type = xrefEntryUncompressed;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ } else if (!strncmp(p, "endstream", 9)) {
+ if (streamEndsLen == streamEndsSize) {
+ streamEndsSize += 64;
+ if (streamEndsSize >= INT_MAX / (int)sizeof(int)) {
+ error(-1, "Invalid 'endstream' parameter.");
+ return gFalse;
+ }
+ streamEnds = (Guint *)greallocn(streamEnds,
+ streamEndsSize, sizeof(int));
+ }
+ streamEnds[streamEndsLen++] = pos;
+ }
+ if( token ) {
+ p = token + 6;// strlen( "endobj" ) = 6
+ pos += offset + 6;// strlen( "endobj" ) = 6
+ while (*p && Lexer::isSpace(*p & 0xff)) {
+ ++p;
+ ++pos;
+ }
+ }
+ }
+ }
+
+ if (gotRoot)
+ return gTrue;
+
+ error(-1, "Couldn't find trailer dictionary");
+ return gFalse;
+}
+
+void XRef::setEncryption(int permFlagsA, GBool ownerPasswordOkA,
+ Guchar *fileKeyA, int keyLengthA,
+ int encVersionA, int encRevisionA,
+ CryptAlgorithm encAlgorithmA) {
+ int i;
+
+ encrypted = gTrue;
+ permFlags = permFlagsA;
+ ownerPasswordOk = ownerPasswordOkA;
+ if (keyLengthA <= 16) {
+ keyLength = keyLengthA;
+ } else {
+ keyLength = 16;
+ }
+ for (i = 0; i < keyLength; ++i) {
+ fileKey[i] = fileKeyA[i];
+ }
+ encVersion = encVersionA;
+ encRevision = encRevisionA;
+ encAlgorithm = encAlgorithmA;
+}
+
+GBool XRef::okToPrint(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
+}
+
+// we can print at high res if we are only doing security handler revision
+// 2 (and we are allowed to print at all), or with security handler rev
+// 3 and we are allowed to print, and bit 12 is set.
+GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) {
+ if (2 == encRevision) {
+ return (okToPrint(ignoreOwnerPW));
+ } else if (encRevision >= 3) {
+ return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint));
+ } else {
+ // something weird - unknown security handler version
+ return gFalse;
+ }
+}
+
+GBool XRef::okToChange(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
+}
+
+GBool XRef::okToCopy(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
+}
+
+GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
+}
+
+GBool XRef::okToFillForm(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permFillForm);
+}
+
+GBool XRef::okToAccessibility(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAccessibility);
+}
+
+GBool XRef::okToAssemble(GBool ignoreOwnerPW) {
+ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble);
+}
+
+Object *XRef::fetch(int num, int gen, Object *obj) {
+ XRefEntry *e;
+ Parser *parser;
+ Object obj1, obj2, obj3;
+
+ // check for bogus ref - this can happen in corrupted PDF files
+ if (num < 0 || num >= size) {
+ goto err;
+ }
+
+ e = &entries[num];
+ if(!e->obj.isNull ()) { //check for updated object
+ obj = e->obj.copy(obj);
+ return obj;
+ }
+ switch (e->type) {
+
+ case xrefEntryUncompressed:
+ if (e->gen != gen) {
+ goto err;
+ }
+ obj1.initNull();
+ parser = new Parser(this,
+ new Lexer(this,
+ str->makeSubStream(start + e->offset, gFalse, 0, &obj1)),
+ gTrue);
+ parser->getObj(&obj1);
+ parser->getObj(&obj2);
+ parser->getObj(&obj3);
+ if (!obj1.isInt() || obj1.getInt() != num ||
+ !obj2.isInt() || obj2.getInt() != gen ||
+ !obj3.isCmd("obj")) {
+ // some buggy pdf have obj1234 for ints that represent 1234
+ // try to recover here
+ if (obj1.isInt() && obj1.getInt() == num &&
+ obj2.isInt() && obj2.getInt() == gen &&
+ obj3.isCmd()) {
+ char *cmd = obj3.getCmd();
+ if (strlen(cmd) > 3 &&
+ cmd[0] == 'o' &&
+ cmd[1] == 'b' &&
+ cmd[2] == 'j') {
+ char *end_ptr;
+ long longNumber = strtol(cmd + 3, &end_ptr, 0);
+ if (longNumber <= INT_MAX && longNumber >= INT_MIN && *end_ptr == '\0') {
+ int number = longNumber;
+ error(-1, "Cmd was not obj but %s, assuming the creator meant obj %d", cmd, number);
+ obj->initInt(number);
+ obj1.free();
+ obj2.free();
+ obj3.free();
+ delete parser;
+ break;
+ }
+ }
+ }
+ obj1.free();
+ obj2.free();
+ obj3.free();
+ delete parser;
+ goto err;
+ }
+ parser->getObj(obj, encrypted ? fileKey : (Guchar *)NULL,
+ encAlgorithm, keyLength, num, gen);
+ obj1.free();
+ obj2.free();
+ obj3.free();
+ delete parser;
+ break;
+
+ case xrefEntryCompressed:
+ if (gen != 0) {
+ goto err;
+ }
+ if (!objStr || objStr->getObjStrNum() != (int)e->offset) {
+ if (objStr) {
+ delete objStr;
+ }
+ objStr = new ObjectStream(this, e->offset);
+ if (!objStr->isOk()) {
+ delete objStr;
+ objStr = NULL;
+ goto err;
+ }
+ }
+ objStr->getObject(e->gen, num, obj);
+ break;
+
+ default:
+ goto err;
+ }
+
+ return obj;
+
+ err:
+ return obj->initNull();
+}
+
+Object *XRef::getDocInfo(Object *obj) {
+ return trailerDict.dictLookup("Info", obj);
+}
+
+// Added for the pdftex project.
+Object *XRef::getDocInfoNF(Object *obj) {
+ return trailerDict.dictLookupNF("Info", obj);
+}
+
+GBool XRef::getStreamEnd(Guint streamStart, Guint *streamEnd) {
+ int a, b, m;
+
+ if (streamEndsLen == 0 ||
+ streamStart > streamEnds[streamEndsLen - 1]) {
+ return gFalse;
+ }
+
+ a = -1;
+ b = streamEndsLen - 1;
+ // invariant: streamEnds[a] < streamStart <= streamEnds[b]
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (streamStart <= streamEnds[m]) {
+ b = m;
+ } else {
+ a = m;
+ }
+ }
+ *streamEnd = streamEnds[b];
+ return gTrue;
+}
+
+int XRef::getNumEntry(Guint offset) const
+{
+ if (size > 0)
+ {
+ int res = 0;
+ Guint resOffset = entries[0].offset;
+ XRefEntry e;
+ for (int i = 1; i < size; ++i)
+ {
+ e = entries[i];
+ if (e.offset < offset && e.offset >= resOffset)
+ {
+ res = i;
+ resOffset = e.offset;
+ }
+ }
+ return res;
+ }
+ else return -1;
+}
+
+Guint XRef::strToUnsigned(char *s) {
+ Guint x;
+ char *p;
+ int i;
+
+ x = 0;
+ for (p = s, i = 0; *p && isdigit(*p) && i < 10; ++p, ++i) {
+ x = 10 * x + (*p - '0');
+ }
+ return x;
+}
+
+void XRef::add(int num, int gen, Guint offs, GBool used) {
+ if (num >= size) {
+ entries = (XRefEntry *)greallocn(entries, num + 1, sizeof(XRefEntry));
+ for (int i = size; i < num + 1; ++i) {
+ entries[i].offset = 0xffffffff;
+ entries[i].type = xrefEntryFree;
+ entries[i].obj.initNull ();
+ entries[i].updated = false;
+ entries[i].gen = 0;
+ }
+ size = num + 1;
+ }
+ XRefEntry *e = &entries[num];
+ e->gen = gen;
+ e->obj.initNull ();
+ e->updated = false;
+ if (used) {
+ e->type = xrefEntryUncompressed;
+ e->offset = offs;
+ } else {
+ e->type = xrefEntryFree;
+ e->offset = 0;
+ }
+}
+
+void XRef::setModifiedObject (Object* o, Ref r) {
+ if (r.num < 0 || r.num >= size) {
+ error(-1,"XRef::setModifiedObject on unknown ref: %i, %i\n", r.num, r.gen);
+ return;
+ }
+ entries[r.num].obj.free();
+ o->copy(&entries[r.num].obj);
+ entries[r.num].updated = true;
+}
+
+Ref XRef::addIndirectObject (Object* o) {
+ int entryIndexToUse = -1;
+ for (int i = 1; entryIndexToUse == -1 && i < size; ++i) {
+ if (entries[i].type == xrefEntryFree) entryIndexToUse = i;
+ }
+
+ XRefEntry *e;
+ if (entryIndexToUse == -1) {
+ entryIndexToUse = size;
+ size++;
+ entries = (XRefEntry *)greallocn(entries, size, sizeof(XRefEntry));
+ e = &entries[entryIndexToUse];
+ e->gen = 0;
+ } else {
+ //reuse a free entry
+ e = &entries[entryIndexToUse];
+ //we don't touch gen number, because it should have been
+ //incremented when the object was deleted
+ }
+ e->type = xrefEntryUncompressed;
+ o->copy(&e->obj);
+ e->updated = true;
+
+ Ref r;
+ r.num = entryIndexToUse;
+ r.gen = e->gen;
+ return r;
+}
+
+void XRef::writeToFile(OutStream* outStr, GBool writeAllEntries) {
+ //create free entries linked-list
+ if (entries[0].gen != 65535) {
+ error(-1, "XRef::writeToFile, entry 0 of the XRef is invalid (gen != 65535)\n");
+ }
+ int lastFreeEntry = 0;
+ for (int i=0; i<size; i++) {
+ if (entries[i].type == xrefEntryFree) {
+ entries[lastFreeEntry].offset = i;
+ lastFreeEntry = i;
+ }
+ }
+
+ if (writeAllEntries) {
+ //write the new xref
+ outStr->printf("xref\r\n");
+ outStr->printf("%i %i\r\n", 0, size);
+ for (int i=0; i<size; i++) {
+ XRefEntry &e = entries[i];
+
+ if(e.gen > 65535) e.gen = 65535; //cap generation number to 65535 (required by PDFReference)
+ outStr->printf("%010i %05i %c\r\n", e.offset, e.gen, (e.type==xrefEntryFree)?'f':'n');
+ }
+ } else {
+ //write the new xref
+ outStr->printf("xref\r\n");
+ int i = 0;
+ while (i < size) {
+ int j;
+ for(j=i; j<size; j++) { //look for consecutive entries
+ if ((entries[j].type == xrefEntryFree) && (entries[j].gen == 0))
+ break;
+ }
+ if (j-i != 0)
+ {
+ outStr->printf("%i %i\r\n", i, j-i);
+ for (int k=i; k<j; k++) {
+ XRefEntry &e = entries[k];
+ if(e.gen > 65535) e.gen = 65535; //cap generation number to 65535 (required by PDFReference)
+ outStr->printf("%010i %05i %c\r\n", e.offset, e.gen, (e.type==xrefEntryFree)?'f':'n');
+ }
+ i = j;
+ }
+ else ++i;
+ }
+ }
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.h
new file mode 100644
index 00000000000..2dbd469b94c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/XRef.h
@@ -0,0 +1,167 @@
+//========================================================================
+//
+// XRef.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+// Copyright (C) 2006, 2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
+// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef XREF_H
+#define XREF_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "Object.h"
+
+class Dict;
+class Stream;
+class Parser;
+class ObjectStream;
+
+//------------------------------------------------------------------------
+// XRef
+//------------------------------------------------------------------------
+
+enum XRefEntryType {
+ xrefEntryFree,
+ xrefEntryUncompressed,
+ xrefEntryCompressed
+};
+
+struct XRefEntry {
+ Guint offset;
+ int gen;
+ XRefEntryType type;
+ bool updated;
+ Object obj; //if this entry was updated, obj will contains the updated object
+};
+
+class XRef {
+public:
+
+ // Constructor, create an empty XRef, used for PDF writing
+ XRef();
+ // Constructor. Read xref table from stream.
+ XRef(BaseStream *strA);
+
+ // Destructor.
+ ~XRef();
+
+ // Is xref table valid?
+ GBool isOk() { return ok; }
+
+ // Get the error code (if isOk() returns false).
+ int getErrorCode() { return errCode; }
+
+ // Set the encryption parameters.
+ void setEncryption(int permFlagsA, GBool ownerPasswordOkA,
+ Guchar *fileKeyA, int keyLengthA,
+ int encVersionA, int encRevisionA,
+ CryptAlgorithm encAlgorithmA);
+
+ // Is the file encrypted?
+ GBool isEncrypted() { return encrypted; }
+
+ // Check various permissions.
+ GBool okToPrint(GBool ignoreOwnerPW = gFalse);
+ GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse);
+ GBool okToChange(GBool ignoreOwnerPW = gFalse);
+ GBool okToCopy(GBool ignoreOwnerPW = gFalse);
+ GBool okToAddNotes(GBool ignoreOwnerPW = gFalse);
+ GBool okToFillForm(GBool ignoreOwnerPW = gFalse);
+ GBool okToAccessibility(GBool ignoreOwnerPW = gFalse);
+ GBool okToAssemble(GBool ignoreOwnerPW = gFalse);
+
+ // Get catalog object.
+ Object *getCatalog(Object *obj) { return fetch(rootNum, rootGen, obj); }
+
+ // Fetch an indirect reference.
+ Object *fetch(int num, int gen, Object *obj);
+
+ // Return the document's Info dictionary (if any).
+ Object *getDocInfo(Object *obj);
+ Object *getDocInfoNF(Object *obj);
+
+ // Return the number of objects in the xref table.
+ int getNumObjects() { return size; }
+
+ // Return the offset of the last xref table.
+ Guint getLastXRefPos() { return lastXRefPos; }
+
+ // Return the catalog object reference.
+ int getRootNum() { return rootNum; }
+ int getRootGen() { return rootGen; }
+
+ // Get end position for a stream in a damaged file.
+ // Returns false if unknown or file is not damaged.
+ GBool getStreamEnd(Guint streamStart, Guint *streamEnd);
+
+ // Retuns the entry that belongs to the offset
+ int getNumEntry(Guint offset) const;
+
+ // Direct access.
+ int getSize() { return size; }
+ XRefEntry *getEntry(int i) { return &entries[i]; }
+ Object *getTrailerDict() { return &trailerDict; }
+
+ // Write access
+ void setModifiedObject(Object* o, Ref r);
+ Ref addIndirectObject (Object* o);
+ void add(int num, int gen, Guint offs, GBool used);
+ void writeToFile(OutStream* outStr, GBool writeAllEntries);
+
+private:
+
+ BaseStream *str; // input stream
+ Guint start; // offset in file (to allow for garbage
+ // at beginning of file)
+ XRefEntry *entries; // xref entries
+ int size; // size of <entries> array
+ int rootNum, rootGen; // catalog dict
+ GBool ok; // true if xref table is valid
+ int errCode; // error code (if <ok> is false)
+ Object trailerDict; // trailer dictionary
+ Guint lastXRefPos; // offset of last xref table
+ Guint *streamEnds; // 'endstream' positions - only used in
+ // damaged files
+ int streamEndsLen; // number of valid entries in streamEnds
+ ObjectStream *objStr; // cached object stream
+ GBool encrypted; // true if file is encrypted
+ int encRevision;
+ int encVersion; // encryption algorithm
+ CryptAlgorithm encAlgorithm; // encryption algorithm
+ int keyLength; // length of key, in bytes
+ int permFlags; // permission bits
+ Guchar fileKey[16]; // file decryption key
+ GBool ownerPasswordOk; // true if owner password is correct
+
+ Guint getStartXref();
+ GBool readXRef(Guint *pos);
+ GBool readXRefTable(Parser *parser, Guint *pos);
+ GBool readXRefStreamSection(Stream *xrefStr, int *w, int first, int n);
+ GBool readXRefStream(Stream *xrefStr, Guint *pos);
+ GBool constructXRef();
+ Guint strToUnsigned(char *s);
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.cc b/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.cc
new file mode 100644
index 00000000000..94d2851fedd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.cc
@@ -0,0 +1,273 @@
+//========================================================================
+//
+// XpdfPluginAPI.cc
+//
+// Copyright 2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+
+#ifdef ENABLE_PLUGINS
+
+#include "gmem.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "PDFDoc.h"
+#ifdef _WIN32
+#include "WinPDFCore.h"
+#else
+#include "XPDFCore.h"
+#endif
+#include "XpdfPluginAPI.h"
+
+//------------------------------------------------------------------------
+
+//~ This should use a pool of Objects; change xpdfFreeObj to match.
+static Object *allocObj() {
+ return (Object *)gmalloc(sizeof(Object));
+}
+
+//------------------------------------------------------------------------
+// Document access functions
+//------------------------------------------------------------------------
+
+XpdfObject _xpdfGetInfoDict(XpdfDoc doc) {
+ Object *obj;
+
+ obj = allocObj();
+ return (XpdfObject)((PDFDoc *)doc)->getDocInfo(obj);
+}
+
+XpdfObject _xpdfGetCatalog(XpdfDoc doc) {
+ Object *obj;
+
+ obj = allocObj();
+ return (XpdfObject)((PDFDoc *)doc)->getXRef()->getCatalog(obj);
+}
+
+#ifdef _WIN32
+
+HWND _xpdfWin32GetWindow(XpdfDoc doc) {
+ WinPDFCore *core;
+
+ if (!(core = (WinPDFCore *)((PDFDoc *)doc)->getGUIData())) {
+ return NULL;
+ }
+ return core->getDrawFrame();
+}
+
+#else
+
+Widget _xpdfXGetWindow(XpdfDoc doc) {
+ XPDFCore *core;
+
+ if (!(core = (XPDFCore *)((PDFDoc *)doc)->getGUIData())) {
+ return NULL;
+ }
+ return core->getWidget();
+}
+
+#endif
+
+//------------------------------------------------------------------------
+// Object access functions.
+//------------------------------------------------------------------------
+
+XpdfBool _xpdfObjIsBool(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isBool();
+}
+
+XpdfBool _xpdfObjIsInt(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isInt();
+}
+
+XpdfBool _xpdfObjIsReal(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isReal();
+}
+
+XpdfBool _xpdfObjIsNumber(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isNum();
+}
+
+XpdfBool _xpdfObjIsString(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isString();
+}
+
+XpdfBool _xpdfObjIsName(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isName();
+}
+
+XpdfBool _xpdfObjIsNull(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isNull();
+}
+
+XpdfBool _xpdfObjIsArray(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isArray();
+}
+
+XpdfBool _xpdfObjIsDict(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isDict();
+}
+
+XpdfBool _xpdfObjIsStream(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isStream();
+}
+
+XpdfBool _xpdfObjIsRef(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->isRef();
+}
+
+XpdfBool _xpdfBoolValue(XpdfObject obj) {
+ return (XpdfBool)((Object *)obj)->getBool();
+}
+
+int _xpdfIntValue(XpdfObject obj) {
+ if (!((Object *)obj)->isInt()) {
+ return 0;
+ }
+ return ((Object *)obj)->getInt();
+}
+
+double _xpdfRealValue(XpdfObject obj) {
+ if (!((Object *)obj)->isReal()) {
+ return 0;
+ }
+ return ((Object *)obj)->getReal();
+}
+
+double _xpdfNumberValue(XpdfObject obj) {
+ if (!((Object *)obj)->isNum()) {
+ return 0;
+ }
+ return ((Object *)obj)->getNum();
+}
+
+int _xpdfStringLength(XpdfObject obj) {
+ if (!((Object *)obj)->isString()) {
+ return 0;
+ }
+ return ((Object *)obj)->getString()->getLength();
+}
+
+char *_xpdfStringValue(XpdfObject obj) {
+ if (!((Object *)obj)->isString()) {
+ return 0;
+ }
+ return ((Object *)obj)->getString()->getCString();
+}
+
+char *_xpdfNameValue(XpdfObject obj) {
+ if (!((Object *)obj)->isName()) {
+ return NULL;
+ }
+ return ((Object *)obj)->getName();
+}
+
+int _xpdfArrayLength(XpdfObject obj) {
+ if (!((Object *)obj)->isArray()) {
+ return 0;
+ }
+ return ((Object *)obj)->arrayGetLength();
+}
+
+XpdfObject _xpdfArrayGet(XpdfObject obj, int idx) {
+ Object *elem;
+
+ elem = allocObj();
+ if (!((Object *)obj)->isArray()) {
+ return (XpdfObject)elem->initNull();
+ }
+ return (XpdfObject)((Object *)obj)->arrayGet(idx, elem);
+}
+
+XpdfObject _xpdfDictGet(XpdfObject obj, char *key) {
+ Object *elem;
+
+ elem = allocObj();
+ if (!((Object *)obj)->isDict()) {
+ return (XpdfObject)elem->initNull();
+ }
+ return (XpdfObject)((Object *)obj)->dictLookup(key, elem);
+}
+
+void _xpdfFreeObj(XpdfObject obj) {
+ ((Object *)obj)->free();
+ gfree(obj);
+}
+
+//------------------------------------------------------------------------
+// Memory allocation functions
+//------------------------------------------------------------------------
+
+void *_xpdfMalloc(int size) {
+ return gmalloc(size);
+}
+
+void *_xpdfRealloc(void *p, int size) {
+ return grealloc(p, size);
+}
+
+void _xpdfFree(void *p) {
+ gfree(p);
+}
+
+//------------------------------------------------------------------------
+// Security handlers
+//------------------------------------------------------------------------
+
+void _xpdfRegisterSecurityHandler(XpdfSecurityHandler *handler) {
+ if (handler->version <= xpdfPluginAPIVersion) {
+ globalParams->addSecurityHandler(handler);
+ }
+}
+
+//------------------------------------------------------------------------
+
+XpdfPluginVecTable xpdfPluginVecTable = {
+ xpdfPluginAPIVersion,
+ &_xpdfGetInfoDict,
+ &_xpdfGetCatalog,
+#ifdef _WIN32
+ &_xpdfWin32GetWindow,
+#else
+ &_xpdfXGetWindow,
+#endif
+ &_xpdfObjIsBool,
+ &_xpdfObjIsInt,
+ &_xpdfObjIsReal,
+ &_xpdfObjIsString,
+ &_xpdfObjIsName,
+ &_xpdfObjIsNull,
+ &_xpdfObjIsArray,
+ &_xpdfObjIsDict,
+ &_xpdfObjIsStream,
+ &_xpdfObjIsRef,
+ &_xpdfBoolValue,
+ &_xpdfIntValue,
+ &_xpdfRealValue,
+ &_xpdfStringLength,
+ &_xpdfStringValue,
+ &_xpdfNameValue,
+ &_xpdfArrayLength,
+ &_xpdfArrayGet,
+ &_xpdfDictGet,
+ &_xpdfFreeObj,
+ &_xpdfMalloc,
+ &_xpdfRealloc,
+ &_xpdfFree,
+ &_xpdfRegisterSecurityHandler,
+};
+
+#endif // ENABLE_PLUGINS
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.h
new file mode 100644
index 00000000000..22540f728bd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/XpdfPluginAPI.h
@@ -0,0 +1,341 @@
+/*
+ * XpdfPluginAPI.h
+ *
+ * Copyright 2004 Glyph & Cog, LLC
+ */
+
+#ifndef XPDFPLUGINAPI_H
+#define XPDFPLUGINAPI_H
+
+#ifdef _WIN32
+#include <windows.h>
+#else
+#define Object XtObject
+#include <X11/Intrinsic.h>
+#undef Object
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*------------------------------------------------------------------------
+ * Macros
+ *------------------------------------------------------------------------*/
+
+/*
+ * The current API version.
+ */
+#define xpdfPluginAPIVersion 1
+
+#ifdef _WIN32
+# ifdef __cplusplus
+# define PLUGINFUNC(retType) extern "C" __declspec(dllexport) retType
+# else
+# define PLUGINFUNC(retType) extern __declspec(dllexport) retType
+# endif
+#else
+# ifdef __cplusplus
+# define PLUGINFUNC(retType) extern "C" retType
+# else
+# define PLUGINFUNC(retType) extern retType
+# endif
+#endif
+
+/*------------------------------------------------------------------------
+ * Plugin setup/cleanup
+ *------------------------------------------------------------------------*/
+
+/*
+ * All plugins are required to implement two functions:
+ *
+ * -- Initialize the plugin. Returns non-zero if successful.
+ * PLUGINFUNC(XpdfBool) xpdfInitPlugin(void);
+ *
+ * -- Free the plugin.
+ * PLUGINFUNC(void) xpdfFreePlugin(void);
+ */
+
+/*------------------------------------------------------------------------
+ * Types
+ *------------------------------------------------------------------------*/
+
+/*
+ * Standard C boolean -- zero = false, non-zero = true.
+ */
+typedef int XpdfBool;
+#define xpdfTrue 1
+#define xpdfFalse 0
+
+/*
+ * PDF document handle.
+ */
+typedef struct _XpdfDoc *XpdfDoc;
+
+/*
+ * PDF object handle.
+ */
+typedef struct _XpdfObject *XpdfObject;
+
+/*
+ * Document access permissions. Any of these can be bitwise 'or'ed
+ * together. If xpdfPermissionOpen is not included, the document
+ * cannot be opened at all, and the other bits are ignored.
+ */
+typedef unsigned int XpdfPermission;
+#define xpdfPermissionOpen (1 << 0)
+#define xpdfPermissionPrint (1 << 2)
+#define xpdfPermissionChange (1 << 3)
+#define xpdfPermissionCopy (1 << 4)
+#define xpdfPermissionNotes (1 << 5)
+
+/*------------------------------------------------------------------------
+ * Security handler
+ *------------------------------------------------------------------------*/
+
+/*
+ * XpdfSecurityHandler - a security handler plugin should create one
+ * of these and pass it to xpdfRegisterSecurityHandler.
+ */
+#ifdef __cplusplus
+struct XpdfSecurityHandler {
+#else
+typedef struct {
+#endif
+
+ /*
+ * Version of the security handler spec (this document) -- use
+ * xpdfPluginAPIVersion.
+ */
+ int version;
+
+ /*
+ * Security handler name.
+ */
+ char *name;
+
+ /*
+ * Any global data the security handler needs. XpdfViewer will pass
+ * this pointer to all handler functions as the <handlerData>
+ * argument.
+ */
+ void *handlerData;
+
+ /*
+ * Allocate and initialize data for a new document. XpdfViewer will
+ * pass the returned pointer to all other handler functions as the
+ * <docData> argument. Returns non-zero if successful.
+ */
+ XpdfBool (*newDoc)(void *handlerData, XpdfDoc doc,
+ XpdfObject encryptDict, void **docData);
+
+ /*
+ * Free the data allocated by newDoc.
+ */
+ void (*freeDoc)(void *handlerData, void *docData);
+
+ /*
+ * Construct authorization data based on the supplied owner and user
+ * passwords (either or both of which may be NULL). This function
+ * is called in "batch" mode, i.e., if the password was supplied on
+ * the command line or via an Xpdf library API. It should not
+ * generate any user interaction (e.g., a password dialog). It is
+ * not required to support this function: the makeAuthData function
+ * pointer can be set to NULL. Returns non-zero if successful.
+ */
+ XpdfBool (*makeAuthData)(void *handlerData, void *docData,
+ char *ownerPassword, char *userPassword,
+ void **authData);
+
+ /*
+ * Request any needed information (e.g., a password) from the user,
+ * and construct an authorization data object. Returns non-zero if
+ * successful.
+ */
+ XpdfBool (*getAuthData)(void *handlerData, void *docData,
+ void **authData);
+
+ /*
+ * Free the data allocated by getAuthData.
+ */
+ void (*freeAuthData)(void *handlerData, void *docData,
+ void *authData);
+
+ /*
+ * Request permission to access the document. This returns all
+ * permissions granted by authData.
+ */
+ XpdfPermission (*authorize)(void *handlerData, void *docData,
+ void *authData);
+
+ /*
+ * Get the decryption key and algorithm version associated with the
+ * document. Returns non-zero if successful.
+ */
+ XpdfBool (*getKey)(void *handlerData, void *docData,
+ char **key, int *keyLen, int *cryptVersion);
+
+ /*
+ * Free the data allocated by getKey.
+ */
+ void (*freeKey)(void *handlerData, void *docData,
+ char *key, int keyLen);
+
+#ifdef __cplusplus
+};
+#else
+} XpdfSecurityHandler;
+#endif
+
+/*------------------------------------------------------------------------*/
+
+typedef struct {
+ int version;
+
+/*------------------------------------------------------------------------
+ * Document access functions
+ *------------------------------------------------------------------------*/
+
+/*
+ * Get a document's info dictionary. (The returned object must be
+ * freed with xpdfFreeObj.)
+ */
+XpdfObject (*_xpdfGetInfoDict)(XpdfDoc doc);
+
+/*
+ * Get a document's catalog ("root") dictionary. (The returned object
+ * must be freed with xpdfFreeObj.)
+ */
+XpdfObject (*_xpdfGetCatalog)(XpdfDoc doc);
+
+#ifdef _WIN32
+
+/*
+ * Get the handle for the viewer window associated with the specified
+ * document. [Win32 only]
+ */
+HWND (*_xpdfWin32GetWindow)(XpdfDoc doc);
+
+#else
+
+/*
+ * Get the Motif widget for the viewer window associated with the
+ * specified document. [X only]
+ */
+Widget (*_xpdfXGetWindow)(XpdfDoc doc);
+
+#endif
+
+/*------------------------------------------------------------------------
+ * Object access functions
+ *------------------------------------------------------------------------*/
+
+/*
+ * Check an object's type.
+ */
+XpdfBool (*_xpdfObjIsBool)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsInt)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsReal)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsString)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsName)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsNull)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsArray)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsDict)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsStream)(XpdfObject obj);
+XpdfBool (*_xpdfObjIsRef)(XpdfObject obj);
+
+/*
+ * Value access.
+ * (Objects returned by xpdfArrayGet and xpdfDictGet must be freed
+ * with xpdfFreeObj.)
+ */
+XpdfBool (*_xpdfBoolValue)(XpdfObject obj);
+int (*_xpdfIntValue)(XpdfObject obj);
+double (*_xpdfRealValue)(XpdfObject obj);
+int (*_xpdfStringLength)(XpdfObject obj);
+char *(*_xpdfStringValue)(XpdfObject obj);
+char *(*_xpdfNameValue)(XpdfObject obj);
+int (*_xpdfArrayLength)(XpdfObject obj);
+XpdfObject (*_xpdfArrayGet)(XpdfObject obj, int idx);
+XpdfObject (*_xpdfDictGet)(XpdfObject obj, char *key);
+
+/*
+ * Object destruction. NB: *all* objects must be freed after use.
+ */
+void (*_xpdfFreeObj)(XpdfObject obj);
+
+/*------------------------------------------------------------------------
+ * Memory allocation functions
+ *------------------------------------------------------------------------*/
+
+void *(*_xpdfMalloc)(int size);
+void *(*_xpdfRealloc)(void *p, int size);
+void (*_xpdfFree)(void *p);
+
+/*------------------------------------------------------------------------
+ * Security handler functions
+ *------------------------------------------------------------------------*/
+
+/*
+ * Register a new security handler.
+ */
+void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler);
+
+/*------------------------------------------------------------------------*/
+
+} XpdfPluginVecTable;
+
+#ifdef _WIN32
+
+extern __declspec(dllexport) XpdfPluginVecTable xpdfPluginVecTable;
+
+#define xpdfPluginSetup \
+ extern __declspec(dllexport) \
+ XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion};
+
+#else
+
+extern XpdfPluginVecTable xpdfPluginVecTable;
+
+#define xpdfPluginSetup \
+ XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion};
+
+#endif
+
+#define xpdfGetInfoDict (*xpdfPluginVecTable._xpdfGetInfoDict)
+#define xpdfGetCatalog (*xpdfPluginVecTable._xpdfGetCatalog)
+#ifdef _WIN32
+#define xpdfWin32GetWindow (*xpdfPluginVecTable._xpdfWin32GetWindow)
+#else
+#define xpdfXGetWindow (*xpdfPluginVecTable._xpdfXGetWindow)
+#endif
+#define xpdfObjIsBool (*xpdfPluginVecTable._xpdfObjIsBool)
+#define xpdfObjIsInt (*xpdfPluginVecTable._xpdfObjIsInt)
+#define xpdfObjIsReal (*xpdfPluginVecTable._xpdfObjIsReal)
+#define xpdfObjIsString (*xpdfPluginVecTable._xpdfObjIsString)
+#define xpdfObjIsName (*xpdfPluginVecTable._xpdfObjIsName)
+#define xpdfObjIsNull (*xpdfPluginVecTable._xpdfObjIsNull)
+#define xpdfObjIsArray (*xpdfPluginVecTable._xpdfObjIsArray)
+#define xpdfObjIsDict (*xpdfPluginVecTable._xpdfObjIsDict)
+#define xpdfObjIsStream (*xpdfPluginVecTable._xpdfObjIsStream)
+#define xpdfObjIsRef (*xpdfPluginVecTable._xpdfObjIsRef)
+#define xpdfBoolValue (*xpdfPluginVecTable._xpdfBoolValue)
+#define xpdfIntValue (*xpdfPluginVecTable._xpdfIntValue)
+#define xpdfRealValue (*xpdfPluginVecTable._xpdfRealValue)
+#define xpdfStringLength (*xpdfPluginVecTable._xpdfStringLength)
+#define xpdfStringValue (*xpdfPluginVecTable._xpdfStringValue)
+#define xpdfNameValue (*xpdfPluginVecTable._xpdfNameValue)
+#define xpdfArrayLength (*xpdfPluginVecTable._xpdfArrayLength)
+#define xpdfArrayGet (*xpdfPluginVecTable._xpdfArrayGet)
+#define xpdfDictGet (*xpdfPluginVecTable._xpdfDictGet)
+#define xpdfFreeObj (*xpdfPluginVecTable._xpdfFreeObj)
+#define xpdfMalloc (*xpdfPluginVecTable._xpdfMalloc)
+#define xpdfRealloc (*xpdfPluginVecTable._xpdfRealloc)
+#define xpdfFree (*xpdfPluginVecTable._xpdfFree)
+#define xpdfRegisterSecurityHandler (*xpdfPluginVecTable._xpdfRegisterSecurityHandler)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/gen-unicode-tables.py b/Build/source/libs/poppler/poppler-0.12.4/poppler/gen-unicode-tables.py
new file mode 100644
index 00000000000..282f6e52518
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/gen-unicode-tables.py
@@ -0,0 +1,38 @@
+UNICODE_LAST_CHAR_PART1 = 0x2FAFF
+HANGUL_S_BASE = 0xAC00
+HANGUL_S_COUNT = 19 * 21 * 28
+import unicodedata
+
+print """// Generated by gen-unicode-tables.py
+
+typedef struct {
+ Unicode character;
+ int length;
+ int offset;
+} decomposition;
+"""
+
+decomp_table = []
+max_index = 0
+decomp_expansion_index = {}
+decomp_expansion = []
+for u in xrange(0, UNICODE_LAST_CHAR_PART1):
+ if (u >= HANGUL_S_BASE and u < HANGUL_S_BASE + HANGUL_S_COUNT):
+ continue
+ norm = tuple(map(ord, unicodedata.normalize("NFKD", unichr(u))))
+ if norm != (u,):
+ try:
+ i = decomp_expansion_index[norm]
+ decomp_table.append((u, len(norm), i))
+ except KeyError:
+ decomp_table.append((u, len(norm), max_index))
+ decomp_expansion_index[norm] = max_index
+ decomp_expansion.append((norm, max_index))
+ max_index += len(norm)
+print "#define DECOMP_TABLE_LENGTH %d\n" % len(decomp_table)
+print "static const decomposition decomp_table[] = {\n%s\n};\n" % ", \n".join(
+ " { 0x%x, %d, %d }" % (character, length, offset)
+ for character, length, offset in decomp_table)
+print "static const Unicode decomp_expansion[] = {\n%s\n};\n" % ", \n".join(
+ " %s /* offset %d */ " % (", ".join("0x%x" % u for u in norm),
+ index) for norm, index in decomp_expansion)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h b/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h
new file mode 100644
index 00000000000..5dc6ea109c8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h
@@ -0,0 +1,91 @@
+/* poppler/poppler-config.h. Generated from poppler-config.h.in by configure. */
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
+// Copyright 1996-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef POPPLER_CONFIG_H
+#define POPPLER_CONFIG_H
+
+// We duplicate some of the config.h #define's here since they are
+// used in some of the header files we install. The #ifndef/#endif
+// around #undef look odd, but it's to silence warnings about
+// redefining those symbols.
+
+/* Enable multithreading support. */
+#ifndef MULTITHREADED
+#define MULTITHREADED 1
+#endif
+
+/* Enable exceptions. */
+#ifndef USE_EXCEPTIONS
+/* #undef USE_EXCEPTIONS */
+#endif
+
+/* Use fixedpoint. */
+#ifndef USE_FIXEDPOINT
+/* #undef USE_FIXEDPOINT */
+#endif
+
+/* Include support for OPI comments. */
+#ifndef OPI_SUPPORT
+#define OPI_SUPPORT 1
+#endif
+
+/* Enable word list support. */
+#ifndef TEXTOUT_WORD_LIST
+#define TEXTOUT_WORD_LIST 1
+#endif
+
+// Also, there's a couple of preprocessor symbols in the header files
+// that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and
+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// copyright notice
+#define popplerCopyright "Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org"
+#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// popen
+//------------------------------------------------------------------------
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
+#endif
+
+#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
+#define POPEN_READ_MODE "rb"
+#else
+#define POPEN_READ_MODE "r"
+#endif
+
+//------------------------------------------------------------------------
+// Win32 stuff
+//------------------------------------------------------------------------
+
+#if defined(_WIN32) && !defined(_MSC_VER)
+#include <windef.h>
+#else
+#define CDECL
+#endif
+
+//------------------------------------------------------------------------
+// Compiler
+//------------------------------------------------------------------------
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
+ __attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define GCC_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
+
+#endif /* POPPLER_CONFIG_H */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h.in b/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h.in
new file mode 100644
index 00000000000..016a081505f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/poppler/poppler-config.h.in
@@ -0,0 +1,90 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
+// Copyright 1996-2004 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef POPPLER_CONFIG_H
+#define POPPLER_CONFIG_H
+
+// We duplicate some of the config.h #define's here since they are
+// used in some of the header files we install. The #ifndef/#endif
+// around #undef look odd, but it's to silence warnings about
+// redefining those symbols.
+
+/* Enable multithreading support. */
+#ifndef MULTITHREADED
+#undef MULTITHREADED
+#endif
+
+/* Enable exceptions. */
+#ifndef USE_EXCEPTIONS
+#undef USE_EXCEPTIONS
+#endif
+
+/* Use fixedpoint. */
+#ifndef USE_FIXEDPOINT
+#undef USE_FIXEDPOINT
+#endif
+
+/* Include support for OPI comments. */
+#ifndef OPI_SUPPORT
+#undef OPI_SUPPORT
+#endif
+
+/* Enable word list support. */
+#ifndef TEXTOUT_WORD_LIST
+#undef TEXTOUT_WORD_LIST
+#endif
+
+// Also, there's a couple of preprocessor symbols in the header files
+// that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and
+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// copyright notice
+#define popplerCopyright "Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org"
+#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// popen
+//------------------------------------------------------------------------
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
+#endif
+
+#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS)
+#define POPEN_READ_MODE "rb"
+#else
+#define POPEN_READ_MODE "r"
+#endif
+
+//------------------------------------------------------------------------
+// Win32 stuff
+//------------------------------------------------------------------------
+
+#if defined(_WIN32) && !defined(_MSC_VER)
+#include <windef.h>
+#else
+#define CDECL
+#endif
+
+//------------------------------------------------------------------------
+// Compiler
+//------------------------------------------------------------------------
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
+ __attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define GCC_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
+
+#endif /* POPPLER_CONFIG_H */
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/qt/CMakeLists.txt
new file mode 100644
index 00000000000..7f4d233f391
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/CMakeLists.txt
@@ -0,0 +1,34 @@
+add_definitions(${QT3_DEFINITIONS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT3_INCLUDE_DIR}
+)
+
+set(poppler_qt_SRCS
+ poppler-document.cc
+ poppler-fontinfo.cc
+ poppler-link.cc
+ poppler-page.cc
+ poppler-page-transition.cc
+ poppler-private.cc
+)
+add_library(poppler-qt SHARED ${poppler_qt_SRCS})
+set_target_properties(poppler-qt PROPERTIES VERSION 2.0.0 SOVERSION 2)
+target_link_libraries(poppler-qt poppler ${QT3_LIBRARIES})
+install(TARGETS poppler-qt RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+install(FILES
+ poppler-qt.h
+ poppler-page-transition.h
+ poppler-link-qt3.h
+ DESTINATION include/poppler/qt3)
+
+
+set(test_poppler_qt_SOURCES
+ test-poppler-qt.cpp
+)
+poppler_add_test(test-poppler-qt BUILD_QT3_TESTS ${test_poppler_qt_SOURCES})
+target_link_libraries(test-poppler-qt poppler-qt)
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.am
new file mode 100644
index 00000000000..df0115cedac
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.am
@@ -0,0 +1,48 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ $(cairo_includes) \
+ $(POPPLER_QT_CXXFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+
+poppler_includedir = $(includedir)/poppler/qt3
+poppler_include_HEADERS = \
+ poppler-qt.h \
+ poppler-page-transition.h \
+ poppler-link-qt3.h
+
+lib_LTLIBRARIES = libpoppler-qt.la
+libpoppler_qt_la_SOURCES = \
+ poppler-document.cc \
+ poppler-fontinfo.cc \
+ poppler-link.cc \
+ poppler-page.cc \
+ poppler-page-transition.cc \
+ poppler-page-transition-private.h \
+ poppler-private.cc \
+ poppler-private.h
+
+libpoppler_qt_la_LIBADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(POPPLER_QT_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+libpoppler_qt_la_LDFLAGS = -version-info 2:0:0 @create_shared_lib@
+
+if BUILD_SPLASH_OUTPUT
+
+noinst_PROGRAMS = test-poppler-qt
+
+endif
+
+test_poppler_qt_SOURCES = \
+ test-poppler-qt.cpp
+
+test_poppler_qt_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ libpoppler-qt.la \
+ $(POPPLER_QT_LIBS) \
+ $(FREETYPE_LIBS)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.in
new file mode 100644
index 00000000000..5b8c7c6a76f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/Makefile.in
@@ -0,0 +1,742 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_SPLASH_OUTPUT_TRUE@noinst_PROGRAMS = test-poppler-qt$(EXEEXT)
+subdir = qt
+DIST_COMMON = $(poppler_include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(poppler_includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libpoppler_qt_la_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_libpoppler_qt_la_OBJECTS = poppler-document.lo poppler-fontinfo.lo \
+ poppler-link.lo poppler-page.lo poppler-page-transition.lo \
+ poppler-private.lo
+libpoppler_qt_la_OBJECTS = $(am_libpoppler_qt_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libpoppler_qt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libpoppler_qt_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+PROGRAMS = $(noinst_PROGRAMS)
+am_test_poppler_qt_OBJECTS = test-poppler-qt.$(OBJEXT)
+test_poppler_qt_OBJECTS = $(am_test_poppler_qt_OBJECTS)
+test_poppler_qt_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ libpoppler-qt.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libpoppler_qt_la_SOURCES) $(test_poppler_qt_SOURCES)
+DIST_SOURCES = $(libpoppler_qt_la_SOURCES) $(test_poppler_qt_SOURCES)
+HEADERS = $(poppler_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ $(cairo_includes) \
+ $(POPPLER_QT_CXXFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+poppler_includedir = $(includedir)/poppler/qt3
+poppler_include_HEADERS = \
+ poppler-qt.h \
+ poppler-page-transition.h \
+ poppler-link-qt3.h
+
+lib_LTLIBRARIES = libpoppler-qt.la
+libpoppler_qt_la_SOURCES = \
+ poppler-document.cc \
+ poppler-fontinfo.cc \
+ poppler-link.cc \
+ poppler-page.cc \
+ poppler-page-transition.cc \
+ poppler-page-transition-private.h \
+ poppler-private.cc \
+ poppler-private.h
+
+libpoppler_qt_la_LIBADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(POPPLER_QT_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+libpoppler_qt_la_LDFLAGS = -version-info 2:0:0 @create_shared_lib@
+test_poppler_qt_SOURCES = \
+ test-poppler-qt.cpp
+
+test_poppler_qt_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ libpoppler-qt.la \
+ $(POPPLER_QT_LIBS) \
+ $(FREETYPE_LIBS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign qt/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libpoppler-qt.la: $(libpoppler_qt_la_OBJECTS) $(libpoppler_qt_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libpoppler_qt_la_LINK) -rpath $(libdir) $(libpoppler_qt_la_OBJECTS) $(libpoppler_qt_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test-poppler-qt$(EXEEXT): $(test_poppler_qt_OBJECTS) $(test_poppler_qt_DEPENDENCIES)
+ @rm -f test-poppler-qt$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_poppler_qt_OBJECTS) $(test_poppler_qt_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-document.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-fontinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-link.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-page-transition.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-page.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-private.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-poppler-qt.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_includeHEADERS: $(poppler_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)"
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-poppler_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-poppler_includeHEADERS install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-poppler_includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-document.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-document.cc
new file mode 100644
index 00000000000..bade1d12230
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-document.cc
@@ -0,0 +1,332 @@
+/* poppler-document.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005-2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+ * Copyright (C) 2006, Wilfried Huss <Wilfried.Huss@gmx.at>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <poppler-qt.h>
+#include <qfile.h>
+#include <GlobalParams.h>
+#include <Outline.h>
+#include <PDFDoc.h>
+#include <PSOutputDev.h>
+#include <Catalog.h>
+#include <ErrorCodes.h>
+#include <SplashOutputDev.h>
+#include <splash/SplashBitmap.h>
+#include <DateInfo.h>
+#include "poppler-private.h"
+
+namespace Poppler {
+
+Document *Document::load(const QString &filePath)
+{
+ if (!globalParams) {
+ globalParams = new GlobalParams();
+ }
+
+ DocumentData *doc = new DocumentData(new GooString(QFile::encodeName(filePath)), NULL);
+ Document *pdoc;
+ if (doc->doc.isOk() || doc->doc.getErrorCode() == errEncrypted) {
+ pdoc = new Document(doc);
+ if (doc->doc.getErrorCode() == errEncrypted)
+ pdoc->data->locked = true;
+ else
+ pdoc->data->locked = false;
+ pdoc->data->m_fontInfoScanner = new FontInfoScanner(&(doc->doc));
+ return pdoc;
+ }
+ else
+ return NULL;
+}
+
+Document::Document(DocumentData *dataA)
+{
+ data = dataA;
+}
+
+Document::~Document()
+{
+ delete data;
+}
+
+bool Document::isLocked() const
+{
+ return data->locked;
+}
+
+bool Document::unlock(const QCString &password)
+{
+ if (data->locked) {
+ /* racier then it needs to be */
+ GooString *filename = new GooString(data->doc.getFileName());
+ GooString *pwd = new GooString(password.data());
+ DocumentData *doc2 = new DocumentData(filename, pwd);
+ delete pwd;
+ if (!doc2->doc.isOk()) {
+ delete doc2;
+ } else {
+ delete data;
+ data = doc2;
+ data->locked = false;
+ data->m_fontInfoScanner = new FontInfoScanner(&(data->doc));
+ }
+ }
+ return data->locked;
+}
+
+Document::PageMode Document::getPageMode(void) const
+{
+ switch (data->doc.getCatalog()->getPageMode()) {
+ case Catalog::pageModeNone:
+ return UseNone;
+ case Catalog::pageModeOutlines:
+ return UseOutlines;
+ case Catalog::pageModeThumbs:
+ return UseThumbs;
+ case Catalog::pageModeFullScreen:
+ return FullScreen;
+ case Catalog::pageModeOC:
+ return UseOC;
+ default:
+ return UseNone;
+ }
+}
+
+int Document::getNumPages() const
+{
+ return data->doc.getNumPages();
+}
+
+QValueList<FontInfo> Document::fonts() const
+{
+ QValueList<FontInfo> ourList;
+ scanForFonts(getNumPages(), &ourList);
+ return ourList;
+}
+
+bool Document::scanForFonts( int numPages, QValueList<FontInfo> *fontList ) const
+{
+ GooList *items = data->m_fontInfoScanner->scan( numPages );
+
+ if ( NULL == items )
+ return false;
+
+ for ( int i = 0; i < items->getLength(); ++i ) {
+ QString fontName;
+ if (((::FontInfo*)items->get(i))->getName())
+ fontName = ((::FontInfo*)items->get(i))->getName()->getCString();
+
+ FontInfo font(fontName,
+ ((::FontInfo*)items->get(i))->getEmbedded(),
+ ((::FontInfo*)items->get(i))->getSubset(),
+ (Poppler::FontInfo::Type)((::FontInfo*)items->get(i))->getType());
+ fontList->append(font);
+ }
+ deleteGooList(items, ::FontInfo);
+ return true;
+}
+
+/* borrowed from kpdf */
+QString Document::getInfo( const QString & type ) const
+{
+ // [Albert] Code adapted from pdfinfo.cc on xpdf
+ Object info;
+ if ( data->locked )
+ return NULL;
+
+ data->doc.getDocInfo( &info );
+ if ( !info.isDict() )
+ return NULL;
+
+ QString result;
+ Object obj;
+ GooString *s1;
+ GBool isUnicode;
+ Unicode u;
+ int i;
+ Dict *infoDict = info.getDict();
+
+ if ( infoDict->lookup( (char*)type.latin1(), &obj )->isString() )
+ {
+ s1 = obj.getString();
+ if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
+ {
+ isUnicode = gTrue;
+ i = 2;
+ }
+ else
+ {
+ isUnicode = gFalse;
+ i = 0;
+ }
+ while ( i < obj.getString()->getLength() )
+ {
+ if ( isUnicode )
+ {
+ u = ( ( s1->getChar(i) & 0xff ) << 8 ) | ( s1->getChar(i+1) & 0xff );
+ i += 2;
+ }
+ else
+ {
+ u = s1->getChar(i) & 0xff;
+ ++i;
+ }
+ result += unicodeToQString( &u, 1 );
+ }
+ obj.free();
+ info.free();
+ return result;
+ }
+ obj.free();
+ info.free();
+ return NULL;
+}
+
+/* borrowed from kpdf */
+QDateTime Document::getDate( const QString & type ) const
+{
+ // [Albert] Code adapted from pdfinfo.cc on xpdf
+ if ( data->locked )
+ return QDateTime();
+
+ Object info;
+ data->doc.getDocInfo( &info );
+ if ( !info.isDict() ) {
+ info.free();
+ return QDateTime();
+ }
+
+ Object obj;
+ int year, mon, day, hour, min, sec, tz_hour, tz_minute;
+ char tz;
+ Dict *infoDict = info.getDict();
+ QString result;
+
+ if ( infoDict->lookup( (char*)type.latin1(), &obj )->isString() )
+ {
+ QString s = UnicodeParsedString(obj.getString());
+ // TODO do something with the timezone information
+ if ( parseDateString( s.latin1(), &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) )
+ {
+ QDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??)
+ QTime t( hour, min, sec );
+ if ( d.isValid() && t.isValid() ) {
+ obj.free();
+ info.free();
+ return QDateTime( d, t );
+ }
+ }
+ }
+ obj.free();
+ info.free();
+ return QDateTime();
+}
+
+bool Document::isEncrypted() const
+{
+ return data->doc.isEncrypted();
+}
+
+bool Document::isLinearized() const
+{
+ return data->doc.isLinearized();
+}
+
+bool Document::okToPrint() const
+{
+ return data->doc.okToPrint();
+}
+
+bool Document::okToChange() const
+{
+ return data->doc.okToChange();
+}
+
+bool Document::okToCopy() const
+{
+ return data->doc.okToCopy();
+}
+
+bool Document::okToAddNotes() const
+{
+ return data->doc.okToAddNotes();
+}
+
+double Document::getPDFVersion() const
+{
+ return data->doc.getPDFMajorVersion () + data->doc.getPDFMinorVersion() / 10.0;
+}
+
+void Document::getPdfVersion(int *major, int *minor) const
+{
+ if (major)
+ *major = data->doc.getPDFMajorVersion();
+ if (minor)
+ *minor = data->doc.getPDFMinorVersion();
+}
+
+QDomDocument *Document::toc() const
+{
+ Outline * outline = data->doc.getOutline();
+ if ( !outline )
+ return NULL;
+
+ GooList * items = outline->getItems();
+ if ( !items || items->getLength() < 1 )
+ return NULL;
+
+ QDomDocument *toc = new QDomDocument();
+ if ( items->getLength() > 0 )
+ data->addTocChildren( toc, toc, items );
+
+ return toc;
+}
+
+LinkDestination *Document::linkDestination( const QString &name )
+{
+ GooString * namedDest = QStringToGooString( name );
+ LinkDestinationData ldd(NULL, namedDest, data);
+ LinkDestination *ld = new LinkDestination(ldd);
+ delete namedDest;
+ return ld;
+}
+
+bool Document::print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate)
+{
+ return print(fileName, pageList, hDPI, vDPI, rotate, -1, -1);
+}
+
+bool Document::print(const QString &file, QValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight)
+{
+ PSOutputDev *psOut = new PSOutputDev(file.latin1(), data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(), psModePS, paperWidth, paperHeight);
+
+ if (psOut->isOk()) {
+ QValueList<int>::iterator it;
+ for (it = pageList.begin(); it != pageList.end(); ++it )
+ data->doc.displayPage(psOut, *it, hDPI, vDPI, rotate, gFalse, gTrue, gTrue);
+
+ delete psOut;
+ return true;
+ } else {
+ delete psOut;
+ return false;
+ }
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-fontinfo.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-fontinfo.cc
new file mode 100644
index 00000000000..6eb9d26f161
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-fontinfo.cc
@@ -0,0 +1,83 @@
+/* poppler-qt.h: qt interface to poppler
+ * Copyright (C) 2005, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt.h"
+
+namespace Poppler {
+
+class FontInfoData
+{
+ public:
+ QString fontName;
+ bool isEmbedded;
+ bool isSubset;
+ FontInfo::Type type;
+};
+
+FontInfo::FontInfo( const QString &fontName, const bool isEmbedded, const bool isSubset, Type type )
+{
+ data = new FontInfoData();
+ data->fontName = fontName;
+ data->isEmbedded = isEmbedded;
+ data->isSubset = isSubset;
+ data->type = type;
+}
+
+FontInfo::FontInfo( const FontInfo &fi )
+{
+ data = new FontInfoData();
+ data->fontName = fi.data->fontName;
+ data->isEmbedded = fi.data->isEmbedded;
+ data->isSubset = fi.data->isSubset;
+ data->type = fi.data->type;
+}
+
+FontInfo::FontInfo()
+{
+ data = new FontInfoData();
+ data->isEmbedded = false;
+ data->isSubset = false;
+ data->type = unknown;
+}
+
+FontInfo::~FontInfo()
+{
+ delete data;
+}
+
+const QString &FontInfo::name() const
+{
+ return data->fontName;
+}
+
+bool FontInfo::isEmbedded() const
+{
+ return data->isEmbedded;
+}
+
+bool FontInfo::isSubset() const
+{
+ return data->isSubset;
+}
+
+FontInfo::Type FontInfo::type() const
+{
+ return data->type;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link-qt3.h b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link-qt3.h
new file mode 100644
index 00000000000..82127207ca9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link-qt3.h
@@ -0,0 +1,188 @@
+/* poppler-link.h: qt interface to poppler
+ * Copyright (C) 2006, Albert Astals Cid <aacid@kde.org>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_LINK_H_
+#define _POPPLER_LINK_H_
+
+#include <qstring.h>
+#include <qrect.h>
+
+namespace Poppler {
+
+class LinkDestinationData;
+
+class LinkDestination
+{
+ public:
+ enum Kind
+ {
+ destXYZ = 1,
+ destFit = 2,
+ destFitH = 3,
+ destFitV = 4,
+ destFitR = 5,
+ destFitB = 6,
+ destFitBH = 7,
+ destFitBV = 8
+ };
+
+ LinkDestination(const LinkDestinationData &data);
+ LinkDestination(const QString &description);
+
+ // Accessors.
+ Kind kind() const;
+ int pageNumber() const;
+ double left() const;
+ double bottom() const;
+ double right() const;
+ double top() const;
+ double zoom() const;
+ bool isChangeLeft() const;
+ bool isChangeTop() const;
+ bool isChangeZoom() const;
+
+ QString toString() const;
+
+ private:
+ Kind m_kind; // destination type
+ int m_pageNum; // page number
+ double m_left, m_bottom; // position
+ double m_right, m_top;
+ double m_zoom; // zoom factor
+ bool m_changeLeft, m_changeTop; // for destXYZ links, which position
+ bool m_changeZoom; // components to change
+};
+
+/**
+ * @short Encapsulates data that describes a link.
+ *
+ * This is the base class for links. It makes mandatory for inherited
+ * widgets to reimplement the 'linkType' method and return the type of
+ * the link described by the reimplemented class.
+ */
+class Link
+{
+ public:
+ Link( const QRect &linkArea );
+
+ // get link type (inherited classes mustreturn an unique identifier)
+ enum LinkType { None, Goto, Execute, Browse, Action, Movie };
+ virtual LinkType linkType() const;
+
+ // virtual destructor
+ virtual ~Link();
+
+ QRect linkArea() const;
+
+ private:
+ QRect m_linkArea;
+};
+
+
+/** Goto: a viewport and maybe a reference to an external filename **/
+class LinkGoto : public Link
+{
+ public:
+ LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination );
+
+ // query for goto parameters
+ bool isExternal() const;
+ const QString & fileName() const;
+ const LinkDestination & destination() const;
+ LinkType linkType() const;
+
+ private:
+ QString m_extFileName;
+ LinkDestination m_destination;
+};
+
+/** Execute: filename and parameters to execute **/
+class LinkExecute : public Link
+{
+ public:
+ // query for filename / parameters
+ const QString & fileName() const;
+ const QString & parameters() const;
+
+ // create a Link_Execute
+ LinkExecute( const QRect &linkArea, const QString & file, const QString & params );
+ LinkType linkType() const;
+
+ private:
+ QString m_fileName;
+ QString m_parameters;
+};
+
+/** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/
+class LinkBrowse : public Link
+{
+ public:
+ // query for URL
+ const QString & url() const;
+
+ // create a Link_Browse
+ LinkBrowse( const QRect &linkArea, const QString &url );
+ LinkType linkType() const;
+
+ private:
+ QString m_url;
+};
+
+/** Action: contains an action to perform on document / viewer **/
+class LinkAction : public Link
+{
+ public:
+ // define types of actions
+ enum ActionType { PageFirst = 1,
+ PagePrev = 2,
+ PageNext = 3,
+ PageLast = 4,
+ HistoryBack = 5,
+ HistoryForward = 6,
+ Quit = 7,
+ Presentation = 8,
+ EndPresentation = 9,
+ Find = 10,
+ GoToPage = 11,
+ Close = 12 };
+
+ // query for action type
+ ActionType actionType() const;
+
+ // create a Link_Action
+ LinkAction( const QRect &linkArea, ActionType actionType );
+ LinkType linkType() const;
+
+ private:
+ ActionType m_type;
+};
+
+/** Movie: Not yet defined -> think renaming to 'Media' link **/
+class LinkMovie : public Link
+// TODO this (Movie link)
+{
+ public:
+ LinkMovie( const QRect &linkArea );
+ LinkType linkType() const;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link.cc
new file mode 100644
index 00000000000..af6d6452713
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-link.cc
@@ -0,0 +1,267 @@
+/* poppler-link.cc: qt interface to poppler
+ * Copyright (C) 2006, 2008 Albert Astals Cid
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <poppler-qt.h>
+#include <poppler-private.h>
+
+#include <qstringlist.h>
+
+#include <Link.h>
+
+namespace Poppler {
+
+ LinkDestination::LinkDestination(const LinkDestinationData &data)
+ {
+ bool deleteDest = false;
+ LinkDest *ld = data.ld;
+
+ if ( data.namedDest && !ld )
+ {
+ deleteDest = true;
+ ld = data.doc->doc.findDest( data.namedDest );
+ }
+
+ if (!ld) return;
+
+ if (ld->getKind() == ::destXYZ) m_kind = destXYZ;
+ else if (ld->getKind() == ::destFit) m_kind = destFit;
+ else if (ld->getKind() == ::destFitH) m_kind = destFitH;
+ else if (ld->getKind() == ::destFitV) m_kind = destFitV;
+ else if (ld->getKind() == ::destFitR) m_kind = destFitR;
+ else if (ld->getKind() == ::destFitB) m_kind = destFitB;
+ else if (ld->getKind() == ::destFitBH) m_kind = destFitBH;
+ else if (ld->getKind() == ::destFitBV) m_kind = destFitBV;
+
+ if ( !ld->isPageRef() ) m_pageNum = ld->getPageNum();
+ else
+ {
+ Ref ref = ld->getPageRef();
+ m_pageNum = data.doc->doc.findPage( ref.num, ref.gen );
+ }
+ double left = ld->getLeft();
+ double bottom = ld->getBottom();
+ double right = ld->getRight();
+ double top = ld->getTop();
+ m_zoom = ld->getZoom();
+ m_changeLeft = ld->getChangeLeft();
+ m_changeTop = ld->getChangeTop();
+ m_changeZoom = ld->getChangeZoom();
+
+ int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
+
+#if defined(HAVE_SPLASH)
+ SplashOutputDev *sod = data.doc->getOutputDev();
+ sod->cvtUserToDev( left, top, &leftAux, &topAux );
+ sod->cvtUserToDev( right, bottom, &rightAux, &bottomAux );
+#endif
+
+ m_left = leftAux;
+ m_top = topAux;
+ m_right = rightAux;
+ m_bottom = bottomAux;
+
+ if (deleteDest) delete ld;
+ }
+
+ LinkDestination::LinkDestination(const QString &description)
+ {
+ QStringList tokens = QStringList::split(';', description);
+ m_kind = static_cast<Kind>(tokens[0].toInt());
+ m_pageNum = tokens[1].toInt();
+ m_left = tokens[2].toDouble();
+ m_bottom = tokens[3].toDouble();
+ m_right = tokens[4].toDouble();
+ m_top = tokens[5].toDouble();
+ m_zoom = tokens[6].toDouble();
+ m_changeLeft = static_cast<bool>(tokens[7].toInt());
+ m_changeTop = static_cast<bool>(tokens[8].toInt());
+ m_changeZoom = static_cast<bool>(tokens[9].toInt());
+ }
+
+ LinkDestination::Kind LinkDestination::kind() const
+ {
+ return m_kind;
+ }
+
+ int LinkDestination::pageNumber() const
+ {
+ return m_pageNum;
+ }
+
+ double LinkDestination::left() const
+ {
+ return m_left;
+ }
+
+ double LinkDestination::bottom() const
+ {
+ return m_bottom;
+ }
+
+ double LinkDestination::right() const
+ {
+ return m_right;
+ }
+
+ double LinkDestination::top() const
+ {
+ return m_top;
+ }
+
+ double LinkDestination::zoom() const
+ {
+ return m_zoom;
+ }
+
+ bool LinkDestination::isChangeLeft() const
+ {
+ return m_changeLeft;
+ }
+
+ bool LinkDestination::isChangeTop() const
+ {
+ return m_changeTop;
+ }
+
+ bool LinkDestination::isChangeZoom() const
+ {
+ return m_changeZoom;
+ }
+
+ QString LinkDestination::toString() const
+ {
+ QString s = QString::number( (Q_INT8)m_kind );
+ s += ";" + QString::number( m_pageNum );
+ s += ";" + QString::number( m_left );
+ s += ";" + QString::number( m_bottom );
+ s += ";" + QString::number( m_right );
+ s += ";" + QString::number( m_top );
+ s += ";" + QString::number( m_zoom );
+ s += ";" + QString::number( (Q_INT8)m_changeLeft );
+ s += ";" + QString::number( (Q_INT8)m_changeTop );
+ s += ";" + QString::number( (Q_INT8)m_changeZoom );
+ return s;
+ }
+
+
+ // Link
+ Link::~Link()
+ {
+ }
+
+ Link::Link(const QRect &linkArea) : m_linkArea(linkArea)
+ {
+ }
+
+ Link::LinkType Link::linkType() const
+ {
+ return None;
+ }
+
+ QRect Link::linkArea() const
+ {
+ return m_linkArea;
+ }
+
+ // LinkGoto
+ LinkGoto::LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination ) : Link(linkArea), m_extFileName(extFileName), m_destination(destination)
+ {
+ }
+
+ bool LinkGoto::isExternal() const
+ {
+ return !m_extFileName.isEmpty();
+ }
+
+ const QString &LinkGoto::fileName() const
+ {
+ return m_extFileName;
+ }
+
+ const LinkDestination &LinkGoto::destination() const
+ {
+ return m_destination;
+ }
+
+ Link::LinkType LinkGoto::linkType() const
+ {
+ return Goto;
+ }
+
+ // LinkExecute
+ LinkExecute::LinkExecute( const QRect &linkArea, const QString & file, const QString & params ) : Link(linkArea), m_fileName(file), m_parameters(params)
+ {
+ }
+
+ const QString & LinkExecute::fileName() const
+ {
+ return m_fileName;
+ }
+ const QString & LinkExecute::parameters() const
+ {
+ return m_parameters;
+ }
+
+ Link::LinkType LinkExecute::linkType() const
+ {
+ return Execute;
+ }
+
+ // LinkBrowse
+ LinkBrowse::LinkBrowse( const QRect &linkArea, const QString &url ) : Link(linkArea), m_url(url)
+ {
+ }
+
+ const QString & LinkBrowse::url() const
+ {
+ return m_url;
+ }
+
+ Link::LinkType LinkBrowse::linkType() const
+ {
+ return Browse;
+ }
+
+ // LinkAction
+ LinkAction::LinkAction( const QRect &linkArea, ActionType actionType ) : Link(linkArea), m_type(actionType)
+ {
+ }
+
+ LinkAction::ActionType LinkAction::actionType() const
+ {
+ return m_type;
+ }
+
+ Link::LinkType LinkAction::linkType() const
+ {
+ return Action;
+ }
+
+ // LinkMovie
+ LinkMovie::LinkMovie( const QRect &linkArea ) : Link(linkArea)
+ {
+ }
+
+ Link::LinkType LinkMovie::linkType() const
+ {
+ return Movie;
+ }
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition-private.h
new file mode 100644
index 00000000000..63febb09619
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition-private.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2005, Albert Astals Cid
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+class Object;
+
+namespace Poppler {
+
+class PageTransitionParams {
+ public:
+ Object *dictObj;
+};
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.cc
new file mode 100644
index 00000000000..cde8818d67b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.cc
@@ -0,0 +1,95 @@
+/* PageTransition.cc
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "PageTransition.h"
+#include "poppler-page-transition.h"
+#include "poppler-page-transition-private.h"
+
+namespace Poppler {
+
+class PageTransitionData
+{
+ public:
+ PageTransitionData(Object *trans)
+ {
+ pt = new ::PageTransition(trans);
+ }
+
+ PageTransitionData(const PageTransitionData &ptd)
+ {
+ pt = new ::PageTransition(*ptd.pt);
+ }
+
+ ~PageTransitionData()
+ {
+ delete pt;
+ }
+
+ ::PageTransition *pt;
+};
+
+PageTransition::PageTransition(const PageTransitionParams &params)
+{
+ data = new PageTransitionData(params.dictObj);
+}
+
+PageTransition::PageTransition(const PageTransition &pt)
+{
+ data = new PageTransitionData(*pt.data);
+}
+
+PageTransition::~PageTransition()
+{
+ delete data;
+}
+
+PageTransition::Type PageTransition::type() const
+{
+ return (Poppler::PageTransition::Type)data->pt->getType();
+}
+
+int PageTransition::duration() const
+{
+ return data->pt->getDuration();
+}
+
+PageTransition::Alignment PageTransition::alignment() const
+{
+ return (Poppler::PageTransition::Alignment)data->pt->getAlignment();
+}
+
+PageTransition::Direction PageTransition::direction() const
+{
+ return (Poppler::PageTransition::Direction)data->pt->getDirection();
+}
+
+int PageTransition::angle() const
+{
+ return data->pt->getAngle();
+}
+
+double PageTransition::scale() const
+{
+ return data->pt->getScale();
+}
+bool PageTransition::isRectangular() const
+{
+ return data->pt->isRectangular();
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.h b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.h
new file mode 100644
index 00000000000..53002ff9117
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page-transition.h
@@ -0,0 +1,146 @@
+/* PageTransition.h
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __PAGETRANSITION_X_H__
+#define __PAGETRANSITION_X_H__
+
+namespace Poppler {
+
+class PageTransitionParams;
+class PageTransitionData;
+
+/**
+ \brief Describes how a PDF file viewer shall perform the transition
+ from one page to another
+
+ In PDF files there is a way to specify if the viewer shall use
+ certain effects to perform the transition from one page to
+ another. This feature can be used, e.g., in a PDF-based beamer
+ presentation.
+
+ This utility class represents the transition effect, and can be
+ used to extract the information from a PDF object.
+*/
+
+
+class PageTransition {
+ public:
+
+ /** \brief transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Type {
+ Replace = 0,
+ Split,
+ Blinds,
+ Box,
+ Wipe,
+ Dissolve,
+ Glitter,
+ Fly,
+ Push,
+ Cover,
+ Uncover,
+ Fade
+ };
+
+ /** \brief alignment of the transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Alignment {
+ Horizontal = 0,
+ Vertical
+ };
+
+ /** \brief direction of the transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Direction {
+ Inward = 0,
+ Outward
+ };
+
+ /** \brief Construct a new PageTransition object from a page dictionary.
+
+ Users of the library will rarely need to construct a
+ PageTransition object themselves. Instead, the method
+ Poppler::Page::transition() can be used to find out if a certain
+ transition effect is specified.
+
+ @warning In case or error, this method will print an error message to stderr,
+ and construct a default object.
+
+ @param params an object whose dictionary will be read and
+ parsed. This must be a valid object, whose dictionaries are
+ accessed by the constructor. The object is only accessed by this
+ constructor, and may be deleted after the constructor returns.
+ */
+ PageTransition(const PageTransitionParams &params);
+
+ /** \brief copy constructor */
+ PageTransition(const PageTransition &pt);
+
+ /**
+ Destructor
+ */
+ ~PageTransition();
+
+ /**
+ \brief Get type of the transition.
+ */
+ Type type() const;
+
+ /**
+ \brief Get duration of the transition in seconds.
+ */
+ int duration() const;
+
+ /**
+ \brief Get dimension in which the transition effect occurs.
+ */
+ Alignment alignment() const;
+
+ /**
+ \brief Get direction of motion of the transition effect.
+ */
+ Direction direction() const;
+
+ /**
+ \brief Get direction in which the transition effect moves.
+ */
+ int angle() const;
+
+ /**
+ \brief Get starting or ending scale.
+ */
+ double scale() const;
+
+ /**
+ \brief Returns true if the area to be flown is rectangular and
+ opaque.
+ */
+ bool isRectangular() const;
+
+ private:
+ PageTransitionData *data;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page.cc
new file mode 100644
index 00000000000..50c28aa6065
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-page.cc
@@ -0,0 +1,361 @@
+/* poppler-page.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005-2006, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005, Tobias Koening <tokoe@kde.org>
+ * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+ * Copyright (C) 2006, Wilfried Huss <Wilfried.Huss@gmx.at>
+ * Copyright (C) 2006, Jerry Epplin <jepplin@globalvelocity.com>
+ * Copyright (C) 2007, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <poppler-qt.h>
+#include <qfile.h>
+#include <qimage.h>
+#include <config.h>
+#include <GlobalParams.h>
+#include <PDFDoc.h>
+#include <Catalog.h>
+#include <ErrorCodes.h>
+#include <TextOutputDev.h>
+#include <Link.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#include <splash/SplashBitmap.h>
+#endif
+
+#include "poppler-private.h"
+#include "poppler-page-transition-private.h"
+
+namespace Poppler {
+
+class PageData {
+ public:
+ const Document *doc;
+ int index;
+ PageTransition *transition;
+};
+
+Page::Page(const Document *doc, int index) {
+ data = new PageData();
+ data->index = index;
+ data->doc = doc;
+ data->transition = 0;
+}
+
+Page::~Page()
+{
+ delete data->transition;
+ delete data;
+}
+
+void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks) const
+{
+ renderToPixmap(q, x, y, w, h, 72.0, 72.0, doLinks);
+}
+
+void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks) const
+{
+ QImage img = renderToImage(xres, yres, doLinks);
+ *q = new QPixmap( img );
+}
+
+QImage Page::renderToImage(double xres, double yres, bool doLinks) const
+{
+#if defined(HAVE_SPLASH)
+ SplashOutputDev *output_dev;
+ SplashBitmap *bitmap;
+ SplashColorPtr color_ptr;
+ output_dev = data->doc->data->getOutputDev();
+
+ data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, xres, yres,
+ 0, false, true, false, -1, -1, -1, -1);
+ bitmap = output_dev->getBitmap ();
+ color_ptr = bitmap->getDataPtr ();
+ int bw = output_dev->getBitmap()->getWidth();
+ int bh = output_dev->getBitmap()->getHeight();
+ SplashColorPtr dataPtr = output_dev->getBitmap()->getDataPtr();
+
+ if (QImage::BigEndian == QImage::systemByteOrder())
+ {
+ uchar c;
+ int count = bw * bh * 4;
+ for (int k = 0; k < count; k += 4)
+ {
+ c = dataPtr[k];
+ dataPtr[k] = dataPtr[k+3];
+ dataPtr[k+3] = c;
+
+ c = dataPtr[k+1];
+ dataPtr[k+1] = dataPtr[k+2];
+ dataPtr[k+2] = c;
+ }
+ }
+
+ // construct a qimage SHARING the raw bitmap data in memory
+ QImage img( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian );
+ img = img.copy();
+ // unload underlying xpdf bitmap
+ output_dev->startPage( 0, NULL );
+
+ return img;
+#else
+ (void)xres;
+ (void)xres;
+ (void)doLinks;
+
+ return QImage();
+#endif
+}
+
+QString Page::getText(const Rectangle &r) const
+{
+ TextOutputDev *output_dev;
+ GooString *s;
+ PDFRectangle *rect;
+ QString result;
+ ::Page *p;
+
+ output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+ data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
+ 0, false, false, false, -1, -1, -1, -1);
+ p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
+ if (r.isNull())
+ {
+ rect = p->getCropBox();
+ s = output_dev->getText(rect->x1, rect->y1, rect->x2, rect->y2);
+ }
+ else
+ {
+ double height, y1, y2;
+ height = p->getCropHeight();
+ y1 = height - r.m_y2;
+ y2 = height - r.m_y1;
+ s = output_dev->getText(r.m_x1, y1, r.m_x2, y2);
+ }
+
+ result = QString::fromUtf8(s->getCString());
+
+ delete output_dev;
+ delete s;
+ return result;
+}
+
+QValueList<TextBox*> Page::textList() const
+{
+ TextOutputDev *output_dev;
+
+ QValueList<TextBox*> output_list;
+
+ output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+
+ data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
+ 0, false, false, false, -1, -1, -1, -1);
+
+ TextWordList *word_list = output_dev->makeWordList();
+
+ if (!word_list) {
+ delete output_dev;
+ return output_list;
+ }
+
+ for (int i = 0; i < word_list->getLength(); i++) {
+ TextWord *word = word_list->get(i);
+ GooString *word_str = word->getText();
+ QString string = QString::fromUtf8(word_str->getCString());
+ delete word_str;
+ double xMin, yMin, xMax, yMax;
+ word->getBBox(&xMin, &yMin, &xMax, &yMax);
+
+ TextBox* text_box = new TextBox(string, Rectangle(xMin, yMin, xMax, yMax));
+
+ output_list.append(text_box);
+ }
+
+ delete word_list;
+ delete output_dev;
+
+ return output_list;
+}
+
+PageTransition *Page::getTransition() const
+{
+ if (!data->transition)
+ {
+ Object o;
+ PageTransitionParams params;
+ params.dictObj = data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(&o);
+ data->transition = new PageTransition(params);
+ o.free();
+ }
+ return data->transition;
+}
+
+QSize Page::pageSize() const
+{
+ ::Page *p;
+
+ p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
+ if ( ( Page::Landscape == orientation() ) || (Page::Seascape == orientation() ) ) {
+ return QSize( (int)p->getCropHeight(), (int)p->getCropWidth() );
+ } else {
+ return QSize( (int)p->getCropWidth(), (int)p->getCropHeight() );
+ }
+}
+
+Page::Orientation Page::orientation() const
+{
+ ::Page *p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
+
+ int rotation = p->getRotate();
+ switch (rotation) {
+ case 90:
+ return Page::Landscape;
+ break;
+ case 180:
+ return Page::UpsideDown;
+ break;
+ case 270:
+ return Page::Seascape;
+ break;
+ default:
+ return Page::Portrait;
+ }
+}
+
+QValueList<Link*> Page::links() const
+{
+ QValueList<Link*> popplerLinks;
+
+#if defined(HAVE_SPLASH)
+ Links *xpdfLinks = data->doc->data->doc.getLinks(data->index + 1);
+ for (int i = 0; i < xpdfLinks->getNumLinks(); ++i)
+ {
+ ::Link *xpdfLink = xpdfLinks->getLink(i);
+
+ double left, top, right, bottom;
+ int leftAux, topAux, rightAux, bottomAux;
+ xpdfLink->getRect( &left, &top, &right, &bottom );
+ QRect linkArea;
+
+ data->doc->data->m_outputDev->cvtUserToDev( left, top, &leftAux, &topAux );
+ data->doc->data->m_outputDev->cvtUserToDev( right, bottom, &rightAux, &bottomAux );
+ linkArea.setLeft(leftAux);
+ linkArea.setTop(topAux);
+ linkArea.setRight(rightAux);
+ linkArea.setBottom(bottomAux);
+
+ if (!xpdfLink->isOk()) continue;
+
+ Link *popplerLink = NULL;
+ ::LinkAction *a = xpdfLink->getAction();
+ if ( a )
+ {
+ switch ( a->getKind() )
+ {
+ case actionGoTo:
+ {
+ LinkGoTo * g = (LinkGoTo *) a;
+ // create link: no ext file, namedDest, object pointer
+ popplerLink = new LinkGoto( linkArea, QString::null, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) );
+ }
+ break;
+
+ case actionGoToR:
+ {
+ LinkGoToR * g = (LinkGoToR *) a;
+ // copy link file
+ const QString fileName = UnicodeParsedString( g->getFileName() );
+ // ceate link: fileName, namedDest, object pointer
+ popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) );
+ }
+ break;
+
+ case actionLaunch:
+ {
+ LinkLaunch * e = (LinkLaunch *)a;
+ GooString * p = e->getParams();
+ popplerLink = new LinkExecute( linkArea, e->getFileName()->getCString(), p ? p->getCString() : 0 );
+ }
+ break;
+
+ case actionNamed:
+ {
+ const char * name = ((LinkNamed *)a)->getName()->getCString();
+ if ( !strcmp( name, "NextPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageNext );
+ else if ( !strcmp( name, "PrevPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PagePrev );
+ else if ( !strcmp( name, "FirstPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageFirst );
+ else if ( !strcmp( name, "LastPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageLast );
+ else if ( !strcmp( name, "GoBack" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::HistoryBack );
+ else if ( !strcmp( name, "GoForward" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::HistoryForward );
+ else if ( !strcmp( name, "Quit" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Quit );
+ else if ( !strcmp( name, "GoToPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::GoToPage );
+ else if ( !strcmp( name, "Find" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Find );
+ else if ( !strcmp( name, "FullScreen" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Presentation );
+ else if ( !strcmp( name, "Close" ) )
+ {
+ // acroread closes the document always, doesnt care whether
+ // its presentation mode or not
+ // popplerLink = new LinkAction( linkArea, LinkAction::EndPresentation );
+ popplerLink = new LinkAction( linkArea, LinkAction::Close );
+ }
+ else
+ {
+ // TODO
+ }
+ }
+ break;
+
+ case actionURI:
+ {
+ popplerLink = new LinkBrowse( linkArea, ((LinkURI *)a)->getURI()->getCString() );
+ }
+ break;
+
+ case actionMovie:
+ case actionSound:
+ case actionRendition:
+ case actionJavaScript:
+ break;
+
+ case actionUnknown:
+ break;
+ }
+ }
+
+ if (popplerLink)
+ {
+ popplerLinks.append(popplerLink);
+ }
+ }
+
+ delete xpdfLinks;
+#endif
+
+ return popplerLinks;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.cc b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.cc
new file mode 100644
index 00000000000..2388a1b5216
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.cc
@@ -0,0 +1,147 @@
+/* poppler-private.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005-2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, Kristian Høgsberg <krh@bitplanet.net>
+ * Copyright (C) 2006, Wilfried Huss <Wilfried.Huss@gmx.at>
+ * Copyright (C) 2007, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-private.h"
+#include "poppler-link-qt3.h"
+
+#include <qstring.h>
+
+#include <Outline.h>
+#include <Link.h>
+
+namespace Poppler {
+
+/* borrowed from kpdf */
+QString unicodeToQString(Unicode* u, int len)
+{
+ QString ret;
+ ret.setLength(len);
+ QChar* qch = (QChar*) ret.unicode();
+ for (;len;--len)
+ *qch++ = (QChar) *u++;
+ return ret;
+}
+
+QString UnicodeParsedString(GooString *s1)
+{
+ GBool isUnicode;
+ int i;
+ Unicode u;
+ QString result;
+ if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
+ {
+ isUnicode = gTrue;
+ i = 2;
+ }
+ else
+ {
+ isUnicode = gFalse;
+ i = 0;
+ }
+ while ( i < s1->getLength() )
+ {
+ if ( isUnicode )
+ {
+ u = ( ( s1->getChar(i) & 0xff ) << 8 ) | ( s1->getChar(i+1) & 0xff );
+ i += 2;
+ }
+ else
+ {
+ u = s1->getChar(i) & 0xff;
+ ++i;
+ }
+ result += unicodeToQString( &u, 1 );
+ }
+ return result;
+}
+
+GooString *QStringToGooString(const QString &s)
+{
+ int len = s.length();
+ char *cstring = (char *)gmallocn(s.length(), sizeof(char));
+ for (int i = 0; i < len; ++i)
+ cstring[i] = s.at(i).unicode();
+ GooString *ret = new GooString(cstring, len);
+ gfree(cstring);
+ return ret;
+}
+
+
+void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items )
+{
+ int numItems = items->getLength();
+ for ( int i = 0; i < numItems; ++i )
+ {
+ // iterate over every object in 'items'
+ OutlineItem * outlineItem = (OutlineItem *)items->get( i );
+
+ // 1. create element using outlineItem's title as tagName
+ QString name;
+ Unicode * uniChar = outlineItem->getTitle();
+ int titleLength = outlineItem->getTitleLength();
+ name = unicodeToQString(uniChar, titleLength);
+ if ( name.isEmpty() )
+ continue;
+
+ QDomElement item = docSyn->createElement( name );
+ parent->appendChild( item );
+
+ // 2. find the page the link refers to
+ ::LinkAction * a = outlineItem->getAction();
+ if ( a && ( a->getKind() == actionGoTo || a->getKind() == actionGoToR ) )
+ {
+ // page number is contained/referenced in a LinkGoTo
+ LinkGoTo * g = static_cast< LinkGoTo * >( a );
+ LinkDest * destination = g->getDest();
+ if ( !destination && g->getNamedDest() )
+ {
+ // no 'destination' but an internal 'named reference'. we could
+ // get the destination for the page now, but it's VERY time consuming,
+ // so better storing the reference and provide the viewport on demand
+ GooString *s = g->getNamedDest();
+ QChar *charArray = new QChar[s->getLength()];
+ for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
+ QString aux(charArray, s->getLength());
+ item.setAttribute( "DestinationName", aux );
+ delete[] charArray;
+ }
+ else if ( destination && destination->isOk() )
+ {
+ LinkDestinationData ldd(destination, NULL, this);
+ item.setAttribute( "Destination", LinkDestination(ldd).toString() );
+ }
+ if ( a->getKind() == actionGoToR )
+ {
+ LinkGoToR * g2 = static_cast< LinkGoToR * >( a );
+ item.setAttribute( "ExternalFileName", g2->getFileName()->getCString() );
+ }
+ }
+
+ // 3. recursively descend over children
+ outlineItem->open();
+ GooList * children = outlineItem->getKids();
+ if ( children )
+ addTocChildren( docSyn, &item, children );
+ }
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.h
new file mode 100644
index 00000000000..4351d686642
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-private.h
@@ -0,0 +1,92 @@
+/* poppler-private.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005-2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, Kristian Høgsberg <krh@bitplanet.net>
+ * Copyright (C) 2006, Wilfried Huss <Wilfried.Huss@gmx.at>
+ * Copyright (C) 2007, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <qdom.h>
+
+#include <config.h>
+#include <Object.h>
+#include <PDFDoc.h>
+#include <FontInfo.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#else
+class SplashOutputDev;
+#endif
+
+namespace Poppler {
+
+class DocumentData;
+
+QString unicodeToQString(Unicode* u, int len);
+
+QString UnicodeParsedString(GooString *s1);
+
+GooString *QStringToGooString(const QString &s);
+
+class LinkDestinationData {
+ public:
+ LinkDestinationData( LinkDest *l, GooString *nd, Poppler::DocumentData *pdfdoc ) : ld(l), namedDest(nd), doc(pdfdoc)
+ {
+ }
+
+ LinkDest *ld;
+ GooString *namedDest;
+ Poppler::DocumentData *doc;
+};
+
+class DocumentData {
+ public:
+ DocumentData(GooString *filePath, GooString *password) : doc(filePath,password), m_fontInfoScanner(0), m_outputDev(0) {}
+
+ ~DocumentData()
+ {
+#if defined(HAVE_SPLASH)
+ delete m_outputDev;
+#endif
+ delete m_fontInfoScanner;
+ }
+
+ SplashOutputDev *getOutputDev()
+ {
+#if defined(HAVE_SPLASH)
+ if (!m_outputDev)
+ {
+ SplashColor white;
+ white[0] = 255;
+ white[1] = 255;
+ white[2] = 255;
+ m_outputDev = new SplashOutputDev(splashModeXBGR8, 4, gFalse, white);
+ m_outputDev->startDoc(doc.getXRef());
+ }
+#endif
+ return m_outputDev;
+ }
+
+ void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items );
+
+ class PDFDoc doc;
+ bool locked;
+ FontInfoScanner *m_fontInfoScanner;
+ SplashOutputDev *m_outputDev;
+};
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-qt.h b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-qt.h
new file mode 100644
index 00000000000..a6b1e6ec14e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/poppler-qt.h
@@ -0,0 +1,310 @@
+/* poppler-qt.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, Tobias Koening <tokoe@kde.org>
+ * Copyright (C) 2005-2007, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005-2006, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+ * Copyright (C) 2006, Wilfried Huss <Wilfried.Huss@gmx.at>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_QT_H__
+#define __POPPLER_QT_H__
+
+#include "poppler-link-qt3.h"
+#include "poppler-page-transition.h"
+
+#include <qcstring.h>
+#include <qdatetime.h>
+#include <qdom.h>
+#include <qpixmap.h>
+
+namespace Poppler {
+
+class Document;
+class Page;
+
+/* A rectangle on a page, with coordinates in PDF points. */
+class Rectangle
+{
+ public:
+ Rectangle(double x1 = 0, double y1 = 0, double x2 = 0, double y2 = 0) :
+ m_x1(x1), m_y1(y1), m_x2(x2), m_y2(y2) {}
+ bool isNull() const { return m_x1 == 0 && m_y1 == 0 && m_x2 == 0 && m_y2 == 0; }
+
+ double m_x1;
+ double m_y1;
+ double m_x2;
+ double m_y2;
+};
+
+class TextBox
+{
+ public:
+ TextBox(const QString& text, const Rectangle &bBox) :
+ m_text(text), m_bBox(bBox) {};
+
+ QString getText() const { return m_text; };
+ Rectangle getBoundingBox() const { return m_bBox; };
+
+ private:
+ QString m_text;
+ Rectangle m_bBox;
+};
+
+
+/**
+ Container class for information about a font within a PDF document
+*/
+class FontInfoData;
+class FontInfo {
+public:
+ enum Type {
+ unknown,
+ Type1,
+ Type1C,
+ Type1COT,
+ Type3,
+ TrueType,
+ TrueTypeOT,
+ CIDType0,
+ CIDType0C,
+ CIDType0COT,
+ CIDTrueType,
+ CIDTrueTypeOT
+ };
+
+ /**
+ Create a new font information container
+ */
+ FontInfo( const QString &fontName, const bool isEmbedded,
+ const bool isSubset, Type type );
+
+ FontInfo();
+
+ FontInfo( const FontInfo &fi );
+
+ ~FontInfo();
+
+ /**
+ The name of the font. Can be QString::null if the font has no name
+ */
+ const QString &name() const;
+
+ /**
+ Whether the font is embedded in the file, or not
+
+ \return true if the font is embedded
+ */
+ bool isEmbedded() const;
+
+ /**
+ Whether the font provided is only a subset of the full
+ font or not. This only has meaning if the font is embedded.
+
+ \return true if the font is only a subset
+ */
+ bool isSubset() const;
+
+ /**
+ The type of font encoding
+ */
+ Type type() const;
+
+ const QString &typeName() const;
+
+private:
+ FontInfoData *data;
+};
+
+class PageData;
+class Page {
+ friend class Document;
+ public:
+ ~Page();
+ void renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks = false) const;
+
+ /**
+ This is a convenience function that is equivalent to
+ renderToPixmap() with xres and yres set to 72.0. We keep it
+ only for binary compatibility
+
+ \sa renderToImage()
+ */
+ void renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks = false) const;
+
+ /**
+ \brief Render the page to a QImage using the Splash renderer
+
+ This method can be used to render the page to a QImage. It
+ uses the "Splash" rendering engine.
+
+ \param xres horizontal resolution of the graphics device,
+ in dots per inch (defaults to 72 dpi)
+
+ \param yres vertical resolution of the graphics device, in
+ dots per inch (defaults to 72 dpi)
+
+ \returns a QImage of the page.
+
+ \sa renderToPixmap()
+ */
+ QImage renderToImage(double xres = 72.0, double yres = 72.0, bool doLinks = false) const;
+
+ /**
+ * Returns the size of the page in points
+ **/
+ QSize pageSize() const;
+
+ /**
+ * Returns the text that is inside the Rectangle r
+ * If r is a null Rectangle all text of the page is given
+ **/
+ QString getText(const Rectangle &r) const;
+
+ QValueList<TextBox*> textList() const;
+
+ /**
+ * Returns the transition of this page
+ **/
+ PageTransition *getTransition() const;
+
+ enum Orientation {
+ Landscape,
+ Portrait,
+ Seascape,
+ UpsideDown
+ };
+
+ /**
+ * The orientation of the page
+ **/
+ Orientation orientation() const;
+
+ /**
+ Gets the links of the page once it has been rendered if doLinks was true
+ */
+ QValueList<Link*> links() const;
+
+ private:
+ Page(const Document *doc, int index);
+ PageData *data;
+};
+
+class DocumentData;
+
+class Document {
+ friend class Page;
+
+public:
+ enum PageMode {
+ UseNone,
+ UseOutlines,
+ UseThumbs,
+ FullScreen,
+ UseOC
+ };
+
+ static Document *load(const QString & filePath);
+
+ Page *getPage(int index) const{ return new Page(this, index); }
+
+ int getNumPages() const;
+
+ PageMode getPageMode() const;
+
+ bool unlock(const QCString &password);
+
+ bool isLocked() const;
+
+ QDateTime getDate( const QString & data ) const;
+ QString getInfo( const QString & data ) const;
+ bool isEncrypted() const;
+ bool isLinearized() const;
+ bool okToPrint() const;
+ bool okToChange() const;
+ bool okToCopy() const;
+ bool okToAddNotes() const;
+ double getPDFVersion() const;
+ /**
+ The version of the PDF specification that the document
+ conforms to
+
+ \param major an optional pointer to a variable where store the
+ "major" number of the version
+ \param minor an optional pointer to a variable where store the
+ "minor" number of the version
+
+ \since 0.12
+ */
+ void getPdfVersion(int *major, int *minor) const;
+
+ bool print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate);
+
+ // If you are using QPrinter you can get paper size doing
+ // QPrinter dummy(QPrinter::PrinterResolution);
+ // dummy.setFullPage(true);
+ // dummy.setPageSize(thePageSizeYouWant);
+ // QPaintDeviceMetrics metrics(&dummy);
+ // int width = metrics.width();
+ // int height = metrics.height();
+ bool print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight);
+
+ /**
+ The fonts within the PDF document.
+
+ \note this can take a very long time to run with a large
+ document. You may wish to use the call below if you have more
+ than say 20 pages
+ */
+ QValueList<FontInfo> fonts() const;
+
+ /**
+ \overload
+
+ \param numPages the number of pages to scan
+ \param fontList pointer to the list where the font information
+ should be placed
+
+ \return false if the end of the document has been reached
+ */
+ bool scanForFonts( int numPages, QValueList<FontInfo> *fontList ) const;
+
+ /**
+ Gets the TOC of the Document, it is application responsabiliy to delete
+ it when no longer needed
+
+ * In the tree the tag name is the 'screen' name of the entry. A tag can have
+ * attributes. Here follows the list of tag attributes with meaning:
+ * - Destination: A string description of the referred destination
+ * - DestinationName: A 'named reference' to the viewport that must be converted
+ * using linkDestination( *destination_name* )
+ * - ExternalFileName: A link to a external filename
+
+ \returns NULL if the Document does not have TOC
+ */
+ QDomDocument *toc() const;
+
+ LinkDestination *linkDestination( const QString &name );
+
+ ~Document();
+
+private:
+ DocumentData *data;
+ Document(DocumentData *dataA);
+};
+
+}
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt/test-poppler-qt.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt/test-poppler-qt.cpp
new file mode 100644
index 00000000000..d97954b8ba7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt/test-poppler-qt.cpp
@@ -0,0 +1,122 @@
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+#include <qlabel.h>
+#include <qmessagebox.h>
+#include <qfile.h>
+#include <ctype.h>
+#include <poppler-qt.h>
+#include <stdlib.h>
+
+class PDFDisplay : public QWidget // picture display widget
+{
+public:
+ PDFDisplay( Poppler::Document *d );
+ ~PDFDisplay();
+protected:
+ void paintEvent( QPaintEvent * );
+ void keyPressEvent( QKeyEvent * );
+private:
+ void display();
+
+ int currentPage;
+ QPixmap *pixmap;
+ Poppler::Document *doc;
+};
+
+PDFDisplay::PDFDisplay( Poppler::Document *d )
+{
+ doc = d;
+ pixmap = 0;
+ currentPage = 0;
+ display();
+}
+
+PDFDisplay::~PDFDisplay()
+{
+ delete doc;
+ delete pixmap;
+}
+
+void PDFDisplay::paintEvent( QPaintEvent *e )
+{
+ QPainter paint( this ); // paint widget
+ if (pixmap)
+ paint.drawPixmap(0, 0, *pixmap);
+}
+
+void PDFDisplay::keyPressEvent( QKeyEvent *e )
+{
+ if (e->key() == Qt::Key_Down)
+ {
+ if (currentPage + 1 < doc->getNumPages())
+ {
+ currentPage++;
+ display();
+ }
+ }
+ else if (e->key() == Qt::Key_Up)
+ {
+ if (currentPage > 0)
+ {
+ currentPage--;
+ display();
+ }
+ }
+}
+
+void PDFDisplay::display()
+{
+ if (doc) {
+ Poppler::Page *page = doc->getPage(currentPage);
+ if (page) {
+ delete pixmap;
+ page->renderToPixmap(&pixmap, -1, -1, -1, -1);
+ delete page;
+ update();
+ }
+ } else {
+ printf("doc not loaded\n");
+ }
+}
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv ); // QApplication required!
+
+ if ( argc < 2 || (argc == 3 && strcmp(argv[2], "-extract") != 0) || argc > 3)
+ {
+ // use argument as file name
+ printf("usage: test-poppler-qt filename [-extract]\n");
+ exit(1);
+ }
+
+ Poppler::Document *doc = Poppler::Document::load(argv[1]);
+ if (!doc)
+ {
+ printf("doc not loaded\n");
+ exit(1);
+ }
+
+ if (argc == 2)
+ {
+ PDFDisplay test( doc ); // create picture display
+ a.setMainWidget( &test); // set main widget
+ test.setCaption("Poppler-Qt Test");
+ test.show(); // show it
+
+ return a.exec(); // start event loop
+ }
+ else
+ {
+ Poppler::Page *page = doc->getPage(0);
+
+ QLabel *l = new QLabel(page->getText(Poppler::Rectangle()), 0);
+ l->show();
+ a.setMainWidget(l); // set main widget
+ delete page;
+ delete doc;
+ return a.exec();
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/qt4/CMakeLists.txt
new file mode 100644
index 00000000000..a364abf1976
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory(src)
+add_subdirectory(tests)
+add_subdirectory(demos)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.am
new file mode 100644
index 00000000000..69a10cb1409
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src tests demos
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.in
new file mode 100644
index 00000000000..e1c181cb0dd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/Makefile.in
@@ -0,0 +1,628 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = qt4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+SUBDIRS = src tests demos
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign qt4/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/CMakeLists.txt
new file mode 100644
index 00000000000..76accf819f2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/CMakeLists.txt
@@ -0,0 +1,28 @@
+add_definitions(${QT4_DEFINITIONS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${QT4_INCLUDE_DIR}
+)
+
+set(poppler_qt4viewer_SRCS
+ abstractinfodock.cpp
+ documentobserver.cpp
+ embeddedfiles.cpp
+ fonts.cpp
+ info.cpp
+ main_viewer.cpp
+ metadata.cpp
+ navigationtoolbar.cpp
+ optcontent.cpp
+ pageview.cpp
+ permissions.cpp
+ thumbnails.cpp
+ toc.cpp
+ viewer.cpp
+)
+qt4_automoc(${poppler_qt4viewer_SRCS})
+poppler_add_test(poppler_qt4viewer BUILD_QT4_TESTS ${poppler_qt4viewer_SRCS})
+target_link_libraries(poppler_qt4viewer poppler-qt4)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.am
new file mode 100644
index 00000000000..c3f636c6e86
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.am
@@ -0,0 +1,68 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt4/src \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+LDADDS = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(FONTCONFIG_LIBS) \
+ $(POPPLER_QT4_LIBS)
+
+SUFFIXES: .moc
+
+# This rule lets GNU make create any *.moc from the equivalent *.h
+.h.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+noinst_PROGRAMS = poppler_qt4viewer
+
+poppler_qt4viewer_SOURCES = \
+ abstractinfodock.cpp \
+ abstractinfodock.h \
+ documentobserver.cpp \
+ documentobserver.h \
+ embeddedfiles.cpp \
+ embeddedfiles.h \
+ fonts.cpp \
+ fonts.h \
+ info.cpp \
+ info.h \
+ main_viewer.cpp \
+ metadata.cpp \
+ metadata.h \
+ navigationtoolbar.cpp \
+ navigationtoolbar.h \
+ optcontent.cpp \
+ optcontent.h \
+ pageview.cpp \
+ pageview.h \
+ permissions.cpp \
+ permissions.h \
+ thumbnails.cpp \
+ thumbnails.h \
+ toc.cpp \
+ toc.h \
+ viewer.cpp \
+ viewer.h
+
+abstractinfodock.$(OBJEXT): abstractinfodock.moc
+embeddedfiles.$(OBJEXT): embeddedfiles.moc
+fonts.$(OBJEXT): fonts.moc
+info.$(OBJEXT): info.moc
+metadata.$(OBJEXT): metadata.moc
+navigationtoolbar.$(OBJEXT): navigationtoolbar.moc
+optcontent.$(OBJEXT): optcontent.moc
+pageview.$(OBJEXT): pageview.moc
+permissions.$(OBJEXT): permissions.moc
+thumbnails.$(OBJEXT): thumbnails.moc
+toc.$(OBJEXT): toc.moc
+viewer.$(OBJEXT): viewer.moc
+
+poppler_qt4viewer_LDADD = $(LDADDS)
+
+clean-generic:
+ rm -f *.moc
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.in
new file mode 100644
index 00000000000..cb1d49a9110
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/Makefile.in
@@ -0,0 +1,656 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = poppler_qt4viewer$(EXEEXT)
+subdir = qt4/demos
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_poppler_qt4viewer_OBJECTS = abstractinfodock.$(OBJEXT) \
+ documentobserver.$(OBJEXT) embeddedfiles.$(OBJEXT) \
+ fonts.$(OBJEXT) info.$(OBJEXT) main_viewer.$(OBJEXT) \
+ metadata.$(OBJEXT) navigationtoolbar.$(OBJEXT) \
+ optcontent.$(OBJEXT) pageview.$(OBJEXT) permissions.$(OBJEXT) \
+ thumbnails.$(OBJEXT) toc.$(OBJEXT) viewer.$(OBJEXT)
+poppler_qt4viewer_OBJECTS = $(am_poppler_qt4viewer_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+poppler_qt4viewer_DEPENDENCIES = $(am__DEPENDENCIES_2)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(poppler_qt4viewer_SOURCES)
+DIST_SOURCES = $(poppler_qt4viewer_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt4/src \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+LDADDS = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(FONTCONFIG_LIBS) \
+ $(POPPLER_QT4_LIBS)
+
+poppler_qt4viewer_SOURCES = \
+ abstractinfodock.cpp \
+ abstractinfodock.h \
+ documentobserver.cpp \
+ documentobserver.h \
+ embeddedfiles.cpp \
+ embeddedfiles.h \
+ fonts.cpp \
+ fonts.h \
+ info.cpp \
+ info.h \
+ main_viewer.cpp \
+ metadata.cpp \
+ metadata.h \
+ navigationtoolbar.cpp \
+ navigationtoolbar.h \
+ optcontent.cpp \
+ optcontent.h \
+ pageview.cpp \
+ pageview.h \
+ permissions.cpp \
+ permissions.h \
+ thumbnails.cpp \
+ thumbnails.h \
+ toc.cpp \
+ toc.h \
+ viewer.cpp \
+ viewer.h
+
+poppler_qt4viewer_LDADD = $(LDADDS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .h .lo .moc .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/demos/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign qt4/demos/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+poppler_qt4viewer$(EXEEXT): $(poppler_qt4viewer_OBJECTS) $(poppler_qt4viewer_DEPENDENCIES)
+ @rm -f poppler_qt4viewer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(poppler_qt4viewer_OBJECTS) $(poppler_qt4viewer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abstractinfodock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documentobserver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/embeddedfiles.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_viewer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metadata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/navigationtoolbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optcontent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pageview.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/permissions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbnails.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewer.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+SUFFIXES: .moc
+
+# This rule lets GNU make create any *.moc from the equivalent *.h
+.h.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+abstractinfodock.$(OBJEXT): abstractinfodock.moc
+embeddedfiles.$(OBJEXT): embeddedfiles.moc
+fonts.$(OBJEXT): fonts.moc
+info.$(OBJEXT): info.moc
+metadata.$(OBJEXT): metadata.moc
+navigationtoolbar.$(OBJEXT): navigationtoolbar.moc
+optcontent.$(OBJEXT): optcontent.moc
+pageview.$(OBJEXT): pageview.moc
+permissions.$(OBJEXT): permissions.moc
+thumbnails.$(OBJEXT): thumbnails.moc
+toc.$(OBJEXT): toc.moc
+viewer.$(OBJEXT): viewer.moc
+
+clean-generic:
+ rm -f *.moc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.cpp
new file mode 100644
index 00000000000..7b306d828e1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.cpp
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "fonts.h"
+
+AbstractInfoDock::AbstractInfoDock(QWidget *parent)
+ : QDockWidget(parent), m_filled(false)
+{
+ connect(this, SIGNAL(visibilityChanged(bool)), SLOT(slotVisibilityChanged(bool)));
+}
+
+AbstractInfoDock::~AbstractInfoDock()
+{
+}
+
+void AbstractInfoDock::documentLoaded()
+{
+ if (!isHidden()) {
+ fillInfo();
+ m_filled = true;
+ }
+}
+
+void AbstractInfoDock::documentClosed()
+{
+ m_filled = false;
+}
+
+void AbstractInfoDock::pageChanged(int page)
+{
+ Q_UNUSED(page)
+}
+
+void AbstractInfoDock::slotVisibilityChanged(bool visible)
+{
+ if (visible && document() && !m_filled) {
+ fillInfo();
+ m_filled = true;
+ }
+}
+
+#include "abstractinfodock.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.h
new file mode 100644
index 00000000000..2593325a8cb
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/abstractinfodock.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ABSTRACTINFODOCK_H
+#define ABSTRACTINFODOCK_H
+
+#include <QtGui/QDockWidget>
+
+#include "documentobserver.h"
+
+class AbstractInfoDock : public QDockWidget, public DocumentObserver
+{
+ Q_OBJECT
+
+public:
+ AbstractInfoDock(QWidget *parent = 0);
+ ~AbstractInfoDock();
+
+ /*virtual*/ void documentLoaded();
+ /*virtual*/ void documentClosed();
+ /*virtual*/ void pageChanged(int page);
+
+protected:
+ virtual void fillInfo() = 0;
+
+private Q_SLOTS:
+ void slotVisibilityChanged(bool visible);
+
+private:
+ bool m_filled;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.cpp
new file mode 100644
index 00000000000..e5c283db54a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "documentobserver.h"
+
+#include "viewer.h"
+
+DocumentObserver::DocumentObserver()
+ : m_viewer(0)
+{
+}
+
+DocumentObserver::~DocumentObserver()
+{
+}
+
+Poppler::Document* DocumentObserver::document() const
+{
+ return m_viewer->m_doc;
+}
+
+void DocumentObserver::setPage(int page)
+{
+ m_viewer->setPage(page);
+}
+
+int DocumentObserver::page() const
+{
+ return m_viewer->page();
+}
+
+void DocumentObserver::reloadPage()
+{
+ m_viewer->setPage(m_viewer->page());
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.h
new file mode 100644
index 00000000000..38fe204336f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/documentobserver.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef DOCUMENTOBSERVER_H
+#define DOCUMENTOBSERVER_H
+
+class PdfViewer;
+namespace Poppler {
+class Document;
+}
+
+class DocumentObserver
+{
+friend class PdfViewer;
+
+public:
+ virtual ~DocumentObserver();
+
+ virtual void documentLoaded() = 0;
+ virtual void documentClosed() = 0;
+ virtual void pageChanged(int page) = 0;
+
+protected:
+ DocumentObserver();
+
+ Poppler::Document* document() const;
+ void setPage(int page);
+ int page() const;
+ void reloadPage();
+
+private:
+ PdfViewer *m_viewer;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.cpp
new file mode 100644
index 00000000000..22f9da7af65
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "embeddedfiles.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QTableWidget>
+
+EmbeddedFilesDock::EmbeddedFilesDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_table = new QTableWidget(this);
+ setWidget(m_table);
+ setWindowTitle(tr("Embedded files"));
+ m_table->setColumnCount(6);
+ m_table->setHorizontalHeaderLabels(
+ QStringList() << tr("Name") << tr("Description") << tr("Size") << tr("Creation date")
+ << tr("Modification date") << tr("Checksum"));
+ m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+EmbeddedFilesDock::~EmbeddedFilesDock()
+{
+}
+
+void EmbeddedFilesDock::fillInfo()
+{
+ m_table->setHorizontalHeaderLabels(
+ QStringList() << tr("Name") << tr("Description") << tr("Size") << tr("Creation date")
+ << tr("Modification date") << tr("Checksum"));
+ if (!document()->hasEmbeddedFiles()) {
+ m_table->setItem(0, 0, new QTableWidgetItem(tr("No files")));
+ return;
+ }
+
+ const QList<Poppler::EmbeddedFile*> files = document()->embeddedFiles();
+ m_table->setRowCount(files.count());
+ int i = 0;
+ Q_FOREACH(Poppler::EmbeddedFile *file, files) {
+ m_table->setItem(i, 0, new QTableWidgetItem(file->name()));
+ m_table->setItem(i, 1, new QTableWidgetItem(file->description()));
+ m_table->setItem(i, 2, new QTableWidgetItem(QString::number(file->size())));
+ m_table->setItem(i, 3, new QTableWidgetItem(file->createDate().toString(Qt::SystemLocaleDate)));
+ m_table->setItem(i, 4, new QTableWidgetItem(file->modDate().toString(Qt::SystemLocaleDate)));
+ const QByteArray checksum = file->checksum();
+ const QString checksumString = !checksum.isEmpty() ? QString::fromAscii(checksum.toHex()) : QString::fromLatin1("n/a");
+ m_table->setItem(i, 5, new QTableWidgetItem(checksumString));
+ ++i;
+ }
+}
+
+void EmbeddedFilesDock::documentLoaded()
+{
+ if ( document()->pageMode() == Poppler::Document::UseAttach ) {
+ show();
+ }
+}
+
+void EmbeddedFilesDock::documentClosed()
+{
+ m_table->clear();
+ m_table->setRowCount(0);
+ AbstractInfoDock::documentClosed();
+}
+
+#include "embeddedfiles.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.h
new file mode 100644
index 00000000000..7cd60397d68
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/embeddedfiles.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ATTACHMENTS_H
+#define ATTACHMENTS_H
+
+#include "abstractinfodock.h"
+
+class QTableWidget;
+
+class EmbeddedFilesDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ EmbeddedFilesDock(QWidget *parent = 0);
+ ~EmbeddedFilesDock();
+
+ virtual void documentLoaded();
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QTableWidget *m_table;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.cpp
new file mode 100644
index 00000000000..bd342bd28bc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "fonts.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QTableWidget>
+
+static QString yesNoStatement(bool value)
+{
+ return value ? QString::fromLatin1("yes") : QString::fromLatin1("no");
+}
+
+FontsDock::FontsDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_table = new QTableWidget(this);
+ setWidget(m_table);
+ setWindowTitle(tr("Fonts"));
+ m_table->setColumnCount(5);
+ m_table->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File"));
+ m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+FontsDock::~FontsDock()
+{
+}
+
+void FontsDock::fillInfo()
+{
+ const QList<Poppler::FontInfo> fonts = document()->fonts();
+ m_table->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File"));
+ m_table->setRowCount(fonts.count());
+ int i = 0;
+ Q_FOREACH(const Poppler::FontInfo &font, fonts) {
+ if (font.name().isNull()) {
+ m_table->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("[none]")));
+ } else {
+ m_table->setItem(i, 0, new QTableWidgetItem(font.name()));
+ }
+ m_table->setItem(i, 1, new QTableWidgetItem(font.typeName()));
+ m_table->setItem(i, 2, new QTableWidgetItem(yesNoStatement(font.isEmbedded())));
+ m_table->setItem(i, 3, new QTableWidgetItem(yesNoStatement(font.isSubset())));
+ m_table->setItem(i, 4, new QTableWidgetItem(font.file()));
+ ++i;
+ }
+}
+
+void FontsDock::documentClosed()
+{
+ m_table->clear();
+ m_table->setRowCount(0);
+ AbstractInfoDock::documentClosed();
+}
+
+#include "fonts.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.h
new file mode 100644
index 00000000000..81afa579314
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/fonts.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FONTS_H
+#define FONTS_H
+
+#include "abstractinfodock.h"
+
+class QTableWidget;
+
+class FontsDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ FontsDock(QWidget *parent = 0);
+ ~FontsDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QTableWidget *m_table;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.cpp
new file mode 100644
index 00000000000..6491e0e4b3e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "info.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QTableWidget>
+
+InfoDock::InfoDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_table = new QTableWidget(this);
+ setWidget(m_table);
+ setWindowTitle(tr("Information"));
+ m_table->setColumnCount(2);
+ m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
+ m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+InfoDock::~InfoDock()
+{
+}
+
+void InfoDock::fillInfo()
+{
+ QStringList keys = document()->infoKeys();
+ m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
+ m_table->setRowCount(keys.count());
+ QStringList dateKeys;
+ dateKeys << QString::fromLatin1("CreationDate");
+ dateKeys << QString::fromLatin1("ModDate");
+ int i = 0;
+ Q_FOREACH(const QString &date, dateKeys) {
+ const int id = keys.indexOf(date);
+ if (id != -1) {
+ m_table->setItem(i, 0, new QTableWidgetItem(date));
+ m_table->setItem(i, 1, new QTableWidgetItem(document()->date(date).toString(Qt::SystemLocaleDate)));
+ ++i;
+ keys.removeAt(id);
+ }
+ }
+ Q_FOREACH(const QString &key, keys) {
+ m_table->setItem(i, 0, new QTableWidgetItem(key));
+ m_table->setItem(i, 1, new QTableWidgetItem(document()->info(key)));
+ ++i;
+ }
+}
+
+void InfoDock::documentClosed()
+{
+ m_table->clear();
+ m_table->setRowCount(0);
+ AbstractInfoDock::documentClosed();
+}
+
+#include "info.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.h
new file mode 100644
index 00000000000..d294b430dc6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/info.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INFO_H
+#define INFO_H
+
+#include "abstractinfodock.h"
+
+class QTableWidget;
+
+class InfoDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ InfoDock(QWidget *parent = 0);
+ ~InfoDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QTableWidget *m_table;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/main_viewer.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/main_viewer.cpp
new file mode 100644
index 00000000000..3f7080f27ee
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/main_viewer.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "viewer.h"
+
+#include <QtGui/QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ const QStringList args = QCoreApplication::arguments();
+ PdfViewer *viewer = new PdfViewer();
+ viewer->show();
+ if (args.count() > 1) {
+ viewer->loadDocument(args.at(1));
+ }
+ return app.exec();
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.cpp
new file mode 100644
index 00000000000..e5c7111d552
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "metadata.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QTextEdit>
+
+MetadataDock::MetadataDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_edit = new QTextEdit(this);
+ setWidget(m_edit);
+ setWindowTitle(tr("Metadata"));
+ m_edit->setAcceptRichText(false);
+ m_edit->setReadOnly(true);
+}
+
+MetadataDock::~MetadataDock()
+{
+}
+
+void MetadataDock::fillInfo()
+{
+ m_edit->setPlainText(document()->metadata());
+}
+
+void MetadataDock::documentClosed()
+{
+ m_edit->clear();
+ AbstractInfoDock::documentClosed();
+}
+
+#include "metadata.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.h
new file mode 100644
index 00000000000..6f1507a6e99
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/metadata.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef METADATA_H
+#define METADATA_H
+
+#include "abstractinfodock.h"
+
+class QTextEdit;
+
+class MetadataDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ MetadataDock(QWidget *parent = 0);
+ ~MetadataDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QTextEdit *m_edit;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.cpp
new file mode 100644
index 00000000000..e9ebafabe94
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.cpp
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "navigationtoolbar.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QAction>
+#include <QtGui/QComboBox>
+
+NavigationToolBar::NavigationToolBar(QWidget *parent)
+ : QToolBar(parent)
+{
+ m_firstAct = addAction(tr("First"), this, SLOT(slotGoFirst()));
+ m_prevAct = addAction(tr("Previous"), this, SLOT(slotGoPrev()));
+ m_pageCombo = new QComboBox(this);
+ connect(m_pageCombo, SIGNAL(activated(int)), this, SLOT(slotComboActivated(int)));
+ addWidget(m_pageCombo);
+ m_nextAct = addAction(tr("Next"), this, SLOT(slotGoNext()));
+ m_lastAct = addAction(tr("Last"), this, SLOT(slotGoLast()));
+
+ addSeparator();
+
+ m_zoomCombo = new QComboBox(this);
+ m_zoomCombo->setEditable(true);
+ m_zoomCombo->addItem(tr("10%"));
+ m_zoomCombo->addItem(tr("25%"));
+ m_zoomCombo->addItem(tr("33%"));
+ m_zoomCombo->addItem(tr("50%"));
+ m_zoomCombo->addItem(tr("66%"));
+ m_zoomCombo->addItem(tr("75%"));
+ m_zoomCombo->addItem(tr("100%"));
+ m_zoomCombo->addItem(tr("125%"));
+ m_zoomCombo->addItem(tr("150%"));
+ m_zoomCombo->addItem(tr("200%"));
+ m_zoomCombo->addItem(tr("300%"));
+ m_zoomCombo->addItem(tr("400%"));
+ m_zoomCombo->setCurrentIndex(6); // "100%"
+ connect(m_zoomCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotZoomComboChanged(QString)));
+ addWidget(m_zoomCombo);
+
+ documentClosed();
+}
+
+NavigationToolBar::~NavigationToolBar()
+{
+}
+
+void NavigationToolBar::documentLoaded()
+{
+ const int pageCount = document()->numPages();
+ for (int i = 0; i < pageCount; ++i) {
+ m_pageCombo->addItem(QString::number(i + 1));
+ }
+ m_pageCombo->setEnabled(true);
+}
+
+void NavigationToolBar::documentClosed()
+{
+ m_firstAct->setEnabled(false);
+ m_prevAct->setEnabled(false);
+ m_nextAct->setEnabled(false);
+ m_lastAct->setEnabled(false);
+ m_pageCombo->clear();
+ m_pageCombo->setEnabled(false);
+}
+
+void NavigationToolBar::pageChanged(int page)
+{
+ const int pageCount = document()->numPages();
+ m_firstAct->setEnabled(page > 0);
+ m_prevAct->setEnabled(page > 0);
+ m_nextAct->setEnabled(page < (pageCount - 1));
+ m_lastAct->setEnabled(page < (pageCount - 1));
+ m_pageCombo->setCurrentIndex(page);
+}
+
+void NavigationToolBar::slotGoFirst()
+{
+ setPage(0);
+}
+
+void NavigationToolBar::slotGoPrev()
+{
+ setPage(page() - 1);
+}
+
+void NavigationToolBar::slotGoNext()
+{
+ setPage(page() + 1);
+}
+
+void NavigationToolBar::slotGoLast()
+{
+ setPage(document()->numPages() - 1);
+}
+
+void NavigationToolBar::slotComboActivated(int index)
+{
+ setPage(index);
+}
+
+void NavigationToolBar::slotZoomComboChanged(const QString &_text)
+{
+ QString text = _text;
+ text.remove(QLatin1Char('%'));
+ bool ok = false;
+ int value = text.toInt(&ok);
+ if (ok && value >= 10) {
+ emit zoomChanged(qreal(value) / 100);
+ }
+}
+
+#include "navigationtoolbar.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.h
new file mode 100644
index 00000000000..3469f01b0c4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/navigationtoolbar.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef NAVIGATIONTOOLBAR_H
+#define NAVIGATIONTOOLBAR_H
+
+#include <QtGui/QToolBar>
+
+#include "documentobserver.h"
+
+class QAction;
+class QComboBox;
+
+class NavigationToolBar : public QToolBar, public DocumentObserver
+{
+ Q_OBJECT
+
+public:
+ NavigationToolBar(QWidget *parent = 0);
+ ~NavigationToolBar();
+
+ /*virtual*/ void documentLoaded();
+ /*virtual*/ void documentClosed();
+ /*virtual*/ void pageChanged(int page);
+
+Q_SIGNALS:
+ void zoomChanged(qreal value);
+
+private Q_SLOTS:
+ void slotGoFirst();
+ void slotGoPrev();
+ void slotGoNext();
+ void slotGoLast();
+ void slotComboActivated(int index);
+ void slotZoomComboChanged(const QString &text);
+
+private:
+ QAction *m_firstAct;
+ QAction *m_prevAct;
+ QComboBox *m_pageCombo;
+ QAction *m_nextAct;
+ QAction *m_lastAct;
+ QComboBox *m_zoomCombo;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.cpp
new file mode 100644
index 00000000000..0c1015b9c17
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.cpp
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "optcontent.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QTreeView>
+
+OptContentDock::OptContentDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_view = new QTreeView(this);
+ setWidget(m_view);
+ setWindowTitle(tr("Optional content"));
+ m_view->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+OptContentDock::~OptContentDock()
+{
+}
+
+
+void OptContentDock::documentLoaded()
+{
+ AbstractInfoDock::documentLoaded();
+ if ( document()->pageMode() == Poppler::Document::UseOC ) {
+ show();
+ }
+}
+
+void OptContentDock::fillInfo()
+{
+ if (!document()->hasOptionalContent()) {
+ return;
+ }
+
+ m_view->setModel(document()->optionalContentModel());
+ connect(m_view->model(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(reloadImage()));
+ m_view->expandToDepth(1);
+}
+
+void OptContentDock::documentClosed()
+{
+ m_view->setModel(0);
+ AbstractInfoDock::documentClosed();
+}
+
+void OptContentDock::reloadImage()
+{
+ reloadPage();
+}
+
+#include "optcontent.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.h
new file mode 100644
index 00000000000..b933f5cd5d1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/optcontent.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef OPTCONTENT_H
+#define OPTCONTENT_H
+
+#include "abstractinfodock.h"
+
+class QTreeView;
+
+class OptContentDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ OptContentDock(QWidget *parent = 0);
+ ~OptContentDock();
+
+ /*virtual*/ void documentLoaded();
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private Q_SLOTS:
+ void reloadImage();
+
+private:
+ QTreeView *m_view;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.cpp
new file mode 100644
index 00000000000..734dacb1ff0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.cpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "pageview.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QApplication>
+#include <QtGui/QDesktopWidget>
+#include <QtGui/QImage>
+#include <QtGui/QLabel>
+#include <QtGui/QPixmap>
+
+PageView::PageView(QWidget *parent)
+ : QScrollArea(parent)
+ , m_zoom(1.0)
+ , m_dpiX(QApplication::desktop()->physicalDpiX())
+ , m_dpiY(QApplication::desktop()->physicalDpiY())
+{
+ m_imageLabel = new QLabel(this);
+ m_imageLabel->resize(0, 0);
+ setWidget(m_imageLabel);
+}
+
+PageView::~PageView()
+{
+}
+
+void PageView::documentLoaded()
+{
+}
+
+void PageView::documentClosed()
+{
+ m_imageLabel->clear();
+ m_imageLabel->resize(0, 0);
+}
+
+void PageView::pageChanged(int page)
+{
+ Poppler::Page *popplerPage = document()->page(page);
+ const double resX = m_dpiX * m_zoom;
+ const double resY = m_dpiY * m_zoom;
+ QImage image = popplerPage->renderToImage(resX, resY);
+ if (!image.isNull()) {
+ m_imageLabel->resize(image.size());
+ m_imageLabel->setPixmap(QPixmap::fromImage(image));
+ } else {
+ m_imageLabel->resize(0, 0);
+ m_imageLabel->setPixmap(QPixmap());
+ }
+ delete popplerPage;
+}
+
+void PageView::slotZoomChanged(qreal value)
+{
+ m_zoom = value;
+ if (!document()) {
+ return;
+ }
+ reloadPage();
+}
+
+#include "pageview.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.h
new file mode 100644
index 00000000000..2f7ad61bcd8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/pageview.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PAGEVIEW_H
+#define PAGEVIEW_H
+
+#include <QtGui/QScrollArea>
+
+#include "documentobserver.h"
+
+class QLabel;
+
+class PageView : public QScrollArea, public DocumentObserver
+{
+ Q_OBJECT
+
+public:
+ PageView(QWidget *parent = 0);
+ ~PageView();
+
+ /*virtual*/ void documentLoaded();
+ /*virtual*/ void documentClosed();
+ /*virtual*/ void pageChanged(int page);
+
+private Q_SLOTS:
+ void slotZoomChanged(qreal value);
+
+private:
+ QLabel *m_imageLabel;
+ qreal m_zoom;
+ int m_dpiX;
+ int m_dpiY;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.cpp
new file mode 100644
index 00000000000..38205b2ea4d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.cpp
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "permissions.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QListWidget>
+
+PermissionsDock::PermissionsDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_table = new QListWidget(this);
+ setWidget(m_table);
+ setWindowTitle(tr("Permissions"));
+ m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+PermissionsDock::~PermissionsDock()
+{
+}
+
+void PermissionsDock::fillInfo()
+{
+#define ADD_ROW(title, function) \
+do { \
+ QListWidgetItem *item = new QListWidgetItem(); \
+ item->setFlags(item->flags() & ~Qt::ItemIsEnabled); \
+ item->setText(title); \
+ item->setCheckState(document()->function() ? Qt::Checked : Qt::Unchecked); \
+ m_table->addItem(item); \
+} while (0)
+ ADD_ROW("Print", okToPrint);
+ ADD_ROW("PrintHiRes", okToPrintHighRes);
+ ADD_ROW("Change", okToChange);
+ ADD_ROW("Copy", okToCopy);
+ ADD_ROW("Add Notes", okToAddNotes);
+ ADD_ROW("Fill Forms", okToFillForm);
+ ADD_ROW("Create Forms", okToCreateFormFields);
+ ADD_ROW("Extract for accessibility", okToExtractForAccessibility);
+ ADD_ROW("Assemble", okToAssemble);
+#undef ADD_ROW
+}
+
+void PermissionsDock::documentClosed()
+{
+ m_table->clear();
+ AbstractInfoDock::documentClosed();
+}
+
+#include "permissions.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.h
new file mode 100644
index 00000000000..13bcbbf0687
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/permissions.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PERMISSIONS_H
+#define PERMISSIONS_H
+
+#include "abstractinfodock.h"
+
+class QListWidget;
+
+class PermissionsDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ PermissionsDock(QWidget *parent = 0);
+ ~PermissionsDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QListWidget *m_table;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.cpp
new file mode 100644
index 00000000000..07b19ca752d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "thumbnails.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QListWidget>
+
+static const int PageRole = Qt::UserRole + 1;
+
+ThumbnailsDock::ThumbnailsDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_list = new QListWidget(this);
+ setWidget(m_list);
+ setWindowTitle(tr("Thumbnails"));
+ m_list->setViewMode(QListView::ListMode);
+ m_list->setMovement(QListView::Static);
+ m_list->setVerticalScrollMode(QListView::ScrollPerPixel);
+ connect(m_list, SIGNAL(itemActivated(QListWidgetItem*)),
+ this, SLOT(slotItemActivated(QListWidgetItem*)));
+}
+
+ThumbnailsDock::~ThumbnailsDock()
+{
+}
+
+void ThumbnailsDock::fillInfo()
+{
+ const int num = document()->numPages();
+ QSize maxSize;
+ for (int i = 0; i < num; ++i) {
+ const Poppler::Page *page = document()->page(i);
+ const QImage image = page->thumbnail();
+ if (!image.isNull()) {
+ QListWidgetItem *item = new QListWidgetItem();
+ item->setText(QString::number(i + 1));
+ item->setData(Qt::DecorationRole, QPixmap::fromImage(image));
+ item->setData(PageRole, i);
+ m_list->addItem(item);
+ maxSize.setWidth(qMax(maxSize.width(), image.width()));
+ maxSize.setHeight(qMax(maxSize.height(), image.height()));
+ }
+ delete page;
+ }
+ if (num > 0) {
+ m_list->setGridSize(maxSize);
+ m_list->setIconSize(maxSize);
+ }
+}
+
+void ThumbnailsDock::documentClosed()
+{
+ m_list->clear();
+ AbstractInfoDock::documentClosed();
+}
+
+void ThumbnailsDock::slotItemActivated(QListWidgetItem *item)
+{
+ if (!item) {
+ return;
+ }
+
+ setPage(item->data(PageRole).toInt());
+}
+
+#include "thumbnails.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.h
new file mode 100644
index 00000000000..076d5aee406
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/thumbnails.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef THUMBNAILS_H
+#define THUMBNAILS_H
+
+#include "abstractinfodock.h"
+
+class QListWidget;
+class QListWidgetItem;
+
+class ThumbnailsDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ ThumbnailsDock(QWidget *parent = 0);
+ ~ThumbnailsDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private Q_SLOTS:
+ void slotItemActivated(QListWidgetItem *item);
+
+private:
+ QListWidget *m_list;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.cpp
new file mode 100644
index 00000000000..bf3e5cbb300
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "toc.h"
+
+#include <poppler-qt4.h>
+
+#include <QtGui/QHeaderView>
+#include <QtGui/QTreeWidget>
+
+static void fillToc(const QDomNode &parent, QTreeWidget *tree, QTreeWidgetItem *parentItem)
+{
+ QTreeWidgetItem *newitem = 0;
+ for (QDomNode node = parent.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ QDomElement e = node.toElement();
+
+ if (!parentItem) {
+ newitem = new QTreeWidgetItem(tree, newitem);
+ } else {
+ newitem = new QTreeWidgetItem(parentItem, newitem);
+ }
+ newitem->setText(0, e.tagName());
+
+ bool isOpen = false;
+ if (e.hasAttribute(QString::fromLatin1("Open"))) {
+ isOpen = QVariant(e.attribute(QString::fromLatin1("Open"))).toBool();
+ }
+ if (isOpen) {
+ tree->expandItem(newitem);
+ }
+
+ if (e.hasChildNodes()) {
+ fillToc(node, tree, newitem);
+ }
+ }
+}
+
+
+TocDock::TocDock(QWidget *parent)
+ : AbstractInfoDock(parent)
+{
+ m_tree = new QTreeWidget(this);
+ setWidget(m_tree);
+ m_tree->setAlternatingRowColors(true);
+ m_tree->header()->hide();
+ setWindowTitle(tr("TOC"));
+ m_tree->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+}
+
+TocDock::~TocDock()
+{
+}
+
+void TocDock::fillInfo()
+{
+ const QDomDocument *toc = document()->toc();
+ if (toc) {
+ fillToc(*toc, m_tree, 0);
+ } else {
+ QTreeWidgetItem *item = new QTreeWidgetItem();
+ item->setText(0, tr("No TOC"));
+ item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
+ m_tree->addTopLevelItem(item);
+ }
+}
+
+void TocDock::documentClosed()
+{
+ m_tree->clear();
+ AbstractInfoDock::documentClosed();
+}
+
+#include "toc.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.h
new file mode 100644
index 00000000000..bbc9082770e
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/toc.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef TOC_H
+#define TOC_H
+
+#include "abstractinfodock.h"
+
+class QTreeWidget;
+
+class TocDock : public AbstractInfoDock
+{
+ Q_OBJECT
+
+public:
+ TocDock(QWidget *parent = 0);
+ ~TocDock();
+
+ /*virtual*/ void documentClosed();
+
+protected:
+ /*virtual*/ void fillInfo();
+
+private:
+ QTreeWidget *m_tree;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.cpp
new file mode 100644
index 00000000000..0201eea386f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.cpp
@@ -0,0 +1,317 @@
+/*
+ * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "viewer.h"
+
+#include "embeddedfiles.h"
+#include "fonts.h"
+#include "info.h"
+#include "metadata.h"
+#include "navigationtoolbar.h"
+#include "optcontent.h"
+#include "pageview.h"
+#include "permissions.h"
+#include "thumbnails.h"
+#include "toc.h"
+
+#include <poppler-qt4.h>
+
+#include <QtCore/QDir>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QFileDialog>
+#include <QtGui/QInputDialog>
+#include <QtGui/QMenu>
+#include <QtGui/QMenuBar>
+#include <QtGui/QMessageBox>
+
+PdfViewer::PdfViewer()
+ : QMainWindow(), m_currentPage(0), m_doc(0)
+{
+ setWindowTitle(tr("Poppler-Qt4 Demo"));
+
+ // setup the menus
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ m_fileOpenAct = fileMenu->addAction(tr("&Open"), this, SLOT(slotOpenFile()));
+ m_fileOpenAct->setShortcut(Qt::CTRL + Qt::Key_O);
+ fileMenu->addSeparator();
+ m_fileSaveCopyAct = fileMenu->addAction(tr("&Save a Copy..."), this, SLOT(slotSaveCopy()));
+ m_fileSaveCopyAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
+ m_fileSaveCopyAct->setEnabled(false);
+ fileMenu->addSeparator();
+ QAction *act = fileMenu->addAction(tr("&Quit"), qApp, SLOT(closeAllWindows()));
+ act->setShortcut(Qt::CTRL + Qt::Key_Q);
+
+ QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
+
+ QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
+ m_settingsTextAAAct = settingsMenu->addAction(tr("Text Antialias"));
+ m_settingsTextAAAct->setCheckable(true);
+ connect(m_settingsTextAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleTextAA(bool)));
+ m_settingsGfxAAAct = settingsMenu->addAction(tr("Graphics Antialias"));
+ m_settingsGfxAAAct->setCheckable(true);
+ connect(m_settingsGfxAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleGfxAA(bool)));
+ QMenu *settingsRenderMenu = settingsMenu->addMenu(tr("Render Backend"));
+ m_settingsRenderBackendGrp = new QActionGroup(settingsRenderMenu);
+ m_settingsRenderBackendGrp->setExclusive(true);
+ act = settingsRenderMenu->addAction(tr("Splash"));
+ act->setCheckable(true);
+ act->setChecked(true);
+ act->setData(qVariantFromValue(0));
+ m_settingsRenderBackendGrp->addAction(act);
+ act = settingsRenderMenu->addAction(tr("Arthur"));
+ act->setCheckable(true);
+ act->setData(qVariantFromValue(1));
+ m_settingsRenderBackendGrp->addAction(act);
+ connect(m_settingsRenderBackendGrp, SIGNAL(triggered(QAction*)),
+ this, SLOT(slotRenderBackend(QAction*)));
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ act = helpMenu->addAction(tr("&About"), this, SLOT(slotAbout()));
+ act = helpMenu->addAction(tr("About &Qt"), this, SLOT(slotAboutQt()));
+
+ NavigationToolBar *navbar = new NavigationToolBar(this);
+ addToolBar(navbar);
+ m_observers.append(navbar);
+
+ PageView *view = new PageView(this);
+ setCentralWidget(view);
+ m_observers.append(view);
+
+ InfoDock *infoDock = new InfoDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, infoDock);
+ infoDock->hide();
+ viewMenu->addAction(infoDock->toggleViewAction());
+ m_observers.append(infoDock);
+
+ TocDock *tocDock = new TocDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, tocDock);
+ tocDock->hide();
+ viewMenu->addAction(tocDock->toggleViewAction());
+ m_observers.append(tocDock);
+
+ FontsDock *fontsDock = new FontsDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, fontsDock);
+ fontsDock->hide();
+ viewMenu->addAction(fontsDock->toggleViewAction());
+ m_observers.append(fontsDock);
+
+ PermissionsDock *permissionsDock = new PermissionsDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, permissionsDock);
+ permissionsDock->hide();
+ viewMenu->addAction(permissionsDock->toggleViewAction());
+ m_observers.append(permissionsDock);
+
+ ThumbnailsDock *thumbnailsDock = new ThumbnailsDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, thumbnailsDock);
+ thumbnailsDock->hide();
+ viewMenu->addAction(thumbnailsDock->toggleViewAction());
+ m_observers.append(thumbnailsDock);
+
+ EmbeddedFilesDock *embfilesDock = new EmbeddedFilesDock(this);
+ addDockWidget(Qt::BottomDockWidgetArea, embfilesDock);
+ embfilesDock->hide();
+ viewMenu->addAction(embfilesDock->toggleViewAction());
+ m_observers.append(embfilesDock);
+
+ MetadataDock *metadataDock = new MetadataDock(this);
+ addDockWidget(Qt::BottomDockWidgetArea, metadataDock);
+ metadataDock->hide();
+ viewMenu->addAction(metadataDock->toggleViewAction());
+ m_observers.append(metadataDock);
+
+ OptContentDock *optContentDock = new OptContentDock(this);
+ addDockWidget(Qt::LeftDockWidgetArea, optContentDock);
+ optContentDock->hide();
+ viewMenu->addAction(optContentDock->toggleViewAction());
+ m_observers.append(optContentDock);
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->m_viewer = this;
+ }
+
+ connect(navbar, SIGNAL(zoomChanged(qreal)), view, SLOT(slotZoomChanged(qreal)));
+
+ // activate AA by default
+ m_settingsTextAAAct->setChecked(true);
+ m_settingsGfxAAAct->setChecked(true);
+}
+
+PdfViewer::~PdfViewer()
+{
+ closeDocument();
+}
+
+QSize PdfViewer::sizeHint() const
+{
+ return QSize(500, 600);
+}
+
+void PdfViewer::loadDocument(const QString &file)
+{
+ Poppler::Document *newdoc = Poppler::Document::load(file);
+ if (!newdoc) {
+ QMessageBox msgbox(QMessageBox::Critical, tr("Open Error"), tr("Cannot open:\n") + file,
+ QMessageBox::Ok, this);
+ msgbox.exec();
+ return;
+ }
+
+ while (newdoc->isLocked()) {
+ bool ok = true;
+ QString password = QInputDialog::getText(this, tr("Document Password"),
+ tr("Please insert the password of the document:"),
+ QLineEdit::Password, QString(), &ok);
+ if (!ok) {
+ delete newdoc;
+ return;
+ }
+ newdoc->unlock(password.toLatin1(), password.toLatin1());
+ }
+
+ closeDocument();
+
+ m_doc = newdoc;
+
+ m_doc->setRenderHint(Poppler::Document::TextAntialiasing, m_settingsTextAAAct->isChecked());
+ m_doc->setRenderHint(Poppler::Document::Antialiasing, m_settingsGfxAAAct->isChecked());
+ m_doc->setRenderBackend((Poppler::Document::RenderBackend)m_settingsRenderBackendGrp->checkedAction()->data().toInt());
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->documentLoaded();
+ obs->pageChanged(0);
+ }
+
+ m_fileSaveCopyAct->setEnabled(true);
+}
+
+void PdfViewer::closeDocument()
+{
+ if (!m_doc) {
+ return;
+ }
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->documentClosed();
+ }
+
+ m_currentPage = 0;
+ delete m_doc;
+ m_doc = 0;
+
+ m_fileSaveCopyAct->setEnabled(false);
+}
+
+void PdfViewer::slotOpenFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open PDF Document"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
+ if (fileName.isEmpty()) {
+ return;
+ }
+
+ loadDocument(fileName);
+}
+
+void PdfViewer::slotSaveCopy()
+{
+ if (!m_doc) {
+ return;
+ }
+
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save Copy"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
+ if (fileName.isEmpty()) {
+ return;
+ }
+
+ Poppler::PDFConverter *converter = m_doc->pdfConverter();
+ converter->setOutputFileName(fileName);
+ converter->setPDFOptions(converter->pdfOptions() & ~Poppler::PDFConverter::WithChanges);
+ if (!converter->convert()) {
+ QMessageBox msgbox(QMessageBox::Critical, tr("Save Error"), tr("Cannot export to:\n%1").arg(fileName),
+ QMessageBox::Ok, this);
+ }
+ delete converter;
+}
+
+void PdfViewer::slotAbout()
+{
+ const QString text("This is a demo of the Poppler-Qt4 library.");
+ QMessageBox::about(this, QString::fromLatin1("About Poppler-Qt4 Demo"), text);
+}
+
+void PdfViewer::slotAboutQt()
+{
+ QMessageBox::aboutQt(this);
+}
+
+void PdfViewer::slotToggleTextAA(bool value)
+{
+ if (!m_doc) {
+ return;
+ }
+
+ m_doc->setRenderHint(Poppler::Document::TextAntialiasing, value);
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->pageChanged(m_currentPage);
+ }
+}
+
+void PdfViewer::slotToggleGfxAA(bool value)
+{
+ if (!m_doc) {
+ return;
+ }
+
+ m_doc->setRenderHint(Poppler::Document::Antialiasing, value);
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->pageChanged(m_currentPage);
+ }
+}
+
+void PdfViewer::slotRenderBackend(QAction *act)
+{
+ if (!m_doc || !act) {
+ return;
+ }
+
+ m_doc->setRenderBackend((Poppler::Document::RenderBackend)act->data().toInt());
+
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->pageChanged(m_currentPage);
+ }
+}
+
+void PdfViewer::setPage(int page)
+{
+ Q_FOREACH(DocumentObserver *obs, m_observers) {
+ obs->pageChanged(page);
+ }
+
+ m_currentPage = page;
+}
+
+int PdfViewer::page() const
+{
+ return m_currentPage;
+}
+
+#include "viewer.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.h
new file mode 100644
index 00000000000..5e0eaaffc28
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/demos/viewer.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PDFVIEWER_H
+#define PDFVIEWER_H
+
+#include <QtGui/QMainWindow>
+
+class QAction;
+class QActionGroup;
+class QLabel;
+class DocumentObserver;
+namespace Poppler {
+class Document;
+}
+
+class PdfViewer : public QMainWindow
+{
+ Q_OBJECT
+
+ friend class DocumentObserver;
+
+public:
+ PdfViewer();
+ ~PdfViewer();
+
+ /*virtual*/ QSize sizeHint() const;
+
+ void loadDocument(const QString &file);
+ void closeDocument();
+
+private Q_SLOTS:
+ void slotOpenFile();
+ void slotSaveCopy();
+ void slotAbout();
+ void slotAboutQt();
+ void slotToggleTextAA(bool value);
+ void slotToggleGfxAA(bool value);
+ void slotRenderBackend(QAction *act);
+
+private:
+ void setPage(int page);
+ int page() const;
+
+ int m_currentPage;
+
+ QAction *m_fileOpenAct;
+ QAction *m_fileSaveCopyAct;
+ QAction *m_settingsTextAAAct;
+ QAction *m_settingsGfxAAAct;
+ QActionGroup *m_settingsRenderBackendGrp;
+
+ QList<DocumentObserver *> m_observers;
+
+ Poppler::Document *m_doc;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/CMakeLists.txt
new file mode 100644
index 00000000000..f6c7b160d01
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/CMakeLists.txt
@@ -0,0 +1,52 @@
+add_definitions(${QT4_DEFINITIONS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT4_INCLUDE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+set(poppler_qt4_SRCS
+ poppler-annotation.cc
+ poppler-document.cc
+ poppler-embeddedfile.cc
+ poppler-fontinfo.cc
+ poppler-form.cc
+ poppler-link.cc
+ poppler-link-extractor.cc
+ poppler-movie.cc
+ poppler-optcontent.cc
+ poppler-page.cc
+ poppler-base-converter.cc
+ poppler-pdf-converter.cc
+ poppler-private.cc
+ poppler-ps-converter.cc
+ poppler-qiodeviceoutstream.cc
+ poppler-sound.cc
+ poppler-textbox.cc
+ poppler-page-transition.cc
+)
+if (ENABLE_SPLASH)
+ set(poppler_qt4_SRCS ${poppler_qt4_SRCS}
+ ${CMAKE_SOURCE_DIR}/poppler/ArthurOutputDev.cc
+ )
+endif (ENABLE_SPLASH)
+qt4_automoc(${poppler_qt4_SRCS})
+add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS})
+set_target_properties(poppler-qt4 PROPERTIES VERSION 3.2.0 SOVERSION 3)
+target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY})
+if(MSVC)
+target_link_libraries(poppler-qt4 poppler ${poppler_LIBS})
+endif(MSVC)
+install(TARGETS poppler-qt4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+install(FILES
+ poppler-qt4.h
+ poppler-link.h
+ poppler-annotation.h
+ poppler-form.h
+ poppler-optcontent.h
+ poppler-export.h
+ poppler-page-transition.h
+ DESTINATION include/poppler/qt4)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.am
new file mode 100644
index 00000000000..7e982e7f1f0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.am
@@ -0,0 +1,73 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+SUFFIXES: .moc
+
+poppler_includedir = $(includedir)/poppler/qt4
+
+poppler_include_HEADERS = \
+ poppler-qt4.h \
+ poppler-link.h \
+ poppler-annotation.h \
+ poppler-form.h \
+ poppler-optcontent.h \
+ poppler-export.h \
+ poppler-page-transition.h \
+ poppler-page-transition-private.h
+
+lib_LTLIBRARIES = libpoppler-qt4.la
+
+libpoppler_qt4_la_SOURCES = \
+ poppler-document.cc \
+ poppler-page.cc \
+ poppler-fontinfo.cc \
+ poppler-embeddedfile.cc \
+ poppler-textbox.cc \
+ poppler-link.cc \
+ poppler-annotation.cc \
+ poppler-link-extractor.cc \
+ poppler-optcontent.cc \
+ poppler-optcontent.h \
+ poppler-page-transition.cc \
+ poppler-sound.cc \
+ poppler-form.cc \
+ poppler-base-converter.cc \
+ poppler-ps-converter.cc \
+ poppler-pdf-converter.cc \
+ poppler-qiodeviceoutstream.cc \
+ poppler-private.cc \
+ poppler-movie.cc \
+ poppler-annotation-helper.h \
+ poppler-page-private.h \
+ poppler-link-extractor-private.h \
+ poppler-annotation-private.h \
+ poppler-converter-private.h \
+ poppler-qiodeviceoutstream-private.h \
+ poppler-optcontent-private.h \
+ poppler-export.h \
+ poppler-private.h
+
+libpoppler_qt4_la_LIBADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(FONTCONFIG_LIBS) \
+ $(POPPLER_QT4_LIBS)
+
+if BUILD_SPLASH_OUTPUT
+libpoppler_qt4_la_LIBADD += \
+ $(top_builddir)/poppler/libpoppler-arthur.la
+endif
+
+libpoppler_qt4_la_LDFLAGS = -version-info 5:0:2 @create_shared_lib@
+
+# This rule lets GNU make create any *.moc from the equivalent *.h
+.h.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+poppler-optcontent.lo: poppler-optcontent.moc
+
+clean-generic:
+ rm -f *.moc
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.in
new file mode 100644
index 00000000000..bd25cacbaf5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/Makefile.in
@@ -0,0 +1,737 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@BUILD_SPLASH_OUTPUT_TRUE@am__append_1 = \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(top_builddir)/poppler/libpoppler-arthur.la
+
+subdir = qt4/src
+DIST_COMMON = $(poppler_include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(poppler_includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libpoppler_qt4_la_DEPENDENCIES = \
+ $(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__append_1)
+am_libpoppler_qt4_la_OBJECTS = poppler-document.lo poppler-page.lo \
+ poppler-fontinfo.lo poppler-embeddedfile.lo poppler-textbox.lo \
+ poppler-link.lo poppler-annotation.lo \
+ poppler-link-extractor.lo poppler-optcontent.lo \
+ poppler-page-transition.lo poppler-sound.lo poppler-form.lo \
+ poppler-base-converter.lo poppler-ps-converter.lo \
+ poppler-pdf-converter.lo poppler-qiodeviceoutstream.lo \
+ poppler-private.lo poppler-movie.lo
+libpoppler_qt4_la_OBJECTS = $(am_libpoppler_qt4_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libpoppler_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libpoppler_qt4_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libpoppler_qt4_la_SOURCES)
+DIST_SOURCES = $(libpoppler_qt4_la_SOURCES)
+HEADERS = $(poppler_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+poppler_includedir = $(includedir)/poppler/qt4
+poppler_include_HEADERS = \
+ poppler-qt4.h \
+ poppler-link.h \
+ poppler-annotation.h \
+ poppler-form.h \
+ poppler-optcontent.h \
+ poppler-export.h \
+ poppler-page-transition.h \
+ poppler-page-transition-private.h
+
+lib_LTLIBRARIES = libpoppler-qt4.la
+libpoppler_qt4_la_SOURCES = \
+ poppler-document.cc \
+ poppler-page.cc \
+ poppler-fontinfo.cc \
+ poppler-embeddedfile.cc \
+ poppler-textbox.cc \
+ poppler-link.cc \
+ poppler-annotation.cc \
+ poppler-link-extractor.cc \
+ poppler-optcontent.cc \
+ poppler-optcontent.h \
+ poppler-page-transition.cc \
+ poppler-sound.cc \
+ poppler-form.cc \
+ poppler-base-converter.cc \
+ poppler-ps-converter.cc \
+ poppler-pdf-converter.cc \
+ poppler-qiodeviceoutstream.cc \
+ poppler-private.cc \
+ poppler-movie.cc \
+ poppler-annotation-helper.h \
+ poppler-page-private.h \
+ poppler-link-extractor-private.h \
+ poppler-annotation-private.h \
+ poppler-converter-private.h \
+ poppler-qiodeviceoutstream-private.h \
+ poppler-optcontent-private.h \
+ poppler-export.h \
+ poppler-private.h
+
+libpoppler_qt4_la_LIBADD = $(top_builddir)/poppler/libpoppler.la \
+ $(FONTCONFIG_LIBS) $(POPPLER_QT4_LIBS) $(am__append_1)
+libpoppler_qt4_la_LDFLAGS = -version-info 5:0:2 @create_shared_lib@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .h .lo .moc .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign qt4/src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libpoppler_qt4_la_LINK) -rpath $(libdir) $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-annotation.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-base-converter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-document.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-embeddedfile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-fontinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-form.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-link-extractor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-link.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-movie.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-optcontent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-page-transition.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-page.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-pdf-converter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-private.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-ps-converter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-qiodeviceoutstream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-sound.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-textbox.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_includeHEADERS: $(poppler_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)"
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-poppler_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-poppler_includeHEADERS install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-libLTLIBRARIES uninstall-poppler_includeHEADERS
+
+
+SUFFIXES: .moc
+
+# This rule lets GNU make create any *.moc from the equivalent *.h
+.h.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+poppler-optcontent.lo: poppler-optcontent.moc
+
+clean-generic:
+ rm -f *.moc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-helper.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-helper.h
new file mode 100644
index 00000000000..f5d17eb95db
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-helper.h
@@ -0,0 +1,208 @@
+/* poppler-annotation-helper.h: qt interface to poppler
+ * Copyright (C) 2006, 2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <QtCore/QDebug>
+
+class QColor;
+
+class AnnotColor;
+
+namespace Poppler {
+
+class XPDFReader
+{
+ public:
+ // find named symbol and parse it
+ static inline void lookupName( Dict *, char *, QString & dest );
+ static inline void lookupString( Dict *, char *, QString & dest );
+ static inline void lookupBool( Dict *, char *, bool & dest );
+ static inline void lookupInt( Dict *, char *, int & dest );
+ static inline void lookupNum( Dict *, char *, double & dest );
+ static inline int lookupNumArray( Dict *, char *, double * dest, int len );
+ static inline void lookupColor( Dict *, char *, QColor & color );
+ static inline void lookupIntRef( Dict *, char *, int & dest );
+ static inline void lookupDate( Dict *, char *, QDateTime & dest );
+ // transform from user coords to normalized ones using the matrix M
+ static inline void transform( double * M, double x, double y, QPointF &res );
+};
+
+void XPDFReader::lookupName( Dict * dict, char * type, QString & dest )
+{
+ Object nameObj;
+ dict->lookup( type, &nameObj );
+ if ( nameObj.isNull() )
+ return;
+ if ( nameObj.isName() )
+ dest = nameObj.getName();
+ else
+ qDebug() << type << " is not Name." << endl;
+ nameObj.free();
+}
+
+void XPDFReader::lookupString( Dict * dict, char * type, QString & dest )
+{
+ Object stringObj;
+ dict->lookup( type, &stringObj );
+ if ( stringObj.isNull() )
+ return;
+ if ( stringObj.isString() )
+ dest = stringObj.getString()->getCString();
+ else
+ qDebug() << type << " is not String." << endl;
+ stringObj.free();
+}
+
+void XPDFReader::lookupBool( Dict * dict, char * type, bool & dest )
+{
+ Object boolObj;
+ dict->lookup( type, &boolObj );
+ if ( boolObj.isNull() )
+ return;
+ if ( boolObj.isBool() )
+ dest = boolObj.getBool() == gTrue;
+ else
+ qDebug() << type << " is not Bool." << endl;
+ boolObj.free();
+}
+
+void XPDFReader::lookupInt( Dict * dict, char * type, int & dest )
+{
+ Object intObj;
+ dict->lookup( type, &intObj );
+ if ( intObj.isNull() )
+ return;
+ if ( intObj.isInt() )
+ dest = intObj.getInt();
+ else
+ qDebug() << type << " is not Int." << endl;
+ intObj.free();
+}
+
+void XPDFReader::lookupNum( Dict * dict, char * type, double & dest )
+{
+ Object numObj;
+ dict->lookup( type, &numObj );
+ if ( numObj.isNull() )
+ return;
+ if ( numObj.isNum() )
+ dest = numObj.getNum();
+ else
+ qDebug() << type << " is not Num." << endl;
+ numObj.free();
+}
+
+int XPDFReader::lookupNumArray( Dict * dict, char * type, double * dest, int len )
+{
+ Object arrObj;
+ dict->lookup( type, &arrObj );
+ if ( arrObj.isNull() )
+ return 0;
+ Object numObj;
+ if ( arrObj.isArray() )
+ {
+ len = qMin( len, arrObj.arrayGetLength() );
+ for ( int i = 0; i < len; i++ )
+ {
+ dest[i] = arrObj.arrayGet( i, &numObj )->getNum();
+ numObj.free();
+ }
+ }
+ else
+ {
+ len = 0;
+ qDebug() << type << "is not Array." << endl;
+ }
+ arrObj.free();
+ return len;
+}
+
+void XPDFReader::lookupColor( Dict * dict, char * type, QColor & dest )
+{
+ double c[3];
+ if ( XPDFReader::lookupNumArray( dict, type, c, 3 ) == 3 )
+ dest = QColor( (int)(c[0]*255.0), (int)(c[1]*255.0), (int)(c[2]*255.0));
+}
+
+void XPDFReader::lookupIntRef( Dict * dict, char * type, int & dest )
+{
+ Object refObj;
+ dict->lookupNF( type, &refObj );
+ if ( refObj.isNull() )
+ return;
+ if ( refObj.isRef() )
+ dest = refObj.getRefNum();
+ else
+ qDebug() << type << " is not Ref." << endl;
+ refObj.free();
+}
+
+void XPDFReader::lookupDate( Dict * dict, char * type, QDateTime & dest )
+{
+ Object dateObj;
+ dict->lookup( type, &dateObj );
+ if ( dateObj.isNull() )
+ return;
+ if ( dateObj.isString() )
+ {
+ dest = convertDate( dateObj.getString()->getCString() );
+ }
+ else
+ qDebug() << type << " is not Date" << endl;
+ dateObj.free();
+}
+
+void XPDFReader::transform( double * M, double x, double y, QPointF &res )
+{
+ res.setX( M[0] * x + M[2] * y + M[4] );
+ res.setY( M[1] * x + M[3] * y + M[5] );
+}
+
+/** @short Helper classes for CROSSDEPS resolving and DS conversion. */
+struct ResolveRevision
+{
+ int prevAnnotationID; // ID of the annotation to be reparended
+ int nextAnnotationID; // (only needed for speeding up resolving)
+ Annotation * nextAnnotation; // annotation that will act as parent
+ Annotation::RevScope nextScope; // scope of revision (Reply)
+ Annotation::RevType nextType; // type of revision (None)
+};
+
+struct ResolveWindow
+{
+ AnnotPopup * popup; // the (maybe shared) window
+ Annotation * annotation; // annotation having the popup window
+};
+
+struct PostProcessText // this handles a special pdf case conversion
+{
+ Annotation * textAnnotation; // a popup text annotation (not FreeText)
+ bool opened; // pdf property to convert to window flags
+};
+
+struct PopupWindow
+{
+ Annotation * dummyAnnotation; // window properties (in pdf as Annotation)
+ bool shown; // converted to Annotation::Hidden flag
+};
+
+QColor convertAnnotColor( AnnotColor *color );
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-private.h
new file mode 100644
index 00000000000..b428347f60c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation-private.h
@@ -0,0 +1,49 @@
+/* poppler-link-extractor-private.h: qt interface to poppler
+ * Copyright (C) 2007, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_ANNOTATION_PRIVATE_H_
+#define _POPPLER_ANNOTATION_PRIVATE_H_
+
+#include "poppler-annotation.h"
+
+namespace Poppler
+{
+
+class AnnotationPrivate
+{
+ public:
+ AnnotationPrivate();
+ virtual ~AnnotationPrivate();
+
+ /* properties: contents related */
+ QString author;
+ QString contents;
+ QString uniqueName;
+ QDateTime modDate; // before or equal to currentDateTime()
+ QDateTime creationDate; // before or equal to modifyDate
+
+ /* properties: look/interaction related */
+ int flags;
+ QRectF boundary;
+
+ QLinkedList< Annotation::Revision > revisions;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.cc
new file mode 100644
index 00000000000..22f1e6a637f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.cc
@@ -0,0 +1,2062 @@
+/* poppler-annotation.cc: qt interface to poppler
+ * Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+// qt/kde includes
+#include <QtXml/QDomElement>
+#include <QtGui/QColor>
+
+// local includes
+#include "poppler-annotation.h"
+#include "poppler-link.h"
+#include "poppler-qt4.h"
+#include "poppler-annotation-private.h"
+
+// poppler includes
+#include <Page.h>
+#include <Annot.h>
+
+namespace Poppler {
+
+//BEGIN AnnotationUtils implementation
+Annotation * AnnotationUtils::createAnnotation( const QDomElement & annElement )
+{
+ // safety check on annotation element
+ if ( !annElement.hasAttribute( "type" ) )
+ return 0;
+
+ // build annotation of given type
+ Annotation * annotation = 0;
+ int typeNumber = annElement.attribute( "type" ).toInt();
+ switch ( typeNumber )
+ {
+ case Annotation::AText:
+ annotation = new TextAnnotation( annElement );
+ break;
+ case Annotation::ALine:
+ annotation = new LineAnnotation( annElement );
+ break;
+ case Annotation::AGeom:
+ annotation = new GeomAnnotation( annElement );
+ break;
+ case Annotation::AHighlight:
+ annotation = new HighlightAnnotation( annElement );
+ break;
+ case Annotation::AStamp:
+ annotation = new StampAnnotation( annElement );
+ break;
+ case Annotation::AInk:
+ annotation = new InkAnnotation( annElement );
+ break;
+ case Annotation::ACaret:
+ annotation = new CaretAnnotation( annElement );
+ break;
+ }
+
+ // return created annotation
+ return annotation;
+}
+
+void AnnotationUtils::storeAnnotation( const Annotation * ann, QDomElement & annElement,
+ QDomDocument & document )
+{
+ // save annotation's type as element's attribute
+ annElement.setAttribute( "type", (uint)ann->subType() );
+
+ // append all annotation data as children of this node
+ ann->store( annElement, document );
+}
+
+QDomElement AnnotationUtils::findChildElement( const QDomNode & parentNode,
+ const QString & name )
+{
+ // loop through the whole children and return a 'name' named element
+ QDomNode subNode = parentNode.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement element = subNode.toElement();
+ if ( element.tagName() == name )
+ return element;
+ subNode = subNode.nextSibling();
+ }
+ // if the name can't be found, return a dummy null element
+ return QDomElement();
+}
+//END AnnotationUtils implementation
+
+
+//BEGIN Annotation implementation
+AnnotationPrivate::AnnotationPrivate()
+ : flags( 0 )
+{
+}
+
+AnnotationPrivate::~AnnotationPrivate()
+{
+}
+
+
+Annotation::Style::Style()
+ : opacity( 1.0 ), width( 1.0 ), style( Solid ), xCorners( 0.0 ),
+ yCorners( 0.0 ), marks( 3 ), spaces( 0 ), effect( NoEffect ),
+ effectIntensity( 1.0 ) {}
+
+Annotation::Window::Window()
+ : flags( -1 ), width( 0 ), height( 0 ) {}
+
+Annotation::Revision::Revision()
+ : annotation( 0 ), scope( Reply ), type( None ) {}
+
+Annotation::Annotation( AnnotationPrivate &dd )
+ : d_ptr( &dd )
+{
+}
+
+Annotation::~Annotation()
+{
+ Q_D( Annotation );
+ // delete all children revisions
+ QLinkedList< Annotation::Revision >::iterator it = d->revisions.begin(), end = d->revisions.end();
+ for ( ; it != end; ++it )
+ delete (*it).annotation;
+
+ delete d_ptr;
+}
+
+Annotation::Annotation( AnnotationPrivate &dd, const QDomNode &annNode )
+ : d_ptr( &dd )
+{
+ Q_D( Annotation );
+ // get the [base] element of the annotation node
+ QDomElement e = AnnotationUtils::findChildElement( annNode, "base" );
+ if ( e.isNull() )
+ return;
+
+ // parse -contents- attributes
+ if ( e.hasAttribute( "author" ) )
+ d->author = e.attribute( "author" );
+ if ( e.hasAttribute( "contents" ) )
+ d->contents = e.attribute( "contents" );
+ if ( e.hasAttribute( "uniqueName" ) )
+ d->uniqueName = e.attribute( "uniqueName" );
+ if ( e.hasAttribute( "modifyDate" ) )
+ d->modDate = QDateTime::fromString( e.attribute( "modifyDate" ) );
+ if ( e.hasAttribute( "creationDate" ) )
+ d->creationDate = QDateTime::fromString( e.attribute( "creationDate" ) );
+
+ // parse -other- attributes
+ if ( e.hasAttribute( "flags" ) )
+ d->flags = e.attribute( "flags" ).toInt();
+ if ( e.hasAttribute( "color" ) )
+ style.color = QColor( e.attribute( "color" ) );
+ if ( e.hasAttribute( "opacity" ) )
+ style.opacity = e.attribute( "opacity" ).toDouble();
+
+ // parse -the-subnodes- (describing Style, Window, Revision(s) structures)
+ // Note: all subnodes if present must be 'attributes complete'
+ QDomNode eSubNode = e.firstChild();
+ while ( eSubNode.isElement() )
+ {
+ QDomElement ee = eSubNode.toElement();
+ eSubNode = eSubNode.nextSibling();
+
+ // parse boundary
+ if ( ee.tagName() == "boundary" )
+ {
+ d->boundary.setLeft(ee.attribute( "l" ).toDouble());
+ d->boundary.setTop(ee.attribute( "t" ).toDouble());
+ d->boundary.setRight(ee.attribute( "r" ).toDouble());
+ d->boundary.setBottom(ee.attribute( "b" ).toDouble());
+ }
+ // parse penStyle if not default
+ else if ( ee.tagName() == "penStyle" )
+ {
+ style.width = ee.attribute( "width" ).toDouble();
+ style.style = (LineStyle)ee.attribute( "style" ).toInt();
+ style.xCorners = ee.attribute( "xcr" ).toDouble();
+ style.yCorners = ee.attribute( "ycr" ).toDouble();
+ style.marks = ee.attribute( "marks" ).toInt();
+ style.spaces = ee.attribute( "spaces" ).toInt();
+ }
+ // parse effectStyle if not default
+ else if ( ee.tagName() == "penEffect" )
+ {
+ style.effect = (LineEffect)ee.attribute( "effect" ).toInt();
+ style.effectIntensity = ee.attribute( "intensity" ).toDouble();
+ }
+ // parse window if present
+ else if ( ee.tagName() == "window" )
+ {
+ window.flags = ee.attribute( "flags" ).toInt();
+ window.topLeft.setX(ee.attribute( "top" ).toDouble());
+ window.topLeft.setY(ee.attribute( "left" ).toDouble());
+ window.width = ee.attribute( "width" ).toInt();
+ window.height = ee.attribute( "height" ).toInt();
+ window.title = ee.attribute( "title" );
+ window.summary = ee.attribute( "summary" );
+ // parse window subnodes
+ QDomNode winNode = ee.firstChild();
+ for ( ; winNode.isElement(); winNode = winNode.nextSibling() )
+ {
+ QDomElement winElement = winNode.toElement();
+ if ( winElement.tagName() == "text" )
+ window.text = winElement.firstChild().toCDATASection().data();
+ }
+ }
+ }
+
+ // get the [revisions] element of the annotation node
+ QDomNode revNode = annNode.firstChild();
+ for ( ; revNode.isElement(); revNode = revNode.nextSibling() )
+ {
+ QDomElement revElement = revNode.toElement();
+ if ( revElement.tagName() != "revision" )
+ continue;
+
+ // compile the Revision structure crating annotation
+ Revision rev;
+ rev.scope = (RevScope)revElement.attribute( "revScope" ).toInt();
+ rev.type = (RevType)revElement.attribute( "revType" ).toInt();
+ rev.annotation = AnnotationUtils::createAnnotation( revElement );
+
+ // if annotation is valid, add revision to internal list
+ if ( rev.annotation )
+ d->revisions.append( rev );
+ }
+}
+
+void Annotation::store( QDomNode & annNode, QDomDocument & document ) const
+{
+ Q_D( const Annotation );
+ // create [base] element of the annotation node
+ QDomElement e = document.createElement( "base" );
+ annNode.appendChild( e );
+
+ // store -contents- attributes
+ if ( !d->author.isEmpty() )
+ e.setAttribute( "author", d->author );
+ if ( !d->contents.isEmpty() )
+ e.setAttribute( "contents", d->contents );
+ if ( !d->uniqueName.isEmpty() )
+ e.setAttribute( "uniqueName", d->uniqueName );
+ if ( d->modDate.isValid() )
+ e.setAttribute( "modifyDate", d->modDate.toString() );
+ if ( d->creationDate.isValid() )
+ e.setAttribute( "creationDate", d->creationDate.toString() );
+
+ // store -other- attributes
+ if ( d->flags )
+ e.setAttribute( "flags", d->flags );
+ if ( style.color.isValid() && style.color != Qt::black )
+ e.setAttribute( "color", style.color.name() );
+ if ( style.opacity != 1.0 )
+ e.setAttribute( "opacity", QString::number( style.opacity ) );
+
+ // Sub-Node-1 - boundary
+ QDomElement bE = document.createElement( "boundary" );
+ e.appendChild( bE );
+ bE.setAttribute( "l", QString::number( (double)d->boundary.left() ) );
+ bE.setAttribute( "t", QString::number( (double)d->boundary.top() ) );
+ bE.setAttribute( "r", QString::number( (double)d->boundary.right() ) );
+ bE.setAttribute( "b", QString::number( (double)d->boundary.bottom() ) );
+
+ // Sub-Node-2 - penStyle
+ if ( style.width != 1 || style.style != Solid || style.xCorners != 0 ||
+ style.yCorners != 0.0 || style.marks != 3 || style.spaces != 0 )
+ {
+ QDomElement psE = document.createElement( "penStyle" );
+ e.appendChild( psE );
+ psE.setAttribute( "width", QString::number( style.width ) );
+ psE.setAttribute( "style", (int)style.style );
+ psE.setAttribute( "xcr", QString::number( style.xCorners ) );
+ psE.setAttribute( "ycr", QString::number( style.yCorners ) );
+ psE.setAttribute( "marks", style.marks );
+ psE.setAttribute( "spaces", style.spaces );
+ }
+
+ // Sub-Node-3 - penEffect
+ if ( style.effect != NoEffect || style.effectIntensity != 1.0 )
+ {
+ QDomElement peE = document.createElement( "penEffect" );
+ e.appendChild( peE );
+ peE.setAttribute( "effect", (int)style.effect );
+ peE.setAttribute( "intensity", QString::number( style.effectIntensity ) );
+ }
+
+ // Sub-Node-4 - window
+ if ( window.flags != -1 || !window.title.isEmpty() ||
+ !window.summary.isEmpty() || !window.text.isEmpty() )
+ {
+ QDomElement wE = document.createElement( "window" );
+ e.appendChild( wE );
+ wE.setAttribute( "flags", window.flags );
+ wE.setAttribute( "top", QString::number( window.topLeft.x() ) );
+ wE.setAttribute( "left", QString::number( window.topLeft.y() ) );
+ wE.setAttribute( "width", window.width );
+ wE.setAttribute( "height", window.height );
+ wE.setAttribute( "title", window.title );
+ wE.setAttribute( "summary", window.summary );
+ // store window.text as a subnode, because we need escaped data
+ if ( !window.text.isEmpty() )
+ {
+ QDomElement escapedText = document.createElement( "text" );
+ wE.appendChild( escapedText );
+ QDomCDATASection textCData = document.createCDATASection( window.text );
+ escapedText.appendChild( textCData );
+ }
+ }
+
+ // create [revision] element of the annotation node (if any)
+ if ( d->revisions.isEmpty() )
+ return;
+
+ // add all revisions as children of revisions element
+ QLinkedList< Revision >::const_iterator it = d->revisions.begin(), end = d->revisions.end();
+ for ( ; it != end; ++it )
+ {
+ // create revision element
+ const Revision & revision = *it;
+ QDomElement r = document.createElement( "revision" );
+ annNode.appendChild( r );
+ // set element attributes
+ r.setAttribute( "revScope", (int)revision.scope );
+ r.setAttribute( "revType", (int)revision.type );
+ // use revision as the annotation element, so fill it up
+ AnnotationUtils::storeAnnotation( revision.annotation, r, document );
+ }
+}
+
+QString Annotation::author() const
+{
+ Q_D( const Annotation );
+ return d->author;
+}
+
+void Annotation::setAuthor( const QString &author )
+{
+ Q_D( Annotation );
+ d->author = author;
+}
+
+QString Annotation::contents() const
+{
+ Q_D( const Annotation );
+ return d->contents;
+}
+
+void Annotation::setContents( const QString &contents )
+{
+ Q_D( Annotation );
+ d->contents = contents;
+}
+
+QString Annotation::uniqueName() const
+{
+ Q_D( const Annotation );
+ return d->uniqueName;
+}
+
+void Annotation::setUniqueName( const QString &uniqueName )
+{
+ Q_D( Annotation );
+ d->uniqueName = uniqueName;
+}
+
+QDateTime Annotation::modificationDate() const
+{
+ Q_D( const Annotation );
+ return d->modDate;
+}
+
+void Annotation::setModificationDate( const QDateTime &date )
+{
+ Q_D( Annotation );
+ d->modDate = date;
+}
+
+QDateTime Annotation::creationDate() const
+{
+ Q_D( const Annotation );
+ return d->creationDate;
+}
+
+void Annotation::setCreationDate( const QDateTime &date )
+{
+ Q_D( Annotation );
+ d->creationDate = date;
+}
+
+int Annotation::flags() const
+{
+ Q_D( const Annotation );
+ return d->flags;
+}
+
+void Annotation::setFlags( int flags )
+{
+ Q_D( Annotation );
+ d->flags = flags;
+}
+
+QRectF Annotation::boundary() const
+{
+ Q_D( const Annotation );
+ return d->boundary;
+}
+
+void Annotation::setBoundary( const QRectF &boundary )
+{
+ Q_D( Annotation );
+ d->boundary = boundary;
+}
+
+QLinkedList< Annotation::Revision >& Annotation::revisions()
+{
+ Q_D( Annotation );
+ return d->revisions;
+}
+
+const QLinkedList< Annotation::Revision >& Annotation::revisions() const
+{
+ Q_D( const Annotation );
+ return d->revisions;
+}
+
+//END AnnotationUtils implementation
+
+
+/** TextAnnotation [Annotation] */
+class TextAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ TextAnnotationPrivate();
+
+ // data fields
+ TextAnnotation::TextType textType;
+ QString textIcon;
+ QFont textFont;
+ int inplaceAlign; // 0:left, 1:center, 2:right
+ QString inplaceText; // overrides contents
+ QPointF inplaceCallout[3];
+ TextAnnotation::InplaceIntent inplaceIntent;
+};
+
+TextAnnotationPrivate::TextAnnotationPrivate()
+ : AnnotationPrivate(), textType( TextAnnotation::Linked ),
+ textIcon( "Note" ), inplaceAlign( 0 ),
+ inplaceIntent( TextAnnotation::Unknown )
+{
+}
+
+TextAnnotation::TextAnnotation()
+ : Annotation( *new TextAnnotationPrivate() )
+{}
+
+TextAnnotation::TextAnnotation( const QDomNode & node )
+ : Annotation( *new TextAnnotationPrivate, node )
+{
+ Q_D( TextAnnotation );
+
+ // loop through the whole children looking for a 'text' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "text" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "type" ) )
+ d->textType = (TextAnnotation::TextType)e.attribute( "type" ).toInt();
+ if ( e.hasAttribute( "icon" ) )
+ d->textIcon = e.attribute( "icon" );
+ if ( e.hasAttribute( "font" ) )
+ d->textFont.fromString( e.attribute( "font" ) );
+ if ( e.hasAttribute( "align" ) )
+ d->inplaceAlign = e.attribute( "align" ).toInt();
+ if ( e.hasAttribute( "intent" ) )
+ d->inplaceIntent = (TextAnnotation::InplaceIntent)e.attribute( "intent" ).toInt();
+
+ // parse the subnodes
+ QDomNode eSubNode = e.firstChild();
+ while ( eSubNode.isElement() )
+ {
+ QDomElement ee = eSubNode.toElement();
+ eSubNode = eSubNode.nextSibling();
+
+ if ( ee.tagName() == "escapedText" )
+ {
+ d->inplaceText = ee.firstChild().toCDATASection().data();
+ }
+ else if ( ee.tagName() == "callout" )
+ {
+ d->inplaceCallout[0].setX(ee.attribute( "ax" ).toDouble());
+ d->inplaceCallout[0].setY(ee.attribute( "ay" ).toDouble());
+ d->inplaceCallout[1].setX(ee.attribute( "bx" ).toDouble());
+ d->inplaceCallout[1].setY(ee.attribute( "by" ).toDouble());
+ d->inplaceCallout[2].setX(ee.attribute( "cx" ).toDouble());
+ d->inplaceCallout[2].setY(ee.attribute( "cy" ).toDouble());
+ }
+ }
+
+ // loading complete
+ break;
+ }
+}
+
+TextAnnotation::~TextAnnotation()
+{
+}
+
+void TextAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const TextAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [text] element
+ QDomElement textElement = document.createElement( "text" );
+ node.appendChild( textElement );
+
+ // store the optional attributes
+ if ( d->textType != Linked )
+ textElement.setAttribute( "type", (int)d->textType );
+ if ( d->textIcon != "Comment" )
+ textElement.setAttribute( "icon", d->textIcon );
+ if ( d->inplaceAlign )
+ textElement.setAttribute( "align", d->inplaceAlign );
+ if ( d->inplaceIntent != Unknown )
+ textElement.setAttribute( "intent", (int)d->inplaceIntent );
+
+ textElement.setAttribute( "font", d->textFont.toString() );
+
+ // Sub-Node-1 - escapedText
+ if ( !d->inplaceText.isEmpty() )
+ {
+ QDomElement escapedText = document.createElement( "escapedText" );
+ textElement.appendChild( escapedText );
+ QDomCDATASection textCData = document.createCDATASection( d->inplaceText );
+ escapedText.appendChild( textCData );
+ }
+
+ // Sub-Node-2 - callout
+ if ( d->inplaceCallout[0].x() != 0.0 )
+ {
+ QDomElement calloutElement = document.createElement( "callout" );
+ textElement.appendChild( calloutElement );
+ calloutElement.setAttribute( "ax", QString::number( d->inplaceCallout[0].x() ) );
+ calloutElement.setAttribute( "ay", QString::number( d->inplaceCallout[0].y() ) );
+ calloutElement.setAttribute( "bx", QString::number( d->inplaceCallout[1].x() ) );
+ calloutElement.setAttribute( "by", QString::number( d->inplaceCallout[1].y() ) );
+ calloutElement.setAttribute( "cx", QString::number( d->inplaceCallout[2].x() ) );
+ calloutElement.setAttribute( "cy", QString::number( d->inplaceCallout[2].y() ) );
+ }
+}
+
+Annotation::SubType TextAnnotation::subType() const
+{
+ return AText;
+}
+
+TextAnnotation::TextType TextAnnotation::textType() const
+{
+ Q_D( const TextAnnotation );
+ return d->textType;
+}
+
+void TextAnnotation::setTextType( TextAnnotation::TextType type )
+{
+ Q_D( TextAnnotation );
+ d->textType = type;
+}
+
+QString TextAnnotation::textIcon() const
+{
+ Q_D( const TextAnnotation );
+ return d->textIcon;
+}
+
+void TextAnnotation::setTextIcon( const QString &icon )
+{
+ Q_D( TextAnnotation );
+ d->textIcon = icon;
+}
+
+QFont TextAnnotation::textFont() const
+{
+ Q_D( const TextAnnotation );
+ return d->textFont;
+}
+
+void TextAnnotation::setTextFont( const QFont &font )
+{
+ Q_D( TextAnnotation );
+ d->textFont = font;
+}
+
+int TextAnnotation::inplaceAlign() const
+{
+ Q_D( const TextAnnotation );
+ return d->inplaceAlign;
+}
+
+void TextAnnotation::setInplaceAlign( int align )
+{
+ Q_D( TextAnnotation );
+ d->inplaceAlign = align;
+}
+
+QString TextAnnotation::inplaceText() const
+{
+ Q_D( const TextAnnotation );
+ return d->inplaceText;
+}
+
+void TextAnnotation::setInplaceText( const QString &text )
+{
+ Q_D( TextAnnotation );
+ d->inplaceText = text;
+}
+
+QPointF TextAnnotation::calloutPoint( int id ) const
+{
+ if ( id < 0 || id >= 3 )
+ return QPointF();
+
+ Q_D( const TextAnnotation );
+ return d->inplaceCallout[id];
+}
+
+void TextAnnotation::setCalloutPoint( int id, const QPointF &point )
+{
+ if ( id < 0 || id >= 3 )
+ return;
+
+ Q_D( TextAnnotation );
+ d->inplaceCallout[id] = point;
+}
+
+TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const
+{
+ Q_D( const TextAnnotation );
+ return d->inplaceIntent;
+}
+
+void TextAnnotation::setInplaceIntent( TextAnnotation::InplaceIntent intent )
+{
+ Q_D( TextAnnotation );
+ d->inplaceIntent = intent;
+}
+
+
+/** LineAnnotation [Annotation] */
+class LineAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ LineAnnotationPrivate();
+
+ // data fields (note uses border for rendering style)
+ QLinkedList<QPointF> linePoints;
+ LineAnnotation::TermStyle lineStartStyle;
+ LineAnnotation::TermStyle lineEndStyle;
+ bool lineClosed : 1; // (if true draw close shape)
+ bool lineShowCaption : 1;
+ QColor lineInnerColor;
+ double lineLeadingFwdPt;
+ double lineLeadingBackPt;
+ LineAnnotation::LineIntent lineIntent;
+};
+
+LineAnnotationPrivate::LineAnnotationPrivate()
+ : AnnotationPrivate(), lineStartStyle( LineAnnotation::None ),
+ lineEndStyle( LineAnnotation::None ), lineClosed( false ),
+ lineShowCaption( false ), lineLeadingFwdPt( 0 ), lineLeadingBackPt( 0 ),
+ lineIntent( LineAnnotation::Unknown )
+{
+}
+
+LineAnnotation::LineAnnotation()
+ : Annotation( *new LineAnnotationPrivate() )
+{}
+
+LineAnnotation::LineAnnotation( const QDomNode & node )
+ : Annotation( *new LineAnnotationPrivate(), node )
+{
+ Q_D( LineAnnotation );
+
+ // loop through the whole children looking for a 'line' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "line" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "startStyle" ) )
+ d->lineStartStyle = (LineAnnotation::TermStyle)e.attribute( "startStyle" ).toInt();
+ if ( e.hasAttribute( "endStyle" ) )
+ d->lineEndStyle = (LineAnnotation::TermStyle)e.attribute( "endStyle" ).toInt();
+ if ( e.hasAttribute( "closed" ) )
+ d->lineClosed = e.attribute( "closed" ).toInt();
+ if ( e.hasAttribute( "innerColor" ) )
+ d->lineInnerColor = QColor( e.attribute( "innerColor" ) );
+ if ( e.hasAttribute( "leadFwd" ) )
+ d->lineLeadingFwdPt = e.attribute( "leadFwd" ).toDouble();
+ if ( e.hasAttribute( "leadBack" ) )
+ d->lineLeadingBackPt = e.attribute( "leadBack" ).toDouble();
+ if ( e.hasAttribute( "showCaption" ) )
+ d->lineShowCaption = e.attribute( "showCaption" ).toInt();
+ if ( e.hasAttribute( "intent" ) )
+ d->lineIntent = (LineAnnotation::LineIntent)e.attribute( "intent" ).toInt();
+
+ // parse all 'point' subnodes
+ QDomNode pointNode = e.firstChild();
+ while ( pointNode.isElement() )
+ {
+ QDomElement pe = pointNode.toElement();
+ pointNode = pointNode.nextSibling();
+
+ if ( pe.tagName() != "point" )
+ continue;
+
+ QPointF p(pe.attribute( "x", "0.0" ).toDouble(), pe.attribute( "y", "0.0" ).toDouble());
+ d->linePoints.append( p );
+ }
+
+ // loading complete
+ break;
+ }
+}
+
+LineAnnotation::~LineAnnotation()
+{
+}
+
+void LineAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const LineAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [line] element
+ QDomElement lineElement = document.createElement( "line" );
+ node.appendChild( lineElement );
+
+ // store the attributes
+ if ( d->lineStartStyle != None )
+ lineElement.setAttribute( "startStyle", (int)d->lineStartStyle );
+ if ( d->lineEndStyle != None )
+ lineElement.setAttribute( "endStyle", (int)d->lineEndStyle );
+ if ( d->lineClosed )
+ lineElement.setAttribute( "closed", d->lineClosed );
+ if ( d->lineInnerColor.isValid() )
+ lineElement.setAttribute( "innerColor", d->lineInnerColor.name() );
+ if ( d->lineLeadingFwdPt != 0.0 )
+ lineElement.setAttribute( "leadFwd", QString::number( d->lineLeadingFwdPt ) );
+ if ( d->lineLeadingBackPt != 0.0 )
+ lineElement.setAttribute( "leadBack", QString::number( d->lineLeadingBackPt ) );
+ if ( d->lineShowCaption )
+ lineElement.setAttribute( "showCaption", d->lineShowCaption );
+ if ( d->lineIntent != Unknown )
+ lineElement.setAttribute( "intent", d->lineIntent );
+
+ // append the list of points
+ int points = d->linePoints.count();
+ if ( points > 1 )
+ {
+ QLinkedList<QPointF>::const_iterator it = d->linePoints.begin(), end = d->linePoints.end();
+ while ( it != end )
+ {
+ const QPointF & p = *it;
+ QDomElement pElement = document.createElement( "point" );
+ lineElement.appendChild( pElement );
+ pElement.setAttribute( "x", QString::number( p.x() ) );
+ pElement.setAttribute( "y", QString::number( p.y() ) );
+ ++it;
+ }
+ }
+}
+
+Annotation::SubType LineAnnotation::subType() const
+{
+ return ALine;
+}
+
+QLinkedList<QPointF> LineAnnotation::linePoints() const
+{
+ Q_D( const LineAnnotation );
+ return d->linePoints;
+}
+
+void LineAnnotation::setLinePoints( const QLinkedList<QPointF> &points )
+{
+ Q_D( LineAnnotation );
+ d->linePoints = points;
+}
+
+LineAnnotation::TermStyle LineAnnotation::lineStartStyle() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineStartStyle;
+}
+
+void LineAnnotation::setLineStartStyle( LineAnnotation::TermStyle style )
+{
+ Q_D( LineAnnotation );
+ d->lineStartStyle = style;
+}
+
+LineAnnotation::TermStyle LineAnnotation::lineEndStyle() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineEndStyle;
+}
+
+void LineAnnotation::setLineEndStyle( LineAnnotation::TermStyle style )
+{
+ Q_D( LineAnnotation );
+ d->lineEndStyle = style;
+}
+
+bool LineAnnotation::isLineClosed() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineClosed;
+}
+
+void LineAnnotation::setLineClosed( bool closed )
+{
+ Q_D( LineAnnotation );
+ d->lineClosed = closed;
+}
+
+QColor LineAnnotation::lineInnerColor() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineInnerColor;
+}
+
+void LineAnnotation::setLineInnerColor( const QColor &color )
+{
+ Q_D( LineAnnotation );
+ d->lineInnerColor = color;
+}
+
+double LineAnnotation::lineLeadingForwardPoint() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineLeadingFwdPt;
+}
+
+void LineAnnotation::setLineLeadingForwardPoint( double point )
+{
+ Q_D( LineAnnotation );
+ d->lineLeadingFwdPt = point;
+}
+
+double LineAnnotation::lineLeadingBackPoint() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineLeadingBackPt;
+}
+
+void LineAnnotation::setLineLeadingBackPoint( double point )
+{
+ Q_D( LineAnnotation );
+ d->lineLeadingBackPt = point;
+}
+
+bool LineAnnotation::lineShowCaption() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineShowCaption;
+}
+
+void LineAnnotation::setLineShowCaption( bool show )
+{
+ Q_D( LineAnnotation );
+ d->lineShowCaption = show;
+}
+
+LineAnnotation::LineIntent LineAnnotation::lineIntent() const
+{
+ Q_D( const LineAnnotation );
+ return d->lineIntent;
+}
+
+void LineAnnotation::setLineIntent( LineAnnotation::LineIntent intent )
+{
+ Q_D( LineAnnotation );
+ d->lineIntent = intent;
+}
+
+
+/** GeomAnnotation [Annotation] */
+class GeomAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ GeomAnnotationPrivate();
+
+ // data fields (note uses border for rendering style)
+ GeomAnnotation::GeomType geomType;
+ QColor geomInnerColor;
+ int geomWidthPt;
+};
+
+GeomAnnotationPrivate::GeomAnnotationPrivate()
+ : AnnotationPrivate(), geomType( GeomAnnotation::InscribedSquare ),
+ geomWidthPt( 18 )
+{
+}
+
+GeomAnnotation::GeomAnnotation()
+ : Annotation( *new GeomAnnotationPrivate() )
+{}
+
+GeomAnnotation::GeomAnnotation( const QDomNode & node )
+ : Annotation( *new GeomAnnotationPrivate(), node )
+{
+ Q_D( GeomAnnotation );
+
+ // loop through the whole children looking for a 'geom' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "geom" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "type" ) )
+ d->geomType = (GeomAnnotation::GeomType)e.attribute( "type" ).toInt();
+ if ( e.hasAttribute( "color" ) )
+ d->geomInnerColor = QColor( e.attribute( "color" ) );
+ if ( e.hasAttribute( "width" ) )
+ d->geomWidthPt = e.attribute( "width" ).toInt();
+
+ // loading complete
+ break;
+ }
+}
+
+GeomAnnotation::~GeomAnnotation()
+{
+}
+
+void GeomAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const GeomAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [geom] element
+ QDomElement geomElement = document.createElement( "geom" );
+ node.appendChild( geomElement );
+
+ // append the optional attributes
+ if ( d->geomType != InscribedSquare )
+ geomElement.setAttribute( "type", (int)d->geomType );
+ if ( d->geomInnerColor.isValid() )
+ geomElement.setAttribute( "color", d->geomInnerColor.name() );
+ if ( d->geomWidthPt != 18 )
+ geomElement.setAttribute( "width", d->geomWidthPt );
+}
+
+Annotation::SubType GeomAnnotation::subType() const
+{
+ return AGeom;
+}
+
+GeomAnnotation::GeomType GeomAnnotation::geomType() const
+{
+ Q_D( const GeomAnnotation );
+ return d->geomType;
+}
+
+void GeomAnnotation::setGeomType( GeomAnnotation::GeomType type )
+{
+ Q_D( GeomAnnotation );
+ d->geomType = type;
+}
+
+QColor GeomAnnotation::geomInnerColor() const
+{
+ Q_D( const GeomAnnotation );
+ return d->geomInnerColor;
+}
+
+void GeomAnnotation::setGeomInnerColor( const QColor &color )
+{
+ Q_D( GeomAnnotation );
+ d->geomInnerColor = color;
+}
+
+int GeomAnnotation::geomPointWidth() const
+{
+ Q_D( const GeomAnnotation );
+ return d->geomWidthPt;
+}
+
+void GeomAnnotation::setGeomPointWidth( int width )
+{
+ Q_D( GeomAnnotation );
+ d->geomWidthPt = width;
+}
+
+
+
+/** HighlightAnnotation [Annotation] */
+class HighlightAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ HighlightAnnotationPrivate();
+
+ // data fields
+ HighlightAnnotation::HighlightType highlightType;
+ QList< HighlightAnnotation::Quad > highlightQuads; // not empty
+};
+
+HighlightAnnotationPrivate::HighlightAnnotationPrivate()
+ : AnnotationPrivate(), highlightType( HighlightAnnotation::Highlight )
+{
+}
+
+HighlightAnnotation::HighlightAnnotation()
+ : Annotation( *new HighlightAnnotationPrivate() )
+{}
+
+HighlightAnnotation::HighlightAnnotation( const QDomNode & node )
+ : Annotation( *new HighlightAnnotationPrivate(), node )
+{
+ Q_D( HighlightAnnotation );
+
+ // loop through the whole children looking for a 'hl' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "hl" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "type" ) )
+ d->highlightType = (HighlightAnnotation::HighlightType)e.attribute( "type" ).toInt();
+
+ // parse all 'quad' subnodes
+ QDomNode quadNode = e.firstChild();
+ for ( ; quadNode.isElement(); quadNode = quadNode.nextSibling() )
+ {
+ QDomElement qe = quadNode.toElement();
+ if ( qe.tagName() != "quad" )
+ continue;
+
+ Quad q;
+ q.points[0].setX(qe.attribute( "ax", "0.0" ).toDouble());
+ q.points[0].setY(qe.attribute( "ay", "0.0" ).toDouble());
+ q.points[1].setX(qe.attribute( "bx", "0.0" ).toDouble());
+ q.points[1].setY(qe.attribute( "by", "0.0" ).toDouble());
+ q.points[2].setX(qe.attribute( "cx", "0.0" ).toDouble());
+ q.points[2].setY(qe.attribute( "cy", "0.0" ).toDouble());
+ q.points[3].setX(qe.attribute( "dx", "0.0" ).toDouble());
+ q.points[3].setY(qe.attribute( "dy", "0.0" ).toDouble());
+ q.capStart = qe.hasAttribute( "start" );
+ q.capEnd = qe.hasAttribute( "end" );
+ q.feather = qe.attribute( "feather", "0.1" ).toDouble();
+ d->highlightQuads.append( q );
+ }
+
+ // loading complete
+ break;
+ }
+}
+
+HighlightAnnotation::~HighlightAnnotation()
+{
+}
+
+void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const HighlightAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [hl] element
+ QDomElement hlElement = document.createElement( "hl" );
+ node.appendChild( hlElement );
+
+ // append the optional attributes
+ if ( d->highlightType != Highlight )
+ hlElement.setAttribute( "type", (int)d->highlightType );
+ if ( d->highlightQuads.count() < 1 )
+ return;
+ // append highlight quads, all children describe quads
+ QList< HighlightAnnotation::Quad >::const_iterator it = d->highlightQuads.begin(), end = d->highlightQuads.end();
+ for ( ; it != end; ++it )
+ {
+ QDomElement quadElement = document.createElement( "quad" );
+ hlElement.appendChild( quadElement );
+ const Quad & q = *it;
+ quadElement.setAttribute( "ax", QString::number( q.points[0].x() ) );
+ quadElement.setAttribute( "ay", QString::number( q.points[0].y() ) );
+ quadElement.setAttribute( "bx", QString::number( q.points[1].x() ) );
+ quadElement.setAttribute( "by", QString::number( q.points[1].y() ) );
+ quadElement.setAttribute( "cx", QString::number( q.points[2].x() ) );
+ quadElement.setAttribute( "cy", QString::number( q.points[2].y() ) );
+ quadElement.setAttribute( "dx", QString::number( q.points[3].x() ) );
+ quadElement.setAttribute( "dy", QString::number( q.points[3].y() ) );
+ if ( q.capStart )
+ quadElement.setAttribute( "start", 1 );
+ if ( q.capEnd )
+ quadElement.setAttribute( "end", 1 );
+ quadElement.setAttribute( "feather", QString::number( q.feather ) );
+ }
+}
+
+Annotation::SubType HighlightAnnotation::subType() const
+{
+ return AHighlight;
+}
+
+HighlightAnnotation::HighlightType HighlightAnnotation::highlightType() const
+{
+ Q_D( const HighlightAnnotation );
+ return d->highlightType;
+}
+
+void HighlightAnnotation::setHighlightType( HighlightAnnotation::HighlightType type )
+{
+ Q_D( HighlightAnnotation );
+ d->highlightType = type;
+}
+
+QList< HighlightAnnotation::Quad > HighlightAnnotation::highlightQuads() const
+{
+ Q_D( const HighlightAnnotation );
+ return d->highlightQuads;
+}
+
+void HighlightAnnotation::setHighlightQuads( const QList< HighlightAnnotation::Quad > &quads )
+{
+ Q_D( HighlightAnnotation );
+ d->highlightQuads = quads;
+}
+
+
+/** StampAnnotation [Annotation] */
+class StampAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ StampAnnotationPrivate();
+
+ // data fields
+ QString stampIconName;
+};
+
+StampAnnotationPrivate::StampAnnotationPrivate()
+ : AnnotationPrivate(), stampIconName( "Draft" )
+{
+}
+
+StampAnnotation::StampAnnotation()
+ : Annotation( *new StampAnnotationPrivate() )
+{}
+
+StampAnnotation::StampAnnotation( const QDomNode & node )
+ : Annotation( *new StampAnnotationPrivate(), node )
+{
+ Q_D( StampAnnotation );
+
+ // loop through the whole children looking for a 'stamp' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "stamp" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "icon" ) )
+ d->stampIconName = e.attribute( "icon" );
+
+ // loading complete
+ break;
+ }
+}
+
+StampAnnotation::~StampAnnotation()
+{
+}
+
+void StampAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const StampAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [stamp] element
+ QDomElement stampElement = document.createElement( "stamp" );
+ node.appendChild( stampElement );
+
+ // append the optional attributes
+ if ( d->stampIconName != "Draft" )
+ stampElement.setAttribute( "icon", d->stampIconName );
+}
+
+Annotation::SubType StampAnnotation::subType() const
+{
+ return AStamp;
+}
+
+QString StampAnnotation::stampIconName() const
+{
+ Q_D( const StampAnnotation );
+ return d->stampIconName;
+}
+
+void StampAnnotation::setStampIconName( const QString &name )
+{
+ Q_D( StampAnnotation );
+ d->stampIconName = name;
+}
+
+/** InkAnnotation [Annotation] */
+class InkAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ InkAnnotationPrivate();
+
+ // data fields
+ QList< QLinkedList<QPointF> > inkPaths;
+};
+
+InkAnnotationPrivate::InkAnnotationPrivate()
+ : AnnotationPrivate()
+{
+}
+
+InkAnnotation::InkAnnotation()
+ : Annotation( *new InkAnnotationPrivate() )
+{}
+
+InkAnnotation::InkAnnotation( const QDomNode & node )
+ : Annotation( *new InkAnnotationPrivate(), node )
+{
+ Q_D( InkAnnotation );
+
+ // loop through the whole children looking for a 'ink' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "ink" )
+ continue;
+
+ // parse the 'path' subnodes
+ QDomNode pathNode = e.firstChild();
+ while ( pathNode.isElement() )
+ {
+ QDomElement pathElement = pathNode.toElement();
+ pathNode = pathNode.nextSibling();
+
+ if ( pathElement.tagName() != "path" )
+ continue;
+
+ // build each path parsing 'point' subnodes
+ QLinkedList<QPointF> path;
+ QDomNode pointNode = pathElement.firstChild();
+ while ( pointNode.isElement() )
+ {
+ QDomElement pointElement = pointNode.toElement();
+ pointNode = pointNode.nextSibling();
+
+ if ( pointElement.tagName() != "point" )
+ continue;
+
+ QPointF p(pointElement.attribute( "x", "0.0" ).toDouble(), pointElement.attribute( "y", "0.0" ).toDouble());
+ path.append( p );
+ }
+
+ // add the path to the path list if it contains at least 2 nodes
+ if ( path.count() >= 2 )
+ d->inkPaths.append( path );
+ }
+
+ // loading complete
+ break;
+ }
+}
+
+InkAnnotation::~InkAnnotation()
+{
+}
+
+void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const InkAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [ink] element
+ QDomElement inkElement = document.createElement( "ink" );
+ node.appendChild( inkElement );
+
+ // append the optional attributes
+ if ( d->inkPaths.count() < 1 )
+ return;
+ QList< QLinkedList<QPointF> >::const_iterator pIt = d->inkPaths.begin(), pEnd = d->inkPaths.end();
+ for ( ; pIt != pEnd; ++pIt )
+ {
+ QDomElement pathElement = document.createElement( "path" );
+ inkElement.appendChild( pathElement );
+ const QLinkedList<QPointF> & path = *pIt;
+ QLinkedList<QPointF>::const_iterator iIt = path.begin(), iEnd = path.end();
+ for ( ; iIt != iEnd; ++iIt )
+ {
+ const QPointF & point = *iIt;
+ QDomElement pointElement = document.createElement( "point" );
+ pathElement.appendChild( pointElement );
+ pointElement.setAttribute( "x", QString::number( point.x() ) );
+ pointElement.setAttribute( "y", QString::number( point.y() ) );
+ }
+ }
+}
+
+Annotation::SubType InkAnnotation::subType() const
+{
+ return AInk;
+}
+
+QList< QLinkedList<QPointF> > InkAnnotation::inkPaths() const
+{
+ Q_D( const InkAnnotation );
+ return d->inkPaths;
+}
+
+void InkAnnotation::setInkPaths( const QList< QLinkedList<QPointF> > &paths )
+{
+ Q_D( InkAnnotation );
+ d->inkPaths = paths;
+}
+
+
+/** LinkAnnotation [Annotation] */
+class LinkAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ LinkAnnotationPrivate();
+ ~LinkAnnotationPrivate();
+
+ // data fields
+ Link * linkDestination;
+ LinkAnnotation::HighlightMode linkHLMode;
+ QPointF linkRegion[4];
+};
+
+LinkAnnotationPrivate::LinkAnnotationPrivate()
+ : AnnotationPrivate(), linkDestination( 0 ), linkHLMode( LinkAnnotation::Invert )
+{
+}
+
+LinkAnnotationPrivate::~LinkAnnotationPrivate()
+{
+ delete linkDestination;
+}
+
+LinkAnnotation::LinkAnnotation()
+ : Annotation( *new LinkAnnotationPrivate() )
+{}
+
+LinkAnnotation::LinkAnnotation( const QDomNode & node )
+ : Annotation( *new LinkAnnotationPrivate(), node )
+{
+ Q_D( LinkAnnotation );
+
+ // loop through the whole children looking for a 'link' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "link" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "hlmode" ) )
+ d->linkHLMode = (LinkAnnotation::HighlightMode)e.attribute( "hlmode" ).toInt();
+
+ // parse all 'quad' subnodes
+ QDomNode quadNode = e.firstChild();
+ for ( ; quadNode.isElement(); quadNode = quadNode.nextSibling() )
+ {
+ QDomElement qe = quadNode.toElement();
+ if ( qe.tagName() == "quad" )
+ {
+ d->linkRegion[0].setX(qe.attribute( "ax", "0.0" ).toDouble());
+ d->linkRegion[0].setY(qe.attribute( "ay", "0.0" ).toDouble());
+ d->linkRegion[1].setX(qe.attribute( "bx", "0.0" ).toDouble());
+ d->linkRegion[1].setY(qe.attribute( "by", "0.0" ).toDouble());
+ d->linkRegion[2].setX(qe.attribute( "cx", "0.0" ).toDouble());
+ d->linkRegion[2].setY(qe.attribute( "cy", "0.0" ).toDouble());
+ d->linkRegion[3].setX(qe.attribute( "dx", "0.0" ).toDouble());
+ d->linkRegion[3].setY(qe.attribute( "dy", "0.0" ).toDouble());
+ }
+ else if ( qe.tagName() == "link" )
+ {
+ QString type = qe.attribute( "type" );
+ if ( type == "GoTo" )
+ {
+ Poppler::LinkGoto * go = new Poppler::LinkGoto( QRect(), qe.attribute( "filename" ), LinkDestination( qe.attribute( "destination" ) ) );
+ d->linkDestination = go;
+ }
+ else if ( type == "Exec" )
+ {
+ Poppler::LinkExecute * exec = new Poppler::LinkExecute( QRect(), qe.attribute( "filename" ), qe.attribute( "parameters" ) );
+ d->linkDestination = exec;
+ }
+ else if ( type == "Browse" )
+ {
+ Poppler::LinkBrowse * browse = new Poppler::LinkBrowse( QRect(), qe.attribute( "url" ) );
+ d->linkDestination = browse;
+ }
+ else if ( type == "Action" )
+ {
+ Poppler::LinkAction::ActionType act;
+ QString actString = qe.attribute( "action" );
+ bool found = true;
+ if ( actString == "PageFirst" )
+ act = Poppler::LinkAction::PageFirst;
+ else if ( actString == "PagePrev" )
+ act = Poppler::LinkAction::PagePrev;
+ else if ( actString == "PageNext" )
+ act = Poppler::LinkAction::PageNext;
+ else if ( actString == "PageLast" )
+ act = Poppler::LinkAction::PageLast;
+ else if ( actString == "HistoryBack" )
+ act = Poppler::LinkAction::HistoryBack;
+ else if ( actString == "HistoryForward" )
+ act = Poppler::LinkAction::HistoryForward;
+ else if ( actString == "Quit" )
+ act = Poppler::LinkAction::Quit;
+ else if ( actString == "Presentation" )
+ act = Poppler::LinkAction::Presentation;
+ else if ( actString == "EndPresentation" )
+ act = Poppler::LinkAction::EndPresentation;
+ else if ( actString == "Find" )
+ act = Poppler::LinkAction::Find;
+ else if ( actString == "GoToPage" )
+ act = Poppler::LinkAction::GoToPage;
+ else if ( actString == "Close" )
+ act = Poppler::LinkAction::Close;
+ else
+ found = false;
+ if (found)
+ {
+ Poppler::LinkAction * action = new Poppler::LinkAction( QRect(), act );
+ d->linkDestination = action;
+ }
+ }
+#if 0
+ else if ( type == "Movie" )
+ {
+ Poppler::LinkMovie * movie = new Poppler::LinkMovie( QRect() );
+ d->linkDestination = movie;
+ }
+#endif
+ }
+ }
+
+ // loading complete
+ break;
+ }
+}
+
+LinkAnnotation::~LinkAnnotation()
+{
+}
+
+void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const LinkAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [hl] element
+ QDomElement linkElement = document.createElement( "link" );
+ node.appendChild( linkElement );
+
+ // append the optional attributes
+ if ( d->linkHLMode != Invert )
+ linkElement.setAttribute( "hlmode", (int)d->linkHLMode );
+
+ // saving region
+ QDomElement quadElement = document.createElement( "quad" );
+ linkElement.appendChild( quadElement );
+ quadElement.setAttribute( "ax", QString::number( d->linkRegion[0].x() ) );
+ quadElement.setAttribute( "ay", QString::number( d->linkRegion[0].y() ) );
+ quadElement.setAttribute( "bx", QString::number( d->linkRegion[1].x() ) );
+ quadElement.setAttribute( "by", QString::number( d->linkRegion[1].y() ) );
+ quadElement.setAttribute( "cx", QString::number( d->linkRegion[2].x() ) );
+ quadElement.setAttribute( "cy", QString::number( d->linkRegion[2].y() ) );
+ quadElement.setAttribute( "dx", QString::number( d->linkRegion[3].x() ) );
+ quadElement.setAttribute( "dy", QString::number( d->linkRegion[3].y() ) );
+
+ // saving link
+ QDomElement hyperlinkElement = document.createElement( "link" );
+ linkElement.appendChild( hyperlinkElement );
+ if ( d->linkDestination )
+ {
+ switch( d->linkDestination->linkType() )
+ {
+ case Poppler::Link::Goto:
+ {
+ Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( d->linkDestination );
+ hyperlinkElement.setAttribute( "type", "GoTo" );
+ hyperlinkElement.setAttribute( "filename", go->fileName() );
+ hyperlinkElement.setAttribute( "destionation", go->destination().toString() );
+ break;
+ }
+ case Poppler::Link::Execute:
+ {
+ Poppler::LinkExecute * exec = static_cast< Poppler::LinkExecute * >( d->linkDestination );
+ hyperlinkElement.setAttribute( "type", "Exec" );
+ hyperlinkElement.setAttribute( "filename", exec->fileName() );
+ hyperlinkElement.setAttribute( "parameters", exec->parameters() );
+ break;
+ }
+ case Poppler::Link::Browse:
+ {
+ Poppler::LinkBrowse * browse = static_cast< Poppler::LinkBrowse * >( d->linkDestination );
+ hyperlinkElement.setAttribute( "type", "Browse" );
+ hyperlinkElement.setAttribute( "url", browse->url() );
+ break;
+ }
+ case Poppler::Link::Action:
+ {
+ Poppler::LinkAction * action = static_cast< Poppler::LinkAction * >( d->linkDestination );
+ hyperlinkElement.setAttribute( "type", "Action" );
+ switch ( action->actionType() )
+ {
+ case Poppler::LinkAction::PageFirst:
+ hyperlinkElement.setAttribute( "action", "PageFirst" );
+ break;
+ case Poppler::LinkAction::PagePrev:
+ hyperlinkElement.setAttribute( "action", "PagePrev" );
+ break;
+ case Poppler::LinkAction::PageNext:
+ hyperlinkElement.setAttribute( "action", "PageNext" );
+ break;
+ case Poppler::LinkAction::PageLast:
+ hyperlinkElement.setAttribute( "action", "PageLast" );
+ break;
+ case Poppler::LinkAction::HistoryBack:
+ hyperlinkElement.setAttribute( "action", "HistoryBack" );
+ break;
+ case Poppler::LinkAction::HistoryForward:
+ hyperlinkElement.setAttribute( "action", "HistoryForward" );
+ break;
+ case Poppler::LinkAction::Quit:
+ hyperlinkElement.setAttribute( "action", "Quit" );
+ break;
+ case Poppler::LinkAction::Presentation:
+ hyperlinkElement.setAttribute( "action", "Presentation" );
+ break;
+ case Poppler::LinkAction::EndPresentation:
+ hyperlinkElement.setAttribute( "action", "EndPresentation" );
+ break;
+ case Poppler::LinkAction::Find:
+ hyperlinkElement.setAttribute( "action", "Find" );
+ break;
+ case Poppler::LinkAction::GoToPage:
+ hyperlinkElement.setAttribute( "action", "GoToPage" );
+ break;
+ case Poppler::LinkAction::Close:
+ hyperlinkElement.setAttribute( "action", "Close" );
+ break;
+ }
+ break;
+ }
+ case Poppler::Link::Movie:
+ {
+ hyperlinkElement.setAttribute( "type", "Movie" );
+ break;
+ }
+ case Poppler::Link::Sound:
+ {
+ // FIXME: implement me
+ break;
+ }
+ case Poppler::Link::None:
+ break;
+ }
+ }
+}
+
+Annotation::SubType LinkAnnotation::subType() const
+{
+ return ALink;
+}
+
+Link* LinkAnnotation::linkDestionation() const
+{
+ Q_D( const LinkAnnotation );
+ return d->linkDestination;
+}
+
+void LinkAnnotation::setLinkDestination( Link *link )
+{
+ Q_D( LinkAnnotation );
+ delete d->linkDestination;
+ d->linkDestination = link;
+}
+
+LinkAnnotation::HighlightMode LinkAnnotation::linkHighlightMode() const
+{
+ Q_D( const LinkAnnotation );
+ return d->linkHLMode;
+}
+
+void LinkAnnotation::setLinkHighlightMode( LinkAnnotation::HighlightMode mode )
+{
+ Q_D( LinkAnnotation );
+ d->linkHLMode = mode;
+}
+
+QPointF LinkAnnotation::linkRegionPoint( int id ) const
+{
+ if ( id < 0 || id >= 4 )
+ return QPointF();
+
+ Q_D( const LinkAnnotation );
+ return d->linkRegion[id];
+}
+
+void LinkAnnotation::setLinkRegionPoint( int id, const QPointF &point )
+{
+ if ( id < 0 || id >= 4 )
+ return;
+
+ Q_D( LinkAnnotation );
+ d->linkRegion[id] = point;
+}
+
+/** CaretAnnotation [Annotation] */
+class CaretAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ CaretAnnotationPrivate();
+
+ // data fields
+ CaretAnnotation::CaretSymbol symbol;
+};
+
+static QString caretSymbolToString( CaretAnnotation::CaretSymbol symbol )
+{
+ switch ( symbol )
+ {
+ case CaretAnnotation::None:
+ return QString::fromLatin1( "None" );
+ case CaretAnnotation::P:
+ return QString::fromLatin1( "P" );
+ }
+ return QString();
+}
+
+static CaretAnnotation::CaretSymbol caretSymbolFromString( const QString &symbol )
+{
+ if ( symbol == QLatin1String( "None" ) )
+ return CaretAnnotation::None;
+ else if ( symbol == QLatin1String( "P" ) )
+ return CaretAnnotation::P;
+ return CaretAnnotation::None;
+}
+
+CaretAnnotationPrivate::CaretAnnotationPrivate()
+ : AnnotationPrivate(), symbol( CaretAnnotation::None )
+{
+}
+
+CaretAnnotation::CaretAnnotation()
+ : Annotation( *new CaretAnnotationPrivate() )
+{
+}
+
+CaretAnnotation::CaretAnnotation( const QDomNode & node )
+ : Annotation( *new CaretAnnotationPrivate(), node )
+{
+ Q_D( CaretAnnotation );
+
+ // loop through the whole children looking for a 'caret' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "caret" )
+ continue;
+
+ // parse the attributes
+ if ( e.hasAttribute( "symbol" ) )
+ d->symbol = caretSymbolFromString( e.attribute( "symbol" ) );
+
+ // loading complete
+ break;
+ }
+}
+
+CaretAnnotation::~CaretAnnotation()
+{
+}
+
+void CaretAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ Q_D( const CaretAnnotation );
+
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [caret] element
+ QDomElement caretElement = document.createElement( "caret" );
+ node.appendChild( caretElement );
+
+ // append the optional attributes
+ if ( d->symbol != CaretAnnotation::None )
+ caretElement.setAttribute( "symbol", caretSymbolToString( d->symbol ) );
+}
+
+Annotation::SubType CaretAnnotation::subType() const
+{
+ return ACaret;
+}
+
+CaretAnnotation::CaretSymbol CaretAnnotation::caretSymbol() const
+{
+ Q_D( const CaretAnnotation );
+ return d->symbol;
+}
+
+void CaretAnnotation::setCaretSymbol( CaretAnnotation::CaretSymbol symbol )
+{
+ Q_D( CaretAnnotation );
+ d->symbol = symbol;
+}
+
+/** FileAttachmentAnnotation [Annotation] */
+class FileAttachmentAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ FileAttachmentAnnotationPrivate();
+ ~FileAttachmentAnnotationPrivate();
+
+ // data fields
+ QString icon;
+ EmbeddedFile *embfile;
+};
+
+FileAttachmentAnnotationPrivate::FileAttachmentAnnotationPrivate()
+ : AnnotationPrivate(), icon( "PushPin" ), embfile( 0 )
+{
+}
+
+FileAttachmentAnnotationPrivate::~FileAttachmentAnnotationPrivate()
+{
+ delete embfile;
+}
+
+FileAttachmentAnnotation::FileAttachmentAnnotation()
+ : Annotation( *new FileAttachmentAnnotationPrivate() )
+{
+}
+
+FileAttachmentAnnotation::FileAttachmentAnnotation( const QDomNode & node )
+ : Annotation( *new FileAttachmentAnnotationPrivate(), node )
+{
+ // loop through the whole children looking for a 'fileattachment' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "fileattachment" )
+ continue;
+
+ // loading complete
+ break;
+ }
+}
+
+FileAttachmentAnnotation::~FileAttachmentAnnotation()
+{
+}
+
+void FileAttachmentAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [fileattachment] element
+ QDomElement fileAttachmentElement = document.createElement( "fileattachment" );
+ node.appendChild( fileAttachmentElement );
+}
+
+Annotation::SubType FileAttachmentAnnotation::subType() const
+{
+ return AFileAttachment;
+}
+
+QString FileAttachmentAnnotation::fileIconName() const
+{
+ Q_D( const FileAttachmentAnnotation );
+ return d->icon;
+}
+
+void FileAttachmentAnnotation::setFileIconName( const QString &icon )
+{
+ Q_D( FileAttachmentAnnotation );
+ d->icon = icon;
+}
+
+EmbeddedFile* FileAttachmentAnnotation::embeddedFile() const
+{
+ Q_D( const FileAttachmentAnnotation );
+ return d->embfile;
+}
+
+void FileAttachmentAnnotation::setEmbeddedFile( EmbeddedFile *ef )
+{
+ Q_D( FileAttachmentAnnotation );
+ d->embfile = ef;
+}
+
+/** SoundAnnotation [Annotation] */
+class SoundAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ SoundAnnotationPrivate();
+ ~SoundAnnotationPrivate();
+
+ // data fields
+ QString icon;
+ SoundObject *sound;
+};
+
+SoundAnnotationPrivate::SoundAnnotationPrivate()
+ : AnnotationPrivate(), icon( "Speaker" ), sound( 0 )
+{
+}
+
+SoundAnnotationPrivate::~SoundAnnotationPrivate()
+{
+ delete sound;
+}
+
+SoundAnnotation::SoundAnnotation()
+ : Annotation( *new SoundAnnotationPrivate() )
+{
+}
+
+SoundAnnotation::SoundAnnotation( const QDomNode & node )
+ : Annotation( *new SoundAnnotationPrivate(), node )
+{
+ // loop through the whole children looking for a 'sound' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "sound" )
+ continue;
+
+ // loading complete
+ break;
+ }
+}
+
+SoundAnnotation::~SoundAnnotation()
+{
+}
+
+void SoundAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [sound] element
+ QDomElement soundElement = document.createElement( "sound" );
+ node.appendChild( soundElement );
+}
+
+Annotation::SubType SoundAnnotation::subType() const
+{
+ return ASound;
+}
+
+QString SoundAnnotation::soundIconName() const
+{
+ Q_D( const SoundAnnotation );
+ return d->icon;
+}
+
+void SoundAnnotation::setSoundIconName( const QString &icon )
+{
+ Q_D( SoundAnnotation );
+ d->icon = icon;
+}
+
+SoundObject* SoundAnnotation::sound() const
+{
+ Q_D( const SoundAnnotation );
+ return d->sound;
+}
+
+void SoundAnnotation::setSound( SoundObject *s )
+{
+ Q_D( SoundAnnotation );
+ d->sound = s;
+}
+
+/** MovieAnnotation [Annotation] */
+class MovieAnnotationPrivate : public AnnotationPrivate
+{
+ public:
+ MovieAnnotationPrivate();
+ ~MovieAnnotationPrivate();
+
+ // data fields
+ MovieObject *movie;
+ QString title;
+};
+
+MovieAnnotationPrivate::MovieAnnotationPrivate()
+ : AnnotationPrivate(), movie( 0 )
+{
+}
+
+MovieAnnotationPrivate::~MovieAnnotationPrivate()
+{
+ delete movie;
+}
+
+MovieAnnotation::MovieAnnotation()
+ : Annotation( *new MovieAnnotationPrivate() )
+{
+}
+
+MovieAnnotation::MovieAnnotation( const QDomNode & node )
+ : Annotation( *new MovieAnnotationPrivate(), node )
+{
+ // loop through the whole children looking for a 'movie' element
+ QDomNode subNode = node.firstChild();
+ while( subNode.isElement() )
+ {
+ QDomElement e = subNode.toElement();
+ subNode = subNode.nextSibling();
+ if ( e.tagName() != "movie" )
+ continue;
+
+ // loading complete
+ break;
+ }
+}
+
+MovieAnnotation::~MovieAnnotation()
+{
+}
+
+void MovieAnnotation::store( QDomNode & node, QDomDocument & document ) const
+{
+ // recurse to parent objects storing properties
+ Annotation::store( node, document );
+
+ // create [movie] element
+ QDomElement movieElement = document.createElement( "movie" );
+ node.appendChild( movieElement );
+}
+
+Annotation::SubType MovieAnnotation::subType() const
+{
+ return AMovie;
+}
+
+MovieObject* MovieAnnotation::movie() const
+{
+ Q_D( const MovieAnnotation );
+ return d->movie;
+}
+
+void MovieAnnotation::setMovie( MovieObject *movie )
+{
+ Q_D( MovieAnnotation );
+ d->movie = movie;
+}
+
+QString MovieAnnotation::movieTitle() const
+{
+ Q_D( const MovieAnnotation );
+ return d->title;
+}
+
+void MovieAnnotation::setMovieTitle( const QString &title )
+{
+ Q_D( MovieAnnotation );
+ d->title = title;
+}
+
+//BEGIN utility annotation functions
+QColor convertAnnotColor( AnnotColor *color )
+{
+ if ( !color )
+ return QColor();
+
+ QColor newcolor;
+ double *color_data = color->getValues();
+ switch ( color->getSpace() )
+ {
+ case AnnotColor::colorTransparent: // = 0,
+ newcolor = Qt::transparent;
+ break;
+ case AnnotColor::colorGray: // = 1,
+ newcolor.setRgbF( color_data[0], color_data[0], color_data[0] );
+ break;
+ case AnnotColor::colorRGB: // = 3,
+ newcolor.setRgbF( color_data[0], color_data[1], color_data[2] );
+ break;
+ case AnnotColor::colorCMYK: // = 4
+ newcolor.setCmykF( color_data[0], color_data[1], color_data[2], color_data[3] );
+ break;
+ }
+ return newcolor;
+}
+//END utility annotation functions
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.h
new file mode 100644
index 00000000000..ab54c6f44ed
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-annotation.h
@@ -0,0 +1,685 @@
+/* poppler-annotation.h: qt interface to poppler
+ * Copyright (C) 2006-2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
+ * Copyright (C) 2007, Brad Hards <bradh@frogmouth.net>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_ANNOTATION_H_
+#define _POPPLER_ANNOTATION_H_
+
+#include <QtCore/QDateTime>
+#include <QtCore/QLinkedList>
+#include <QtCore/QList>
+#include <QtCore/QPointF>
+#include <QtCore/QRectF>
+#include <QtGui/QColor>
+#include <QtGui/QFont>
+#include <QtXml/QDomDocument>
+#include "poppler-export.h"
+
+namespace Poppler {
+
+class Annotation;
+class AnnotationPrivate;
+class TextAnnotationPrivate;
+class LineAnnotationPrivate;
+class GeomAnnotationPrivate;
+class HighlightAnnotationPrivate;
+class StampAnnotationPrivate;
+class InkAnnotationPrivate;
+class LinkAnnotationPrivate;
+class CaretAnnotationPrivate;
+class FileAttachmentAnnotationPrivate;
+class SoundAnnotationPrivate;
+class MovieAnnotationPrivate;
+class EmbeddedFile;
+class Link;
+class SoundObject;
+class MovieObject;
+
+/**
+ * \short Helper class for (recursive) Annotation retrieval/storage.
+ *
+ */
+class POPPLER_QT4_EXPORT AnnotationUtils
+{
+ public:
+ /**
+ * Restore an Annotation (with revisions if needed) from the DOM
+ * element \p annElement.
+ * \returns a pointer to the complete Annotation or 0 if element is
+ * invalid.
+ */
+ static Annotation * createAnnotation( const QDomElement & annElement );
+
+ /**
+ * Save the Annotation \p ann as a child of \p annElement taking
+ * care of saving all revisions if \p ann has any.
+ */
+ static void storeAnnotation( const Annotation * ann,
+ QDomElement & annElement, QDomDocument & document );
+
+ /**
+ * Returns an element called \p name from the direct children of
+ * \p parentNode or a null element if not found.
+ */
+ static QDomElement findChildElement( const QDomNode & parentNode,
+ const QString & name );
+};
+
+
+/**
+ * \short Annotation class holding properties shared by all annotations.
+ *
+ * An Annotation is an object (text note, highlight, sound, popup window, ..)
+ * contained by a Page in the document.
+ */
+class POPPLER_QT4_EXPORT Annotation
+{
+ public:
+ // enum definitions
+ // WARNING!!! oKular uses that very same values so if you change them notify the author!
+ enum SubType { AText = 1, ALine = 2, AGeom = 3, AHighlight = 4, AStamp = 5,
+ AInk = 6, ALink = 7, ACaret = 8, AFileAttachment = 9, ASound = 10,
+ AMovie = 11, A_BASE = 0 };
+ enum Flag { Hidden = 1, FixedSize = 2, FixedRotation = 4, DenyPrint = 8,
+ DenyWrite = 16, DenyDelete = 32, ToggleHidingOnMouse = 64, External = 128 };
+ enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 };
+ enum LineEffect { NoEffect = 1, Cloudy = 2};
+ enum RevScope { Reply = 1, Group = 2, Delete = 4 };
+ enum RevType { None = 1, Marked = 2, Unmarked = 4, Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 };
+
+ /**
+ * Returns the author of the annotation.
+ */
+ QString author() const;
+ /**
+ * Sets a new author for the annotation.
+ */
+ void setAuthor( const QString &author );
+
+ QString contents() const;
+ void setContents( const QString &contents );
+
+ /**
+ * Returns the unique name (ID) of the annotation.
+ */
+ QString uniqueName() const;
+ /**
+ * Sets a new unique name for the annotation.
+ *
+ * \note no check of the new uniqueName is done
+ */
+ void setUniqueName( const QString &uniqueName );
+
+ QDateTime modificationDate() const;
+ void setModificationDate( const QDateTime &date );
+
+ QDateTime creationDate() const;
+ void setCreationDate( const QDateTime &date );
+
+ int flags() const;
+ void setFlags( int flags );
+
+ QRectF boundary() const;
+ void setBoundary( const QRectF &boundary );
+
+ struct Style
+ {
+ // appearance properties
+ QColor color; // black
+ double opacity; // 1.0
+ // pen properties
+ double width; // 1.0
+ LineStyle style; // LineStyle::Solid
+ double xCorners; // 0.0
+ double yCorners; // 0.0
+ int marks; // 3
+ int spaces; // 0
+ // pen effects
+ LineEffect effect; // LineEffect::NoEffect
+ double effectIntensity; // 1.0
+ // default initializer
+ Style();
+ } style;
+
+ /* properties: popup window */
+ struct Window
+ {
+ // window state (Hidden, FixedRotation, Deny* flags allowed)
+ int flags; // -1 (never initialized) -> 0 (if inited and shown)
+ // geometric properties
+ QPointF topLeft; // no default, inited to boundary.topLeft
+ int width; // no default
+ int height; // no default
+ // window contens/override properties
+ QString title; // '' text in the titlebar (overrides author)
+ QString summary; // '' short description (displayed if not empty)
+ QString text; // '' text for the window (overrides annot->contents)
+ // default initializer
+ Window();
+ } window;
+
+ /* properties: versioning */
+ struct Revision
+ {
+ // child revision
+ Annotation * annotation; // not null
+ // scope and type of revision
+ RevScope scope; // Reply
+ RevType type; // None
+ // default initializer
+ Revision();
+ };
+
+ QLinkedList< Revision >& revisions();
+ const QLinkedList< Revision >& revisions() const;
+
+ // methods: query annotation's type for runtime type identification
+ /**
+ * The type of the annotation.
+ */
+ virtual SubType subType() const = 0;
+
+ /**
+ * Save this annotation as a child of \p parentNode.
+ */
+ virtual void store( QDomNode & parentNode, QDomDocument & document ) const;
+
+ /**
+ * Destructor.
+ */
+ virtual ~Annotation();
+
+ protected:
+ /// \cond PRIVATE
+ Annotation( AnnotationPrivate &dd );
+ Annotation( AnnotationPrivate &dd, const QDomNode &description );
+ Q_DECLARE_PRIVATE( Annotation )
+ AnnotationPrivate *d_ptr;
+ /// \endcond
+
+ private:
+ Q_DISABLE_COPY( Annotation )
+};
+
+/**
+ * \short Annotation containing text.
+ *
+ * A text annotation is an object showing some text directly on the page, or
+ * linked to the contents using an icon shown on a page.
+ */
+class POPPLER_QT4_EXPORT TextAnnotation : public Annotation
+{
+ public:
+ TextAnnotation();
+ TextAnnotation( const QDomNode &node );
+ virtual ~TextAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ // local enums
+ enum TextType { Linked, InPlace };
+ enum InplaceIntent { Unknown, Callout, TypeWriter };
+
+ /**
+ The type of text annotation represented by this object
+ */
+ TextType textType() const;
+
+ /**
+ Set the type of text annotation represented by this object
+ */
+ void setTextType( TextType type );
+
+ /**
+ The name of the icon for this text annotation.
+
+ Standard names for text annotation icons are:
+ - Comment
+ - Help
+ - Insert
+ - Key
+ - NewParagraph
+ - Note (this is the default icon to use)
+ - Paragraph
+ */
+ QString textIcon() const;
+
+ /**
+ Set the name of the icon to use for this text annotation.
+
+ \sa textIcon for the list of standard names
+ */
+ void setTextIcon( const QString &icon );
+
+ QFont textFont() const;
+ void setTextFont( const QFont &font );
+
+ int inplaceAlign() const;
+ void setInplaceAlign( int align );
+
+ QString inplaceText() const;
+ void setInplaceText( const QString &text );
+
+ QPointF calloutPoint( int id ) const;
+ void setCalloutPoint( int id, const QPointF &point );
+
+ InplaceIntent inplaceIntent() const;
+ void setInplaceIntent( InplaceIntent intent );
+
+ private:
+ Q_DECLARE_PRIVATE( TextAnnotation )
+ Q_DISABLE_COPY( TextAnnotation )
+};
+
+/**
+ * \short Polygon/polyline annotation.
+ *
+ * This annotation represents a polygon (or polyline) to be drawn on a page.
+ */
+class POPPLER_QT4_EXPORT LineAnnotation : public Annotation
+{
+ public:
+ LineAnnotation();
+ LineAnnotation( const QDomNode &node );
+ virtual ~LineAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ // local enums
+ enum TermStyle { Square, Circle, Diamond, OpenArrow, ClosedArrow, None,
+ Butt, ROpenArrow, RClosedArrow, Slash };
+ enum LineIntent { Unknown, Arrow, Dimension, PolygonCloud };
+
+ QLinkedList<QPointF> linePoints() const;
+ void setLinePoints( const QLinkedList<QPointF> &points );
+
+ TermStyle lineStartStyle() const;
+ void setLineStartStyle( TermStyle style );
+
+ TermStyle lineEndStyle() const;
+ void setLineEndStyle( TermStyle style );
+
+ bool isLineClosed() const;
+ void setLineClosed( bool closed );
+
+ QColor lineInnerColor() const;
+ void setLineInnerColor( const QColor &color );
+
+ double lineLeadingForwardPoint() const;
+ void setLineLeadingForwardPoint( double point );
+
+ double lineLeadingBackPoint() const;
+ void setLineLeadingBackPoint( double point );
+
+ bool lineShowCaption() const;
+ void setLineShowCaption( bool show );
+
+ LineIntent lineIntent() const;
+ void setLineIntent( LineIntent intent );
+
+ private:
+ Q_DECLARE_PRIVATE( LineAnnotation )
+ Q_DISABLE_COPY( LineAnnotation )
+};
+
+/**
+ * \short Geometric annotation.
+ *
+ * The geometric annotation represents a geometric figure, like a rectangle or
+ * an ellipse.
+ */
+class POPPLER_QT4_EXPORT GeomAnnotation : public Annotation
+{
+ public:
+ GeomAnnotation();
+ GeomAnnotation( const QDomNode &node );
+ virtual ~GeomAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ // common enums
+ enum GeomType { InscribedSquare, InscribedCircle };
+
+ GeomType geomType() const;
+ void setGeomType( GeomType style );
+
+ QColor geomInnerColor() const;
+ void setGeomInnerColor( const QColor &color );
+
+ int geomPointWidth() const;
+ void setGeomPointWidth( int width );
+
+ private:
+ Q_DECLARE_PRIVATE( GeomAnnotation )
+ Q_DISABLE_COPY( GeomAnnotation )
+};
+
+/**
+ * \short Text highlight annotation.
+ *
+ * The higlight annotation represents some areas of text being "highlighted".
+ */
+class POPPLER_QT4_EXPORT HighlightAnnotation : public Annotation
+{
+ public:
+ HighlightAnnotation();
+ HighlightAnnotation( const QDomNode &node );
+ virtual ~HighlightAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ The type of highlight
+ */
+ enum HighlightType { Highlight, ///< highlighter pen style annotation
+ Squiggly, ///< jagged or squiggly underline
+ Underline, ///< straight line underline
+ StrikeOut ///< straight line through-line
+ };
+
+ /**
+ Structure corresponding to a QuadPoints array. This matches a
+ quadrilateral that describes the area around a word (or set of
+ words) that are to be highlighted.
+ */
+ struct Quad
+ {
+ QPointF points[4]; // 8 valid coords
+ bool capStart; // false (vtx 1-4) [K]
+ bool capEnd; // false (vtx 2-3) [K]
+ double feather; // 0.1 (in range 0..1) [K]
+ };
+
+ /**
+ The type (style) of highlighting to use for this area
+ or these areas.
+ */
+ HighlightType highlightType() const;
+
+ /**
+ Set the type of highlighting to use for the given area
+ or areas.
+ */
+ void setHighlightType( HighlightType type );
+
+ /**
+ The list of areas to highlight.
+ */
+ QList< Quad > highlightQuads() const;
+
+ /**
+ Set the areas to highlight.
+ */
+ void setHighlightQuads( const QList< Quad > &quads );
+
+ private:
+ Q_DECLARE_PRIVATE( HighlightAnnotation )
+ Q_DISABLE_COPY( HighlightAnnotation )
+};
+
+/**
+ * \short Stamp annotation.
+ *
+ * A simple annotation drawing a stamp on a page.
+ */
+class POPPLER_QT4_EXPORT StampAnnotation : public Annotation
+{
+ public:
+ StampAnnotation();
+ StampAnnotation( const QDomNode &node );
+ virtual ~StampAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ The name of the icon for this stamp annotation.
+
+ Standard names for stamp annotation icons are:
+ - Approved
+ - AsIs
+ - Confidential
+ - Departmental
+ - Draft (this is the default icon type)
+ - Experimental
+ - Expired
+ - Final
+ - ForComment
+ - ForPublicRelease
+ - NotApproved
+ - NotForPublicRelease
+ - Sold
+ - TopSecret
+ */
+ QString stampIconName() const;
+
+ /**
+ Set the icon type for this stamp annotation.
+
+ \sa stampIconName for the list of standard icon names
+ */
+ void setStampIconName( const QString &name );
+
+ private:
+ Q_DECLARE_PRIVATE( StampAnnotation )
+ Q_DISABLE_COPY( StampAnnotation )
+};
+
+/**
+ * \short Ink Annotation.
+ *
+ * Annotation representing an ink path on a page.
+ */
+class POPPLER_QT4_EXPORT InkAnnotation : public Annotation
+{
+ public:
+ InkAnnotation();
+ InkAnnotation( const QDomNode &node );
+ virtual ~InkAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ QList< QLinkedList<QPointF> > inkPaths() const;
+ void setInkPaths( const QList< QLinkedList<QPointF> > &paths );
+
+ private:
+ Q_DECLARE_PRIVATE( InkAnnotation )
+ Q_DISABLE_COPY( InkAnnotation )
+};
+
+class POPPLER_QT4_EXPORT LinkAnnotation : public Annotation
+{
+ public:
+ LinkAnnotation();
+ LinkAnnotation( const QDomNode &node );
+ virtual ~LinkAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ // local enums
+ enum HighlightMode { None, Invert, Outline, Push };
+
+ Link* linkDestionation() const;
+ void setLinkDestination( Link *link );
+
+ HighlightMode linkHighlightMode() const;
+ void setLinkHighlightMode( HighlightMode mode );
+
+ QPointF linkRegionPoint( int id ) const;
+ void setLinkRegionPoint( int id, const QPointF &point );
+
+ private:
+ Q_DECLARE_PRIVATE( LinkAnnotation )
+ Q_DISABLE_COPY( LinkAnnotation )
+};
+
+/**
+ * \short Caret annotation.
+ *
+ * The caret annotation represents a symbol to indicate the presence of text.
+ */
+class POPPLER_QT4_EXPORT CaretAnnotation : public Annotation
+{
+ public:
+ CaretAnnotation();
+ CaretAnnotation( const QDomNode &node );
+ virtual ~CaretAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ * The symbols for the caret annotation.
+ */
+ enum CaretSymbol { None, P };
+
+ CaretSymbol caretSymbol() const;
+ void setCaretSymbol( CaretSymbol symbol );
+
+ private:
+ Q_DECLARE_PRIVATE( CaretAnnotation )
+ Q_DISABLE_COPY( CaretAnnotation )
+};
+
+/**
+ * \short File attachment annotation.
+ *
+ * The file attachment annotation represents a file embedded in the document.
+ *
+ * \since 0.10
+ */
+class POPPLER_QT4_EXPORT FileAttachmentAnnotation : public Annotation
+{
+ public:
+ FileAttachmentAnnotation();
+ FileAttachmentAnnotation( const QDomNode &node );
+ virtual ~FileAttachmentAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ * Returns the name of the icon of this annotation.
+ */
+ QString fileIconName() const;
+ /**
+ * Sets a new name for the icon of this annotation.
+ */
+ void setFileIconName( const QString &icon );
+
+ /**
+ * Returns the EmbeddedFile of this annotation.
+ */
+ EmbeddedFile* embeddedFile() const;
+ /**
+ * Sets a new EmbeddedFile for this annotation.
+ *
+ * \note FileAttachmentAnnotation takes ownership of the object
+ */
+ void setEmbeddedFile( EmbeddedFile *ef );
+
+ private:
+ Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
+ Q_DISABLE_COPY( FileAttachmentAnnotation )
+};
+
+/**
+ * \short Sound annotation.
+ *
+ * The sound annotation represents a sound to be played when activated.
+ *
+ * \since 0.10
+ */
+class POPPLER_QT4_EXPORT SoundAnnotation : public Annotation
+{
+ public:
+ SoundAnnotation();
+ SoundAnnotation( const QDomNode &node );
+ virtual ~SoundAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ * Returns the name of the icon of this annotation.
+ */
+ QString soundIconName() const;
+ /**
+ * Sets a new name for the icon of this annotation.
+ */
+ void setSoundIconName( const QString &icon );
+
+ /**
+ * Returns the SoundObject of this annotation.
+ */
+ SoundObject* sound() const;
+ /**
+ * Sets a new SoundObject for this annotation.
+ *
+ * \note SoundAnnotation takes ownership of the object
+ */
+ void setSound( SoundObject *ef );
+
+ private:
+ Q_DECLARE_PRIVATE( SoundAnnotation )
+ Q_DISABLE_COPY( SoundAnnotation )
+};
+
+/**
+ * \short Movie annotation.
+ *
+ * The movie annotation represents a movie to be played when activated.
+ *
+ * \since 0.10
+ */
+class POPPLER_QT4_EXPORT MovieAnnotation : public Annotation
+{
+ public:
+ MovieAnnotation();
+ MovieAnnotation( const QDomNode &node );
+ virtual ~MovieAnnotation();
+ virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+ virtual SubType subType() const;
+
+ /**
+ * Returns the MovieObject of this annotation.
+ */
+ MovieObject* movie() const;
+ /**
+ * Sets a new MovieObject for this annotation.
+ *
+ * \note MovieAnnotation takes ownership of the object
+ */
+ void setMovie( MovieObject *movie );
+
+ /**
+ * Returns the title of the movie of this annotation.
+ */
+ QString movieTitle() const;
+ /**
+ * Sets a new title for the movie of this annotation.
+ */
+ void setMovieTitle( const QString &title );
+
+ private:
+ Q_DECLARE_PRIVATE( MovieAnnotation )
+ Q_DISABLE_COPY( MovieAnnotation )
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-base-converter.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-base-converter.cc
new file mode 100644
index 00000000000..11ff17cad71
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-base-converter.cc
@@ -0,0 +1,105 @@
+/* poppler-base-converter.cc: qt interface to poppler
+ * Copyright (C) 2007, 2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include "poppler-converter-private.h"
+
+#include <QtCore/QFile>
+
+namespace Poppler {
+
+BaseConverterPrivate::BaseConverterPrivate()
+ : document(0), iodev(0), ownIodev(true)
+{
+}
+
+BaseConverterPrivate::~BaseConverterPrivate()
+{
+}
+
+QIODevice* BaseConverterPrivate::openDevice()
+{
+ if (!iodev)
+ {
+ Q_ASSERT(!outputFileName.isEmpty());
+ QFile *f = new QFile(outputFileName);
+ iodev = f;
+ ownIodev = true;
+ }
+ Q_ASSERT(iodev);
+ if (!iodev->isOpen())
+ {
+ if (!iodev->open(QIODevice::WriteOnly))
+ {
+ if (ownIodev)
+ {
+ delete iodev;
+ iodev = 0;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ }
+ return iodev;
+}
+
+void BaseConverterPrivate::closeDevice()
+{
+ if (ownIodev)
+ {
+ iodev->close();
+ delete iodev;
+ iodev = 0;
+ }
+}
+
+
+BaseConverter::BaseConverter(BaseConverterPrivate &dd)
+ : d_ptr(&dd)
+{
+}
+
+BaseConverter::~BaseConverter()
+{
+ delete d_ptr;
+}
+
+void BaseConverter::setOutputFileName(const QString &outputFileName)
+{
+ Q_D(BaseConverter);
+ d->outputFileName = outputFileName;
+}
+
+void BaseConverter::setOutputDevice(QIODevice *device)
+{
+ Q_D(BaseConverter);
+ d->iodev = device;
+ d->ownIodev = false;
+}
+
+BaseConverter::Error BaseConverter::lastError() const
+{
+ Q_D(const BaseConverter);
+ return d->lastError;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-converter-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-converter-private.h
new file mode 100644
index 00000000000..dc3e94379a2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-converter-private.h
@@ -0,0 +1,49 @@
+/* poppler-converter-private.h: Qt4 interface to poppler
+ * Copyright (C) 2007, 2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef POPPLER_QT4_CONVERTER_PRIVATE_H
+#define POPPLER_QT4_CONVERTER_PRIVATE_H
+
+#include <QtCore/QString>
+
+class QIODevice;
+
+namespace Poppler {
+
+class DocumentData;
+
+class BaseConverterPrivate
+{
+ public:
+ BaseConverterPrivate();
+ virtual ~BaseConverterPrivate();
+
+ QIODevice* openDevice();
+ void closeDevice();
+
+ DocumentData *document;
+ QString outputFileName;
+ QIODevice *iodev;
+ bool ownIodev : 1;
+ BaseConverter::Error lastError;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-document.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-document.cc
new file mode 100644
index 00000000000..c2563f4026f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-document.cc
@@ -0,0 +1,619 @@
+/* poppler-document.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2005-2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006-2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include <config.h>
+#include <ErrorCodes.h>
+#include <GlobalParams.h>
+#include <Outline.h>
+#include <PDFDoc.h>
+#include <Stream.h>
+#include <Catalog.h>
+#include <DateInfo.h>
+#include <GfxState.h>
+
+#include <QtCore/QDebug>
+#include <QtCore/QFile>
+#include <QtCore/QByteArray>
+
+#include "poppler-private.h"
+
+#if defined(USE_CMS)
+#include <lcms.h>
+#endif
+
+namespace Poppler {
+
+ int DocumentData::count = 0;
+
+ Document *Document::load(const QString &filePath, const QByteArray &ownerPassword,
+ const QByteArray &userPassword)
+ {
+ DocumentData *doc = new DocumentData(new GooString(QFile::encodeName(filePath)),
+ new GooString(ownerPassword.data()),
+ new GooString(userPassword.data()));
+ return DocumentData::checkDocument(doc);
+ }
+
+ Document *Document::loadFromData(const QByteArray &fileContents,
+ const QByteArray &ownerPassword,
+ const QByteArray &userPassword)
+ {
+ // create stream
+ DocumentData *doc = new DocumentData(fileContents,
+ new GooString(ownerPassword.data()),
+ new GooString(userPassword.data()));
+ return DocumentData::checkDocument(doc);
+ }
+
+ Document *DocumentData::checkDocument(DocumentData *doc)
+ {
+ Document *pdoc;
+ if (doc->doc->isOk() || doc->doc->getErrorCode() == errEncrypted) {
+ pdoc = new Document(doc);
+ if (doc->doc->getErrorCode() == errEncrypted)
+ pdoc->m_doc->locked = true;
+ else
+ {
+ pdoc->m_doc->locked = false;
+ pdoc->m_doc->fillMembers();
+ }
+ return pdoc;
+ }
+ else
+ {
+ delete doc;
+ }
+ return NULL;
+ }
+
+ Document::Document(DocumentData *dataA)
+ {
+ m_doc = dataA;
+ }
+
+ Document::~Document()
+ {
+ delete m_doc;
+ }
+
+ Page *Document::page(int index) const
+ {
+ return new Page(m_doc, index);
+ }
+
+ bool Document::isLocked() const
+ {
+ return m_doc->locked;
+ }
+
+ bool Document::unlock(const QByteArray &ownerPassword,
+ const QByteArray &userPassword)
+ {
+ if (m_doc->locked) {
+ /* racier then it needs to be */
+ DocumentData *doc2;
+ if (!m_doc->fileContents.isEmpty())
+ {
+ doc2 = new DocumentData(m_doc->fileContents,
+ new GooString(ownerPassword.data()),
+ new GooString(userPassword.data()));
+ }
+ else
+ {
+ doc2 = new DocumentData(new GooString(m_doc->doc->getFileName()),
+ new GooString(ownerPassword.data()),
+ new GooString(userPassword.data()));
+ }
+ if (!doc2->doc->isOk()) {
+ delete doc2;
+ } else {
+ delete m_doc;
+ m_doc = doc2;
+ m_doc->locked = false;
+ m_doc->fillMembers();
+ }
+ }
+ return m_doc->locked;
+ }
+
+ Document::PageMode Document::pageMode() const
+ {
+ switch (m_doc->doc->getCatalog()->getPageMode()) {
+ case Catalog::pageModeNone:
+ return UseNone;
+ case Catalog::pageModeOutlines:
+ return UseOutlines;
+ case Catalog::pageModeThumbs:
+ return UseThumbs;
+ case Catalog::pageModeFullScreen:
+ return FullScreen;
+ case Catalog::pageModeOC:
+ return UseOC;
+ case Catalog::pageModeAttach:
+ return UseAttach;
+ default:
+ return UseNone;
+ }
+ }
+
+ Document::PageLayout Document::pageLayout() const
+ {
+ switch (m_doc->doc->getCatalog()->getPageLayout()) {
+ case Catalog::pageLayoutNone:
+ return NoLayout;
+ case Catalog::pageLayoutSinglePage:
+ return SinglePage;
+ case Catalog::pageLayoutOneColumn:
+ return OneColumn;
+ case Catalog::pageLayoutTwoColumnLeft:
+ return TwoColumnLeft;
+ case Catalog::pageLayoutTwoColumnRight:
+ return TwoColumnRight;
+ case Catalog::pageLayoutTwoPageLeft:
+ return TwoPageLeft;
+ case Catalog::pageLayoutTwoPageRight:
+ return TwoPageRight;
+ default:
+ return NoLayout;
+ }
+ }
+
+ int Document::numPages() const
+ {
+ return m_doc->doc->getNumPages();
+ }
+
+ QList<FontInfo> Document::fonts() const
+ {
+ QList<FontInfo> ourList;
+ FontIterator it( 0, m_doc );
+ while ( it.hasNext() )
+ {
+ ourList += it.next();
+ }
+ return ourList;
+ }
+
+ QList<EmbeddedFile*> Document::embeddedFiles() const
+ {
+ return m_doc->m_embeddedFiles;
+ }
+
+ bool Document::scanForFonts( int numPages, QList<FontInfo> *fontList ) const
+ {
+ if ( !m_doc->m_fontInfoIterator )
+ return false;
+ if ( !m_doc->m_fontInfoIterator->hasNext() )
+ return false;
+ while ( m_doc->m_fontInfoIterator->hasNext() && numPages )
+ {
+ (*fontList) += m_doc->m_fontInfoIterator->next();
+ --numPages;
+ }
+ return true;
+ }
+
+ FontIterator* Document::newFontIterator( int startPage ) const
+ {
+ return new FontIterator( startPage, m_doc );
+ }
+
+ QByteArray Document::fontData(const FontInfo &fi) const
+ {
+ QByteArray result;
+ if (fi.isEmbedded())
+ {
+ Object refObj, strObj;
+ refObj.initRef(fi.m_data->embRef.num, fi.m_data->embRef.gen);
+ refObj.fetch(m_doc->doc->getXRef(), &strObj);
+ refObj.free();
+ if (strObj.isStream())
+ {
+ int c;
+ strObj.streamReset();
+ while ((c = strObj.streamGetChar()) != EOF)
+ {
+ result.append((char)c);
+ }
+ strObj.streamClose();
+ }
+ strObj.free();
+ }
+ return result;
+ }
+
+ /* borrowed from kpdf */
+ QString Document::info( const QString & type ) const
+ {
+ // [Albert] Code adapted from pdfinfo.cc on xpdf
+ Object info;
+ if ( m_doc->locked )
+ return QString();
+
+ m_doc->doc->getDocInfo( &info );
+ if ( !info.isDict() )
+ return QString();
+
+ QString result;
+ Object obj;
+ GooString *s1;
+ Dict *infoDict = info.getDict();
+
+ if ( infoDict->lookup( type.toLatin1().data(), &obj )->isString() )
+ {
+ s1 = obj.getString();
+ result = UnicodeParsedString(s1);
+ obj.free();
+ info.free();
+ return result;
+ }
+ obj.free();
+ info.free();
+ return QString();
+ }
+
+ QStringList Document::infoKeys() const
+ {
+ QStringList keys;
+
+ Object info;
+ if ( m_doc->locked )
+ return QStringList();
+
+ m_doc->doc->getDocInfo( &info );
+ if ( !info.isDict() )
+ return QStringList();
+
+ Dict *infoDict = info.getDict();
+ // somehow iterate over keys in infoDict
+ for( int i=0; i < infoDict->getLength(); ++i ) {
+ keys.append( QString::fromAscii(infoDict->getKey(i)) );
+ }
+
+ info.free();
+ return keys;
+ }
+
+ /* borrowed from kpdf */
+ QDateTime Document::date( const QString & type ) const
+ {
+ // [Albert] Code adapted from pdfinfo.cc on xpdf
+ if ( m_doc->locked )
+ return QDateTime();
+
+ Object info;
+ m_doc->doc->getDocInfo( &info );
+ if ( !info.isDict() ) {
+ info.free();
+ return QDateTime();
+ }
+
+ Object obj;
+ Dict *infoDict = info.getDict();
+ QDateTime result;
+
+ if ( infoDict->lookup( type.toLatin1().data(), &obj )->isString() )
+ {
+ char *aux = obj.getString()->getCString();
+ result = Poppler::convertDate(aux);
+ }
+ obj.free();
+ info.free();
+ return result;
+ }
+
+ bool Document::isEncrypted() const
+ {
+ return m_doc->doc->isEncrypted();
+ }
+
+ bool Document::isLinearized() const
+ {
+ return m_doc->doc->isLinearized();
+ }
+
+ bool Document::okToPrint() const
+ {
+ return m_doc->doc->okToPrint();
+ }
+
+ bool Document::okToPrintHighRes() const
+ {
+ return m_doc->doc->okToPrintHighRes();
+ }
+
+ bool Document::okToChange() const
+ {
+ return m_doc->doc->okToChange();
+ }
+
+ bool Document::okToCopy() const
+ {
+ return m_doc->doc->okToCopy();
+ }
+
+ bool Document::okToAddNotes() const
+ {
+ return m_doc->doc->okToAddNotes();
+ }
+
+ bool Document::okToFillForm() const
+ {
+ return m_doc->doc->okToFillForm();
+ }
+
+ bool Document::okToCreateFormFields() const
+ {
+ return ( okToFillForm() && okToChange() );
+ }
+
+ bool Document::okToExtractForAccessibility() const
+ {
+ return m_doc->doc->okToAccessibility();
+ }
+
+ bool Document::okToAssemble() const
+ {
+ return m_doc->doc->okToAssemble();
+ }
+
+ double Document::pdfVersion() const
+ {
+ return m_doc->doc->getPDFMajorVersion () + m_doc->doc->getPDFMinorVersion() / 10.0;
+ }
+
+ void Document::getPdfVersion(int *major, int *minor) const
+ {
+ if (major)
+ *major = m_doc->doc->getPDFMajorVersion();
+ if (minor)
+ *minor = m_doc->doc->getPDFMinorVersion();
+ }
+
+ Page *Document::page(const QString &label) const
+ {
+ GooString label_g(label.toAscii().data());
+ int index;
+
+ if (!m_doc->doc->getCatalog()->labelToIndex (&label_g, &index))
+ return NULL;
+
+ return page(index);
+ }
+
+ bool Document::hasEmbeddedFiles() const
+ {
+ return (!(0 == m_doc->doc->getCatalog()->numEmbeddedFiles()));
+ }
+
+ QDomDocument *Document::toc() const
+ {
+ Outline * outline = m_doc->doc->getOutline();
+ if ( !outline )
+ return NULL;
+
+ GooList * items = outline->getItems();
+ if ( !items || items->getLength() < 1 )
+ return NULL;
+
+ QDomDocument *toc = new QDomDocument();
+ if ( items->getLength() > 0 )
+ m_doc->addTocChildren( toc, toc, items );
+
+ return toc;
+ }
+
+ LinkDestination *Document::linkDestination( const QString &name )
+ {
+ GooString * namedDest = QStringToGooString( name );
+ LinkDestinationData ldd(NULL, namedDest, m_doc, false);
+ LinkDestination *ld = new LinkDestination(ldd);
+ delete namedDest;
+ return ld;
+ }
+
+ void Document::setPaperColor(const QColor &color)
+ {
+ m_doc->setPaperColor(color);
+ }
+
+ void Document::setColorDisplayProfile(void* outputProfileA)
+ {
+#if defined(USE_CMS)
+ GfxColorSpace::setDisplayProfile((cmsHPROFILE)outputProfileA);
+#else
+ Q_UNUSED(outputProfileA);
+#endif
+ }
+
+ void Document::setColorDisplayProfileName(const QString &name)
+ {
+#if defined(USE_CMS)
+ GooString *profileName = QStringToGooString( name );
+ GfxColorSpace::setDisplayProfileName(profileName);
+ delete profileName;
+#else
+ Q_UNUSED(name);
+#endif
+ }
+
+ void* Document::colorRgbProfile() const
+ {
+#if defined(USE_CMS)
+ return (void*)GfxColorSpace::getRGBProfile();
+#else
+ return NULL;
+#endif
+ }
+
+ void* Document::colorDisplayProfile() const
+ {
+#if defined(USE_CMS)
+ return (void*)GfxColorSpace::getDisplayProfile();
+#else
+ return NULL;
+#endif
+ }
+
+ QColor Document::paperColor() const
+ {
+ return m_doc->paperColor;
+ }
+
+ void Document::setRenderBackend( Document::RenderBackend backend )
+ {
+ // no need to delete the outputdev as for the moment we always create a splash one
+ // as the arthur one does not allow "precaching" due to it's signature
+ // delete m_doc->m_outputDev;
+ // m_doc->m_outputDev = NULL;
+ m_doc->m_backend = backend;
+ }
+
+ Document::RenderBackend Document::renderBackend() const
+ {
+ return m_doc->m_backend;
+ }
+
+ QSet<Document::RenderBackend> Document::availableRenderBackends()
+ {
+ QSet<Document::RenderBackend> ret;
+#if defined(HAVE_SPLASH)
+ ret << Document::SplashBackend;
+ ret << Document::ArthurBackend;
+#endif
+ return ret;
+ }
+
+ void Document::setRenderHint( Document::RenderHint hint, bool on )
+ {
+ if ( on )
+ m_doc->m_hints |= hint;
+ else
+ m_doc->m_hints &= ~(int)hint;
+
+ // the only way to set antialiasing for Splash is on creation
+ if ( m_doc->m_backend == Document::SplashBackend &&
+ ( hint & ( Document::Antialiasing || Document::TextAntialiasing || Document::TextHinting ) ) )
+ {
+ delete m_doc->m_outputDev;
+ m_doc->m_outputDev = NULL;
+ }
+ }
+
+ Document::RenderHints Document::renderHints() const
+ {
+ return Document::RenderHints( m_doc->m_hints );
+ }
+
+ PSConverter *Document::psConverter() const
+ {
+ return new PSConverter(m_doc);
+ }
+
+ PDFConverter *Document::pdfConverter() const
+ {
+ return new PDFConverter(m_doc);
+ }
+
+ QString Document::metadata() const
+ {
+ QString result;
+ Catalog *catalog = m_doc->doc->getCatalog();
+ if (catalog && catalog->isOk())
+ {
+ GooString *s = catalog->readMetadata();
+ if (s) result = UnicodeParsedString(s);
+ delete s;
+ }
+ return result;
+ }
+
+ bool Document::hasOptionalContent() const
+ {
+ return ( m_doc->doc->getOptContentConfig() && m_doc->doc->getOptContentConfig()->hasOCGs() );
+ }
+
+ OptContentModel *Document::optionalContentModel()
+ {
+ if (m_doc->m_optContentModel.isNull()) {
+ m_doc->m_optContentModel = new OptContentModel(m_doc->doc->getOptContentConfig(), 0);
+ }
+ return (OptContentModel *)m_doc->m_optContentModel;
+ }
+
+ QStringList Document::scripts() const
+ {
+ Catalog *catalog = m_doc->doc->getCatalog();
+ const int numScripts = catalog->numJS();
+ QStringList scripts;
+ for (int i = 0; i < numScripts; ++i) {
+ GooString *s = catalog->getJS(i);
+ if (s) {
+ scripts.append(UnicodeParsedString(s));
+ delete s;
+ }
+ }
+ return scripts;
+ }
+
+ QDateTime convertDate( char *dateString )
+ {
+ int year, mon, day, hour, min, sec, tzHours, tzMins;
+ char tz;
+
+ if ( parseDateString( dateString, &year, &mon, &day, &hour, &min, &sec, &tz, &tzHours, &tzMins ) )
+ {
+ QDate d( year, mon, day );
+ QTime t( hour, min, sec );
+ if ( d.isValid() && t.isValid() ) {
+ QDateTime dt( d, t, Qt::UTC );
+ if ( tz ) {
+ // then we have some form of timezone
+ if ( 'Z' == tz ) {
+ // We are already at UTC
+ } else if ( '+' == tz ) {
+ // local time is ahead of UTC
+ dt = dt.addSecs(-1*((tzHours*60)+tzMins)*60);
+ } else if ( '-' == tz ) {
+ // local time is behind UTC
+ dt = dt.addSecs(((tzHours*60)+tzMins)*60);
+ } else {
+ qWarning("unexpected tz val");
+ }
+ }
+ return dt;
+ }
+ }
+ return QDateTime();
+ }
+
+ bool isCmsAvailable()
+ {
+#if defined(USE_CMS)
+ return true;
+#else
+ return false;
+#endif
+ }
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-embeddedfile.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-embeddedfile.cc
new file mode 100644
index 00000000000..d54cf1e25f0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-embeddedfile.cc
@@ -0,0 +1,113 @@
+/* poppler-document.cc: qt interface to poppler
+ * Copyright (C) 2005, 2008, 2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include <QtCore/QString>
+#include <QtCore/QDateTime>
+
+#include "Object.h"
+#include "Stream.h"
+#include "Catalog.h"
+
+#include "poppler-private.h"
+
+namespace Poppler
+{
+
+class EmbeddedFileData
+{
+public:
+ EmbFile *embfile;
+};
+
+EmbeddedFile::EmbeddedFile(EmbFile *embfile)
+{
+ m_embeddedFile = new EmbeddedFileData();
+ m_embeddedFile->embfile = embfile;
+}
+
+EmbeddedFile::~EmbeddedFile()
+{
+ delete m_embeddedFile->embfile;
+ delete m_embeddedFile;
+}
+
+QString EmbeddedFile::name() const
+{
+ return QString(m_embeddedFile->embfile->name()->getCString());
+}
+
+QString EmbeddedFile::description() const
+{
+ return UnicodeParsedString(m_embeddedFile->embfile->description());
+}
+
+int EmbeddedFile::size() const
+{
+ return m_embeddedFile->embfile->size();
+}
+
+QDateTime EmbeddedFile::modDate() const
+{
+ return convertDate(m_embeddedFile->embfile->modDate()->getCString());
+}
+
+QDateTime EmbeddedFile::createDate() const
+{
+ return convertDate(m_embeddedFile->embfile->createDate()->getCString());
+}
+
+QByteArray EmbeddedFile::checksum() const
+{
+ GooString *goo_checksum = m_embeddedFile->embfile->checksum();
+ return QByteArray::fromRawData(goo_checksum->getCString(), goo_checksum->getLength());
+}
+
+QString EmbeddedFile::mimeType() const
+{
+ return QString(m_embeddedFile->embfile->mimeType()->getCString());
+}
+
+QByteArray EmbeddedFile::data()
+{
+ if (!isValid())
+ return QByteArray();
+
+ Object obj;
+ Stream *stream = m_embeddedFile->embfile->streamObject().getStream();
+ stream->reset();
+ int dataLen = 0;
+ QByteArray fileArray;
+ int i;
+ while ( (i = stream->getChar()) != EOF) {
+ fileArray[dataLen] = (char)i;
+ ++dataLen;
+ }
+ fileArray.resize(dataLen);
+ return fileArray;
+}
+
+bool EmbeddedFile::isValid() const
+{
+ return m_embeddedFile->embfile->isOk();
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-export.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-export.h
new file mode 100644
index 00000000000..7661fe9e0db
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-export.h
@@ -0,0 +1,17 @@
+/*
+* This file is used to set the poppler_qt4_EXPORT macros right.
+* This is needed for setting the visibility on windows, it will have no effect on other platforms.
+*/
+#if defined(_WIN32)
+# define LIB_EXPORT __declspec(dllexport)
+# define LIB_IMPORT __declspec(dllimport)
+#else
+# define LIB_EXPORT
+# define LIB_IMPORT
+#endif
+
+#ifdef poppler_qt4_EXPORTS
+# define POPPLER_QT4_EXPORT LIB_EXPORT
+#else
+# define POPPLER_QT4_EXPORT LIB_IMPORT
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-fontinfo.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-fontinfo.cc
new file mode 100644
index 00000000000..81aed712ca4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-fontinfo.cc
@@ -0,0 +1,149 @@
+/* poppler-qt.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, Tobias Koening <tokoe@kde.org>
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2005-2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, 2009, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+#include "poppler-private.h"
+
+namespace Poppler {
+
+FontInfo::FontInfo()
+{
+ m_data = new FontInfoData();
+}
+
+FontInfo::FontInfo( const FontInfoData &fid )
+{
+ m_data = new FontInfoData(fid);
+}
+
+FontInfo::FontInfo( const FontInfo &fi )
+{
+ m_data = new FontInfoData(*fi.m_data);
+}
+
+FontInfo::~FontInfo()
+{
+ delete m_data;
+}
+
+QString FontInfo::name() const
+{
+ return m_data->fontName;
+}
+
+QString FontInfo::file() const
+{
+ return m_data->fontFile;
+}
+
+bool FontInfo::isEmbedded() const
+{
+ return m_data->isEmbedded;
+}
+
+bool FontInfo::isSubset() const
+{
+ return m_data->isSubset;
+}
+
+FontInfo::Type FontInfo::type() const
+{
+ return m_data->type;
+}
+
+QString FontInfo::typeName() const
+{
+ switch (type()) {
+ case unknown:
+ return QObject::tr("unknown");
+ case Type1:
+ return QObject::tr("Type 1");
+ case Type1C:
+ return QObject::tr("Type 1C");
+ case Type3:
+ return QObject::tr("Type 3");
+ case TrueType:
+ return QObject::tr("TrueType");
+ case CIDType0:
+ return QObject::tr("CID Type 0");
+ case CIDType0C:
+ return QObject::tr("CID Type 0C");
+ case CIDTrueType:
+ return QObject::tr("CID TrueType");
+ case Type1COT:
+ return QObject::tr("Type 1C (OpenType)");
+ case TrueTypeOT:
+ return QObject::tr("TrueType (OpenType)");
+ case CIDType0COT:
+ return QObject::tr("CID Type 0C (OpenType)");
+ case CIDTrueTypeOT:
+ return QObject::tr("CID TrueType (OpenType)");
+ }
+ return QObject::tr("Bug: unexpected font type. Notify poppler mailing list!");
+}
+
+FontInfo& FontInfo::operator=( const FontInfo &fi )
+{
+ if (this == &fi)
+ return *this;
+
+ *m_data = *fi.m_data;
+ return *this;
+}
+
+
+FontIterator::FontIterator( int startPage, DocumentData *dd )
+ : d( new FontIteratorData( startPage, dd ) )
+{
+}
+
+FontIterator::~FontIterator()
+{
+ delete d;
+}
+
+QList<FontInfo> FontIterator::next()
+{
+ ++d->currentPage;
+
+ QList<FontInfo> fonts;
+ GooList *items = d->fontInfoScanner.scan( 1 );
+ if ( !items )
+ return fonts;
+ for ( int i = 0; i < items->getLength(); ++i ) {
+ fonts.append( FontInfo( FontInfoData( ( ::FontInfo* )items->get( i ) ) ) );
+ }
+ deleteGooList( items, ::FontInfo );
+ return fonts;
+}
+
+bool FontIterator::hasNext() const
+{
+ return ( d->currentPage + 1 ) < d->totalPages;
+}
+
+int FontIterator::currentPage() const
+{
+ return d->currentPage;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.cc
new file mode 100644
index 00000000000..6224b68969f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.cc
@@ -0,0 +1,371 @@
+/* poppler-form.h: qt4 interface to poppler
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include <QtCore/QSizeF>
+
+#include <Form.h>
+#include <Object.h>
+#include <Link.h>
+
+#include "poppler-form.h"
+#include "poppler-page-private.h"
+#include "poppler-private.h"
+#include "poppler-annotation-helper.h"
+
+#include <math.h>
+
+namespace Poppler {
+
+FormField::FormField(FormFieldData &dd)
+ : m_formData(&dd)
+{
+ const int rotation = m_formData->page->getRotate();
+ // reading the coords
+ double left, top, right, bottom;
+ m_formData->fm->getRect(&left, &bottom, &right, &top);
+ // build a normalized transform matrix for this page at 100% scale
+ GfxState gfxState( 72.0, 72.0, m_formData->page->getCropBox(), rotation, gTrue );
+ double * gfxCTM = gfxState.getCTM();
+ double MTX[6];
+ double pageWidth = m_formData->page->getCropWidth();
+ double pageHeight = m_formData->page->getCropHeight();
+ // landscape and seascape page rotation: be sure to use the correct (== rotated) page size
+ if (((rotation / 90) % 2) == 1)
+ qSwap(pageWidth, pageHeight);
+ for ( int i = 0; i < 6; i+=2 )
+ {
+ MTX[i] = gfxCTM[i] / pageWidth;
+ MTX[i+1] = gfxCTM[i+1] / pageHeight;
+ }
+ QPointF topLeft;
+ XPDFReader::transform( MTX, qMin( left, right ), qMax( top, bottom ), topLeft );
+ QPointF bottomRight;
+ XPDFReader::transform( MTX, qMax( left, right ), qMin( top, bottom ), bottomRight );
+ m_formData->box = QRectF(topLeft, QSizeF(bottomRight.x() - topLeft.x(), bottomRight.y() - topLeft.y()));
+
+ Object *obj = m_formData->fm->getObj();
+ Object tmp;
+
+ // reading the flags
+ if (obj->isDict() && obj->dictLookup("Ff", &tmp)->isInt())
+ {
+ m_formData->flags = tmp.getInt();
+ }
+ tmp.free();
+ // reading the widget annotation flags
+ if (obj->isDict() && obj->dictLookup("F", &tmp)->isInt())
+ {
+ m_formData->annoflags = tmp.getInt();
+ }
+ tmp.free();
+}
+
+FormField::~FormField()
+{
+ delete m_formData;
+ m_formData = 0;
+}
+
+QRectF FormField::rect() const
+{
+ return m_formData->box;
+}
+
+int FormField::id() const
+{
+ return m_formData->fm->getID();
+}
+
+QString FormField::name() const
+{
+ Object tmp;
+ Object *obj = m_formData->fm->getObj();
+ QString name;
+ if (obj->dictLookup("T", &tmp)->isString())
+ {
+ GooString *goo = tmp.getString();
+ if (goo)
+ name = goo->getCString();
+ }
+ tmp.free();
+ return name;
+}
+
+QString FormField::uiName() const
+{
+ Object tmp;
+ Object *obj = m_formData->fm->getObj();
+ QString name;
+ if (obj->dictLookup("TU", &tmp)->isString())
+ {
+ GooString *goo = tmp.getString();
+ if (goo)
+ name = goo->getCString();
+ }
+ tmp.free();
+ return name;
+}
+
+bool FormField::isReadOnly() const
+{
+ return m_formData->fm->isReadOnly();
+}
+
+bool FormField::isVisible() const
+{
+ return !(m_formData->annoflags & (1 << 1));
+}
+
+Link* FormField::activationAction() const
+{
+ Object tmp;
+ Object *obj = m_formData->fm->getObj();
+ Link* action = 0;
+ if (obj->dictLookup("A", &tmp)->isDict())
+ {
+ ::LinkAction *act = ::LinkAction::parseAction(&tmp, m_formData->doc->doc->getCatalog()->getBaseURI());
+ if (act)
+ {
+ action = PageData::convertLinkActionToLink(act, m_formData->doc, QRectF());
+ delete act;
+ }
+ }
+ tmp.free();
+ return action;
+}
+
+
+FormFieldButton::FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w)
+ : FormField(*new FormFieldData(doc, p, w))
+{
+}
+
+FormFieldButton::~FormFieldButton()
+{
+}
+
+FormFieldButton::FormType FormFieldButton::type() const
+{
+ return FormField::FormButton;
+}
+
+FormFieldButton::ButtonType FormFieldButton::buttonType() const
+{
+ FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+ switch (fwb->getButtonType())
+ {
+ case formButtonCheck:
+ return FormFieldButton::CheckBox;
+ break;
+ case formButtonPush:
+ return FormFieldButton::Push;
+ break;
+ case formButtonRadio:
+ return FormFieldButton::Radio;
+ break;
+ }
+ return FormFieldButton::CheckBox;
+}
+
+QString FormFieldButton::caption() const
+{
+ FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+ // HACK push buttons seems to have a null GooString for the caption
+ if (fwb->getButtonType() == formButtonPush)
+ return QString();
+
+ return fwb->getOnStr() ? QString::fromUtf8(fwb->getOnStr()) : QString();
+}
+
+bool FormFieldButton::state() const
+{
+ FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+ return fwb->getState();
+}
+
+void FormFieldButton::setState( bool state )
+{
+ FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+ fwb->setState((GBool)state);
+}
+
+QList<int> FormFieldButton::siblings() const
+{
+ FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+ if (fwb->getButtonType() == formButtonPush)
+ return QList<int>();
+
+ QList<int> ret;
+ unsigned *sibls = fwb->getSiblingsID();
+ for (int i = 0; i < fwb->getNumSiblingsID(); ++i)
+ ret.append(sibls[i]);
+
+ return ret;
+}
+
+
+FormFieldText::FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w)
+ : FormField(*new FormFieldData(doc, p, w))
+{
+}
+
+FormFieldText::~FormFieldText()
+{
+}
+
+FormField::FormType FormFieldText::type() const
+{
+ return FormField::FormText;
+}
+
+FormFieldText::TextType FormFieldText::textType() const
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ if (fwt->isFileSelect())
+ return FormFieldText::FileSelect;
+ else if (fwt->isMultiline())
+ return FormFieldText::Multiline;
+ return FormFieldText::Normal;
+}
+
+QString FormFieldText::text() const
+{
+ GooString *goo = static_cast<FormWidgetText*>(m_formData->fm)->getContent();
+ return UnicodeParsedString(goo);
+}
+
+void FormFieldText::setText( const QString& text )
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ GooString * goo = QStringToUnicodeGooString( text );
+ fwt->setContent( goo );
+ delete goo;
+}
+
+bool FormFieldText::isPassword() const
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ return fwt->isPassword();
+}
+
+bool FormFieldText::isRichText() const
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ return fwt->isRichText();
+}
+
+int FormFieldText::maximumLength() const
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ const int maxlen = fwt->getMaxLen();
+ return maxlen > 0 ? maxlen : -1;
+}
+
+Qt::Alignment FormFieldText::textAlignment() const
+{
+ return m_formData->textAlignment(m_formData->fm->getObj());
+}
+
+bool FormFieldText::canBeSpellChecked() const
+{
+ FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+ return !fwt->noSpellCheck();
+}
+
+
+FormFieldChoice::FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w)
+ : FormField(*new FormFieldData(doc, p, w))
+{
+}
+
+FormFieldChoice::~FormFieldChoice()
+{
+}
+
+FormFieldChoice::FormType FormFieldChoice::type() const
+{
+ return FormField::FormChoice;
+}
+
+FormFieldChoice::ChoiceType FormFieldChoice::choiceType() const
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ if (fwc->isCombo())
+ return FormFieldChoice::ComboBox;
+ return FormFieldChoice::ListBox;
+}
+
+QStringList FormFieldChoice::choices() const
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ QStringList ret;
+ int num = fwc->getNumChoices();
+ for (int i = 0; i < num; ++i)
+ {
+ ret.append(UnicodeParsedString(fwc->getChoice(i)));
+ }
+ return ret;
+}
+
+bool FormFieldChoice::isEditable() const
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ return fwc->isCombo() ? fwc->hasEdit() : false;
+}
+
+bool FormFieldChoice::multiSelect() const
+{
+// return m_formData->flags & (1 << 21);
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ return !fwc->isCombo() ? fwc->isMultiSelect() : false;
+}
+
+QList<int> FormFieldChoice::currentChoices() const
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ int num = fwc->getNumChoices();
+ QList<int> choices;
+ for ( int i = 0; i < num; ++i )
+ if ( fwc->isSelected( i ) )
+ choices.append( i );
+ return choices;
+}
+
+void FormFieldChoice::setCurrentChoices( const QList<int> &choice )
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ fwc->deselectAll();
+ for ( int i = 0; i < choice.count(); ++i )
+ fwc->select( choice.at( i ) );
+}
+
+Qt::Alignment FormFieldChoice::textAlignment() const
+{
+ return m_formData->textAlignment(m_formData->fm->getObj());
+}
+
+bool FormFieldChoice::canBeSpellChecked() const
+{
+ FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+ return !fwc->noSpellCheck();
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.h
new file mode 100644
index 00000000000..0412bab1948
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-form.h
@@ -0,0 +1,322 @@
+/* poppler-form.h: qt4 interface to poppler
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_QT4_FORM_H_
+#define _POPPLER_QT4_FORM_H_
+
+#include <QtCore/QRectF>
+#include <QtCore/QStringList>
+#include "poppler-export.h"
+
+class Page;
+class FormWidget;
+class FormWidgetButton;
+class FormWidgetText;
+class FormWidgetChoice;
+
+namespace Poppler {
+
+ class DocumentData;
+ class Link;
+
+ class FormFieldData;
+ /**
+ The base class representing a form field.
+
+ \since 0.6
+ */
+ class POPPLER_QT4_EXPORT FormField {
+ public:
+
+ /**
+ The different types of form field.
+ */
+ enum FormType {
+ FormButton, ///< A button field. See \ref Poppler::FormFieldButton::ButtonType "ButtonType"
+ FormText, ///< A text field. See \ref Poppler::FormFieldText::TextType "TextType"
+ FormChoice, ///< A single choice field. See \ref Poppler::FormFieldChoice::ChoiceType "ChoiceType"
+ FormSignature ///< A signature field.
+ };
+
+ virtual ~FormField();
+
+ /**
+ The type of the field.
+ */
+ virtual FormType type() const = 0;
+
+ /**
+ \return The size of the field, in normalized coordinates, i.e.
+ [0..1] with regard to the dimensions (cropbox) of the page
+ */
+ QRectF rect() const;
+
+ /**
+ The ID of the field.
+ */
+ int id() const;
+
+ /**
+ The internal name of the field.
+ */
+ QString name() const;
+
+ /**
+ The name of the field to be used in user interface (eg messages to
+ the user).
+ */
+ QString uiName() const;
+
+ /**
+ Whether this form field is read-only.
+ */
+ bool isReadOnly() const;
+
+ /**
+ Whether this form field is visible.
+ */
+ bool isVisible() const;
+
+ /**
+ The activation action of this form field.
+
+ \note It may be null.
+ */
+ Link* activationAction() const;
+
+ protected:
+ /// \cond PRIVATE
+ FormField(FormFieldData &dd);
+
+ FormFieldData *m_formData;
+ /// \endcond
+
+ private:
+ Q_DISABLE_COPY(FormField)
+ };
+
+ /**
+ A form field that represents a "button".
+
+ \since 0.8
+ */
+ class POPPLER_QT4_EXPORT FormFieldButton : public FormField {
+ public:
+
+ /**
+ * The types of button field.
+ */
+ enum ButtonType
+ {
+ Push, ///< A simple push button.
+ CheckBox, ///< A check box.
+ Radio ///< A radio button.
+ };
+
+ /// \cond PRIVATE
+ FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
+ /// \endcond
+ virtual ~FormFieldButton();
+
+ virtual FormType type() const;
+
+ /**
+ The particular type of the button field.
+ */
+ ButtonType buttonType() const;
+
+ /**
+ * The caption to be used for the button.
+ */
+ QString caption() const;
+
+ /**
+ The state of the button.
+ */
+ bool state() const;
+
+ /**
+ Sets the state of the button to the new \p state .
+ */
+ void setState( bool state );
+
+ /**
+ The list with the IDs of siblings (ie, buttons belonging to the same
+ group as the current one.
+
+ Valid only for \ref Radio buttons, an empty list otherwise.
+ */
+ QList<int> siblings() const;
+
+ private:
+ Q_DISABLE_COPY(FormFieldButton)
+ };
+
+ /**
+ A form field that represents a text input.
+
+ \since 0.6
+ */
+ class POPPLER_QT4_EXPORT FormFieldText : public FormField {
+ public:
+
+ /**
+ The particular type of this text field.
+ */
+ enum TextType {
+ Normal, ///< A simple singleline text field.
+ Multiline, ///< A multiline text field.
+ FileSelect ///< An input field to select the path of a file on disk.
+ };
+
+ /// \cond PRIVATE
+ FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
+ /// \endcond
+ virtual ~FormFieldText();
+
+ virtual FormType type() const;
+
+ /**
+ The text type of the text field.
+ */
+ TextType textType() const;
+
+ /**
+ The text associated with the text field.
+ */
+ QString text() const;
+
+ /**
+ Sets the text associated with the text field to the specified
+ \p text.
+ */
+ void setText( const QString& text );
+
+ /**
+ Whether this text field is a password input, eg its text \b must be
+ replaced with asterisks.
+
+ Always false for \ref FileSelect text fields.
+ */
+ bool isPassword() const;
+
+ /**
+ Whether this text field should allow rich text.
+ */
+ bool isRichText() const;
+
+ /**
+ The maximum length for the text of this field, or -1 if not set.
+ */
+ int maximumLength() const;
+
+ /**
+ The horizontal alignment for the text of this text field.
+ */
+ Qt::Alignment textAlignment() const;
+
+ /**
+ Whether the text inserted manually in the field (where possible)
+ can be spell-checked.
+ */
+ bool canBeSpellChecked() const;
+
+ private:
+ Q_DISABLE_COPY(FormFieldText)
+ };
+
+ /**
+ A form field that represents a choice field.
+
+ \since 0.6
+ */
+ class POPPLER_QT4_EXPORT FormFieldChoice : public FormField {
+ public:
+
+ /**
+ The particular type of this choice field.
+ */
+ enum ChoiceType {
+ ComboBox, ///< A simple singleline text field.
+ ListBox ///< A multiline text field.
+ };
+
+ /// \cond PRIVATE
+ FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
+ /// \endcond
+ virtual ~FormFieldChoice();
+
+ virtual FormType type() const;
+
+ /**
+ The choice type of the choice field.
+ */
+ ChoiceType choiceType() const;
+
+ /**
+ The possible choices of the choice field.
+ */
+ QStringList choices() const;
+
+ /**
+ Whether this FormFieldChoice::ComboBox is editable, i.e. the user
+ can type in a custom value.
+
+ Always false for the other types of choices.
+ */
+ bool isEditable() const;
+
+ /**
+ Whether more than one choice of this FormFieldChoice::ListBox
+ can be selected at the same time.
+
+ Always false for the other types of choices.
+ */
+ bool multiSelect() const;
+
+ /**
+ The currently selected choices.
+ */
+ QList<int> currentChoices() const;
+
+ /**
+ Sets the selected choices to \p choice.
+ */
+ void setCurrentChoices( const QList<int> &choice );
+
+ /**
+ The horizontal alignment for the text of this text field.
+ */
+ Qt::Alignment textAlignment() const;
+
+ /**
+ Whether the text inserted manually in the field (where possible)
+ can be spell-checked.
+
+ Returns false if the field is not an editable text field.
+ */
+ bool canBeSpellChecked() const;
+
+ private:
+ Q_DISABLE_COPY(FormFieldChoice)
+ };
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor-private.h
new file mode 100644
index 00000000000..284f33cd177
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor-private.h
@@ -0,0 +1,57 @@
+/* poppler-link-extractor_p.h: qt interface to poppler
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_LINK_EXTRACTOR_H_
+#define _POPPLER_LINK_EXTRACTOR_H_
+
+#include <Object.h>
+#include <OutputDev.h>
+
+#include <QtCore/QList>
+
+namespace Poppler
+{
+
+class Link;
+class PageData;
+
+class LinkExtractorOutputDev : public OutputDev
+{
+ public:
+ LinkExtractorOutputDev(PageData *data);
+ virtual ~LinkExtractorOutputDev();
+
+ // inherited from OutputDev
+ virtual GBool upsideDown() { return gFalse; }
+ virtual GBool useDrawChar() { return gFalse; }
+ virtual GBool interpretType3Chars() { return gFalse; }
+ virtual void processLink(::Link *link, Catalog *catalog);
+
+ // our stuff
+ QList< Link* > links();
+
+ private:
+ PageData *m_data;
+ double m_pageCropWidth;
+ double m_pageCropHeight;
+ QList< Link* > m_links;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor.cc
new file mode 100644
index 00000000000..e9806b59488
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link-extractor.cc
@@ -0,0 +1,83 @@
+/* poppler-link-extractor_p.h: qt interface to poppler
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-link-extractor-private.h"
+
+#include <GfxState.h>
+#include <Link.h>
+#include <Object.h>
+#include <Page.h>
+
+#include "poppler-qt4.h"
+#include "poppler-page-private.h"
+
+namespace Poppler
+{
+
+LinkExtractorOutputDev::LinkExtractorOutputDev(PageData *data)
+ : m_data(data)
+{
+ Q_ASSERT(m_data);
+ ::Page *popplerPage = m_data->page;
+ m_pageCropWidth = popplerPage->getCropWidth();
+ m_pageCropHeight = popplerPage->getCropHeight();
+ if (popplerPage->getRotate() == 90 || popplerPage->getRotate() == 270)
+ qSwap(m_pageCropWidth, m_pageCropHeight);
+ GfxState gfxState(72.0, 72.0, popplerPage->getCropBox(), popplerPage->getRotate(), gTrue);
+ setDefaultCTM(gfxState.getCTM());
+}
+
+LinkExtractorOutputDev::~LinkExtractorOutputDev()
+{
+ qDeleteAll(m_links);
+}
+
+void LinkExtractorOutputDev::processLink(::Link *link, Catalog *catalog)
+{
+ if (!link->isOk())
+ return;
+
+ double left, top, right, bottom;
+ int leftAux, topAux, rightAux, bottomAux;
+ link->getRect(&left, &top, &right, &bottom);
+ QRectF linkArea;
+
+ cvtUserToDev(left, top, &leftAux, &topAux);
+ cvtUserToDev(right, bottom, &rightAux, &bottomAux);
+ linkArea.setLeft((double)leftAux / m_pageCropWidth);
+ linkArea.setTop((double)topAux / m_pageCropHeight);
+ linkArea.setRight((double)rightAux / m_pageCropWidth);
+ linkArea.setBottom((double)bottomAux / m_pageCropHeight);
+
+ Link *popplerLink = m_data->convertLinkActionToLink(link->getAction(), linkArea);
+ if (popplerLink)
+ {
+ m_links.append(popplerLink);
+ }
+ OutputDev::processLink(link, catalog);
+}
+
+QList< Link* > LinkExtractorOutputDev::links()
+{
+ QList< Link* > ret = m_links;
+ m_links.clear();
+ return ret;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.cc
new file mode 100644
index 00000000000..de062423717
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.cc
@@ -0,0 +1,584 @@
+/* poppler-link.cc: qt interface to poppler
+ * Copyright (C) 2006-2007, Albert Astals Cid
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <poppler-qt4.h>
+#include <poppler-private.h>
+
+#include <QtCore/QStringList>
+
+#include "Link.h"
+
+namespace Poppler {
+
+class LinkDestinationPrivate : public QSharedData
+{
+ public:
+ LinkDestinationPrivate();
+
+ LinkDestination::Kind kind; // destination type
+ QString name;
+ int pageNum; // page number
+ double left, bottom; // position
+ double right, top;
+ double zoom; // zoom factor
+ bool changeLeft : 1, changeTop : 1; // for destXYZ links, which position
+ bool changeZoom : 1; // components to change
+};
+
+ LinkDestinationPrivate::LinkDestinationPrivate()
+ {
+ // sane defaults
+ kind = LinkDestination::destXYZ;
+ pageNum = 0;
+ left = 0;
+ bottom = 0;
+ right = 0;
+ top = 0;
+ zoom = 1;
+ changeLeft = true;
+ changeTop = true;
+ changeZoom = false;
+ }
+
+class LinkPrivate
+{
+ public:
+ LinkPrivate( const QRectF &area );
+ virtual ~LinkPrivate();
+
+ QRectF linkArea;
+};
+
+ LinkPrivate::LinkPrivate( const QRectF &area )
+ : linkArea( area )
+ {
+ }
+
+ LinkPrivate::~LinkPrivate()
+ {
+ }
+
+class LinkGotoPrivate : public LinkPrivate
+{
+ public:
+ LinkGotoPrivate( const QRectF &area, const LinkDestination &dest );
+
+ QString extFileName;
+ LinkDestination destination;
+};
+
+ LinkGotoPrivate::LinkGotoPrivate( const QRectF &area, const LinkDestination &dest )
+ : LinkPrivate( area ), destination( dest )
+ {
+ }
+
+class LinkExecutePrivate : public LinkPrivate
+{
+ public:
+ LinkExecutePrivate( const QRectF &area );
+
+ QString fileName;
+ QString parameters;
+};
+
+ LinkExecutePrivate::LinkExecutePrivate( const QRectF &area )
+ : LinkPrivate( area )
+ {
+ }
+
+class LinkBrowsePrivate : public LinkPrivate
+{
+ public:
+ LinkBrowsePrivate( const QRectF &area );
+
+ QString url;
+};
+
+ LinkBrowsePrivate::LinkBrowsePrivate( const QRectF &area )
+ : LinkPrivate( area )
+ {
+ }
+
+class LinkActionPrivate : public LinkPrivate
+{
+ public:
+ LinkActionPrivate( const QRectF &area );
+
+ LinkAction::ActionType type;
+};
+
+ LinkActionPrivate::LinkActionPrivate( const QRectF &area )
+ : LinkPrivate( area )
+ {
+ }
+
+class LinkSoundPrivate : public LinkPrivate
+{
+ public:
+ LinkSoundPrivate( const QRectF &area );
+ ~LinkSoundPrivate();
+
+ double volume;
+ bool sync : 1;
+ bool repeat : 1;
+ bool mix : 1;
+ SoundObject *sound;
+};
+
+ LinkSoundPrivate::LinkSoundPrivate( const QRectF &area )
+ : LinkPrivate( area ), sound( 0 )
+ {
+ }
+
+ LinkSoundPrivate::~LinkSoundPrivate()
+ {
+ delete sound;
+ }
+
+class LinkJavaScriptPrivate : public LinkPrivate
+{
+ public:
+ LinkJavaScriptPrivate( const QRectF &area );
+
+ QString js;
+};
+
+ LinkJavaScriptPrivate::LinkJavaScriptPrivate( const QRectF &area )
+ : LinkPrivate( area )
+ {
+ }
+
+#if 0
+class LinkMoviePrivate : public LinkPrivate
+{
+ public:
+ LinkMoviePrivate( const QRectF &area );
+};
+
+ LinkMoviePrivate::LinkMoviePrivate( const QRectF &area )
+ : LinkPrivate( area )
+ {
+ }
+#endif
+
+ static void cvtUserToDev(::Page *page, double xu, double yu, int *xd, int *yd) {
+ double ctm[6];
+
+ page->getDefaultCTM(ctm, 72.0, 72.0, 0, false, true);
+ *xd = (int)(ctm[0] * xu + ctm[2] * yu + ctm[4] + 0.5);
+ *yd = (int)(ctm[1] * xu + ctm[3] * yu + ctm[5] + 0.5);
+ }
+
+ LinkDestination::LinkDestination(const LinkDestinationData &data)
+ : d( new LinkDestinationPrivate )
+ {
+ bool deleteDest = false;
+ LinkDest *ld = data.ld;
+
+ if ( data.namedDest && !ld && !data.externalDest )
+ {
+ deleteDest = true;
+ ld = data.doc->doc->findDest( data.namedDest );
+ }
+ // in case this destination was named one, and it was not resolved
+ if ( data.namedDest && !ld )
+ {
+ d->name = QString::fromLatin1( data.namedDest->getCString() );
+ }
+
+ if (!ld) return;
+
+ if (ld->getKind() == ::destXYZ) d->kind = destXYZ;
+ else if (ld->getKind() == ::destFit) d->kind = destFit;
+ else if (ld->getKind() == ::destFitH) d->kind = destFitH;
+ else if (ld->getKind() == ::destFitV) d->kind = destFitV;
+ else if (ld->getKind() == ::destFitR) d->kind = destFitR;
+ else if (ld->getKind() == ::destFitB) d->kind = destFitB;
+ else if (ld->getKind() == ::destFitBH) d->kind = destFitBH;
+ else if (ld->getKind() == ::destFitBV) d->kind = destFitBV;
+
+ if ( !ld->isPageRef() ) d->pageNum = ld->getPageNum();
+ else
+ {
+ Ref ref = ld->getPageRef();
+ d->pageNum = data.doc->doc->findPage( ref.num, ref.gen );
+ }
+ double left = ld->getLeft();
+ double bottom = ld->getBottom();
+ double right = ld->getRight();
+ double top = ld->getTop();
+ d->zoom = ld->getZoom();
+ d->changeLeft = ld->getChangeLeft();
+ d->changeTop = ld->getChangeTop();
+ d->changeZoom = ld->getChangeZoom();
+
+ int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
+
+ if (d->pageNum > 0 && d->pageNum <= data.doc->doc->getNumPages())
+ {
+ ::Page *page = data.doc->doc->getCatalog()->getPage( d->pageNum );
+ cvtUserToDev( page, left, top, &leftAux, &topAux );
+ cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
+
+ d->left = leftAux / (double)page->getCropWidth();
+ d->top = topAux / (double)page->getCropHeight();
+ d->right = rightAux/ (double)page->getCropWidth();
+ d->bottom = bottomAux / (double)page->getCropHeight();
+ }
+ else d->pageNum = 0;
+
+ if (deleteDest) delete ld;
+ }
+
+ LinkDestination::LinkDestination(const QString &description)
+ : d( new LinkDestinationPrivate )
+ {
+ QStringList tokens = description.split( ';' );
+ d->kind = static_cast<Kind>(tokens.at(0).toInt());
+ d->pageNum = tokens.at(1).toInt();
+ d->left = tokens.at(2).toDouble();
+ d->bottom = tokens.at(3).toDouble();
+ d->right = tokens.at(4).toDouble();
+ d->top = tokens.at(5).toDouble();
+ d->zoom = tokens.at(6).toDouble();
+ d->changeLeft = static_cast<bool>(tokens.at(7).toInt());
+ d->changeTop = static_cast<bool>(tokens.at(8).toInt());
+ d->changeZoom = static_cast<bool>(tokens.at(9).toInt());
+ }
+
+ LinkDestination::LinkDestination(const LinkDestination &other)
+ : d( other.d )
+ {
+ }
+
+ LinkDestination::~LinkDestination()
+ {
+ }
+
+ LinkDestination::Kind LinkDestination::kind() const
+ {
+ return d->kind;
+ }
+
+ int LinkDestination::pageNumber() const
+ {
+ return d->pageNum;
+ }
+
+ double LinkDestination::left() const
+ {
+ return d->left;
+ }
+
+ double LinkDestination::bottom() const
+ {
+ return d->bottom;
+ }
+
+ double LinkDestination::right() const
+ {
+ return d->right;
+ }
+
+ double LinkDestination::top() const
+ {
+ return d->top;
+ }
+
+ double LinkDestination::zoom() const
+ {
+ return d->zoom;
+ }
+
+ bool LinkDestination::isChangeLeft() const
+ {
+ return d->changeLeft;
+ }
+
+ bool LinkDestination::isChangeTop() const
+ {
+ return d->changeTop;
+ }
+
+ bool LinkDestination::isChangeZoom() const
+ {
+ return d->changeZoom;
+ }
+
+ QString LinkDestination::toString() const
+ {
+ QString s = QString::number( (qint8)d->kind );
+ s += ";" + QString::number( d->pageNum );
+ s += ";" + QString::number( d->left );
+ s += ";" + QString::number( d->bottom );
+ s += ";" + QString::number( d->right );
+ s += ";" + QString::number( d->top );
+ s += ";" + QString::number( d->zoom );
+ s += ";" + QString::number( (qint8)d->changeLeft );
+ s += ";" + QString::number( (qint8)d->changeTop );
+ s += ";" + QString::number( (qint8)d->changeZoom );
+ return s;
+ }
+
+ QString LinkDestination::destinationName() const
+ {
+ return d->name;
+ }
+
+ LinkDestination& LinkDestination::operator=(const LinkDestination &other)
+ {
+ if ( this == &other )
+ return *this;
+
+ d = other.d;
+ return *this;
+ }
+
+
+ // Link
+ Link::~Link()
+ {
+ delete d_ptr;
+ }
+
+ Link::Link(const QRectF &linkArea)
+ : d_ptr( new LinkPrivate( linkArea ) )
+ {
+ }
+
+ Link::Link( LinkPrivate &dd )
+ : d_ptr( &dd )
+ {
+ }
+
+ Link::LinkType Link::linkType() const
+ {
+ return None;
+ }
+
+ QRectF Link::linkArea() const
+ {
+ Q_D( const Link );
+ return d->linkArea;
+ }
+
+ // LinkGoto
+ LinkGoto::LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination )
+ : Link( *new LinkGotoPrivate( linkArea, destination ) )
+ {
+ Q_D( LinkGoto );
+ d->extFileName = extFileName;
+ }
+
+ LinkGoto::~LinkGoto()
+ {
+ }
+
+ bool LinkGoto::isExternal() const
+ {
+ Q_D( const LinkGoto );
+ return !d->extFileName.isEmpty();
+ }
+
+ QString LinkGoto::fileName() const
+ {
+ Q_D( const LinkGoto );
+ return d->extFileName;
+ }
+
+ LinkDestination LinkGoto::destination() const
+ {
+ Q_D( const LinkGoto );
+ return d->destination;
+ }
+
+ Link::LinkType LinkGoto::linkType() const
+ {
+ return Goto;
+ }
+
+ // LinkExecute
+ LinkExecute::LinkExecute( const QRectF &linkArea, const QString & file, const QString & params )
+ : Link( *new LinkExecutePrivate( linkArea ) )
+ {
+ Q_D( LinkExecute );
+ d->fileName = file;
+ d->parameters = params;
+ }
+
+ LinkExecute::~LinkExecute()
+ {
+ }
+
+ QString LinkExecute::fileName() const
+ {
+ Q_D( const LinkExecute );
+ return d->fileName;
+ }
+ QString LinkExecute::parameters() const
+ {
+ Q_D( const LinkExecute );
+ return d->parameters;
+ }
+
+ Link::LinkType LinkExecute::linkType() const
+ {
+ return Execute;
+ }
+
+ // LinkBrowse
+ LinkBrowse::LinkBrowse( const QRectF &linkArea, const QString &url )
+ : Link( *new LinkBrowsePrivate( linkArea ) )
+ {
+ Q_D( LinkBrowse );
+ d->url = url;
+ }
+
+ LinkBrowse::~LinkBrowse()
+ {
+ }
+
+ QString LinkBrowse::url() const
+ {
+ Q_D( const LinkBrowse );
+ return d->url;
+ }
+
+ Link::LinkType LinkBrowse::linkType() const
+ {
+ return Browse;
+ }
+
+ // LinkAction
+ LinkAction::LinkAction( const QRectF &linkArea, ActionType actionType )
+ : Link( *new LinkActionPrivate( linkArea ) )
+ {
+ Q_D( LinkAction );
+ d->type = actionType;
+ }
+
+ LinkAction::~LinkAction()
+ {
+ }
+
+ LinkAction::ActionType LinkAction::actionType() const
+ {
+ Q_D( const LinkAction );
+ return d->type;
+ }
+
+ Link::LinkType LinkAction::linkType() const
+ {
+ return Action;
+ }
+
+ // LinkSound
+ LinkSound::LinkSound( const QRectF &linkArea, double volume, bool sync, bool repeat, bool mix, SoundObject *sound )
+ : Link( *new LinkSoundPrivate( linkArea ) )
+ {
+ Q_D( LinkSound );
+ d->volume = volume;
+ d->sync = sync;
+ d->repeat = repeat;
+ d->mix = mix;
+ d->sound = sound;
+ }
+
+ LinkSound::~LinkSound()
+ {
+ }
+
+ Link::LinkType LinkSound::linkType() const
+ {
+ return Sound;
+ }
+
+ double LinkSound::volume() const
+ {
+ Q_D( const LinkSound );
+ return d->volume;
+ }
+
+ bool LinkSound::synchronous() const
+ {
+ Q_D( const LinkSound );
+ return d->sync;
+ }
+
+ bool LinkSound::repeat() const
+ {
+ Q_D( const LinkSound );
+ return d->repeat;
+ }
+
+ bool LinkSound::mix() const
+ {
+ Q_D( const LinkSound );
+ return d->mix;
+ }
+
+ SoundObject *LinkSound::sound() const
+ {
+ Q_D( const LinkSound );
+ return d->sound;
+ }
+
+ // LinkJavaScript
+ LinkJavaScript::LinkJavaScript( const QRectF &linkArea, const QString &js )
+ : Link( *new LinkJavaScriptPrivate( linkArea ) )
+ {
+ Q_D( LinkJavaScript );
+ d->js = js;
+ }
+
+ LinkJavaScript::~LinkJavaScript()
+ {
+ }
+
+ Link::LinkType LinkJavaScript::linkType() const
+ {
+ return JavaScript;
+ }
+
+ QString LinkJavaScript::script() const
+ {
+ Q_D( const LinkJavaScript );
+ return d->js;
+ }
+
+#if 0
+ // LinkMovie
+ LinkMovie::LinkMovie( const QRectF &linkArea )
+ : Link( *new LinkMoviePrivate( linkArea ) )
+ {
+ }
+
+ LinkMovie::~LinkMovie()
+ {
+ }
+
+ Link::LinkType LinkMovie::linkType() const
+ {
+ return Movie;
+ }
+#endif
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.h
new file mode 100644
index 00000000000..6d42cbec69b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-link.h
@@ -0,0 +1,489 @@
+/* poppler-link.h: qt interface to poppler
+ * Copyright (C) 2006, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+ * Adapting code from
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_LINK_H_
+#define _POPPLER_LINK_H_
+
+#include <QtCore/QString>
+#include <QtCore/QRectF>
+#include <QtCore/QSharedDataPointer>
+#include "poppler-export.h"
+
+namespace Poppler {
+
+class LinkPrivate;
+class LinkGotoPrivate;
+class LinkExecutePrivate;
+class LinkBrowsePrivate;
+class LinkActionPrivate;
+class LinkSoundPrivate;
+class LinkJavaScriptPrivate;
+class LinkMoviePrivate;
+class LinkDestinationData;
+class LinkDestinationPrivate;
+class SoundObject;
+
+/**
+ * \short A destination.
+ *
+ * The LinkDestination class represent a "destination" (in terms of visual
+ * viewport to be displayed) for \link Poppler::LinkGoto GoTo\endlink links,
+ * and items in the table of contents (TOC) of a document.
+ *
+ * Coordinates are in 0..1 range
+ */
+class POPPLER_QT4_EXPORT LinkDestination
+{
+ public:
+ /**
+ * The possible kind of "viewport destination".
+ */
+ enum Kind
+ {
+ /**
+ * The new viewport is specified in terms of:
+ * - possibile new left coordinate (see isChangeLeft() )
+ * - possibile new top coordinate (see isChangeTop() )
+ * - possibile new zoom level (see isChangeZoom() )
+ */
+ destXYZ = 1,
+ destFit = 2,
+ destFitH = 3,
+ destFitV = 4,
+ destFitR = 5,
+ destFitB = 6,
+ destFitBH = 7,
+ destFitBV = 8
+ };
+
+ /// \cond PRIVATE
+ LinkDestination(const LinkDestinationData &data);
+ LinkDestination(const QString &description);
+ /// \endcond
+ /**
+ * Copy constructor.
+ */
+ LinkDestination(const LinkDestination &other);
+ /**
+ * Destructor.
+ */
+ ~LinkDestination();
+
+ // Accessors.
+ /**
+ * The kind of destination.
+ */
+ Kind kind() const;
+ /**
+ * Which page is the target of this destination.
+ *
+ * \note this number is 1-based, so for a 5 pages document the
+ * valid page numbers go from 1 to 5 (both included).
+ */
+ int pageNumber() const;
+ /**
+ * The new left for the viewport of the target page, in case
+ * it is specified to be changed (see isChangeLeft() )
+ */
+ double left() const;
+ double bottom() const;
+ double right() const;
+ /**
+ * The new top for the viewport of the target page, in case
+ * it is specified to be changed (see isChangeTop() )
+ */
+ double top() const;
+ double zoom() const;
+ /**
+ * Whether the left of the viewport on the target page should
+ * be changed.
+ *
+ * \see left()
+ */
+ bool isChangeLeft() const;
+ /**
+ * Whether the top of the viewport on the target page should
+ * be changed.
+ *
+ * \see top()
+ */
+ bool isChangeTop() const;
+ /**
+ * Whether the zoom level should be changed.
+ *
+ * \see zoom()
+ */
+ bool isChangeZoom() const;
+
+ /**
+ * Return a string repesentation of this destination.
+ */
+ QString toString() const;
+
+ /**
+ * Return the name of this destination.
+ *
+ * \since 0.12
+ */
+ QString destinationName() const;
+
+ /**
+ * Assignment operator.
+ */
+ LinkDestination& operator=(const LinkDestination &other);
+
+ private:
+ QSharedDataPointer< LinkDestinationPrivate > d;
+};
+
+/**
+ * \short Encapsulates data that describes a link.
+ *
+ * This is the base class for links. It makes mandatory for inherited
+ * kind of links to reimplement the linkType() method and return the type of
+ * the link described by the reimplemented class.
+ */
+class POPPLER_QT4_EXPORT Link
+{
+ public:
+ /// \cond PRIVATE
+ Link( const QRectF &linkArea );
+ /// \endcond
+
+ /**
+ * The possible kinds of link.
+ *
+ * Inherited classes must return an unique identifier
+ */
+ enum LinkType
+ {
+ None, ///< Unknown link
+ Goto, ///< A "Go To" link
+ Execute, ///< A command to be executed
+ Browse, ///< An URL to be browsed (eg "http://poppler.freedesktop.org")
+ Action, ///< A "standard" action to be executed in the viewer
+ Sound, ///< A link representing a sound to be played
+ Movie, ///< An action to be executed on a movie
+ JavaScript ///< A JavaScript code to be interpreted \since 0.10
+ };
+
+ /**
+ * The type of this link.
+ */
+ virtual LinkType linkType() const;
+
+ /**
+ * Destructor.
+ */
+ virtual ~Link();
+
+ /**
+ * The area of a Page where the link should be active.
+ *
+ * \note this can be a null rect, in this case the link represents
+ * a general action. The area is given in 0..1 range
+ */
+ QRectF linkArea() const;
+
+ protected:
+ /// \cond PRIVATE
+ Link( LinkPrivate &dd );
+ Q_DECLARE_PRIVATE( Link )
+ LinkPrivate *d_ptr;
+ /// \endcond
+
+ private:
+ Q_DISABLE_COPY( Link )
+};
+
+
+/**
+ * \brief Viewport reaching request.
+ *
+ * With a LinkGoto link, the document requests the specified viewport to be
+ * reached (aka, displayed in a viewer). Furthermore, if a file name is specified,
+ * then the destination refers to that document (and not to the document the
+ * current LinkGoto belongs to).
+ */
+class POPPLER_QT4_EXPORT LinkGoto : public Link
+{
+ public:
+ /**
+ * Create a new Goto link.
+ *
+ * \param linkArea the active area of the link
+ * \param extFileName if not empty, the file name to be open
+ * \param destination the destination to be reached
+ */
+ LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination );
+ /**
+ * Destructor.
+ */
+ ~LinkGoto();
+
+ /**
+ * Whether the destination is in an external document
+ * (i.e. not the current document)
+ */
+ bool isExternal() const;
+ // query for goto parameters
+ /**
+ * The file name of the document the destination() refers to,
+ * or an empty string in case it refers to the current document.
+ */
+ QString fileName() const;
+ /**
+ * The destination to reach.
+ */
+ LinkDestination destination() const;
+ LinkType linkType() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkGoto )
+ Q_DISABLE_COPY( LinkGoto )
+};
+
+/**
+ * \brief Generic execution request.
+ *
+ * The LinkExecute link represent a "file name" execution request. The result
+ * depends on the \link fileName() file name\endlink:
+ * - if it is a document, then it is requested to be open
+ * - otherwise, it represents an executable to be run with the specified parameters
+ */
+class POPPLER_QT4_EXPORT LinkExecute : public Link
+{
+ public:
+ /**
+ * The file name to be executed
+ */
+ QString fileName() const;
+ /**
+ * The parameters for the command.
+ */
+ QString parameters() const;
+
+ /**
+ * Create a new Execute link.
+ *
+ * \param linkArea the active area of the link
+ * \param file the file name to be open, or the program to be execute
+ * \param params the parameters for the program to execute
+ */
+ LinkExecute( const QRectF &linkArea, const QString & file, const QString & params );
+ /**
+ * Destructor.
+ */
+ ~LinkExecute();
+ LinkType linkType() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkExecute )
+ Q_DISABLE_COPY( LinkExecute )
+};
+
+/**
+ * \brief An URL to browse.
+ *
+ * The LinkBrowse link holds a URL (eg 'http://poppler.freedesktop.org',
+ * 'mailto:john@some.org', etc) to be open.
+ *
+ * The format of the URL is specified by RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt)
+ */
+class POPPLER_QT4_EXPORT LinkBrowse : public Link
+{
+ public:
+ /**
+ * The URL to open
+ */
+ QString url() const;
+
+ /**
+ * Create a new browse link.
+ *
+ * \param linkArea the active area of the link
+ * \param url the URL to be open
+ */
+ LinkBrowse( const QRectF &linkArea, const QString &url );
+ /**
+ * Destructor.
+ */
+ ~LinkBrowse();
+ LinkType linkType() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkBrowse )
+ Q_DISABLE_COPY( LinkBrowse )
+};
+
+/**
+ * \brief "Standard" action request.
+ *
+ * The LinkAction class represents a link that request a "standard" action
+ * to be performed by the viewer on the displayed document.
+ */
+class POPPLER_QT4_EXPORT LinkAction : public Link
+{
+ public:
+ /**
+ * The possible types of actions
+ */
+ enum ActionType { PageFirst = 1,
+ PagePrev = 2,
+ PageNext = 3,
+ PageLast = 4,
+ HistoryBack = 5,
+ HistoryForward = 6,
+ Quit = 7,
+ Presentation = 8,
+ EndPresentation = 9,
+ Find = 10,
+ GoToPage = 11,
+ Close = 12 };
+
+ /**
+ * The action of the current LinkAction
+ */
+ ActionType actionType() const;
+
+ /**
+ * Create a new Action link, that executes a specified action
+ * on the document.
+ *
+ * \param linkArea the active area of the link
+ * \param actionType which action should be executed
+ */
+ LinkAction( const QRectF &linkArea, ActionType actionType );
+ /**
+ * Destructor.
+ */
+ ~LinkAction();
+ LinkType linkType() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkAction )
+ Q_DISABLE_COPY( LinkAction )
+};
+
+/**
+ * Sound: a sound to be played.
+ *
+ * \since 0.6
+ */
+class POPPLER_QT4_EXPORT LinkSound : public Link
+{
+ public:
+ // create a Link_Sound
+ LinkSound( const QRectF &linkArea, double volume, bool sync, bool repeat, bool mix, SoundObject *sound );
+ /**
+ * Destructor.
+ */
+ virtual ~LinkSound();
+
+ LinkType linkType() const;
+
+ /**
+ * The volume to be used when playing the sound.
+ *
+ * The volume is in the range [ -1, 1 ], where:
+ * - a negative number: no volume (mute)
+ * - 1: full volume
+ */
+ double volume() const;
+ /**
+ * Whether the playback of the sound should be synchronous
+ * (thus blocking, waiting for the end of the sound playback).
+ */
+ bool synchronous() const;
+ /**
+ * Whether the sound should be played continuously (that is,
+ * started again when it ends)
+ */
+ bool repeat() const;
+ /**
+ * Whether the playback of this sound can be mixed with
+ * playbacks with other sounds of the same document.
+ *
+ * \note When false, any other playback must be stopped before
+ * playing the sound.
+ */
+ bool mix() const;
+ /**
+ * The sound object to be played
+ */
+ SoundObject *sound() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkSound )
+ Q_DISABLE_COPY( LinkSound )
+};
+
+/**
+ * JavaScript: a JavaScript code to be interpreted.
+ *
+ * \since 0.10
+ */
+class POPPLER_QT4_EXPORT LinkJavaScript : public Link
+{
+ public:
+ /**
+ * Create a new JavaScript link.
+ *
+ * \param linkArea the active area of the link
+ * \param js the JS code to be interpreted
+ */
+ LinkJavaScript( const QRectF &linkArea, const QString &js );
+ /**
+ * Destructor.
+ */
+ virtual ~LinkJavaScript();
+
+ LinkType linkType() const;
+
+ /**
+ * The JS code
+ */
+ QString script() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkJavaScript )
+ Q_DISABLE_COPY( LinkJavaScript )
+};
+
+#if 0
+/** Movie: Not yet defined -> think renaming to 'Media' link **/
+class POPPLER_QT4_EXPORT LinkMovie : public Link
+// TODO this (Movie link)
+{
+ public:
+ LinkMovie( const QRectF &linkArea );
+ ~LinkMovie();
+ LinkType linkType() const;
+
+ private:
+ Q_DECLARE_PRIVATE( LinkMovie )
+ Q_DISABLE_COPY( LinkMovie )
+};
+#endif
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-movie.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-movie.cc
new file mode 100644
index 00000000000..50e60f93287
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-movie.cc
@@ -0,0 +1,88 @@
+/* poppler-sound.cc: qt interface to poppler
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include "Movie.h"
+
+namespace Poppler
+{
+
+class MovieData
+{
+public:
+ MovieData()
+ : m_movieObj( 0 )
+ {
+ }
+
+ ~MovieData()
+ {
+ delete m_movieObj;
+ }
+
+ Movie *m_movieObj;
+ QSize m_size;
+ int m_rotation;
+ MovieObject::PlayMode m_playMode : 3;
+ bool m_showControls : 1;
+};
+
+MovieObject::MovieObject( AnnotMovie *ann )
+{
+ m_movieData = new MovieData();
+ m_movieData->m_movieObj = ann->getMovie()->copy();
+ ann->getMovieSize( m_movieData->m_size.rwidth(), m_movieData->m_size.rheight() );
+ m_movieData->m_rotation = ann->getRotationAngle();
+ m_movieData->m_showControls = ann->getShowControls();
+ m_movieData->m_playMode = (MovieObject::PlayMode)ann->getRepeatMode();
+}
+
+MovieObject::~MovieObject()
+{
+ delete m_movieData;
+}
+
+QString MovieObject::url() const
+{
+ GooString * goo = m_movieData->m_movieObj->getFileName();
+ return goo ? QString( goo->getCString() ) : QString();
+}
+
+QSize MovieObject::size() const
+{
+ return m_movieData->m_size;
+}
+
+int MovieObject::rotation() const
+{
+ return m_movieData->m_rotation;
+}
+
+bool MovieObject::showControls() const
+{
+ return m_movieData->m_showControls;
+}
+
+MovieObject::PlayMode MovieObject::playMode() const
+{
+ return m_movieData->m_playMode;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent-private.h
new file mode 100644
index 00000000000..98eda073077
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent-private.h
@@ -0,0 +1,121 @@
+/* poppler-optcontent-private.h: qt interface to poppler
+ *
+ * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef POPPLER_OPTCONTENT_PRIVATE_H
+#define POPPLER_OPTCONTENT_PRIVATE_H
+
+#include <QtCore/QMap>
+#include <QtCore/QSet>
+#include <QtCore/QString>
+
+class Array;
+class OCGs;
+class OptionalContentGroup;
+
+class QModelIndex;
+
+namespace Poppler
+{
+ class OptContentItem;
+ class OptContentModel;
+ class OptContentModelPrivate;
+
+ class RadioButtonGroup
+ {
+ public:
+ RadioButtonGroup( OptContentModelPrivate *ocModel, Array *rbarray);
+ ~RadioButtonGroup();
+ QSet<OptContentItem *> setItemOn( OptContentItem *itemToSetOn );
+
+ private:
+ QList<OptContentItem*> itemsInGroup;
+ };
+
+ class OptContentItem
+ {
+ public:
+ enum ItemState { On, Off, HeadingOnly };
+
+ OptContentItem( OptionalContentGroup *group );
+ OptContentItem( const QString &label );
+ OptContentItem();
+ ~OptContentItem();
+
+ QString name() const { return m_name; }
+ ItemState state() const { return m_stateBackup; }
+ bool setState(ItemState state, QSet<OptContentItem *> &changedItems);
+
+ QList<OptContentItem*> childList() { return m_children; }
+
+ void setParent( OptContentItem* parent) { m_parent = parent; }
+ OptContentItem* parent() { return m_parent; }
+
+ void addChild( OptContentItem *child );
+
+ void appendRBGroup( RadioButtonGroup *rbgroup );
+
+ bool isEnabled() const { return m_enabled; }
+
+ QSet<OptContentItem*> recurseListChildren(bool includeMe = false) const;
+
+ private:
+ OptionalContentGroup *m_group;
+ QString m_name;
+ ItemState m_state; // true for ON, false for OFF
+ ItemState m_stateBackup;
+ QList<OptContentItem*> m_children;
+ OptContentItem *m_parent;
+ QList<RadioButtonGroup*> m_rbGroups;
+ bool m_enabled;
+ };
+
+ class OptContentModelPrivate
+ {
+ public:
+ OptContentModelPrivate( OptContentModel *qq, OCGs *optContent );
+ ~OptContentModelPrivate();
+
+ void parseRBGroupsArray( Array *rBGroupArray );
+ OptContentItem *nodeFromIndex(const QModelIndex &index, bool canBeNull = false) const;
+ QModelIndex indexFromItem(OptContentItem *node, int column) const;
+
+ /**
+ Get the OptContentItem corresponding to a given reference value.
+
+ \param ref the reference number (e.g. from Object.getRefNum()) to look up
+
+ \return the matching optional content item, or null if the reference wasn't found
+ */
+ OptContentItem *itemFromRef( const QString &ref ) const;
+ void setRootNode(OptContentItem *node);
+
+ OptContentModel *q;
+
+ QMap<QString, OptContentItem*> m_optContentItems;
+ QList<RadioButtonGroup*> m_rbgroups;
+ OptContentItem *m_rootNode;
+
+ private:
+ void addChild( OptContentItem *parent, OptContentItem *child);
+ void parseOrderArray( OptContentItem *parentNode, Array *orderArray );
+ };
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.cc
new file mode 100644
index 00000000000..6a5ffe745db
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.cc
@@ -0,0 +1,428 @@
+/* poppler-optcontent.cc: qt interface to poppler
+ *
+ * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Carlos Garcia Campos <carlosgc@gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-optcontent.h"
+
+#include "poppler-optcontent-private.h"
+
+#include "poppler-private.h"
+
+#include <QtCore/QDebug>
+#include <QtCore/QtAlgorithms>
+
+#include "poppler/OptionalContent.h"
+
+namespace Poppler
+{
+
+ RadioButtonGroup::RadioButtonGroup( OptContentModelPrivate *ocModel, Array *rbarray )
+ {
+ for (int i = 0; i < rbarray->getLength(); ++i) {
+ Object ref;
+ rbarray->getNF( i, &ref );
+ if ( ! ref.isRef() ) {
+ qDebug() << "expected ref, but got:" << ref.getType();
+ }
+ OptContentItem *item = ocModel->itemFromRef( QString::number(ref.getRefNum() ) );
+ itemsInGroup.append( item );
+ }
+ for (int i = 0; i < itemsInGroup.size(); ++i) {
+ OptContentItem *item = itemsInGroup.at(i);
+ item->appendRBGroup( this );
+ }
+ }
+
+ RadioButtonGroup::~RadioButtonGroup()
+ {
+ }
+
+ QSet<OptContentItem *> RadioButtonGroup::setItemOn( OptContentItem *itemToSetOn )
+ {
+ QSet<OptContentItem *> changedItems;
+ for (int i = 0; i < itemsInGroup.size(); ++i) {
+ OptContentItem *thisItem = itemsInGroup.at(i);
+ if (thisItem != itemToSetOn) {
+ QSet<OptContentItem *> newChangedItems;
+ thisItem->setState(OptContentItem::Off, newChangedItems);
+ changedItems += newChangedItems;
+ }
+ }
+ return changedItems;
+ }
+
+
+
+ OptContentItem::OptContentItem( OptionalContentGroup *group )
+ {
+ m_group = group;
+ m_parent = 0;
+ m_name = UnicodeParsedString( group->getName() );
+ if ( group->getState() == OptionalContentGroup::On ) {
+ m_state = OptContentItem::On;
+ } else {
+ m_state = OptContentItem::Off;
+ }
+ m_stateBackup = m_state;
+ m_enabled = true;
+ }
+
+ OptContentItem::OptContentItem( const QString &label )
+ {
+ m_parent = 0;
+ m_name = label;
+ m_group = 0;
+ m_state = OptContentItem::HeadingOnly;
+ m_stateBackup = m_state;
+ m_enabled = true;
+ }
+
+ OptContentItem::OptContentItem() :
+ m_parent( 0 ), m_enabled(true)
+ {
+ }
+
+ OptContentItem::~OptContentItem()
+ {
+ }
+
+ void OptContentItem::appendRBGroup( RadioButtonGroup *rbgroup )
+ {
+ m_rbGroups.append( rbgroup );
+ }
+
+
+ bool OptContentItem::setState(ItemState state, QSet<OptContentItem *> &changedItems)
+ {
+ m_state = state;
+ m_stateBackup = m_state;
+ changedItems.insert(this);
+ QSet<OptContentItem *> empty;
+ Q_FOREACH (OptContentItem *child, m_children) {
+ ItemState oldState = child->m_stateBackup;
+ child->setState(state == OptContentItem::On ? child->m_stateBackup : OptContentItem::Off, empty);
+ child->m_enabled = state == OptContentItem::On;
+ child->m_stateBackup = oldState;
+ }
+ if (!m_group) {
+ return false;
+ }
+ if ( state == OptContentItem::On ) {
+ m_group->setState( OptionalContentGroup::On );
+ for (int i = 0; i < m_rbGroups.size(); ++i) {
+ RadioButtonGroup *rbgroup = m_rbGroups.at(i);
+ changedItems += rbgroup->setItemOn( this );
+ }
+ } else if ( state == OptContentItem::Off ) {
+ m_group->setState( OptionalContentGroup::Off );
+ }
+ return true;
+ }
+
+ void OptContentItem::addChild( OptContentItem *child )
+ {
+ m_children += child;
+ child->setParent( this );
+ }
+
+ QSet<OptContentItem*> OptContentItem::recurseListChildren(bool includeMe) const
+ {
+ QSet<OptContentItem*> ret;
+ if (includeMe) {
+ ret.insert(const_cast<OptContentItem*>(this));
+ }
+ Q_FOREACH (OptContentItem *child, m_children) {
+ ret += child->recurseListChildren(true);
+ }
+ return ret;
+ }
+
+ OptContentModelPrivate::OptContentModelPrivate( OptContentModel *qq, OCGs *optContent )
+ : q(qq)
+ {
+ m_rootNode = new OptContentItem();
+ GooList *ocgs = optContent->getOCGs();
+
+ for (int i = 0; i < ocgs->getLength(); ++i) {
+ OptionalContentGroup *ocg = static_cast<OptionalContentGroup*>(ocgs->get(i));
+ OptContentItem *node = new OptContentItem( ocg );
+ m_optContentItems.insert( QString::number(ocg->getRef().num), node);
+ }
+
+ if ( optContent->getOrderArray() == 0 ) {
+ // no Order array, so drop them all at the top level
+ QMapIterator<QString, OptContentItem*> i(m_optContentItems);
+ while ( i.hasNext() ) {
+ i.next();
+ qDebug() << "iterator" << i.key() << ":" << i.value();
+ addChild( i.value(), m_rootNode );
+ }
+ } else {
+ parseOrderArray( m_rootNode, optContent->getOrderArray() );
+ }
+
+ parseRBGroupsArray( optContent->getRBGroupsArray() );
+ }
+
+ OptContentModelPrivate::~OptContentModelPrivate()
+ {
+ qDeleteAll( m_optContentItems );
+ qDeleteAll( m_rbgroups );
+ delete m_rootNode;
+ }
+
+ void OptContentModelPrivate::parseOrderArray( OptContentItem *parentNode, Array *orderArray )
+ {
+ OptContentItem *lastItem = parentNode;
+ for (int i = 0; i < orderArray->getLength(); ++i) {
+ Object orderItem;
+ orderArray->get(i, &orderItem);
+ if ( orderItem.isDict() ) {
+ Object item;
+ orderArray->getNF(i, &item);
+ if (item.isRef() ) {
+ OptContentItem *ocItem = m_optContentItems.value(QString::number(item.getRefNum()), 0);
+ if (ocItem) {
+ addChild( parentNode, ocItem );
+ lastItem = ocItem;
+ } else {
+ qDebug() << "could not find group for object" << item.getRefNum();
+ }
+ }
+ item.free();
+ } else if ( (orderItem.isArray()) && (orderItem.arrayGetLength() > 0) ) {
+ parseOrderArray(lastItem, orderItem.getArray());
+ } else if ( orderItem.isString() ) {
+ GooString *label = orderItem.getString();
+ OptContentItem *header = new OptContentItem ( UnicodeParsedString ( label ) );
+ addChild( parentNode, header );
+ parentNode = header;
+ lastItem = header;
+ } else {
+ qDebug() << "something unexpected";
+ }
+ orderItem.free();
+ }
+ }
+
+ void OptContentModelPrivate::parseRBGroupsArray( Array *rBGroupArray )
+ {
+ if (! rBGroupArray) {
+ return;
+ }
+ // This is an array of array(s)
+ for (int i = 0; i < rBGroupArray->getLength(); ++i) {
+ Object rbObj;
+ rBGroupArray->get(i, &rbObj);
+ if ( ! rbObj.isArray() ) {
+ qDebug() << "expected inner array, got:" << rbObj.getType();
+ return;
+ }
+ Array *rbarray = rbObj.getArray();
+ RadioButtonGroup *rbg = new RadioButtonGroup( this, rbarray );
+ m_rbgroups.append( rbg );
+ rbObj.free();
+ }
+ }
+
+ OptContentModel::OptContentModel( OCGs *optContent, QObject *parent)
+ : QAbstractItemModel(parent)
+ {
+ d = new OptContentModelPrivate( this, optContent );
+ }
+
+ OptContentModel::~OptContentModel()
+ {
+ delete d;
+ }
+
+ void OptContentModelPrivate::setRootNode(OptContentItem *node)
+ {
+ delete m_rootNode;
+ m_rootNode = node;
+ q->reset();
+ }
+
+ QModelIndex OptContentModel::index(int row, int column, const QModelIndex &parent) const
+ {
+ if (row < 0 || column != 0) {
+ return QModelIndex();
+ }
+
+ OptContentItem *parentNode = d->nodeFromIndex( parent );
+ if (row < parentNode->childList().count()) {
+ return createIndex(row, column, parentNode->childList().at(row));
+ }
+ return QModelIndex();
+ }
+
+ QModelIndex OptContentModel::parent(const QModelIndex &child) const
+ {
+ OptContentItem *childNode = d->nodeFromIndex( child );
+ if (!childNode) {
+ return QModelIndex();
+ }
+ return d->indexFromItem(childNode->parent(), child.column());
+ }
+
+ QModelIndex OptContentModelPrivate::indexFromItem(OptContentItem *node, int column) const
+ {
+ if (!node) {
+ return QModelIndex();
+ }
+ OptContentItem *parentNode = node->parent();
+ if (!parentNode) {
+ return QModelIndex();
+ }
+ const int row = parentNode->childList().indexOf(node);
+ return q->createIndex(row, column, node);
+ }
+
+ int OptContentModel::rowCount(const QModelIndex &parent) const
+ {
+ OptContentItem *parentNode = d->nodeFromIndex( parent );
+ if (!parentNode) {
+ return 0;
+ } else {
+ return parentNode->childList().count();
+ }
+ }
+
+ int OptContentModel::columnCount(const QModelIndex &parent) const
+ {
+ return 1;
+ }
+
+
+ QVariant OptContentModel::data(const QModelIndex &index, int role) const
+ {
+ OptContentItem *node = d->nodeFromIndex(index, true);
+ if (!node) {
+ return QVariant();
+ }
+
+ switch (role) {
+ case Qt::DisplayRole:
+ return node->name();
+ break;
+ case Qt::EditRole:
+ if (node->state() == OptContentItem::On) {
+ return true;
+ } else if (node->state() == OptContentItem::Off) {
+ return false;
+ }
+ break;
+ case Qt::CheckStateRole:
+ if (node->state() == OptContentItem::On) {
+ return Qt::Checked;
+ } else if (node->state() == OptContentItem::Off) {
+ return Qt::Unchecked;
+ }
+ break;
+ }
+
+ return QVariant();
+ }
+
+ bool OptContentModel::setData ( const QModelIndex & index, const QVariant & value, int role )
+ {
+ OptContentItem *node = d->nodeFromIndex(index, true);
+ if (!node) {
+ return false;
+ }
+
+ switch (role) {
+ case Qt::CheckStateRole:
+ {
+ const bool newvalue = value.toBool();
+ if (newvalue) {
+ if (node->state() != OptContentItem::On) {
+ QSet<OptContentItem *> changedItems;
+ node->setState(OptContentItem::On, changedItems);
+ changedItems += node->recurseListChildren(false);
+ QModelIndexList indexes;
+ Q_FOREACH (OptContentItem *item, changedItems) {
+ indexes.append(d->indexFromItem(item, 0));
+ }
+ qStableSort(indexes);
+ Q_FOREACH (const QModelIndex &changedIndex, indexes) {
+ emit dataChanged(changedIndex, changedIndex);
+ }
+ return true;
+ }
+ } else {
+ if (node->state() != OptContentItem::Off) {
+ QSet<OptContentItem *> changedItems;
+ node->setState(OptContentItem::Off, changedItems);
+ changedItems += node->recurseListChildren(false);
+ QModelIndexList indexes;
+ Q_FOREACH (OptContentItem *item, changedItems) {
+ indexes.append(d->indexFromItem(item, 0));
+ }
+ qStableSort(indexes);
+ Q_FOREACH (const QModelIndex &changedIndex, indexes) {
+ emit dataChanged(changedIndex, changedIndex);
+ }
+ return true;
+ }
+ }
+ break;
+ }
+ }
+
+ return false;
+ }
+
+ Qt::ItemFlags OptContentModel::flags ( const QModelIndex & index ) const
+ {
+ OptContentItem *node = d->nodeFromIndex(index);
+ Qt::ItemFlags itemFlags = Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
+ if (node->isEnabled()) {
+ itemFlags |= Qt::ItemIsEnabled;
+ }
+ return itemFlags;
+ }
+
+ QVariant OptContentModel::headerData( int section, Qt::Orientation orientation, int role ) const
+ {
+ return QAbstractItemModel::headerData( section, orientation, role );
+ }
+
+ void OptContentModelPrivate::addChild( OptContentItem *parent, OptContentItem *child )
+ {
+ parent->addChild( child );
+ }
+
+ OptContentItem* OptContentModelPrivate::itemFromRef( const QString &ref ) const
+ {
+ return m_optContentItems.value(ref, 0);
+ }
+
+ OptContentItem* OptContentModelPrivate::nodeFromIndex(const QModelIndex &index, bool canBeNull) const
+ {
+ if (index.isValid()) {
+ return static_cast<OptContentItem *>(index.internalPointer());
+ } else {
+ return canBeNull ? 0 : m_rootNode;
+ }
+ }
+}
+
+#include "poppler-optcontent.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.h
new file mode 100644
index 00000000000..3f4785392ae
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-optcontent.h
@@ -0,0 +1,76 @@
+/* poppler-optcontent.h: qt interface to poppler
+ *
+ * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef POPPLER_OPTCONTENT_H
+#define POPPLER_OPTCONTENT_H
+
+#include <QtCore/QAbstractListModel>
+
+#include "poppler-export.h"
+
+class OCGs;
+
+namespace Poppler
+{
+ class Document;
+ class OptContentModelPrivate;
+
+ /**
+ * \brief Model for optional content
+ *
+ * OptContentModel is an item model representing the optional content items
+ * that can be found in PDF documents.
+ *
+ * The model offers a mostly read-only display of the data, allowing to
+ * enable/disable some contents setting the Qt::CheckStateRole data role.
+ *
+ * \since 0.8
+ */
+ class POPPLER_QT4_EXPORT OptContentModel : public QAbstractItemModel
+ {
+ friend class Document;
+
+ Q_OBJECT
+
+ public:
+ virtual ~OptContentModel();
+
+ QModelIndex index(int row, int column, const QModelIndex &parent) const;
+ QModelIndex parent(const QModelIndex &child) const;
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent) const;
+
+ QVariant data(const QModelIndex &index, int role) const;
+ virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
+
+ Qt::ItemFlags flags ( const QModelIndex & index ) const;
+
+ virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+
+ private:
+ OptContentModel( OCGs *optContent, QObject *parent = 0);
+
+ friend class OptContentModelPrivate;
+ OptContentModelPrivate *d;
+ };
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-private.h
new file mode 100644
index 00000000000..ecdca1702a0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-private.h
@@ -0,0 +1,49 @@
+/* poppler-page.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2007, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_PAGE_PRIVATE_H_
+#define _POPPLER_PAGE_PRIVATE_H_
+
+class QRectF;
+
+class LinkAction;
+class Page;
+
+namespace Poppler
+{
+
+class DocumentData;
+class PageTransition;
+
+class PageData {
+public:
+ Link* convertLinkActionToLink(::LinkAction * a, const QRectF &linkArea);
+
+ DocumentData *parentDoc;
+ ::Page *page;
+ int index;
+ PageTransition *transition;
+
+ static Link* convertLinkActionToLink(::LinkAction * a, DocumentData *parentDoc, const QRectF &linkArea);
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition-private.h
new file mode 100644
index 00000000000..63febb09619
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition-private.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2005, Albert Astals Cid
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+class Object;
+
+namespace Poppler {
+
+class PageTransitionParams {
+ public:
+ Object *dictObj;
+};
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.cc
new file mode 100644
index 00000000000..cde8818d67b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.cc
@@ -0,0 +1,95 @@
+/* PageTransition.cc
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "PageTransition.h"
+#include "poppler-page-transition.h"
+#include "poppler-page-transition-private.h"
+
+namespace Poppler {
+
+class PageTransitionData
+{
+ public:
+ PageTransitionData(Object *trans)
+ {
+ pt = new ::PageTransition(trans);
+ }
+
+ PageTransitionData(const PageTransitionData &ptd)
+ {
+ pt = new ::PageTransition(*ptd.pt);
+ }
+
+ ~PageTransitionData()
+ {
+ delete pt;
+ }
+
+ ::PageTransition *pt;
+};
+
+PageTransition::PageTransition(const PageTransitionParams &params)
+{
+ data = new PageTransitionData(params.dictObj);
+}
+
+PageTransition::PageTransition(const PageTransition &pt)
+{
+ data = new PageTransitionData(*pt.data);
+}
+
+PageTransition::~PageTransition()
+{
+ delete data;
+}
+
+PageTransition::Type PageTransition::type() const
+{
+ return (Poppler::PageTransition::Type)data->pt->getType();
+}
+
+int PageTransition::duration() const
+{
+ return data->pt->getDuration();
+}
+
+PageTransition::Alignment PageTransition::alignment() const
+{
+ return (Poppler::PageTransition::Alignment)data->pt->getAlignment();
+}
+
+PageTransition::Direction PageTransition::direction() const
+{
+ return (Poppler::PageTransition::Direction)data->pt->getDirection();
+}
+
+int PageTransition::angle() const
+{
+ return data->pt->getAngle();
+}
+
+double PageTransition::scale() const
+{
+ return data->pt->getScale();
+}
+bool PageTransition::isRectangular() const
+{
+ return data->pt->isRectangular();
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.h
new file mode 100644
index 00000000000..e7f39e27c6a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page-transition.h
@@ -0,0 +1,148 @@
+/* PageTransition.h
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __PAGETRANSITION_X_H__
+#define __PAGETRANSITION_X_H__
+
+#include "poppler-export.h"
+
+namespace Poppler {
+
+class PageTransitionParams;
+class PageTransitionData;
+
+/**
+ \brief Describes how a PDF file viewer shall perform the transition
+ from one page to another
+
+ In PDF files there is a way to specify if the viewer shall use
+ certain effects to perform the transition from one page to
+ another. This feature can be used, e.g., in a PDF-based beamer
+ presentation.
+
+ This utility class represents the transition effect, and can be
+ used to extract the information from a PDF object.
+*/
+
+
+class POPPLER_QT4_EXPORT PageTransition {
+ public:
+
+ /** \brief transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Type {
+ Replace = 0,
+ Split,
+ Blinds,
+ Box,
+ Wipe,
+ Dissolve,
+ Glitter,
+ Fly,
+ Push,
+ Cover,
+ Uncover,
+ Fade
+ };
+
+ /** \brief alignment of the transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Alignment {
+ Horizontal = 0,
+ Vertical
+ };
+
+ /** \brief direction of the transition effect that shall be used
+ */
+ // if changed remember to keep in sync with PageTransition.h enum
+ enum Direction {
+ Inward = 0,
+ Outward
+ };
+
+ /** \brief Construct a new PageTransition object from a page dictionary.
+
+ Users of the library will rarely need to construct a
+ PageTransition object themselves. Instead, the method
+ Poppler::Page::transition() can be used to find out if a certain
+ transition effect is specified.
+
+ @warning In case or error, this method will print an error message to stderr,
+ and construct a default object.
+
+ @param params an object whose dictionary will be read and
+ parsed. This must be a valid object, whose dictionaries are
+ accessed by the constructor. The object is only accessed by this
+ constructor, and may be deleted after the constructor returns.
+ */
+ PageTransition(const PageTransitionParams &params);
+
+ /** \brief copy constructor */
+ PageTransition(const PageTransition &pt);
+
+ /**
+ Destructor
+ */
+ ~PageTransition();
+
+ /**
+ \brief Get type of the transition.
+ */
+ Type type() const;
+
+ /**
+ \brief Get duration of the transition in seconds.
+ */
+ int duration() const;
+
+ /**
+ \brief Get dimension in which the transition effect occurs.
+ */
+ Alignment alignment() const;
+
+ /**
+ \brief Get direction of motion of the transition effect.
+ */
+ Direction direction() const;
+
+ /**
+ \brief Get direction in which the transition effect moves.
+ */
+ int angle() const;
+
+ /**
+ \brief Get starting or ending scale.
+ */
+ double scale() const;
+
+ /**
+ \brief Returns true if the area to be flown is rectangular and
+ opaque.
+ */
+ bool isRectangular() const;
+
+ private:
+ PageTransitionData *data;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page.cc
new file mode 100644
index 00000000000..9e889ce4c36
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-page.cc
@@ -0,0 +1,1325 @@
+/* poppler-page.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2005-2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+ * Copyright (C) 2006-2009, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+ * Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <poppler-qt4.h>
+
+#include <QtCore/QHash>
+#include <QtCore/QMap>
+#include <QtCore/QVarLengthArray>
+#include <QtGui/QImage>
+#include <QtGui/QPainter>
+
+#include <config.h>
+#include <PDFDoc.h>
+#include <Catalog.h>
+#include <Form.h>
+#include <ErrorCodes.h>
+#include <TextOutputDev.h>
+#include <Annot.h>
+#include <Link.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#include <splash/SplashBitmap.h>
+#include <ArthurOutputDev.h>
+#endif
+
+#include "poppler-private.h"
+#include "poppler-page-transition-private.h"
+#include "poppler-page-private.h"
+#include "poppler-link-extractor-private.h"
+#include "poppler-annotation-helper.h"
+#include "poppler-annotation-private.h"
+#include "poppler-form.h"
+
+namespace Poppler {
+
+class DummyAnnotation : public Annotation
+{
+ public:
+ DummyAnnotation()
+ : Annotation( *new AnnotationPrivate() )
+ {
+ }
+
+ virtual SubType subType() const { return A_BASE; }
+};
+
+Link* PageData::convertLinkActionToLink(::LinkAction * a, const QRectF &linkArea)
+{
+ return convertLinkActionToLink(a, parentDoc, linkArea);
+}
+
+Link* PageData::convertLinkActionToLink(::LinkAction * a, DocumentData *parentDoc, const QRectF &linkArea)
+{
+ if ( !a )
+ return NULL;
+
+ Link * popplerLink = NULL;
+ switch ( a->getKind() )
+ {
+ case actionGoTo:
+ {
+ LinkGoTo * g = (LinkGoTo *) a;
+ const LinkDestinationData ldd( g->getDest(), g->getNamedDest(), parentDoc, false );
+ // create link: no ext file, namedDest, object pointer
+ popplerLink = new LinkGoto( linkArea, QString::null, LinkDestination( ldd ) );
+ }
+ break;
+
+ case actionGoToR:
+ {
+ LinkGoToR * g = (LinkGoToR *) a;
+ // copy link file
+ const QString fileName = UnicodeParsedString( g->getFileName() );
+ const LinkDestinationData ldd( g->getDest(), g->getNamedDest(), parentDoc, !fileName.isEmpty() );
+ // ceate link: fileName, namedDest, object pointer
+ popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( ldd ) );
+ }
+ break;
+
+ case actionLaunch:
+ {
+ LinkLaunch * e = (LinkLaunch *)a;
+ GooString * p = e->getParams();
+ popplerLink = new LinkExecute( linkArea, e->getFileName()->getCString(), p ? p->getCString() : 0 );
+ }
+ break;
+
+ case actionNamed:
+ {
+ const char * name = ((LinkNamed *)a)->getName()->getCString();
+ if ( !strcmp( name, "NextPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageNext );
+ else if ( !strcmp( name, "PrevPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PagePrev );
+ else if ( !strcmp( name, "FirstPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageFirst );
+ else if ( !strcmp( name, "LastPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::PageLast );
+ else if ( !strcmp( name, "GoBack" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::HistoryBack );
+ else if ( !strcmp( name, "GoForward" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::HistoryForward );
+ else if ( !strcmp( name, "Quit" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Quit );
+ else if ( !strcmp( name, "GoToPage" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::GoToPage );
+ else if ( !strcmp( name, "Find" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Find );
+ else if ( !strcmp( name, "FullScreen" ) )
+ popplerLink = new LinkAction( linkArea, LinkAction::Presentation );
+ else if ( !strcmp( name, "Close" ) )
+ {
+ // acroread closes the document always, doesnt care whether
+ // its presentation mode or not
+ // popplerLink = new LinkAction( linkArea, LinkAction::EndPresentation );
+ popplerLink = new LinkAction( linkArea, LinkAction::Close );
+ }
+ else
+ {
+ // TODO
+ }
+ }
+ break;
+
+ case actionURI:
+ {
+ popplerLink = new LinkBrowse( linkArea, ((LinkURI *)a)->getURI()->getCString() );
+ }
+ break;
+
+ case actionSound:
+ {
+ ::LinkSound *ls = (::LinkSound *)a;
+ popplerLink = new LinkSound( linkArea, ls->getVolume(), ls->getSynchronous(), ls->getRepeat(), ls->getMix(), new SoundObject( ls->getSound() ) );
+ }
+ break;
+
+ case actionJavaScript:
+ {
+ ::LinkJavaScript *ljs = (::LinkJavaScript *)a;
+ popplerLink = new LinkJavaScript( linkArea, UnicodeParsedString(ljs->getScript()) );
+ }
+ break;
+
+ case actionMovie:
+/* TODO this (Movie link)
+ m_type = Movie;
+ LinkMovie * m = (LinkMovie *) a;
+ // copy Movie parameters (2 IDs and a const char *)
+ Ref * r = m->getAnnotRef();
+ m_refNum = r->num;
+ m_refGen = r->gen;
+ copyString( m_uri, m->getTitle()->getCString() );
+*/ break;
+
+ case actionUnknown:
+ break;
+ }
+
+ return popplerLink;
+}
+
+
+Page::Page(DocumentData *doc, int index) {
+ m_page = new PageData();
+ m_page->index = index;
+ m_page->parentDoc = doc;
+ m_page->page = doc->doc->getCatalog()->getPage(m_page->index + 1);
+ m_page->transition = 0;
+}
+
+Page::~Page()
+{
+ delete m_page->transition;
+ delete m_page;
+}
+
+QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate) const
+{
+ int rotation = (int)rotate * 90;
+ QImage img;
+ switch(m_page->parentDoc->m_backend)
+ {
+ case Poppler::Document::SplashBackend:
+ {
+#if defined(HAVE_SPLASH)
+ SplashOutputDev *splash_output = static_cast<SplashOutputDev *>(m_page->parentDoc->getOutputDev());
+
+ m_page->parentDoc->doc->displayPageSlice(splash_output, m_page->index + 1, xres, yres,
+ rotation, false, true, false, x, y, w, h);
+
+ SplashBitmap *bitmap = splash_output->getBitmap();
+ int bw = bitmap->getWidth();
+ int bh = bitmap->getHeight();
+
+ SplashColorPtr dataPtr = splash_output->getBitmap()->getDataPtr();
+
+ if (QSysInfo::BigEndian == QSysInfo::ByteOrder)
+ {
+ uchar c;
+ int count = bw * bh * 4;
+ for (int k = 0; k < count; k += 4)
+ {
+ c = dataPtr[k];
+ dataPtr[k] = dataPtr[k+3];
+ dataPtr[k+3] = c;
+
+ c = dataPtr[k+1];
+ dataPtr[k+1] = dataPtr[k+2];
+ dataPtr[k+2] = c;
+ }
+ }
+
+ // construct a qimage SHARING the raw bitmap data in memory
+ QImage tmpimg( dataPtr, bw, bh, QImage::Format_ARGB32 );
+ img = tmpimg.copy();
+ // unload underlying xpdf bitmap
+ splash_output->startPage( 0, NULL );
+#endif
+ break;
+ }
+ case Poppler::Document::ArthurBackend:
+ {
+#if defined(HAVE_SPLASH)
+ QSize size = pageSize();
+ QImage tmpimg(w == -1 ? qRound( size.width() * xres / 72.0 ) : w, h == -1 ? qRound( size.height() * yres / 72.0 ) : h, QImage::Format_ARGB32);
+
+ QPainter painter(&tmpimg);
+ if (m_page->parentDoc->m_hints & Document::Antialiasing)
+ painter.setRenderHint(QPainter::Antialiasing);
+ if (m_page->parentDoc->m_hints & Document::TextAntialiasing)
+ painter.setRenderHint(QPainter::TextAntialiasing);
+ painter.save();
+ painter.translate(x == -1 ? 0 : -x, y == -1 ? 0 : -y);
+ ArthurOutputDev arthur_output(&painter);
+ arthur_output.startDoc(m_page->parentDoc->doc->getXRef());
+ m_page->parentDoc->doc->displayPageSlice(&arthur_output,
+ m_page->index + 1,
+ xres,
+ yres,
+ rotation,
+ false,
+ true,
+ false,
+ x,
+ y,
+ w,
+ h);
+ painter.restore();
+ painter.end();
+ img = tmpimg;
+#endif
+ break;
+ }
+ }
+
+ return img;
+}
+
+QImage Page::thumbnail() const
+{
+ unsigned char* data = 0;
+ int w = 0;
+ int h = 0;
+ int rowstride = 0;
+ GBool r = m_page->page->loadThumb(&data, &w, &h, &rowstride);
+ QImage ret;
+ if (r)
+ {
+ // first construct a temporary image with the data got,
+ // then force a copy of it so we can free the raw thumbnail data
+ ret = QImage(data, w, h, rowstride, QImage::Format_RGB888).copy();
+ gfree(data);
+ }
+ return ret;
+}
+
+QString Page::text(const QRectF &r) const
+{
+ TextOutputDev *output_dev;
+ GooString *s;
+ PDFRectangle *rect;
+ QString result;
+
+ output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+ m_page->parentDoc->doc->displayPageSlice(output_dev, m_page->index + 1, 72, 72,
+ 0, false, true, false, -1, -1, -1, -1);
+ if (r.isNull())
+ {
+ rect = m_page->page->getCropBox();
+ s = output_dev->getText(rect->x1, rect->y1, rect->x2, rect->y2);
+ }
+ else
+ {
+ s = output_dev->getText(r.left(), r.top(), r.right(), r.bottom());
+ }
+
+ result = QString::fromUtf8(s->getCString());
+
+ delete output_dev;
+ delete s;
+ return result;
+}
+
+bool Page::search(const QString &text, QRectF &rect, SearchDirection direction, SearchMode caseSensitive, Rotation rotate) const
+{
+ const QChar * str = text.unicode();
+ int len = text.length();
+ QVector<Unicode> u(len);
+ for (int i = 0; i < len; ++i) u[i] = str[i].unicode();
+
+ GBool sCase;
+ if (caseSensitive == CaseSensitive) sCase = gTrue;
+ else sCase = gFalse;
+
+ bool found = false;
+ double sLeft, sTop, sRight, sBottom;
+ sLeft = rect.left();
+ sTop = rect.top();
+ sRight = rect.right();
+ sBottom = rect.bottom();
+
+ int rotation = (int)rotate * 90;
+
+ // fetch ourselves a textpage
+ TextOutputDev td(NULL, gTrue, gFalse, gFalse);
+ m_page->parentDoc->doc->displayPage( &td, m_page->index + 1, 72, 72, rotation, false, true, false );
+ TextPage *textPage=td.takeText();
+
+ if (direction == FromTop)
+ found = textPage->findText( u.data(), len,
+ gTrue, gTrue, gFalse, gFalse, sCase, gFalse, &sLeft, &sTop, &sRight, &sBottom );
+ else if ( direction == NextResult )
+ found = textPage->findText( u.data(), len,
+ gFalse, gTrue, gTrue, gFalse, sCase, gFalse, &sLeft, &sTop, &sRight, &sBottom );
+ else if ( direction == PreviousResult )
+ found = textPage->findText( u.data(), len,
+ gFalse, gTrue, gTrue, gFalse, sCase, gTrue, &sLeft, &sTop, &sRight, &sBottom );
+
+ textPage->decRefCnt();
+
+ rect.setLeft( sLeft );
+ rect.setTop( sTop );
+ rect.setRight( sRight );
+ rect.setBottom( sBottom );
+
+ return found;
+}
+
+QList<TextBox*> Page::textList(Rotation rotate) const
+{
+ TextOutputDev *output_dev;
+
+ QList<TextBox*> output_list;
+
+ output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+
+ int rotation = (int)rotate * 90;
+
+ m_page->parentDoc->doc->displayPageSlice(output_dev, m_page->index + 1, 72, 72,
+ rotation, false, false, false, -1, -1, -1, -1);
+
+ TextWordList *word_list = output_dev->makeWordList();
+
+ if (!word_list) {
+ delete output_dev;
+ return output_list;
+ }
+
+ QHash<TextWord *, TextBox*> wordBoxMap;
+
+ for (int i = 0; i < word_list->getLength(); i++) {
+ TextWord *word = word_list->get(i);
+ GooString *gooWord = word->getText();
+ QString string = QString::fromUtf8(gooWord->getCString());
+ delete gooWord;
+ double xMin, yMin, xMax, yMax;
+ word->getBBox(&xMin, &yMin, &xMax, &yMax);
+
+ TextBox* text_box = new TextBox(string, QRectF(xMin, yMin, xMax-xMin, yMax-yMin));
+ text_box->m_data->hasSpaceAfter = word->hasSpaceAfter() == gTrue;
+ text_box->m_data->charBBoxes.reserve(word->getLength());
+ for (int j = 0; j < word->getLength(); ++j)
+ {
+ word->getCharBBox(j, &xMin, &yMin, &xMax, &yMax);
+ text_box->m_data->charBBoxes.append(QRectF(xMin, yMin, xMax-xMin, yMax-yMin));
+ }
+
+ wordBoxMap.insert(word, text_box);
+
+ output_list.append(text_box);
+ }
+
+ for (int i = 0; i < word_list->getLength(); i++) {
+ TextWord *word = word_list->get(i);
+ TextBox* text_box = wordBoxMap.value(word);
+ text_box->m_data->nextWord = wordBoxMap.value(word->nextWord());
+ }
+
+ delete word_list;
+ delete output_dev;
+
+ return output_list;
+}
+
+PageTransition *Page::transition() const
+{
+ if (!m_page->transition) {
+ Object o;
+ PageTransitionParams params;
+ params.dictObj = m_page->page->getTrans(&o);
+ if (params.dictObj->isDict()) m_page->transition = new PageTransition(params);
+ o.free();
+ }
+ return m_page->transition;
+}
+
+Link *Page::action( PageAction act ) const
+{
+ if ( act == Page::Opening || act == Page::Closing )
+ {
+ Object o;
+ m_page->page->getActions(&o);
+ if (!o.isDict())
+ {
+ o.free();
+ return 0;
+ }
+ Dict *dict = o.getDict();
+ Object o2;
+ const char *key = act == Page::Opening ? "O" : "C";
+ dict->lookup((char*)key, &o2);
+ ::LinkAction *lact = ::LinkAction::parseAction(&o2, m_page->parentDoc->doc->getCatalog()->getBaseURI() );
+ o2.free();
+ o.free();
+ Link *popplerLink = NULL;
+ if (lact != NULL)
+ {
+ popplerLink = m_page->convertLinkActionToLink(lact, QRectF());
+ delete lact;
+ }
+ return popplerLink;
+ }
+ return 0;
+}
+
+QSizeF Page::pageSizeF() const
+{
+ Page::Orientation orient = orientation();
+ if ( ( Page::Landscape == orient ) || (Page::Seascape == orient ) ) {
+ return QSizeF( m_page->page->getCropHeight(), m_page->page->getCropWidth() );
+ } else {
+ return QSizeF( m_page->page->getCropWidth(), m_page->page->getCropHeight() );
+ }
+}
+
+QSize Page::pageSize() const
+{
+ return pageSizeF().toSize();
+}
+
+Page::Orientation Page::orientation() const
+{
+ const int rotation = m_page->page->getRotate();
+ switch (rotation) {
+ case 90:
+ return Page::Landscape;
+ break;
+ case 180:
+ return Page::UpsideDown;
+ break;
+ case 270:
+ return Page::Seascape;
+ break;
+ default:
+ return Page::Portrait;
+ }
+}
+
+void Page::defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown)
+{
+ m_page->page->getDefaultCTM(CTM, dpiX, dpiY, rotate, gFalse, upsideDown);
+}
+
+QList<Link*> Page::links() const
+{
+ LinkExtractorOutputDev link_dev(m_page);
+ m_page->parentDoc->doc->processLinks(&link_dev, m_page->index + 1);
+ QList<Link*> popplerLinks = link_dev.links();
+
+ return popplerLinks;
+}
+
+QList<Annotation*> Page::annotations() const
+{
+ ::Page *pdfPage = m_page->page;
+ Annots* annots = pdfPage->getAnnots(m_page->parentDoc->doc->getCatalog());
+ const uint numAnnotations = annots->getNumAnnots();
+ if ( numAnnotations == 0 )
+ {
+ delete annots;
+ return QList<Annotation*>();
+ }
+
+ // ID to Annotation/PopupWindow maps
+ QMap< int, Annotation * > annotationsMap;
+ QHash< AnnotPopup *, PopupWindow * > popupsMap;
+ // lists of Windows and Revisions that needs resolution
+ QLinkedList< ResolveRevision > resolveRevList;
+ QLinkedList< ResolveWindow > resolvePopList;
+ QLinkedList< PostProcessText > ppTextList;
+
+ // build a normalized transform matrix for this page at 100% scale
+ GfxState * gfxState = new GfxState( 72.0, 72.0, pdfPage->getCropBox(), pdfPage->getRotate(), gTrue );
+ double * gfxCTM = gfxState->getCTM();
+ double MTX[6];
+ for ( int i = 0; i < 6; i+=2 )
+ {
+ MTX[i] = gfxCTM[i] / pdfPage->getCropWidth();
+ MTX[i+1] = gfxCTM[i+1] / pdfPage->getCropHeight();
+ }
+ delete gfxState;
+
+ /** 1 - PARSE ALL ANNOTATIONS AND POPUPS FROM THE PAGE */
+ for ( uint j = 0; j < numAnnotations; j++ )
+ {
+ // get the j-th annotation
+ Annot * ann = annots->getAnnot( j );
+ if ( !ann )
+ {
+ qDebug() << "Annot" << j << "is null.";
+ continue;
+ }
+
+ Annotation * annotation = 0;
+ int annotID = ann->getId();
+ AnnotMarkup * markupann = dynamic_cast< AnnotMarkup * >( ann );
+ bool addToPage = true; // Popup annots are added to custom queue
+
+ /** 1.1. GET Subtype */
+ Annot::AnnotSubtype subType = ann->getType();
+
+ /** 1.2. CREATE Annotation / PopupWindow and PARSE specific params */
+ switch ( subType )
+ {
+ case Annot::typeText:
+ {
+ // parse TextAnnotation params
+ AnnotText * textann = static_cast< AnnotText * >( ann );
+ TextAnnotation * t = new TextAnnotation();
+ annotation = t;
+ // -> textType
+ t->setTextType( TextAnnotation::Linked );
+ // -> textIcon
+ t->setTextIcon( QString::fromLatin1( textann->getIcon()->getCString() ) );
+ // request for postprocessing window geometry
+ PostProcessText request;
+ request.textAnnotation = t;
+ request.opened = textann->getOpen();
+ ppTextList.append( request );
+ break;
+ }
+ case Annot::typeFreeText:
+ {
+ // parse TextAnnotation params
+ AnnotFreeText * textann = static_cast< AnnotFreeText * >( ann );
+ TextAnnotation * t = new TextAnnotation();
+ annotation = t;
+ // -> textType
+ t->setTextType( TextAnnotation::InPlace );
+#if 0
+ // -> textFont
+ QString textFormat;
+ XPDFReader::lookupString( annotDict, "DA", textFormat );
+ // TODO, fill t->textFont using textFormat if not empty
+#endif
+ // -> inplaceAlign
+ t->setInplaceAlign( textann->getQuadding() );
+ // -> inplaceText (simple)
+ QString tmpstring;
+ GooString *styleString = textann->getStyleString();
+ if ( styleString )
+ tmpstring = UnicodeParsedString( styleString );
+#if 0
+ // -> inplaceText (complex override)
+ XPDFReader::lookupString( annotDict, "RC", tmpstring );
+#endif
+ t->setInplaceText( tmpstring );
+ // -> inplaceCallout
+ AnnotCalloutLine *callout = textann->getCalloutLine();
+ if ( callout )
+ {
+ QPointF tmppoint;
+ XPDFReader::transform( MTX, callout->getX1(), callout->getY1(), tmppoint );
+ t->setCalloutPoint( 0, tmppoint );
+ XPDFReader::transform( MTX, callout->getX2(), callout->getY2(), tmppoint );
+ t->setCalloutPoint( 1, tmppoint );
+ if ( AnnotCalloutMultiLine * callout_v6 = dynamic_cast< AnnotCalloutMultiLine * >( callout ) )
+ {
+ XPDFReader::transform( MTX, callout_v6->getX3(), callout_v6->getY3(), tmppoint );
+ t->setCalloutPoint( 2, tmppoint );
+ }
+ }
+ // -> inplaceIntent
+ t->setInplaceIntent( (TextAnnotation::InplaceIntent)textann->getIntent() );
+ AnnotBorderEffect *border_effect = textann->getBorderEffect();
+ if ( border_effect )
+ {
+ // -> style.effect
+ t->style.effect = (Annotation::LineEffect)border_effect->getEffectType();
+ // -> style.effectIntensity
+ t->style.effectIntensity = (int)border_effect->getIntensity();
+ }
+ break;
+ }
+ case Annot::typeLine:
+ {
+ // parse LineAnnotation params
+ AnnotLine * lineann = static_cast< AnnotLine * >( ann );
+ LineAnnotation * l = new LineAnnotation();
+ annotation = l;
+
+ // -> linePoints
+ QLinkedList<QPointF> linePoints;
+ QPointF p;
+ XPDFReader::transform( MTX, lineann->getX1(), lineann->getY1(), p );
+ linePoints.push_back( p );
+ XPDFReader::transform( MTX, lineann->getX2(), lineann->getY2(), p );
+ linePoints.push_back( p );
+ l->setLinePoints( linePoints );
+ // -> lineStartStyle
+ l->setLineStartStyle( (LineAnnotation::TermStyle)lineann->getStartStyle() );
+ // -> lineEndStyle
+ l->setLineEndStyle( (LineAnnotation::TermStyle)lineann->getEndStyle() );
+ // -> lineClosed
+ l->setLineClosed( false );
+ // -> lineInnerColor
+ l->setLineInnerColor( convertAnnotColor( lineann->getInteriorColor() ) );
+ // -> lineLeadingFwdPt
+ l->setLineLeadingForwardPoint( lineann->getLeaderLineLength() );
+ // -> lineLeadingBackPt
+ l->setLineLeadingBackPoint( lineann->getLeaderLineExtension() );
+ // -> lineShowCaption
+ l->setLineShowCaption( lineann->getCaption() );
+ // -> lineIntent
+ l->setLineIntent( (LineAnnotation::LineIntent)( lineann->getIntent() + 1 ) );
+ break;
+ }
+ case Annot::typePolygon:
+ case Annot::typePolyLine:
+ {
+ // parse LineAnnotation params
+ AnnotPolygon * polyann = static_cast< AnnotPolygon * >( ann );
+ LineAnnotation * l = new LineAnnotation();
+ annotation = l;
+
+ // -> polyPoints
+ QLinkedList<QPointF> polyPoints;
+ AnnotPath * vertices = polyann->getVertices();
+ for ( int i = 0; i < vertices->getCoordsLength(); ++i )
+ {
+ QPointF p;
+ XPDFReader::transform( MTX, vertices->getX( i ), vertices->getY( i ), p );
+ polyPoints.push_back( p );
+ }
+ l->setLinePoints( polyPoints );
+ // -> polyStartStyle
+ l->setLineStartStyle( (LineAnnotation::TermStyle)polyann->getStartStyle() );
+ // -> polyEndStyle
+ l->setLineEndStyle( (LineAnnotation::TermStyle)polyann->getEndStyle() );
+ // -> polyClosed
+ l->setLineClosed( subType == Annot::typePolygon );
+ // -> polyInnerColor
+ l->setLineInnerColor( convertAnnotColor( polyann->getInteriorColor() ) );
+ // -> polyIntent
+ switch ( polyann->getIntent() )
+ {
+ case AnnotPolygon::polygonCloud:
+ l->setLineIntent( LineAnnotation::PolygonCloud );
+ break;
+ case AnnotPolygon::polylineDimension:
+ case AnnotPolygon::polygonDimension:
+ l->setLineIntent( LineAnnotation::Dimension );
+ break;
+ }
+ break;
+ }
+ case Annot::typeSquare:
+ case Annot::typeCircle:
+ {
+ // parse GeomAnnotation params
+ AnnotGeometry * geomann = static_cast< AnnotGeometry * >( ann );
+ GeomAnnotation * g = new GeomAnnotation();
+ annotation = g;
+
+ // -> highlightType
+ if ( subType == Annot::typeSquare )
+ g->setGeomType( GeomAnnotation::InscribedSquare );
+ else if ( subType == Annot::typeCircle )
+ g->setGeomType( GeomAnnotation::InscribedCircle );
+
+ // -> geomInnerColor
+ g->setGeomInnerColor( convertAnnotColor( geomann->getInteriorColor() ) );
+
+ AnnotBorderEffect *border_effect = geomann->getBorderEffect();
+ if ( border_effect )
+ {
+ // -> style.effect
+ g->style.effect = (Annotation::LineEffect)border_effect->getEffectType();
+ // -> style.effectIntensity
+ g->style.effectIntensity = (int)border_effect->getIntensity();
+ }
+
+ // TODO RD
+
+ break;
+ }
+ case Annot::typeHighlight:
+ case Annot::typeUnderline:
+ case Annot::typeSquiggly:
+ case Annot::typeStrikeOut:
+ {
+ AnnotTextMarkup * hlann = static_cast< AnnotTextMarkup * >( ann );
+ HighlightAnnotation * h = new HighlightAnnotation();
+ annotation = h;
+
+ // -> highlightType
+ if ( subType == Annot::typeHighlight )
+ h->setHighlightType( HighlightAnnotation::Highlight );
+ else if ( subType == Annot::typeUnderline )
+ h->setHighlightType( HighlightAnnotation::Underline );
+ else if ( subType == Annot::typeSquiggly )
+ h->setHighlightType( HighlightAnnotation::Squiggly );
+ else if ( subType == Annot::typeStrikeOut )
+ h->setHighlightType( HighlightAnnotation::StrikeOut );
+
+ // -> highlightQuads
+ AnnotQuadrilaterals *hlquads = hlann->getQuadrilaterals();
+ if ( !hlquads || !hlquads->getQuadrilateralsLength() )
+ {
+ qDebug() << "Not enough quads for a Highlight annotation.";
+ delete annotation;
+ continue;
+ }
+ QList< HighlightAnnotation::Quad > quads;
+ const int quadsCount = hlquads->getQuadrilateralsLength();
+ for ( int q = 0; q < quadsCount; ++q )
+ {
+ HighlightAnnotation::Quad quad;
+ XPDFReader::transform( MTX, hlquads->getX1( q ), hlquads->getY1( q ), quad.points[ 0 ] );
+ XPDFReader::transform( MTX, hlquads->getX2( q ), hlquads->getY2( q ), quad.points[ 1 ] );
+ XPDFReader::transform( MTX, hlquads->getX3( q ), hlquads->getY3( q ), quad.points[ 2 ] );
+ XPDFReader::transform( MTX, hlquads->getX4( q ), hlquads->getY4( q ), quad.points[ 3 ] );
+ // ### PDF1.6 specs says that point are in ccw order, but in fact
+ // points 3 and 4 are swapped in every PDF around!
+ QPointF tmpPoint = quad.points[ 2 ];
+ quad.points[ 2 ] = quad.points[ 3 ];
+ quad.points[ 3 ] = tmpPoint;
+ // initialize other properties and append quad
+ quad.capStart = true; // unlinked quads are always capped
+ quad.capEnd = true; // unlinked quads are always capped
+ quad.feather = 0.1; // default feather
+ quads.append( quad );
+ }
+ h->setHighlightQuads( quads );
+ break;
+ }
+ case Annot::typeStamp:
+ {
+ AnnotStamp * stampann = static_cast< AnnotStamp * >( ann );
+ StampAnnotation * s = new StampAnnotation();
+ annotation = s;
+ // -> stampIcon
+ s->setStampIconName( QString::fromLatin1( stampann->getIcon()->getCString() ) );
+ break;
+ }
+ case Annot::typeInk:
+ {
+ // parse InkAnnotation params
+ AnnotInk * inkann = static_cast< AnnotInk * >( ann );
+ InkAnnotation * k = new InkAnnotation();
+ annotation = k;
+
+ // -> inkPaths
+ AnnotPath ** paths = inkann->getInkList();
+ if ( !paths || !inkann->getInkListLength() )
+ {
+ qDebug() << "InkList not present for ink annot";
+ delete annotation;
+ continue;
+ }
+ QList< QLinkedList<QPointF> > inkPaths;
+ const int pathsNumber = inkann->getInkListLength();
+ for ( int m = 0; m < pathsNumber; m++ )
+ {
+ // transform each path in a list of normalized points ..
+ QLinkedList<QPointF> localList;
+ AnnotPath * path = paths[ m ];
+ const int pointsNumber = path ? path->getCoordsLength() : 0;
+ for ( int n = 0; n < pointsNumber; ++n )
+ {
+ // get the x,y numbers for current point
+ double x = path->getX( n );
+ double y = path->getY( n );
+ // add normalized point to localList
+ QPointF np;
+ XPDFReader::transform( MTX, x, y, np );
+ localList.push_back( np );
+ }
+ // ..and add it to the annotation
+ inkPaths.push_back( localList );
+ }
+ k->setInkPaths( inkPaths );
+ break;
+ }
+ case Annot::typePopup:
+ {
+ AnnotPopup * popupann = static_cast< AnnotPopup * >( ann );
+
+ // create PopupWindow and add it to the popupsMap
+ PopupWindow * popup = new PopupWindow();
+ popupsMap[ popupann ] = popup;
+ addToPage = false;
+
+ // get window specific properties if any
+ popup->shown = popupann->getOpen();
+ // no need to parse parent annotation id
+ //XPDFReader::lookupIntRef( annotDict, "Parent", popup->... );
+
+ // use the 'dummy annotation' for getting other parameters
+ popup->dummyAnnotation = new DummyAnnotation();
+ annotation = popup->dummyAnnotation;
+
+ break;
+ }
+ case Annot::typeLink:
+ {
+ // parse Link params
+ AnnotLink * linkann = static_cast< AnnotLink * >( ann );
+ LinkAnnotation * l = new LinkAnnotation();
+ annotation = l;
+
+ // -> hlMode
+ l->setLinkHighlightMode( (LinkAnnotation::HighlightMode)linkann->getLinkEffect() );
+
+ // -> link region
+ // TODO
+
+ // reading link action
+ if ( !linkann->getDest()->isNull() )
+ {
+ ::LinkAction *act = ::LinkAction::parseDest( linkann->getDest() );
+ Link * popplerLink = m_page->convertLinkActionToLink( act, QRectF() );
+ delete act;
+ if ( popplerLink )
+ {
+ l->setLinkDestination( popplerLink );
+ }
+ }
+
+ break;
+ }
+ case Annot::typeCaret:
+ {
+ // parse CaretAnnotation params
+ AnnotCaret * caretann = static_cast< AnnotCaret * >( ann );
+ CaretAnnotation * c = new CaretAnnotation();
+ annotation = c;
+
+ // -> caretSymbol
+ c->setCaretSymbol( (CaretAnnotation::CaretSymbol)caretann->getSymbol() );
+
+ // TODO RD
+
+ break;
+ }
+ case Annot::typeFileAttachment:
+ {
+ AnnotFileAttachment * attachann = static_cast< AnnotFileAttachment * >( ann );
+ FileAttachmentAnnotation * f = new FileAttachmentAnnotation();
+ annotation = f;
+ // -> fileIcon
+ f->setFileIconName( QString::fromLatin1( attachann->getName()->getCString() ) );
+ // -> embeddedFile
+ EmbFile *embfile = new EmbFile( attachann->getFile(), attachann->getContents() );
+ f->setEmbeddedFile( new EmbeddedFile( embfile ) );
+ break;
+ }
+ case Annot::typeSound:
+ {
+ AnnotSound * soundann = static_cast< AnnotSound * >( ann );
+ SoundAnnotation * s = new SoundAnnotation();
+ annotation = s;
+
+ // -> soundIcon
+ s->setSoundIconName( QString::fromLatin1( soundann->getName()->getCString() ) );
+ // -> sound
+ s->setSound( new SoundObject( soundann->getSound() ) );
+
+ break;
+ }
+ case Annot::typeMovie:
+ {
+ AnnotMovie * movieann = static_cast< AnnotMovie * >( ann );
+ MovieAnnotation * m = new MovieAnnotation();
+ annotation = m;
+
+ // -> movie
+ MovieObject *movie = new MovieObject( movieann );
+ m->setMovie( movie );
+ // -> movieTitle
+ GooString * movietitle = movieann->getTitle();
+ if ( movietitle )
+ {
+ m->setMovieTitle( QString::fromLatin1( movietitle->getCString() ) );
+ }
+
+ break;
+ }
+ // special case for ignoring unknwon annotations
+ case Annot::typeUnknown:
+ continue;
+ default:
+ {
+#define CASE_FOR_TYPE( thetype ) \
+ case Annot::type ## thetype: \
+ type = #thetype ; \
+ break;
+ QByteArray type;
+ switch ( subType )
+ {
+ CASE_FOR_TYPE( Widget )
+ CASE_FOR_TYPE( Screen )
+ CASE_FOR_TYPE( PrinterMark )
+ CASE_FOR_TYPE( TrapNet )
+ CASE_FOR_TYPE( Watermark )
+ CASE_FOR_TYPE( 3D )
+ default: type = QByteArray::number( subType );
+ }
+ // MISSING: Widget, Screen, PrinterMark, TrapNet, Watermark, 3D
+ qDebug() << "Annotation" << type.constData() << "not supported.";
+ continue;
+#undef CASE_FOR_TYPE
+ }
+ }
+
+ /** 1.3. PARSE common parameters */
+ // -> boundary
+ PDFRectangle *boundary = ann->getRect();
+ // transform annotation rect to uniform coords
+ QPointF topLeft, bottomRight;
+ XPDFReader::transform( MTX, boundary->x1, boundary->y1, topLeft );
+ XPDFReader::transform( MTX, boundary->x2, boundary->y2, bottomRight );
+ QRectF boundaryRect;
+ boundaryRect.setTopLeft(topLeft);
+ boundaryRect.setBottomRight(bottomRight);
+ if ( boundaryRect.left() > boundaryRect.right() )
+ {
+ double aux = boundaryRect.left();
+ boundaryRect.setLeft( boundaryRect.right() );
+ boundaryRect.setRight(aux);
+ }
+ if ( boundaryRect.top() > boundaryRect.bottom() )
+ {
+ double aux = boundaryRect.top();
+ boundaryRect.setTop( boundaryRect.bottom() );
+ boundaryRect.setBottom(aux);
+ //annotation->rUnscaledWidth = (r[2] > r[0]) ? r[2] - r[0] : r[0] - r[2];
+ //annotation->rUnscaledHeight = (r[3] > r[1]) ? r[3] - r[1] : r[1] - r[3];
+ }
+ annotation->setBoundary( boundaryRect );
+ // -> contents
+ annotation->setContents( UnicodeParsedString( ann->getContents() ) );
+ // -> uniqueName
+ annotation->setUniqueName( UnicodeParsedString( ann->getName() ) );
+ // -> modifyDate (and -> creationDate)
+ GooString *modDate = ann->getModified();
+ if ( modDate )
+ {
+ annotation->setModificationDate( convertDate( modDate->getCString() ) );
+ }
+ if ( annotation->creationDate().isNull() && !annotation->modificationDate().isNull() )
+ annotation->setCreationDate( annotation->modificationDate() );
+ // -> flags: set the external attribute since it's embedded on file
+ int annoflags = 0;
+ annoflags |= Annotation::External;
+ // -> flags
+ int flags = ann->getFlags();
+ if ( flags & Annot::flagHidden )
+ annoflags |= Annotation::Hidden;
+ if ( flags & Annot::flagNoZoom )
+ annoflags |= Annotation::FixedSize;
+ if ( flags & Annot::flagNoRotate )
+ annoflags |= Annotation::FixedRotation;
+ if ( !( flags & Annot::flagPrint ) )
+ annoflags |= Annotation::DenyPrint;
+ if ( flags & Annot::flagReadOnly )
+ annoflags |= (Annotation::DenyWrite | Annotation::DenyDelete);
+ if ( flags & Annot::flagLocked )
+ annoflags |= Annotation::DenyDelete;
+ if ( flags & Annot::flagToggleNoView )
+ annoflags |= Annotation::ToggleHidingOnMouse;
+ annotation->setFlags( annoflags );
+ // -> style
+ AnnotBorder *border = ann->getBorder();
+ if ( border )
+ {
+ if ( border->getType() == AnnotBorder::typeArray )
+ {
+ AnnotBorderArray * border_array = static_cast< AnnotBorderArray * >( border );
+ // -> style.xCorners
+ annotation->style.xCorners = border_array->getHorizontalCorner();
+ // -> style.yCorners
+ annotation->style.yCorners = border_array->getVerticalCorner();
+ }
+ // -> style.width
+ annotation->style.width = border->getWidth();
+ // -> style.style
+ annotation->style.style = (Annotation::LineStyle)( 1 << border->getStyle() );
+#if 0
+ // -> style.marks and style.spaces
+ // TODO
+ Object dashArray;
+ bsObj.getDict()->lookup( "D", &dashArray );
+ if ( dashArray.isArray() )
+ {
+ int dashMarks = 3;
+ int dashSpaces = 0;
+ Object intObj;
+ dashArray.arrayGet( 0, &intObj );
+ if ( intObj.isInt() )
+ dashMarks = intObj.getInt();
+ intObj.free();
+ dashArray.arrayGet( 1, &intObj );
+ if ( intObj.isInt() )
+ dashSpaces = intObj.getInt();
+ intObj.free();
+ annotation->style.marks = dashMarks;
+ annotation->style.spaces = dashSpaces;
+ }
+#endif
+ }
+ // -> style.color
+ annotation->style.color = convertAnnotColor( ann->getColor() );
+
+ /** 1.4. PARSE markup { common, Popup, Revision } parameters */
+ if ( markupann )
+ {
+ // -> creationDate
+ GooString *createDate = markupann->getDate();
+ if ( createDate )
+ {
+ annotation->setCreationDate( convertDate( createDate->getCString() ) );
+ }
+ // -> style.opacity
+ annotation->style.opacity = markupann->getOpacity();
+ // -> window.title and author
+ annotation->window.title = UnicodeParsedString( markupann->getLabel() );
+ annotation->setAuthor( annotation->window.title );
+ // -> window.summary
+ annotation->window.summary = UnicodeParsedString( markupann->getSubject() );
+#if 0
+ // -> window.text
+ // TODO
+ XPDFReader::lookupString( annotDict, "RC", annotation->window.text );
+#endif
+
+ // if a popup is referenced, schedule for resolving it later
+ AnnotPopup *popup = markupann->getPopup();
+ if ( popup )
+ {
+ ResolveWindow request;
+ request.popup = popup;
+ request.annotation = annotation;
+ resolvePopList.append( request );
+ }
+
+ // if an older version is referenced, schedule for reparenting
+ int parentID = markupann->getInReplyToID();
+ if ( parentID )
+ {
+ ResolveRevision request;
+ request.nextAnnotation = annotation;
+ request.nextAnnotationID = annotID;
+ request.prevAnnotationID = parentID;
+
+ // -> request.nextScope
+ request.nextScope = Annotation::Reply;
+ switch ( markupann->getReplyTo() )
+ {
+ case AnnotMarkup::replyTypeR:
+ request.nextScope = Annotation::Reply;
+ break;
+ case AnnotMarkup::replyTypeGroup:
+ request.nextScope = Annotation::Group;
+ break;
+ }
+
+ // -> revision.type (StateModel is deduced from type, not parsed)
+ request.nextType = Annotation::None;
+ if ( subType == Annot::typeText )
+ {
+ AnnotText * textann = static_cast< AnnotText * >( ann );
+ switch ( textann->getState() )
+ {
+ case AnnotText::stateMarked:
+ request.nextType = Annotation::Marked;
+ break;
+ case AnnotText::stateUnmarked:
+ request.nextType = Annotation::Unmarked;
+ break;
+ case AnnotText::stateAccepted:
+ request.nextType = Annotation::Accepted;
+ break;
+ case AnnotText::stateRejected:
+ request.nextType = Annotation::Rejected;
+ break;
+ case AnnotText::stateCancelled:
+ request.nextType = Annotation::Cancelled;
+ break;
+ case AnnotText::stateCompleted:
+ request.nextType = Annotation::Completed;
+ break;
+ case AnnotText::stateNone:
+ case AnnotText::stateUnknown:
+ ;
+ }
+ }
+
+ // schedule for later reparenting
+ resolveRevList.append( request );
+ }
+ }
+
+ /** 1.5. ADD ANNOTATION to the annotationsMap */
+ if ( addToPage )
+ {
+ if ( annotationsMap.contains( annotID ) )
+ qDebug() << "Clash for annotations with ID:" << annotID;
+ annotationsMap[ annotID ] = annotation;
+ }
+ } // end Annotation/PopupWindow parsing loop
+
+ /** 2 - RESOLVE POPUPS (popup.* -> annotation.window) */
+ if ( !resolvePopList.isEmpty() && !popupsMap.isEmpty() )
+ {
+ QLinkedList< ResolveWindow >::iterator it = resolvePopList.begin(),
+ end = resolvePopList.end();
+ for ( ; it != end; ++it )
+ {
+ const ResolveWindow & request = *it;
+ if ( !popupsMap.contains( request.popup ) )
+ // warn aboud problems in popup resolving logic
+ qDebug() << "Cannot resolve popup"
+ << request.popup << ".";
+ else
+ {
+ // set annotation's window properties taking ones from popup
+ PopupWindow * pop = popupsMap[ request.popup ];
+ Annotation * pa = pop->dummyAnnotation;
+ Annotation::Window & w = request.annotation->window;
+
+ // transfer properties to Annotation's window
+ w.flags = pa->flags() & (Annotation::Hidden |
+ Annotation::FixedSize | Annotation::FixedRotation);
+ if ( !pop->shown )
+ w.flags |= Annotation::Hidden;
+ w.topLeft.setX(pa->boundary().left());
+ w.topLeft.setY(pa->boundary().top());
+ w.width = (int)( pa->boundary().right() - pa->boundary().left() );
+ w.height = (int)( pa->boundary().bottom() - pa->boundary().top() );
+ }
+ }
+
+ // clear data
+ QHash< AnnotPopup *, PopupWindow * >::Iterator dIt = popupsMap.begin(), dEnd = popupsMap.end();
+ for ( ; dIt != dEnd; ++dIt )
+ {
+ PopupWindow * p = dIt.value();
+ delete p->dummyAnnotation;
+ delete p;
+ }
+ }
+
+ /** 3 - RESOLVE REVISIONS (parent.revisions.append( children )) */
+ if ( !resolveRevList.isEmpty() )
+ {
+ // append children to parents
+ QVarLengthArray< int > excludeIDs( resolveRevList.count() ); // can't even reach this size
+ int excludeIndex = 0; // index in excludeIDs array
+ QLinkedList< ResolveRevision >::iterator it = resolveRevList.begin(), end = resolveRevList.end();
+ for ( ; it != end; ++it )
+ {
+ const ResolveRevision & request = *it;
+ int parentID = request.prevAnnotationID;
+ if ( !annotationsMap.contains( parentID ) )
+ // warn about problems in reparenting logic
+ qDebug() << "Cannot reparent annotation to"
+ << parentID << ".";
+ else
+ {
+ // compile and add a Revision structure to the parent annotation
+ Annotation::Revision childRevision;
+ childRevision.annotation = request.nextAnnotation;
+ childRevision.scope = request.nextScope;
+ childRevision.type = request.nextType;
+ annotationsMap[ parentID ]->revisions().append( childRevision );
+ // exclude child annotation from being rooted in page
+ excludeIDs[ excludeIndex++ ] = request.nextAnnotationID;
+ }
+ }
+
+ // prevent children from being attached to page as roots
+ for ( int i = 0; i < excludeIndex; i++ )
+ annotationsMap.remove( excludeIDs[ i ] );
+ }
+
+ /** 4 - POSTPROCESS TextAnnotations (when window geom is embedded) */
+ if ( !ppTextList.isEmpty() )
+ {
+ QLinkedList< PostProcessText >::const_iterator it = ppTextList.begin(), end = ppTextList.end();
+ for ( ; it != end; ++it )
+ {
+ const PostProcessText & request = *it;
+ Annotation::Window & window = request.textAnnotation->window;
+ // if not present, 'create' the window in-place over the annotation
+ if ( window.flags == -1 )
+ {
+ window.flags = 0;
+ QRectF geom = request.textAnnotation->boundary();
+ // initialize window geometry to annotation's one
+ window.width = (int)( geom.right() - geom.left() );
+ window.height = (int)( geom.bottom() - geom.top() );
+ window.topLeft.setX( geom.left() > 0.0 ? geom.left() : 0.0 );
+ window.topLeft.setY( geom.top() > 0.0 ? geom.top() : 0.0 );
+ }
+ // (pdf) if text is not 'opened', force window hiding. if the window
+ // was parsed from popup, the flag should already be set
+ if ( !request.opened && window.flags != -1 )
+ window.flags |= Annotation::Hidden;
+ }
+ }
+
+ delete annots;
+ /** 5 - finally RETURN ANNOTATIONS */
+ return annotationsMap.values();
+}
+
+QList<FormField*> Page::formFields() const
+{
+ QList<FormField*> fields;
+ ::Page *p = m_page->page;
+ ::FormPageWidgets * form = p->getPageWidgets();
+ int formcount = form->getNumWidgets();
+ for (int i = 0; i < formcount; ++i)
+ {
+ ::FormWidget *fm = form->getWidget(i);
+ FormField * ff = NULL;
+ switch (fm->getType())
+ {
+ case formButton:
+ {
+ ff = new FormFieldButton(m_page->parentDoc, p, static_cast<FormWidgetButton*>(fm));
+ }
+ break;
+
+ case formText:
+ {
+ ff = new FormFieldText(m_page->parentDoc, p, static_cast<FormWidgetText*>(fm));
+ }
+ break;
+
+ case formChoice:
+ {
+ ff = new FormFieldChoice(m_page->parentDoc, p, static_cast<FormWidgetChoice*>(fm));
+ }
+ break;
+
+ default: ;
+ }
+
+ if (ff)
+ fields.append(ff);
+ }
+
+ return fields;
+}
+
+double Page::duration() const
+{
+ return m_page->page->getDuration();
+}
+
+QString Page::label() const
+{
+ GooString goo;
+ if (!m_page->parentDoc->doc->getCatalog()->indexToLabel(m_page->index, &goo))
+ return QString();
+
+ return QString(goo.getCString());
+}
+
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-pdf-converter.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-pdf-converter.cc
new file mode 100644
index 00000000000..9699b75bb6c
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-pdf-converter.cc
@@ -0,0 +1,115 @@
+/* poppler-pdf-converter.cc: qt4 interface to poppler
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, 2009, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include "poppler-private.h"
+#include "poppler-converter-private.h"
+#include "poppler-qiodeviceoutstream-private.h"
+
+#include <QtCore/QFile>
+
+#include <ErrorCodes.h>
+
+namespace Poppler {
+
+class PDFConverterPrivate : public BaseConverterPrivate
+{
+ public:
+ PDFConverterPrivate();
+
+ PDFConverter::PDFOptions opts;
+};
+
+PDFConverterPrivate::PDFConverterPrivate()
+ : BaseConverterPrivate(), opts(0)
+{
+}
+
+
+PDFConverter::PDFConverter(DocumentData *document)
+ : BaseConverter(*new PDFConverterPrivate())
+{
+ Q_D(PDFConverter);
+ d->document = document;
+}
+
+PDFConverter::~PDFConverter()
+{
+}
+
+void PDFConverter::setPDFOptions(PDFConverter::PDFOptions options)
+{
+ Q_D(PDFConverter);
+ d->opts = options;
+}
+
+PDFConverter::PDFOptions PDFConverter::pdfOptions() const
+{
+ Q_D(const PDFConverter);
+ return d->opts;
+}
+
+bool PDFConverter::convert()
+{
+ Q_D(PDFConverter);
+ d->lastError = NoError;
+
+ if (d->document->locked)
+ {
+ d->lastError = FileLockedError;
+ return false;
+ }
+
+ QIODevice *dev = d->openDevice();
+ if (!dev)
+ {
+ d->lastError = OpenOutputError;
+ return false;
+ }
+
+ bool deleteFile = false;
+ if (QFile *file = qobject_cast<QFile*>(dev))
+ deleteFile = !file->exists();
+
+ int errorCode = errNone;
+ QIODeviceOutStream stream(dev);
+ if (d->opts & WithChanges)
+ {
+ errorCode = d->document->doc->saveAs(&stream);
+ }
+ else
+ {
+ errorCode = d->document->doc->saveWithoutChangesAs(&stream);
+ }
+ d->closeDevice();
+ if (errorCode != errNone)
+ {
+ if (deleteFile)
+ {
+ qobject_cast<QFile*>(dev)->remove();
+ }
+ if (errorCode == errOpenFile) d->lastError = OpenOutputError;
+ else d->lastError = NotSupportedInputFileError;
+ }
+
+ return (errorCode == errNone);
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.cc
new file mode 100644
index 00000000000..4612fcf20b9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.cc
@@ -0,0 +1,220 @@
+/* poppler-private.cc: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2006 by Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008 by Pino Toscano <pino@kde.org>
+ * Inspired on code by
+ * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-private.h"
+
+#include <QtCore/QByteArray>
+#include <QtCore/QDebug>
+#include <QtCore/QVariant>
+
+#include <Link.h>
+#include <Outline.h>
+
+namespace Poppler {
+
+ void qt4ErrorFunction(int pos, char *msg, va_list args)
+ {
+ QString emsg;
+ char buffer[1024]; // should be big enough
+
+ if (pos >= 0)
+ {
+ emsg = QString::fromLatin1("Error (%1): ").arg(pos);
+ }
+ else
+ {
+ emsg = QString::fromLatin1("Error: ");
+ }
+ qvsnprintf(buffer, sizeof(buffer) - 1, msg, args);
+ emsg += QString::fromAscii(buffer);
+ qDebug() << qPrintable(emsg);
+ }
+
+ QString unicodeToQString(Unicode* u, int len) {
+ QString ret;
+ ret.resize(len);
+ QChar* qch = (QChar*) ret.unicode();
+ for (;len;--len)
+ *qch++ = (QChar) *u++;
+ return ret;
+ }
+
+ QString UnicodeParsedString(GooString *s1) {
+ if ( !s1 || s1->getLength() == 0 )
+ return QString();
+
+ GBool isUnicode;
+ int i;
+ Unicode u;
+ QString result;
+ if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( s1->getChar(1) & 0xff ) == 0xff ) )
+ {
+ isUnicode = gTrue;
+ i = 2;
+ }
+ else
+ {
+ isUnicode = gFalse;
+ i = 0;
+ }
+ while ( i < s1->getLength() )
+ {
+ if ( isUnicode )
+ {
+ u = ( ( s1->getChar(i) & 0xff ) << 8 ) | ( s1->getChar(i+1) & 0xff );
+ i += 2;
+ }
+ else
+ {
+ u = s1->getChar(i) & 0xff;
+ ++i;
+ }
+ result += unicodeToQString( &u, 1 );
+ }
+ return result;
+ }
+
+ GooString *QStringToUnicodeGooString(const QString &s) {
+ int len = s.length() * 2 + 2;
+ char *cstring = (char *)gmallocn(len, sizeof(char));
+ cstring[0] = 0xfe;
+ cstring[1] = 0xff;
+ for (int i = 0; i < s.length(); ++i)
+ {
+ cstring[2+i*2] = s.at(i).row();
+ cstring[3+i*2] = s.at(i).cell();
+ }
+ GooString *ret = new GooString(cstring, len);
+ gfree(cstring);
+ return ret;
+ }
+
+ GooString *QStringToGooString(const QString &s) {
+ int len = s.length();
+ char *cstring = (char *)gmallocn(s.length(), sizeof(char));
+ for (int i = 0; i < len; ++i)
+ cstring[i] = s.at(i).unicode();
+ GooString *ret = new GooString(cstring, len);
+ gfree(cstring);
+ return ret;
+ }
+
+ void linkActionToTocItem( ::LinkAction * a, DocumentData * doc, QDomElement * e )
+ {
+ if ( !a || !e )
+ return;
+
+ switch ( a->getKind() )
+ {
+ case actionGoTo:
+ {
+ // page number is contained/referenced in a LinkGoTo
+ LinkGoTo * g = static_cast< LinkGoTo * >( a );
+ LinkDest * destination = g->getDest();
+ if ( !destination && g->getNamedDest() )
+ {
+ // no 'destination' but an internal 'named reference'. we could
+ // get the destination for the page now, but it's VERY time consuming,
+ // so better storing the reference and provide the viewport on demand
+ GooString *s = g->getNamedDest();
+ QChar *charArray = new QChar[s->getLength()];
+ for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
+ QString aux(charArray, s->getLength());
+ e->setAttribute( "DestinationName", aux );
+ delete[] charArray;
+ }
+ else if ( destination && destination->isOk() )
+ {
+ LinkDestinationData ldd(destination, NULL, doc, false);
+ e->setAttribute( "Destination", LinkDestination(ldd).toString() );
+ }
+ break;
+ }
+ case actionGoToR:
+ {
+ // page number is contained/referenced in a LinkGoToR
+ LinkGoToR * g = static_cast< LinkGoToR * >( a );
+ LinkDest * destination = g->getDest();
+ if ( !destination && g->getNamedDest() )
+ {
+ // no 'destination' but an internal 'named reference'. we could
+ // get the destination for the page now, but it's VERY time consuming,
+ // so better storing the reference and provide the viewport on demand
+ GooString *s = g->getNamedDest();
+ QChar *charArray = new QChar[s->getLength()];
+ for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
+ QString aux(charArray, s->getLength());
+ e->setAttribute( "DestinationName", aux );
+ delete[] charArray;
+ }
+ else if ( destination && destination->isOk() )
+ {
+ LinkDestinationData ldd(destination, NULL, doc, g->getFileName() != 0);
+ e->setAttribute( "Destination", LinkDestination(ldd).toString() );
+ }
+ e->setAttribute( "ExternalFileName", g->getFileName()->getCString() );
+ break;
+ }
+ case actionURI:
+ {
+ LinkURI * u = static_cast< LinkURI * >( a );
+ e->setAttribute( "DestinationURI", u->getURI()->getCString() );
+ }
+ default: ;
+ }
+ }
+
+ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items )
+ {
+ int numItems = items->getLength();
+ for ( int i = 0; i < numItems; ++i )
+ {
+ // iterate over every object in 'items'
+ OutlineItem * outlineItem = (OutlineItem *)items->get( i );
+
+ // 1. create element using outlineItem's title as tagName
+ QString name;
+ Unicode * uniChar = outlineItem->getTitle();
+ int titleLength = outlineItem->getTitleLength();
+ name = unicodeToQString(uniChar, titleLength);
+ if ( name.isEmpty() )
+ continue;
+
+ QDomElement item = docSyn->createElement( name );
+ parent->appendChild( item );
+
+ // 2. find the page the link refers to
+ ::LinkAction * a = outlineItem->getAction();
+ linkActionToTocItem( a, this, &item );
+
+ item.setAttribute( "Open", QVariant( (bool)outlineItem->isOpen() ).toString() );
+
+ // 3. recursively descend over children
+ outlineItem->open();
+ GooList * children = outlineItem->getKids();
+ if ( children )
+ addTocChildren( docSyn, &item, children );
+ }
+ }
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.h
new file mode 100644
index 00000000000..f148dbc70b7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-private.h
@@ -0,0 +1,325 @@
+/* poppler-private.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2006-2009 by Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2007-2009 by Pino Toscano <pino@kde.org>
+ * Inspired on code by
+ * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>
+ * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _POPPLER_PRIVATE_H_
+#define _POPPLER_PRIVATE_H_
+
+#include <QtCore/QPointer>
+#include <QtCore/QVector>
+
+#include <config.h>
+#include <GfxState.h>
+#include <GlobalParams.h>
+#include <PDFDoc.h>
+#include <FontInfo.h>
+#include <OutputDev.h>
+#include <Error.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#endif
+
+#include "poppler-qt4.h"
+
+class LinkDest;
+class FormWidget;
+
+namespace Poppler {
+
+ /* borrowed from kpdf */
+ QString unicodeToQString(Unicode* u, int len);
+
+ QString UnicodeParsedString(GooString *s1);
+
+ GooString *QStringToUnicodeGooString(const QString &s);
+
+ GooString *QStringToGooString(const QString &s);
+
+ void qt4ErrorFunction(int pos, char *msg, va_list args);
+
+ class LinkDestinationData
+ {
+ public:
+ LinkDestinationData( LinkDest *l, GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
+ : ld(l), namedDest(nd), doc(pdfdoc), externalDest(external)
+ {
+ }
+
+ LinkDest *ld;
+ GooString *namedDest;
+ Poppler::DocumentData *doc;
+ bool externalDest;
+ };
+
+ class DocumentData {
+ public:
+ DocumentData(GooString *filePath, GooString *ownerPassword, GooString *userPassword)
+ {
+ doc = new PDFDoc(filePath, ownerPassword, userPassword);
+ init(ownerPassword, userPassword);
+ }
+
+ DocumentData(const QByteArray &data, GooString *ownerPassword, GooString *userPassword)
+ {
+ Object obj;
+ fileContents = data;
+ obj.initNull();
+ MemStream *str = new MemStream((char*)fileContents.data(), 0, fileContents.length(), &obj);
+ doc = new PDFDoc(str, ownerPassword, userPassword);
+ init(ownerPassword, userPassword);
+ }
+
+ void init(GooString *ownerPassword, GooString *userPassword)
+ {
+ m_fontInfoIterator = 0;
+ m_backend = Document::SplashBackend;
+ m_outputDev = 0;
+ paperColor = Qt::white;
+ m_hints = 0;
+ m_optContentModel = 0;
+ // It might be more appropriate to delete these in PDFDoc
+ delete ownerPassword;
+ delete userPassword;
+
+ if ( count == 0 )
+ {
+ globalParams = new GlobalParams();
+ setErrorFunction(qt4ErrorFunction);
+ }
+ count ++;
+ }
+
+ ~DocumentData()
+ {
+ qDeleteAll(m_embeddedFiles);
+ delete (OptContentModel *)m_optContentModel;
+ delete doc;
+ delete m_outputDev;
+ delete m_fontInfoIterator;
+
+ count --;
+ if ( count == 0 ) delete globalParams;
+ }
+
+ OutputDev *getOutputDev()
+ {
+ if (!m_outputDev)
+ {
+ switch (m_backend)
+ {
+ case Document::ArthurBackend:
+ // create a splash backend even in case of the Arthur Backend
+ case Document::SplashBackend:
+ {
+#if defined(HAVE_SPLASH)
+ SplashColor bgColor;
+ bgColor[0] = paperColor.blue();
+ bgColor[1] = paperColor.green();
+ bgColor[2] = paperColor.red();
+ GBool AA = m_hints & Document::TextAntialiasing ? gTrue : gFalse;
+ SplashOutputDev * splashOutputDev = new SplashOutputDev(splashModeXBGR8, 4, gFalse, bgColor, gTrue, AA);
+ splashOutputDev->setVectorAntialias(m_hints & Document::Antialiasing ? gTrue : gFalse);
+ splashOutputDev->setFreeTypeHinting(m_hints & Document::TextHinting ? gTrue : gFalse);
+ splashOutputDev->startDoc(doc->getXRef());
+ m_outputDev = splashOutputDev;
+#endif
+ break;
+ }
+ }
+ }
+ return m_outputDev;
+ }
+
+ void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items );
+
+ void setPaperColor(const QColor &color)
+ {
+ if (color == paperColor)
+ return;
+
+ paperColor = color;
+ if ( m_outputDev == NULL )
+ return;
+
+ switch ( m_backend )
+ {
+ case Document::SplashBackend:
+ {
+#if defined(HAVE_SPLASH)
+ SplashOutputDev *splash_output = static_cast<SplashOutputDev *>( m_outputDev );
+ SplashColor bgColor;
+ bgColor[0] = paperColor.blue();
+ bgColor[1] = paperColor.green();
+ bgColor[2] = paperColor.red();
+ splash_output->setPaperColor(bgColor);
+#endif
+ break;
+ }
+ default: ;
+ }
+ }
+
+ void fillMembers()
+ {
+ m_fontInfoIterator = new FontIterator(0, this);
+ int numEmb = doc->getCatalog()->numEmbeddedFiles();
+ if (!(0 == numEmb)) {
+ // we have some embedded documents, build the list
+ for (int yalv = 0; yalv < numEmb; ++yalv) {
+ EmbFile *ef = doc->getCatalog()->embeddedFile(yalv);
+ m_embeddedFiles.append(new EmbeddedFile(ef));
+ }
+ }
+ }
+
+ static Document *checkDocument(DocumentData *doc);
+
+ PDFDoc *doc;
+ QByteArray fileContents;
+ bool locked;
+ FontIterator *m_fontInfoIterator;
+ Document::RenderBackend m_backend;
+ OutputDev *m_outputDev;
+ QList<EmbeddedFile*> m_embeddedFiles;
+ QPointer<OptContentModel> m_optContentModel;
+ QColor paperColor;
+ int m_hints;
+ static int count;
+ };
+
+ class FontInfoData
+ {
+ public:
+ FontInfoData()
+ {
+ isEmbedded = false;
+ isSubset = false;
+ type = FontInfo::unknown;
+ }
+
+ FontInfoData( const FontInfoData &fid )
+ {
+ fontName = fid.fontName;
+ fontFile = fid.fontFile;
+ isEmbedded = fid.isEmbedded;
+ isSubset = fid.isSubset;
+ type = fid.type;
+ embRef = fid.embRef;
+ }
+
+ FontInfoData( ::FontInfo* fi )
+ {
+ if (fi->getName()) fontName = fi->getName()->getCString();
+ if (fi->getFile()) fontFile = fi->getFile()->getCString();
+ isEmbedded = fi->getEmbedded();
+ isSubset = fi->getSubset();
+ type = (Poppler::FontInfo::Type)fi->getType();
+ embRef = fi->getEmbRef();
+ }
+
+ QString fontName;
+ QString fontFile;
+ bool isEmbedded : 1;
+ bool isSubset : 1;
+ FontInfo::Type type;
+ Ref embRef;
+ };
+
+ class FontIteratorData
+ {
+ public:
+ FontIteratorData( int startPage, DocumentData *dd )
+ : fontInfoScanner( dd->doc, startPage )
+ , totalPages( dd->doc->getNumPages() )
+ , currentPage( qMax( startPage, 0 ) - 1 )
+ {
+ }
+
+ ~FontIteratorData()
+ {
+ }
+
+ FontInfoScanner fontInfoScanner;
+ int totalPages;
+ int currentPage;
+ };
+
+ class TextBoxData
+ {
+ public:
+ TextBoxData()
+ : nextWord(0), hasSpaceAfter(false)
+ {
+ }
+
+ QString text;
+ QRectF bBox;
+ TextBox *nextWord;
+ QVector<QRectF> charBBoxes; // the boundingRect of each character
+ bool hasSpaceAfter;
+ };
+
+ class FormFieldData
+ {
+ public:
+ FormFieldData(DocumentData *_doc, ::Page *p, ::FormWidget *w) :
+ doc(_doc), page(p), fm(w), flags(0), annoflags(0)
+ {
+ }
+
+ Qt::Alignment textAlignment(Object *obj) const
+ {
+ Object tmp;
+ int align = 0;
+ if (obj->dictLookup("Q", &tmp)->isInt())
+ {
+ align = tmp.getInt();
+ }
+ tmp.free();
+ Qt::Alignment qtalign;
+ switch ( align )
+ {
+ case 1:
+ qtalign = Qt::AlignHCenter;
+ break;
+ case 2:
+ qtalign = Qt::AlignRight;
+ break;
+ case 0:
+ default:
+ qtalign = Qt::AlignLeft;
+ }
+ return qtalign;
+ }
+
+ DocumentData *doc;
+ ::Page *page;
+ ::FormWidget *fm;
+ QRectF box;
+ int flags;
+ int annoflags;
+ };
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-ps-converter.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-ps-converter.cc
new file mode 100644
index 00000000000..7a1957b1ee9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-ps-converter.cc
@@ -0,0 +1,238 @@
+/* poppler-ps-converter.cc: qt interface to poppler
+ * Copyright (C) 2007, 2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include "poppler-private.h"
+#include "poppler-converter-private.h"
+
+#include "PSOutputDev.h"
+
+static void outputToQIODevice(void *stream, char *data, int len)
+{
+ static_cast<QIODevice*>(stream)->write(data, len);
+}
+
+namespace Poppler {
+
+class PSConverterPrivate : public BaseConverterPrivate
+{
+ public:
+ PSConverterPrivate();
+
+ QList<int> pageList;
+ QString title;
+ double hDPI;
+ double vDPI;
+ int rotate;
+ int paperWidth;
+ int paperHeight;
+ int marginRight;
+ int marginBottom;
+ int marginLeft;
+ int marginTop;
+ PSConverter::PSOptions opts;
+};
+
+PSConverterPrivate::PSConverterPrivate()
+ : BaseConverterPrivate(),
+ hDPI(72), vDPI(72), rotate(0), paperWidth(-1), paperHeight(-1),
+ marginRight(0), marginBottom(0), marginLeft(0), marginTop(0),
+ opts(PSConverter::Printing)
+{
+}
+
+
+PSConverter::PSConverter(DocumentData *document)
+ : BaseConverter(*new PSConverterPrivate())
+{
+ Q_D(PSConverter);
+ d->document = document;
+}
+
+PSConverter::~PSConverter()
+{
+}
+
+void PSConverter::setPageList(const QList<int> &pageList)
+{
+ Q_D(PSConverter);
+ d->pageList = pageList;
+}
+
+void PSConverter::setTitle(const QString &title)
+{
+ Q_D(PSConverter);
+ d->title = title;
+}
+
+void PSConverter::setHDPI(double hDPI)
+{
+ Q_D(PSConverter);
+ d->hDPI = hDPI;
+}
+
+void PSConverter::setVDPI(double vDPI)
+{
+ Q_D(PSConverter);
+ d->vDPI = vDPI;
+}
+
+void PSConverter::setRotate(int rotate)
+{
+ Q_D(PSConverter);
+ d->rotate = rotate;
+}
+
+void PSConverter::setPaperWidth(int paperWidth)
+{
+ Q_D(PSConverter);
+ d->paperWidth = paperWidth;
+}
+
+void PSConverter::setPaperHeight(int paperHeight)
+{
+ Q_D(PSConverter);
+ d->paperHeight = paperHeight;
+}
+
+void PSConverter::setRightMargin(int marginRight)
+{
+ Q_D(PSConverter);
+ d->marginRight = marginRight;
+}
+
+void PSConverter::setBottomMargin(int marginBottom)
+{
+ Q_D(PSConverter);
+ d->marginBottom = marginBottom;
+}
+
+void PSConverter::setLeftMargin(int marginLeft)
+{
+ Q_D(PSConverter);
+ d->marginLeft = marginLeft;
+}
+
+void PSConverter::setTopMargin(int marginTop)
+{
+ Q_D(PSConverter);
+ d->marginTop = marginTop;
+}
+
+void PSConverter::setStrictMargins(bool strictMargins)
+{
+ Q_D(PSConverter);
+ if (strictMargins)
+ d->opts |= StrictMargins;
+ else
+ d->opts &= ~StrictMargins;
+}
+
+void PSConverter::setForceRasterize(bool forceRasterize)
+{
+ Q_D(PSConverter);
+ if (forceRasterize)
+ d->opts |= ForceRasterization;
+ else
+ d->opts &= ~ForceRasterization;
+}
+
+void PSConverter::setPSOptions(PSConverter::PSOptions options)
+{
+ Q_D(PSConverter);
+ d->opts = options;
+}
+
+PSConverter::PSOptions PSConverter::psOptions() const
+{
+ Q_D(const PSConverter);
+ return d->opts;
+}
+
+bool PSConverter::convert()
+{
+ Q_D(PSConverter);
+ d->lastError = NoError;
+
+ Q_ASSERT(!d->pageList.isEmpty());
+ Q_ASSERT(d->paperWidth != -1);
+ Q_ASSERT(d->paperHeight != -1);
+
+ if (d->document->locked)
+ {
+ d->lastError = FileLockedError;
+ return false;
+ }
+
+ QIODevice *dev = d->openDevice();
+ if (!dev)
+ {
+ d->lastError = OpenOutputError;
+ return false;
+ }
+
+ QByteArray pstitle8Bit = d->title.toLocal8Bit();
+ char* pstitlechar;
+ if (!d->title.isEmpty()) pstitlechar = pstitle8Bit.data();
+ else pstitlechar = 0;
+
+ PSOutputDev *psOut = new PSOutputDev(outputToQIODevice, dev,
+ pstitlechar,
+ d->document->doc->getXRef(),
+ d->document->doc->getCatalog(),
+ 1,
+ d->document->doc->getNumPages(),
+ psModePS,
+ d->paperWidth,
+ d->paperHeight,
+ gFalse,
+ d->marginLeft,
+ d->marginBottom,
+ d->paperWidth - d->marginRight,
+ d->paperHeight - d->marginTop,
+ (d->opts & ForceRasterization));
+
+ if (d->opts & StrictMargins)
+ {
+ double xScale = ((double)d->paperWidth - (double)d->marginLeft - (double)d->marginRight) / (double)d->paperWidth;
+ double yScale = ((double)d->paperHeight - (double)d->marginBottom - (double)d->marginTop) / (double)d->paperHeight;
+ psOut->setScale(xScale, yScale);
+ }
+
+ if (psOut->isOk())
+ {
+ GBool isPrinting = (d->opts & Printing) ? gTrue : gFalse;
+ foreach(int page, d->pageList)
+ {
+ d->document->doc->displayPage(psOut, page, d->hDPI, d->vDPI, d->rotate, gFalse, gTrue, isPrinting);
+ }
+ delete psOut;
+ d->closeDevice();
+ return true;
+ }
+ else
+ {
+ delete psOut;
+ d->closeDevice();
+ return false;
+ }
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream-private.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream-private.h
new file mode 100644
index 00000000000..e7faa2947e5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream-private.h
@@ -0,0 +1,46 @@
+/* poppler-qiodevicestream-private.h: Qt4 interface to poppler
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef POPPLER_QIODEVICESTREAM_PRIVATE_H
+#define POPPLER_QIODEVICESTREAM_PRIVATE_H
+
+#include "Object.h"
+#include "Stream.h"
+
+class QIODevice;
+
+namespace Poppler {
+
+class QIODeviceOutStream : public OutStream
+{
+ public:
+ QIODeviceOutStream(QIODevice* device);
+ virtual ~QIODeviceOutStream();
+
+ virtual void close();
+ virtual int getPos();
+ virtual void put(char c);
+ virtual void printf(const char *format, ...);
+
+ private:
+ QIODevice *m_device;
+};
+
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream.cc
new file mode 100644
index 00000000000..b0054af3ce5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qiodeviceoutstream.cc
@@ -0,0 +1,63 @@
+/* poppler-qiodevicestream.cc: Qt4 interface to poppler
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qiodeviceoutstream-private.h"
+
+#include <QtCore/QIODevice>
+
+#include <stdio.h>
+
+#define QIODeviceOutStreamBufSize 8192
+
+namespace Poppler {
+
+QIODeviceOutStream::QIODeviceOutStream(QIODevice* device)
+ : m_device(device)
+{
+}
+
+QIODeviceOutStream::~QIODeviceOutStream()
+{
+}
+
+void QIODeviceOutStream::close()
+{
+}
+
+int QIODeviceOutStream::getPos()
+{
+ return (int)m_device->pos();
+}
+
+void QIODeviceOutStream::put(char c)
+{
+ m_device->putChar(c);
+}
+
+void QIODeviceOutStream::printf(const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ char buf[QIODeviceOutStreamBufSize];
+ size_t bufsize = 0;
+ bufsize = qvsnprintf(buf, QIODeviceOutStreamBufSize - 1, format, ap);
+ va_end(ap);
+ m_device->write(buf, bufsize);
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qt4.h b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qt4.h
new file mode 100644
index 00000000000..f41e5e34e9f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-qt4.h
@@ -0,0 +1,1573 @@
+/* poppler-qt.h: qt interface to poppler
+ * Copyright (C) 2005, Net Integration Technologies, Inc.
+ * Copyright (C) 2005, 2007, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2005-2009, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+ * Copyright (C) 2006-2009, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __POPPLER_QT_H__
+#define __POPPLER_QT_H__
+
+#include "poppler-annotation.h"
+#include "poppler-link.h"
+#include "poppler-optcontent.h"
+#include "poppler-page-transition.h"
+
+#include <QtCore/QByteArray>
+#include <QtCore/QDateTime>
+#include <QtCore/QSet>
+#include <QtXml/QDomDocument>
+#include "poppler-export.h"
+
+class EmbFile;
+class Sound;
+class AnnotMovie;
+
+/**
+ The %Poppler Qt4 binding.
+*/
+namespace Poppler {
+
+ class Document;
+ class DocumentData;
+
+ class PageData;
+
+ class FormField;
+
+ class TextBoxData;
+
+ class PDFConverter;
+ class PSConverter;
+
+ /**
+ Describes the physical location of text on a document page
+
+ This very simple class describes the physical location of text
+ on the page. It consists of
+ - a QString that contains the text
+ - a QRectF that gives a box that describes where on the page
+ the text is found.
+ */
+ class POPPLER_QT4_EXPORT TextBox {
+ friend class Page;
+ public:
+ /**
+ The default constructor sets the \p text and the rectangle that
+ contains the text. Coordinated for the \p bBox are in points =
+ 1/72 of an inch.
+ */
+ TextBox(const QString& text, const QRectF &bBox);
+ /**
+ Destructor.
+ */
+ ~TextBox();
+
+ /**
+ Returns the text of this text box
+ */
+ QString text() const;
+
+ /**
+ Returns the position of the text, in point, i.e., 1/72 of
+ an inch
+
+ \since 0.8
+ */
+ QRectF boundingBox() const;
+
+ /**
+ Returns the pointer to the next text box, if there is one.
+
+ Otherwise, it returns a null pointer.
+ */
+ TextBox *nextWord() const;
+
+ /**
+ Returns the bounding box of the \p i -th characted of the word.
+ */
+ QRectF charBoundingBox(int i) const;
+
+ /**
+ Returns whether there is a space character after this text box
+ */
+ bool hasSpaceAfter() const;
+
+ private:
+ Q_DISABLE_COPY(TextBox)
+
+ TextBoxData *m_data;
+ };
+
+
+ class FontInfoData;
+ /**
+ Container class for information about a font within a PDF
+ document
+ */
+ class POPPLER_QT4_EXPORT FontInfo {
+ friend class Document;
+ public:
+ /**
+ The type of font.
+ */
+ enum Type {
+ unknown,
+ Type1,
+ Type1C,
+ Type1COT,
+ Type3,
+ TrueType,
+ TrueTypeOT,
+ CIDType0,
+ CIDType0C,
+ CIDType0COT,
+ CIDTrueType,
+ CIDTrueTypeOT
+ };
+
+ /// \cond PRIVATE
+ /**
+ Create a new font information container.
+ */
+ FontInfo();
+
+ /**
+ Create a new font information container.
+ */
+ FontInfo( const FontInfoData &fid );
+ /// \endcond
+
+ /**
+ Copy constructor.
+ */
+ FontInfo( const FontInfo &fi );
+
+ /**
+ Destructor.
+ */
+ ~FontInfo();
+
+ /**
+ The name of the font. Can be QString::null if the font has no name
+ */
+ QString name() const;
+
+ /**
+ The path of the font file used to represent this font on this system,
+ or a null string is the font is embedded
+ */
+ QString file() const;
+
+ /**
+ Whether the font is embedded in the file, or not
+
+ \return true if the font is embedded
+ */
+ bool isEmbedded() const;
+
+ /**
+ Whether the font provided is only a subset of the full
+ font or not. This only has meaning if the font is embedded.
+
+ \return true if the font is only a subset
+ */
+ bool isSubset() const;
+
+ /**
+ The type of font encoding
+
+ \return a enumerated value corresponding to the font encoding used
+
+ \sa typeName for a string equivalent
+ */
+ Type type() const;
+
+ /**
+ The name of the font encoding used
+
+ \note if you are looking for the name of the font (as opposed to the
+ encoding format used), you probably want name().
+
+ \sa type for a enumeration version
+ */
+ QString typeName() const;
+
+ /**
+ Standard assignment operator
+ */
+ FontInfo& operator=( const FontInfo &fi );
+
+ private:
+ FontInfoData *m_data;
+ };
+
+
+ class FontIteratorData;
+ /**
+ Iterator for reading the fonts in a document.
+
+ FontIterator provides a Java-style iterator for reading the fonts in a
+ document.
+
+ You can use it in the following way:
+ \code
+Poppler::FontIterator* it = doc->newFontIterator();
+while (it->hasNext()) {
+ QList<Poppler::FontInfo> fonts = it->next();
+ // do something with the fonts
+}
+// after doing the job, the iterator must be freed
+delete it;
+ \endcode
+
+ \since 0.12
+ */
+ class POPPLER_QT4_EXPORT FontIterator {
+ friend class Document;
+ friend class DocumentData;
+ public:
+ /**
+ Destructor.
+ */
+ ~FontIterator();
+
+ /**
+ Returns the fonts of the current page and then advances the iterator
+ to the next page.
+ */
+ QList<FontInfo> next();
+
+ /**
+ Checks whether there is at least one more page to iterate, ie returns
+ false when the iterator is beyond the last page.
+ */
+ bool hasNext() const;
+
+ /**
+ Returns the current page where the iterator is.
+ */
+ int currentPage() const;
+
+ private:
+ Q_DISABLE_COPY( FontIterator )
+ FontIterator( int, DocumentData *dd );
+
+ FontIteratorData *d;
+ };
+
+
+ class EmbeddedFileData;
+ /**
+ Container class for an embedded file with a PDF document
+ */
+ class POPPLER_QT4_EXPORT EmbeddedFile {
+ public:
+ /// \cond PRIVATE
+ EmbeddedFile(EmbFile *embfile);
+ /// \endcond
+
+ /**
+ Destructor.
+ */
+ ~EmbeddedFile();
+
+ /**
+ The name associated with the file
+ */
+ QString name() const;
+
+ /**
+ The description associated with the file, if any.
+
+ This will return an empty QString if there is no description element
+ */
+ QString description() const;
+
+ /**
+ The size of the file.
+
+ This will return < 0 if there is no size element
+ */
+ int size() const;
+
+ /**
+ The modification date for the embedded file, if known.
+ */
+ QDateTime modDate() const;
+
+ /**
+ The creation date for the embedded file, if known.
+ */
+ QDateTime createDate() const;
+
+ /**
+ The MD5 checksum of the file.
+
+ This will return an empty QByteArray if there is no checksum element.
+ */
+ QByteArray checksum() const;
+
+ /**
+ The MIME type of the file, if known.
+
+ \since 0.8
+ */
+ QString mimeType() const;
+
+ /**
+ The data as a byte array
+ */
+ QByteArray data();
+
+ /**
+ Is the embedded file valid?
+
+ \since 0.12
+ */
+ bool isValid() const;
+
+ /**
+ A QDataStream for the actual data?
+ */
+ //QDataStream dataStream() const;
+
+ private:
+ Q_DISABLE_COPY(EmbeddedFile)
+
+ EmbeddedFileData *m_embeddedFile;
+ };
+
+
+ /**
+ \brief A page in a document.
+
+ The Page class represents a single page within a PDF document.
+
+ You cannot construct a Page directly, but you have to use the Document
+ functions that return a new Page out of an index or a label.
+ */
+ class POPPLER_QT4_EXPORT Page {
+ friend class Document;
+ public:
+ /**
+ Destructor.
+ */
+ ~Page();
+
+ /**
+ The type of rotation to apply for an operation
+ */
+ enum Rotation { Rotate0 = 0, ///< Do not rotate
+ Rotate90 = 1, ///< Rotate 90 degrees clockwise
+ Rotate180 = 2, ///< Rotate 180 degrees
+ Rotate270 = 3 ///< Rotate 270 degrees clockwise (90 degrees counterclockwise)
+ };
+
+ /**
+ The kinds of page actions
+ */
+ enum PageAction {
+ Opening, ///< The action when a page is "opened"
+ Closing ///< The action when a page is "closed"
+ };
+
+ /**
+ Render the page to a QImage using the current
+ \link Document::renderBackend() Document renderer\endlink.
+
+ If \p x = \p y = \p w = \p h = -1, the method will automatically
+ compute the size of the image from the horizontal and vertical
+ resolutions specified in \p xres and \p yres. Otherwise, the
+ method renders only a part of the page, specified by the
+ parameters (\p x, \p y, \p w, \p h) in pixel coordinates. The returned
+ QImage then has size (\p w, \p h), independent of the page
+ size.
+
+ \param x specifies the left x-coordinate of the box, in
+ pixels.
+
+ \param y specifies the top y-coordinate of the box, in
+ pixels.
+
+ \param w specifies the width of the box, in pixels.
+
+ \param h specifies the height of the box, in pixels.
+
+ \param xres horizontal resolution of the graphics device,
+ in dots per inch
+
+ \param yres vertical resolution of the graphics device, in
+ dots per inch
+
+ \param rotate how to rotate the page
+
+ \warning The parameter (\p x, \p y, \p w, \p h) are not
+ well-tested. Unusual or meaningless parameters may lead to
+ rather unexpected results.
+
+ \returns a QImage of the page, or a null image on failure.
+
+ \since 0.6
+ */
+ QImage renderToImage(double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1, Rotation rotate = Rotate0) const;
+
+ /**
+ Get the page thumbnail if it exists.
+
+ \return a QImage of the thumbnail, or a null image
+ if the PDF does not contain one for this page
+
+ \since 0.12
+ */
+ QImage thumbnail() const;
+
+ /**
+ Returns the text that is inside a specified rectangle
+
+ \param rect the rectangle specifying the area of interest,
+ with coordinates given in points, i.e., 1/72th of an inch.
+ If rect is null, all text on the page is given
+ **/
+ QString text(const QRectF &rect) const;
+
+ /**
+ The starting point for a search
+ */
+ enum SearchDirection { FromTop, ///< Start sorting at the top of the document
+ NextResult, ///< Find the next result, moving "down the page"
+ PreviousResult ///< Find the previous result, moving "up the page"
+ };
+
+ /**
+ The type of search to perform
+ */
+ enum SearchMode { CaseSensitive, ///< Case differences cause no match in searching
+ CaseInsensitive ///< Case differences are ignored in matching
+ };
+
+ /**
+ Returns true if the specified text was found.
+
+ \param text the text the search
+ \param rect in all directions is used to return where the text was found, for NextResult and PreviousResult
+ indicates where to continue searching for
+ \param direction in which direction do the search
+ \param caseSensitive be case sensitive?
+ \param rotate the rotation to apply for the search order
+ **/
+ bool search(const QString &text, QRectF &rect, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
+
+
+ /**
+ Returns a list of text of the page
+
+ This method returns a QList of TextBoxes that contain all
+ the text of the page, with roughly one text word of text
+ per TextBox item.
+
+ For text written in western languages (left-to-right and
+ up-to-down), the QList contains the text in the proper
+ order.
+
+ \note The caller owns the text boxes and they should
+ be deleted when no longer required.
+
+ \warning This method is not tested with Asian scripts
+ */
+ QList<TextBox*> textList(Rotation rotate = Rotate0) const;
+
+ /**
+ \return The dimensions (cropbox) of the page, in points (i.e. 1/72th on an inch)
+ */
+ QSizeF pageSizeF() const;
+
+ /**
+ \return The dimensions (cropbox) of the page, in points (i.e. 1/72th on an inch)
+ */
+ QSize pageSize() const;
+
+ /**
+ Returns the transition of this page
+
+ \returns a pointer to a PageTransition structure that
+ defines how transition to this page shall be performed.
+
+ \note The PageTransition structure is owned by this page, and will
+ automatically be destroyed when this page class is
+ destroyed.
+ **/
+ PageTransition *transition() const;
+
+ /**
+ Gets the page action specified, or NULL if there is no action.
+
+ \since 0.6
+ **/
+ Link *action( PageAction act ) const;
+
+ /**
+ Types of orientations that are possible
+ */
+ enum Orientation {
+ Landscape, ///< Landscape orientation (portrait, with 90 degrees clockwise rotation )
+ Portrait, ///< Normal portrait orientation
+ Seascape, ///< Seascape orientation (portrait, with 270 degrees clockwise rotation)
+ UpsideDown ///< Upside down orientation (portrait, with 180 degrees rotation)
+ };
+
+ /**
+ The orientation of the page
+ */
+ Orientation orientation() const;
+
+ /**
+ The default CTM
+ */
+ void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown);
+
+ /**
+ Gets the links of the page
+ */
+ QList<Link*> links() const;
+
+ /**
+ Returns the annotations of the page
+ */
+ QList<Annotation*> annotations() const;
+
+ /**
+ Returns the form fields on the page
+
+ \since 0.6
+ */
+ QList<FormField*> formFields() const;
+
+ /**
+ Returns the page duration. That is the time, in seconds, that the page
+ should be displayed before the presentation automatically advances to the next page.
+ Returns < 0 if duration is not set.
+
+ \since 0.6
+ */
+ double duration() const;
+
+ /**
+ Returns the label of the page, or a null string is the page has no label.
+
+ \since 0.6
+ **/
+ QString label() const;
+
+ private:
+ Q_DISABLE_COPY(Page)
+
+ Page(DocumentData *doc, int index);
+ PageData *m_page;
+ };
+
+/**
+ \brief PDF document.
+
+ The Document class represents a PDF document: its pages, and all the global
+ properties, metadata, etc.
+
+ \section ownership Ownership of the returned objects
+
+ All the functions that returns class pointers create new object, and the
+ responsability of those is given to the callee.
+
+ The only exception is \link Poppler::Page::transition() Page::transition()\endlink.
+
+ \section document-loading Loading
+
+ To get a Document, you have to load it via the load() & loadFromData()
+ functions.
+
+ In all the functions that have passwords as arguments, they \b must be Latin1
+ encoded. If you have a password that is a UTF-8 string, you need to use
+ QString::toLatin1() (or similar) to convert the password first.
+ If you have a UTF-8 character array, consider converting it to a QString first
+ (QString::fromUtf8(), or similar) before converting to Latin1 encoding.
+
+ \section document-rendering Rendering
+
+ To render pages of a document, you have different Document functions to set
+ various options.
+
+ \subsection document-rendering-backend Backends
+
+ %Poppler offers a different backends for rendering the pages. Currently
+ there two backends (see #RenderBackend), but only the Splash engine works
+ well and has been tested.
+
+ The available rendering backends can be discovered via availableRenderBackends().
+ The current rendering backend can be changed using setRenderBackend().
+ Please note that setting a backend not listed in the available ones
+ will always result in null QImage's.
+
+ \section document-cms Color management support
+
+ %Poppler, if compiled with this support, provides functions to handle color
+ profiles.
+
+ To know whether the %Poppler version you are using has support for color
+ management, you can query Poppler::isCmsAvailable(). In case it is not
+ avilable, all the color management-related functions will either do nothing
+ or return null.
+*/
+ class POPPLER_QT4_EXPORT Document {
+ friend class Page;
+ friend class DocumentData;
+
+ public:
+ /**
+ The page mode
+ */
+ enum PageMode {
+ UseNone, ///< No mode - neither document outline nor thumbnail images are visible
+ UseOutlines, ///< Document outline visible
+ UseThumbs, ///< Thumbnail images visible
+ FullScreen, ///< Fullscreen mode (no menubar, windows controls etc)
+ UseOC, ///< Optional content group panel visible
+ UseAttach ///< Attachments panel visible
+ };
+
+ /**
+ The page layout
+ */
+ enum PageLayout {
+ NoLayout, ///< Layout not specified
+ SinglePage, ///< Display a single page
+ OneColumn, ///< Display a single column of pages
+ TwoColumnLeft, ///< Display the pages in two columns, with odd-numbered pages on the left
+ TwoColumnRight, ///< Display the pages in two columns, with odd-numbered pages on the right
+ TwoPageLeft, ///< Display the pages two at a time, with odd-numbered pages on the left
+ TwoPageRight ///< Display the pages two at a time, with odd-numbered pages on the right
+ };
+
+ /**
+ The render backends available
+
+ \since 0.6
+ */
+ enum RenderBackend {
+ SplashBackend, ///< Splash backend
+ ArthurBackend ///< Arthur (Qt4) backend
+ };
+
+ /**
+ The render hints available
+
+ \since 0.6
+ */
+ enum RenderHint {
+ Antialiasing = 0x00000001, ///< Antialiasing for graphics
+ TextAntialiasing = 0x00000002, ///< Antialiasing for text
+ TextHinting = 0x00000004 ///< Hinting for text \since 0.12.1
+ };
+ Q_DECLARE_FLAGS( RenderHints, RenderHint )
+
+ /**
+ Set a color display profile for the current document.
+
+ \param outputProfileA is a \c cmsHPROFILE of the LCMS library.
+
+ \since 0.12
+ */
+ void setColorDisplayProfile(void *outputProfileA);
+ /**
+ Set a color display profile for the current document.
+
+ \param name is the name of the display profile to set.
+
+ \since 0.12
+ */
+ void setColorDisplayProfileName(const QString &name);
+ /**
+ Return the current RGB profile.
+
+ \return a \c cmsHPROFILE of the LCMS library.
+
+ \since 0.12
+ */
+ void* colorRgbProfile() const;
+ /**
+ Return the current display profile.
+
+ \return a \c cmsHPROFILE of the LCMS library.
+
+ \since 0.12
+ */
+ void *colorDisplayProfile() const;
+
+ /**
+ Load the document from a file on disk
+
+ \param filePath the name (and path, if required) of the file to load
+ \param ownerPassword the Latin1-encoded owner password to use in
+ loading the file
+ \param userPassword the Latin1-encoded user ("open") password
+ to use in loading the file
+
+ \return the loaded document, or NULL on error
+
+ \note The caller owns the pointer to Document, and this should
+ be deleted when no longer required.
+
+ \warning The returning document may be locked if a password is required
+ to open the file, and one is not provided (as the userPassword).
+ */
+ static Document *load(const QString & filePath,
+ const QByteArray &ownerPassword=QByteArray(),
+ const QByteArray &userPassword=QByteArray());
+
+ /**
+ Load the document from memory
+
+ \param fileContents the file contents. They are copied so there is no need
+ to keep the byte array around for the full life time of
+ the document.
+ \param ownerPassword the Latin1-encoded owner password to use in
+ loading the file
+ \param userPassword the Latin1-encoded user ("open") password
+ to use in loading the file
+
+ \return the loaded document, or NULL on error
+
+ \note The caller owns the pointer to Document, and this should
+ be deleted when no longer required.
+
+ \warning The returning document may be locked if a password is required
+ to open the file, and one is not provided (as the userPassword).
+
+ \since 0.6
+ */
+ static Document *loadFromData(const QByteArray &fileContents,
+ const QByteArray &ownerPassword=QByteArray(),
+ const QByteArray &userPassword=QByteArray());
+
+ /**
+ Get a specified Page
+
+ Note that this follows the PDF standard of being zero based - if you
+ want the first page, then you need an index of zero.
+
+ \param index the page number index
+ */
+ Page *page(int index) const;
+
+ /**
+ \overload
+
+
+ The intent is that you can pass in a label like \c "ix" and
+ get the page with that label (which might be in the table of
+ contents), or pass in \c "1" and get the page that the user
+ expects (which might not be the first page, if there is a
+ title page and a table of contents).
+
+ \param label the page label
+ */
+ Page *page(const QString &label) const;
+
+ /**
+ The number of pages in the document
+ */
+ int numPages() const;
+
+ /**
+ The type of mode that should be used by the application
+ when the document is opened. Note that while this is
+ called page mode, it is really viewer application mode.
+ */
+ PageMode pageMode() const;
+
+ /**
+ The layout that pages should be shown in when the document
+ is first opened. This basically describes how pages are
+ shown relative to each other.
+ */
+ PageLayout pageLayout() const;
+
+ /**
+ Provide the passwords required to unlock the document
+
+ \param ownerPassword the Latin1-encoded owner password to use in
+ loading the file
+ \param userPassword the Latin1-encoded user ("open") password
+ to use in loading the file
+ */
+ bool unlock(const QByteArray &ownerPassword, const QByteArray &userPassword);
+
+ /**
+ Determine if the document is locked
+ */
+ bool isLocked() const;
+
+ /**
+ The date associated with the document
+
+ You would use this method with something like:
+ \code
+QDateTime created = m_doc->date("CreationDate");
+QDateTime modified = m_doc->date("ModDate");
+ \endcode
+
+ The available dates are:
+ - CreationDate: the date of creation of the document
+ - ModDate: the date of the last change in the document
+
+ \param data the type of date that is required
+ */
+ QDateTime date( const QString & data ) const;
+
+ /**
+ Get specified information associated with the document
+
+ You would use this method with something like:
+ \code
+QString title = m_doc->info("Title");
+QString subject = m_doc->info("Subject");
+ \endcode
+
+ In addition to \c Title and \c Subject, other information that may
+ be available include \c Author, \c Keywords, \c Creator and \c Producer.
+
+ \param data the information that is required
+
+ \sa infoKeys() to get a list of the available keys
+ */
+ QString info( const QString & data ) const;
+
+ /**
+ Obtain a list of the available string information keys.
+ */
+ QStringList infoKeys() const;
+
+ /**
+ Test if the document is encrypted
+ */
+ bool isEncrypted() const;
+
+ /**
+ Test if the document is linearised
+
+ In some cases, this is called "fast web view", since it
+ is mostly an optimisation for viewing over the Web.
+ */
+ bool isLinearized() const;
+
+ /**
+ Test if the permissions on the document allow it to be
+ printed
+ */
+ bool okToPrint() const;
+
+ /**
+ Test if the permissions on the document allow it to be
+ printed at high resolution
+ */
+ bool okToPrintHighRes() const;
+
+ /**
+ Test if the permissions on the document allow it to be
+ changed.
+
+ \note depending on the type of change, it may be more
+ appropriate to check other properties as well.
+ */
+ bool okToChange() const;
+
+ /**
+ Test if the permissions on the document allow the
+ contents to be copied / extracted
+ */
+ bool okToCopy() const;
+
+ /**
+ Test if the permissions on the document allow annotations
+ to be added or modified, and interactive form fields (including
+ signature fields) to be completed.
+ */
+ bool okToAddNotes() const;
+
+ /**
+ Test if the permissions on the document allow interactive
+ form fields (including signature fields) to be completed.
+
+ \note this can be true even if okToAddNotes() is false - this
+ means that only form completion is permitted.
+ */
+ bool okToFillForm() const;
+
+ /**
+ Test if the permissions on the document allow interactive
+ form fields (including signature fields) to be set, created and
+ modified
+ */
+ bool okToCreateFormFields() const;
+
+ /**
+ Test if the permissions on the document allow content extraction
+ (text and perhaps other content) for accessibility usage (eg for
+ a screen reader)
+ */
+ bool okToExtractForAccessibility() const;
+
+ /**
+ Test if the permissions on the document allow it to be
+ "assembled" - insertion, rotation and deletion of pages;
+ or creation of bookmarks and thumbnail images.
+
+ \note this can be true even if okToChange() is false
+ */
+ bool okToAssemble() const;
+
+ /**
+ The version of the PDF specification that the document
+ conforms to
+
+ \deprecated use getPdfVersion and avoid float point
+ comparisons/handling
+ */
+ Q_DECL_DEPRECATED double pdfVersion() const;
+
+ /**
+ The version of the PDF specification that the document
+ conforms to
+
+ \param major an optional pointer to a variable where store the
+ "major" number of the version
+ \param minor an optional pointer to a variable where store the
+ "minor" number of the version
+
+ \since 0.12
+ */
+ void getPdfVersion(int *major, int *minor) const;
+
+ /**
+ The fonts within the PDF document.
+
+ This is a shorthand for getting all the fonts at once.
+
+ \note this can take a very long time to run with a large
+ document. You may wish to use a FontIterator if you have more
+ than say 20 pages
+
+ \see newFontIterator()
+ */
+ QList<FontInfo> fonts() const;
+
+ /**
+ Scans for fonts within the PDF document.
+
+ \param numPages the number of pages to scan
+ \param fontList pointer to the list where the font information
+ should be placed
+
+ \note with this method you can scan for fonts only \em once for each
+ document; once the end is reached, no more scanning with this method
+ can be done
+
+ \return false if the end of the document has been reached
+
+ \deprecated this function is quite limited in its job (see note),
+ better use fonts() or newFontIterator()
+
+ \see fonts(), newFontIterator()
+ */
+ Q_DECL_DEPRECATED bool scanForFonts( int numPages, QList<FontInfo> *fontList ) const;
+
+ /**
+ Creates a new FontIterator object for font scanning.
+
+ The new iterator can be used for reading the font information of the
+ document, reading page by page.
+
+ The caller is responsible for the returned object, ie it should freed
+ it when no more useful.
+
+ \param startPage the initial page from which start reading fonts
+
+ \see fonts()
+
+ \since 0.12
+ */
+ FontIterator* newFontIterator( int startPage = 0 ) const;
+
+ /**
+ The font data if the font is an embedded one.
+
+ \since 0.10
+ */
+ QByteArray fontData(const FontInfo &font) const;
+
+ /**
+ The documents embedded within the PDF document.
+
+ \note there are two types of embedded document - this call
+ only accesses documents that are embedded at the document level.
+ */
+ QList<EmbeddedFile*> embeddedFiles() const;
+
+ /**
+ Whether there are any documents embedded in this PDF document.
+ */
+ bool hasEmbeddedFiles() const;
+
+ /**
+ Gets the table of contents (TOC) of the Document.
+
+ The caller is responsable for the returned object.
+
+ In the tree the tag name is the 'screen' name of the entry. A tag can have
+ attributes. Here follows the list of tag attributes with meaning:
+ - Destination: A string description of the referred destination
+ - DestinationName: A 'named reference' to the viewport
+ - ExternalFileName: A link to a external filename
+ - Open: A bool value that tells whether the subbranch of the item is open or not
+
+ Resolving the final destination for each item can be done in the following way:
+ - first, checking for 'Destination': if not empty, then a LinkDestination
+ can be constructed straight with it
+ - as second step, if the 'DestinationName' is not empty, then the destination
+ can be resolved using linkDestination()
+
+ Note also that if 'ExternalFileName' is not emtpy, then the destination refers
+ to that document (and not to the current one).
+
+ \returns the TOC, or NULL if the Document does not have one
+ */
+ QDomDocument *toc() const;
+
+ /**
+ Tries to resolve the named destination \p name.
+
+ \note this operation starts a search through the whole document
+
+ \returns a new LinkDestination object if the named destination was
+ actually found, or NULL otherwise
+ */
+ LinkDestination *linkDestination( const QString &name );
+
+ /**
+ Sets the paper color
+
+ \param color the new paper color
+ */
+ void setPaperColor(const QColor &color);
+ /**
+ The paper color
+
+ The default color is white.
+ */
+ QColor paperColor() const;
+
+ /**
+ Sets the backend used to render the pages.
+
+ \param backend the new rendering backend
+
+ \since 0.6
+ */
+ void setRenderBackend( RenderBackend backend );
+ /**
+ The currently set render backend
+
+ The default backend is \ref SplashBackend
+
+ \since 0.6
+ */
+ RenderBackend renderBackend() const;
+
+ /**
+ The available rendering backends.
+
+ \since 0.6
+ */
+ static QSet<RenderBackend> availableRenderBackends();
+
+ /**
+ Sets the render \p hint .
+
+ \note some hints may not be supported by some rendering backends.
+
+ \param on whether the flag should be added or removed.
+
+ \since 0.6
+ */
+ void setRenderHint( RenderHint hint, bool on = true );
+ /**
+ The currently set render hints.
+
+ \since 0.6
+ */
+ RenderHints renderHints() const;
+
+ /**
+ Gets a new PS converter for this document.
+
+ The caller gets the ownership of the returned converter.
+
+ \since 0.6
+ */
+ PSConverter *psConverter() const;
+
+ /**
+ Gets a new PDF converter for this document.
+
+ The caller gets the ownership of the returned converter.
+
+ \since 0.8
+ */
+ PDFConverter *pdfConverter() const;
+
+ /**
+ Gets the metadata stream contents
+
+ \since 0.6
+ */
+ QString metadata() const;
+
+ /**
+ Test whether this document has "optional content".
+
+ Optional content is used to optionally turn on (display)
+ and turn off (not display) some elements of the document.
+ The most common use of this is for layers in design
+ applications, but it can be used for a range of things,
+ such as not including some content in printing, and
+ displaying content in the appropriate language.
+
+ \since 0.8
+ */
+ bool hasOptionalContent() const;
+
+ /**
+ Itemviews model for optional content.
+
+ The model is owned by the document.
+
+ \since 0.8
+ */
+ OptContentModel *optionalContentModel();
+
+ /**
+ Document-level JavaScript scripts.
+
+ Returns the list of document level JavaScript scripts to be always
+ executed before any other script.
+
+ \since 0.10
+ */
+ QStringList scripts() const;
+
+ /**
+ Destructor.
+ */
+ ~Document();
+
+ private:
+ Q_DISABLE_COPY(Document)
+
+ DocumentData *m_doc;
+
+ Document(DocumentData *dataA);
+ };
+
+ class BaseConverterPrivate;
+ class PSConverterPrivate;
+ class PDFConverterPrivate;
+ /**
+ \brief Base converter.
+
+ This is the base class for the converters.
+
+ \since 0.8
+ */
+ class POPPLER_QT4_EXPORT BaseConverter
+ {
+ friend class Document;
+ public:
+ /**
+ Destructor.
+ */
+ virtual ~BaseConverter();
+
+ /** Sets the output file name. You must set this or the output device. */
+ void setOutputFileName(const QString &outputFileName);
+
+ /**
+ * Sets the output device. You must set this or the output file name.
+ *
+ * \since 0.8
+ */
+ void setOutputDevice(QIODevice *device);
+
+ /**
+ Does the conversion.
+
+ \return whether the conversion succeeded
+ */
+ virtual bool convert() = 0;
+
+ enum Error
+ {
+ NoError,
+ FileLockedError,
+ OpenOutputError,
+ NotSupportedInputFileError
+ };
+
+ /**
+ Returns the last error
+ \since 0.12.1
+ */
+ Error lastError() const;
+
+ protected:
+ /// \cond PRIVATE
+ BaseConverter(BaseConverterPrivate &dd);
+ Q_DECLARE_PRIVATE(BaseConverter)
+ BaseConverterPrivate *d_ptr;
+ /// \endcond
+
+ private:
+ Q_DISABLE_COPY(BaseConverter)
+ };
+
+ /**
+ Converts a PDF to PS
+
+ Sizes have to be in Points (1/72 inch)
+
+ If you are using QPrinter you can get paper size by doing:
+ \code
+QPrinter dummy(QPrinter::PrinterResolution);
+dummy.setFullPage(true);
+dummy.setPageSize(myPageSize);
+width = dummy.width();
+height = dummy.height();
+ \endcode
+
+ \since 0.6
+ */
+ class POPPLER_QT4_EXPORT PSConverter : public BaseConverter
+ {
+ friend class Document;
+ public:
+ /**
+ Options for the PS export.
+
+ \since 0.10
+ */
+ enum PSOption {
+ Printing = 0x00000001, ///< The PS is generated for priting purpouses
+ StrictMargins = 0x00000002,
+ ForceRasterization = 0x00000004
+ };
+ Q_DECLARE_FLAGS( PSOptions, PSOption )
+
+ /**
+ Destructor.
+ */
+ ~PSConverter();
+
+ /** Sets the list of pages to print. Mandatory. */
+ void setPageList(const QList<int> &pageList);
+
+ /**
+ Sets the title of the PS Document. Optional
+ */
+ void setTitle(const QString &title);
+
+ /**
+ Sets the horizontal DPI. Defaults to 72.0
+ */
+ void setHDPI(double hDPI);
+
+ /**
+ Sets the vertical DPI. Defaults to 72.0
+ */
+ void setVDPI(double vDPI);
+
+ /**
+ Sets the rotate. Defaults to not rotated
+ */
+ void setRotate(int rotate);
+
+ /**
+ Sets the output paper width. Has to be set.
+ */
+ void setPaperWidth(int paperWidth);
+
+ /**
+ Sets the output paper height. Has to be set.
+ */
+ void setPaperHeight(int paperHeight);
+
+ /**
+ Sets the output right margin. Defaults to 0
+ */
+ void setRightMargin(int marginRight);
+
+ /**
+ Sets the output bottom margin. Defaults to 0
+ */
+ void setBottomMargin(int marginBottom);
+
+ /**
+ Sets the output left margin. Defaults to 0
+ */
+ void setLeftMargin(int marginLeft);
+
+ /**
+ Sets the output top margin. Defaults to 0
+ */
+ void setTopMargin(int marginTop);
+
+ /**
+ Defines if margins have to be strictly followed (even if that
+ means changing aspect ratio), or if the margins can be adapted
+ to keep aspect ratio.
+
+ Defaults to false.
+ */
+ void setStrictMargins(bool strictMargins);
+
+ /** Defines if the page will be rasterized to an image before printing. Defaults to false */
+ void setForceRasterize(bool forceRasterize);
+
+ /**
+ Sets the options for the PS export.
+
+ \since 0.10
+ */
+ void setPSOptions(PSOptions options);
+ /**
+ The currently set options for the PS export.
+
+ The default flags are: Printing.
+
+ \since 0.10
+ */
+ PSOptions psOptions() const;
+
+ bool convert();
+
+ private:
+ Q_DECLARE_PRIVATE(PSConverter)
+ Q_DISABLE_COPY(PSConverter)
+
+ PSConverter(DocumentData *document);
+ };
+
+ /**
+ Converts a PDF to PDF (thus saves a copy of the document).
+
+ \since 0.8
+ */
+ class POPPLER_QT4_EXPORT PDFConverter : public BaseConverter
+ {
+ friend class Document;
+ public:
+ /**
+ Options for the PDF export.
+ */
+ enum PDFOption {
+ WithChanges = 0x00000001 ///< The changes done to the document are saved as well
+ };
+ Q_DECLARE_FLAGS( PDFOptions, PDFOption )
+
+ /**
+ Destructor.
+ */
+ virtual ~PDFConverter();
+
+ /**
+ Sets the options for the PDF export.
+ */
+ void setPDFOptions(PDFOptions options);
+ /**
+ The currently set options for the PDF export.
+ */
+ PDFOptions pdfOptions() const;
+
+ bool convert();
+
+ private:
+ Q_DECLARE_PRIVATE(PDFConverter)
+ Q_DISABLE_COPY(PDFConverter)
+
+ PDFConverter(DocumentData *document);
+ };
+
+ /**
+ Conversion from PDF date string format to QDateTime
+ */
+ POPPLER_QT4_EXPORT QDateTime convertDate( char *dateString );
+
+ /**
+ Whether the color management functions are available.
+
+ \since 0.12
+ */
+ POPPLER_QT4_EXPORT bool isCmsAvailable();
+
+ class SoundData;
+ /**
+ Container class for a sound file in a PDF document.
+
+ A sound can be either External (in that case should be loaded the file
+ whose url is represented by url() ), or Embedded, and the player has to
+ play the data contained in data().
+
+ \since 0.6
+ */
+ class POPPLER_QT4_EXPORT SoundObject {
+ public:
+ /**
+ The type of sound
+ */
+ enum SoundType {
+ External, ///< The real sound file is external
+ Embedded ///< The sound is contained in the data
+ };
+
+ /**
+ The encoding format used for the sound
+ */
+ enum SoundEncoding {
+ Raw, ///< Raw encoding, with unspecified or unsigned values in the range [ 0, 2^B - 1 ]
+ Signed, ///< Twos-complement values
+ muLaw, ///< mu-law-encoded samples
+ ALaw ///< A-law-encoded samples
+ };
+
+ /// \cond PRIVATE
+ SoundObject(Sound *popplersound);
+ /// \endcond
+
+ ~SoundObject();
+
+ /**
+ Is the sound embedded (SoundObject::Embedded) or external (SoundObject::External)?
+ */
+ SoundType soundType() const;
+
+ /**
+ The URL of the sound file to be played, in case of SoundObject::External
+ */
+ QString url() const;
+
+ /**
+ The data of the sound, in case of SoundObject::Embedded
+ */
+ QByteArray data() const;
+
+ /**
+ The sampling rate of the sound
+ */
+ double samplingRate() const;
+
+ /**
+ The number of sound channels to use to play the sound
+ */
+ int channels() const;
+
+ /**
+ The number of bits per sample value per channel
+ */
+ int bitsPerSample() const;
+
+ /**
+ The encoding used for the sound
+ */
+ SoundEncoding soundEncoding() const;
+
+ private:
+ Q_DISABLE_COPY(SoundObject)
+
+ SoundData *m_soundData;
+ };
+
+ class MovieData;
+ /**
+ Container class for a movie object in a PDF document.
+
+ \since 0.10
+ */
+ class POPPLER_QT4_EXPORT MovieObject {
+ friend class Page;
+ public:
+ /**
+ The play mode for playing the movie
+ */
+ enum PlayMode {
+ PlayOnce, ///< Play the movie once, closing the movie controls at the end
+ PlayOpen, ///< Like PlayOnce, but leaving the controls open
+ PlayRepeat, ///< Play continuously until stopped
+ PlayPalindrome ///< Play forward, then backward, then again foward and so on until stopped
+ };
+
+ ~MovieObject();
+
+ /**
+ The URL of the movie to be played
+ */
+ QString url() const;
+
+ /**
+ The size of the movie
+ */
+ QSize size() const;
+
+ /**
+ The rotation (either 0, 90, 180, or 270 degrees clockwise) for the movie,
+ */
+ int rotation() const;
+
+ /**
+ Whether show a bar with movie controls
+ */
+ bool showControls() const;
+
+ /**
+ How to play the movie
+ */
+ PlayMode playMode() const;
+
+ private:
+ /// \cond PRIVATE
+ MovieObject( AnnotMovie *ann );
+ /// \endcond
+
+ Q_DISABLE_COPY(MovieObject)
+
+ MovieData *m_movieData;
+ };
+
+}
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Document::RenderHints)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PDFConverter::PDFOptions)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PSConverter::PSOptions)
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-sound.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-sound.cc
new file mode 100644
index 00000000000..eb19b9d3bb6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-sound.cc
@@ -0,0 +1,132 @@
+/* poppler-sound.cc: qt interface to poppler
+ * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+
+#include "Object.h"
+#include "Stream.h"
+#include "Sound.h"
+
+namespace Poppler
+{
+
+class SoundData
+{
+public:
+ SoundData()
+ : m_soundObj( 0 )
+ {
+ }
+
+ ~SoundData()
+ {
+ delete m_soundObj;
+ }
+
+ SoundObject::SoundType m_type;
+ Sound *m_soundObj;
+};
+
+SoundObject::SoundObject(Sound *popplersound)
+{
+ m_soundData = new SoundData();
+ switch ( popplersound->getSoundKind() )
+ {
+ case soundEmbedded:
+ m_soundData->m_type = SoundObject::Embedded;
+ break;
+ case soundExternal:
+ default:
+ m_soundData->m_type = SoundObject::External;
+ break;
+ }
+
+ m_soundData->m_soundObj = popplersound->copy();
+}
+
+SoundObject::~SoundObject()
+{
+ delete m_soundData;
+}
+
+SoundObject::SoundType SoundObject::soundType() const
+{
+ return m_soundData->m_type;
+}
+
+QString SoundObject::url() const
+{
+ if ( m_soundData->m_type != SoundObject::External )
+ return QString();
+
+ GooString * goo = m_soundData->m_soundObj->getFileName();
+ return goo ? QString( goo->getCString() ) : QString();
+}
+
+QByteArray SoundObject::data() const
+{
+ if ( m_soundData->m_type != SoundObject::Embedded )
+ return QByteArray();
+
+ Stream *stream = m_soundData->m_soundObj->getStream();
+ stream->reset();
+ int dataLen = 0;
+ QByteArray fileArray;
+ int i;
+ while ( (i = stream->getChar()) != EOF) {
+ fileArray[dataLen] = (char)i;
+ ++dataLen;
+ }
+ fileArray.resize(dataLen);
+
+ return fileArray;
+}
+
+double SoundObject::samplingRate() const
+{
+ return m_soundData->m_soundObj->getSamplingRate();
+}
+
+int SoundObject::channels() const
+{
+ return m_soundData->m_soundObj->getChannels();
+}
+
+int SoundObject::bitsPerSample() const
+{
+ return m_soundData->m_soundObj->getBitsPerSample();
+}
+
+SoundObject::SoundEncoding SoundObject::soundEncoding() const
+{
+ switch ( m_soundData->m_soundObj->getEncoding() )
+ {
+ case soundRaw:
+ return SoundObject::Raw;
+ case soundSigned:
+ return SoundObject::Signed;
+ case soundMuLaw:
+ return SoundObject::muLaw;
+ case soundALaw:
+ return SoundObject::ALaw;
+ }
+ return SoundObject::Raw;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-textbox.cc b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-textbox.cc
new file mode 100644
index 00000000000..88cf2a9e3ef
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/src/poppler-textbox.cc
@@ -0,0 +1,63 @@
+/* poppler-qt.h: qt interface to poppler
+ * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+ * Copyright (C) 2006-2008, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "poppler-qt4.h"
+#include "poppler-private.h"
+
+namespace Poppler {
+
+TextBox::TextBox(const QString& text, const QRectF &bBox)
+{
+ m_data = new TextBoxData();
+ m_data->text = text;
+ m_data->bBox = bBox;
+}
+
+TextBox::~TextBox()
+{
+ delete m_data;
+}
+
+QString TextBox::text() const
+{
+ return m_data->text;
+}
+
+QRectF TextBox::boundingBox() const
+{
+ return m_data->bBox;
+}
+
+TextBox *TextBox::nextWord() const
+{
+ return m_data->nextWord;
+}
+
+QRectF TextBox::charBoundingBox(int i) const
+{
+ return m_data->charBBoxes.value(i);
+}
+
+bool TextBox::hasSpaceAfter() const
+{
+ return m_data->hasSpaceAfter;
+}
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/CMakeLists.txt
new file mode 100644
index 00000000000..892ec66c429
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/CMakeLists.txt
@@ -0,0 +1,56 @@
+add_definitions(${QT4_DEFINITIONS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${QT4_INCLUDE_DIR}
+)
+
+macro(QT4_ADD_SIMPLETEST exe source)
+ string(REPLACE "-" "" test_name ${exe})
+ set(${test_name}_SOURCES
+ ${source}
+ )
+ poppler_add_test(${exe} BUILD_QT4_TESTS ${${test_name}_SOURCES})
+ target_link_libraries(${exe} poppler-qt4)
+ if(MSVC)
+ target_link_libraries(${exe} poppler ${poppler_LIBS})
+ endif(MSVC)
+endmacro(QT4_ADD_SIMPLETEST)
+
+macro(QT4_ADD_QTEST exe source)
+ if (QT4_QTTEST_FOUND)
+ string(REPLACE "-" "" test_name ${exe})
+ set(${test_name}_SOURCES
+ ${source}
+ )
+ poppler_add_unittest(${exe} BUILD_QT4_TESTS ${${test_name}_SOURCES})
+ qt4_automoc(${${test_name}_SOURCES})
+ target_link_libraries(${exe} poppler-qt4 ${QT4_QTTEST_LIBRARY})
+ if(MSVC)
+ target_link_libraries(${exe} poppler ${poppler_LIBS})
+ endif(MSVC)
+ endif (QT4_QTTEST_FOUND)
+endmacro(QT4_ADD_QTEST)
+
+
+qt4_add_simpletest(test-poppler-qt4 test-poppler-qt4.cpp)
+qt4_add_simpletest(test-password-qt4 test-password-qt4.cpp)
+qt4_add_simpletest(poppler-fonts poppler-fonts.cpp)
+qt4_add_simpletest(poppler_attachments poppler-attachments.cpp)
+qt4_add_simpletest(stress-poppler-qt4 stress-poppler-qt4.cpp)
+qt4_add_simpletest(stress-poppler-dir stress-poppler-dir.cpp)
+
+qt4_add_qtest(check_attachments check_attachments.cpp)
+qt4_add_qtest(check_dateConversion check_dateConversion.cpp)
+qt4_add_qtest(check_fonts check_fonts.cpp)
+qt4_add_qtest(check_links check_links.cpp)
+qt4_add_qtest(check_metadata check_metadata.cpp)
+qt4_add_qtest(check_optcontent check_optcontent.cpp)
+qt4_add_qtest(check_pagelayout check_pagelayout.cpp)
+qt4_add_qtest(check_pagemode check_pagemode.cpp)
+qt4_add_qtest(check_password check_password.cpp)
+qt4_add_qtest(check_permissions check_permissions.cpp)
+qt4_add_qtest(check_search check_search.cpp)
+qt4_add_qtest(check_actualtext check_actualtext.cpp)
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.am
new file mode 100644
index 00000000000..763b1772bbf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.am
@@ -0,0 +1,127 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt4/src \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+LDADDS = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(FONTCONFIG_LIBS) \
+ $(POPPLER_QT4_LIBS)
+
+SUFFIXES: .moc
+
+.cpp.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+noinst_PROGRAMS = test-poppler-qt4 stress-poppler-qt4 \
+ poppler-fonts test-password-qt4 stress-poppler-dir \
+ poppler-attachments
+
+
+test_poppler_qt4_SOURCES = \
+ test-poppler-qt4.cpp
+
+test_poppler_qt4_LDADD = $(LDADDS)
+
+
+test_password_qt4_SOURCES = \
+ test-password-qt4.cpp
+
+test_password_qt4_LDADD = $(LDADDS)
+
+
+poppler_fonts_SOURCES = \
+ poppler-fonts.cpp
+
+poppler_fonts_LDADD = $(LDADDS)
+
+poppler_attachments_SOURCES = \
+ poppler-attachments.cpp
+
+poppler_attachments_LDADD = $(LDADDS)
+
+
+stress_poppler_qt4_SOURCES = \
+ stress-poppler-qt4.cpp
+
+stress_poppler_qt4_LDADD = $(LDADDS)
+
+stress_poppler_dir_SOURCES = \
+ stress-poppler-dir.cpp
+
+stress_poppler_dir_LDADD = $(LDADDS)
+
+clean-generic:
+ rm -f *.moc
+
+if BUILD_POPPLER_QT4
+TESTS = \
+ check_attachments \
+ check_actualtext \
+ check_dateConversion \
+ check_fonts \
+ check_links \
+ check_metadata \
+ check_optcontent \
+ check_permissions \
+ check_pagemode \
+ check_password \
+ check_pagelayout \
+ check_search
+
+check_PROGRAMS = $(TESTS)
+
+check_attachments_SOURCES = check_attachments.cpp
+check_attachments.$(OBJEXT): check_attachments.moc
+check_attachments_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_actualtext_SOURCES = check_actualtext.cpp
+check_actualtext.$(OBJEXT): check_actualtext.moc
+check_actualtext_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_dateConversion_SOURCES = check_dateConversion.cpp
+check_dateConversion.$(OBJEXT): check_dateConversion.moc
+check_dateConversion_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_fonts_SOURCES = check_fonts.cpp
+check_fonts.$(OBJEXT): check_fonts.moc
+check_fonts_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_links_SOURCES = check_links.cpp
+check_links.$(OBJEXT): check_links.moc
+check_links_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_metadata_SOURCES = check_metadata.cpp
+check_metadata.$(OBJEXT): check_metadata.moc
+check_metadata_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_optcontent_SOURCES = check_optcontent.cpp
+check_optcontent.$(OBJEXT): check_optcontent.moc
+check_optcontent_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_pagemode_SOURCES = check_pagemode.cpp
+check_pagemode.$(OBJEXT): check_pagemode.moc
+check_pagemode_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_permissions_SOURCES = check_permissions.cpp
+check_permissions.$(OBJEXT): check_permissions.moc
+check_permissions_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_pagelayout_SOURCES = check_pagelayout.cpp
+check_pagelayout.$(OBJEXT): check_pagelayout.moc
+check_pagelayout_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_password_SOURCES = check_password.cpp
+check_password.$(OBJEXT): check_password.moc
+check_password_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+check_search_SOURCES = check_search.cpp
+check_search.$(OBJEXT): check_search.moc
+check_search_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+
+endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.in
new file mode 100644
index 00000000000..0a940f88151
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/Makefile.in
@@ -0,0 +1,961 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = test-poppler-qt4$(EXEEXT) \
+ stress-poppler-qt4$(EXEEXT) poppler-fonts$(EXEEXT) \
+ test-password-qt4$(EXEEXT) stress-poppler-dir$(EXEEXT) \
+ poppler-attachments$(EXEEXT)
+@BUILD_POPPLER_QT4_TRUE@TESTS = check_attachments$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_actualtext$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_dateConversion$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_fonts$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_links$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_metadata$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_optcontent$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_permissions$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_pagemode$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_password$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_pagelayout$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_search$(EXEEXT)
+@BUILD_POPPLER_QT4_TRUE@check_PROGRAMS = $(am__EXEEXT_1)
+subdir = qt4/tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@BUILD_POPPLER_QT4_TRUE@am__EXEEXT_1 = check_attachments$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_actualtext$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_dateConversion$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_fonts$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_links$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_metadata$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_optcontent$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_permissions$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_pagemode$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_password$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_pagelayout$(EXEEXT) \
+@BUILD_POPPLER_QT4_TRUE@ check_search$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am__check_actualtext_SOURCES_DIST = check_actualtext.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_actualtext_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_actualtext.$(OBJEXT)
+check_actualtext_OBJECTS = $(am_check_actualtext_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@BUILD_POPPLER_QT4_TRUE@check_actualtext_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__check_attachments_SOURCES_DIST = check_attachments.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_attachments_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_attachments.$(OBJEXT)
+check_attachments_OBJECTS = $(am_check_attachments_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_attachments_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_dateConversion_SOURCES_DIST = check_dateConversion.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_dateConversion_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_dateConversion.$(OBJEXT)
+check_dateConversion_OBJECTS = $(am_check_dateConversion_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_dateConversion_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_fonts_SOURCES_DIST = check_fonts.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_fonts_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_fonts.$(OBJEXT)
+check_fonts_OBJECTS = $(am_check_fonts_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_fonts_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_links_SOURCES_DIST = check_links.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_links_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_links.$(OBJEXT)
+check_links_OBJECTS = $(am_check_links_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_links_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_metadata_SOURCES_DIST = check_metadata.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_metadata_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_metadata.$(OBJEXT)
+check_metadata_OBJECTS = $(am_check_metadata_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_metadata_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_optcontent_SOURCES_DIST = check_optcontent.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_optcontent_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_optcontent.$(OBJEXT)
+check_optcontent_OBJECTS = $(am_check_optcontent_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_optcontent_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_pagelayout_SOURCES_DIST = check_pagelayout.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_pagelayout_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_pagelayout.$(OBJEXT)
+check_pagelayout_OBJECTS = $(am_check_pagelayout_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_pagelayout_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_pagemode_SOURCES_DIST = check_pagemode.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_pagemode_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_pagemode.$(OBJEXT)
+check_pagemode_OBJECTS = $(am_check_pagemode_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_pagemode_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_password_SOURCES_DIST = check_password.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_password_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_password.$(OBJEXT)
+check_password_OBJECTS = $(am_check_password_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_password_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_permissions_SOURCES_DIST = check_permissions.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_permissions_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_permissions.$(OBJEXT)
+check_permissions_OBJECTS = $(am_check_permissions_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_permissions_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am__check_search_SOURCES_DIST = check_search.cpp
+@BUILD_POPPLER_QT4_TRUE@am_check_search_OBJECTS = \
+@BUILD_POPPLER_QT4_TRUE@ check_search.$(OBJEXT)
+check_search_OBJECTS = $(am_check_search_OBJECTS)
+@BUILD_POPPLER_QT4_TRUE@check_search_DEPENDENCIES = \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1)
+am_poppler_attachments_OBJECTS = poppler-attachments.$(OBJEXT)
+poppler_attachments_OBJECTS = $(am_poppler_attachments_OBJECTS)
+poppler_attachments_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_poppler_fonts_OBJECTS = poppler-fonts.$(OBJEXT)
+poppler_fonts_OBJECTS = $(am_poppler_fonts_OBJECTS)
+poppler_fonts_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_stress_poppler_dir_OBJECTS = stress-poppler-dir.$(OBJEXT)
+stress_poppler_dir_OBJECTS = $(am_stress_poppler_dir_OBJECTS)
+stress_poppler_dir_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_stress_poppler_qt4_OBJECTS = stress-poppler-qt4.$(OBJEXT)
+stress_poppler_qt4_OBJECTS = $(am_stress_poppler_qt4_OBJECTS)
+stress_poppler_qt4_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_test_password_qt4_OBJECTS = test-password-qt4.$(OBJEXT)
+test_password_qt4_OBJECTS = $(am_test_password_qt4_OBJECTS)
+test_password_qt4_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_test_poppler_qt4_OBJECTS = test-poppler-qt4.$(OBJEXT)
+test_poppler_qt4_OBJECTS = $(am_test_poppler_qt4_OBJECTS)
+test_poppler_qt4_DEPENDENCIES = $(am__DEPENDENCIES_2)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(check_actualtext_SOURCES) $(check_attachments_SOURCES) \
+ $(check_dateConversion_SOURCES) $(check_fonts_SOURCES) \
+ $(check_links_SOURCES) $(check_metadata_SOURCES) \
+ $(check_optcontent_SOURCES) $(check_pagelayout_SOURCES) \
+ $(check_pagemode_SOURCES) $(check_password_SOURCES) \
+ $(check_permissions_SOURCES) $(check_search_SOURCES) \
+ $(poppler_attachments_SOURCES) $(poppler_fonts_SOURCES) \
+ $(stress_poppler_dir_SOURCES) $(stress_poppler_qt4_SOURCES) \
+ $(test_password_qt4_SOURCES) $(test_poppler_qt4_SOURCES)
+DIST_SOURCES = $(am__check_actualtext_SOURCES_DIST) \
+ $(am__check_attachments_SOURCES_DIST) \
+ $(am__check_dateConversion_SOURCES_DIST) \
+ $(am__check_fonts_SOURCES_DIST) \
+ $(am__check_links_SOURCES_DIST) \
+ $(am__check_metadata_SOURCES_DIST) \
+ $(am__check_optcontent_SOURCES_DIST) \
+ $(am__check_pagelayout_SOURCES_DIST) \
+ $(am__check_pagemode_SOURCES_DIST) \
+ $(am__check_password_SOURCES_DIST) \
+ $(am__check_permissions_SOURCES_DIST) \
+ $(am__check_search_SOURCES_DIST) \
+ $(poppler_attachments_SOURCES) $(poppler_fonts_SOURCES) \
+ $(stress_poppler_dir_SOURCES) $(stress_poppler_qt4_SOURCES) \
+ $(test_password_qt4_SOURCES) $(test_poppler_qt4_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/qt4/src \
+ -I$(top_srcdir)/qt \
+ $(FONTCONFIG_CFLAGS) \
+ $(POPPLER_QT4_CFLAGS)
+
+LDADDS = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/qt4/src/libpoppler-qt4.la \
+ $(FONTCONFIG_LIBS) \
+ $(POPPLER_QT4_LIBS)
+
+test_poppler_qt4_SOURCES = \
+ test-poppler-qt4.cpp
+
+test_poppler_qt4_LDADD = $(LDADDS)
+test_password_qt4_SOURCES = \
+ test-password-qt4.cpp
+
+test_password_qt4_LDADD = $(LDADDS)
+poppler_fonts_SOURCES = \
+ poppler-fonts.cpp
+
+poppler_fonts_LDADD = $(LDADDS)
+poppler_attachments_SOURCES = \
+ poppler-attachments.cpp
+
+poppler_attachments_LDADD = $(LDADDS)
+stress_poppler_qt4_SOURCES = \
+ stress-poppler-qt4.cpp
+
+stress_poppler_qt4_LDADD = $(LDADDS)
+stress_poppler_dir_SOURCES = \
+ stress-poppler-dir.cpp
+
+stress_poppler_dir_LDADD = $(LDADDS)
+@BUILD_POPPLER_QT4_TRUE@check_attachments_SOURCES = check_attachments.cpp
+@BUILD_POPPLER_QT4_TRUE@check_attachments_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_actualtext_SOURCES = check_actualtext.cpp
+@BUILD_POPPLER_QT4_TRUE@check_actualtext_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_dateConversion_SOURCES = check_dateConversion.cpp
+@BUILD_POPPLER_QT4_TRUE@check_dateConversion_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_fonts_SOURCES = check_fonts.cpp
+@BUILD_POPPLER_QT4_TRUE@check_fonts_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_links_SOURCES = check_links.cpp
+@BUILD_POPPLER_QT4_TRUE@check_links_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_metadata_SOURCES = check_metadata.cpp
+@BUILD_POPPLER_QT4_TRUE@check_metadata_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_optcontent_SOURCES = check_optcontent.cpp
+@BUILD_POPPLER_QT4_TRUE@check_optcontent_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_pagemode_SOURCES = check_pagemode.cpp
+@BUILD_POPPLER_QT4_TRUE@check_pagemode_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_permissions_SOURCES = check_permissions.cpp
+@BUILD_POPPLER_QT4_TRUE@check_permissions_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_pagelayout_SOURCES = check_pagelayout.cpp
+@BUILD_POPPLER_QT4_TRUE@check_pagelayout_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_password_SOURCES = check_password.cpp
+@BUILD_POPPLER_QT4_TRUE@check_password_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+@BUILD_POPPLER_QT4_TRUE@check_search_SOURCES = check_search.cpp
+@BUILD_POPPLER_QT4_TRUE@check_search_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .moc .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign qt4/tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+check_actualtext$(EXEEXT): $(check_actualtext_OBJECTS) $(check_actualtext_DEPENDENCIES)
+ @rm -f check_actualtext$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_actualtext_OBJECTS) $(check_actualtext_LDADD) $(LIBS)
+check_attachments$(EXEEXT): $(check_attachments_OBJECTS) $(check_attachments_DEPENDENCIES)
+ @rm -f check_attachments$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_attachments_OBJECTS) $(check_attachments_LDADD) $(LIBS)
+check_dateConversion$(EXEEXT): $(check_dateConversion_OBJECTS) $(check_dateConversion_DEPENDENCIES)
+ @rm -f check_dateConversion$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_dateConversion_OBJECTS) $(check_dateConversion_LDADD) $(LIBS)
+check_fonts$(EXEEXT): $(check_fonts_OBJECTS) $(check_fonts_DEPENDENCIES)
+ @rm -f check_fonts$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_fonts_OBJECTS) $(check_fonts_LDADD) $(LIBS)
+check_links$(EXEEXT): $(check_links_OBJECTS) $(check_links_DEPENDENCIES)
+ @rm -f check_links$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_links_OBJECTS) $(check_links_LDADD) $(LIBS)
+check_metadata$(EXEEXT): $(check_metadata_OBJECTS) $(check_metadata_DEPENDENCIES)
+ @rm -f check_metadata$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_metadata_OBJECTS) $(check_metadata_LDADD) $(LIBS)
+check_optcontent$(EXEEXT): $(check_optcontent_OBJECTS) $(check_optcontent_DEPENDENCIES)
+ @rm -f check_optcontent$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_optcontent_OBJECTS) $(check_optcontent_LDADD) $(LIBS)
+check_pagelayout$(EXEEXT): $(check_pagelayout_OBJECTS) $(check_pagelayout_DEPENDENCIES)
+ @rm -f check_pagelayout$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_pagelayout_OBJECTS) $(check_pagelayout_LDADD) $(LIBS)
+check_pagemode$(EXEEXT): $(check_pagemode_OBJECTS) $(check_pagemode_DEPENDENCIES)
+ @rm -f check_pagemode$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_pagemode_OBJECTS) $(check_pagemode_LDADD) $(LIBS)
+check_password$(EXEEXT): $(check_password_OBJECTS) $(check_password_DEPENDENCIES)
+ @rm -f check_password$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_password_OBJECTS) $(check_password_LDADD) $(LIBS)
+check_permissions$(EXEEXT): $(check_permissions_OBJECTS) $(check_permissions_DEPENDENCIES)
+ @rm -f check_permissions$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_permissions_OBJECTS) $(check_permissions_LDADD) $(LIBS)
+check_search$(EXEEXT): $(check_search_OBJECTS) $(check_search_DEPENDENCIES)
+ @rm -f check_search$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(check_search_OBJECTS) $(check_search_LDADD) $(LIBS)
+poppler-attachments$(EXEEXT): $(poppler_attachments_OBJECTS) $(poppler_attachments_DEPENDENCIES)
+ @rm -f poppler-attachments$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(poppler_attachments_OBJECTS) $(poppler_attachments_LDADD) $(LIBS)
+poppler-fonts$(EXEEXT): $(poppler_fonts_OBJECTS) $(poppler_fonts_DEPENDENCIES)
+ @rm -f poppler-fonts$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(poppler_fonts_OBJECTS) $(poppler_fonts_LDADD) $(LIBS)
+stress-poppler-dir$(EXEEXT): $(stress_poppler_dir_OBJECTS) $(stress_poppler_dir_DEPENDENCIES)
+ @rm -f stress-poppler-dir$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(stress_poppler_dir_OBJECTS) $(stress_poppler_dir_LDADD) $(LIBS)
+stress-poppler-qt4$(EXEEXT): $(stress_poppler_qt4_OBJECTS) $(stress_poppler_qt4_DEPENDENCIES)
+ @rm -f stress-poppler-qt4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(stress_poppler_qt4_OBJECTS) $(stress_poppler_qt4_LDADD) $(LIBS)
+test-password-qt4$(EXEEXT): $(test_password_qt4_OBJECTS) $(test_password_qt4_DEPENDENCIES)
+ @rm -f test-password-qt4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_password_qt4_OBJECTS) $(test_password_qt4_LDADD) $(LIBS)
+test-poppler-qt4$(EXEEXT): $(test_poppler_qt4_OBJECTS) $(test_poppler_qt4_DEPENDENCIES)
+ @rm -f test-poppler-qt4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_poppler_qt4_OBJECTS) $(test_poppler_qt4_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_actualtext.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_attachments.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dateConversion.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_fonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_links.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_metadata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_optcontent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_pagelayout.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_pagemode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_password.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_permissions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_search.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-attachments.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poppler-fonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stress-poppler-dir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stress-poppler-qt4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-password-qt4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-poppler-qt4.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+SUFFIXES: .moc
+
+.cpp.moc:
+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
+
+clean-generic:
+ rm -f *.moc
+@BUILD_POPPLER_QT4_TRUE@check_attachments.$(OBJEXT): check_attachments.moc
+@BUILD_POPPLER_QT4_TRUE@check_actualtext.$(OBJEXT): check_actualtext.moc
+@BUILD_POPPLER_QT4_TRUE@check_dateConversion.$(OBJEXT): check_dateConversion.moc
+@BUILD_POPPLER_QT4_TRUE@check_fonts.$(OBJEXT): check_fonts.moc
+@BUILD_POPPLER_QT4_TRUE@check_links.$(OBJEXT): check_links.moc
+@BUILD_POPPLER_QT4_TRUE@check_metadata.$(OBJEXT): check_metadata.moc
+@BUILD_POPPLER_QT4_TRUE@check_optcontent.$(OBJEXT): check_optcontent.moc
+@BUILD_POPPLER_QT4_TRUE@check_pagemode.$(OBJEXT): check_pagemode.moc
+@BUILD_POPPLER_QT4_TRUE@check_permissions.$(OBJEXT): check_permissions.moc
+@BUILD_POPPLER_QT4_TRUE@check_pagelayout.$(OBJEXT): check_pagelayout.moc
+@BUILD_POPPLER_QT4_TRUE@check_password.$(OBJEXT): check_password.moc
+@BUILD_POPPLER_QT4_TRUE@check_search.$(OBJEXT): check_search.moc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_actualtext.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_actualtext.cpp
new file mode 100644
index 00000000000..64fae8fb412
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_actualtext.cpp
@@ -0,0 +1,33 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+#include <QtCore/QFile>
+
+class TestActualText: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkActualText1();
+};
+
+void TestActualText::checkActualText1()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/WithActualText.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(0);
+ QVERIFY( page );
+
+ QCOMPARE( page->text(QRectF()), QString("The slow brown fox jumps over the black dog.") );
+
+ delete page;
+
+ delete doc;
+}
+
+QTEST_MAIN(TestActualText)
+
+#include "check_actualtext.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_attachments.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_attachments.cpp
new file mode 100644
index 00000000000..2e02ec8162d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_attachments.cpp
@@ -0,0 +1,157 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+#include <QtCore/QFile>
+
+class TestAttachments: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkNoAttachments();
+ void checkAttach1();
+ void checkAttach2();
+ void checkAttach3();
+ void checkAttach4();
+};
+
+void TestAttachments::checkNoAttachments()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->hasEmbeddedFiles(), false );
+
+ delete doc;
+}
+
+void TestAttachments::checkAttach1()
+{
+
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/WithAttachments.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasEmbeddedFiles() );
+
+ QList<Poppler::EmbeddedFile*> fileList = doc->embeddedFiles();
+ QCOMPARE( fileList.size(), 2 );
+
+ Poppler::EmbeddedFile *embfile = fileList.at(0);
+ QCOMPARE( embfile->name(), QString( "kroller.png" ) );
+ QCOMPARE( embfile->description(), QString("/home/bradh/coding/svn-vers/KDE/kdeartwork/wallpapers/kroller.png") );
+ QCOMPARE( embfile->createDate(), QDateTime( QDate(), QTime() ) );
+ QCOMPARE( embfile->modDate(), QDateTime( QDate(), QTime() ) );
+ QCOMPARE( embfile->mimeType(), QString() );
+
+ QFile file( "../../../test/unittestcases/kroller.png" );
+ QVERIFY( file.open( QIODevice::ReadOnly ) );
+ QByteArray krollerData = file.readAll();
+ QByteArray embdata = embfile->data();
+ QCOMPARE( krollerData, embdata );
+
+
+ Poppler::EmbeddedFile *embfile2 = fileList.at(1);
+ QCOMPARE( embfile2->name(), QString("gnome-64.gif") );
+ QCOMPARE( embfile2->description(), QString("/usr/share/gnome-about/gnome-64.gif") );
+ QCOMPARE( embfile2->modDate(), QDateTime( QDate(), QTime() ) );
+ QCOMPARE( embfile2->createDate(), QDateTime( QDate(), QTime() ) );
+ QCOMPARE( embfile2->mimeType(), QString() );
+
+ QFile file2( "../../../test/unittestcases/gnome-64.gif" );
+ QVERIFY( file2.open( QIODevice::ReadOnly ) );
+ QByteArray g64Data = file2.readAll();
+ QByteArray emb2data = embfile2->data();
+ QCOMPARE( g64Data, emb2data );
+
+ delete doc;
+}
+
+
+void TestAttachments::checkAttach2()
+{
+
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/A6EmbeddedFiles.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasEmbeddedFiles() );
+
+ QList<Poppler::EmbeddedFile*> fileList;
+ fileList = doc->embeddedFiles();
+ QCOMPARE( fileList.size(), 3 );
+
+ Poppler::EmbeddedFile *embfile1 = fileList.at(0);
+ QCOMPARE( embfile1->name(), QString("Acro7 thoughts") );
+ QCOMPARE( embfile1->description(), QString("Acro7 Thoughts") );
+ QCOMPARE( embfile1->createDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 13, 54, 54), Qt::UTC ) );
+ QCOMPARE( embfile1->modDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 14, 15, 27), Qt::UTC ) );
+ QCOMPARE( embfile1->mimeType(), QString("text/xml") );
+
+ Poppler::EmbeddedFile *embfile2 = fileList.at(1);
+ QCOMPARE( embfile2->name(), QString("acro transitions 1.xls") );
+ QCOMPARE( embfile2->description(), QString("AcroTransitions") );
+ QCOMPARE( embfile2->createDate(), QDateTime( QDate( 2003, 7, 18 ), QTime( 21, 7, 16), Qt::UTC ) );
+ QCOMPARE( embfile2->modDate(), QDateTime( QDate( 2003, 7, 22 ), QTime( 13, 4, 40), Qt::UTC ) );
+ QCOMPARE( embfile2->mimeType(), QString("application/excel") );
+
+ Poppler::EmbeddedFile *embfile3 = fileList.at(2);
+ QCOMPARE( embfile3->name(), QString("apago_pdfe_wide.gif") );
+ QCOMPARE( embfile3->description(), QString("PDFE Animation") );
+ QCOMPARE( embfile3->createDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 54, 29), Qt::UTC ) );
+ QCOMPARE( embfile3->modDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 52, 58), Qt::UTC ) );
+ QCOMPARE( embfile3->mimeType(), QString() );
+
+ delete doc;
+}
+
+void TestAttachments::checkAttach3()
+{
+
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/shapes+attachments.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasEmbeddedFiles() );
+
+ QList<Poppler::EmbeddedFile*> fileList;
+ fileList = doc->embeddedFiles();
+ QCOMPARE( fileList.size(), 1 );
+
+ Poppler::EmbeddedFile *embfile = fileList.at(0);
+ QCOMPARE( embfile->name(), QString( "ADEX1.xpdf.pgp" ) );
+ QCOMPARE( embfile->description(), QString("encrypted version of document") );
+ QCOMPARE( embfile->createDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
+ QCOMPARE( embfile->modDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
+ QCOMPARE( embfile->mimeType(), QString() );
+ delete doc;
+
+}
+
+void TestAttachments::checkAttach4()
+{
+
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/imageretrieve+attachment.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasEmbeddedFiles() );
+
+ QList<Poppler::EmbeddedFile*> fileList;
+ fileList = doc->embeddedFiles();
+ QCOMPARE( fileList.size(), 1 );
+
+ Poppler::EmbeddedFile *embfile = fileList.at(0);
+ QCOMPARE( embfile->name(), QString( "export-altona.csv" ) );
+ QCOMPARE( embfile->description(), QString("Altona Export") );
+ QCOMPARE( embfile->createDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 35), Qt::UTC ) );
+ QCOMPARE( embfile->modDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 52), Qt::UTC ) );
+ QCOMPARE( embfile->mimeType(), QString("application/vnd.ms-excel") );
+ delete doc;
+
+}
+
+QTEST_MAIN(TestAttachments)
+#include "check_attachments.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_dateConversion.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_dateConversion.cpp
new file mode 100644
index 00000000000..c1f84e2f113
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_dateConversion.cpp
@@ -0,0 +1,142 @@
+#include <QtTest/QtTest>
+
+Q_DECLARE_METATYPE(QDate)
+Q_DECLARE_METATYPE(QTime)
+
+#include <poppler-qt4.h>
+
+class TestDateConv: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase();
+ void checkDates_data();
+ void checkDates();
+ void checkInvalidDates_data();
+ void checkInvalidDates();
+};
+
+void TestDateConv::initTestCase()
+{
+ qRegisterMetaType<QDate>("QDate");
+ qRegisterMetaType<QTime>("QTime");
+}
+
+void TestDateConv::checkDates_data()
+{
+ QTest::addColumn<QByteArray>("input");
+ QTest::addColumn<QDate>("day");
+ QTest::addColumn<QTime>("time");
+
+ // This is a typical case - all data provided
+ QTest::newRow("D:20040101121110")
+ << QByteArray("D:20040101121110Z")
+ << QDate( 2004, 1, 1)
+ << QTime( 12, 11, 10);
+
+ // The D: is strongly recommended, but optional
+ QTest::newRow("20040101121110")
+ << QByteArray("20040101121110Z")
+ << QDate( 2004, 1, 1)
+ << QTime( 12, 11, 10);
+
+ // Only the year is actually required
+ QTest::newRow("D:2006")
+ << QByteArray("D:2006")
+ << QDate( 2006, 1, 1)
+ << QTime( 0, 0, 0);
+
+ QTest::newRow("D:200602")
+ << QByteArray("D:200602")
+ << QDate( 2006, 2, 1)
+ << QTime( 0, 0, 0);
+
+ QTest::newRow("D:20060304")
+ << QByteArray("D:20060304")
+ << QDate( 2006, 3, 4)
+ << QTime( 0, 0, 0);
+
+ QTest::newRow("D:2006030405")
+ << QByteArray("D:2006030405")
+ << QDate( 2006, 3, 4)
+ << QTime( 5, 0, 0);
+
+ QTest::newRow("D:200603040512")
+ << QByteArray("D:200603040512")
+ << QDate( 2006, 3, 4)
+ << QTime( 5, 12, 0);
+
+ // If the timezone isn't specified, I assume UTC
+ QTest::newRow("D:20060304051226")
+ << QByteArray("D:20060304051226")
+ << QDate( 2006, 3, 4)
+ << QTime( 5, 12, 26);
+
+ // Check for real timezone conversions
+ QTest::newRow("D:20030131115258-04'00'")
+ << QByteArray("D:20030131115258-04'00'")
+ << QDate( 2003, 1, 31)
+ << QTime( 15, 52, 58);
+
+ QTest::newRow("D:20030131115258+05'00'")
+ << QByteArray("D:20030131115258+05'00'")
+ << QDate( 2003, 1, 31)
+ << QTime( 6, 52, 58);
+
+ // There are places that have non-hour offsets
+ // Yep, that means you Adelaide.
+ QTest::newRow("D:20030131115258+08'30'")
+ << QByteArray("D:20030131115258+08'30'")
+ << QDate( 2003, 1, 31)
+ << QTime( 3, 22, 58);
+
+ QTest::newRow("D:20030131115258-08'30'")
+ << QByteArray("D:20030131115258-08'30'")
+ << QDate( 2003, 1, 31)
+ << QTime( 20, 22, 58);
+}
+
+void TestDateConv::checkDates()
+{
+ QFETCH(QByteArray, input);
+ QFETCH(QDate, day);
+ QFETCH(QTime, time);
+
+ QCOMPARE( Poppler::convertDate(input.data()), QDateTime(day, time, Qt::UTC) );
+}
+
+void TestDateConv::checkInvalidDates_data()
+{
+ QTest::addColumn<QByteArray>("input");
+
+ // Null data
+ QTest::newRow("Null data")
+ << QByteArray();
+
+ // Empty data
+ QTest::newRow("Empty data")
+ << QByteArray("");
+
+ // Empty data
+ QTest::newRow("One character")
+ << QByteArray("D");
+
+ // Empty data
+ QTest::newRow("'D:'")
+ << QByteArray("D:");
+
+ // Empty data
+ QTest::newRow("Not a date")
+ << QByteArray("D:IAmNotAValidDate");
+}
+
+void TestDateConv::checkInvalidDates()
+{
+ QFETCH(QByteArray, input);
+
+ QCOMPARE(Poppler::convertDate(input.data()), QDateTime());
+}
+
+QTEST_MAIN(TestDateConv)
+
+#include "check_dateConversion.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_fonts.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_fonts.cpp
new file mode 100644
index 00000000000..fdf4be73290
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_fonts.cpp
@@ -0,0 +1,246 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+#include <memory>
+
+class TestFontsData: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkNoFonts();
+ void checkType1();
+ void checkType3();
+ void checkTrueType();
+ void checkFontIterator();
+ void checkSecondDocumentQuery();
+ void checkMultipleIterations();
+ void checkScanForFonts();
+};
+
+
+QList<Poppler::FontInfo> loadFontsViaIterator( Poppler::Document *doc, int from = 0, int count = -1 )
+{
+ int num = count == -1 ? doc->numPages() - from : count;
+ QList<Poppler::FontInfo> list;
+ std::auto_ptr< Poppler::FontIterator > it( doc->newFontIterator( from ) );
+ while ( it->hasNext() && num )
+ {
+ list += it->next();
+ --num;
+ }
+ return list;
+}
+
+bool operator==( const Poppler::FontInfo &f1, const Poppler::FontInfo &f2 )
+{
+ if ( f1.name() != f2.name() )
+ return false;
+ if ( f1.file() != f2.file() )
+ return false;
+ if ( f1.isEmbedded() != f2.isEmbedded() )
+ return false;
+ if ( f1.isSubset() != f2.isSubset() )
+ return false;
+ if ( f1.type() != f2.type() )
+ return false;
+ if ( f1.typeName() != f2.typeName() )
+ return false;
+ return true;
+}
+
+
+void TestFontsData::checkNoFonts()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/image.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 0 );
+
+ delete doc;
+}
+
+void TestFontsData::checkType1()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/text.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 1 );
+ QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+ QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
+ QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+
+ QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+ QCOMPARE( listOfFonts.at(0).isSubset(), false );
+
+ delete doc;
+}
+
+void TestFontsData::checkType3()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/type3.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 2 );
+ QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+ QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
+ QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+
+ QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+ QCOMPARE( listOfFonts.at(0).isSubset(), false );
+
+ QCOMPARE( listOfFonts.at(1).name(), QString("") );
+ QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::Type3 );
+ QCOMPARE( listOfFonts.at(1).typeName(), QString("Type 3") );
+
+ QCOMPARE( listOfFonts.at(1).isEmbedded(), true );
+ QCOMPARE( listOfFonts.at(1).isSubset(), false );
+
+ delete doc;
+}
+
+void TestFontsData::checkTrueType()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 2 );
+ QCOMPARE( listOfFonts.at(0).name(), QString("Arial-BoldMT") );
+ QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::TrueType );
+ QCOMPARE( listOfFonts.at(0).typeName(), QString("TrueType") );
+
+ QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+ QCOMPARE( listOfFonts.at(0).isSubset(), false );
+
+ QCOMPARE( listOfFonts.at(1).name(), QString("ArialMT") );
+ QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::TrueType );
+ QCOMPARE( listOfFonts.at(1).typeName(), QString("TrueType") );
+
+ QCOMPARE( listOfFonts.at(1).isEmbedded(), false );
+ QCOMPARE( listOfFonts.at(1).isSubset(), false );
+
+ delete doc;
+}
+
+void TestFontsData::checkFontIterator()
+{
+ // loading a 1-page document
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/type3.pdf");
+ QVERIFY( doc );
+ // loading a 6-pages document
+ Poppler::Document *doc6 = Poppler::Document::load("../../../test/tests/cropbox.pdf");
+ QVERIFY( doc6 );
+
+ std::auto_ptr< Poppler::FontIterator > it;
+
+ // some tests with the 1-page document:
+ // - check a default iterator
+ it.reset( doc->newFontIterator() );
+ QVERIFY( it->hasNext() );
+ // - check an iterator for negative pages to behave as 0
+ it.reset( doc->newFontIterator( -1 ) );
+ QVERIFY( it->hasNext() );
+ // - check an iterator for pages out of the page limit
+ it.reset( doc->newFontIterator( 1 ) );
+ QVERIFY( !it->hasNext() );
+ // - check that it reaches the end after 1 iteration
+ it.reset( doc->newFontIterator() );
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( !it->hasNext() );
+
+ // some tests with the 6-page document:
+ // - check a default iterator
+ it.reset( doc6->newFontIterator() );
+ QVERIFY( it->hasNext() );
+ // - check an iterator for pages out of the page limit
+ it.reset( doc6->newFontIterator( 6 ) );
+ QVERIFY( !it->hasNext() );
+ // - check that it reaches the end after 6 iterations
+ it.reset( doc6->newFontIterator() );
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( it->hasNext() );
+ it->next();
+ QVERIFY( !it->hasNext() );
+
+ delete doc;
+ delete doc6;
+}
+
+void TestFontsData::checkSecondDocumentQuery()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/type3.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 2 );
+ // check we get the very same result when calling fonts() again (#19405)
+ QList<Poppler::FontInfo> listOfFonts2 = doc->fonts();
+ QCOMPARE( listOfFonts, listOfFonts2 );
+
+ delete doc;
+}
+
+void TestFontsData::checkMultipleIterations()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/type3.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = loadFontsViaIterator( doc );
+ QCOMPARE( listOfFonts.size(), 2 );
+ QList<Poppler::FontInfo> listOfFonts2 = loadFontsViaIterator( doc );
+ QCOMPARE( listOfFonts, listOfFonts2 );
+
+ delete doc;
+}
+
+void TestFontsData::checkScanForFonts()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/tests/fonts.pdf");
+ QVERIFY( doc );
+
+ QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+ QCOMPARE( listOfFonts.size(), 3 );
+ // check we get the very same result when gatering fonts using scanForFonts
+ QList<Poppler::FontInfo> listOfFonts2;
+ for ( int i = 0; i < doc->numPages(); ++i )
+ {
+ doc->scanForFonts( 1, &listOfFonts2 );
+ }
+ QCOMPARE( listOfFonts, listOfFonts2 );
+
+ // check doing a second scanForFonts gives no result
+ QList<Poppler::FontInfo> listOfFonts3;
+ for ( int i = 0; i < doc->numPages(); ++i )
+ {
+ doc->scanForFonts( 1, &listOfFonts3 );
+ }
+ QVERIFY( listOfFonts3.isEmpty() );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestFontsData)
+#include "check_fonts.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_links.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_links.cpp
new file mode 100644
index 00000000000..2f69a828df8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_links.cpp
@@ -0,0 +1,96 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+#include <memory>
+
+class TestLinks : public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkDocumentWithNoDests();
+ void checkDests_xr01();
+ void checkDests_xr02();
+};
+
+bool isDestinationValid_pageNumber( const Poppler::LinkDestination *dest, const Poppler::Document *doc )
+{
+ return dest->pageNumber() > 0 && dest->pageNumber() <= doc->numPages();
+}
+
+bool isDestinationValid_name( const Poppler::LinkDestination *dest )
+{
+ return !dest->destinationName().isEmpty();
+}
+
+
+void TestLinks::checkDocumentWithNoDests()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/WithAttachments.pdf");
+ QVERIFY( doc );
+
+ std::auto_ptr< Poppler::LinkDestination > dest;
+ dest.reset( doc->linkDestination("no.dests.in.this.document") );
+ QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
+ QVERIFY( isDestinationValid_name( dest.get() ) );
+
+ delete doc;
+}
+
+void TestLinks::checkDests_xr01()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/xr01.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(0);
+ QVERIFY( page );
+
+ QList< Poppler::Link* > links = page->links();
+ QCOMPARE( links.count(), 2 );
+
+ {
+ QCOMPARE( links.at(0)->linkType(), Poppler::Link::Goto );
+ Poppler::LinkGoto *link = static_cast< Poppler::LinkGoto * >( links.at(0) );
+ const Poppler::LinkDestination dest = link->destination();
+ QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
+ QVERIFY( isDestinationValid_name( &dest ) );
+ QCOMPARE( dest.destinationName(), QString::fromLatin1("section.1") );
+ }
+
+ {
+ QCOMPARE( links.at(1)->linkType(), Poppler::Link::Goto );
+ Poppler::LinkGoto *link = static_cast< Poppler::LinkGoto * >( links.at(1) );
+ const Poppler::LinkDestination dest = link->destination();
+ QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
+ QVERIFY( isDestinationValid_name( &dest ) );
+ QCOMPARE( dest.destinationName(), QString::fromLatin1("section.2") );
+ }
+
+ delete doc;
+}
+
+void TestLinks::checkDests_xr02()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/xr02.pdf");
+ QVERIFY( doc );
+
+ std::auto_ptr< Poppler::LinkDestination > dest;
+ dest.reset( doc->linkDestination("section.1") );
+ QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
+ QVERIFY( !isDestinationValid_name( dest.get() ) );
+ dest.reset( doc->linkDestination("section.2") );
+ QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
+ QVERIFY( !isDestinationValid_name( dest.get() ) );
+ dest.reset( doc->linkDestination("section.3") );
+ QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
+ QVERIFY( isDestinationValid_name( dest.get() ) );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestLinks)
+
+#include "check_links.moc"
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_metadata.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_metadata.cpp
new file mode 100644
index 00000000000..48f05a6ee5d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_metadata.cpp
@@ -0,0 +1,226 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestMetaData: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkStrings_data();
+ void checkStrings();
+ void checkStrings2_data();
+ void checkStrings2();
+ void checkStringKeys();
+ void checkLinearised();
+ void checkNumPages();
+ void checkDate();
+ void checkPageSize();
+ void checkPortraitOrientation();
+ void checkLandscapeOrientation();
+ void checkUpsideDownOrientation();
+ void checkSeascapeOrientation();
+ void checkVersion();
+};
+
+void TestMetaData::checkStrings_data()
+{
+ QTest::addColumn<QString>("key");
+ QTest::addColumn<QString>("value");
+
+ QTest::newRow( "Author" ) << "Author" << "Brad Hards";
+ QTest::newRow( "Title" ) << "Title" << "Two pages";
+ QTest::newRow( "Subject" ) << "Subject"
+ << "A two page layout for poppler testing";
+ QTest::newRow( "Keywords" ) << "Keywords" << "Qt4 bindings";
+ QTest::newRow( "Creator" ) << "Creator" << "iText: cgpdftops CUPS filter";
+ QTest::newRow( "Producer" ) << "Producer" << "Acrobat Distiller 7.0 for Macintosh";
+}
+
+void TestMetaData::checkStrings()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf");
+ QVERIFY( doc );
+
+ QFETCH( QString, key );
+ QFETCH( QString, value );
+ QCOMPARE( doc->info(key), value );
+
+ delete doc;
+}
+
+void TestMetaData::checkStrings2_data()
+{
+ QTest::addColumn<QString>("key");
+ QTest::addColumn<QString>("value");
+
+ QTest::newRow( "Title" ) << "Title" << "Malaga hotels";
+ QTest::newRow( "Author" ) << "Author" << "Brad Hards";
+ QTest::newRow( "Creator" ) << "Creator" << "Safari: cgpdftops CUPS filter";
+ QTest::newRow( "Producer" ) << "Producer" << "Acrobat Distiller 7.0 for Macintosh";
+ QTest::newRow( "Keywords" ) << "Keywords" << "First\rSecond\rthird";
+ QTest::newRow( "Custom1" ) << "Custom1" << "CustomValue1";
+ QTest::newRow( "Custom2" ) << "Custom2" << "CustomValue2";
+}
+
+void TestMetaData::checkStrings2()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+
+ QFETCH( QString, key );
+ QFETCH( QString, value );
+ QCOMPARE( doc->info(key), value );
+
+ delete doc;
+}
+
+void TestMetaData::checkStringKeys()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+
+ QStringList keyList;
+ keyList << "Title" << "Author" << "Creator" << "Keywords" << "CreationDate";
+ keyList << "Producer" << "ModDate" << "Custom1" << "Custom2";
+ keyList.sort();
+ QStringList keysInDoc = doc->infoKeys();
+ keysInDoc.sort();
+ QCOMPARE( keysInDoc, keyList );
+
+ delete doc;
+}
+
+void TestMetaData::checkLinearised()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->isLinearized() );
+
+ delete doc;
+
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+ QEXPECT_FAIL("", "We don't yet handle linearisation correctly", Continue);
+ QCOMPARE( doc->isLinearized(), false );
+
+ delete doc;
+}
+
+void TestMetaData::checkPortraitOrientation()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(0);
+ QCOMPARE( page->orientation(), Poppler::Page::Portrait );
+
+ delete page;
+ delete doc;
+}
+
+void TestMetaData::checkNumPages()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf");
+ QVERIFY( doc );
+ QCOMPARE( doc->numPages(), 2 );
+
+ delete doc;
+
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+ QCOMPARE( doc->numPages(), 1 );
+
+ delete doc;
+}
+
+void TestMetaData::checkDate()
+{
+ Poppler::Document *doc;
+
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+ QCOMPARE( doc->date("ModDate"), QDateTime(QDate(2005, 12, 5), QTime(9,44,46), Qt::UTC ) );
+ QCOMPARE( doc->date("CreationDate"), QDateTime(QDate(2005, 8, 13), QTime(1,12,11), Qt::UTC ) );
+
+ delete doc;
+}
+
+void TestMetaData::checkPageSize()
+{
+ Poppler::Document *doc;
+
+ doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
+ QVERIFY( doc );
+ Poppler::Page *page = doc->page(0);
+ QCOMPARE( page->pageSize(), QSize(595, 842) );
+ QCOMPARE( page->pageSizeF(), QSizeF(595.22, 842) );
+
+ delete page;
+ delete doc;
+}
+
+
+void TestMetaData::checkLandscapeOrientation()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(1);
+ QCOMPARE( page->orientation(), Poppler::Page::Landscape );
+
+ delete page;
+ delete doc;
+}
+
+void TestMetaData::checkUpsideDownOrientation()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(2);
+ QCOMPARE( page->orientation(), Poppler::Page::UpsideDown );
+
+ delete page;
+ delete doc;
+}
+
+void TestMetaData::checkSeascapeOrientation()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(3);
+ QCOMPARE( page->orientation(), Poppler::Page::Seascape );
+
+ delete page;
+ delete doc;
+}
+
+void TestMetaData::checkVersion()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pdfVersion(), 1.6 );
+ int major = 0, minor = 0;
+ doc->getPdfVersion( &major, &minor );
+ QCOMPARE( major, 1 );
+ QCOMPARE( minor, 6 );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestMetaData)
+#include "check_metadata.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_optcontent.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_optcontent.cpp
new file mode 100644
index 00000000000..ec988b8edda
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_optcontent.cpp
@@ -0,0 +1,479 @@
+#include <QtTest/QtTest>
+
+#include "PDFDoc.h"
+
+#include <poppler-qt4.h>
+
+class TestOptionalContent: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkVisPolicy();
+ void checkNestedLayers();
+ void checkNoOptionalContent();
+ void checkIsVisible();
+ void checkVisibilitySetting();
+ void checkRadioButtons();
+};
+
+void TestOptionalContent::checkVisPolicy()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/vis_policy_test.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasOptionalContent() );
+
+ Poppler::OptContentModel *optContent = doc->optionalContentModel();
+ QModelIndex index;
+ index = optContent->index( 0, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "A" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+ index = optContent->index( 1, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "B" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ delete doc;
+}
+
+void TestOptionalContent::checkNestedLayers()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/NestedLayers.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasOptionalContent() );
+
+ Poppler::OptContentModel *optContent = doc->optionalContentModel();
+ QModelIndex index;
+
+ index = optContent->index( 0, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Black Text and Green Snow" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ index = optContent->index( 1, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Mountains and Image" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ // This is a sub-item of "Mountains and Image"
+ QModelIndex subindex = optContent->index( 0, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Image" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ index = optContent->index( 2, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Starburst" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ index = optContent->index( 3, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Watermark" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ delete doc;
+}
+
+void TestOptionalContent::checkNoOptionalContent()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->hasOptionalContent(), false );
+
+ delete doc;
+}
+
+void TestOptionalContent::checkIsVisible()
+{
+ GooString *fileName = new GooString("../../../test/unittestcases/vis_policy_test.pdf");
+ PDFDoc *doc = new PDFDoc( fileName );
+ QVERIFY( doc );
+
+ OCGs *ocgs = doc->getOptContentConfig();
+ QVERIFY( ocgs );
+
+ XRef *xref = doc->getXRef();
+
+ Object obj;
+
+ // In this test, both Ref(21,0) and Ref(2,0) are set to On
+
+ // AnyOn, one element array:
+ // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QVERIFY( ocgs->optContentIsVisible( &obj ) );
+ obj.free();
+
+ // Same again, looking for any leaks or dubious free()'s
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QVERIFY( ocgs->optContentIsVisible( &obj ) );
+ obj.free();
+
+ // AnyOff, one element array:
+ // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+ xref->fetch( 29, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOn, one element array:
+ // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+ xref->fetch( 36, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+
+ // AllOff, one element array:
+ // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+ xref->fetch( 43, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AnyOn, multi-element array:
+ // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+ xref->fetch( 50, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOff, multi-element array:
+ // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 57, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOn, multi-element array:
+ // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 64, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOff, multi-element array:
+ // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 71, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ delete doc;
+}
+
+void TestOptionalContent::checkVisibilitySetting()
+{
+ GooString *fileName = new GooString("../../../test/unittestcases/vis_policy_test.pdf");
+ PDFDoc *doc = new PDFDoc( fileName );
+ QVERIFY( doc );
+
+ OCGs *ocgs = doc->getOptContentConfig();
+ QVERIFY( ocgs );
+
+ XRef *xref = doc->getXRef();
+
+ Object obj;
+
+ // In this test, both Ref(21,0) and Ref(28,0) start On,
+ // based on the file settings
+ Object ref21obj;
+ ref21obj.initRef( 21, 0 );
+ Ref ref21 = ref21obj.getRef();
+ OptionalContentGroup *ocgA = ocgs->findOcgByRef( ref21 );
+ QVERIFY( ocgA );
+
+ QVERIFY( (ocgA->getName()->cmp("A")) == 0 );
+ QCOMPARE( ocgA->getState(), OptionalContentGroup::On );
+
+ Object ref28obj;
+ ref28obj.initRef( 28, 0 );
+ Ref ref28 = ref28obj.getRef();
+ OptionalContentGroup *ocgB = ocgs->findOcgByRef( ref28 );
+ QVERIFY( ocgB );
+
+ QVERIFY( (ocgB->getName()->cmp("B")) == 0 );
+ QCOMPARE( ocgB->getState(), OptionalContentGroup::On );
+
+ // turn one Off
+ ocgA->setState( OptionalContentGroup::Off );
+
+ // AnyOn, one element array:
+ // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // Same again, looking for any leaks or dubious free()'s
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AnyOff, one element array:
+ // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+ xref->fetch( 29, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOn, one element array:
+ // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+ xref->fetch( 36, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOff, one element array:
+ // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+ xref->fetch( 43, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AnyOn, multi-element array:
+ // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+ xref->fetch( 50, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOff, multi-element array:
+ // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 57, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOn, multi-element array:
+ // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 64, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOff, multi-element array:
+ // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 71, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+
+ // Turn the other one off as well (i.e. both are Off)
+ ocgB->setState(OptionalContentGroup::Off);
+
+ // AnyOn, one element array:
+ // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // Same again, looking for any leaks or dubious free()'s
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AnyOff, one element array:
+ // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+ xref->fetch( 29, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOn, one element array:
+ // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+ xref->fetch( 36, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOff, one element array:
+ // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+ xref->fetch( 43, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOn, multi-element array:
+ // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+ xref->fetch( 50, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AnyOff, multi-element array:
+ // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 57, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOn, multi-element array:
+ // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 64, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOff, multi-element array:
+ // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 71, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+
+ // Turn the first one on again (21 is On, 28 is Off)
+ ocgA->setState(OptionalContentGroup::On);
+
+ // AnyOn, one element array:
+ // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // Same again, looking for any leaks or dubious free()'s
+ xref->fetch( 22, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOff, one element array:
+ // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+ xref->fetch( 29, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOn, one element array:
+ // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+ xref->fetch( 36, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOff, one element array:
+ // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+ xref->fetch( 43, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOn, multi-element array:
+ // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+ xref->fetch( 50, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AnyOff, multi-element array:
+ // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 57, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+ obj.free();
+
+ // AllOn, multi-element array:
+ // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 64, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ // AllOff, multi-element array:
+ // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+ xref->fetch( 71, 0, &obj );
+ QVERIFY( obj.isDict() );
+ QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+ obj.free();
+
+ delete doc;
+}
+
+void TestOptionalContent::checkRadioButtons()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/ClarityOCGs.pdf");
+ QVERIFY( doc );
+
+ QVERIFY( doc->hasOptionalContent() );
+
+ Poppler::OptContentModel *optContent = doc->optionalContentModel();
+ QModelIndex index;
+
+ index = optContent->index( 0, 0, QModelIndex() );
+ QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Languages" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ // These are sub-items of the "Languages" label
+ QModelIndex subindex = optContent->index( 0, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ subindex = optContent->index( 1, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 2, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ // RBGroup of languages, so turning on Japanese should turn off English
+ bool result = optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole );
+
+ subindex = optContent->index( 0, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 2, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+ subindex = optContent->index( 1, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ // and turning on French should turn off Japanese
+ result = optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole );
+
+ subindex = optContent->index( 0, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 2, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 1, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+
+
+ // and turning off French should leave them all off
+ result = optContent->setData( subindex, QVariant( false ), Qt::CheckStateRole );
+
+ subindex = optContent->index( 0, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 2, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ subindex = optContent->index( 1, 0, index );
+ QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+ QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestOptionalContent)
+
+#include "check_optcontent.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagelayout.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagelayout.cpp
new file mode 100644
index 00000000000..dbdb93ea2ea
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagelayout.cpp
@@ -0,0 +1,49 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestPageLayout: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkNone();
+ void checkSingle();
+ void checkFacing();
+};
+
+void TestPageLayout::checkNone()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageLayout(), Poppler::Document::NoLayout );
+
+ delete doc;
+}
+
+void TestPageLayout::checkSingle()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageLayout(), Poppler::Document::SinglePage );
+
+ delete doc;
+}
+
+void TestPageLayout::checkFacing()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageLayout(), Poppler::Document::TwoPageRight );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestPageLayout)
+#include "check_pagelayout.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagemode.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagemode.cpp
new file mode 100644
index 00000000000..9df07ff3ecc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_pagemode.cpp
@@ -0,0 +1,73 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestPageMode: public QObject
+{
+ Q_OBJECT
+private slots:
+ void checkNone();
+ void checkFullScreen();
+ void checkAttachments();
+ void checkThumbs();
+ void checkOC();
+};
+
+void TestPageMode::checkNone()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageMode(), Poppler::Document::UseNone );
+
+ delete doc;
+}
+
+void TestPageMode::checkFullScreen()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageMode(), Poppler::Document::FullScreen );
+
+ delete doc;
+}
+
+void TestPageMode::checkAttachments()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/UseAttachments.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageMode(), Poppler::Document::UseAttach );
+
+ delete doc;
+}
+
+void TestPageMode::checkThumbs()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/UseThumbs.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageMode(), Poppler::Document::UseThumbs );
+
+ delete doc;
+}
+
+void TestPageMode::checkOC()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/UseOC.pdf");
+ QVERIFY( doc );
+
+ QCOMPARE( doc->pageMode(), Poppler::Document::UseOC );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestPageMode)
+#include "check_pagemode.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_password.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_password.cpp
new file mode 100644
index 00000000000..7bc81b21694
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_password.cpp
@@ -0,0 +1,88 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestPassword: public QObject
+{
+ Q_OBJECT
+private slots:
+ void password1();
+ void password1a();
+ void password2();
+ void password2a();
+ void password2b();
+ void password3();
+};
+
+
+// BUG:4557
+void TestPassword::password1()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - open.pdf"), "", QString::fromUtf8("garçon").toLatin1() );
+ QVERIFY( doc );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+
+void TestPassword::password1a()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - open.pdf") );
+ QVERIFY( doc );
+ QVERIFY( doc->isLocked() );
+ QVERIFY( !doc->unlock( "", QString::fromUtf8("garçon").toLatin1() ) );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+void TestPassword::password2()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1(), "" );
+ QVERIFY( doc );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+void TestPassword::password2a()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1() );
+ QVERIFY( doc );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+void TestPassword::password2b()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf") );
+ QVERIFY( doc );
+ QVERIFY( !doc->isLocked() );
+ QVERIFY( !doc->unlock( QString::fromUtf8("garçon").toLatin1(), "" ) );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+void TestPassword::password3()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load( QString::fromUtf8("../../../test/unittestcases/PasswordEncrypted.pdf") );
+ QVERIFY( doc );
+ QVERIFY( doc->isLocked() );
+ QVERIFY( !doc->unlock( "", "password" ) );
+ QVERIFY( !doc->isLocked() );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestPassword)
+#include "check_password.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_permissions.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_permissions.cpp
new file mode 100644
index 00000000000..eec78edfeec
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_permissions.cpp
@@ -0,0 +1,44 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestPermissions: public QObject
+{
+ Q_OBJECT
+private slots:
+ void permissions1();
+};
+
+void TestPermissions::permissions1()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf");
+ QVERIFY( doc );
+
+ // we are allowed to print
+ QVERIFY( doc->okToPrint() );
+
+ // we are not allowed to change
+ QVERIFY( !(doc->okToChange()) );
+
+ // we are not allowed to copy or extract content
+ QVERIFY( !(doc->okToCopy()) );
+
+ // we are not allowed to print at high resolution
+ QVERIFY( !(doc->okToPrintHighRes()) );
+
+ // we are not allowed to fill forms
+ QVERIFY( !(doc->okToFillForm()) );
+
+ // we are allowed to extract content for accessibility
+ QVERIFY( doc->okToExtractForAccessibility() );
+
+ // we are allowed to assemble this document
+ QVERIFY( doc->okToAssemble() );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestPermissions)
+#include "check_permissions.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_search.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_search.cpp
new file mode 100644
index 00000000000..c7e44bc3b26
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/check_search.cpp
@@ -0,0 +1,91 @@
+#include <QtTest/QtTest>
+
+#include <poppler-qt4.h>
+
+class TestSearch: public QObject
+{
+ Q_OBJECT
+private slots:
+ void bug7063();
+ void testNextAndPrevious();
+};
+
+void TestSearch::bug7063()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/bug7063.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(0);
+ QRectF pageRegion( QPointF(0,0), page->pageSize() );
+
+ QCOMPARE( page->search(QString("non-ascii:"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+
+ QCOMPARE( page->search(QString("Ascii"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+ QCOMPARE( page->search(QString("Ascii"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseInsensitive), true );
+
+ QCOMPARE( page->search(QString("latin1:"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+
+ QCOMPARE( page->search(QString::fromUtf8("é"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QCOMPARE( page->search(QString::fromUtf8("à"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QCOMPARE( page->search(QString::fromUtf8("ç"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QCOMPARE( page->search(QString::fromUtf8("search \"é\", \"à\" or \"ç\""), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QCOMPARE( page->search(QString::fromUtf8("¥µ©"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QCOMPARE( page->search(QString::fromUtf8("¥©"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+
+ delete doc;
+}
+
+void TestSearch::testNextAndPrevious()
+{
+ Poppler::Document *doc;
+ doc = Poppler::Document::load("../../../test/unittestcases/xr01.pdf");
+ QVERIFY( doc );
+
+ Poppler::Page *page = doc->page(0);
+ QRectF region( QPointF(0,0), page->pageSize() );
+
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+ QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+ QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+ QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+ QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), false );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+ QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+ QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+ QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+ QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+ QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+ QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+ QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), false );
+
+ delete doc;
+}
+
+QTEST_MAIN(TestSearch)
+#include "check_search.moc"
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-attachments.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-attachments.cpp
new file mode 100644
index 00000000000..992dc565b93
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-attachments.cpp
@@ -0,0 +1,39 @@
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+
+#include <iostream>
+
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ if (!( argc == 2 ))
+ {
+ qWarning() << "usage: poppler-attachments filename";
+ exit(1);
+ }
+
+ Poppler::Document *doc = Poppler::Document::load(argv[1]);
+ if (!doc)
+ {
+ qWarning() << "doc not loaded";
+ exit(1);
+ }
+
+ if (doc->hasEmbeddedFiles()) {
+ std::cout << "Embedded files: " << std::endl;
+ foreach(Poppler::EmbeddedFile *file, doc->embeddedFiles()) {
+ std::cout << " " << qPrintable(file->name()) << std::endl;
+ std::cout << " desc:" << qPrintable(file->description()) << std::endl;
+ QByteArray data = file->data();
+ std::cout << " data: " << data.constData() << std::endl;
+ }
+
+ } else {
+ std::cout << "There are no embedded document at the top level" << std::endl;
+ }
+ delete doc;
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-fonts.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-fonts.cpp
new file mode 100644
index 00000000000..6b66ec4286b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/poppler-fonts.cpp
@@ -0,0 +1,89 @@
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+
+#include <iostream>
+
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QCoreApplication a( argc, argv ); // QApplication required!
+
+ if (!( argc == 2 ))
+ {
+ qWarning() << "usage: poppler-fonts filename";
+ exit(1);
+ }
+
+ Poppler::Document *doc = Poppler::Document::load(argv[1]);
+ if (!doc)
+ {
+ qWarning() << "doc not loaded";
+ exit(1);
+ }
+
+ std::cout << "name type emb sub font file";
+ std::cout << std::endl;
+ std::cout << "------------------------------------ ------------ --- --- ---------";
+ std::cout << std::endl;
+
+ foreach( const Poppler::FontInfo &font, doc->fonts() ) {
+ if (font.name().isNull()) {
+ std::cout << qPrintable( QString("%1").arg(QString("[none]"), -37) );
+ } else {
+ std::cout << qPrintable( QString("%1").arg(font.name(), -37) );
+ }
+ switch( font.type() ) {
+ case Poppler::FontInfo::unknown:
+ std::cout << "unknown ";
+ break;
+ case Poppler::FontInfo::Type1:
+ std::cout << "Type 1 ";
+ break;
+ case Poppler::FontInfo::Type1C:
+ std::cout << "Type 1C ";
+ break;
+ case Poppler::FontInfo::Type3:
+ std::cout << "Type 3 ";
+ break;
+ case Poppler::FontInfo::TrueType:
+ std::cout << "TrueType ";
+ break;
+ case Poppler::FontInfo::CIDType0:
+ std::cout << "CID Type 0 ";
+ break;
+ case Poppler::FontInfo::CIDType0C:
+ std::cout << "CID Type 0C ";
+ break;
+ case Poppler::FontInfo::CIDTrueType:
+ std::cout << "CID TrueType ";
+ break;
+ case Poppler::FontInfo::Type1COT:
+ std::cout << "Type 1C (OT) ";
+ break;
+ case Poppler::FontInfo::TrueTypeOT:
+ std::cout << "TrueType (OT) ";
+ break;
+ case Poppler::FontInfo::CIDType0COT:
+ std::cout << "CID Type 0C (OT) ";
+ break;
+ case Poppler::FontInfo::CIDTrueTypeOT:
+ std::cout << "CID TrueType (OT) ";
+ break;
+ }
+
+ if ( font.isEmbedded() ) {
+ std::cout << "yes ";
+ } else {
+ std::cout << "no ";
+ }
+ if ( font.isSubset() ) {
+ std::cout << "yes ";
+ } else {
+ std::cout << "no ";
+ }
+ std::cout << qPrintable( QString("%1").arg(font.file()) );
+ std::cout << std::endl;
+ }
+ delete doc;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-dir.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-dir.cpp
new file mode 100644
index 00000000000..1ec7ec3dcbc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-dir.cpp
@@ -0,0 +1,66 @@
+#include <QtCore/QDebug>
+#include <QtCore/QDir>
+#include <QtCore/QTime>
+#include <QtGui/QApplication>
+#include <QtGui/QImage>
+
+#include <iostream>
+
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv ); // QApplication required!
+
+ QTime t;
+ t.start();
+
+ QDir directory( argv[1] );
+ foreach ( const QString &fileName, directory.entryList() ) {
+ if (fileName.endsWith("pdf") ) {
+ qDebug() << "Doing" << fileName.toLatin1().data() << ":";
+ Poppler::Document *doc = Poppler::Document::load( directory.canonicalPath()+"/"+fileName );
+ if (!doc) {
+ qWarning() << "doc not loaded";
+ } else if ( doc->isLocked() ) {
+ if (! doc->unlock( "", "password" ) ) {
+ qWarning() << "couldn't unlock document";
+ delete doc;
+ }
+ } else {
+ doc->pdfVersion();
+ doc->info("Title");
+ doc->info("Subject");
+ doc->info("Author");
+ doc->info("Keywords");
+ doc->info("Creator");
+ doc->info("Producer");
+ doc->date("CreationDate").toString();
+ doc->date("ModDate").toString();
+ doc->numPages();
+ doc->isLinearized();
+ doc->isEncrypted();
+ doc->okToPrint();
+ doc->okToCopy();
+ doc->okToChange();
+ doc->okToAddNotes();
+ doc->pageMode();
+
+ for( int index = 0; index < doc->numPages(); ++index ) {
+ Poppler::Page *page = doc->page( index );
+ QImage image = page->renderToImage();
+ page->pageSize();
+ page->orientation();
+ delete page;
+ std::cout << ".";
+ std::cout.flush();
+ }
+ std::cout << std::endl;
+ delete doc;
+ }
+ }
+ }
+
+ std::cout << "Elapsed time: " << (t.elapsed()/1000) << "seconds" << std::endl;
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-qt4.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-qt4.cpp
new file mode 100644
index 00000000000..7fedae25f47
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/stress-poppler-qt4.cpp
@@ -0,0 +1,73 @@
+#include <QtCore/QDebug>
+#include <QtCore/QDir>
+#include <QtCore/QTime>
+#include <QtGui/QApplication>
+#include <QtGui/QImage>
+
+#include <iostream>
+
+#include <poppler-qt4.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv ); // QApplication required!
+
+ Q_UNUSED( argc );
+ Q_UNUSED( argv );
+
+ QTime t;
+ t.start();
+ QDir dbDir( QString( "./pdfdb" ) );
+ if ( !dbDir.exists() ) {
+ qWarning() << "Database directory does not exist";
+ }
+
+ QStringList excludeSubDirs;
+ excludeSubDirs << "000048" << "000607";
+
+ foreach ( const QString &subdir, dbDir.entryList(QStringList() << "0000*", QDir::Dirs) ) {
+ if ( excludeSubDirs.contains(subdir) ) {
+ // then skip it
+ } else {
+ QString path = "./pdfdb/" + subdir + "/data.pdf";
+ std::cout <<"Doing " << path.toLatin1().data() << " :";
+ Poppler::Document *doc = Poppler::Document::load( path );
+ if (!doc) {
+ qWarning() << "doc not loaded";
+ } else {
+ doc->pdfVersion();
+ doc->info("Title");
+ doc->info("Subject");
+ doc->info("Author");
+ doc->info("Keywords");
+ doc->info("Creator");
+ doc->info("Producer");
+ doc->date("CreationDate").toString();
+ doc->date("ModDate").toString();
+ doc->numPages();
+ doc->isLinearized();
+ doc->isEncrypted();
+ doc->okToPrint();
+ doc->okToCopy();
+ doc->okToChange();
+ doc->okToAddNotes();
+ doc->pageMode();
+
+ for( int index = 0; index < doc->numPages(); ++index ) {
+ Poppler::Page *page = doc->page( index );
+ QImage image = page->renderToImage();
+ page->pageSize();
+ page->orientation();
+ delete page;
+ std::cout << ".";
+ std::cout.flush();
+ }
+ std::cout << std::endl;
+ delete doc;
+ }
+ }
+ }
+
+ std::cout << "Elapsed time: " << (t.elapsed()/1000) << std::endl;
+
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-password-qt4.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-password-qt4.cpp
new file mode 100644
index 00000000000..abc2f4f89a3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-password-qt4.cpp
@@ -0,0 +1,134 @@
+#include <QtCore/QDebug>
+#include <QtGui/QApplication>
+#include <QtGui/QImage>
+#include <QtGui/QPainter>
+#include <QtGui/QPaintEvent>
+#include <QtGui/QWidget>
+
+#include <poppler-qt4.h>
+
+class PDFDisplay : public QWidget // picture display widget
+{
+public:
+ PDFDisplay( Poppler::Document *d );
+ ~PDFDisplay();
+protected:
+ void paintEvent( QPaintEvent * );
+ void keyPressEvent( QKeyEvent * );
+private:
+ void display();
+ int m_currentPage;
+ QImage image;
+ Poppler::Document *doc;
+};
+
+PDFDisplay::PDFDisplay( Poppler::Document *d )
+{
+ doc = d;
+ m_currentPage = 0;
+ display();
+}
+
+void PDFDisplay::display()
+{
+ if (doc) {
+ Poppler::Page *page = doc->page(m_currentPage);
+ if (page) {
+ qDebug() << "Displaying page: " << m_currentPage;
+ image = page->renderToImage();
+ update();
+ delete page;
+ }
+ } else {
+ qWarning() << "doc not loaded";
+ }
+}
+
+PDFDisplay::~PDFDisplay()
+{
+ delete doc;
+}
+
+void PDFDisplay::paintEvent( QPaintEvent *e )
+{
+ QPainter paint( this ); // paint widget
+ if (!image.isNull()) {
+ paint.drawImage(0, 0, image);
+ } else {
+ qWarning() << "null image";
+ }
+}
+
+void PDFDisplay::keyPressEvent( QKeyEvent *e )
+{
+ if (e->key() == Qt::Key_Down)
+ {
+ if (m_currentPage + 1 < doc->numPages())
+ {
+ m_currentPage++;
+ display();
+ }
+ }
+ else if (e->key() == Qt::Key_Up)
+ {
+ if (m_currentPage > 0)
+ {
+ m_currentPage--;
+ display();
+ }
+ }
+ else if (e->key() == Qt::Key_Q)
+ {
+ exit(0);
+ }
+}
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv ); // QApplication required!
+
+ if ( argc != 3)
+ {
+ qWarning() << "usage: test-password-qt4 owner-password filename";
+ exit(1);
+ }
+
+ Poppler::Document *doc = Poppler::Document::load(argv[2], argv[1]);
+ if (!doc)
+ {
+ qWarning() << "doc not loaded";
+ exit(1);
+ }
+
+ // output some meta-data
+ qDebug() << " PDF Version: " << doc->pdfVersion();
+ qDebug() << " Title: " << doc->info("Title");
+ qDebug() << " Subject: " << doc->info("Subject");
+ qDebug() << " Author: " << doc->info("Author");
+ qDebug() << " Key words: " << doc->info("Keywords");
+ qDebug() << " Creator: " << doc->info("Creator");
+ qDebug() << " Producer: " << doc->info("Producer");
+ qDebug() << " Date created: " << doc->date("CreationDate").toString();
+ qDebug() << " Date modified: " << doc->date("ModDate").toString();
+ qDebug() << "Number of pages: " << doc->numPages();
+ qDebug() << " Linearised: " << doc->isLinearized();
+ qDebug() << " Encrypted: " << doc->isEncrypted();
+ qDebug() << " OK to print: " << doc->okToPrint();
+ qDebug() << " OK to copy: " << doc->okToCopy();
+ qDebug() << " OK to change: " << doc->okToChange();
+ qDebug() << "OK to add notes: " << doc->okToAddNotes();
+ qDebug() << " Page mode: " << doc->pageMode();
+ QStringList fontNameList;
+ foreach( const Poppler::FontInfo &font, doc->fonts() )
+ fontNameList += font.name();
+ qDebug() << " Fonts: " << fontNameList.join( ", " );
+
+ Poppler::Page *page = doc->page(0);
+ qDebug() << " Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
+
+ PDFDisplay test( doc ); // create picture display
+ test.setWindowTitle("Poppler-Qt4 Test");
+ test.show(); // show it
+
+ return a.exec(); // start event loop
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-poppler-qt4.cpp b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-poppler-qt4.cpp
new file mode 100644
index 00000000000..1726bfd9c09
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/qt4/tests/test-poppler-qt4.cpp
@@ -0,0 +1,234 @@
+#include <QtCore/QDebug>
+#include <QtCore/QFile>
+#include <QtGui/QApplication>
+#include <QtGui/QImage>
+#include <QtGui/QLabel>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QPainter>
+#include <QtGui/QPaintEvent>
+#include <QtGui/QToolTip>
+#include <QtGui/QWidget>
+
+#include <poppler-qt4.h>
+
+class PDFDisplay : public QWidget // picture display widget
+{
+public:
+ PDFDisplay( Poppler::Document *d, bool arthur );
+ ~PDFDisplay();
+ void setShowTextRects(bool show);
+ void display();
+protected:
+ void paintEvent( QPaintEvent * );
+ void keyPressEvent( QKeyEvent * );
+ void mousePressEvent( QMouseEvent * );
+private:
+ int m_currentPage;
+ QImage image;
+ Poppler::Document *doc;
+ QString backendString;
+ bool showTextRects;
+ QList<Poppler::TextBox*> textRects;
+};
+
+PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur )
+{
+ showTextRects = false;
+ doc = d;
+ m_currentPage = 0;
+ if (arthur)
+ {
+ backendString = "Arthur";
+ doc->setRenderBackend(Poppler::Document::ArthurBackend);
+ }
+ else
+ {
+ backendString = "Splash";
+ doc->setRenderBackend(Poppler::Document::SplashBackend);
+ }
+ doc->setRenderHint(Poppler::Document::Antialiasing, true);
+ doc->setRenderHint(Poppler::Document::TextAntialiasing, true);
+}
+
+void PDFDisplay::setShowTextRects(bool show)
+{
+ showTextRects = show;
+}
+
+void PDFDisplay::display()
+{
+ if (doc) {
+ Poppler::Page *page = doc->page(m_currentPage);
+ if (page) {
+ qDebug() << "Displaying page using" << backendString << "backend: " << m_currentPage;
+ QTime t = QTime::currentTime();
+ image = page->renderToImage();
+ qDebug() << "Rendering took" << t.msecsTo(QTime::currentTime()) << "msecs";
+ qDeleteAll(textRects);
+ if (showTextRects)
+ {
+ QPainter painter(&image);
+ painter.setPen(Qt::red);
+ textRects = page->textList();
+ foreach(Poppler::TextBox *tb, textRects)
+ {
+ painter.drawRect(tb->boundingBox());
+ }
+ }
+ else textRects.clear();
+ update();
+ delete page;
+ }
+ } else {
+ qWarning() << "doc not loaded";
+ }
+}
+
+PDFDisplay::~PDFDisplay()
+{
+ qDeleteAll(textRects);
+ delete doc;
+}
+
+void PDFDisplay::paintEvent( QPaintEvent *e )
+{
+ QPainter paint( this ); // paint widget
+ if (!image.isNull()) {
+ paint.drawImage(0, 0, image);
+ } else {
+ qWarning() << "null image";
+ }
+}
+
+void PDFDisplay::keyPressEvent( QKeyEvent *e )
+{
+ if (e->key() == Qt::Key_Down)
+ {
+ if (m_currentPage + 1 < doc->numPages())
+ {
+ m_currentPage++;
+ display();
+ }
+ }
+ else if (e->key() == Qt::Key_Up)
+ {
+ if (m_currentPage > 0)
+ {
+ m_currentPage--;
+ display();
+ }
+ }
+ else if (e->key() == Qt::Key_Q)
+ {
+ exit(0);
+ }
+}
+
+void PDFDisplay::mousePressEvent( QMouseEvent *e )
+{
+ int i = 0;
+ foreach(Poppler::TextBox *tb, textRects)
+ {
+ if (tb->boundingBox().contains(e->pos()))
+ {
+ QString tt = QString("Text: \"%1\"\nIndex in text list: %2").arg(tb->text()).arg(i);
+ QToolTip::showText(e->globalPos(), tt, this);
+ break;
+ }
+ ++i;
+ }
+}
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv ); // QApplication required!
+
+ if ( argc < 2 ||
+ (argc == 3 && strcmp(argv[2], "-extract") != 0 && strcmp(argv[2], "-arthur") != 0 && strcmp(argv[2], "-textRects") != 0) ||
+ argc > 3)
+ {
+ // use argument as file name
+ qWarning() << "usage: test-poppler-qt filename [-extract|-arthur|-textRects]";
+ exit(1);
+ }
+
+ Poppler::Document *doc = Poppler::Document::load(QFile::decodeName(argv[1]));
+ if (!doc)
+ {
+ qWarning() << "doc not loaded";
+ exit(1);
+ }
+
+ if (doc->isLocked())
+ {
+ qWarning() << "document locked (needs password)";
+ exit(0);
+ }
+
+ // output some meta-data
+ qDebug() << " PDF Version: " << doc->pdfVersion();
+ qDebug() << " Title: " << doc->info("Title");
+ qDebug() << " Subject: " << doc->info("Subject");
+ qDebug() << " Author: " << doc->info("Author");
+ qDebug() << " Key words: " << doc->info("Keywords");
+ qDebug() << " Creator: " << doc->info("Creator");
+ qDebug() << " Producer: " << doc->info("Producer");
+ qDebug() << " Date created: " << doc->date("CreationDate").toString();
+ qDebug() << " Date modified: " << doc->date("ModDate").toString();
+ qDebug() << "Number of pages: " << doc->numPages();
+ qDebug() << " Linearised: " << doc->isLinearized();
+ qDebug() << " Encrypted: " << doc->isEncrypted();
+ qDebug() << " OK to print: " << doc->okToPrint();
+ qDebug() << " OK to copy: " << doc->okToCopy();
+ qDebug() << " OK to change: " << doc->okToChange();
+ qDebug() << "OK to add notes: " << doc->okToAddNotes();
+ qDebug() << " Page mode: " << doc->pageMode();
+ qDebug() << " Metadata: " << doc->metadata();
+ QStringList fontNameList;
+ foreach( const Poppler::FontInfo &font, doc->fonts() )
+ fontNameList += font.name();
+ qDebug() << " Fonts: " << fontNameList.join( ", " );
+
+ if ( doc->hasEmbeddedFiles() ) {
+ qDebug() << "Embedded files:";
+ foreach( Poppler::EmbeddedFile *file, doc->embeddedFiles() ) {
+ qDebug() << " " << file->name();
+ }
+ qDebug();
+ } else {
+ qDebug() << "No embedded files";
+ }
+
+ if (doc->numPages() <= 0)
+ {
+ delete doc;
+ qDebug() << "Doc has no pages";
+ return 0;
+ }
+
+ Poppler::Page *page = doc->page(0);
+ qDebug() << "Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
+ delete page;
+
+ if (argc == 2 || (argc == 3 && strcmp(argv[2], "-arthur") == 0) || (argc == 3 && strcmp(argv[2], "-textRects") == 0))
+ {
+ bool useArthur = (argc == 3 && strcmp(argv[2], "-arthur") == 0);
+ PDFDisplay test( doc, useArthur ); // create picture display
+ test.setWindowTitle("Poppler-Qt4 Test");
+ test.setShowTextRects(argc == 3 && strcmp(argv[2], "-textRects") == 0);
+ test.display();
+ test.show(); // show it
+
+ return a.exec(); // start event loop
+ }
+ else
+ {
+ Poppler::Page *page = doc->page(0);
+
+ QLabel *l = new QLabel(page->text(QRectF()), 0);
+ l->show();
+ delete page;
+ delete doc;
+ return a.exec();
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.am
new file mode 100644
index 00000000000..914b308cf87
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.am
@@ -0,0 +1,57 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ $(FREETYPE_CFLAGS)
+
+noinst_LTLIBRARIES = libsplash.la
+
+if ENABLE_XPDF_HEADERS
+
+poppler_splash_includedir = $(includedir)/poppler/splash
+poppler_splash_include_HEADERS = \
+ Splash.h \
+ SplashBitmap.h \
+ SplashClip.h \
+ SplashErrorCodes.h \
+ SplashFTFont.h \
+ SplashFTFontEngine.h \
+ SplashFTFontFile.h \
+ SplashFont.h \
+ SplashFontEngine.h \
+ SplashFontFile.h \
+ SplashFontFileID.h \
+ SplashGlyphBitmap.h \
+ SplashMath.h \
+ SplashPath.h \
+ SplashPattern.h \
+ SplashScreen.h \
+ SplashState.h \
+ SplashT1Font.h \
+ SplashT1FontEngine.h \
+ SplashT1FontFile.h \
+ SplashTypes.h \
+ SplashXPath.h \
+ SplashXPathScanner.h
+
+endif
+
+libsplash_la_SOURCES = \
+ Splash.cc \
+ SplashBitmap.cc \
+ SplashClip.cc \
+ SplashFTFont.cc \
+ SplashFTFontEngine.cc \
+ SplashFTFontFile.cc \
+ SplashFont.cc \
+ SplashFontEngine.cc \
+ SplashFontFile.cc \
+ SplashFontFileID.cc \
+ SplashPath.cc \
+ SplashPattern.cc \
+ SplashScreen.cc \
+ SplashState.cc \
+ SplashT1Font.cc \
+ SplashT1FontEngine.cc \
+ SplashT1FontFile.cc \
+ SplashXPath.cc \
+ SplashXPathScanner.cc
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.in
new file mode 100644
index 00000000000..c47c6f228a3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/Makefile.in
@@ -0,0 +1,687 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = splash
+DIST_COMMON = $(am__poppler_splash_include_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsplash_la_LIBADD =
+am_libsplash_la_OBJECTS = Splash.lo SplashBitmap.lo SplashClip.lo \
+ SplashFTFont.lo SplashFTFontEngine.lo SplashFTFontFile.lo \
+ SplashFont.lo SplashFontEngine.lo SplashFontFile.lo \
+ SplashFontFileID.lo SplashPath.lo SplashPattern.lo \
+ SplashScreen.lo SplashState.lo SplashT1Font.lo \
+ SplashT1FontEngine.lo SplashT1FontFile.lo SplashXPath.lo \
+ SplashXPathScanner.lo
+libsplash_la_OBJECTS = $(am_libsplash_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libsplash_la_SOURCES)
+DIST_SOURCES = $(libsplash_la_SOURCES)
+am__poppler_splash_include_HEADERS_DIST = Splash.h SplashBitmap.h \
+ SplashClip.h SplashErrorCodes.h SplashFTFont.h \
+ SplashFTFontEngine.h SplashFTFontFile.h SplashFont.h \
+ SplashFontEngine.h SplashFontFile.h SplashFontFileID.h \
+ SplashGlyphBitmap.h SplashMath.h SplashPath.h SplashPattern.h \
+ SplashScreen.h SplashState.h SplashT1Font.h \
+ SplashT1FontEngine.h SplashT1FontFile.h SplashTypes.h \
+ SplashXPath.h SplashXPathScanner.h
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(poppler_splash_includedir)"
+HEADERS = $(poppler_splash_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ $(FREETYPE_CFLAGS)
+
+noinst_LTLIBRARIES = libsplash.la
+@ENABLE_XPDF_HEADERS_TRUE@poppler_splash_includedir = $(includedir)/poppler/splash
+@ENABLE_XPDF_HEADERS_TRUE@poppler_splash_include_HEADERS = \
+@ENABLE_XPDF_HEADERS_TRUE@ Splash.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashBitmap.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashClip.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashErrorCodes.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFTFont.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFTFontEngine.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFTFontFile.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFont.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFontEngine.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFontFile.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashFontFileID.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashGlyphBitmap.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashMath.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashPath.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashPattern.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashScreen.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashState.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashT1Font.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashT1FontEngine.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashT1FontFile.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashTypes.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashXPath.h \
+@ENABLE_XPDF_HEADERS_TRUE@ SplashXPathScanner.h
+
+libsplash_la_SOURCES = \
+ Splash.cc \
+ SplashBitmap.cc \
+ SplashClip.cc \
+ SplashFTFont.cc \
+ SplashFTFontEngine.cc \
+ SplashFTFontFile.cc \
+ SplashFont.cc \
+ SplashFontEngine.cc \
+ SplashFontFile.cc \
+ SplashFontFileID.cc \
+ SplashPath.cc \
+ SplashPattern.cc \
+ SplashScreen.cc \
+ SplashState.cc \
+ SplashT1Font.cc \
+ SplashT1FontEngine.cc \
+ SplashT1FontFile.cc \
+ SplashXPath.cc \
+ SplashXPathScanner.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign splash/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign splash/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libsplash.la: $(libsplash_la_OBJECTS) $(libsplash_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(libsplash_la_OBJECTS) $(libsplash_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Splash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashBitmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashClip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFTFont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFTFontEngine.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFTFontFile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFontEngine.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFontFile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashFontFileID.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashPath.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashPattern.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashScreen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashState.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashT1Font.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashT1FontEngine.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashT1FontFile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashXPath.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SplashXPathScanner.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-poppler_splash_includeHEADERS: $(poppler_splash_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(poppler_splash_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_splash_includedir)"
+ @list='$(poppler_splash_include_HEADERS)'; test -n "$(poppler_splash_includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_splash_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_splash_includedir)" || exit $$?; \
+ done
+
+uninstall-poppler_splash_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(poppler_splash_include_HEADERS)'; test -n "$(poppler_splash_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(poppler_splash_includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(poppler_splash_includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(poppler_splash_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-poppler_splash_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-poppler_splash_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am \
+ install-poppler_splash_includeHEADERS install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-poppler_splash_includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.cc
new file mode 100644
index 00000000000..834cb1097be
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.cc
@@ -0,0 +1,3573 @@
+//========================================================================
+//
+// Splash.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include "goo/gmem.h"
+#include "SplashErrorCodes.h"
+#include "SplashMath.h"
+#include "SplashBitmap.h"
+#include "SplashState.h"
+#include "SplashPath.h"
+#include "SplashXPath.h"
+#include "SplashXPathScanner.h"
+#include "SplashPattern.h"
+#include "SplashScreen.h"
+#include "SplashFont.h"
+#include "SplashGlyphBitmap.h"
+#include "Splash.h"
+
+//------------------------------------------------------------------------
+
+// distance of Bezier control point from center for circle approximation
+// = (4 * (sqrt(2) - 1) / 3) * r
+#define bezierCircle ((SplashCoord)0.55228475)
+#define bezierCircle2 ((SplashCoord)(0.5 * 0.55228475))
+
+// Divide a 16-bit value (in [0, 255*255]) by 255, returning an 8-bit result.
+static inline Guchar div255(int x) {
+ return (Guchar)((x + (x >> 8) + 0x80) >> 8);
+}
+
+//------------------------------------------------------------------------
+// SplashPipe
+//------------------------------------------------------------------------
+
+#define splashPipeMaxStages 9
+
+struct SplashPipe {
+ // pixel coordinates
+ int x, y;
+
+ // source pattern
+ SplashPattern *pattern;
+
+ // source alpha and color
+ SplashCoord aInput;
+ GBool usesShape;
+ Guchar aSrc;
+ SplashColorPtr cSrc;
+ SplashColor cSrcVal;
+
+ // non-isolated group alpha0
+ Guchar *alpha0Ptr;
+
+ // soft mask
+ SplashColorPtr softMaskPtr;
+
+ // destination alpha and color
+ SplashColorPtr destColorPtr;
+ int destColorMask;
+ Guchar *destAlphaPtr;
+
+ // shape
+ SplashCoord shape;
+
+ // result alpha and color
+ GBool noTransparency;
+ SplashPipeResultColorCtrl resultColorCtrl;
+
+ // non-isolated group correction
+ int nonIsolatedGroup;
+};
+
+SplashPipeResultColorCtrl Splash::pipeResultColorNoAlphaBlend[] = {
+ splashPipeResultColorNoAlphaBlendMono,
+ splashPipeResultColorNoAlphaBlendMono,
+ splashPipeResultColorNoAlphaBlendRGB,
+ splashPipeResultColorNoAlphaBlendRGB,
+ splashPipeResultColorNoAlphaBlendRGB
+#if SPLASH_CMYK
+ ,
+ splashPipeResultColorNoAlphaBlendCMYK
+#endif
+};
+
+SplashPipeResultColorCtrl Splash::pipeResultColorAlphaNoBlend[] = {
+ splashPipeResultColorAlphaNoBlendMono,
+ splashPipeResultColorAlphaNoBlendMono,
+ splashPipeResultColorAlphaNoBlendRGB,
+ splashPipeResultColorNoAlphaBlendRGB,
+ splashPipeResultColorAlphaNoBlendRGB
+#if SPLASH_CMYK
+ ,
+ splashPipeResultColorAlphaNoBlendCMYK
+#endif
+};
+
+SplashPipeResultColorCtrl Splash::pipeResultColorAlphaBlend[] = {
+ splashPipeResultColorAlphaBlendMono,
+ splashPipeResultColorAlphaBlendMono,
+ splashPipeResultColorAlphaBlendRGB,
+ splashPipeResultColorNoAlphaBlendRGB,
+ splashPipeResultColorAlphaBlendRGB
+#if SPLASH_CMYK
+ ,
+ splashPipeResultColorAlphaBlendCMYK
+#endif
+};
+
+//------------------------------------------------------------------------
+
+static void blendXor(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm) {
+ int i;
+
+ for (i = 0; i < splashColorModeNComps[cm]; ++i) {
+ blend[i] = src[i] ^ dest[i];
+ }
+}
+
+//------------------------------------------------------------------------
+// modified region
+//------------------------------------------------------------------------
+
+void Splash::clearModRegion() {
+ modXMin = bitmap->getWidth();
+ modYMin = bitmap->getHeight();
+ modXMax = -1;
+ modYMax = -1;
+}
+
+inline void Splash::updateModX(int x) {
+ if (x < modXMin) {
+ modXMin = x;
+ }
+ if (x > modXMax) {
+ modXMax = x;
+ }
+}
+
+inline void Splash::updateModY(int y) {
+ if (y < modYMin) {
+ modYMin = y;
+ }
+ if (y > modYMax) {
+ modYMax = y;
+ }
+}
+
+//------------------------------------------------------------------------
+// pipeline
+//------------------------------------------------------------------------
+
+inline void Splash::pipeInit(SplashPipe *pipe, int x, int y,
+ SplashPattern *pattern, SplashColorPtr cSrc,
+ SplashCoord aInput, GBool usesShape,
+ GBool nonIsolatedGroup) {
+ pipeSetXY(pipe, x, y);
+ pipe->pattern = NULL;
+
+ // source color
+ if (pattern) {
+ if (pattern->isStatic()) {
+ pattern->getColor(x, y, pipe->cSrcVal);
+ } else {
+ pipe->pattern = pattern;
+ }
+ pipe->cSrc = pipe->cSrcVal;
+ } else {
+ pipe->cSrc = cSrc;
+ }
+
+ // source alpha
+ pipe->aInput = aInput;
+ if (!state->softMask) {
+ if (usesShape) {
+ pipe->aInput *= 255;
+ } else {
+ pipe->aSrc = (Guchar)splashRound(pipe->aInput * 255);
+ }
+ }
+ pipe->usesShape = usesShape;
+
+ // result alpha
+ if (aInput == 1 && !state->softMask && !usesShape &&
+ !state->inNonIsolatedGroup) {
+ pipe->noTransparency = gTrue;
+ } else {
+ pipe->noTransparency = gFalse;
+ }
+
+ // result color
+ if (pipe->noTransparency) {
+ // the !state->blendFunc case is handled separately in pipeRun
+ pipe->resultColorCtrl = pipeResultColorNoAlphaBlend[bitmap->mode];
+ } else if (!state->blendFunc) {
+ pipe->resultColorCtrl = pipeResultColorAlphaNoBlend[bitmap->mode];
+ } else {
+ pipe->resultColorCtrl = pipeResultColorAlphaBlend[bitmap->mode];
+ }
+
+ // non-isolated group correction
+ if (nonIsolatedGroup) {
+ pipe->nonIsolatedGroup = splashColorModeNComps[bitmap->mode];
+ } else {
+ pipe->nonIsolatedGroup = 0;
+ }
+}
+
+inline void Splash::pipeRun(SplashPipe *pipe) {
+ Guchar aSrc, aDest, alpha2, alpha0, aResult;
+ SplashColor cDest, cBlend;
+ Guchar cResult0, cResult1, cResult2, cResult3;
+
+ //----- source color
+
+ // static pattern: handled in pipeInit
+ // fixed color: handled in pipeInit
+
+ // dynamic pattern
+ if (pipe->pattern) {
+ pipe->pattern->getColor(pipe->x, pipe->y, pipe->cSrcVal);
+ }
+
+ if (pipe->noTransparency && !state->blendFunc) {
+
+ //----- write destination pixel
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ cResult0 = pipe->cSrc[0];
+ if (state->screen->test(pipe->x, pipe->y, cResult0)) {
+ *pipe->destColorPtr |= pipe->destColorMask;
+ } else {
+ *pipe->destColorPtr &= ~pipe->destColorMask;
+ }
+ if (!(pipe->destColorMask >>= 1)) {
+ pipe->destColorMask = 0x80;
+ ++pipe->destColorPtr;
+ }
+ break;
+ case splashModeMono8:
+ *pipe->destColorPtr++ = pipe->cSrc[0];
+ break;
+ case splashModeRGB8:
+ *pipe->destColorPtr++ = pipe->cSrc[0];
+ *pipe->destColorPtr++ = pipe->cSrc[1];
+ *pipe->destColorPtr++ = pipe->cSrc[2];
+ break;
+ case splashModeXBGR8:
+ *pipe->destColorPtr++ = pipe->cSrc[2];
+ *pipe->destColorPtr++ = pipe->cSrc[1];
+ *pipe->destColorPtr++ = pipe->cSrc[0];
+ *pipe->destColorPtr++ = 255;
+ break;
+ case splashModeBGR8:
+ *pipe->destColorPtr++ = pipe->cSrc[2];
+ *pipe->destColorPtr++ = pipe->cSrc[1];
+ *pipe->destColorPtr++ = pipe->cSrc[0];
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ *pipe->destColorPtr++ = pipe->cSrc[0];
+ *pipe->destColorPtr++ = pipe->cSrc[1];
+ *pipe->destColorPtr++ = pipe->cSrc[2];
+ *pipe->destColorPtr++ = pipe->cSrc[3];
+ break;
+#endif
+ }
+ if (pipe->destAlphaPtr) {
+ *pipe->destAlphaPtr++ = 255;
+ }
+
+ } else {
+
+ //----- read destination pixel
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ cDest[0] = (*pipe->destColorPtr & pipe->destColorMask) ? 0xff : 0x00;
+ break;
+ case splashModeMono8:
+ cDest[0] = *pipe->destColorPtr;
+ break;
+ case splashModeRGB8:
+ cDest[0] = pipe->destColorPtr[0];
+ cDest[1] = pipe->destColorPtr[1];
+ cDest[2] = pipe->destColorPtr[2];
+ break;
+ case splashModeXBGR8:
+ cDest[0] = pipe->destColorPtr[2];
+ cDest[1] = pipe->destColorPtr[1];
+ cDest[2] = pipe->destColorPtr[0];
+ cDest[3] = 255;
+ break;
+ case splashModeBGR8:
+ cDest[0] = pipe->destColorPtr[2];
+ cDest[1] = pipe->destColorPtr[1];
+ cDest[2] = pipe->destColorPtr[0];
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ cDest[0] = pipe->destColorPtr[0];
+ cDest[1] = pipe->destColorPtr[1];
+ cDest[2] = pipe->destColorPtr[2];
+ cDest[3] = pipe->destColorPtr[3];
+ break;
+#endif
+ }
+ if (pipe->destAlphaPtr) {
+ aDest = *pipe->destAlphaPtr;
+ } else {
+ aDest = 0xff;
+ }
+
+ //----- blend function
+
+ if (state->blendFunc) {
+ (*state->blendFunc)(pipe->cSrc, cDest, cBlend, bitmap->mode);
+ }
+
+ //----- source alpha
+
+ if (state->softMask) {
+ if (pipe->usesShape) {
+ aSrc = (Guchar)splashRound(pipe->aInput * *pipe->softMaskPtr++
+ * pipe->shape);
+ } else {
+ aSrc = (Guchar)splashRound(pipe->aInput * *pipe->softMaskPtr++);
+ }
+ } else if (pipe->usesShape) {
+ // pipe->aInput is premultiplied by 255 in pipeInit
+ aSrc = (Guchar)splashRound(pipe->aInput * pipe->shape);
+ } else {
+ // precomputed in pipeInit
+ aSrc = pipe->aSrc;
+ }
+
+ //----- result alpha and non-isolated group element correction
+
+ if (pipe->noTransparency) {
+ alpha2 = aResult = 255;
+ } else {
+ aResult = aSrc + aDest - div255(aSrc * aDest);
+
+ if (pipe->alpha0Ptr) {
+ alpha0 = *pipe->alpha0Ptr++;
+ alpha2 = aResult + alpha0 - div255(aResult * alpha0);
+ } else {
+ alpha2 = aResult;
+ }
+ }
+
+ //----- result color
+
+ cResult0 = cResult1 = cResult2 = cResult3 = 0; // make gcc happy
+
+ switch (pipe->resultColorCtrl) {
+
+#if SPLASH_CMYK
+ case splashPipeResultColorNoAlphaBlendCMYK:
+ cResult3 = div255((255 - aDest) * pipe->cSrc[3] + aDest * cBlend[3]);
+#endif
+ case splashPipeResultColorNoAlphaBlendRGB:
+ cResult2 = div255((255 - aDest) * pipe->cSrc[2] + aDest * cBlend[2]);
+ cResult1 = div255((255 - aDest) * pipe->cSrc[1] + aDest * cBlend[1]);
+ case splashPipeResultColorNoAlphaBlendMono:
+ cResult0 = div255((255 - aDest) * pipe->cSrc[0] + aDest * cBlend[0]);
+ break;
+
+ case splashPipeResultColorAlphaNoBlendMono:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * pipe->cSrc[0]) / alpha2);
+ }
+ break;
+ case splashPipeResultColorAlphaNoBlendRGB:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ cResult1 = 0;
+ cResult2 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * pipe->cSrc[0]) / alpha2);
+ cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] +
+ aSrc * pipe->cSrc[1]) / alpha2);
+ cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] +
+ aSrc * pipe->cSrc[2]) / alpha2);
+ }
+ break;
+#if SPLASH_CMYK
+ case splashPipeResultColorAlphaNoBlendCMYK:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ cResult1 = 0;
+ cResult2 = 0;
+ cResult3 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * pipe->cSrc[0]) / alpha2);
+ cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] +
+ aSrc * pipe->cSrc[1]) / alpha2);
+ cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] +
+ aSrc * pipe->cSrc[2]) / alpha2);
+ cResult3 = (Guchar)(((alpha2 - aSrc) * cDest[3] +
+ aSrc * pipe->cSrc[3]) / alpha2);
+ }
+ break;
+#endif
+
+ case splashPipeResultColorAlphaBlendMono:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * ((255 - aDest) * pipe->cSrc[0] +
+ aDest * cBlend[0]) / 255) /
+ alpha2);
+ }
+ break;
+ case splashPipeResultColorAlphaBlendRGB:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ cResult1 = 0;
+ cResult2 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * ((255 - aDest) * pipe->cSrc[0] +
+ aDest * cBlend[0]) / 255) /
+ alpha2);
+ cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] +
+ aSrc * ((255 - aDest) * pipe->cSrc[1] +
+ aDest * cBlend[1]) / 255) /
+ alpha2);
+ cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] +
+ aSrc * ((255 - aDest) * pipe->cSrc[2] +
+ aDest * cBlend[2]) / 255) /
+ alpha2);
+ }
+ break;
+#if SPLASH_CMYK
+ case splashPipeResultColorAlphaBlendCMYK:
+ if (alpha2 == 0) {
+ cResult0 = 0;
+ cResult1 = 0;
+ cResult2 = 0;
+ cResult3 = 0;
+ } else {
+ cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] +
+ aSrc * ((255 - aDest) * pipe->cSrc[0] +
+ aDest * cBlend[0]) / 255) /
+ alpha2);
+ cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] +
+ aSrc * ((255 - aDest) * pipe->cSrc[1] +
+ aDest * cBlend[1]) / 255) /
+ alpha2);
+ cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] +
+ aSrc * ((255 - aDest) * pipe->cSrc[2] +
+ aDest * cBlend[2]) / 255) /
+ alpha2);
+ cResult3 = (Guchar)(((alpha2 - aSrc) * cDest[3] +
+ aSrc * ((255 - aDest) * pipe->cSrc[3] +
+ aDest * cBlend[3]) / 255) /
+ alpha2);
+ }
+ break;
+#endif
+ }
+
+ //----- non-isolated group correction
+
+ if (aResult != 0) {
+ switch (pipe->nonIsolatedGroup) {
+#if SPLASH_CMYK
+ case 4:
+ cResult3 += (cResult3 - cDest[3]) * aDest *
+ (255 - aResult) / (255 * aResult);
+#endif
+ case 3:
+ cResult2 += (cResult2 - cDest[2]) * aDest *
+ (255 - aResult) / (255 * aResult);
+ cResult1 += (cResult1 - cDest[1]) * aDest *
+ (255 - aResult) / (255 * aResult);
+ case 1:
+ cResult0 += (cResult0 - cDest[0]) * aDest *
+ (255 - aResult) / (255 * aResult);
+ case 0:
+ break;
+ }
+ }
+
+ //----- write destination pixel
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ if (state->screen->test(pipe->x, pipe->y, cResult0)) {
+ *pipe->destColorPtr |= pipe->destColorMask;
+ } else {
+ *pipe->destColorPtr &= ~pipe->destColorMask;
+ }
+ if (!(pipe->destColorMask >>= 1)) {
+ pipe->destColorMask = 0x80;
+ ++pipe->destColorPtr;
+ }
+ break;
+ case splashModeMono8:
+ *pipe->destColorPtr++ = cResult0;
+ break;
+ case splashModeRGB8:
+ *pipe->destColorPtr++ = cResult0;
+ *pipe->destColorPtr++ = cResult1;
+ *pipe->destColorPtr++ = cResult2;
+ break;
+ case splashModeXBGR8:
+ *pipe->destColorPtr++ = cResult2;
+ *pipe->destColorPtr++ = cResult1;
+ *pipe->destColorPtr++ = cResult0;
+ *pipe->destColorPtr++ = 255;
+ break;
+ case splashModeBGR8:
+ *pipe->destColorPtr++ = cResult2;
+ *pipe->destColorPtr++ = cResult1;
+ *pipe->destColorPtr++ = cResult0;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ *pipe->destColorPtr++ = cResult0;
+ *pipe->destColorPtr++ = cResult1;
+ *pipe->destColorPtr++ = cResult2;
+ *pipe->destColorPtr++ = cResult3;
+ break;
+#endif
+ }
+ if (pipe->destAlphaPtr) {
+ *pipe->destAlphaPtr++ = aResult;
+ }
+
+ }
+
+ ++pipe->x;
+}
+
+inline void Splash::pipeSetXY(SplashPipe *pipe, int x, int y) {
+ pipe->x = x;
+ pipe->y = y;
+ if (state->softMask) {
+ pipe->softMaskPtr =
+ &state->softMask->data[y * state->softMask->rowSize + x];
+ }
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ pipe->destColorPtr = &bitmap->data[y * bitmap->rowSize + (x >> 3)];
+ pipe->destColorMask = 0x80 >> (x & 7);
+ break;
+ case splashModeMono8:
+ pipe->destColorPtr = &bitmap->data[y * bitmap->rowSize + x];
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ pipe->destColorPtr = &bitmap->data[y * bitmap->rowSize + 3 * x];
+ break;
+ case splashModeXBGR8:
+ pipe->destColorPtr = &bitmap->data[y * bitmap->rowSize + 4 * x];
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ pipe->destColorPtr = &bitmap->data[y * bitmap->rowSize + 4 * x];
+ break;
+#endif
+ }
+ if (bitmap->alpha) {
+ pipe->destAlphaPtr = &bitmap->alpha[y * bitmap->width + x];
+ } else {
+ pipe->destAlphaPtr = NULL;
+ }
+ if (state->inNonIsolatedGroup && alpha0Bitmap->alpha) {
+ pipe->alpha0Ptr =
+ &alpha0Bitmap->alpha[(alpha0Y + y) * alpha0Bitmap->width +
+ (alpha0X + x)];
+ } else {
+ pipe->alpha0Ptr = NULL;
+ }
+}
+
+inline void Splash::pipeIncX(SplashPipe *pipe) {
+ ++pipe->x;
+ if (state->softMask) {
+ ++pipe->softMaskPtr;
+ }
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ if (!(pipe->destColorMask >>= 1)) {
+ pipe->destColorMask = 0x80;
+ ++pipe->destColorPtr;
+ }
+ break;
+ case splashModeMono8:
+ ++pipe->destColorPtr;
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ pipe->destColorPtr += 3;
+ break;
+ case splashModeXBGR8:
+ pipe->destColorPtr += 4;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ pipe->destColorPtr += 4;
+ break;
+#endif
+ }
+ if (pipe->destAlphaPtr) {
+ ++pipe->destAlphaPtr;
+ }
+ if (pipe->alpha0Ptr) {
+ ++pipe->alpha0Ptr;
+ }
+}
+
+inline void Splash::drawPixel(SplashPipe *pipe, int x, int y, GBool noClip) {
+ if (noClip || state->clip->test(x, y)) {
+ pipeSetXY(pipe, x, y);
+ pipeRun(pipe);
+ updateModX(x);
+ updateModY(y);
+ }
+}
+
+inline void Splash::drawAAPixelInit() {
+ aaBufY = -1;
+}
+
+inline void Splash::drawAAPixel(SplashPipe *pipe, int x, int y) {
+#if splashAASize == 4
+ static int bitCount4[16] = { 0, 1, 1, 2, 1, 2, 2, 3,
+ 1, 2, 2, 3, 2, 3, 3, 4 };
+ int w;
+#else
+ int xx, yy;
+#endif
+ SplashColorPtr p;
+ int x0, x1, t;
+
+ if (x < 0 || x >= bitmap->width ||
+ y < state->clip->getYMinI() || y > state->clip->getYMaxI()) {
+ return;
+ }
+
+ // update aaBuf
+ if (y != aaBufY) {
+ memset(aaBuf->getDataPtr(), 0xff,
+ aaBuf->getRowSize() * aaBuf->getHeight());
+ x0 = 0;
+ x1 = bitmap->width - 1;
+ state->clip->clipAALine(aaBuf, &x0, &x1, y);
+ aaBufY = y;
+ }
+
+ // compute the shape value
+#if splashAASize == 4
+ p = aaBuf->getDataPtr() + (x >> 1);
+ w = aaBuf->getRowSize();
+ if (x & 1) {
+ t = bitCount4[*p & 0x0f] + bitCount4[p[w] & 0x0f] +
+ bitCount4[p[2*w] & 0x0f] + bitCount4[p[3*w] & 0x0f];
+ } else {
+ t = bitCount4[*p >> 4] + bitCount4[p[w] >> 4] +
+ bitCount4[p[2*w] >> 4] + bitCount4[p[3*w] >> 4];
+ }
+#else
+ t = 0;
+ for (yy = 0; yy < splashAASize; ++yy) {
+ for (xx = 0; xx < splashAASize; ++xx) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() +
+ ((x * splashAASize + xx) >> 3);
+ t += (*p >> (7 - ((x * splashAASize + xx) & 7))) & 1;
+ }
+ }
+#endif
+
+ // draw the pixel
+ if (t != 0) {
+ pipeSetXY(pipe, x, y);
+ pipe->shape *= aaGamma[t];
+ pipeRun(pipe);
+ updateModX(x);
+ updateModY(y);
+ }
+}
+
+inline void Splash::drawSpan(SplashPipe *pipe, int x0, int x1, int y,
+ GBool noClip) {
+ int x;
+
+ pipeSetXY(pipe, x0, y);
+ if (noClip) {
+ for (x = x0; x <= x1; ++x) {
+ pipeRun(pipe);
+ }
+ updateModX(x0);
+ updateModX(x1);
+ updateModY(y);
+ } else {
+ for (x = x0; x <= x1; ++x) {
+ if (state->clip->test(x, y)) {
+ pipeRun(pipe);
+ updateModX(x);
+ updateModY(y);
+ } else {
+ pipeIncX(pipe);
+ }
+ }
+ }
+}
+
+inline void Splash::drawAALine(SplashPipe *pipe, int x0, int x1, int y) {
+#if splashAASize == 4
+ static int bitCount4[16] = { 0, 1, 1, 2, 1, 2, 2, 3,
+ 1, 2, 2, 3, 2, 3, 3, 4 };
+ SplashColorPtr p0, p1, p2, p3;
+ int t;
+#else
+ SplashColorPtr p;
+ int xx, yy, t;
+#endif
+ int x;
+
+#if splashAASize == 4
+ p0 = aaBuf->getDataPtr() + (x0 >> 1);
+ p1 = p0 + aaBuf->getRowSize();
+ p2 = p1 + aaBuf->getRowSize();
+ p3 = p2 + aaBuf->getRowSize();
+#endif
+ pipeSetXY(pipe, x0, y);
+ for (x = x0; x <= x1; ++x) {
+
+ // compute the shape value
+#if splashAASize == 4
+ if (x & 1) {
+ t = bitCount4[*p0 & 0x0f] + bitCount4[*p1 & 0x0f] +
+ bitCount4[*p2 & 0x0f] + bitCount4[*p3 & 0x0f];
+ ++p0; ++p1; ++p2; ++p3;
+ } else {
+ t = bitCount4[*p0 >> 4] + bitCount4[*p1 >> 4] +
+ bitCount4[*p2 >> 4] + bitCount4[*p3 >> 4];
+ }
+#else
+ t = 0;
+ for (yy = 0; yy < splashAASize; ++yy) {
+ for (xx = 0; xx < splashAASize; ++xx) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() +
+ ((x * splashAASize + xx) >> 3);
+ t += (*p >> (7 - ((x * splashAASize + xx) & 7))) & 1;
+ }
+ }
+#endif
+
+ if (t != 0) {
+ pipe->shape = aaGamma[t];
+ pipeRun(pipe);
+ updateModX(x);
+ updateModY(y);
+ } else {
+ pipeIncX(pipe);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+// Transform a point from user space to device space.
+inline void Splash::transform(SplashCoord *matrix,
+ SplashCoord xi, SplashCoord yi,
+ SplashCoord *xo, SplashCoord *yo) {
+ // [ m[0] m[1] 0 ]
+ // [xo yo 1] = [xi yi 1] * [ m[2] m[3] 0 ]
+ // [ m[4] m[5] 1 ]
+ *xo = xi * matrix[0] + yi * matrix[2] + matrix[4];
+ *yo = xi * matrix[1] + yi * matrix[3] + matrix[5];
+}
+
+//------------------------------------------------------------------------
+// Splash
+//------------------------------------------------------------------------
+
+Splash::Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA,
+ SplashScreenParams *screenParams) {
+ int i;
+
+ bitmap = bitmapA;
+ vectorAntialias = vectorAntialiasA;
+ state = new SplashState(bitmap->width, bitmap->height, vectorAntialias,
+ screenParams);
+ if (vectorAntialias) {
+ aaBuf = new SplashBitmap(splashAASize * bitmap->width, splashAASize,
+ 1, splashModeMono1, gFalse);
+ for (i = 0; i <= splashAASize * splashAASize; ++i) {
+ aaGamma[i] = splashPow((SplashCoord)i /
+ (SplashCoord)(splashAASize * splashAASize),
+ 1.5);
+ }
+ } else {
+ aaBuf = NULL;
+ }
+ clearModRegion();
+ debugMode = gFalse;
+}
+
+Splash::Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA,
+ SplashScreen *screenA) {
+ int i;
+
+ bitmap = bitmapA;
+ vectorAntialias = vectorAntialiasA;
+ state = new SplashState(bitmap->width, bitmap->height, vectorAntialias,
+ screenA);
+ if (vectorAntialias) {
+ aaBuf = new SplashBitmap(splashAASize * bitmap->width, splashAASize,
+ 1, splashModeMono1, gFalse);
+ for (i = 0; i <= splashAASize * splashAASize; ++i) {
+ aaGamma[i] = splashPow((SplashCoord)i /
+ (SplashCoord)(splashAASize * splashAASize),
+ 1.5);
+ }
+ } else {
+ aaBuf = NULL;
+ }
+ clearModRegion();
+ debugMode = gFalse;
+}
+
+Splash::~Splash() {
+ while (state->next) {
+ restoreState();
+ }
+ delete state;
+ if (vectorAntialias) {
+ delete aaBuf;
+ }
+}
+
+//------------------------------------------------------------------------
+// state read
+//------------------------------------------------------------------------
+
+SplashCoord *Splash::getMatrix() {
+ return state->matrix;
+}
+
+SplashPattern *Splash::getStrokePattern() {
+ return state->strokePattern;
+}
+
+SplashPattern *Splash::getFillPattern() {
+ return state->fillPattern;
+}
+
+SplashScreen *Splash::getScreen() {
+ return state->screen;
+}
+
+SplashBlendFunc Splash::getBlendFunc() {
+ return state->blendFunc;
+}
+
+SplashCoord Splash::getStrokeAlpha() {
+ return state->strokeAlpha;
+}
+
+SplashCoord Splash::getFillAlpha() {
+ return state->fillAlpha;
+}
+
+SplashCoord Splash::getLineWidth() {
+ return state->lineWidth;
+}
+
+int Splash::getLineCap() {
+ return state->lineCap;
+}
+
+int Splash::getLineJoin() {
+ return state->lineJoin;
+}
+
+SplashCoord Splash::getMiterLimit() {
+ return state->miterLimit;
+}
+
+SplashCoord Splash::getFlatness() {
+ return state->flatness;
+}
+
+SplashCoord *Splash::getLineDash() {
+ return state->lineDash;
+}
+
+int Splash::getLineDashLength() {
+ return state->lineDashLength;
+}
+
+SplashCoord Splash::getLineDashPhase() {
+ return state->lineDashPhase;
+}
+
+SplashClip *Splash::getClip() {
+ return state->clip;
+}
+
+SplashBitmap *Splash::getSoftMask() {
+ return state->softMask;
+}
+
+GBool Splash::getInNonIsolatedGroup() {
+ return state->inNonIsolatedGroup;
+}
+
+//------------------------------------------------------------------------
+// state write
+//------------------------------------------------------------------------
+
+void Splash::setMatrix(SplashCoord *matrix) {
+ memcpy(state->matrix, matrix, 6 * sizeof(SplashCoord));
+}
+
+void Splash::setStrokePattern(SplashPattern *strokePattern) {
+ state->setStrokePattern(strokePattern);
+}
+
+void Splash::setFillPattern(SplashPattern *fillPattern) {
+ state->setFillPattern(fillPattern);
+}
+
+void Splash::setScreen(SplashScreen *screen) {
+ state->setScreen(screen);
+}
+
+void Splash::setBlendFunc(SplashBlendFunc func) {
+ state->blendFunc = func;
+}
+
+void Splash::setStrokeAlpha(SplashCoord alpha) {
+ state->strokeAlpha = alpha;
+}
+
+void Splash::setFillAlpha(SplashCoord alpha) {
+ state->fillAlpha = alpha;
+}
+
+void Splash::setLineWidth(SplashCoord lineWidth) {
+ state->lineWidth = lineWidth;
+}
+
+void Splash::setLineCap(int lineCap) {
+ state->lineCap = lineCap;
+}
+
+void Splash::setLineJoin(int lineJoin) {
+ state->lineJoin = lineJoin;
+}
+
+void Splash::setMiterLimit(SplashCoord miterLimit) {
+ state->miterLimit = miterLimit;
+}
+
+void Splash::setFlatness(SplashCoord flatness) {
+ if (flatness < 1) {
+ state->flatness = 1;
+ } else {
+ state->flatness = flatness;
+ }
+}
+
+void Splash::setLineDash(SplashCoord *lineDash, int lineDashLength,
+ SplashCoord lineDashPhase) {
+ state->setLineDash(lineDash, lineDashLength, lineDashPhase);
+}
+
+void Splash::setStrokeAdjust(GBool strokeAdjust) {
+ state->strokeAdjust = strokeAdjust;
+}
+
+void Splash::clipResetToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1) {
+ state->clip->resetToRect(x0, y0, x1, y1);
+}
+
+SplashError Splash::clipToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1) {
+ return state->clip->clipToRect(x0, y0, x1, y1);
+}
+
+SplashError Splash::clipToPath(SplashPath *path, GBool eo) {
+ return state->clip->clipToPath(path, state->matrix, state->flatness, eo);
+}
+
+void Splash::setSoftMask(SplashBitmap *softMask) {
+ state->setSoftMask(softMask);
+}
+
+void Splash::setInNonIsolatedGroup(SplashBitmap *alpha0BitmapA,
+ int alpha0XA, int alpha0YA) {
+ alpha0Bitmap = alpha0BitmapA;
+ alpha0X = alpha0XA;
+ alpha0Y = alpha0YA;
+ state->inNonIsolatedGroup = gTrue;
+}
+
+//------------------------------------------------------------------------
+// state save/restore
+//------------------------------------------------------------------------
+
+void Splash::saveState() {
+ SplashState *newState;
+
+ newState = state->copy();
+ newState->next = state;
+ state = newState;
+}
+
+SplashError Splash::restoreState() {
+ SplashState *oldState;
+
+ if (!state->next) {
+ return splashErrNoSave;
+ }
+ oldState = state;
+ state = state->next;
+ delete oldState;
+ return splashOk;
+}
+
+//------------------------------------------------------------------------
+// drawing operations
+//------------------------------------------------------------------------
+
+void Splash::clear(SplashColorPtr color, Guchar alpha) {
+ SplashColorPtr row, p;
+ Guchar mono;
+ int x, y;
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ mono = (color[0] & 0x80) ? 0xff : 0x00;
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ mono, -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, mono, bitmap->rowSize * bitmap->height);
+ }
+ break;
+ case splashModeMono8:
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ color[0], -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, color[0], bitmap->rowSize * bitmap->height);
+ }
+ break;
+ case splashModeRGB8:
+ if (color[0] == color[1] && color[1] == color[2]) {
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ color[0], -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, color[0], bitmap->rowSize * bitmap->height);
+ }
+ } else {
+ row = bitmap->data;
+ for (y = 0; y < bitmap->height; ++y) {
+ p = row;
+ for (x = 0; x < bitmap->width; ++x) {
+ *p++ = color[2];
+ *p++ = color[1];
+ *p++ = color[0];
+ }
+ row += bitmap->rowSize;
+ }
+ }
+ break;
+ case splashModeXBGR8:
+ if (color[0] == color[1] && color[1] == color[2]) {
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ color[0], -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, color[0], bitmap->rowSize * bitmap->height);
+ }
+ } else {
+ row = bitmap->data;
+ for (y = 0; y < bitmap->height; ++y) {
+ p = row;
+ for (x = 0; x < bitmap->width; ++x) {
+ *p++ = color[0];
+ *p++ = color[1];
+ *p++ = color[2];
+ *p++ = 255;
+ }
+ row += bitmap->rowSize;
+ }
+ }
+ break;
+ case splashModeBGR8:
+ if (color[0] == color[1] && color[1] == color[2]) {
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ color[0], -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, color[0], bitmap->rowSize * bitmap->height);
+ }
+ } else {
+ row = bitmap->data;
+ for (y = 0; y < bitmap->height; ++y) {
+ p = row;
+ for (x = 0; x < bitmap->width; ++x) {
+ *p++ = color[0];
+ *p++ = color[1];
+ *p++ = color[2];
+ }
+ row += bitmap->rowSize;
+ }
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ if (color[0] == color[1] && color[1] == color[2] && color[2] == color[3]) {
+ if (bitmap->rowSize < 0) {
+ memset(bitmap->data + bitmap->rowSize * (bitmap->height - 1),
+ color[0], -bitmap->rowSize * bitmap->height);
+ } else {
+ memset(bitmap->data, color[0], bitmap->rowSize * bitmap->height);
+ }
+ } else {
+ row = bitmap->data;
+ for (y = 0; y < bitmap->height; ++y) {
+ p = row;
+ for (x = 0; x < bitmap->width; ++x) {
+ *p++ = color[0];
+ *p++ = color[1];
+ *p++ = color[2];
+ *p++ = color[3];
+ }
+ row += bitmap->rowSize;
+ }
+ }
+ break;
+#endif
+ }
+
+ if (bitmap->alpha) {
+ memset(bitmap->alpha, alpha, bitmap->width * bitmap->height);
+ }
+
+ updateModX(0);
+ updateModY(0);
+ updateModX(bitmap->width - 1);
+ updateModY(bitmap->height - 1);
+}
+
+SplashError Splash::stroke(SplashPath *path) {
+ SplashPath *path2, *dPath;
+
+ if (debugMode) {
+ printf("stroke [dash:%d] [width:%.2f]:\n",
+ state->lineDashLength, (double)state->lineWidth);
+ dumpPath(path);
+ }
+ opClipRes = splashClipAllOutside;
+ if (path->length == 0) {
+ return splashErrEmptyPath;
+ }
+ path2 = flattenPath(path, state->matrix, state->flatness);
+ if (state->lineDashLength > 0) {
+ dPath = makeDashedPath(path2);
+ delete path2;
+ path2 = dPath;
+ }
+ if (state->lineWidth == 0) {
+ strokeNarrow(path2);
+ } else {
+ strokeWide(path2);
+ }
+ delete path2;
+ return splashOk;
+}
+
+void Splash::strokeNarrow(SplashPath *path) {
+ SplashPipe pipe;
+ SplashXPath *xPath;
+ SplashXPathSeg *seg;
+ int x0, x1, x2, x3, y0, y1, x, y, t;
+ SplashCoord dx, dy, dxdy;
+ SplashClipResult clipRes;
+ int nClipRes[3];
+ int i;
+
+ nClipRes[0] = nClipRes[1] = nClipRes[2] = 0;
+
+ xPath = new SplashXPath(path, state->matrix, state->flatness, gFalse);
+
+ pipeInit(&pipe, 0, 0, state->strokePattern, NULL, state->strokeAlpha,
+ gFalse, gFalse);
+
+ for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) {
+
+ x0 = splashFloor(seg->x0);
+ x1 = splashFloor(seg->x1);
+ y0 = splashFloor(seg->y0);
+ y1 = splashFloor(seg->y1);
+
+ // horizontal segment
+ if (y0 == y1) {
+ if (x0 > x1) {
+ t = x0; x0 = x1; x1 = t;
+ }
+ if ((clipRes = state->clip->testSpan(x0, x1, y0))
+ != splashClipAllOutside) {
+ drawSpan(&pipe, x0, x1, y0, clipRes == splashClipAllInside);
+ }
+
+ // segment with |dx| > |dy|
+ } else if (splashAbs(seg->dxdy) > 1) {
+ dx = seg->x1 - seg->x0;
+ dy = seg->y1 - seg->y0;
+ dxdy = seg->dxdy;
+ if (y0 > y1) {
+ t = y0; y0 = y1; y1 = t;
+ t = x0; x0 = x1; x1 = t;
+ dx = -dx;
+ dy = -dy;
+ }
+ if ((clipRes = state->clip->testRect(x0 <= x1 ? x0 : x1, y0,
+ x0 <= x1 ? x1 : x0, y1))
+ != splashClipAllOutside) {
+ if (dx > 0) {
+ x2 = x0;
+ x3 = splashFloor(seg->x0 + ((SplashCoord)y0 + 1 - seg->y0) * dxdy);
+ drawSpan(&pipe, x2, (x2 <= x3 - 1) ? x3 - 1 : x2, y0,
+ clipRes == splashClipAllInside);
+ x2 = x3;
+ for (y = y0 + 1; y <= y1 - 1; ++y) {
+ x3 = splashFloor(seg->x0 + ((SplashCoord)y + 1 - seg->y0) * dxdy);
+ drawSpan(&pipe, x2, x3 - 1, y, clipRes == splashClipAllInside);
+ x2 = x3;
+ }
+ drawSpan(&pipe, x2, x2 <= x1 ? x1 : x2, y1,
+ clipRes == splashClipAllInside);
+ } else {
+ x2 = x0;
+ x3 = splashFloor(seg->x0 + ((SplashCoord)y0 + 1 - seg->y0) * dxdy);
+ drawSpan(&pipe, (x3 + 1 <= x2) ? x3 + 1 : x2, x2, y0,
+ clipRes == splashClipAllInside);
+ x2 = x3;
+ for (y = y0 + 1; y <= y1 - 1; ++y) {
+ x3 = splashFloor(seg->x0 + ((SplashCoord)y + 1 - seg->y0) * dxdy);
+ drawSpan(&pipe, x3 + 1, x2, y, clipRes == splashClipAllInside);
+ x2 = x3;
+ }
+ drawSpan(&pipe, x1, (x1 <= x2) ? x2 : x1, y1,
+ clipRes == splashClipAllInside);
+ }
+ }
+
+ // segment with |dy| > |dx|
+ } else {
+ dxdy = seg->dxdy;
+ if (y0 > y1) {
+ t = x0; x0 = x1; x1 = t;
+ t = y0; y0 = y1; y1 = t;
+ }
+ if ((clipRes = state->clip->testRect(x0 <= x1 ? x0 : x1, y0,
+ x0 <= x1 ? x1 : x0, y1))
+ != splashClipAllOutside) {
+ drawPixel(&pipe, x0, y0, clipRes == splashClipAllInside);
+ for (y = y0 + 1; y <= y1 - 1; ++y) {
+ x = splashFloor(seg->x0 + ((SplashCoord)y - seg->y0) * dxdy);
+ drawPixel(&pipe, x, y, clipRes == splashClipAllInside);
+ }
+ drawPixel(&pipe, x1, y1, clipRes == splashClipAllInside);
+ }
+ }
+ ++nClipRes[clipRes];
+ }
+ if (nClipRes[splashClipPartial] ||
+ (nClipRes[splashClipAllInside] && nClipRes[splashClipAllOutside])) {
+ opClipRes = splashClipPartial;
+ } else if (nClipRes[splashClipAllInside]) {
+ opClipRes = splashClipAllInside;
+ } else {
+ opClipRes = splashClipAllOutside;
+ }
+
+ delete xPath;
+}
+
+void Splash::strokeWide(SplashPath *path) {
+ SplashPath *path2;
+
+ path2 = makeStrokePath(path, gFalse);
+ fillWithPattern(path2, gFalse, state->strokePattern, state->strokeAlpha);
+ delete path2;
+}
+
+SplashPath *Splash::flattenPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness) {
+ SplashPath *fPath;
+ SplashCoord flatness2;
+ Guchar flag;
+ int i;
+
+ fPath = new SplashPath();
+ flatness2 = flatness * flatness;
+ i = 0;
+ while (i < path->length) {
+ flag = path->flags[i];
+ if (flag & splashPathFirst) {
+ fPath->moveTo(path->pts[i].x, path->pts[i].y);
+ ++i;
+ } else {
+ if (flag & splashPathCurve) {
+ flattenCurve(path->pts[i-1].x, path->pts[i-1].y,
+ path->pts[i ].x, path->pts[i ].y,
+ path->pts[i+1].x, path->pts[i+1].y,
+ path->pts[i+2].x, path->pts[i+2].y,
+ matrix, flatness2, fPath);
+ i += 3;
+ } else {
+ fPath->lineTo(path->pts[i].x, path->pts[i].y);
+ ++i;
+ }
+ if (path->flags[i-1] & splashPathClosed) {
+ fPath->close();
+ }
+ }
+ }
+ return fPath;
+}
+
+void Splash::flattenCurve(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3,
+ SplashCoord *matrix, SplashCoord flatness2,
+ SplashPath *fPath) {
+ SplashCoord cx[splashMaxCurveSplits + 1][3];
+ SplashCoord cy[splashMaxCurveSplits + 1][3];
+ int cNext[splashMaxCurveSplits + 1];
+ SplashCoord xl0, xl1, xl2, xr0, xr1, xr2, xr3, xx1, xx2, xh;
+ SplashCoord yl0, yl1, yl2, yr0, yr1, yr2, yr3, yy1, yy2, yh;
+ SplashCoord dx, dy, mx, my, tx, ty, d1, d2;
+ int p1, p2, p3;
+
+ // initial segment
+ p1 = 0;
+ p2 = splashMaxCurveSplits;
+ cx[p1][0] = x0; cy[p1][0] = y0;
+ cx[p1][1] = x1; cy[p1][1] = y1;
+ cx[p1][2] = x2; cy[p1][2] = y2;
+ cx[p2][0] = x3; cy[p2][0] = y3;
+ cNext[p1] = p2;
+
+ while (p1 < splashMaxCurveSplits) {
+
+ // get the next segment
+ xl0 = cx[p1][0]; yl0 = cy[p1][0];
+ xx1 = cx[p1][1]; yy1 = cy[p1][1];
+ xx2 = cx[p1][2]; yy2 = cy[p1][2];
+ p2 = cNext[p1];
+ xr3 = cx[p2][0]; yr3 = cy[p2][0];
+
+ // compute the distances (in device space) from the control points
+ // to the midpoint of the straight line (this is a bit of a hack,
+ // but it's much faster than computing the actual distances to the
+ // line)
+ transform(matrix, (xl0 + xr3) * 0.5, (yl0 + yr3) * 0.5, &mx, &my);
+ transform(matrix, xx1, yy1, &tx, &ty);
+ dx = tx - mx;
+ dy = ty - my;
+ d1 = dx*dx + dy*dy;
+ transform(matrix, xx2, yy2, &tx, &ty);
+ dx = tx - mx;
+ dy = ty - my;
+ d2 = dx*dx + dy*dy;
+
+ // if the curve is flat enough, or no more subdivisions are
+ // allowed, add the straight line segment
+ if (p2 - p1 == 1 || (d1 <= flatness2 && d2 <= flatness2)) {
+ fPath->lineTo(xr3, yr3);
+ p1 = p2;
+
+ // otherwise, subdivide the curve
+ } else {
+ xl1 = (xl0 + xx1) * 0.5;
+ yl1 = (yl0 + yy1) * 0.5;
+ xh = (xx1 + xx2) * 0.5;
+ yh = (yy1 + yy2) * 0.5;
+ xl2 = (xl1 + xh) * 0.5;
+ yl2 = (yl1 + yh) * 0.5;
+ xr2 = (xx2 + xr3) * 0.5;
+ yr2 = (yy2 + yr3) * 0.5;
+ xr1 = (xh + xr2) * 0.5;
+ yr1 = (yh + yr2) * 0.5;
+ xr0 = (xl2 + xr1) * 0.5;
+ yr0 = (yl2 + yr1) * 0.5;
+ // add the new subdivision points
+ p3 = (p1 + p2) / 2;
+ cx[p1][1] = xl1; cy[p1][1] = yl1;
+ cx[p1][2] = xl2; cy[p1][2] = yl2;
+ cNext[p1] = p3;
+ cx[p3][0] = xr0; cy[p3][0] = yr0;
+ cx[p3][1] = xr1; cy[p3][1] = yr1;
+ cx[p3][2] = xr2; cy[p3][2] = yr2;
+ cNext[p3] = p2;
+ }
+ }
+}
+
+SplashPath *Splash::makeDashedPath(SplashPath *path) {
+ SplashPath *dPath;
+ SplashCoord lineDashTotal;
+ SplashCoord lineDashStartPhase, lineDashDist, segLen;
+ SplashCoord x0, y0, x1, y1, xa, ya;
+ GBool lineDashStartOn, lineDashOn, newPath;
+ int lineDashStartIdx, lineDashIdx;
+ int i, j, k;
+
+ lineDashTotal = 0;
+ for (i = 0; i < state->lineDashLength; ++i) {
+ lineDashTotal += state->lineDash[i];
+ }
+ lineDashStartPhase = state->lineDashPhase;
+ i = splashFloor(lineDashStartPhase / lineDashTotal);
+ lineDashStartPhase -= (SplashCoord)i * lineDashTotal;
+ lineDashStartOn = gTrue;
+ lineDashStartIdx = 0;
+ while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) {
+ lineDashStartOn = !lineDashStartOn;
+ lineDashStartPhase -= state->lineDash[lineDashStartIdx];
+ ++lineDashStartIdx;
+ }
+
+ dPath = new SplashPath();
+
+ // process each subpath
+ i = 0;
+ while (i < path->length) {
+
+ // find the end of the subpath
+ for (j = i;
+ j < path->length - 1 && !(path->flags[j] & splashPathLast);
+ ++j) ;
+
+ // initialize the dash parameters
+ lineDashOn = lineDashStartOn;
+ lineDashIdx = lineDashStartIdx;
+ lineDashDist = state->lineDash[lineDashIdx] - lineDashStartPhase;
+
+ // process each segment of the subpath
+ newPath = gTrue;
+ for (k = i; k < j; ++k) {
+
+ // grab the segment
+ x0 = path->pts[k].x;
+ y0 = path->pts[k].y;
+ x1 = path->pts[k+1].x;
+ y1 = path->pts[k+1].y;
+ segLen = splashDist(x0, y0, x1, y1);
+
+ // process the segment
+ while (segLen > 0) {
+
+ if (lineDashDist >= segLen) {
+ if (lineDashOn) {
+ if (newPath) {
+ dPath->moveTo(x0, y0);
+ newPath = gFalse;
+ }
+ dPath->lineTo(x1, y1);
+ }
+ lineDashDist -= segLen;
+ segLen = 0;
+
+ } else {
+ xa = x0 + (lineDashDist / segLen) * (x1 - x0);
+ ya = y0 + (lineDashDist / segLen) * (y1 - y0);
+ if (lineDashOn) {
+ if (newPath) {
+ dPath->moveTo(x0, y0);
+ newPath = gFalse;
+ }
+ dPath->lineTo(xa, ya);
+ }
+ x0 = xa;
+ y0 = ya;
+ segLen -= lineDashDist;
+ lineDashDist = 0;
+ }
+
+ // get the next entry in the dash array
+ if (lineDashDist <= 0) {
+ lineDashOn = !lineDashOn;
+ if (++lineDashIdx == state->lineDashLength) {
+ lineDashIdx = 0;
+ }
+ lineDashDist = state->lineDash[lineDashIdx];
+ newPath = gTrue;
+ }
+ }
+ }
+ i = j + 1;
+ }
+
+ return dPath;
+}
+
+SplashError Splash::fill(SplashPath *path, GBool eo) {
+ if (debugMode) {
+ printf("fill [eo:%d]:\n", eo);
+ dumpPath(path);
+ }
+ return fillWithPattern(path, eo, state->fillPattern, state->fillAlpha);
+}
+
+SplashError Splash::fillWithPattern(SplashPath *path, GBool eo,
+ SplashPattern *pattern,
+ SplashCoord alpha) {
+ SplashPipe pipe;
+ SplashXPath *xPath;
+ SplashXPathScanner *scanner;
+ int xMinI, yMinI, xMaxI, yMaxI, x0, x1, y;
+ SplashClipResult clipRes, clipRes2;
+
+ if (path->length == 0) {
+ return splashErrEmptyPath;
+ }
+ xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
+ if (vectorAntialias) {
+ xPath->aaScale();
+ }
+ xPath->sort();
+ scanner = new SplashXPathScanner(xPath, eo);
+
+ // get the min and max x and y values
+ if (vectorAntialias) {
+ scanner->getBBoxAA(&xMinI, &yMinI, &xMaxI, &yMaxI);
+ } else {
+ scanner->getBBox(&xMinI, &yMinI, &xMaxI, &yMaxI);
+ }
+
+ // check clipping
+ if ((clipRes = state->clip->testRect(xMinI, yMinI, xMaxI, yMaxI))
+ != splashClipAllOutside) {
+
+ // limit the y range
+ if (yMinI < state->clip->getYMinI()) {
+ yMinI = state->clip->getYMinI();
+ }
+ if (yMaxI > state->clip->getYMaxI()) {
+ yMaxI = state->clip->getYMaxI();
+ }
+
+ pipeInit(&pipe, 0, yMinI, pattern, NULL, alpha, vectorAntialias, gFalse);
+
+ // draw the spans
+ if (vectorAntialias) {
+ for (y = yMinI; y <= yMaxI; ++y) {
+ scanner->renderAALine(aaBuf, &x0, &x1, y);
+ if (clipRes != splashClipAllInside) {
+ state->clip->clipAALine(aaBuf, &x0, &x1, y);
+ }
+ drawAALine(&pipe, x0, x1, y);
+ }
+ } else {
+ for (y = yMinI; y <= yMaxI; ++y) {
+ while (scanner->getNextSpan(y, &x0, &x1)) {
+ if (clipRes == splashClipAllInside) {
+ drawSpan(&pipe, x0, x1, y, gTrue);
+ } else {
+ // limit the x range
+ if (x0 < state->clip->getXMinI()) {
+ x0 = state->clip->getXMinI();
+ }
+ if (x1 > state->clip->getXMaxI()) {
+ x1 = state->clip->getXMaxI();
+ }
+ clipRes2 = state->clip->testSpan(x0, x1, y);
+ drawSpan(&pipe, x0, x1, y, clipRes2 == splashClipAllInside);
+ }
+ }
+ }
+ }
+ }
+ opClipRes = clipRes;
+
+ delete scanner;
+ delete xPath;
+ return splashOk;
+}
+
+SplashError Splash::xorFill(SplashPath *path, GBool eo) {
+ SplashPipe pipe;
+ SplashXPath *xPath;
+ SplashXPathScanner *scanner;
+ int xMinI, yMinI, xMaxI, yMaxI, x0, x1, y;
+ SplashClipResult clipRes, clipRes2;
+ SplashBlendFunc origBlendFunc;
+
+ if (path->length == 0) {
+ return splashErrEmptyPath;
+ }
+ xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
+ xPath->sort();
+ scanner = new SplashXPathScanner(xPath, eo);
+
+ // get the min and max x and y values
+ scanner->getBBox(&xMinI, &yMinI, &xMaxI, &yMaxI);
+
+ // check clipping
+ if ((clipRes = state->clip->testRect(xMinI, yMinI, xMaxI, yMaxI))
+ != splashClipAllOutside) {
+
+ // limit the y range
+ if (yMinI < state->clip->getYMinI()) {
+ yMinI = state->clip->getYMinI();
+ }
+ if (yMaxI > state->clip->getYMaxI()) {
+ yMaxI = state->clip->getYMaxI();
+ }
+
+ origBlendFunc = state->blendFunc;
+ state->blendFunc = &blendXor;
+ pipeInit(&pipe, 0, yMinI, state->fillPattern, NULL, 1, gFalse, gFalse);
+
+ // draw the spans
+ for (y = yMinI; y <= yMaxI; ++y) {
+ while (scanner->getNextSpan(y, &x0, &x1)) {
+ if (clipRes == splashClipAllInside) {
+ drawSpan(&pipe, x0, x1, y, gTrue);
+ } else {
+ // limit the x range
+ if (x0 < state->clip->getXMinI()) {
+ x0 = state->clip->getXMinI();
+ }
+ if (x1 > state->clip->getXMaxI()) {
+ x1 = state->clip->getXMaxI();
+ }
+ clipRes2 = state->clip->testSpan(x0, x1, y);
+ drawSpan(&pipe, x0, x1, y, clipRes2 == splashClipAllInside);
+ }
+ }
+ }
+ state->blendFunc = origBlendFunc;
+ }
+ opClipRes = clipRes;
+
+ delete scanner;
+ delete xPath;
+ return splashOk;
+}
+
+SplashError Splash::fillChar(SplashCoord x, SplashCoord y,
+ int c, SplashFont *font) {
+ SplashGlyphBitmap glyph;
+ SplashCoord xt, yt;
+ int x0, y0, xFrac, yFrac;
+ SplashClipResult clipRes;
+
+ if (debugMode) {
+ printf("fillChar: x=%.2f y=%.2f c=%3d=0x%02x='%c'\n",
+ (double)x, (double)y, c, c, c);
+ }
+ transform(state->matrix, x, y, &xt, &yt);
+ x0 = splashFloor(xt);
+ xFrac = splashFloor((xt - x0) * splashFontFraction);
+ y0 = splashFloor(yt);
+ yFrac = splashFloor((yt - y0) * splashFontFraction);
+ if (!font->getGlyph(c, xFrac, yFrac, &glyph, x0, y0, state->clip, &clipRes)) {
+ return splashErrNoGlyph;
+ }
+ if (clipRes != splashClipAllOutside) {
+ fillGlyph2(x0, y0, &glyph, clipRes == splashClipAllInside);
+ }
+ opClipRes = clipRes;
+ if (glyph.freeData) {
+ gfree(glyph.data);
+ }
+ return splashOk;
+}
+
+void Splash::fillGlyph(SplashCoord x, SplashCoord y,
+ SplashGlyphBitmap *glyph) {
+ SplashCoord xt, yt;
+ int x0, y0;
+
+ transform(state->matrix, x, y, &xt, &yt);
+ x0 = splashFloor(xt);
+ y0 = splashFloor(yt);
+ SplashClipResult clipRes = state->clip->testRect(x0 - glyph->x,
+ y0 - glyph->y,
+ x0 - glyph->x + glyph->w - 1,
+ y0 - glyph->y + glyph->h - 1);
+ if (clipRes != splashClipAllOutside) {
+ fillGlyph2(x0, y0, glyph, clipRes == splashClipAllInside);
+ }
+ opClipRes = clipRes;
+}
+
+void Splash::fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph, GBool noClip) {
+ SplashPipe pipe;
+ int alpha0, alpha;
+ Guchar *p;
+ int x1, y1, xx, xx1, yy;
+
+ p = glyph->data;
+ int xStart = x0 - glyph->x;
+ int yStart = y0 - glyph->y;
+ int xxLimit = glyph->w;
+ int yyLimit = glyph->h;
+
+ if (yStart < 0)
+ {
+ p += glyph->w * -yStart; // move p to the beginning of the first painted row
+ yyLimit += yStart;
+ yStart = 0;
+ }
+
+ if (xStart < 0)
+ {
+ p += -xStart; // move p to the first painted pixel
+ xxLimit += xStart;
+ xStart = 0;
+ }
+
+ if (xxLimit + xStart >= bitmap->width) xxLimit = bitmap->width - xStart;
+ if (yyLimit + yStart >= bitmap->height) yyLimit = bitmap->height - yStart;
+
+ if (noClip) {
+ if (glyph->aa) {
+ pipeInit(&pipe, xStart, yStart,
+ state->fillPattern, NULL, state->fillAlpha, gTrue, gFalse);
+ for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) {
+ pipeSetXY(&pipe, xStart, y1);
+ for (xx = 0, x1 = xStart; xx < xxLimit; ++xx, ++x1) {
+ alpha = p[xx];
+ if (alpha != 0) {
+ pipe.shape = (SplashCoord)(alpha / 255.0);
+ pipeRun(&pipe);
+ updateModX(x1);
+ updateModY(y1);
+ } else {
+ pipeIncX(&pipe);
+ }
+ }
+ p += glyph->w;
+ }
+ } else {
+ const int widthEight = splashCeil(glyph->w / 8.0);
+
+ pipeInit(&pipe, xStart, yStart,
+ state->fillPattern, NULL, state->fillAlpha, gFalse, gFalse);
+ for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) {
+ pipeSetXY(&pipe, xStart, y1);
+ for (xx = 0, x1 = xStart; xx < xxLimit; xx += 8) {
+ alpha0 = p[xx / 8];
+ for (xx1 = 0; xx1 < 8 && xx + xx1 < xxLimit; ++xx1, ++x1) {
+ if (alpha0 & 0x80) {
+ pipeRun(&pipe);
+ updateModX(x1);
+ updateModY(y1);
+ } else {
+ pipeIncX(&pipe);
+ }
+ alpha0 <<= 1;
+ }
+ }
+ p += widthEight;
+ }
+ }
+ } else {
+ if (glyph->aa) {
+ pipeInit(&pipe, xStart, yStart,
+ state->fillPattern, NULL, state->fillAlpha, gTrue, gFalse);
+ for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) {
+ pipeSetXY(&pipe, xStart, y1);
+ for (xx = 0, x1 = xStart; xx < xxLimit; ++xx, ++x1) {
+ if (state->clip->test(x1, y1)) {
+ alpha = p[xx];
+ if (alpha != 0) {
+ pipe.shape = (SplashCoord)(alpha / 255.0);
+ pipeRun(&pipe);
+ updateModX(x1);
+ updateModY(y1);
+ } else {
+ pipeIncX(&pipe);
+ }
+ } else {
+ pipeIncX(&pipe);
+ }
+ }
+ p += glyph->w;
+ }
+ } else {
+ const int widthEight = splashCeil(glyph->w / 8.0);
+
+ pipeInit(&pipe, xStart, yStart,
+ state->fillPattern, NULL, state->fillAlpha, gFalse, gFalse);
+ for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) {
+ pipeSetXY(&pipe, xStart, y1);
+ for (xx = 0, x1 = xStart; xx < xxLimit; xx += 8) {
+ alpha0 = p[xx / 8];
+ for (xx1 = 0; xx1 < 8 && xx + xx1 < xxLimit; ++xx1, ++x1) {
+ if (state->clip->test(x1, y1)) {
+ if (alpha0 & 0x80) {
+ pipeRun(&pipe);
+ updateModX(x1);
+ updateModY(y1);
+ } else {
+ pipeIncX(&pipe);
+ }
+ } else {
+ pipeIncX(&pipe);
+ }
+ alpha0 <<= 1;
+ }
+ }
+ p += widthEight;
+ }
+ }
+ }
+}
+
+SplashError Splash::fillImageMask(SplashImageMaskSource src, void *srcData,
+ int w, int h, SplashCoord *mat,
+ GBool glyphMode) {
+ SplashPipe pipe;
+ GBool rot;
+ SplashCoord xScale, yScale, xShear, yShear, yShear1;
+ int tx, tx2, ty, ty2, scaledWidth, scaledHeight, xSign, ySign;
+ int ulx, uly, llx, lly, urx, ury, lrx, lry;
+ int ulx1, uly1, llx1, lly1, urx1, ury1, lrx1, lry1;
+ int xMin, xMax, yMin, yMax;
+ SplashClipResult clipRes, clipRes2;
+ int yp, yq, yt, yStep, lastYStep;
+ int xp, xq, xt, xStep, xSrc;
+ int k1, spanXMin, spanXMax, spanY;
+ SplashColorPtr pixBuf, p;
+ int pixAcc;
+ int x, y, x1, x2, y2;
+ SplashCoord y1;
+ int n, m, i, j;
+
+ if (debugMode) {
+ printf("fillImageMask: w=%d h=%d mat=[%.2f %.2f %.2f %.2f %.2f %.2f]\n",
+ w, h, (double)mat[0], (double)mat[1], (double)mat[2],
+ (double)mat[3], (double)mat[4], (double)mat[5]);
+ }
+
+ if (w == 0 && h == 0) return splashErrZeroImage;
+
+ // check for singular matrix
+ if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.000001) {
+ return splashErrSingularMatrix;
+ }
+
+ // compute scale, shear, rotation, translation parameters
+ rot = splashAbs(mat[1]) > splashAbs(mat[0]);
+ if (rot) {
+ xScale = -mat[1];
+ yScale = mat[2] - (mat[0] * mat[3]) / mat[1];
+ xShear = -mat[3] / yScale;
+ yShear = -mat[0] / mat[1];
+ } else {
+ xScale = mat[0];
+ yScale = mat[3] - (mat[1] * mat[2]) / mat[0];
+ xShear = mat[2] / yScale;
+ yShear = mat[1] / mat[0];
+ }
+ // Note 1: The PDF spec says that all pixels whose *centers* lie
+ // within the region get painted -- but that doesn't seem to match
+ // up with what Acrobat actually does: it ends up leaving gaps
+ // between image stripes. So we use the same rule here as for
+ // fills: any pixel that overlaps the region gets painted.
+ // Note 2: The "glyphMode" flag is a kludge: it switches back to
+ // "correct" behavior (matching the spec), for use in rendering Type
+ // 3 fonts.
+ // Note 3: The +/-0.01 in these computations is to avoid floating
+ // point precision problems which can lead to gaps between image
+ // stripes (it can cause image stripes to overlap, but that's a much
+ // less visible problem).
+ if (glyphMode) {
+ if (xScale >= 0) {
+ tx = splashRound(mat[4]);
+ tx2 = splashRound(mat[4] + xScale) - 1;
+ } else {
+ tx = splashRound(mat[4]) - 1;
+ tx2 = splashRound(mat[4] + xScale);
+ }
+ } else {
+ if (xScale >= 0) {
+ tx = splashFloor(mat[4] - 0.01);
+ tx2 = splashFloor(mat[4] + xScale + 0.01);
+ } else {
+ tx = splashFloor(mat[4] + 0.01);
+ tx2 = splashFloor(mat[4] + xScale - 0.01);
+ }
+ }
+ scaledWidth = abs(tx2 - tx) + 1;
+ if (glyphMode) {
+ if (yScale >= 0) {
+ ty = splashRound(mat[5]);
+ ty2 = splashRound(mat[5] + yScale) - 1;
+ } else {
+ ty = splashRound(mat[5]) - 1;
+ ty2 = splashRound(mat[5] + yScale);
+ }
+ } else {
+ if (yScale >= 0) {
+ ty = splashFloor(mat[5] - 0.01);
+ ty2 = splashFloor(mat[5] + yScale + 0.01);
+ } else {
+ ty = splashFloor(mat[5] + 0.01);
+ ty2 = splashFloor(mat[5] + yScale - 0.01);
+ }
+ }
+ scaledHeight = abs(ty2 - ty) + 1;
+ xSign = (xScale < 0) ? -1 : 1;
+ ySign = (yScale < 0) ? -1 : 1;
+ yShear1 = (SplashCoord)xSign * yShear;
+
+ // clipping
+ ulx1 = 0;
+ uly1 = 0;
+ urx1 = xSign * (scaledWidth - 1);
+ ury1 = (int)(yShear * urx1);
+ llx1 = splashRound(xShear * ySign * (scaledHeight - 1));
+ lly1 = ySign * (scaledHeight - 1) + (int)(yShear * llx1);
+ lrx1 = xSign * (scaledWidth - 1) +
+ splashRound(xShear * ySign * (scaledHeight - 1));
+ lry1 = ySign * (scaledHeight - 1) + (int)(yShear * lrx1);
+ if (rot) {
+ ulx = tx + uly1; uly = ty - ulx1;
+ urx = tx + ury1; ury = ty - urx1;
+ llx = tx + lly1; lly = ty - llx1;
+ lrx = tx + lry1; lry = ty - lrx1;
+ } else {
+ ulx = tx + ulx1; uly = ty + uly1;
+ urx = tx + urx1; ury = ty + ury1;
+ llx = tx + llx1; lly = ty + lly1;
+ lrx = tx + lrx1; lry = ty + lry1;
+ }
+ xMin = (ulx < urx) ? (ulx < llx) ? (ulx < lrx) ? ulx : lrx
+ : (llx < lrx) ? llx : lrx
+ : (urx < llx) ? (urx < lrx) ? urx : lrx
+ : (llx < lrx) ? llx : lrx;
+ xMax = (ulx > urx) ? (ulx > llx) ? (ulx > lrx) ? ulx : lrx
+ : (llx > lrx) ? llx : lrx
+ : (urx > llx) ? (urx > lrx) ? urx : lrx
+ : (llx > lrx) ? llx : lrx;
+ yMin = (uly < ury) ? (uly < lly) ? (uly < lry) ? uly : lry
+ : (lly < lry) ? lly : lry
+ : (ury < lly) ? (ury < lry) ? ury : lry
+ : (lly < lry) ? lly : lry;
+ yMax = (uly > ury) ? (uly > lly) ? (uly > lry) ? uly : lry
+ : (lly > lry) ? lly : lry
+ : (ury > lly) ? (ury > lry) ? ury : lry
+ : (lly > lry) ? lly : lry;
+ clipRes = state->clip->testRect(xMin, yMin, xMax, yMax);
+ opClipRes = clipRes;
+
+ // compute Bresenham parameters for x and y scaling
+ yp = h / scaledHeight;
+ yq = h % scaledHeight;
+ xp = w / scaledWidth;
+ xq = w % scaledWidth;
+
+ // allocate pixel buffer
+ if (yp < 0 || yp > INT_MAX - 1) {
+ return splashErrBadArg;
+ }
+ pixBuf = (SplashColorPtr)gmallocn((yp + 1), w);
+
+ // initialize the pixel pipe
+ pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha,
+ gTrue, gFalse);
+ if (vectorAntialias) {
+ drawAAPixelInit();
+ }
+
+ // init y scale Bresenham
+ yt = 0;
+ lastYStep = 1;
+
+ for (y = 0; y < scaledHeight; ++y) {
+
+ // y scale Bresenham
+ yStep = yp;
+ yt += yq;
+ if (yt >= scaledHeight) {
+ yt -= scaledHeight;
+ ++yStep;
+ }
+
+ // read row(s) from image
+ n = (yp > 0) ? yStep : lastYStep;
+ if (n > 0) {
+ p = pixBuf;
+ for (i = 0; i < n; ++i) {
+ (*src)(srcData, p);
+ p += w;
+ }
+ }
+ lastYStep = yStep;
+
+ // loop-invariant constants
+ k1 = splashRound(xShear * ySign * y);
+
+ // clipping test
+ if (clipRes != splashClipAllInside &&
+ !rot &&
+ (int)(yShear * k1) ==
+ (int)(yShear * (xSign * (scaledWidth - 1) + k1))) {
+ if (xSign > 0) {
+ spanXMin = tx + k1;
+ spanXMax = spanXMin + (scaledWidth - 1);
+ } else {
+ spanXMax = tx + k1;
+ spanXMin = spanXMax - (scaledWidth - 1);
+ }
+ spanY = ty + ySign * y + (int)(yShear * k1);
+ clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY);
+ if (clipRes2 == splashClipAllOutside) {
+ continue;
+ }
+ } else {
+ clipRes2 = clipRes;
+ }
+
+ // init x scale Bresenham
+ xt = 0;
+ xSrc = 0;
+
+ // x shear
+ x1 = k1;
+
+ // y shear
+ y1 = (SplashCoord)ySign * y + yShear * x1;
+ // this is a kludge: if yShear1 is negative, then (int)y1 would
+ // change immediately after the first pixel, which is not what we
+ // want
+ if (yShear1 < 0) {
+ y1 += 0.999;
+ }
+
+ // loop-invariant constants
+ n = yStep > 0 ? yStep : 1;
+
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the alpha value for (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ p = pixBuf + xSrc;
+ pixAcc = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc += *p++;
+ }
+ p += w - m;
+ }
+
+ // blend fill color with background
+ if (pixAcc != 0) {
+ pipe.shape = (pixAcc == n * m)
+ ? (SplashCoord)1
+ : (SplashCoord)pixAcc / (SplashCoord)(n * m);
+ if (vectorAntialias && clipRes2 != splashClipAllInside) {
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2, clipRes2 == splashClipAllInside);
+ }
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ }
+
+ // free memory
+ gfree(pixBuf);
+
+ return splashOk;
+}
+
+SplashError Splash::drawImage(SplashImageSource src, void *srcData,
+ SplashColorMode srcMode, GBool srcAlpha,
+ int w, int h, SplashCoord *mat) {
+ SplashPipe pipe;
+ GBool ok, rot;
+ SplashCoord xScale, yScale, xShear, yShear, yShear1;
+ int tx, tx2, ty, ty2, scaledWidth, scaledHeight, xSign, ySign;
+ int ulx, uly, llx, lly, urx, ury, lrx, lry;
+ int ulx1, uly1, llx1, lly1, urx1, ury1, lrx1, lry1;
+ int xMin, xMax, yMin, yMax;
+ SplashClipResult clipRes, clipRes2;
+ int yp, yq, yt, yStep, lastYStep;
+ int xp, xq, xt, xStep, xSrc;
+ int k1, spanXMin, spanXMax, spanY;
+ SplashColorPtr colorBuf, p;
+ SplashColor pix;
+ Guchar *alphaBuf, *q;
+#if SPLASH_CMYK
+ int pixAcc0, pixAcc1, pixAcc2, pixAcc3;
+#else
+ int pixAcc0, pixAcc1, pixAcc2;
+#endif
+ int alphaAcc;
+ SplashCoord pixMul, alphaMul, alpha;
+ int x, y, x1, x2, y2;
+ SplashCoord y1;
+ int nComps, n, m, i, j;
+
+ if (debugMode) {
+ printf("drawImage: srcMode=%d srcAlpha=%d w=%d h=%d mat=[%.2f %.2f %.2f %.2f %.2f %.2f]\n",
+ srcMode, srcAlpha, w, h, (double)mat[0], (double)mat[1], (double)mat[2],
+ (double)mat[3], (double)mat[4], (double)mat[5]);
+ }
+
+ // check color modes
+ ok = gFalse; // make gcc happy
+ nComps = 0; // make gcc happy
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ ok = srcMode == splashModeMono8;
+ nComps = 1;
+ break;
+ case splashModeRGB8:
+ ok = srcMode == splashModeRGB8;
+ nComps = 3;
+ break;
+ case splashModeXBGR8:
+ ok = srcMode == splashModeXBGR8;
+ nComps = 4;
+ break;
+ case splashModeBGR8:
+ ok = srcMode == splashModeBGR8;
+ nComps = 3;
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ ok = srcMode == splashModeCMYK8;
+ nComps = 4;
+ break;
+#endif
+ }
+ if (!ok) {
+ return splashErrModeMismatch;
+ }
+
+ // check for singular matrix
+ if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.000001) {
+ return splashErrSingularMatrix;
+ }
+
+ // compute scale, shear, rotation, translation parameters
+ rot = splashAbs(mat[1]) > splashAbs(mat[0]);
+ if (rot) {
+ xScale = -mat[1];
+ yScale = mat[2] - (mat[0] * mat[3]) / mat[1];
+ xShear = -mat[3] / yScale;
+ yShear = -mat[0] / mat[1];
+ } else {
+ xScale = mat[0];
+ yScale = mat[3] - (mat[1] * mat[2]) / mat[0];
+ xShear = mat[2] / yScale;
+ yShear = mat[1] / mat[0];
+ }
+ // Note 1: The PDF spec says that all pixels whose *centers* lie
+ // within the region get painted -- but that doesn't seem to match
+ // up with what Acrobat actually does: it ends up leaving gaps
+ // between image stripes. So we use the same rule here as for
+ // fills: any pixel that overlaps the region gets painted.
+ // Note 2: The +/-0.01 in these computations is to avoid floating
+ // point precision problems which can lead to gaps between image
+ // stripes (it can cause image stripes to overlap, but that's a much
+ // less visible problem).
+ if (xScale >= 0) {
+ tx = splashFloor(mat[4] - 0.01);
+ tx2 = splashFloor(mat[4] + xScale + 0.01);
+ } else {
+ tx = splashFloor(mat[4] + 0.01);
+ tx2 = splashFloor(mat[4] + xScale - 0.01);
+ }
+ scaledWidth = abs(tx2 - tx) + 1;
+ if (yScale >= 0) {
+ ty = splashFloor(mat[5] - 0.01);
+ ty2 = splashFloor(mat[5] + yScale + 0.01);
+ } else {
+ ty = splashFloor(mat[5] + 0.01);
+ ty2 = splashFloor(mat[5] + yScale - 0.01);
+ }
+ scaledHeight = abs(ty2 - ty) + 1;
+ xSign = (xScale < 0) ? -1 : 1;
+ ySign = (yScale < 0) ? -1 : 1;
+ yShear1 = (SplashCoord)xSign * yShear;
+
+ // clipping
+ ulx1 = 0;
+ uly1 = 0;
+ urx1 = xSign * (scaledWidth - 1);
+ ury1 = (int)(yShear * urx1);
+ llx1 = splashRound(xShear * ySign * (scaledHeight - 1));
+ lly1 = ySign * (scaledHeight - 1) + (int)(yShear * llx1);
+ lrx1 = xSign * (scaledWidth - 1) +
+ splashRound(xShear * ySign * (scaledHeight - 1));
+ lry1 = ySign * (scaledHeight - 1) + (int)(yShear * lrx1);
+ if (rot) {
+ ulx = tx + uly1; uly = ty - ulx1;
+ urx = tx + ury1; ury = ty - urx1;
+ llx = tx + lly1; lly = ty - llx1;
+ lrx = tx + lry1; lry = ty - lrx1;
+ } else {
+ ulx = tx + ulx1; uly = ty + uly1;
+ urx = tx + urx1; ury = ty + ury1;
+ llx = tx + llx1; lly = ty + lly1;
+ lrx = tx + lrx1; lry = ty + lry1;
+ }
+ xMin = (ulx < urx) ? (ulx < llx) ? (ulx < lrx) ? ulx : lrx
+ : (llx < lrx) ? llx : lrx
+ : (urx < llx) ? (urx < lrx) ? urx : lrx
+ : (llx < lrx) ? llx : lrx;
+ xMax = (ulx > urx) ? (ulx > llx) ? (ulx > lrx) ? ulx : lrx
+ : (llx > lrx) ? llx : lrx
+ : (urx > llx) ? (urx > lrx) ? urx : lrx
+ : (llx > lrx) ? llx : lrx;
+ yMin = (uly < ury) ? (uly < lly) ? (uly < lry) ? uly : lry
+ : (lly < lry) ? lly : lry
+ : (ury < lly) ? (ury < lry) ? ury : lry
+ : (lly < lry) ? lly : lry;
+ yMax = (uly > ury) ? (uly > lly) ? (uly > lry) ? uly : lry
+ : (lly > lry) ? lly : lry
+ : (ury > lly) ? (ury > lry) ? ury : lry
+ : (lly > lry) ? lly : lry;
+ clipRes = state->clip->testRect(xMin, yMin, xMax, yMax);
+ opClipRes = clipRes;
+ if (clipRes == splashClipAllOutside) {
+ return splashOk;
+ }
+
+ // compute Bresenham parameters for x and y scaling
+ yp = h / scaledHeight;
+ yq = h % scaledHeight;
+ xp = w / scaledWidth;
+ xq = w % scaledWidth;
+
+ // allocate pixel buffers
+ if (yp < 0 || yp > INT_MAX - 1) {
+ return splashErrBadArg;
+ }
+ colorBuf = (SplashColorPtr)gmallocn3((yp + 1), w, nComps);
+ if (srcAlpha) {
+ alphaBuf = (Guchar *)gmallocn((yp + 1), w);
+ } else {
+ alphaBuf = NULL;
+ }
+
+ pixAcc0 = pixAcc1 = pixAcc2 = 0; // make gcc happy
+#if SPLASH_CMYK
+ pixAcc3 = 0; // make gcc happy
+#endif
+
+ // initialize the pixel pipe
+ pipeInit(&pipe, 0, 0, NULL, pix, state->fillAlpha,
+ srcAlpha || (vectorAntialias && clipRes != splashClipAllInside),
+ gFalse);
+ if (vectorAntialias) {
+ drawAAPixelInit();
+ }
+
+ if (srcAlpha) {
+
+ // init y scale Bresenham
+ yt = 0;
+ lastYStep = 1;
+
+ for (y = 0; y < scaledHeight; ++y) {
+
+ // y scale Bresenham
+ yStep = yp;
+ yt += yq;
+ if (yt >= scaledHeight) {
+ yt -= scaledHeight;
+ ++yStep;
+ }
+
+ // read row(s) from image
+ n = (yp > 0) ? yStep : lastYStep;
+ if (n > 0) {
+ p = colorBuf;
+ q = alphaBuf;
+ for (i = 0; i < n; ++i) {
+ (*src)(srcData, p, q);
+ p += w * nComps;
+ q += w;
+ }
+ }
+ lastYStep = yStep;
+
+ // loop-invariant constants
+ k1 = splashRound(xShear * ySign * y);
+
+ // clipping test
+ if (clipRes != splashClipAllInside &&
+ !rot &&
+ (int)(yShear * k1) ==
+ (int)(yShear * (xSign * (scaledWidth - 1) + k1))) {
+ if (xSign > 0) {
+ spanXMin = tx + k1;
+ spanXMax = spanXMin + (scaledWidth - 1);
+ } else {
+ spanXMax = tx + k1;
+ spanXMin = spanXMax - (scaledWidth - 1);
+ }
+ spanY = ty + ySign * y + (int)(yShear * k1);
+ clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY);
+ if (clipRes2 == splashClipAllOutside) {
+ continue;
+ }
+ } else {
+ clipRes2 = clipRes;
+ }
+
+ // init x scale Bresenham
+ xt = 0;
+ xSrc = 0;
+
+ // x shear
+ x1 = k1;
+
+ // y shear
+ y1 = (SplashCoord)ySign * y + yShear * x1;
+ // this is a kludge: if yShear1 is negative, then (int)y1 would
+ // change immediately after the first pixel, which is not what
+ // we want
+ if (yShear1 < 0) {
+ y1 += 0.999;
+ }
+
+ // loop-invariant constants
+ n = yStep > 0 ? yStep : 1;
+
+ switch (srcMode) {
+
+ case splashModeMono1:
+ case splashModeMono8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ alphaAcc = 0;
+ p = colorBuf + xSrc;
+ q = alphaBuf + xSrc;
+ pixAcc0 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ alphaAcc += *q++;
+ }
+ p += w - m;
+ q += w - m;
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+ alphaMul = pixMul * (1.0 / 255.0);
+ alpha = (SplashCoord)alphaAcc * alphaMul;
+
+ if (alpha > 0) {
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+
+ // set pixel
+ pipe.shape = alpha;
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ alphaAcc = 0;
+ p = colorBuf + xSrc * 3;
+ q = alphaBuf + xSrc;
+ pixAcc0 = pixAcc1 = pixAcc2 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ alphaAcc += *q++;
+ }
+ p += 3 * (w - m);
+ q += w - m;
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+ alphaMul = pixMul * (1.0 / 255.0);
+ alpha = (SplashCoord)alphaAcc * alphaMul;
+
+ if (alpha > 0) {
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+
+ // set pixel
+ pipe.shape = alpha;
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+ case splashModeXBGR8:
+ for (x = 0; x < scaledWidth; ++x) {
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ alphaAcc = 0;
+ p = colorBuf + xSrc * 4;
+ q = alphaBuf + xSrc;
+ pixAcc0 = pixAcc1 = pixAcc2 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ *p++;
+ alphaAcc += *q++;
+ }
+ p += 4 * (w - m);
+ q += w - m;
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+ alphaMul = pixMul * (1.0 / 255.0);
+ alpha = (SplashCoord)alphaAcc * alphaMul;
+
+ if (alpha > 0) {
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+ pix[3] = 255;
+
+ // set pixel
+ pipe.shape = alpha;
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ alphaAcc = 0;
+ p = colorBuf + xSrc * 4;
+ q = alphaBuf + xSrc;
+ pixAcc0 = pixAcc1 = pixAcc2 = pixAcc3 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ pixAcc3 += *p++;
+ alphaAcc += *q++;
+ }
+ p += 4 * (w - m);
+ q += w - m;
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+ alphaMul = pixMul * (1.0 / 255.0);
+ alpha = (SplashCoord)alphaAcc * alphaMul;
+
+ if (alpha > 0) {
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+ pix[3] = (int)((SplashCoord)pixAcc3 * pixMul);
+
+ // set pixel
+ pipe.shape = alpha;
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+#endif // SPLASH_CMYK
+ }
+ }
+
+ } else {
+
+ // init y scale Bresenham
+ yt = 0;
+ lastYStep = 1;
+
+ for (y = 0; y < scaledHeight; ++y) {
+
+ // y scale Bresenham
+ yStep = yp;
+ yt += yq;
+ if (yt >= scaledHeight) {
+ yt -= scaledHeight;
+ ++yStep;
+ }
+
+ // read row(s) from image
+ n = (yp > 0) ? yStep : lastYStep;
+ if (n > 0) {
+ p = colorBuf;
+ for (i = 0; i < n; ++i) {
+ (*src)(srcData, p, NULL);
+ p += w * nComps;
+ }
+ }
+ lastYStep = yStep;
+
+ // loop-invariant constants
+ k1 = splashRound(xShear * ySign * y);
+
+ // clipping test
+ if (clipRes != splashClipAllInside &&
+ !rot &&
+ (int)(yShear * k1) ==
+ (int)(yShear * (xSign * (scaledWidth - 1) + k1))) {
+ if (xSign > 0) {
+ spanXMin = tx + k1;
+ spanXMax = spanXMin + (scaledWidth - 1);
+ } else {
+ spanXMax = tx + k1;
+ spanXMin = spanXMax - (scaledWidth - 1);
+ }
+ spanY = ty + ySign * y + (int)(yShear * k1);
+ clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY);
+ if (clipRes2 == splashClipAllOutside) {
+ continue;
+ }
+ } else {
+ clipRes2 = clipRes;
+ }
+
+ // init x scale Bresenham
+ xt = 0;
+ xSrc = 0;
+
+ // x shear
+ x1 = k1;
+
+ // y shear
+ y1 = (SplashCoord)ySign * y + yShear * x1;
+ // this is a kludge: if yShear1 is negative, then (int)y1 would
+ // change immediately after the first pixel, which is not what
+ // we want
+ if (yShear1 < 0) {
+ y1 += 0.999;
+ }
+
+ // loop-invariant constants
+ n = yStep > 0 ? yStep : 1;
+
+ switch (srcMode) {
+
+ case splashModeMono1:
+ case splashModeMono8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ p = colorBuf + xSrc;
+ pixAcc0 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ }
+ p += w - m;
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+
+ // set pixel
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ pipe.shape = (SplashCoord)1;
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ p = colorBuf + xSrc * 3;
+ pixAcc0 = pixAcc1 = pixAcc2 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ }
+ p += 3 * (w - m);
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+
+ // set pixel
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ pipe.shape = (SplashCoord)1;
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+ case splashModeXBGR8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ p = colorBuf + xSrc * 4;
+ pixAcc0 = pixAcc1 = pixAcc2 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ *p++;
+ }
+ p += 4 * (w - m);
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+ pix[3] = 255;
+
+ // set pixel
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ pipe.shape = (SplashCoord)1;
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ for (x = 0; x < scaledWidth; ++x) {
+
+ // x scale Bresenham
+ xStep = xp;
+ xt += xq;
+ if (xt >= scaledWidth) {
+ xt -= scaledWidth;
+ ++xStep;
+ }
+
+ // rotation
+ if (rot) {
+ x2 = (int)y1;
+ y2 = -x1;
+ } else {
+ x2 = x1;
+ y2 = (int)y1;
+ }
+
+ // compute the filtered pixel at (x,y) after the x and y scaling
+ // operations
+ m = xStep > 0 ? xStep : 1;
+ p = colorBuf + xSrc * 4;
+ pixAcc0 = pixAcc1 = pixAcc2 = pixAcc3 = 0;
+ for (i = 0; i < n; ++i) {
+ for (j = 0; j < m; ++j) {
+ pixAcc0 += *p++;
+ pixAcc1 += *p++;
+ pixAcc2 += *p++;
+ pixAcc3 += *p++;
+ }
+ p += 4 * (w - m);
+ }
+ pixMul = (SplashCoord)1 / (SplashCoord)(n * m);
+
+ pix[0] = (int)((SplashCoord)pixAcc0 * pixMul);
+ pix[1] = (int)((SplashCoord)pixAcc1 * pixMul);
+ pix[2] = (int)((SplashCoord)pixAcc2 * pixMul);
+ pix[3] = (int)((SplashCoord)pixAcc3 * pixMul);
+
+ // set pixel
+ if (vectorAntialias && clipRes != splashClipAllInside) {
+ pipe.shape = (SplashCoord)1;
+ drawAAPixel(&pipe, tx + x2, ty + y2);
+ } else {
+ drawPixel(&pipe, tx + x2, ty + y2,
+ clipRes2 == splashClipAllInside);
+ }
+
+ // x scale Bresenham
+ xSrc += xStep;
+
+ // x shear
+ x1 += xSign;
+
+ // y shear
+ y1 += yShear1;
+ }
+ break;
+#endif // SPLASH_CMYK
+ }
+ }
+
+ }
+
+ gfree(colorBuf);
+ gfree(alphaBuf);
+
+ return splashOk;
+}
+
+SplashError Splash::composite(SplashBitmap *src, int xSrc, int ySrc,
+ int xDest, int yDest, int w, int h,
+ GBool noClip, GBool nonIsolated) {
+ SplashPipe pipe;
+ SplashColor pixel;
+ Guchar alpha;
+ Guchar *ap;
+ int x, y;
+
+ if (src->mode != bitmap->mode) {
+ return splashErrModeMismatch;
+ }
+
+ if (src->alpha) {
+ pipeInit(&pipe, xDest, yDest, NULL, pixel, state->fillAlpha,
+ gTrue, nonIsolated);
+ for (y = 0; y < h; ++y) {
+ pipeSetXY(&pipe, xDest, yDest + y);
+ ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc;
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ alpha = *ap++;
+ if (noClip || state->clip->test(xDest + x, yDest + y)) {
+ // this uses shape instead of alpha, which isn't technically
+ // correct, but works out the same
+ pipe.shape = (SplashCoord)(alpha / 255.0);
+ pipeRun(&pipe);
+ updateModX(xDest + x);
+ updateModY(yDest + y);
+ } else {
+ pipeIncX(&pipe);
+ }
+ }
+ }
+ } else {
+ pipeInit(&pipe, xDest, yDest, NULL, pixel, state->fillAlpha,
+ gFalse, nonIsolated);
+ for (y = 0; y < h; ++y) {
+ pipeSetXY(&pipe, xDest, yDest + y);
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ if (noClip || state->clip->test(xDest + x, yDest + y)) {
+ pipeRun(&pipe);
+ updateModX(xDest + x);
+ updateModY(yDest + y);
+ } else {
+ pipeIncX(&pipe);
+ }
+ }
+ }
+ }
+
+ return splashOk;
+}
+
+void Splash::compositeBackground(SplashColorPtr color) {
+ SplashColorPtr p;
+ Guchar *q;
+ Guchar alpha, alpha1, c, color0, color1, color2;
+#if SPLASH_CMYK
+ Guchar color3;
+#endif
+ int x, y, mask;
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ color0 = color[0];
+ for (y = 0; y < bitmap->height; ++y) {
+ p = &bitmap->data[y * bitmap->rowSize];
+ q = &bitmap->alpha[y * bitmap->width];
+ mask = 0x80;
+ for (x = 0; x < bitmap->width; ++x) {
+ alpha = *q++;
+ alpha1 = 255 - alpha;
+ c = (*p & mask) ? 0xff : 0x00;
+ c = div255(alpha1 * color0 + alpha * c);
+ if (c & 0x80) {
+ *p |= mask;
+ } else {
+ *p &= ~mask;
+ }
+ if (!(mask >>= 1)) {
+ mask = 0x80;
+ ++p;
+ }
+ }
+ }
+ break;
+ case splashModeMono8:
+ color0 = color[0];
+ for (y = 0; y < bitmap->height; ++y) {
+ p = &bitmap->data[y * bitmap->rowSize];
+ q = &bitmap->alpha[y * bitmap->width];
+ for (x = 0; x < bitmap->width; ++x) {
+ alpha = *q++;
+ alpha1 = 255 - alpha;
+ p[0] = div255(alpha1 * color0 + alpha * p[0]);
+ ++p;
+ }
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ color0 = color[0];
+ color1 = color[1];
+ color2 = color[2];
+ for (y = 0; y < bitmap->height; ++y) {
+ p = &bitmap->data[y * bitmap->rowSize];
+ q = &bitmap->alpha[y * bitmap->width];
+ for (x = 0; x < bitmap->width; ++x) {
+ alpha = *q++;
+ alpha1 = 255 - alpha;
+ p[0] = div255(alpha1 * color0 + alpha * p[0]);
+ p[1] = div255(alpha1 * color1 + alpha * p[1]);
+ p[2] = div255(alpha1 * color2 + alpha * p[2]);
+ p += 3;
+ }
+ }
+ break;
+ case splashModeXBGR8:
+ color0 = color[0];
+ color1 = color[1];
+ color2 = color[2];
+ for (y = 0; y < bitmap->height; ++y) {
+ p = &bitmap->data[y * bitmap->rowSize];
+ q = &bitmap->alpha[y * bitmap->width];
+ for (x = 0; x < bitmap->width; ++x) {
+ alpha = *q++;
+ alpha1 = 255 - alpha;
+ p[0] = div255(alpha1 * color0 + alpha * p[0]);
+ p[1] = div255(alpha1 * color1 + alpha * p[1]);
+ p[2] = div255(alpha1 * color2 + alpha * p[2]);
+ p[3] = 255;
+ p += 4;
+ }
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ color0 = color[0];
+ color1 = color[1];
+ color2 = color[2];
+ color3 = color[3];
+ for (y = 0; y < bitmap->height; ++y) {
+ p = &bitmap->data[y * bitmap->rowSize];
+ q = &bitmap->alpha[y * bitmap->width];
+ for (x = 0; x < bitmap->width; ++x) {
+ alpha = *q++;
+ alpha1 = 255 - alpha;
+ p[0] = div255(alpha1 * color0 + alpha * p[0]);
+ p[1] = div255(alpha1 * color1 + alpha * p[1]);
+ p[2] = div255(alpha1 * color2 + alpha * p[2]);
+ p[3] = div255(alpha1 * color3 + alpha * p[3]);
+ p += 4;
+ }
+ }
+ break;
+#endif
+ }
+ memset(bitmap->alpha, 255, bitmap->width * bitmap->height);
+}
+
+SplashError Splash::blitTransparent(SplashBitmap *src, int xSrc, int ySrc,
+ int xDest, int yDest, int w, int h) {
+ SplashColor pixel;
+ SplashColorPtr p;
+ Guchar *q;
+ int x, y, mask;
+
+ if (src->mode != bitmap->mode) {
+ return splashErrModeMismatch;
+ }
+
+ switch (bitmap->mode) {
+ case splashModeMono1:
+ for (y = 0; y < h; ++y) {
+ p = &bitmap->data[(yDest + y) * bitmap->rowSize + (xDest >> 3)];
+ mask = 0x80 >> (xDest & 7);
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ if (pixel[0]) {
+ *p |= mask;
+ } else {
+ *p &= ~mask;
+ }
+ if (!(mask >>= 1)) {
+ mask = 0x80;
+ ++p;
+ }
+ }
+ }
+ break;
+ case splashModeMono8:
+ for (y = 0; y < h; ++y) {
+ p = &bitmap->data[(yDest + y) * bitmap->rowSize + xDest];
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ *p++ = pixel[0];
+ }
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (y = 0; y < h; ++y) {
+ p = &bitmap->data[(yDest + y) * bitmap->rowSize + 3 * xDest];
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ *p++ = pixel[0];
+ *p++ = pixel[1];
+ *p++ = pixel[2];
+ }
+ }
+ break;
+ case splashModeXBGR8:
+ for (y = 0; y < h; ++y) {
+ p = &bitmap->data[(yDest + y) * bitmap->rowSize + 4 * xDest];
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ *p++ = pixel[0];
+ *p++ = pixel[1];
+ *p++ = pixel[2];
+ *p++ = 255;
+ }
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ for (y = 0; y < h; ++y) {
+ p = &bitmap->data[(yDest + y) * bitmap->rowSize + 4 * xDest];
+ for (x = 0; x < w; ++x) {
+ src->getPixel(xSrc + x, ySrc + y, pixel);
+ *p++ = pixel[0];
+ *p++ = pixel[1];
+ *p++ = pixel[2];
+ *p++ = pixel[3];
+ }
+ }
+ break;
+#endif
+ }
+
+ if (bitmap->alpha) {
+ for (y = 0; y < h; ++y) {
+ q = &bitmap->alpha[(yDest + y) * bitmap->width + xDest];
+ for (x = 0; x < w; ++x) {
+ *q++ = 0x00;
+ }
+ }
+ }
+
+ return splashOk;
+}
+
+SplashPath *Splash::makeStrokePath(SplashPath *path, GBool flatten) {
+ SplashPath *pathIn, *pathOut;
+ SplashCoord w, d, dx, dy, wdx, wdy, dxNext, dyNext, wdxNext, wdyNext;
+ SplashCoord crossprod, dotprod, miter, m;
+ GBool first, last, closed;
+ int subpathStart, next, i;
+ int left0, left1, left2, right0, right1, right2, join0, join1, join2;
+ int leftFirst, rightFirst, firstPt;
+
+ if (flatten) {
+ pathIn = flattenPath(path, state->matrix, state->flatness);
+ if (state->lineDashLength > 0) {
+ pathOut = makeDashedPath(pathIn);
+ delete pathIn;
+ pathIn = pathOut;
+ }
+ } else {
+ pathIn = path;
+ }
+
+ subpathStart = 0; // make gcc happy
+ closed = gFalse; // make gcc happy
+ left0 = left1 = right0 = right1 = join0 = join1 = 0; // make gcc happy
+ leftFirst = rightFirst = firstPt = 0; // make gcc happy
+
+ pathOut = new SplashPath();
+ w = state->lineWidth;
+
+ for (i = 0; i < pathIn->length - 1; ++i) {
+ if (pathIn->flags[i] & splashPathLast) {
+ continue;
+ }
+ if ((first = pathIn->flags[i] & splashPathFirst)) {
+ subpathStart = i;
+ closed = pathIn->flags[i] & splashPathClosed;
+ }
+ last = pathIn->flags[i+1] & splashPathLast;
+
+ // compute the deltas for segment (i, i+1)
+ d = splashDist(pathIn->pts[i].x, pathIn->pts[i].y,
+ pathIn->pts[i+1].x, pathIn->pts[i+1].y);
+ if (d == 0) {
+ // we need to draw end caps on zero-length lines
+ //~ not clear what the behavior should be for splashLineCapButt
+ //~ with d==0
+ dx = 0;
+ dy = 1;
+ } else {
+ d = (SplashCoord)1 / d;
+ dx = d * (pathIn->pts[i+1].x - pathIn->pts[i].x);
+ dy = d * (pathIn->pts[i+1].y - pathIn->pts[i].y);
+ }
+ wdx = (SplashCoord)0.5 * w * dx;
+ wdy = (SplashCoord)0.5 * w * dy;
+
+ // compute the deltas for segment (i+1, next)
+ next = last ? subpathStart + 1 : i + 2;
+ d = splashDist(pathIn->pts[i+1].x, pathIn->pts[i+1].y,
+ pathIn->pts[next].x, pathIn->pts[next].y);
+ if (d == 0) {
+ // we need to draw end caps on zero-length lines
+ //~ not clear what the behavior should be for splashLineCapButt
+ //~ with d==0
+ dxNext = 0;
+ dyNext = 1;
+ } else {
+ d = (SplashCoord)1 / d;
+ dxNext = d * (pathIn->pts[next].x - pathIn->pts[i+1].x);
+ dyNext = d * (pathIn->pts[next].y - pathIn->pts[i+1].y);
+ }
+ wdxNext = (SplashCoord)0.5 * w * dxNext;
+ wdyNext = (SplashCoord)0.5 * w * dyNext;
+
+ // draw the start cap
+ pathOut->moveTo(pathIn->pts[i].x - wdy, pathIn->pts[i].y + wdx);
+ if (i == subpathStart) {
+ firstPt = pathOut->length - 1;
+ }
+ if (first && !closed) {
+ switch (state->lineCap) {
+ case splashLineCapButt:
+ pathOut->lineTo(pathIn->pts[i].x + wdy, pathIn->pts[i].y - wdx);
+ break;
+ case splashLineCapRound:
+ pathOut->curveTo(pathIn->pts[i].x - wdy - bezierCircle * wdx,
+ pathIn->pts[i].y + wdx - bezierCircle * wdy,
+ pathIn->pts[i].x - wdx - bezierCircle * wdy,
+ pathIn->pts[i].y - wdy + bezierCircle * wdx,
+ pathIn->pts[i].x - wdx,
+ pathIn->pts[i].y - wdy);
+ pathOut->curveTo(pathIn->pts[i].x - wdx + bezierCircle * wdy,
+ pathIn->pts[i].y - wdy - bezierCircle * wdx,
+ pathIn->pts[i].x + wdy - bezierCircle * wdx,
+ pathIn->pts[i].y - wdx - bezierCircle * wdy,
+ pathIn->pts[i].x + wdy,
+ pathIn->pts[i].y - wdx);
+ break;
+ case splashLineCapProjecting:
+ pathOut->lineTo(pathIn->pts[i].x - wdx - wdy,
+ pathIn->pts[i].y + wdx - wdy);
+ pathOut->lineTo(pathIn->pts[i].x - wdx + wdy,
+ pathIn->pts[i].y - wdx - wdy);
+ pathOut->lineTo(pathIn->pts[i].x + wdy,
+ pathIn->pts[i].y - wdx);
+ break;
+ }
+ } else {
+ pathOut->lineTo(pathIn->pts[i].x + wdy, pathIn->pts[i].y - wdx);
+ }
+
+ // draw the left side of the segment rectangle
+ left2 = pathOut->length - 1;
+ pathOut->lineTo(pathIn->pts[i+1].x + wdy, pathIn->pts[i+1].y - wdx);
+
+ // draw the end cap
+ if (last && !closed) {
+ switch (state->lineCap) {
+ case splashLineCapButt:
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx);
+ break;
+ case splashLineCapRound:
+ pathOut->curveTo(pathIn->pts[i+1].x + wdy + bezierCircle * wdx,
+ pathIn->pts[i+1].y - wdx + bezierCircle * wdy,
+ pathIn->pts[i+1].x + wdx + bezierCircle * wdy,
+ pathIn->pts[i+1].y + wdy - bezierCircle * wdx,
+ pathIn->pts[i+1].x + wdx,
+ pathIn->pts[i+1].y + wdy);
+ pathOut->curveTo(pathIn->pts[i+1].x + wdx - bezierCircle * wdy,
+ pathIn->pts[i+1].y + wdy + bezierCircle * wdx,
+ pathIn->pts[i+1].x - wdy + bezierCircle * wdx,
+ pathIn->pts[i+1].y + wdx + bezierCircle * wdy,
+ pathIn->pts[i+1].x - wdy,
+ pathIn->pts[i+1].y + wdx);
+ break;
+ case splashLineCapProjecting:
+ pathOut->lineTo(pathIn->pts[i+1].x + wdy + wdx,
+ pathIn->pts[i+1].y - wdx + wdy);
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy + wdx,
+ pathIn->pts[i+1].y + wdx + wdy);
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy,
+ pathIn->pts[i+1].y + wdx);
+ break;
+ }
+ } else {
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx);
+ }
+
+ // draw the right side of the segment rectangle
+ right2 = pathOut->length - 1;
+ pathOut->close();
+
+ // draw the join
+ join2 = pathOut->length;
+ if (!last || closed) {
+ crossprod = dx * dyNext - dy * dxNext;
+ dotprod = -(dx * dxNext + dy * dyNext);
+ if (dotprod > 0.99999) {
+ // avoid a divide-by-zero -- set miter to something arbitrary
+ // such that sqrt(miter) will exceed miterLimit (and m is never
+ // used in that situation)
+ miter = (state->miterLimit + 1) * (state->miterLimit + 1);
+ m = 0;
+ } else {
+ miter = (SplashCoord)2 / ((SplashCoord)1 - dotprod);
+ if (miter < 1) {
+ // this can happen because of floating point inaccuracies
+ miter = 1;
+ }
+ m = splashSqrt(miter - 1);
+ }
+
+ // round join
+ if (state->lineJoin == splashLineJoinRound) {
+ pathOut->moveTo(pathIn->pts[i+1].x + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y);
+ pathOut->curveTo(pathIn->pts[i+1].x + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y + bezierCircle2 * w,
+ pathIn->pts[i+1].x + bezierCircle2 * w,
+ pathIn->pts[i+1].y + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].x,
+ pathIn->pts[i+1].y + (SplashCoord)0.5 * w);
+ pathOut->curveTo(pathIn->pts[i+1].x - bezierCircle2 * w,
+ pathIn->pts[i+1].y + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].x - (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y + bezierCircle2 * w,
+ pathIn->pts[i+1].x - (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y);
+ pathOut->curveTo(pathIn->pts[i+1].x - (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y - bezierCircle2 * w,
+ pathIn->pts[i+1].x - bezierCircle2 * w,
+ pathIn->pts[i+1].y - (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].x,
+ pathIn->pts[i+1].y - (SplashCoord)0.5 * w);
+ pathOut->curveTo(pathIn->pts[i+1].x + bezierCircle2 * w,
+ pathIn->pts[i+1].y - (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].x + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y - bezierCircle2 * w,
+ pathIn->pts[i+1].x + (SplashCoord)0.5 * w,
+ pathIn->pts[i+1].y);
+
+ } else {
+ pathOut->moveTo(pathIn->pts[i+1].x, pathIn->pts[i+1].y);
+
+ // angle < 180
+ if (crossprod < 0) {
+ pathOut->lineTo(pathIn->pts[i+1].x - wdyNext,
+ pathIn->pts[i+1].y + wdxNext);
+ // miter join inside limit
+ if (state->lineJoin == splashLineJoinMiter &&
+ splashSqrt(miter) <= state->miterLimit) {
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy + wdx * m,
+ pathIn->pts[i+1].y + wdx + wdy * m);
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy,
+ pathIn->pts[i+1].y + wdx);
+ // bevel join or miter join outside limit
+ } else {
+ pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx);
+ }
+
+ // angle >= 180
+ } else {
+ pathOut->lineTo(pathIn->pts[i+1].x + wdy,
+ pathIn->pts[i+1].y - wdx);
+ // miter join inside limit
+ if (state->lineJoin == splashLineJoinMiter &&
+ splashSqrt(miter) <= state->miterLimit) {
+ pathOut->lineTo(pathIn->pts[i+1].x + wdy + wdx * m,
+ pathIn->pts[i+1].y - wdx + wdy * m);
+ pathOut->lineTo(pathIn->pts[i+1].x + wdyNext,
+ pathIn->pts[i+1].y - wdxNext);
+ // bevel join or miter join outside limit
+ } else {
+ pathOut->lineTo(pathIn->pts[i+1].x + wdyNext,
+ pathIn->pts[i+1].y - wdxNext);
+ }
+ }
+ }
+
+ pathOut->close();
+ }
+
+ // add stroke adjustment hints
+ if (state->strokeAdjust) {
+ if (i >= subpathStart + 1) {
+ if (i >= subpathStart + 2) {
+ pathOut->addStrokeAdjustHint(left1, right1, left0 + 1, right0);
+ pathOut->addStrokeAdjustHint(left1, right1, join0, left2);
+ } else {
+ pathOut->addStrokeAdjustHint(left1, right1, firstPt, left2);
+ }
+ pathOut->addStrokeAdjustHint(left1, right1, right2 + 1, right2 + 1);
+ }
+ left0 = left1;
+ left1 = left2;
+ right0 = right1;
+ right1 = right2;
+ join0 = join1;
+ join1 = join2;
+ if (i == subpathStart) {
+ leftFirst = left2;
+ rightFirst = right2;
+ }
+ if (last) {
+ if (i >= subpathStart + 2) {
+ pathOut->addStrokeAdjustHint(left1, right1, left0 + 1, right0);
+ pathOut->addStrokeAdjustHint(left1, right1,
+ join0, pathOut->length - 1);
+ } else {
+ pathOut->addStrokeAdjustHint(left1, right1,
+ firstPt, pathOut->length - 1);
+ }
+ if (closed) {
+ pathOut->addStrokeAdjustHint(left1, right1, firstPt, leftFirst);
+ pathOut->addStrokeAdjustHint(left1, right1,
+ rightFirst + 1, rightFirst + 1);
+ pathOut->addStrokeAdjustHint(leftFirst, rightFirst,
+ left1 + 1, right1);
+ pathOut->addStrokeAdjustHint(leftFirst, rightFirst,
+ join1, pathOut->length - 1);
+ }
+ }
+ }
+ }
+
+ if (pathIn != path) {
+ delete pathIn;
+ }
+
+ return pathOut;
+}
+
+void Splash::dumpPath(SplashPath *path) {
+ int i;
+
+ for (i = 0; i < path->length; ++i) {
+ printf(" %3d: x=%8.2f y=%8.2f%s%s%s%s\n",
+ i, (double)path->pts[i].x, (double)path->pts[i].y,
+ (path->flags[i] & splashPathFirst) ? " first" : "",
+ (path->flags[i] & splashPathLast) ? " last" : "",
+ (path->flags[i] & splashPathClosed) ? " closed" : "",
+ (path->flags[i] & splashPathCurve) ? " curve" : "");
+ }
+}
+
+void Splash::dumpXPath(SplashXPath *path) {
+ int i;
+
+ for (i = 0; i < path->length; ++i) {
+ printf(" %4d: x0=%8.2f y0=%8.2f x1=%8.2f y1=%8.2f %s%s%s%s%s%s%s\n",
+ i, (double)path->segs[i].x0, (double)path->segs[i].y0,
+ (double)path->segs[i].x1, (double)path->segs[i].y1,
+ (path->segs[i].flags & splashXPathFirst) ? "F" : " ",
+ (path->segs[i].flags & splashXPathLast) ? "L" : " ",
+ (path->segs[i].flags & splashXPathEnd0) ? "0" : " ",
+ (path->segs[i].flags & splashXPathEnd1) ? "1" : " ",
+ (path->segs[i].flags & splashXPathHoriz) ? "H" : " ",
+ (path->segs[i].flags & splashXPathVert) ? "V" : " ",
+ (path->segs[i].flags & splashXPathFlip) ? "P" : " ");
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.h b/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.h
new file mode 100644
index 00000000000..c9d57cc7acb
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/Splash.h
@@ -0,0 +1,306 @@
+//========================================================================
+//
+// Splash.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
+// Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASH_H
+#define SPLASH_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+#include "SplashClip.h"
+
+class Splash;
+class SplashBitmap;
+struct SplashGlyphBitmap;
+class SplashState;
+class SplashPattern;
+class SplashScreen;
+class SplashPath;
+class SplashXPath;
+class SplashFont;
+struct SplashPipe;
+
+//------------------------------------------------------------------------
+
+// Retrieves the next line of pixels in an image mask. Normally,
+// fills in *<line> and returns true. If the image stream is
+// exhausted, returns false.
+typedef GBool (*SplashImageMaskSource)(void *data, SplashColorPtr pixel);
+
+// Retrieves the next line of pixels in an image. Normally, fills in
+// *<line> and returns true. If the image stream is exhausted,
+// returns false.
+typedef GBool (*SplashImageSource)(void *data, SplashColorPtr colorLine,
+ Guchar *alphaLine);
+
+//------------------------------------------------------------------------
+
+enum SplashPipeResultColorCtrl {
+#if SPLASH_CMYK
+ splashPipeResultColorNoAlphaBlendCMYK,
+#endif
+ splashPipeResultColorNoAlphaBlendRGB,
+ splashPipeResultColorNoAlphaBlendMono,
+ splashPipeResultColorAlphaNoBlendMono,
+ splashPipeResultColorAlphaNoBlendRGB,
+#if SPLASH_CMYK
+ splashPipeResultColorAlphaNoBlendCMYK,
+#endif
+ splashPipeResultColorAlphaBlendMono,
+ splashPipeResultColorAlphaBlendRGB
+#if SPLASH_CMYK
+ ,
+ splashPipeResultColorAlphaBlendCMYK
+#endif
+};
+
+//------------------------------------------------------------------------
+// Splash
+//------------------------------------------------------------------------
+
+class Splash {
+public:
+
+ // Create a new rasterizer object.
+ Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA,
+ SplashScreenParams *screenParams = NULL);
+ Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA,
+ SplashScreen *screenA);
+
+ ~Splash();
+
+ //----- state read
+
+ SplashCoord *getMatrix();
+ SplashPattern *getStrokePattern();
+ SplashPattern *getFillPattern();
+ SplashScreen *getScreen();
+ SplashBlendFunc getBlendFunc();
+ SplashCoord getStrokeAlpha();
+ SplashCoord getFillAlpha();
+ SplashCoord getLineWidth();
+ int getLineCap();
+ int getLineJoin();
+ SplashCoord getMiterLimit();
+ SplashCoord getFlatness();
+ SplashCoord *getLineDash();
+ int getLineDashLength();
+ SplashCoord getLineDashPhase();
+ SplashClip *getClip();
+ SplashBitmap *getSoftMask();
+ GBool getInNonIsolatedGroup();
+
+ //----- state write
+
+ void setMatrix(SplashCoord *matrix);
+ void setStrokePattern(SplashPattern *strokeColor);
+ void setFillPattern(SplashPattern *fillColor);
+ void setScreen(SplashScreen *screen);
+ void setBlendFunc(SplashBlendFunc func);
+ void setStrokeAlpha(SplashCoord alpha);
+ void setFillAlpha(SplashCoord alpha);
+ void setLineWidth(SplashCoord lineWidth);
+ void setLineCap(int lineCap);
+ void setLineJoin(int lineJoin);
+ void setMiterLimit(SplashCoord miterLimit);
+ void setFlatness(SplashCoord flatness);
+ // the <lineDash> array will be copied
+ void setLineDash(SplashCoord *lineDash, int lineDashLength,
+ SplashCoord lineDashPhase);
+ void setStrokeAdjust(GBool strokeAdjust);
+ // NB: uses transformed coordinates.
+ void clipResetToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1);
+ // NB: uses transformed coordinates.
+ SplashError clipToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1);
+ // NB: uses untransformed coordinates.
+ SplashError clipToPath(SplashPath *path, GBool eo);
+ void setSoftMask(SplashBitmap *softMask);
+ void setInNonIsolatedGroup(SplashBitmap *alpha0BitmapA,
+ int alpha0XA, int alpha0YA);
+
+ //----- state save/restore
+
+ void saveState();
+ SplashError restoreState();
+
+ //----- drawing operations
+
+ // Fill the bitmap with <color>. This is not subject to clipping.
+ void clear(SplashColorPtr color, Guchar alpha = 0x00);
+
+ // Stroke a path using the current stroke pattern.
+ SplashError stroke(SplashPath *path);
+
+ // Fill a path using the current fill pattern.
+ SplashError fill(SplashPath *path, GBool eo);
+
+ // Fill a path, XORing with the current fill pattern.
+ SplashError xorFill(SplashPath *path, GBool eo);
+
+ // Draw a character, using the current fill pattern.
+ SplashError fillChar(SplashCoord x, SplashCoord y, int c, SplashFont *font);
+
+ // Draw a glyph, using the current fill pattern. This function does
+ // not free any data, i.e., it ignores glyph->freeData.
+ void fillGlyph(SplashCoord x, SplashCoord y,
+ SplashGlyphBitmap *glyph);
+
+ // Draws an image mask using the fill color. This will read <h>
+ // lines of <w> pixels from <src>, starting with the top line. "1"
+ // pixels will be drawn with the current fill color; "0" pixels are
+ // transparent. The matrix:
+ // [ mat[0] mat[1] 0 ]
+ // [ mat[2] mat[3] 0 ]
+ // [ mat[4] mat[5] 1 ]
+ // maps a unit square to the desired destination for the image, in
+ // PostScript style:
+ // [x' y' 1] = [x y 1] * mat
+ // Note that the Splash y axis points downward, and the image source
+ // is assumed to produce pixels in raster order, starting from the
+ // top line.
+ SplashError fillImageMask(SplashImageMaskSource src, void *srcData,
+ int w, int h, SplashCoord *mat,
+ GBool glyphMode);
+
+ // Draw an image. This will read <h> lines of <w> pixels from
+ // <src>, starting with the top line. These pixels are assumed to
+ // be in the source mode, <srcMode>. If <srcAlpha> is true, the
+ // alpha values returned by <src> are used; otherwise they are
+ // ignored. The following combinations of source and target modes
+ // are supported:
+ // source target
+ // ------ ------
+ // Mono1 Mono1
+ // Mono8 Mono1 -- with dithering
+ // Mono8 Mono8
+ // RGB8 RGB8
+ // BGR8 BGR8
+ // CMYK8 CMYK8
+ // The matrix behaves as for fillImageMask.
+ SplashError drawImage(SplashImageSource src, void *srcData,
+ SplashColorMode srcMode, GBool srcAlpha,
+ int w, int h, SplashCoord *mat);
+
+ // Composite a rectangular region from <src> onto this Splash
+ // object.
+ SplashError composite(SplashBitmap *src, int xSrc, int ySrc,
+ int xDest, int yDest, int w, int h,
+ GBool noClip, GBool nonIsolated);
+
+ // Composite this Splash object onto a background color. The
+ // background alpha is assumed to be 1.
+ void compositeBackground(SplashColorPtr color);
+
+ // Copy a rectangular region from <src> onto the bitmap belonging to
+ // this Splash object. The destination alpha values are all set to
+ // zero.
+ SplashError blitTransparent(SplashBitmap *src, int xSrc, int ySrc,
+ int xDest, int yDest, int w, int h);
+
+ //----- misc
+
+ // Construct a path for a stroke, given the path to be stroked, and
+ // using the current line parameters. If <flatten> is true, this
+ // function will first flatten the path and handle the linedash.
+ SplashPath *makeStrokePath(SplashPath *path, GBool flatten = gTrue);
+
+ // Return the associated bitmap.
+ SplashBitmap *getBitmap() { return bitmap; }
+
+ // Get a bounding box which includes all modifications since the
+ // last call to clearModRegion.
+ void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax)
+ { *xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax; }
+
+ // Clear the modified region bounding box.
+ void clearModRegion();
+
+ // Get clipping status for the last drawing operation subject to
+ // clipping.
+ SplashClipResult getClipRes() { return opClipRes; }
+
+ // Toggle debug mode on or off.
+ void setDebugMode(GBool debugModeA) { debugMode = debugModeA; }
+
+#if 1 //~tmp: turn off anti-aliasing temporarily
+ GBool getVectorAntialias() { return vectorAntialias; }
+ void setVectorAntialias(GBool vaa) { vectorAntialias = vaa; }
+#endif
+
+private:
+
+ void pipeInit(SplashPipe *pipe, int x, int y,
+ SplashPattern *pattern, SplashColorPtr cSrc,
+ SplashCoord aInput, GBool usesShape,
+ GBool nonIsolatedGroup);
+ void pipeRun(SplashPipe *pipe);
+ void pipeSetXY(SplashPipe *pipe, int x, int y);
+ void pipeIncX(SplashPipe *pipe);
+ void drawPixel(SplashPipe *pipe, int x, int y, GBool noClip);
+ void drawAAPixelInit();
+ void drawAAPixel(SplashPipe *pipe, int x, int y);
+ void drawSpan(SplashPipe *pipe, int x0, int x1, int y, GBool noClip);
+ void drawAALine(SplashPipe *pipe, int x0, int x1, int y);
+ void transform(SplashCoord *matrix, SplashCoord xi, SplashCoord yi,
+ SplashCoord *xo, SplashCoord *yo);
+ void updateModX(int x);
+ void updateModY(int y);
+ void strokeNarrow(SplashPath *path);
+ void strokeWide(SplashPath *path);
+ SplashPath *flattenPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness);
+ void flattenCurve(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3,
+ SplashCoord *matrix, SplashCoord flatness2,
+ SplashPath *fPath);
+ SplashPath *makeDashedPath(SplashPath *xPath);
+ SplashError fillWithPattern(SplashPath *path, GBool eo,
+ SplashPattern *pattern, SplashCoord alpha);
+ void fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph, GBool noclip);
+ void dumpPath(SplashPath *path);
+ void dumpXPath(SplashXPath *path);
+
+ static SplashPipeResultColorCtrl pipeResultColorNoAlphaBlend[];
+ static SplashPipeResultColorCtrl pipeResultColorAlphaNoBlend[];
+ static SplashPipeResultColorCtrl pipeResultColorAlphaBlend[];
+ static int pipeNonIsoGroupCorrection[];
+
+ SplashBitmap *bitmap;
+ SplashState *state;
+ SplashBitmap *aaBuf;
+ int aaBufY;
+ SplashBitmap *alpha0Bitmap; // for non-isolated groups, this is the
+ // bitmap containing the alpha0 values
+ int alpha0X, alpha0Y; // offset within alpha0Bitmap
+ SplashCoord aaGamma[splashAASize * splashAASize + 1];
+ int modXMin, modYMin, modXMax, modYMax;
+ SplashClipResult opClipRes;
+ GBool vectorAntialias;
+ GBool debugMode;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.cc
new file mode 100644
index 00000000000..947becaf28d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.cc
@@ -0,0 +1,376 @@
+//========================================================================
+//
+// SplashBitmap.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
+// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include "goo/gmem.h"
+#include "SplashErrorCodes.h"
+#include "SplashBitmap.h"
+#include "poppler/Error.h"
+#include "PNGWriter.h"
+
+//------------------------------------------------------------------------
+// SplashBitmap
+//------------------------------------------------------------------------
+
+SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPad,
+ SplashColorMode modeA, GBool alphaA,
+ GBool topDown) {
+ width = widthA;
+ height = heightA;
+ mode = modeA;
+ switch (mode) {
+ case splashModeMono1:
+ if (width > 0) {
+ rowSize = (width + 7) >> 3;
+ } else {
+ rowSize = -1;
+ }
+ break;
+ case splashModeMono8:
+ if (width > 0) {
+ rowSize = width;
+ } else {
+ rowSize = -1;
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ if (width > 0 && width <= INT_MAX / 3) {
+ rowSize = width * 3;
+ } else {
+ rowSize = -1;
+ }
+ break;
+ case splashModeXBGR8:
+ if (width > 0 && width <= INT_MAX / 4) {
+ rowSize = width * 4;
+ } else {
+ rowSize = -1;
+ }
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ if (width > 0 && width <= INT_MAX / 4) {
+ rowSize = width * 4;
+ } else {
+ rowSize = -1;
+ }
+ break;
+#endif
+ }
+ if (rowSize > 0) {
+ rowSize += rowPad - 1;
+ rowSize -= rowSize % rowPad;
+ }
+ data = (SplashColorPtr)gmallocn(rowSize, height);
+ if (!topDown) {
+ data += (height - 1) * rowSize;
+ rowSize = -rowSize;
+ }
+ if (alphaA) {
+ alpha = (Guchar *)gmallocn(width, height);
+ } else {
+ alpha = NULL;
+ }
+}
+
+
+SplashBitmap::~SplashBitmap() {
+ if (rowSize < 0) {
+ gfree(data + (height - 1) * rowSize);
+ } else {
+ gfree(data);
+ }
+ gfree(alpha);
+}
+
+
+SplashError SplashBitmap::writePNMFile(char *fileName) {
+ FILE *f;
+ SplashError e;
+
+ if (!(f = fopen(fileName, "wb"))) {
+ return splashErrOpenFile;
+ }
+
+ e = this->writePNMFile(f);
+
+ fclose(f);
+ return e;
+}
+
+
+SplashError SplashBitmap::writePNMFile(FILE *f) {
+ SplashColorPtr row, p;
+ int x, y;
+
+ switch (mode) {
+
+ case splashModeMono1:
+ fprintf(f, "P4\n%d %d\n", width, height);
+ row = data;
+ for (y = 0; y < height; ++y) {
+ p = row;
+ for (x = 0; x < width; x += 8) {
+ fputc(*p ^ 0xff, f);
+ ++p;
+ }
+ row += rowSize;
+ }
+ break;
+
+ case splashModeMono8:
+ fprintf(f, "P5\n%d %d\n255\n", width, height);
+ row = data;
+ for (y = 0; y < height; ++y) {
+ p = row;
+ for (x = 0; x < width; ++x) {
+ fputc(*p, f);
+ ++p;
+ }
+ row += rowSize;
+ }
+ break;
+
+ case splashModeRGB8:
+ fprintf(f, "P6\n%d %d\n255\n", width, height);
+ row = data;
+ for (y = 0; y < height; ++y) {
+ p = row;
+ for (x = 0; x < width; ++x) {
+ fputc(splashRGB8R(p), f);
+ fputc(splashRGB8G(p), f);
+ fputc(splashRGB8B(p), f);
+ p += 3;
+ }
+ row += rowSize;
+ }
+ break;
+
+ case splashModeXBGR8:
+ fprintf(f, "P6\n%d %d\n255\n", width, height);
+ row = data;
+ for (y = 0; y < height; ++y) {
+ p = row;
+ for (x = 0; x < width; ++x) {
+ fputc(splashBGR8R(p), f);
+ fputc(splashBGR8G(p), f);
+ fputc(splashBGR8B(p), f);
+ p += 4;
+ }
+ row += rowSize;
+ }
+ break;
+
+
+ case splashModeBGR8:
+ fprintf(f, "P6\n%d %d\n255\n", width, height);
+ row = data;
+ for (y = 0; y < height; ++y) {
+ p = row;
+ for (x = 0; x < width; ++x) {
+ fputc(splashBGR8R(p), f);
+ fputc(splashBGR8G(p), f);
+ fputc(splashBGR8B(p), f);
+ p += 3;
+ }
+ row += rowSize;
+ }
+ break;
+
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ // PNM doesn't support CMYK
+ error(-1, "unsupported SplashBitmap mode");
+ return splashErrGeneric;
+ break;
+#endif
+ }
+ return splashOk;
+}
+
+
+void SplashBitmap::getPixel(int x, int y, SplashColorPtr pixel) {
+ SplashColorPtr p;
+
+ if (y < 0 || y >= height || x < 0 || x >= width) {
+ return;
+ }
+ switch (mode) {
+ case splashModeMono1:
+ p = &data[y * rowSize + (x >> 3)];
+ pixel[0] = (p[0] & (0x80 >> (x & 7))) ? 0xff : 0x00;
+ break;
+ case splashModeMono8:
+ p = &data[y * rowSize + x];
+ pixel[0] = p[0];
+ break;
+ case splashModeRGB8:
+ p = &data[y * rowSize + 3 * x];
+ pixel[0] = p[0];
+ pixel[1] = p[1];
+ pixel[2] = p[2];
+ break;
+ case splashModeXBGR8:
+ p = &data[y * rowSize + 4 * x];
+ pixel[0] = p[2];
+ pixel[1] = p[1];
+ pixel[2] = p[0];
+ pixel[3] = p[3];
+ break;
+ case splashModeBGR8:
+ p = &data[y * rowSize + 3 * x];
+ pixel[0] = p[2];
+ pixel[1] = p[1];
+ pixel[2] = p[0];
+ break;
+#if SPLASH_CMYK
+ case splashModeCMYK8:
+ p = &data[y * rowSize + 4 * x];
+ pixel[0] = p[0];
+ pixel[1] = p[1];
+ pixel[2] = p[2];
+ pixel[3] = p[3];
+ break;
+#endif
+ }
+}
+
+Guchar SplashBitmap::getAlpha(int x, int y) {
+ return alpha[y * width + x];
+}
+
+SplashError SplashBitmap::writePNGFile(char *fileName) {
+ FILE *f;
+ SplashError e;
+
+ if (!(f = fopen(fileName, "wb"))) {
+ return splashErrOpenFile;
+ }
+
+ e = writePNGFile(f);
+
+ fclose(f);
+ return e;
+}
+
+SplashError SplashBitmap::writePNGFile(FILE *f) {
+#ifndef ENABLE_LIBPNG
+ error(-1, "PNG support not compiled in");
+ return splashErrGeneric;
+#else
+ if (mode != splashModeRGB8 && mode != splashModeMono8 && mode != splashModeMono1) {
+ error(-1, "unsupported SplashBitmap mode");
+ return splashErrGeneric;
+ }
+
+ PNGWriter *writer = new PNGWriter();
+ if (!writer->init(f, width, height)) {
+ delete writer;
+ return splashErrGeneric;
+ }
+
+ switch (mode) {
+ case splashModeRGB8:
+ {
+ SplashColorPtr row;
+ png_bytep *row_pointers = new png_bytep[height];
+ row = data;
+
+ for (int y = 0; y < height; ++y) {
+ row_pointers[y] = row;
+ row += rowSize;
+ }
+ if (!writer->writePointers(row_pointers)) {
+ delete[] row_pointers;
+ delete writer;
+ return splashErrGeneric;
+ }
+ delete[] row_pointers;
+ }
+ break;
+
+ case splashModeMono8:
+ {
+ png_byte *row = new png_byte[3 * width];
+ for (int y = 0; y < height; y++) {
+ // Convert into a PNG row
+ for (int x = 0; x < width; x++) {
+ row[3*x] = data[y * rowSize + x];
+ row[3*x+1] = data[y * rowSize + x];
+ row[3*x+2] = data[y * rowSize + x];
+ }
+
+ if (!writer->writeRow(&row)) {
+ delete[] row;
+ delete writer;
+ return splashErrGeneric;
+ }
+ }
+ delete[] row;
+ }
+ break;
+
+ case splashModeMono1:
+ {
+ png_byte *row = new png_byte[3 * width];
+ for (int y = 0; y < height; y++) {
+ // Convert into a PNG row
+ for (int x = 0; x < width; x++) {
+ getPixel(x, y, &row[3*x]);
+ row[3*x+1] = row[3*x];
+ row[3*x+2] = row[3*x];
+ }
+
+ if (!writer->writeRow(&row)) {
+ delete[] row;
+ delete writer;
+ return splashErrGeneric;
+ }
+ }
+ delete[] row;
+ }
+ break;
+
+ default:
+ // can't happen
+ break;
+ }
+
+ if (writer->close()) {
+ delete writer;
+ return splashErrGeneric;
+ }
+
+ delete writer;
+
+ return splashOk;
+#endif
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.h
new file mode 100644
index 00000000000..50857632b17
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashBitmap.h
@@ -0,0 +1,80 @@
+//========================================================================
+//
+// SplashBitmap.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
+// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHBITMAP_H
+#define SPLASHBITMAP_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+#include <stdio.h>
+
+//------------------------------------------------------------------------
+// SplashBitmap
+//------------------------------------------------------------------------
+
+class SplashBitmap {
+public:
+
+ // Create a new bitmap. It will have <widthA> x <heightA> pixels in
+ // color mode <modeA>. Rows will be padded out to a multiple of
+ // <rowPad> bytes. If <topDown> is false, the bitmap will be stored
+ // upside-down, i.e., with the last row first in memory.
+ SplashBitmap(int widthA, int heightA, int rowPad,
+ SplashColorMode modeA, GBool alphaA,
+ GBool topDown = gTrue);
+
+ ~SplashBitmap();
+
+ int getWidth() { return width; }
+ int getHeight() { return height; }
+ int getRowSize() { return rowSize; }
+ int getAlphaRowSize() { return width; }
+ SplashColorMode getMode() { return mode; }
+ SplashColorPtr getDataPtr() { return data; }
+ Guchar *getAlphaPtr() { return alpha; }
+
+ SplashError writePNMFile(char *fileName);
+ SplashError writePNMFile(FILE *f);
+
+ SplashError writePNGFile(char *fileName);
+ SplashError writePNGFile(FILE *f);
+
+ void getPixel(int x, int y, SplashColorPtr pixel);
+ Guchar getAlpha(int x, int y);
+
+private:
+
+ int width, height; // size of bitmap
+ int rowSize; // size of one row of data, in bytes
+ // - negative for bottom-up bitmaps
+ SplashColorMode mode; // color mode
+ SplashColorPtr data; // pointer to row zero of the color data
+ Guchar *alpha; // pointer to row zero of the alpha data
+ // (always top-down)
+
+ friend class Splash;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.cc
new file mode 100644
index 00000000000..87b0d7ef56b
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.cc
@@ -0,0 +1,382 @@
+//========================================================================
+//
+// SplashClip.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashErrorCodes.h"
+#include "SplashPath.h"
+#include "SplashXPath.h"
+#include "SplashXPathScanner.h"
+#include "SplashBitmap.h"
+#include "SplashClip.h"
+
+//------------------------------------------------------------------------
+// SplashClip.flags
+//------------------------------------------------------------------------
+
+#define splashClipEO 0x01 // use even-odd rule
+
+//------------------------------------------------------------------------
+// SplashClip
+//------------------------------------------------------------------------
+
+SplashClip::SplashClip(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ GBool antialiasA) {
+ antialias = antialiasA;
+ if (x0 < x1) {
+ xMin = x0;
+ xMax = x1;
+ } else {
+ xMin = x1;
+ xMax = x0;
+ }
+ if (y0 < y1) {
+ yMin = y0;
+ yMax = y1;
+ } else {
+ yMin = y1;
+ yMax = y0;
+ }
+ xMinI = splashFloor(xMin);
+ yMinI = splashFloor(yMin);
+ xMaxI = splashFloor(xMax);
+ yMaxI = splashFloor(yMax);
+ paths = NULL;
+ flags = NULL;
+ scanners = NULL;
+ length = size = 0;
+}
+
+SplashClip::SplashClip(SplashClip *clip) {
+ int i;
+
+ antialias = clip->antialias;
+ xMin = clip->xMin;
+ yMin = clip->yMin;
+ xMax = clip->xMax;
+ yMax = clip->yMax;
+ xMinI = clip->xMinI;
+ yMinI = clip->yMinI;
+ xMaxI = clip->xMaxI;
+ yMaxI = clip->yMaxI;
+ length = clip->length;
+ size = clip->size;
+ paths = (SplashXPath **)gmallocn(size, sizeof(SplashXPath *));
+ flags = (Guchar *)gmallocn(size, sizeof(Guchar));
+ scanners = (SplashXPathScanner **)
+ gmallocn(size, sizeof(SplashXPathScanner *));
+ for (i = 0; i < length; ++i) {
+ paths[i] = clip->paths[i]->copy();
+ flags[i] = clip->flags[i];
+ scanners[i] = new SplashXPathScanner(paths[i], flags[i] & splashClipEO);
+ }
+}
+
+SplashClip::~SplashClip() {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ delete paths[i];
+ delete scanners[i];
+ }
+ gfree(paths);
+ gfree(flags);
+ gfree(scanners);
+}
+
+void SplashClip::grow(int nPaths) {
+ if (length + nPaths > size) {
+ if (size == 0) {
+ size = 32;
+ }
+ while (size < length + nPaths) {
+ size *= 2;
+ }
+ paths = (SplashXPath **)greallocn(paths, size, sizeof(SplashXPath *));
+ flags = (Guchar *)greallocn(flags, size, sizeof(Guchar));
+ scanners = (SplashXPathScanner **)
+ greallocn(scanners, size, sizeof(SplashXPathScanner *));
+ }
+}
+
+void SplashClip::resetToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1) {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ delete paths[i];
+ delete scanners[i];
+ }
+ gfree(paths);
+ gfree(flags);
+ gfree(scanners);
+ paths = NULL;
+ flags = NULL;
+ scanners = NULL;
+ length = size = 0;
+
+ if (x0 < x1) {
+ xMin = x0;
+ xMax = x1;
+ } else {
+ xMin = x1;
+ xMax = x0;
+ }
+ if (y0 < y1) {
+ yMin = y0;
+ yMax = y1;
+ } else {
+ yMin = y1;
+ yMax = y0;
+ }
+ xMinI = splashFloor(xMin);
+ yMinI = splashFloor(yMin);
+ xMaxI = splashFloor(xMax);
+ yMaxI = splashFloor(yMax);
+}
+
+SplashError SplashClip::clipToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1) {
+ if (x0 < x1) {
+ if (x0 > xMin) {
+ xMin = x0;
+ xMinI = splashFloor(xMin);
+ }
+ if (x1 < xMax) {
+ xMax = x1;
+ xMaxI = splashFloor(xMax);
+ }
+ } else {
+ if (x1 > xMin) {
+ xMin = x1;
+ xMinI = splashFloor(xMin);
+ }
+ if (x0 < xMax) {
+ xMax = x0;
+ xMaxI = splashFloor(xMax);
+ }
+ }
+ if (y0 < y1) {
+ if (y0 > yMin) {
+ yMin = y0;
+ yMinI = splashFloor(yMin);
+ }
+ if (y1 < yMax) {
+ yMax = y1;
+ yMaxI = splashFloor(yMax);
+ }
+ } else {
+ if (y1 > yMin) {
+ yMin = y1;
+ yMinI = splashFloor(yMin);
+ }
+ if (y0 < yMax) {
+ yMax = y0;
+ yMaxI = splashFloor(yMax);
+ }
+ }
+ return splashOk;
+}
+
+SplashError SplashClip::clipToPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness, GBool eo) {
+ SplashXPath *xPath;
+
+ xPath = new SplashXPath(path, matrix, flatness, gTrue);
+
+ // check for an empty path
+ if (xPath->length == 0) {
+ xMax = xMin - 1;
+ yMax = yMin - 1;
+ xMaxI = splashFloor(xMax);
+ yMaxI = splashFloor(yMax);
+ delete xPath;
+
+ // check for a rectangle
+ } else if (xPath->length == 4 &&
+ ((xPath->segs[0].x0 == xPath->segs[0].x1 &&
+ xPath->segs[0].x0 == xPath->segs[1].x0 &&
+ xPath->segs[0].x0 == xPath->segs[3].x1 &&
+ xPath->segs[2].x0 == xPath->segs[2].x1 &&
+ xPath->segs[2].x0 == xPath->segs[1].x1 &&
+ xPath->segs[2].x0 == xPath->segs[3].x0 &&
+ xPath->segs[1].y0 == xPath->segs[1].y1 &&
+ xPath->segs[1].y0 == xPath->segs[0].y1 &&
+ xPath->segs[1].y0 == xPath->segs[2].y0 &&
+ xPath->segs[3].y0 == xPath->segs[3].y1 &&
+ xPath->segs[3].y0 == xPath->segs[0].y0 &&
+ xPath->segs[3].y0 == xPath->segs[2].y1) ||
+ (xPath->segs[0].y0 == xPath->segs[0].y1 &&
+ xPath->segs[0].y0 == xPath->segs[1].y0 &&
+ xPath->segs[0].y0 == xPath->segs[3].y1 &&
+ xPath->segs[2].y0 == xPath->segs[2].y1 &&
+ xPath->segs[2].y0 == xPath->segs[1].y1 &&
+ xPath->segs[2].y0 == xPath->segs[3].y0 &&
+ xPath->segs[1].x0 == xPath->segs[1].x1 &&
+ xPath->segs[1].x0 == xPath->segs[0].x1 &&
+ xPath->segs[1].x0 == xPath->segs[2].x0 &&
+ xPath->segs[3].x0 == xPath->segs[3].x1 &&
+ xPath->segs[3].x0 == xPath->segs[0].x0 &&
+ xPath->segs[3].x0 == xPath->segs[2].x1))) {
+ clipToRect(xPath->segs[0].x0, xPath->segs[0].y0,
+ xPath->segs[2].x0, xPath->segs[2].y0);
+ delete xPath;
+
+ } else {
+ grow(1);
+ if (antialias) {
+ xPath->aaScale();
+ }
+ xPath->sort();
+ paths[length] = xPath;
+ flags[length] = eo ? splashClipEO : 0;
+ scanners[length] = new SplashXPathScanner(xPath, eo);
+ ++length;
+ }
+
+ return splashOk;
+}
+
+GBool SplashClip::test(int x, int y) {
+ int i;
+
+ // check the rectangle
+ if (x < xMinI || x > xMaxI || y < yMinI || y > yMaxI) {
+ return gFalse;
+ }
+
+ // check the paths
+ if (antialias) {
+ for (i = 0; i < length; ++i) {
+ if (!scanners[i]->test(x * splashAASize, y * splashAASize)) {
+ return gFalse;
+ }
+ }
+ } else {
+ for (i = 0; i < length; ++i) {
+ if (!scanners[i]->test(x, y)) {
+ return gFalse;
+ }
+ }
+ }
+
+ return gTrue;
+}
+
+SplashClipResult SplashClip::testRect(int rectXMin, int rectYMin,
+ int rectXMax, int rectYMax) {
+ // This tests the rectangle:
+ // x = [rectXMin, rectXMax + 1) (note: rect coords are ints)
+ // y = [rectYMin, rectYMax + 1)
+ // against the clipping region:
+ // x = [xMin, xMax] (note: clipping coords are fp)
+ // y = [yMin, yMax]
+ if ((SplashCoord)(rectXMax + 1) <= xMin || (SplashCoord)rectXMin > xMax ||
+ (SplashCoord)(rectYMax + 1) <= yMin || (SplashCoord)rectYMin > yMax) {
+ return splashClipAllOutside;
+ }
+ if ((SplashCoord)rectXMin >= xMin && (SplashCoord)(rectXMax + 1) <= xMax &&
+ (SplashCoord)rectYMin >= yMin && (SplashCoord)(rectYMax + 1) <= yMax &&
+ length == 0) {
+ return splashClipAllInside;
+ }
+ return splashClipPartial;
+}
+
+SplashClipResult SplashClip::testSpan(int spanXMin, int spanXMax, int spanY) {
+ int i;
+
+ // This tests the rectangle:
+ // x = [spanXMin, spanXMax + 1) (note: span coords are ints)
+ // y = [spanY, spanY + 1)
+ // against the clipping region:
+ // x = [xMin, xMax] (note: clipping coords are fp)
+ // y = [yMin, yMax]
+ if ((SplashCoord)(spanXMax + 1) <= xMin || (SplashCoord)spanXMin > xMax ||
+ (SplashCoord)(spanY + 1) <= yMin || (SplashCoord)spanY > yMax) {
+ return splashClipAllOutside;
+ }
+ if (!((SplashCoord)spanXMin >= xMin && (SplashCoord)(spanXMax + 1) <= xMax &&
+ (SplashCoord)spanY >= yMin && (SplashCoord)(spanY + 1) <= yMax)) {
+ return splashClipPartial;
+ }
+ if (antialias) {
+ for (i = 0; i < length; ++i) {
+ if (!scanners[i]->testSpan(spanXMin * splashAASize,
+ spanXMax * splashAASize + (splashAASize - 1),
+ spanY * splashAASize)) {
+ return splashClipPartial;
+ }
+ }
+ } else {
+ for (i = 0; i < length; ++i) {
+ if (!scanners[i]->testSpan(spanXMin, spanXMax, spanY)) {
+ return splashClipPartial;
+ }
+ }
+ }
+ return splashClipAllInside;
+}
+
+void SplashClip::clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y) {
+ int xx0, xx1, xx, yy, i;
+ SplashColorPtr p;
+
+ // zero out pixels with x < xMin
+ xx0 = *x0 * splashAASize;
+ xx1 = splashFloor(xMin * splashAASize);
+ if (xx1 > aaBuf->getWidth()) {
+ xx1 = aaBuf->getWidth();
+ }
+ if (xx0 < xx1) {
+ xx0 &= ~7;
+ for (yy = 0; yy < splashAASize; ++yy) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx0 >> 3);
+ for (xx = xx0; xx + 7 < xx1; xx += 8) {
+ *p++ = 0;
+ }
+ if (xx < xx1) {
+ *p &= 0xff >> (xx1 & 7);
+ }
+ }
+ *x0 = splashFloor(xMin);
+ }
+
+ // zero out pixels with x > xMax
+ xx0 = splashFloor(xMax * splashAASize) + 1;
+ if (xx0 < 0) {
+ xx0 = 0;
+ }
+ xx1 = (*x1 + 1) * splashAASize;
+ if (xx0 < xx1) {
+ for (yy = 0; yy < splashAASize; ++yy) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx0 >> 3);
+ xx = xx0;
+ if (xx & 7) {
+ *p &= 0xff00 >> (xx & 7);
+ xx = (xx & ~7) + 8;
+ ++p;
+ }
+ for (; xx < xx1; xx += 8) {
+ *p++ = 0;
+ }
+ }
+ *x1 = splashFloor(xMax);
+ }
+
+ // check the paths
+ for (i = 0; i < length; ++i) {
+ scanners[i]->clipAALine(aaBuf, x0, x1, y);
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.h
new file mode 100644
index 00000000000..1864149234a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashClip.h
@@ -0,0 +1,105 @@
+//========================================================================
+//
+// SplashClip.h
+//
+//========================================================================
+
+#ifndef SPLASHCLIP_H
+#define SPLASHCLIP_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+#include "SplashMath.h"
+
+class SplashPath;
+class SplashXPath;
+class SplashXPathScanner;
+class SplashBitmap;
+
+//------------------------------------------------------------------------
+
+enum SplashClipResult {
+ splashClipAllInside,
+ splashClipAllOutside,
+ splashClipPartial
+};
+
+//------------------------------------------------------------------------
+// SplashClip
+//------------------------------------------------------------------------
+
+class SplashClip {
+public:
+
+ // Create a clip, for the given rectangle.
+ SplashClip(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ GBool antialiasA);
+
+ // Copy a clip.
+ SplashClip *copy() { return new SplashClip(this); }
+
+ ~SplashClip();
+
+ // Reset the clip to a rectangle.
+ void resetToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1);
+
+ // Intersect the clip with a rectangle.
+ SplashError clipToRect(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1);
+
+ // Interesect the clip with <path>.
+ SplashError clipToPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness, GBool eo);
+
+ // Returns true if (<x>,<y>) is inside the clip.
+ GBool test(int x, int y);
+
+ // Tests a rectangle against the clipping region. Returns one of:
+ // - splashClipAllInside if the entire rectangle is inside the
+ // clipping region, i.e., all pixels in the rectangle are
+ // visible
+ // - splashClipAllOutside if the entire rectangle is outside the
+ // clipping region, i.e., all the pixels in the rectangle are
+ // clipped
+ // - splashClipPartial if the rectangle is part inside and part
+ // outside the clipping region
+ SplashClipResult testRect(int rectXMin, int rectYMin,
+ int rectXMax, int rectYMax);
+
+ // Similar to testRect, but tests a horizontal span.
+ SplashClipResult testSpan(int spanXMin, int spanXMax, int spanY);
+
+ // Clips an anti-aliased line by setting pixels to zero. On entry,
+ // all non-zero pixels are between <x0> and <x1>. This function
+ // will update <x0> and <x1>.
+ void clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y);
+
+ // Get the rectangle part of the clip region, in integer coordinates.
+ int getXMinI() { return xMinI; }
+ int getXMaxI() { return xMaxI; }
+ int getYMinI() { return yMinI; }
+ int getYMaxI() { return yMaxI; }
+
+ // Get the number of arbitrary paths used by the clip region.
+ int getNumPaths() { return length; }
+
+protected:
+
+ SplashClip(SplashClip *clip);
+ void grow(int nPaths);
+
+ GBool antialias;
+ SplashCoord xMin, yMin, xMax, yMax;
+ int xMinI, yMinI, xMaxI, yMaxI;
+ SplashXPath **paths;
+ Guchar *flags;
+ SplashXPathScanner **scanners;
+ int length, size;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashErrorCodes.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashErrorCodes.h
new file mode 100644
index 00000000000..d1f81f85dd8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashErrorCodes.h
@@ -0,0 +1,50 @@
+//========================================================================
+//
+// SplashErrorCodes.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHERRORCODES_H
+#define SPLASHERRORCODES_H
+
+//------------------------------------------------------------------------
+
+#define splashOk 0 // no error
+
+#define splashErrNoCurPt 1 // no current point
+
+#define splashErrEmptyPath 2 // zero points in path
+
+#define splashErrBogusPath 3 // only one point in subpath
+
+#define splashErrNoSave 4 // state stack is empty
+
+#define splashErrOpenFile 5 // couldn't open file
+
+#define splashErrNoGlyph 6 // couldn't get the requested glyph
+
+#define splashErrModeMismatch 7 // invalid combination of color modes
+
+#define splashErrSingularMatrix 8 // matrix is singular
+
+#define splashErrBadArg 9 // bad argument
+
+#define splashErrZeroImage 254 // image of 0x0
+
+#define splashErrGeneric 255
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.cc
new file mode 100644
index 00000000000..9dd0c9cc73d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.cc
@@ -0,0 +1,428 @@
+//========================================================================
+//
+// SplashFTFont.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Kristian Høgsberg <krh@bitplanet.net>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <ft2build.h>
+#include FT_OUTLINE_H
+#include FT_SIZES_H
+#include FT_GLYPH_H
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashGlyphBitmap.h"
+#include "SplashPath.h"
+#include "SplashFTFontEngine.h"
+#include "SplashFTFontFile.h"
+#include "SplashFTFont.h"
+
+//------------------------------------------------------------------------
+
+static int glyphPathMoveTo(const FT_Vector *pt, void *path);
+static int glyphPathLineTo(const FT_Vector *pt, void *path);
+static int glyphPathConicTo(const FT_Vector *ctrl, const FT_Vector *pt,
+ void *path);
+static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
+ const FT_Vector *pt, void *path);
+
+//------------------------------------------------------------------------
+// SplashFTFont
+//------------------------------------------------------------------------
+
+SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA):
+ SplashFont(fontFileA, matA, textMatA, fontFileA->engine->aa),
+ enableFreeTypeHinting(fontFileA->engine->enableFreeTypeHinting)
+{
+ FT_Face face;
+ double div;
+ int x, y;
+
+ face = fontFileA->face;
+ if (FT_New_Size(face, &sizeObj)) {
+ return;
+ }
+ face->size = sizeObj;
+ size = splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]);
+ if (FT_Set_Pixel_Sizes(face, 0, (int)size)) {
+ return;
+ }
+ // if the textMat values are too small, FreeType's fixed point
+ // arithmetic doesn't work so well
+ textScale = splashSqrt(textMat[2]*textMat[2] + textMat[3]*textMat[3]) / size;
+
+ div = face->bbox.xMax > 20000 ? 65536 : 1;
+
+ // transform the four corners of the font bounding box -- the min
+ // and max values form the bounding box of the transformed font
+ x = (int)((mat[0] * face->bbox.xMin + mat[2] * face->bbox.yMin) /
+ (div * face->units_per_EM));
+ xMin = xMax = x;
+ y = (int)((mat[1] * face->bbox.xMin + mat[3] * face->bbox.yMin) /
+ (div * face->units_per_EM));
+ yMin = yMax = y;
+ x = (int)((mat[0] * face->bbox.xMin + mat[2] * face->bbox.yMax) /
+ (div * face->units_per_EM));
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)((mat[1] * face->bbox.xMin + mat[3] * face->bbox.yMax) /
+ (div * face->units_per_EM));
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ x = (int)((mat[0] * face->bbox.xMax + mat[2] * face->bbox.yMin) /
+ (div * face->units_per_EM));
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)((mat[1] * face->bbox.xMax + mat[3] * face->bbox.yMin) /
+ (div * face->units_per_EM));
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ x = (int)((mat[0] * face->bbox.xMax + mat[2] * face->bbox.yMax) /
+ (div * face->units_per_EM));
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)((mat[1] * face->bbox.xMax + mat[3] * face->bbox.yMax) /
+ (div * face->units_per_EM));
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ // This is a kludge: some buggy PDF generators embed fonts with
+ // zero bounding boxes.
+ if (xMax == xMin) {
+ xMin = 0;
+ xMax = (int)size;
+ }
+ if (yMax == yMin) {
+ yMin = 0;
+ yMax = (int)((SplashCoord)1.2 * size);
+ }
+
+ // compute the transform matrix
+#if USE_FIXEDPOINT
+ matrix.xx = (FT_Fixed)((mat[0] / size).getRaw());
+ matrix.yx = (FT_Fixed)((mat[1] / size).getRaw());
+ matrix.xy = (FT_Fixed)((mat[2] / size).getRaw());
+ matrix.yy = (FT_Fixed)((mat[3] / size).getRaw());
+ textMatrix.xx = (FT_Fixed)((textMat[0] / (textScale * size)).getRaw());
+ textMatrix.yx = (FT_Fixed)((textMat[1] / (textScale * size)).getRaw());
+ textMatrix.xy = (FT_Fixed)((textMat[2] / (textScale * size)).getRaw());
+ textMatrix.yy = (FT_Fixed)((textMat[3] / (textScale * size)).getRaw());
+#else
+ matrix.xx = (FT_Fixed)((mat[0] / size) * 65536);
+ matrix.yx = (FT_Fixed)((mat[1] / size) * 65536);
+ matrix.xy = (FT_Fixed)((mat[2] / size) * 65536);
+ matrix.yy = (FT_Fixed)((mat[3] / size) * 65536);
+ textMatrix.xx = (FT_Fixed)((textMat[0] / (size * textScale)) * 65536);
+ textMatrix.yx = (FT_Fixed)((textMat[1] / (size * textScale)) * 65536);
+ textMatrix.xy = (FT_Fixed)((textMat[2] / (size * textScale)) * 65536);
+ textMatrix.yy = (FT_Fixed)((textMat[3] / (size * textScale)) * 65536);
+#endif
+}
+
+SplashFTFont::~SplashFTFont() {
+}
+
+GBool SplashFTFont::getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) {
+ return SplashFont::getGlyph(c, xFrac, 0, bitmap, x0, y0, clip, clipRes);
+}
+
+static FT_Int32 getFTLoadFlags(GBool aa, GBool enableFreeTypeHinting)
+{
+ if (aa && enableFreeTypeHinting) return FT_LOAD_NO_BITMAP;
+ else if (aa && !enableFreeTypeHinting) return FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
+ else if (!aa && enableFreeTypeHinting) return FT_LOAD_DEFAULT;
+ else return FT_LOAD_NO_HINTING;
+}
+
+GBool SplashFTFont::makeGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) {
+ SplashFTFontFile *ff;
+ FT_Vector offset;
+ FT_GlyphSlot slot;
+ FT_UInt gid;
+ int rowSize;
+ Guchar *p, *q;
+ int i;
+
+ ff = (SplashFTFontFile *)fontFile;
+
+ ff->face->size = sizeObj;
+ offset.x = (FT_Pos)(int)((SplashCoord)xFrac * splashFontFractionMul * 64);
+ offset.y = 0;
+ FT_Set_Transform(ff->face, &matrix, &offset);
+ slot = ff->face->glyph;
+
+ if (ff->codeToGID && c < ff->codeToGIDLen) {
+ gid = (FT_UInt)ff->codeToGID[c];
+ } else {
+ gid = (FT_UInt)c;
+ }
+ if (ff->trueType && gid == 0) {
+ // skip the TrueType notdef glyph
+ return gFalse;
+ }
+
+ if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting))) {
+ return gFalse;
+ }
+
+ FT_Glyph_Metrics *glyphMetrics = &(ff->face->glyph->metrics);
+ // prelimirary values from FT_Glyph_Metrics
+ bitmap->x = splashRound(-glyphMetrics->horiBearingX / 64.0);
+ bitmap->y = splashRound(glyphMetrics->horiBearingY / 64.0);
+ bitmap->w = splashRound(glyphMetrics->width / 64.0);
+ bitmap->h = splashRound(glyphMetrics->height / 64.0);
+
+ *clipRes = clip->testRect(x0 - bitmap->x,
+ y0 - bitmap->y,
+ x0 - bitmap->x + bitmap->w,
+ y0 - bitmap->y + bitmap->h);
+ if (*clipRes == splashClipAllOutside) {
+ bitmap->freeData = gFalse;
+ return gTrue;
+ }
+
+ if (FT_Render_Glyph(slot, aa ? ft_render_mode_normal
+ : ft_render_mode_mono)) {
+ return gFalse;
+ }
+
+ bitmap->x = -slot->bitmap_left;
+ bitmap->y = slot->bitmap_top;
+ bitmap->w = slot->bitmap.width;
+ bitmap->h = slot->bitmap.rows;
+ bitmap->aa = aa;
+ if (aa) {
+ rowSize = bitmap->w;
+ } else {
+ rowSize = (bitmap->w + 7) >> 3;
+ }
+ bitmap->data = (Guchar *)gmallocn_checkoverflow(rowSize, bitmap->h);
+ if (!bitmap->data) {
+ return gFalse;
+ }
+ bitmap->freeData = gTrue;
+ for (i = 0, p = bitmap->data, q = slot->bitmap.buffer;
+ i < bitmap->h;
+ ++i, p += rowSize, q += slot->bitmap.pitch) {
+ memcpy(p, q, rowSize);
+ }
+
+ return gTrue;
+}
+
+double SplashFTFont::getGlyphAdvance(int c)
+{
+ SplashFTFontFile *ff;
+ FT_Vector offset;
+ FT_UInt gid;
+ FT_Matrix identityMatrix;
+
+ ff = (SplashFTFontFile *)fontFile;
+
+ // init the matrix
+ identityMatrix.xx = 65536; // 1 in 16.16 format
+ identityMatrix.xy = 0;
+ identityMatrix.yx = 0;
+ identityMatrix.yy = 65536; // 1 in 16.16 format
+
+ // init the offset
+ offset.x = 0;
+ offset.y = 0;
+
+ ff->face->size = sizeObj;
+ FT_Set_Transform(ff->face, &identityMatrix, &offset);
+
+ if (ff->codeToGID && c < ff->codeToGIDLen) {
+ gid = (FT_UInt)ff->codeToGID[c];
+ } else {
+ gid = (FT_UInt)c;
+ }
+ if (ff->trueType && gid == 0) {
+ // skip the TrueType notdef glyph
+ return -1;
+ }
+
+ if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting))) {
+ return -1;
+ }
+
+ // 64.0 is 1 in 26.6 format
+ return ff->face->glyph->metrics.horiAdvance / 64.0 / size;
+}
+
+struct SplashFTFontPath {
+ SplashPath *path;
+ SplashCoord textScale;
+ GBool needClose;
+};
+
+SplashPath *SplashFTFont::getGlyphPath(int c) {
+ static FT_Outline_Funcs outlineFuncs = {
+#if FREETYPE_MINOR <= 1
+ (int (*)(FT_Vector *, void *))&glyphPathMoveTo,
+ (int (*)(FT_Vector *, void *))&glyphPathLineTo,
+ (int (*)(FT_Vector *, FT_Vector *, void *))&glyphPathConicTo,
+ (int (*)(FT_Vector *, FT_Vector *, FT_Vector *, void *))&glyphPathCubicTo,
+#else
+ &glyphPathMoveTo,
+ &glyphPathLineTo,
+ &glyphPathConicTo,
+ &glyphPathCubicTo,
+#endif
+ 0, 0
+ };
+ SplashFTFontFile *ff;
+ SplashFTFontPath path;
+ FT_GlyphSlot slot;
+ FT_UInt gid;
+ FT_Glyph glyph;
+
+ ff = (SplashFTFontFile *)fontFile;
+ ff->face->size = sizeObj;
+ FT_Set_Transform(ff->face, &textMatrix, NULL);
+ slot = ff->face->glyph;
+ if (ff->codeToGID && c < ff->codeToGIDLen) {
+ gid = ff->codeToGID[c];
+ } else {
+ gid = (FT_UInt)c;
+ }
+ if (ff->trueType && gid == 0) {
+ // skip the TrueType notdef glyph
+ return NULL;
+ }
+ if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting))) {
+ return NULL;
+ }
+ if (FT_Get_Glyph(slot, &glyph)) {
+ return NULL;
+ }
+ path.path = new SplashPath();
+ path.textScale = textScale;
+ path.needClose = gFalse;
+ FT_Outline_Decompose(&((FT_OutlineGlyph)glyph)->outline,
+ &outlineFuncs, &path);
+ if (path.needClose) {
+ path.path->close();
+ }
+ FT_Done_Glyph(glyph);
+ return path.path;
+}
+
+static int glyphPathMoveTo(const FT_Vector *pt, void *path) {
+ SplashFTFontPath *p = (SplashFTFontPath *)path;
+
+ if (p->needClose) {
+ p->path->close();
+ p->needClose = gFalse;
+ }
+ p->path->moveTo((SplashCoord)pt->x * p->textScale / 64.0,
+ (SplashCoord)pt->y * p->textScale / 64.0);
+ return 0;
+}
+
+static int glyphPathLineTo(const FT_Vector *pt, void *path) {
+ SplashFTFontPath *p = (SplashFTFontPath *)path;
+
+ p->path->lineTo((SplashCoord)pt->x * p->textScale / 64.0,
+ (SplashCoord)pt->y * p->textScale / 64.0);
+ p->needClose = gTrue;
+ return 0;
+}
+
+static int glyphPathConicTo(const FT_Vector *ctrl, const FT_Vector *pt,
+ void *path) {
+ SplashFTFontPath *p = (SplashFTFontPath *)path;
+ SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xc, yc;
+
+ if (!p->path->getCurPt(&x0, &y0)) {
+ return 0;
+ }
+ xc = (SplashCoord)ctrl->x * p->textScale / 64.0;
+ yc = (SplashCoord)ctrl->y * p->textScale / 64.0;
+ x3 = (SplashCoord)pt->x * p->textScale / 64.0;
+ y3 = (SplashCoord)pt->y * p->textScale / 64.0;
+
+ // A second-order Bezier curve is defined by two endpoints, p0 and
+ // p3, and one control point, pc:
+ //
+ // p(t) = (1-t)^2*p0 + t*(1-t)*pc + t^2*p3
+ //
+ // A third-order Bezier curve is defined by the same two endpoints,
+ // p0 and p3, and two control points, p1 and p2:
+ //
+ // p(t) = (1-t)^3*p0 + 3t*(1-t)^2*p1 + 3t^2*(1-t)*p2 + t^3*p3
+ //
+ // Applying some algebra, we can convert a second-order curve to a
+ // third-order curve:
+ //
+ // p1 = (1/3) * (p0 + 2pc)
+ // p2 = (1/3) * (2pc + p3)
+
+ x1 = (SplashCoord)(1.0 / 3.0) * (x0 + (SplashCoord)2 * xc);
+ y1 = (SplashCoord)(1.0 / 3.0) * (y0 + (SplashCoord)2 * yc);
+ x2 = (SplashCoord)(1.0 / 3.0) * ((SplashCoord)2 * xc + x3);
+ y2 = (SplashCoord)(1.0 / 3.0) * ((SplashCoord)2 * yc + y3);
+
+ p->path->curveTo(x1, y1, x2, y2, x3, y3);
+ p->needClose = gTrue;
+ return 0;
+}
+
+static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
+ const FT_Vector *pt, void *path) {
+ SplashFTFontPath *p = (SplashFTFontPath *)path;
+
+ p->path->curveTo((SplashCoord)ctrl1->x * p->textScale / 64.0,
+ (SplashCoord)ctrl1->y * p->textScale / 64.0,
+ (SplashCoord)ctrl2->x * p->textScale / 64.0,
+ (SplashCoord)ctrl2->y * p->textScale / 64.0,
+ (SplashCoord)pt->x * p->textScale / 64.0,
+ (SplashCoord)pt->y * p->textScale / 64.0);
+ p->needClose = gTrue;
+ return 0;
+}
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.h
new file mode 100644
index 00000000000..cf825042928
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFont.h
@@ -0,0 +1,76 @@
+//========================================================================
+//
+// SplashFTFont.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFTFONT_H
+#define SPLASHFTFONT_H
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include "SplashFont.h"
+
+class SplashFTFontFile;
+
+//------------------------------------------------------------------------
+// SplashFTFont
+//------------------------------------------------------------------------
+
+class SplashFTFont: public SplashFont {
+public:
+
+ SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA);
+
+ virtual ~SplashFTFont();
+
+ // Munge xFrac and yFrac before calling SplashFont::getGlyph.
+ virtual GBool getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+
+ // Rasterize a glyph. The <xFrac> and <yFrac> values are the same
+ // as described for getGlyph.
+ virtual GBool makeGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+
+ // Return the path for a glyph.
+ virtual SplashPath *getGlyphPath(int c);
+
+ // Return the advance of a glyph. (in 0..1 range)
+ virtual double getGlyphAdvance(int c);
+
+private:
+
+ FT_Size sizeObj;
+ FT_Matrix matrix;
+ FT_Matrix textMatrix;
+ SplashCoord textScale;
+ double size;
+ GBool enableFreeTypeHinting;
+};
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.cc
new file mode 100644
index 00000000000..7cf4f0618a4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.cc
@@ -0,0 +1,213 @@
+//========================================================================
+//
+// SplashFTFontEngine.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "goo/gfile.h"
+#include "fofi/FoFiTrueType.h"
+#include "fofi/FoFiType1C.h"
+#include "SplashFTFontFile.h"
+#include "SplashFTFontEngine.h"
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+//------------------------------------------------------------------------
+
+#if 0
+static void fileWrite(void *stream, char *data, int len) {
+ fwrite(data, 1, len, (FILE *)stream);
+}
+#endif
+
+//------------------------------------------------------------------------
+// SplashFTFontEngine
+//------------------------------------------------------------------------
+
+SplashFTFontEngine::SplashFTFontEngine(GBool aaA, GBool enableFreeTypeHintingA, FT_Library libA) {
+ FT_Int major, minor, patch;
+
+ aa = aaA;
+ enableFreeTypeHinting = enableFreeTypeHintingA;
+ lib = libA;
+
+ // as of FT 2.1.8, CID fonts are indexed by CID instead of GID
+ FT_Library_Version(lib, &major, &minor, &patch);
+ useCIDs = major > 2 ||
+ (major == 2 && (minor > 1 || (minor == 1 && patch > 7)));
+}
+
+SplashFTFontEngine *SplashFTFontEngine::init(GBool aaA, GBool enableFreeTypeHintingA) {
+ FT_Library libA;
+
+ if (FT_Init_FreeType(&libA)) {
+ return NULL;
+ }
+ return new SplashFTFontEngine(aaA, enableFreeTypeHintingA, libA);
+}
+
+SplashFTFontEngine::~SplashFTFontEngine() {
+ FT_Done_FreeType(lib);
+}
+
+SplashFontFile *SplashFTFontEngine::loadType1Font(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ return SplashFTFontFile::loadType1Font(this, idA, src, enc);
+}
+
+SplashFontFile *SplashFTFontEngine::loadType1CFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ return SplashFTFontFile::loadType1Font(this, idA, src, enc);
+}
+
+SplashFontFile *SplashFTFontEngine::loadOpenTypeT1CFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ return SplashFTFontFile::loadType1Font(this, idA, src, enc);
+}
+
+SplashFontFile *SplashFTFontEngine::loadCIDFont(SplashFontFileID *idA,
+ SplashFontSrc *src) {
+ FoFiType1C *ff;
+ Gushort *cidToGIDMap;
+ int nCIDs;
+ SplashFontFile *ret;
+
+ // check for a CFF font
+ if (useCIDs) {
+ cidToGIDMap = NULL;
+ nCIDs = 0;
+ } else {
+ if (src->isFile) {
+ ff = FoFiType1C::load(src->fileName->getCString());
+ } else {
+ ff = FoFiType1C::make(src->buf, src->bufLen);
+ }
+ if (ff) {
+ cidToGIDMap = ff->getCIDToGIDMap(&nCIDs);
+ delete ff;
+ } else {
+ cidToGIDMap = NULL;
+ nCIDs = 0;
+ }
+ }
+ ret = SplashFTFontFile::loadCIDFont(this, idA, src, cidToGIDMap, nCIDs);
+ if (!ret) {
+ gfree(cidToGIDMap);
+ }
+ return ret;
+}
+
+SplashFontFile *SplashFTFontEngine::loadOpenTypeCFFFont(SplashFontFileID *idA,
+ SplashFontSrc *src) {
+ FoFiTrueType *ff;
+ GBool isCID;
+ Gushort *cidToGIDMap;
+ int nCIDs;
+ SplashFontFile *ret;
+
+ cidToGIDMap = NULL;
+ nCIDs = 0;
+ isCID = gFalse;
+ if (!useCIDs) {
+ if (src->isFile) {
+ ff = FoFiTrueType::load(src->fileName->getCString());
+ } else {
+ ff = FoFiTrueType::make(src->buf, src->bufLen);
+ }
+ if (ff) {
+ if (ff->isOpenTypeCFF()) {
+ cidToGIDMap = ff->getCIDToGIDMap(&nCIDs);
+ }
+ delete ff;
+ }
+ }
+ ret = SplashFTFontFile::loadCIDFont(this, idA, src,
+ cidToGIDMap, nCIDs);
+ if (!ret) {
+ gfree(cidToGIDMap);
+ }
+ return ret;
+}
+
+SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ int faceIndex) {
+#if 0
+ FoFiTrueType *ff;
+ GooString *tmpFileName;
+ FILE *tmpFile;
+ SplashFontFile *ret;
+
+ if (!(ff = FoFiTrueType::load(fileName))) {
+ return NULL;
+ }
+ tmpFileName = NULL;
+ if (!openTempFile(&tmpFileName, &tmpFile, "wb")) {
+ delete ff;
+ return NULL;
+ }
+ ff->writeTTF(&fileWrite, tmpFile);
+ delete ff;
+ fclose(tmpFile);
+ ret = SplashFTFontFile::loadTrueTypeFont(this, idA,
+ tmpFileName->getCString(),
+ gTrue, codeToGID, codeToGIDLen,
+ faceIndex);
+ if (ret) {
+ if (deleteFile) {
+ unlink(fileName);
+ }
+ } else {
+ unlink(tmpFileName->getCString());
+ }
+ delete tmpFileName;
+ return ret;
+#else
+ SplashFontFile *ret;
+ ret = SplashFTFontFile::loadTrueTypeFont(this, idA, src,
+ codeToGID, codeToGIDLen,
+ faceIndex);
+ return ret;
+#endif
+}
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.h
new file mode 100644
index 00000000000..5acb415fda8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontEngine.h
@@ -0,0 +1,75 @@
+//========================================================================
+//
+// SplashFTFontEngine.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFTFONTENGINE_H
+#define SPLASHFTFONTENGINE_H
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include "goo/gtypes.h"
+
+class SplashFontFile;
+class SplashFontFileID;
+class SplashFontSrc;
+
+//------------------------------------------------------------------------
+// SplashFTFontEngine
+//------------------------------------------------------------------------
+
+class SplashFTFontEngine {
+public:
+
+ static SplashFTFontEngine *init(GBool aaA, GBool enableFreeTypeHintingA);
+
+ ~SplashFTFontEngine();
+
+ // Load fonts.
+ SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
+ SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src);
+ SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src,
+ Gushort *codeToGID, int codeToGIDLen, int faceIndex = 0);
+
+private:
+
+ SplashFTFontEngine(GBool aaA, GBool enableFreeTypeHintingA, FT_Library libA);
+
+ GBool aa;
+ GBool enableFreeTypeHinting;
+ FT_Library lib;
+ GBool useCIDs;
+
+ friend class SplashFTFontFile;
+ friend class SplashFTFont;
+};
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.cc
new file mode 100644
index 00000000000..160481e7a53
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.cc
@@ -0,0 +1,139 @@
+//========================================================================
+//
+// SplashFTFontFile.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "SplashFTFontEngine.h"
+#include "SplashFTFont.h"
+#include "SplashFTFontFile.h"
+
+//------------------------------------------------------------------------
+// SplashFTFontFile
+//------------------------------------------------------------------------
+
+SplashFontFile *SplashFTFontFile::loadType1Font(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **encA) {
+ FT_Face faceA;
+ Gushort *codeToGIDA;
+ char *name;
+ int i;
+
+ if (src->isFile) {
+ if (FT_New_Face(engineA->lib, src->fileName->getCString(), 0, &faceA))
+ return NULL;
+ } else {
+ if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, 0, &faceA))
+ return NULL;
+ }
+ codeToGIDA = (Gushort *)gmallocn(256, sizeof(int));
+ for (i = 0; i < 256; ++i) {
+ codeToGIDA[i] = 0;
+ if ((name = encA[i])) {
+ codeToGIDA[i] = (Gushort)FT_Get_Name_Index(faceA, name);
+ }
+ }
+
+ return new SplashFTFontFile(engineA, idA, src,
+ faceA, codeToGIDA, 256, gFalse);
+}
+
+SplashFontFile *SplashFTFontFile::loadCIDFont(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToGIDA,
+ int codeToGIDLenA) {
+ FT_Face faceA;
+
+ if (src->isFile) {
+ if (FT_New_Face(engineA->lib, src->fileName->getCString(), 0, &faceA))
+ return NULL;
+ } else {
+ if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, 0, &faceA))
+ return NULL;
+ }
+
+ return new SplashFTFontFile(engineA, idA, src,
+ faceA, codeToGIDA, codeToGIDLenA, gFalse);
+}
+
+SplashFontFile *SplashFTFontFile::loadTrueTypeFont(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToGIDA,
+ int codeToGIDLenA,
+ int faceIndexA) {
+ FT_Face faceA;
+
+ if (src->isFile) {
+ if (FT_New_Face(engineA->lib, src->fileName->getCString(), faceIndexA, &faceA))
+ return NULL;
+ } else {
+ if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, faceIndexA, &faceA))
+ return NULL;
+ }
+
+ return new SplashFTFontFile(engineA, idA, src,
+ faceA, codeToGIDA, codeToGIDLenA, gTrue);
+}
+
+SplashFTFontFile::SplashFTFontFile(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ FT_Face faceA,
+ Gushort *codeToGIDA, int codeToGIDLenA,
+ GBool trueTypeA):
+ SplashFontFile(idA, src)
+{
+ engine = engineA;
+ face = faceA;
+ codeToGID = codeToGIDA;
+ codeToGIDLen = codeToGIDLenA;
+ trueType = trueTypeA;
+}
+
+SplashFTFontFile::~SplashFTFontFile() {
+ if (face) {
+ FT_Done_Face(face);
+ }
+ if (codeToGID) {
+ gfree(codeToGID);
+ }
+}
+
+SplashFont *SplashFTFontFile::makeFont(SplashCoord *mat,
+ SplashCoord *textMat) {
+ SplashFont *font;
+
+ font = new SplashFTFont(this, mat, textMat);
+ font->initCache();
+ return font;
+}
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.h
new file mode 100644
index 00000000000..079fb1cb691
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFTFontFile.h
@@ -0,0 +1,85 @@
+//========================================================================
+//
+// SplashFTFontFile.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFTFONTFILE_H
+#define SPLASHFTFONTFILE_H
+
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include "SplashFontFile.h"
+
+class SplashFontFileID;
+class SplashFTFontEngine;
+
+//------------------------------------------------------------------------
+// SplashFTFontFile
+//------------------------------------------------------------------------
+
+class SplashFTFontFile: public SplashFontFile {
+public:
+
+ static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src, char **encA);
+ static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToCIDA, int codeToGIDLenA);
+ static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToGIDA,
+ int codeToGIDLenA,
+ int faceIndexA=0);
+
+ virtual ~SplashFTFontFile();
+
+ // Create a new SplashFTFont, i.e., a scaled instance of this font
+ // file.
+ virtual SplashFont *makeFont(SplashCoord *mat,
+ SplashCoord *textMat);
+
+private:
+
+ SplashFTFontFile(SplashFTFontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ FT_Face faceA,
+ Gushort *codeToGIDA, int codeToGIDLenA,
+ GBool trueTypeA);
+
+ SplashFTFontEngine *engine;
+ FT_Face face;
+ Gushort *codeToGID;
+ int codeToGIDLen;
+ GBool trueType;
+
+ friend class SplashFTFont;
+};
+
+#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.cc
new file mode 100644
index 00000000000..400d7cc4c08
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.cc
@@ -0,0 +1,215 @@
+//========================================================================
+//
+// SplashFont.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashGlyphBitmap.h"
+#include "SplashFontFile.h"
+#include "SplashFont.h"
+
+//------------------------------------------------------------------------
+
+struct SplashFontCacheTag {
+ int c;
+ short xFrac, yFrac; // x and y fractions
+ int mru; // valid bit (0x80000000) and MRU index
+ int x, y, w, h; // offset and size of glyph
+};
+
+//------------------------------------------------------------------------
+// SplashFont
+//------------------------------------------------------------------------
+
+SplashFont::SplashFont(SplashFontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA, GBool aaA) {
+ fontFile = fontFileA;
+ fontFile->incRefCnt();
+ mat[0] = matA[0];
+ mat[1] = matA[1];
+ mat[2] = matA[2];
+ mat[3] = matA[3];
+ textMat[0] = textMatA[0];
+ textMat[1] = textMatA[1];
+ textMat[2] = textMatA[2];
+ textMat[3] = textMatA[3];
+ aa = aaA;
+
+ cache = NULL;
+ cacheTags = NULL;
+
+ xMin = yMin = xMax = yMax = 0;
+}
+
+void SplashFont::initCache() {
+ int i;
+
+ // this should be (max - min + 1), but we add some padding to
+ // deal with rounding errors
+ glyphW = xMax - xMin + 3;
+ glyphH = yMax - yMin + 3;
+ if (aa) {
+ glyphSize = glyphW * glyphH;
+ } else {
+ glyphSize = ((glyphW + 7) >> 3) * glyphH;
+ }
+
+ // set up the glyph pixmap cache
+ cacheAssoc = 8;
+ if (glyphSize <= 256) {
+ cacheSets = 8;
+ } else if (glyphSize <= 512) {
+ cacheSets = 4;
+ } else if (glyphSize <= 1024) {
+ cacheSets = 2;
+ } else {
+ cacheSets = 1;
+ }
+ cache = (Guchar *)gmallocn_checkoverflow(cacheSets* cacheAssoc, glyphSize);
+ if (cache != NULL) {
+ cacheTags = (SplashFontCacheTag *)gmallocn(cacheSets * cacheAssoc,
+ sizeof(SplashFontCacheTag));
+ for (i = 0; i < cacheSets * cacheAssoc; ++i) {
+ cacheTags[i].mru = i & (cacheAssoc - 1);
+ }
+ } else {
+ cacheAssoc = 0;
+ }
+}
+
+SplashFont::~SplashFont() {
+ fontFile->decRefCnt();
+ if (cache) {
+ gfree(cache);
+ }
+ if (cacheTags) {
+ gfree(cacheTags);
+ }
+}
+
+GBool SplashFont::getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) {
+ SplashGlyphBitmap bitmap2;
+ int size;
+ Guchar *p;
+ int i, j, k;
+
+ // no fractional coordinates for large glyphs or non-anti-aliased
+ // glyphs
+ if (!aa || glyphH > 50) {
+ xFrac = yFrac = 0;
+ }
+
+ // check the cache
+ i = (c & (cacheSets - 1)) * cacheAssoc;
+ for (j = 0; j < cacheAssoc; ++j) {
+ if ((cacheTags[i+j].mru & 0x80000000) &&
+ cacheTags[i+j].c == c &&
+ (int)cacheTags[i+j].xFrac == xFrac &&
+ (int)cacheTags[i+j].yFrac == yFrac) {
+ bitmap->x = cacheTags[i+j].x;
+ bitmap->y = cacheTags[i+j].y;
+ bitmap->w = cacheTags[i+j].w;
+ bitmap->h = cacheTags[i+j].h;
+ for (k = 0; k < cacheAssoc; ++k) {
+ if (k != j &&
+ (cacheTags[i+k].mru & 0x7fffffff) <
+ (cacheTags[i+j].mru & 0x7fffffff)) {
+ ++cacheTags[i+k].mru;
+ }
+ }
+ cacheTags[i+j].mru = 0x80000000;
+ bitmap->aa = aa;
+ bitmap->data = cache + (i+j) * glyphSize;
+ bitmap->freeData = gFalse;
+
+ *clipRes = clip->testRect(x0 - bitmap->x,
+ y0 - bitmap->y,
+ x0 - bitmap->x + bitmap->w - 1,
+ y0 - bitmap->y + bitmap->h - 1);
+
+ return gTrue;
+ }
+ }
+
+ // generate the glyph bitmap
+ if (!makeGlyph(c, xFrac, yFrac, &bitmap2, x0, y0, clip, clipRes)) {
+ return gFalse;
+ }
+
+ if (*clipRes == splashClipAllOutside)
+ {
+ bitmap->freeData = gFalse;
+ if (bitmap2.freeData) gfree(bitmap2.data);
+ return gTrue;
+ }
+
+ // if the glyph doesn't fit in the bounding box, return a temporary
+ // uncached bitmap
+ if (bitmap2.w > glyphW || bitmap2.h > glyphH) {
+ *bitmap = bitmap2;
+ return gTrue;
+ }
+
+ // insert glyph pixmap in cache
+ if (aa) {
+ size = bitmap2.w * bitmap2.h;
+ } else {
+ size = ((bitmap2.w + 7) >> 3) * bitmap2.h;
+ }
+ p = NULL; // make gcc happy
+ if (cacheAssoc == 0)
+ {
+ // we had problems on the malloc of the cache, so ignore it
+ *bitmap = bitmap2;
+ }
+ else
+ {
+ for (j = 0; j < cacheAssoc; ++j) {
+ if ((cacheTags[i+j].mru & 0x7fffffff) == cacheAssoc - 1) {
+ cacheTags[i+j].mru = 0x80000000;
+ cacheTags[i+j].c = c;
+ cacheTags[i+j].xFrac = (short)xFrac;
+ cacheTags[i+j].yFrac = (short)yFrac;
+ cacheTags[i+j].x = bitmap2.x;
+ cacheTags[i+j].y = bitmap2.y;
+ cacheTags[i+j].w = bitmap2.w;
+ cacheTags[i+j].h = bitmap2.h;
+ p = cache + (i+j) * glyphSize;
+ memcpy(p, bitmap2.data, size);
+ } else {
+ ++cacheTags[i+j].mru;
+ }
+ }
+ *bitmap = bitmap2;
+ bitmap->data = p;
+ bitmap->freeData = gFalse;
+ if (bitmap2.freeData) {
+ gfree(bitmap2.data);
+ }
+ }
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.h
new file mode 100644
index 00000000000..78b00d2dcaf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFont.h
@@ -0,0 +1,121 @@
+//========================================================================
+//
+// SplashFont.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFONT_H
+#define SPLASHFONT_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "SplashTypes.h"
+#include "SplashClip.h"
+
+struct SplashGlyphBitmap;
+struct SplashFontCacheTag;
+class SplashFontFile;
+class SplashPath;
+
+//------------------------------------------------------------------------
+
+// Fractional positioning uses this many bits to the right of the
+// decimal points.
+#define splashFontFractionBits 2
+#define splashFontFraction (1 << splashFontFractionBits)
+#define splashFontFractionMul \
+ ((SplashCoord)1 / (SplashCoord)splashFontFraction)
+
+//------------------------------------------------------------------------
+// SplashFont
+//------------------------------------------------------------------------
+
+class SplashFont {
+public:
+
+ SplashFont(SplashFontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA, GBool aaA);
+
+ // This must be called after the constructor, so that the subclass
+ // constructor has a chance to compute the bbox.
+ void initCache();
+
+ virtual ~SplashFont();
+
+ SplashFontFile *getFontFile() { return fontFile; }
+
+ // Return true if <this> matches the specified font file and matrix.
+ GBool matches(SplashFontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA) {
+ return fontFileA == fontFile &&
+ matA[0] == mat[0] && matA[1] == mat[1] &&
+ matA[2] == mat[2] && matA[3] == mat[3] &&
+ textMatA[0] == textMat[0] && textMatA[1] == textMat[1] &&
+ textMatA[2] == textMat[2] && textMatA[3] == textMat[3];
+ }
+
+ // Get a glyph - this does a cache lookup first, and if not found,
+ // creates a new bitmap and adds it to the cache. The <xFrac> and
+ // <yFrac> values are splashFontFractionBits bits each, representing
+ // the numerators of fractions in [0, 1), where the denominator is
+ // splashFontFraction = 1 << splashFontFractionBits. Subclasses
+ // should override this to zero out xFrac and/or yFrac if they don't
+ // support fractional coordinates.
+ virtual GBool getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+
+ // Rasterize a glyph. The <xFrac> and <yFrac> values are the same
+ // as described for getGlyph.
+ virtual GBool makeGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) = 0;
+
+ // Return the path for a glyph.
+ virtual SplashPath *getGlyphPath(int c) = 0;
+
+ // Return the advance of a glyph. (in 0..1 range)
+ // < 0 means not known
+ virtual double getGlyphAdvance(int c) { return -1; }
+
+ // Return the font transform matrix.
+ SplashCoord *getMatrix() { return mat; }
+
+ // Return the glyph bounding box.
+ void getBBox(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+
+protected:
+
+ SplashFontFile *fontFile;
+ SplashCoord mat[4]; // font transform matrix
+ // (text space -> device space)
+ SplashCoord textMat[4]; // text transform matrix
+ // (text space -> user space)
+ GBool aa; // anti-aliasing
+ int xMin, yMin, xMax, yMax; // glyph bounding box
+ Guchar *cache; // glyph bitmap cache
+ SplashFontCacheTag * // cache tags
+ cacheTags;
+ int glyphW, glyphH; // size of glyph bitmaps
+ int glyphSize; // size of glyph bitmaps, in bytes
+ int cacheSets; // number of sets in cache
+ int cacheAssoc; // cache associativity (glyphs per set)
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.cc
new file mode 100644
index 00000000000..3c96bfbf1d5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.cc
@@ -0,0 +1,327 @@
+//========================================================================
+//
+// SplashFontEngine.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#if HAVE_T1LIB_H
+#include <t1lib.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "SplashMath.h"
+#include "SplashT1FontEngine.h"
+#include "SplashFTFontEngine.h"
+#include "SplashFontFile.h"
+#include "SplashFontFileID.h"
+#include "SplashFont.h"
+#include "SplashFontEngine.h"
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+//------------------------------------------------------------------------
+// SplashFontEngine
+//------------------------------------------------------------------------
+
+SplashFontEngine::SplashFontEngine(
+#if HAVE_T1LIB_H
+ GBool enableT1lib,
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ GBool enableFreeType,
+ GBool enableFreeTypeHinting,
+#endif
+ GBool aa) {
+ int i;
+
+ for (i = 0; i < splashFontCacheSize; ++i) {
+ fontCache[i] = NULL;
+ }
+
+#if HAVE_T1LIB_H
+ if (enableT1lib) {
+ t1Engine = SplashT1FontEngine::init(aa);
+ } else {
+ t1Engine = NULL;
+ }
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (enableFreeType) {
+ ftEngine = SplashFTFontEngine::init(aa, enableFreeTypeHinting);
+ } else {
+ ftEngine = NULL;
+ }
+#endif
+}
+
+SplashFontEngine::~SplashFontEngine() {
+ int i;
+
+ for (i = 0; i < splashFontCacheSize; ++i) {
+ if (fontCache[i]) {
+ delete fontCache[i];
+ }
+ }
+
+#if HAVE_T1LIB_H
+ if (t1Engine) {
+ delete t1Engine;
+ }
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (ftEngine) {
+ delete ftEngine;
+ }
+#endif
+}
+
+SplashFontFile *SplashFontEngine::getFontFile(SplashFontFileID *id) {
+ SplashFontFile *fontFile;
+ int i;
+
+ for (i = 0; i < splashFontCacheSize; ++i) {
+ if (fontCache[i]) {
+ fontFile = fontCache[i]->getFontFile();
+ if (fontFile && fontFile->getID()->matches(id)) {
+ return fontFile;
+ }
+ }
+ }
+ return NULL;
+}
+
+SplashFontFile *SplashFontEngine::loadType1Font(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_T1LIB_H
+ if (!fontFile && t1Engine) {
+ fontFile = t1Engine->loadType1Font(idA, src, enc);
+ }
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadType1Font(idA, src, enc);
+ }
+#endif
+
+#ifndef _WIN32
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+#endif
+
+ return fontFile;
+}
+
+SplashFontFile *SplashFontEngine::loadType1CFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_T1LIB_H
+ if (!fontFile && t1Engine) {
+ fontFile = t1Engine->loadType1CFont(idA, src, enc);
+ }
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadType1CFont(idA, src, enc);
+ }
+#endif
+
+#ifndef _WIN32
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+#endif
+
+ return fontFile;
+}
+
+SplashFontFile *SplashFontEngine::loadOpenTypeT1CFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadOpenTypeT1CFont(idA, src, enc);
+ }
+#endif
+
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+
+ return fontFile;
+}
+
+SplashFontFile *SplashFontEngine::loadCIDFont(SplashFontFileID *idA,
+ SplashFontSrc *src) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadCIDFont(idA, src);
+ }
+#endif
+
+#ifndef _WIN32
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+#endif
+
+ return fontFile;
+}
+
+SplashFontFile *SplashFontEngine::loadOpenTypeCFFFont(SplashFontFileID *idA,
+ SplashFontSrc *src) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadOpenTypeCFFFont(idA, src);
+ }
+#endif
+
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+
+ return fontFile;
+}
+
+SplashFontFile *SplashFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ Gushort *codeToGID,
+ int codeToGIDLen,
+ int faceIndex) {
+ SplashFontFile *fontFile;
+
+ fontFile = NULL;
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ if (!fontFile && ftEngine) {
+ fontFile = ftEngine->loadTrueTypeFont(idA, src,
+ codeToGID, codeToGIDLen, faceIndex);
+ }
+#endif
+
+ if (!fontFile) {
+ gfree(codeToGID);
+ }
+
+#ifndef _WIN32
+ // delete the (temporary) font file -- with Unix hard link
+ // semantics, this will remove the last link; otherwise it will
+ // return an error, leaving the file to be deleted later (if
+ // loadXYZFont failed, the file will always be deleted)
+ if (src->isFile)
+ src->unref();
+#endif
+
+ return fontFile;
+}
+
+SplashFont *SplashFontEngine::getFont(SplashFontFile *fontFile,
+ SplashCoord *textMat,
+ SplashCoord *ctm) {
+ SplashCoord mat[4];
+ SplashFont *font;
+ int i, j;
+
+ mat[0] = textMat[0] * ctm[0] + textMat[1] * ctm[2];
+ mat[1] = -(textMat[0] * ctm[1] + textMat[1] * ctm[3]);
+ mat[2] = textMat[2] * ctm[0] + textMat[3] * ctm[2];
+ mat[3] = -(textMat[2] * ctm[1] + textMat[3] * ctm[3]);
+ if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.01) {
+ // avoid a singular (or close-to-singular) matrix
+ mat[0] = 0.01; mat[1] = 0;
+ mat[2] = 0; mat[3] = 0.01;
+ }
+
+ font = fontCache[0];
+ if (font && font->matches(fontFile, mat, textMat)) {
+ return font;
+ }
+ for (i = 1; i < splashFontCacheSize; ++i) {
+ font = fontCache[i];
+ if (font && font->matches(fontFile, mat, textMat)) {
+ for (j = i; j > 0; --j) {
+ fontCache[j] = fontCache[j-1];
+ }
+ fontCache[0] = font;
+ return font;
+ }
+ }
+ font = fontFile->makeFont(mat, textMat);
+ if (fontCache[splashFontCacheSize - 1]) {
+ delete fontCache[splashFontCacheSize - 1];
+ }
+ for (j = splashFontCacheSize - 1; j > 0; --j) {
+ fontCache[j] = fontCache[j-1];
+ }
+ fontCache[0] = font;
+ return font;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.h
new file mode 100644
index 00000000000..a9d51f0673d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontEngine.h
@@ -0,0 +1,101 @@
+//========================================================================
+//
+// SplashFontEngine.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFONTENGINE_H
+#define SPLASHFONTENGINE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+class SplashT1FontEngine;
+class SplashFTFontEngine;
+class SplashDTFontEngine;
+class SplashDT4FontEngine;
+class SplashFontFile;
+class SplashFontFileID;
+class SplashFont;
+class SplashFontSrc;
+
+//------------------------------------------------------------------------
+
+#define splashFontCacheSize 16
+
+//------------------------------------------------------------------------
+// SplashFontEngine
+//------------------------------------------------------------------------
+
+class SplashFontEngine {
+public:
+
+ // Create a font engine.
+ SplashFontEngine(
+#if HAVE_T1LIB_H
+ GBool enableT1lib,
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ GBool enableFreeType,
+ GBool enableFreeTypeHinting,
+#endif
+ GBool aa);
+
+ ~SplashFontEngine();
+
+ // Get a font file from the cache. Returns NULL if there is no
+ // matching entry in the cache.
+ SplashFontFile *getFontFile(SplashFontFileID *id);
+
+ // Load fonts - these create new SplashFontFile objects.
+ SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
+ SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src);
+ SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src,
+ Gushort *codeToGID, int codeToGIDLen, int faceIndex = 0);
+
+ // Get a font - this does a cache lookup first, and if not found,
+ // creates a new SplashFont object and adds it to the cache. The
+ // matrix, mat = textMat * ctm:
+ // [ mat[0] mat[1] ]
+ // [ mat[2] mat[3] ]
+ // specifies the font transform in PostScript style:
+ // [x' y'] = [x y] * mat
+ // Note that the Splash y axis points downward.
+ SplashFont *getFont(SplashFontFile *fontFile,
+ SplashCoord *textMat, SplashCoord *ctm);
+
+private:
+
+ SplashFont *fontCache[splashFontCacheSize];
+
+#if HAVE_T1LIB_H
+ SplashT1FontEngine *t1Engine;
+#endif
+#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
+ SplashFTFontEngine *ftEngine;
+#endif
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.cc
new file mode 100644
index 00000000000..68e8608b6a7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.cc
@@ -0,0 +1,124 @@
+//========================================================================
+//
+// SplashFontFile.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "SplashFontFile.h"
+#include "SplashFontFileID.h"
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+//------------------------------------------------------------------------
+// SplashFontFile
+//------------------------------------------------------------------------
+
+SplashFontFile::SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA) {
+ id = idA;
+ src = srcA;
+ src->ref();
+ refCnt = 0;
+ doAdjustMatrix = gFalse;
+}
+
+SplashFontFile::~SplashFontFile() {
+ src->unref();
+ delete id;
+}
+
+void SplashFontFile::incRefCnt() {
+ ++refCnt;
+}
+
+void SplashFontFile::decRefCnt() {
+ if (!--refCnt) {
+ delete this;
+ }
+}
+
+//
+
+SplashFontSrc::SplashFontSrc() {
+ isFile = gFalse;
+ deleteSrc = gFalse;
+ fileName = NULL;
+ buf = NULL;
+ refcnt = 1;
+}
+
+SplashFontSrc::~SplashFontSrc() {
+ if (deleteSrc) {
+ if (isFile) {
+ if (fileName)
+ unlink(fileName->getCString());
+ } else {
+ if (buf)
+ gfree(buf);
+ }
+ }
+
+ if (isFile && fileName)
+ delete fileName;
+}
+
+void SplashFontSrc::ref() {
+ refcnt++;
+}
+
+void SplashFontSrc::unref() {
+ if (! --refcnt)
+ delete this;
+}
+
+void SplashFontSrc::setFile(GooString *file, GBool del)
+{
+ isFile = gTrue;
+ fileName = file->copy();
+ deleteSrc = del;
+}
+
+void SplashFontSrc::setFile(const char *file, GBool del)
+{
+ isFile = gTrue;
+ fileName = new GooString(file);
+ deleteSrc = del;
+}
+
+void SplashFontSrc::setBuf(char *bufA, int bufLenA, GBool del)
+{
+ isFile = gFalse;
+ buf = bufA;
+ bufLen = bufLenA;
+ deleteSrc = del;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.h
new file mode 100644
index 00000000000..f2b457099df
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFile.h
@@ -0,0 +1,93 @@
+//========================================================================
+//
+// SplashFontFile.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHFONTFILE_H
+#define SPLASHFONTFILE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+#include "SplashTypes.h"
+
+class GooString;
+class SplashFontEngine;
+class SplashFont;
+class SplashFontFileID;
+
+//------------------------------------------------------------------------
+// SplashFontFile
+//------------------------------------------------------------------------
+
+class SplashFontSrc {
+public:
+ SplashFontSrc();
+ ~SplashFontSrc();
+
+ void setFile(GooString *file, GBool del);
+ void setFile(const char *file, GBool del);
+ void setBuf(char *bufA, int buflenA, GBool del);
+
+ void ref();
+ void unref();
+
+ GBool isFile;
+ GooString *fileName;
+ char *buf;
+ int bufLen;
+ GBool deleteSrc;
+ int refcnt;
+};
+
+class SplashFontFile {
+public:
+
+ virtual ~SplashFontFile();
+
+ // Create a new SplashFont, i.e., a scaled instance of this font
+ // file.
+ virtual SplashFont *makeFont(SplashCoord *mat, SplashCoord *textMat) = 0;
+
+ // Get the font file ID.
+ SplashFontFileID *getID() { return id; }
+
+ // Increment the reference count.
+ void incRefCnt();
+
+ // Decrement the reference count. If the new value is zero, delete
+ // the SplashFontFile object.
+ void decRefCnt();
+
+ GBool doAdjustMatrix;
+
+protected:
+
+ SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA);
+
+ SplashFontFileID *id;
+ SplashFontSrc *src;
+ int refCnt;
+
+ friend class SplashFontEngine;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.cc
new file mode 100644
index 00000000000..a66dabf61e3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.cc
@@ -0,0 +1,23 @@
+//========================================================================
+//
+// SplashFontFileID.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "SplashFontFileID.h"
+
+//------------------------------------------------------------------------
+// SplashFontFileID
+//------------------------------------------------------------------------
+
+SplashFontFileID::SplashFontFileID() {
+}
+
+SplashFontFileID::~SplashFontFileID() {
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.h
new file mode 100644
index 00000000000..cfd89ebb56a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashFontFileID.h
@@ -0,0 +1,28 @@
+//========================================================================
+//
+// SplashFontFileID.h
+//
+//========================================================================
+
+#ifndef SPLASHFONTFILEID_H
+#define SPLASHFONTFILEID_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+// SplashFontFileID
+//------------------------------------------------------------------------
+
+class SplashFontFileID {
+public:
+
+ SplashFontFileID();
+ virtual ~SplashFontFileID();
+ virtual GBool matches(SplashFontFileID *id) = 0;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashGlyphBitmap.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashGlyphBitmap.h
new file mode 100644
index 00000000000..c062c106e6a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashGlyphBitmap.h
@@ -0,0 +1,24 @@
+//========================================================================
+//
+// SplashGlyphBitmap.h
+//
+//========================================================================
+
+#ifndef SPLASHGLYPHBITMAP_H
+#define SPLASHGLYPHBITMAP_H
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+// SplashGlyphBitmap
+//------------------------------------------------------------------------
+
+struct SplashGlyphBitmap {
+ int x, y, w, h; // offset and size of glyph
+ GBool aa; // anti-aliased: true means 8-bit alpha
+ // bitmap; false means 1-bit
+ Guchar *data; // bitmap data
+ GBool freeData; // true if data memory should be freed
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashMath.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashMath.h
new file mode 100644
index 00000000000..7a8c8e31d1f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashMath.h
@@ -0,0 +1,88 @@
+//========================================================================
+//
+// SplashMath.h
+//
+//========================================================================
+
+#ifndef SPLASHMATH_H
+#define SPLASHMATH_H
+
+#if USE_FIXEDPOINT
+#include "goo/FixedPoint.h"
+#else
+#include <math.h>
+#endif
+#include "SplashTypes.h"
+
+static inline SplashCoord splashAbs(SplashCoord x) {
+#if USE_FIXEDPOINT
+ return FixedPoint::abs(x);
+#else
+ return fabs(x);
+#endif
+}
+
+static inline int splashFloor(SplashCoord x) {
+ #if USE_FIXEDPOINT
+ return FixedPoint::floor(x);
+ #else
+ return (int)floor(x);
+ #endif
+}
+
+static inline int splashCeil(SplashCoord x) {
+#if USE_FIXEDPOINT
+ return FixedPoint::ceil(x);
+#else
+ return (int)ceil(x);
+#endif
+}
+
+static inline int splashRound(SplashCoord x) {
+#if USE_FIXEDPOINT
+ return FixedPoint::round(x);
+#else
+ return (int)floor(x + 0.5);
+#endif
+}
+
+static inline SplashCoord splashSqrt(SplashCoord x) {
+#if USE_FIXEDPOINT
+ return FixedPoint::sqrt(x);
+#else
+ return sqrt(x);
+#endif
+}
+
+static inline SplashCoord splashPow(SplashCoord x, SplashCoord y) {
+#if USE_FIXEDPOINT
+ return FixedPoint::pow(x, y);
+#else
+ return pow(x, y);
+#endif
+}
+
+static inline SplashCoord splashDist(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1) {
+ SplashCoord dx, dy;
+ dx = x1 - x0;
+ dy = y1 - y0;
+#if USE_FIXEDPOINT
+ // this handles the situation where dx*dx or dy*dy is too large to
+ // fit in the 16.16 fixed point format
+ SplashCoord dxa, dya;
+ dxa = splashAbs(dx);
+ dya = splashAbs(dy);
+ if (dxa == 0 && dya == 0) {
+ return 0;
+ } else if (dxa > dya) {
+ return dxa * FixedPoint::sqrt(dya / dxa + 1);
+ } else {
+ return dya * FixedPoint::sqrt(dxa / dya + 1);
+ }
+#else
+ return sqrt(dx * dx + dy * dy);
+#endif
+}
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.cc
new file mode 100644
index 00000000000..261f77883cd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.cc
@@ -0,0 +1,184 @@
+//========================================================================
+//
+// SplashPath.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashErrorCodes.h"
+#include "SplashPath.h"
+
+//------------------------------------------------------------------------
+// SplashPath
+//------------------------------------------------------------------------
+
+// A path can be in three possible states:
+//
+// 1. no current point -- zero or more finished subpaths
+// [curSubpath == length]
+//
+// 2. one point in subpath
+// [curSubpath == length - 1]
+//
+// 3. open subpath with two or more points
+// [curSubpath < length - 1]
+
+SplashPath::SplashPath() {
+ pts = NULL;
+ flags = NULL;
+ length = size = 0;
+ curSubpath = 0;
+ hints = NULL;
+ hintsLength = hintsSize = 0;
+}
+
+SplashPath::SplashPath(SplashPath *path) {
+ length = path->length;
+ size = path->size;
+ pts = (SplashPathPoint *)gmallocn(size, sizeof(SplashPathPoint));
+ flags = (Guchar *)gmallocn(size, sizeof(Guchar));
+ memcpy(pts, path->pts, length * sizeof(SplashPathPoint));
+ memcpy(flags, path->flags, length * sizeof(Guchar));
+ curSubpath = path->curSubpath;
+ if (path->hints) {
+ hintsLength = hintsSize = path->hintsLength;
+ hints = (SplashPathHint *)gmallocn(hintsSize, sizeof(SplashPathHint));
+ memcpy(hints, path->hints, hintsLength * sizeof(SplashPathHint));
+ } else {
+ hints = NULL;
+ }
+}
+
+SplashPath::~SplashPath() {
+ gfree(pts);
+ gfree(flags);
+ gfree(hints);
+}
+
+// Add space for <nPts> more points.
+void SplashPath::grow(int nPts) {
+ if (length + nPts > size) {
+ if (size == 0) {
+ size = 32;
+ }
+ while (size < length + nPts) {
+ size *= 2;
+ }
+ pts = (SplashPathPoint *)greallocn(pts, size, sizeof(SplashPathPoint));
+ flags = (Guchar *)greallocn(flags, size, sizeof(Guchar));
+ }
+}
+
+void SplashPath::append(SplashPath *path) {
+ int i;
+
+ curSubpath = length + path->curSubpath;
+ grow(path->length);
+ for (i = 0; i < path->length; ++i) {
+ pts[length] = path->pts[i];
+ flags[length] = path->flags[i];
+ ++length;
+ }
+}
+
+SplashError SplashPath::moveTo(SplashCoord x, SplashCoord y) {
+ if (onePointSubpath()) {
+ return splashErrBogusPath;
+ }
+ grow(1);
+ pts[length].x = x;
+ pts[length].y = y;
+ flags[length] = splashPathFirst | splashPathLast;
+ curSubpath = length++;
+ return splashOk;
+}
+
+SplashError SplashPath::lineTo(SplashCoord x, SplashCoord y) {
+ if (noCurrentPoint()) {
+ return splashErrNoCurPt;
+ }
+ flags[length-1] &= ~splashPathLast;
+ grow(1);
+ pts[length].x = x;
+ pts[length].y = y;
+ flags[length] = splashPathLast;
+ ++length;
+ return splashOk;
+}
+
+SplashError SplashPath::curveTo(SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3) {
+ if (noCurrentPoint()) {
+ return splashErrNoCurPt;
+ }
+ flags[length-1] &= ~splashPathLast;
+ grow(3);
+ pts[length].x = x1;
+ pts[length].y = y1;
+ flags[length] = splashPathCurve;
+ ++length;
+ pts[length].x = x2;
+ pts[length].y = y2;
+ flags[length] = splashPathCurve;
+ ++length;
+ pts[length].x = x3;
+ pts[length].y = y3;
+ flags[length] = splashPathLast;
+ ++length;
+ return splashOk;
+}
+
+SplashError SplashPath::close() {
+ if (noCurrentPoint()) {
+ return splashErrNoCurPt;
+ }
+ if (curSubpath == length - 1 ||
+ pts[length - 1].x != pts[curSubpath].x ||
+ pts[length - 1].y != pts[curSubpath].y) {
+ lineTo(pts[curSubpath].x, pts[curSubpath].y);
+ }
+ flags[curSubpath] |= splashPathClosed;
+ flags[length - 1] |= splashPathClosed;
+ curSubpath = length;
+ return splashOk;
+}
+
+void SplashPath::addStrokeAdjustHint(int ctrl0, int ctrl1,
+ int firstPt, int lastPt) {
+ if (hintsLength == hintsSize) {
+ hintsSize = hintsLength ? 2 * hintsLength : 8;
+ hints = (SplashPathHint *)greallocn(hints, hintsSize,
+ sizeof(SplashPathHint));
+ }
+ hints[hintsLength].ctrl0 = ctrl0;
+ hints[hintsLength].ctrl1 = ctrl1;
+ hints[hintsLength].firstPt = firstPt;
+ hints[hintsLength].lastPt = lastPt;
+ ++hintsLength;
+}
+
+void SplashPath::offset(SplashCoord dx, SplashCoord dy) {
+ int i;
+
+ for (i = 0; i < length; ++i) {
+ pts[i].x += dx;
+ pts[i].y += dy;
+ }
+}
+
+GBool SplashPath::getCurPt(SplashCoord *x, SplashCoord *y) {
+ if (noCurrentPoint()) {
+ return gFalse;
+ }
+ *x = pts[length - 1].x;
+ *y = pts[length - 1].y;
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.h
new file mode 100644
index 00000000000..991e11438f3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPath.h
@@ -0,0 +1,121 @@
+//========================================================================
+//
+// SplashPath.h
+//
+//========================================================================
+
+#ifndef SPLASHPATH_H
+#define SPLASHPATH_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+//------------------------------------------------------------------------
+// SplashPathPoint
+//------------------------------------------------------------------------
+
+struct SplashPathPoint {
+ SplashCoord x, y;
+};
+
+//------------------------------------------------------------------------
+// SplashPath.flags
+//------------------------------------------------------------------------
+
+// first point on each subpath sets this flag
+#define splashPathFirst 0x01
+
+// last point on each subpath sets this flag
+#define splashPathLast 0x02
+
+// if the subpath is closed, its first and last points must be
+// identical, and must set this flag
+#define splashPathClosed 0x04
+
+// curve control points set this flag
+#define splashPathCurve 0x08
+
+//------------------------------------------------------------------------
+// SplashPathHint
+//------------------------------------------------------------------------
+
+struct SplashPathHint {
+ int ctrl0, ctrl1;
+ int firstPt, lastPt;
+};
+
+//------------------------------------------------------------------------
+// SplashPath
+//------------------------------------------------------------------------
+
+class SplashPath {
+public:
+
+ // Create an empty path.
+ SplashPath();
+
+ // Copy a path.
+ SplashPath *copy() { return new SplashPath(this); }
+
+ ~SplashPath();
+
+ // Append <path> to <this>.
+ void append(SplashPath *path);
+
+ // Start a new subpath.
+ SplashError moveTo(SplashCoord x, SplashCoord y);
+
+ // Add a line segment to the last subpath.
+ SplashError lineTo(SplashCoord x, SplashCoord y);
+
+ // Add a third-order (cubic) Bezier curve segment to the last
+ // subpath.
+ SplashError curveTo(SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3);
+
+ // Close the last subpath, adding a line segment if necessary.
+ SplashError close();
+
+ // Add a stroke adjustment hint. The controlling segments are
+ // <ctrl0> and <ctrl1> (where segments are identified by their first
+ // point), and the points to be adjusted are <firstPt> .. <lastPt>.
+ void addStrokeAdjustHint(int ctrl0, int ctrl1, int firstPt, int lastPt);
+
+ // Add (<dx>, <dy>) to every point on this path.
+ void offset(SplashCoord dx, SplashCoord dy);
+
+ // Get the points on the path.
+ int getLength() { return length; }
+ void getPoint(int i, double *x, double *y, Guchar *f)
+ { *x = pts[i].x; *y = pts[i].y; *f = flags[i]; }
+
+ // Get the current point.
+ GBool getCurPt(SplashCoord *x, SplashCoord *y);
+
+protected:
+
+ SplashPath(SplashPath *path);
+ void grow(int nPts);
+ GBool noCurrentPoint() { return curSubpath == length; }
+ GBool onePointSubpath() { return curSubpath == length - 1; }
+ GBool openSubpath() { return curSubpath < length - 1; }
+
+ SplashPathPoint *pts; // array of points
+ Guchar *flags; // array of flags
+ int length, size; // length/size of the pts and flags arrays
+ int curSubpath; // index of first point in last subpath
+
+ SplashPathHint *hints; // list of hints
+ int hintsLength, hintsSize;
+
+ friend class SplashXPath;
+ friend class Splash;
+ // this is a temporary hack, until we read FreeType paths directly
+ friend class ArthurOutputDev;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.cc
new file mode 100644
index 00000000000..ce490785556
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.cc
@@ -0,0 +1,40 @@
+//========================================================================
+//
+// SplashPattern.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include "SplashMath.h"
+#include "SplashScreen.h"
+#include "SplashPattern.h"
+
+//------------------------------------------------------------------------
+// SplashPattern
+//------------------------------------------------------------------------
+
+SplashPattern::SplashPattern() {
+}
+
+SplashPattern::~SplashPattern() {
+}
+
+//------------------------------------------------------------------------
+// SplashSolidColor
+//------------------------------------------------------------------------
+
+SplashSolidColor::SplashSolidColor(SplashColorPtr colorA) {
+ splashColorCopy(color, colorA);
+}
+
+SplashSolidColor::~SplashSolidColor() {
+}
+
+void SplashSolidColor::getColor(int x, int y, SplashColorPtr c) {
+ splashColorCopy(c, color);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.h
new file mode 100644
index 00000000000..4e3d9abbfc4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashPattern.h
@@ -0,0 +1,63 @@
+//========================================================================
+//
+// SplashPattern.h
+//
+//========================================================================
+
+#ifndef SPLASHPATTERN_H
+#define SPLASHPATTERN_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+class SplashScreen;
+
+//------------------------------------------------------------------------
+// SplashPattern
+//------------------------------------------------------------------------
+
+class SplashPattern {
+public:
+
+ SplashPattern();
+
+ virtual SplashPattern *copy() = 0;
+
+ virtual ~SplashPattern();
+
+ // Return the color value for a specific pixel.
+ virtual void getColor(int x, int y, SplashColorPtr c) = 0;
+
+ // Returns true if this pattern object will return the same color
+ // value for all pixels.
+ virtual GBool isStatic() = 0;
+
+private:
+};
+
+//------------------------------------------------------------------------
+// SplashSolidColor
+//------------------------------------------------------------------------
+
+class SplashSolidColor: public SplashPattern {
+public:
+
+ SplashSolidColor(SplashColorPtr colorA);
+
+ virtual SplashPattern *copy() { return new SplashSolidColor(color); }
+
+ virtual ~SplashSolidColor();
+
+ virtual void getColor(int x, int y, SplashColorPtr c);
+
+ virtual GBool isStatic() { return gTrue; }
+
+private:
+
+ SplashColor color;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.cc
new file mode 100644
index 00000000000..f6be968fb49
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.cc
@@ -0,0 +1,383 @@
+//========================================================================
+//
+// SplashScreen.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashScreen.h"
+
+static SplashScreenParams defaultParams = {
+ splashScreenDispersed, // type
+ 2, // size
+ 2, // dotRadius
+ 1.0, // gamma
+ 0.0, // blackThreshold
+ 1.0 // whiteThreshold
+};
+
+//------------------------------------------------------------------------
+
+struct SplashScreenPoint {
+ int x, y;
+ int dist;
+};
+
+static int cmpDistances(const void *p0, const void *p1) {
+ return ((SplashScreenPoint *)p0)->dist - ((SplashScreenPoint *)p1)->dist;
+}
+
+//------------------------------------------------------------------------
+// SplashScreen
+//------------------------------------------------------------------------
+
+// If <clustered> is true, this generates a 45 degree screen using a
+// circular dot spot function. DPI = resolution / ((size / 2) *
+// sqrt(2)). If <clustered> is false, this generates an optimal
+// threshold matrix using recursive tesselation. Gamma correction
+// (gamma = 1 / 1.33) is also computed here.
+SplashScreen::SplashScreen(SplashScreenParams *params) {
+ Guchar u, black, white;
+ int i;
+
+ if (!params) {
+ params = &defaultParams;
+ }
+
+ switch (params->type) {
+
+ case splashScreenDispersed:
+ // size must be a power of 2
+ for (size = 1; size < params->size; size <<= 1) ;
+ mat = (Guchar *)gmallocn(size * size, sizeof(Guchar));
+ buildDispersedMatrix(size/2, size/2, 1, size/2, 1);
+ break;
+
+ case splashScreenClustered:
+ // size must be even
+ size = (params->size >> 1) << 1;
+ if (size < 2) {
+ size = 2;
+ }
+ mat = (Guchar *)gmallocn(size * size, sizeof(Guchar));
+ buildClusteredMatrix();
+ break;
+
+ case splashScreenStochasticClustered:
+ // size must be at least 2*r
+ if (params->size < 2 * params->dotRadius) {
+ size = 2 * params->dotRadius;
+ } else {
+ size = params->size;
+ }
+ mat = (Guchar *)gmallocn(size * size, sizeof(Guchar));
+ buildSCDMatrix(params->dotRadius);
+ break;
+ }
+
+ // do gamma correction and compute minVal/maxVal
+ minVal = 255;
+ maxVal = 0;
+ black = splashRound((SplashCoord)255.0 * params->blackThreshold);
+ if (black < 1) {
+ black = 1;
+ }
+ int whiteAux = splashRound((SplashCoord)255.0 * params->whiteThreshold);
+ if (whiteAux > 255) {
+ white = 255;
+ } else {
+ white = whiteAux;
+ }
+ for (i = 0; i < size * size; ++i) {
+ u = splashRound((SplashCoord)255.0 *
+ splashPow((SplashCoord)mat[i] / 255.0, params->gamma));
+ if (u < black) {
+ u = black;
+ } else if (u >= white) {
+ u = white;
+ }
+ mat[i] = u;
+ if (u < minVal) {
+ minVal = u;
+ } else if (u > maxVal) {
+ maxVal = u;
+ }
+ }
+}
+
+void SplashScreen::buildDispersedMatrix(int i, int j, int val,
+ int delta, int offset) {
+ if (delta == 0) {
+ // map values in [1, size^2] --> [1, 255]
+ mat[i * size + j] = 1 + (254 * (val - 1)) / (size * size - 1);
+ } else {
+ buildDispersedMatrix(i, j,
+ val, delta / 2, 4*offset);
+ buildDispersedMatrix((i + delta) % size, (j + delta) % size,
+ val + offset, delta / 2, 4*offset);
+ buildDispersedMatrix((i + delta) % size, j,
+ val + 2*offset, delta / 2, 4*offset);
+ buildDispersedMatrix((i + 2*delta) % size, (j + delta) % size,
+ val + 3*offset, delta / 2, 4*offset);
+ }
+}
+
+void SplashScreen::buildClusteredMatrix() {
+ SplashCoord *dist;
+ SplashCoord u, v, d;
+ Guchar val;
+ int size2, x, y, x1, y1, i;
+
+ size2 = size >> 1;
+
+ // initialize the threshold matrix
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size; ++x) {
+ mat[y * size + x] = 0;
+ }
+ }
+
+ // build the distance matrix
+ dist = (SplashCoord *)gmallocn(size * size2, sizeof(SplashCoord));
+ for (y = 0; y < size2; ++y) {
+ for (x = 0; x < size2; ++x) {
+ if (x + y < size2 - 1) {
+ u = (SplashCoord)x + 0.5 - 0;
+ v = (SplashCoord)y + 0.5 - 0;
+ } else {
+ u = (SplashCoord)x + 0.5 - (SplashCoord)size2;
+ v = (SplashCoord)y + 0.5 - (SplashCoord)size2;
+ }
+ dist[y * size2 + x] = u*u + v*v;
+ }
+ }
+ for (y = 0; y < size2; ++y) {
+ for (x = 0; x < size2; ++x) {
+ if (x < y) {
+ u = (SplashCoord)x + 0.5 - 0;
+ v = (SplashCoord)y + 0.5 - (SplashCoord)size2;
+ } else {
+ u = (SplashCoord)x + 0.5 - (SplashCoord)size2;
+ v = (SplashCoord)y + 0.5 - 0;
+ }
+ dist[(size2 + y) * size2 + x] = u*u + v*v;
+ }
+ }
+
+ // build the threshold matrix
+ minVal = 1;
+ maxVal = 0;
+ x1 = y1 = 0; // make gcc happy
+ for (i = 0; i < size * size2; ++i) {
+ d = -1;
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size2; ++x) {
+ if (mat[y * size + x] == 0 &&
+ dist[y * size2 + x] > d) {
+ x1 = x;
+ y1 = y;
+ d = dist[y1 * size2 + x1];
+ }
+ }
+ }
+ // map values in [0, 2*size*size2-1] --> [1, 255]
+ val = 1 + (254 * (2*i)) / (2*size*size2 - 1);
+ mat[y1 * size + x1] = val;
+ val = 1 + (254 * (2*i+1)) / (2*size*size2 - 1);
+ if (y1 < size2) {
+ mat[(y1 + size2) * size + x1 + size2] = val;
+ } else {
+ mat[(y1 - size2) * size + x1 + size2] = val;
+ }
+ }
+
+ gfree(dist);
+}
+
+// Compute the distance between two points on a toroid.
+int SplashScreen::distance(int x0, int y0, int x1, int y1) {
+ int dx0, dx1, dx, dy0, dy1, dy;
+
+ dx0 = abs(x0 - x1);
+ dx1 = size - dx0;
+ dx = dx0 < dx1 ? dx0 : dx1;
+ dy0 = abs(y0 - y1);
+ dy1 = size - dy0;
+ dy = dy0 < dy1 ? dy0 : dy1;
+ return dx * dx + dy * dy;
+}
+
+// Algorithm taken from:
+// Victor Ostromoukhov and Roger D. Hersch, "Stochastic Clustered-Dot
+// Dithering" in Color Imaging: Device-Independent Color, Color
+// Hardcopy, and Graphic Arts IV, SPIE Vol. 3648, pp. 496-505, 1999.
+void SplashScreen::buildSCDMatrix(int r) {
+ SplashScreenPoint *dots, *pts;
+ int dotsLen, dotsSize;
+ char *tmpl;
+ char *grid;
+ int *region, *dist;
+ int x, y, xx, yy, x0, x1, y0, y1, i, j, d, iMin, dMin, n;
+
+ //~ this should probably happen somewhere else
+ srand(123);
+
+ // generate the random space-filling curve
+ pts = (SplashScreenPoint *)gmallocn(size * size, sizeof(SplashScreenPoint));
+ i = 0;
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size; ++x) {
+ pts[i].x = x;
+ pts[i].y = y;
+ ++i;
+ }
+ }
+ for (i = 0; i < size * size; ++i) {
+ j = i + (int)((double)(size * size - i) *
+ (double)rand() / ((double)RAND_MAX + 1.0));
+ x = pts[i].x;
+ y = pts[i].y;
+ pts[i].x = pts[j].x;
+ pts[i].y = pts[j].y;
+ pts[j].x = x;
+ pts[j].y = y;
+ }
+
+ // construct the circle template
+ tmpl = (char *)gmallocn((r+1)*(r+1), sizeof(char));
+ for (y = 0; y <= r; ++y) {
+ for (x = 0; x <= r; ++x) {
+ tmpl[y*(r+1) + x] = (x * y <= r * r) ? 1 : 0;
+ }
+ }
+
+ // mark all grid cells as free
+ grid = (char *)gmallocn(size * size, sizeof(char));
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size; ++x) {
+ grid[y*size + x] = 0;
+ }
+ }
+
+ // walk the space-filling curve, adding dots
+ dotsLen = 0;
+ dotsSize = 32;
+ dots = (SplashScreenPoint *)gmallocn(dotsSize, sizeof(SplashScreenPoint));
+ for (i = 0; i < size * size; ++i) {
+ x = pts[i].x;
+ y = pts[i].y;
+ if (!grid[y*size + x]) {
+ if (dotsLen == dotsSize) {
+ dotsSize *= 2;
+ dots = (SplashScreenPoint *)greallocn(dots, dotsSize,
+ sizeof(SplashScreenPoint));
+ }
+ dots[dotsLen++] = pts[i];
+ for (yy = 0; yy <= r; ++yy) {
+ y0 = (y + yy) % size;
+ y1 = (y - yy + size) % size;
+ for (xx = 0; xx <= r; ++xx) {
+ if (tmpl[yy*(r+1) + xx]) {
+ x0 = (x + xx) % size;
+ x1 = (x - xx + size) % size;
+ grid[y0*size + x0] = 1;
+ grid[y0*size + x1] = 1;
+ grid[y1*size + x0] = 1;
+ grid[y1*size + x1] = 1;
+ }
+ }
+ }
+ }
+ }
+
+ gfree(tmpl);
+ gfree(grid);
+
+ // assign each cell to a dot, compute distance to center of dot
+ region = (int *)gmallocn(size * size, sizeof(int));
+ dist = (int *)gmallocn(size * size, sizeof(int));
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size; ++x) {
+ iMin = 0;
+ dMin = distance(dots[0].x, dots[0].y, x, y);
+ for (i = 1; i < dotsLen; ++i) {
+ d = distance(dots[i].x, dots[i].y, x, y);
+ if (d < dMin) {
+ iMin = i;
+ dMin = d;
+ }
+ }
+ region[y*size + x] = iMin;
+ dist[y*size + x] = dMin;
+ }
+ }
+
+ // compute threshold values
+ for (i = 0; i < dotsLen; ++i) {
+ n = 0;
+ for (y = 0; y < size; ++y) {
+ for (x = 0; x < size; ++x) {
+ if (region[y*size + x] == i) {
+ pts[n].x = x;
+ pts[n].y = y;
+ pts[n].dist = distance(dots[i].x, dots[i].y, x, y);
+ ++n;
+ }
+ }
+ }
+ qsort(pts, n, sizeof(SplashScreenPoint), &cmpDistances);
+ for (j = 0; j < n; ++j) {
+ // map values in [0 .. n-1] --> [255 .. 1]
+ mat[pts[j].y * size + pts[j].x] = 255 - (254 * j) / (n - 1);
+ }
+ }
+
+ gfree(pts);
+ gfree(region);
+ gfree(dist);
+
+ gfree(dots);
+}
+
+SplashScreen::SplashScreen(SplashScreen *screen) {
+ size = screen->size;
+ mat = (Guchar *)gmallocn(size * size, sizeof(Guchar));
+ memcpy(mat, screen->mat, size * size * sizeof(Guchar));
+ minVal = screen->minVal;
+ maxVal = screen->maxVal;
+}
+
+SplashScreen::~SplashScreen() {
+ gfree(mat);
+}
+
+int SplashScreen::test(int x, int y, Guchar value) {
+ int xx, yy;
+
+ if (value < minVal) {
+ return 0;
+ }
+ if (value >= maxVal) {
+ return 1;
+ }
+ if ((xx = x % size) < 0) {
+ xx = -xx;
+ }
+ if ((yy = y % size) < 0) {
+ yy = -yy;
+ }
+ return value < mat[yy * size + xx] ? 0 : 1;
+}
+
+GBool SplashScreen::isStatic(Guchar value) {
+ return value < minVal || value >= maxVal;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.h
new file mode 100644
index 00000000000..92639a561fc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashScreen.h
@@ -0,0 +1,53 @@
+//========================================================================
+//
+// SplashScreen.h
+//
+//========================================================================
+
+#ifndef SPLASHSCREEN_H
+#define SPLASHSCREEN_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+//------------------------------------------------------------------------
+// SplashScreen
+//------------------------------------------------------------------------
+
+class SplashScreen {
+public:
+
+ SplashScreen(SplashScreenParams *params);
+ SplashScreen(SplashScreen *screen);
+ ~SplashScreen();
+
+ SplashScreen *copy() { return new SplashScreen(this); }
+
+ // Return the computed pixel value (0=black, 1=white) for the gray
+ // level <value> at (<x>, <y>).
+ int test(int x, int y, Guchar value);
+
+ // Returns true if value is above the white threshold or below the
+ // black threshold, i.e., if the corresponding halftone will be
+ // solid white or black.
+ GBool isStatic(Guchar value);
+
+private:
+ void buildDispersedMatrix(int i, int j, int val,
+ int delta, int offset);
+ void buildClusteredMatrix();
+ int distance(int x0, int y0, int x1, int y1);
+ void buildSCDMatrix(int r);
+
+ Guchar *mat; // threshold matrix
+ int size; // size of the threshold matrix
+ Guchar minVal; // any pixel value below minVal generates
+ // solid black
+ Guchar maxVal; // any pixel value above maxVal generates
+ // solid white
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.cc
new file mode 100644
index 00000000000..b1fa2f566d6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.cc
@@ -0,0 +1,182 @@
+//========================================================================
+//
+// SplashState.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashPattern.h"
+#include "SplashScreen.h"
+#include "SplashClip.h"
+#include "SplashBitmap.h"
+#include "SplashState.h"
+
+//------------------------------------------------------------------------
+// SplashState
+//------------------------------------------------------------------------
+
+// number of components in each color mode
+int splashColorModeNComps[] = {
+ 1, 1, 3, 3, 4
+#if SPLASH_CMYK
+ ,4
+#endif
+};
+
+SplashState::SplashState(int width, int height, GBool vectorAntialias,
+ SplashScreenParams *screenParams) {
+ SplashColor color;
+
+ matrix[0] = 1; matrix[1] = 0;
+ matrix[2] = 0; matrix[3] = 1;
+ matrix[4] = 0; matrix[5] = 0;
+ memset(&color, 0, sizeof(SplashColor));
+ strokePattern = new SplashSolidColor(color);
+ fillPattern = new SplashSolidColor(color);
+ screen = new SplashScreen(screenParams);
+ blendFunc = NULL;
+ strokeAlpha = 1;
+ fillAlpha = 1;
+ lineWidth = 0;
+ lineCap = splashLineCapButt;
+ lineJoin = splashLineJoinMiter;
+ miterLimit = 10;
+ flatness = 1;
+ lineDash = NULL;
+ lineDashLength = 0;
+ lineDashPhase = 0;
+ strokeAdjust = gFalse;
+ clip = new SplashClip(0, 0, width - 0.001, height - 0.001, vectorAntialias);
+ softMask = NULL;
+ deleteSoftMask = gFalse;
+ inNonIsolatedGroup = gFalse;
+ next = NULL;
+}
+
+SplashState::SplashState(int width, int height, GBool vectorAntialias,
+ SplashScreen *screenA) {
+ SplashColor color;
+
+ matrix[0] = 1; matrix[1] = 0;
+ matrix[2] = 0; matrix[3] = 1;
+ matrix[4] = 0; matrix[5] = 0;
+ memset(&color, 0, sizeof(SplashColor));
+ strokePattern = new SplashSolidColor(color);
+ fillPattern = new SplashSolidColor(color);
+ screen = screenA->copy();
+ blendFunc = NULL;
+ strokeAlpha = 1;
+ fillAlpha = 1;
+ lineWidth = 0;
+ lineCap = splashLineCapButt;
+ lineJoin = splashLineJoinMiter;
+ miterLimit = 10;
+ flatness = 1;
+ lineDash = NULL;
+ lineDashLength = 0;
+ lineDashPhase = 0;
+ strokeAdjust = gFalse;
+ clip = new SplashClip(0, 0, width - 0.001, height - 0.001, vectorAntialias);
+ softMask = NULL;
+ deleteSoftMask = gFalse;
+ inNonIsolatedGroup = gFalse;
+ next = NULL;
+}
+
+SplashState::SplashState(SplashState *state) {
+ memcpy(matrix, state->matrix, 6 * sizeof(SplashCoord));
+ strokePattern = state->strokePattern->copy();
+ fillPattern = state->fillPattern->copy();
+ screen = state->screen->copy();
+ blendFunc = state->blendFunc;
+ strokeAlpha = state->strokeAlpha;
+ fillAlpha = state->fillAlpha;
+ lineWidth = state->lineWidth;
+ lineCap = state->lineCap;
+ lineJoin = state->lineJoin;
+ miterLimit = state->miterLimit;
+ flatness = state->flatness;
+ if (state->lineDash) {
+ lineDashLength = state->lineDashLength;
+ lineDash = (SplashCoord *)gmallocn(lineDashLength, sizeof(SplashCoord));
+ memcpy(lineDash, state->lineDash, lineDashLength * sizeof(SplashCoord));
+ } else {
+ lineDash = NULL;
+ lineDashLength = 0;
+ }
+ lineDashPhase = state->lineDashPhase;
+ strokeAdjust = state->strokeAdjust;
+ clip = state->clip->copy();
+ softMask = state->softMask;
+ deleteSoftMask = gFalse;
+ inNonIsolatedGroup = state->inNonIsolatedGroup;
+ next = NULL;
+}
+
+SplashState::~SplashState() {
+ delete strokePattern;
+ delete fillPattern;
+ delete screen;
+ gfree(lineDash);
+ delete clip;
+ if (deleteSoftMask && softMask) {
+ delete softMask;
+ }
+}
+
+void SplashState::setStrokePattern(SplashPattern *strokePatternA) {
+ delete strokePattern;
+ strokePattern = strokePatternA;
+}
+
+void SplashState::setFillPattern(SplashPattern *fillPatternA) {
+ delete fillPattern;
+ fillPattern = fillPatternA;
+}
+
+void SplashState::setScreen(SplashScreen *screenA) {
+ delete screen;
+ screen = screenA;
+}
+
+void SplashState::setLineDash(SplashCoord *lineDashA, int lineDashLengthA,
+ SplashCoord lineDashPhaseA) {
+ gfree(lineDash);
+ lineDashLength = lineDashLengthA;
+ if (lineDashLength > 0) {
+ lineDash = (SplashCoord *)gmallocn(lineDashLength, sizeof(SplashCoord));
+ memcpy(lineDash, lineDashA, lineDashLength * sizeof(SplashCoord));
+ } else {
+ lineDash = NULL;
+ }
+ lineDashPhase = lineDashPhaseA;
+}
+
+void SplashState::setSoftMask(SplashBitmap *softMaskA) {
+ if (deleteSoftMask) {
+ delete softMask;
+ }
+ softMask = softMaskA;
+ deleteSoftMask = gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.h
new file mode 100644
index 00000000000..d0e05df3d28
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashState.h
@@ -0,0 +1,101 @@
+//========================================================================
+//
+// SplashState.h
+//
+//========================================================================
+
+#ifndef SPLASHSTATE_H
+#define SPLASHSTATE_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+class SplashPattern;
+class SplashScreen;
+class SplashClip;
+class SplashBitmap;
+
+//------------------------------------------------------------------------
+// line cap values
+//------------------------------------------------------------------------
+
+#define splashLineCapButt 0
+#define splashLineCapRound 1
+#define splashLineCapProjecting 2
+
+//------------------------------------------------------------------------
+// line join values
+//------------------------------------------------------------------------
+
+#define splashLineJoinMiter 0
+#define splashLineJoinRound 1
+#define splashLineJoinBevel 2
+
+//------------------------------------------------------------------------
+// SplashState
+//------------------------------------------------------------------------
+
+class SplashState {
+public:
+
+ // Create a new state object, initialized with default settings.
+ SplashState(int width, int height, GBool vectorAntialias,
+ SplashScreenParams *screenParams);
+ SplashState(int width, int height, GBool vectorAntialias,
+ SplashScreen *screenA);
+
+ // Copy a state object.
+ SplashState *copy() { return new SplashState(this); }
+
+ ~SplashState();
+
+ // Set the stroke pattern. This does not copy <strokePatternA>.
+ void setStrokePattern(SplashPattern *strokePatternA);
+
+ // Set the fill pattern. This does not copy <fillPatternA>.
+ void setFillPattern(SplashPattern *fillPatternA);
+
+ // Set the screen. This does not copy <screenA>.
+ void setScreen(SplashScreen *screenA);
+
+ // Set the line dash pattern. This copies the <lineDashA> array.
+ void setLineDash(SplashCoord *lineDashA, int lineDashLengthA,
+ SplashCoord lineDashPhaseA);
+
+ // Set the soft mask bitmap.
+ void setSoftMask(SplashBitmap *softMaskA);
+
+private:
+
+ SplashState(SplashState *state);
+
+ SplashCoord matrix[6];
+ SplashPattern *strokePattern;
+ SplashPattern *fillPattern;
+ SplashScreen *screen;
+ SplashBlendFunc blendFunc;
+ SplashCoord strokeAlpha;
+ SplashCoord fillAlpha;
+ SplashCoord lineWidth;
+ int lineCap;
+ int lineJoin;
+ SplashCoord miterLimit;
+ SplashCoord flatness;
+ SplashCoord *lineDash;
+ int lineDashLength;
+ SplashCoord lineDashPhase;
+ GBool strokeAdjust;
+ SplashClip *clip;
+ SplashBitmap *softMask;
+ GBool deleteSoftMask;
+ GBool inNonIsolatedGroup;
+
+ SplashState *next; // used by Splash class
+
+ friend class Splash;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.cc
new file mode 100644
index 00000000000..536c5605ba9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.cc
@@ -0,0 +1,306 @@
+//========================================================================
+//
+// SplashT1Font.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <t1lib.h>
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashGlyphBitmap.h"
+#include "SplashPath.h"
+#include "SplashT1FontEngine.h"
+#include "SplashT1FontFile.h"
+#include "SplashT1Font.h"
+
+//------------------------------------------------------------------------
+
+static Guchar bitReverse[256] = {
+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
+};
+
+//------------------------------------------------------------------------
+// SplashT1Font
+//------------------------------------------------------------------------
+
+SplashT1Font::SplashT1Font(SplashT1FontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA):
+ SplashFont(fontFileA, matA, textMatA, fontFileA->engine->aa)
+{
+ T1_TMATRIX matrix;
+ BBox bbox;
+ SplashCoord bbx0, bby0, bbx1, bby1;
+ int x, y;
+
+ t1libID = T1_CopyFont(fontFileA->t1libID);
+ outlineID = -1;
+
+ // compute font size
+ size = (float)splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]);
+
+ // transform the four corners of the font bounding box -- the min
+ // and max values form the bounding box of the transformed font
+ bbox = T1_GetFontBBox(t1libID);
+ bbx0 = 0.001 * bbox.llx;
+ bby0 = 0.001 * bbox.lly;
+ bbx1 = 0.001 * bbox.urx;
+ bby1 = 0.001 * bbox.ury;
+ // some fonts are completely broken, so we fake it (with values
+ // large enough that most glyphs should fit)
+ if (bbx0 == 0 && bby0 == 0 && bbx1 == 0 && bby1 == 0) {
+ bbx0 = bby0 = -0.5;
+ bbx1 = bby1 = 1.5;
+ }
+ x = (int)(mat[0] * bbx0 + mat[2] * bby0);
+ xMin = xMax = x;
+ y = (int)(mat[1] * bbx0 + mat[3] * bby0);
+ yMin = yMax = y;
+ x = (int)(mat[0] * bbx0 + mat[2] * bby1);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)(mat[1] * bbx0 + mat[3] * bby1);
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ x = (int)(mat[0] * bbx1 + mat[2] * bby0);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)(mat[1] * bbx1 + mat[3] * bby0);
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ x = (int)(mat[0] * bbx1 + mat[2] * bby1);
+ if (x < xMin) {
+ xMin = x;
+ } else if (x > xMax) {
+ xMax = x;
+ }
+ y = (int)(mat[1] * bbx1 + mat[3] * bby1);
+ if (y < yMin) {
+ yMin = y;
+ } else if (y > yMax) {
+ yMax = y;
+ }
+ // This is a kludge: some buggy PDF generators embed fonts with
+ // zero bounding boxes.
+ if (xMax == xMin) {
+ xMin = 0;
+ xMax = (int)size;
+ }
+ if (yMax == yMin) {
+ yMin = 0;
+ yMax = (int)(1.2 * size);
+ }
+ // Another kludge: an unusually large xMin or yMin coordinate is
+ // probably wrong.
+ if (xMin > 0) {
+ xMin = 0;
+ }
+ if (yMin > 0) {
+ yMin = 0;
+ }
+ // Another kludge: t1lib doesn't correctly handle fonts with
+ // real (non-integer) bounding box coordinates.
+ if (xMax - xMin > 5000) {
+ xMin = 0;
+ xMax = (int)size;
+ }
+ if (yMax - yMin > 5000) {
+ yMin = 0;
+ yMax = (int)(1.2 * size);
+ }
+
+ // transform the font
+ matrix.cxx = (double)mat[0] / size;
+ matrix.cxy = (double)mat[1] / size;
+ matrix.cyx = (double)mat[2] / size;
+ matrix.cyy = (double)mat[3] / size;
+ T1_TransformFont(t1libID, &matrix);
+}
+
+SplashT1Font::~SplashT1Font() {
+ T1_DeleteFont(t1libID);
+ if (outlineID >= 0) {
+ T1_DeleteFont(outlineID);
+ }
+}
+
+GBool SplashT1Font::getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) {
+ return SplashFont::getGlyph(c, 0, 0, bitmap, x0, y0, clip, clipRes);
+}
+
+GBool SplashT1Font::makeGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) {
+ GLYPH *glyph;
+ int n, i;
+
+ if (aa) {
+ glyph = T1_AASetChar(t1libID, c, size, NULL);
+ } else {
+ glyph = T1_SetChar(t1libID, c, size, NULL);
+ }
+ if (!glyph) {
+ return gFalse;
+ }
+
+ bitmap->x = -glyph->metrics.leftSideBearing;
+ bitmap->y = glyph->metrics.ascent;
+ bitmap->w = glyph->metrics.rightSideBearing - glyph->metrics.leftSideBearing;
+ bitmap->h = glyph->metrics.ascent - glyph->metrics.descent;
+ bitmap->aa = aa;
+ if (aa) {
+ bitmap->data = (Guchar *)glyph->bits;
+ bitmap->freeData = gFalse;
+ } else {
+ n = bitmap->h * ((bitmap->w + 7) >> 3);
+ bitmap->data = (Guchar *)gmalloc(n);
+ for (i = 0; i < n; ++i) {
+ bitmap->data[i] = bitReverse[glyph->bits[i] & 0xff];
+ }
+ bitmap->freeData = gTrue;
+ }
+
+ *clipRes = clip->testRect(x0 - bitmap->x,
+ y0 - bitmap->y,
+ x0 - bitmap->x + bitmap->w - 1,
+ y0 - bitmap->y + bitmap->h - 1);
+
+ return gTrue;
+}
+
+SplashPath *SplashT1Font::getGlyphPath(int c) {
+ T1_TMATRIX matrix;
+ SplashPath *path;
+ T1_OUTLINE *outline;
+ T1_PATHSEGMENT *seg;
+ T1_BEZIERSEGMENT *bez;
+ SplashCoord x, y, x1, y1;
+ GBool needClose;
+
+ if (outlineID < 0) {
+ outlineID = T1_CopyFont(((SplashT1FontFile *)fontFile)->t1libID);
+ outlineSize = (float)splashSqrt(textMat[2]*textMat[2] +
+ textMat[3]*textMat[3]);
+ matrix.cxx = (double)textMat[0] / outlineSize;
+ matrix.cxy = (double)textMat[1] / outlineSize;
+ matrix.cyx = (double)textMat[2] / outlineSize;
+ matrix.cyy = (double)textMat[3] / outlineSize;
+ // t1lib doesn't seem to handle small sizes correctly here, so set
+ // the size to 1000, and scale the resulting coordinates later
+ outlineMul = (float)(outlineSize / 65536000.0);
+ outlineSize = 1000;
+ T1_TransformFont(outlineID, &matrix);
+ }
+
+ path = new SplashPath();
+ if ((outline = T1_GetCharOutline(outlineID, c, outlineSize, NULL))) {
+ x = 0;
+ y = 0;
+ needClose = gFalse;
+ for (seg = outline; seg; seg = seg->link) {
+ switch (seg->type) {
+ case T1_PATHTYPE_MOVE:
+ if (needClose) {
+ path->close();
+ needClose = gFalse;
+ }
+ x += seg->dest.x * outlineMul;
+ y += seg->dest.y * outlineMul;
+ path->moveTo(x, -y);
+ break;
+ case T1_PATHTYPE_LINE:
+ x += seg->dest.x * outlineMul;
+ y += seg->dest.y * outlineMul;
+ path->lineTo(x, -y);
+ needClose = gTrue;
+ break;
+ case T1_PATHTYPE_BEZIER:
+ bez = (T1_BEZIERSEGMENT *)seg;
+ x1 = x + (SplashCoord)(bez->dest.x * outlineMul);
+ y1 = y + (SplashCoord)(bez->dest.y * outlineMul);
+ path->curveTo(x + (SplashCoord)(bez->B.x * outlineMul),
+ -(y + (SplashCoord)(bez->B.y * outlineMul)),
+ x + (SplashCoord)(bez->C.x * outlineMul),
+ -(y + (SplashCoord)(bez->C.y * outlineMul)),
+ x1, -y1);
+ x = x1;
+ y = y1;
+ needClose = gTrue;
+ break;
+ }
+ }
+ if (needClose) {
+ path->close();
+ }
+ T1_FreeOutline(outline);
+ }
+
+ return path;
+}
+
+#endif // HAVE_T1LIB_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.h
new file mode 100644
index 00000000000..1dbe66cd7fc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1Font.h
@@ -0,0 +1,69 @@
+//========================================================================
+//
+// SplashT1Font.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHT1FONT_H
+#define SPLASHT1FONT_H
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashFont.h"
+
+class SplashT1FontFile;
+
+//------------------------------------------------------------------------
+// SplashT1Font
+//------------------------------------------------------------------------
+
+class SplashT1Font: public SplashFont {
+public:
+
+ SplashT1Font(SplashT1FontFile *fontFileA, SplashCoord *matA,
+ SplashCoord *textMatA);
+
+ virtual ~SplashT1Font();
+
+ // Munge xFrac and yFrac before calling SplashFont::getGlyph.
+ virtual GBool getGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+
+ // Rasterize a glyph. The <xFrac> and <yFrac> values are the same
+ // as described for getGlyph.
+ virtual GBool makeGlyph(int c, int xFrac, int yFrac,
+ SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+
+ // Return the path for a glyph.
+ virtual SplashPath *getGlyphPath(int c);
+
+private:
+
+ int t1libID; // t1lib font ID
+ int outlineID; // t1lib font ID for glyph outlines
+ float size;
+ float outlineSize; // size for glyph outlines
+ float outlineMul;
+};
+
+#endif // HAVE_T1LIB_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.cc
new file mode 100644
index 00000000000..a09a8839abf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.cc
@@ -0,0 +1,138 @@
+//========================================================================
+//
+// SplashT1FontEngine.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <t1lib.h>
+#include "goo/GooString.h"
+#include "goo/gfile.h"
+#include "fofi/FoFiType1C.h"
+#include "SplashT1FontFile.h"
+#include "SplashT1FontEngine.h"
+
+#ifdef VMS
+#if (__VMS_VER < 70000000)
+extern "C" int unlink(char *filename);
+#endif
+#endif
+
+//------------------------------------------------------------------------
+
+int SplashT1FontEngine::t1libInitCount = 0;
+
+//------------------------------------------------------------------------
+
+static void fileWrite(void *stream, char *data, int len) {
+ fwrite(data, 1, len, (FILE *)stream);
+}
+
+//------------------------------------------------------------------------
+// SplashT1FontEngine
+//------------------------------------------------------------------------
+
+SplashT1FontEngine::SplashT1FontEngine(GBool aaA) {
+ aa = aaA;
+}
+
+SplashT1FontEngine *SplashT1FontEngine::init(GBool aaA) {
+ // grayVals[i] = round(i * 255 / 16)
+ static unsigned long grayVals[17] = {
+ 0, 16, 32, 48, 64, 80, 96, 112, 128, 143, 159, 175, 191, 207, 223, 239, 255
+ };
+
+ //~ for multithreading: need a mutex here
+ if (t1libInitCount == 0) {
+ T1_SetBitmapPad(8);
+ if (!T1_InitLib(NO_LOGFILE | IGNORE_CONFIGFILE | IGNORE_FONTDATABASE |
+ T1_NO_AFM)) {
+ return NULL;
+ }
+ if (aaA) {
+ T1_AASetBitsPerPixel(8);
+ T1_AASetLevel(T1_AA_HIGH);
+ T1_AAHSetGrayValues(grayVals);
+ } else {
+ T1_AANSetGrayValues(0, 1);
+ }
+ }
+ ++t1libInitCount;
+
+ return new SplashT1FontEngine(aaA);
+}
+
+SplashT1FontEngine::~SplashT1FontEngine() {
+ //~ for multithreading: need a mutex here
+ if (--t1libInitCount == 0) {
+ T1_CloseLib();
+ }
+}
+
+SplashFontFile *SplashT1FontEngine::loadType1Font(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ return SplashT1FontFile::loadType1Font(this, idA, src, enc);
+}
+
+SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **enc) {
+ FoFiType1C *ff;
+ GooString *tmpFileName;
+ FILE *tmpFile;
+ SplashFontFile *ret;
+
+ SplashFontSrc *newsrc;
+
+ if (src->isFile)
+ ff = FoFiType1C::load(src->fileName->getCString());
+ else
+ ff = FoFiType1C::make(src->buf, src->bufLen);
+ if (! ff)
+ return NULL;
+
+ tmpFileName = NULL;
+ if (!openTempFile(&tmpFileName, &tmpFile, "wb")) {
+ delete ff;
+ return NULL;
+ }
+ ff->convertToType1(NULL, NULL, gTrue, &fileWrite, tmpFile);
+ delete ff;
+ fclose(tmpFile);
+ newsrc = new SplashFontSrc;
+ newsrc->setFile(tmpFileName, gTrue);
+ delete tmpFileName;
+ ret = SplashT1FontFile::loadType1Font(this, idA, newsrc, enc);
+ newsrc->unref();
+ return ret;
+}
+
+#endif // HAVE_T1LIB_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.h
new file mode 100644
index 00000000000..ffc285bd6d4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontEngine.h
@@ -0,0 +1,50 @@
+//========================================================================
+//
+// SplashT1FontEngine.h
+//
+//========================================================================
+
+#ifndef SPLASHT1FONTENGINE_H
+#define SPLASHT1FONTENGINE_H
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "goo/gtypes.h"
+
+class SplashFontFile;
+class SplashFontFileID;
+class SplashFontSrc;
+
+//------------------------------------------------------------------------
+// SplashT1FontEngine
+//------------------------------------------------------------------------
+
+class SplashT1FontEngine {
+public:
+
+ static SplashT1FontEngine *init(GBool aaA);
+
+ ~SplashT1FontEngine();
+
+ // Load fonts.
+ SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+ SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
+
+private:
+
+ SplashT1FontEngine(GBool aaA);
+
+ static int t1libInitCount;
+ GBool aa;
+
+ friend class SplashT1FontFile;
+ friend class SplashT1Font;
+};
+
+#endif // HAVE_T1LIB_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.cc
new file mode 100644
index 00000000000..3f46ba630d4
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.cc
@@ -0,0 +1,134 @@
+//========================================================================
+//
+// SplashT1FontFile.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <string.h>
+#include <t1lib.h>
+#include "goo/GooString.h"
+#include "goo/gfile.h"
+#include "goo/gmem.h"
+#include "SplashT1FontEngine.h"
+#include "SplashT1Font.h"
+#include "SplashT1FontFile.h"
+
+//------------------------------------------------------------------------
+// SplashT1FontFile
+//------------------------------------------------------------------------
+
+SplashFontFile *SplashT1FontFile::loadType1Font(SplashT1FontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **encA) {
+ int t1libIDA;
+ char **encTmp;
+ char *encStrTmp;
+ int encStrSize;
+ char *encPtr;
+ int i;
+
+ GooString *fileNameA;
+ SplashFontSrc *newsrc = NULL;
+ SplashFontFile *ff;
+
+ if (! src->isFile) {
+ GooString *tmpFileName;
+ FILE *tmpFile;
+ if (!openTempFile(&tmpFileName, &tmpFile, "wb"))
+ return NULL;
+ fwrite(src->buf, 1, src->bufLen, tmpFile);
+ fclose(tmpFile);
+ newsrc = new SplashFontSrc;
+ newsrc->setFile(tmpFileName, gTrue);
+ src = newsrc;
+ delete tmpFileName;
+ }
+ fileNameA = src->fileName;
+ // load the font file
+ if ((t1libIDA = T1_AddFont(fileNameA->getCString())) < 0) {
+ delete newsrc;
+ return NULL;
+ }
+ T1_LoadFont(t1libIDA);
+
+ // reencode it
+ encStrSize = 0;
+ for (i = 0; i < 256; ++i) {
+ if (encA[i]) {
+ encStrSize += strlen(encA[i]) + 1;
+ }
+ }
+ encTmp = (char **)gmallocn(257, sizeof(char *));
+ encStrTmp = (char *)gmallocn(encStrSize, sizeof(char));
+ encPtr = encStrTmp;
+ for (i = 0; i < 256; ++i) {
+ if (encA[i]) {
+ strcpy(encPtr, encA[i]);
+ encTmp[i] = encPtr;
+ encPtr += strlen(encPtr) + 1;
+ } else {
+ encTmp[i] = ".notdef";
+ }
+ }
+ encTmp[256] = "custom";
+ T1_ReencodeFont(t1libIDA, encTmp);
+
+ ff = new SplashT1FontFile(engineA, idA, src,
+ t1libIDA, encTmp, encStrTmp);
+ if (newsrc)
+ newsrc->unref();
+ return ff;
+}
+
+SplashT1FontFile::SplashT1FontFile(SplashT1FontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *srcA,
+ int t1libIDA, char **encA, char *encStrA):
+ SplashFontFile(idA, srcA)
+{
+ engine = engineA;
+ t1libID = t1libIDA;
+ enc = encA;
+ encStr = encStrA;
+}
+
+SplashT1FontFile::~SplashT1FontFile() {
+ gfree(encStr);
+ gfree(enc);
+ T1_DeleteFont(t1libID);
+}
+
+SplashFont *SplashT1FontFile::makeFont(SplashCoord *mat,
+ SplashCoord *textMat) {
+ SplashFont *font;
+
+ font = new SplashT1Font(this, mat, textMat);
+ font->initCache();
+ return font;
+}
+
+#endif // HAVE_T1LIB_H
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.h
new file mode 100644
index 00000000000..24c958bc0cd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashT1FontFile.h
@@ -0,0 +1,70 @@
+//========================================================================
+//
+// SplashT1FontFile.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHT1FONTFILE_H
+#define SPLASHT1FONTFILE_H
+
+#if HAVE_T1LIB_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashFontFile.h"
+
+class SplashT1FontEngine;
+
+//------------------------------------------------------------------------
+// SplashT1FontFile
+//------------------------------------------------------------------------
+
+class SplashT1FontFile: public SplashFontFile {
+public:
+
+ static SplashFontFile *loadType1Font(SplashT1FontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ char **encA);
+
+ virtual ~SplashT1FontFile();
+
+ // Create a new SplashT1Font, i.e., a scaled instance of this font
+ // file.
+ virtual SplashFont *makeFont(SplashCoord *mat,
+ SplashCoord *textMat);
+
+private:
+
+ SplashT1FontFile(SplashT1FontEngine *engineA,
+ SplashFontFileID *idA,
+ SplashFontSrc *src,
+ int t1libIDA, char **encA, char *encStrA);
+
+ SplashT1FontEngine *engine;
+ int t1libID; // t1lib font ID
+ char **enc;
+ char *encStr;
+
+ friend class SplashT1Font;
+};
+
+#endif // HAVE_T1LIB_H
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashTypes.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashTypes.h
new file mode 100644
index 00000000000..a8686520f91
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashTypes.h
@@ -0,0 +1,153 @@
+//========================================================================
+//
+// SplashTypes.h
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
+// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef SPLASHTYPES_H
+#define SPLASHTYPES_H
+
+#include "goo/gtypes.h"
+
+//------------------------------------------------------------------------
+// coordinates
+//------------------------------------------------------------------------
+
+#if USE_FIXEDPOINT
+#include "goo/FixedPoint.h"
+typedef FixedPoint SplashCoord;
+#else
+typedef double SplashCoord;
+#endif
+
+//------------------------------------------------------------------------
+// antialiasing
+//------------------------------------------------------------------------
+
+#define splashAASize 4
+
+//------------------------------------------------------------------------
+// colors
+//------------------------------------------------------------------------
+
+enum SplashColorMode {
+ splashModeMono1, // 1 bit per component, 8 pixels per byte,
+ // MSbit is on the left
+ splashModeMono8, // 1 byte per component, 1 byte per pixel
+ splashModeRGB8, // 1 byte per component, 3 bytes per pixel:
+ // RGBRGB...
+ splashModeBGR8, // 1 byte per component, 3 bytes per pixel:
+ // BGRBGR...
+ splashModeXBGR8 // 1 byte per component, 4 bytes per pixel:
+ // XBGRXBGR...
+#if SPLASH_CMYK
+ ,
+ splashModeCMYK8 // 1 byte per component, 4 bytes per pixel:
+ // CMYKCMYK...
+#endif
+};
+
+// number of components in each color mode
+// (defined in SplashState.cc)
+extern int splashColorModeNComps[];
+
+// max number of components in any SplashColor
+#define splashMaxColorComps 4
+
+typedef Guchar SplashColor[splashMaxColorComps];
+typedef Guchar *SplashColorPtr;
+
+// RGB8
+static inline Guchar splashRGB8R(SplashColorPtr rgb8) { return rgb8[0]; }
+static inline Guchar splashRGB8G(SplashColorPtr rgb8) { return rgb8[1]; }
+static inline Guchar splashRGB8B(SplashColorPtr rgb8) { return rgb8[2]; }
+
+// BGR8
+static inline Guchar splashBGR8R(SplashColorPtr bgr8) { return bgr8[2]; }
+static inline Guchar splashBGR8G(SplashColorPtr bgr8) { return bgr8[1]; }
+static inline Guchar splashBGR8B(SplashColorPtr bgr8) { return bgr8[0]; }
+
+#if SPLASH_CMYK
+// CMYK8
+static inline Guchar splashCMYK8C(SplashColorPtr cmyk8) { return cmyk8[0]; }
+static inline Guchar splashCMYK8M(SplashColorPtr cmyk8) { return cmyk8[1]; }
+static inline Guchar splashCMYK8Y(SplashColorPtr cmyk8) { return cmyk8[2]; }
+static inline Guchar splashCMYK8K(SplashColorPtr cmyk8) { return cmyk8[3]; }
+#endif
+
+static inline void splashClearColor(SplashColorPtr dest) {
+ dest[0] = 0;
+ dest[1] = 0;
+ dest[2] = 0;
+#if SPLASH_CMYK
+ dest[3] = 0;
+#endif
+}
+
+static inline void splashColorCopy(SplashColorPtr dest, SplashColorPtr src) {
+ dest[0] = src[0];
+ dest[1] = src[1];
+ dest[2] = src[2];
+#if SPLASH_CMYK
+ dest[3] = src[3];
+#endif
+}
+
+static inline void splashColorXor(SplashColorPtr dest, SplashColorPtr src) {
+ dest[0] ^= src[0];
+ dest[1] ^= src[1];
+ dest[2] ^= src[2];
+#if SPLASH_CMYK
+ dest[3] ^= src[3];
+#endif
+}
+
+//------------------------------------------------------------------------
+// blend functions
+//------------------------------------------------------------------------
+
+typedef void (*SplashBlendFunc)(SplashColorPtr src, SplashColorPtr dest,
+ SplashColorPtr blend, SplashColorMode cm);
+
+//------------------------------------------------------------------------
+// screen parameters
+//------------------------------------------------------------------------
+
+enum SplashScreenType {
+ splashScreenDispersed,
+ splashScreenClustered,
+ splashScreenStochasticClustered
+};
+
+struct SplashScreenParams {
+ SplashScreenType type;
+ int size;
+ int dotRadius;
+ SplashCoord gamma;
+ SplashCoord blackThreshold;
+ SplashCoord whiteThreshold;
+};
+
+//------------------------------------------------------------------------
+// error results
+//------------------------------------------------------------------------
+
+typedef int SplashError;
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.cc
new file mode 100644
index 00000000000..d7e114d5d03
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.cc
@@ -0,0 +1,443 @@
+//========================================================================
+//
+// SplashXPath.cc
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashPath.h"
+#include "SplashXPath.h"
+
+//------------------------------------------------------------------------
+
+struct SplashXPathPoint {
+ SplashCoord x, y;
+};
+
+struct SplashXPathAdjust {
+ int firstPt, lastPt; // range of points
+ GBool vert; // vertical or horizontal hint
+ SplashCoord x0a, x0b, // hint boundaries
+ xma, xmb,
+ x1a, x1b;
+ SplashCoord x0, x1, xm; // adjusted coordinates
+};
+
+//------------------------------------------------------------------------
+
+// Transform a point from user space to device space.
+inline void SplashXPath::transform(SplashCoord *matrix,
+ SplashCoord xi, SplashCoord yi,
+ SplashCoord *xo, SplashCoord *yo) {
+ // [ m[0] m[1] 0 ]
+ // [xo yo 1] = [xi yi 1] * [ m[2] m[3] 0 ]
+ // [ m[4] m[5] 1 ]
+ *xo = xi * matrix[0] + yi * matrix[2] + matrix[4];
+ *yo = xi * matrix[1] + yi * matrix[3] + matrix[5];
+}
+
+//------------------------------------------------------------------------
+// SplashXPath
+//------------------------------------------------------------------------
+
+SplashXPath::SplashXPath() {
+ segs = NULL;
+ length = size = 0;
+}
+
+SplashXPath::SplashXPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness, GBool closeSubpaths) {
+ SplashPathHint *hint;
+ SplashXPathPoint *pts;
+ SplashXPathAdjust *adjusts, *adjust;
+ SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xsp, ysp;
+ SplashCoord adj0, adj1, w;
+ int ww;
+ int curSubpath, curSubpathX, i, j;
+
+ // transform the points
+ pts = (SplashXPathPoint *)gmallocn(path->length, sizeof(SplashXPathPoint));
+ for (i = 0; i < path->length; ++i) {
+ transform(matrix, path->pts[i].x, path->pts[i].y, &pts[i].x, &pts[i].y);
+ }
+
+ // set up the stroke adjustment hints
+ if (path->hints) {
+ adjusts = (SplashXPathAdjust *)gmallocn(path->hintsLength,
+ sizeof(SplashXPathAdjust));
+ for (i = 0; i < path->hintsLength; ++i) {
+ hint = &path->hints[i];
+ if (hint->ctrl0 + 1 >= path->length || hint->ctrl1 + 1 >= path->length) {
+ gfree(adjusts);
+ adjusts = NULL;
+ break;
+ }
+ x0 = pts[hint->ctrl0 ].x; y0 = pts[hint->ctrl0 ].y;
+ x1 = pts[hint->ctrl0 + 1].x; y1 = pts[hint->ctrl0 + 1].y;
+ x2 = pts[hint->ctrl1 ].x; y2 = pts[hint->ctrl1 ].y;
+ x3 = pts[hint->ctrl1 + 1].x; y3 = pts[hint->ctrl1 + 1].y;
+ if (x0 == x1 && x2 == x3) {
+ adjusts[i].vert = gTrue;
+ adj0 = x0;
+ adj1 = x2;
+ } else if (y0 == y1 && y2 == y3) {
+ adjusts[i].vert = gFalse;
+ adj0 = y0;
+ adj1 = y2;
+ } else {
+ gfree(adjusts);
+ adjusts = NULL;
+ break;
+ }
+ if (adj0 > adj1) {
+ x0 = adj0;
+ adj0 = adj1;
+ adj1 = x0;
+ }
+ w = adj1 - adj0;
+ ww = splashRound(w);
+ if (ww == 0) {
+ ww = 1;
+ }
+ adjusts[i].x0a = adj0 - 0.01;
+ adjusts[i].x0b = adj0 + 0.01;
+ adjusts[i].xma = (SplashCoord)0.5 * (adj0 + adj1) - 0.01;
+ adjusts[i].xmb = (SplashCoord)0.5 * (adj0 + adj1) + 0.01;
+ adjusts[i].x1a = adj1 - 0.01;
+ adjusts[i].x1b = adj1 + 0.01;
+ adjusts[i].x0 = (SplashCoord)splashRound(adj0);
+ adjusts[i].x1 = adjusts[i].x0 + ww - 0.01;
+ adjusts[i].xm = (SplashCoord)0.5 * (adjusts[i].x0 + adjusts[i].x1);
+ adjusts[i].firstPt = hint->firstPt;
+ adjusts[i].lastPt = hint->lastPt;
+ }
+
+ } else {
+ adjusts = NULL;
+ }
+
+ // perform stroke adjustment
+ if (adjusts) {
+ for (i = 0, adjust = adjusts; i < path->hintsLength; ++i, ++adjust) {
+ for (j = adjust->firstPt; j <= adjust->lastPt; ++j) {
+ strokeAdjust(adjust, &pts[j].x, &pts[j].y);
+ }
+ }
+ gfree(adjusts);
+ }
+
+ segs = NULL;
+ length = size = 0;
+
+ x0 = y0 = xsp = ysp = 0; // make gcc happy
+ adj0 = adj1 = 0; // make gcc happy
+ curSubpath = 0;
+ curSubpathX = 0;
+ i = 0;
+ while (i < path->length) {
+
+ // first point in subpath - skip it
+ if (path->flags[i] & splashPathFirst) {
+ x0 = pts[i].x;
+ y0 = pts[i].y;
+ xsp = x0;
+ ysp = y0;
+ curSubpath = i;
+ curSubpathX = length;
+ ++i;
+
+ } else {
+
+ // curve segment
+ if (path->flags[i] & splashPathCurve) {
+ x1 = pts[i].x;
+ y1 = pts[i].y;
+ x2 = pts[i+1].x;
+ y2 = pts[i+1].y;
+ x3 = pts[i+2].x;
+ y3 = pts[i+2].y;
+ addCurve(x0, y0, x1, y1, x2, y2, x3, y3,
+ flatness,
+ (path->flags[i-1] & splashPathFirst),
+ (path->flags[i+2] & splashPathLast),
+ !closeSubpaths &&
+ (path->flags[i-1] & splashPathFirst) &&
+ !(path->flags[i-1] & splashPathClosed),
+ !closeSubpaths &&
+ (path->flags[i+2] & splashPathLast) &&
+ !(path->flags[i+2] & splashPathClosed));
+ x0 = x3;
+ y0 = y3;
+ i += 3;
+
+ // line segment
+ } else {
+ x1 = pts[i].x;
+ y1 = pts[i].y;
+ addSegment(x0, y0, x1, y1,
+ path->flags[i-1] & splashPathFirst,
+ path->flags[i] & splashPathLast,
+ !closeSubpaths &&
+ (path->flags[i-1] & splashPathFirst) &&
+ !(path->flags[i-1] & splashPathClosed),
+ !closeSubpaths &&
+ (path->flags[i] & splashPathLast) &&
+ !(path->flags[i] & splashPathClosed));
+ x0 = x1;
+ y0 = y1;
+ ++i;
+ }
+
+ // close a subpath
+ if (closeSubpaths &&
+ (path->flags[i-1] & splashPathLast) &&
+ (pts[i-1].x != pts[curSubpath].x ||
+ pts[i-1].y != pts[curSubpath].y)) {
+ addSegment(x0, y0, xsp, ysp,
+ gFalse, gTrue, gFalse, gFalse);
+ }
+ }
+ }
+
+ gfree(pts);
+}
+
+// Apply the stroke adjust hints to point <pt>: (*<xp>, *<yp>).
+void SplashXPath::strokeAdjust(SplashXPathAdjust *adjust,
+ SplashCoord *xp, SplashCoord *yp) {
+ SplashCoord x, y;
+
+ if (adjust->vert) {
+ x = *xp;
+ if (x > adjust->x0a && x < adjust->x0b) {
+ *xp = adjust->x0;
+ } else if (x > adjust->xma && x < adjust->xmb) {
+ *xp = adjust->xm;
+ } else if (x > adjust->x1a && x < adjust->x1b) {
+ *xp = adjust->x1;
+ }
+ } else {
+ y = *yp;
+ if (y > adjust->x0a && y < adjust->x0b) {
+ *yp = adjust->x0;
+ } else if (y > adjust->xma && y < adjust->xmb) {
+ *yp = adjust->xm;
+ } else if (y > adjust->x1a && y < adjust->x1b) {
+ *yp = adjust->x1;
+ }
+ }
+}
+
+SplashXPath::SplashXPath(SplashXPath *xPath) {
+ length = xPath->length;
+ size = xPath->size;
+ segs = (SplashXPathSeg *)gmallocn(size, sizeof(SplashXPathSeg));
+ memcpy(segs, xPath->segs, length * sizeof(SplashXPathSeg));
+}
+
+SplashXPath::~SplashXPath() {
+ gfree(segs);
+}
+
+// Add space for <nSegs> more segments
+void SplashXPath::grow(int nSegs) {
+ if (length + nSegs > size) {
+ if (size == 0) {
+ size = 32;
+ }
+ while (size < length + nSegs) {
+ size *= 2;
+ }
+ segs = (SplashXPathSeg *)greallocn(segs, size, sizeof(SplashXPathSeg));
+ }
+}
+
+void SplashXPath::addCurve(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3,
+ SplashCoord flatness,
+ GBool first, GBool last, GBool end0, GBool end1) {
+ SplashCoord cx[splashMaxCurveSplits + 1][3];
+ SplashCoord cy[splashMaxCurveSplits + 1][3];
+ int cNext[splashMaxCurveSplits + 1];
+ SplashCoord xl0, xl1, xl2, xr0, xr1, xr2, xr3, xx1, xx2, xh;
+ SplashCoord yl0, yl1, yl2, yr0, yr1, yr2, yr3, yy1, yy2, yh;
+ SplashCoord dx, dy, mx, my, d1, d2, flatness2;
+ int p1, p2, p3;
+
+ flatness2 = flatness * flatness;
+
+ // initial segment
+ p1 = 0;
+ p2 = splashMaxCurveSplits;
+ cx[p1][0] = x0; cy[p1][0] = y0;
+ cx[p1][1] = x1; cy[p1][1] = y1;
+ cx[p1][2] = x2; cy[p1][2] = y2;
+ cx[p2][0] = x3; cy[p2][0] = y3;
+ cNext[p1] = p2;
+
+ while (p1 < splashMaxCurveSplits) {
+
+ // get the next segment
+ xl0 = cx[p1][0]; yl0 = cy[p1][0];
+ xx1 = cx[p1][1]; yy1 = cy[p1][1];
+ xx2 = cx[p1][2]; yy2 = cy[p1][2];
+ p2 = cNext[p1];
+ xr3 = cx[p2][0]; yr3 = cy[p2][0];
+
+ // compute the distances from the control points to the
+ // midpoint of the straight line (this is a bit of a hack, but
+ // it's much faster than computing the actual distances to the
+ // line)
+ mx = (xl0 + xr3) * 0.5;
+ my = (yl0 + yr3) * 0.5;
+ dx = xx1 - mx;
+ dy = yy1 - my;
+ d1 = dx*dx + dy*dy;
+ dx = xx2 - mx;
+ dy = yy2 - my;
+ d2 = dx*dx + dy*dy;
+
+ // if the curve is flat enough, or no more subdivisions are
+ // allowed, add the straight line segment
+ if (p2 - p1 == 1 || (d1 <= flatness2 && d2 <= flatness2)) {
+ addSegment(xl0, yl0, xr3, yr3,
+ p1 == 0 && first,
+ p2 == splashMaxCurveSplits && last,
+ p1 == 0 && end0,
+ p2 == splashMaxCurveSplits && end1);
+ p1 = p2;
+
+ // otherwise, subdivide the curve
+ } else {
+ xl1 = (xl0 + xx1) * 0.5;
+ yl1 = (yl0 + yy1) * 0.5;
+ xh = (xx1 + xx2) * 0.5;
+ yh = (yy1 + yy2) * 0.5;
+ xl2 = (xl1 + xh) * 0.5;
+ yl2 = (yl1 + yh) * 0.5;
+ xr2 = (xx2 + xr3) * 0.5;
+ yr2 = (yy2 + yr3) * 0.5;
+ xr1 = (xh + xr2) * 0.5;
+ yr1 = (yh + yr2) * 0.5;
+ xr0 = (xl2 + xr1) * 0.5;
+ yr0 = (yl2 + yr1) * 0.5;
+ // add the new subdivision points
+ p3 = (p1 + p2) / 2;
+ cx[p1][1] = xl1; cy[p1][1] = yl1;
+ cx[p1][2] = xl2; cy[p1][2] = yl2;
+ cNext[p1] = p3;
+ cx[p3][0] = xr0; cy[p3][0] = yr0;
+ cx[p3][1] = xr1; cy[p3][1] = yr1;
+ cx[p3][2] = xr2; cy[p3][2] = yr2;
+ cNext[p3] = p2;
+ }
+ }
+}
+
+void SplashXPath::addSegment(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ GBool first, GBool last, GBool end0, GBool end1) {
+ grow(1);
+ segs[length].x0 = x0;
+ segs[length].y0 = y0;
+ segs[length].x1 = x1;
+ segs[length].y1 = y1;
+ segs[length].flags = 0;
+ if (first) {
+ segs[length].flags |= splashXPathFirst;
+ }
+ if (last) {
+ segs[length].flags |= splashXPathLast;
+ }
+ if (end0) {
+ segs[length].flags |= splashXPathEnd0;
+ }
+ if (end1) {
+ segs[length].flags |= splashXPathEnd1;
+ }
+ if (y1 == y0) {
+ segs[length].dxdy = segs[length].dydx = 0;
+ segs[length].flags |= splashXPathHoriz;
+ if (x1 == x0) {
+ segs[length].flags |= splashXPathVert;
+ }
+ } else if (x1 == x0) {
+ segs[length].dxdy = segs[length].dydx = 0;
+ segs[length].flags |= splashXPathVert;
+ } else {
+#if USE_FIXEDPOINT
+ if (FixedPoint::divCheck(x1 - x0, y1 - y0, &segs[length].dxdy)) {
+ segs[length].dydx = (SplashCoord)1 / segs[length].dxdy;
+ } else {
+ segs[length].dxdy = segs[length].dydx = 0;
+ if (splashAbs(x1 - x0) > splashAbs(y1 - y0)) {
+ segs[length].flags |= splashXPathHoriz;
+ } else {
+ segs[length].flags |= splashXPathVert;
+ }
+ }
+#else
+ segs[length].dxdy = (x1 - x0) / (y1 - y0);
+ segs[length].dydx = (SplashCoord)1 / segs[length].dxdy;
+#endif
+ }
+ if (y0 > y1) {
+ segs[length].flags |= splashXPathFlip;
+ }
+ ++length;
+}
+
+static int cmpXPathSegs(const void *arg0, const void *arg1) {
+ SplashXPathSeg *seg0 = (SplashXPathSeg *)arg0;
+ SplashXPathSeg *seg1 = (SplashXPathSeg *)arg1;
+ SplashCoord x0, y0, x1, y1;
+
+ if (seg0->flags & splashXPathFlip) {
+ x0 = seg0->x1;
+ y0 = seg0->y1;
+ } else {
+ x0 = seg0->x0;
+ y0 = seg0->y0;
+ }
+ if (seg1->flags & splashXPathFlip) {
+ x1 = seg1->x1;
+ y1 = seg1->y1;
+ } else {
+ x1 = seg1->x0;
+ y1 = seg1->y0;
+ }
+ if (y0 != y1) {
+ return (y0 > y1) ? 1 : -1;
+ }
+ if (x0 != x1) {
+ return (x0 > x1) ? 1 : -1;
+ }
+ return 0;
+}
+
+void SplashXPath::aaScale() {
+ SplashXPathSeg *seg;
+ int i;
+
+ for (i = 0, seg = segs; i < length; ++i, ++seg) {
+ seg->x0 *= splashAASize;
+ seg->y0 *= splashAASize;
+ seg->x1 *= splashAASize;
+ seg->y1 *= splashAASize;
+ }
+}
+
+void SplashXPath::sort() {
+ qsort(segs, length, sizeof(SplashXPathSeg), &cmpXPathSegs);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.h
new file mode 100644
index 00000000000..64c47969ef8
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPath.h
@@ -0,0 +1,98 @@
+//========================================================================
+//
+// SplashXPath.h
+//
+//========================================================================
+
+#ifndef SPLASHXPATH_H
+#define SPLASHXPATH_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+class SplashPath;
+struct SplashXPathAdjust;
+
+//------------------------------------------------------------------------
+
+#define splashMaxCurveSplits (1 << 10)
+
+//------------------------------------------------------------------------
+// SplashXPathSeg
+//------------------------------------------------------------------------
+
+struct SplashXPathSeg {
+ SplashCoord x0, y0; // first endpoint
+ SplashCoord x1, y1; // second endpoint
+ SplashCoord dxdy; // slope: delta-x / delta-y
+ SplashCoord dydx; // slope: delta-y / delta-x
+ Guint flags;
+};
+
+#define splashXPathFirst 0x01 // first segment of a subpath
+#define splashXPathLast 0x02 // last segment of a subpath
+#define splashXPathEnd0 0x04 // first endpoint is end of an open subpath
+#define splashXPathEnd1 0x08 // second endpoint is end of an open subpath
+#define splashXPathHoriz 0x10 // segment is vertical (y0 == y1)
+ // (dxdy is undef)
+#define splashXPathVert 0x20 // segment is horizontal (x0 == x1)
+ // (dydx is undef)
+#define splashXPathFlip 0x40 // y0 > y1
+
+//------------------------------------------------------------------------
+// SplashXPath
+//------------------------------------------------------------------------
+
+class SplashXPath {
+public:
+
+ // Expands (converts to segments) and flattens (converts curves to
+ // lines) <path>. Transforms all points from user space to device
+ // space, via <matrix>. If <closeSubpaths> is true, closes all open
+ // subpaths.
+ SplashXPath(SplashPath *path, SplashCoord *matrix,
+ SplashCoord flatness, GBool closeSubpaths);
+
+ // Copy an expanded path.
+ SplashXPath *copy() { return new SplashXPath(this); }
+
+ ~SplashXPath();
+
+ // Multiply all coordinates by splashAASize, in preparation for
+ // anti-aliased rendering.
+ void aaScale();
+
+ // Sort by upper coordinate (lower y), in y-major order.
+ void sort();
+
+protected:
+
+ SplashXPath();
+ SplashXPath(SplashXPath *xPath);
+ void transform(SplashCoord *matrix, SplashCoord xi, SplashCoord yi,
+ SplashCoord *xo, SplashCoord *yo);
+ void strokeAdjust(SplashXPathAdjust *adjust,
+ SplashCoord *xp, SplashCoord *yp);
+ void grow(int nSegs);
+ void addCurve(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ SplashCoord x2, SplashCoord y2,
+ SplashCoord x3, SplashCoord y3,
+ SplashCoord flatness,
+ GBool first, GBool last, GBool end0, GBool end1);
+ void addSegment(SplashCoord x0, SplashCoord y0,
+ SplashCoord x1, SplashCoord y1,
+ GBool first, GBool last, GBool end0, GBool end1);
+
+ SplashXPathSeg *segs;
+ int length, size; // length and size of segs array
+
+ friend class SplashXPathScanner;
+ friend class SplashClip;
+ friend class Splash;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.cc b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.cc
new file mode 100644
index 00000000000..eab9cef59b3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.cc
@@ -0,0 +1,443 @@
+//========================================================================
+//
+// SplashXPathScanner.cc
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/gmem.h"
+#include "SplashMath.h"
+#include "SplashXPath.h"
+#include "SplashBitmap.h"
+#include "SplashXPathScanner.h"
+
+//------------------------------------------------------------------------
+
+struct SplashIntersect {
+ int x0, x1; // intersection of segment with [y, y+1)
+ int count; // EO/NZWN counter increment
+};
+
+static int cmpIntersect(const void *p0, const void *p1) {
+ return ((SplashIntersect *)p0)->x0 - ((SplashIntersect *)p1)->x0;
+}
+
+//------------------------------------------------------------------------
+// SplashXPathScanner
+//------------------------------------------------------------------------
+
+SplashXPathScanner::SplashXPathScanner(SplashXPath *xPathA, GBool eoA) {
+ SplashXPathSeg *seg;
+ SplashCoord xMinFP, yMinFP, xMaxFP, yMaxFP;
+ int i;
+
+ xPath = xPathA;
+ eo = eoA;
+
+ // compute the bbox
+ if (xPath->length == 0) {
+ xMin = yMin = 1;
+ xMax = yMax = 0;
+ } else {
+ seg = &xPath->segs[0];
+ if (seg->x0 <= seg->x1) {
+ xMinFP = seg->x0;
+ xMaxFP = seg->x1;
+ } else {
+ xMinFP = seg->x1;
+ xMaxFP = seg->x0;
+ }
+ if (seg->flags & splashXPathFlip) {
+ yMinFP = seg->y1;
+ yMaxFP = seg->y0;
+ } else {
+ yMinFP = seg->y0;
+ yMaxFP = seg->y1;
+ }
+ for (i = 1; i < xPath->length; ++i) {
+ seg = &xPath->segs[i];
+ if (seg->x0 < xMinFP) {
+ xMinFP = seg->x0;
+ } else if (seg->x0 > xMaxFP) {
+ xMaxFP = seg->x0;
+ }
+ if (seg->x1 < xMinFP) {
+ xMinFP = seg->x1;
+ } else if (seg->x1 > xMaxFP) {
+ xMaxFP = seg->x1;
+ }
+ if (seg->flags & splashXPathFlip) {
+ if (seg->y0 > yMaxFP) {
+ yMaxFP = seg->y0;
+ }
+ } else {
+ if (seg->y1 > yMaxFP) {
+ yMaxFP = seg->y1;
+ }
+ }
+ }
+ xMin = splashFloor(xMinFP);
+ xMax = splashFloor(xMaxFP);
+ yMin = splashFloor(yMinFP);
+ yMax = splashFloor(yMaxFP);
+ }
+
+ interY = yMin - 1;
+ xPathIdx = 0;
+ inter = NULL;
+ interLen = interSize = 0;
+}
+
+SplashXPathScanner::~SplashXPathScanner() {
+ gfree(inter);
+}
+
+void SplashXPathScanner::getBBoxAA(int *xMinA, int *yMinA,
+ int *xMaxA, int *yMaxA) {
+ *xMinA = xMin / splashAASize;
+ *yMinA = yMin / splashAASize;
+ *xMaxA = xMax / splashAASize;
+ *yMaxA = yMax / splashAASize;
+}
+
+void SplashXPathScanner::getSpanBounds(int y, int *spanXMin, int *spanXMax) {
+ if (interY != y) {
+ computeIntersections(y);
+ }
+ if (interLen > 0) {
+ *spanXMin = inter[0].x0;
+ *spanXMax = inter[interLen - 1].x1;
+ } else {
+ *spanXMin = xMax + 1;
+ *spanXMax = xMax;
+ }
+}
+
+GBool SplashXPathScanner::test(int x, int y) {
+ int count, i;
+
+ if (interY != y) {
+ computeIntersections(y);
+ }
+ count = 0;
+ for (i = 0; i < interLen && inter[i].x0 <= x; ++i) {
+ if (x <= inter[i].x1) {
+ return gTrue;
+ }
+ count += inter[i].count;
+ }
+ return eo ? (count & 1) : (count != 0);
+}
+
+GBool SplashXPathScanner::testSpan(int x0, int x1, int y) {
+ int count, xx1, i;
+
+ if (interY != y) {
+ computeIntersections(y);
+ }
+
+ count = 0;
+ for (i = 0; i < interLen && inter[i].x1 < x0; ++i) {
+ count += inter[i].count;
+ }
+
+ // invariant: the subspan [x0,xx1] is inside the path
+ xx1 = x0 - 1;
+ while (xx1 < x1) {
+ if (i >= interLen) {
+ return gFalse;
+ }
+ if (inter[i].x0 > xx1 + 1 &&
+ !(eo ? (count & 1) : (count != 0))) {
+ return gFalse;
+ }
+ if (inter[i].x1 > xx1) {
+ xx1 = inter[i].x1;
+ }
+ count += inter[i].count;
+ ++i;
+ }
+
+ return gTrue;
+}
+
+GBool SplashXPathScanner::getNextSpan(int y, int *x0, int *x1) {
+ int xx0, xx1;
+
+ if (interY != y) {
+ computeIntersections(y);
+ }
+ if (interIdx >= interLen) {
+ return gFalse;
+ }
+ xx0 = inter[interIdx].x0;
+ xx1 = inter[interIdx].x1;
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ while (interIdx < interLen &&
+ (inter[interIdx].x0 <= xx1 ||
+ (eo ? (interCount & 1) : (interCount != 0)))) {
+ if (inter[interIdx].x1 > xx1) {
+ xx1 = inter[interIdx].x1;
+ }
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ }
+ *x0 = xx0;
+ *x1 = xx1;
+ return gTrue;
+}
+
+void SplashXPathScanner::computeIntersections(int y) {
+ SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1;
+ SplashXPathSeg *seg;
+ int i, j;
+
+ // find the first segment that intersects [y, y+1)
+ i = (y >= interY) ? xPathIdx : 0;
+ while (i < xPath->length &&
+ xPath->segs[i].y0 < y && xPath->segs[i].y1 < y) {
+ ++i;
+ }
+ xPathIdx = i;
+
+ // find all of the segments that intersect [y, y+1) and create an
+ // Intersect element for each one
+ interLen = 0;
+ for (j = i; j < xPath->length; ++j) {
+ seg = &xPath->segs[j];
+ if (seg->flags & splashXPathFlip) {
+ ySegMin = seg->y1;
+ ySegMax = seg->y0;
+ } else {
+ ySegMin = seg->y0;
+ ySegMax = seg->y1;
+ }
+
+ // ensure that: ySegMin < y+1
+ // y <= ySegMax
+ if (ySegMin >= y + 1) {
+ break;
+ }
+ if (ySegMax < y) {
+ continue;
+ }
+
+ if (interLen == interSize) {
+ if (interSize == 0) {
+ interSize = 16;
+ } else {
+ interSize *= 2;
+ }
+ inter = (SplashIntersect *)greallocn(inter, interSize,
+ sizeof(SplashIntersect));
+ }
+
+ if (seg->flags & splashXPathHoriz) {
+ xx0 = seg->x0;
+ xx1 = seg->x1;
+ } else if (seg->flags & splashXPathVert) {
+ xx0 = xx1 = seg->x0;
+ } else {
+ if (seg->x0 < seg->x1) {
+ xSegMin = seg->x0;
+ xSegMax = seg->x1;
+ } else {
+ xSegMin = seg->x1;
+ xSegMax = seg->x0;
+ }
+ // intersection with top edge
+ xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
+ // intersection with bottom edge
+ xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
+ // the segment may not actually extend to the top and/or bottom edges
+ if (xx0 < xSegMin) {
+ xx0 = xSegMin;
+ } else if (xx0 > xSegMax) {
+ xx0 = xSegMax;
+ }
+ if (xx1 < xSegMin) {
+ xx1 = xSegMin;
+ } else if (xx1 > xSegMax) {
+ xx1 = xSegMax;
+ }
+ }
+ if (xx0 < xx1) {
+ inter[interLen].x0 = splashFloor(xx0);
+ inter[interLen].x1 = splashFloor(xx1);
+ } else {
+ inter[interLen].x0 = splashFloor(xx1);
+ inter[interLen].x1 = splashFloor(xx0);
+ }
+ if (ySegMin <= y &&
+ (SplashCoord)y < ySegMax &&
+ !(seg->flags & splashXPathHoriz)) {
+ inter[interLen].count = eo ? 1
+ : (seg->flags & splashXPathFlip) ? 1 : -1;
+ } else {
+ inter[interLen].count = 0;
+ }
+ ++interLen;
+ }
+
+ qsort(inter, interLen, sizeof(SplashIntersect), &cmpIntersect);
+
+ interY = y;
+ interIdx = 0;
+ interCount = 0;
+}
+
+void SplashXPathScanner::renderAALine(SplashBitmap *aaBuf,
+ int *x0, int *x1, int y) {
+ int xx0, xx1, xx, xxMin, xxMax, yy;
+ Guchar mask;
+ SplashColorPtr p;
+
+ memset(aaBuf->getDataPtr(), 0, aaBuf->getRowSize() * aaBuf->getHeight());
+ xxMin = aaBuf->getWidth();
+ xxMax = -1;
+ for (yy = 0; yy < splashAASize; ++yy) {
+ computeIntersections(splashAASize * y + yy);
+ while (interIdx < interLen) {
+ xx0 = inter[interIdx].x0;
+ xx1 = inter[interIdx].x1;
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ while (interIdx < interLen &&
+ (inter[interIdx].x0 <= xx1 ||
+ (eo ? (interCount & 1) : (interCount != 0)))) {
+ if (inter[interIdx].x1 > xx1) {
+ xx1 = inter[interIdx].x1;
+ }
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ }
+ if (xx0 < 0) {
+ xx0 = 0;
+ }
+ ++xx1;
+ if (xx1 > aaBuf->getWidth()) {
+ xx1 = aaBuf->getWidth();
+ }
+ // set [xx0, xx1) to 1
+ if (xx0 < xx1) {
+ xx = xx0;
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
+ if (xx & 7) {
+ mask = 0xff >> (xx & 7);
+ if ((xx & ~7) == (xx1 & ~7)) {
+ mask &= (Guchar)(0xff00 >> (xx1 & 7));
+ }
+ *p++ |= mask;
+ xx = (xx & ~7) + 8;
+ }
+ for (; xx + 7 < xx1; xx += 8) {
+ *p++ |= 0xff;
+ }
+ if (xx < xx1) {
+ *p |= (Guchar)(0xff00 >> (xx1 & 7));
+ }
+ }
+ if (xx0 < xxMin) {
+ xxMin = xx0;
+ }
+ if (xx1 > xxMax) {
+ xxMax = xx1;
+ }
+ }
+ }
+ *x0 = xxMin / splashAASize;
+ *x1 = (xxMax - 1) / splashAASize;
+}
+
+void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf,
+ int *x0, int *x1, int y) {
+ int xx0, xx1, xx, yy;
+ Guchar mask;
+ SplashColorPtr p;
+
+ for (yy = 0; yy < splashAASize; ++yy) {
+ xx = *x0 * splashAASize;
+ computeIntersections(splashAASize * y + yy);
+ while (interIdx < interLen && xx < (*x1 + 1) * splashAASize) {
+ xx0 = inter[interIdx].x0;
+ xx1 = inter[interIdx].x1;
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ while (interIdx < interLen &&
+ (inter[interIdx].x0 <= xx1 ||
+ (eo ? (interCount & 1) : (interCount != 0)))) {
+ if (inter[interIdx].x1 > xx1) {
+ xx1 = inter[interIdx].x1;
+ }
+ interCount += inter[interIdx].count;
+ ++interIdx;
+ }
+ if (xx0 > aaBuf->getWidth()) {
+ xx0 = aaBuf->getWidth();
+ }
+ // set [xx, xx0) to 0
+ if (xx < xx0) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
+ if (xx & 7) {
+ mask = (Guchar)(0xff00 >> (xx & 7));
+ if ((xx & ~7) == (xx0 & ~7)) {
+ mask |= 0xff >> (xx0 & 7);
+ }
+ *p++ &= mask;
+ xx = (xx & ~7) + 8;
+ }
+ for (; xx + 7 <= xx0; xx += 8) {
+ *p++ = 0x00;
+ }
+ if (xx < xx0) {
+ *p &= 0xff >> (xx0 & 7);
+ }
+ }
+ if (xx1 >= xx) {
+ xx = xx1 + 1;
+ }
+ }
+ xx0 = (*x1 + 1) * splashAASize;
+ if (xx0 > aaBuf->getWidth()) xx0 = aaBuf->getWidth();
+ // set [xx, xx0) to 0
+ if (xx < xx0) {
+ p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
+ if (xx & 7) {
+ mask = (Guchar)(0xff00 >> (xx & 7));
+ if ((xx & ~7) == (xx0 & ~7)) {
+ mask &= 0xff >> (xx0 & 7);
+ }
+ *p++ &= mask;
+ xx = (xx & ~7) + 8;
+ }
+ for (; xx + 7 <= xx0; xx += 8) {
+ *p++ = 0x00;
+ }
+ if (xx < xx0) {
+ *p &= 0xff >> (xx0 & 7);
+ }
+ }
+ }
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.h b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.h
new file mode 100644
index 00000000000..1cc4f3cdecf
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/splash/SplashXPathScanner.h
@@ -0,0 +1,85 @@
+//========================================================================
+//
+// SplashXPathScanner.h
+//
+//========================================================================
+
+#ifndef SPLASHXPATHSCANNER_H
+#define SPLASHXPATHSCANNER_H
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "SplashTypes.h"
+
+class SplashXPath;
+class SplashBitmap;
+struct SplashIntersect;
+
+//------------------------------------------------------------------------
+// SplashXPathScanner
+//------------------------------------------------------------------------
+
+class SplashXPathScanner {
+public:
+
+ // Create a new SplashXPathScanner object. <xPathA> must be sorted.
+ SplashXPathScanner(SplashXPath *xPathA, GBool eoA);
+
+ ~SplashXPathScanner();
+
+ // Return the path's bounding box.
+ void getBBox(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+
+ // Return the path's bounding box.
+ void getBBoxAA(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA);
+
+ // Return the min/max x values for the span at <y>.
+ void getSpanBounds(int y, int *spanXMin, int *spanXMax);
+
+ // Returns true if (<x>,<y>) is inside the path.
+ GBool test(int x, int y);
+
+ // Returns true if the entire span ([<x0>,<x1>], <y>) is inside the
+ // path.
+ GBool testSpan(int x0, int x1, int y);
+
+ // Returns the next span inside the path at <y>. If <y> is
+ // different than the previous call to getNextSpan, this returns the
+ // first span at <y>; otherwise it returns the next span (relative
+ // to the previous call to getNextSpan). Returns false if there are
+ // no more spans at <y>.
+ GBool getNextSpan(int y, int *x0, int *x1);
+
+ // Renders one anti-aliased line into <aaBuf>. Returns the min and
+ // max x coordinates with non-zero pixels in <x0> and <x1>.
+ void renderAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y);
+
+ // Clips an anti-aliased line by setting pixels to zero. On entry,
+ // all non-zero pixels are between <x0> and <x1>. This function
+ // will update <x0> and <x1>.
+ void clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y);
+
+private:
+
+ void computeIntersections(int y);
+
+ SplashXPath *xPath;
+ GBool eo;
+ int xMin, yMin, xMax, yMax;
+
+ int interY; // current y value
+ int interIdx; // current index into <inter> - used by
+ // getNextSpan
+ int interCount; // current EO/NZWN counter - used by
+ // getNextSpan
+ int xPathIdx; // current index into <xPath> - used by
+ // computeIntersections
+ SplashIntersect *inter; // intersections array for <interY>
+ int interLen; // number of intersections in <inter>
+ int interSize; // size of the <inter> array
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/test/CMakeLists.txt
new file mode 100644
index 00000000000..478cb31a58f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/CMakeLists.txt
@@ -0,0 +1,52 @@
+
+if (ENABLE_SPLASH)
+
+ set (perf_test_SRCS
+ perf-test.cc
+ perf-test-preview-dummy.cc
+ )
+ add_executable(perf-test ${perf_test_SRCS})
+ target_link_libraries(perf-test poppler)
+
+endif (ENABLE_SPLASH)
+
+if (GTK_FOUND)
+
+ add_definitions(${GTK2_CFLAGS})
+
+ include_directories(
+ ${CMAKE_SOURCE_DIR}/glib
+ ${CMAKE_BINARY_DIR}/glib
+ )
+
+ set (gtk_splash_test_SRCS
+ gtk-splash-test.cc
+ )
+ poppler_add_test(gtk-splash-test BUILD_GTK_TESTS ${gtk_splash_test_SRCS})
+ target_link_libraries(gtk-splash-test poppler ${GTK2_LIBRARIES})
+
+ if (HAVE_CAIRO)
+
+ set (gtk_cairo_test_SRCS
+ gtk-cairo-test.cc
+ )
+ poppler_add_test(gtk-cairo-test BUILD_GTK_TESTS ${gtk_cairo_test_SRCS})
+ target_link_libraries(gtk-cairo-test poppler-glib ${GTK2_LIBRARIES})
+
+ set (pdf_inspector_SRCS
+ pdf-inspector.cc
+ )
+ poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS})
+ target_link_libraries(pdf-inspector poppler-glib ${GTK2_LIBRARIES})
+
+ endif (HAVE_CAIRO)
+
+endif (GTK_FOUND)
+
+set (pdf_fullrewrite_SRCS
+ pdf-fullrewrite.cc
+)
+add_executable(pdf-fullrewrite ${pdf_fullrewrite_SRCS})
+target_link_libraries(pdf-fullrewrite poppler)
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.am
new file mode 100644
index 00000000000..38bf72dc9d6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.am
@@ -0,0 +1,97 @@
+if BUILD_GTK_TEST
+
+if BUILD_SPLASH_OUTPUT
+
+gtk_splash_test = \
+ gtk-splash-test
+
+splash_includes = \
+ -I$(top_srcdir)/splash
+
+endif
+
+if BUILD_CAIRO_OUTPUT
+
+gtk_cairo_test = \
+ gtk-cairo-test
+
+pdf_inspector = \
+ pdf_inspector
+
+cairo_includes = \
+ $(CAIRO_CFLAGS) \
+ $(FREETYPE_CFLAGS)
+
+endif
+
+endif
+
+if BUILD_SPLASH_OUTPUT
+
+perf_test = \
+ perf-test
+
+endif
+
+pdf_fullrewrite = \
+ pdf-fullrewrite
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/glib \
+ -I$(top_builddir)/glib \
+ $(cairo_includes) \
+ $(GTK_TEST_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+noinst_PROGRAMS = $(gtk_splash_test) $(gtk_cairo_test) $(pdf_inspector) $(perf_test) $(pdf_fullrewrite)
+
+AM_LDFLAGS = @auto_import_flags@
+
+gtk_splash_test_SOURCES = \
+ gtk-splash-test.cc
+
+gtk_splash_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(GTK_TEST_LIBS)
+
+gtk_cairo_test_SOURCES = \
+ gtk-cairo-test.cc
+
+gtk_cairo_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(CAIRO_LIBS) \
+ $(GTK_TEST_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+pdf_inspector_SOURCES = \
+ pdf-inspector.cc
+
+pdf_inspector_LDADD = \
+ $(top_builddir)/poppler/libpoppler-cairo.la \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(CAIRO_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(GTK_TEST_LIBS) \
+ $(X_EXTRA_LIBS)
+
+perf_test_SOURCES = \
+ perf-test.cc \
+ perf-test-preview-dummy.cc
+
+perf_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(FREETYPE_LIBS) \
+ $(X_EXTRA_LIBS)
+
+pdf_fullrewrite_SOURCES = \
+ pdf-fullrewrite.cc
+
+pdf_fullrewrite_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la
+
+EXTRA_DIST = \
+ pdf-operators.c \
+ pdf-inspector.ui
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.in
new file mode 100644
index 00000000000..e0437e3be9f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/Makefile.in
@@ -0,0 +1,682 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+ $(am__EXEEXT_4) $(am__EXEEXT_5)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@BUILD_GTK_TEST_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@am__EXEEXT_1 = gtk-splash-test$(EXEEXT)
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@am__EXEEXT_2 = gtk-cairo-test$(EXEEXT)
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@am__EXEEXT_3 = pdf_inspector$(EXEEXT)
+@BUILD_SPLASH_OUTPUT_TRUE@am__EXEEXT_4 = perf-test$(EXEEXT)
+am__EXEEXT_5 = pdf-fullrewrite$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_gtk_cairo_test_OBJECTS = gtk-cairo-test.$(OBJEXT)
+gtk_cairo_test_OBJECTS = $(am_gtk_cairo_test_OBJECTS)
+am__DEPENDENCIES_1 =
+gtk_cairo_test_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/glib/libpoppler-glib.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am_gtk_splash_test_OBJECTS = gtk-splash-test.$(OBJEXT)
+gtk_splash_test_OBJECTS = $(am_gtk_splash_test_OBJECTS)
+gtk_splash_test_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am_pdf_fullrewrite_OBJECTS = pdf-fullrewrite.$(OBJEXT)
+pdf_fullrewrite_OBJECTS = $(am_pdf_fullrewrite_OBJECTS)
+pdf_fullrewrite_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la
+am_pdf_inspector_OBJECTS = pdf-inspector.$(OBJEXT)
+pdf_inspector_OBJECTS = $(am_pdf_inspector_OBJECTS)
+pdf_inspector_DEPENDENCIES = \
+ $(top_builddir)/poppler/libpoppler-cairo.la \
+ $(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_perf_test_OBJECTS = perf-test.$(OBJEXT) \
+ perf-test-preview-dummy.$(OBJEXT)
+perf_test_OBJECTS = $(am_perf_test_OBJECTS)
+perf_test_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(gtk_cairo_test_SOURCES) $(gtk_splash_test_SOURCES) \
+ $(pdf_fullrewrite_SOURCES) $(pdf_inspector_SOURCES) \
+ $(perf_test_SOURCES)
+DIST_SOURCES = $(gtk_cairo_test_SOURCES) $(gtk_splash_test_SOURCES) \
+ $(pdf_fullrewrite_SOURCES) $(pdf_inspector_SOURCES) \
+ $(perf_test_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+@BUILD_GTK_TEST_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@gtk_splash_test = \
+@BUILD_GTK_TEST_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ gtk-splash-test
+
+@BUILD_GTK_TEST_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@splash_includes = \
+@BUILD_GTK_TEST_TRUE@@BUILD_SPLASH_OUTPUT_TRUE@ -I$(top_srcdir)/splash
+
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@gtk_cairo_test = \
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@ gtk-cairo-test
+
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@pdf_inspector = \
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@ pdf_inspector
+
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@cairo_includes = \
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@ $(CAIRO_CFLAGS) \
+@BUILD_CAIRO_OUTPUT_TRUE@@BUILD_GTK_TEST_TRUE@ $(FREETYPE_CFLAGS)
+
+@BUILD_SPLASH_OUTPUT_TRUE@perf_test = \
+@BUILD_SPLASH_OUTPUT_TRUE@ perf-test
+
+pdf_fullrewrite = \
+ pdf-fullrewrite
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/poppler \
+ -I$(top_srcdir)/glib \
+ -I$(top_builddir)/glib \
+ $(cairo_includes) \
+ $(GTK_TEST_CFLAGS) \
+ $(FONTCONFIG_CFLAGS)
+
+AM_LDFLAGS = @auto_import_flags@
+gtk_splash_test_SOURCES = \
+ gtk-splash-test.cc
+
+gtk_splash_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(GTK_TEST_LIBS)
+
+gtk_cairo_test_SOURCES = \
+ gtk-cairo-test.cc
+
+gtk_cairo_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(top_builddir)/glib/libpoppler-glib.la \
+ $(CAIRO_LIBS) \
+ $(GTK_TEST_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+pdf_inspector_SOURCES = \
+ pdf-inspector.cc
+
+pdf_inspector_LDADD = \
+ $(top_builddir)/poppler/libpoppler-cairo.la \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(CAIRO_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(GTK_TEST_LIBS) \
+ $(X_EXTRA_LIBS)
+
+perf_test_SOURCES = \
+ perf-test.cc \
+ perf-test-preview-dummy.cc
+
+perf_test_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(FREETYPE_LIBS) \
+ $(X_EXTRA_LIBS)
+
+pdf_fullrewrite_SOURCES = \
+ pdf-fullrewrite.cc
+
+pdf_fullrewrite_LDADD = \
+ $(top_builddir)/poppler/libpoppler.la
+
+EXTRA_DIST = \
+ pdf-operators.c \
+ pdf-inspector.ui
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+gtk-cairo-test$(EXEEXT): $(gtk_cairo_test_OBJECTS) $(gtk_cairo_test_DEPENDENCIES)
+ @rm -f gtk-cairo-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(gtk_cairo_test_OBJECTS) $(gtk_cairo_test_LDADD) $(LIBS)
+gtk-splash-test$(EXEEXT): $(gtk_splash_test_OBJECTS) $(gtk_splash_test_DEPENDENCIES)
+ @rm -f gtk-splash-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(gtk_splash_test_OBJECTS) $(gtk_splash_test_LDADD) $(LIBS)
+pdf-fullrewrite$(EXEEXT): $(pdf_fullrewrite_OBJECTS) $(pdf_fullrewrite_DEPENDENCIES)
+ @rm -f pdf-fullrewrite$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdf_fullrewrite_OBJECTS) $(pdf_fullrewrite_LDADD) $(LIBS)
+pdf_inspector$(EXEEXT): $(pdf_inspector_OBJECTS) $(pdf_inspector_DEPENDENCIES)
+ @rm -f pdf_inspector$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdf_inspector_OBJECTS) $(pdf_inspector_LDADD) $(LIBS)
+perf-test$(EXEEXT): $(perf_test_OBJECTS) $(perf_test_DEPENDENCIES)
+ @rm -f perf-test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(perf_test_OBJECTS) $(perf_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-cairo-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-splash-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdf-fullrewrite.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdf-inspector.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf-test-preview-dummy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf-test.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/gtk-cairo-test.cc b/Build/source/libs/poppler/poppler-0.12.4/test/gtk-cairo-test.cc
new file mode 100644
index 00000000000..8c405685027
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/gtk-cairo-test.cc
@@ -0,0 +1,190 @@
+//========================================================================
+//
+// GDKSplashOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc. (GDK port)
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <math.h>
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+#include <poppler.h>
+
+typedef struct
+{
+ GtkWidget *window;
+ GtkWidget *sw;
+ GtkWidget *drawing_area;
+ GtkWidget *spin_button;
+ PopplerPage *page;
+ PopplerDocument *document;
+ cairo_surface_t *surface;
+ int *window_count;
+} View;
+
+static void
+drawing_area_expose (GtkWidget *drawing_area,
+ GdkEventExpose *event,
+ void *data)
+{
+ View *v = (View*) data;
+ cairo_t *cr;
+
+ gdk_window_clear (drawing_area->window);
+ cr = gdk_cairo_create (drawing_area->window);
+
+ cairo_set_source_surface (cr, v->surface, 0, 0);
+ cairo_paint (cr);
+ cairo_destroy (cr);
+}
+
+static void
+view_set_page (View *v, int page)
+{
+ int w, h;
+ double width, height;
+ cairo_t *cr;
+
+ v->page = poppler_document_get_page (v->document, page);
+ poppler_page_get_size (v->page, &width, &height);
+ w = (int) ceil(width);
+ h = (int) ceil(height);
+ cairo_surface_destroy (v->surface);
+ v->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
+ cr = cairo_create (v->surface);
+ poppler_page_render (v->page, cr);
+ cairo_destroy (cr);
+ gtk_widget_set_size_request (v->drawing_area, w, h);
+ gtk_widget_queue_draw (v->drawing_area);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (v->spin_button), page);
+}
+
+static void
+page_changed_callback (GtkSpinButton *button, View *v)
+{
+ int page;
+
+ page = gtk_spin_button_get_value_as_int (button);
+ view_set_page (v, page);
+}
+
+static void
+destroy_window_callback (GtkWindow *window, View *v)
+{
+ if (--(*v->window_count) == 0)
+ gtk_main_quit();
+}
+
+static View*
+view_new (const char *filename, int *window_count)
+{
+ View *v;
+ GtkWidget *window;
+ GtkWidget *drawing_area;
+ GtkWidget *sw;
+ GtkWidget *vbox, *hbox;
+ GtkWidget *spin_button;
+ int n_pages;
+
+ v = g_new0 (View, 1);
+
+ v->document = poppler_document_new_from_file (filename, NULL, NULL);
+ if (v->document == NULL)
+ return NULL;
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ vbox = gtk_vbox_new(FALSE, 5);
+
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ drawing_area = gtk_drawing_area_new ();
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+
+ gtk_box_pack_end (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw),
+ drawing_area);
+
+ n_pages = poppler_document_get_n_pages (v->document);
+ spin_button = gtk_spin_button_new_with_range (0, n_pages - 1, 1);
+ g_signal_connect (G_OBJECT (spin_button), "value-changed",
+ G_CALLBACK (page_changed_callback), v);
+ hbox = gtk_hbox_new (FALSE, 5);
+ gtk_box_pack_end (GTK_BOX (hbox), spin_button, FALSE, TRUE, 0);
+
+ gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+
+ gtk_widget_show_all (window);
+ gtk_widget_realize (window);
+
+ v->window = window;
+ v->drawing_area = drawing_area;
+ v->sw = sw;
+ v->window_count = window_count;
+ v->spin_button = spin_button;
+
+ g_signal_connect (drawing_area,
+ "expose_event",
+ G_CALLBACK (drawing_area_expose),
+ (void*) v);
+
+ g_signal_connect (window,
+ "destroy",
+ G_CALLBACK (destroy_window_callback),
+ (void*) v);
+
+ return v;
+}
+
+static int option_page = 0;
+static GOptionEntry demo_options[] = {
+ { "page", 0, 0, G_OPTION_ARG_INT, &option_page, "Page number", "PAGE" },
+ { NULL }
+};
+
+int
+main (int argc, char *argv [])
+{
+ View *v;
+ int i, window_count;
+ GOptionContext *ctx;
+
+ ctx = g_option_context_new("FILENAME ...");
+ g_option_context_add_main_entries(ctx, demo_options, "main");
+ g_option_context_parse(ctx, &argc, &argv, NULL);
+ g_option_context_free(ctx);
+
+ gtk_init (&argc, &argv);
+
+ if (argc == 1)
+ {
+ char *basename = g_path_get_basename (argv[0]);
+ fprintf (stderr, "usage: %s PDF-FILES...\n", basename);
+ g_free (basename);
+ return -1;
+ }
+
+ window_count = 0;
+ for (i = 1; i < argc; i++) {
+ v = view_new (argv[i], &window_count);
+ if (v == NULL) {
+ g_printerr ("Error loading %s\n", argv[i]);
+ continue;
+ }
+
+ view_set_page (v, option_page);
+ window_count++;
+ }
+
+ if (window_count > 0)
+ gtk_main ();
+
+ return 0;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/gtk-splash-test.cc b/Build/source/libs/poppler/poppler-0.12.4/test/gtk-splash-test.cc
new file mode 100644
index 00000000000..d5a41d308d5
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/gtk-splash-test.cc
@@ -0,0 +1,309 @@
+//========================================================================
+//
+// GDKSplashOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc. (GDK port)
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <goo/gmem.h>
+#include <splash/SplashTypes.h>
+#include <splash/SplashBitmap.h>
+#include "Object.h"
+#include "SplashOutputDev.h"
+#include "GfxState.h"
+
+#include <gdk/gdk.h>
+
+#include "PDFDoc.h"
+#include "GlobalParams.h"
+#include "ErrorCodes.h"
+#include <gtk/gtk.h>
+
+//------------------------------------------------------------------------
+
+#define xOutMaxRGBCube 6 // max size of RGB color cube
+
+//------------------------------------------------------------------------
+// GDKSplashOutputDev
+//------------------------------------------------------------------------
+
+class GDKSplashOutputDev: public SplashOutputDev {
+public:
+
+ GDKSplashOutputDev(GdkScreen *screen,
+ void (*redrawCbkA)(void *data),
+ void *redrawCbkDataA, SplashColor sc);
+
+ virtual ~GDKSplashOutputDev();
+
+ //----- initialization and control
+
+ // End a page.
+ virtual void endPage();
+
+ // Dump page contents to display.
+ virtual void dump();
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+
+ //----- special access
+
+ // Clear out the document (used when displaying an empty window).
+ void clear();
+
+ // Copy the rectangle (srcX, srcY, width, height) to (destX, destY)
+ // in destDC.
+ void redraw(int srcX, int srcY,
+ GdkDrawable *drawable,
+ int destX, int destY,
+ int width, int height);
+
+private:
+
+ int incrementalUpdate;
+ void (*redrawCbk)(void *data);
+ void *redrawCbkData;
+};
+
+//------------------------------------------------------------------------
+// Constants and macros
+//------------------------------------------------------------------------
+
+#define xoutRound(x) ((int)(x + 0.5))
+
+//------------------------------------------------------------------------
+// GDKSplashOutputDev
+//------------------------------------------------------------------------
+
+GDKSplashOutputDev::GDKSplashOutputDev(GdkScreen *screen,
+ void (*redrawCbkA)(void *data),
+ void *redrawCbkDataA, SplashColor sc):
+ SplashOutputDev(splashModeRGB8, 4, gFalse, sc),
+ incrementalUpdate (1)
+{
+ redrawCbk = redrawCbkA;
+ redrawCbkData = redrawCbkDataA;
+}
+
+GDKSplashOutputDev::~GDKSplashOutputDev() {
+}
+
+void GDKSplashOutputDev::clear() {
+ startDoc(NULL);
+ startPage(0, NULL);
+}
+
+void GDKSplashOutputDev::endPage() {
+ SplashOutputDev::endPage();
+ if (!incrementalUpdate) {
+ (*redrawCbk)(redrawCbkData);
+ }
+}
+
+void GDKSplashOutputDev::dump() {
+ if (incrementalUpdate && redrawCbk) {
+ (*redrawCbk)(redrawCbkData);
+ }
+}
+
+void GDKSplashOutputDev::updateFont(GfxState *state) {
+ SplashOutputDev::updateFont(state);
+}
+
+void GDKSplashOutputDev::redraw(int srcX, int srcY,
+ GdkDrawable *drawable,
+ int destX, int destY,
+ int width, int height) {
+ GdkGC *gc;
+ int gdk_rowstride;
+
+ gdk_rowstride = getBitmap()->getRowSize();
+ gc = gdk_gc_new (drawable);
+
+ gdk_draw_rgb_image (drawable, gc,
+ destX, destY,
+ width, height,
+ GDK_RGB_DITHER_NORMAL,
+ getBitmap()->getDataPtr() + srcY * gdk_rowstride + srcX * 3,
+ gdk_rowstride);
+
+ g_object_unref (gc);
+}
+
+
+typedef struct
+{
+ GtkWidget *window;
+ GtkWidget *sw;
+ GtkWidget *drawing_area;
+ GDKSplashOutputDev *out;
+ PDFDoc *doc;
+} View;
+
+static void
+drawing_area_expose (GtkWidget *drawing_area,
+ GdkEventExpose *event,
+ void *data)
+{
+ View *v = (View*) data;
+ GdkRectangle document;
+ GdkRectangle draw;
+
+ gdk_window_clear (drawing_area->window);
+
+ document.x = 0;
+ document.y = 0;
+ document.width = v->out->getBitmapWidth();
+ document.height = v->out->getBitmapHeight();
+
+ if (gdk_rectangle_intersect (&document, &event->area, &draw))
+ {
+ v->out->redraw (draw.x, draw.y,
+ drawing_area->window,
+ draw.x, draw.y,
+ draw.width, draw.height);
+ }
+}
+
+static int
+view_load (View *v,
+ const char *filename)
+{
+ PDFDoc *newDoc;
+ int err;
+ GooString *filename_g;
+ int w, h;
+
+ filename_g = new GooString (filename);
+
+ // open the PDF file
+ newDoc = new PDFDoc(filename_g, 0, 0);
+
+ delete filename_g;
+
+ if (!newDoc->isOk())
+ {
+ err = newDoc->getErrorCode();
+ delete newDoc;
+ return err;
+ }
+
+ if (v->doc)
+ delete v->doc;
+ v->doc = newDoc;
+
+ v->out->startDoc(v->doc->getXRef());
+
+ v->doc->displayPage (v->out, 1, 72, 72, 0, gFalse, gTrue, gTrue);
+
+ w = v->out->getBitmapWidth();
+ h = v->out->getBitmapHeight();
+
+ gtk_widget_set_size_request (v->drawing_area, w, h);
+
+ return errNone;
+}
+
+static void
+view_show (View *v)
+{
+ gtk_widget_show (v->window);
+}
+
+static void
+redraw_callback (void *data)
+{
+ View *v = (View*) data;
+
+ gtk_widget_queue_draw (v->drawing_area);
+}
+
+static View*
+view_new (void)
+{
+ View *v;
+ GtkWidget *window;
+ GtkWidget *drawing_area;
+ GtkWidget *sw;
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ drawing_area = gtk_drawing_area_new ();
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+
+ gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), drawing_area);
+
+ gtk_widget_show_all (sw);
+
+ v = g_new0 (View, 1);
+
+ v->window = window;
+ v->drawing_area = drawing_area;
+ v->sw = sw;
+ SplashColor sc;
+ sc[0] = 255;
+ sc[1] = 255;
+ sc[2] = 255;
+ v->out = new GDKSplashOutputDev (gtk_widget_get_screen (window),
+ redraw_callback, (void*) v, sc);
+ v->doc = 0;
+
+ g_signal_connect (drawing_area,
+ "expose_event",
+ G_CALLBACK (drawing_area_expose),
+ (void*) v);
+
+ return v;
+}
+
+int
+main (int argc, char *argv [])
+{
+ View *v;
+ int i;
+
+ gtk_init (&argc, &argv);
+
+ globalParams = new GlobalParams();
+
+ if (argc == 1)
+ {
+ fprintf (stderr, "usage: %s PDF-FILES...\n", argv[0]);
+ return -1;
+ }
+
+
+ i = 1;
+ while (i < argc)
+ {
+ int err;
+
+ v = view_new ();
+
+ err = view_load (v, argv[i]);
+
+ if (err != errNone)
+ g_printerr ("Error loading document!\n");
+
+ view_show (v);
+
+ ++i;
+ }
+
+ gtk_main ();
+
+ delete globalParams;
+
+ return 0;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/pdf-fullrewrite.cc b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-fullrewrite.cc
new file mode 100644
index 00000000000..9658e55a6dc
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-fullrewrite.cc
@@ -0,0 +1,46 @@
+//========================================================================
+//
+// pdf-fullrewrite.cc
+//
+// Copyright 2007 Julien Rebetez
+//
+//========================================================================
+#include "config.h"
+#include <poppler-config.h>
+#include "GlobalParams.h"
+#include "Error.h"
+#include "PDFDoc.h"
+#include "goo/GooString.h"
+
+int main (int argc, char *argv[])
+{
+ PDFDoc *doc;
+ GooString *inputName, *outputName;
+
+ // parse args
+ if (argc < 3) {
+ fprintf(stderr, "usage: %s INPUT-FILE OUTPUT-FILE\n", argv[0]);
+ return 1;
+ }
+
+ inputName = new GooString(argv[1]);
+ outputName = new GooString(argv[2]);
+
+ globalParams = new GlobalParams();
+
+ doc = new PDFDoc(inputName);
+
+ if (!doc->isOk()) {
+ delete doc;
+ fprintf(stderr, "Error loading document !\n");
+ return 1;
+ }
+
+
+ int res = doc->saveAs(outputName, writeForceRewrite);
+
+ delete doc;
+ delete globalParams;
+ delete outputName;
+ return res;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.cc b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.cc
new file mode 100644
index 00000000000..24bebbd61b7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.cc
@@ -0,0 +1,373 @@
+//========================================================================
+//
+// GDKSplashOutputDev.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+// Copyright 2004 Red Hat, Inc. (GDK port)
+//
+//========================================================================
+
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <goo/gmem.h>
+#include <goo/GooHash.h>
+#include <goo/GooTimer.h>
+#include <splash/SplashTypes.h>
+#include <splash/SplashBitmap.h>
+#include "Object.h"
+#include "ProfileData.h"
+#include "GfxState.h"
+
+#include <gdk/gdk.h>
+#include "CairoOutputDev.h"
+
+#include "PDFDoc.h"
+#include "GlobalParams.h"
+#include "ErrorCodes.h"
+#include <gtk/gtk.h>
+
+
+// Mapping
+#include "pdf-operators.c"
+
+enum {
+ OP_STRING,
+ OP_COUNT,
+ OP_TOTAL,
+ OP_MIN,
+ OP_MAX,
+ N_COLUMNS
+};
+
+class PdfInspector {
+public:
+
+ PdfInspector(void);
+
+ void set_file_name (const char *file_name);
+ void load (const char *file_name);
+ void run (void);
+ void error_dialog (const char *error_message);
+ void analyze_page (int page);
+
+private:
+ static void on_file_activated (GtkWidget *widget, PdfInspector *inspector);
+ static void on_selection_changed (GtkTreeSelection *selection, PdfInspector *inspector);
+ static void on_analyze_clicked (GtkWidget *widget, PdfInspector *inspector);
+
+ GtkBuilder* builder;
+ GtkTreeModel *model;
+ PDFDoc *doc;
+ CairoOutputDev *output;
+};
+
+
+
+PdfInspector::PdfInspector(void)
+{
+ GtkWidget *widget;
+ GError* error = NULL;
+
+ builder = gtk_builder_new ();
+
+ if (!gtk_builder_add_from_file (builder, "./pdf-inspector.ui", &error))
+ {
+ g_warning ("Couldn't load builder file: %s", error->message);
+ g_error_free (error);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_file_chooser_button"));
+ g_signal_connect (widget, "selection-changed", G_CALLBACK (on_file_activated), this);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "analyze_button"));
+ g_signal_connect (widget, "clicked", G_CALLBACK (on_analyze_clicked), this);
+
+ // setup the TreeView
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_tree_view"));
+ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)),
+ "changed", G_CALLBACK (on_selection_changed), this);
+ model = (GtkTreeModel *)gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT,
+ G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (widget), model);
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (widget),
+ 0, "Operation",
+ gtk_cell_renderer_text_new (),
+ "text", OP_STRING,
+ NULL);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (widget),
+ 1, "Count",
+ gtk_cell_renderer_text_new (),
+ "text", OP_COUNT,
+ NULL);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (widget),
+ 2, "Elapsed",
+ gtk_cell_renderer_text_new (),
+ "text", OP_TOTAL,
+ NULL);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (widget),
+ 3, "Min",
+ gtk_cell_renderer_text_new (),
+ "text", OP_MIN,
+ NULL);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (widget),
+ 4, "Max",
+ gtk_cell_renderer_text_new (),
+ "text", OP_MAX,
+ NULL);
+
+ for (int i = 0; i < N_COLUMNS; i++)
+ {
+ GtkTreeViewColumn *column;
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (widget), i);
+ gtk_tree_view_column_set_sort_column_id (column, i);
+ }
+ doc = NULL;
+ output = new CairoOutputDev();
+
+ // set up initial widgets
+ load (NULL);
+}
+
+void
+PdfInspector::set_file_name(const char *file_name)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_file_chooser_button"));
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), file_name);
+}
+
+void
+PdfInspector::on_file_activated (GtkWidget *widget, PdfInspector *inspector)
+{
+ gchar *file_name;
+
+ file_name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (file_name)
+ inspector->load (file_name);
+
+ g_free (file_name);
+}
+
+void
+PdfInspector::on_selection_changed (GtkTreeSelection *selection, PdfInspector *inspector)
+{
+ GtkWidget *label;
+ size_t i;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gchar *op = NULL;
+
+ label = GTK_WIDGET (gtk_builder_get_object (inspector->builder, "description_label"));
+ gtk_label_set_markup (GTK_LABEL (label), "<i>No Description</i>");
+
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
+ {
+ gtk_tree_model_get (model, &iter,
+ OP_STRING, &op,
+ -1);
+
+ }
+
+ if (op == NULL)
+ return;
+
+ for (i = 0; i < G_N_ELEMENTS (op_mapping); i++)
+ {
+
+ if (!strcmp (op, op_mapping[i].op))
+ {
+ gchar *text;
+ text = g_strdup_printf ("<i>%s</i>", op_mapping[i].description);
+ gtk_label_set_markup (GTK_LABEL (label), text);
+ g_free (text);
+ break;
+ }
+ }
+
+ g_free (op);
+}
+
+void
+PdfInspector::on_analyze_clicked (GtkWidget *widget, PdfInspector *inspector)
+{
+ GtkWidget *spin;
+ int page;
+
+ spin = GTK_WIDGET (gtk_builder_get_object (inspector->builder, "pdf_spin"));
+
+ page = (int) gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin));
+
+ inspector->analyze_page (page);
+
+}
+
+void
+PdfInspector::analyze_page (int page)
+{
+ GooHashIter *iter;
+ GooHash *hash;
+ GooString *key;
+ void *p;
+ GtkWidget *label;
+ char *text;
+ cairo_t *cr;
+ cairo_surface_t *surface;
+
+ label = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_total_label"));
+
+ output->startProfile ();
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+
+ GooTimer timer;
+ surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+ doc->getPageCropWidth(page + 1),
+ doc->getPageCropHeight(page + 1));
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
+ output->setCairo (cr);
+ cairo_destroy (cr);
+ doc->displayPage (output, page + 1, 72, 72, 0, gFalse, gTrue, gTrue);
+ output->setCairo (NULL);
+
+ // Total time;
+ text = g_strdup_printf ("%g", timer.getElapsed ());
+ gtk_label_set_text (GTK_LABEL (label), text);
+ g_free (text);
+
+ // Individual times;
+ hash = output->endProfile ();
+ hash->startIter(&iter);
+ while (hash->getNext(&iter, &key, &p))
+ {
+ GtkTreeIter tree_iter;
+ ProfileData *data_p = (ProfileData *) p;
+
+ gtk_list_store_append (GTK_LIST_STORE (model), &tree_iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &tree_iter,
+ OP_STRING, key->getCString(),
+ OP_COUNT, data_p->getCount (),
+ OP_TOTAL, data_p->getTotal (),
+ OP_MIN, data_p->getMin (),
+ OP_MAX, data_p->getMax (),
+ -1);
+ }
+ hash->killIter(&iter);
+ deleteGooHash (hash, ProfileData);
+}
+
+void
+PdfInspector::load(const char *file_name)
+{
+ GtkWidget *spin;
+ GtkWidget *button;
+ GtkWidget *label;
+
+ // kill the old PDF file
+ if (doc != NULL)
+ {
+ delete doc;
+ doc = NULL;
+ }
+
+ // load the new file
+ if (file_name)
+ {
+ GooString *filename_g;
+
+ filename_g = new GooString (file_name);
+ doc = new PDFDoc(filename_g, 0, 0);
+ delete filename_g;
+ }
+
+ if (doc && !doc->isOk())
+ {
+ this->error_dialog ("Failed to load file.");
+ delete doc;
+ doc = NULL;
+ }
+
+ spin = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_spin"));
+ button = GTK_WIDGET (gtk_builder_get_object (builder, "analyze_button"));
+ label = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_total_label"));
+ gtk_label_set_text (GTK_LABEL (label), "");
+
+ if (doc)
+ {
+ gtk_widget_set_sensitive (spin, TRUE);
+ gtk_widget_set_sensitive (button, TRUE);
+ gtk_widget_set_sensitive (label, TRUE);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (spin), 0, doc->getNumPages()-1);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0);
+
+ output->startDoc (doc->getXRef(), doc->getCatalog());
+ }
+ else
+ {
+ gtk_widget_set_sensitive (spin, FALSE);
+ gtk_widget_set_sensitive (button, FALSE);
+ gtk_widget_set_sensitive (label, FALSE);
+ }
+}
+
+void
+PdfInspector::error_dialog (const char *error_message)
+{
+ g_warning ("%s", error_message);
+}
+
+void
+PdfInspector::run()
+{
+ GtkWidget *dialog;
+
+ dialog = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_dialog"));
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+}
+
+
+
+int
+main (int argc, char *argv [])
+{
+ const char *file_name = NULL;
+ PdfInspector *inspector;
+
+ gtk_init (&argc, &argv);
+
+ globalParams = new GlobalParams();
+ globalParams->setProfileCommands (true);
+ globalParams->setPrintCommands (true);
+
+ if (argc == 2)
+ file_name = argv[1];
+ else if (argc > 2)
+ {
+ fprintf (stderr, "usage: %s [PDF-FILE]\n", argv[0]);
+ return -1;
+ }
+
+ inspector = new PdfInspector ();
+
+ if (file_name)
+ inspector->set_file_name (file_name);
+
+ inspector->run ();
+
+ delete inspector;
+ delete globalParams;
+
+ return 0;
+}
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.ui b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.ui
new file mode 100644
index 00000000000..8e20b2f24ba
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-inspector.ui
@@ -0,0 +1,416 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="lower">0</property>
+ <property name="page_increment">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">10</property>
+ <property name="value">1</property>
+ </object>
+ <object class="GtkDialog" id="pdf_dialog">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">PDF Inspector</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">600</property>
+ <property name="default_height">400</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <object class="GtkButton" id="closebutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Page Number</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="pdf_file_chooser_button">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select A File</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+ <property name="local_only">True</property>
+ <property name="show_hidden">False</property>
+ <property name="width_chars">-1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="pdf_spin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <child>
+ <object class="GtkTreeView" id="pdf_tree_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Total time elapsed:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="pdf_total_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"/>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="description_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;i&gt;No Description&lt;/i&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xscale">0.0</property>
+ <property name="yscale">0.0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+ <child>
+ <object class="GtkButton" id="analyze_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Analyze</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;PDF Instructions&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-7">closebutton1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/pdf-operators.c b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-operators.c
new file mode 100644
index 00000000000..3e838a2c641
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/pdf-operators.c
@@ -0,0 +1,81 @@
+typedef struct
+{
+ char *op;
+ char *description;
+} OperatorMapping;
+
+OperatorMapping op_mapping[] = {
+ { "b", "Close, fill, and stroke path using nonzero winding number rule" },
+ { "B", "Fill and stroke path using nonzero winding number rule" },
+ { "b*", "Close, fill, and stroke path using even-odd rule" },
+ { "B*", "Fill and stroke path using even-odd rule" },
+ { "BDC", "(PDF 1.2) Begin marked-content sequence with property list" },
+ { "BI", "Begin inline image object" },
+ { "BMC", "(PDF 1.2) Begin marked-content sequence" },
+ { "BT", "Begin text object" },
+ { "BX", "(PDF 1.1) Begin compatibility section" },
+ { "c", "Append curved segment to path (three control points)" },
+ { "cm", "Concatenate matrix to current transformation matrix" },
+ { "CS", "(PDF 1.1) Set color space for stroking operations" },
+ { "cs", "(PDF 1.1) Set color space for nonstroking operations" },
+ { "d", "Set line dash pattern" },
+ { "d0", "Set glyph width in Type 3 font" },
+ { "d1", "Set glyph width and bounding box in Type 3 font" },
+ { "Do", "Invoke named XObject" },
+ { "DP", "(PDF 1.2) Define marked-content point with property list" },
+ { "EI", "End inline image object" },
+ { "EMC", "(PDF 1.2) End marked-content sequence" },
+ { "ET", "End text object" },
+ { "EX", "(PDF 1.1) End compatibility section" },
+ { "f", "Fill path using nonzero winding number rule" },
+ { "F", "Fill path using nonzero winding number rule (obsolete)" },
+ { "f*", "Fill path using even-odd rule" },
+ { "G", "Set gray level for stroking operations" },
+ { "g", "Set gray level for nonstroking operations" },
+ { "gs", "(PDF 1.2) Set parameters from graphics state parameter dictionary" },
+ { "h", "Close subpath" },
+ { "i", "Set flatness tolerance" },
+ { "ID", "Begin inline image data" },
+ { "j", "Set line join style" },
+ { "J", "Set line cap style" },
+ { "K", "Set CMYK color for stroking operations" },
+ { "k", "Set CMYK color for nonstroking operations" },
+ { "l", "Append straight line segment to path" },
+ { "m", "Begin new subpath" },
+ { "M", "Set miter limit" },
+ { "MP", "(PDF 1.2) Define marked-content point" },
+ { "n", "End path without filling or stroking" },
+ { "q", "Save graphics state" },
+ { "Q", "Restore graphics state" },
+ { "re", "Append rectangle to path" },
+ { "RG", "Set RGB color for stroking operations" },
+ { "rg", "Set RGB color for nonstroking operations" },
+ { "ri", "Set color rendering intent" },
+ { "s", "Close and stroke path" },
+ { "S", "Stroke path" },
+ { "SC", "(PDF 1.1) Set color for stroking operations" },
+ { "sc", "(PDF 1.1) Set color for nonstroking operations" },
+ { "SCN", "(PDF 1.2) Set color for stroking operations (ICCBased and special color spaces)" },
+ { "scn", "(PDF 1.2) Set color for nonstroking operations (ICCBased and special color spaces)" },
+ { "sh", "(PDF 1.3) Paint area defined by shading pattern" },
+ { "T*", "Move to start of next text line" },
+ { "Tc", "Set character spacing" },
+ { "Td", "Move text position" },
+ { "TD", "Move text position and set leading" },
+ { "Tf", "Set text font and size" },
+ { "Tj", "Show text" },
+ { "TJ", "Show text, allowing individual glyph positioning" },
+ { "TL", "Set text leading" },
+ { "Tm", "Set text matrix and text line matrix" },
+ { "Tr", "Set text rendering mode" },
+ { "Ts", "Set text rise" },
+ { "Tw", "Set word spacing" },
+ { "Tz", "Set horizontal text scaling" },
+ { "v", "Append curved segment to path (initial point replicated)" },
+ { "w", "Set line width" },
+ { "W", "Set clipping path using nonzero winding number rule" },
+ { "W*", "Set clipping path using even-odd rule" },
+ { "y", "Append curved segment to path (final point replicated)" },
+ { "'", "Move to next line and show text" },
+ { "\"", "Set word and character spacing, move to next line, and show text" },
+};
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/perf-test-preview-dummy.cc b/Build/source/libs/poppler/poppler-0.12.4/test/perf-test-preview-dummy.cc
new file mode 100644
index 00000000000..09f7d0f8790
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/perf-test-preview-dummy.cc
@@ -0,0 +1,22 @@
+/* Copyright Krzysztof Kowalczyk 2006-2007
+ License: GPLv2 */
+
+/* This is a no-op preview support for perf-test.
+Using this perf-test still works for performance testing, you just don't
+get any visual feedback during testing.
+*/
+
+#include "splash/SplashBitmap.h"
+
+void PreviewBitmapSplash(SplashBitmap *bmpSplash)
+{
+}
+
+void PreviewBitmapDestroy(void)
+{
+}
+
+void PreviewBitmapInit(void)
+{
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/test/perf-test.cc b/Build/source/libs/poppler/poppler-0.12.4/test/perf-test.cc
new file mode 100644
index 00000000000..a11a377052d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/test/perf-test.cc
@@ -0,0 +1,1277 @@
+/* Copyright Krzysztof Kowalczyk 2006-2007
+ Copyright Hib Eris <hib@hiberis.nl> 2008
+ License: GPLv2 */
+/*
+ A tool to stress-test poppler rendering and measure rendering times for
+ very simplistic performance measuring.
+
+ TODO:
+ * make it work with cairo output as well
+ * print more info about document like e.g. enumarate images,
+ streams, compression, encryption, password-protection. Each should have
+ a command-line arguments to turn it on/off
+ * never over-write file given as -out argument (optionally, provide -force
+ option to force writing the -out file). It's way too easy too lose results
+ of a previous run.
+*/
+
+#ifdef _MSC_VER
+// this sucks but I don't know any other way
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+// Define COPY_FILE if you want the file to be copied to a local disk first
+// before it's tested. This is desired if a file is on a slow drive.
+// Currently copying only works on Windows.
+// Not enabled by default.
+//#define COPY_FILE 1
+
+#include <assert.h>
+#include <config.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#include "Error.h"
+#include "ErrorCodes.h"
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "goo/GooTimer.h"
+#include "GlobalParams.h"
+#include "splash/SplashBitmap.h"
+#include "Object.h" /* must be included before SplashOutputDev.h because of sloppiness in SplashOutputDev.h */
+#include "SplashOutputDev.h"
+#include "TextOutputDev.h"
+#include "PDFDoc.h"
+#include "Link.h"
+
+#ifdef _MSC_VER
+#define strdup _strdup
+#define strcasecmp _stricmp
+#endif
+
+#define dimof(X) (sizeof(X)/sizeof((X)[0]))
+
+#define INVALID_PAGE_NO -1
+
+/* Those must be implemented in order to provide preview during execution.
+ They can be no-ops. An implementation for windows is in
+ perf-test-preview-win.cc
+*/
+extern void PreviewBitmapInit(void);
+extern void PreviewBitmapDestroy(void);
+extern void PreviewBitmapSplash(SplashBitmap *bmpSplash);
+
+class PdfEnginePoppler {
+public:
+ PdfEnginePoppler();
+ ~PdfEnginePoppler();
+
+ const char *fileName(void) const { return _fileName; };
+
+ void setFileName(const char *fileName) {
+ assert(!_fileName);
+ _fileName = (char*)strdup(fileName);
+ }
+
+ int pageCount(void) const { return _pageCount; }
+
+ bool load(const char *fileName);
+ SplashBitmap *renderBitmap(int pageNo, double zoomReal, int rotation);
+
+ SplashOutputDev * outputDevice();
+private:
+ char * _fileName;
+ int _pageCount;
+
+ PDFDoc * _pdfDoc;
+ SplashOutputDev * _outputDev;
+};
+
+typedef struct StrList {
+ struct StrList *next;
+ char * str;
+} StrList;
+
+/* List of all command-line arguments that are not switches.
+ We assume those are:
+ - names of PDF files
+ - names of a file with a list of PDF files
+ - names of directories with PDF files
+*/
+static StrList *gArgsListRoot = NULL;
+
+/* Names of all command-line switches we recognize */
+#define TIMINGS_ARG "-timings"
+#define RESOLUTION_ARG "-resolution"
+#define RECURSIVE_ARG "-recursive"
+#define OUT_ARG "-out"
+#define PREVIEW_ARG "-preview"
+#define SLOW_PREVIEW_ARG "-slowpreview"
+#define LOAD_ONLY_ARG "-loadonly"
+#define PAGE_ARG "-page"
+#define TEXT_ARG "-text"
+
+/* Should we record timings? True if -timings command-line argument was given. */
+static bool gfTimings = false;
+
+/* If true, we use render each page at resolution 'gResolutionX'/'gResolutionY'.
+ If false, we render each page at its native resolution.
+ True if -resolution NxM command-line argument was given. */
+static bool gfForceResolution = false;
+static int gResolutionX = 0;
+static int gResolutionY = 0;
+/* If NULL, we output the log info to stdout. If not NULL, should be a name
+ of the file to which we output log info.
+ Controled by -out command-line argument. */
+static char * gOutFileName = NULL;
+/* FILE * correspondig to gOutFileName or stdout if gOutFileName is NULL or
+ was invalid name */
+static FILE * gOutFile = NULL;
+/* FILE * correspondig to gOutFileName or stderr if gOutFileName is NULL or
+ was invalid name */
+static FILE * gErrFile = NULL;
+
+/* If True and a directory is given as a command-line argument, we'll process
+ pdf files in sub-directories as well.
+ Controlled by -recursive command-line argument */
+static bool gfRecursive = false;
+
+/* If true, preview rendered image. To make sure that they're being rendered correctly. */
+static bool gfPreview = false;
+
+/* 1 second (1000 milliseconds) */
+#define SLOW_PREVIEW_TIME 1000
+
+/* If true, preview rendered image in a slow mode i.e. delay displaying for
+ SLOW_PREVIEW_TIME. This is so that a human has enough time to see if the
+ PDF renders ok. In release mode on fast processor pages take only ~100-200 ms
+ to render and they go away too quickly to be inspected by a human. */
+static bool gfSlowPreview = false;
+
+/* If true, we only dump the text, not render */
+static bool gfTextOnly = false;
+
+#define PAGE_NO_NOT_GIVEN -1
+
+/* If equals PAGE_NO_NOT_GIVEN, we're in default mode where we render all pages.
+ If different, will only render this page */
+static int gPageNo = PAGE_NO_NOT_GIVEN;
+/* If true, will only load the file, not render any pages. Mostly for
+ profiling load time */
+static bool gfLoadOnly = false;
+
+#define PDF_FILE_DPI 72
+
+#define MAX_FILENAME_SIZE 1024
+
+/* DOS is 0xd 0xa */
+#define DOS_NEWLINE "\x0d\x0a"
+/* Mac is single 0xd */
+#define MAC_NEWLINE "\x0d"
+/* Unix is single 0xa (10) */
+#define UNIX_NEWLINE "\x0a"
+#define UNIX_NEWLINE_C 0xa
+
+#ifdef _WIN32
+ #define DIR_SEP_CHAR '\\'
+ #define DIR_SEP_STR "\\"
+#else
+ #define DIR_SEP_CHAR '/'
+ #define DIR_SEP_STR "/"
+#endif
+
+void memzero(void *data, size_t len)
+{
+ memset(data, 0, len);
+}
+
+void *zmalloc(size_t len)
+{
+ void *data = malloc(len);
+ if (data)
+ memzero(data, len);
+ return data;
+}
+
+/* Concatenate 4 strings. Any string can be NULL.
+ Caller needs to free() memory. */
+char *str_cat4(const char *str1, const char *str2, const char *str3, const char *str4)
+{
+ char *str;
+ char *tmp;
+ size_t str1_len = 0;
+ size_t str2_len = 0;
+ size_t str3_len = 0;
+ size_t str4_len = 0;
+
+ if (str1)
+ str1_len = strlen(str1);
+ if (str2)
+ str2_len = strlen(str2);
+ if (str3)
+ str3_len = strlen(str3);
+ if (str4)
+ str4_len = strlen(str4);
+
+ str = (char*)zmalloc(str1_len + str2_len + str3_len + str4_len + 1);
+ if (!str)
+ return NULL;
+
+ tmp = str;
+ if (str1) {
+ memcpy(tmp, str1, str1_len);
+ tmp += str1_len;
+ }
+ if (str2) {
+ memcpy(tmp, str2, str2_len);
+ tmp += str2_len;
+ }
+ if (str3) {
+ memcpy(tmp, str3, str3_len);
+ tmp += str3_len;
+ }
+ if (str4) {
+ memcpy(tmp, str4, str1_len);
+ }
+ return str;
+}
+
+char *str_dup(const char *str)
+{
+ return str_cat4(str, NULL, NULL, NULL);
+}
+
+bool str_eq(const char *str1, const char *str2)
+{
+ if (!str1 && !str2)
+ return true;
+ if (!str1 || !str2)
+ return false;
+ if (0 == strcmp(str1, str2))
+ return true;
+ return false;
+}
+
+bool str_ieq(const char *str1, const char *str2)
+{
+ if (!str1 && !str2)
+ return true;
+ if (!str1 || !str2)
+ return false;
+ if (0 == strcasecmp(str1, str2))
+ return true;
+ return false;
+}
+
+bool str_endswith(const char *txt, const char *end)
+{
+ size_t end_len;
+ size_t txt_len;
+
+ if (!txt || !end)
+ return false;
+
+ txt_len = strlen(txt);
+ end_len = strlen(end);
+ if (end_len > txt_len)
+ return false;
+ if (str_eq(txt+txt_len-end_len, end))
+ return true;
+ return false;
+}
+
+/* TODO: probably should move to some other file and change name to
+ sleep_milliseconds */
+void sleep_milliseconds(int milliseconds)
+{
+#ifdef _WIN32
+ Sleep((DWORD)milliseconds);
+#else
+ struct timespec tv;
+ int secs, nanosecs;
+ secs = milliseconds / 1000;
+ nanosecs = (milliseconds - (secs * 1000)) * 1000;
+ tv.tv_sec = (time_t) secs;
+ tv.tv_nsec = (long) nanosecs;
+ while (1)
+ {
+ int rval = nanosleep(&tv, &tv);
+ if (rval == 0)
+ /* Completed the entire sleep time; all done. */
+ return;
+ else if (errno == EINTR)
+ /* Interrupted by a signal. Try again. */
+ continue;
+ else
+ /* Some other error; bail out. */
+ return;
+ }
+ return;
+#endif
+}
+
+#ifndef _MSC_VER
+void strcpy_s(char* dst, size_t dst_size, const char* src)
+{
+ size_t src_size = strlen(src) + 1;
+ if (src_size <= dst_size)
+ memcpy(dst, src, src_size);
+ else {
+ if (dst_size > 0) {
+ memcpy(dst, src, dst_size);
+ dst[dst_size-1] = 0;
+ }
+ }
+}
+
+void strcat_s(char *dst, size_t dst_size, const char* src)
+{
+ size_t dst_len = strlen(dst);
+ if (dst_len >= dst_size) {
+ if (dst_size > 0)
+ dst[dst_size-1] = 0;
+ return;
+ }
+ strcpy_s(dst+dst_len, dst_size - dst_len, src);
+}
+#endif
+
+static SplashColorMode gSplashColorMode = splashModeBGR8;
+
+static SplashColor splashColRed;
+static SplashColor splashColGreen;
+static SplashColor splashColBlue;
+static SplashColor splashColWhite;
+static SplashColor splashColBlack;
+
+#define SPLASH_COL_RED_PTR (SplashColorPtr)&(splashColRed[0])
+#define SPLASH_COL_GREEN_PTR (SplashColorPtr)&(splashColGreen[0])
+#define SPLASH_COL_BLUE_PTR (SplashColorPtr)&(splashColBlue[0])
+#define SPLASH_COL_WHITE_PTR (SplashColorPtr)&(splashColWhite[0])
+#define SPLASH_COL_BLACK_PTR (SplashColorPtr)&(splashColBlack[0])
+
+static SplashColorPtr gBgColor = SPLASH_COL_WHITE_PTR;
+
+static void splashColorSet(SplashColorPtr col, Guchar red, Guchar green, Guchar blue, Guchar alpha)
+{
+ switch (gSplashColorMode)
+ {
+ case splashModeBGR8:
+ col[0] = blue;
+ col[1] = green;
+ col[2] = red;
+ break;
+ case splashModeRGB8:
+ col[0] = red;
+ col[1] = green;
+ col[2] = blue;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+void SplashColorsInit(void)
+{
+ splashColorSet(SPLASH_COL_RED_PTR, 0xff, 0, 0, 0);
+ splashColorSet(SPLASH_COL_GREEN_PTR, 0, 0xff, 0, 0);
+ splashColorSet(SPLASH_COL_BLUE_PTR, 0, 0, 0xff, 0);
+ splashColorSet(SPLASH_COL_BLACK_PTR, 0, 0, 0, 0);
+ splashColorSet(SPLASH_COL_WHITE_PTR, 0xff, 0xff, 0xff, 0);
+}
+
+PdfEnginePoppler::PdfEnginePoppler() :
+ _fileName(0)
+ , _pageCount(INVALID_PAGE_NO)
+ , _pdfDoc(NULL)
+ , _outputDev(NULL)
+{
+}
+
+PdfEnginePoppler::~PdfEnginePoppler()
+{
+ free(_fileName);
+ delete _outputDev;
+ delete _pdfDoc;
+}
+
+bool PdfEnginePoppler::load(const char *fileName)
+{
+ setFileName(fileName);
+ /* note: don't delete fileNameStr since PDFDoc takes ownership and deletes them itself */
+ GooString *fileNameStr = new GooString(fileName);
+ if (!fileNameStr) return false;
+
+ _pdfDoc = new PDFDoc(fileNameStr, NULL, NULL, (void*)NULL);
+ if (!_pdfDoc->isOk()) {
+ return false;
+ }
+ _pageCount = _pdfDoc->getNumPages();
+ return true;
+}
+
+SplashOutputDev * PdfEnginePoppler::outputDevice() {
+ if (!_outputDev) {
+ GBool bitmapTopDown = gTrue;
+ _outputDev = new SplashOutputDev(gSplashColorMode, 4, gFalse, gBgColor, bitmapTopDown);
+ if (_outputDev)
+ _outputDev->startDoc(_pdfDoc->getXRef());
+ }
+ return _outputDev;
+}
+
+SplashBitmap *PdfEnginePoppler::renderBitmap(int pageNo, double zoomReal, int rotation)
+{
+ assert(outputDevice());
+ if (!outputDevice()) return NULL;
+
+ double hDPI = (double)PDF_FILE_DPI * zoomReal * 0.01;
+ double vDPI = (double)PDF_FILE_DPI * zoomReal * 0.01;
+ GBool useMediaBox = gFalse;
+ GBool crop = gTrue;
+ GBool doLinks = gTrue;
+ _pdfDoc->displayPage(_outputDev, pageNo, hDPI, vDPI, rotation, useMediaBox,
+ crop, doLinks, NULL, NULL);
+
+ SplashBitmap* bmp = _outputDev->takeBitmap();
+ return bmp;
+}
+
+struct FindFileState {
+ char path[MAX_FILENAME_SIZE];
+ char dirpath[MAX_FILENAME_SIZE]; /* current dir path */
+ char pattern[MAX_FILENAME_SIZE]; /* search pattern */
+ const char *bufptr;
+#ifdef _WIN32
+ WIN32_FIND_DATA fileinfo;
+ HANDLE dir;
+#else
+ DIR *dir;
+#endif
+};
+
+#ifdef _WIN32
+#include <windows.h>
+#include <sys/timeb.h>
+#include <direct.h>
+
+__inline char *getcwd(char *buffer, int maxlen)
+{
+ return _getcwd(buffer, maxlen);
+}
+
+int fnmatch(const char *pattern, const char *string, int flags)
+{
+ int prefix_len;
+ const char *star_pos = strchr(pattern, '*');
+ if (!star_pos)
+ return strcmp(pattern, string) != 0;
+
+ prefix_len = (int)(star_pos-pattern);
+ if (0 == prefix_len)
+ return 0;
+
+ if (0 == _strnicmp(pattern, string, prefix_len))
+ return 0;
+
+ return 1;
+}
+
+#else
+#include <fnmatch.h>
+#endif
+
+#ifdef _WIN32
+/* on windows to query dirs we need foo\* to get files in this directory.
+ foo\ always fails and foo will return just info about foo directory,
+ not files in this directory */
+static void win_correct_path_for_FindFirstFile(char *path, int path_max_len)
+{
+ int path_len = strlen(path);
+ if (path_len >= path_max_len-4)
+ return;
+ if (DIR_SEP_CHAR != path[path_len])
+ path[path_len++] = DIR_SEP_CHAR;
+ path[path_len++] = '*';
+ path[path_len] = 0;
+}
+#endif
+
+FindFileState *find_file_open(const char *path, const char *pattern)
+{
+ FindFileState *s;
+
+ s = (FindFileState*)malloc(sizeof(FindFileState));
+ if (!s)
+ return NULL;
+ strcpy_s(s->path, sizeof(s->path), path);
+ strcpy_s(s->dirpath, sizeof(s->path), path);
+#ifdef _WIN32
+ win_correct_path_for_FindFirstFile(s->path, sizeof(s->path));
+#endif
+ strcpy_s(s->pattern, sizeof(s->pattern), pattern);
+ s->bufptr = s->path;
+#ifdef _WIN32
+ s->dir = INVALID_HANDLE_VALUE;
+#else
+ s->dir = NULL;
+#endif
+ return s;
+}
+
+#if 0 /* re-enable if we #define USE_OWN_GET_AUTH_DATA */
+void *StandardSecurityHandler::getAuthData()
+{
+ return NULL;
+}
+#endif
+
+char *makepath(char *buf, int buf_size, const char *path,
+ const char *filename)
+{
+ strcpy_s(buf, buf_size, path);
+ int len = strlen(path);
+ if (len > 0 && path[len - 1] != DIR_SEP_CHAR && len + 1 < buf_size) {
+ buf[len++] = DIR_SEP_CHAR;
+ buf[len] = '\0';
+ }
+ strcat_s(buf, buf_size, filename);
+ return buf;
+}
+
+#ifdef _WIN32
+static int skip_matching_file(const char *filename)
+{
+ if (0 == strcmp(".", filename))
+ return 1;
+ if (0 == strcmp("..", filename))
+ return 1;
+ return 0;
+}
+#endif
+
+int find_file_next(FindFileState *s, char *filename, int filename_size_max)
+{
+#ifdef _WIN32
+ int fFound;
+ if (INVALID_HANDLE_VALUE == s->dir) {
+ s->dir = FindFirstFile(s->path, &(s->fileinfo));
+ if (INVALID_HANDLE_VALUE == s->dir)
+ return -1;
+ goto CheckFile;
+ }
+
+ while (1) {
+ fFound = FindNextFile(s->dir, &(s->fileinfo));
+ if (!fFound)
+ return -1;
+CheckFile:
+ if (skip_matching_file(s->fileinfo.cFileName))
+ continue;
+ if (0 == fnmatch(s->pattern, s->fileinfo.cFileName, 0) ) {
+ makepath(filename, filename_size_max, s->dirpath, s->fileinfo.cFileName);
+ return 0;
+ }
+ }
+#else
+ struct dirent *dirent;
+ const char *p;
+ char *q;
+
+ if (s->dir == NULL)
+ goto redo;
+
+ for (;;) {
+ dirent = readdir(s->dir);
+ if (dirent == NULL) {
+ redo:
+ if (s->dir) {
+ closedir(s->dir);
+ s->dir = NULL;
+ }
+ p = s->bufptr;
+ if (*p == '\0')
+ return -1;
+ /* CG: get_str(&p, s->dirpath, sizeof(s->dirpath), ":") */
+ q = s->dirpath;
+ while (*p != ':' && *p != '\0') {
+ if ((q - s->dirpath) < (int)sizeof(s->dirpath) - 1)
+ *q++ = *p;
+ p++;
+ }
+ *q = '\0';
+ if (*p == ':')
+ p++;
+ s->bufptr = p;
+ s->dir = opendir(s->dirpath);
+ if (!s->dir)
+ goto redo;
+ } else {
+ if (fnmatch(s->pattern, dirent->d_name, 0) == 0) {
+ makepath(filename, filename_size_max,
+ s->dirpath, dirent->d_name);
+ return 0;
+ }
+ }
+ }
+#endif
+}
+
+void find_file_close(FindFileState *s)
+{
+#ifdef _WIN32
+ if (INVALID_HANDLE_VALUE != s->dir)
+ FindClose(s->dir);
+#else
+ if (s->dir)
+ closedir(s->dir);
+#endif
+ free(s);
+}
+
+int StrList_Len(StrList **root)
+{
+ int len = 0;
+ StrList * cur;
+ assert(root);
+ if (!root)
+ return 0;
+ cur = *root;
+ while (cur) {
+ ++len;
+ cur = cur->next;
+ }
+ return len;
+}
+
+int StrList_InsertAndOwn(StrList **root, char *txt)
+{
+ StrList * el;
+ assert(root && txt);
+ if (!root || !txt)
+ return false;
+
+ el = (StrList*)malloc(sizeof(StrList));
+ if (!el)
+ return false;
+ el->str = txt;
+ el->next = *root;
+ *root = el;
+ return true;
+}
+
+int StrList_Insert(StrList **root, char *txt)
+{
+ char *txtDup;
+
+ assert(root && txt);
+ if (!root || !txt)
+ return false;
+ txtDup = str_dup(txt);
+ if (!txtDup)
+ return false;
+
+ if (!StrList_InsertAndOwn(root, txtDup)) {
+ free((void*)txtDup);
+ return false;
+ }
+ return true;
+}
+
+StrList* StrList_RemoveHead(StrList **root)
+{
+ StrList *tmp;
+ assert(root);
+ if (!root)
+ return NULL;
+
+ if (!*root)
+ return NULL;
+ tmp = *root;
+ *root = tmp->next;
+ tmp->next = NULL;
+ return tmp;
+}
+
+void StrList_FreeElement(StrList *el)
+{
+ if (!el)
+ return;
+ free((void*)el->str);
+ free((void*)el);
+}
+
+void StrList_Destroy(StrList **root)
+{
+ StrList * cur;
+ StrList * next;
+
+ if (!root)
+ return;
+ cur = *root;
+ while (cur) {
+ next = cur->next;
+ StrList_FreeElement(cur);
+ cur = next;
+ }
+ *root = NULL;
+}
+
+#ifndef _WIN32
+void OutputDebugString(const char *txt)
+{
+ /* do nothing */
+}
+#define _snprintf snprintf
+#define _vsnprintf vsnprintf
+#endif
+
+void my_error(int pos, char *msg, va_list args) {
+#if 0
+ char buf[4096], *p = buf;
+
+ // NB: this can be called before the globalParams object is created
+ if (globalParams && globalParams->getErrQuiet()) {
+ return;
+ }
+
+ if (pos >= 0) {
+ p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
+ *p = '\0';
+ OutputDebugString(p);
+ } else {
+ OutputDebugString("Error: ");
+ }
+
+ p = buf;
+ p += _vsnprintf(p, sizeof(buf) - 1, msg, args);
+ while ( p > buf && isspace(p[-1]) )
+ *--p = '\0';
+ *p++ = '\r';
+ *p++ = '\n';
+ *p = '\0';
+ OutputDebugString(buf);
+
+ if (pos >= 0) {
+ p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
+ *p = '\0';
+ OutputDebugString(buf);
+ if (gErrFile)
+ fprintf(gErrFile, buf);
+ } else {
+ OutputDebugString("Error: ");
+ if (gErrFile)
+ fprintf(gErrFile, "Error: ");
+ }
+#endif
+#if 0
+ p = buf;
+ va_start(args, msg);
+ p += _vsnprintf(p, sizeof(buf) - 3, msg, args);
+ while ( p > buf && isspace(p[-1]) )
+ *--p = '\0';
+ *p++ = '\r';
+ *p++ = '\n';
+ *p = '\0';
+ OutputDebugString(buf);
+ if (gErrFile)
+ fprintf(gErrFile, buf);
+ va_end(args);
+#endif
+}
+
+void LogInfo(char *fmt, ...)
+{
+ va_list args;
+ char buf[4096], *p = buf;
+
+ p = buf;
+ va_start(args, fmt);
+ p += _vsnprintf(p, sizeof(buf) - 1, fmt, args);
+ *p = '\0';
+ fprintf(gOutFile, "%s", buf);
+ va_end(args);
+ fflush(gOutFile);
+}
+
+static void PrintUsageAndExit(int argc, char **argv)
+{
+ printf("Usage: pdftest [-preview|-slowpreview] [-loadonly] [-timings] [-text] [-resolution NxM] [-recursive] [-page N] [-out out.txt] pdf-files-to-process\n");
+ for (int i=0; i < argc; i++) {
+ printf("i=%d, '%s'\n", i, argv[i]);
+ }
+ exit(0);
+}
+
+static bool ShowPreview(void)
+{
+ if (gfPreview || gfSlowPreview)
+ return true;
+ return false;
+}
+
+static void RenderPdfAsText(const char *fileName)
+{
+ GooString * fileNameStr = NULL;
+ PDFDoc * pdfDoc = NULL;
+ GooString * txt = NULL;
+ int pageCount;
+ double timeInMs;
+
+ assert(fileName);
+ if (!fileName)
+ return;
+
+ LogInfo("started: %s\n", fileName);
+
+ TextOutputDev * textOut = new TextOutputDev(NULL, gTrue, gFalse, gFalse);
+ if (!textOut->isOk()) {
+ delete textOut;
+ return;
+ }
+
+ GooTimer msTimer;
+ /* note: don't delete fileNameStr since PDFDoc takes ownership and deletes them itself */
+ fileNameStr = new GooString(fileName);
+ if (!fileNameStr)
+ goto Exit;
+
+ pdfDoc = new PDFDoc(fileNameStr, NULL, NULL, NULL);
+ if (!pdfDoc->isOk()) {
+ error(-1, "RenderPdfFile(): failed to open PDF file %s\n", fileName);
+ goto Exit;
+ }
+
+ msTimer.stop();
+ timeInMs = msTimer.getElapsed();
+ LogInfo("load: %.2f ms\n", timeInMs);
+
+ pageCount = pdfDoc->getNumPages();
+ LogInfo("page count: %d\n", pageCount);
+
+ for (int curPage = 1; curPage <= pageCount; curPage++) {
+ if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
+ continue;
+
+ msTimer.start();
+ int rotate = 0;
+ GBool useMediaBox = gFalse;
+ GBool crop = gTrue;
+ GBool doLinks = gFalse;
+ pdfDoc->displayPage(textOut, curPage, 72, 72, rotate, useMediaBox, crop, doLinks);
+ txt = textOut->getText(0.0, 0.0, 10000.0, 10000.0);
+ msTimer.stop();
+ timeInMs = msTimer.getElapsed();
+ if (gfTimings)
+ LogInfo("page %d: %.2f ms\n", curPage, timeInMs);
+ printf("%s\n", txt->getCString());
+ delete txt;
+ txt = NULL;
+ }
+
+Exit:
+ LogInfo("finished: %s\n", fileName);
+ delete textOut;
+ delete pdfDoc;
+}
+
+#ifdef _MSC_VER
+#define POPPLER_TMP_NAME "c:\\poppler_tmp.pdf"
+#else
+#define POPPLER_TMP_NAME "/tmp/poppler_tmp.pdf"
+#endif
+
+static void RenderPdf(const char *fileName)
+{
+ const char * fileNameSplash = NULL;
+ PdfEnginePoppler * engineSplash = NULL;
+ int pageCount;
+ double timeInMs;
+
+#ifdef COPY_FILE
+ // TODO: fails if file already exists and has read-only attribute
+ CopyFile(fileName, POPPLER_TMP_NAME, false);
+ fileNameSplash = POPPLER_TMP_NAME;
+#else
+ fileNameSplash = fileName;
+#endif
+ LogInfo("started: %s\n", fileName);
+
+ engineSplash = new PdfEnginePoppler();
+
+ GooTimer msTimer;
+ if (!engineSplash->load(fileNameSplash)) {
+ LogInfo("failed to load splash\n");
+ goto Error;
+ }
+ msTimer.stop();
+ timeInMs = msTimer.getElapsed();
+ LogInfo("load splash: %.2f ms\n", timeInMs);
+ pageCount = engineSplash->pageCount();
+
+ LogInfo("page count: %d\n", pageCount);
+ if (gfLoadOnly)
+ goto Error;
+
+ for (int curPage = 1; curPage <= pageCount; curPage++) {
+ if ((gPageNo != PAGE_NO_NOT_GIVEN) && (gPageNo != curPage))
+ continue;
+
+ SplashBitmap *bmpSplash = NULL;
+
+ GooTimer msTimer;
+ bmpSplash = engineSplash->renderBitmap(curPage, 100.0, 0);
+ msTimer.stop();
+ double timeInMs = msTimer.getElapsed();
+ if (gfTimings) {
+ if (!bmpSplash)
+ LogInfo("page splash %d: failed to render\n", curPage);
+ else
+ LogInfo("page splash %d (%dx%d): %.2f ms\n", curPage, bmpSplash->getWidth(), bmpSplash->getHeight(), timeInMs);
+ }
+
+ if (ShowPreview()) {
+ PreviewBitmapSplash(bmpSplash);
+ if (gfSlowPreview)
+ sleep_milliseconds(SLOW_PREVIEW_TIME);
+ }
+ delete bmpSplash;
+ }
+Error:
+ delete engineSplash;
+ LogInfo("finished: %s\n", fileName);
+}
+
+static void RenderFile(const char *fileName)
+{
+ if (gfTextOnly) {
+ RenderPdfAsText(fileName);
+ return;
+ }
+
+ RenderPdf(fileName);
+}
+
+static bool ParseInteger(const char *start, const char *end, int *intOut)
+{
+ char numBuf[16];
+ int digitsCount;
+ const char * tmp;
+
+ assert(start && end && intOut);
+ assert(end >= start);
+ if (!start || !end || !intOut || (start > end))
+ return false;
+
+ digitsCount = 0;
+ tmp = start;
+ while (tmp <= end) {
+ if (isspace(*tmp)) {
+ /* do nothing, we allow whitespace */
+ } else if (!isdigit(*tmp))
+ return false;
+ numBuf[digitsCount] = *tmp;
+ ++digitsCount;
+ if (digitsCount == dimof(numBuf)-3) /* -3 to be safe */
+ return false;
+ ++tmp;
+ }
+ if (0 == digitsCount)
+ return false;
+ numBuf[digitsCount] = 0;
+ *intOut = atoi(numBuf);
+ return true;
+}
+
+/* Given 'resolutionString' in format NxM (e.g. "100x200"), parse the string and put N
+ into 'resolutionXOut' and M into 'resolutionYOut'.
+ Return false if there was an error (e.g. string is not in the right format */
+static bool ParseResolutionString(const char *resolutionString, int *resolutionXOut, int *resolutionYOut)
+{
+ const char * posOfX;
+
+ assert(resolutionString);
+ assert(resolutionXOut);
+ assert(resolutionYOut);
+ if (!resolutionString || !resolutionXOut || !resolutionYOut)
+ return false;
+ *resolutionXOut = 0;
+ *resolutionYOut = 0;
+ posOfX = strchr(resolutionString, 'X');
+ if (!posOfX)
+ posOfX = strchr(resolutionString, 'x');
+ if (!posOfX)
+ return false;
+ if (posOfX == resolutionString)
+ return false;
+ if (!ParseInteger(resolutionString, posOfX-1, resolutionXOut))
+ return false;
+ if (!ParseInteger(posOfX+1, resolutionString+strlen(resolutionString)-1, resolutionYOut))
+ return false;
+ return true;
+}
+
+static void ParseCommandLine(int argc, char **argv)
+{
+ char * arg;
+
+ if (argc < 2)
+ PrintUsageAndExit(argc, argv);
+
+ for (int i=1; i < argc; i++) {
+ arg = argv[i];
+ assert(arg);
+ if ('-' == arg[0]) {
+ if (str_ieq(arg, TIMINGS_ARG)) {
+ gfTimings = true;
+ } else if (str_ieq(arg, RESOLUTION_ARG)) {
+ ++i;
+ if (i == argc)
+ PrintUsageAndExit(argc, argv); /* expect a file name after that */
+ if (!ParseResolutionString(argv[i], &gResolutionX, &gResolutionY))
+ PrintUsageAndExit(argc, argv);
+ gfForceResolution = true;
+ } else if (str_ieq(arg, RECURSIVE_ARG)) {
+ gfRecursive = true;
+ } else if (str_ieq(arg, OUT_ARG)) {
+ /* expect a file name after that */
+ ++i;
+ if (i == argc)
+ PrintUsageAndExit(argc, argv);
+ gOutFileName = str_dup(argv[i]);
+ } else if (str_ieq(arg, PREVIEW_ARG)) {
+ gfPreview = true;
+ } else if (str_ieq(arg, TEXT_ARG)) {
+ gfTextOnly = true;
+ } else if (str_ieq(arg, SLOW_PREVIEW_ARG)) {
+ gfSlowPreview = true;
+ } else if (str_ieq(arg, LOAD_ONLY_ARG)) {
+ gfLoadOnly = true;
+ } else if (str_ieq(arg, PAGE_ARG)) {
+ /* expect an integer after that */
+ ++i;
+ if (i == argc)
+ PrintUsageAndExit(argc, argv);
+ gPageNo = atoi(argv[i]);
+ if (gPageNo < 1)
+ PrintUsageAndExit(argc, argv);
+ } else {
+ /* unknown option */
+ PrintUsageAndExit(argc, argv);
+ }
+ } else {
+ /* we assume that this is not an option hence it must be
+ a name of PDF/directory/file with PDF names */
+ StrList_Insert(&gArgsListRoot, arg);
+ }
+ }
+}
+
+#if 0
+void RenderFileList(char *pdfFileList)
+{
+ char *data = NULL;
+ char *dataNormalized = NULL;
+ char *pdfFileName;
+ uint64_t fileSize;
+
+ assert(pdfFileList);
+ if (!pdfFileList)
+ return;
+ data = file_read_all(pdfFileList, &fileSize);
+ if (!data) {
+ error(-1, "couldn't load file '%s'", pdfFileList);
+ return;
+ }
+ dataNormalized = str_normalize_newline(data, UNIX_NEWLINE);
+ if (!dataNormalized) {
+ error(-1, "couldn't normalize data of file '%s'", pdfFileList);
+ goto Exit;
+ }
+ for (;;) {
+ pdfFileName = str_split_iter(&dataNormalized, UNIX_NEWLINE_C);
+ if (!pdfFileName)
+ break;
+ str_strip_ws_both(pdfFileName);
+ if (str_empty(pdfFileName)) {
+ free((void*)pdfFileName);
+ continue;
+ }
+ RenderFile(pdfFileName);
+ free((void*)pdfFileName);
+ }
+Exit:
+ free((void*)dataNormalized);
+ free((void*)data);
+}
+#endif
+
+#ifdef _WIN32
+#include <sys/types.h>
+#include <sys/stat.h>
+
+bool IsDirectoryName(char *path)
+{
+ struct _stat buf;
+ int result;
+
+ result = _stat(path, &buf );
+ if (0 != result)
+ return false;
+
+ if (buf.st_mode & _S_IFDIR)
+ return true;
+
+ return false;
+}
+
+bool IsFileName(char *path)
+{
+ struct _stat buf;
+ int result;
+
+ result = _stat(path, &buf );
+ if (0 != result)
+ return false;
+
+ if (buf.st_mode & _S_IFREG)
+ return true;
+
+ return false;
+}
+#else
+bool IsDirectoryName(char *path)
+{
+ /* TODO: implement me */
+ return false;
+}
+
+bool IsFileName(char *path)
+{
+ /* TODO: implement me */
+ return true;
+}
+#endif
+
+bool IsPdfFileName(char *path)
+{
+ if (str_endswith(path, ".pdf"))
+ return true;
+ return false;
+}
+
+static void RenderDirectory(char *path)
+{
+ FindFileState * ffs;
+ char filename[MAX_FILENAME_SIZE];
+ StrList * dirList = NULL;
+ StrList * el;
+
+ StrList_Insert(&dirList, path);
+
+ while (0 != StrList_Len(&dirList)) {
+ el = StrList_RemoveHead(&dirList);
+ ffs = find_file_open(el->str, "*");
+ while (!find_file_next(ffs, filename, sizeof(filename))) {
+ if (IsDirectoryName(filename)) {
+ if (gfRecursive) {
+ StrList_Insert(&dirList, filename);
+ }
+ } else if (IsFileName(filename)) {
+ if (IsPdfFileName(filename)) {
+ RenderFile(filename);
+ }
+ }
+ }
+ find_file_close(ffs);
+ StrList_FreeElement(el);
+ }
+ StrList_Destroy(&dirList);
+}
+
+/* Render 'cmdLineArg', which can be:
+ - directory name
+ - name of PDF file
+ - name of text file with names of PDF files
+*/
+static void RenderCmdLineArg(char *cmdLineArg)
+{
+ assert(cmdLineArg);
+ if (!cmdLineArg)
+ return;
+ if (IsDirectoryName(cmdLineArg)) {
+ RenderDirectory(cmdLineArg);
+ } else if (IsFileName(cmdLineArg)) {
+ if (IsPdfFileName(cmdLineArg))
+ RenderFile(cmdLineArg);
+#if 0
+ else
+ RenderFileList(cmdLineArg);
+#endif
+ } else {
+ error(-1, "unexpected argument '%s'", cmdLineArg);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ setErrorFunction(my_error);
+ ParseCommandLine(argc, argv);
+ if (0 == StrList_Len(&gArgsListRoot))
+ PrintUsageAndExit(argc, argv);
+ assert(gArgsListRoot);
+
+ SplashColorsInit();
+ globalParams = new GlobalParams();
+ if (!globalParams)
+ return 1;
+ globalParams->setErrQuiet(gFalse);
+ globalParams->setBaseDir("");
+
+ FILE * outFile = NULL;
+ if (gOutFileName) {
+ outFile = fopen(gOutFileName, "wb");
+ if (!outFile) {
+ printf("failed to open -out file %s\n", gOutFileName);
+ return 1;
+ }
+ gOutFile = outFile;
+ }
+ else
+ gOutFile = stdout;
+
+ if (gOutFileName)
+ gErrFile = outFile;
+ else
+ gErrFile = stderr;
+
+ PreviewBitmapInit();
+
+ StrList * curr = gArgsListRoot;
+ while (curr) {
+ RenderCmdLineArg(curr->str);
+ curr = curr->next;
+ }
+ if (outFile)
+ fclose(outFile);
+ PreviewBitmapDestroy();
+ StrList_Destroy(&gArgsListRoot);
+ delete globalParams;
+ free(gOutFileName);
+ return 0;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt b/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt
new file mode 100644
index 00000000000..f5d4911fdea
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/CMakeLists.txt
@@ -0,0 +1,84 @@
+
+set(common_srcs
+ parseargs.c
+)
+set(common_libs
+ poppler
+)
+if (FONTCONFIG_FOUND)
+ set(common_libs ${common_libs} ${FONTCONFIG_LIBRARIES})
+endif (FONTCONFIG_FOUND)
+
+if (ENABLE_SPLASH)
+ # pdftoppm
+ set(pdftoppm_SOURCES ${common_srcs}
+ pdftoppm.cc
+ )
+ add_executable(pdftoppm ${pdftoppm_SOURCES})
+ target_link_libraries(pdftoppm ${common_libs})
+ install(TARGETS pdftoppm DESTINATION bin)
+endif (ENABLE_SPLASH)
+
+# pdffonts
+set(pdffonts_SOURCES ${common_srcs}
+ pdffonts.cc
+)
+add_executable(pdffonts ${pdffonts_SOURCES})
+target_link_libraries(pdffonts ${common_libs})
+install(TARGETS pdffonts DESTINATION bin)
+
+# pdfimages
+set(pdfimages_SOURCES ${common_srcs}
+ pdfimages.cc
+ ImageOutputDev.cc
+ ImageOutputDev.h
+)
+add_executable(pdfimages ${pdfimages_SOURCES})
+target_link_libraries(pdfimages ${common_libs})
+install(TARGETS pdfimages DESTINATION bin)
+
+# pdfinfo
+set(pdfinfo_SOURCES ${common_srcs}
+ pdfinfo.cc printencodings.cc
+)
+add_executable(pdfinfo ${pdfinfo_SOURCES})
+target_link_libraries(pdfinfo ${common_libs})
+install(TARGETS pdfinfo DESTINATION bin)
+
+# pdftops
+set(pdftops_SOURCES ${common_srcs}
+ pdftops.cc
+)
+add_executable(pdftops ${pdftops_SOURCES})
+target_link_libraries(pdftops ${common_libs})
+install(TARGETS pdftops DESTINATION bin)
+
+# pdftotext
+set(pdftotext_SOURCES ${common_srcs}
+ pdftotext.cc printencodings.cc
+)
+add_executable(pdftotext ${pdftotext_SOURCES})
+target_link_libraries(pdftotext ${common_libs})
+install(TARGETS pdftotext DESTINATION bin)
+
+# pdftohtml
+set(pdftohtml_SOURCES ${common_srcs}
+ pdftohtml.cc
+ HtmlFonts.cc
+ HtmlLinks.cc
+ HtmlOutputDev.cc
+)
+add_executable(pdftohtml ${pdftohtml_SOURCES})
+target_link_libraries(pdftohtml ${common_libs})
+install(TARGETS pdftohtml DESTINATION bin)
+
+if (ENABLE_ABIWORD)
+ # pdftoabw
+ set(pdftoabw_SOURCES ${common_srcs}
+ pdftoabw.cc
+ )
+ add_executable(pdftoabw ${pdftoabw_SOURCES})
+ target_link_libraries(pdftoabw ${common_libs})
+ install(TARGETS pdftoabw DESTINATION bin)
+endif (ENABLE_ABIWORD)
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc
new file mode 100644
index 00000000000..d2cbfd5363a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.cc
@@ -0,0 +1,360 @@
+//========================================================================
+//
+// This file comes from pdftohtml project
+// http://pdftohtml.sourceforge.net
+//
+// Copyright from:
+// Gueorgui Ovtcharov
+// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
+// Mikhail Kruk <meshko@cs.brandeis.edu>
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "HtmlFonts.h"
+#include "GlobalParams.h"
+#include "UnicodeMap.h"
+#include <stdio.h>
+
+ struct Fonts{
+ char *Fontname;
+ char *name;
+ };
+
+const int font_num=13;
+
+static Fonts fonts[font_num+1]={
+ {"Courier", "Courier" },
+ {"Courier-Bold", "Courier"},
+ {"Courier-BoldOblique", "Courier"},
+ {"Courier-Oblique", "Courier"},
+ {"Helvetica", "Helvetica"},
+ {"Helvetica-Bold", "Helvetica"},
+ {"Helvetica-BoldOblique", "Helvetica"},
+ {"Helvetica-Oblique", "Helvetica"},
+ {"Symbol", "Symbol" },
+ {"Times-Bold", "Times" },
+ {"Times-BoldItalic", "Times" },
+ {"Times-Italic", "Times" },
+ {"Times-Roman", "Times" },
+ {" " , "Times" },
+};
+
+#define xoutRound(x) ((int)(x + 0.5))
+extern GBool xml;
+
+GooString* HtmlFont::DefaultFont=new GooString("Times"); // Arial,Helvetica,sans-serif
+
+HtmlFontColor::HtmlFontColor(GfxRGB rgb){
+ r=static_cast<int>(rgb.r/65535.0*255.0);
+ g=static_cast<int>(rgb.g/65535.0*255.0);
+ b=static_cast<int>(rgb.b/65535.0*255.0);
+ if (!(Ok(r)&&Ok(b)&&Ok(g))) {
+ if (!globalParams->getErrQuiet()) fprintf(stderr, "Error : Bad color (%d,%d,%d) reset to (0,0,0)\n", r, g, b);
+ r=0;g=0;b=0;
+ }
+}
+
+GooString *HtmlFontColor::convtoX(unsigned int xcol) const{
+ GooString *xret=new GooString();
+ char tmp;
+ unsigned int k;
+ k = (xcol/16);
+ if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10);
+ xret->append(tmp);
+ k = (xcol%16);
+ if ((k>=0)&&(k<10)) tmp=(char) ('0'+k); else tmp=(char)('a'+k-10);
+ xret->append(tmp);
+ return xret;
+}
+
+GooString *HtmlFontColor::toString() const{
+ GooString *tmp=new GooString("#");
+ GooString *tmpr=convtoX(r);
+ GooString *tmpg=convtoX(g);
+ GooString *tmpb=convtoX(b);
+ tmp->append(tmpr);
+ tmp->append(tmpg);
+ tmp->append(tmpb);
+ delete tmpr;
+ delete tmpg;
+ delete tmpb;
+ return tmp;
+}
+
+HtmlFont::HtmlFont(GooString* ftname,int _size, GfxRGB rgb){
+ //if (col) color=HtmlFontColor(col);
+ //else color=HtmlFontColor();
+ color=HtmlFontColor(rgb);
+
+ GooString *fontname = NULL;
+
+ if( ftname ){
+ fontname = new GooString(ftname);
+ FontName=new GooString(ftname);
+ }
+ else {
+ fontname = NULL;
+ FontName = NULL;
+ }
+
+ lineSize = -1;
+
+ size=(_size-1);
+ italic = gFalse;
+ bold = gFalse;
+
+ if (fontname){
+ if (strstr(fontname->lowerCase()->getCString(),"bold")) bold=gTrue;
+
+ if (strstr(fontname->lowerCase()->getCString(),"italic")||
+ strstr(fontname->lowerCase()->getCString(),"oblique")) italic=gTrue;
+
+ int i=0;
+ while (strcmp(ftname->getCString(),fonts[i].Fontname)&&(i<font_num))
+ {
+ i++;
+ }
+ pos=i;
+ delete fontname;
+ } else
+ pos = font_num;
+ if (!DefaultFont) DefaultFont=new GooString(fonts[font_num].name);
+
+}
+
+HtmlFont::HtmlFont(const HtmlFont& x){
+ size=x.size;
+ lineSize=x.lineSize;
+ italic=x.italic;
+ bold=x.bold;
+ pos=x.pos;
+ color=x.color;
+ if (x.FontName) FontName=new GooString(x.FontName);
+ }
+
+
+HtmlFont::~HtmlFont(){
+ if (FontName) delete FontName;
+}
+
+HtmlFont& HtmlFont::operator=(const HtmlFont& x){
+ if (this==&x) return *this;
+ size=x.size;
+ lineSize=x.lineSize;
+ italic=x.italic;
+ bold=x.bold;
+ pos=x.pos;
+ color=x.color;
+ if (FontName) delete FontName;
+ if (x.FontName) FontName=new GooString(x.FontName);
+ return *this;
+}
+
+void HtmlFont::clear(){
+ if(DefaultFont) delete DefaultFont;
+ DefaultFont = NULL;
+}
+
+
+
+/*
+ This function is used to compare font uniquily for insertion into
+ the list of all encountered fonts
+*/
+GBool HtmlFont::isEqual(const HtmlFont& x) const{
+ return ((size==x.size) &&
+ (lineSize==x.lineSize) &&
+ (pos==x.pos) && (bold==x.bold) && (italic==x.italic) &&
+ (color.isEqual(x.getColor())));
+}
+
+/*
+ This one is used to decide whether two pieces of text can be joined together
+ and therefore we don't care about bold/italics properties
+*/
+GBool HtmlFont::isEqualIgnoreBold(const HtmlFont& x) const{
+ return ((size==x.size) &&
+ (!strcmp(fonts[pos].name, fonts[x.pos].name)) &&
+ (color.isEqual(x.getColor())));
+}
+
+GooString* HtmlFont::getFontName(){
+ if (pos!=font_num) return new GooString(fonts[pos].name);
+ else return new GooString(DefaultFont);
+}
+
+GooString* HtmlFont::getFullName(){
+ if (FontName)
+ return new GooString(FontName);
+ else return new GooString(DefaultFont);
+}
+
+void HtmlFont::setDefaultFont(GooString* defaultFont){
+ if (DefaultFont) delete DefaultFont;
+ DefaultFont=new GooString(defaultFont);
+}
+
+
+GooString* HtmlFont::getDefaultFont(){
+ return DefaultFont;
+}
+
+// this method if plain wrong todo
+GooString* HtmlFont::HtmlFilter(Unicode* u, int uLen) {
+ GooString *tmp = new GooString();
+ UnicodeMap *uMap;
+ char buf[8];
+ int n;
+
+ // get the output encoding
+ if (!(uMap = globalParams->getTextEncoding())) {
+ return tmp;
+ }
+
+ for (int i = 0; i < uLen; ++i) {
+ switch (u[i])
+ {
+ case '"': tmp->append("&quot;"); break;
+ case '&': tmp->append("&amp;"); break;
+ case '<': tmp->append("&lt;"); break;
+ case '>': tmp->append("&gt;"); break;
+ case ' ': tmp->append( !xml && ( i+1 >= uLen || !tmp->getLength() || tmp->getChar( tmp->getLength()-1 ) == ' ' ) ? "&nbsp;" : " " );
+ break;
+ default:
+ {
+ // convert unicode to string
+ if ((n = uMap->mapUnicode(u[i], buf, sizeof(buf))) > 0) {
+ tmp->append(buf, n);
+ }
+ }
+ }
+ }
+
+ uMap->decRefCnt();
+ return tmp;
+}
+
+GooString* HtmlFont::simple(HtmlFont* font, Unicode* content, int uLen){
+ GooString *cont=HtmlFilter (content, uLen);
+
+ /*if (font.isBold()) {
+ cont->insert(0,"<b>",3);
+ cont->append("</b>",4);
+ }
+ if (font.isItalic()) {
+ cont->insert(0,"<i>",3);
+ cont->append("</i>",4);
+ } */
+
+ return cont;
+}
+
+HtmlFontAccu::HtmlFontAccu(){
+ accu=new GooVector<HtmlFont>();
+}
+
+HtmlFontAccu::~HtmlFontAccu(){
+ if (accu) delete accu;
+}
+
+int HtmlFontAccu::AddFont(const HtmlFont& font){
+ GooVector<HtmlFont>::iterator i;
+ for (i=accu->begin();i!=accu->end();i++)
+ {
+ if (font.isEqual(*i))
+ {
+ return (int)(i-(accu->begin()));
+ }
+ }
+
+ accu->push_back(font);
+ return (accu->size()-1);
+}
+
+// get CSS font name for font #i
+GooString* HtmlFontAccu::getCSStyle(int i, GooString* content){
+ GooString *tmp;
+ GooString *iStr=GooString::fromInt(i);
+
+ if (!xml) {
+ tmp = new GooString("<span class=\"ft");
+ tmp->append(iStr);
+ tmp->append("\">");
+ tmp->append(content);
+ tmp->append("</span>");
+ } else {
+ tmp = new GooString("");
+ tmp->append(content);
+ }
+
+ delete iStr;
+ return tmp;
+}
+
+// get CSS font definition for font #i
+GooString* HtmlFontAccu::CSStyle(int i){
+ GooString *tmp=new GooString();
+ GooString *iStr=GooString::fromInt(i);
+
+ GooVector<HtmlFont>::iterator g=accu->begin();
+ g+=i;
+ HtmlFont font=*g;
+ GooString *Size=GooString::fromInt(font.getSize());
+ GooString *colorStr=font.getColor().toString();
+ GooString *fontName=font.getFontName();
+ GooString *lSize;
+
+ if(!xml){
+ tmp->append(".ft");
+ tmp->append(iStr);
+ tmp->append("{font-size:");
+ tmp->append(Size);
+ if( font.getLineSize() != -1 )
+ {
+ lSize = GooString::fromInt(font.getLineSize());
+ tmp->append("px;line-height:");
+ tmp->append(lSize);
+ delete lSize;
+ }
+ tmp->append("px;font-family:");
+ tmp->append(fontName); //font.getFontName());
+ tmp->append(";color:");
+ tmp->append(colorStr);
+ tmp->append(";}");
+ }
+ if (xml) {
+ tmp->append("<fontspec id=\"");
+ tmp->append(iStr);
+ tmp->append("\" size=\"");
+ tmp->append(Size);
+ tmp->append("\" family=\"");
+ tmp->append(fontName); //font.getFontName());
+ tmp->append("\" color=\"");
+ tmp->append(colorStr);
+ tmp->append("\"/>");
+ }
+
+ delete fontName;
+ delete colorStr;
+ delete iStr;
+ delete Size;
+ return tmp;
+}
+
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h
new file mode 100644
index 00000000000..df2b5706eb3
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlFonts.h
@@ -0,0 +1,97 @@
+//========================================================================
+//
+// This file comes from pdftohtml project
+// http://pdftohtml.sourceforge.net
+//
+// Copyright from:
+// Gueorgui Ovtcharov
+// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
+// Mikhail Kruk <meshko@cs.brandeis.edu>
+//
+//========================================================================
+
+#ifndef _HTML_FONTS_H
+#define _HTML_FONTS_H
+#include "goo/GooVector.h"
+#include "goo/GooString.h"
+#include "GfxState.h"
+#include "CharTypes.h"
+
+
+class HtmlFontColor{
+ private:
+ unsigned int r;
+ unsigned int g;
+ unsigned int b;
+ GBool Ok(unsigned int xcol){ return ((xcol<=255)&&(xcol>=0));}
+ GooString *convtoX(unsigned int xcol) const;
+ public:
+ HtmlFontColor():r(0),g(0),b(0){}
+ HtmlFontColor(GfxRGB rgb);
+ HtmlFontColor(const HtmlFontColor& x){r=x.r;g=x.g;b=x.b;}
+ HtmlFontColor& operator=(const HtmlFontColor &x){
+ r=x.r;g=x.g;b=x.b;
+ return *this;
+ }
+ ~HtmlFontColor(){};
+ GooString* toString() const;
+ GBool isEqual(const HtmlFontColor& col) const{
+ return ((r==col.r)&&(g==col.g)&&(b==col.b));
+ }
+} ;
+
+
+class HtmlFont{
+ private:
+ unsigned int size;
+ int lineSize;
+ GBool italic;
+ GBool bold;
+ int pos; // position of the font name in the fonts array
+ static GooString *DefaultFont;
+ GooString *FontName;
+ HtmlFontColor color;
+ static GooString* HtmlFilter(Unicode* u, int uLen); //char* s);
+public:
+
+ HtmlFont(){FontName=NULL;};
+ HtmlFont(GooString* fontname,int _size, GfxRGB rgb);
+ HtmlFont(const HtmlFont& x);
+ HtmlFont& operator=(const HtmlFont& x);
+ HtmlFontColor getColor() const {return color;}
+ ~HtmlFont();
+ static void clear();
+ GooString* getFullName();
+ GBool isItalic() const {return italic;}
+ GBool isBold() const {return bold;}
+ unsigned int getSize() const {return size;}
+ int getLineSize() const {return lineSize;}
+ void setLineSize(int _lineSize) { lineSize = _lineSize; }
+ GooString* getFontName();
+ static GooString* getDefaultFont();
+ static void setDefaultFont(GooString* defaultFont);
+ GBool isEqual(const HtmlFont& x) const;
+ GBool isEqualIgnoreBold(const HtmlFont& x) const;
+ static GooString* simple(HtmlFont *font, Unicode *content, int uLen);
+ void print() const {printf("font: %s %d %s%spos: %d\n", FontName->getCString(), size, bold ? "bold " : "", italic ? "italic " : "", pos);};
+};
+
+class HtmlFontAccu{
+private:
+ GooVector<HtmlFont> *accu;
+
+public:
+ HtmlFontAccu();
+ ~HtmlFontAccu();
+ int AddFont(const HtmlFont& font);
+ HtmlFont* Get(int i){
+ GooVector<HtmlFont>::iterator g=accu->begin();
+ g+=i;
+ return g;
+ }
+ GooString* getCSStyle (int i, GooString* content);
+ GooString* CSStyle(int i);
+ int size() const {return accu->size();}
+
+};
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc
new file mode 100644
index 00000000000..0fd093c5f4d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.cc
@@ -0,0 +1,156 @@
+//========================================================================
+//
+// This file comes from pdftohtml project
+// http://pdftohtml.sourceforge.net
+//
+// Copyright from:
+// Gueorgui Ovtcharov
+// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
+// Mikhail Kruk <meshko@cs.brandeis.edu>
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "HtmlLinks.h"
+
+extern GBool xml;
+
+HtmlLink::HtmlLink(const HtmlLink& x){
+ Xmin=x.Xmin;
+ Ymin=x.Ymin;
+ Xmax=x.Xmax;
+ Ymax=x.Ymax;
+ dest=new GooString(x.dest);
+}
+
+HtmlLink::HtmlLink(double xmin,double ymin,double xmax,double ymax,GooString * _dest)
+{
+ if (xmin < xmax) {
+ Xmin=xmin;
+ Xmax=xmax;
+ } else {
+ Xmin=xmax;
+ Xmax=xmin;
+ }
+ if (ymin < ymax) {
+ Ymin=ymin;
+ Ymax=ymax;
+ } else {
+ Ymin=ymax;
+ Ymax=ymin;
+ }
+ dest=new GooString(_dest);
+}
+
+HtmlLink::~HtmlLink(){
+ if (dest) delete dest;
+}
+
+GBool HtmlLink::isEqualDest(const HtmlLink& x) const{
+ return (!strcmp(dest->getCString(), x.dest->getCString()));
+}
+
+GBool HtmlLink::inLink(double xmin,double ymin,double xmax,double ymax) const {
+ double y=(ymin+ymax)/2;
+ if (y>Ymax) return gFalse;
+ return (y>Ymin)&&(xmin<Xmax)&&(xmax>Xmin);
+ }
+
+
+HtmlLink& HtmlLink::operator=(const HtmlLink& x){
+ if (this==&x) return *this;
+ if (dest) {delete dest;dest=NULL;}
+ Xmin=x.Xmin;
+ Ymin=x.Ymin;
+ Xmax=x.Xmax;
+ Ymax=x.Ymax;
+ dest=new GooString(x.dest);
+ return *this;
+}
+
+static GooString* EscapeSpecialChars( GooString* s )
+{
+ GooString* tmp = NULL;
+ for( int i = 0, j = 0; i < s->getLength(); i++, j++ ){
+ const char *replace = NULL;
+ switch ( s->getChar(i) ){
+ case '"': replace = "&quot;"; break;
+ case '&': replace = "&amp;"; break;
+ case '<': replace = "&lt;"; break;
+ case '>': replace = "&gt;"; break;
+ default: continue;
+ }
+ if( replace ){
+ if( !tmp ) tmp = new GooString( s );
+ if( tmp ){
+ tmp->del( j, 1 );
+ int l = strlen( replace );
+ tmp->insert( j, replace, l );
+ j += l - 1;
+ }
+ }
+ }
+ return tmp ? tmp : s;
+}
+
+GooString* HtmlLink::getLinkStart() {
+ GooString *res = new GooString("<a href=\"");
+ GooString *d = xml ? EscapeSpecialChars(dest) : dest;
+ res->append( d );
+ if( d != dest ) delete d;
+ res->append("\">");
+ return res;
+}
+
+/*GooString* HtmlLink::Link(GooString* content){
+ //GooString* _dest=new GooString(dest);
+ GooString *tmp=new GooString("<a href=\"");
+ tmp->append(dest);
+ tmp->append("\">");
+ tmp->append(content);
+ tmp->append("</a>");
+ //delete _dest;
+ return tmp;
+ }*/
+
+
+
+HtmlLinks::HtmlLinks(){
+ accu=new GooVector<HtmlLink>();
+}
+
+HtmlLinks::~HtmlLinks(){
+ delete accu;
+ accu=NULL;
+}
+
+GBool HtmlLinks::inLink(double xmin,double ymin,double xmax,double ymax,int& p)const {
+
+ for(GooVector<HtmlLink>::iterator i=accu->begin();i!=accu->end();i++){
+ if (i->inLink(xmin,ymin,xmax,ymax)) {
+ p=(i - accu->begin());
+ return 1;
+ }
+ }
+ return 0;
+}
+
+HtmlLink* HtmlLinks::getLink(int i) const{
+ GooVector<HtmlLink>::iterator g=accu->begin();
+ g+=i;
+ return g;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h
new file mode 100644
index 00000000000..571c2a70f0f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlLinks.h
@@ -0,0 +1,61 @@
+//========================================================================
+//
+// This file comes from pdftohtml project
+// http://pdftohtml.sourceforge.net
+//
+// Copyright from:
+// Gueorgui Ovtcharov
+// Rainer Dorsch <http://www.ra.informatik.uni-stuttgart.de/~rainer/>
+// Mikhail Kruk <meshko@cs.brandeis.edu>
+//
+//========================================================================
+
+#ifndef _HTML_LINKS
+#define _HTML_LINKS
+
+#include <stdlib.h>
+#include <string.h>
+#include "goo/GooVector.h"
+#include "goo/GooString.h"
+
+class HtmlLink{
+
+private:
+ double Xmin;
+ double Ymin;
+ double Xmax;
+ double Ymax;
+ GooString* dest;
+
+public:
+ HtmlLink(){dest=NULL;}
+ HtmlLink(const HtmlLink& x);
+ HtmlLink& operator=(const HtmlLink& x);
+ HtmlLink(double xmin,double ymin,double xmax,double ymax,GooString *_dest);
+ ~HtmlLink();
+ GBool isEqualDest(const HtmlLink& x) const;
+ GooString *getDest(){return new GooString(dest);}
+ double getX1() const {return Xmin;}
+ double getX2() const {return Xmax;}
+ double getY1() const {return Ymin;}
+ double getY2() const {return Ymax;}
+ GBool inLink(double xmin,double ymin,double xmax,double ymax) const ;
+ //GooString *Link(GooString *content);
+ GooString* getLinkStart();
+
+};
+
+class HtmlLinks{
+private:
+ GooVector<HtmlLink> *accu;
+public:
+ HtmlLinks();
+ ~HtmlLinks();
+ void AddLink(const HtmlLink& x) {accu->push_back(x);}
+ GBool inLink(double xmin,double ymin,double xmax,double ymax,int& p) const;
+ HtmlLink* getLink(int i) const;
+
+};
+
+#endif
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc
new file mode 100644
index 00000000000..64f5098bc5f
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.cc
@@ -0,0 +1,1672 @@
+//========================================================================
+//
+// HtmlOutputDev.cc
+//
+// Copyright 1997-2002 Glyph & Cog, LLC
+//
+// Changed 1999-2000 by G.Ovtcharov
+//
+// Changed 2002 by Mikhail Kruk
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008 Kjartan Maraas <kmaraas@gnome.org>
+// Copyright (C) 2008 Boris Toloknov <tlknv@yandex.ru>
+// Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe@unisys.co.jp>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
+// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifdef __GNUC__
+#pragma implementation
+#endif
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <ctype.h>
+#include <math.h>
+#include "goo/GooString.h"
+#include "goo/GooList.h"
+#include "UnicodeMap.h"
+#include "goo/gmem.h"
+#include "Error.h"
+#include "GfxState.h"
+#include "Page.h"
+#ifdef ENABLE_LIBJPEG
+#include "DCTStream.h"
+#endif
+#include "GlobalParams.h"
+#include "HtmlOutputDev.h"
+#include "HtmlFonts.h"
+#include "PNGWriter.h"
+
+int HtmlPage::pgNum=0;
+int HtmlOutputDev::imgNum=1;
+GooList *HtmlOutputDev::imgList=new GooList();
+
+extern double scale;
+extern GBool complexMode;
+extern GBool ignore;
+extern GBool printCommands;
+extern GBool printHtml;
+extern GBool noframes;
+extern GBool stout;
+extern GBool xml;
+extern GBool showHidden;
+extern GBool noMerge;
+
+static GooString* basename(GooString* str){
+
+ char *p=str->getCString();
+ int len=str->getLength();
+ for (int i=len-1;i>=0;i--)
+ if (*(p+i)==SLASH)
+ return new GooString((p+i+1),len-i-1);
+ return new GooString(str);
+}
+
+#if 0
+static GooString* Dirname(GooString* str){
+
+ char *p=str->getCString();
+ int len=str->getLength();
+ for (int i=len-1;i>=0;i--)
+ if (*(p+i)==SLASH)
+ return new GooString(p,i+1);
+ return new GooString();
+}
+#endif
+
+//------------------------------------------------------------------------
+// HtmlString
+//------------------------------------------------------------------------
+
+HtmlString::HtmlString(GfxState *state, double fontSize, HtmlFontAccu* fonts) {
+ GfxFont *font;
+ double x, y;
+
+ state->transform(state->getCurX(), state->getCurY(), &x, &y);
+ if ((font = state->getFont())) {
+ double ascent = font->getAscent();
+ double descent = font->getDescent();
+ if( ascent > 1.05 ){
+ //printf( "ascent=%.15g is too high, descent=%.15g\n", ascent, descent );
+ ascent = 1.05;
+ }
+ if( descent < -0.4 ){
+ //printf( "descent %.15g is too low, ascent=%.15g\n", descent, ascent );
+ descent = -0.4;
+ }
+ yMin = y - ascent * fontSize;
+ yMax = y - descent * fontSize;
+ GfxRGB rgb;
+ state->getFillRGB(&rgb);
+ GooString *name = state->getFont()->getName();
+ if (!name) name = HtmlFont::getDefaultFont(); //new GooString("default");
+ HtmlFont hfont=HtmlFont(name, static_cast<int>(fontSize-1), rgb);
+ fontpos = fonts->AddFont(hfont);
+ } else {
+ // this means that the PDF file draws text without a current font,
+ // which should never happen
+ yMin = y - 0.95 * fontSize;
+ yMax = y + 0.35 * fontSize;
+ fontpos=0;
+ }
+ if (yMin == yMax) {
+ // this is a sanity check for a case that shouldn't happen -- but
+ // if it does happen, we want to avoid dividing by zero later
+ yMin = y;
+ yMax = y + 1;
+ }
+ col = 0;
+ text = NULL;
+ xRight = NULL;
+ link = NULL;
+ len = size = 0;
+ yxNext = NULL;
+ xyNext = NULL;
+ htext=new GooString();
+ dir = textDirUnknown;
+}
+
+
+HtmlString::~HtmlString() {
+ gfree(text);
+ delete htext;
+ gfree(xRight);
+}
+
+void HtmlString::addChar(GfxState *state, double x, double y,
+ double dx, double dy, Unicode u) {
+ if (dir == textDirUnknown) {
+ //dir = UnicodeMap::getDirection(u);
+ dir = textDirLeftRight;
+ }
+
+ if (len == size) {
+ size += 16;
+ text = (Unicode *)grealloc(text, size * sizeof(Unicode));
+ xRight = (double *)grealloc(xRight, size * sizeof(double));
+ }
+ text[len] = u;
+ if (len == 0) {
+ xMin = x;
+ }
+ xMax = xRight[len] = x + dx;
+//printf("added char: %f %f xright = %f\n", x, dx, x+dx);
+ ++len;
+}
+
+void HtmlString::endString()
+{
+ if( dir == textDirRightLeft && len > 1 )
+ {
+ //printf("will reverse!\n");
+ for (int i = 0; i < len / 2; i++)
+ {
+ Unicode ch = text[i];
+ text[i] = text[len - i - 1];
+ text[len - i - 1] = ch;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// HtmlPage
+//------------------------------------------------------------------------
+
+HtmlPage::HtmlPage(GBool rawOrder, char *imgExtVal) {
+ this->rawOrder = rawOrder;
+ curStr = NULL;
+ yxStrings = NULL;
+ xyStrings = NULL;
+ yxCur1 = yxCur2 = NULL;
+ fonts=new HtmlFontAccu();
+ links=new HtmlLinks();
+ pageWidth=0;
+ pageHeight=0;
+ fontsPageMarker = 0;
+ DocName=NULL;
+ firstPage = -1;
+ imgExt = new GooString(imgExtVal);
+}
+
+HtmlPage::~HtmlPage() {
+ clear();
+ if (DocName) delete DocName;
+ if (fonts) delete fonts;
+ if (links) delete links;
+ if (imgExt) delete imgExt;
+}
+
+void HtmlPage::updateFont(GfxState *state) {
+ GfxFont *font;
+ double *fm;
+ char *name;
+ int code;
+ double w;
+
+ // adjust the font size
+ fontSize = state->getTransformedFontSize();
+ if ((font = state->getFont()) && font->getType() == fontType3) {
+ // This is a hack which makes it possible to deal with some Type 3
+ // fonts. The problem is that it's impossible to know what the
+ // base coordinate system used in the font is without actually
+ // rendering the font. This code tries to guess by looking at the
+ // width of the character 'm' (which breaks if the font is a
+ // subset that doesn't contain 'm').
+ for (code = 0; code < 256; ++code) {
+ if ((name = ((Gfx8BitFont *)font)->getCharName(code)) &&
+ name[0] == 'm' && name[1] == '\0') {
+ break;
+ }
+ }
+ if (code < 256) {
+ w = ((Gfx8BitFont *)font)->getWidth(code);
+ if (w != 0) {
+ // 600 is a generic average 'm' width -- yes, this is a hack
+ fontSize *= w / 0.6;
+ }
+ }
+ fm = font->getFontMatrix();
+ if (fm[0] != 0) {
+ fontSize *= fabs(fm[3] / fm[0]);
+ }
+ }
+}
+
+void HtmlPage::beginString(GfxState *state, GooString *s) {
+ curStr = new HtmlString(state, fontSize, fonts);
+}
+
+
+void HtmlPage::conv(){
+ HtmlString *tmp;
+
+ int linkIndex = 0;
+ HtmlFont* h;
+ for(tmp=yxStrings;tmp;tmp=tmp->yxNext){
+ int pos=tmp->fontpos;
+ // printf("%d\n",pos);
+ h=fonts->Get(pos);
+
+ if (tmp->htext) delete tmp->htext;
+ tmp->htext=HtmlFont::simple(h,tmp->text,tmp->len);
+
+ if (links->inLink(tmp->xMin,tmp->yMin,tmp->xMax,tmp->yMax, linkIndex)){
+ tmp->link = links->getLink(linkIndex);
+ /*GooString *t=tmp->htext;
+ tmp->htext=links->getLink(k)->Link(tmp->htext);
+ delete t;*/
+ }
+ }
+
+}
+
+
+void HtmlPage::addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double ox, double oy, Unicode *u, int uLen) {
+ double x1, y1, w1, h1, dx2, dy2;
+ int n, i;
+ state->transform(x, y, &x1, &y1);
+ n = curStr->len;
+
+ // check that new character is in the same direction as current string
+ // and is not too far away from it before adding
+ //if ((UnicodeMap::getDirection(u[0]) != curStr->dir) ||
+ // XXX
+ if (
+ (n > 0 &&
+ fabs(x1 - curStr->xRight[n-1]) > 0.1 * (curStr->yMax - curStr->yMin))) {
+ endString();
+ beginString(state, NULL);
+ }
+ state->textTransformDelta(state->getCharSpace() * state->getHorizScaling(),
+ 0, &dx2, &dy2);
+ dx -= dx2;
+ dy -= dy2;
+ state->transformDelta(dx, dy, &w1, &h1);
+ if (uLen != 0) {
+ w1 /= uLen;
+ h1 /= uLen;
+ }
+ for (i = 0; i < uLen; ++i) {
+ curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u[i]);
+ }
+}
+
+void HtmlPage::endString() {
+ HtmlString *p1, *p2;
+ double h, y1, y2;
+
+ // throw away zero-length strings -- they don't have valid xMin/xMax
+ // values, and they're useless anyway
+ if (curStr->len == 0) {
+ delete curStr;
+ curStr = NULL;
+ return;
+ }
+
+ curStr->endString();
+
+#if 0 //~tmp
+ if (curStr->yMax - curStr->yMin > 20) {
+ delete curStr;
+ curStr = NULL;
+ return;
+ }
+#endif
+
+ // insert string in y-major list
+ h = curStr->yMax - curStr->yMin;
+ y1 = curStr->yMin + 0.5 * h;
+ y2 = curStr->yMin + 0.8 * h;
+ if (rawOrder) {
+ p1 = yxCur1;
+ p2 = NULL;
+ } else if ((!yxCur1 ||
+ (y1 >= yxCur1->yMin &&
+ (y2 >= yxCur1->yMax || curStr->xMax >= yxCur1->xMin))) &&
+ (!yxCur2 ||
+ (y1 < yxCur2->yMin ||
+ (y2 < yxCur2->yMax && curStr->xMax < yxCur2->xMin)))) {
+ p1 = yxCur1;
+ p2 = yxCur2;
+ } else {
+ for (p1 = NULL, p2 = yxStrings; p2; p1 = p2, p2 = p2->yxNext) {
+ if (y1 < p2->yMin || (y2 < p2->yMax && curStr->xMax < p2->xMin))
+ break;
+ }
+ yxCur2 = p2;
+ }
+ yxCur1 = curStr;
+ if (p1)
+ p1->yxNext = curStr;
+ else
+ yxStrings = curStr;
+ curStr->yxNext = p2;
+ curStr = NULL;
+}
+
+static const char *strrstr( const char *s, const char *ss )
+{
+ const char *p = strstr( s, ss );
+ for( const char *pp = p; pp != NULL; pp = strstr( p+1, ss ) ){
+ p = pp;
+ }
+ return p;
+}
+
+static void CloseTags( GooString *htext, GBool &finish_a, GBool &finish_italic, GBool &finish_bold )
+{
+ const char *last_italic = finish_italic && ( finish_bold || finish_a ) ? strrstr( htext->getCString(), "<i>" ) : NULL;
+ const char *last_bold = finish_bold && ( finish_italic || finish_a ) ? strrstr( htext->getCString(), "<b>" ) : NULL;
+ const char *last_a = finish_a && ( finish_italic || finish_bold ) ? strrstr( htext->getCString(), "<a " ) : NULL;
+ if( finish_a && ( finish_italic || finish_bold ) && last_a > ( last_italic > last_bold ? last_italic : last_bold ) ){
+ htext->append("</a>", 4);
+ finish_a = false;
+ }
+ if( finish_italic && finish_bold && last_italic > last_bold ){
+ htext->append("</i>", 4);
+ finish_italic = false;
+ }
+ if( finish_bold )
+ htext->append("</b>", 4);
+ if( finish_italic )
+ htext->append("</i>", 4);
+ if( finish_a )
+ htext->append("</a>");
+}
+
+void HtmlPage::coalesce() {
+ HtmlString *str1, *str2;
+ HtmlFont *hfont1, *hfont2;
+ double space, horSpace, vertSpace, vertOverlap;
+ GBool addSpace, addLineBreak;
+ int n, i;
+ double curX, curY;
+
+#if 0 //~ for debugging
+ for (str1 = yxStrings; str1; str1 = str1->yxNext) {
+ printf("x=%f..%f y=%f..%f size=%2d '",
+ str1->xMin, str1->xMax, str1->yMin, str1->yMax,
+ (int)(str1->yMax - str1->yMin));
+ for (i = 0; i < str1->len; ++i) {
+ fputc(str1->text[i] & 0xff, stdout);
+ }
+ printf("'\n");
+ }
+ printf("\n------------------------------------------------------------\n\n");
+#endif
+ str1 = yxStrings;
+
+ if( !str1 ) return;
+
+ //----- discard duplicated text (fake boldface, drop shadows)
+ if( !complexMode )
+ { /* if not in complex mode get rid of duplicate strings */
+ HtmlString *str3;
+ GBool found;
+ while (str1)
+ {
+ double size = str1->yMax - str1->yMin;
+ double xLimit = str1->xMin + size * 0.2;
+ found = gFalse;
+ for (str2 = str1, str3 = str1->yxNext;
+ str3 && str3->xMin < xLimit;
+ str2 = str3, str3 = str2->yxNext)
+ {
+ if (str3->len == str1->len &&
+ !memcmp(str3->text, str1->text, str1->len * sizeof(Unicode)) &&
+ fabs(str3->yMin - str1->yMin) < size * 0.2 &&
+ fabs(str3->yMax - str1->yMax) < size * 0.2 &&
+ fabs(str3->xMax - str1->xMax) < size * 0.2)
+ {
+ found = gTrue;
+ //printf("found duplicate!\n");
+ break;
+ }
+ }
+ if (found)
+ {
+ str2->xyNext = str3->xyNext;
+ str2->yxNext = str3->yxNext;
+ delete str3;
+ }
+ else
+ {
+ str1 = str1->yxNext;
+ }
+ }
+ } /*- !complexMode */
+
+ str1 = yxStrings;
+
+ hfont1 = getFont(str1);
+ if( hfont1->isBold() )
+ str1->htext->insert(0,"<b>",3);
+ if( hfont1->isItalic() )
+ str1->htext->insert(0,"<i>",3);
+ if( str1->getLink() != NULL ) {
+ GooString *ls = str1->getLink()->getLinkStart();
+ str1->htext->insert(0, ls);
+ delete ls;
+ }
+ curX = str1->xMin; curY = str1->yMin;
+
+ while (str1 && (str2 = str1->yxNext)) {
+ hfont2 = getFont(str2);
+ space = str1->yMax - str1->yMin;
+ horSpace = str2->xMin - str1->xMax;
+ addLineBreak = !noMerge && (fabs(str1->xMin - str2->xMin) < 0.4);
+ vertSpace = str2->yMin - str1->yMax;
+
+//printf("coalesce %d %d %f? ", str1->dir, str2->dir, d);
+
+ if (str2->yMin >= str1->yMin && str2->yMin <= str1->yMax)
+ {
+ vertOverlap = str1->yMax - str2->yMin;
+ } else
+ if (str2->yMax >= str1->yMin && str2->yMax <= str1->yMax)
+ {
+ vertOverlap = str2->yMax - str1->yMin;
+ } else
+ {
+ vertOverlap = 0;
+ }
+
+ if (
+ (
+ (
+ (
+ (rawOrder && vertOverlap > 0.5 * space)
+ ||
+ (!rawOrder && str2->yMin < str1->yMax)
+ ) &&
+ (horSpace > -0.5 * space && horSpace < space)
+ ) ||
+ (vertSpace >= 0 && vertSpace < 0.5 * space && addLineBreak)
+ ) &&
+ (!complexMode || (hfont1->isEqualIgnoreBold(*hfont2))) && // in complex mode fonts must be the same, in other modes fonts do not metter
+ str1->dir == str2->dir // text direction the same
+ )
+ {
+// printf("yes\n");
+ n = str1->len + str2->len;
+ if ((addSpace = horSpace > 0.1 * space)) {
+ ++n;
+ }
+ if (addLineBreak) {
+ ++n;
+ }
+
+ str1->size = (n + 15) & ~15;
+ str1->text = (Unicode *)grealloc(str1->text,
+ str1->size * sizeof(Unicode));
+ str1->xRight = (double *)grealloc(str1->xRight,
+ str1->size * sizeof(double));
+ if (addSpace) {
+ str1->text[str1->len] = 0x20;
+ str1->htext->append(xml?" ":"&nbsp;");
+ str1->xRight[str1->len] = str2->xMin;
+ ++str1->len;
+ }
+ if (addLineBreak) {
+ str1->text[str1->len] = '\n';
+ str1->htext->append("<br>");
+ str1->xRight[str1->len] = str2->xMin;
+ ++str1->len;
+ str1->yMin = str2->yMin;
+ str1->yMax = str2->yMax;
+ str1->xMax = str2->xMax;
+ int fontLineSize = hfont1->getLineSize();
+ int curLineSize = (int)(vertSpace + space);
+ if( curLineSize != fontLineSize )
+ {
+ HtmlFont *newfnt = new HtmlFont(*hfont1);
+ newfnt->setLineSize(curLineSize);
+ str1->fontpos = fonts->AddFont(*newfnt);
+ delete newfnt;
+ hfont1 = getFont(str1);
+ // we have to reget hfont2 because it's location could have
+ // changed on resize
+ hfont2 = getFont(str2);
+ }
+ }
+ for (i = 0; i < str2->len; ++i) {
+ str1->text[str1->len] = str2->text[i];
+ str1->xRight[str1->len] = str2->xRight[i];
+ ++str1->len;
+ }
+
+ /* fix <i>, <b> if str1 and str2 differ and handle switch of links */
+ HtmlLink *hlink1 = str1->getLink();
+ HtmlLink *hlink2 = str2->getLink();
+ bool switch_links = !hlink1 || !hlink2 || !hlink1->isEqualDest(*hlink2);
+ GBool finish_a = switch_links && hlink1 != NULL;
+ GBool finish_italic = hfont1->isItalic() && ( !hfont2->isItalic() || finish_a );
+ GBool finish_bold = hfont1->isBold() && ( !hfont2->isBold() || finish_a || finish_italic );
+ CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
+ if( switch_links && hlink2 != NULL ) {
+ GooString *ls = hlink2->getLinkStart();
+ str1->htext->append(ls);
+ delete ls;
+ }
+ if( ( !hfont1->isItalic() || finish_italic ) && hfont2->isItalic() )
+ str1->htext->append("<i>", 3);
+ if( ( !hfont1->isBold() || finish_bold ) && hfont2->isBold() )
+ str1->htext->append("<b>", 3);
+
+
+ str1->htext->append(str2->htext);
+ // str1 now contains href for link of str2 (if it is defined)
+ str1->link = str2->link;
+ hfont1 = hfont2;
+ if (str2->xMax > str1->xMax) {
+ str1->xMax = str2->xMax;
+ }
+ if (str2->yMax > str1->yMax) {
+ str1->yMax = str2->yMax;
+ }
+ str1->yxNext = str2->yxNext;
+ delete str2;
+ } else { // keep strings separate
+// printf("no\n");
+ GBool finish_a = str1->getLink() != NULL;
+ GBool finish_bold = hfont1->isBold();
+ GBool finish_italic = hfont1->isItalic();
+ CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
+
+ str1->xMin = curX; str1->yMin = curY;
+ str1 = str2;
+ curX = str1->xMin; curY = str1->yMin;
+ hfont1 = hfont2;
+ if( hfont1->isBold() )
+ str1->htext->insert(0,"<b>",3);
+ if( hfont1->isItalic() )
+ str1->htext->insert(0,"<i>",3);
+ if( str1->getLink() != NULL ) {
+ GooString *ls = str1->getLink()->getLinkStart();
+ str1->htext->insert(0, ls);
+ delete ls;
+ }
+ }
+ }
+ str1->xMin = curX; str1->yMin = curY;
+
+ GBool finish_bold = hfont1->isBold();
+ GBool finish_italic = hfont1->isItalic();
+ GBool finish_a = str1->getLink() != NULL;
+ CloseTags( str1->htext, finish_a, finish_italic, finish_bold );
+
+#if 0 //~ for debugging
+ for (str1 = yxStrings; str1; str1 = str1->yxNext) {
+ printf("x=%3d..%3d y=%3d..%3d size=%2d ",
+ (int)str1->xMin, (int)str1->xMax, (int)str1->yMin, (int)str1->yMax,
+ (int)(str1->yMax - str1->yMin));
+ printf("'%s'\n", str1->htext->getCString());
+ }
+ printf("\n------------------------------------------------------------\n\n");
+#endif
+
+}
+
+void HtmlPage::dumpAsXML(FILE* f,int page){
+ fprintf(f, "<page number=\"%d\" position=\"absolute\"", page);
+ fprintf(f," top=\"0\" left=\"0\" height=\"%d\" width=\"%d\">\n", pageHeight,pageWidth);
+
+ for(int i=fontsPageMarker;i < fonts->size();i++) {
+ GooString *fontCSStyle = fonts->CSStyle(i);
+ fprintf(f,"\t%s\n",fontCSStyle->getCString());
+ delete fontCSStyle;
+ }
+
+ GooString *str, *str1 = NULL;
+ for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){
+ if (tmp->htext){
+ str=new GooString(tmp->htext);
+ fprintf(f,"<text top=\"%d\" left=\"%d\" ",xoutRound(tmp->yMin),xoutRound(tmp->xMin));
+ fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(tmp->xMax-tmp->xMin),xoutRound(tmp->yMax-tmp->yMin));
+ fprintf(f,"font=\"%d\">", tmp->fontpos);
+ if (tmp->fontpos!=-1){
+ str1=fonts->getCSStyle(tmp->fontpos, str);
+ }
+ fputs(str1->getCString(),f);
+ delete str;
+ delete str1;
+ fputs("</text>\n",f);
+ }
+ }
+ fputs("</page>\n",f);
+}
+
+
+void HtmlPage::dumpComplex(FILE *file, int page){
+ FILE* pageFile;
+ GooString* tmp;
+ char* htmlEncoding;
+
+ if( firstPage == -1 ) firstPage = page;
+
+ if( !noframes )
+ {
+ GooString* pgNum=GooString::fromInt(page);
+ tmp = new GooString(DocName);
+ tmp->append('-')->append(pgNum)->append(".html");
+ delete pgNum;
+
+ if (!(pageFile = fopen(tmp->getCString(), "w"))) {
+ error(-1, "Couldn't open html file '%s'", tmp->getCString());
+ delete tmp;
+ return;
+ }
+ delete tmp;
+
+ fprintf(pageFile,"%s\n<HTML>\n<HEAD>\n<TITLE>Page %d</TITLE>\n\n",
+ DOCTYPE, page);
+
+ htmlEncoding = HtmlOutputDev::mapEncodingToHtml
+ (globalParams->getTextEncodingName());
+ fprintf(pageFile, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
+ }
+ else
+ {
+ pageFile = file;
+ fprintf(pageFile,"<!-- Page %d -->\n", page);
+ fprintf(pageFile,"<a name=\"%d\"></a>\n", page);
+ }
+
+ fprintf(pageFile,"<DIV style=\"position:relative;width:%d;height:%d;\">\n",
+ pageWidth, pageHeight);
+
+ tmp=basename(DocName);
+
+ fputs("<STYLE type=\"text/css\">\n<!--\n",pageFile);
+ for(int i=fontsPageMarker;i!=fonts->size();i++) {
+ GooString *fontCSStyle = fonts->CSStyle(i);
+ fprintf(pageFile,"\t%s\n",fontCSStyle->getCString());
+ delete fontCSStyle;
+ }
+
+ fputs("-->\n</STYLE>\n",pageFile);
+
+ if( !noframes )
+ {
+ fputs("</HEAD>\n<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n",pageFile);
+ }
+
+ if( !ignore )
+ {
+ fprintf(pageFile,
+ "<IMG width=\"%d\" height=\"%d\" src=\"%s%03d.%s\" alt=\"background image\">\n",
+ pageWidth, pageHeight, tmp->getCString(),
+ (page-firstPage+1), imgExt->getCString());
+ }
+
+ delete tmp;
+
+ GooString *str, *str1 = NULL;
+ for(HtmlString *tmp1=yxStrings;tmp1;tmp1=tmp1->yxNext){
+ if (tmp1->htext){
+ str=new GooString(tmp1->htext);
+ fprintf(pageFile,
+ "<DIV style=\"position:absolute;top:%d;left:%d\">",
+ xoutRound(tmp1->yMin),
+ xoutRound(tmp1->xMin));
+ fputs("<nobr>",pageFile);
+ if (tmp1->fontpos!=-1){
+ str1=fonts->getCSStyle(tmp1->fontpos, str);
+ }
+ //printf("%s\n", str1->getCString());
+ fputs(str1->getCString(),pageFile);
+
+ delete str;
+ delete str1;
+ fputs("</nobr></DIV>\n",pageFile);
+ }
+ }
+
+ fputs("</DIV>\n", pageFile);
+
+ if( !noframes )
+ {
+ fputs("</BODY>\n</HTML>\n",pageFile);
+ fclose(pageFile);
+ }
+}
+
+
+void HtmlPage::dump(FILE *f, int pageNum)
+{
+ if (complexMode)
+ {
+ if (xml) dumpAsXML(f, pageNum);
+ if (!xml) dumpComplex(f, pageNum);
+ }
+ else
+ {
+ fprintf(f,"<A name=%d></a>",pageNum);
+ // Loop over the list of image names on this page
+ int listlen=HtmlOutputDev::imgList->getLength();
+ for (int i = 0; i < listlen; i++) {
+ GooString *fName= (GooString *)HtmlOutputDev::imgList->del(0);
+ fprintf(f,"<IMG src=\"%s\"><br>\n",fName->getCString());
+ delete fName;
+ }
+ HtmlOutputDev::imgNum=1;
+
+ GooString* str;
+ for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){
+ if (tmp->htext){
+ str=new GooString(tmp->htext);
+ fputs(str->getCString(),f);
+ delete str;
+ fputs("<br>\n",f);
+ }
+ }
+ fputs("<hr>\n",f);
+ }
+}
+
+
+
+void HtmlPage::clear() {
+ HtmlString *p1, *p2;
+
+ if (curStr) {
+ delete curStr;
+ curStr = NULL;
+ }
+ for (p1 = yxStrings; p1; p1 = p2) {
+ p2 = p1->yxNext;
+ delete p1;
+ }
+ yxStrings = NULL;
+ xyStrings = NULL;
+ yxCur1 = yxCur2 = NULL;
+
+ if( !noframes )
+ {
+ delete fonts;
+ fonts=new HtmlFontAccu();
+ fontsPageMarker = 0;
+ }
+ else
+ {
+ fontsPageMarker = fonts->size();
+ }
+
+ delete links;
+ links=new HtmlLinks();
+
+
+}
+
+void HtmlPage::setDocName(char *fname){
+ DocName=new GooString(fname);
+}
+
+//------------------------------------------------------------------------
+// HtmlMetaVar
+//------------------------------------------------------------------------
+
+HtmlMetaVar::HtmlMetaVar(char *_name, char *_content)
+{
+ name = new GooString(_name);
+ content = new GooString(_content);
+}
+
+HtmlMetaVar::~HtmlMetaVar()
+{
+ delete name;
+ delete content;
+}
+
+GooString* HtmlMetaVar::toString()
+{
+ GooString *result = new GooString("<META name=\"");
+ result->append(name);
+ result->append("\" content=\"");
+ result->append(content);
+ result->append("\">");
+ return result;
+}
+
+//------------------------------------------------------------------------
+// HtmlOutputDev
+//------------------------------------------------------------------------
+
+static char* HtmlEncodings[][2] = {
+ {"Latin1", "ISO-8859-1"},
+ {NULL, NULL}
+};
+
+
+char* HtmlOutputDev::mapEncodingToHtml(GooString* encoding)
+{
+ char* enc = encoding->getCString();
+ for(int i = 0; HtmlEncodings[i][0] != NULL; i++)
+ {
+ if( strcmp(enc, HtmlEncodings[i][0]) == 0 )
+ {
+ return HtmlEncodings[i][1];
+ }
+ }
+ return enc;
+}
+
+void HtmlOutputDev::doFrame(int firstPage){
+ GooString* fName=new GooString(Docname);
+ char* htmlEncoding;
+ fName->append(".html");
+
+ if (!(fContentsFrame = fopen(fName->getCString(), "w"))){
+ error(-1, "Couldn't open html file '%s'", fName->getCString());
+ delete fName;
+ return;
+ }
+
+ delete fName;
+
+ fName=basename(Docname);
+ fputs(DOCTYPE_FRAMES, fContentsFrame);
+ fputs("\n<HTML>",fContentsFrame);
+ fputs("\n<HEAD>",fContentsFrame);
+ fprintf(fContentsFrame,"\n<TITLE>%s</TITLE>",docTitle->getCString());
+ htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName());
+ fprintf(fContentsFrame, "\n<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
+ dumpMetaVars(fContentsFrame);
+ fprintf(fContentsFrame, "</HEAD>\n");
+ fputs("<FRAMESET cols=\"100,*\">\n",fContentsFrame);
+ fprintf(fContentsFrame,"<FRAME name=\"links\" src=\"%s_ind.html\">\n",fName->getCString());
+ fputs("<FRAME name=\"contents\" src=",fContentsFrame);
+ if (complexMode)
+ fprintf(fContentsFrame,"\"%s-%d.html\"",fName->getCString(), firstPage);
+ else
+ fprintf(fContentsFrame,"\"%ss.html\"",fName->getCString());
+
+ fputs(">\n</FRAMESET>\n</HTML>\n",fContentsFrame);
+
+ delete fName;
+ fclose(fContentsFrame);
+}
+
+HtmlOutputDev::HtmlOutputDev(char *fileName, char *title,
+ char *author, char *keywords, char *subject, char *date,
+ char *extension,
+ GBool rawOrder, int firstPage, GBool outline)
+{
+ char *htmlEncoding;
+
+ fContentsFrame = NULL;
+ docTitle = new GooString(title);
+ pages = NULL;
+ dumpJPEG=gTrue;
+ //write = gTrue;
+ this->rawOrder = rawOrder;
+ this->doOutline = outline;
+ ok = gFalse;
+ imgNum=1;
+ //this->firstPage = firstPage;
+ //pageNum=firstPage;
+ // open file
+ needClose = gFalse;
+ pages = new HtmlPage(rawOrder, extension);
+
+ glMetaVars = new GooList();
+ glMetaVars->append(new HtmlMetaVar("generator", "pdftohtml 0.36"));
+ if( author ) glMetaVars->append(new HtmlMetaVar("author", author));
+ if( keywords ) glMetaVars->append(new HtmlMetaVar("keywords", keywords));
+ if( date ) glMetaVars->append(new HtmlMetaVar("date", date));
+ if( subject ) glMetaVars->append(new HtmlMetaVar("subject", subject));
+
+ maxPageWidth = 0;
+ maxPageHeight = 0;
+
+ pages->setDocName(fileName);
+ Docname=new GooString (fileName);
+
+ // for non-xml output (complex or simple) with frames generate the left frame
+ if(!xml && !noframes)
+ {
+ GooString* left=new GooString(fileName);
+ left->append("_ind.html");
+
+ doFrame(firstPage);
+
+ if (!(fContentsFrame = fopen(left->getCString(), "w")))
+ {
+ error(-1, "Couldn't open html file '%s'", left->getCString());
+ delete left;
+ return;
+ }
+ delete left;
+ fputs(DOCTYPE, fContentsFrame);
+ fputs("<HTML>\n<HEAD>\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n",fContentsFrame);
+
+ if (doOutline)
+ {
+ GooString *str = basename(Docname);
+ fprintf(fContentsFrame, "<A href=\"%s%s\" target=\"contents\">Outline</a><br>", str->getCString(), complexMode ? "-outline.html" : "s.html#outline");
+ delete str;
+ }
+
+ if (!complexMode)
+ { /* not in complex mode */
+
+ GooString* right=new GooString(fileName);
+ right->append("s.html");
+
+ if (!(page=fopen(right->getCString(),"w"))){
+ error(-1, "Couldn't open html file '%s'", right->getCString());
+ delete right;
+ return;
+ }
+ delete right;
+ fputs(DOCTYPE, page);
+ fputs("<HTML>\n<HEAD>\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n",page);
+ }
+ }
+
+ if (noframes) {
+ if (stout) page=stdout;
+ else {
+ GooString* right=new GooString(fileName);
+ if (!xml) right->append(".html");
+ if (xml) right->append(".xml");
+ if (!(page=fopen(right->getCString(),"w"))){
+ error(-1, "Couldn't open html file '%s'", right->getCString());
+ delete right;
+ return;
+ }
+ delete right;
+ }
+
+ htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName());
+ if (xml)
+ {
+ fprintf(page, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", htmlEncoding);
+ fputs("<!DOCTYPE pdf2xml SYSTEM \"pdf2xml.dtd\">\n\n", page);
+ fputs("<pdf2xml>\n",page);
+ }
+ else
+ {
+ fprintf(page,"%s\n<HTML>\n<HEAD>\n<TITLE>%s</TITLE>\n",
+ DOCTYPE, docTitle->getCString());
+
+ fprintf(page, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", htmlEncoding);
+
+ dumpMetaVars(page);
+ fprintf(page,"</HEAD>\n");
+ fprintf(page,"<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n");
+ }
+ }
+ ok = gTrue;
+}
+
+HtmlOutputDev::~HtmlOutputDev() {
+ /*if (mode&&!xml){
+ int h=xoutRound(pages->pageHeight/scale);
+ int w=xoutRound(pages->pageWidth/scale);
+ fprintf(tin,"%s=%03d\n","PAPER_WIDTH",w);
+ fprintf(tin,"%s=%03d\n","PAPER_HEIGHT",h);
+ fclose(tin);
+ }*/
+
+ HtmlFont::clear();
+
+ delete Docname;
+ delete docTitle;
+
+ deleteGooList(glMetaVars, HtmlMetaVar);
+
+ if (fContentsFrame){
+ fputs("</BODY>\n</HTML>\n",fContentsFrame);
+ fclose(fContentsFrame);
+ }
+ if (xml) {
+ fputs("</pdf2xml>\n",page);
+ fclose(page);
+ } else
+ if ( !complexMode || xml || noframes )
+ {
+ fputs("</BODY>\n</HTML>\n",page);
+ fclose(page);
+ }
+ if (pages)
+ delete pages;
+}
+
+void HtmlOutputDev::startPage(int pageNum, GfxState *state) {
+#if 0
+ if (mode&&!xml){
+ if (write){
+ write=gFalse;
+ GooString* fname=Dirname(Docname);
+ fname->append("image.log");
+ if((tin=fopen(getFileNameFromPath(fname->getCString(),fname->getLength()),"w"))==NULL){
+ printf("Error : can not open %s",fname);
+ exit(1);
+ }
+ delete fname;
+ // if(state->getRotation()!=0)
+ // fprintf(tin,"ROTATE=%d rotate %d neg %d neg translate\n",state->getRotation(),state->getX1(),-state->getY1());
+ // else
+ fprintf(tin,"ROTATE=%d neg %d neg translate\n",state->getX1(),state->getY1());
+ }
+ }
+#endif
+
+ this->pageNum = pageNum;
+ GooString *str=basename(Docname);
+ pages->clear();
+ if(!noframes)
+ {
+ if (fContentsFrame)
+ {
+ if (complexMode)
+ fprintf(fContentsFrame,"<A href=\"%s-%d.html\"",str->getCString(),pageNum);
+ else
+ fprintf(fContentsFrame,"<A href=\"%ss.html#%d\"",str->getCString(),pageNum);
+ fprintf(fContentsFrame," target=\"contents\" >Page %d</a><br>\n",pageNum);
+ }
+ }
+
+ pages->pageWidth=static_cast<int>(state->getPageWidth());
+ pages->pageHeight=static_cast<int>(state->getPageHeight());
+
+ delete str;
+}
+
+
+void HtmlOutputDev::endPage() {
+ Links *linksList = catalog->getPage(pageNum)->getLinks(catalog);
+ for (int i = 0; i < linksList->getNumLinks(); ++i)
+ {
+ doProcessLink(linksList->getLink(i));
+ }
+ delete linksList;
+
+ pages->conv();
+ pages->coalesce();
+ pages->dump(page, pageNum);
+
+ // I don't yet know what to do in the case when there are pages of different
+ // sizes and we want complex output: running ghostscript many times
+ // seems very inefficient. So for now I'll just use last page's size
+ maxPageWidth = pages->pageWidth;
+ maxPageHeight = pages->pageHeight;
+
+ //if(!noframes&&!xml) fputs("<br>\n", fContentsFrame);
+ if(!stout && !globalParams->getErrQuiet()) printf("Page-%d\n",(pageNum));
+}
+
+void HtmlOutputDev::updateFont(GfxState *state) {
+ pages->updateFont(state);
+}
+
+void HtmlOutputDev::beginString(GfxState *state, GooString *s) {
+ pages->beginString(state, s);
+}
+
+void HtmlOutputDev::endString(GfxState *state) {
+ pages->endString();
+}
+
+void HtmlOutputDev::drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int /*nBytes*/, Unicode *u, int uLen)
+{
+ if ( !showHidden && (state->getRender() & 3) == 3) {
+ return;
+ }
+ pages->addChar(state, x, y, dx, dy, originX, originY, u, uLen);
+}
+
+void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+
+ if (ignore||complexMode) {
+ OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
+ return;
+ }
+
+ FILE *f1;
+ int c;
+
+ int x0, y0; // top left corner of image
+ int w0, h0, w1, h1; // size of image
+ double xt, yt, wt, ht;
+ GBool rotate, xFlip, yFlip;
+
+ // get image position and size
+ state->transform(0, 0, &xt, &yt);
+ state->transformDelta(1, 1, &wt, &ht);
+ if (wt > 0) {
+ x0 = xoutRound(xt);
+ w0 = xoutRound(wt);
+ } else {
+ x0 = xoutRound(xt + wt);
+ w0 = xoutRound(-wt);
+ }
+ if (ht > 0) {
+ y0 = xoutRound(yt);
+ h0 = xoutRound(ht);
+ } else {
+ y0 = xoutRound(yt + ht);
+ h0 = xoutRound(-ht);
+ }
+ state->transformDelta(1, 0, &xt, &yt);
+ rotate = fabs(xt) < fabs(yt);
+ if (rotate) {
+ w1 = h0;
+ h1 = w0;
+ xFlip = ht < 0;
+ yFlip = wt > 0;
+ } else {
+ w1 = w0;
+ h1 = h0;
+ xFlip = wt < 0;
+ yFlip = ht > 0;
+ }
+
+ // dump JPEG file
+ if (dumpJPEG && str->getKind() == strDCT) {
+ GooString *fName=new GooString(Docname);
+ fName->append("-");
+ GooString *pgNum=GooString::fromInt(pageNum);
+ GooString *imgnum=GooString::fromInt(imgNum);
+ // open the image file
+ fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg");
+ delete pgNum;
+ delete imgnum;
+
+ ++imgNum;
+ if (!(f1 = fopen(fName->getCString(), "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
+ return;
+ }
+
+ // initialize stream
+ str = ((DCTStream *)str)->getRawStream();
+ str->reset();
+
+ // copy the stream
+ while ((c = str->getChar()) != EOF)
+ fputc(c, f1);
+
+ fclose(f1);
+
+ if (fName) imgList->append(fName);
+ }
+ else {
+ OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
+ }
+}
+
+void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg) {
+
+ if (ignore||complexMode) {
+ OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate,
+ maskColors, inlineImg);
+ return;
+ }
+
+ FILE *f1;
+ int c;
+
+ int x0, y0; // top left corner of image
+ int w0, h0, w1, h1; // size of image
+ double xt, yt, wt, ht;
+ GBool rotate, xFlip, yFlip;
+
+ // get image position and size
+ state->transform(0, 0, &xt, &yt);
+ state->transformDelta(1, 1, &wt, &ht);
+ if (wt > 0) {
+ x0 = xoutRound(xt);
+ w0 = xoutRound(wt);
+ } else {
+ x0 = xoutRound(xt + wt);
+ w0 = xoutRound(-wt);
+ }
+ if (ht > 0) {
+ y0 = xoutRound(yt);
+ h0 = xoutRound(ht);
+ } else {
+ y0 = xoutRound(yt + ht);
+ h0 = xoutRound(-ht);
+ }
+ state->transformDelta(1, 0, &xt, &yt);
+ rotate = fabs(xt) < fabs(yt);
+ if (rotate) {
+ w1 = h0;
+ h1 = w0;
+ xFlip = ht < 0;
+ yFlip = wt > 0;
+ } else {
+ w1 = w0;
+ h1 = h0;
+ xFlip = wt < 0;
+ yFlip = ht > 0;
+ }
+
+
+ /*if( !globalParams->getErrQuiet() )
+ printf("image stream of kind %d\n", str->getKind());*/
+ // dump JPEG file
+ if (dumpJPEG && str->getKind() == strDCT) {
+ GooString *fName=new GooString(Docname);
+ fName->append("-");
+ GooString *pgNum= GooString::fromInt(pageNum);
+ GooString *imgnum= GooString::fromInt(imgNum);
+
+ // open the image file
+ fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg");
+ delete pgNum;
+ delete imgnum;
+
+ ++imgNum;
+
+ if (!(f1 = fopen(fName->getCString(), "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
+ return;
+ }
+
+ // initialize stream
+ str = ((DCTStream *)str)->getRawStream();
+ str->reset();
+
+ // copy the stream
+ while ((c = str->getChar()) != EOF)
+ fputc(c, f1);
+
+ fclose(f1);
+
+ if (fName) imgList->append(fName);
+ }
+ else {
+#ifdef ENABLE_LIBPNG
+ // Dump the image as a PNG file. Much of the PNG code
+ // comes from an example by Guillaume Cottenceau.
+ Guchar *p;
+ GfxRGB rgb;
+ png_byte *row = (png_byte *) malloc(3 * width); // 3 bytes/pixel: RGB
+ png_bytep *row_pointer= &row;
+
+ // Create the image filename
+ GooString *fName=new GooString(Docname);
+ fName->append("-");
+ GooString *pgNum= GooString::fromInt(pageNum);
+ GooString *imgnum= GooString::fromInt(imgNum);
+ fName->append(pgNum)->append("_")->append(imgnum)->append(".png");
+ delete pgNum;
+ delete imgnum;
+
+ // Open the image file
+ if (!(f1 = fopen(fName->getCString(), "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fName->getCString());
+ delete fName;
+ return;
+ }
+
+ PNGWriter *writer = new PNGWriter();
+ if (!writer->init(f1, width, height)) {
+ delete writer;
+ fclose(f1);
+ return;
+ }
+
+ // Initialize the image stream
+ ImageStream *imgStr = new ImageStream(str, width,
+ colorMap->getNumPixelComps(), colorMap->getBits());
+ imgStr->reset();
+
+ // For each line...
+ for (int y = 0; y < height; y++) {
+
+ // Convert into a PNG row
+ p = imgStr->getLine();
+ for (int x = 0; x < width; x++) {
+ colorMap->getRGB(p, &rgb);
+ // Write the RGB pixels into the row
+ row[3*x]= colToByte(rgb.r);
+ row[3*x+1]= colToByte(rgb.g);
+ row[3*x+2]= colToByte(rgb.b);
+ p += colorMap->getNumPixelComps();
+ }
+
+ if (!writer->writeRow(row_pointer)) {
+ delete writer;
+ fclose(f1);
+ return;
+ }
+ }
+
+ writer->close();
+ delete writer;
+ fclose(f1);
+
+ free(row);
+ imgList->append(fName);
+ ++imgNum;
+ imgStr->close();
+ delete imgStr;
+#else
+ OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate,
+ maskColors, inlineImg);
+#endif
+ }
+}
+
+
+
+void HtmlOutputDev::doProcessLink(Link* link){
+ double _x1,_y1,_x2,_y2;
+ int x1,y1,x2,y2;
+
+ link->getRect(&_x1,&_y1,&_x2,&_y2);
+ cvtUserToDev(_x1,_y1,&x1,&y1);
+
+ cvtUserToDev(_x2,_y2,&x2,&y2);
+
+
+ GooString* _dest=getLinkDest(link,catalog);
+ HtmlLink t((double) x1,(double) y2,(double) x2,(double) y1,_dest);
+ pages->AddLink(t);
+ delete _dest;
+}
+
+GooString* HtmlOutputDev::getLinkDest(Link *link,Catalog* catalog){
+ char *p;
+ switch(link->getAction()->getKind())
+ {
+ case actionGoTo:
+ {
+ GooString* file=basename(Docname);
+ int page=1;
+ LinkGoTo *ha=(LinkGoTo *)link->getAction();
+ LinkDest *dest=NULL;
+ if (ha->getDest()!=NULL)
+ dest=ha->getDest()->copy();
+ else if (ha->getNamedDest()!=NULL)
+ dest=catalog->findDest(ha->getNamedDest());
+
+ if (dest){
+ if (dest->isPageRef()){
+ Ref pageref=dest->getPageRef();
+ page=catalog->findPage(pageref.num,pageref.gen);
+ }
+ else {
+ page=dest->getPageNum();
+ }
+
+ delete dest;
+
+ GooString *str=GooString::fromInt(page);
+ /* complex simple
+ frames file-4.html files.html#4
+ noframes file.html#4 file.html#4
+ */
+ if (noframes)
+ {
+ file->append(".html#");
+ file->append(str);
+ }
+ else
+ {
+ if( complexMode )
+ {
+ file->append("-");
+ file->append(str);
+ file->append(".html");
+ }
+ else
+ {
+ file->append("s.html#");
+ file->append(str);
+ }
+ }
+
+ if (printCommands) printf(" link to page %d ",page);
+ delete str;
+ return file;
+ }
+ else
+ {
+ return new GooString();
+ }
+ }
+ case actionGoToR:
+ {
+ LinkGoToR *ha=(LinkGoToR *) link->getAction();
+ LinkDest *dest=NULL;
+ int page=1;
+ GooString *file=new GooString();
+ if (ha->getFileName()){
+ delete file;
+ file=new GooString(ha->getFileName()->getCString());
+ }
+ if (ha->getDest()!=NULL) dest=ha->getDest()->copy();
+ if (dest&&file){
+ if (!(dest->isPageRef())) page=dest->getPageNum();
+ delete dest;
+
+ if (printCommands) printf(" link to page %d ",page);
+ if (printHtml){
+ p=file->getCString()+file->getLength()-4;
+ if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")){
+ file->del(file->getLength()-4,4);
+ file->append(".html");
+ }
+ file->append('#');
+ file->append(GooString::fromInt(page));
+ }
+ }
+ if (printCommands && file) printf("filename %s\n",file->getCString());
+ return file;
+ }
+ case actionURI:
+ {
+ LinkURI *ha=(LinkURI *) link->getAction();
+ GooString* file=new GooString(ha->getURI()->getCString());
+ // printf("uri : %s\n",file->getCString());
+ return file;
+ }
+ case actionLaunch:
+ {
+ LinkLaunch *ha=(LinkLaunch *) link->getAction();
+ GooString* file=new GooString(ha->getFileName()->getCString());
+ if (printHtml) {
+ p=file->getCString()+file->getLength()-4;
+ if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")){
+ file->del(file->getLength()-4,4);
+ file->append(".html");
+ }
+ if (printCommands) printf("filename %s",file->getCString());
+
+ return file;
+
+ }
+ }
+ default:
+ return new GooString();
+ }
+}
+
+void HtmlOutputDev::dumpMetaVars(FILE *file)
+{
+ GooString *var;
+
+ for(int i = 0; i < glMetaVars->getLength(); i++)
+ {
+ HtmlMetaVar *t = (HtmlMetaVar*)glMetaVars->get(i);
+ var = t->toString();
+ fprintf(file, "%s\n", var->getCString());
+ delete var;
+ }
+}
+
+GBool HtmlOutputDev::dumpDocOutline(Catalog* catalog)
+{
+ FILE * output;
+ GBool bClose = gFalse;
+
+ if (!ok || xml)
+ return gFalse;
+
+ Object *outlines = catalog->getOutline();
+ if (!outlines->isDict())
+ return gFalse;
+
+ if (!complexMode && !xml)
+ {
+ output = page;
+ }
+ else if (complexMode && !xml)
+ {
+ if (noframes)
+ {
+ output = page;
+ fputs("<hr>\n", output);
+ }
+ else
+ {
+ GooString *str = Docname->copy();
+ str->append("-outline.html");
+ output = fopen(str->getCString(), "w");
+ if (output == NULL)
+ return gFalse;
+ delete str;
+ bClose = gTrue;
+ fputs("<HTML>\n<HEAD>\n<TITLE>Document Outline</TITLE>\n</HEAD>\n<BODY>\n", output);
+ }
+ }
+
+ GBool done = newOutlineLevel(output, outlines, catalog);
+ if (done && !complexMode)
+ fputs("<hr>\n", output);
+
+ if (bClose)
+ {
+ fputs("</BODY>\n</HTML>\n", output);
+ fclose(output);
+ }
+ return done;
+}
+
+GBool HtmlOutputDev::newOutlineLevel(FILE *output, Object *node, Catalog* catalog, int level)
+{
+ Object curr, next;
+ GBool atLeastOne = gFalse;
+
+ if (node->dictLookup("First", &curr)->isDict()) {
+ if (level == 1)
+ {
+ fputs("<A name=\"outline\"></a>", output);
+ fputs("<h1>Document Outline</h1>\n", output);
+ }
+ fputs("<ul>",output);
+ do {
+ // get title, give up if not found
+ Object title;
+ if (curr.dictLookup("Title", &title)->isNull()) {
+ title.free();
+ break;
+ }
+ GooString *titleStr = new GooString(title.getString());
+ title.free();
+
+ // get corresponding link
+ // Note: some code duplicated from HtmlOutputDev::getLinkDest().
+ GooString *linkName = NULL;;
+ Object dest;
+ if (!curr.dictLookup("Dest", &dest)->isNull()) {
+ LinkGoTo *link = new LinkGoTo(&dest);
+ LinkDest *linkdest=NULL;
+ if (link->getDest()!=NULL)
+ linkdest=link->getDest()->copy();
+ else if (link->getNamedDest()!=NULL)
+ linkdest=catalog->findDest(link->getNamedDest());
+
+ delete link;
+ if (linkdest) {
+ int page;
+ if (linkdest->isPageRef()) {
+ Ref pageref=linkdest->getPageRef();
+ page=catalog->findPage(pageref.num,pageref.gen);
+ } else {
+ page=linkdest->getPageNum();
+ }
+ delete linkdest;
+
+ /* complex simple
+ frames file-4.html files.html#4
+ noframes file.html#4 file.html#4
+ */
+ linkName=basename(Docname);
+ GooString *str=GooString::fromInt(page);
+ if (noframes) {
+ linkName->append(".html#");
+ linkName->append(str);
+ } else {
+ if( complexMode ) {
+ linkName->append("-");
+ linkName->append(str);
+ linkName->append(".html");
+ } else {
+ linkName->append("s.html#");
+ linkName->append(str);
+ }
+ }
+ delete str;
+ }
+ }
+ dest.free();
+
+ fputs("<li>",output);
+ if (linkName)
+ fprintf(output,"<A href=\"%s\">", linkName->getCString());
+ fputs(titleStr->getCString(),output);
+ if (linkName) {
+ fputs("</A>",output);
+ delete linkName;
+ }
+ fputs("\n",output);
+ delete titleStr;
+ atLeastOne = gTrue;
+
+ newOutlineLevel(output, &curr, catalog, level+1);
+ curr.dictLookup("Next", &next);
+ curr.free();
+ curr = next;
+ } while(curr.isDict());
+ fputs("</ul>",output);
+ }
+ curr.free();
+
+ return atLeastOne;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h
new file mode 100644
index 00000000000..24ccfd1c584
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/HtmlOutputDev.h
@@ -0,0 +1,329 @@
+//========================================================================
+//
+// HtmlOutputDev.h
+//
+// Copyright 1997 Derek B. Noonburg
+//
+// Changed 1999 by G.Ovtcharov
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006, 2007, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008-2009 Warren Toomey <wkt@tuhs.org>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef HTMLOUTPUTDEV_H
+#define HTMLOUTPUTDEV_H
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include "goo/gtypes.h"
+#include "goo/GooList.h"
+#include "GfxFont.h"
+#include "OutputDev.h"
+#include "HtmlLinks.h"
+#include "HtmlFonts.h"
+#include "Link.h"
+#include "Catalog.h"
+#include "UnicodeMap.h"
+
+
+#ifdef _WIN32
+# define SLASH '\\'
+#else
+# define SLASH '/'
+#endif
+
+#define xoutRound(x) ((int)(x + 0.5))
+
+#define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
+#define DOCTYPE_FRAMES "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"\n\"http://www.w3.org/TR/html4/frameset.dtd\">"
+
+class GfxState;
+class GooString;
+//------------------------------------------------------------------------
+// HtmlString
+//------------------------------------------------------------------------
+
+enum UnicodeTextDirection {
+ textDirUnknown,
+ textDirLeftRight,
+ textDirRightLeft,
+ textDirTopBottom
+};
+
+
+class HtmlString {
+public:
+
+ // Constructor.
+ HtmlString(GfxState *state, double fontSize, HtmlFontAccu* fonts);
+
+ // Destructor.
+ ~HtmlString();
+
+ // Add a character to the string.
+ void addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ Unicode u);
+ HtmlLink* getLink() { return link; }
+ void endString(); // postprocessing
+
+private:
+// aender die text variable
+ HtmlLink *link;
+ double xMin, xMax; // bounding box x coordinates
+ double yMin, yMax; // bounding box y coordinates
+ int col; // starting column
+ Unicode *text; // the text
+ double *xRight; // right-hand x coord of each char
+ HtmlString *yxNext; // next string in y-major order
+ HtmlString *xyNext; // next string in x-major order
+ int fontpos;
+ GooString* htext;
+ int len; // length of text and xRight
+ int size; // size of text and xRight arrays
+ UnicodeTextDirection dir; // direction (left to right/right to left)
+
+ friend class HtmlPage;
+
+};
+
+
+//------------------------------------------------------------------------
+// HtmlPage
+//------------------------------------------------------------------------
+
+
+
+class HtmlPage {
+public:
+
+ // Constructor.
+ HtmlPage(GBool rawOrder, char *imgExtVal);
+
+ // Destructor.
+ ~HtmlPage();
+
+ // Begin a new string.
+ void beginString(GfxState *state, GooString *s);
+
+ // Add a character to the current string.
+ void addChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double ox, double oy,
+ Unicode *u, int uLen); //Guchar c);
+
+ void updateFont(GfxState *state);
+
+ // End the current string, sorting it into the list of strings.
+ void endString();
+
+ // Coalesce strings that look like parts of the same line.
+ void coalesce();
+
+ // Find a string. If <top> is true, starts looking at top of page;
+ // otherwise starts looking at <xMin>,<yMin>. If <bottom> is true,
+ // stops looking at bottom of page; otherwise stops looking at
+ // <xMax>,<yMax>. If found, sets the text bounding rectange and
+ // returns true; otherwise returns false.
+
+
+ // new functions
+ void AddLink(const HtmlLink& x){
+ links->AddLink(x);
+ }
+
+ void dump(FILE *f, int pageNum);
+
+ // Clear the page.
+ void clear();
+
+ void conv();
+private:
+ HtmlFont* getFont(HtmlString *hStr) { return fonts->Get(hStr->fontpos); }
+
+ double fontSize; // current font size
+ GBool rawOrder; // keep strings in content stream order
+
+ HtmlString *curStr; // currently active string
+
+ HtmlString *yxStrings; // strings in y-major order
+ HtmlString *xyStrings; // strings in x-major order
+ HtmlString *yxCur1, *yxCur2; // cursors for yxStrings list
+
+ void setDocName(char* fname);
+ void dumpAsXML(FILE* f,int page);
+ void dumpComplex(FILE* f, int page);
+
+ // marks the position of the fonts that belong to current page (for noframes)
+ int fontsPageMarker;
+ HtmlFontAccu *fonts;
+ HtmlLinks *links;
+
+ GooString *DocName;
+ GooString *imgExt;
+ int pageWidth;
+ int pageHeight;
+ static int pgNum;
+ int firstPage; // used to begin the numeration of pages
+
+ friend class HtmlOutputDev;
+};
+
+//------------------------------------------------------------------------
+// HtmlMetaVar
+//------------------------------------------------------------------------
+class HtmlMetaVar {
+public:
+ HtmlMetaVar(char *_name, char *_content);
+ ~HtmlMetaVar();
+
+ GooString* toString();
+
+private:
+
+ GooString *name;
+ GooString *content;
+};
+
+//------------------------------------------------------------------------
+// HtmlOutputDev
+//------------------------------------------------------------------------
+
+class HtmlOutputDev: public OutputDev {
+public:
+
+ // Open a text output file. If <fileName> is NULL, no file is written
+ // (this is useful, e.g., for searching text). If <useASCII7> is true,
+ // text is converted to 7-bit ASCII; otherwise, text is converted to
+ // 8-bit ISO Latin-1. <useASCII7> should also be set for Japanese
+ // (EUC-JP) text. If <rawOrder> is true, the text is kept in content
+ // stream order.
+ HtmlOutputDev(char *fileName, char *title,
+ char *author,
+ char *keywords,
+ char *subject,
+ char *date,
+ char *extension,
+ GBool rawOrder,
+ int firstPage = 1,
+ GBool outline = 0);
+
+ // Destructor.
+ virtual ~HtmlOutputDev();
+
+ // Check if file was successfully created.
+ virtual GBool isOk() { return ok; }
+
+ //---- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gTrue; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gTrue; }
+
+ //----- initialization and control
+
+ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
+ int rotate, GBool useMediaBox, GBool crop,
+ int sliceX, int sliceY, int sliceW, int sliceH,
+ GBool printing, Catalog * catalogA,
+ GBool (* abortCheckCbk)(void *data) = NULL,
+ void * abortCheckCbkData = NULL)
+ {
+ catalog = catalogA;
+ return gTrue;
+ }
+
+
+ // Start a page.
+ virtual void startPage(int pageNum, GfxState *state);
+
+ // End a page.
+ virtual void endPage();
+
+ //----- update text state
+ virtual void updateFont(GfxState *state);
+
+ //----- text drawing
+ virtual void beginString(GfxState *state, GooString *s);
+ virtual void endString(GfxState *state);
+ virtual void drawChar(GfxState *state, double x, double y,
+ double dx, double dy,
+ double originX, double originY,
+ CharCode code, int nBytes, Unicode *u, int uLen);
+
+ virtual void drawImageMask(GfxState *state, Object *ref,
+ Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+
+ //new feature
+ virtual int DevType() {return 1234;}
+
+ int getPageWidth() { return maxPageWidth; }
+ int getPageHeight() { return maxPageHeight; }
+
+ GBool dumpDocOutline(Catalog* catalog);
+
+private:
+ // convert encoding into a HTML standard, or encoding->getCString if not
+ // recognized
+ static char* mapEncodingToHtml(GooString* encoding);
+ void doProcessLink(Link *link);
+ GooString* getLinkDest(Link *link,Catalog *catalog);
+ void dumpMetaVars(FILE *);
+ void doFrame(int firstPage);
+ GBool newOutlineLevel(FILE *output, Object *node, Catalog* catalog, int level = 1);
+
+ FILE *fContentsFrame;
+ FILE *page; // html file
+ //FILE *tin; // image log file
+ //GBool write;
+ GBool needClose; // need to close the file?
+ HtmlPage *pages; // text for the current page
+ GBool rawOrder; // keep text in content stream order
+ GBool doOutline; // output document outline
+ GBool ok; // set up ok?
+ GBool dumpJPEG;
+ int pageNum;
+ int maxPageWidth;
+ int maxPageHeight;
+ static int imgNum;
+ static GooList *imgList;
+ GooString *Docname;
+ GooString *docTitle;
+ GooList *glMetaVars;
+ Catalog *catalog;
+ friend class HtmlPage;
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc
new file mode 100644
index 00000000000..7bf843fc124
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.cc
@@ -0,0 +1,246 @@
+//========================================================================
+//
+// ImageOutputDev.cc
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2005, 2007 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006 Rainer Keller <class321@gmx.de>
+// Copyright (C) 2008 Timothy Lee <timothy.lee@siriushk.com>
+// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "Error.h"
+#include "GfxState.h"
+#include "Object.h"
+#include "Stream.h"
+#ifdef ENABLE_LIBJPEG
+#include "DCTStream.h"
+#endif
+#include "ImageOutputDev.h"
+
+ImageOutputDev::ImageOutputDev(char *fileRootA, GBool dumpJPEGA) {
+ fileRoot = copyString(fileRootA);
+ fileName = (char *)gmalloc(strlen(fileRoot) + 20);
+ dumpJPEG = dumpJPEGA;
+ imgNum = 0;
+ ok = gTrue;
+}
+
+ImageOutputDev::~ImageOutputDev() {
+ gfree(fileName);
+ gfree(fileRoot);
+}
+
+void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg) {
+ FILE *f;
+ int c;
+ int size, i;
+
+ // dump JPEG file
+ if (dumpJPEG && str->getKind() == strDCT && !inlineImg) {
+
+ // open the image file
+ sprintf(fileName, "%s-%03d.jpg", fileRoot, imgNum);
+ ++imgNum;
+ if (!(f = fopen(fileName, "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fileName);
+ return;
+ }
+
+ // initialize stream
+ str = ((DCTStream *)str)->getRawStream();
+ str->reset();
+
+ // copy the stream
+ while ((c = str->getChar()) != EOF)
+ fputc(c, f);
+
+ str->close();
+ fclose(f);
+
+ // dump PBM file
+ } else {
+
+ // open the image file and write the PBM header
+ sprintf(fileName, "%s-%03d.pbm", fileRoot, imgNum);
+ ++imgNum;
+ if (!(f = fopen(fileName, "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fileName);
+ return;
+ }
+ fprintf(f, "P4\n");
+ fprintf(f, "%d %d\n", width, height);
+
+ // initialize stream
+ str->reset();
+
+ // copy the stream
+ size = height * ((width + 7) / 8);
+ for (i = 0; i < size; ++i) {
+ fputc(str->getChar(), f);
+ }
+
+ str->close();
+ fclose(f);
+ }
+}
+
+void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg) {
+ FILE *f;
+ ImageStream *imgStr;
+ Guchar *p;
+ Guchar zero = 0;
+ GfxGray gray;
+ GfxRGB rgb;
+ int x, y;
+ int c;
+ int size, i;
+ int pbm_mask = 0xff;
+
+ // dump JPEG file
+ if (dumpJPEG && str->getKind() == strDCT &&
+ (colorMap->getNumPixelComps() == 1 ||
+ colorMap->getNumPixelComps() == 3) &&
+ !inlineImg) {
+
+ // open the image file
+ sprintf(fileName, "%s-%03d.jpg", fileRoot, imgNum);
+ ++imgNum;
+ if (!(f = fopen(fileName, "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fileName);
+ return;
+ }
+
+ // initialize stream
+ str = ((DCTStream *)str)->getRawStream();
+ str->reset();
+
+ // copy the stream
+ while ((c = str->getChar()) != EOF)
+ fputc(c, f);
+
+ str->close();
+ fclose(f);
+
+ // dump PBM file
+ } else if (colorMap->getNumPixelComps() == 1 &&
+ colorMap->getBits() == 1) {
+
+ // open the image file and write the PBM header
+ sprintf(fileName, "%s-%03d.pbm", fileRoot, imgNum);
+ ++imgNum;
+ if (!(f = fopen(fileName, "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fileName);
+ return;
+ }
+ fprintf(f, "P4\n");
+ fprintf(f, "%d %d\n", width, height);
+
+ // initialize stream
+ str->reset();
+
+ // if 0 comes out as 0 in the color map, the we _flip_ stream bits
+ // otherwise we pass through stream bits unmolested
+ colorMap->getGray(&zero, &gray);
+ if(colToByte(gray))
+ pbm_mask = 0;
+
+ // copy the stream
+ size = height * ((width + 7) / 8);
+ for (i = 0; i < size; ++i) {
+ fputc(str->getChar() ^ pbm_mask, f);
+ }
+
+ str->close();
+ fclose(f);
+
+ // dump PPM file
+ } else {
+
+ // open the image file and write the PPM header
+ sprintf(fileName, "%s-%03d.ppm", fileRoot, imgNum);
+ ++imgNum;
+ if (!(f = fopen(fileName, "wb"))) {
+ error(-1, "Couldn't open image file '%s'", fileName);
+ return;
+ }
+ fprintf(f, "P6\n");
+ fprintf(f, "%d %d\n", width, height);
+ fprintf(f, "255\n");
+
+ // initialize stream
+ imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
+ colorMap->getBits());
+ imgStr->reset();
+
+ // for each line...
+ for (y = 0; y < height; ++y) {
+
+ // write the line
+ p = imgStr->getLine();
+ for (x = 0; x < width; ++x) {
+ colorMap->getRGB(p, &rgb);
+ fputc(colToByte(rgb.r), f);
+ fputc(colToByte(rgb.g), f);
+ fputc(colToByte(rgb.b), f);
+ p += colorMap->getNumPixelComps();
+ }
+ }
+ imgStr->close();
+ delete imgStr;
+
+ fclose(f);
+ }
+}
+
+void ImageOutputDev::drawMaskedImage(
+ GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap, GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert, GBool maskInterpolate) {
+ drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+ drawImageMask(state, ref, maskStr, maskWidth, maskHeight, maskInvert,
+ maskInterpolate, gFalse);
+}
+
+void ImageOutputDev::drawSoftMaskedImage(
+ GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap, GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap, GBool maskInterpolate) {
+ drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+ drawImage(state, ref, maskStr, maskWidth, maskHeight,
+ maskColorMap, maskInterpolate, NULL, gFalse);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h
new file mode 100644
index 00000000000..f2beab25092
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/ImageOutputDev.h
@@ -0,0 +1,106 @@
+//========================================================================
+//
+// ImageOutputDev.h
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Rainer Keller <class321@gmx.de>
+// Copyright (C) 2008 Timothy Lee <timothy.lee@siriushk.com>
+// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef IMAGEOUTPUTDEV_H
+#define IMAGEOUTPUTDEV_H
+
+#include "poppler/poppler-config.h"
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include <stdio.h>
+#include "goo/gtypes.h"
+#include "OutputDev.h"
+
+class GfxState;
+
+//------------------------------------------------------------------------
+// ImageOutputDev
+//------------------------------------------------------------------------
+
+class ImageOutputDev: public OutputDev {
+public:
+
+ // Create an OutputDev which will write images to files named
+ // <fileRoot>-NNN.<type>. Normally, all images are written as PBM
+ // (.pbm) or PPM (.ppm) files. If <dumpJPEG> is set, JPEG images are
+ // written as JPEG (.jpg) files.
+ ImageOutputDev(char *fileRootA, GBool dumpJPEGA);
+
+ // Destructor.
+ virtual ~ImageOutputDev();
+
+ // Check if file was successfully created.
+ virtual GBool isOk() { return ok; }
+
+ // Does this device use beginType3Char/endType3Char? Otherwise,
+ // text in Type 3 fonts will be drawn with drawChar/drawString.
+ virtual GBool interpretType3Chars() { return gFalse; }
+
+ // Does this device need non-text content?
+ virtual GBool needNonText() { return gTrue; }
+
+ //---- get info about output device
+
+ // Does this device use upside-down coordinates?
+ // (Upside-down means (0,0) is the top left corner of the page.)
+ virtual GBool upsideDown() { return gTrue; }
+
+ // Does this device use drawChar() or drawString()?
+ virtual GBool useDrawChar() { return gFalse; }
+
+ //----- image drawing
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool interpolate, GBool inlineImg);
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ GBool interpolate, int *maskColors, GBool inlineImg);
+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr, int maskWidth, int maskHeight,
+ GBool maskInvert, GBool maskInterpolate);
+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+ GBool interpolate,
+ Stream *maskStr,
+ int maskWidth, int maskHeight,
+ GfxImageColorMap *maskColorMap,
+ GBool maskInterpolate);
+
+private:
+
+ char *fileRoot; // root of output file names
+ char *fileName; // buffer for output file names
+ GBool dumpJPEG; // set to dump native JPEG files
+ int imgNum; // current image number
+ GBool ok; // set up ok?
+};
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am
new file mode 100644
index 00000000000..e57c71b9b9a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.am
@@ -0,0 +1,101 @@
+if BUILD_SPLASH_OUTPUT
+
+pdftoppm_SOURCES = \
+ pdftoppm.cc \
+ $(common)
+
+pdftoppm_binary = pdftoppm
+
+pdftoppm_manpage = pdftoppm.1
+
+endif
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ -I$(top_srcdir)/utils \
+ -I$(top_srcdir)/poppler \
+ $(UTILS_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
+ $(ABIWORD_CFLAGS)
+
+LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(UTILS_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+if BUILD_ABIWORD_OUTPUT
+
+pdftoabw_SOURCES = \
+ pdftoabw.cc \
+ $(common)
+
+pdftoabw_LDADD = $(LDADD) $(ABIWORD_LIBS)
+
+pdftoabw_binary = pdftoabw
+
+endif
+
+AM_LDFLAGS = @auto_import_flags@
+
+bin_PROGRAMS = \
+ pdffonts \
+ pdfimages \
+ pdfinfo \
+ pdftops \
+ pdftotext \
+ pdftohtml \
+ $(pdftoppm_binary) \
+ $(pdftoabw_binary)
+
+dist_man1_MANS = \
+ pdffonts.1 \
+ pdfimages.1 \
+ pdfinfo.1 \
+ pdftops.1 \
+ pdftotext.1 \
+ pdftohtml.1 \
+ $(pdftoppm_manpage)
+
+common = parseargs.c parseargs.h
+
+pdffonts_SOURCES = \
+ pdffonts.cc \
+ $(common)
+
+pdfimages_SOURCES = \
+ pdfimages.cc \
+ ImageOutputDev.cc \
+ ImageOutputDev.h \
+ $(common)
+
+pdfinfo_SOURCES = \
+ pdfinfo.cc \
+ printencodings.cc \
+ printencodings.h \
+ $(common)
+
+pdftops_SOURCES = \
+ pdftops.cc \
+ $(common)
+
+pdftotext_SOURCES = \
+ pdftotext.cc \
+ printencodings.cc \
+ printencodings.h \
+ $(common)
+
+pdftohtml_SOURCES = \
+ pdftohtml.cc \
+ HtmlFonts.cc \
+ HtmlFonts.h \
+ HtmlLinks.cc \
+ HtmlLinks.h \
+ HtmlOutputDev.cc \
+ HtmlOutputDev.h \
+ $(common)
+
+# Yay, automake! It should be able to figure out that it has to dist
+# pdftoppm.1, but nooo. So we just add it here.
+
+EXTRA_DIST = pdf2xml.dtd pdftoppm.1
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in
new file mode 100644
index 00000000000..99a282ba69d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/Makefile.in
@@ -0,0 +1,876 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = pdffonts$(EXEEXT) pdfimages$(EXEEXT) pdfinfo$(EXEEXT) \
+ pdftops$(EXEEXT) pdftotext$(EXEEXT) pdftohtml$(EXEEXT) \
+ $(am__EXEEXT_1) $(am__EXEEXT_2)
+subdir = utils
+DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libpng.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/poppler/poppler-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@BUILD_SPLASH_OUTPUT_TRUE@am__EXEEXT_1 = pdftoppm$(EXEEXT)
+@BUILD_ABIWORD_OUTPUT_TRUE@am__EXEEXT_2 = pdftoabw$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = parseargs.$(OBJEXT)
+am_pdffonts_OBJECTS = pdffonts.$(OBJEXT) $(am__objects_1)
+pdffonts_OBJECTS = $(am_pdffonts_OBJECTS)
+pdffonts_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+pdffonts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am_pdfimages_OBJECTS = pdfimages.$(OBJEXT) ImageOutputDev.$(OBJEXT) \
+ $(am__objects_1)
+pdfimages_OBJECTS = $(am_pdfimages_OBJECTS)
+pdfimages_LDADD = $(LDADD)
+pdfimages_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am_pdfinfo_OBJECTS = pdfinfo.$(OBJEXT) printencodings.$(OBJEXT) \
+ $(am__objects_1)
+pdfinfo_OBJECTS = $(am_pdfinfo_OBJECTS)
+pdfinfo_LDADD = $(LDADD)
+pdfinfo_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am__pdftoabw_SOURCES_DIST = pdftoabw.cc parseargs.c parseargs.h
+@BUILD_ABIWORD_OUTPUT_TRUE@am_pdftoabw_OBJECTS = pdftoabw.$(OBJEXT) \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__objects_1)
+pdftoabw_OBJECTS = $(am_pdftoabw_OBJECTS)
+am__DEPENDENCIES_2 = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_DEPENDENCIES = \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__DEPENDENCIES_2) \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(am__DEPENDENCIES_1)
+am_pdftohtml_OBJECTS = pdftohtml.$(OBJEXT) HtmlFonts.$(OBJEXT) \
+ HtmlLinks.$(OBJEXT) HtmlOutputDev.$(OBJEXT) $(am__objects_1)
+pdftohtml_OBJECTS = $(am_pdftohtml_OBJECTS)
+pdftohtml_LDADD = $(LDADD)
+pdftohtml_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am__pdftoppm_SOURCES_DIST = pdftoppm.cc parseargs.c parseargs.h
+@BUILD_SPLASH_OUTPUT_TRUE@am_pdftoppm_OBJECTS = pdftoppm.$(OBJEXT) \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(am__objects_1)
+pdftoppm_OBJECTS = $(am_pdftoppm_OBJECTS)
+pdftoppm_LDADD = $(LDADD)
+pdftoppm_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am_pdftops_OBJECTS = pdftops.$(OBJEXT) $(am__objects_1)
+pdftops_OBJECTS = $(am_pdftops_OBJECTS)
+pdftops_LDADD = $(LDADD)
+pdftops_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+am_pdftotext_OBJECTS = pdftotext.$(OBJEXT) printencodings.$(OBJEXT) \
+ $(am__objects_1)
+pdftotext_OBJECTS = $(am_pdftotext_OBJECTS)
+pdftotext_LDADD = $(LDADD)
+pdftotext_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \
+ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) $(pdfinfo_SOURCES) \
+ $(pdftoabw_SOURCES) $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) \
+ $(pdftops_SOURCES) $(pdftotext_SOURCES)
+DIST_SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) \
+ $(pdfinfo_SOURCES) $(am__pdftoabw_SOURCES_DIST) \
+ $(pdftohtml_SOURCES) $(am__pdftoppm_SOURCES_DIST) \
+ $(pdftops_SOURCES) $(pdftotext_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man1_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABIWORD_CFLAGS = @ABIWORD_CFLAGS@
+ABIWORD_LIBS = @ABIWORD_LIBS@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_FEATURE = @CAIRO_FEATURE@
+CAIRO_LIBS = @CAIRO_LIBS@
+CAIRO_REQ = @CAIRO_REQ@
+CAIRO_VERSION = @CAIRO_VERSION@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_CONFIG = @FREETYPE_CONFIG@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+GDK_CFLAGS = @GDK_CFLAGS@
+GDK_FEATURE = @GDK_FEATURE@
+GDK_LIBS = @GDK_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
+GTK_TEST_LIBS = @GTK_TEST_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG_LIBS = @LIBJPEG_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOCQT4 = @MOCQT4@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PC_REQUIRES = @PC_REQUIRES@
+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
+PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DATADIR = @POPPLER_DATADIR@
+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+auto_import_flags = @auto_import_flags@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+create_shared_lib = @create_shared_lib@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+win32_libs = @win32_libs@
+@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_SOURCES = \
+@BUILD_SPLASH_OUTPUT_TRUE@ pdftoppm.cc \
+@BUILD_SPLASH_OUTPUT_TRUE@ $(common)
+
+@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_binary = pdftoppm
+@BUILD_SPLASH_OUTPUT_TRUE@pdftoppm_manpage = pdftoppm.1
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/goo \
+ -I$(top_srcdir)/utils \
+ -I$(top_srcdir)/poppler \
+ $(UTILS_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
+ $(ABIWORD_CFLAGS)
+
+LDADD = \
+ $(top_builddir)/poppler/libpoppler.la \
+ $(UTILS_LIBS) \
+ $(FONTCONFIG_LIBS)
+
+@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_SOURCES = \
+@BUILD_ABIWORD_OUTPUT_TRUE@ pdftoabw.cc \
+@BUILD_ABIWORD_OUTPUT_TRUE@ $(common)
+
+@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_LDADD = $(LDADD) $(ABIWORD_LIBS)
+@BUILD_ABIWORD_OUTPUT_TRUE@pdftoabw_binary = pdftoabw
+AM_LDFLAGS = @auto_import_flags@
+dist_man1_MANS = \
+ pdffonts.1 \
+ pdfimages.1 \
+ pdfinfo.1 \
+ pdftops.1 \
+ pdftotext.1 \
+ pdftohtml.1 \
+ $(pdftoppm_manpage)
+
+common = parseargs.c parseargs.h
+pdffonts_SOURCES = \
+ pdffonts.cc \
+ $(common)
+
+pdfimages_SOURCES = \
+ pdfimages.cc \
+ ImageOutputDev.cc \
+ ImageOutputDev.h \
+ $(common)
+
+pdfinfo_SOURCES = \
+ pdfinfo.cc \
+ printencodings.cc \
+ printencodings.h \
+ $(common)
+
+pdftops_SOURCES = \
+ pdftops.cc \
+ $(common)
+
+pdftotext_SOURCES = \
+ pdftotext.cc \
+ printencodings.cc \
+ printencodings.h \
+ $(common)
+
+pdftohtml_SOURCES = \
+ pdftohtml.cc \
+ HtmlFonts.cc \
+ HtmlFonts.h \
+ HtmlLinks.cc \
+ HtmlLinks.h \
+ HtmlOutputDev.cc \
+ HtmlOutputDev.h \
+ $(common)
+
+
+# Yay, automake! It should be able to figure out that it has to dist
+# pdftoppm.1, but nooo. So we just add it here.
+EXTRA_DIST = pdf2xml.dtd pdftoppm.1
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign utils/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+pdffonts$(EXEEXT): $(pdffonts_OBJECTS) $(pdffonts_DEPENDENCIES)
+ @rm -f pdffonts$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdffonts_OBJECTS) $(pdffonts_LDADD) $(LIBS)
+pdfimages$(EXEEXT): $(pdfimages_OBJECTS) $(pdfimages_DEPENDENCIES)
+ @rm -f pdfimages$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdfimages_OBJECTS) $(pdfimages_LDADD) $(LIBS)
+pdfinfo$(EXEEXT): $(pdfinfo_OBJECTS) $(pdfinfo_DEPENDENCIES)
+ @rm -f pdfinfo$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdfinfo_OBJECTS) $(pdfinfo_LDADD) $(LIBS)
+pdftoabw$(EXEEXT): $(pdftoabw_OBJECTS) $(pdftoabw_DEPENDENCIES)
+ @rm -f pdftoabw$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdftoabw_OBJECTS) $(pdftoabw_LDADD) $(LIBS)
+pdftohtml$(EXEEXT): $(pdftohtml_OBJECTS) $(pdftohtml_DEPENDENCIES)
+ @rm -f pdftohtml$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdftohtml_OBJECTS) $(pdftohtml_LDADD) $(LIBS)
+pdftoppm$(EXEEXT): $(pdftoppm_OBJECTS) $(pdftoppm_DEPENDENCIES)
+ @rm -f pdftoppm$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdftoppm_OBJECTS) $(pdftoppm_LDADD) $(LIBS)
+pdftops$(EXEEXT): $(pdftops_OBJECTS) $(pdftops_DEPENDENCIES)
+ @rm -f pdftops$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdftops_OBJECTS) $(pdftops_LDADD) $(LIBS)
+pdftotext$(EXEEXT): $(pdftotext_OBJECTS) $(pdftotext_DEPENDENCIES)
+ @rm -f pdftotext$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(pdftotext_OBJECTS) $(pdftotext_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlFonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlLinks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlOutputDev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImageOutputDev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseargs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdffonts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfimages.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoabw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoppm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftotext.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printencodings.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-man \
+ uninstall-man1
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c
new file mode 100644
index 00000000000..8e84a9bd3b6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.c
@@ -0,0 +1,208 @@
+/*
+ * parseargs.h
+ *
+ * Command line argument parser.
+ *
+ * Copyright 1996-2003 Glyph & Cog, LLC
+ */
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// Poppler project changes to this file are under the GPLv2 or later license
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "parseargs.h"
+
+#include "goo/gstrtod.h"
+
+static const ArgDesc *findArg(const ArgDesc *args, char *arg);
+static GBool grabArg(const ArgDesc *arg, int i, int *argc, char *argv[]);
+
+GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]) {
+ const ArgDesc *arg;
+ int i, j;
+ GBool ok;
+
+ ok = gTrue;
+ i = 1;
+ while (i < *argc) {
+ if (!strcmp(argv[i], "--")) {
+ --*argc;
+ for (j = i; j < *argc; ++j)
+ argv[j] = argv[j+1];
+ break;
+ } else if ((arg = findArg(args, argv[i]))) {
+ if (!grabArg(arg, i, argc, argv))
+ ok = gFalse;
+ } else {
+ ++i;
+ }
+ }
+ return ok;
+}
+
+void printUsage(char *program, char *otherArgs, const ArgDesc *args) {
+ const ArgDesc *arg;
+ char *typ;
+ int w, w1;
+
+ w = 0;
+ for (arg = args; arg->arg; ++arg) {
+ if ((w1 = strlen(arg->arg)) > w)
+ w = w1;
+ }
+
+ fprintf(stderr, "Usage: %s [options]", program);
+ if (otherArgs)
+ fprintf(stderr, " %s", otherArgs);
+ fprintf(stderr, "\n");
+
+ for (arg = args; arg->arg; ++arg) {
+ fprintf(stderr, " %s", arg->arg);
+ w1 = 9 + w - strlen(arg->arg);
+ switch (arg->kind) {
+ case argInt:
+ case argIntDummy:
+ typ = " <int>";
+ break;
+ case argFP:
+ case argFPDummy:
+ typ = " <fp>";
+ break;
+ case argString:
+ case argStringDummy:
+ typ = " <string>";
+ break;
+ case argFlag:
+ case argFlagDummy:
+ default:
+ typ = "";
+ break;
+ }
+ fprintf(stderr, "%-*s", w1, typ);
+ if (arg->usage)
+ fprintf(stderr, ": %s", arg->usage);
+ fprintf(stderr, "\n");
+ }
+}
+
+static const ArgDesc *findArg(const ArgDesc *args, char *arg) {
+ const ArgDesc *p;
+
+ for (p = args; p->arg; ++p) {
+ if (p->kind < argFlagDummy && !strcmp(p->arg, arg))
+ return p;
+ }
+ return NULL;
+}
+
+static GBool grabArg(const ArgDesc *arg, int i, int *argc, char *argv[]) {
+ int n;
+ int j;
+ GBool ok;
+
+ ok = gTrue;
+ n = 0;
+ switch (arg->kind) {
+ case argFlag:
+ *(GBool *)arg->val = gTrue;
+ n = 1;
+ break;
+ case argInt:
+ if (i + 1 < *argc && isInt(argv[i+1])) {
+ *(int *)arg->val = atoi(argv[i+1]);
+ n = 2;
+ } else {
+ ok = gFalse;
+ n = 1;
+ }
+ break;
+ case argFP:
+ if (i + 1 < *argc && isFP(argv[i+1])) {
+ *(double *)arg->val = gatof(argv[i+1]);
+ n = 2;
+ } else {
+ ok = gFalse;
+ n = 1;
+ }
+ break;
+ case argString:
+ if (i + 1 < *argc) {
+ strncpy((char *)arg->val, argv[i+1], arg->size - 1);
+ ((char *)arg->val)[arg->size - 1] = '\0';
+ n = 2;
+ } else {
+ ok = gFalse;
+ n = 1;
+ }
+ break;
+ default:
+ fprintf(stderr, "Internal error in arg table\n");
+ n = 1;
+ break;
+ }
+ if (n > 0) {
+ *argc -= n;
+ for (j = i; j < *argc; ++j)
+ argv[j] = argv[j+n];
+ }
+ return ok;
+}
+
+GBool isInt(char *s) {
+ if (*s == '-' || *s == '+')
+ ++s;
+ while (isdigit(*s))
+ ++s;
+ if (*s)
+ return gFalse;
+ return gTrue;
+}
+
+GBool isFP(char *s) {
+ int n;
+
+ if (*s == '-' || *s == '+')
+ ++s;
+ n = 0;
+ while (isdigit(*s)) {
+ ++s;
+ ++n;
+ }
+ if (*s == '.')
+ ++s;
+ while (isdigit(*s)) {
+ ++s;
+ ++n;
+ }
+ if (n > 0 && (*s == 'e' || *s == 'E')) {
+ ++s;
+ if (*s == '-' || *s == '+')
+ ++s;
+ n = 0;
+ if (!isdigit(*s))
+ return gFalse;
+ do {
+ ++s;
+ } while (isdigit(*s));
+ }
+ if (*s)
+ return gFalse;
+ return gTrue;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h
new file mode 100644
index 00000000000..4418421783d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/parseargs.h
@@ -0,0 +1,85 @@
+/*
+ * parseargs.h
+ *
+ * Command line argument parser.
+ *
+ * Copyright 1996-2003 Glyph & Cog, LLC
+ */
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#ifndef PARSEARGS_H
+#define PARSEARGS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "goo/gtypes.h"
+
+/*
+ * Argument kinds.
+ */
+typedef enum {
+ argFlag, /* flag (present / not-present) */
+ /* [val: GBool *] */
+ argInt, /* integer arg */
+ /* [val: int *] */
+ argFP, /* floating point arg */
+ /* [val: double *] */
+ argString, /* string arg */
+ /* [val: char *] */
+ /* dummy entries -- these show up in the usage listing only; */
+ /* useful for X args, for example */
+ argFlagDummy,
+ argIntDummy,
+ argFPDummy,
+ argStringDummy
+} ArgKind;
+
+/*
+ * Argument descriptor.
+ */
+typedef struct {
+ char *arg; /* the command line switch */
+ ArgKind kind; /* kind of arg */
+ void *val; /* place to store value */
+ int size; /* for argString: size of string */
+ char *usage; /* usage string */
+} ArgDesc;
+
+/*
+ * Parse command line. Removes all args which are found in the arg
+ * descriptor list <args>. Stops parsing if "--" is found (and removes
+ * it). Returns gFalse if there was an error.
+ */
+extern GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]);
+
+/*
+ * Print usage message, based on arg descriptor list.
+ */
+extern void printUsage(char *program, char *otherArgs, const ArgDesc *args);
+
+/*
+ * Check if a string is a valid integer or floating point number.
+ */
+extern GBool isInt(char *s);
+extern GBool isFP(char *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd b/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd
new file mode 100644
index 00000000000..1afa4fe9aa0
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdf2xml.dtd
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!ELEMENT pdf2xml (page+)>
+<!ELEMENT page (fontspec*, text*)>
+<!ATTLIST page
+ number CDATA #REQUIRED
+ position CDATA #REQUIRED
+ top CDATA #REQUIRED
+ left CDATA #REQUIRED
+ height CDATA #REQUIRED
+ width CDATA #REQUIRED
+>
+<!ELEMENT fontspec EMPTY>
+<!ATTLIST fontspec
+ id CDATA #REQUIRED
+ size CDATA #REQUIRED
+ family CDATA #REQUIRED
+ color CDATA #REQUIRED
+>
+<!ELEMENT text (#PCDATA | b | i)*>
+<!ATTLIST text
+ top CDATA #REQUIRED
+ left CDATA #REQUIRED
+ width CDATA #REQUIRED
+ height CDATA #REQUIRED
+ font CDATA #REQUIRED
+>
+<!ELEMENT b (#PCDATA)>
+<!ELEMENT i (#PCDATA)>
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1
new file mode 100644
index 00000000000..fd7386c4ae2
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.1
@@ -0,0 +1,110 @@
+.\" Copyright 1999-2004 Glyph & Cog, LLC
+.TH pdffonts 1 "22 January 2004"
+.SH NAME
+pdffonts \- Portable Document Format (PDF) font analyzer (version
+3.00)
+.SH SYNOPSIS
+.B pdffonts
+[options]
+.RI [ PDF-file ]
+.SH DESCRIPTION
+.B Pdffonts
+lists the fonts used in a Portable Document Format (PDF) file along
+with various information for each font.
+.PP
+The following information is listed for each font:
+.TP
+.B name
+the font name, exactly as given in the PDF file (potentially including
+a subset prefix)
+.TP
+.B type
+the font type -- see below for details
+.TP
+.B emb
+"yes" if the font is embedded in the PDF file
+.TP
+.B sub
+"yes" if the font is a subset
+.TP
+.B uni
+"yes" if there is an explicit "ToUnicode" map in the PDF file (the
+absence of a ToUnicode map doesn't necessarily mean that the text
+can't be converted to Unicode)
+.TP
+.B object ID
+the font dictionary object ID (number and generation)
+.PP
+PDF files can contain the following types of fonts:
+.PP
+.RS
+Type 1
+.RE
+.RS
+Type 1C -- aka Compact Font Format (CFF)
+.RE
+.RS
+Type 3
+.RE
+.RS
+TrueType
+.RE
+.RS
+CID Type 0 -- 16-bit font with no specified type
+.RE
+.RS
+CID Type 0C -- 16-bit PostScript CFF font
+.RE
+.RS
+CID TrueType -- 16-bit TrueType font
+.RE
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to analyze.
+.TP
+.BI \-l " number"
+Specifies the last page to analyze.
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdffonts software and documentation are copyright 1996-2004 Glyph
+& Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftops (1),
+.BR pdftotext (1),
+.BR pdfinfo (1),
+.BR pdftoppm (1),
+.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc
new file mode 100644
index 00000000000..752fa15ea42
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdffonts.cc
@@ -0,0 +1,320 @@
+//========================================================================
+//
+// pdffonts.cc
+//
+// Copyright 2001-2007 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <math.h>
+#include "parseargs.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "Object.h"
+#include "Dict.h"
+#include "GfxFont.h"
+#include "Annot.h"
+#include "PDFDoc.h"
+
+static char *fontTypeNames[] = {
+ "unknown",
+ "Type 1",
+ "Type 1C",
+ "Type 1C (OT)",
+ "Type 3",
+ "TrueType",
+ "TrueType (OT)",
+ "CID Type 0",
+ "CID Type 0C",
+ "CID Type 0C (OT)",
+ "CID TrueType",
+ "CID TrueType (OT)"
+};
+
+static void scanFonts(Dict *resDict, PDFDoc *doc);
+static void scanFont(GfxFont *font, PDFDoc *doc);
+
+static int firstPage = 1;
+static int lastPage = 0;
+static char ownerPassword[33] = "\001";
+static char userPassword[33] = "\001";
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to examine"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to examine"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+static Ref *fonts;
+static int fontsLen;
+static int fontsSize;
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName;
+ GooString *ownerPW, *userPW;
+ GBool ok;
+ Page *page;
+ Dict *resDict;
+ Annots *annots;
+ Object obj1, obj2;
+ int pg, i;
+ int exitCode;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 2 || printVersion || printHelp) {
+ fprintf(stderr, "pdffonts version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdffonts", "<PDF-file>", argDesc);
+ }
+ goto err0;
+ }
+ fileName = new GooString(argv[1]);
+
+ // read config file
+ globalParams = new GlobalParams();
+
+ // open PDF file
+ if (ownerPassword[0] != '\001') {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0] != '\001') {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+
+ if(fileName->cmp("-") != 0) {
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ } else {
+ Object obj;
+
+ obj.initNull();
+ doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+ }
+
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err1;
+ }
+
+ // get page range
+ if (firstPage < 1) {
+ firstPage = 1;
+ }
+ if (lastPage < 1 || lastPage > doc->getNumPages()) {
+ lastPage = doc->getNumPages();
+ }
+
+ // scan the fonts
+ printf("name type emb sub uni object ID\n");
+ printf("------------------------------------ ----------------- --- --- --- ---------\n");
+ fonts = NULL;
+ fontsLen = fontsSize = 0;
+ for (pg = firstPage; pg <= lastPage; ++pg) {
+ page = doc->getCatalog()->getPage(pg);
+ if ((resDict = page->getResourceDict())) {
+ scanFonts(resDict, doc);
+ }
+ annots = new Annots(doc->getXRef(),
+ doc->getCatalog(),
+ page->getAnnots(&obj1));
+ obj1.free();
+ for (i = 0; i < annots->getNumAnnots(); ++i) {
+ if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
+ obj1.streamGetDict()->lookup("Resources", &obj2);
+ if (obj2.isDict()) {
+ scanFonts(obj2.getDict(), doc);
+ }
+ obj2.free();
+ }
+ obj1.free();
+ }
+ delete annots;
+ }
+
+ exitCode = 0;
+
+ // clean up
+ gfree(fonts);
+ err1:
+ delete doc;
+ delete globalParams;
+ err0:
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
+
+static void scanFonts(Dict *resDict, PDFDoc *doc) {
+ Object obj1, obj2, xObjDict, xObj, resObj;
+ Ref r;
+ GfxFontDict *gfxFontDict;
+ GfxFont *font;
+ int i;
+
+ // scan the fonts in this resource dictionary
+ gfxFontDict = NULL;
+ resDict->lookupNF("Font", &obj1);
+ if (obj1.isRef()) {
+ obj1.fetch(doc->getXRef(), &obj2);
+ if (obj2.isDict()) {
+ r = obj1.getRef();
+ gfxFontDict = new GfxFontDict(doc->getXRef(), &r, obj2.getDict());
+ }
+ obj2.free();
+ } else if (obj1.isDict()) {
+ gfxFontDict = new GfxFontDict(doc->getXRef(), NULL, obj1.getDict());
+ }
+ if (gfxFontDict) {
+ for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
+ if ((font = gfxFontDict->getFont(i))) {
+ scanFont(font, doc);
+ }
+ }
+ delete gfxFontDict;
+ }
+ obj1.free();
+
+ // recursively scan any resource dictionaries in objects in this
+ // resource dictionary
+ resDict->lookup("XObject", &xObjDict);
+ if (xObjDict.isDict()) {
+ for (i = 0; i < xObjDict.dictGetLength(); ++i) {
+ xObjDict.dictGetVal(i, &xObj);
+ if (xObj.isStream()) {
+ xObj.streamGetDict()->lookup("Resources", &resObj);
+ if (resObj.isDict()) {
+ scanFonts(resObj.getDict(), doc);
+ }
+ resObj.free();
+ }
+ xObj.free();
+ }
+ }
+ xObjDict.free();
+}
+
+static void scanFont(GfxFont *font, PDFDoc *doc) {
+ Ref fontRef, embRef;
+ Object fontObj, toUnicodeObj;
+ GooString *name;
+ GBool emb, subset, hasToUnicode;
+ int i;
+
+ fontRef = *font->getID();
+
+ // check for an already-seen font
+ for (i = 0; i < fontsLen; ++i) {
+ if (fontRef.num == fonts[i].num && fontRef.gen == fonts[i].gen) {
+ return;
+ }
+ }
+
+ // font name
+ name = font->getOrigName();
+
+ // check for an embedded font
+ if (font->getType() == fontType3) {
+ emb = gTrue;
+ } else {
+ emb = font->getEmbeddedFontID(&embRef);
+ }
+
+ // look for a ToUnicode map
+ hasToUnicode = gFalse;
+ if (doc->getXRef()->fetch(fontRef.num, fontRef.gen, &fontObj)->isDict()) {
+ hasToUnicode = fontObj.dictLookup("ToUnicode", &toUnicodeObj)->isStream();
+ toUnicodeObj.free();
+ }
+ fontObj.free();
+
+ // check for a font subset name: capital letters followed by a '+'
+ // sign
+ subset = gFalse;
+ if (name) {
+ for (i = 0; i < name->getLength(); ++i) {
+ if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') {
+ break;
+ }
+ }
+ subset = i > 0 && i < name->getLength() && name->getChar(i) == '+';
+ }
+
+ // print the font info
+ printf("%-36s %-17s %-3s %-3s %-3s",
+ name ? name->getCString() : "[none]",
+ fontTypeNames[font->getType()],
+ emb ? "yes" : "no",
+ subset ? "yes" : "no",
+ hasToUnicode ? "yes" : "no");
+ if (fontRef.gen >= 100000) {
+ printf(" [none]\n");
+ } else {
+ printf(" %6d %2d\n", fontRef.num, fontRef.gen);
+ }
+
+ // add this font to the list
+ if (fontsLen == fontsSize) {
+ fontsSize += 32;
+ fonts = (Ref *)grealloc(fonts, fontsSize * sizeof(Ref));
+ }
+ fonts[fontsLen++] = *font->getID();
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1
new file mode 100644
index 00000000000..ff31d850499
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.1
@@ -0,0 +1,82 @@
+.\" Copyright 1998-2004 Glyph & Cog, LLC
+.TH pdfimages 1 "22 January 2004"
+.SH NAME
+pdfimages \- Portable Document Format (PDF) image extractor
+(version 3.00)
+.SH SYNOPSIS
+.B pdfimages
+[options]
+.I PDF-file image-root
+.SH DESCRIPTION
+.B Pdfimages
+saves images from a Portable Document Format (PDF) file as Portable
+Pixmap (PPM), Portable Bitmap (PBM), or JPEG files.
+.PP
+Pdfimages reads the PDF file
+.IR PDF-file ,
+scans one or more pages, and writes one PPM, PBM, or JPEG file for each image,
+.IR image-root - nnn . xxx ,
+where
+.I nnn
+is the image number and
+.I xxx
+is the image type (.ppm, .pbm, .jpg).
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to scan.
+.TP
+.BI \-l " number"
+Specifies the last page to scan.
+.TP
+.B \-j
+Normally, all images are written as PBM (for monochrome images) or PPM
+(for non-monochrome images) files. With this option, images in DCT
+format are saved as JPEG files. All non-DCT images are saved in
+PBM/PPM format as usual.
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-q
+Don't print any messages or errors.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdfimages software and documentation are copyright 1998-2004 Glyph
+& Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftops (1),
+.BR pdftotext (1),
+.BR pdfinfo (1),
+.BR pdffonts (1),
+.BR pdftoppm (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc
new file mode 100644
index 00000000000..b821c799205
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfimages.cc
@@ -0,0 +1,171 @@
+//========================================================================
+//
+// pdfimages.cc
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include "parseargs.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "ImageOutputDev.h"
+#include "Error.h"
+
+static int firstPage = 1;
+static int lastPage = 0;
+static GBool dumpJPEG = gFalse;
+static char ownerPassword[33] = "\001";
+static char userPassword[33] = "\001";
+static GBool quiet = gFalse;
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to convert"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to convert"},
+ {"-j", argFlag, &dumpJPEG, 0,
+ "write JPEG images as JPEG files"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-q", argFlag, &quiet, 0,
+ "don't print any messages or errors"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName;
+ char *imgRoot;
+ GooString *ownerPW, *userPW;
+ ImageOutputDev *imgOut;
+ GBool ok;
+ int exitCode;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 3 || printVersion || printHelp) {
+ fprintf(stderr, "pdfimages version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdfimages", "<PDF-file> <image-root>", argDesc);
+ }
+ goto err0;
+ }
+ fileName = new GooString(argv[1]);
+ imgRoot = argv[2];
+
+ // read config file
+ globalParams = new GlobalParams();
+ if (quiet) {
+ globalParams->setErrQuiet(quiet);
+ }
+
+ // open PDF file
+ if (ownerPassword[0] != '\001') {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0] != '\001') {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err1;
+ }
+
+ // check for copy permission
+#ifdef ENFORCE_PERMISSIONS
+ if (!doc->okToCopy()) {
+ error(-1, "Copying of images from this document is not allowed.");
+ exitCode = 3;
+ goto err1;
+ }
+#endif
+
+ // get page range
+ if (firstPage < 1)
+ firstPage = 1;
+ if (lastPage < 1 || lastPage > doc->getNumPages())
+ lastPage = doc->getNumPages();
+
+ // write image files
+ imgOut = new ImageOutputDev(imgRoot, dumpJPEG);
+ if (imgOut->isOk()) {
+ doc->displayPages(imgOut, firstPage, lastPage, 72, 72, 0,
+ gTrue, gFalse, gFalse);
+ }
+ delete imgOut;
+
+ exitCode = 0;
+
+ // clean up
+ err1:
+ delete doc;
+ delete globalParams;
+ err0:
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1
new file mode 100644
index 00000000000..1f5528a9bb9
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.1
@@ -0,0 +1,137 @@
+.\" Copyright 1999-2004 Glyph & Cog, LLC
+.TH pdfinfo 1 "22 January 2004"
+.SH NAME
+pdfinfo \- Portable Document Format (PDF) document information
+extractor (version 3.00)
+.SH SYNOPSIS
+.B pdfinfo
+[options]
+.RI [ PDF-file ]
+.SH DESCRIPTION
+.B Pdfinfo
+prints the contents of the \'Info' dictionary (plus some other useful
+information) from a Portable Document Format (PDF) file.
+.PP
+The \'Info' dictionary contains the following values:
+.PP
+.RS
+title
+.RE
+.RS
+subject
+.RE
+.RS
+keywords
+.RE
+.RS
+author
+.RE
+.RS
+creator
+.RE
+.RS
+producer
+.RE
+.RS
+creation date
+.RE
+.RS
+modification date
+.RE
+.PP
+In addition, the following information is printed:
+.PP
+.RS
+tagged (yes/no)
+.RE
+.RS
+page count
+.RE
+.RS
+encrypted flag (yes/no)
+.RE
+.RS
+print and copy permissions (if encrypted)
+.RE
+.RS
+page size
+.RE
+.RS
+file size
+.RE
+.RS
+linearized (yes/no)
+.RE
+.RS
+PDF version
+.RE
+.RS
+metadata (only if requested)
+.RE
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to examine. If multiple pages are requested
+using the "\-f" and "\-l" options, the size of each requested page (and,
+optionally, the bounding boxes for each requested page) are printed.
+Otherwise, only page one is examined.
+.TP
+.BI \-l " number"
+Specifies the last page to examine.
+.TP
+.B \-box
+Prints the page box bounding boxes: MediaBox, CropBox, BleedBox,
+TrimBox, and ArtBox.
+.TP
+.B \-meta
+Prints document-level metadata. (This is the "Metadata" stream from
+the PDF file's Catalog object.)
+.TP
+.BI \-enc " encoding-name"
+Sets the encoding to use for text output. This defaults to "UTF-8".
+.TP
+.B \-listenc
+Lits the available encodings
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdfinfo software and documentation are copyright 1996-2004 Glyph &
+Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftops (1),
+.BR pdftotext (1),
+.BR pdffonts (1),
+.BR pdftoppm (1),
+.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc
new file mode 100644
index 00000000000..bfbe0b3d985
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdfinfo.cc
@@ -0,0 +1,410 @@
+//========================================================================
+//
+// pdfinfo.cc
+//
+// Copyright 1998-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Dom Lachowicz <cinamod@hotmail.com>
+// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <time.h>
+#include <math.h>
+#include "parseargs.h"
+#include "printencodings.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "CharTypes.h"
+#include "UnicodeMap.h"
+#include "PDFDocEncoding.h"
+#include "Error.h"
+#include "DateInfo.h"
+
+static void printInfoString(Dict *infoDict, char *key, char *text,
+ UnicodeMap *uMap);
+static void printInfoDate(Dict *infoDict, char *key, char *text);
+static void printBox(char *text, PDFRectangle *box);
+
+static int firstPage = 1;
+static int lastPage = 0;
+static GBool printBoxes = gFalse;
+static GBool printMetadata = gFalse;
+static char textEncName[128] = "";
+static char ownerPassword[33] = "\001";
+static char userPassword[33] = "\001";
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+static GBool printEnc = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to convert"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to convert"},
+ {"-box", argFlag, &printBoxes, 0,
+ "print the page bounding boxes"},
+ {"-meta", argFlag, &printMetadata, 0,
+ "print the document metadata (XML)"},
+ {"-enc", argString, textEncName, sizeof(textEncName),
+ "output text encoding name"},
+ {"-listenc",argFlag, &printEnc, 0,
+ "list available encodings"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName;
+ GooString *ownerPW, *userPW;
+ UnicodeMap *uMap;
+ Page *page;
+ Object info;
+ char buf[256];
+ double w, h, wISO, hISO;
+ FILE *f;
+ GooString *metadata;
+ GBool ok;
+ int exitCode;
+ int pg, i;
+ GBool multiPage;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || (argc != 2 && !printEnc) || printVersion || printHelp) {
+ fprintf(stderr, "pdfinfo version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdfinfo", "<PDF-file>", argDesc);
+ }
+ goto err0;
+ }
+
+ // read config file
+ globalParams = new GlobalParams();
+
+ if (printEnc) {
+ printEncodings();
+ delete globalParams;
+ goto err0;
+ }
+
+ fileName = new GooString(argv[1]);
+
+ if (textEncName[0]) {
+ globalParams->setTextEncoding(textEncName);
+ }
+
+ // get mapping to output encoding
+ if (!(uMap = globalParams->getTextEncoding())) {
+ error(-1, "Couldn't get text encoding");
+ delete fileName;
+ goto err1;
+ }
+
+ // open PDF file
+ if (ownerPassword[0] != '\001') {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0] != '\001') {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+
+ if(fileName->cmp("-") != 0) {
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ } else {
+ Object obj;
+
+ obj.initNull();
+ doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+ }
+
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err2;
+ }
+
+ // get page range
+ if (firstPage < 1) {
+ firstPage = 1;
+ }
+ if (lastPage == 0) {
+ multiPage = gFalse;
+ lastPage = 1;
+ } else {
+ multiPage = gTrue;
+ }
+ if (lastPage < 1 || lastPage > doc->getNumPages()) {
+ lastPage = doc->getNumPages();
+ }
+
+ // print doc info
+ doc->getDocInfo(&info);
+ if (info.isDict()) {
+ printInfoString(info.getDict(), "Title", "Title: ", uMap);
+ printInfoString(info.getDict(), "Subject", "Subject: ", uMap);
+ printInfoString(info.getDict(), "Keywords", "Keywords: ", uMap);
+ printInfoString(info.getDict(), "Author", "Author: ", uMap);
+ printInfoString(info.getDict(), "Creator", "Creator: ", uMap);
+ printInfoString(info.getDict(), "Producer", "Producer: ", uMap);
+ printInfoDate(info.getDict(), "CreationDate", "CreationDate: ");
+ printInfoDate(info.getDict(), "ModDate", "ModDate: ");
+ }
+ info.free();
+
+ // print tagging info
+ printf("Tagged: %s\n",
+ doc->getStructTreeRoot()->isDict() ? "yes" : "no");
+
+ // print page count
+ printf("Pages: %d\n", doc->getNumPages());
+
+ // print encryption info
+ printf("Encrypted: ");
+ if (doc->isEncrypted()) {
+ printf("yes (print:%s copy:%s change:%s addNotes:%s)\n",
+ doc->okToPrint(gTrue) ? "yes" : "no",
+ doc->okToCopy(gTrue) ? "yes" : "no",
+ doc->okToChange(gTrue) ? "yes" : "no",
+ doc->okToAddNotes(gTrue) ? "yes" : "no");
+ } else {
+ printf("no\n");
+ }
+
+ // print page size
+ for (pg = firstPage; pg <= lastPage; ++pg) {
+ w = doc->getPageCropWidth(pg);
+ h = doc->getPageCropHeight(pg);
+ if (multiPage) {
+ printf("Page %4d size: %g x %g pts", pg, w, h);
+ } else {
+ printf("Page size: %g x %g pts", w, h);
+ }
+ if ((fabs(w - 612) < 0.1 && fabs(h - 792) < 0.1) ||
+ (fabs(w - 792) < 0.1 && fabs(h - 612) < 0.1)) {
+ printf(" (letter)");
+ } else {
+ hISO = sqrt(sqrt(2.0)) * 7200 / 2.54;
+ wISO = hISO / sqrt(2.0);
+ for (i = 0; i <= 6; ++i) {
+ if ((fabs(w - wISO) < 1 && fabs(h - hISO) < 1) ||
+ (fabs(w - hISO) < 1 && fabs(h - wISO) < 1)) {
+ printf(" (A%d)", i);
+ break;
+ }
+ hISO = wISO;
+ wISO /= sqrt(2.0);
+ }
+ }
+ printf("\n");
+ }
+
+ // print the boxes
+ if (printBoxes) {
+ if (multiPage) {
+ for (pg = firstPage; pg <= lastPage; ++pg) {
+ page = doc->getCatalog()->getPage(pg);
+ sprintf(buf, "Page %4d MediaBox: ", pg);
+ printBox(buf, page->getMediaBox());
+ sprintf(buf, "Page %4d CropBox: ", pg);
+ printBox(buf, page->getCropBox());
+ sprintf(buf, "Page %4d BleedBox: ", pg);
+ printBox(buf, page->getBleedBox());
+ sprintf(buf, "Page %4d TrimBox: ", pg);
+ printBox(buf, page->getTrimBox());
+ sprintf(buf, "Page %4d ArtBox: ", pg);
+ printBox(buf, page->getArtBox());
+ }
+ } else {
+ page = doc->getCatalog()->getPage(firstPage);
+ printBox("MediaBox: ", page->getMediaBox());
+ printBox("CropBox: ", page->getCropBox());
+ printBox("BleedBox: ", page->getBleedBox());
+ printBox("TrimBox: ", page->getTrimBox());
+ printBox("ArtBox: ", page->getArtBox());
+ }
+ }
+
+ // print file size
+#ifdef VMS
+ f = fopen(fileName->getCString(), "rb", "ctx=stm");
+#else
+ f = fopen(fileName->getCString(), "rb");
+#endif
+ if (f) {
+#if HAVE_FSEEKO
+ fseeko(f, 0, SEEK_END);
+ printf("File size: %u bytes\n", (Guint)ftello(f));
+#elif HAVE_FSEEK64
+ fseek64(f, 0, SEEK_END);
+ printf("File size: %u bytes\n", (Guint)ftell64(f));
+#else
+ fseek(f, 0, SEEK_END);
+ printf("File size: %d bytes\n", (int)ftell(f));
+#endif
+ fclose(f);
+ }
+
+ // print linearization info
+ printf("Optimized: %s\n", doc->isLinearized() ? "yes" : "no");
+
+ // print PDF version
+ printf("PDF version: %d.%d\n", doc->getPDFMajorVersion(), doc->getPDFMinorVersion());
+
+ // print the metadata
+ if (printMetadata && (metadata = doc->readMetadata())) {
+ fputs("Metadata:\n", stdout);
+ fputs(metadata->getCString(), stdout);
+ fputc('\n', stdout);
+ delete metadata;
+ }
+
+ exitCode = 0;
+
+ // clean up
+ err2:
+ uMap->decRefCnt();
+ delete doc;
+ err1:
+ delete globalParams;
+ err0:
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
+
+static void printInfoString(Dict *infoDict, char *key, char *text,
+ UnicodeMap *uMap) {
+ Object obj;
+ GooString *s1;
+ GBool isUnicode;
+ Unicode u;
+ char buf[8];
+ int i, n;
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ fputs(text, stdout);
+ s1 = obj.getString();
+ if ((s1->getChar(0) & 0xff) == 0xfe &&
+ (s1->getChar(1) & 0xff) == 0xff) {
+ isUnicode = gTrue;
+ i = 2;
+ } else {
+ isUnicode = gFalse;
+ i = 0;
+ }
+ while (i < obj.getString()->getLength()) {
+ if (isUnicode) {
+ u = ((s1->getChar(i) & 0xff) << 8) |
+ (s1->getChar(i+1) & 0xff);
+ i += 2;
+ } else {
+ u = pdfDocEncoding[s1->getChar(i) & 0xff];
+ ++i;
+ }
+ n = uMap->mapUnicode(u, buf, sizeof(buf));
+ fwrite(buf, 1, n, stdout);
+ }
+ fputc('\n', stdout);
+ }
+ obj.free();
+}
+
+static void printInfoDate(Dict *infoDict, char *key, char *text) {
+ Object obj;
+ char *s;
+ int year, mon, day, hour, min, sec, tz_hour, tz_minute;
+ char tz;
+ struct tm tmStruct;
+ char buf[256];
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ fputs(text, stdout);
+ s = obj.getString()->getCString();
+ // TODO do something with the timezone info
+ if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) {
+ tmStruct.tm_year = year - 1900;
+ tmStruct.tm_mon = mon - 1;
+ tmStruct.tm_mday = day;
+ tmStruct.tm_hour = hour;
+ tmStruct.tm_min = min;
+ tmStruct.tm_sec = sec;
+ tmStruct.tm_wday = -1;
+ tmStruct.tm_yday = -1;
+ tmStruct.tm_isdst = -1;
+ // compute the tm_wday and tm_yday fields
+ if (mktime(&tmStruct) != (time_t)-1 &&
+ strftime(buf, sizeof(buf), "%c", &tmStruct)) {
+ fputs(buf, stdout);
+ } else {
+ fputs(s, stdout);
+ }
+ } else {
+ fputs(s, stdout);
+ }
+ fputc('\n', stdout);
+ }
+ obj.free();
+}
+
+static void printBox(char *text, PDFRectangle *box) {
+ printf("%s%8.2f %8.2f %8.2f %8.2f\n",
+ text, box->x1, box->y1, box->x2, box->y2);
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc
new file mode 100644
index 00000000000..9c71c766e32
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoabw.cc
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) 2007 Jauco Noordzij <jauco@jauco.nl>
+ * Copyright (C) 2007 Dominic Lachowicz <cinamod@hotmail.com>
+ * Copyright (C) 2007 Kouhei Sutou <kou@cozmixng.org>
+ * Copyright (C) 2009 Jakub Wilk <ubanus@users.sf.net>
+ * Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#include <time.h>
+#include "parseargs.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "ABWOutputDev.h"
+#include "PSOutputDev.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "goo/gfile.h"
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+static int firstPage = 1;
+static int lastPage = 0;
+static GBool quiet = gFalse;
+static GBool printHelp = gFalse;
+static GBool printVersion = gFalse;
+static GBool stout = gFalse;
+static char ownerPassword[33] = "";
+static char userPassword[33] = "";
+
+// static char textEncName[128] = "";
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to convert"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to convert"},
+ {"--stdout" ,argFlag, &stout, 0,
+ "use standard output"},
+ {"--opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"--upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-q", argFlag, &quiet, 0,
+ "don't print any messages or errors"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ GBool ok;
+ PDFDoc *doc = NULL;
+ GooString *fileName = NULL;
+// GooString *abwFileName = NULL;
+ ABWOutputDev *abwOut = NULL;
+// GBool ok;
+ GooString *ownerPW, *userPW;
+ Object info;
+
+ int result = 1;
+
+ char * outpName;
+ xmlDocPtr XMLdoc = NULL;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
+ fprintf(stderr, "pdftoabw version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdftoabw", "<PDF-file> [abw-file]", argDesc);
+ }
+ goto err0;
+ }
+ globalParams = new GlobalParams();
+ if (quiet) {
+ globalParams->setErrQuiet(quiet);
+ }
+
+ fileName = new GooString(argv[1]);
+ if (stout || (argc < 3)){
+ outpName = "-";
+ }
+ else {
+ outpName = argv[2];
+ }
+
+ if (ownerPassword[0]) {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0]) {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+
+ if (!doc || !doc->isOk())
+ {
+ fprintf (stderr, "Error opening PDF %s\n", fileName->getCString());
+ goto error;
+ }
+
+ // check for copy permission
+ if (!doc->okToCopy()) {
+ fprintf(stderr, "Copying of text from this document is not allowed.\n");
+ goto error;
+ }
+
+ XMLdoc = xmlNewDoc(BAD_CAST "1.0");
+ abwOut = new ABWOutputDev(XMLdoc);
+ abwOut->setPDFDoc(doc);
+
+ if (lastPage == 0 || lastPage > doc->getNumPages ()) lastPage = doc->getNumPages();
+ if (firstPage < 1) firstPage = 1;
+
+ if (abwOut->isOk())
+ {
+ doc->displayPages(abwOut, firstPage, lastPage, 72, 72, 0, gTrue, gFalse, gFalse);
+ abwOut->createABW();
+ }
+
+ if (xmlSaveFormatFileEnc(outpName, XMLdoc, "UTF-8", 1) == -1)
+ {
+ fprintf (stderr, "Error saving to %s\n", outpName);
+ goto error;
+ }
+
+ result = 0;
+
+ error:
+ // clean up
+ if(globalParams) delete globalParams;
+ if(doc) delete doc;
+ if(XMLdoc) xmlFreeDoc(XMLdoc);
+ if(abwOut) delete abwOut;
+ err0:
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return result;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1
new file mode 100644
index 00000000000..850aa840cae
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.1
@@ -0,0 +1,85 @@
+.TH PDFTOHTML 1
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+pdftohtml \- program to convert pdf files into html, xml and png images
+.SH SYNOPSIS
+.B pdftohtml
+.I "[options] <PDF-file> [<html-file> <xml-file>]"
+.SH "DESCRIPTION"
+This manual page documents briefly the
+.BR pdftohtml
+command.
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+.PP
+.B pdftohtml
+is a program that converts pdf documents into html. It generates its output in
+the current working directory.
+.SH OPTIONS
+A summary of options are included below.
+.TP
+.B \-h, \-help
+Show summary of options.
+.TP
+.B \-f <int>
+first page to print
+.TP
+.B \-l <int>
+last page to print
+.TP
+.B \-q
+dont print any messages or errors
+.TP
+.B \-v
+print copyright and version info
+.TP
+.B \-p
+exchange .pdf links with .html
+.TP
+.B \-c
+generate complex output
+.TP
+.B \-i
+ignore images
+.TP
+.B \-noframes
+generate no frames. Not supported in complex output mode.
+.TP
+.B \-stdout
+use standard output
+.TP
+.B \-zoom <fp>
+zoom the pdf document (default 1.5)
+.TP
+.B \-xml
+output for XML post-processing
+.TP
+.B \-enc <string>
+output text encoding name
+.TP
+.B \-opw <string>
+owner password (for encrypted files)
+.TP
+.B \-upw <string>
+user password (for encrypted files)
+.TP
+.B \-hidden
+force hidden text extraction
+.TP
+.B \-dev
+output device name for Ghostscript (png16m, jpeg etc)
+.TP
+.B \-nomerge
+do not merge paragraphs
+.TP
+.B \-nodrm
+override document DRM settings
+
+.SH AUTHOR
+
+Pdftohtml was developed by Gueorgui Ovtcharov and Rainer Dorsch. It is
+based and benefits a lot from Derek Noonburg's xpdf package.
+
+This manual page was written by Søren Boll Overgaard <boll@debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc
new file mode 100644
index 00000000000..41312de2fdd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftohtml.cc
@@ -0,0 +1,442 @@
+//========================================================================
+//
+// pdftohtml.cc
+//
+//
+// Copyright 1999-2000 G. Ovtcharov
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#include <time.h>
+#include "parseargs.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "HtmlOutputDev.h"
+#include "PSOutputDev.h"
+#include "GlobalParams.h"
+#include "Error.h"
+#include "DateInfo.h"
+#include "goo/gfile.h"
+
+#ifndef GHOSTSCRIPT
+# define GHOSTSCRIPT "gs"
+#endif
+
+static int firstPage = 1;
+static int lastPage = 0;
+static GBool rawOrder = gTrue;
+GBool printCommands = gTrue;
+static GBool printHelp = gFalse;
+GBool printHtml = gFalse;
+GBool complexMode=gFalse;
+GBool ignore=gFalse;
+//char extension[5]=".png";
+double scale=1.5;
+GBool noframes=gFalse;
+GBool stout=gFalse;
+GBool xml=gFalse;
+static GBool errQuiet=gFalse;
+static GBool noDrm=gFalse;
+
+GBool showHidden = gFalse;
+GBool noMerge = gFalse;
+static char ownerPassword[33] = "";
+static char userPassword[33] = "";
+static char gsDevice[33] = "png16m";
+static GBool printVersion = gFalse;
+
+static GooString* getInfoString(Dict *infoDict, char *key);
+static GooString* getInfoDate(Dict *infoDict, char *key);
+
+static char textEncName[128] = "";
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to convert"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to convert"},
+ /*{"-raw", argFlag, &rawOrder, 0,
+ "keep strings in content stream order"},*/
+ {"-q", argFlag, &errQuiet, 0,
+ "don't print any messages or errors"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-p", argFlag, &printHtml, 0,
+ "exchange .pdf links by .html"},
+ {"-c", argFlag, &complexMode, 0,
+ "generate complex document"},
+ {"-i", argFlag, &ignore, 0,
+ "ignore images"},
+ {"-noframes", argFlag, &noframes, 0,
+ "generate no frames"},
+ {"-stdout" ,argFlag, &stout, 0,
+ "use standard output"},
+ {"-zoom", argFP, &scale, 0,
+ "zoom the pdf document (default 1.5)"},
+ {"-xml", argFlag, &xml, 0,
+ "output for XML post-processing"},
+ {"-hidden", argFlag, &showHidden, 0,
+ "output hidden text"},
+ {"-nomerge", argFlag, &noMerge, 0,
+ "do not merge paragraphs"},
+ {"-enc", argString, textEncName, sizeof(textEncName),
+ "output text encoding name"},
+ {"-dev", argString, gsDevice, sizeof(gsDevice),
+ "output device name for Ghostscript (png16m, jpeg etc)"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-nodrm", argFlag, &noDrm, 0,
+ "override document DRM settings"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc = NULL;
+ GooString *fileName = NULL;
+ GooString *docTitle = NULL;
+ GooString *author = NULL, *keywords = NULL, *subject = NULL, *date = NULL;
+ GooString *htmlFileName = NULL;
+ GooString *psFileName = NULL;
+ HtmlOutputDev *htmlOut = NULL;
+ PSOutputDev *psOut = NULL;
+ GBool ok;
+ char *p;
+ char extension[16] = "png";
+ GooString *ownerPW, *userPW;
+ Object info;
+ char * extsList[] = {"png", "jpeg", "bmp", "pcx", "tiff", "pbm", NULL};
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc < 2 || argc > 3 || printHelp || printVersion) {
+ fprintf(stderr, "pdftohtml version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", "Copyright 1999-2003 Gueorgui Ovtcharov and Rainer Dorsch");
+ fprintf(stderr, "%s\n\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdftohtml", "<PDF-file> [<html-file> <xml-file>]", argDesc);
+ }
+ exit(1);
+ }
+
+ // init error file
+ //errorInit();
+
+ // read config file
+ globalParams = new GlobalParams();
+
+ if (errQuiet) {
+ globalParams->setErrQuiet(errQuiet);
+ printCommands = gFalse; // I'm not 100% what is the differecne between them
+ }
+
+ if (textEncName[0]) {
+ globalParams->setTextEncoding(textEncName);
+ if( !globalParams->getTextEncoding() ) {
+ goto error;
+ }
+ }
+
+ // open PDF file
+ if (ownerPassword[0]) {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0]) {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+
+ fileName = new GooString(argv[1]);
+
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ goto error;
+ }
+
+ // check for copy permission
+ if (!doc->okToCopy()) {
+ if (!noDrm) {
+ error(-1, "Copying of text from this document is not allowed.");
+ goto error;
+ }
+ fprintf(stderr, "Document has copy-protection bit set.\n");
+ }
+
+ // construct text file name
+ if (argc == 3) {
+ GooString* tmp = new GooString(argv[2]);
+ p=tmp->getCString()+tmp->getLength()-5;
+ if (!xml)
+ if (!strcmp(p, ".html") || !strcmp(p, ".HTML"))
+ htmlFileName = new GooString(tmp->getCString(),
+ tmp->getLength() - 5);
+ else htmlFileName =new GooString(tmp);
+ else
+ if (!strcmp(p, ".xml") || !strcmp(p, ".XML"))
+ htmlFileName = new GooString(tmp->getCString(),
+ tmp->getLength() - 5);
+ else htmlFileName =new GooString(tmp);
+
+ delete tmp;
+ } else {
+ p = fileName->getCString() + fileName->getLength() - 4;
+ if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))
+ htmlFileName = new GooString(fileName->getCString(),
+ fileName->getLength() - 4);
+ else
+ htmlFileName = fileName->copy();
+ // htmlFileName->append(".html");
+ }
+
+ if (scale>3.0) scale=3.0;
+ if (scale<0.5) scale=0.5;
+
+ if (complexMode) {
+ //noframes=gFalse;
+ stout=gFalse;
+ }
+
+ if (stout) {
+ noframes=gTrue;
+ complexMode=gFalse;
+ }
+
+ if (xml)
+ {
+ complexMode = gTrue;
+ noframes = gTrue;
+ noMerge = gTrue;
+ }
+
+ // get page range
+ if (firstPage < 1)
+ firstPage = 1;
+ if (lastPage < 1 || lastPage > doc->getNumPages())
+ lastPage = doc->getNumPages();
+
+ doc->getDocInfo(&info);
+ if (info.isDict()) {
+ docTitle = getInfoString(info.getDict(), "Title");
+ author = getInfoString(info.getDict(), "Author");
+ keywords = getInfoString(info.getDict(), "Keywords");
+ subject = getInfoString(info.getDict(), "Subject");
+ date = getInfoDate(info.getDict(), "ModDate");
+ if( !date )
+ date = getInfoDate(info.getDict(), "CreationDate");
+ }
+ info.free();
+ if( !docTitle ) docTitle = new GooString(htmlFileName);
+
+ /* determine extensions of output backgroun images */
+ {int i;
+ for(i = 0; extsList[i]; i++)
+ {
+ if( strstr(gsDevice, extsList[i]) != (char *) NULL )
+ {
+ strncpy(extension, extsList[i], sizeof(extension));
+ break;
+ }
+ }}
+
+ rawOrder = complexMode; // todo: figure out what exactly rawOrder do :)
+
+ // write text file
+ htmlOut = new HtmlOutputDev(htmlFileName->getCString(),
+ docTitle->getCString(),
+ author ? author->getCString() : NULL,
+ keywords ? keywords->getCString() : NULL,
+ subject ? subject->getCString() : NULL,
+ date ? date->getCString() : NULL,
+ extension,
+ rawOrder,
+ firstPage,
+ doc->getCatalog()->getOutline()->isDict());
+ delete docTitle;
+ if( author )
+ {
+ delete author;
+ }
+ if( keywords )
+ {
+ delete keywords;
+ }
+ if( subject )
+ {
+ delete subject;
+ }
+ if( date )
+ {
+ delete date;
+ }
+
+ if (htmlOut->isOk())
+ {
+ doc->displayPages(htmlOut, firstPage, lastPage, 72, 72, 0,
+ gTrue, gFalse, gFalse);
+ if (!xml)
+ {
+ htmlOut->dumpDocOutline(doc->getCatalog());
+ }
+ }
+
+ if( complexMode && !xml && !ignore ) {
+ int h=xoutRound(htmlOut->getPageHeight()/scale);
+ int w=xoutRound(htmlOut->getPageWidth()/scale);
+ //int h=xoutRound(doc->getPageHeight(1)/scale);
+ //int w=xoutRound(doc->getPageWidth(1)/scale);
+
+ psFileName = new GooString(htmlFileName->getCString());
+ psFileName->append(".ps");
+
+ psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
+ doc->getCatalog(), NULL, firstPage, lastPage, psModePS, w, h);
+ psOut->setDisplayText(gFalse);
+ doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0,
+ gTrue, gFalse, gFalse);
+ delete psOut;
+
+ /*sprintf(buf, "%s -sDEVICE=png16m -dBATCH -dNOPROMPT -dNOPAUSE -r72 -sOutputFile=%s%%03d.png -g%dx%d -q %s", GHOSTSCRIPT, htmlFileName->getCString(), w, h,
+ psFileName->getCString());*/
+
+ GooString *gsCmd = new GooString(GHOSTSCRIPT);
+ GooString *tw, *th, *sc;
+ gsCmd->append(" -sDEVICE=");
+ gsCmd->append(gsDevice);
+ gsCmd->append(" -dBATCH -dNOPROMPT -dNOPAUSE -r");
+ sc = GooString::fromInt(static_cast<int>(72*scale));
+ gsCmd->append(sc);
+ gsCmd->append(" -sOutputFile=");
+ gsCmd->append("\"");
+ gsCmd->append(htmlFileName);
+ gsCmd->append("%03d.");
+ gsCmd->append(extension);
+ gsCmd->append("\" -g");
+ tw = GooString::fromInt(static_cast<int>(scale*w));
+ gsCmd->append(tw);
+ gsCmd->append("x");
+ th = GooString::fromInt(static_cast<int>(scale*h));
+ gsCmd->append(th);
+ gsCmd->append(" -q \"");
+ gsCmd->append(psFileName);
+ gsCmd->append("\"");
+// printf("running: %s\n", gsCmd->getCString());
+ if( !executeCommand(gsCmd->getCString()) && !errQuiet) {
+ error(-1, "Failed to launch Ghostscript!\n");
+ }
+ unlink(psFileName->getCString());
+ delete tw;
+ delete th;
+ delete sc;
+ delete gsCmd;
+ delete psFileName;
+ }
+
+ delete htmlOut;
+
+ // clean up
+ error:
+ if(doc) delete doc;
+ if(globalParams) delete globalParams;
+
+ if(htmlFileName) delete htmlFileName;
+ HtmlFont::clear();
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return 0;
+}
+
+static GooString* getInfoString(Dict *infoDict, char *key) {
+ Object obj;
+ GooString *s1 = NULL;
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ s1 = new GooString(obj.getString());
+ }
+ obj.free();
+ return s1;
+}
+
+static GooString* getInfoDate(Dict *infoDict, char *key) {
+ Object obj;
+ char *s;
+ int year, mon, day, hour, min, sec, tz_hour, tz_minute;
+ char tz;
+ struct tm tmStruct;
+ GooString *result = NULL;
+ char buf[256];
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ s = obj.getString()->getCString();
+ // TODO do something with the timezone info
+ if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) {
+ tmStruct.tm_year = year - 1900;
+ tmStruct.tm_mon = mon - 1;
+ tmStruct.tm_mday = day;
+ tmStruct.tm_hour = hour;
+ tmStruct.tm_min = min;
+ tmStruct.tm_sec = sec;
+ tmStruct.tm_wday = -1;
+ tmStruct.tm_yday = -1;
+ tmStruct.tm_isdst = -1;
+ mktime(&tmStruct); // compute the tm_wday and tm_yday fields
+ if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S+00:00", &tmStruct)) {
+ result = new GooString(buf);
+ } else {
+ result = new GooString(s);
+ }
+ } else {
+ result = new GooString(s);
+ }
+ }
+ obj.free();
+ return result;
+}
+
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1
new file mode 100644
index 00000000000..ecadf2250a6
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.1
@@ -0,0 +1,128 @@
+.\" Copyright 2004 Glyph & Cog, LLC
+.TH pdftoppm 1 "22 January 2004"
+.SH NAME
+pdftoppm \- Portable Document Format (PDF) to Portable Pixmap (PPM)
+converter (version 3.00)
+.SH SYNOPSIS
+.B pdftoppm
+[options]
+.I PDF-file PPM-root
+.SH DESCRIPTION
+.B Pdftoppm
+converts Portable Document Format (PDF) files to color image files in
+Portable Pixmap (PPM) format, grayscale image files in Portable
+Graymap (PGM) format, or monochrome image files in Portable Bitmap
+(PBM) format.
+.PP
+Pdftoppm reads the PDF file,
+.IR PDF-file ,
+and writes one PPM file for each page,
+.IR PPM-root - nnnnnn .ppm,
+where
+.I nnnnnn
+is the page number.
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to convert.
+.TP
+.BI \-l " number"
+Specifies the last page to convert.
+.TP
+.BI \-r " number"
+Specifies the X and Y resolution, in DPI. The default is 150 DPI.
+.TP
+.BI \-rx " number"
+Specifies the X resolution, in DPI. The default is 150 DPI.
+.TP
+.BI \-ry " number"
+Specifies the Y resolution, in DPI. The default is 150 DPI.
+.TP
+.BI \-scale-to " number"
+Scales each page to fit in scale-to*scale-to pixel box.
+.TP
+.BI \-scale-to-x " number"
+Scales each page horizontally to fit in scale-to-x pixels.
+.TP
+.BI \-scale-to-y " number"
+Scales each page vertically to fit in scale-to-y pixels.
+.TP
+.BI \-x " number"
+Specifies the x-coordinate of the crop area top left corner
+.TP
+.BI \-y " number"
+Specifies the y-coordinate of the crop area top left corner
+.TP
+.BI \-W " number"
+Specifies the width of crop area in pixels (default is 0)
+.TP
+.BI \-H " number"
+Specifies the height of crop area in pixels (default is 0)
+.TP
+.BI \-sz " number"
+Specifies the size of crop square in pixels (sets W and H)
+.TP
+.B \-mono
+Generate a monochrome PBM file (instead of a color PPM file).
+.TP
+.B \-gray
+Generate a grayscale PGM file (instead of a color PPM file).
+.TP
+.B \-png
+Generates a PNG file instead a PPM file.
+.TP
+.BI \-freetype " yes | no"
+Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
+This defaults to "yes".
+.TP
+.BI \-aa " yes | no"
+Enable or disable font anti-aliasing. This defaults to "yes".
+.TP
+.BI \-aaVector " yes | no"
+Enable or disable vector anti-aliasing. This defaults to "yes".
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-q
+Don't print any messages or errors.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdftoppm software and documentation are copyright 1996-2004 Glyph
+& Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftops (1),
+.BR pdftotext (1),
+.BR pdfinfo (1),
+.BR pdffonts (1),
+.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc
new file mode 100644
index 00000000000..38c26fd776a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftoppm.cc
@@ -0,0 +1,325 @@
+//========================================================================
+//
+// pdftoppm.cc
+//
+// Copyright 2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
+// Copyright (C) 2008 Richard Airlie <richard.airlie@maglabs.net>
+// Copyright (C) 2009 Michael K. Johnson <a1237@danlj.org>
+// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <math.h>
+#include "parseargs.h"
+#include "goo/gmem.h"
+#include "goo/GooString.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "PDFDoc.h"
+#include "splash/SplashBitmap.h"
+#include "splash/Splash.h"
+#include "SplashOutputDev.h"
+
+#define PPM_FILE_SZ 512
+
+static int firstPage = 1;
+static int lastPage = 0;
+static double resolution = 0.0;
+static double x_resolution = 150.0;
+static double y_resolution = 150.0;
+static int scaleTo = 0;
+static int x_scaleTo = 0;
+static int y_scaleTo = 0;
+static int x = 0;
+static int y = 0;
+static int w = 0;
+static int h = 0;
+static int sz = 0;
+static GBool useCropBox = gFalse;
+static GBool mono = gFalse;
+static GBool gray = gFalse;
+static GBool png = gFalse;
+static char enableFreeTypeStr[16] = "";
+static char antialiasStr[16] = "";
+static char vectorAntialiasStr[16] = "";
+static char ownerPassword[33] = "";
+static char userPassword[33] = "";
+static GBool quiet = gFalse;
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to print"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to print"},
+
+ {"-r", argFP, &resolution, 0,
+ "resolution, in DPI (default is 150)"},
+ {"-rx", argFP, &x_resolution, 0,
+ "X resolution, in DPI (default is 150)"},
+ {"-ry", argFP, &y_resolution, 0,
+ "Y resolution, in DPI (default is 150)"},
+ {"-scale-to", argInt, &scaleTo, 0,
+ "scales each page to fit within scale-to*scale-to pixel box"},
+ {"-scale-to-x", argInt, &x_scaleTo, 0,
+ "scales each page horizontally to fit in scale-to-x pixels"},
+ {"-scale-to-y", argInt, &y_scaleTo, 0,
+ "scales each page vertically to fit in scale-to-y pixels"},
+
+ {"-x", argInt, &x, 0,
+ "x-coordinate of the crop area top left corner"},
+ {"-y", argInt, &y, 0,
+ "y-coordinate of the crop area top left corner"},
+ {"-W", argInt, &w, 0,
+ "width of crop area in pixels (default is 0)"},
+ {"-H", argInt, &h, 0,
+ "height of crop area in pixels (default is 0)"},
+ {"-sz", argInt, &sz, 0,
+ "size of crop square in pixels (sets W and H)"},
+ {"-cropbox",argFlag, &useCropBox, 0,
+ "use the crop box rather than media box"},
+
+ {"-mono", argFlag, &mono, 0,
+ "generate a monochrome PBM file"},
+ {"-gray", argFlag, &gray, 0,
+ "generate a grayscale PGM file"},
+#if ENABLE_LIBPNG
+ {"-png", argFlag, &png, 0,
+ "generate a PNG file"},
+#endif
+#if HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
+ {"-freetype", argString, enableFreeTypeStr, sizeof(enableFreeTypeStr),
+ "enable FreeType font rasterizer: yes, no"},
+#endif
+
+ {"-aa", argString, antialiasStr, sizeof(antialiasStr),
+ "enable font anti-aliasing: yes, no"},
+ {"-aaVector", argString, vectorAntialiasStr, sizeof(vectorAntialiasStr),
+ "enable vector anti-aliasing: yes, no"},
+
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+
+ {"-q", argFlag, &quiet, 0,
+ "don't print any messages or errors"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+static void savePageSlice(PDFDoc *doc,
+ SplashOutputDev *splashOut,
+ int pg, int x, int y, int w, int h,
+ double pg_w, double pg_h,
+ char *ppmFile) {
+ if (w == 0) w = (int)ceil(pg_w);
+ if (h == 0) h = (int)ceil(pg_h);
+ w = (x+w > pg_w ? (int)ceil(pg_w-x) : w);
+ h = (y+h > pg_h ? (int)ceil(pg_h-y) : h);
+ doc->displayPageSlice(splashOut,
+ pg, x_resolution, y_resolution,
+ 0,
+ !useCropBox, gFalse, gFalse,
+ x, y, w, h
+ );
+ if (ppmFile != NULL) {
+ if (png) {
+ splashOut->getBitmap()->writePNGFile(ppmFile);
+ } else {
+ splashOut->getBitmap()->writePNMFile(ppmFile);
+ }
+ } else {
+ if (png) {
+ splashOut->getBitmap()->writePNGFile(stdout);
+ } else {
+ splashOut->getBitmap()->writePNMFile(stdout);
+ }
+ }
+}
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName = NULL;
+ char *ppmRoot = NULL;
+ char ppmFile[PPM_FILE_SZ];
+ GooString *ownerPW, *userPW;
+ SplashColor paperColor;
+ SplashOutputDev *splashOut;
+ GBool ok;
+ int exitCode;
+ int pg, pg_num_len;
+ double pg_w, pg_h, tmp;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (mono && gray) {
+ ok = gFalse;
+ }
+ if ( resolution != 0.0 &&
+ (x_resolution == 150.0 ||
+ y_resolution == 150.0)) {
+ x_resolution = resolution;
+ y_resolution = resolution;
+ }
+ if (!ok || argc > 3 || printVersion || printHelp) {
+ fprintf(stderr, "pdftoppm version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdftoppm", "[PDF-file [PPM-file-prefix]]", argDesc);
+ }
+ goto err0;
+ }
+ if (argc > 1) fileName = new GooString(argv[1]);
+ if (argc == 3) ppmRoot = argv[2];
+
+ // read config file
+ globalParams = new GlobalParams();
+ if (enableFreeTypeStr[0]) {
+ if (!globalParams->setEnableFreeType(enableFreeTypeStr)) {
+ fprintf(stderr, "Bad '-freetype' value on command line\n");
+ }
+ }
+ if (antialiasStr[0]) {
+ if (!globalParams->setAntialias(antialiasStr)) {
+ fprintf(stderr, "Bad '-aa' value on command line\n");
+ }
+ }
+ if (vectorAntialiasStr[0]) {
+ if (!globalParams->setVectorAntialias(vectorAntialiasStr)) {
+ fprintf(stderr, "Bad '-aaVector' value on command line\n");
+ }
+ }
+ if (quiet) {
+ globalParams->setErrQuiet(quiet);
+ }
+
+ // open PDF file
+ if (ownerPassword[0]) {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0]) {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+ if(fileName != NULL && fileName->cmp("-") != 0) {
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ } else {
+ Object obj;
+
+ obj.initNull();
+ doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+ }
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err1;
+ }
+
+ // get page range
+ if (firstPage < 1)
+ firstPage = 1;
+ if (lastPage < 1 || lastPage > doc->getNumPages())
+ lastPage = doc->getNumPages();
+
+ // write PPM files
+ paperColor[0] = 255;
+ paperColor[1] = 255;
+ paperColor[2] = 255;
+ splashOut = new SplashOutputDev(mono ? splashModeMono1 :
+ gray ? splashModeMono8 :
+ splashModeRGB8, 4,
+ gFalse, paperColor);
+ splashOut->startDoc(doc->getXRef());
+ if (sz != 0) w = h = sz;
+ pg_num_len = (int)ceil(log((double)doc->getNumPages()) / log((double)10));
+ for (pg = firstPage; pg <= lastPage; ++pg) {
+ if (useCropBox) {
+ pg_w = doc->getPageCropWidth(pg);
+ pg_h = doc->getPageCropHeight(pg);
+ } else {
+ pg_w = doc->getPageMediaWidth(pg);
+ pg_h = doc->getPageMediaHeight(pg);
+ }
+
+ if (scaleTo != 0) {
+ resolution = (72.0 * scaleTo) / (pg_w > pg_h ? pg_w : pg_h);
+ x_resolution = y_resolution = resolution;
+ } else {
+ if (x_scaleTo != 0) {
+ x_resolution = (72.0 * x_scaleTo) / pg_w;
+ }
+ if (y_scaleTo != 0) {
+ y_resolution = (72.0 * y_scaleTo) / pg_h;
+ }
+ }
+ pg_w = pg_w * (x_resolution / 72.0);
+ pg_h = pg_h * (y_resolution / 72.0);
+ if (doc->getPageRotate(pg)) {
+ tmp = pg_w;
+ pg_w = pg_h;
+ pg_h = tmp;
+ }
+ if (ppmRoot != NULL) {
+ snprintf(ppmFile, PPM_FILE_SZ, "%.*s-%0*d.%s",
+ PPM_FILE_SZ - 32, ppmRoot, pg_num_len, pg,
+ png ? "png" : mono ? "pbm" : gray ? "pgm" : "ppm");
+ savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, ppmFile);
+ } else {
+ savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, NULL);
+ }
+ }
+ delete splashOut;
+
+ exitCode = 0;
+
+ // clean up
+ err1:
+ delete doc;
+ delete globalParams;
+ err0:
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1
new file mode 100644
index 00000000000..6c4ef61876d
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.1
@@ -0,0 +1,211 @@
+.\" Copyright 1996-2004 Glyph & Cog, LLC
+.TH pdftops 1 "31 July 2009"
+.SH NAME
+pdftops \- Portable Document Format (PDF) to PostScript converter
+(version 3.00)
+.SH SYNOPSIS
+.B pdftops
+[options]
+.RI <PDF-file>
+.RI [<PS-file>]
+.SH DESCRIPTION
+.B Pdftops
+converts Portable Document Format (PDF) files to PostScript so they
+can be printed.
+.PP
+Pdftops reads the PDF file,
+.IR PDF-file ,
+and writes a PostScript file,
+.IR PS-file .
+If
+.I PS-file
+is not specified, pdftops converts
+.I file.pdf
+to
+.I file.ps
+(or
+.I file.eps
+with the \-eps option). If
+.I PS-file
+is \'-', the PostScript is sent to stdout.
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to print.
+.TP
+.BI \-l " number"
+Specifies the last page to print.
+.TP
+.B \-level1
+Generate Level 1 PostScript. The resulting PostScript files will be
+significantly larger (if they contain images), but will print on Level
+1 printers. This also converts all images to black and white. No
+more than one of the PostScript level options (\-level1, \-level1sep,
+\-level2, \-level2sep, \-level3, \-level3Sep) may be given.
+.TP
+.B \-level1sep
+Generate Level 1 separable PostScript. All colors are converted to
+CMYK. Images are written with separate stream data for the four
+components.
+.TP
+.B \-level2
+Generate Level 2 PostScript. Level 2 supports color images and image
+compression. This is the default setting.
+.TP
+.B \-level2sep
+Generate Level 2 separable PostScript. All colors are converted to
+CMYK. The PostScript separation convention operators are used to
+handle custom (spot) colors.
+.TP
+.B \-level3
+Generate Level 3 PostScript. This enables all Level 2 features plus
+CID font embedding.
+.TP
+.B \-level3Sep
+Generate Level 3 separable PostScript. The separation handling is the
+same as for \-level2Sep.
+.TP
+.B \-origpagesizes
+Generate a PostScript file with variable page sizes and orientations,
+taking for each page the size of the original page in the PDF file.
+The PostScript file contains "<</PageSize [WIDTH HEIGHT]>> setpagedevice"
+lines in each page header, so that the paper input tray gets correctly
+changed on the printer. This option should be used when pdftops is used
+as a print filter. Any specification of the page size via \-paper,
+\-paperw, or \-paperh will get overridden as long as each page of the
+PDF file has a defined paper size. No more than one of the mode options
+(\-origpagesizes, \-eps, \-form) may be given.
+.TP
+.B \-eps
+Generate an Encapsulated PostScript (EPS) file. An EPS file contains
+a single image, so if you use this option with a multi-page PDF file,
+you must use \-f and \-l to specify a single page. No more than one of
+the mode options (\-origpagesizes, \-eps, \-form) may be given.
+.TP
+.B \-form
+Generate a PostScript form which can be imported by software that
+understands forms. A form contains a single page, so if you use this
+option with a multi-page PDF file, you must use \-f and \-l to specify a
+single page. The \-level1 option cannot be used with \-form. No more
+than one of the mode options (\-origpagesizes, \-eps, \-form) may be
+given.
+.TP
+.B \-opi
+Generate OPI comments for all images and forms which have OPI
+information. (This option is only available if pdftops was compiled
+with OPI support.)
+.TP
+.B \-noembt1
+By default, any Type 1 fonts which are embedded in the PDF file are
+copied into the PostScript file. This option causes pdftops to
+substitute base fonts instead. Embedded fonts make PostScript files
+larger, but may be necessary for readable output.
+.TP
+.B \-noembtt
+By default, any TrueType fonts which are embedded in the PDF file are
+copied into the PostScript file. This option causes pdftops to
+substitute base fonts instead. Embedded fonts make PostScript files
+larger, but may be necessary for readable output. Also, some
+PostScript interpreters do not have TrueType rasterizers.
+.TP
+.B \-noembcidps
+By default, any CID PostScript fonts which are embedded in the PDF
+file are copied into the PostScript file. This option disables that
+embedding. No attempt is made to substitute for non-embedded CID
+PostScript fonts.
+.TP
+.B \-noembcidtt
+By default, any CID TrueType fonts which are embedded in the PDF file
+are copied into the PostScript file. This option disables that
+embedding. No attempt is made to substitute for non-embedded CID
+TrueType fonts.
+.TP
+.B \-passfonts
+By default, references to non-embedded 8-bit fonts in the PDF file are
+substituted with the closest "Helvetica", "Times-Roman", or "Courier" font.
+This option passes references to non-embedded fonts
+through to the PostScript file.
+.TP
+.B \-preload
+preload images and forms
+.TP
+.BI \-paper " size"
+Set the paper size to one of "letter", "legal", "A4", or "A3". This
+can also be set to "match", which will set the paper size to match the
+size specified in the PDF file. \-origpagesizes overrides this setting
+if the PDF file has defined page sizes.
+.TP
+.BI \-paperw " size"
+Set the paper width, in points. \-origpagesizes overrides this setting
+if the PDF file has defined page sizes.
+.TP
+.BI \-paperh " size"
+Set the paper height, in points. \-origpagesizes overrides this setting
+if the PDF file has defined page sizes.
+.TP
+.B \-nocrop
+By default, output is cropped to the CropBox specified in the PDF
+file. This option disables cropping.
+.TP
+.B \-expand
+Expand PDF pages smaller than the paper to fill the paper. By
+default, these pages are not scaled.
+.TP
+.B \-noshrink
+Don't scale PDF pages which are larger than the paper. By default,
+pages larger than the paper are shrunk to fit.
+.TP
+.B \-nocenter
+By default, PDF pages smaller than the paper (after any scaling) are
+centered on the paper. This option causes them to be aligned to the
+lower-left corner of the paper instead.
+.TP
+.B \-duplex
+Set the Duplex pagedevice entry in the PostScript file. This tells
+duplex-capable printers to enable duplexing.
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-q
+Don't print any messages or errors.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdftops software and documentation are copyright 1996-2004 Glyph &
+Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftotext (1),
+.BR pdfinfo (1),
+.BR pdffonts (1),
+.BR pdftoppm (1),
+.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc
new file mode 100644
index 00000000000..69d5c329405
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftops.cc
@@ -0,0 +1,382 @@
+//========================================================================
+//
+// pdftops.cc
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
+// Copyright (C) 2009 Sanjoy Mahajan <sanjoy@mit.edu>
+// Copyright (C) 2009 William Bader <williambader@hotmail.com>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include "parseargs.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "PSOutputDev.h"
+#include "Error.h"
+
+static GBool setPSPaperSize(char *size, int &psPaperWidth, int &psPaperHeight) {
+ if (!strcmp(size, "match")) {
+ psPaperWidth = psPaperHeight = -1;
+ } else if (!strcmp(size, "letter")) {
+ psPaperWidth = 612;
+ psPaperHeight = 792;
+ } else if (!strcmp(size, "legal")) {
+ psPaperWidth = 612;
+ psPaperHeight = 1008;
+ } else if (!strcmp(size, "A4")) {
+ psPaperWidth = 595;
+ psPaperHeight = 842;
+ } else if (!strcmp(size, "A3")) {
+ psPaperWidth = 842;
+ psPaperHeight = 1190;
+ } else {
+ return gFalse;
+ }
+ return gTrue;
+}
+
+
+static int firstPage = 1;
+static int lastPage = 0;
+static GBool level1 = gFalse;
+static GBool level1Sep = gFalse;
+static GBool level2 = gFalse;
+static GBool level2Sep = gFalse;
+static GBool level3 = gFalse;
+static GBool level3Sep = gFalse;
+static GBool doOrigPageSizes = gFalse;
+static GBool doEPS = gFalse;
+static GBool doForm = gFalse;
+#if OPI_SUPPORT
+static GBool doOPI = gFalse;
+#endif
+static GBool noEmbedT1Fonts = gFalse;
+static GBool noEmbedTTFonts = gFalse;
+static GBool noEmbedCIDPSFonts = gFalse;
+static GBool noEmbedCIDTTFonts = gFalse;
+static GBool noSubstFonts = gFalse;
+static GBool preload = gFalse;
+static char paperSize[15] = "";
+static int paperWidth = -1;
+static int paperHeight = -1;
+static GBool noCrop = gFalse;
+static GBool expand = gFalse;
+static GBool noShrink = gFalse;
+static GBool noCenter = gFalse;
+static GBool duplex = gFalse;
+static char ownerPassword[33] = "\001";
+static char userPassword[33] = "\001";
+static GBool quiet = gFalse;
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to print"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to print"},
+ {"-level1", argFlag, &level1, 0,
+ "generate Level 1 PostScript"},
+ {"-level1sep", argFlag, &level1Sep, 0,
+ "generate Level 1 separable PostScript"},
+ {"-level2", argFlag, &level2, 0,
+ "generate Level 2 PostScript"},
+ {"-level2sep", argFlag, &level2Sep, 0,
+ "generate Level 2 separable PostScript"},
+ {"-level3", argFlag, &level3, 0,
+ "generate Level 3 PostScript"},
+ {"-level3sep", argFlag, &level3Sep, 0,
+ "generate Level 3 separable PostScript"},
+ {"-origpagesizes",argFlag, &doOrigPageSizes,0,
+ "conserve original page sizes"},
+ {"-eps", argFlag, &doEPS, 0,
+ "generate Encapsulated PostScript (EPS)"},
+ {"-form", argFlag, &doForm, 0,
+ "generate a PostScript form"},
+#if OPI_SUPPORT
+ {"-opi", argFlag, &doOPI, 0,
+ "generate OPI comments"},
+#endif
+ {"-noembt1", argFlag, &noEmbedT1Fonts, 0,
+ "don't embed Type 1 fonts"},
+ {"-noembtt", argFlag, &noEmbedTTFonts, 0,
+ "don't embed TrueType fonts"},
+ {"-noembcidps", argFlag, &noEmbedCIDPSFonts, 0,
+ "don't embed CID PostScript fonts"},
+ {"-noembcidtt", argFlag, &noEmbedCIDTTFonts, 0,
+ "don't embed CID TrueType fonts"},
+ {"-passfonts", argFlag, &noSubstFonts,0,
+ "don't substitute missing fonts"},
+ {"-preload", argFlag, &preload, 0,
+ "preload images and forms"},
+ {"-paper", argString, paperSize, sizeof(paperSize),
+ "paper size (letter, legal, A4, A3, match)"},
+ {"-paperw", argInt, &paperWidth, 0,
+ "paper width, in points"},
+ {"-paperh", argInt, &paperHeight, 0,
+ "paper height, in points"},
+ {"-nocrop", argFlag, &noCrop, 0,
+ "don't crop pages to CropBox"},
+ {"-expand", argFlag, &expand, 0,
+ "expand pages smaller than the paper size"},
+ {"-noshrink", argFlag, &noShrink, 0,
+ "don't shrink pages larger than the paper size"},
+ {"-nocenter", argFlag, &noCenter, 0,
+ "don't center pages smaller than the paper size"},
+ {"-duplex", argFlag, &duplex, 0,
+ "enable duplex printing"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-q", argFlag, &quiet, 0,
+ "don't print any messages or errors"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName;
+ GooString *psFileName;
+ PSLevel level;
+ PSOutMode mode;
+ GooString *ownerPW, *userPW;
+ PSOutputDev *psOut;
+ GBool ok;
+ char *p;
+ int exitCode;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
+ fprintf(stderr, "pdftops version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdftops", "<PDF-file> [<PS-file>]", argDesc);
+ }
+ exit(1);
+ }
+ if ((level1 ? 1 : 0) +
+ (level1Sep ? 1 : 0) +
+ (level2 ? 1 : 0) +
+ (level2Sep ? 1 : 0) +
+ (level3 ? 1 : 0) +
+ (level3Sep ? 1 : 0) > 1) {
+ fprintf(stderr, "Error: use only one of the 'level' options.\n");
+ exit(1);
+ }
+ if ((doOrigPageSizes ? 1 : 0) +
+ (doEPS ? 1 : 0) +
+ (doForm ? 1 : 0) > 1) {
+ fprintf(stderr, "Error: use only one of -origpagesizes, -eps, and -form\n");
+ exit(1);
+ }
+ if (level1) {
+ level = psLevel1;
+ } else if (level1Sep) {
+ level = psLevel1Sep;
+ } else if (level2Sep) {
+ level = psLevel2Sep;
+ } else if (level3) {
+ level = psLevel3;
+ } else if (level3Sep) {
+ level = psLevel3Sep;
+ } else {
+ level = psLevel2;
+ }
+ if (doForm && level < psLevel2) {
+ fprintf(stderr, "Error: forms are only available with Level 2 output.\n");
+ exit(1);
+ }
+ mode = doOrigPageSizes ? psModePSOrigPageSizes
+ : doEPS ? psModeEPS
+ : doForm ? psModeForm
+ : psModePS;
+ fileName = new GooString(argv[1]);
+
+ // read config file
+ globalParams = new GlobalParams();
+ if (paperSize[0]) {
+ if (!setPSPaperSize(paperSize, paperWidth, paperHeight)) {
+ fprintf(stderr, "Invalid paper size\n");
+ delete fileName;
+ goto err0;
+ }
+ }
+ if (expand) {
+ globalParams->setPSExpandSmaller(gTrue);
+ }
+ if (noShrink) {
+ globalParams->setPSShrinkLarger(gFalse);
+ }
+ if (noCenter) {
+ globalParams->setPSCenter(gFalse);
+ }
+ if (level1 || level1Sep || level2 || level2Sep || level3 || level3Sep) {
+ globalParams->setPSLevel(level);
+ }
+ if (noEmbedT1Fonts) {
+ globalParams->setPSEmbedType1(!noEmbedT1Fonts);
+ }
+ if (noEmbedTTFonts) {
+ globalParams->setPSEmbedTrueType(!noEmbedTTFonts);
+ }
+ if (noEmbedCIDPSFonts) {
+ globalParams->setPSEmbedCIDPostScript(!noEmbedCIDPSFonts);
+ }
+ if (noEmbedCIDTTFonts) {
+ globalParams->setPSEmbedCIDTrueType(!noEmbedCIDTTFonts);
+ }
+ if (noSubstFonts) {
+ globalParams->setPSSubstFonts(!noSubstFonts);
+ }
+ if (preload) {
+ globalParams->setPSPreload(preload);
+ }
+#if OPI_SUPPORT
+ if (doOPI) {
+ globalParams->setPSOPI(doOPI);
+ }
+#endif
+ if (quiet) {
+ globalParams->setErrQuiet(quiet);
+ }
+
+ // open PDF file
+ if (ownerPassword[0] != '\001') {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0] != '\001') {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err1;
+ }
+
+#ifdef ENFORCE_PERMISSIONS
+ // check for print permission
+ if (!doc->okToPrint()) {
+ error(-1, "Printing this document is not allowed.");
+ exitCode = 3;
+ goto err1;
+ }
+#endif
+
+ // construct PostScript file name
+ if (argc == 3) {
+ psFileName = new GooString(argv[2]);
+ } else {
+ p = fileName->getCString() + fileName->getLength() - 4;
+ if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
+ psFileName = new GooString(fileName->getCString(),
+ fileName->getLength() - 4);
+ } else {
+ psFileName = fileName->copy();
+ }
+ psFileName->append(doEPS ? ".eps" : ".ps");
+ }
+
+ // get page range
+ if (firstPage < 1) {
+ firstPage = 1;
+ }
+ if (lastPage < 1 || lastPage > doc->getNumPages()) {
+ lastPage = doc->getNumPages();
+ }
+
+ // check for multi-page EPS or form
+ if ((doEPS || doForm) && firstPage != lastPage) {
+ error(-1, "EPS and form files can only contain one page.");
+ goto err2;
+ }
+
+ // write PostScript file
+ psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
+ doc->getCatalog(), NULL, firstPage, lastPage, mode,
+ paperWidth,
+ paperHeight,
+ duplex);
+ if (psOut->isOk()) {
+ doc->displayPages(psOut, firstPage, lastPage, 72, 72,
+ 0, noCrop, !noCrop, gTrue);
+ } else {
+ delete psOut;
+ exitCode = 2;
+ goto err2;
+ }
+ delete psOut;
+
+ exitCode = 0;
+
+ // clean up
+ err2:
+ delete psFileName;
+ err1:
+ delete doc;
+ err0:
+ delete globalParams;
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1 b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1
new file mode 100644
index 00000000000..4e3cb0b78d7
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.1
@@ -0,0 +1,126 @@
+.\" Copyright 1997-2004 Glyph & Cog, LLC
+.TH pdftotext 1 "22 January 2004"
+.SH NAME
+pdftotext \- Portable Document Format (PDF) to text converter
+(version 3.00)
+.SH SYNOPSIS
+.B pdftotext
+[options]
+.RI [ PDF-file
+.RI [ text-file ]]
+.SH DESCRIPTION
+.B Pdftotext
+converts Portable Document Format (PDF) files to plain text.
+.PP
+Pdftotext reads the PDF file,
+.IR PDF-file ,
+and writes a text file,
+.IR text-file .
+If
+.I text-file
+is not specified, pdftotext converts
+.I file.pdf
+to
+.IR file.txt .
+If
+.I text-file
+is \'-', the text is sent to stdout.
+.SH OPTIONS
+.TP
+.BI \-f " number"
+Specifies the first page to convert.
+.TP
+.BI \-l " number"
+Specifies the last page to convert.
+.TP
+.BI \-r " number"
+Specifies the resolution, in DPI. The default is 72 DPI.
+.TP
+.BI \-x " number"
+Specifies the x-coordinate of the crop area top left corner
+.TP
+.BI \-y " number"
+Specifies the y-coordinate of the crop area top left corner
+.TP
+.BI \-W " number"
+Specifies the width of crop area in pixels (default is 0)
+.TP
+.BI \-H " number"
+Specifies the height of crop area in pixels (default is 0)
+.TP
+.B \-layout
+Maintain (as best as possible) the original physical layout of the
+text. The default is to \'undo' physical layout (columns,
+hyphenation, etc.) and output the text in reading order.
+.TP
+.B \-raw
+Keep the text in content stream order. This is a hack which often
+"undoes" column formatting, etc. Use of raw mode is no longer
+recommended.
+.TP
+.B \-htmlmeta
+Generate a simple HTML file, including the meta information. This
+simply wraps the text in <pre> and </pre> and prepends the meta
+headers.
+.TP
+.BI \-enc " encoding-name"
+Sets the encoding to use for text output. This defaults to "UTF-8".
+.TP
+.B \-listenc
+Lits the available encodings
+.TP
+.BI \-eol " unix | dos | mac"
+Sets the end-of-line convention to use for text output.
+.TP
+.B \-nopgbrk
+Don't insert page breaks (form feed characters) between pages.
+.TP
+.BI \-opw " password"
+Specify the owner password for the PDF file. Providing this will
+bypass all security restrictions.
+.TP
+.BI \-upw " password"
+Specify the user password for the PDF file.
+.TP
+.B \-q
+Don't print any messages or errors.
+.TP
+.B \-v
+Print copyright and version information.
+.TP
+.B \-h
+Print usage information.
+.RB ( \-help
+and
+.B \-\-help
+are equivalent.)
+.SH BUGS
+Some PDF files contain fonts whose encodings have been mangled beyond
+recognition. There is no way (short of OCR) to extract text from
+these files.
+.SH EXIT CODES
+The Xpdf tools use the following exit codes:
+.TP
+0
+No error.
+.TP
+1
+Error opening a PDF file.
+.TP
+2
+Error opening an output file.
+.TP
+3
+Error related to PDF permissions.
+.TP
+99
+Other error.
+.SH AUTHOR
+The pdftotext software and documentation are copyright 1996-2004 Glyph
+& Cog, LLC.
+.SH "SEE ALSO"
+.BR pdftops (1),
+.BR pdfinfo (1),
+.BR pdffonts (1),
+.BR pdftoppm (1),
+.BR pdfimages (1),
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc
new file mode 100644
index 00000000000..4ebda19bd41
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/pdftotext.cc
@@ -0,0 +1,398 @@
+//========================================================================
+//
+// pdftotext.cc
+//
+// Copyright 1997-2003 Glyph & Cog, LLC
+//
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
+//========================================================================
+
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
+// Copyright (C) 2007-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2009 Jan Jockusch <jan@jockusch.de>
+//
+// To see a description of the changes please see the Changelog file that
+// came with your tarball or type make ChangeLog if you are building from git
+//
+//========================================================================
+
+#include "config.h"
+#include <poppler-config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include "parseargs.h"
+#include "printencodings.h"
+#include "goo/GooString.h"
+#include "goo/gmem.h"
+#include "GlobalParams.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "PDFDoc.h"
+#include "TextOutputDev.h"
+#include "CharTypes.h"
+#include "UnicodeMap.h"
+#include "Error.h"
+
+static void printInfoString(FILE *f, Dict *infoDict, char *key,
+ char *text1, char *text2, UnicodeMap *uMap);
+static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt);
+
+static int firstPage = 1;
+static int lastPage = 0;
+static double resolution = 72.0;
+static int x = 0;
+static int y = 0;
+static int w = 0;
+static int h = 0;
+static GBool physLayout = gFalse;
+static GBool rawOrder = gFalse;
+static GBool htmlMeta = gFalse;
+static char textEncName[128] = "";
+static char textEOL[16] = "";
+static GBool noPageBreaks = gFalse;
+static char ownerPassword[33] = "\001";
+static char userPassword[33] = "\001";
+static GBool quiet = gFalse;
+static GBool printVersion = gFalse;
+static GBool printHelp = gFalse;
+static GBool printEnc = gFalse;
+
+static const ArgDesc argDesc[] = {
+ {"-f", argInt, &firstPage, 0,
+ "first page to convert"},
+ {"-l", argInt, &lastPage, 0,
+ "last page to convert"},
+ {"-r", argFP, &resolution, 0,
+ "resolution, in DPI (default is 72)"},
+ {"-x", argInt, &x, 0,
+ "x-coordinate of the crop area top left corner"},
+ {"-y", argInt, &y, 0,
+ "y-coordinate of the crop area top left corner"},
+ {"-W", argInt, &w, 0,
+ "width of crop area in pixels (default is 0)"},
+ {"-H", argInt, &h, 0,
+ "height of crop area in pixels (default is 0)"},
+ {"-layout", argFlag, &physLayout, 0,
+ "maintain original physical layout"},
+ {"-raw", argFlag, &rawOrder, 0,
+ "keep strings in content stream order"},
+ {"-htmlmeta", argFlag, &htmlMeta, 0,
+ "generate a simple HTML file, including the meta information"},
+ {"-enc", argString, textEncName, sizeof(textEncName),
+ "output text encoding name"},
+ {"-listenc",argFlag, &printEnc, 0,
+ "list available encodings"},
+ {"-eol", argString, textEOL, sizeof(textEOL),
+ "output end-of-line convention (unix, dos, or mac)"},
+ {"-nopgbrk", argFlag, &noPageBreaks, 0,
+ "don't insert page breaks between pages"},
+ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
+ "owner password (for encrypted files)"},
+ {"-upw", argString, userPassword, sizeof(userPassword),
+ "user password (for encrypted files)"},
+ {"-q", argFlag, &quiet, 0,
+ "don't print any messages or errors"},
+ {"-v", argFlag, &printVersion, 0,
+ "print copyright and version info"},
+ {"-h", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"--help", argFlag, &printHelp, 0,
+ "print usage information"},
+ {"-?", argFlag, &printHelp, 0,
+ "print usage information"},
+ {NULL}
+};
+
+int main(int argc, char *argv[]) {
+ PDFDoc *doc;
+ GooString *fileName;
+ GooString *textFileName;
+ GooString *ownerPW, *userPW;
+ TextOutputDev *textOut;
+ FILE *f;
+ UnicodeMap *uMap;
+ Object info;
+ GBool ok;
+ char *p;
+ int exitCode;
+
+ exitCode = 99;
+
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || (argc < 2 && !printEnc) || argc > 3 || printVersion || printHelp) {
+ fprintf(stderr, "pdftotext version %s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", popplerCopyright);
+ fprintf(stderr, "%s\n", xpdfCopyright);
+ if (!printVersion) {
+ printUsage("pdftotext", "<PDF-file> [<text-file>]", argDesc);
+ }
+ goto err0;
+ }
+
+ // read config file
+ globalParams = new GlobalParams();
+
+ if (printEnc) {
+ printEncodings();
+ delete globalParams;
+ goto err0;
+ }
+
+ fileName = new GooString(argv[1]);
+
+ if (textEncName[0]) {
+ globalParams->setTextEncoding(textEncName);
+ }
+ if (textEOL[0]) {
+ if (!globalParams->setTextEOL(textEOL)) {
+ fprintf(stderr, "Bad '-eol' value on command line\n");
+ }
+ }
+ if (noPageBreaks) {
+ globalParams->setTextPageBreaks(gFalse);
+ }
+ if (quiet) {
+ globalParams->setErrQuiet(quiet);
+ }
+
+ // get mapping to output encoding
+ if (!(uMap = globalParams->getTextEncoding())) {
+ error(-1, "Couldn't get text encoding");
+ delete fileName;
+ goto err1;
+ }
+
+ // open PDF file
+ if (ownerPassword[0] != '\001') {
+ ownerPW = new GooString(ownerPassword);
+ } else {
+ ownerPW = NULL;
+ }
+ if (userPassword[0] != '\001') {
+ userPW = new GooString(userPassword);
+ } else {
+ userPW = NULL;
+ }
+
+ if(fileName->cmp("-") != 0) {
+ doc = new PDFDoc(fileName, ownerPW, userPW);
+ } else {
+ Object obj;
+
+ obj.initNull();
+ doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+ }
+
+ if (userPW) {
+ delete userPW;
+ }
+ if (ownerPW) {
+ delete ownerPW;
+ }
+ if (!doc->isOk()) {
+ exitCode = 1;
+ goto err2;
+ }
+
+#ifdef ENFORCE_PERMISSIONS
+ // check for copy permission
+ if (!doc->okToCopy()) {
+ error(-1, "Copying of text from this document is not allowed.");
+ exitCode = 3;
+ goto err2;
+ }
+#endif
+
+ // construct text file name
+ if (argc == 3) {
+ textFileName = new GooString(argv[2]);
+ } else {
+ p = fileName->getCString() + fileName->getLength() - 4;
+ if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
+ textFileName = new GooString(fileName->getCString(),
+ fileName->getLength() - 4);
+ } else {
+ textFileName = fileName->copy();
+ }
+ textFileName->append(htmlMeta ? ".html" : ".txt");
+ }
+
+ // get page range
+ if (firstPage < 1) {
+ firstPage = 1;
+ }
+ if (lastPage < 1 || lastPage > doc->getNumPages()) {
+ lastPage = doc->getNumPages();
+ }
+
+ // write HTML header
+ if (htmlMeta) {
+ if (!textFileName->cmp("-")) {
+ f = stdout;
+ } else {
+ if (!(f = fopen(textFileName->getCString(), "wb"))) {
+ error(-1, "Couldn't open text file '%s'", textFileName->getCString());
+ exitCode = 2;
+ goto err3;
+ }
+ }
+ fputs("<html>\n", f);
+ fputs("<head>\n", f);
+ doc->getDocInfo(&info);
+ if (info.isDict()) {
+ printInfoString(f, info.getDict(), "Title", "<title>", "</title>\n",
+ uMap);
+ printInfoString(f, info.getDict(), "Subject",
+ "<meta name=\"Subject\" content=\"", "\">\n", uMap);
+ printInfoString(f, info.getDict(), "Keywords",
+ "<meta name=\"Keywords\" content=\"", "\">\n", uMap);
+ printInfoString(f, info.getDict(), "Author",
+ "<meta name=\"Author\" content=\"", "\">\n", uMap);
+ printInfoString(f, info.getDict(), "Creator",
+ "<meta name=\"Creator\" content=\"", "\">\n", uMap);
+ printInfoString(f, info.getDict(), "Producer",
+ "<meta name=\"Producer\" content=\"", "\">\n", uMap);
+ printInfoDate(f, info.getDict(), "CreationDate",
+ "<meta name=\"CreationDate\" content=\"\">\n");
+ printInfoDate(f, info.getDict(), "LastModifiedDate",
+ "<meta name=\"ModDate\" content=\"\">\n");
+ }
+ info.free();
+ fputs("</head>\n", f);
+ fputs("<body>\n", f);
+ fputs("<pre>\n", f);
+ if (f != stdout) {
+ fclose(f);
+ }
+ }
+
+ // write text file
+ textOut = new TextOutputDev(textFileName->getCString(),
+ physLayout, rawOrder, htmlMeta);
+ if (textOut->isOk()) {
+ if ((w==0) && (h==0) && (x==0) && (y==0)) {
+ doc->displayPages(textOut, firstPage, lastPage, resolution, resolution, 0,
+ gTrue, gFalse, gFalse);
+ } else {
+ int page;
+
+ for (page = firstPage; page <= lastPage; ++page) {
+ doc->displayPageSlice(textOut, page, resolution, resolution, 0,
+ gTrue, gFalse, gFalse,
+ x, y, w, h);
+ }
+ }
+
+ } else {
+ delete textOut;
+ exitCode = 2;
+ goto err3;
+ }
+ delete textOut;
+
+ // write end of HTML file
+ if (htmlMeta) {
+ if (!textFileName->cmp("-")) {
+ f = stdout;
+ } else {
+ if (!(f = fopen(textFileName->getCString(), "ab"))) {
+ error(-1, "Couldn't open text file '%s'", textFileName->getCString());
+ exitCode = 2;
+ goto err3;
+ }
+ }
+ fputs("</pre>\n", f);
+ fputs("</body>\n", f);
+ fputs("</html>\n", f);
+ if (f != stdout) {
+ fclose(f);
+ }
+ }
+
+ exitCode = 0;
+
+ // clean up
+ err3:
+ delete textFileName;
+ err2:
+ delete doc;
+ uMap->decRefCnt();
+ err1:
+ delete globalParams;
+ err0:
+
+ // check for memory leaks
+ Object::memCheck(stderr);
+ gMemReport(stderr);
+
+ return exitCode;
+}
+
+static void printInfoString(FILE *f, Dict *infoDict, char *key,
+ char *text1, char *text2, UnicodeMap *uMap) {
+ Object obj;
+ GooString *s1;
+ GBool isUnicode;
+ Unicode u;
+ char buf[8];
+ int i, n;
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ fputs(text1, f);
+ s1 = obj.getString();
+ if ((s1->getChar(0) & 0xff) == 0xfe &&
+ (s1->getChar(1) & 0xff) == 0xff) {
+ isUnicode = gTrue;
+ i = 2;
+ } else {
+ isUnicode = gFalse;
+ i = 0;
+ }
+ while (i < obj.getString()->getLength()) {
+ if (isUnicode) {
+ u = ((s1->getChar(i) & 0xff) << 8) |
+ (s1->getChar(i+1) & 0xff);
+ i += 2;
+ } else {
+ u = s1->getChar(i) & 0xff;
+ ++i;
+ }
+ n = uMap->mapUnicode(u, buf, sizeof(buf));
+ fwrite(buf, 1, n, f);
+ }
+ fputs(text2, f);
+ }
+ obj.free();
+}
+
+static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt) {
+ Object obj;
+ char *s;
+
+ if (infoDict->lookup(key, &obj)->isString()) {
+ s = obj.getString()->getCString();
+ if (s[0] == 'D' && s[1] == ':') {
+ s += 2;
+ }
+ fprintf(f, fmt, s);
+ }
+ obj.free();
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc
new file mode 100644
index 00000000000..dec6f98fbbd
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.cc
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "printencodings.h"
+
+#include "GlobalParams.h"
+#include "goo/GooList.h"
+#include "goo/GooString.h"
+
+void printEncodings()
+{
+ GooList *encNames = globalParams->getEncodingNames();
+ printf("Available encodings are:\n");
+ for (int i = 0; i < encNames->getLength(); ++i) {
+ GooString *enc = (GooString*)encNames->get(i);
+ printf("%s\n", enc->getCString());
+ }
+ delete encNames;
+}
diff --git a/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h
new file mode 100644
index 00000000000..5be2819f2f1
--- /dev/null
+++ b/Build/source/libs/poppler/poppler-0.12.4/utils/printencodings.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PRINTENCODINGS_H
+#define PRINTENCODINGS_H
+
+void printEncodings();
+
+#endif
diff --git a/Build/source/libs/poppler/poppler/Makefile.am b/Build/source/libs/poppler/poppler/Makefile.am
new file mode 100644
index 00000000000..bf96eaa8a1a
--- /dev/null
+++ b/Build/source/libs/poppler/poppler/Makefile.am
@@ -0,0 +1,12 @@
+## Proxy Makefile.am to build xpdf Xpdf library for TeX Live.
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+##
+## This file is free software; the copyright holder
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+##
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/poppler
+
+include $(top_srcdir)/hdrs.am
+
diff --git a/Build/source/libs/poppler/poppler/Makefile.in b/Build/source/libs/poppler/poppler/Makefile.in
new file mode 100644
index 00000000000..f8708783f16
--- /dev/null
+++ b/Build/source/libs/poppler/poppler/Makefile.in
@@ -0,0 +1,335 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/hdrs.am
+subdir = poppler
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/aconf.h \
+ $(top_builddir)/poppler-0.12.4/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POPPLER_TREE = @POPPLER_TREE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SRCDIR = $(top_srcdir)/$(POPPLER_TREE)/poppler
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/hdrs.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign poppler/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign poppler/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+ distclean distclean-generic distclean-local distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am
+
+all-local:
+ @for file in $(SRCDIR)/*.h; do \
+ inst=`echo $$file | sed -e 's/^.*\///'`; \
+ test -f $$inst || { \
+ echo "$(LN_S) $$file $$inst"; \
+ $(LN_S) $$file $$inst; } || exit 1; \
+ done
+
+distclean-local:
+ rm -f *.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Build/source/libs/t1lib/aclocal.m4 b/Build/source/libs/t1lib/aclocal.m4
index 76a153698ad..a1fa316dd97 100644
--- a/Build/source/libs/t1lib/aclocal.m4
+++ b/Build/source/libs/t1lib/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/libs/t1lib/configure b/Build/source/libs/t1lib/configure
index 4d34ff7c879..9fbd82a3061 100755
--- a/Build/source/libs/t1lib/configure
+++ b/Build/source/libs/t1lib/configure
@@ -716,8 +716,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -5412,10 +5411,10 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_links="$ac_config_links"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_links="`echo $ac_config_links`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/teckit/configure b/Build/source/libs/teckit/configure
index 57d81f2ea5b..90caeb25518 100755
--- a/Build/source/libs/teckit/configure
+++ b/Build/source/libs/teckit/configure
@@ -738,13 +738,8 @@ CPPFLAGS
CCC
CC
CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CXXCPP
-CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -6277,9 +6272,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/xpdf/aclocal.m4 b/Build/source/libs/xpdf/aclocal.m4
index 76a153698ad..a1fa316dd97 100644
--- a/Build/source/libs/xpdf/aclocal.m4
+++ b/Build/source/libs/xpdf/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/libs/xpdf/configure b/Build/source/libs/xpdf/configure
index 069d9ab5083..efcc690dd24 100755
--- a/Build/source/libs/xpdf/configure
+++ b/Build/source/libs/xpdf/configure
@@ -718,9 +718,6 @@ LIBS
CPPFLAGS
CXX
CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CCC
CPP'
@@ -5643,10 +5640,10 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_links="$ac_config_links"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_links="`echo $ac_config_links`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/zlib/configure b/Build/source/libs/zlib/configure
index 05b5caf174d..c61da2e9e5d 100755
--- a/Build/source/libs/zlib/configure
+++ b/Build/source/libs/zlib/configure
@@ -710,8 +710,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -5021,9 +5020,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/libs/zziplib/configure b/Build/source/libs/zziplib/configure
index b5024233441..c8748782ee1 100755
--- a/Build/source/libs/zziplib/configure
+++ b/Build/source/libs/zziplib/configure
@@ -727,8 +727,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -6344,9 +6343,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4
index 42bea6d2286..01efcd12830 100644
--- a/Build/source/m4/kpse-pkgs.m4
+++ b/Build/source/m4/kpse-pkgs.m4
@@ -31,6 +31,7 @@ teckit
graphite
zziplib
xpdf
+poppler
gd
freetype2
freetype
@@ -60,6 +61,7 @@ AC_REQUIRE([KPSE_FREETYPE_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_FREETYPE2_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_GD_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl
+AC_REQUIRE([KPSE_POPPLER_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_ZZIPLIB_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_GRAPHITE_SYSTEM_FLAGS])[]dnl
AC_REQUIRE([KPSE_TECKIT_SYSTEM_FLAGS])[]dnl
diff --git a/Build/source/m4/kpse-poppler-flags.m4 b/Build/source/m4/kpse-poppler-flags.m4
new file mode 100644
index 00000000000..7ff257ab236
--- /dev/null
+++ b/Build/source/m4/kpse-poppler-flags.m4
@@ -0,0 +1,44 @@
+# Public macros for the TeX Live (TL) tree.
+# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 0
+
+# KPSE_POPPLER_FLAGS
+# ---------------
+# Provide the configure option '--with-system-poppler' (if in the TL tree).
+#
+# Set the make variables XPDF_INCLUDES and XPDF_LIBS to the CPPFLAGS and
+# LIBS required for the `-lxpdf' library in libs/poppler/ of the TL tree.
+AC_DEFUN([KPSE_POPPLER_FLAGS],
+[_KPSE_LIB_FLAGS([poppler], [poppler], [],
+ [-DPDF_PARSER_ONLY -IBLD/libs/poppler -IBLD/libs/poppler/goo -IBLD/libs/poppler/poppler],
+ [BLD/libs/poppler/libpoppler.a], [],
+ [], [${top_builddir}/../../libs/poppler/poppler/Stream.h])[]dnl
+]) # KPSE_POPPLER_FLAGS
+
+# KPSE_POPPLER_OPTIONS([WITH-SYSTEM])
+# --------------------------------
+AC_DEFUN([KPSE_POPPLER_OPTIONS],
+[m4_ifval([$1],
+ [AC_ARG_WITH([system-poppler],
+ AS_HELP_STRING([--with-system-poppler],
+ [use installed poppler headers and library instead of poppler
+ (requires pkg-config)]))])[]dnl
+]) # KPSE_POPPLER_OPTIONS
+
+# KPSE_POPPLER_SYSTEM_FLAGS
+# ----------------------
+AC_DEFUN([KPSE_POPPLER_SYSTEM_FLAGS],
+[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+if $PKG_CONFIG poppler --atleast-version=0.10; then
+ POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+ POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
+ AC_MSG_ERROR([did not find poppler-0.10 or better])
+fi
+]) # KPSE_POPPLER_SYSTEM_FLAGS
diff --git a/Build/source/texk/Makefile.in b/Build/source/texk/Makefile.in
index ca84e1c7717..f2e905132c2 100644
--- a/Build/source/texk/Makefile.in
+++ b/Build/source/texk/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../m4/kpse-options.m4 \
$(top_srcdir)/../m4/kpse-pkgs.m4 \
+ $(top_srcdir)/../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../m4/kpse-setup.m4 \
$(top_srcdir)/../m4/kpse-t1lib-flags.m4 \
@@ -122,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../libs/graphite/ac/withenable.ac \
$(top_srcdir)/../libs/zziplib/ac/withenable.ac \
$(top_srcdir)/../libs/xpdf/ac/withenable.ac \
+ $(top_srcdir)/../libs/poppler/ac/withenable.ac \
$(top_srcdir)/../libs/gd/ac/withenable.ac \
$(top_srcdir)/../libs/freetype2/ac/withenable.ac \
$(top_srcdir)/../libs/freetype/ac/withenable.ac \
diff --git a/Build/source/texk/aclocal.m4 b/Build/source/texk/aclocal.m4
index 9eb7b6d1a8d..86d2a2ce443 100644
--- a/Build/source/texk/aclocal.m4
+++ b/Build/source/texk/aclocal.m4
@@ -1001,6 +1001,7 @@ m4_include([../m4/kpse-libpng-flags.m4])
m4_include([../m4/kpse-lt-hack.m4])
m4_include([../m4/kpse-options.m4])
m4_include([../m4/kpse-pkgs.m4])
+m4_include([../m4/kpse-poppler-flags.m4])
m4_include([../m4/kpse-ptexenc-flags.m4])
m4_include([../m4/kpse-setup.m4])
m4_include([../m4/kpse-t1lib-flags.m4])
diff --git a/Build/source/texk/afm2pl/configure b/Build/source/texk/afm2pl/configure
index 663714ce27a..62915400fa3 100755
--- a/Build/source/texk/afm2pl/configure
+++ b/Build/source/texk/afm2pl/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14628,9 +14627,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/bibtex8/configure b/Build/source/texk/bibtex8/configure
index a62cc898b86..171ab418d82 100755
--- a/Build/source/texk/bibtex8/configure
+++ b/Build/source/texk/bibtex8/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14542,9 +14541,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/bibtexu/configure b/Build/source/texk/bibtexu/configure
index f669f3b5cef..9fe363326a1 100755
--- a/Build/source/texk/bibtexu/configure
+++ b/Build/source/texk/bibtexu/configure
@@ -760,7 +760,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
enable_compiler_warnings
-with_gnu_ld
enable_cxx_runtime_hack
with_system_kpathsea
with_kpathsea_includes
@@ -776,12 +775,8 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
CXX
CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CCC
CXXCPP'
@@ -18967,9 +18962,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/cjkutils/configure b/Build/source/texk/cjkutils/configure
index 2e9f68243dc..d6f76480eab 100755
--- a/Build/source/texk/cjkutils/configure
+++ b/Build/source/texk/cjkutils/configure
@@ -768,8 +768,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14868,9 +14867,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/configure b/Build/source/texk/configure
index 6940f5d27ac..a8cf420e523 100755
--- a/Build/source/texk/configure
+++ b/Build/source/texk/configure
@@ -771,6 +771,7 @@ with_graphite
with_system_graphite
with_system_zziplib
with_system_xpdf
+with_system_poppler
with_system_gd
with_gd_includes
with_gd_libdir
@@ -1610,6 +1611,8 @@ Optional Packages:
pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
+ --with-system-poppler use installed poppler headers and library instead of
+ poppler (requires pkg-config)
--with-system-gd use installed gd headers and library
--with-gd-includes=DIR gd headers installed in DIR
--with-gd-libdir=DIR gd library installed in DIR
@@ -3569,7 +3572,7 @@ case $enable_luatex in #(
esac
test "x$enable_web2c:$enable_luatex" = xyes:yes && {
- need_xpdf=yes
+ need_poppler=yes
need_libpng=yes
need_obsdcompat=yes
need_zziplib=yes
@@ -4659,6 +4662,27 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;}
fi
+## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+## configure options and TL libraries required for poppler
+
+# Check whether --with-system-poppler was given.
+if test "${with_system_poppler+set}" = set; then :
+ withval=$with_system_poppler;
+fi
+if test "x$with_system_poppler" = x; then
+ if test -f $srcdir/../libs/poppler/configure; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5
+$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;}
+ with_system_poppler=no
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5
+$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;}
+ with_system_poppler=yes
+ fi
+ ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'"
+fi
+
+
## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/
## configure options and TL libraries required for gd
@@ -6668,8 +6692,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/detex/configure b/Build/source/texk/detex/configure
index 022bb190729..2acb6cbdf3d 100755
--- a/Build/source/texk/detex/configure
+++ b/Build/source/texk/detex/configure
@@ -762,8 +762,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14752,9 +14751,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/devnag/configure b/Build/source/texk/devnag/configure
index fd861e69d92..2806fc14fb3 100755
--- a/Build/source/texk/devnag/configure
+++ b/Build/source/texk/devnag/configure
@@ -669,8 +669,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -4515,9 +4514,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dtl/configure b/Build/source/texk/dtl/configure
index 5a3989313e4..aad50ab7ad4 100755
--- a/Build/source/texk/dtl/configure
+++ b/Build/source/texk/dtl/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14762,9 +14761,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvi2tty/configure b/Build/source/texk/dvi2tty/configure
index 161d2a490ef..54f4d099ba7 100755
--- a/Build/source/texk/dvi2tty/configure
+++ b/Build/source/texk/dvi2tty/configure
@@ -759,8 +759,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14555,9 +14554,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvidvi/configure b/Build/source/texk/dvidvi/configure
index 818dea113db..5296c4c47a6 100755
--- a/Build/source/texk/dvidvi/configure
+++ b/Build/source/texk/dvidvi/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14518,9 +14517,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dviljk/configure b/Build/source/texk/dviljk/configure
index 7d360e40338..5760d04065c 100755
--- a/Build/source/texk/dviljk/configure
+++ b/Build/source/texk/dviljk/configure
@@ -760,8 +760,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14859,9 +14858,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvipdfmx/configure b/Build/source/texk/dvipdfmx/configure
index ada68009638..a8b21053d82 100755
--- a/Build/source/texk/dvipdfmx/configure
+++ b/Build/source/texk/dvipdfmx/configure
@@ -15884,9 +15884,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure
index 0382766c876..f8f0be1d0ab 100755
--- a/Build/source/texk/dvipng/configure
+++ b/Build/source/texk/dvipng/configure
@@ -813,8 +813,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -17089,9 +17088,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvipos/configure b/Build/source/texk/dvipos/configure
index d17e9007cc0..08960049fd4 100755
--- a/Build/source/texk/dvipos/configure
+++ b/Build/source/texk/dvipos/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14608,9 +14607,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvipsk/configure b/Build/source/texk/dvipsk/configure
index 6ea87da11ac..08a9ca8689c 100755
--- a/Build/source/texk/dvipsk/configure
+++ b/Build/source/texk/dvipsk/configure
@@ -760,8 +760,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
ac_subdirs_all='squeeze'
# Initialize some variables set by options.
@@ -14833,9 +14832,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvipsk/squeeze/configure b/Build/source/texk/dvipsk/squeeze/configure
index 0d2597f81d1..329d08ff8b6 100755
--- a/Build/source/texk/dvipsk/squeeze/configure
+++ b/Build/source/texk/dvipsk/squeeze/configure
@@ -3948,8 +3948,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index 47ef57a594c..d9f6dc4f2ba 100755
--- a/Build/source/texk/dvisvgm/configure
+++ b/Build/source/texk/dvisvgm/configure
@@ -772,7 +772,6 @@ enable_compiler_warnings
with_system_libgs
with_libgs_includes
with_libgs_libdir
-with_gnu_ld
enable_cxx_runtime_hack
with_system_kpathsea
with_kpathsea_includes
@@ -791,12 +790,8 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
CXX
CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CCC
CXXCPP'
@@ -19498,9 +19493,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/gsftopk/configure b/Build/source/texk/gsftopk/configure
index 234502cbe93..008aa9ff78e 100755
--- a/Build/source/texk/gsftopk/configure
+++ b/Build/source/texk/gsftopk/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14947,9 +14946,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure
index 32f77eab1fd..b2c264e2728 100755
--- a/Build/source/texk/kpathsea/configure
+++ b/Build/source/texk/kpathsea/configure
@@ -765,8 +765,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -13463,9 +13462,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/lacheck/configure b/Build/source/texk/lacheck/configure
index b5c8546f6f1..6acc07b287e 100755
--- a/Build/source/texk/lacheck/configure
+++ b/Build/source/texk/lacheck/configure
@@ -755,8 +755,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -13227,9 +13226,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure
index 5410039e0f6..94451b19f37 100755
--- a/Build/source/texk/lcdf-typetools/configure
+++ b/Build/source/texk/lcdf-typetools/configure
@@ -764,7 +764,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
enable_compiler_warnings
-with_gnu_ld
enable_cxx_runtime_hack
enable_cfftot1
enable_mmafm
@@ -777,8 +776,6 @@ enable_t1rawafm
enable_t1reencode
enable_t1testpage
enable_ttftotype42
-enable_cfftot1
-enable_ttftotype42
enable_updmap
with_kpathsea
with_system_kpathsea
@@ -795,12 +792,8 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
CXX
CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CCC
CXXCPP'
@@ -20438,9 +20431,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/makeindexk/configure b/Build/source/texk/makeindexk/configure
index 19f94d71021..a6c709e96c6 100755
--- a/Build/source/texk/makeindexk/configure
+++ b/Build/source/texk/makeindexk/configure
@@ -760,8 +760,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14634,9 +14633,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/makejvf/configure b/Build/source/texk/makejvf/configure
index 5d3181151bf..66207ea352e 100755
--- a/Build/source/texk/makejvf/configure
+++ b/Build/source/texk/makejvf/configure
@@ -762,8 +762,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14610,9 +14609,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/mendexk/configure b/Build/source/texk/mendexk/configure
index 7df6c35c9f6..26933fda4a9 100755
--- a/Build/source/texk/mendexk/configure
+++ b/Build/source/texk/mendexk/configure
@@ -762,8 +762,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14610,9 +14609,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/musixflx/configure b/Build/source/texk/musixflx/configure
index 2028a0ec768..9b158fe1771 100755
--- a/Build/source/texk/musixflx/configure
+++ b/Build/source/texk/musixflx/configure
@@ -3922,9 +3922,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/ps2pkm/configure b/Build/source/texk/ps2pkm/configure
index a8ced9b6342..bd4bb4f79fc 100755
--- a/Build/source/texk/ps2pkm/configure
+++ b/Build/source/texk/ps2pkm/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14755,9 +14754,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/ptexenc/configure b/Build/source/texk/ptexenc/configure
index 0033bb81d77..e2bca918db1 100755
--- a/Build/source/texk/ptexenc/configure
+++ b/Build/source/texk/ptexenc/configure
@@ -762,8 +762,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14735,9 +14734,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/seetexk/configure b/Build/source/texk/seetexk/configure
index 7c9d4d5c486..11124bac098 100755
--- a/Build/source/texk/seetexk/configure
+++ b/Build/source/texk/seetexk/configure
@@ -758,8 +758,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14787,9 +14786,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/tetex/configure b/Build/source/texk/tetex/configure
index e1ad58e1f7e..2401df12e42 100755
--- a/Build/source/texk/tetex/configure
+++ b/Build/source/texk/tetex/configure
@@ -3997,8 +3997,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/tex4htk/configure b/Build/source/texk/tex4htk/configure
index 1d132067373..393267a9a3b 100755
--- a/Build/source/texk/tex4htk/configure
+++ b/Build/source/texk/tex4htk/configure
@@ -762,8 +762,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14838,9 +14837,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/texlive/configure b/Build/source/texk/texlive/configure
index f7854642805..0380c893a0f 100755
--- a/Build/source/texk/texlive/configure
+++ b/Build/source/texk/texlive/configure
@@ -3982,8 +3982,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/ttf2pk/configure b/Build/source/texk/ttf2pk/configure
index d3666685613..011fea10fa3 100755
--- a/Build/source/texk/ttf2pk/configure
+++ b/Build/source/texk/ttf2pk/configure
@@ -765,8 +765,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -14680,9 +14679,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/ttfdump/configure b/Build/source/texk/ttfdump/configure
index c94c1776122..d7ff0756565 100755
--- a/Build/source/texk/ttfdump/configure
+++ b/Build/source/texk/ttfdump/configure
@@ -751,8 +751,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -13564,9 +13563,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/web2c/Makefile.am b/Build/source/texk/web2c/Makefile.am
index 7e112ade39c..af2a2844f8a 100644
--- a/Build/source/texk/web2c/Makefile.am
+++ b/Build/source/texk/web2c/Makefile.am
@@ -89,6 +89,8 @@ $(proglib): ${srcdir}/lib/*.c
@LIBPNG_RULE@
## Rebuild libxpdf & Co
@XPDF_RULE@
+## Rebuild poppler
+@POPPLER_RULE@
## Rebuild libopenbsd-compat
@OBSDCOMPAT_RULE@
## Rebuild libzzip
@@ -184,6 +186,7 @@ include $(srcdir)/luatexdir/am/luasocket.am
include $(srcdir)/luatexdir/am/luamisc.am
include $(srcdir)/luatexdir/am/luafontforge.am
include $(srcdir)/luatexdir/am/libluatex.am
+include $(srcdir)/luatexdir/am/txt2zlib.am
## XeTeX
include $(srcdir)/xetexdir/am/xetex.am
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 06354f80f72..f495db44a18 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -48,7 +48,7 @@ bin_PROGRAMS = tangle$(EXEEXT) ctangle$(EXEEXT) $(am__EXEEXT_6) \
$(am__EXEEXT_20) $(am__EXEEXT_21) $(am__EXEEXT_22) \
$(am__EXEEXT_23) synctex$(EXEEXT)
noinst_PROGRAMS = tangleboot$(EXEEXT) ctangleboot$(EXEEXT) \
- $(am__EXEEXT_31)
+ $(am__EXEEXT_31) txt2zlib$(EXEEXT)
check_PROGRAMS = $(am__EXEEXT_24) $(am__EXEEXT_25) $(am__EXEEXT_26) \
$(am__EXEEXT_27) $(am__EXEEXT_28) $(am__EXEEXT_29) \
$(am__EXEEXT_30) md5main$(EXEEXT)
@@ -76,6 +76,7 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
$(srcdir)/luatexdir/am/luamisc.am \
$(srcdir)/luatexdir/am/luasocket.am \
$(srcdir)/luatexdir/am/luatex.am \
+ $(srcdir)/luatexdir/am/txt2zlib.am \
$(srcdir)/mplibdir/am/libmplib.am \
$(srcdir)/mplibdir/am/mplib.am \
$(srcdir)/omegaware/am/omegaware.am \
@@ -245,6 +246,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -356,6 +358,7 @@ am_libluatex_a_OBJECTS = libluatex_a-pdftoepdf.$(OBJEXT) \
libluatex_a-lfontlib.$(OBJEXT) libluatex_a-limglib.$(OBJEXT) \
libluatex_a-lepdflib.$(OBJEXT) libluatex_a-lkpselib.$(OBJEXT) \
libluatex_a-llanglib.$(OBJEXT) libluatex_a-llualib.$(OBJEXT) \
+ libluatex_a-llfslibext.$(OBJEXT) \
libluatex_a-lnodelib.$(OBJEXT) libluatex_a-loslibext.$(OBJEXT) \
libluatex_a-liolib.$(OBJEXT) libluatex_a-lpdflib.$(OBJEXT) \
libluatex_a-lstatslib.$(OBJEXT) \
@@ -374,15 +377,14 @@ nodist_libluatex_a_OBJECTS = libluatex_a-dvigen.$(OBJEXT) \
libluatex_a-writet1.$(OBJEXT) libluatex_a-writet3.$(OBJEXT) \
libluatex_a-writettf.$(OBJEXT) \
libluatex_a-writetype0.$(OBJEXT) \
- libluatex_a-writetype2.$(OBJEXT) libluatex_a-epdf.$(OBJEXT) \
+ libluatex_a-writetype2.$(OBJEXT) \
libluatex_a-writeimg.$(OBJEXT) \
libluatex_a-writejbig2.$(OBJEXT) \
- libluatex_a-writejpg.$(OBJEXT) libluatex_a-writepng.$(OBJEXT) \
- libluatex_a-luagen.$(OBJEXT) libluatex_a-luainit.$(OBJEXT) \
- libluatex_a-luanode.$(OBJEXT) libluatex_a-luastuff.$(OBJEXT) \
- libluatex_a-luatoken.$(OBJEXT) libluatex_a-texluac.$(OBJEXT) \
- libluatex_a-ocp.$(OBJEXT) libluatex_a-ocplist.$(OBJEXT) \
- libluatex_a-readocp.$(OBJEXT) libluatex_a-runocp.$(OBJEXT) \
+ libluatex_a-writejpg.$(OBJEXT) libluatex_a-writejp2.$(OBJEXT) \
+ libluatex_a-writepng.$(OBJEXT) libluatex_a-luagen.$(OBJEXT) \
+ libluatex_a-luainit.$(OBJEXT) libluatex_a-luanode.$(OBJEXT) \
+ libluatex_a-luastuff.$(OBJEXT) libluatex_a-luatoken.$(OBJEXT) \
+ libluatex_a-texluac.$(OBJEXT) libluatex_a-pdflua.$(OBJEXT) \
libluatex_a-texlang.$(OBJEXT) libluatex_a-hyphen.$(OBJEXT) \
libluatex_a-hnjalloc.$(OBJEXT) libluatex_a-pagetree.$(OBJEXT) \
libluatex_a-pdfaction.$(OBJEXT) libluatex_a-pdfannot.$(OBJEXT) \
@@ -391,7 +393,8 @@ nodist_libluatex_a_OBJECTS = libluatex_a-dvigen.$(OBJEXT) \
libluatex_a-pdfgen.$(OBJEXT) libluatex_a-pdfglyph.$(OBJEXT) \
libluatex_a-pdfimage.$(OBJEXT) libluatex_a-pdflink.$(OBJEXT) \
libluatex_a-pdflistout.$(OBJEXT) \
- libluatex_a-pdfliteral.$(OBJEXT) libluatex_a-pdfobj.$(OBJEXT) \
+ libluatex_a-pdfliteral.$(OBJEXT) \
+ libluatex_a-pdfluaapi.$(OBJEXT) libluatex_a-pdfobj.$(OBJEXT) \
libluatex_a-pdfoutline.$(OBJEXT) libluatex_a-pdfpage.$(OBJEXT) \
libluatex_a-pdfrule.$(OBJEXT) \
libluatex_a-pdfsaverestore.$(OBJEXT) \
@@ -805,6 +808,11 @@ tie_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1)
am_ttf2afm_OBJECTS = ttf2afm-ttf2afm.$(OBJEXT)
ttf2afm_OBJECTS = $(am_ttf2afm_OBJECTS)
ttf2afm_LDADD = $(LDADD)
+nodist_txt2zlib_OBJECTS = txt2zlib-txt2zlib.$(OBJEXT)
+txt2zlib_OBJECTS = $(nodist_txt2zlib_OBJECTS)
+txt2zlib_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(txt2zlib_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
nodist_vftovp_OBJECTS = vftovp.$(OBJEXT)
vftovp_OBJECTS = $(nodist_vftovp_OBJECTS)
vftovp_LDADD = $(LDADD)
@@ -899,9 +907,10 @@ SOURCES = $(libff_a_SOURCES) $(libkanji_a_SOURCES) \
$(dist_tex_SOURCES) $(nodist_tex_SOURCES) \
$(nodist_tftopl_SOURCES) $(nodist_tie_SOURCES) \
$(ttf2afm_SOURCES) $(EXTRA_ttf2afm_SOURCES) \
- $(nodist_vftovp_SOURCES) $(nodist_vptovf_SOURCES) \
- $(nodist_weave_SOURCES) $(dist_xetex_SOURCES) \
- $(nodist_xetex_SOURCES) $(nodist_EXTRA_xetex_SOURCES)
+ $(nodist_txt2zlib_SOURCES) $(nodist_vftovp_SOURCES) \
+ $(nodist_vptovf_SOURCES) $(nodist_weave_SOURCES) \
+ $(dist_xetex_SOURCES) $(nodist_xetex_SOURCES) \
+ $(nodist_EXTRA_xetex_SOURCES)
DIST_SOURCES = $(libff_a_SOURCES) $(libkanji_a_SOURCES) \
$(liblua51_a_SOURCES) $(libluamisc_a_SOURCES) \
$(EXTRA_libluamisc_a_SOURCES) $(libluasocket_a_SOURCES) \
@@ -1098,6 +1107,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -1112,6 +1124,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
@@ -1455,19 +1468,20 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) tangle.c tangle.h tangle.p \
$(nodist_eptex_SOURCES) eptex.web eptex.ch eptex-web2c eptex.p \
eptex.pool eptex-tangle eptrip.diffs $(nodist_pdftex_SOURCES) \
pdftex.ch pdftex-web2c pdftex.p pdftex.pool pdftex-tangle \
- $(nodist_libluatex_a_SOURCES) $(nodist_xetex_SOURCES) \
- xetex.web xetex-web2c xetex.p xetex.pool xetex-tangle \
- $(omegaware_programs:=.c) $(omegaware_programs:=.h) \
- $(omegaware_programs:=.p) $(omegaware_programs:=-web2c) \
- omegaware/tests/xlevel1.ofm omegaware/tests/xlevel1.opl \
- ofont*vf omegaware/tests/xofont* omegaware/tests/Cherokee.tfm \
- omegaware/tests/OCherokee.ofm omegaware/tests/OCherokee.opl \
- omegaware/tests/OCherokee.ovf omegaware/tests/xCherokee.* \
- omegaware/tests/xOCherokee.* cftest.p \
- omegaware/tests/xrepeated.* omegaware/tests/specialhex.ofm \
- omegaware/tests/specialhex.opl omegaware/tests/specialhex.ovf \
- omegaware/tests/xspecialhex.* $(nodist_aleph_SOURCES) \
- aleph.web aleph.ch aleph-web2c aleph.p aleph.pool aleph-tangle
+ $(nodist_libluatex_a_SOURCES) txt2zlib.c \
+ $(nodist_xetex_SOURCES) xetex.web xetex-web2c xetex.p \
+ xetex.pool xetex-tangle $(omegaware_programs:=.c) \
+ $(omegaware_programs:=.h) $(omegaware_programs:=.p) \
+ $(omegaware_programs:=-web2c) omegaware/tests/xlevel1.ofm \
+ omegaware/tests/xlevel1.opl ofont*vf omegaware/tests/xofont* \
+ omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \
+ omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \
+ omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* \
+ cftest.p omegaware/tests/xrepeated.* \
+ omegaware/tests/specialhex.ofm omegaware/tests/specialhex.opl \
+ omegaware/tests/specialhex.ovf omegaware/tests/xspecialhex.* \
+ $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c aleph.p \
+ aleph.pool aleph-tangle
CLEANFILES =
TRIPTRAP_CLEAN = $(am__append_9) $(am__append_17) $(am__append_24) \
$(am__append_29) $(am__append_35) $(am__append_40)
@@ -1827,7 +1841,7 @@ pdftosrc_DEPENDENCIES = $(pdftex_dependencies)
# Force Automake to use CXXLD for linking
nodist_EXTRA_luatex_SOURCES = dummy.cxx
luatex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) \
- $(XPDF_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5 \
+ $(POPPLER_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5 \
-I$(srcdir)/luatexdir -I$(srcdir)/luatexdir/lua51 \
-I$(srcdir)/mplibdir -Dextra_version_info=`date +-%Y%m%d%H` \
-I$(srcdir)/synctexdir \
@@ -1835,11 +1849,11 @@ luatex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) \
luatex_CXXFLAGS = $(WARNING_CXXFLAGS)
luatex_ldadd = libluatex.a libff.a libluamisc.a libluasocket.a \
liblua51.a $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) \
- $(XPDF_LIBS) $(OBSDCOMPAT_LIBS) libmd5.a libmplib.a
+ $(POPPLER_LIBS) $(OBSDCOMPAT_LIBS) libmd5.a libmplib.a
luatex_LDFLAGS = -export-dynamic
luatex_LDADD = $(luatex_ldadd) $(LDADD) $(LIBADD_DLOPEN) $(lua_socketlibs)
luatex_DEPENDENCIES = $(proglib) $(KPATHSEA_DEPEND) libluatex.a \
- $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(XPDF_DEPEND) \
+ $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(POPPLER_DEPEND) \
$(OBSDCOMPAT_DEPEND) libmd5.a libmplib.a
luatex_SOURCES = luatexdir/luatex_svnversion.h luatexdir/luatex.c luatexdir/luatex.h
call_luatex_CPPFLAGS = -DEXEPROG=\"luatex.exe\"
@@ -1849,7 +1863,8 @@ call_luatex_LDADD =
# luaTeX Tests
#
luatex_tests = luatexdir/luatex.test
-liblua51_a_CPPFLAGS = -I$(top_srcdir)/luatexdir/lua51 $(am__append_50)
+liblua51_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/luatexdir/lua51 \
+ $(am__append_50)
liblua51_a_CFLAGS = # $(WARNING_CFLAGS)
liblua51_a_SOURCES = \
luatexdir/lua51/lapi.c \
@@ -1907,7 +1922,7 @@ liblua51_a_SOURCES = \
luatexdir/lua51/lzio.h
libluasocket_a_DEPENDENCIES = $(ZLIB_DEPEND) liblua51.a
-libluasocket_a_CPPFLAGS = \
+libluasocket_a_CPPFLAGS = $(AM_CPPFLAGS) \
-DLUASOCKET_DEBUG -I$(top_srcdir)/luatexdir/luasocket -I$(srcdir)/luatexdir/lua51
libluasocket_a_CFLAGS = # $(WARNING_CFLAGS)
@@ -1942,7 +1957,7 @@ libluasocket_a_SOURCES = \
luatexdir/luasocket/src/usocket.h
libluamisc_a_DEPENDENCIES = $(ZZIPLIB_DEPEND) libluasocket.a
-libluamisc_a_CPPFLAGS = \
+libluamisc_a_CPPFLAGS = $(AM_CPPFLAGS) \
$(ZLIB_INCLUDES) \
$(ZZIPLIB_INCLUDES) \
-I$(top_srcdir)/luatexdir/lua51
@@ -1974,8 +1989,7 @@ libluamisc_a_SOURCES = \
EXTRA_libluamisc_a_SOURCES = luatexdir/slnunicode/slnudata.c
libff_a_DEPENDENCIES = libluamisc.a
-libff_a_CPPFLAGS = \
- $(AM_CPPFLAGS) \
+libff_a_CPPFLAGS = $(AM_CPPFLAGS) \
-DFONTFORGE_CONFIG_NO_WINDOWING_UI=1 -DLUA_FF_LIB=1 \
-D_NO_PYTHON=1 -DX_DISPLAY_MISSING=1 -DNODYNAMIC=1 \
-D_NO_FREETYPE=1 -D_NO_LIBUNINAMESLIST=1 -UHAVE_LIBINTL_H \
@@ -2086,7 +2100,7 @@ libff_a_SOURCES = \
libluatex_a_DEPENDENCIES = libff.a
libluatex_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) \
- $(LIBPNG_INCLUDES) $(XPDF_INCLUDES) $(OBSDCOMPAT_INCLUDES) \
+ $(LIBPNG_INCLUDES) $(POPPLER_INCLUDES) $(OBSDCOMPAT_INCLUDES) \
-I$(srcdir)/libmd5 -I$(srcdir)/luatexdir \
-I$(srcdir)/luatexdir/lua51 -DpdfTeX -I$(srcdir)/synctexdir \
-DSYNCTEX_ENGINE_H='<utils/synctex-luatex.h>'
@@ -2103,14 +2117,12 @@ libluatex_web = luatexdir/dvi/dvigen.w luatexdir/font/dofont.w \
luatexdir/font/writefont.w luatexdir/font/writet1.w \
luatexdir/font/writet3.w luatexdir/font/writettf.w \
luatexdir/font/writetype0.w luatexdir/font/writetype2.w \
- luatexdir/image/epdf.w luatexdir/image/writeimg.w \
- luatexdir/image/writejbig2.w luatexdir/image/writejpg.w \
+ luatexdir/image/writeimg.w luatexdir/image/writejbig2.w \
+ luatexdir/image/writejpg.w luatexdir/image/writejp2.w \
luatexdir/image/writepng.w luatexdir/lua/luagen.w \
luatexdir/lua/luainit.w luatexdir/lua/luanode.w \
luatexdir/lua/luastuff.w luatexdir/lua/luatoken.w \
- luatexdir/lua/texluac.w luatexdir/ocp/ocp.w \
- luatexdir/ocp/ocplist.w luatexdir/ocp/readocp.w \
- luatexdir/ocp/runocp.w luatexdir/lang/texlang.w \
+ luatexdir/lua/texluac.w luatexdir/lang/texlang.w \
luatexdir/lang/hyphen.w luatexdir/lang/hnjalloc.w \
luatexdir/pdf/pagetree.w luatexdir/pdf/pdfaction.w \
luatexdir/pdf/pdfannot.w luatexdir/pdf/pdfcolorstack.w \
@@ -2118,53 +2130,53 @@ libluatex_web = luatexdir/dvi/dvigen.w luatexdir/font/dofont.w \
luatexdir/pdf/pdfgen.w luatexdir/pdf/pdfglyph.w \
luatexdir/pdf/pdfimage.w luatexdir/pdf/pdflink.w \
luatexdir/pdf/pdflistout.w luatexdir/pdf/pdfliteral.w \
- luatexdir/pdf/pdfobj.w luatexdir/pdf/pdfoutline.w \
- luatexdir/pdf/pdfpage.w luatexdir/pdf/pdfrule.w \
- luatexdir/pdf/pdfsaverestore.w luatexdir/pdf/pdfsetmatrix.w \
- luatexdir/pdf/pdfshipout.w luatexdir/pdf/pdftables.w \
- luatexdir/pdf/pdfthread.w luatexdir/pdf/pdfxform.w \
- luatexdir/tex/align.w luatexdir/tex/dumpdata.w \
- luatexdir/tex/expand.w luatexdir/tex/inputstack.w \
- luatexdir/tex/maincontrol.w luatexdir/tex/mlist.w \
- luatexdir/tex/postlinebreak.w luatexdir/tex/scanning.w \
- luatexdir/tex/texdeffont.w luatexdir/tex/texnodes.w \
- luatexdir/tex/arithmetic.w luatexdir/tex/conditional.w \
- luatexdir/tex/equivalents.w luatexdir/tex/extensions.w \
- luatexdir/tex/commands.w luatexdir/tex/linebreak.w \
- luatexdir/tex/mathcodes.w luatexdir/tex/nesting.w \
- luatexdir/tex/primitive.w luatexdir/tex/texfileio.w \
- luatexdir/tex/textcodes.w luatexdir/tex/buildpage.w \
- luatexdir/tex/directions.w luatexdir/tex/errors.w \
- luatexdir/tex/filename.w luatexdir/tex/mainbody.w \
- luatexdir/tex/memoryword.w luatexdir/tex/packaging.w \
- luatexdir/tex/printing.w luatexdir/tex/stringpool.w \
- luatexdir/tex/texmath.w luatexdir/tex/textoken.w \
- luatexdir/utils/utils.w luatexdir/utils/avlstuff.w \
- luatexdir/utils/managed-sa.w
+ luatexdir/pdf/pdfluaapi.w luatexdir/pdf/pdfobj.w \
+ luatexdir/pdf/pdfoutline.w luatexdir/pdf/pdfpage.w \
+ luatexdir/pdf/pdfrule.w luatexdir/pdf/pdfsaverestore.w \
+ luatexdir/pdf/pdfsetmatrix.w luatexdir/pdf/pdfshipout.w \
+ luatexdir/pdf/pdftables.w luatexdir/pdf/pdfthread.w \
+ luatexdir/pdf/pdfxform.w luatexdir/tex/align.w \
+ luatexdir/tex/dumpdata.w luatexdir/tex/expand.w \
+ luatexdir/tex/inputstack.w luatexdir/tex/maincontrol.w \
+ luatexdir/tex/mlist.w luatexdir/tex/postlinebreak.w \
+ luatexdir/tex/scanning.w luatexdir/tex/texdeffont.w \
+ luatexdir/tex/texnodes.w luatexdir/tex/arithmetic.w \
+ luatexdir/tex/conditional.w luatexdir/tex/equivalents.w \
+ luatexdir/tex/extensions.w luatexdir/tex/commands.w \
+ luatexdir/tex/linebreak.w luatexdir/tex/mathcodes.w \
+ luatexdir/tex/nesting.w luatexdir/tex/primitive.w \
+ luatexdir/tex/texfileio.w luatexdir/tex/textcodes.w \
+ luatexdir/tex/buildpage.w luatexdir/tex/directions.w \
+ luatexdir/tex/errors.w luatexdir/tex/filename.w \
+ luatexdir/tex/mainbody.w luatexdir/tex/memoryword.w \
+ luatexdir/tex/packaging.w luatexdir/tex/printing.w \
+ luatexdir/tex/stringpool.w luatexdir/tex/texmath.w \
+ luatexdir/tex/textoken.w luatexdir/utils/utils.w \
+ luatexdir/utils/avlstuff.w luatexdir/utils/managed-sa.w
nodist_libluatex_a_SOURCES = dvigen.c dofont.c luafont.c mapfile.c \
pkin.c sfnt.c subfont.c texfont.c tfmofm.c tounicode.c \
tt_glyf.c tt_table.c vfovf.c vfpacket.c writecff.c writeenc.c \
writefont.c writet1.c writet3.c writettf.c writetype0.c \
- writetype2.c epdf.c writeimg.c writejbig2.c writejpg.c \
+ writetype2.c writeimg.c writejbig2.c writejpg.c writejp2.c \
writepng.c luagen.c luainit.c luanode.c luastuff.c luatoken.c \
- texluac.c ocp.c ocplist.c readocp.c runocp.c texlang.c \
- hyphen.c hnjalloc.c pagetree.c pdfaction.c pdfannot.c \
- pdfcolorstack.c pdfdest.c pdffont.c pdfgen.c pdfglyph.c \
- pdfimage.c pdflink.c pdflistout.c pdfliteral.c pdfobj.c \
- pdfoutline.c pdfpage.c pdfrule.c pdfsaverestore.c \
- pdfsetmatrix.c pdfshipout.c pdftables.c pdfthread.c pdfxform.c \
- align.c dumpdata.c expand.c inputstack.c maincontrol.c mlist.c \
- postlinebreak.c scanning.c texdeffont.c texnodes.c \
- arithmetic.c conditional.c equivalents.c extensions.c \
- commands.c linebreak.c mathcodes.c nesting.c primitive.c \
- texfileio.c textcodes.c buildpage.c directions.c errors.c \
- filename.c mainbody.c memoryword.c packaging.c printing.c \
- stringpool.c texmath.c textoken.c utils.c avlstuff.c \
- managed-sa.c mplibdir/lmplib.c
+ texluac.c pdflua.c texlang.c hyphen.c hnjalloc.c pagetree.c \
+ pdfaction.c pdfannot.c pdfcolorstack.c pdfdest.c pdffont.c \
+ pdfgen.c pdfglyph.c pdfimage.c pdflink.c pdflistout.c \
+ pdfliteral.c pdfluaapi.c pdfobj.c pdfoutline.c pdfpage.c \
+ pdfrule.c pdfsaverestore.c pdfsetmatrix.c pdfshipout.c \
+ pdftables.c pdfthread.c pdfxform.c align.c dumpdata.c expand.c \
+ inputstack.c maincontrol.c mlist.c postlinebreak.c scanning.c \
+ texdeffont.c texnodes.c arithmetic.c conditional.c \
+ equivalents.c extensions.c commands.c linebreak.c mathcodes.c \
+ nesting.c primitive.c texfileio.c textcodes.c buildpage.c \
+ directions.c errors.c filename.c mainbody.c memoryword.c \
+ packaging.c printing.c stringpool.c texmath.c textoken.c \
+ utils.c avlstuff.c managed-sa.c mplibdir/lmplib.c
luatex_font_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/font $(ctangle)
luatex_image_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/image $(ctangle)
luatex_lua_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/lua $(ctangle)
-luatex_ocp_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/ocp $(ctangle)
+luatex_luascripts_txt2zlib = $(TXTTOZLIB)
+luatex_luascripts_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/luascripts $(ctangle)
luatex_lang_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/lang $(ctangle)
luatex_pdf_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/pdf $(ctangle)
luatex_tex_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/tex $(ctangle)
@@ -2186,6 +2198,7 @@ libluatex_a_SOURCES = \
luatexdir/image/writeimg.h \
luatexdir/image/writejbig2.h \
luatexdir/image/writejpg.h \
+ luatexdir/image/writejp2.h \
luatexdir/image/writepng.h \
luatexdir/lang/hnjalloc.h \
luatexdir/lang/hyphen.h \
@@ -2197,6 +2210,7 @@ libluatex_a_SOURCES = \
luatexdir/lua/lkpselib.c \
luatexdir/lua/llanglib.c \
luatexdir/lua/llualib.c \
+ luatexdir/lua/llfslibext.c \
luatexdir/lua/lnodelib.c \
luatexdir/lua/loslibext.c \
luatexdir/lua/liolib.c \
@@ -2207,11 +2221,8 @@ libluatex_a_SOURCES = \
luatexdir/lua/ltokenlib.c \
luatexdir/lua/luagen.h \
luatexdir/lua/luatex-api.h \
+ luatexdir/luascripts/pdflua.h \
luatexdir/luatex.h \
- luatexdir/ocp/ocp.h \
- luatexdir/ocp/ocplist.h \
- luatexdir/ocp/readocp.h \
- luatexdir/ocp/runocp.h \
luatexdir/pdf/pagetree.h \
luatexdir/pdf/pdfaction.h \
luatexdir/pdf/pdfannot.h \
@@ -2224,6 +2235,7 @@ libluatex_a_SOURCES = \
luatexdir/pdf/pdflink.h \
luatexdir/pdf/pdflistout.h \
luatexdir/pdf/pdfliteral.h \
+ luatexdir/pdf/pdfluaapi.h \
luatexdir/pdf/pdfobj.h \
luatexdir/pdf/pdfoutline.h \
luatexdir/pdf/pdfpage.h \
@@ -2273,10 +2285,15 @@ libluatex_a_SOURCES = \
luatexdir/utils/managed-sa.h \
luatexdir/utils/synctex-common.h \
luatexdir/utils/synctex-luatex.h \
- luatexdir/utils/synctex.c \
luatexdir/utils/synctex.h \
+ luatexdir/utils/synctex.c \
luatexdir/utils/utils.h
+nodist_txt2zlib_SOURCES = txt2zlib.c
+txt2zlib_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES)
+txt2zlib_DEPENDENCIES = $(ZLIB_DEPEND)
+txt2zlib_CFLAGS = $(WARNING_CFLAGS)
+txt2zlib_LDADD = $(ZLIB_LIBS) $(LDADD)
# Force Automake to use CXXLD for linking
nodist_EXTRA_xetex_SOURCES = dummy.cxx
@@ -2493,7 +2510,7 @@ all: ff-config.h
.SUFFIXES: .c .cc .cin .cpp .cxx .h .hin .lo .o .obj .p .pin
am--refresh:
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/am/bootstrap.am $(srcdir)/am/web.am $(srcdir)/am/cweb.am $(srcdir)/am/texmf.am $(srcdir)/mplibdir/am/mplib.am $(srcdir)/mplibdir/am/libmplib.am $(srcdir)/etexdir/am/etex.am $(srcdir)/ptexdir/am/ptex.am $(srcdir)/eptexdir/am/eptex.am $(srcdir)/pdftexdir/am/pdftex.am $(srcdir)/pdftexdir/am/libpdftex.am $(srcdir)/pdftexdir/am/ttf2afm.am $(srcdir)/pdftexdir/am/pdftosrc.am $(srcdir)/luatexdir/am/luatex.am $(srcdir)/luatexdir/am/liblua51.am $(srcdir)/luatexdir/am/luasocket.am $(srcdir)/luatexdir/am/luamisc.am $(srcdir)/luatexdir/am/luafontforge.am $(srcdir)/luatexdir/am/libluatex.am $(srcdir)/xetexdir/am/xetex.am $(srcdir)/omegaware/am/omegaware.am $(srcdir)/alephdir/am/aleph.am $(srcdir)/synctexdir/am/synctex.am $(srcdir)/libmd5/am/md5.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/am/bootstrap.am $(srcdir)/am/web.am $(srcdir)/am/cweb.am $(srcdir)/am/texmf.am $(srcdir)/mplibdir/am/mplib.am $(srcdir)/mplibdir/am/libmplib.am $(srcdir)/etexdir/am/etex.am $(srcdir)/ptexdir/am/ptex.am $(srcdir)/eptexdir/am/eptex.am $(srcdir)/pdftexdir/am/pdftex.am $(srcdir)/pdftexdir/am/libpdftex.am $(srcdir)/pdftexdir/am/ttf2afm.am $(srcdir)/pdftexdir/am/pdftosrc.am $(srcdir)/luatexdir/am/luatex.am $(srcdir)/luatexdir/am/liblua51.am $(srcdir)/luatexdir/am/luasocket.am $(srcdir)/luatexdir/am/luamisc.am $(srcdir)/luatexdir/am/luafontforge.am $(srcdir)/luatexdir/am/libluatex.am $(srcdir)/luatexdir/am/txt2zlib.am $(srcdir)/xetexdir/am/xetex.am $(srcdir)/omegaware/am/omegaware.am $(srcdir)/alephdir/am/aleph.am $(srcdir)/synctexdir/am/synctex.am $(srcdir)/libmd5/am/md5.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -2813,6 +2830,9 @@ tie$(EXEEXT): $(tie_OBJECTS) $(tie_DEPENDENCIES)
ttf2afm$(EXEEXT): $(ttf2afm_OBJECTS) $(ttf2afm_DEPENDENCIES)
@rm -f ttf2afm$(EXEEXT)
$(LINK) $(ttf2afm_OBJECTS) $(ttf2afm_LDADD) $(LIBS)
+txt2zlib$(EXEEXT): $(txt2zlib_OBJECTS) $(txt2zlib_DEPENDENCIES)
+ @rm -f txt2zlib$(EXEEXT)
+ $(txt2zlib_LINK) $(txt2zlib_OBJECTS) $(txt2zlib_LDADD) $(LIBS)
vftovp$(EXEEXT): $(vftovp_OBJECTS) $(vftovp_DEPENDENCIES)
@rm -f vftovp$(EXEEXT)
$(LINK) $(vftovp_OBJECTS) $(vftovp_LDADD) $(LIBS)
@@ -2988,7 +3008,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-dofont.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-dumpdata.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-dvigen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-epdf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-equivalents.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-errors.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-expand.Po@am__quote@
@@ -3005,6 +3024,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-liolib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-lkpselib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-llanglib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-llfslibext.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-llualib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-lmplib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-lnodelib.Po@am__quote@
@@ -3028,8 +3048,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-memoryword.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-mlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-nesting.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-ocp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-ocplist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-packaging.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pagetree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfaction.Po@am__quote@
@@ -3043,6 +3061,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdflink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdflistout.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfliteral.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdflua.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfluaapi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfobj.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfoutline.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-pdfpage.Po@am__quote@
@@ -3058,8 +3078,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-postlinebreak.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-primitive.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-printing.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-readocp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-runocp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-scanning.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-sfnt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-stringpool.Po@am__quote@
@@ -3086,6 +3104,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writefont.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writeimg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writejbig2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writejp2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writejpg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writepng.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libluatex_a-writet1.Po@am__quote@
@@ -3201,6 +3220,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tie-tie.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttf2afm-macnames.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttf2afm-ttf2afm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txt2zlib-txt2zlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vftovp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vptovf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weave.Po@am__quote@
@@ -4912,6 +4932,20 @@ libluatex_a-llualib.obj: luatexdir/lua/llualib.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-llualib.obj `if test -f 'luatexdir/lua/llualib.c'; then $(CYGPATH_W) 'luatexdir/lua/llualib.c'; else $(CYGPATH_W) '$(srcdir)/luatexdir/lua/llualib.c'; fi`
+libluatex_a-llfslibext.o: luatexdir/lua/llfslibext.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-llfslibext.o -MD -MP -MF $(DEPDIR)/libluatex_a-llfslibext.Tpo -c -o libluatex_a-llfslibext.o `test -f 'luatexdir/lua/llfslibext.c' || echo '$(srcdir)/'`luatexdir/lua/llfslibext.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-llfslibext.Tpo $(DEPDIR)/libluatex_a-llfslibext.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='luatexdir/lua/llfslibext.c' object='libluatex_a-llfslibext.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-llfslibext.o `test -f 'luatexdir/lua/llfslibext.c' || echo '$(srcdir)/'`luatexdir/lua/llfslibext.c
+
+libluatex_a-llfslibext.obj: luatexdir/lua/llfslibext.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-llfslibext.obj -MD -MP -MF $(DEPDIR)/libluatex_a-llfslibext.Tpo -c -o libluatex_a-llfslibext.obj `if test -f 'luatexdir/lua/llfslibext.c'; then $(CYGPATH_W) 'luatexdir/lua/llfslibext.c'; else $(CYGPATH_W) '$(srcdir)/luatexdir/lua/llfslibext.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-llfslibext.Tpo $(DEPDIR)/libluatex_a-llfslibext.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='luatexdir/lua/llfslibext.c' object='libluatex_a-llfslibext.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-llfslibext.obj `if test -f 'luatexdir/lua/llfslibext.c'; then $(CYGPATH_W) 'luatexdir/lua/llfslibext.c'; else $(CYGPATH_W) '$(srcdir)/luatexdir/lua/llfslibext.c'; fi`
+
libluatex_a-lnodelib.o: luatexdir/lua/lnodelib.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-lnodelib.o -MD -MP -MF $(DEPDIR)/libluatex_a-lnodelib.Tpo -c -o libluatex_a-lnodelib.o `test -f 'luatexdir/lua/lnodelib.c' || echo '$(srcdir)/'`luatexdir/lua/lnodelib.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-lnodelib.Tpo $(DEPDIR)/libluatex_a-lnodelib.Po
@@ -5360,20 +5394,6 @@ libluatex_a-writetype2.obj: writetype2.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-writetype2.obj `if test -f 'writetype2.c'; then $(CYGPATH_W) 'writetype2.c'; else $(CYGPATH_W) '$(srcdir)/writetype2.c'; fi`
-libluatex_a-epdf.o: epdf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-epdf.o -MD -MP -MF $(DEPDIR)/libluatex_a-epdf.Tpo -c -o libluatex_a-epdf.o `test -f 'epdf.c' || echo '$(srcdir)/'`epdf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-epdf.Tpo $(DEPDIR)/libluatex_a-epdf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epdf.c' object='libluatex_a-epdf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-epdf.o `test -f 'epdf.c' || echo '$(srcdir)/'`epdf.c
-
-libluatex_a-epdf.obj: epdf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-epdf.obj -MD -MP -MF $(DEPDIR)/libluatex_a-epdf.Tpo -c -o libluatex_a-epdf.obj `if test -f 'epdf.c'; then $(CYGPATH_W) 'epdf.c'; else $(CYGPATH_W) '$(srcdir)/epdf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-epdf.Tpo $(DEPDIR)/libluatex_a-epdf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epdf.c' object='libluatex_a-epdf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-epdf.obj `if test -f 'epdf.c'; then $(CYGPATH_W) 'epdf.c'; else $(CYGPATH_W) '$(srcdir)/epdf.c'; fi`
-
libluatex_a-writeimg.o: writeimg.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-writeimg.o -MD -MP -MF $(DEPDIR)/libluatex_a-writeimg.Tpo -c -o libluatex_a-writeimg.o `test -f 'writeimg.c' || echo '$(srcdir)/'`writeimg.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-writeimg.Tpo $(DEPDIR)/libluatex_a-writeimg.Po
@@ -5416,6 +5436,20 @@ libluatex_a-writejpg.obj: writejpg.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-writejpg.obj `if test -f 'writejpg.c'; then $(CYGPATH_W) 'writejpg.c'; else $(CYGPATH_W) '$(srcdir)/writejpg.c'; fi`
+libluatex_a-writejp2.o: writejp2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-writejp2.o -MD -MP -MF $(DEPDIR)/libluatex_a-writejp2.Tpo -c -o libluatex_a-writejp2.o `test -f 'writejp2.c' || echo '$(srcdir)/'`writejp2.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-writejp2.Tpo $(DEPDIR)/libluatex_a-writejp2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='writejp2.c' object='libluatex_a-writejp2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-writejp2.o `test -f 'writejp2.c' || echo '$(srcdir)/'`writejp2.c
+
+libluatex_a-writejp2.obj: writejp2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-writejp2.obj -MD -MP -MF $(DEPDIR)/libluatex_a-writejp2.Tpo -c -o libluatex_a-writejp2.obj `if test -f 'writejp2.c'; then $(CYGPATH_W) 'writejp2.c'; else $(CYGPATH_W) '$(srcdir)/writejp2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-writejp2.Tpo $(DEPDIR)/libluatex_a-writejp2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='writejp2.c' object='libluatex_a-writejp2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-writejp2.obj `if test -f 'writejp2.c'; then $(CYGPATH_W) 'writejp2.c'; else $(CYGPATH_W) '$(srcdir)/writejp2.c'; fi`
+
libluatex_a-writepng.o: writepng.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-writepng.o -MD -MP -MF $(DEPDIR)/libluatex_a-writepng.Tpo -c -o libluatex_a-writepng.o `test -f 'writepng.c' || echo '$(srcdir)/'`writepng.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-writepng.Tpo $(DEPDIR)/libluatex_a-writepng.Po
@@ -5514,61 +5548,19 @@ libluatex_a-texluac.obj: texluac.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-texluac.obj `if test -f 'texluac.c'; then $(CYGPATH_W) 'texluac.c'; else $(CYGPATH_W) '$(srcdir)/texluac.c'; fi`
-libluatex_a-ocp.o: ocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-ocp.o -MD -MP -MF $(DEPDIR)/libluatex_a-ocp.Tpo -c -o libluatex_a-ocp.o `test -f 'ocp.c' || echo '$(srcdir)/'`ocp.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-ocp.Tpo $(DEPDIR)/libluatex_a-ocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ocp.c' object='libluatex_a-ocp.o' libtool=no @AMDEPBACKSLASH@
+libluatex_a-pdflua.o: pdflua.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-pdflua.o -MD -MP -MF $(DEPDIR)/libluatex_a-pdflua.Tpo -c -o libluatex_a-pdflua.o `test -f 'pdflua.c' || echo '$(srcdir)/'`pdflua.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-pdflua.Tpo $(DEPDIR)/libluatex_a-pdflua.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdflua.c' object='libluatex_a-pdflua.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-ocp.o `test -f 'ocp.c' || echo '$(srcdir)/'`ocp.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-pdflua.o `test -f 'pdflua.c' || echo '$(srcdir)/'`pdflua.c
-libluatex_a-ocp.obj: ocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-ocp.obj -MD -MP -MF $(DEPDIR)/libluatex_a-ocp.Tpo -c -o libluatex_a-ocp.obj `if test -f 'ocp.c'; then $(CYGPATH_W) 'ocp.c'; else $(CYGPATH_W) '$(srcdir)/ocp.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-ocp.Tpo $(DEPDIR)/libluatex_a-ocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ocp.c' object='libluatex_a-ocp.obj' libtool=no @AMDEPBACKSLASH@
+libluatex_a-pdflua.obj: pdflua.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-pdflua.obj -MD -MP -MF $(DEPDIR)/libluatex_a-pdflua.Tpo -c -o libluatex_a-pdflua.obj `if test -f 'pdflua.c'; then $(CYGPATH_W) 'pdflua.c'; else $(CYGPATH_W) '$(srcdir)/pdflua.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-pdflua.Tpo $(DEPDIR)/libluatex_a-pdflua.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdflua.c' object='libluatex_a-pdflua.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-ocp.obj `if test -f 'ocp.c'; then $(CYGPATH_W) 'ocp.c'; else $(CYGPATH_W) '$(srcdir)/ocp.c'; fi`
-
-libluatex_a-ocplist.o: ocplist.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-ocplist.o -MD -MP -MF $(DEPDIR)/libluatex_a-ocplist.Tpo -c -o libluatex_a-ocplist.o `test -f 'ocplist.c' || echo '$(srcdir)/'`ocplist.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-ocplist.Tpo $(DEPDIR)/libluatex_a-ocplist.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ocplist.c' object='libluatex_a-ocplist.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-ocplist.o `test -f 'ocplist.c' || echo '$(srcdir)/'`ocplist.c
-
-libluatex_a-ocplist.obj: ocplist.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-ocplist.obj -MD -MP -MF $(DEPDIR)/libluatex_a-ocplist.Tpo -c -o libluatex_a-ocplist.obj `if test -f 'ocplist.c'; then $(CYGPATH_W) 'ocplist.c'; else $(CYGPATH_W) '$(srcdir)/ocplist.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-ocplist.Tpo $(DEPDIR)/libluatex_a-ocplist.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ocplist.c' object='libluatex_a-ocplist.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-ocplist.obj `if test -f 'ocplist.c'; then $(CYGPATH_W) 'ocplist.c'; else $(CYGPATH_W) '$(srcdir)/ocplist.c'; fi`
-
-libluatex_a-readocp.o: readocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-readocp.o -MD -MP -MF $(DEPDIR)/libluatex_a-readocp.Tpo -c -o libluatex_a-readocp.o `test -f 'readocp.c' || echo '$(srcdir)/'`readocp.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-readocp.Tpo $(DEPDIR)/libluatex_a-readocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='readocp.c' object='libluatex_a-readocp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-readocp.o `test -f 'readocp.c' || echo '$(srcdir)/'`readocp.c
-
-libluatex_a-readocp.obj: readocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-readocp.obj -MD -MP -MF $(DEPDIR)/libluatex_a-readocp.Tpo -c -o libluatex_a-readocp.obj `if test -f 'readocp.c'; then $(CYGPATH_W) 'readocp.c'; else $(CYGPATH_W) '$(srcdir)/readocp.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-readocp.Tpo $(DEPDIR)/libluatex_a-readocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='readocp.c' object='libluatex_a-readocp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-readocp.obj `if test -f 'readocp.c'; then $(CYGPATH_W) 'readocp.c'; else $(CYGPATH_W) '$(srcdir)/readocp.c'; fi`
-
-libluatex_a-runocp.o: runocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-runocp.o -MD -MP -MF $(DEPDIR)/libluatex_a-runocp.Tpo -c -o libluatex_a-runocp.o `test -f 'runocp.c' || echo '$(srcdir)/'`runocp.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-runocp.Tpo $(DEPDIR)/libluatex_a-runocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runocp.c' object='libluatex_a-runocp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-runocp.o `test -f 'runocp.c' || echo '$(srcdir)/'`runocp.c
-
-libluatex_a-runocp.obj: runocp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-runocp.obj -MD -MP -MF $(DEPDIR)/libluatex_a-runocp.Tpo -c -o libluatex_a-runocp.obj `if test -f 'runocp.c'; then $(CYGPATH_W) 'runocp.c'; else $(CYGPATH_W) '$(srcdir)/runocp.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-runocp.Tpo $(DEPDIR)/libluatex_a-runocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runocp.c' object='libluatex_a-runocp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-runocp.obj `if test -f 'runocp.c'; then $(CYGPATH_W) 'runocp.c'; else $(CYGPATH_W) '$(srcdir)/runocp.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-pdflua.obj `if test -f 'pdflua.c'; then $(CYGPATH_W) 'pdflua.c'; else $(CYGPATH_W) '$(srcdir)/pdflua.c'; fi`
libluatex_a-texlang.o: texlang.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-texlang.o -MD -MP -MF $(DEPDIR)/libluatex_a-texlang.Tpo -c -o libluatex_a-texlang.o `test -f 'texlang.c' || echo '$(srcdir)/'`texlang.c
@@ -5780,6 +5772,20 @@ libluatex_a-pdfliteral.obj: pdfliteral.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-pdfliteral.obj `if test -f 'pdfliteral.c'; then $(CYGPATH_W) 'pdfliteral.c'; else $(CYGPATH_W) '$(srcdir)/pdfliteral.c'; fi`
+libluatex_a-pdfluaapi.o: pdfluaapi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-pdfluaapi.o -MD -MP -MF $(DEPDIR)/libluatex_a-pdfluaapi.Tpo -c -o libluatex_a-pdfluaapi.o `test -f 'pdfluaapi.c' || echo '$(srcdir)/'`pdfluaapi.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-pdfluaapi.Tpo $(DEPDIR)/libluatex_a-pdfluaapi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdfluaapi.c' object='libluatex_a-pdfluaapi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-pdfluaapi.o `test -f 'pdfluaapi.c' || echo '$(srcdir)/'`pdfluaapi.c
+
+libluatex_a-pdfluaapi.obj: pdfluaapi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-pdfluaapi.obj -MD -MP -MF $(DEPDIR)/libluatex_a-pdfluaapi.Tpo -c -o libluatex_a-pdfluaapi.obj `if test -f 'pdfluaapi.c'; then $(CYGPATH_W) 'pdfluaapi.c'; else $(CYGPATH_W) '$(srcdir)/pdfluaapi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-pdfluaapi.Tpo $(DEPDIR)/libluatex_a-pdfluaapi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdfluaapi.c' object='libluatex_a-pdfluaapi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libluatex_a-pdfluaapi.obj `if test -f 'pdfluaapi.c'; then $(CYGPATH_W) 'pdfluaapi.c'; else $(CYGPATH_W) '$(srcdir)/pdfluaapi.c'; fi`
+
libluatex_a-pdfobj.o: pdfobj.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libluatex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libluatex_a-pdfobj.o -MD -MP -MF $(DEPDIR)/libluatex_a-pdfobj.Tpo -c -o libluatex_a-pdfobj.o `test -f 'pdfobj.c' || echo '$(srcdir)/'`pdfobj.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libluatex_a-pdfobj.Tpo $(DEPDIR)/libluatex_a-pdfobj.Po
@@ -7670,6 +7676,20 @@ ttf2afm-macnames.obj: pdftexdir/macnames.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ttf2afm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ttf2afm-macnames.obj `if test -f 'pdftexdir/macnames.c'; then $(CYGPATH_W) 'pdftexdir/macnames.c'; else $(CYGPATH_W) '$(srcdir)/pdftexdir/macnames.c'; fi`
+txt2zlib-txt2zlib.o: txt2zlib.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(txt2zlib_CPPFLAGS) $(CPPFLAGS) $(txt2zlib_CFLAGS) $(CFLAGS) -MT txt2zlib-txt2zlib.o -MD -MP -MF $(DEPDIR)/txt2zlib-txt2zlib.Tpo -c -o txt2zlib-txt2zlib.o `test -f 'txt2zlib.c' || echo '$(srcdir)/'`txt2zlib.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/txt2zlib-txt2zlib.Tpo $(DEPDIR)/txt2zlib-txt2zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='txt2zlib.c' object='txt2zlib-txt2zlib.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(txt2zlib_CPPFLAGS) $(CPPFLAGS) $(txt2zlib_CFLAGS) $(CFLAGS) -c -o txt2zlib-txt2zlib.o `test -f 'txt2zlib.c' || echo '$(srcdir)/'`txt2zlib.c
+
+txt2zlib-txt2zlib.obj: txt2zlib.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(txt2zlib_CPPFLAGS) $(CPPFLAGS) $(txt2zlib_CFLAGS) $(CFLAGS) -MT txt2zlib-txt2zlib.obj -MD -MP -MF $(DEPDIR)/txt2zlib-txt2zlib.Tpo -c -o txt2zlib-txt2zlib.obj `if test -f 'txt2zlib.c'; then $(CYGPATH_W) 'txt2zlib.c'; else $(CYGPATH_W) '$(srcdir)/txt2zlib.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/txt2zlib-txt2zlib.Tpo $(DEPDIR)/txt2zlib-txt2zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='txt2zlib.c' object='txt2zlib-txt2zlib.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(txt2zlib_CPPFLAGS) $(CPPFLAGS) $(txt2zlib_CFLAGS) $(CFLAGS) -c -o txt2zlib-txt2zlib.obj `if test -f 'txt2zlib.c'; then $(CYGPATH_W) 'txt2zlib.c'; else $(CYGPATH_W) '$(srcdir)/txt2zlib.c'; fi`
+
xetex-xetexextra.o: xetexdir/xetexextra.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xetex_CPPFLAGS) $(CPPFLAGS) $(xetex_CFLAGS) $(CFLAGS) -MT xetex-xetexextra.o -MD -MP -MF $(DEPDIR)/xetex-xetexextra.Tpo -c -o xetex-xetexextra.o `test -f 'xetexdir/xetexextra.c' || echo '$(srcdir)/'`xetexdir/xetexextra.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xetex-xetexextra.Tpo $(DEPDIR)/xetex-xetexextra.Po
@@ -8780,6 +8800,7 @@ $(proglib): ${srcdir}/lib/*.c
@ZLIB_RULE@
@LIBPNG_RULE@
@XPDF_RULE@
+@POPPLER_RULE@
@OBSDCOMPAT_RULE@
@ZZIPLIB_RULE@
@GRAPHITE_RULE@
@@ -9311,14 +9332,14 @@ writetype0.c: ctangle$(EXEEXT) luatexdir/font/writetype0.w
writetype2.c: ctangle$(EXEEXT) luatexdir/font/writetype2.w
$(luatex_font_ctangle) writetype2.w
-epdf.c: ctangle$(EXEEXT) luatexdir/image/epdf.w
- $(luatex_image_ctangle) epdf.w
writeimg.c: ctangle$(EXEEXT) luatexdir/image/writeimg.w
$(luatex_image_ctangle) writeimg.w
writejbig2.c: ctangle$(EXEEXT) luatexdir/image/writejbig2.w
$(luatex_image_ctangle) writejbig2.w
writejpg.c: ctangle$(EXEEXT) luatexdir/image/writejpg.w
$(luatex_image_ctangle) writejpg.w
+writejp2.c: ctangle$(EXEEXT) luatexdir/image/writejp2.w
+ $(luatex_image_ctangle) writejp2.w
writepng.c: ctangle$(EXEEXT) luatexdir/image/writepng.w
$(luatex_image_ctangle) writepng.w
@@ -9335,17 +9356,8 @@ luatoken.c: ctangle$(EXEEXT) luatexdir/lua/luatoken.w
texluac.c: ctangle$(EXEEXT) luatexdir/lua/texluac.w
$(luatex_lua_ctangle) texluac.w
-ocp.c: ctangle$(EXEEXT) luatexdir/ocp/ocp.w
- $(luatex_ocp_ctangle) ocp.w
-
-runocp.c: ctangle$(EXEEXT) luatexdir/ocp/runocp.w
- $(luatex_ocp_ctangle) runocp.w
-
-readocp.c: ctangle$(EXEEXT) luatexdir/ocp/readocp.w
- $(luatex_ocp_ctangle) readocp.w
-
-ocplist.c: ctangle$(EXEEXT) luatexdir/ocp/ocplist.w
- $(luatex_ocp_ctangle) ocplist.w
+pdflua.c: txt2zlib$(EXEEXT) luatexdir/luascripts/pdflua.lua
+ $(luatex_luascripts_txt2zlib) $(srcdir)/luatexdir/luascripts/pdflua.lua pdflua.c
hnjalloc.c: ctangle$(EXEEXT) luatexdir/lang/hnjalloc.w
$(luatex_lang_ctangle) hnjalloc.w
@@ -9392,6 +9404,9 @@ pdflistout.c: ctangle$(EXEEXT) luatexdir/pdf/pdflistout.w
pdfliteral.c: ctangle$(EXEEXT) luatexdir/pdf/pdfliteral.w
$(luatex_pdf_ctangle) pdfliteral.w
+pdfluaapi.c: ctangle$(EXEEXT) luatexdir/pdf/pdfluaapi.w
+ $(luatex_pdf_ctangle) pdfluaapi.w
+
pdfobj.c: ctangle$(EXEEXT) luatexdir/pdf/pdfobj.w
$(luatex_pdf_ctangle) pdfobj.w
@@ -9526,6 +9541,9 @@ avlstuff.c: ctangle$(EXEEXT) luatexdir/utils/avlstuff.w
$(luatex_utils_ctangle) avlstuff.w
$(libluatex_a_OBJECTS): libff.a libmplib.a
+
+txt2zlib.c: ctangle$(EXEEXT) luatexdir/luascripts/txt2zlib.w
+ $(luatex_luascripts_ctangle) txt2zlib.w
$(xetex_OBJECTS): $(xetex_prereq)
$(xetex_c_h): xetex-web2c
diff --git a/Build/source/texk/web2c/ac/web2c.ac b/Build/source/texk/web2c/ac/web2c.ac
index 933d05a7ecf..c88e73c5c6b 100644
--- a/Build/source/texk/web2c/ac/web2c.ac
+++ b/Build/source/texk/web2c/ac/web2c.ac
@@ -37,7 +37,7 @@ m4_define([kpse_tex_progs], [dnl
[[eptex], [yes], [no], [e-pTeX], [ptexenc]],
[[aleph], [yes], [no], [Aleph], []],
[[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng obsdcompat]],
-[[luatex], [yes], [no], [luaTeX], [xpdf libpng obsdcompat zziplib]],
+[[luatex], [yes], [no], [luaTeX], [poppler libpng obsdcompat zziplib]],
[[xetex], [yes], [yes], [XeTeX], [xpdf libpng freetype2 icu-xetex teckit graphite]],
])[]dnl
m4_foreach([Kpse_Prog], [kpse_tex_progs],
diff --git a/Build/source/texk/web2c/aclocal.m4 b/Build/source/texk/web2c/aclocal.m4
index 8d89b6d7a1a..ff39f18ef22 100644
--- a/Build/source/texk/web2c/aclocal.m4
+++ b/Build/source/texk/web2c/aclocal.m4
@@ -19,113 +19,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# longlong.m4 serial 14
-dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
- AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
- [AC_LINK_IFELSE(
- [_AC_TYPE_LONG_LONG_SNIPPET],
- [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
- dnl If cross compiling, assume the bug isn't important, since
- dnl nobody cross compiles for this platform as far as we know.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <limits.h>
- @%:@ifndef LLONG_MAX
- @%:@ define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- @%:@ define LLONG_MAX (HALF - 1 + HALF)
- @%:@endif]],
- [[long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;]])],
- [ac_cv_type_long_long_int=yes],
- [ac_cv_type_long_long_int=no],
- [ac_cv_type_long_long_int=yes])],
- [ac_cv_type_long_long_int=no])])
- if test $ac_cv_type_long_long_int = yes; then
- AC_DEFINE([HAVE_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type `long long int'.])
- fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
- AC_CACHE_CHECK([for unsigned long long int],
- [ac_cv_type_unsigned_long_long_int],
- [AC_LINK_IFELSE(
- [_AC_TYPE_LONG_LONG_SNIPPET],
- [ac_cv_type_unsigned_long_long_int=yes],
- [ac_cv_type_unsigned_long_long_int=no])])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type `unsigned long long int'.])
- fi
-])
-
-# Expands to a C program that can be used to test for simultaneous support
-# of 'long long' and 'unsigned long long'. We don't want to say that
-# 'long long' is available if 'unsigned long long' is not, or vice versa,
-# because too many programs rely on the symmetry between signed and unsigned
-# integer types (excluding 'bool').
-AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
-[
- AC_LANG_PROGRAM(
- [[/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;]],
- [[/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));]])
-])
-
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -1111,6 +1004,7 @@ m4_include([../../m4/kpse-libpng-flags.m4])
m4_include([../../m4/kpse-lt-hack.m4])
m4_include([../../m4/kpse-macos-framework.m4])
m4_include([../../m4/kpse-obsdcompat-flags.m4])
+m4_include([../../m4/kpse-poppler-flags.m4])
m4_include([../../m4/kpse-ptexenc-flags.m4])
m4_include([../../m4/kpse-socket-libs.m4])
m4_include([../../m4/kpse-teckit-flags.m4])
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index 0ac3eee1d18..c9ad5135911 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -624,6 +624,7 @@ CTANGLE
CTANGLEBOOT
TANGLE
TANGLEBOOT
+TXTTOZLIB
OBSDCOMPAT_RULE
OBSDCOMPAT_DEPEND
OBSDCOMPAT_LIBS
@@ -649,6 +650,10 @@ ZZIPLIB_RULE
ZZIPLIB_DEPEND
ZZIPLIB_LIBS
ZZIPLIB_INCLUDES
+POPPLER_RULE
+POPPLER_DEPEND
+POPPLER_LIBS
+POPPLER_INCLUDES
XPDF_RULE
XPDF_DEPEND
XPDF_LIBS
@@ -927,6 +932,7 @@ with_zlib_includes
with_zlib_libdir
with_system_libpng
with_system_xpdf
+with_system_poppler
with_system_zziplib
with_system_graphite
with_system_freetype2
@@ -1655,6 +1661,8 @@ Optional Packages:
pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
+ --with-system-poppler use installed poppler headers and library instead of
+ poppler (requires pkg-config)
--with-system-zziplib use installed zziplib headers and library (requires
pkg-config)
--with-system-graphite use installed silgraphite headers and library
@@ -17347,7 +17355,7 @@ case $enable_luatex in #(
esac
test "x$enable_web2c:$enable_luatex" = xyes:yes && {
- need_xpdf=yes
+ need_poppler=yes
need_libpng=yes
need_obsdcompat=yes
need_zziplib=yes
@@ -19757,18 +19765,18 @@ else
/* end confdefs.h. */
/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;
int
main ()
@@ -19777,40 +19785,40 @@ main ()
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes; then :
ac_cv_type_long_long_int=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
- #ifndef LLONG_MAX
- # define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- # define LLONG_MAX (HALF - 1 + HALF)
- #endif
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
int
main ()
{
long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
;
return 0;
}
@@ -21994,6 +22002,36 @@ ${top_builddir}/../../libs/xpdf/xpdf/Stream.h:
cd ${top_builddir}/../../libs/xpdf && $(MAKE) $(AM_MAKEFLAGS) rebuild'
fi
+## _KPSE_LIB_FLAGS: Setup poppler (-lpoppler) flags
+
+# Check whether --with-system-poppler was given.
+if test "${with_system_poppler+set}" = set; then :
+ withval=$with_system_poppler;
+fi
+if test "x$with_system_poppler" = xyes; then
+ if $PKG_CONFIG poppler --atleast-version=0.10; then
+ POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+ POPPLER_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`"
+ POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
+ as_fn_error $? "did not find poppler-0.10 or better" "$LINENO" 5
+fi
+else
+ POPPLER_INCLUDES=`echo '-DPDF_PARSER_ONLY -IBLD/libs/poppler -IBLD/libs/poppler/goo -IBLD/libs/poppler/poppler' | sed \
+ -e "s,SRC/,$kpse_SRC/,g" \
+ -e "s,BLD/,$kpse_BLD/,g"`
+ POPPLER_LIBS=`echo 'BLD/libs/poppler/libpoppler.a' | sed \
+ -e "s,BLD/,$kpse_BLD/,g"`
+
+ POPPLER_DEPEND=`echo 'BLD/libs/poppler/libpoppler.a' | sed \
+ -e 's,BLD/,${top_builddir}/../../,g'`
+ POPPLER_RULE='# Rebuild libpoppler
+$(POPPLER_DEPEND): ${top_builddir}/../../libs/poppler/poppler/Stream.h
+ cd ${top_builddir}/../../libs/poppler && $(MAKE) $(AM_MAKEFLAGS) rebuild
+${top_builddir}/../../libs/poppler/poppler/Stream.h:
+ cd ${top_builddir}/../../libs/poppler && $(MAKE) $(AM_MAKEFLAGS) rebuild'
+fi
+
## _KPSE_LIB_FLAGS: Setup zziplib (-lzzip) flags
# Check whether --with-system-zziplib was given.
@@ -22297,6 +22335,58 @@ CPPFLAGS=$kpse_save_CPPFLAGS
LIBS=$kpse_save_LIBS
+# Checks for xpdf (libpoppler) features.
+eval CPPFLAGS=\"$POPPLER_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$POPPLER_LIBS \$LIBS\"
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ac_link="./libtool --mode=link --tag=CXX $ac_link"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDFDoc::getPDFMajorVersion" >&5
+$as_echo_n "checking for PDFDoc::getPDFMajorVersion... " >&6; }
+if ${kpse_cv_have_getPDFMajorVersion+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <PDFDoc.h>
+int
+main ()
+{
+PDFDoc *pdfDoc; pdfDoc->getPDFMajorVersion();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ kpse_cv_have_getPDFMajorVersion=yes
+else
+ kpse_cv_have_getPDFMajorVersion=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_getPDFMajorVersion" >&5
+$as_echo "$kpse_cv_have_getPDFMajorVersion" >&6; }
+if test "x$kpse_cv_have_getPDFMajorVersion" = xyes; then :
+
+$as_echo "#define HAVE_GETPDFMAJORVERSION 1" >>confdefs.h
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_link="./libtool --mode=link --tag=CC $ac_link"
+
+CPPFLAGS=$kpse_save_CPPFLAGS
+LIBS=$kpse_save_LIBS
+
+
ac_config_headers="$ac_config_headers w2c/c-auto.h:c-auto.in"
@@ -22305,6 +22395,55 @@ ac_config_headers="$ac_config_headers w2c/c-auto.h:c-auto.in"
ac_config_headers="$ac_config_headers ff-config.h:luatexdir/luafontloader/ff-config.in"
+if test "x$cross_compiling" = xyes; then
+# Extract the first word of "txt2zlib", so it can be a program name with args.
+set dummy txt2zlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TXTTOZLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TXTTOZLIB in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TXTTOZLIB="$TXTTOZLIB" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TXTTOZLIB="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+TXTTOZLIB=$ac_cv_path_TXTTOZLIB
+if test -n "$TXTTOZLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TXTTOZLIB" >&5
+$as_echo "$TXTTOZLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "${TXTTOZLIB}"; then
+ as_fn_error $? "txt2zlib was not found but is required when cross-compiling.
+ Install txt2zlib or set \$TXTTOZLIB to the full pathname." "$LINENO" 5
+fi
+else
+ TXTTOZLIB=./txt2zlib
+fi
+
# For cross-compilation. Put at the end so there is a fair chance
# these are still visible when the configure script has finished.
@@ -23337,9 +23476,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac
index 95d5df2ee3d..68033caaf36 100644
--- a/Build/source/texk/web2c/configure.ac
+++ b/Build/source/texk/web2c/configure.ac
@@ -251,6 +251,7 @@ KPSE_PTEXENC_FLAGS
KPSE_ZLIB_FLAGS
KPSE_LIBPNG_FLAGS
KPSE_XPDF_FLAGS
+KPSE_POPPLER_FLAGS
KPSE_ZZIPLIB_FLAGS
KPSE_GRAPHITE_FLAGS
KPSE_FREETYPE2_FLAGS
@@ -273,6 +274,21 @@ AS_IF([test "x$kpse_cv_have_getPDFMajorVersion" = xyes],
AC_LANG_POP([C++])
KPSE_RESTORE_FLAGS
+# Checks for xpdf (libpoppler) features.
+KPSE_ADD_FLAGS([poppler])
+AC_LANG_PUSH([C++])
+AC_CACHE_CHECK([for PDFDoc::getPDFMajorVersion],
+ [kpse_cv_have_getPDFMajorVersion],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <PDFDoc.h>]],
+ [[PDFDoc *pdfDoc; pdfDoc->getPDFMajorVersion();]])],
+ [kpse_cv_have_getPDFMajorVersion=yes],
+ [kpse_cv_have_getPDFMajorVersion=no])])
+AS_IF([test "x$kpse_cv_have_getPDFMajorVersion" = xyes],
+ [AC_DEFINE([HAVE_GETPDFMAJORVERSION], 1,
+ [Define to 1 if class `PDFDoc' has the `getPDFMajorVersion' member.])])
+AC_LANG_POP([C++])
+KPSE_RESTORE_FLAGS
+
dnl Write output here, instead of putting a zillion -D's on the command line.
AC_CONFIG_HEADERS([w2c/c-auto.h:c-auto.in],
[sed -e 's/^#define PACKAGE/#define WEB2C_PACKAGE/' \
@@ -307,6 +323,8 @@ AH_BOTTOM([#endif /* !WEB2C_C_AUTO_H */])
dnl Additional config header for luaTeX
AC_CONFIG_HEADERS([ff-config.h:luatexdir/luafontloader/ff-config.in])
+dnl This is also for luatex
+KPSE_CROSS_PATH_PROG([TXTTOZLIB], [txt2zlib], [./txt2zlib])
# For cross-compilation. Put at the end so there is a fair chance
# these are still visible when the configure script has finished.
diff --git a/Build/source/texk/web2c/doc/Makefile.in b/Build/source/texk/web2c/doc/Makefile.in
index 4d641ebd702..91ab9b87859 100644
--- a/Build/source/texk/web2c/doc/Makefile.in
+++ b/Build/source/texk/web2c/doc/Makefile.in
@@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -207,6 +208,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -221,6 +225,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/web2c/lib/Makefile.in b/Build/source/texk/web2c/lib/Makefile.in
index 905c4f71191..a3f4021445a 100644
--- a/Build/source/texk/web2c/lib/Makefile.in
+++ b/Build/source/texk/web2c/lib/Makefile.in
@@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -205,6 +206,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -219,6 +223,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 968c39cff52..d6f92a87dc4 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-12 Taco Hoekwater <taco@luatex.org>
+
+ * import of luatex 0.66.0, released version
+
2011-03-28 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libluatex.am: Use AM_CFLAGS instead of libluatex_a_CFLAGS.
diff --git a/Build/source/texk/web2c/luatexdir/NEWS b/Build/source/texk/web2c/luatexdir/NEWS
index 8b3ebbd1f87..fad2afefcc8 100644
--- a/Build/source/texk/web2c/luatexdir/NEWS
+++ b/Build/source/texk/web2c/luatexdir/NEWS
@@ -2,6 +2,354 @@
This file is in the public domain.
==============================================================
+Luatex beta-0.66.0 was released 20110512
+==============================================================
+
+News:
+
+* fixed: linebreak_filter doesn't do its default job when
+ tex.linebreak is used
+
+* fixed: \escapechar ignored by \meaning
+
+* fixed: wrong px default
+
+* fixed: font kern attribute inheritance
+
+* fixed: "nop" unrecognized in virtual fonts
+
+* fixed: assertion failure in dviluatex when font ptmr8t used
+
+* fixed: tex.settoks for with strings with embedded zeroes
+
+* fixed: an indexing problem with nonexistent font glyphs
+
+* fixed: some crashes and other bugs on the 'subtype' and 'prev'
+ fields (not all node types have those fields)
+
+* fixed: crash on token.csname_id ("")
+
+* fixed: initialize the statically allocated node's type ids
+
+* fixed: fencepost error in math parameter counting
+
+* fixed: math family numbers > 255 are allowed
+
+* fixed: compilation failure on Hurd
+
+* fixed: a small bug leading to displacements when reading
+ the AccentTop table
+
+* fixed: \directlua followed by \pdfximage generates error if
+ draft mode is active
+
+* fixed: a problem with \vadjust pre in alignments
+
+* fixed: a lua stack growing problem in the backend in 0.65.0,
+ resulting in an inability to create more than a few thousand
+ generated pages
+
+* fixed: inclusion of Scribus-generated pdfs
+
+* adapt: the default form margin is now zero (was 1bp before)
+
+* adapt: libpng 1.4.4, zzuplib 0.13.60, mplib 1.504
+
+* adapt: small changes to the build system and new imports from
+ the texlive repository
+
+* feature: new function node.currentattr() queries the current
+ active attribute list
+
+* feature: Lua font loading; ignore unknown enumeration keys in
+ MathConstants
+
+* feature: JPEG 2000 image support
+
+* feature: continuing work on the 'epdf' library
+
+* doc: the 'epdf' lua library is now documented
+
+* doc: various other manual corrections
+
+
+==============================================================
+Luatex beta-0.65.0 was released 20101213
+==============================================================
+
+News:
+
+* The Aleph and Omega version primitives are deprecated.
+
+* The Apple Snow Leopard Truetype font collections now work
+ properly.
+
+* Libpng has been updated to 1.4.4, and zlib to 1.2.5.
+
+* New lua functions node.next() and node.prev().
+
+* The already deprecated for some time node.protrusion_skipable()
+ function has been removed.
+
+* fontloader.apply_featurefile() and fontloader.apply_afmfile()
+ now return nil,<errortable> on failure.
+
+* The various node list fields in the lua node interface have
+ been renamed from 'list' to 'head', e.g. tex.box[0].head,
+ and the 'list' name is deprecated. For now, the deprecation
+ is silent, as 'list' will stay for quite some time. Please
+ update your lua source as soon as possible, though.
+
+* The call node.type(<node>) now returns "node". The existing
+ functionality is otherwise unchanged.
+
+* Luafilesystem has been updated to 1.5.0. NOTE: there is an
+ incompatible change in the directory iterator method.
+
+* The restriction on linebreak_filter has been eased: at least one
+ horizontal box should be returned, but that is not necessarily
+ the last node any more.
+
+* Backward compatibility has been restored for \meaning\mathchar
+
+* node.first_character() has been renamed to node.first_glyph()
+ to better match its actual functionality.
+
+* The \Umathaccent primitive now supports both/bottom keywords,
+ and \Umathbotaccent / \Umathaccents are now deprecated.
+
+* The \Umathaccent primitive now also supports the fixed keyword,
+ which supports non-growing math accents even if the font says
+ there are extensible variants.
+
+* Ongoing work on the epdf library.
+
+Bugfixes:
+
+* Assignment to \dimen65535 was broken earlier.
+
+* <box>.head.prev is now always initialized to null (0).
+
+* luatex -lua=<script> '\relax' no longer exits immediately,
+ instead going into interactive mode as it should.
+
+* The \jobname was initialized wrongly for input file names
+ with multiple dots in them.
+
+* The synctex file is now written in the right place when
+ --output-directory is given.
+
+* \letterspacefont could cause crashes, especially when combined
+ with font expansion.
+
+* Luatex would crash on linux32 systems if it was build in an
+ environment where LFS (>2GB files) was enabled by default.
+
+* Node lists created by node.copy_list() could not be hyphenated
+ due to an assertion error.
+
+* Synctex support was partially broken since 0.60.0.
+
+* With OpenType math fonts, accents with multiple parts
+ (like the \vec arrow) forgot to include all parts if the
+ accentee was too narrow.
+
+* With OpenType math fonts, accents over any class except 0 and 7
+ were misplaced.
+
+* kpse.lookup("plain", {all = true}) was broken in kpathsea
+ itself (no extension given as well as --all specified).
+
+* A FontForge bug made Cambria Math accents look bad, and the
+ placement of math top accents did not allow a marker at the
+ origin (patches by Stefan Philipp)
+
+* Cut&Paste from PDF was sometimes broken due to bad ToUnicode map.
+
+* Many small manual improvements (thanks to Paul Isambert)
+
+* An other bugfix to lpeg 0.9 (from Roberto Ierusalimsky)
+
+* Some small fixes to writet1.w (from Han The Thanh)
+
+* A build failure because of bad libz configuration on Win32
+
+==============================================================
+Luatex beta-0.64.0 was released 20101112
+==============================================================
+
+News:
+
+* New lua functions pdf.refobj(), pdf.maxobjnum() and pdf.objtype()
+
+* New lua function node.is_node()
+
+* The max_strings configuration variable's maximum value is
+ raised to be identical to texlive's maximum (2097151), and
+ same for param_size (32767).
+
+* The embedded mplib is now 1.503.
+
+* Minor cleanups in the output of fontloader.to_table():
+
+ - removed out-of-range altuni's from the output
+ - don't dump the extra encodings, just the actual font encoding
+ - export the encoding's name also as 'enc_name' at one level up
+ - no longer exporting unset macstyles, nor zero uniqueids
+ - fix creationtime and modification time
+
+* Ongoing work on the epdf library
+
+Bugfixes:
+
+* Fix a bug where an explicit hyphen prevented hyphenation for the
+ whole rest of the paragraph
+
+* Internal font copying forgot to copy the last font dimen
+
+* os.selfdir() is now documented
+
+* patch quad (\fontdimen6) in \letterspacefont to be compatible
+ with pdftex
+
+* Multi-page pdf inclusion was very slow in 0.63.0
+
+* Some extra checks added to the handling of glue_spec node
+ objects in lua code.
+
+* Some node.prev pointers have been corrected (but this is not
+ quite finished).
+
+* A small fix to lpeg 0.9.
+
+
+==============================================================
+Luatex beta-0.63.0 was released 20100909
+==============================================================
+
+News:
+
+* Drop tex.ht[], tex.wd[], tex.dp[].
+
+* Drop OCP support (and associated primitives).
+
+* Add tex.catcode[], tex.lccode[], tex.sfcode[], tex.uccode[],
+ tex.mathcode[] and tex.delcode[] and associated functions.
+
+* Add CIDset tables to the output pdf where appropriate.
+
+* Added a 'string' field to late_lua nodes on the lua side. This
+ field does not convert the assigned string to a tokenlist.
+
+* The result of fontloader.open() now has some virtual accessors
+ (as well as fontloader.to_table).
+
+* There is now a `short reference' in the manual folder
+ (functionref.pdf)
+
+Bugfixes:
+
+* Fix a crash on an empty font (bugreport #468).
+
+* Fix a crash for extremely long pattern arguments.
+
+* Fix a crash on bad virtual character arguments in lua.
+
+* Fix hyphenation exceptions.
+
+* Prevent linebreak between initial local_par paragraph whatsit
+ and a following skip (bugreport #437).
+
+* Fix placement of scripts on textstyle big operators in MATH
+ fonts (bugreport #466).
+
+* Fix a crash on the return value of MPlib's 'postscript'
+ operation on images.
+
+* Fix a crash on \leftghost & \rightghost in math mode.
+
+==============================================================
+Luatex beta-0.62.0 was released 20100823
+==============================================================
+
+News:
+
+* LuaTeX now uses libpoppler (0.12.4) instead of xpdf.
+
+* All backend functions now report what file they were searching
+ for whenever a file cannot be found.
+
+* Input-ed lua files are now mentioned in the fls file if
+ the --recorder switch is specified on the command line.
+
+* Paragraph indentation hlist nodes and hlist and vlist nodes
+ generated by alignment rows and cells now have a subtype
+ (3 for indent box, 4 for rows/columns, 5 for cells).
+
+* The 'epdf' lib is in active development and still growing.
+
+* The 'fontforge' table is finally removed (was deprecated
+ since 0.40).
+
+Bugfixes:
+
+* A new mplib import fixes two bad bugs in mplib:
+ - string equality test was wrong
+ - type declarations could delete pre-existing variables
+
+* PNG images with transparency could create random size
+ differences in the generated PDF.
+
+* In some special cases, font expansion could cause wrong
+ spacing in the generated PDF.
+
+* \letterspacefont was broken since a very long time.
+
+* The node subtype of the \leftskip and \rightskip glues was
+ wrong.
+
+* Some memory leaks have been removed.
+
+* Various manual fixes.
+
+==============================================================
+Luatex beta-0.61.0 was released 20100728
+==============================================================
+
+New features:
+
+* New lua library 'epdf' for introspection of PDF inclusions,
+ see the manual for details.
+
+* Mplib version 1.502 is now included (which is still beta,
+ so be careful).
+
+* new "finish_pdffile" and "pre_dump" callbacks.
+
+* new function pdf.pageref()
+
+* In the lua 'tex' library: assignment to internal glue
+ parameters is now allowed.
+
+* New lua function tex.error().
+
+Bugfixes:
+
+* Fix for crashes on fonts with bad Panose values.
+
+* Fix for a box placement bug that could sometimes cause text
+ to overlap.
+
+* Fix for a few small PDF/A1-a compatibility bugs.
+
+* Fix \letterspacefont.
+
+* Fix \Ustopdisplaymath in combination with aligned displays.
+
+* In math delimiters, the last of a chain of predefined sizes
+ was always ignored if there were also extensible parts.
+
+==============================================================
Luatex beta-0.60.2 was released 20100701
==============================================================
@@ -1551,7 +1899,7 @@ Other news:
we probably introduced new problems as well).
* Most (all?) files now have a corrected Copyright header,
- and link in $Id$ and $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/NEWS $ into the object file.
+ and link in $Id$ and $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/NEWS $ into the object file.
* Some unnecessary files were removed from the distribution.
diff --git a/Build/source/texk/web2c/luatexdir/am/liblua51.am b/Build/source/texk/web2c/luatexdir/am/liblua51.am
index 1067e4da432..8f4e80782c0 100644
--- a/Build/source/texk/web2c/luatexdir/am/liblua51.am
+++ b/Build/source/texk/web2c/luatexdir/am/liblua51.am
@@ -7,7 +7,7 @@
##
EXTRA_LIBRARIES += liblua51.a
-liblua51_a_CPPFLAGS = -I$(top_srcdir)/luatexdir/lua51
+liblua51_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/luatexdir/lua51
if !MINGW32
liblua51_a_CPPFLAGS += -DLUA_USE_POSIX
endif !MINGW32
diff --git a/Build/source/texk/web2c/luatexdir/am/libluatex.am b/Build/source/texk/web2c/luatexdir/am/libluatex.am
index 072c448974c..73a909d32a4 100644
--- a/Build/source/texk/web2c/luatexdir/am/libluatex.am
+++ b/Build/source/texk/web2c/luatexdir/am/libluatex.am
@@ -10,7 +10,7 @@ EXTRA_LIBRARIES += libluatex.a
libluatex_a_DEPENDENCIES = libff.a
libluatex_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES)
-libluatex_a_CPPFLAGS += $(XPDF_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
+libluatex_a_CPPFLAGS += $(POPPLER_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
libluatex_a_CPPFLAGS += -I$(srcdir)/luatexdir -I$(srcdir)/luatexdir/lua51
libluatex_a_CPPFLAGS += -DpdfTeX
libluatex_a_CPPFLAGS += -I$(srcdir)/synctexdir -DSYNCTEX_ENGINE_H='<utils/synctex-luatex.h>'
@@ -89,22 +89,23 @@ nodist_libluatex_a_SOURCES += writetype0.c writetype2.c
luatex_image_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/image $(ctangle)
-epdf.c: ctangle$(EXEEXT) luatexdir/image/epdf.w
- $(luatex_image_ctangle) epdf.w
writeimg.c: ctangle$(EXEEXT) luatexdir/image/writeimg.w
$(luatex_image_ctangle) writeimg.w
writejbig2.c: ctangle$(EXEEXT) luatexdir/image/writejbig2.w
$(luatex_image_ctangle) writejbig2.w
writejpg.c: ctangle$(EXEEXT) luatexdir/image/writejpg.w
$(luatex_image_ctangle) writejpg.w
+writejp2.c: ctangle$(EXEEXT) luatexdir/image/writejp2.w
+ $(luatex_image_ctangle) writejp2.w
writepng.c: ctangle$(EXEEXT) luatexdir/image/writepng.w
$(luatex_image_ctangle) writepng.w
-libluatex_web += luatexdir/image/epdf.w luatexdir/image/writeimg.w
-libluatex_web += luatexdir/image/writejbig2.w luatexdir/image/writejpg.w luatexdir/image/writepng.w
-
-nodist_libluatex_a_SOURCES += epdf.c writeimg.c writejbig2.c writejpg.c writepng.c
+libluatex_web += luatexdir/image/writeimg.w
+libluatex_web += luatexdir/image/writejbig2.w
+libluatex_web += luatexdir/image/writejpg.w luatexdir/image/writejp2.w
+libluatex_web += luatexdir/image/writepng.w
+nodist_libluatex_a_SOURCES += writeimg.c writejbig2.c writejpg.c writejp2.c writepng.c
luatex_lua_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/lua $(ctangle)
@@ -126,24 +127,17 @@ libluatex_web += luatexdir/lua/luastuff.w luatexdir/lua/luatoken.w luatexdir/lua
nodist_libluatex_a_SOURCES += luagen.c luainit.c luanode.c luastuff.c luatoken.c texluac.c
+##**********************************************************************
-luatex_ocp_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/ocp $(ctangle)
-
-ocp.c: ctangle$(EXEEXT) luatexdir/ocp/ocp.w
- $(luatex_ocp_ctangle) ocp.w
-
-runocp.c: ctangle$(EXEEXT) luatexdir/ocp/runocp.w
- $(luatex_ocp_ctangle) runocp.w
-
-readocp.c: ctangle$(EXEEXT) luatexdir/ocp/readocp.w
- $(luatex_ocp_ctangle) readocp.w
+luatex_luascripts_txt2zlib = $(TXTTOZLIB)
+luatex_luascripts_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/luascripts $(ctangle)
-ocplist.c: ctangle$(EXEEXT) luatexdir/ocp/ocplist.w
- $(luatex_ocp_ctangle) ocplist.w
+pdflua.c: txt2zlib$(EXEEXT) luatexdir/luascripts/pdflua.lua
+ $(luatex_luascripts_txt2zlib) $(srcdir)/luatexdir/luascripts/pdflua.lua pdflua.c
-libluatex_web += luatexdir/ocp/ocp.w luatexdir/ocp/ocplist.w luatexdir/ocp/readocp.w luatexdir/ocp/runocp.w
+nodist_libluatex_a_SOURCES += pdflua.c
-nodist_libluatex_a_SOURCES += ocp.c ocplist.c readocp.c runocp.c
+##**********************************************************************
luatex_lang_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/lang $(ctangle)
@@ -198,6 +192,9 @@ pdflistout.c: ctangle$(EXEEXT) luatexdir/pdf/pdflistout.w
pdfliteral.c: ctangle$(EXEEXT) luatexdir/pdf/pdfliteral.w
$(luatex_pdf_ctangle) pdfliteral.w
+pdfluaapi.c: ctangle$(EXEEXT) luatexdir/pdf/pdfluaapi.w
+ $(luatex_pdf_ctangle) pdfluaapi.w
+
pdfobj.c: ctangle$(EXEEXT) luatexdir/pdf/pdfobj.w
$(luatex_pdf_ctangle) pdfobj.w
@@ -232,15 +229,15 @@ libluatex_web += luatexdir/pdf/pagetree.w luatexdir/pdf/pdfaction.w luatexdir/pd
libluatex_web += luatexdir/pdf/pdfcolorstack.w luatexdir/pdf/pdfdest.w
libluatex_web += luatexdir/pdf/pdffont.w luatexdir/pdf/pdfgen.w luatexdir/pdf/pdfglyph.w
libluatex_web += luatexdir/pdf/pdfimage.w luatexdir/pdf/pdflink.w luatexdir/pdf/pdflistout.w
-libluatex_web += luatexdir/pdf/pdfliteral.w luatexdir/pdf/pdfobj.w luatexdir/pdf/pdfoutline.w
-libluatex_web += luatexdir/pdf/pdfpage.w luatexdir/pdf/pdfrule.w
+libluatex_web += luatexdir/pdf/pdfliteral.w luatexdir/pdf/pdfluaapi.w luatexdir/pdf/pdfobj.w
+libluatex_web += luatexdir/pdf/pdfoutline.w luatexdir/pdf/pdfpage.w luatexdir/pdf/pdfrule.w
libluatex_web += luatexdir/pdf/pdfsaverestore.w luatexdir/pdf/pdfsetmatrix.w
libluatex_web += luatexdir/pdf/pdfshipout.w luatexdir/pdf/pdftables.w
libluatex_web += luatexdir/pdf/pdfthread.w luatexdir/pdf/pdfxform.w
nodist_libluatex_a_SOURCES += pagetree.c pdfaction.c pdfannot.c pdfcolorstack.c pdfdest.c pdffont.c
nodist_libluatex_a_SOURCES += pdfgen.c pdfglyph.c pdfimage.c pdflink.c pdflistout.c pdfliteral.c
-nodist_libluatex_a_SOURCES += pdfobj.c pdfoutline.c pdfpage.c pdfrule.c pdfsaverestore.c
+nodist_libluatex_a_SOURCES += pdfluaapi.c pdfobj.c pdfoutline.c pdfpage.c pdfrule.c pdfsaverestore.c
nodist_libluatex_a_SOURCES += pdfsetmatrix.c pdfshipout.c pdftables.c pdfthread.c pdfxform.c
luatex_tex_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/tex $(ctangle)
@@ -530,6 +527,7 @@ libluatex_a_SOURCES = \
luatexdir/image/writeimg.h \
luatexdir/image/writejbig2.h \
luatexdir/image/writejpg.h \
+ luatexdir/image/writejp2.h \
luatexdir/image/writepng.h \
luatexdir/lang/hnjalloc.h \
luatexdir/lang/hyphen.h \
@@ -541,6 +539,7 @@ libluatex_a_SOURCES = \
luatexdir/lua/lkpselib.c \
luatexdir/lua/llanglib.c \
luatexdir/lua/llualib.c \
+ luatexdir/lua/llfslibext.c \
luatexdir/lua/lnodelib.c \
luatexdir/lua/loslibext.c \
luatexdir/lua/liolib.c \
@@ -551,11 +550,8 @@ libluatex_a_SOURCES = \
luatexdir/lua/ltokenlib.c \
luatexdir/lua/luagen.h \
luatexdir/lua/luatex-api.h \
+ luatexdir/luascripts/pdflua.h \
luatexdir/luatex.h \
- luatexdir/ocp/ocp.h \
- luatexdir/ocp/ocplist.h \
- luatexdir/ocp/readocp.h \
- luatexdir/ocp/runocp.h \
luatexdir/pdf/pagetree.h \
luatexdir/pdf/pdfaction.h \
luatexdir/pdf/pdfannot.h \
@@ -568,6 +564,7 @@ libluatex_a_SOURCES = \
luatexdir/pdf/pdflink.h \
luatexdir/pdf/pdflistout.h \
luatexdir/pdf/pdfliteral.h \
+ luatexdir/pdf/pdfluaapi.h \
luatexdir/pdf/pdfobj.h \
luatexdir/pdf/pdfoutline.h \
luatexdir/pdf/pdfpage.h \
@@ -617,8 +614,8 @@ libluatex_a_SOURCES = \
luatexdir/utils/managed-sa.h \
luatexdir/utils/synctex-common.h \
luatexdir/utils/synctex-luatex.h \
- luatexdir/utils/synctex.c \
luatexdir/utils/synctex.h \
+ luatexdir/utils/synctex.c \
luatexdir/utils/utils.h
nodist_libluatex_a_SOURCES += \
diff --git a/Build/source/texk/web2c/luatexdir/am/luafontforge.am b/Build/source/texk/web2c/luatexdir/am/luafontforge.am
index 5f90b53b5b7..7864ac82ac5 100644
--- a/Build/source/texk/web2c/luatexdir/am/luafontforge.am
+++ b/Build/source/texk/web2c/luatexdir/am/luafontforge.am
@@ -11,8 +11,7 @@ libff_a_DEPENDENCIES = libluamisc.a
$(libff_a_OBJECTS): $(libff_a_DEPENDENCIES)
-libff_a_CPPFLAGS = \
- $(AM_CPPFLAGS) \
+libff_a_CPPFLAGS = $(AM_CPPFLAGS) \
-DFONTFORGE_CONFIG_NO_WINDOWING_UI=1 -DLUA_FF_LIB=1 \
-D_NO_PYTHON=1 -DX_DISPLAY_MISSING=1 -DNODYNAMIC=1 \
-D_NO_FREETYPE=1 -D_NO_LIBUNINAMESLIST=1 -UHAVE_LIBINTL_H \
diff --git a/Build/source/texk/web2c/luatexdir/am/luamisc.am b/Build/source/texk/web2c/luatexdir/am/luamisc.am
index 5f43cf2b64a..8518f3022ce 100644
--- a/Build/source/texk/web2c/luatexdir/am/luamisc.am
+++ b/Build/source/texk/web2c/luatexdir/am/luamisc.am
@@ -12,7 +12,7 @@ libluamisc_a_DEPENDENCIES = $(ZZIPLIB_DEPEND) libluasocket.a
$(libluamisc_a_OBJECTS): $(libluamisc_a_DEPENDENCIES)
-libluamisc_a_CPPFLAGS = \
+libluamisc_a_CPPFLAGS = $(AM_CPPFLAGS) \
$(ZLIB_INCLUDES) \
$(ZZIPLIB_INCLUDES) \
-I$(top_srcdir)/luatexdir/lua51
diff --git a/Build/source/texk/web2c/luatexdir/am/luasocket.am b/Build/source/texk/web2c/luatexdir/am/luasocket.am
index 4dfb0149861..03b947ede2c 100644
--- a/Build/source/texk/web2c/luatexdir/am/luasocket.am
+++ b/Build/source/texk/web2c/luatexdir/am/luasocket.am
@@ -11,7 +11,7 @@ libluasocket_a_DEPENDENCIES = $(ZLIB_DEPEND) liblua51.a
$(libluasocket_a_OBJECTS): liblua51.a
-libluasocket_a_CPPFLAGS = \
+libluasocket_a_CPPFLAGS = $(AM_CPPFLAGS) \
-DLUASOCKET_DEBUG -I$(top_srcdir)/luatexdir/luasocket -I$(srcdir)/luatexdir/lua51
libluasocket_a_CFLAGS = # $(WARNING_CFLAGS)
diff --git a/Build/source/texk/web2c/luatexdir/am/luatex.am b/Build/source/texk/web2c/luatexdir/am/luatex.am
index 84cd5adf423..d438ad2cbad 100644
--- a/Build/source/texk/web2c/luatexdir/am/luatex.am
+++ b/Build/source/texk/web2c/luatexdir/am/luatex.am
@@ -21,14 +21,14 @@ EXTRA_PROGRAMS += luatex
nodist_EXTRA_luatex_SOURCES = dummy.cxx
luatex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES)
-luatex_CPPFLAGS += $(XPDF_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
+luatex_CPPFLAGS += $(POPPLER_INCLUDES) $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
luatex_CPPFLAGS += -I$(srcdir)/luatexdir -I$(srcdir)/luatexdir/lua51 -I$(srcdir)/mplibdir
luatex_CPPFLAGS += -Dextra_version_info=`date +-%Y%m%d%H`
luatex_CPPFLAGS += -I$(srcdir)/synctexdir -DSYNCTEX_ENGINE_H='<utils/synctex-luatex.h>'
luatex_CXXFLAGS = $(WARNING_CXXFLAGS)
luatex_ldadd = libluatex.a libff.a libluamisc.a libluasocket.a liblua51.a
-luatex_ldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) $(XPDF_LIBS)
+luatex_ldadd += $(ZZIPLIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) $(POPPLER_LIBS)
luatex_ldadd += $(OBSDCOMPAT_LIBS) libmd5.a libmplib.a
luatex_LDFLAGS = -export-dynamic
@@ -36,7 +36,7 @@ luatex_LDFLAGS = -export-dynamic
luatex_LDADD = $(luatex_ldadd) $(LDADD) $(LIBADD_DLOPEN) $(lua_socketlibs)
luatex_DEPENDENCIES = $(proglib) $(KPATHSEA_DEPEND) libluatex.a
-luatex_DEPENDENCIES += $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(XPDF_DEPEND)
+luatex_DEPENDENCIES += $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(POPPLER_DEPEND)
luatex_DEPENDENCIES += $(OBSDCOMPAT_DEPEND) libmd5.a libmplib.a
$(luatex_OBJECTS): libluatex.a
diff --git a/Build/source/texk/web2c/luatexdir/am/txt2zlib.am b/Build/source/texk/web2c/luatexdir/am/txt2zlib.am
new file mode 100644
index 00000000000..4936ac7a28b
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/am/txt2zlib.am
@@ -0,0 +1,19 @@
+## texk/web2c/luatexdir/am/txt2zlib.am: Makefile fragment for txt2zlib.
+##
+## Copyright (C) 2010 Hartmut Henkel <hartmut@luatex.org>
+## You may freely use, modify and/or distribute this file.
+##
+## $Id: txt2zlib.am 3958 2010-11-12 22:57:13Z hhenkel $
+
+noinst_PROGRAMS += txt2zlib
+
+nodist_txt2zlib_SOURCES = txt2zlib.c
+txt2zlib_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES)
+txt2zlib_DEPENDENCIES = $(ZLIB_DEPEND)
+txt2zlib_CFLAGS = $(WARNING_CFLAGS)
+txt2zlib_LDADD = $(ZLIB_LIBS) $(LDADD)
+DISTCLEANFILES += txt2zlib.c
+
+txt2zlib.c: ctangle$(EXEEXT) luatexdir/luascripts/txt2zlib.w
+ $(luatex_luascripts_ctangle) txt2zlib.w
+
diff --git a/Build/source/texk/web2c/luatexdir/dvi/dvigen.w b/Build/source/texk/web2c/luatexdir/dvi/dvigen.w
index 48336a2919f..b119c9fcdb3 100644
--- a/Build/source/texk/web2c/luatexdir/dvi/dvigen.w
+++ b/Build/source/texk/web2c/luatexdir/dvi/dvigen.w
@@ -30,8 +30,8 @@
@ Initial identification of this file, and the needed headers.
@c
static const char _svn_version[] =
- "$Id: dvigen.w 3612 2010-04-13 09:29:42Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/dvi/dvigen.w $";
+ "$Id: dvigen.w 3802 2010-08-07 12:03:08Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/dvi/dvigen.w $";
#include "ptexlib.h"
@@ -1191,10 +1191,11 @@ void write_out(halfword p)
if (callback_id > 0) {
lua_retval = run_callback(callback_id, "S->S", s, &ss);
if ((lua_retval == true) && (ss != NULL))
- s = ss;
+ { xfree(s); s = ss; }
}
}
tprint(s);
+ xfree(s);
print_ln();
flush_list(def_ref);
if (j == 18) {
diff --git a/Build/source/texk/web2c/luatexdir/font/dofont.w b/Build/source/texk/web2c/luatexdir/font/dofont.w
index 3dad8b50abe..57e35858102 100644
--- a/Build/source/texk/web2c/luatexdir/font/dofont.w
+++ b/Build/source/texk/web2c/luatexdir/font/dofont.w
@@ -24,7 +24,7 @@
static const char _svn_version[] =
"$Id: dofont.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/dofont.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/dofont.w $";
@ a bit more interfacing is needed for proper error reporting
diff --git a/Build/source/texk/web2c/luatexdir/font/luafont.w b/Build/source/texk/web2c/luatexdir/font/luafont.w
index 6ea114de45a..181e825847c 100644
--- a/Build/source/texk/web2c/luatexdir/font/luafont.w
+++ b/Build/source/texk/web2c/luatexdir/font/luafont.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: luafont.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/luafont.w $";
+ "$Id: luafont.w 4125 2011-04-11 09:06:59Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/luafont.w $";
#include "ptexlib.h"
#include "lua/luatex-api.h"
@@ -103,6 +103,24 @@ const char *MATH_param_names[] = {
NULL,
};
+/* here for now, may be useful elsewhere */
+
+int ff_checkoption (lua_State *L, int narg, const char *def,
+ const char *const lst[]);
+
+int ff_checkoption (lua_State *L, int narg, const char *def,
+ const char *const lst[]) {
+ const char *name = (def) ? luaL_optstring(L, narg, def) :
+ luaL_checkstring(L, narg);
+ int i;
+ for (i=0; lst[i]; i++)
+ if (strcmp(lst[i], name) == 0)
+ return i;
+ return -1;
+}
+
+
+
static void dump_intfield(lua_State * L, const char *n, int c)
{
lua_pushstring(L, n);
@@ -368,7 +386,7 @@ static void write_lua_math_parameters(lua_State * L, int f)
{
int k;
lua_newtable(L);
- for (k = 1; k < font_math_params(f); k++) {
+ for (k = 1; k <= font_math_params(f); k++) {
lua_pushnumber(L, font_math_param(f, k));
if (k <= MATH_param_max) {
lua_setfield(L, -2, MATH_param_names[k]);
@@ -455,11 +473,11 @@ int font_to_lua(lua_State * L, int f)
lua_pushnumber(L,pdf_font_num(f));
lua_setfield(L,-2,"pdf_num");
}
- if (pdf_font_blink(f) != 0) {
+ if (pdf_font_blink(f) != null_font) {
lua_pushnumber(L,pdf_font_blink(f));
lua_setfield(L,-2,"pdf_blink");
}
- if (pdf_font_elink(f) != 0) {
+ if (pdf_font_elink(f) != null_font) {
lua_pushnumber(L,pdf_font_elink(f));
lua_setfield(L,-2,"pdf_elink");
}
@@ -708,6 +726,7 @@ make_luaS_index(font);
make_luaS_index(char);
make_luaS_index(slot);
make_luaS_index(comment);
+make_luaS_index(nop);
make_luaS_index(push);
make_luaS_index(pop);
make_luaS_index(rule);
@@ -763,6 +782,7 @@ static void init_font_string_pointers(lua_State * L)
init_luaS_index(char);
init_luaS_index(slot);
init_luaS_index(comment);
+ init_luaS_index(nop);
init_luaS_index(push);
init_luaS_index(pop);
init_luaS_index(rule);
@@ -823,7 +843,8 @@ static int count_char_packet_bytes(lua_State * L)
} else if (luaS_ptr_eq(s, slot)) {
l += 10;
ff = 1;
- } else if (luaS_ptr_eq(s, comment)) {;
+ } else if (luaS_ptr_eq(s, comment) || luaS_ptr_eq(s, nop)) {
+ ;
} else if (luaS_ptr_eq(s, push) || luaS_ptr_eq(s, pop)) {
l++;
} else if (luaS_ptr_eq(s, rule)) {
@@ -834,10 +855,15 @@ static int count_char_packet_bytes(lua_State * L)
} else if (luaS_ptr_eq(s, special)) {
size_t len;
lua_rawgeti(L, -2, 2);
- (void) lua_tolstring(L, -1, &len);
- lua_pop(L, 1);
- if (len > 0) {
- l = (int) (l + 5 + (int) len);
+ if (lua_isstring(L, -1)) {
+ (void) lua_tolstring(L, -1, &len);
+ lua_pop(L, 1);
+ if (len > 0) {
+ l = (int) (l + 5 + (int) len);
+ }
+ } else {
+ lua_pop(L, 1);
+ fprintf(stdout, "invalid packet special!\n");
}
} else if (luaS_ptr_eq(s, image)) {
l += 5;
@@ -905,16 +931,16 @@ read_char_packets(lua_State * L, int *l_fonts, charinfo * co, int atsize)
} else if (luaS_ptr_eq(s, slot)) {
cmd = packet_nop_code;
lua_rawgeti(L, -2, 2);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
ff = (n > max_f ? l_fonts[1] : l_fonts[n]);
lua_rawgeti(L, -3, 3);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
lua_pop(L, 2);
append_packet(packet_font_code);
do_store_four(ff);
append_packet(packet_char_code);
do_store_four(n);
- } else if (luaS_ptr_eq(s, comment)) {
+ } else if (luaS_ptr_eq(s, comment) || luaS_ptr_eq(s, nop)) {
cmd = packet_nop_code;
} else if (luaS_ptr_eq(s, node)) {
cmd = packet_node_code;
@@ -942,7 +968,7 @@ read_char_packets(lua_State * L, int *l_fonts, charinfo * co, int atsize)
case packet_font_code:
append_packet(cmd);
lua_rawgeti(L, -2, 2);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
ff = (n > max_f ? l_fonts[1] : l_fonts[n]);
do_store_four(ff);
lua_pop(L, 1);
@@ -957,7 +983,7 @@ read_char_packets(lua_State * L, int *l_fonts, charinfo * co, int atsize)
case packet_char_code:
append_packet(cmd);
lua_rawgeti(L, -2, 2);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
do_store_four(n);
lua_pop(L, 1);
break;
@@ -965,24 +991,24 @@ read_char_packets(lua_State * L, int *l_fonts, charinfo * co, int atsize)
case packet_down_code:
append_packet(cmd);
lua_rawgeti(L, -2, 2);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
do_store_four(sp_to_dvi(n, atsize));
lua_pop(L, 1);
break;
case packet_rule_code:
append_packet(cmd);
lua_rawgeti(L, -2, 2);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
do_store_four(sp_to_dvi(n, atsize));
lua_rawgeti(L, -3, 3);
- n = (int) lua_tointeger(L, -1);
+ n = (int) luaL_checkinteger(L, -1);
do_store_four(sp_to_dvi(n, atsize));
lua_pop(L, 2);
break;
case packet_special_code:
append_packet(cmd);
lua_rawgeti(L, -2, 2);
- s = lua_tolstring(L, -1, &l);
+ s = luaL_checklstring(L, -1, &l);
if (l > 0) {
do_store_four(l);
m = (int) l;
@@ -1125,10 +1151,10 @@ static void read_lua_math_parameters(lua_State * L, int f)
if (lua_isnumber(L, -2)) {
lua_number2int(i, lua_tonumber(L, -2));
} else if (lua_isstring(L, -2)) {
- i = luaL_checkoption(L, -2, NULL, MATH_param_names);
+ i = ff_checkoption(L, -2, NULL, MATH_param_names);
}
lua_number2int(n, lua_tonumber(L, -1));
- if (i != 0) {
+ if (i > 0) {
set_font_math_param(f, i, n);
}
lua_pop(L, 1); /* pop value */
@@ -1221,9 +1247,9 @@ font_char_from_lua(lua_State * L, internal_font_number f, int i,
set_charinfo_tounicode(co, NULL);
if (has_math) {
- j = n_numeric_field(L, luaS_top_accent_index, 0);
+ j = n_numeric_field(L, luaS_top_accent_index, INT_MIN);
set_charinfo_top_accent(co, j);
- j = n_numeric_field(L, luaS_bot_accent_index, 0);
+ j = n_numeric_field(L, luaS_bot_accent_index, INT_MIN);
set_charinfo_bot_accent(co, j);
k = n_numeric_field(L, luaS_next_index, -1);
if (k >= 0) {
@@ -2221,6 +2247,10 @@ static void add_kern_before(halfword left, halfword right)
assert(vlink(prev) == right);
couple_nodes(prev, kern);
couple_nodes(kern, right);
+ /* update the attribute list (inherit from left) */
+ delete_attribute_ref(node_attr(kern));
+ add_node_attr_ref(node_attr(left));
+ node_attr(kern) = node_attr(left);
}
}
}
@@ -2237,6 +2267,10 @@ static void add_kern_after(halfword left, halfword right, halfword aft)
assert(next == null || alink(next) == aft);
couple_nodes(aft, kern);
try_couple_nodes(kern, next);
+ /* update the attribute list (inherit from left == aft) */
+ delete_attribute_ref(node_attr(kern));
+ add_node_attr_ref(node_attr(aft));
+ node_attr(kern) = node_attr(aft);
}
}
}
@@ -2341,22 +2375,25 @@ static halfword
run_lua_ligkern_callback(halfword head, halfword tail, int callback_id)
{
lua_State *L = Luas;
+ int i;
+ int top = lua_gettop(L);
if (!get_callback(L, callback_id)) {
lua_pop(L, 2);
return tail;
}
nodelist_to_lua(L, head);
nodelist_to_lua(L, tail);
- if (lua_pcall(L, 2, 1, 0) != 0) {
- fprintf(stdout, "error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
- lua_error(L);
+ if ((i=lua_pcall(L, 2, 0, 0)) != 0) {
+ luatex_error(L, (i == LUA_ERRRUN ? 0 : 1));
return tail;
}
+ /* next two lines disabled to be compatible with the manual */
+#if 0
tail = nodelist_from_lua(L);
if (fix_node_lists)
+#endif
fix_node_list(head);
- lua_pop(L, 2);
+ lua_settop(L, top);
return tail;
}
diff --git a/Build/source/texk/web2c/luatexdir/font/luatexfont.h b/Build/source/texk/web2c/luatexdir/font/luatexfont.h
index fa2d2ac6c6d..15c48c7f50b 100644
--- a/Build/source/texk/web2c/luatexdir/font/luatexfont.h
+++ b/Build/source/texk/web2c/luatexdir/font/luatexfont.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: luatexfont.h 3433 2010-02-20 10:03:04Z hhenkel $ */
+/* $Id: luatexfont.h 3790 2010-08-02 20:00:17Z oneiros $ */
#ifndef LUATEXFONT_H
# define LUATEXFONT_H
@@ -200,8 +200,8 @@ extern char notdef[];
/* vfovf.c */
void vf_expand_local_fonts(internal_font_number f);
-internal_font_number letter_space_font(halfword u, internal_font_number f,
- int e);
+internal_font_number letter_space_font(internal_font_number f,
+ int e, boolean nolig);
internal_font_number auto_expand_font(internal_font_number f, int e);
void pdf_check_vf(internal_font_number f);
internal_font_number copy_font_info(internal_font_number f);
diff --git a/Build/source/texk/web2c/luatexdir/font/mapfile.w b/Build/source/texk/web2c/luatexdir/font/mapfile.w
index 8d06d046628..413e7832f78 100644
--- a/Build/source/texk/web2c/luatexdir/font/mapfile.w
+++ b/Build/source/texk/web2c/luatexdir/font/mapfile.w
@@ -20,8 +20,8 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: mapfile.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/mapfile.w $";
+ "$Id: mapfile.w 3786 2010-08-02 15:25:12Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/mapfile.w $";
#include <math.h>
#include "ptexlib.h"
@@ -528,14 +528,14 @@ static void fm_read_info(void)
fm_file = NULL;
}
} else {
- pdftex_warn("cannot open font map file");
+ pdftex_warn("cannot open font map file (%s)", cur_file_name);
}
} else {
- pdftex_warn("cannot open font map file");
+ pdftex_warn("cannot open font map file (%s)", cur_file_name);
}
} else {
if (!fm_open(cur_file_name)) {
- pdftex_warn("cannot open font map file");
+ pdftex_warn("cannot open font map file (%s)", cur_file_name);
} else {
fm_read_file();
tex_printf("{%s", cur_file_name);
diff --git a/Build/source/texk/web2c/luatexdir/font/pkin.w b/Build/source/texk/web2c/luatexdir/font/pkin.w
index a807ab39d0c..19e6b5db48d 100644
--- a/Build/source/texk/web2c/luatexdir/font/pkin.w
+++ b/Build/source/texk/web2c/luatexdir/font/pkin.w
@@ -53,7 +53,7 @@ typedef short shalfword;
static const char _svn_version[] =
"$Id: pkin.w 3584 2010-04-02 17:45:55Z hhenkel $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/pkin.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/pkin.w $";
@
Now we have some routines to get stuff from the pk file. pkbyte returns
diff --git a/Build/source/texk/web2c/luatexdir/font/sfnt.h b/Build/source/texk/web2c/luatexdir/font/sfnt.h
index a67bd02d890..dda13643ff6 100644
--- a/Build/source/texk/web2c/luatexdir/font/sfnt.h
+++ b/Build/source/texk/web2c/luatexdir/font/sfnt.h
@@ -19,7 +19,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: sfnt.h 3404 2010-01-28 11:17:10Z taco $ */
+/* $Id: sfnt.h 3765 2010-07-29 07:10:21Z taco $ */
#ifndef _SFNT_H_
# define _SFNT_H_
diff --git a/Build/source/texk/web2c/luatexdir/font/sfnt.w b/Build/source/texk/web2c/luatexdir/font/sfnt.w
index a6482e29846..26653508b0f 100644
--- a/Build/source/texk/web2c/luatexdir/font/sfnt.w
+++ b/Build/source/texk/web2c/luatexdir/font/sfnt.w
@@ -32,8 +32,8 @@
#include "font/sfnt.h"
static const char _svn_version[] =
- "$Id: sfnt.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/sfnt.w $";
+ "$Id: sfnt.w 3765 2010-07-29 07:10:21Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/sfnt.w $";
diff --git a/Build/source/texk/web2c/luatexdir/font/subfont.w b/Build/source/texk/web2c/luatexdir/font/subfont.w
index b7ea88064cf..fced62d248e 100644
--- a/Build/source/texk/web2c/luatexdir/font/subfont.w
+++ b/Build/source/texk/web2c/luatexdir/font/subfont.w
@@ -23,8 +23,8 @@
#include <string.h>
static const char _svn_version[] =
- "$Id: subfont.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/subfont.w $";
+ "$Id: subfont.w 3786 2010-08-02 15:25:12Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/subfont.w $";
@ @c
static struct avl_table *sfd_tree = NULL;
@@ -149,13 +149,13 @@ static sfd_entry *read_sfd(char *sfd_name)
if (!(run_callback(callback_id, "S->bSd", cur_file_name,
&file_opened, &sfd_buffer, &sfd_size) &&
file_opened && sfd_size > 0)) {
- pdftex_warn("cannot open SFD file for reading");
+ pdftex_warn("cannot open SFD file for reading (%s)", cur_file_name);
cur_file_name = NULL;
return NULL;
}
} else {
if (!sfd_open(cur_file_name)) {
- pdftex_warn("cannot open SFD file for reading");
+ pdftex_warn("cannot open SFD file for reading (%s)", cur_file_name);
cur_file_name = NULL;
return NULL;
}
diff --git a/Build/source/texk/web2c/luatexdir/font/texfont.h b/Build/source/texk/web2c/luatexdir/font/texfont.h
index 9281b19ec0d..5c33c20af81 100644
--- a/Build/source/texk/web2c/luatexdir/font/texfont.h
+++ b/Build/source/texk/web2c/luatexdir/font/texfont.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: texfont.h 3723 2010-06-18 09:19:27Z taco $ */
+/* $Id: texfont.h 3853 2010-09-03 18:05:14Z oneiros $ */
/* Here we have the interface to LuaTeX's font system, as seen from the
main pascal program. There is a companion list in luatex.defines to
@@ -38,11 +38,11 @@ typedef struct liginfo {
int adj;
int lig;
int type;
-#else
+# else
int type;
int lig;
int adj;
-#endif
+# endif
} liginfo;
/* these are dumped en block, so they need endianness tests */
@@ -50,10 +50,10 @@ typedef struct kerninfo {
# ifdef WORDS_BIGENDIAN
int adj;
scaled sc;
-#else
+# else
scaled sc;
int adj;
-#endif
+# endif
} kerninfo;
typedef struct extinfo {
@@ -172,7 +172,7 @@ typedef struct texfont {
int ligatures_disabled;
int _pdf_font_num; /* maps to a PDF resource ID */
- internal_font_number _pdf_font_blink; /* link to base font for expanded fonts */
+ internal_font_number _pdf_font_blink; /* link to base font for expanded fonts */
internal_font_number _pdf_font_elink; /* link to expanded fonts for base font */
str_number _pdf_font_attr; /* pointer to additional attributes */
} texfont;
diff --git a/Build/source/texk/web2c/luatexdir/font/texfont.w b/Build/source/texk/web2c/luatexdir/font/texfont.w
index 3943da67cb3..85c02131933 100644
--- a/Build/source/texk/web2c/luatexdir/font/texfont.w
+++ b/Build/source/texk/web2c/luatexdir/font/texfont.w
@@ -33,8 +33,8 @@ problematic |if 0 != null|.
@c
static const char _svn_version[] =
- "$Id: texfont.w 3634 2010-04-19 19:52:48Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/texfont.w $";
+ "$Id: texfont.w 3997 2010-11-28 10:37:21Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/texfont.w $";
#include "ptexlib.h"
#include "lua/luatex-api.h"
@@ -115,6 +115,8 @@ int new_font(void)
font_tables[id]->_right_boundary = NULL;
font_tables[id]->_param_base = NULL;
font_tables[id]->_math_param_base = NULL;
+ font_tables[id]->_pdf_font_blink = null_font;
+ font_tables[id]->_pdf_font_elink = null_font;
set_font_bc(id, 1); /* ec = 0 */
set_hyphen_char(id, '-');
@@ -1124,10 +1126,10 @@ int copy_font(int f)
if (font_cidordering(f) != NULL)
set_font_cidordering(k, xstrdup(font_cidordering(f)));
- i = (int) (sizeof(*param_base(f)) * (unsigned) font_params(f));
+ i = (int) (sizeof(*param_base(f)) * (unsigned) (font_params(f)+1));
font_bytes += i;
- param_base(k) = xmalloc((unsigned) i);
- memcpy(param_base(k), param_base(f), (size_t) i);
+ param_base(k) = xmalloc((unsigned) (i+1));
+ memcpy(param_base(k), param_base(f), (size_t) (i));
if (font_math_params(f) > 0) {
i = (int) (sizeof(*math_param_base(f)) *
@@ -1151,6 +1153,8 @@ int copy_font(int f)
ci = copy_charinfo(right_boundary(f));
set_charinfo(k, right_boundarychar, ci);
}
+ /* not updated yet: */
+ font_tables[k]->charinfo_count = font_tables[f]->charinfo_count;
return k;
}
diff --git a/Build/source/texk/web2c/luatexdir/font/tfmofm.w b/Build/source/texk/web2c/luatexdir/font/tfmofm.w
index a007ac48b48..6a3e77d78d1 100644
--- a/Build/source/texk/web2c/luatexdir/font/tfmofm.w
+++ b/Build/source/texk/web2c/luatexdir/font/tfmofm.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: tfmofm.w 3634 2010-04-19 19:52:48Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/tfmofm.w $";
+ "$Id: tfmofm.w 3635 2010-04-19 20:07:44Z oneiros $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/tfmofm.w $";
@ Here are some macros that help process ligatures and kerns
@c
diff --git a/Build/source/texk/web2c/luatexdir/font/tounicode.w b/Build/source/texk/web2c/luatexdir/font/tounicode.w
index 14bf9bedad9..9647d9e049c 100644
--- a/Build/source/texk/web2c/luatexdir/font/tounicode.w
+++ b/Build/source/texk/web2c/luatexdir/font/tounicode.w
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: tounicode.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/tounicode.w $";
+ "$Id: tounicode.w 3967 2010-11-24 13:41:45Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/tounicode.w $";
@ @c
#define isXdigit(c) (isdigit(c) || ('A' <= (c) && (c) <= 'F'))
@@ -141,7 +141,7 @@ static long check_unicode_value(char *s, boolean multiple_value)
{
int l = (int) strlen(s);
int i;
- long code;
+ long code = 0; /* anything that is not |UNI_UNDEF| will do */
if (l == 0)
return UNI_UNDEF;
@@ -538,9 +538,11 @@ int write_cid_tounicode(PDF pdf, fo_entry * fo, internal_font_number f)
i++;
} else { /* |gtab[i].code >= 0| */
j = i;
- while (i < 65536 && gtab[i + 1].code >= 0 &&
- gtab[i].code + 1 == gtab[i + 1].code)
- i++;
+ k = i % 256;
+ while (i < 65536 && k<255 && gtab[i + 1].code >= 0 &&
+ gtab[i].code + 1 == gtab[i + 1].code) {
+ i++; k++;
+ }
/* at this point i is the last entry of the subrange */
i++; /* move i to the next entry */
range_size[j] = i - j;
diff --git a/Build/source/texk/web2c/luatexdir/font/tt_glyf.w b/Build/source/texk/web2c/luatexdir/font/tt_glyf.w
index 2a1fcf02f66..f0774647fe1 100644
--- a/Build/source/texk/web2c/luatexdir/font/tt_glyf.w
+++ b/Build/source/texk/web2c/luatexdir/font/tt_glyf.w
@@ -31,7 +31,7 @@
static const char _svn_version[] =
"$Id: tt_glyf.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/tt_glyf.w $";
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/tt_glyf.w $";
@ @c
#define NUM_GLYPH_LIMIT 65534
diff --git a/Build/source/texk/web2c/luatexdir/font/tt_table.w b/Build/source/texk/web2c/luatexdir/font/tt_table.w
index 744baa8e6bf..f53e2659336 100644
--- a/Build/source/texk/web2c/luatexdir/font/tt_table.w
+++ b/Build/source/texk/web2c/luatexdir/font/tt_table.w
@@ -28,7 +28,7 @@
static const char _svn_version[] =
"$Id: tt_table.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/tt_table.w $";
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/tt_table.w $";
@ tables contains information refered by other tables
diff --git a/Build/source/texk/web2c/luatexdir/font/vfovf.w b/Build/source/texk/web2c/luatexdir/font/vfovf.w
index 68852e209e5..2448b1d732c 100644
--- a/Build/source/texk/web2c/luatexdir/font/vfovf.w
+++ b/Build/source/texk/web2c/luatexdir/font/vfovf.w
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: vfovf.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/vfovf.w $";
+ "$Id: vfovf.w 3898 2010-09-22 06:03:03Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/vfovf.w $";
@ @c
/* this is a hack! */
@@ -1507,26 +1507,20 @@ void vf_expand_local_fonts(internal_font_number f)
@ @c
internal_font_number
-letter_space_font(halfword u, internal_font_number f, int e)
+letter_space_font(internal_font_number f, int e, boolean nolig)
{
internal_font_number k;
- scaled w, r;
-
+ scaled w;
+ int c;
+ charinfo *co;
char *new_font_name;
- int vf_z;
- int vf_alpha;
- int vf_beta;
- memory_word tmp_w; /* accumulator */
-
/* read a new font and expand the character widths */
- k = read_font_info(u, font_name(f), font_size(f), font_natural_dir(f));
- set_no_ligatures(k); /* disable ligatures for letter-spaced fonts */
-#if 0
- for (i = 0;i <= font_widths(k);i++) {
- set_font_width(k,i,font_width(f,i)+round_xn_over_d(quad(k), e, 1000));
- }
-#endif
+ k = copy_font(f);
+
+ if (nolig)
+ set_no_ligatures(k); /* disable ligatures for letter-spaced fonts */
+
/* append eg '+100ls' to font name */
new_font_name = xmalloc((unsigned) (strlen(font_name(k)) + 8)); /* |abs(e) <= 1000| */
if (e > 0) {
@@ -1539,86 +1533,45 @@ letter_space_font(halfword u, internal_font_number f, int e)
/* create the corresponding virtual font */
set_font_type(k, virtual_font_type);
-
- vf_z = font_size(f);
- vf_replace_z();
- w = round_xn_over_d(quad(f), e, 2000);
- if (w > 0) {
- tmp_b0 = 0;
- } else {
- tmp_b0 = 255;
- w = vf_alpha + w;
- }
- r = w * vf_beta;
- tmp_b1 = (quarterword) (r / vf_z);
- r = r % vf_z;
- if (r == 0) {
- tmp_b2 = 0;
- } else {
- r = r * 256;
- tmp_b2 = (quarterword) (r / vf_z);
- r = r % vf_z;
- }
- if (r == 0) {
- tmp_b3 = 0;
- } else {
- r = r * 256;
- tmp_b3 = (quarterword) (r / vf_z);
+
+ for (c=font_bc(k);c<=font_ec(k);c++) {
+ if (quick_char_exists(k, c)) {
+ int half_w;
+ int vf_np = 0;
+ eight_bits *vpackets = xmalloc((unsigned) (10+10+1));
+ if (e<0) {
+ half_w = -round_xn_over_d(quad(k), -e, 2000);
+ } else {
+ half_w = round_xn_over_d(quad(k), e, 2000);
+ }
+ co = get_charinfo(k, c);
+ w = char_width(k, c)+2*half_w;
+ set_charinfo_width(co, w);
+
+ append_packet(packet_right_code);
+ append_four(half_w);
+ append_fnt_set(f);
+ append_packet(packet_char_code);
+ append_four(c);
+ append_packet(packet_right_code);
+ append_four(half_w);
+ append_packet(packet_end_code);
+
+ set_charinfo_packets(co, vpackets);
+ }
}
+ /* now patch the quad size */
+ /* Patch 20100922: do not do this, to remain compatible with pdftex */
#if 0
- vf_packet_base[k] = new_vf_packet(k);
-
- for (c=font_bc(k);c<=font_ec(k);c++) {
- string_room(17);
- append_fnt_set(f);
- append_packet(right1 + 3);
- append_packet(tmp_b0);
- append_packet(tmp_b1);
- append_packet(tmp_b2);
- append_packet(tmp_b3);
-
- append_packet(set1);
- append_packet(c);
-
- append_packet(right1 + 3);
- append_packet(tmp_b0);
- append_packet(tmp_b1);
- append_packet(tmp_b2);
- append_packet(tmp_b3);
- s = make_string();
- store_packet(k, c, s);
- flush_str(s);
- }
+ if (e<0) {
+ set_font_param(k, quad_code, -round_xn_over_d(quad(k), 1000-e, 1000));
+ } else {
+ set_font_param(k, quad_code, round_xn_over_d(quad(k), 1000+e, 1000));
+ }
#endif
return k;
}
-@ the fontname has [+-]\d+ls at the end
-@c
-#if 0
-static boolean is_letterspaced_font(internal_font_number f)
-{
- char *i, *j;
- if (font_type(f) != virtual_font_type)
- return false;
- j = font_name(f);
- i = j + strlen(j);
- if ((*(i - 1) != 'l') || (*i != 's'))
- return false;
- i = i - 2;
- while (i >= j) {
- if ((*i < '0') || (*i > '9'))
- break;
- i--;
- }
- if (i < j)
- return false;
- if ((*i != '+') && (*i != '-'))
- return false;
- return true;
-}
-#endif
-
@ @c
internal_font_number copy_font_info(internal_font_number f)
{
diff --git a/Build/source/texk/web2c/luatexdir/font/vfpacket.w b/Build/source/texk/web2c/luatexdir/font/vfpacket.w
index 8a222e04c04..f26b774721d 100644
--- a/Build/source/texk/web2c/luatexdir/font/vfpacket.w
+++ b/Build/source/texk/web2c/luatexdir/font/vfpacket.w
@@ -1,7 +1,7 @@
% vfpacket.w
% Copyright 1996-2006 Han The Thanh <thanh@@pdftex.org>
-% Copyright 2006-2009 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2006-2011 Taco Hoekwater <taco@@luatex.org>
% This file is part of LuaTeX.
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: vfpacket.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/vfpacket.w $";
+ "$Id: vfpacket.w 4098 2011-04-07 21:01:11Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/vfpacket.w $";
@ The |do_vf_packet| procedure is called in order to interpret the
@@ -189,7 +189,7 @@ void do_vf_packet(PDF pdf, internal_font_number vf_f, int c)
if (has_packet(lf, (int) k))
do_vf_packet(pdf, lf, (int) k);
else
- pdf_place_glyph(pdf, lf, (int) k);
+ backend_out[glyph_node] (pdf, lf, (int) k);
}
cur.h = cur.h + char_width(lf, (int) k);
break;
diff --git a/Build/source/texk/web2c/luatexdir/font/writecff.w b/Build/source/texk/web2c/luatexdir/font/writecff.w
index afbf9ef8ff9..6f818d9e422 100644
--- a/Build/source/texk/web2c/luatexdir/font/writecff.w
+++ b/Build/source/texk/web2c/luatexdir/font/writecff.w
@@ -23,9 +23,11 @@
#include "font/writecff.h"
+extern int cidset;
+
static const char _svn_version[] =
- "$Id: writecff.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writecff.w $";
+ "$Id: writecff.w 3848 2010-09-01 08:34:37Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writecff.w $";
@ @c
#define get_offset(s,n) get_unsigned(s, (n))
@@ -3162,6 +3164,28 @@ void write_cff(PDF pdf, cff_font * cffont, fd_entry * fd)
}
}
+ /* CIDSet: a table of bits indexed by cid, bytes with high order bit first,
+ each (set) bit is a (present) CID. */
+ if (1) {
+ int cid;
+ cidset = pdf_new_objnum(pdf);
+ if (cidset != 0) {
+ size_t l = (last_cid/8)+1;
+ char *stream = xmalloc(l);
+ memset(stream, 0, l);
+ for (cid = 1; cid <= (long) last_cid; cid++) {
+ glyph->id = cid;
+ if (avl_find(fd->gl_tree,glyph) != NULL) {
+ stream[(cid / 8)] |= (1 << (7 - (cid % 8)));
+ }
+ }
+ pdf_begin_dict(pdf, cidset, 0);
+ pdf_begin_stream(pdf);
+ pdf_out_block(pdf, stream, l);
+ pdf_end_stream(pdf);
+ }
+ }
+
/* this happens if the internal metrics do not agree with the actual disk font */
if (gid < num_glyphs) {
WARN("embedded subset is smaller than expected: %d instead of %d glyphs.", gid, num_glyphs);
@@ -3283,7 +3307,6 @@ card16 cff_charsets_lookup(cff_font * cff, card16 cid)
@ @c
#define is_cidfont(a) ((a)->flag & FONTTYPE_CIDFONT)
#define CID_MAX 65535
-
void write_cid_cff(PDF pdf, cff_font * cffont, fd_entry * fd)
{
cff_index *charstrings, *cs_idx;
@@ -3335,7 +3358,6 @@ void write_cid_cff(PDF pdf, cff_font * cffont, fd_entry * fd)
glyph = xtalloc(1, glw_entry);
}
- cid = 0;
last_cid = 0;
num_glyphs = 0;
for (cid = 0; cid <= CID_MAX; cid++) {
@@ -3349,6 +3371,27 @@ void write_cid_cff(PDF pdf, cff_font * cffont, fd_entry * fd)
}
}
+ /* CIDSet: a table of bits indexed by cid, bytes with high order bit first,
+ each (set) bit is a (present) CID. */
+ if (1) {
+ cidset = pdf_new_objnum(pdf);
+ if (cidset != 0) {
+ size_t l = (last_cid/8)+1;
+ char *stream = xmalloc(l);
+ memset(stream, 0, l);
+ for (cid = 1; cid <= (long) last_cid; cid++) {
+ if (CIDToGIDMap[2 * cid] || CIDToGIDMap[2 * cid + 1]) {
+ stream[(cid / 8)] |= (1 << (7 - (cid % 8)));
+ }
+ }
+ pdf_begin_dict(pdf, cidset, 0);
+ pdf_begin_stream(pdf);
+ pdf_out_block(pdf, stream, l);
+ pdf_end_stream(pdf);
+ }
+ }
+
+
cff_read_fdselect(cffont);
cff_read_fdarray(cffont);
cff_read_private(cffont);
diff --git a/Build/source/texk/web2c/luatexdir/font/writeenc.w b/Build/source/texk/web2c/luatexdir/font/writeenc.w
index b8db3e9791b..1e097ad8fcc 100644
--- a/Build/source/texk/web2c/luatexdir/font/writeenc.w
+++ b/Build/source/texk/web2c/luatexdir/font/writeenc.w
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: writeenc.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writeenc.w $";
+ "$Id: writeenc.w 3615 2010-04-13 21:59:59Z oneiros $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writeenc.w $";
@ All encoding entries go into AVL tree for fast search by name.
@c
diff --git a/Build/source/texk/web2c/luatexdir/font/writefont.w b/Build/source/texk/web2c/luatexdir/font/writefont.w
index d130b976bf1..5db7218f15a 100644
--- a/Build/source/texk/web2c/luatexdir/font/writefont.w
+++ b/Build/source/texk/web2c/luatexdir/font/writefont.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: writefont.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writefont.w $";
+ "$Id: writefont.w 3836 2010-08-29 09:29:04Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writefont.w $";
#include "ptexlib.h"
#include "lua/luatex-api.h"
@@ -468,6 +468,7 @@ static void write_fontfile(PDF pdf, fd_entry * fd)
@
@c
+int cidset = 0;
static void write_fontdescriptor(PDF pdf, fd_entry * fd)
{
static const int std_flags[] = {
@@ -494,7 +495,7 @@ static void write_fontdescriptor(PDF pdf, fd_entry * fd)
struct avl_traverser t;
int fd_flags;
assert(fd != NULL && fd->fm != NULL);
-
+ cidset = 0; /* possibly updated by |write_fontfile| */
if (is_fontfile(fd->fm) && is_included(fd->fm))
write_fontfile(pdf, fd); /* this will set |fd->ff_found| if font file is found */
if (fd->fd_objnum == 0)
@@ -549,14 +550,11 @@ static void write_fontdescriptor(PDF pdf, fd_entry * fd)
assert(0);
}
}
- /* TODO: Optional keys for CID fonts.
-
- The most interesting ones are
+ if (cidset !=0)
+ pdf_printf(pdf, "/CIDSet %i 0 R\n", cidset);
+ /* TODO: Other optional keys for CID fonts.
+ The most interesting one is
\.{/Style << /Panose <12-byte string>>>}
- and
- \.{/CIDSET <stream>}
- the latter can be used in subsets, to give the included CIDs
- as a bitmap on the whole list.
*/
pdf_end_dict(pdf);
}
diff --git a/Build/source/texk/web2c/luatexdir/font/writet1.w b/Build/source/texk/web2c/luatexdir/font/writet1.w
index ccb2196c451..64d76712309 100644
--- a/Build/source/texk/web2c/luatexdir/font/writet1.w
+++ b/Build/source/texk/web2c/luatexdir/font/writet1.w
@@ -16,12 +16,12 @@
% License for more details.
%
% You should have received a copy of the GNU General Public License along
-% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
+% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
@ @c
static const char _svn_version[] =
- "$Id: writet1.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writet1.w $";
+ "$Id: writet1.w 3960 2010-11-13 07:34:49Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writet1.w $";
#include "ptexlib.h"
#include <string.h>
@@ -231,8 +231,8 @@ static cs_entry *subr_tab;
static char *subr_array_start, *subr_array_end;
static int subr_max, subr_size, subr_size_pos;
-@ This list contains the begin/end tokens commonly used in the
-/Subrs array of a Type 1 font.
+@ This list contains the begin/end tokens commonly used in the
+/Subrs array of a Type 1 font.
@c
static const char *cs_token_pairs_list[][2] = {
@@ -286,7 +286,7 @@ char **load_enc_file(char *enc_name)
cur_file_name = luatex_find_file(enc_name, find_enc_file_callback);
if (cur_file_name == NULL) {
- pdftex_fail("cannot find encoding file for reading");
+ pdftex_fail("cannot find encoding file '%s' for reading", enc_name);
}
callback_id = callback_defined(read_enc_file_callback);
enc_curbyte = 0;
@@ -295,12 +295,12 @@ char **load_enc_file(char *enc_name)
if (run_callback(callback_id, "S->bSd", cur_file_name,
&file_opened, &enc_buffer, &enc_size)) {
if ((!file_opened) || enc_size == 0) {
- pdftex_fail("cannot open encoding file for reading");
+ pdftex_fail("cannot open encoding file '%s' for reading", cur_file_name);
}
}
} else {
if (!enc_open(cur_file_name)) {
- pdftex_fail("cannot open encoding file for reading");
+ pdftex_fail("cannot open encoding file '%s' for reading", cur_file_name);
}
enc_read_file();
enc_close();
@@ -326,7 +326,7 @@ char **load_enc_file(char *enc_name)
*r != ' ' && *r != 10 && *r != ']' && *r != '/'; *p++ = *r++);
*p = 0;
skip(r, ' ');
- if (names_count > 256)
+ if (names_count >= 256)
pdftex_fail("encoding vector contains more than 256 names");
if (strcmp(buf, notdef) != 0)
glyph_names[names_count] = xstrdup(buf);
@@ -652,7 +652,7 @@ static void t1_stop_eexec(PDF pdf)
t1_in_eexec = 2;
}
-@ macros for various transforms; unused, left for reference
+@ macros for various transforms; unused, left for reference
@c
#ifdef T1TRANSFORMMACROS
@@ -785,13 +785,13 @@ static char **t1_builtin_enc(void)
}
/* At this moment \.{/Encoding} is the prefix of |t1_line_array|, and the encoding is
not a predefined encoding.
-
+
We have two possible forms of Encoding vector. The first case is
-
+
\.{/Encoding [/a /b /c...] readonly def}
-
+
and the second case can look like
-
+
{\obeylines
\.{/Encoding 256 array 0 1 255 {1 index exch /.notdef put} for}
\.{dup 0 /x put}
@@ -1297,7 +1297,7 @@ static void cs_mark(const char *cs_name, int subr)
ptr->used = false;
}
-@ AVL search tree for glyph code by glyph name
+@ AVL search tree for glyph code by glyph name
@c
static int comp_t1_glyphs(const void *pa, const void *pb, void *p
__attribute__ ((unused)))
@@ -1622,11 +1622,36 @@ static void t1_mark_glyphs(void)
}
-@
+@ When |t1_subset_charstrings| is called, the |t1_line_array| contains \.{/CharStrings}.
+When we hit a case like this:
+{\obeylines \tt
+ dup/CharStrings
+ 229 dict dup begin
+}
+we read the next line and concatenate to |t1_line_array| before moving on. That is
+what |t1_check_unusual_charstring| is for.
+
@c
+static void t1_check_unusual_charstring(void)
+{
+ char *p = strstr(t1_line_array, charstringname) + strlen(charstringname);
+ int i;
+ /* if no number follows "/CharStrings", let's read the next line */
+ if (sscanf(p, "%i", &i) != 1) {
+ strcpy(t1_buf_array, t1_line_array);
+ t1_getline();
+ strcat(t1_buf_array, t1_line_array);
+ strcpy(t1_line_array, t1_buf_array);
+ t1_line_ptr = eol(t1_line_array);
+ }
+}
+
static void t1_subset_charstrings(PDF pdf)
{
cs_entry *ptr;
+
+ t1_check_unusual_charstring();
+
cs_size_pos = (int) (strstr(t1_line_array,
charstringname) + strlen(charstringname) -
t1_line_array + 1);
diff --git a/Build/source/texk/web2c/luatexdir/font/writet3.w b/Build/source/texk/web2c/luatexdir/font/writet3.w
index b138df57c94..63988a80a28 100644
--- a/Build/source/texk/web2c/luatexdir/font/writet3.w
+++ b/Build/source/texk/web2c/luatexdir/font/writet3.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: writet3.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writet3.w $";
+ "$Id: writet3.w 3882 2010-09-13 22:29:18Z hhenkel $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writet3.w $";
#include "ptexlib.h"
#include <kpathsea/tex-glyph.h>
@@ -187,8 +187,7 @@ static boolean writepk(PDF pdf, internal_font_number f)
ury = cd.cheight + lly;
update_bbox(llx, lly, urx, ury, t3_glyph_num == 0);
t3_glyph_num++;
- pdf_new_dict(pdf, obj_type_others, 0, 0);
- t3_char_procs[cd.charcode] = pdf->obj_ptr;
+ t3_char_procs[cd.charcode] = pdf_new_dict(pdf, obj_type_others, 0, 0);
pdf_begin_stream(pdf);
pdf_print_real(pdf, (int) t3_char_widths[cd.charcode], 2);
pdf_printf(pdf, " 0 %i %i %i %i d1\n",
diff --git a/Build/source/texk/web2c/luatexdir/font/writettf.w b/Build/source/texk/web2c/luatexdir/font/writettf.w
index 2a7c5c644c0..bc93ad5c7aa 100644
--- a/Build/source/texk/web2c/luatexdir/font/writettf.w
+++ b/Build/source/texk/web2c/luatexdir/font/writettf.w
@@ -24,8 +24,8 @@
#include <string.h>
static const char _svn_version[] =
- "$Id: writettf.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writettf.w $";
+ "$Id: writettf.w 3789 2010-08-02 19:59:49Z oneiros $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writettf.w $";
#define DEFAULT_NTABS 14
#define NEW_CMAP_SIZE 2
@@ -1703,7 +1703,7 @@ void writettf(PDF pdf, fd_entry * fd)
cur_file_name =
luatex_find_file(fd_cur->fm->ff_name, find_truetype_file_callback);
if (cur_file_name == NULL) {
- pdftex_fail("cannot find TrueType font file for reading");
+ pdftex_fail("cannot find TrueType font file for reading (%s)", fd_cur->fm->ff_name);
}
callback_id = callback_defined(read_truetype_file_callback);
if (callback_id > 0) {
@@ -1711,11 +1711,11 @@ void writettf(PDF pdf, fd_entry * fd)
&file_opened, &ttf_buffer, &ttf_size) &&
file_opened && ttf_size > 0) {
} else {
- pdftex_fail("cannot open TrueType font file for reading");
+ pdftex_fail("cannot open TrueType font file for reading (%s)", cur_file_name);
}
} else {
if (!ttf_open(cur_file_name)) {
- pdftex_fail("cannot open TrueType font file for reading");
+ pdftex_fail("cannot open TrueType font file for reading (%s)", cur_file_name);
}
ttf_read_file();
ttf_close();
@@ -1808,7 +1808,7 @@ void writeotf(PDF pdf, fd_entry * fd)
cur_file_name =
luatex_find_file(fd_cur->fm->ff_name, find_opentype_file_callback);
if (cur_file_name == NULL) {
- pdftex_fail("cannot find OpenType font file for reading");
+ pdftex_fail("cannot find OpenType font file for reading (%s)", fd_cur->fm->ff_name);
}
callback_id = callback_defined(read_opentype_file_callback);
if (callback_id > 0) {
@@ -1816,11 +1816,11 @@ void writeotf(PDF pdf, fd_entry * fd)
&file_opened, &ttf_buffer, &ttf_size) &&
file_opened && ttf_size > 0) {
} else {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
} else {
if (!otf_open(cur_file_name)) {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
ttf_read_file();
ttf_close();
diff --git a/Build/source/texk/web2c/luatexdir/font/writetype0.w b/Build/source/texk/web2c/luatexdir/font/writetype0.w
index 818a23b5ca1..945350a1384 100644
--- a/Build/source/texk/web2c/luatexdir/font/writetype0.w
+++ b/Build/source/texk/web2c/luatexdir/font/writetype0.w
@@ -23,8 +23,8 @@
#include "font/writecff.h"
static const char _svn_version[] =
- "$Id: writetype0.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writetype0.w $";
+ "$Id: writetype0.w 3786 2010-08-02 15:25:12Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writetype0.w $";
@ @c
void writetype0(PDF pdf, fd_entry * fd)
@@ -48,7 +48,7 @@ void writetype0(PDF pdf, fd_entry * fd)
cur_file_name =
luatex_find_file(fd_cur->fm->ff_name, find_opentype_file_callback);
if (cur_file_name == NULL) {
- pdftex_fail("cannot find OpenType font file for reading");
+ pdftex_fail("cannot find OpenType font file for reading (%s)", fd_cur->fm->ff_name);
}
callback_id = callback_defined(read_opentype_file_callback);
if (callback_id > 0) {
@@ -56,11 +56,11 @@ void writetype0(PDF pdf, fd_entry * fd)
&file_opened, &ttf_buffer, &ttf_size) &&
file_opened && ttf_size > 0) {
} else {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
} else {
if (!otf_open(cur_file_name)) {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
ttf_read_file();
ttf_close();
diff --git a/Build/source/texk/web2c/luatexdir/font/writetype2.w b/Build/source/texk/web2c/luatexdir/font/writetype2.w
index 66b97f7d201..12124f6edb8 100644
--- a/Build/source/texk/web2c/luatexdir/font/writetype2.w
+++ b/Build/source/texk/web2c/luatexdir/font/writetype2.w
@@ -27,7 +27,7 @@
#include "font/tt_glyf.h"
static const char _svn_version[] =
- "$Id: writetype2.w 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/font/writetype2.w $";
+ "$Id: writetype2.w 3848 2010-09-01 08:34:37Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writetype2.w $";
@ forward declaration
@c
@@ -152,7 +152,7 @@ void writetype2(PDF pdf, fd_entry * fd)
cur_file_name =
luatex_find_file(fd_cur->fm->ff_name, find_opentype_file_callback);
if (cur_file_name == NULL) {
- pdftex_fail("cannot find OpenType font file for reading");
+ pdftex_fail("cannot find OpenType font file for reading (%s)", fd_cur->fm->ff_name);
}
callback_id = callback_defined(read_opentype_file_callback);
if (callback_id > 0) {
@@ -160,11 +160,11 @@ void writetype2(PDF pdf, fd_entry * fd)
&file_opened, &ttf_buffer, &ttf_size) &&
file_opened && ttf_size > 0) {
} else {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
} else {
if (!otf_open(cur_file_name)) {
- pdftex_fail("cannot open OpenType font file for reading");
+ pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name);
}
ttf_read_file();
ttf_close();
@@ -259,11 +259,12 @@ static unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx)
@ Creating the subset.
@c
+extern int cidset;
void make_tt_subset(PDF pdf, fd_entry * fd, unsigned char *buffer, int buflen)
{
long i, cid;
- unsigned int last_cid;
+ unsigned int last_cid = 0;
glw_entry *found;
struct avl_traverser t;
unsigned char *cidtogidmap;
@@ -395,6 +396,26 @@ void make_tt_subset(PDF pdf, fd_entry * fd, unsigned char *buffer, int buflen)
pdf_release_obj(fontfile);
+ /* CIDSet: a table of bits indexed by cid, bytes with high order bit first,
+ each (set) bit is a (present) CID. */
+ if (is_subsetted(fd->fm)) {
+ cidset = pdf_new_objnum(pdf);
+ if (cidset != 0) {
+ size_t l = (last_cid/8)+1;
+ char *stream = xmalloc(l);
+ memset(stream, 0, l);
+ for (cid = 1; cid <= (long) last_cid; cid++) {
+ if (used_chars[cid]) {
+ stream[(cid / 8)] |= (1 << (7 - (cid % 8)));
+ }
+ }
+ pdf_begin_dict(pdf, cidset, 0);
+ pdf_begin_stream(pdf);
+ pdf_out_block(pdf, stream, l);
+ pdf_end_stream(pdf);
+ }
+ }
+
/* TODO other stuff that needs fixing: */
/* DW, W, DW2, and W2 */
@@ -408,19 +429,7 @@ void make_tt_subset(PDF pdf, fd_entry * fd, unsigned char *buffer, int buflen)
add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, last_cid);
}
#endif
- /* CIDSet */
-#if 0
- {
- pdf_obj *cidset;
-
- cidset = pdf_new_stream(STREAM_COMPRESS);
- pdf_add_stream(cidset, used_chars, last_cid/8 + 1);
- pdf_add_dict(font->descriptor,
- pdf_new_name("CIDSet"),
- pdf_ref_obj(cidset));
- pdf_release_obj(cidset);
- }
-#endif
+
xfree(used_chars);
sfnt_close(sfont);
return;
diff --git a/Build/source/texk/web2c/luatexdir/image/epdf.h b/Build/source/texk/web2c/luatexdir/image/epdf.h
index 0ce09ab13eb..c47c9f19f26 100644
--- a/Build/source/texk/web2c/luatexdir/image/epdf.h
+++ b/Build/source/texk/web2c/luatexdir/image/epdf.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: epdf.h 3650 2010-04-26 08:13:41Z taco $ */
+/* $Id: epdf.h 4054 2011-01-10 19:05:54Z hhenkel $ */
// this is the common header file for C++ sources pdftoepdf.cc and lepdflib.cc
@@ -31,22 +31,15 @@
# include <string.h>
# include <kpathsea/c-ctype.h>
# include <sys/stat.h>
-# ifdef POPPLER_VERSION
-# define GString GooString
-# include <dirent.h>
-# include <poppler-config.h>
-# include <goo/GooString.h>
-# include <goo/gmem.h>
-# include <goo/gfile.h>
-# else
-# include <aconf.h>
-# include <GString.h>
-# include <gmem.h>
-# include <gfile.h>
-# include <assert.h>
-# endif
+# include <dirent.h>
+# include <poppler-config.h>
+# 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"
@@ -64,6 +57,8 @@ extern "C" {
extern char *xstrdup(const char *);
+ typedef enum { FE_FAIL, FE_RETURN_NULL } file_error_mode;
+
/* the following code is extremly ugly but needed for including web2c/config.h */
typedef const char *const_string; /* including kpathsea/types.h doesn't work on some systems */
@@ -75,7 +70,7 @@ extern "C" {
# undef CONFIG_H /* header file */
# endif
-# include <w2c/c-auto.h> /* define SIZEOF_LONG */
+# include <c-auto.h> /* define SIZEOF_LONG */
# include "openbsd-compat.h"
# include "image.h"
@@ -88,25 +83,24 @@ extern "C" {
/* pdfgen.c */
__attribute__ ((format(printf, 2, 3)))
extern void pdf_printf(PDF, const char *fmt, ...);
- extern void pdf_puts(PDF, const char *);
extern void pdf_begin_obj(PDF, int, bool);
extern void pdf_end_obj(PDF);
extern void pdf_begin_stream(PDF);
extern void pdf_end_stream(PDF);
extern void pdf_room(PDF, int);
-# define pdf_out(B,A) do { pdf_room(B,1); B->buf[B->ptr++] = A; } while (0)
+ extern void pdf_out_block(PDF pdf, const char *s, size_t n);
+
+# define pdf_out(B, A) do { pdf_room(B, 1); B->buf[B->ptr++] = A; } while (0)
+# define pdf_puts(pdf, s) pdf_out_block((pdf), (s), strlen(s))
/* pdftables.c */
extern int pdf_new_objnum(PDF);
- /* epdf.c */
- extern void epdf_free(void);
-
/* pdftoepdf.cc */
extern void read_pdf_info(image_dict *, int, int, img_readtype_e);
extern void write_epdf(PDF, image_dict *);
extern void unrefPdfDocument(char *);
- extern void epdf_check_mem(void);
+ extern void epdf_free(void);
/* utils.c */
__attribute__ ((format(printf, 1, 2)))
@@ -129,6 +123,9 @@ extern "C" {
// and &obj to get a pointer to the object.
// It is no longer necessary to call Object::free explicitely.
+# if 0
+// PdfObject is replaced by xpdf's Object type, with manual obj.free()
+
// *INDENT-OFF*
class PdfObject {
public:
@@ -150,6 +147,7 @@ class PdfObject {
Object iObject;
};
// *INDENT-ON*
+# endif
/**********************************************************************/
@@ -165,9 +163,10 @@ struct PdfDocument {
PDFDoc *doc;
InObj *inObjList; // temporary linked list
avl_table *ObjMapTree; // permanent over luatex run
- int occurences; // number of references to the PdfDocument; it can be deleted when occurences == 0
+ unsigned int occurences; // number of references to the PdfDocument; it can be deleted when occurences == 0
+ unsigned int pc; // counter to track PDFDoc generation or deletion
};
-PdfDocument *refPdfDocument(char *file_path);
+PdfDocument *refPdfDocument(char *file_path, file_error_mode fe);
#endif /* EPDF_H */
diff --git a/Build/source/texk/web2c/luatexdir/image/image.h b/Build/source/texk/web2c/luatexdir/image/image.h
index c4d0c3963f7..c1b91abafb6 100644
--- a/Build/source/texk/web2c/luatexdir/image/image.h
+++ b/Build/source/texk/web2c/luatexdir/image/image.h
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: image.h 3388 2010-01-26 10:59:04Z taco $ */
+/* $Id: image.h 4051 2011-01-09 22:41:33Z hhenkel $ */
#ifndef IMAGE_H
# define IMAGE_H
@@ -30,7 +30,8 @@
# define JPG_UINT32 unsigned long
# define JPG_UINT8 unsigned char
-extern int do_zround(double r); /* from utils.c */
+extern int do_zround(double r); /* from utils.w */
+extern scaled one_hundred_bp; /* from pdfgen.w */
# define bp2int(p) do_zround(p * (one_hundred_bp / 100.0))
# define int2bp(i) (i * 100.0 / one_hundred_bp)
@@ -53,6 +54,10 @@ typedef struct {
JPG_UINT32 length; /* length of file/data */
} jpg_img_struct;
+typedef struct {
+ int length; /* length of file/data */
+} jp2_img_struct;
+
# if 0
typedef struct { /* currently unused */
} jb2_img_struct;
@@ -67,7 +72,7 @@ typedef enum { DICT_NEW, /* fresh dictionary */
} dict_state;
typedef enum { IMG_TYPE_NONE, IMG_TYPE_PDF, IMG_TYPE_PNG, IMG_TYPE_JPG,
- IMG_TYPE_JBIG2, IMG_TYPE_PDFSTREAM, IMG_TYPE_SENTINEL
+ IMG_TYPE_JP2, IMG_TYPE_JBIG2, IMG_TYPE_PDFSTREAM, IMG_TYPE_SENTINEL
} imgtype_e;
typedef enum { IMG_KEEPOPEN, IMG_CLOSEINBETWEEN } img_readtype_e;
@@ -111,6 +116,7 @@ typedef struct {
pdf_stream_struct *pdfstream;
png_img_struct *png;
jpg_img_struct *jpg;
+ jp2_img_struct *jp2;
/* jb2_img_struct *jb2; */
} img_struct;
} image_dict;
@@ -156,6 +162,8 @@ typedef struct {
# define img_jpg_ptr(N) ((N)->img_struct.jpg)
# define img_jpg_color(N) ((N)->img_struct.jpg->color_space)
+# define img_jp2_ptr(N) ((N)->img_struct.jp2)
+
# define img_jb2_ptr(N) ((N)->img_struct.jb2)
# define F_FLAG_BBOX (1 << 0)
diff --git a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.cc b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.cc
index 655fdd8842e..8c112d4261b 100644
--- a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.cc
+++ b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.cc
@@ -19,12 +19,13 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: pdftoepdf.cc 3606 2010-04-10 12:58:25Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/image/pdftoepdf.cc $";
+ "$Id: pdftoepdf.cc 4136 2011-04-11 22:06:50Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/pdftoepdf.cc $";
-#include "epdf.h"
+// define DEBUG
-#define one_hundred_bp 6578176 // one_hundred_bp = 7227 * 65536 / 72
+#include "epdf.h"
+#define HAVE_GETPDFMAJORVERSION 1
// This file is mostly C and not very much C++; it's just used to interface
// the functions of xpdf, which happens to be written in C++.
@@ -62,41 +63,121 @@ static PdfDocument *findPdfDocument(char *file_path)
return pdf_doc;
}
-// Returns pointer to PdfDocument structure for PDF file.
-// Creates a new structure if it doesn't exist yet.
+#define PDF_CHECKSUM_SIZE 32
-char *get_file_checksum(char *a);
+static char *get_file_checksum(char *a, file_error_mode fe)
+{
+ struct stat finfo;
+ char *ck = NULL;
+ if (stat(a, &finfo) == 0) {
+ off_t size = finfo.st_size;
+ time_t mtime = finfo.st_mtime;
+ ck = (char *) malloc(PDF_CHECKSUM_SIZE);
+ if (ck == NULL)
+ pdftex_fail("PDF inclusion: out of memory while processing '%s'",
+ a);
+ snprintf(ck, PDF_CHECKSUM_SIZE, "%llu_%llu", (unsigned long long) size,
+ (unsigned long long) mtime);
+ } else {
+ switch (fe) {
+ case FE_FAIL:
+ pdftex_fail("PDF inclusion: could not stat() file '%s'", a);
+ break;
+ case FE_RETURN_NULL:
+ if (ck != NULL)
+ free(ck);
+ ck = NULL;
+ break;
+ default:
+ assert(0);
+ }
+ }
+ return ck;
+}
+
+// Returns pointer to PdfDocument structure for PDF file.
+// Creates a new PdfDocument structure if it doesn't exist yet.
+// When fe = FE_RETURN_NULL, the function returns NULL in error case.
-PdfDocument *refPdfDocument(char *file_path)
+PdfDocument *refPdfDocument(char *file_path, file_error_mode fe)
{
- PdfDocument *pdf_doc = findPdfDocument(file_path);
- if (pdf_doc == NULL) {
- if (PdfDocumentTree == NULL)
- PdfDocumentTree =
- avl_create(CompPdfDocument, NULL, &avl_xallocator);
+ char *checksum;
+ PdfDocument *pdf_doc;
+ PDFDoc *doc = NULL;
+ GooString *docName = NULL;
+ int new_flag = 0;
+ if ((checksum = get_file_checksum(file_path, fe)) == NULL) {
+ assert(fe == FE_RETURN_NULL);
+ return (PdfDocument *) NULL;
+ }
+ assert(checksum != NULL);
+ if ((pdf_doc = findPdfDocument(file_path)) == NULL) {
+#ifdef DEBUG
+ fprintf(stderr, "\nDEBUG: New PdfDocument %s\n", file_path);
+#endif
+ new_flag = 1;
pdf_doc = new PdfDocument;
pdf_doc->file_path = xstrdup(file_path);
- pdf_doc->checksum = get_file_checksum(file_path);
- void **aa = avl_probe(PdfDocumentTree, pdf_doc);
- assert(aa != NULL);
- pdf_doc->ObjMapTree = NULL;
+ pdf_doc->checksum = checksum;
pdf_doc->doc = NULL;
- }
- if (pdf_doc->doc == NULL) {
- GString *docName = new GString(pdf_doc->file_path);
- pdf_doc->doc = new PDFDoc(docName); // takes ownership of docName
- if (!pdf_doc->doc->isOk() || !pdf_doc->doc->okToPrint())
- pdftex_fail("xpdf: reading PDF image failed");
pdf_doc->inObjList = NULL;
+ pdf_doc->ObjMapTree = NULL;
pdf_doc->occurences = 0; // 0 = unreferenced
+ pdf_doc->pc = 0;
+ } else {
+#ifdef DEBUG
+ fprintf(stderr, "\nDEBUG: Found PdfDocument %s (%d)\n",
+ pdf_doc->file_path, pdf_doc->occurences);
+#endif
+ assert(pdf_doc->checksum != NULL);
+ if (strncmp(pdf_doc->checksum, checksum, PDF_CHECKSUM_SIZE) != 0) {
+ pdftex_fail("PDF inclusion: file has changed '%s'", file_path);
+ }
+ free(checksum);
}
+ assert(pdf_doc != NULL);
+ if (pdf_doc->doc == NULL) {
#ifdef DEBUG
- fprintf(stderr, "\nluatex Debug: Creating %s (%d)\n",
- pdf_doc->file_path, pdf_doc->occurences);
+ fprintf(stderr, "\nDEBUG: New PDFDoc %s (%d)\n",
+ pdf_doc->file_path, pdf_doc->occurences);
#endif
+ docName = new GooString(file_path);
+ doc = new PDFDoc(docName); // takes ownership of docName
+ pdf_doc->pc++;
+
+ if (!doc->isOk() || !doc->okToPrint()) {
+ switch (fe) {
+ case FE_FAIL:
+ pdftex_fail("xpdf: reading PDF image failed");
+ break;
+ case FE_RETURN_NULL:
+ delete doc;
+ // delete docName;
+ if (new_flag == 1) {
+ if (pdf_doc->file_path != NULL)
+ free(pdf_doc->file_path);
+ if (pdf_doc->checksum != NULL)
+ free(pdf_doc->checksum);
+ delete pdf_doc;
+ }
+ return (PdfDocument *) NULL;
+ break;
+ default:
+ assert(0);
+ }
+ }
+ pdf_doc->doc = doc;
+ }
+ // PDF file could be opened without problems, checksum ok.
+ if (PdfDocumentTree == NULL)
+ PdfDocumentTree = avl_create(CompPdfDocument, NULL, &avl_xallocator);
+ if ((PdfDocument *) avl_find(PdfDocumentTree, pdf_doc) == NULL) {
+ void **aa = avl_probe(PdfDocumentTree, pdf_doc);
+ assert(aa != NULL);
+ }
pdf_doc->occurences++;
#ifdef DEBUG
- fprintf(stderr, "\nluatex Debug: Incrementing %s (%d)\n",
+ fprintf(stderr, "\nDEBUG: Incrementing %s (%d)\n",
pdf_doc->file_path, pdf_doc->occurences);
#endif
return pdf_doc;
@@ -249,7 +330,7 @@ static char *convertNumToPDF(double n)
static void copyObject(PDF, PdfDocument *, Object *);
-static void copyString(PDF pdf, GString * string)
+static void copyString(PDF pdf, GooString * string)
{
char *p;
unsigned char c;
@@ -293,13 +374,14 @@ static void copyName(PDF pdf, char *s)
static void copyArray(PDF pdf, PdfDocument * pdf_doc, Array * array)
{
int i, l;
- PdfObject obj1;
+ Object obj1;
pdf_puts(pdf, "[");
for (i = 0, l = array->getLength(); i < l; ++i) {
array->getNF(i, &obj1);
- if (!obj1->isName())
+ if (!obj1.isName())
pdf_puts(pdf, " ");
copyObject(pdf, pdf_doc, &obj1);
+ obj1.free();
}
pdf_puts(pdf, "]");
}
@@ -307,13 +389,14 @@ static void copyArray(PDF pdf, PdfDocument * pdf_doc, Array * array)
static void copyDict(PDF pdf, PdfDocument * pdf_doc, Dict * dict)
{
int i, l;
- PdfObject obj1;
+ Object obj1;
pdf_puts(pdf, "<<");
for (i = 0, l = dict->getLength(); i < l; ++i) {
copyName(pdf, dict->getKey(i));
pdf_puts(pdf, " ");
dict->getValNF(i, &obj1);
copyObject(pdf, pdf_doc, &obj1);
+ obj1.free();
pdf_puts(pdf, "\n");
}
pdf_puts(pdf, ">>");
@@ -392,15 +475,16 @@ static void writeRefs(PDF pdf, PdfDocument * pdf_doc)
{
InObj *r, *n;
XRef *xref;
+ Object obj1;
xref = pdf_doc->doc->getXRef();
for (r = pdf_doc->inObjList; r != NULL;) {
- PdfObject obj1;
xref->fetch(r->ref.num, r->ref.gen, &obj1);
- if (obj1->isStream())
+ if (obj1.isStream())
pdf_begin_obj(pdf, r->num, 0);
else
pdf_begin_obj(pdf, r->num, 2); // \pdfobjcompresslevel = 2 is for this
copyObject(pdf, pdf_doc, &obj1);
+ obj1.free();
pdf_puts(pdf, "\n");
pdf_end_obj(pdf);
n = r->next;
@@ -436,26 +520,6 @@ static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
return page->getMediaBox(); // to make the compiler happy
}
-#define PDF_CHECKSUM_SIZE 32
-char *get_file_checksum(char *a)
-{
- struct stat finfo;
- char *ck = NULL;
- if (stat(a, &finfo) == 0) {
- off_t size = finfo.st_size;
- time_t mtime = finfo.st_mtime;
- ck = (char *) malloc(PDF_CHECKSUM_SIZE);
- if (ck == NULL)
- pdftex_fail("PDF inclusion: out of memory while processing '%s'",
- a);
- snprintf(ck, PDF_CHECKSUM_SIZE, "%llu_%llu", (unsigned long long) size,
- (unsigned long long) mtime);
- } else {
- pdftex_fail("PDF inclusion: could not stat() file '%s'", a);
- }
- return ck;
-}
-
// Reads various information about the PDF and sets it up for later inclusion.
// This will fail if the PDF version of the PDF is higher than
// minor_pdf_version_wanted or page_name is given and can not be found.
@@ -469,7 +533,6 @@ read_pdf_info(image_dict * idict, int minor_pdf_version_wanted,
PdfDocument *pdf_doc;
Page *page;
int rotate;
- char *checksum;
PDFRectangle *pagebox;
#ifdef HAVE_GETPDFMAJORVERSION
int pdf_major_version_found, pdf_minor_version_found;
@@ -486,15 +549,8 @@ read_pdf_info(image_dict * idict, int minor_pdf_version_wanted,
globalParams->setErrQuiet(gFalse);
isInit = gTrue;
}
- // calculate a checksum string
- checksum = get_file_checksum(img_filepath(idict));
// open PDF file
- pdf_doc = refPdfDocument(img_filepath(idict));
- if (strncmp(pdf_doc->checksum, checksum, PDF_CHECKSUM_SIZE) != 0) {
- pdftex_fail("PDF inclusion: file has changed '%s'",
- img_filename(idict));
- }
- free(checksum);
+ pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL);
// check PDF version
// this works only for PDF 1.x -- but since any versions of PDF newer
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
@@ -503,13 +559,15 @@ read_pdf_info(image_dict * idict, int minor_pdf_version_wanted,
pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
if ((pdf_major_version_found > 1)
- || (pdf_minor_version_found > minor_pdf_version_wanted)) {
+ || (pdf_minor_version_found > minor_pdf_version_wanted)) {
const char *msg =
"PDF inclusion: found PDF version <%d.%d>, but at most version <1.%d> allowed";
if (pdf_inclusion_errorlevel > 0) {
- pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
+ pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found,
+ minor_pdf_version_wanted);
} else {
- pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
+ pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found,
+ minor_pdf_version_wanted);
}
}
#else
@@ -528,7 +586,7 @@ read_pdf_info(image_dict * idict, int minor_pdf_version_wanted,
img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages();
if (img_pagename(idict)) {
// get page by name
- GString name(img_pagename(idict));
+ GooString name(img_pagename(idict));
LinkDest *link = pdf_doc->doc->findDest(&name);
if (link == NULL || !link->isOk())
pdftex_fail("PDF inclusion: invalid destination <%s>",
@@ -607,38 +665,30 @@ read_pdf_info(image_dict * idict, int minor_pdf_version_wanted,
// Here the included PDF is copied, so most errors that can happen
// during PDF inclusion will arise here.
-static void write_epdf1(PDF pdf, image_dict * idict)
+void write_epdf(PDF pdf, image_dict * idict)
{
PdfDocument *pdf_doc;
Page *page;
Ref *pageref;
Dict *pageDict;
- PdfObject info, contents, obj1, pageObj, dictObj;
+ Object obj1, contents, pageobj, pagesobj1, pagesobj2, *op1, *op2, *optmp;
PDFRectangle *pagebox;
int i, l;
float bbox[4];
- char *checksum;
char s[256];
- char *pagedictkeys[] =
+ const char *pagedictkeys[] =
{ "Group", "LastModified", "Metadata", "PieceInfo", "Resources",
"SeparationInfo", NULL
};
-
assert(idict != NULL);
- // calculate a checksum string
- checksum = get_file_checksum(img_filepath(idict));
+
// open PDF file
- pdf_doc = refPdfDocument(img_filepath(idict));
- if (strncmp(pdf_doc->checksum, checksum, PDF_CHECKSUM_SIZE) != 0) {
- pdftex_fail("PDF inclusion: file has changed '%s'",
- img_filename(idict));
- }
- free(checksum);
+ pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL);
page = pdf_doc->doc->getCatalog()->getPage(img_pagenum(idict));
pageref = pdf_doc->doc->getCatalog()->getPageRef(img_pagenum(idict));
assert(pageref != NULL); // was checked already in read_pdf_info()
- pdf_doc->doc->getXRef()->fetch(pageref->num, pageref->gen, &pageObj);
- pageDict = pageObj->getDict();
+ pdf_doc->doc->getXRef()->fetch(pageref->num, pageref->gen, &pageobj);
+ pageDict = pageobj.getDict();
// write the Page header
pdf_puts(pdf, "/Type /XObject\n/Subtype /Form\n");
@@ -652,12 +702,13 @@ static void write_epdf1(PDF pdf, image_dict * idict)
strlen(pdf_doc->file_path)));
pdf_printf(pdf, "/%s.PageNumber %i\n", pdfkeyprefix,
(int) img_pagenum(idict));
- pdf_doc->doc->getDocInfoNF(&info);
- if (info->isRef()) {
+ pdf_doc->doc->getDocInfoNF(&obj1);
+ if (obj1.isRef()) {
// the info dict must be indirect (PDF Ref p. 61)
pdf_printf(pdf, "/%s.InfoDict ", pdfkeyprefix);
- pdf_printf(pdf, "%d 0 R\n", addInObj(pdf, pdf_doc, info->getRef()));
+ pdf_printf(pdf, "%d 0 R\n", addInObj(pdf, pdf_doc, obj1.getRef()));
}
+ obj1.free();
if (img_is_bbox(idict)) {
bbox[0] = int2bp(img_bbox(idict)[0]);
bbox[1] = int2bp(img_bbox(idict)[1]);
@@ -678,33 +729,54 @@ static void write_epdf1(PDF pdf, image_dict * idict)
// Now all relevant parts of the Page dictionary are copied:
- // Resources validity check
- pageDict->lookupNF("Resources", &dictObj);
- if (dictObj->isNull()) {
- // Resources can be missing (files without them have been spotted
- // in the wild); in which case the /Resouces of the /Page will be used.
- // "This practice is not recommended".
- pdftex_warn
- ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref.)");
- }
-
// Metadata validity check (as a stream it must be indirect)
- pageDict->lookupNF("Metadata", &dictObj);
- if (!dictObj->isNull() && !dictObj->isRef())
+ pageDict->lookupNF((char *) "Metadata", &obj1);
+ if (!obj1.isNull() && !obj1.isRef())
pdftex_warn("PDF inclusion: /Metadata must be indirect object");
+ obj1.free();
// copy selected items in Page dictionary
for (i = 0; pagedictkeys[i] != NULL; i++) {
- pageDict->lookupNF(pagedictkeys[i], &dictObj);
- if (!dictObj->isNull()) {
+ pageDict->lookupNF((char *) pagedictkeys[i], &obj1);
+ if (!obj1.isNull()) {
pdf_printf(pdf, "/%s ", pagedictkeys[i]);
- copyObject(pdf, pdf_doc, &dictObj); // preserves indirection
+ copyObject(pdf, pdf_doc, &obj1); // preserves indirection
}
+ obj1.free();
+ }
+
+ // If there are no Resources in the Page dict of the embedded page,
+ // try to inherit the Resources from the Pages tree of the embedded
+ // PDF file, climbing up the tree until the Resources are found.
+ // (This fixes a problem with Scribus 1.3.3.14.)
+ pageDict->lookupNF((char *) "Resources", &obj1);
+ if (obj1.isNull()) {
+ op1 = &pagesobj1;
+ op2 = &pagesobj2;
+ pageDict->lookup((char *) "Parent", op1);
+ while (op1->isDict()) {
+ obj1.free();
+ op1->dictLookupNF((char *) "Resources", &obj1);
+ if (!obj1.isNull()) {
+ pdf_puts(pdf, "/Resources ");
+ copyObject(pdf, pdf_doc, &obj1);
+ break;
+ }
+ op1->dictLookup((char *) "Parent", op2);
+ optmp = op1;
+ op1 = op2;
+ op2 = optmp;
+ op2->free();
+ };
+ if (!op1->isDict())
+ pdftex_warn("PDF inclusion: Page /Resources missing.");
+ op1->free();
}
+ obj1.free();
// write the Page contents
page->getContents(&contents);
- if (contents->isStream()) {
+ if (contents.isStream()) {
// Variant A: get stream and recompress under control
// of \pdfcompresslevel
//
@@ -714,37 +786,39 @@ static void write_epdf1(PDF pdf, image_dict * idict)
// Variant B: copy stream without recompressing
//
- contents->streamGetDict()->lookup((char *) "F", &obj1);
- if (!obj1->isNull()) {
+ contents.streamGetDict()->lookup((char *) "F", &obj1);
+ if (!obj1.isNull()) {
pdftex_fail("PDF inclusion: Unsupported external stream");
}
- contents->streamGetDict()->lookup((char *) "Length", &obj1);
- assert(!obj1->isNull());
+ obj1.free();
+ contents.streamGetDict()->lookup((char *) "Length", &obj1);
+ assert(!obj1.isNull());
pdf_puts(pdf, "/Length ");
copyObject(pdf, pdf_doc, &obj1);
+ obj1.free();
pdf_puts(pdf, "\n");
- contents->streamGetDict()->lookup((char *) "Filter", &obj1);
- if (!obj1->isNull()) {
+ contents.streamGetDict()->lookup((char *) "Filter", &obj1);
+ if (!obj1.isNull()) {
pdf_puts(pdf, "/Filter ");
copyObject(pdf, pdf_doc, &obj1);
+ obj1.free();
pdf_puts(pdf, "\n");
- contents->streamGetDict()->lookup((char *) "DecodeParms", &obj1);
- if (!obj1->isNull()) {
+ contents.streamGetDict()->lookup((char *) "DecodeParms", &obj1);
+ if (!obj1.isNull()) {
pdf_puts(pdf, "/DecodeParms ");
copyObject(pdf, pdf_doc, &obj1);
pdf_puts(pdf, "\n");
}
}
+ obj1.free();
pdf_puts(pdf, ">>\nstream\n");
- copyStreamStream(pdf, contents->getStream()->getBaseStream());
+ copyStreamStream(pdf, contents.getStream()->getBaseStream());
pdf_end_stream(pdf);
- } else if (contents->isArray()) {
+ } else if (contents.isArray()) {
pdf_begin_stream(pdf);
- for (i = 0, l = contents->arrayGetLength(); i < l; ++i) {
- PdfObject contentsobj;
- copyStreamStream(pdf,
- (contents->
- arrayGet(i, &contentsobj))->getStream());
+ for (i = 0, l = contents.arrayGetLength(); i < l; ++i) {
+ copyStreamStream(pdf, (contents.arrayGet(i, &obj1))->getStream());
+ obj1.free();
if (i < (l - 1)) {
// put a space between streams to be on the safe side (streams
// should have a trailing space here, but one never knows)
@@ -758,14 +832,13 @@ static void write_epdf1(PDF pdf, image_dict * idict)
}
// write out all indirect objects
writeRefs(pdf, pdf_doc);
-}
-
-// this relay function is needed to keep some destructor quiet (???)
-
-void write_epdf(PDF pdf, image_dict * idict)
-{
- write_epdf1(pdf, idict);
+ contents.free();
+ pageobj.free();
+ // unrefPdfDocument() must come after contents.free() and pageobj.free()!
+ // TH: The next line makes repeated pdf inclusion unacceptably slow
+#if 0
unrefPdfDocument(img_filepath(idict));
+#endif
}
//**********************************************************************
@@ -780,8 +853,12 @@ static void deletePdfDocumentPdfDoc(PdfDocument * pdf_doc)
n = r->next;
delete r;
}
+#ifdef DEBUG
+ fprintf(stderr, "\nDEBUG: Deleting PDFDoc %s\n", pdf_doc->file_path);
+#endif
delete pdf_doc->doc;
pdf_doc->doc = NULL;
+ pdf_doc->pc++;
}
static void destroyPdfDocument(void *pa, void * /*pb */ )
@@ -798,16 +875,13 @@ void unrefPdfDocument(char *file_path)
{
PdfDocument *pdf_doc = findPdfDocument(file_path);
assert(pdf_doc != NULL);
- assert(pdf_doc->occurences > 0); // aim for point landing
+ assert(pdf_doc->occurences != 0); // aim for point landing
pdf_doc->occurences--;
#ifdef DEBUG
- fprintf(stderr, "\nluatex Debug: Decrementing %s (%d)\n",
+ fprintf(stderr, "\nDEBUG: Decrementing %s (%d)\n",
pdf_doc->file_path, pdf_doc->occurences);
#endif
if (pdf_doc->occurences == 0) {
-#ifdef DEBUG
- fprintf(stderr, "\nluatex Debug: Deleting %s\n", pdf_doc->file_path);
-#endif
assert(pdf_doc->inObjList == NULL); // should be eaten up already
deletePdfDocumentPdfDoc(pdf_doc);
}
@@ -816,7 +890,7 @@ void unrefPdfDocument(char *file_path)
// Called when PDF embedding system is finalized.
// Now deallocate all remaining PdfDocuments.
-void epdf_check_mem()
+void epdf_free()
{
if (PdfDocumentTree != NULL)
avl_destroy(PdfDocumentTree, destroyPdfDocument);
diff --git a/Build/source/texk/web2c/luatexdir/image/writeimg.w b/Build/source/texk/web2c/luatexdir/image/writeimg.w
index 45aeacd5fe7..57f0740f04b 100644
--- a/Build/source/texk/web2c/luatexdir/image/writeimg.w
+++ b/Build/source/texk/web2c/luatexdir/image/writeimg.w
@@ -22,8 +22,8 @@
@ @c
static const char _svn_version[] =
- "$Id: writeimg.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/image/writeimg.w $";
+ "$Id: writeimg.w 4055 2011-01-10 19:52:50Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writeimg.w $";
#include <assert.h>
#include "ptexlib.h"
@@ -33,6 +33,7 @@ static const char _svn_version[] =
@ @c
#include "image/image.h"
#include "image/writejpg.h"
+#include "image/writejp2.h"
#include "image/writepng.h"
#include "image/writejbig2.h"
@@ -122,6 +123,7 @@ static const char _svn_version[] =
#define HEADER_JPG "\xFF\xD8"
#define HEADER_PNG "\x89PNG\r\n\x1A\n"
#define HEADER_JBIG2 "\x97\x4A\x42\x32\x0D\x0A\x1A\x0A"
+#define HEADER_JP2 "\x6A\x50\x20\x20"
#define HEADER_PDF "%PDF-1."
#define MAX_HEADER (sizeof(HEADER_PNG)-1)
@@ -145,6 +147,8 @@ static void check_type_by_header(image_dict * idict)
/* tests */
if (strncmp(header, HEADER_JPG, sizeof(HEADER_JPG) - 1) == 0)
img_type(idict) = IMG_TYPE_JPG;
+ else if (strncmp(header + 4, HEADER_JP2, sizeof(HEADER_JP2) - 1) == 0)
+ img_type(idict) = IMG_TYPE_JP2;
else if (strncmp(header, HEADER_PNG, sizeof(HEADER_PNG) - 1) == 0)
img_type(idict) = IMG_TYPE_PNG;
else if (strncmp(header, HEADER_JBIG2, sizeof(HEADER_JBIG2) - 1) == 0)
@@ -169,6 +173,8 @@ static void check_type_by_extension(image_dict * idict)
else if (strcasecmp(image_suffix, ".jpg") == 0 ||
strcasecmp(image_suffix, ".jpeg") == 0)
img_type(idict) = IMG_TYPE_JPG;
+ else if (strcasecmp(image_suffix, ".jp2") == 0)
+ img_type(idict) = IMG_TYPE_JP2;
else if (strcasecmp(image_suffix, ".jbig2") == 0 ||
strcasecmp(image_suffix, ".jb2") == 0)
img_type(idict) = IMG_TYPE_JBIG2;
@@ -257,6 +263,9 @@ void free_image_dict(image_dict * p)
case IMG_TYPE_JPG: /* assuming |IMG_CLOSEINBETWEEN| */
assert(img_jpg_ptr(p) == NULL);
break;
+ case IMG_TYPE_JP2: /* */
+ assert(img_jp2_ptr(p) == NULL);
+ break;
case IMG_TYPE_JBIG2: /* todo: writejbig2.w cleanup */
break;
case IMG_TYPE_PDFSTREAM:
@@ -295,7 +304,7 @@ void read_img(PDF pdf,
img_filepath(idict) =
kpse_find_file(img_filename(idict), kpse_tex_format, true);
if (img_filepath(idict) == NULL)
- pdftex_fail("cannot find image file");
+ pdftex_fail("cannot find image file '%s'", img_filename(idict));
}
recorder_record_input(img_filename(idict));
/* type checks */
@@ -314,6 +323,9 @@ void read_img(PDF pdf,
case IMG_TYPE_JPG:
read_jpg_info(pdf, idict, IMG_CLOSEINBETWEEN);
break;
+ case IMG_TYPE_JP2:
+ read_jp2_info(idict, IMG_CLOSEINBETWEEN);
+ break;
case IMG_TYPE_JBIG2:
if (minor_version < 4) {
pdftex_fail
@@ -338,9 +350,8 @@ static image_dict *read_image(PDF pdf, char *file_name, int page_num,
{
image *a = new_image();
image_dict *idict = img_dict(a) = new_image_dict();
- incr(pdf->ximage_count);
- pdf_create_obj(pdf, obj_type_ximage, pdf->ximage_count);
- img_objnum(idict) = pdf->obj_ptr;
+ pdf->ximage_count++;
+ img_objnum(idict) = pdf_create_obj(pdf, obj_type_ximage, pdf->ximage_count);
img_index(idict) = pdf->ximage_count;
set_obj_data_ptr(pdf, img_objnum(idict), img_index(idict));
idict_to_array(idict);
@@ -429,7 +440,7 @@ void scan_pdfrefximage(PDF pdf)
scaled_whd alt_rule, dim;
alt_rule = scan_alt_rule(); /* scans |<rule spec>| to |alt_rule| */
scan_int();
- check_obj_exists(pdf, obj_type_ximage, cur_val);
+ check_obj_type(pdf, obj_type_ximage, cur_val);
new_whatsit(pdf_refximage_node);
idict = idict_array[obj_data_ptr(pdf, cur_val)];
if (alt_rule.wd != null_flag || alt_rule.ht != null_flag
@@ -577,6 +588,9 @@ void write_img(PDF pdf, image_dict * idict)
case IMG_TYPE_JPG:
write_jpg(pdf, idict);
break;
+ case IMG_TYPE_JP2:
+ write_jp2(pdf, idict);
+ break;
case IMG_TYPE_JBIG2:
write_jbig2(pdf, idict);
break;
@@ -777,8 +791,8 @@ void undumpimagemeta(PDF pdf, int pdfversion, int pdfinclusionerrorlevel)
undumpinteger(img_pagenum(idict));
break;
case IMG_TYPE_PNG:
- break;
case IMG_TYPE_JPG:
+ case IMG_TYPE_JP2:
break;
case IMG_TYPE_JBIG2:
if (pdfversion < 4) {
diff --git a/Build/source/texk/web2c/luatexdir/image/writejbig2.h b/Build/source/texk/web2c/luatexdir/image/writejbig2.h
index a5715d5732e..6609c2d2f99 100644
--- a/Build/source/texk/web2c/luatexdir/image/writejbig2.h
+++ b/Build/source/texk/web2c/luatexdir/image/writejbig2.h
@@ -18,13 +18,16 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: writejbig2.h 2579 2009-06-23 14:12:23Z taco $ */
+/* $Id: writejbig2.h 4051 2011-01-09 22:41:33Z hhenkel $ */
#ifndef WRITEJBIG2_H
# define WRITEJBIG2_H
# include "image.h"
+unsigned int read2bytes(FILE * f);
+unsigned int read4bytes(FILE * f);
+
void flush_jbig2_page0_objects(PDF);
void read_jbig2_info(image_dict *);
void write_jbig2(PDF, image_dict *);
diff --git a/Build/source/texk/web2c/luatexdir/image/writejbig2.w b/Build/source/texk/web2c/luatexdir/image/writejbig2.w
index 0e578f9b457..6828ba418aa 100644
--- a/Build/source/texk/web2c/luatexdir/image/writejbig2.w
+++ b/Build/source/texk/web2c/luatexdir/image/writejbig2.w
@@ -1,7 +1,8 @@
% writejbig2.w
% Copyright 1996-2006 Han The Thanh <thanh@@pdftex.org>
-% Copyright 2006-2009 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2006-2011 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2003-2011 Hartmut Henkel <hartmut@@luatex.org>
% This file is part of LuaTeX.
@@ -80,8 +81,8 @@ object exists, reference it. Else create fresh one.
@ @c
static const char _svn_version[] =
- "$Id: writejbig2.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/image/writejbig2.w $";
+ "$Id: writejbig2.w 4058 2011-01-10 20:44:28Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writejbig2.w $";
#undef DEBUG
@@ -347,14 +348,14 @@ static SEGINFO *find_seginfo(LIST * slp, unsigned long segnum)
}
@ @c
-static unsigned int read2bytes(FILE * f)
+unsigned int read2bytes(FILE * f)
{
unsigned int c = (unsigned int) ygetc(f);
return (c << 8) + (unsigned int) ygetc(f);
}
@ @c
-static unsigned long read4bytes(FILE * f)
+unsigned int read4bytes(FILE * f)
{
unsigned int l = read2bytes(f);
return (l << 16) + read2bytes(f);
@@ -503,7 +504,7 @@ static boolean readseghdr(FILEINFO * fip, SEGINFO * sip)
}
/* 7.2.6 Segment page association */
if (sip->pageassocsizeflag)
- sip->segpage = (long int) read4bytes(fip->file);
+ sip->segpage = read4bytes(fip->file);
else
sip->segpage = ygetc(fip->file);
/* 7.2.7 Segment data length */
@@ -683,17 +684,17 @@ static void rd_jbig2_info(FILEINFO * fip)
/* 7.4.8 Page information segment syntax */
if (sip->pageinfoflag) {
pip->pagenum = (unsigned long) sip->segpage;
- pip->width = (unsigned) read4bytes(fip->file);
- pip->height = (unsigned) read4bytes(fip->file);
- pip->xres = (unsigned) read4bytes(fip->file);
- pip->yres = (unsigned) read4bytes(fip->file);
+ pip->width = read4bytes(fip->file);
+ pip->height = read4bytes(fip->file);
+ pip->xres = read4bytes(fip->file);
+ pip->yres = read4bytes(fip->file);
pip->pagesegmentflags = (unsigned) ygetc(fip->file);
/* 7.4.8.6 Page striping information */
pip->stripinginfo = read2bytes(fip->file);
seekdist -= 19;
}
if (sip->endofstripeflag) {
- pip->stripedheight = (unsigned) read4bytes(fip->file);
+ pip->stripedheight = read4bytes(fip->file);
seekdist -= 4;
}
if (!fip->sequentialaccess
@@ -732,8 +733,8 @@ static void wr_jbig2(PDF pdf, FILEINFO * fip, unsigned long page)
pdf_puts(pdf, "/Filter [/JBIG2Decode]\n");
if (fip->page0.last != NULL) {
if (fip->pdfpage0objnum == 0) {
- pdf_create_obj(pdf, obj_type_others, 0);
- fip->pdfpage0objnum = (unsigned long) pdf->obj_ptr;
+ fip->pdfpage0objnum =
+ (unsigned long) pdf_create_obj(pdf, obj_type_others, 0);
}
pdf_printf(pdf, "/DecodeParms [<< /JBIG2Globals %lu 0 R >>]\n",
fip->pdfpage0objnum);
diff --git a/Build/source/texk/web2c/luatexdir/image/writejp2.h b/Build/source/texk/web2c/luatexdir/image/writejp2.h
new file mode 100644
index 00000000000..04e350f3c9e
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/image/writejp2.h
@@ -0,0 +1,31 @@
+/* writejp2.h
+
+ Copyright 2011 Taco Hoekwater <taco@luatex.org>
+ Copyright 2011 Hartmut Henkel <hartmut@luatex.org>
+
+ This file is part of LuaTeX.
+
+ LuaTeX is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
+
+/* $Id: writejp2.h 4060 2011-01-11 00:01:57Z hhenkel $ */
+
+#ifndef WRITEJP2_H
+# define WRITEJP2_H
+
+# include "image.h"
+
+void read_jp2_info(image_dict *, img_readtype_e);
+void write_jp2(PDF, image_dict *);
+
+#endif /* WRITEJP2_H */
diff --git a/Build/source/texk/web2c/luatexdir/image/writejp2.w b/Build/source/texk/web2c/luatexdir/image/writejp2.w
new file mode 100644
index 00000000000..1d27f733c56
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/image/writejp2.w
@@ -0,0 +1,282 @@
+% writejp2.w
+
+% Copyright 2011 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2011 Hartmut Henkel <hartmut@@luatex.org>
+
+% This file is part of LuaTeX.
+
+% LuaTeX is free software; you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation; either version 2 of the License, or (at your
+% option) any later version.
+
+% LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+% License for more details.
+
+% You should have received a copy of the GNU General Public License along
+% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
+
+@ @c
+static const char _svn_version[] =
+ "$Id: writejp2.w 4133 2011-04-11 16:54:11Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writejp2.w $";
+
+@ Basic JPEG~2000 image support. Section and Table references below:
+Information technology --- JPEG~2000 image coding system: Core coding system.
+ISO/IEC 15444-1, Second edition, 2004-09-15, file |15444-1annexi.pdf|.
+
+@c
+#include <math.h>
+#include <assert.h>
+#include "ptexlib.h"
+#include "image/image.h"
+#include "image/writejp2.h"
+#include "image/writejbig2.h" /* read2bytes(), read4bytes() */
+
+/* Table 1.2 -- Defined boxes */
+#define BOX_JP 0x6A502020
+#define BOX_FTYP 0x66747970
+#define BOX_JP2H 0x6a703268
+#define BOX_IHDR 0x69686472
+#define BOX_BPCC 0x62706363
+#define BOX_COLR 0x636D6170
+#define BOX_CDEF 0x63646566
+#define BOX_RES 0x72657320
+#define BOX_RESC 0x72657363
+#define BOX_RESD 0x72657364
+#define BOX_JP2C 0x6A703263
+
+/* 1.4 Box definition */
+typedef struct {
+ unsigned long long lbox;
+ unsigned int tbox;
+} hdr_struct;
+
+static unsigned long long read8bytes(FILE * f)
+{
+ unsigned long long l = read4bytes(f);
+ l = (l << 32) + read4bytes(f);
+ return l;
+}
+
+static hdr_struct read_boxhdr(image_dict * idict)
+{
+ hdr_struct hdr;
+ hdr.lbox = read4bytes(img_file(idict));
+ hdr.tbox = read4bytes(img_file(idict));
+ if (hdr.lbox == 1)
+ hdr.lbox = read8bytes(img_file(idict));
+ if (hdr.lbox == 0 && hdr.tbox != BOX_JP2C)
+ pdftex_fail("reading JP2 image failed (LBox == 0)");
+ return hdr;
+}
+
+/* 1.5.3.1 Image Header box */
+static void scan_ihdr(image_dict * idict)
+{
+ unsigned int height, width, nc;
+ unsigned char bpc, c, unkc, ipr;
+ height = read4bytes(img_file(idict));
+ width = read4bytes(img_file(idict));
+ img_ysize(idict) = (int) height;
+ img_xsize(idict) = (int) width;
+ nc = read2bytes(img_file(idict));
+ bpc = (unsigned char) xgetc(img_file(idict));
+ img_colordepth(idict) = bpc + 1;
+ c = (unsigned char) xgetc(img_file(idict));
+ unkc = (unsigned char) xgetc(img_file(idict));
+ ipr = (unsigned char) xgetc(img_file(idict));
+}
+
+/* 1.5.3.7.1 Capture Resolution box */
+/* 1.5.3.7.2 Default Display Resolution box */
+static void scan_resc_resd(image_dict * idict)
+{
+ unsigned int vr_n, vr_d, hr_n, hr_d;
+ unsigned char vr_e, hr_e;
+ double hr_, vr_;
+ vr_n = read2bytes(img_file(idict));
+ vr_d = read2bytes(img_file(idict));
+ hr_n = read2bytes(img_file(idict));
+ hr_d = read2bytes(img_file(idict));
+ vr_e = (unsigned char) xgetc(img_file(idict));
+ hr_e = (unsigned char) xgetc(img_file(idict));
+ hr_ = ((double) hr_n / hr_d) * exp(hr_e * log(10.0)) * 0.0254;
+ vr_ = ((double) vr_n / vr_d) * exp(vr_e * log(10.0)) * 0.0254;
+ img_xres(idict) = (int) (hr_ + 0.5);
+ img_yres(idict) = (int) (vr_ + 0.5);
+}
+
+/* 1.5.3.7 Resolution box (superbox) */
+static void scan_res(image_dict * idict, unsigned long long epos_s)
+{
+ hdr_struct hdr;
+ unsigned long long spos, epos;
+ epos = xftell(img_file(idict), img_filepath(idict));
+ while (1) {
+ spos = epos;
+ hdr = read_boxhdr(idict);
+ epos = spos + hdr.lbox;
+ switch (hdr.tbox) {
+ case (BOX_RESC):
+ /* arbitrarily: let BOX_RESD have precedence */
+ if (img_xres(idict) == 0 && img_yres(idict) == 0) {
+ scan_resc_resd(idict);
+ if (xftell(img_file(idict), img_filepath(idict)) != (long)epos)
+ pdftex_fail
+ ("reading JP2 image failed (resc box size inconsistent)");
+ }
+ break;
+ case (BOX_RESD):
+ scan_resc_resd(idict);
+ if (xftell(img_file(idict), img_filepath(idict)) != (long)epos)
+ pdftex_fail
+ ("reading JP2 image failed (resd box size inconsistent)");
+ break;
+ default:;
+ }
+ if (epos > epos_s)
+ pdftex_fail("reading JP2 image failed (res box size inconsistent)");
+ if (epos == epos_s)
+ break;
+ xfseek(img_file(idict), (long) epos, SEEK_SET, img_filepath(idict));
+ }
+}
+
+/* 1.5.3 JP2 Header box (superbox) */
+static boolean scan_jp2h(image_dict * idict, unsigned long long epos_s)
+{
+ boolean ihdr_found = false;
+ hdr_struct hdr;
+ unsigned long long spos, epos;
+ epos = xftell(img_file(idict), img_filepath(idict));
+ while (1) {
+ spos = epos;
+ hdr = read_boxhdr(idict);
+ epos = spos + hdr.lbox;
+ switch (hdr.tbox) {
+ case (BOX_IHDR):
+ scan_ihdr(idict);
+ if (xftell(img_file(idict), img_filepath(idict)) != (long)epos)
+ pdftex_fail
+ ("reading JP2 image failed (ihdr box size inconsistent)");
+ ihdr_found = true;
+ break;
+ case (BOX_RES):
+ scan_res(idict, epos);
+ break;
+ default:;
+ }
+ if (epos > epos_s)
+ pdftex_fail
+ ("reading JP2 image failed (jp2h box size inconsistent)");
+ if (epos == epos_s)
+ break;
+ xfseek(img_file(idict), (long) epos, SEEK_SET, img_filepath(idict));
+ }
+ return ihdr_found;
+}
+
+static void close_and_cleanup_jp2(image_dict * idict)
+{
+ assert(idict != NULL);
+ assert(img_file(idict) != NULL);
+ assert(img_filepath(idict) != NULL);
+ xfclose(img_file(idict), img_filepath(idict));
+ img_file(idict) = NULL;
+ assert(img_jp2_ptr(idict) != NULL);
+ xfree(img_jp2_ptr(idict));
+}
+
+void read_jp2_info(image_dict * idict, img_readtype_e readtype)
+{
+ boolean ihdr_found = false;
+ hdr_struct hdr;
+ unsigned long long spos, epos;
+ assert(img_type(idict) == IMG_TYPE_JP2);
+ img_totalpages(idict) = 1;
+ img_pagenum(idict) = 1;
+ img_xres(idict) = img_yres(idict) = 0;
+ assert(img_file(idict) == NULL);
+ img_file(idict) = xfopen(img_filepath(idict), FOPEN_RBIN_MODE);
+ assert(img_jp2_ptr(idict) == NULL);
+ img_jp2_ptr(idict) = xtalloc(1, jp2_img_struct);
+ xfseek(img_file(idict), 0, SEEK_END, img_filepath(idict));
+ img_jp2_ptr(idict)->length =
+ (int) xftell(img_file(idict), img_filepath(idict));
+ xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict));
+
+ assert(sizeof(unsigned long long) >= 8);
+ spos = epos = 0;
+
+ /* 1.5.1 JPEG 2000 Signature box */
+ hdr = read_boxhdr(idict);
+ assert(hdr.tbox == BOX_JP); /* has already been checked */
+ epos = spos + hdr.lbox;
+ xfseek(img_file(idict), (long) epos, SEEK_SET, img_filepath(idict));
+
+ /* 1.5.2 File Type box */
+ spos = epos;
+ hdr = read_boxhdr(idict);
+ if (hdr.tbox != BOX_FTYP)
+ pdftex_fail("reading JP2 image failed (missing ftyp box)");
+ epos = spos + hdr.lbox;
+ xfseek(img_file(idict), (long) epos, SEEK_SET, img_filepath(idict));
+
+ while (!ihdr_found) {
+ spos = epos;
+ hdr = read_boxhdr(idict);
+ epos = spos + hdr.lbox;
+ switch (hdr.tbox) {
+ case BOX_JP2H:
+ ihdr_found = scan_jp2h(idict, epos);
+ break;
+ case BOX_JP2C:
+ if (!ihdr_found)
+ pdftex_fail("reading JP2 image failed (no ihdr box found)");
+ break;
+ default:;
+ }
+ xfseek(img_file(idict), (long) epos, SEEK_SET, img_filepath(idict));
+ }
+ if (readtype == IMG_CLOSEINBETWEEN)
+ close_and_cleanup_jp2(idict);
+}
+
+static void reopen_jp2(image_dict * idict)
+{
+ int width, height, xres, yres;
+ width = img_xsize(idict);
+ height = img_ysize(idict);
+ xres = img_xres(idict);
+ yres = img_yres(idict);
+ read_jp2_info(idict, IMG_KEEPOPEN);
+ if (width != img_xsize(idict) || height != img_ysize(idict)
+ || xres != img_xres(idict) || yres != img_yres(idict))
+ pdftex_fail("writejp2: image dimensions have changed");
+}
+
+void write_jp2(PDF pdf, image_dict * idict)
+{
+ long unsigned l;
+ FILE *f;
+ assert(idict != NULL);
+ if (img_file(idict) == NULL)
+ reopen_jp2(idict);
+ xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict));
+ assert(img_jp2_ptr(idict) != NULL);
+ pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n");
+ if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0)
+ pdf_printf(pdf, "%s\n", img_attr(idict));
+ pdf_printf(pdf, "/Width %i\n/Height %i\n/Length %i\n",
+ (int) img_xsize(idict),
+ (int) img_ysize(idict), (int) img_jp2_ptr(idict)->length);
+ pdf_puts(pdf, "/Filter /JPXDecode\n>>\nstream\n");
+ for (l = (long unsigned int) img_jp2_ptr(idict)->length, f =
+ img_file(idict); l > 0; l--)
+ pdf_out(pdf, xgetc(f));
+ pdf_end_stream(pdf);
+ close_and_cleanup_jp2(idict);
+}
diff --git a/Build/source/texk/web2c/luatexdir/image/writejpg.w b/Build/source/texk/web2c/luatexdir/image/writejpg.w
index 4f77303ce20..e7a202c54f3 100644
--- a/Build/source/texk/web2c/luatexdir/image/writejpg.w
+++ b/Build/source/texk/web2c/luatexdir/image/writejpg.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: writejpg.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/image/writejpg.w $";
+ "$Id: writejpg.w 4095 2011-03-31 21:14:27Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writejpg.w $";
#include <assert.h>
#include "ptexlib.h"
@@ -41,18 +41,18 @@ typedef enum { /* JPEG marker codes */
M_SOF5 = 0xc5, /* differential sequential DCT */
M_SOF6 = 0xc6, /* differential progressive DCT */
- M_SOF7 = 0xc7, /* differential lossless */
+ M_SOF7 = 0xc7, /* differential lossless (sequential) */
- M_JPG = 0xc8, /* JPEG extensions */
+ M_JPG = 0xc8, /* reserved for JPEG extensions */
M_SOF9 = 0xc9, /* extended sequential DCT */
M_SOF10 = 0xca, /* progressive DCT */
M_SOF11 = 0xcb, /* lossless (sequential) */
M_SOF13 = 0xcd, /* differential sequential DCT */
M_SOF14 = 0xce, /* differential progressive DCT */
- M_SOF15 = 0xcf, /* differential lossless */
+ M_SOF15 = 0xcf, /* differential lossless (sequential) */
- M_DHT = 0xc4, /* define Huffman tables */
+ M_DHT = 0xc4, /* define Huffman table(s) */
M_DAC = 0xcc, /* define arithmetic conditioning table */
@@ -101,13 +101,6 @@ typedef enum { /* JPEG marker codes */
} JPEG_MARKER;
@ @c
-static JPG_UINT16 read2bytes(FILE * f)
-{
- int c = xgetc(f);
- return (JPG_UINT16) ((c << 8) + (int) xgetc(f));
-}
-
-@ @c
static void close_and_cleanup_jpg(image_dict * idict)
{
assert(idict != NULL);
@@ -117,7 +110,6 @@ static void close_and_cleanup_jpg(image_dict * idict)
img_file(idict) = NULL;
assert(img_jpg_ptr(idict) != NULL);
xfree(img_jpg_ptr(idict));
- img_jpg_ptr(idict) = NULL;
}
@ @c
@@ -137,17 +129,17 @@ void read_jpg_info(PDF pdf, image_dict * idict, img_readtype_e readtype)
xfseek(img_file(idict), 0, SEEK_END, img_filepath(idict));
img_jpg_ptr(idict)->length = xftell(img_file(idict), img_filepath(idict));
xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict));
- if (read2bytes(img_file(idict)) != 0xFFD8)
+ if ((unsigned int) read2bytes(img_file(idict)) != 0xFFD8)
pdftex_fail("reading JPEG image failed (no JPEG header found)");
/* currently only true JFIF files allow extracting |img_xres| and |img_yres| */
- if (read2bytes(img_file(idict)) == 0xFFE0) { /* check for JFIF */
+ if ((unsigned int) read2bytes(img_file(idict)) == 0xFFE0) { /* check for JFIF */
(void) read2bytes(img_file(idict));
for (i = 0; i < 5; i++) {
if (xgetc(img_file(idict)) != jpg_id[i])
break;
}
if (i == 5) { /* it's JFIF */
- read2bytes(img_file(idict));
+ (void) read2bytes(img_file(idict));
units = xgetc(img_file(idict));
img_xres(idict) = (int) read2bytes(img_file(idict));
img_yres(idict) = (int) read2bytes(img_file(idict));
@@ -177,23 +169,25 @@ void read_jpg_info(PDF pdf, image_dict * idict, img_readtype_e readtype)
pdftex_fail("reading JPEG image failed (premature file end)");
if (fgetc(img_file(idict)) != 0xFF)
pdftex_fail("reading JPEG image failed (no marker found)");
- switch (xgetc(img_file(idict))) {
+ i = xgetc(img_file(idict));
+ switch (i) {
+ case M_SOF3: /* lossless */
case M_SOF5:
case M_SOF6:
- case M_SOF7:
+ case M_SOF7: /* lossless */
case M_SOF9:
case M_SOF10:
- case M_SOF11:
+ case M_SOF11: /* lossless */
case M_SOF13:
case M_SOF14:
- case M_SOF15:
- pdftex_fail("unsupported type of compression");
+ case M_SOF15: /* lossless */
+ pdftex_fail("unsupported type of compression (SOF_%d)", i - M_SOF0);
+ break;
case M_SOF2:
if (pdf->minor_version <= 2)
pdftex_fail("cannot use progressive DCT with PDF-1.2");
case M_SOF0:
case M_SOF1:
- case M_SOF3:
(void) read2bytes(img_file(idict)); /* read segment length */
img_colordepth(idict) = xgetc(img_file(idict));
img_ysize(idict) = (int) read2bytes(img_file(idict));
@@ -230,7 +224,7 @@ void read_jpg_info(PDF pdf, image_dict * idict, img_readtype_e readtype)
case M_RST7:
break;
default: /* skip variable length markers */
- xfseek(img_file(idict), read2bytes(img_file(idict)) - 2,
+ xfseek(img_file(idict), (int) read2bytes(img_file(idict)) - 2,
SEEK_CUR, img_filepath(idict));
break;
}
diff --git a/Build/source/texk/web2c/luatexdir/image/writepng.w b/Build/source/texk/web2c/luatexdir/image/writepng.w
index fbe80259a63..7d497deea0e 100644
--- a/Build/source/texk/web2c/luatexdir/image/writepng.w
+++ b/Build/source/texk/web2c/luatexdir/image/writepng.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: writepng.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/image/writepng.w $";
+ "$Id: writepng.w 4133 2011-04-11 16:54:11Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writepng.w $";
#include <assert.h>
#include "ptexlib.h"
@@ -42,7 +42,6 @@ static void close_and_cleanup_png(image_dict * idict)
png_destroy_read_struct(&(img_png_png_ptr(idict)),
&(img_png_info_ptr(idict)), NULL);
xfree(img_png_ptr(idict));
- img_png_ptr(idict) = NULL;
}
@ @c
@@ -115,7 +114,7 @@ void read_png_info(PDF pdf, image_dict * idict, img_readtype_e readtype)
img_procset(idict) |= PROCSET_IMAGE_C;
break;
default:
- pdftex_fail("unsupported type of color_type <%i>", png_get_color_type(png_p, info_p));
+ pdftex_fail("unsupported type of color_type <%i>", (int)png_get_color_type (png_p, info_p));
}
img_colordepth(idict) = png_get_bit_depth(png_p, info_p);
if (readtype == IMG_CLOSEINBETWEEN)
@@ -187,10 +186,9 @@ static void write_png_palette(PDF pdf, image_dict * idict)
if (img_colorspace(idict) != 0) {
pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict));
} else {
- pdf_create_obj(pdf, obj_type_others, 0);
- palette_objnum = pdf->obj_ptr;
+ palette_objnum = pdf_create_obj(pdf, obj_type_others, 0);
pdf_printf(pdf, "[/Indexed /DeviceRGB %i %i 0 R]\n",
- num_palette - 1, (int) palette_objnum);
+ (int) (num_palette - 1), (int) palette_objnum);
}
pdf_begin_stream(pdf);
if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) {
@@ -212,7 +210,7 @@ static void write_png_palette(PDF pdf, image_dict * idict)
if (palette_objnum > 0) {
pdf_begin_dict(pdf, palette_objnum, 0);
pdf_begin_stream(pdf);
- for (i = 0; (unsigned) i < num_palette; i++) {
+ for (i = 0; i < num_palette; i++) {
pdf_room(pdf, 3);
pdf_quick_out(pdf, palette[i].red);
pdf_quick_out(pdf, palette[i].green);
@@ -264,14 +262,13 @@ static void write_png_gray_alpha(PDF pdf, image_dict * idict)
png_bytep smask;
int smask_ptr = 0;
int smask_size = 0;
- int bitdepth;
+ png_byte bitdepth;
if (img_colorspace(idict) != 0) {
pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict));
} else {
pdf_puts(pdf, "/DeviceGray\n");
}
- pdf_create_obj(pdf, obj_type_others, 0);
- smask_objnum = pdf->obj_ptr;
+ smask_objnum = pdf_create_obj(pdf, obj_type_others, 0);
pdf_printf(pdf, "/SMask %i 0 R\n", (int) smask_objnum);
smask_size = (int) ((png_get_rowbytes(png_p, info_p) / 2) * png_get_image_height (png_p, info_p));
smask = xtalloc((unsigned) smask_size, png_byte);
@@ -302,7 +299,7 @@ static void write_png_gray_alpha(PDF pdf, image_dict * idict)
pdf_end_stream(pdf);
pdf_flush(pdf);
/* now write the Smask object */
- bitdepth = (int) png_get_bit_depth(png_p, info_p);
+ bitdepth = png_get_bit_depth (png_p, info_p);
pdf_begin_dict(pdf, smask_objnum, 0);
pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n");
if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0)
@@ -366,16 +363,15 @@ static void write_png_rgb_alpha(PDF pdf, image_dict * idict)
png_bytep smask;
int smask_ptr = 0;
int smask_size = 0;
- int bitdepth;
+ png_byte bitdepth;
if (img_colorspace(idict) != 0) {
pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict));
} else {
pdf_puts(pdf, "/DeviceRGB\n");
}
- pdf_create_obj(pdf, obj_type_others, 0);
- smask_objnum = pdf->obj_ptr;
+ smask_objnum = pdf_create_obj(pdf, obj_type_others, 0);
pdf_printf(pdf, "/SMask %i 0 R\n", (int) smask_objnum);
- smask_size = (int) ((png_get_rowbytes(png_p, info_p) / 2) * png_get_image_height (png_p, info_p));
+ smask_size = (int) ((png_get_rowbytes (png_p, info_p) / 4) * png_get_image_height (png_p, info_p));
smask = xtalloc((unsigned) smask_size, png_byte);
pdf_begin_stream(pdf);
if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) {
@@ -405,7 +401,7 @@ static void write_png_rgb_alpha(PDF pdf, image_dict * idict)
pdf_flush(pdf);
/* now write the Smask object */
if (smask_objnum > 0) {
- bitdepth = (int) png_get_bit_depth(png_p, info_p);
+ bitdepth = png_get_bit_depth (png_p, info_p);
pdf_begin_dict(pdf, smask_objnum, 0);
pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n");
if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0)
@@ -483,12 +479,12 @@ static void copy_png(PDF pdf, image_dict * idict)
"/Filter/FlateDecode\n"
"/DecodeParms<<"
"/Colors %d"
- "/Columns %d"
+ "/Columns %u"
"/BitsPerComponent %i"
"/Predictor 10>>\n>>\nstream\n", streamlength,
- png_get_color_type(png_p, info_p) == 2 ? 3 : 1,
- (int) png_get_image_width (png_p, info_p),
- png_get_bit_depth(png_p, info_p));
+ png_get_color_type (png_p, info_p) == 2 ? 3 : 1,
+ png_get_image_width (png_p, info_p),
+ png_get_bit_depth (png_p, info_p));
/* 2nd pass to copy data */
endflag = false;
if (fseek(fp, 8, SEEK_SET) != 0)
@@ -575,10 +571,12 @@ void write_png(PDF pdf, image_dict * idict)
}
/* the switching between |info_p| and |png_p| queries has been trial and error.
*/
- if (pdf->minor_version > 1 && png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE
- &&!(png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_GRAY_ALPHA ||
- png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_RGB_ALPHA)
- && ((pdf->image_hicolor != 0) || (png_get_bit_depth(png_p, info_p) <= 8))
+ if (pdf->minor_version > 1
+ && png_get_interlace_type (png_p, info_p) == PNG_INTERLACE_NONE
+ && (png_p->transformations == 0 || png_p->transformations == 0x2000) /* gamma */
+ &&!(png_get_color_type (png_p, info_p) == PNG_COLOR_TYPE_GRAY_ALPHA ||
+ png_get_color_type (png_p, info_p) == PNG_COLOR_TYPE_RGB_ALPHA)
+ && ((pdf->image_hicolor != 0) || (png_get_bit_depth (png_p, info_p) <= 8))
&& (checked_gamma <= 1.01 && checked_gamma > 0.99)
) {
png_colorp palette;
@@ -590,8 +588,7 @@ void write_png(PDF pdf, image_dict * idict)
} else {
switch (png_get_color_type(png_p, info_p)) {
case PNG_COLOR_TYPE_PALETTE:
- pdf_create_obj(pdf, obj_type_others, 0);
- palette_objnum = pdf->obj_ptr;
+ palette_objnum = pdf_create_obj(pdf, obj_type_others, 0);
pdf_printf(pdf, "[/Indexed /DeviceRGB %i %i 0 R]\n",
num_palette - 1, (int) palette_objnum);
break;
@@ -608,7 +605,7 @@ void write_png(PDF pdf, image_dict * idict)
if (palette_objnum > 0) {
pdf_begin_dict(pdf, palette_objnum, 0);
pdf_begin_stream(pdf);
- for (i = 0; (unsigned) i < num_palette; i++) {
+ for (i = 0; i < num_palette; i++) {
pdf_room(pdf, 3);
pdf_quick_out(pdf, palette[i].red);
pdf_quick_out(pdf, palette[i].green);
@@ -622,9 +619,11 @@ void write_png(PDF pdf, image_dict * idict)
if ((pdf->image_apply_gamma != 0) &&
(checked_gamma > 1.01 || checked_gamma < 0.99))
tex_printf("gamma delta=%lf ", checked_gamma);
- if ((png_get_color_type(png_p, info_p) != PNG_COLOR_TYPE_GRAY)
- && (png_get_color_type(png_p, info_p) != PNG_COLOR_TYPE_RGB)
- && (png_get_color_type(png_p, info_p) != PNG_COLOR_TYPE_PALETTE))
+ if (png_p->transformations != PNG_TRANSFORM_IDENTITY)
+ tex_printf("transform=%lu", (long) png_p->transformations);
+ if ((png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_GRAY)
+ && (png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_RGB)
+ && (png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_PALETTE))
tex_printf("colortype ");
if (pdf->minor_version <= 1)
tex_printf("version=%d ", pdf->minor_version);
diff --git a/Build/source/texk/web2c/luatexdir/lang/hyphen.w b/Build/source/texk/web2c/luatexdir/lang/hyphen.w
index fc88ac9c571..a5ad227d740 100644
--- a/Build/source/texk/web2c/luatexdir/lang/hyphen.w
+++ b/Build/source/texk/web2c/luatexdir/lang/hyphen.w
@@ -56,8 +56,8 @@
@ @c
static const char _svn_version[] =
- "$Id: hyphen.w 3612 2010-04-13 09:29:42Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lang/hyphen.w $";
+ "$Id: hyphen.w 3831 2010-08-25 04:35:34Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lang/hyphen.w $";
@ TODO: should be moved to separate library
@@ -324,7 +324,7 @@ static char *hyppat_lookup(HashTab * hashtab, const unsigned char *chars, int l)
{
int i;
HashEntry *e;
- unsigned char key[128]; /* should be ample */
+ unsigned char key[256]; /* should be ample */
strncpy((char *) key, (const char *) chars, (size_t) l);
key[l] = 0;
i = (int) (hnj_string_hash(key) % HASH_SIZE);
@@ -604,6 +604,12 @@ void hnj_hyphen_load(HyphenDict * dict, const unsigned char *f)
char *org;
while ((format = next_pattern(&l, &f)) != NULL) {
int i, j, e;
+ if (l>=255) {
+ help1("Individual patterns should not be longer than 254 bytes total.");
+ print_err("Pattern of enormous length ignored");
+ error();
+ continue;
+ }
#if 0
printf("%s\n",format);
char* repl = strnchr(format, '/',l);
diff --git a/Build/source/texk/web2c/luatexdir/lang/texlang.w b/Build/source/texk/web2c/luatexdir/lang/texlang.w
index 9aa55787ca7..01081c02326 100644
--- a/Build/source/texk/web2c/luatexdir/lang/texlang.w
+++ b/Build/source/texk/web2c/luatexdir/lang/texlang.w
@@ -26,13 +26,14 @@
static const char _svn_version[] =
- "$Id: texlang.w 3701 2010-05-26 09:57:17Z taco $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/lang/texlang.w $";
+ "$Id: texlang.w 3907 2010-10-04 09:02:29Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lang/texlang.w $";
@ Low-level helpers
@c
+#define ex_hyphen_char int_par(ex_hyphen_char_code)
static char *uni2string(char *utf8_text, unsigned ch)
{
/* Increment and deposit character */
@@ -245,64 +246,82 @@ void load_tex_patterns(int curlang, halfword head)
@ @c
#define STORE_CHAR(x) do { \
- word[w] = (unsigned char)x; \
- if (w<MAX_WORD_LEN) w++; \
+ unsigned xx = get_lc_code(x); \
+ if (!xx) xx = x; \
+ uindex = uni2string(uindex, xx); \
} while (0)
-/* todo change this! */
+/* Cleans one word which is returned in |cleaned|,
+ returns the new offset into |buffer| */
const char *clean_hyphenation(const char *buffer, char **cleaned)
{
- int items;
- unsigned char word[MAX_WORD_LEN + 1];
- int w = 0;
+ int items = 0;
+ unsigned char word[MAX_WORD_LEN + 1]; /* work buffer for bytes */
+ unsigned uword[MAX_WORD_LEN + 1] = { 0 }; /* work buffer for unicode */
+ int u = 0; /* unicode buffer value */
+ int i = 0; /* index into buffer */
+ char *uindex = (char *)word;
const char *s = buffer;
+
while (*s && !isspace(*s)) {
- if (*s == '-') { /* skip */
- } else if (*s == '=') {
+ word[i++] = (unsigned)*s;
+ s++;
+ if ((s-buffer)>MAX_WORD_LEN) {
+ /* todo: this is too strict, should count unicode, not bytes */
+ *cleaned = NULL;
+ tex_error("exception too long", NULL);
+ return s;
+ }
+ }
+ /* now convert the input to unicode */
+ word[i] = '\0';
+ utf82u_strcpy(uword, (const char *)word);
+
+ /* build the new word string */
+ i = 0;
+ while (uword[i]>0) {
+ u = uword[i++];
+ if (u == '-') { /* skip */
+ } else if (u == '=') {
STORE_CHAR('-');
- } else if (*s == '{') {
- s++;
+ } else if (u == '{') {
+ u = uword[i++];
items = 0;
- while (*s && *s != '}') {
- s++;
+ while (u && u != '}') {
+ u = uword[i++];
}
- if (*s == '}') {
+ if (u == '}') {
items++;
- s++;
+ u = uword[i++];
}
- while (*s && *s != '}') {
- s++;
+ while (u && u != '}') {
+ u = uword[i++];
}
- if (*s == '}') {
+ if (u == '}') {
items++;
- s++;
+ u = uword[i++];;
}
- if (*s == '{') {
- s++;
+ if (u == '{') {
+ u = uword[i++];;
}
- while (*s && *s != '}') {
- STORE_CHAR(*s);
- s++;
+ while (u && u != '}') {
+ STORE_CHAR(u);
+ u = uword[i++];
}
- if (*s == '}') {
- items++;
- } else {
- s--;
+ if (u == '}') {
+ items++;
}
if (items != 3) { /* syntax error */
*cleaned = NULL;
- while (*s && !isspace(*s)) {
- s++;
- }
+ tex_error("exception syntax error", NULL);
return s;
}
} else {
- STORE_CHAR(*s);
+ STORE_CHAR(u);
}
- s++;
}
- word[w] = 0;
+ *uindex = '\0';
*cleaned = xstrdup((char *) word);
return s;
}
@@ -824,6 +843,7 @@ void hnj_hyphenation(halfword head, halfword tail)
int wordlen = 0;
char *hy = utf8word;
char *replacement = NULL;
+ boolean explicit_hyphen = false;
halfword s, r = head, wordstart = null, save_tail = null, left =
null, right = null;
@@ -866,7 +886,11 @@ void hnj_hyphenation(halfword head, halfword tail)
type(r) == glyph_node &&
is_simple_character(r) &&
clang == char_lang(r) &&
- (lchar = get_lc_code(character(r))) > 0) {
+ (((lchar = get_lc_code(character(r))) > 0)
+ ||
+ (character(r) == ex_hyphen_char && (lchar = ex_hyphen_char)))) {
+ if (character(r) == ex_hyphen_char)
+ explicit_hyphen = true;
wordlen++;
hy = uni2string(hy, (unsigned) lchar);
/* this should not be needed any more */
@@ -886,6 +910,28 @@ void hnj_hyphenation(halfword head, halfword tail)
#endif
do_exception(wordstart, r, replacement);
free(replacement);
+ } else if (explicit_hyphen == true) {
+ /* insert an explicit discretionary after each of the last in a
+ set of explicit hyphens */
+ halfword rr = r;
+ halfword t = null;
+#ifdef VERBOSE
+ fprintf(stderr, "explicit hyphen(s) found in %s (c=%d)\n", utf8word, clang);
+#endif
+ while (rr != wordstart) {
+ if (is_simple_character(rr)) {
+ if (character(rr) == ex_hyphen_char) {
+ t = compound_word_break(rr, clang);
+ subtype(t) = automatic_disc;
+ while(character(alink(rr)) == ex_hyphen_char)
+ rr = alink(rr);
+ if (rr == wordstart)
+ break;
+ }
+ }
+ rr = alink(rr);
+ }
+
} else if (lang->patterns != NULL) {
left = wordstart;
@@ -910,6 +956,7 @@ void hnj_hyphenation(halfword head, halfword tail)
wordlen, left, right, &langdata);
}
}
+ explicit_hyphen = false;
wordlen = 0;
hy = utf8word;
if (r == null)
diff --git a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c
index a3961703528..98444a9f705 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c
@@ -21,7 +21,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: lcallbacklib.c 3404 2010-01-28 11:17:10Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lcallbacklib.c $";
+ "$Id: lcallbacklib.c 3965 2010-11-22 12:38:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lcallbacklib.c $";
int callback_count = 0;
int saved_callback_count = 0;
@@ -35,7 +35,6 @@ static const char *const callbacknames[] = {
"find_image_file",
"find_format_file",
"find_read_file", "open_read_file",
- "find_ocp_file", "read_ocp_file",
"find_vf_file", "read_vf_file",
"find_data_file", "read_data_file",
"find_font_file", "read_font_file",
@@ -63,11 +62,19 @@ static const char *const callbacknames[] = {
"linebreak_filter",
"post_linebreak_filter",
"mlist_to_hlist",
+ "finish_pdffile",
+ "pre_dump",
NULL
};
int callback_callbacks_id = 0;
+int debug_callback_defined(int i)
+{
+ printf ("callback_defined(%s)\n", callbacknames[i]);
+ return callback_set[i];
+}
+
void get_lua_boolean(const char *table, const char *name, boolean * target)
{
int stacktop;
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
index 2c1bc34fc1b..66b8731acbb 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -1,6 +1,7 @@
/* lepdflib.cc
- Copyright 2009-2010 Taco Hoekwater <taco@luatex.org>
+ Copyright 2009-2011 Taco Hoekwater <taco@luatex.org>
+ Copyright 2009-2011 Hartmut Henkel <hartmut@luatex.org>
This file is part of LuaTeX.
@@ -18,41 +19,2688 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: lepdflib.cc 3366 2010-01-20 14:49:31Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
+ "$Id: lepdflib.cc 4134 2011-04-11 20:54:58Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
#include "image/epdf.h"
+// define DEBUG
+
+//**********************************************************************
+// TODO: add more poppler functions (many are still missing)
+
+//**********************************************************************
+// objects allocated by poppler may not be deleted in the lepdflib
+
+typedef enum { ALLOC_POPPLER, ALLOC_LEPDF } alloctype;
+
+typedef struct {
+ void *d;
+ alloctype atype; // was it allocated by poppler or the lepdflib.cc?
+ PdfDocument *pd; // reference to PdfDocument, or NULL
+ unsigned long pc; // counter to detect PDFDoc change
+} udstruct;
+
+static const char *ErrorCodeNames[] = { "None", "OpenFile", "BadCatalog",
+ "Damaged", "Encrypted", "HighlightFile", "BadPrinter", "Printing",
+ "Permission", "BadPageNum", "FileIO", NULL
+};
+
+//**********************************************************************
+
+#define M_Annot "Annot"
+#define M_AnnotBorder "AnnotBorder"
+#define M_AnnotBorderStyle "AnnotBorderStyle"
+#define M_Annots "Annots"
+#define M_Array "Array"
+#define M_Catalog "Catalog"
+#define M_EmbFile "EmbFile"
+#define M_Dict "Dict"
+#define M_GooString "GooString"
+#define M_LinkDest "LinkDest"
+#define M_Links "Links"
+#define M_Object "Object"
+#define M_Page "Page"
+#define M_PDFDoc "PDFDoc"
+#define M_PDFRectangle "PDFRectangle"
+#define M_Ref "Ref"
+#define M_Stream "Stream"
+#define M_XRef "XRef"
+#define M_XRefEntry "XRefEntry"
+
+//**********************************************************************
+
+#define new_poppler_userdata(type) \
+static udstruct *new_##type##_userdata(lua_State * L) \
+{ \
+ udstruct *a; \
+ a = (udstruct *) lua_newuserdata(L, sizeof(udstruct)); /* udstruct ... */ \
+ a->atype = ALLOC_POPPLER; \
+ luaL_getmetatable(L, M_##type); /* m udstruct ... */ \
+ lua_setmetatable(L, -2); /* udstruct ... */ \
+ return a; \
+}
+
+new_poppler_userdata(PDFDoc);
+
+new_poppler_userdata(Annot);
+new_poppler_userdata(AnnotBorder);
+//new_poppler_userdata(AnnotBorderStyle);
+new_poppler_userdata(Annots);
+new_poppler_userdata(Array);
+new_poppler_userdata(Catalog);
+new_poppler_userdata(EmbFile);
+new_poppler_userdata(Dict);
+//new_poppler_userdata(GooString);
+new_poppler_userdata(LinkDest);
+new_poppler_userdata(Links);
+new_poppler_userdata(Object);
+new_poppler_userdata(Page);
+new_poppler_userdata(PDFRectangle);
+new_poppler_userdata(Ref);
+new_poppler_userdata(Stream);
+new_poppler_userdata(XRef);
+//new_poppler_userdata(XRefEntry);
+
+//**********************************************************************
+
+static void pdfdoc_changed_error(lua_State * L)
+{
+ luaL_error(L, "PDFDoc changed or gone");
+}
+
+static void pdfdoc_differs_error(lua_State * L)
+{
+ luaL_error(L, "PDFDoc differs between arguments");
+}
+
+//**********************************************************************
+
+static int l_open_PDFDoc(lua_State * L)
+{
+ const char *file_path;
+ udstruct *uout;
+ PdfDocument *d;
+ file_path = luaL_checkstring(L, 1); // path
+ d = refPdfDocument((char *) file_path, FE_RETURN_NULL);
+ if (d == NULL)
+ lua_pushnil(L);
+ else {
+ uout = new_PDFDoc_userdata(L);
+ uout->d = d;
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = d->pc;
+ uout->pd = d;
+ }
+ 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;
+ uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef);
+ if (uxref->pd != NULL && uxref->pd->pc != uxref->pc)
+ pdfdoc_changed_error(L);
+ uout = new_Array_userdata(L);
+ uout->d = new Array((XRef *) uxref->d); // automatic init to length 0
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uxref->pc;
+ uout->pd = uxref->pd;
+ return 1;
+}
+
+static int l_new_Dict(lua_State * L)
+{
+ udstruct *uxref, *uout;
+ uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef);
+ if (uxref->pd != NULL && uxref->pd->pc != uxref->pc)
+ pdfdoc_changed_error(L);
+ uout = new_Dict_userdata(L);
+ uout->d = new Dict((XRef *) uxref->d); // automatic init to length 0
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uxref->pc;
+ uout->pd = uxref->pd;
+ return 1;
+}
+
+static int l_new_Object(lua_State * L)
+{
+ udstruct *uout;
+ uout = new_Object_userdata(L);
+ uout->d = new Object(); // automatic init to type "none"
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = 0;
+ uout->pd = NULL; // not connected to any PDFDoc
+ return 1;
+}
+
+// PDFRectangle see Page.h
+
+static int l_new_PDFRectangle(lua_State * L)
+{
+ udstruct *uout;
+ uout = new_PDFRectangle_userdata(L);
+ uout->d = new PDFRectangle(); // automatic init to [0, 0, 0, 0]
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = 0;
+ uout->pd = NULL;
+ return 1;
+}
+
+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},
+ {"PDFRectangle", l_new_PDFRectangle},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+
+#define m_poppler_get_poppler(in, out, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ out *o; \
+ udstruct *uin, *uout; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ o = ((in *) uin->d)->function(); \
+ if (o != NULL) { \
+ uout = new_##out##_userdata(L); \
+ uout->d = o; \
+ uout->pc = uin->pc; \
+ uout->pd = uin->pd; \
+ } else \
+ lua_pushnil(L); \
+ return 1; \
+}
+
+#define m_poppler_get_BOOL(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ if (((in *) uin->d)->function()) \
+ lua_pushboolean(L, 1); \
+ else \
+ lua_pushboolean(L, 0); \
+ return 1; \
+}
+
+#define m_poppler_get_INT(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ int i; \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ i = (int) ((in *) uin->d)->function(); \
+ lua_pushinteger(L, i); \
+ return 1; \
+}
+
+#define m_poppler_get_DOUBLE(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ double d; \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ d = (double) ((in *) uin->d)->function(); \
+ lua_pushnumber(L, d); \
+ return 1; \
+}
+
+#define m_poppler_get_GOOSTRING(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ GooString *gs; \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ gs = ((in *) uin->d)->function(); \
+ if (gs != NULL) \
+ lua_pushlstring(L, gs->getCString(), gs->getLength()); \
+ else \
+ lua_pushnil(L); \
+ return 1; \
+}
+
+#define m_poppler_get_OBJECT(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ udstruct *uin, *uout; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ uout = new_Object_userdata(L); \
+ uout->d = new Object(); \
+ ((in *) uin->d)->function((Object *) uout->d); \
+ uout->atype = ALLOC_LEPDF; \
+ uout->pc = uin->pc; \
+ uout->pd = uin->pd; \
+ return 1; \
+}
+
+#define m_poppler_do(in, function) \
+static int m_##in##_##function(lua_State * L) \
+{ \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ ((in *) uin->d)->function(); \
+ return 0; \
+}
+
+#define m_poppler__tostring(type) \
+static int m_##type##__tostring(lua_State * L) \
+{ \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_##type); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ lua_pushfstring(L, "%s: %p", #type, (type *) uin->d); \
+ return 1; \
+}
+
//**********************************************************************
+// Annot
+
+m_poppler_get_BOOL(Annot, isOk);
+m_poppler_get_OBJECT(Annot, getAppearance);
+m_poppler_get_poppler(Annot, AnnotBorder, getBorder);
-int l_new_pdfdoc(lua_State * L)
+static int m_Annot_match(lua_State * L)
{
- PdfDocument *pdf_doc;
- char *file_path;
- if (lua_gettop(L) != 1)
- luaL_error(L, "epdf.new() needs exactly 1 argument");
- if (!lua_isstring(L, -1))
- luaL_error(L, "epdf.new() needs filename (string)");
- file_path = (char *) lua_tostring(L, -1);
+ udstruct *uin, *uref;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Annot);
+ uref = (udstruct *) luaL_checkudata(L, 2, M_Ref);
+ if (uin->pd != NULL && uref->pd != NULL && uin->pd != uref->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uref->pd != NULL && uref->pd->pc != uref->pc))
+ pdfdoc_changed_error(L);
+ lua_pushboolean(L, ((Annot *) uin->d)->match((Ref *) uref->d));
+ return 1;
+}
+
+m_poppler__tostring(Annot);
- printf("\n======================== 1 <%s>\n", file_path);
+static int m_Annot__gc(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Annot);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+#ifdef DEBUG
+ printf("\n===== Annot GC ===== uin=<%p>\n", uin);
+#endif
+ if (uin->atype == ALLOC_LEPDF)
+ delete(Annot *) uin->d;
+ return 0;
+}
- pdf_doc = refPdfDocument(file_path);
+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},
+ {NULL, NULL} // sentinel
+};
+//**********************************************************************
+// AnnotBorderStyle
+
+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
+};
+
//**********************************************************************
+// Annots
-static const struct luaL_Reg epdflib[] = {
- // {"new", l_new_pdfdoc},
- {NULL, NULL} /* sentinel */
+m_poppler_get_INT(Annots, getNumAnnots);
+
+static int m_Annots_getAnnot(lua_State * L)
+{
+ int i, annots;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Annots);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ annots = ((Annots *) uin->d)->getNumAnnots();
+ if (i > 0 && i <= annots) {
+ uout = new_Annot_userdata(L);
+ uout->d = ((Annots *) uin->d)->getAnnot(i);
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler__tostring(Annots);
+
+static const struct luaL_Reg Annots_m[] = {
+ {"getNumAnnots", m_Annots_getNumAnnots},
+ {"getAnnot", m_Annots_getAnnot},
+ {"__tostring", m_Annots__tostring},
+ {NULL, NULL} // sentinel
};
-int luaopen_epdf(lua_State * L)
+//**********************************************************************
+// Array
+
+static int m_Array_incRef(lua_State * L)
{
- luaL_register(L, "epdf", epdflib);
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = ((Array *) uin->d)->incRef();
+ lua_pushinteger(L, i);
+ return 1;
+}
+
+static int m_Array_decRef(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = ((Array *) uin->d)->decRef();
+ lua_pushinteger(L, i);
+ return 1;
+}
+
+m_poppler_get_INT(Array, getLength);
+
+static int m_Array_add(lua_State * L)
+{
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ uobj = (udstruct *) luaL_checkudata(L, 2, M_Object);
+ if (uin->pd != NULL && uobj->pd != NULL && uin->pd != uobj->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uobj->pd != NULL && uobj->pd->pc != uobj->pc))
+ pdfdoc_changed_error(L);
+ ((Array *) uin->d)->add(((Object *) uobj->d));
+ return 0;
+}
+
+static int m_Array_get(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Array *) uin->d)->getLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Array *) uin->d)->get(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Array_getNF(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Array *) uin->d)->getLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Array *) uin->d)->getNF(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Array_getString(lua_State * L)
+{
+ GooString *gs;
+ int i, len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Array);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Array *) uin->d)->getLength();
+ if (i > 0 && i <= len) {
+ gs = new GooString();
+ if (((Array *) uin->d)->getString(i - 1, gs))
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ else
+ lua_pushnil(L);
+ delete gs;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler__tostring(Array);
+
+static const struct luaL_Reg Array_m[] = {
+ {"incRef", m_Array_incRef},
+ {"decRef", m_Array_decRef},
+ {"getLength", m_Array_getLength},
+ {"add", m_Array_add},
+ {"get", m_Array_get},
+ {"getNF", m_Array_getNF},
+ {"getString", m_Array_getString},
+ {"__tostring", m_Array__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Catalog
+
+m_poppler_get_BOOL(Catalog, isOk);
+m_poppler_get_INT(Catalog, getNumPages);
+
+static int m_Catalog_getPage(lua_State * L)
+{
+ int i, pages;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ pages = ((Catalog *) uin->d)->getNumPages();
+ if (i > 0 && i <= pages) {
+ uout = new_Page_userdata(L);
+ uout->d = ((Catalog *) uin->d)->getPage(i);
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Catalog_getPageRef(lua_State * L)
+{
+ int i, pages;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ pages = ((Catalog *) uin->d)->getNumPages();
+ if (i > 0 && i <= pages) {
+ uout = new_Ref_userdata(L);
+ uout->d = (Ref *) gmalloc(sizeof(Ref));
+ ((Ref *) uout->d)->num = ((Catalog *) uin->d)->getPageRef(i)->num;
+ ((Ref *) uout->d)->gen = ((Catalog *) uin->d)->getPageRef(i)->gen;
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler_get_GOOSTRING(Catalog, getBaseURI);
+m_poppler_get_GOOSTRING(Catalog, readMetadata);
+m_poppler_get_poppler(Catalog, Object, getStructTreeRoot);
+
+static int m_Catalog_findPage(lua_State * L)
+{
+ int num, gen, i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ num = luaL_checkint(L, 2);
+ gen = luaL_checkint(L, 3);
+ i = ((Catalog *) uin->d)->findPage(num, gen);
+ if (i > 0)
+ lua_pushinteger(L, i);
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Catalog_findDest(lua_State * L)
+{
+ GooString *name;
+ LinkDest *dest;
+ const char *s;
+ size_t len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checklstring(L, 2, &len);
+ name = new GooString(s, len);
+ dest = ((Catalog *) uin->d)->findDest(name);
+ if (dest != NULL) {
+ uout = new_LinkDest_userdata(L);
+ uout->d = dest;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ delete name;
+ return 1;
+}
+
+m_poppler_get_poppler(Catalog, Object, getDests);
+m_poppler_get_INT(Catalog, numEmbeddedFiles);
+
+static int m_Catalog_embeddedFile(lua_State * L)
+{
+ EmbFile *ef;
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Catalog *) uin->d)->numEmbeddedFiles();
+ if (i > 0 && i <= len) {
+ ef = ((Catalog *) uin->d)->embeddedFile(i - 1);
+ if (ef != NULL) {
+ uout = new_EmbFile_userdata(L);
+ uout->d = ef;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler_get_INT(Catalog, numJS);
+
+static int m_Catalog_getJS(lua_State * L)
+{
+ GooString *gs;
+ int i, len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Catalog *) uin->d)->numJS();
+ if (i > 0 && i <= len) {
+ gs = ((Catalog *) uin->d)->getJS(i - 1);
+ if (gs != NULL)
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ else
+ lua_pushnil(L);
+ delete gs;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler_get_poppler(Catalog, Object, getOutline);
+m_poppler_get_poppler(Catalog, Object, getAcroForm);
+
+m_poppler__tostring(Catalog);
+
+static const struct luaL_Reg Catalog_m[] = {
+ {"isOk", m_Catalog_isOk},
+ {"getNumPages", m_Catalog_getNumPages},
+ {"getPage", m_Catalog_getPage},
+ {"getPageRef", m_Catalog_getPageRef},
+ {"getBaseURI", m_Catalog_getBaseURI},
+ {"readMetadata", m_Catalog_readMetadata},
+ {"getStructTreeRoot", m_Catalog_getStructTreeRoot},
+ {"findPage", m_Catalog_findPage},
+ {"findDest", m_Catalog_findDest},
+ {"getDests", m_Catalog_getDests},
+ {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
+ {"embeddedFile", m_Catalog_embeddedFile},
+ {"numJS", m_Catalog_numJS},
+ {"getJS", m_Catalog_getJS},
+ {"getOutline", m_Catalog_getOutline},
+ {"getAcroForm", m_Catalog_getAcroForm},
+ {"__tostring", m_Catalog__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// EmbFile
+
+m_poppler_get_GOOSTRING(EmbFile, name);
+m_poppler_get_GOOSTRING(EmbFile, description);
+m_poppler_get_INT(EmbFile, size);
+m_poppler_get_GOOSTRING(EmbFile, modDate);
+m_poppler_get_GOOSTRING(EmbFile, createDate);
+m_poppler_get_GOOSTRING(EmbFile, checksum);
+m_poppler_get_GOOSTRING(EmbFile, mimeType);
+
+static int m_EmbFile_streamObject(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_EmbFile);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ uout = new_Object_userdata(L);
+ uout->d = new Object(); // automatic init to type "none"
+ ((EmbFile *) uin->d)->streamObject().copy((Object *) uout->d);
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+m_poppler_get_BOOL(EmbFile, isOk);
+
+m_poppler__tostring(EmbFile);
+
+static const struct luaL_Reg EmbFile_m[] = {
+ {"name", m_EmbFile_name},
+ {"description", m_EmbFile_description},
+ {"size", m_EmbFile_size},
+ {"modDate", m_EmbFile_modDate},
+ {"createDate", m_EmbFile_createDate},
+ {"checksum", m_EmbFile_checksum},
+ {"mimeType", m_EmbFile_mimeType},
+ {"streamObject", m_EmbFile_streamObject},
+ {"isOk", m_EmbFile_isOk},
+ {"__tostring", m_EmbFile__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Dict
+
+static int m_Dict_incRef(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = ((Dict *) uin->d)->incRef();
+ lua_pushinteger(L, i);
+ return 1;
+}
+
+static int m_Dict_decRef(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = ((Dict *) uin->d)->decRef();
+ lua_pushinteger(L, i);
+ return 1;
+}
+
+m_poppler_get_INT(Dict, getLength);
+
+static int m_Dict_add(lua_State * L)
+{
+ char *s;
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = copyString((char *) luaL_checkstring(L, 2));
+ uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
+ ((Dict *) uin->d)->add(s, ((Object *) uobj->d));
+ return 0;
+}
+
+static int m_Dict_set(lua_State * L)
+{
+ char *s;
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = (char *) luaL_checkstring(L, 2);
+ uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
+ ((Dict *) uin->d)->set(s, ((Object *) uobj->d));
+ return 0;
+}
+
+static int m_Dict_remove(lua_State * L)
+{
+ char *s;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = (char *) luaL_checkstring(L, 2);
+ ((Dict *) uin->d)->remove(s);
+ return 0;
+}
+
+static int m_Dict_is(lua_State * L)
+{
+ const char *s;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ if (((Dict *) uin->d)->is((char *) s))
+ lua_pushboolean(L, 1);
+ else
+ lua_pushboolean(L, 0);
+ return 1;
+}
+
+static int m_Dict_lookup(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Dict *) uin->d)->lookup((char *) s, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+static int m_Dict_lookupNF(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Dict *) uin->d)->lookupNF((char *) s, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+static int m_Dict_lookupInt(lua_State * L)
+{
+ const char *s1, *s2;
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s1 = luaL_checkstring(L, 2);
+ s2 = luaL_checkstring(L, 3);
+ if (((Dict *) uin->d)->lookupInt(s1, s2, &i))
+ lua_pushinteger(L, i);
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Dict_getKey(lua_State * L)
+{
+ int i, len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Dict *) uin->d)->getLength();
+ if (i > 0 && i <= len)
+ lua_pushstring(L, ((Dict *) uin->d)->getKey(i - 1));
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Dict_getVal(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Dict *) uin->d)->getLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Dict *) uin->d)->getVal(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Dict_getValNF(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ len = ((Dict *) uin->d)->getLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Dict *) uin->d)->getValNF(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler__tostring(Dict);
+
+static const struct luaL_Reg Dict_m[] = {
+ {"incRef", m_Dict_incRef},
+ {"decRef", m_Dict_decRef},
+ {"getLength", m_Dict_getLength},
+ {"add", m_Dict_add},
+ {"set", m_Dict_set},
+ {"remove", m_Dict_remove},
+ {"is", m_Dict_is},
+ {"lookup", m_Dict_lookup},
+ {"lookupNF", m_Dict_lookupNF},
+ {"lookupInt", m_Dict_lookupInt},
+ {"getKey", m_Dict_getKey},
+ {"getVal", m_Dict_getVal},
+ {"getValNF", m_Dict_getValNF},
+ {"__tostring", m_Dict__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// GooString
+
+static int m_GooString__tostring(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_GooString);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ lua_pushlstring(L, ((GooString *) uin->d)->getCString(),
+ ((GooString *) uin->d)->getLength());
+ return 1;
+}
+
+static const struct luaL_Reg GooString_m[] = {
+ {"__tostring", m_GooString__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// LinkDest
+
+static const char *LinkDestKindNames[] =
+ { "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", "FitBV", NULL };
+
+m_poppler_get_BOOL(LinkDest, isOk);
+
+static int m_LinkDest_getKind(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_LinkDest);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = (int) ((LinkDest *) uin->d)->getKind();
+ lua_pushinteger(L, i);
+ return 1;
+}
+
+static int m_LinkDest_getKindName(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_LinkDest);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = (int) ((LinkDest *) uin->d)->getKind();
+ lua_pushstring(L, LinkDestKindNames[i]);
+ return 1;
+}
+
+m_poppler_get_BOOL(LinkDest, isPageRef);
+m_poppler_get_INT(LinkDest, getPageNum);
+
+static int m_LinkDest_getPageRef(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_LinkDest);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ uout = new_Ref_userdata(L);
+ uout->d = (Ref *) gmalloc(sizeof(Ref));
+ ((Ref *) uout->d)->num = ((LinkDest *) uin->d)->getPageRef().num;
+ ((Ref *) uout->d)->gen = ((LinkDest *) uin->d)->getPageRef().gen;
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+m_poppler_get_DOUBLE(LinkDest, getLeft);
+m_poppler_get_DOUBLE(LinkDest, getBottom);
+m_poppler_get_DOUBLE(LinkDest, getRight);
+m_poppler_get_DOUBLE(LinkDest, getTop);
+m_poppler_get_DOUBLE(LinkDest, getZoom);
+m_poppler_get_BOOL(LinkDest, getChangeLeft);
+m_poppler_get_BOOL(LinkDest, getChangeTop);
+m_poppler_get_BOOL(LinkDest, getChangeZoom);
+
+m_poppler__tostring(LinkDest);
+
+static const struct luaL_Reg LinkDest_m[] = {
+ {"isOk", m_LinkDest_isOk},
+ {"getKind", m_LinkDest_getKind},
+ {"getKindName", m_LinkDest_getKindName}, // not poppler
+ {"isPageRef", m_LinkDest_isPageRef},
+ {"getPageNum", m_LinkDest_getPageNum},
+ {"getPageRef", m_LinkDest_getPageRef},
+ {"getLeft", m_LinkDest_getLeft},
+ {"getBottom", m_LinkDest_getBottom},
+ {"getRight", m_LinkDest_getRight},
+ {"getTop", m_LinkDest_getTop},
+ {"getZoom", m_LinkDest_getZoom},
+ {"getChangeLeft", m_LinkDest_getChangeLeft},
+ {"getChangeTop", m_LinkDest_getChangeTop},
+ {"getChangeZoom", m_LinkDest_getChangeZoom},
+ {"__tostring", m_LinkDest__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Links
+
+m_poppler__tostring(Links);
+
+static const struct luaL_Reg Links_m[] = {
+ {"__tostring", m_Links__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Object
+
+// Special type checking.
+#define m_Object_isType(function) \
+static int m_Object_##function(lua_State * L) \
+{ \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ if (lua_gettop(L) >= 2) { \
+ if (lua_isstring(L, 2) \
+ && ((Object *) uin->d)->function((char *) lua_tostring(L, 2))) \
+ lua_pushboolean(L, 1); \
+ else \
+ lua_pushboolean(L, 0); \
+ } else { \
+ if (((Object *) uin->d)->function()) \
+ lua_pushboolean(L, 1); \
+ else \
+ lua_pushboolean(L, 0); \
+ } \
+ return 1; \
+}
+
+static int m_Object_initBool(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ luaL_checktype(L, 2, LUA_TBOOLEAN);
+ if (lua_toboolean(L, 2) != 0)
+ ((Object *) uin->d)->initBool(gTrue);
+ else
+ ((Object *) uin->d)->initBool(gFalse);
+ return 0;
+}
+
+static int m_Object_initInt(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ ((Object *) uin->d)->initInt(i);
+ return 0;
+}
+
+static int m_Object_initReal(lua_State * L)
+{
+ double d;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ d = luaL_checknumber(L, 2);
+ ((Object *) uin->d)->initReal(d);
+ return 0;
+}
+
+static int m_Object_initString(lua_State * L)
+{
+ GooString *gs;
+ const char *s;
+ size_t len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checklstring(L, 2, &len);
+ gs = new GooString(s, len);
+ ((Object *) uin->d)->initString(gs);
+ return 0;
+}
+
+static int m_Object_initName(lua_State * L)
+{
+ const 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 = luaL_checkstring(L, 2);
+ ((Object *) uin->d)->initName((char *) s);
+ return 0;
+}
+
+static int m_Object_initNull(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initNull();
+ return 0;
+}
+
+static int m_Object_initArray(lua_State * L)
+{
+ udstruct *uin, *uxref;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef);
+ if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uxref->pd != NULL && uxref->pd->pc != uxref->pc))
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initArray((XRef *) uxref->d);
+ return 0;
+}
+
+// TODO: decide betweeen
+// Object *initDict(XRef *xref);
+// Object *initDict(Dict *dictA);
+
+static int m_Object_initDict(lua_State * L)
+{
+ udstruct *uin, *uxref;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef);
+ if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uxref->pd != NULL && uxref->pd->pc != uxref->pc))
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initDict((XRef *) uxref->d);
+ return 0;
+}
+
+static int m_Object_initStream(lua_State * L)
+{
+ udstruct *uin, *ustream;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ ustream = (udstruct *) luaL_checkudata(L, 2, M_Stream);
+ if (uin->pd != NULL && ustream->pd != NULL && uin->pd != ustream->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (ustream->pd != NULL && ustream->pd->pc != ustream->pc))
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initStream((Stream *) ustream->d);
+ return 0;
+}
+
+static int m_Object_initRef(lua_State * L)
+{
+ int num, gen;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ num = luaL_checkint(L, 2);
+ gen = luaL_checkint(L, 3);
+ ((Object *) uin->d)->initRef(num, gen);
+ return 0;
+}
+
+static int m_Object_initCmd(lua_State * L)
+{
+ const 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 = luaL_checkstring(L, 2);
+ ((Object *) uin->d)->initCmd((char *) s);
+ return 0;
+}
+
+static int m_Object_initError(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initError();
+ return 0;
+}
+
+static int m_Object_initEOF(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ ((Object *) uin->d)->initEOF();
+ return 0;
+}
+
+static int m_Object_fetch(lua_State * L)
+{
+ udstruct *uin, *uxref, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ uxref = (udstruct *) luaL_checkudata(L, 2, M_XRef);
+ if (uin->pd != NULL && uxref->pd != NULL && uin->pd != uxref->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uxref->pd != NULL && uxref->pd->pc != uxref->pc))
+ pdfdoc_changed_error(L);
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->fetch((XRef *) uxref->d, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+static int m_Object_getType(lua_State * L)
+{
+ ObjType t;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ t = ((Object *) uin->d)->getType();
+ lua_pushinteger(L, (int) t);
+ return 1;
+}
+
+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);
+ return 1;
+}
+
+m_poppler_get_BOOL(Object, isBool);
+m_poppler_get_BOOL(Object, isInt);
+m_poppler_get_BOOL(Object, isReal);
+m_poppler_get_BOOL(Object, isNum);
+m_poppler_get_BOOL(Object, isString);
+m_Object_isType(isName);
+m_poppler_get_BOOL(Object, isNull);
+m_poppler_get_BOOL(Object, isArray);
+m_Object_isType(isDict);
+m_Object_isType(isStream);
+m_poppler_get_BOOL(Object, isRef);
+m_Object_isType(isCmd);
+m_poppler_get_BOOL(Object, isError);
+m_poppler_get_BOOL(Object, isEOF);
+m_poppler_get_BOOL(Object, isNone);
+
+static int m_Object_getBool(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isBool()) {
+ if (((Object *) uin->d)->getBool())
+ lua_pushboolean(L, 1);
+ else
+ lua_pushboolean(L, 0);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getInt(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isInt())
+ lua_pushnumber(L, ((Object *) uin->d)->getInt());
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getReal(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isReal())
+ lua_pushnumber(L, ((Object *) uin->d)->getReal());
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getNum(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isNum())
+ lua_pushnumber(L, ((Object *) uin->d)->getNum());
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getString(lua_State * L)
+{
+ GooString *gs;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isString()) {
+ gs = ((Object *) uin->d)->getString();
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getName(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);
+ if (((Object *) uin->d)->isName()) {
+ s = ((Object *) uin->d)->getName();
+ lua_pushstring(L, s);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getArray(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isArray()) {
+ uout = new_Array_userdata(L);
+ uout->d = ((Object *) uin->d)->getArray();
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getDict(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isDict()) {
+ uout = new_Dict_userdata(L);
+ uout->d = ((Object *) uin->d)->getDict();
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getStream(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream()) {
+ uout = new_Stream_userdata(L);
+ uout->d = ((Object *) uin->d)->getStream();
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getRef(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isRef()) {
+ uout = new_Ref_userdata(L);
+ uout->d = (Ref *) gmalloc(sizeof(Ref));
+ ((Ref *) uout->d)->num = ((Object *) uin->d)->getRef().num;
+ ((Ref *) uout->d)->gen = ((Object *) uin->d)->getRef().gen;
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getRefNum(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isRef()) {
+ i = ((Object *) uin->d)->getRef().num;
+ lua_pushinteger(L, i);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getRefGen(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isRef()) {
+ i = ((Object *) uin->d)->getRef().gen;
+ lua_pushinteger(L, i);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_getCmd(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);
+ if (((Object *) uin->d)->isCmd()) {
+ s = ((Object *) uin->d)->getCmd();
+ lua_pushstring(L, s);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_arrayGetLength(lua_State * L)
+{
+ int len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isArray()) {
+ len = ((Object *) uin->d)->arrayGetLength();
+ lua_pushnumber(L, len);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_arrayAdd(lua_State * L)
+{
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ uobj = (udstruct *) luaL_checkudata(L, 2, M_Object);
+ if (uin->pd != NULL && uobj->pd != NULL && uin->pd != uobj->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uobj->pd != NULL && uobj->pd->pc != uobj->pd->pc))
+ pdfdoc_changed_error(L);
+ if (!((Object *) uin->d)->isArray())
+ luaL_error(L, "Object is not an Array");
+ ((Object *) uin->d)->arrayAdd((Object *) uobj->d);
+ return 0;
+}
+
+static int m_Object_arrayGet(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isArray()) {
+ len = ((Object *) uin->d)->arrayGetLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->arrayGet(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_arrayGetNF(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isArray()) {
+ len = ((Object *) uin->d)->arrayGetLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->arrayGetNF(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictGetLength(lua_State * L)
+{
+ int len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isDict()) {
+ len = ((Object *) uin->d)->dictGetLength();
+ lua_pushnumber(L, len);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictAdd(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ s = luaL_checkstring(L, 2);
+ uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
+ if (uin->pd != NULL && uobj->pd != NULL && uin->pd != uobj->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uobj->pd != NULL && uobj->pd->pc != uobj->pd->pc))
+ pdfdoc_changed_error(L);
+ if (!((Object *) uin->d)->isDict())
+ luaL_error(L, "Object is not a Dict");
+ ((Object *) uin->d)->dictAdd((char *) s, (Object *) uobj->d);
+ return 0;
+}
+
+static int m_Object_dictSet(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uobj;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ s = luaL_checkstring(L, 2);
+ uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
+ if (uin->pd != NULL && uobj->pd != NULL && uin->pd != uobj->pd)
+ pdfdoc_differs_error(L);
+ if ((uin->pd != NULL && uin->pd->pc != uin->pc)
+ || (uobj->pd != NULL && uobj->pd->pc != uobj->pd->pc))
+ pdfdoc_changed_error(L);
+ if (!((Object *) uin->d)->isDict())
+ luaL_error(L, "Object is not a Dict");
+ ((Object *) uin->d)->dictSet((char *) s, (Object *) uobj->d);
+ return 0;
+}
+
+static int m_Object_dictLookup(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ if (((Object *) uin->d)->isDict()) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->dictLookup((char *) s, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictLookupNF(lua_State * L)
+{
+ const char *s;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ if (((Object *) uin->d)->isDict()) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->dictLookupNF((char *) s, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictGetKey(lua_State * L)
+{
+ int i, len;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isDict()) {
+ len = ((Object *) uin->d)->dictGetLength();
+ if (i > 0 && i <= len)
+ lua_pushstring(L, ((Object *) uin->d)->dictGetKey(i - 1));
+ else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictGetVal(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isDict()) {
+ len = ((Object *) uin->d)->dictGetLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->dictGetVal(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_dictGetValNF(lua_State * L)
+{
+ int i, len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isDict()) {
+ len = ((Object *) uin->d)->dictGetLength();
+ if (i > 0 && i <= len) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((Object *) uin->d)->dictGetValNF(i - 1, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_streamIs(lua_State * L)
+{
+ const 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 = luaL_checkstring(L, 2);
+ if (((Object *) uin->d)->isStream()) {
+ if (((Object *) uin->d)->streamIs((char *) s))
+ lua_pushboolean(L, 1);
+ else
+ lua_pushboolean(L, 0);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_streamReset(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream())
+ ((Object *) uin->d)->streamReset();
+ return 0;
+}
+
+static int m_Object_streamGetChar(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream()) {
+ i = ((Object *) uin->d)->streamGetChar();
+ lua_pushinteger(L, i);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_streamLookChar(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream()) {
+ i = ((Object *) uin->d)->streamLookChar();
+ lua_pushinteger(L, i);
+ } else
+ lua_pushnil(L);
return 1;
}
+static int m_Object_streamGetPos(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream()) {
+ i = (int) ((Object *) uin->d)->streamGetPos();
+ lua_pushinteger(L, i);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object_streamSetPos(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ if (((Object *) uin->d)->isStream())
+ ((Object *) uin->d)->streamSetPos(i);
+ return 0;
+}
+
+static int m_Object_streamGetDict(lua_State * L)
+{
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ if (((Object *) uin->d)->isStream()) {
+ uout = new_Dict_userdata(L);
+ uout->d = ((Object *) uin->d)->streamGetDict();
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_Object__gc(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+#ifdef DEBUG
+ printf("\n===== Object GC ===== uin=<%p>\n", uin);
+#endif
+ if (uin->atype == ALLOC_LEPDF)
+ delete(Object *) uin->d;
+ return 0;
+}
+
+m_poppler__tostring(Object);
+
+static const struct luaL_Reg Object_m[] = {
+ {"initBool", m_Object_initBool},
+ {"initInt", m_Object_initInt},
+ {"initReal", m_Object_initReal},
+ {"initString", m_Object_initString},
+ {"initName", m_Object_initName},
+ {"initNull", m_Object_initNull},
+ {"initArray", m_Object_initArray},
+ {"initDict", m_Object_initDict},
+ {"initStream", m_Object_initStream},
+ {"initRef", m_Object_initRef},
+ {"initCmd", m_Object_initCmd},
+ {"initError", m_Object_initError},
+ {"initEOF", m_Object_initEOF},
+ // {"copy", m_Object_copy},
+ {"fetch", m_Object_fetch},
+ {"getType", m_Object_getType},
+ {"getTypeName", m_Object_getTypeName},
+ {"isBool", m_Object_isBool},
+ {"isInt", m_Object_isInt},
+ {"isReal", m_Object_isReal},
+ {"isNum", m_Object_isNum},
+ {"isString", m_Object_isString},
+ {"isName", m_Object_isName},
+ {"isNull", m_Object_isNull},
+ {"isArray", m_Object_isArray},
+ {"isDict", m_Object_isDict},
+ {"isStream", m_Object_isStream},
+ {"isRef", m_Object_isRef},
+ {"isCmd", m_Object_isCmd},
+ {"isError", m_Object_isError},
+ {"isEOF", m_Object_isEOF},
+ {"isNone", m_Object_isNone},
+ {"getBool", m_Object_getBool},
+ {"getInt", m_Object_getInt},
+ {"getReal", m_Object_getReal},
+ {"getNum", m_Object_getNum},
+ {"getString", m_Object_getString},
+ {"getName", m_Object_getName},
+ {"getArray", m_Object_getArray},
+ {"getDict", m_Object_getDict},
+ {"getStream", m_Object_getStream},
+ {"getRef", m_Object_getRef},
+ {"getRefNum", m_Object_getRefNum},
+ {"getRefGen", m_Object_getRefGen},
+ {"getCmd", m_Object_getCmd},
+ {"arrayGetLength", m_Object_arrayGetLength},
+ {"arrayAdd", m_Object_arrayAdd},
+ {"arrayGet", m_Object_arrayGet},
+ {"arrayGetNF", m_Object_arrayGetNF},
+ {"dictGetLength", m_Object_dictGetLength},
+ {"dictAdd", m_Object_dictAdd},
+ {"dictSet", m_Object_dictSet},
+ {"dictLookup", m_Object_dictLookup},
+ {"dictLookupNF", m_Object_dictLookupNF},
+ {"dictGetKey", m_Object_dictGetKey},
+ {"dictGetVal", m_Object_dictGetVal},
+ {"dictGetValNF", m_Object_dictGetValNF},
+ {"streamIs", m_Object_streamIs},
+ {"streamReset", m_Object_streamReset},
+ // {"streamClose", m_Object_streamClose},
+ {"streamGetChar", m_Object_streamGetChar},
+ {"streamLookChar", m_Object_streamLookChar},
+ // {"streamGetLine", m_Object_streamGetLine},
+ {"streamGetPos", m_Object_streamGetPos},
+ {"streamSetPos", m_Object_streamSetPos},
+ {"streamGetDict", m_Object_streamGetDict},
+ {"__tostring", m_Object__tostring},
+ {"__gc", m_Object__gc}, // finalizer
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Page
+
+m_poppler_get_BOOL(Page, isOk);
+m_poppler_get_INT(Page, getNum);
+m_poppler_get_poppler(Page, PDFRectangle, getMediaBox);
+m_poppler_get_poppler(Page, PDFRectangle, getCropBox);
+m_poppler_get_BOOL(Page, isCropped);
+m_poppler_get_DOUBLE(Page, getMediaWidth);
+m_poppler_get_DOUBLE(Page, getMediaHeight);
+m_poppler_get_DOUBLE(Page, getCropWidth);
+m_poppler_get_DOUBLE(Page, getCropHeight);
+m_poppler_get_poppler(Page, PDFRectangle, getBleedBox);
+m_poppler_get_poppler(Page, PDFRectangle, getTrimBox);
+m_poppler_get_poppler(Page, PDFRectangle, getArtBox);
+m_poppler_get_INT(Page, getRotate);
+m_poppler_get_GOOSTRING(Page, getLastModified);
+m_poppler_get_poppler(Page, Dict, getBoxColorInfo);
+m_poppler_get_poppler(Page, Dict, getGroup);
+m_poppler_get_poppler(Page, Stream, getMetadata);
+m_poppler_get_poppler(Page, Dict, getPieceInfo);
+m_poppler_get_poppler(Page, Dict, getSeparationInfo);
+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);
+
+static const struct luaL_Reg Page_m[] = {
+ {"isOk", m_Page_isOk},
+ {"getNum", m_Page_getNum},
+ {"getMediaBox", m_Page_getMediaBox},
+ {"getCropBox", m_Page_getCropBox},
+ {"isCropped", m_Page_isCropped},
+ {"getMediaWidth", m_Page_getMediaWidth},
+ {"getMediaHeight", m_Page_getMediaHeight},
+ {"getCropWidth", m_Page_getCropWidth},
+ {"getCropHeight", m_Page_getCropHeight},
+ {"getBleedBox", m_Page_getBleedBox},
+ {"getTrimBox", m_Page_getTrimBox},
+ {"getArtBox", m_Page_getArtBox},
+ {"getRotate", m_Page_getRotate},
+ {"getLastModified", m_Page_getLastModified},
+ {"getBoxColorInfo", m_Page_getBoxColorInfo},
+ {"getGroup", m_Page_getGroup},
+ {"getMetadata", m_Page_getMetadata},
+ {"getPieceInfo", m_Page_getPieceInfo},
+ {"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
+};
+
//**********************************************************************
+// PDFDoc
+
+#define m_PDFDoc_BOOL(function) \
+static int m_PDFDoc_##function(lua_State * L) \
+{ \
+ udstruct *uin; \
+ 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->function()) \
+ lua_pushboolean(L, 1); \
+ else \
+ lua_pushboolean(L, 0); \
+ return 1; \
+}
+
+#define m_PDFDoc_INT(function) \
+static int m_PDFDoc_##function(lua_State * L) \
+{ \
+ int i; \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ i = ((PdfDocument *) uin->d)->doc->function(); \
+ lua_pushinteger(L, i); \
+ return 1; \
+}
+
+m_PDFDoc_BOOL(isOk);
+m_PDFDoc_INT(getErrorCode);
+
+static int m_PDFDoc_getFileName(lua_State * L)
+{
+ GooString *gs;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ gs = ((PdfDocument *) uin->d)->doc->getFileName();
+ if (gs != NULL)
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_getErrorCodeName(lua_State * L)
+{
+ int i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = ((PdfDocument *) uin->d)->doc->getErrorCode();
+ lua_pushstring(L, ErrorCodeNames[i]);
+ return 1;
+}
+
+static int m_PDFDoc_getXRef(lua_State * L)
+{
+ XRef *xref;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ xref = ((PdfDocument *) uin->d)->doc->getXRef();
+ if (xref->isOk()) {
+ uout = new_XRef_userdata(L);
+ uout->d = xref;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_getCatalog(lua_State * L)
+{
+ Catalog *cat;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ cat = ((PdfDocument *) uin->d)->doc->getCatalog();
+ if (cat->isOk()) {
+ uout = new_Catalog_userdata(L);
+ uout->d = cat;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+#define m_PDFDoc_PAGEDIMEN(function) \
+static int m_PDFDoc_##function(lua_State * L) \
+{ \
+ int i, pages; \
+ double d; \
+ udstruct *uin; \
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); \
+ if (uin->pd != NULL && uin->pd->pc != uin->pc) \
+ pdfdoc_changed_error(L); \
+ i = luaL_checkint(L, 2); \
+ pages = ((PdfDocument *) uin->d)->doc->getNumPages(); \
+ if (i > 0 && i <= pages) { \
+ d = (double) ((PdfDocument *) uin->d)->doc->function(i); \
+ lua_pushnumber(L, d); \
+ } else \
+ lua_pushnil(L); \
+ return 1; \
+}
+
+m_PDFDoc_PAGEDIMEN(getPageMediaWidth);
+m_PDFDoc_PAGEDIMEN(getPageMediaHeight);
+m_PDFDoc_PAGEDIMEN(getPageCropWidth);
+m_PDFDoc_PAGEDIMEN(getPageCropHeight);
+m_PDFDoc_INT(getNumPages);
+
+static int m_PDFDoc_readMetadata(lua_State * L)
+{
+ GooString *gs;
+ udstruct *uin;
+ 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()) {
+ gs = ((PdfDocument *) uin->d)->doc->readMetadata();
+ if (gs != NULL)
+ lua_pushlstring(L, gs->getCString(), gs->getLength());
+ else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_getStructTreeRoot(lua_State * L)
+{
+ Object *obj;
+ 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();
+ uout = new_Object_userdata(L);
+ uout->d = obj;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_findPage(lua_State * L)
+{
+ int num, gen, i;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ num = luaL_checkint(L, 2);
+ gen = luaL_checkint(L, 3);
+ if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
+ i = ((PdfDocument *) uin->d)->doc->findPage(num, gen);
+ if (i > 0)
+ lua_pushinteger(L, i);
+ else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_getLinks(lua_State * L)
+{
+ int i;
+ Links *links;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ i = luaL_checkint(L, 2);
+ links = ((PdfDocument *) uin->d)->doc->getLinks(i);
+ 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;
+}
+
+static int m_PDFDoc_findDest(lua_State * L)
+{
+ GooString *name;
+ LinkDest *dest;
+ const char *s;
+ size_t len;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checklstring(L, 2, &len);
+ name = new GooString(s, len);
+ if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
+ dest = ((PdfDocument *) uin->d)->doc->findDest(name);
+ if (dest != NULL) {
+ uout = new_LinkDest_userdata(L);
+ uout->d = dest;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ delete name;
+ return 1;
+}
+
+m_PDFDoc_BOOL(isEncrypted);
+m_PDFDoc_BOOL(okToPrint);
+m_PDFDoc_BOOL(okToChange);
+m_PDFDoc_BOOL(okToCopy);
+m_PDFDoc_BOOL(okToAddNotes);
+m_PDFDoc_BOOL(isLinearized);
+
+static int m_PDFDoc_getDocInfo(lua_State * L)
+{
+ 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->getXRef()->isOk()) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((PdfDocument *) uin->d)->doc->getDocInfo((Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFDoc_getDocInfoNF(lua_State * L)
+{
+ 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->getXRef()->isOk()) {
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((PdfDocument *) uin->d)->doc->getDocInfoNF((Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_PDFDoc_INT(getPDFMajorVersion);
+m_PDFDoc_INT(getPDFMinorVersion);
+
+static int m_PDFDoc__gc(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+#ifdef DEBUG
+ printf("\n===== PDFDoc GC ===== file_path=<%s>\n",
+ ((PdfDocument *) uin->d)->file_path);
+#endif
+ assert(uin->atype == ALLOC_LEPDF);
+ unrefPdfDocument(((PdfDocument *) uin->d)->file_path);
+ return 0;
+}
+
+static const struct luaL_Reg PDFDoc_m[] = {
+ {"isOk", m_PDFDoc_isOk},
+ {"getErrorCode", m_PDFDoc_getErrorCode},
+ {"getErrorCodeName", m_PDFDoc_getErrorCodeName}, // not poppler
+ {"getFileName", m_PDFDoc_getFileName},
+ {"getXRef", m_PDFDoc_getXRef},
+ {"getCatalog", m_PDFDoc_getCatalog},
+ // {"getBaseStream", m_PDFDoc_getBaseStream},
+ {"getPageMediaWidth", m_PDFDoc_getPageMediaWidth},
+ {"getPageMediaHeight", m_PDFDoc_getPageMediaHeight},
+ {"getPageCropWidth", m_PDFDoc_getPageCropWidth},
+ {"getPageCropHeight", m_PDFDoc_getPageCropHeight},
+ {"getNumPages", m_PDFDoc_getNumPages},
+ {"readMetadata", m_PDFDoc_readMetadata},
+ {"getStructTreeRoot", m_PDFDoc_getStructTreeRoot},
+ {"findPage", m_PDFDoc_findPage},
+ {"getLinks", m_PDFDoc_getLinks},
+ {"findDest", m_PDFDoc_findDest},
+ {"isEncrypted", m_PDFDoc_isEncrypted},
+ {"okToPrint", m_PDFDoc_okToPrint},
+ {"okToChange", m_PDFDoc_okToChange},
+ {"okToCopy", m_PDFDoc_okToCopy},
+ {"okToAddNotes", m_PDFDoc_okToAddNotes},
+ {"isLinearized", m_PDFDoc_isLinearized},
+ {"getDocInfo", m_PDFDoc_getDocInfo},
+ {"getDocInfoNF", m_PDFDoc_getDocInfoNF},
+ {"getPDFMajorVersion", m_PDFDoc_getPDFMajorVersion},
+ {"getPDFMinorVersion", m_PDFDoc_getPDFMinorVersion},
+ {"__gc", m_PDFDoc__gc}, // finalizer
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// PDFRectangle
+
+m_poppler_get_BOOL(PDFRectangle, isValid);
+
+m_poppler__tostring(PDFRectangle);
+
+static int m_PDFRectangle__index(lua_State * L)
+{
+ const char *s;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFRectangle);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ if (strlen(s) == 2) {
+ if (s[0] == 'x') {
+ if (s[1] == '1')
+ lua_pushnumber(L, ((PDFRectangle *) uin->d)->x1);
+ else if (s[1] == '2')
+ lua_pushnumber(L, ((PDFRectangle *) uin->d)->x2);
+ else
+ lua_pushnil(L);
+ } else if (s[0] == 'y') {
+ if (s[1] == '1')
+ lua_pushnumber(L, ((PDFRectangle *) uin->d)->y1);
+ else if (s[1] == '2')
+ lua_pushnumber(L, ((PDFRectangle *) uin->d)->y2);
+ else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ } else
+ lua_pushnil(L);
+ return 1;
+}
+
+static int m_PDFRectangle__newindex(lua_State * L)
+{
+ double d;
+ const char *s;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFRectangle);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ d = luaL_checknumber(L, 3);
+ if (strlen(s) == 2) {
+ if (s[0] == 'x') {
+ if (s[1] == '1')
+ ((PDFRectangle *) uin->d)->x1 = d;
+ else if (s[1] == '2')
+ ((PDFRectangle *) uin->d)->x2 = d;
+ else
+ luaL_error(L, "wrong PDFRectangle coordinate (%s)", s);
+ } else if (s[0] == 'y') {
+ if (s[1] == '1')
+ ((PDFRectangle *) uin->d)->y1 = d;
+ else if (s[1] == '2')
+ ((PDFRectangle *) uin->d)->y2 = d;
+ } else
+ luaL_error(L, "wrong PDFRectangle coordinate (%s)", s);
+ } else
+ luaL_error(L, "wrong PDFRectangle coordinate (%s)", s);
+ return 0;
+}
+
+static int m_PDFRectangle__gc(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_PDFRectangle);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+#ifdef DEBUG
+ printf("\n===== PDFRectangle GC ===== uin=<%p>\n", uin);
+#endif
+ if (uin->atype == ALLOC_LEPDF)
+ delete(PDFRectangle *) uin->d;
+ return 0;
+}
+
+static const struct luaL_Reg PDFRectangle_m[] = {
+ {"isValid", m_PDFRectangle_isValid},
+ {"__index", m_PDFRectangle__index},
+ {"__newindex", m_PDFRectangle__newindex},
+ {"__tostring", m_PDFRectangle__tostring},
+ {"__gc", m_PDFRectangle__gc},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Ref
+
+static int m_Ref__index(lua_State * L)
+{
+ const char *s;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Ref);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ s = luaL_checkstring(L, 2);
+ if (strcmp(s, "num") == 0)
+ lua_pushinteger(L, ((Ref *) uin->d)->num);
+ else if (strcmp(s, "gen") == 0)
+ lua_pushinteger(L, ((Ref *) uin->d)->gen);
+ else
+ lua_pushnil(L);
+ return 1;
+}
+
+m_poppler__tostring(Ref);
+
+static int m_Ref__gc(lua_State * L)
+{
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Ref);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+#ifdef DEBUG
+ printf("\n===== Ref GC ===== uin=<%p>\n", uin);
+#endif
+ if (uin->atype == ALLOC_LEPDF && ((Ref *) uin->d) != NULL)
+ gfree(((Ref *) uin->d));
+ return 0;
+}
+
+static const struct luaL_Reg Ref_m[] = {
+ {"__index", m_Ref__index},
+ {"__tostring", m_Ref__tostring},
+ {"__gc", m_Ref__gc}, // finalizer
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// Stream
+
+static const char *StreamKindNames[] =
+ { "File", "ASCIIHex", "ASCII85", "LZW", "RunLength", "CCITTFax", "DCT",
+ "Flate", "JBIG2", "JPX", "Weird", NULL
+};
+
+#if 0
+static const char *StreamColorSpaceModeNames[] =
+ { "CSNone", "CSDeviceGray", "CSDeviceRGB", "CSDeviceCMYK", NULL };
+#endif
+
+m_poppler_get_INT(Stream, getKind);
+
+static int m_Stream_getKindName(lua_State * L)
+{
+ StreamKind t;
+ udstruct *uin;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_Stream);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ t = ((Stream *) uin->d)->getKind();
+ lua_pushstring(L, StreamKindNames[t]);
+ return 1;
+}
+
+m_poppler_do(Stream, reset);
+m_poppler_do(Stream, close);
+m_poppler_get_INT(Stream, getChar);
+m_poppler_get_INT(Stream, lookChar);
+m_poppler_get_INT(Stream, getRawChar);
+m_poppler_get_INT(Stream, getUnfilteredChar);
+m_poppler_do(Stream, unfilteredReset);
+m_poppler_get_INT(Stream, getPos);
+m_poppler_get_BOOL(Stream, isBinary);
+m_poppler_get_poppler(Stream, Stream, getUndecodedStream);
+m_poppler_get_poppler(Stream, Dict, getDict);
+
+m_poppler__tostring(Stream);
+
+static const struct luaL_Reg Stream_m[] = {
+ {"getKind", m_Stream_getKind},
+ {"getKindName", m_Stream_getKindName}, // not poppler
+ {"reset", m_Stream_reset},
+ {"close", m_Stream_close},
+ {"getUndecodedStream", m_Stream_getUndecodedStream},
+ {"getChar", m_Stream_getChar},
+ {"lookChar", m_Stream_lookChar},
+ {"getRawChar", m_Stream_getRawChar},
+ {"getUnfilteredChar", m_Stream_getUnfilteredChar},
+ {"unfilteredReset", m_Stream_unfilteredReset},
+ // {"getLine", m_Stream_getLine},
+ {"getPos", m_Stream_getPos},
+ {"isBinary", m_Stream_isBinary},
+ {"getUndecodedStream", m_Stream_getUndecodedStream},
+ {"getDict", m_Stream_getDict},
+ {"__tostring", m_Stream__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// XRef
+
+m_poppler_get_BOOL(XRef, isOk);
+m_poppler_get_INT(XRef, getErrorCode);
+m_poppler_get_BOOL(XRef, isEncrypted);
+m_poppler_get_BOOL(XRef, okToPrint);
+m_poppler_get_BOOL(XRef, okToPrintHighRes);
+m_poppler_get_BOOL(XRef, okToChange);
+m_poppler_get_BOOL(XRef, okToCopy);
+m_poppler_get_BOOL(XRef, okToAddNotes);
+m_poppler_get_BOOL(XRef, okToFillForm);
+m_poppler_get_BOOL(XRef, okToAccessibility);
+m_poppler_get_BOOL(XRef, okToAssemble);
+m_poppler_get_OBJECT(XRef, getCatalog);
+
+static int m_XRef_fetch(lua_State * L)
+{
+ int num, gen;
+ udstruct *uin, *uout;
+ uin = (udstruct *) luaL_checkudata(L, 1, M_XRef);
+ if (uin->pd != NULL && uin->pd->pc != uin->pc)
+ pdfdoc_changed_error(L);
+ num = luaL_checkint(L, 2);
+ gen = luaL_checkint(L, 3);
+ uout = new_Object_userdata(L);
+ uout->d = new Object();
+ ((XRef *) uin->d)->fetch(num, gen, (Object *) uout->d);
+ uout->atype = ALLOC_LEPDF;
+ uout->pc = uin->pc;
+ uout->pd = uin->pd;
+ return 1;
+}
+
+m_poppler_get_OBJECT(XRef, getDocInfo);
+m_poppler_get_OBJECT(XRef, getDocInfoNF);
+m_poppler_get_INT(XRef, getNumObjects);
+// getLastXRefPos
+m_poppler_get_INT(XRef, getRootNum);
+m_poppler_get_INT(XRef, getRootGen);
+// getStreamEnd
+m_poppler_get_INT(XRef, getSize);
+// getEntry
+m_poppler_get_poppler(XRef, Object, getTrailerDict);
+
+m_poppler__tostring(XRef);
+
+static const struct luaL_Reg XRef_m[] = {
+ {"isOk", m_XRef_isOk},
+ {"getErrorCode", m_XRef_getErrorCode},
+ {"isEncrypted", m_XRef_isEncrypted},
+ {"okToPrint", m_XRef_okToPrint},
+ {"okToPrintHighRes", m_XRef_okToPrintHighRes},
+ {"okToChange", m_XRef_okToChange},
+ {"okToCopy", m_XRef_okToCopy},
+ {"okToAddNotes", m_XRef_okToAddNotes},
+ {"okToFillForm", m_XRef_okToFillForm},
+ {"okToAccessibility", m_XRef_okToAccessibility},
+ {"okToAssemble", m_XRef_okToAssemble},
+ {"getCatalog", m_XRef_getCatalog},
+ {"fetch", m_XRef_fetch},
+ {"getDocInfo", m_XRef_getDocInfo},
+ {"getDocInfoNF", m_XRef_getDocInfoNF},
+ {"getNumObjects", m_XRef_getNumObjects},
+ //
+ {"getRootNum", m_XRef_getRootNum},
+ {"getRootGen", m_XRef_getRootGen},
+ //
+ {"getSize", m_XRef_getSize},
+ {"getTrailerDict", m_XRef_getTrailerDict},
+ {"__tostring", m_XRef__tostring},
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+// XRefEntry
+
+static const struct luaL_Reg XRefEntry_m[] = {
+ {NULL, NULL} // sentinel
+};
+
+//**********************************************************************
+
+#define register_meta(type) \
+ luaL_newmetatable(L, M_##type); \
+ lua_pushvalue(L, -1); \
+ lua_setfield(L, -2, "__index"); \
+ lua_pushstring(L, "no user access"); \
+ lua_setfield(L, -2, "__metatable"); \
+ luaL_register(L, NULL, type##_m)
+
+int luaopen_epdf(lua_State * L)
+{
+ register_meta(Annot);
+ // TODO register_meta(AnnotBorder);
+ register_meta(AnnotBorderStyle);
+ register_meta(Annots);
+ register_meta(Array);
+ register_meta(Catalog);
+ register_meta(EmbFile);
+ register_meta(Dict);
+ register_meta(GooString);
+ register_meta(LinkDest);
+ register_meta(Links);
+ register_meta(Object);
+ register_meta(Page);
+ register_meta(PDFDoc);
+ register_meta(PDFRectangle);
+ register_meta(Ref);
+ register_meta(Stream);
+ register_meta(XRef);
+ register_meta(XRefEntry);
+
+ luaL_register(L, "epdf", epdflib);
+ return 1;
+}
diff --git a/Build/source/texk/web2c/luatexdir/lua/lfontlib.c b/Build/source/texk/web2c/luatexdir/lua/lfontlib.c
index da7a69cb571..e6b45578d55 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lfontlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lfontlib.c
@@ -22,7 +22,7 @@
static const char _svn_version[] =
- "$Id: lfontlib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lfontlib.c $";
+ "$Id: lfontlib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lfontlib.c $";
#define TIMERS 0
diff --git a/Build/source/texk/web2c/luatexdir/lua/limglib.c b/Build/source/texk/web2c/luatexdir/lua/limglib.c
index 5245e31d0a3..4cc13454c22 100644
--- a/Build/source/texk/web2c/luatexdir/lua/limglib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/limglib.c
@@ -18,8 +18,8 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: limglib.c 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/limglib.c $";
+ "$Id: limglib.c 4051 2011-01-09 22:41:33Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/limglib.c $";
#include <stdio.h>
#include <string.h>
@@ -94,9 +94,9 @@ static const parm_struct img_parms[] = {
{NULL, P__SENTINEL}
};
-#define imgtype_max 5
+#define imgtype_max 6
const char *imgtype_s[] =
- { "none", "pdf", "png", "jpg", "jbig2", "stream", NULL };
+ { "none", "pdf", "png", "jpg", "jp2", "jbig2", "stream", NULL };
#define pagebox_max 5
const char *pdfboxspec_s[] =
@@ -558,8 +558,8 @@ static void setup_image(PDF pdf, image * a, wrtype_e writetype)
read_scale_img(a);
if (img_objnum(ad) == 0) { /* latest needed just before out_img() */
pdf->ximage_count++;
- pdf_create_obj(pdf, obj_type_ximage, pdf->ximage_count);
- img_objnum(ad) = pdf->obj_ptr;
+ img_objnum(ad) =
+ pdf_create_obj(pdf, obj_type_ximage, pdf->ximage_count);
img_index(ad) = pdf->ximage_count;
idict_to_array(ad); /* now ad is read-only */
obj_data_ptr(pdf, pdf->obj_ptr) = img_index(ad);
@@ -609,6 +609,8 @@ static int l_write_image(lua_State * L)
static int l_immediatewrite_image(lua_State * L)
{
check_o_mode(static_pdf, "img.immediatewrite()", 1 << OMODE_PDF, true);
+ if (global_shipping_mode != NOT_SHIPPING)
+ luaL_error(L, "pdf.immediatewrite() can not be used with \\latelua");
write_image_or_node(L, WR_IMMEDIATEWRITE);
return 1; /* image */
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/liolib.c b/Build/source/texk/web2c/luatexdir/lua/liolib.c
index 93d21b23697..a85b38b8683 100644
--- a/Build/source/texk/web2c/luatexdir/lua/liolib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/liolib.c
@@ -1,5 +1,5 @@
/*
-** $Id: liolib.c 3404 2010-01-28 11:17:10Z taco $
+** $Id: liolib.c 3794 2010-08-03 07:02:06Z taco $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@@ -165,7 +165,13 @@ static int io_open(lua_State * L)
const char *mode = luaL_optstring(L, 2, "r");
FILE **pf = newfile(L);
*pf = fopen(filename, mode);
- return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
+ if (*pf == NULL)
+ return pushresult(L, 0, filename);
+ if (mode[0]=='r')
+ recorder_record_input(filename);
+ else
+ recorder_record_output(filename);
+ return 1;
}
static int io_open_ro(lua_State * L)
@@ -177,7 +183,10 @@ static int io_open_ro(lua_State * L)
return pushresult(L, 0, filename);
pf = newfile(L);
*pf = fopen(filename, mode);
- return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
+ if (*pf == NULL)
+ return pushresult(L, 0, filename);
+ recorder_record_input(filename);
+ return 1;
}
@@ -250,8 +259,14 @@ static int g_iofile(lua_State * L, int f, const char *mode)
if (filename) {
FILE **pf = newfile(L);
*pf = fopen(filename, mode);
- if (*pf == NULL)
+ if (*pf == NULL) {
fileerror(L, 1, filename);
+ } else {
+ if (mode[0]=='r')
+ recorder_record_input(filename);
+ else
+ recorder_record_output(filename);
+ }
} else {
tofile(L); /* check that it's a valid file handle */
lua_pushvalue(L, 1);
@@ -307,6 +322,8 @@ static int io_lines(lua_State * L)
*pf = fopen(filename, "r");
if (*pf == NULL)
fileerror(L, 1, filename);
+ else
+ recorder_record_input(filename);
aux_lines(L, lua_gettop(L), 1);
return 1;
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
index 35191538f0b..2949fae16f1 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
@@ -28,7 +28,7 @@
#include <kpathsea/tex-file.h>
static const char _svn_version[] =
- "$Id: lkpselib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lkpselib.c $";
+ "$Id: lkpselib.c 4020 2010-11-30 13:43:25Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lkpselib.c $";
static const unsigned filetypes[] = {
kpse_gf_format,
@@ -564,7 +564,7 @@ static int do_lua_kpathsea_lookup(lua_State * L, kpathsea kpse, int idx)
lua_pop(L, 1);
- lua_pushstring(L, "must-exist");
+ lua_pushstring(L, "mustexist");
lua_gettable(L, idx + 1);
if (lua_type(L, -1) == LUA_TBOOLEAN) {
must_exist = lua_toboolean(L, -1);
@@ -756,7 +756,7 @@ static int readable_file(lua_State * L)
{
const char *name = luaL_checkstring(L, 1);
TEST_PROGRAM_NAME_SET;
- lua_pushstring(L, (char *) kpse_readable_file(name));
+ lua_pushstring(L, kpse_readable_file(name));
return 1;
}
@@ -764,7 +764,7 @@ static int lua_kpathsea_readable_file(lua_State * L)
{
kpathsea *kp = (kpathsea *) luaL_checkudata(L, 1, KPATHSEA_METATABLE);
const char *name = luaL_checkstring(L, 2);
- lua_pushstring(L, (char *) kpathsea_readable_file(*kp, name));
+ lua_pushstring(L, kpathsea_readable_file(*kp, name));
return 1;
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/llanglib.c b/Build/source/texk/web2c/luatexdir/lua/llanglib.c
index 7b880b4293e..76cd921c2a2 100644
--- a/Build/source/texk/web2c/luatexdir/lua/llanglib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/llanglib.c
@@ -23,7 +23,7 @@
static const char _svn_version[] =
- "$Id: llanglib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/llanglib.c $";
+ "$Id: llanglib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/llanglib.c $";
#define LANG_METATABLE "luatex.lang"
diff --git a/Build/source/texk/web2c/luatexdir/lua/llfslibext.c b/Build/source/texk/web2c/luatexdir/lua/llfslibext.c
new file mode 100644
index 00000000000..5168d9c24de
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/lua/llfslibext.c
@@ -0,0 +1,173 @@
+/* llfslibext.c
+
+ Copyright 2010 Taco Hoekwater <taco@luatex.org>
+
+ This file is part of LuaTeX.
+
+ LuaTeX is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
+
+#include "lua/luatex-api.h"
+#include "ptexlib.h"
+
+#include <kpathsea/c-stat.h>
+#include <kpathsea/c-dir.h>
+#include <time.h>
+
+static const char _svn_version[] =
+ "$Id: llfslibext.c 4084 2011-02-10 09:06:29Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/llfslibext.c $";
+
+#ifdef _WIN32
+# include <windows.h>
+#else
+#endif
+
+#ifdef _WIN32
+
+static int get_short_name(lua_State * L)
+{
+ long length = 0;
+ TCHAR *buffer = NULL;
+ const char *lpszPath = luaL_checkstring(L, 1);
+ length = GetShortPathName(lpszPath, NULL, 0);
+ if (length == 0) {
+ lua_pushnil(L);
+ lua_pushfstring(L, "operating system error: %d", (int) GetLastError());
+ return 2;
+ }
+ buffer = (TCHAR *) xmalloc(length * sizeof(TCHAR));
+ length = GetShortPathName(lpszPath, buffer, length);
+ if (length == 0) {
+ lua_pushnil(L);
+ lua_pushfstring(L, "operating system error: %d", (int) GetLastError());
+ return 2;
+ }
+ lua_pushlstring(L, (const char *) buffer, (size_t) length);
+ return 1;
+}
+
+static int read_link(lua_State * L)
+{
+ lua_pushboolean(L, 0);
+ lua_pushliteral(L, "readlink not supported on this platform");
+ return 2;
+}
+
+#else
+
+static int pusherror(lua_State * L, const char *info)
+{
+ lua_pushnil(L);
+ if (info == NULL)
+ lua_pushstring(L, strerror(errno));
+ else
+ lua_pushfstring(L, "%s: %s", info, strerror(errno));
+ lua_pushinteger(L, errno);
+ return 3;
+}
+
+static int Preadlink(lua_State * L)
+{
+/** readlink(path) */
+ const char *path = luaL_checkstring(L, 1);
+ char *b = NULL;
+ size_t allocated = 128;
+ int n;
+ while (1) {
+ b = malloc(allocated);
+ if (!b)
+ return pusherror(L, path);
+ n = readlink(path, b, allocated);
+ if (n == -1) {
+ free(b);
+ return pusherror(L, path);
+ }
+ if (n < allocated)
+ break;
+ /* Not enough room, try bigger */
+ allocated *= 2;
+ free(b);
+ }
+ lua_pushlstring(L, b, n);
+ free(b);
+ return 1;
+}
+
+
+static int read_link(lua_State * L)
+{
+ return Preadlink(L);
+}
+
+static int get_short_name(lua_State * L)
+{
+ /* simply do nothing */
+ return 1;
+}
+#endif
+
+
+/*
+** Get file information
+*/
+static int file_is_directory(lua_State * L)
+{
+ struct stat info;
+ const char *file = luaL_checkstring(L, 1);
+
+ if (stat(file, &info)) {
+ lua_pushnil(L);
+ lua_pushfstring(L, "cannot obtain information from file `%s'", file);
+ return 2;
+ }
+ if (S_ISDIR(info.st_mode))
+ lua_pushboolean(L, 1);
+ else
+ lua_pushboolean(L, 0);
+
+ return 1;
+}
+
+static int file_is_file(lua_State * L)
+{
+ struct stat info;
+ const char *file = luaL_checkstring(L, 1);
+
+ if (stat(file, &info)) {
+ lua_pushnil(L);
+ lua_pushfstring(L, "cannot obtain information from file `%s'", file);
+ return 2;
+ }
+ if (S_ISREG(info.st_mode))
+ lua_pushboolean(L, 1);
+ else
+ lua_pushboolean(L, 0);
+
+ return 1;
+}
+
+
+void open_lfslibext(lua_State * L)
+{
+
+ lua_getglobal(L, "lfs");
+ lua_pushcfunction(L, file_is_directory);
+ lua_setfield(L, -2, "isdir");
+ lua_pushcfunction(L, file_is_file);
+ lua_setfield(L, -2, "isfile");
+ lua_pushcfunction(L, read_link);
+ lua_setfield(L, -2, "readlink");
+ lua_pushcfunction(L, get_short_name);
+ lua_setfield(L, -2, "shortname");
+ lua_pop(L, 1); /* pop the table */
+}
diff --git a/Build/source/texk/web2c/luatexdir/lua/llualib.c b/Build/source/texk/web2c/luatexdir/lua/llualib.c
index ec247e88010..de1ec5d5d2c 100644
--- a/Build/source/texk/web2c/luatexdir/lua/llualib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/llualib.c
@@ -21,7 +21,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: llualib.c 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/llualib.c $";
+ "$Id: llualib.c 3615 2010-04-13 21:59:59Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/llualib.c $";
#define LOAD_BUF_SIZE 256
#define UINT_MAX32 0xFFFFFFFF
diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
index ba81322a209..8fa1fb0d4cc 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c
@@ -18,8 +18,8 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: lnodelib.c 3726 2010-06-24 12:13:43Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/lua/lnodelib.c $";
+ "$Id: lnodelib.c 4140 2011-04-12 10:18:37Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lnodelib.c $";
#include "lua/luatex-api.h"
#include "ptexlib.h"
@@ -39,23 +39,35 @@ static const char _svn_version[] =
#define luaS_ptr_eq(a,b) (a==luaS_##b##_ptr)
#define NODE_METATABLE "luatex_node"
+
+#define DEBUG 0
+#define DEBUG_OUT stdout
make_luaS_index(luatex_node);
-halfword *check_isnode(lua_State * L, int ud)
+static halfword *maybe_isnode(lua_State * L, int ud)
{
- register halfword *p = lua_touserdata(L, ud);
+ halfword *p = lua_touserdata(L, ud);
if (p != NULL) {
if (lua_getmetatable(L, ud)) {
lua_rawgeti(L, LUA_REGISTRYINDEX, luaS_index(luatex_node));
lua_gettable(L, LUA_REGISTRYINDEX);
- if (lua_rawequal(L, -1, -2)) {
- lua_pop(L, 2);
- return p;
+ if (!lua_rawequal(L, -1, -2)) {
+ p = NULL;
}
+ lua_pop(L, 2);
}
}
- luaL_typerror(L, ud, NODE_METATABLE);
+ return p;
+}
+
+halfword *check_isnode(lua_State * L, int ud)
+{
+ halfword *p = maybe_isnode(L, ud);
+ if (p != NULL) {
+ return p;
+ }
+ pdftex_fail("There should have been a lua <node> here, not an object with type %s!", luaL_typename(L, ud));
return NULL;
}
@@ -115,6 +127,40 @@ int get_valid_node_subtype_id(lua_State * L, int n)
return i;
}
+/* returns true is the argument is a userdata object of type node */
+
+static int lua_nodelib_isnode(lua_State * L)
+{
+ if (maybe_isnode(L,1) != NULL)
+ lua_pushboolean(L,1);
+ else
+ lua_pushboolean(L,0);
+ return 1;
+}
+
+/* two simple helpers to speed up and simplify lua code: */
+
+static int lua_nodelib_next(lua_State * L)
+{
+ halfword *p = maybe_isnode(L,1);
+ if (p != NULL && *p && vlink(*p)) {
+ lua_nodelib_push_fast(L,vlink(*p));
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
+}
+
+static int lua_nodelib_prev(lua_State * L)
+{
+ halfword *p = maybe_isnode(L,1);
+ if (p != NULL && *p && alink(*p)) {
+ lua_nodelib_push_fast(L,alink(*p));
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
+}
/* Creates a userdata object for a number found at the stack top,
@@ -209,12 +255,17 @@ static int lua_nodelib_subtype(lua_State * L)
static int lua_nodelib_type(lua_State * L)
{
- int i = get_node_type_id(L, 1);
- if (i >= 0) {
- lua_pushstring(L, node_data[i].name);
- } else {
- lua_pushnil(L);
+ if (lua_type(L,1) == LUA_TNUMBER) {
+ int i = get_node_type_id(L, 1);
+ if (i >= 0) {
+ lua_pushstring(L, node_data[i].name);
+ return 1;
+ }
+ } else if (maybe_isnode(L, 1) != NULL) {
+ lua_pushstring(L,"node");
+ return 1;
}
+ lua_pushnil(L);
return 1;
}
@@ -293,7 +344,17 @@ static int lua_nodelib_flush_list(lua_State * L)
/* remove a node from a list */
-
+#if DEBUG
+static void show_node_links (halfword l, const char * p)
+{
+ halfword t = l;
+ while (t) {
+ fprintf(DEBUG_OUT, "%s t = %d, prev = %d, next = %d\n", p, (int)t, (int)alink(t), (int)vlink(t));
+ t = vlink(t);
+ }
+}
+#endif
+
static int lua_nodelib_remove(lua_State * L)
{
halfword head, current, t;
@@ -301,6 +362,9 @@ static int lua_nodelib_remove(lua_State * L)
luaL_error(L, "Not enough arguments for node.remove()");
}
head = *(check_isnode(L, 1));
+#if DEBUG
+ show_node_links(head, "before");
+#endif
if (lua_isnil(L, 2)) {
return 2; /* the arguments, as they are */
}
@@ -328,6 +392,9 @@ static int lua_nodelib_remove(lua_State * L)
}
current = vlink(current);
}
+#if DEBUG
+ show_node_links(head, "after");
+#endif
lua_pushnumber(L, head);
lua_nodelib_push(L);
lua_pushnumber(L, current);
@@ -573,7 +640,7 @@ static int lua_nodelib_dimensions(lua_State * L)
return 3;
} else {
luaL_error(L,
- "missing argument to 'dimensions' (luatex_node expected)");
+ "missing argument to 'dimensions' (node expected)");
}
return 0; /* not reached */
}
@@ -683,6 +750,8 @@ make_luaS_index(width);
make_luaS_index(height);
make_luaS_index(depth);
make_luaS_index(expansion_factor);
+make_luaS_index(list);
+make_luaS_index(head);
static void initialize_luaS_indexes(lua_State * L)
@@ -705,12 +774,17 @@ static void initialize_luaS_indexes(lua_State * L)
init_luaS_index(height);
init_luaS_index(depth);
init_luaS_index(expansion_factor);
+ init_luaS_index(list);
+ init_luaS_index(head);
}
static int get_node_field_id(lua_State * L, int n, int node)
{
register int t = type(node);
register const char *s = lua_tostring(L, n);
+ if (luaS_ptr_eq(s, list)) {
+ s = luaS_head_ptr; /* create a |head| alias for now */
+ }
if (luaS_ptr_eq(s, next)) {
return 0;
} else if (luaS_ptr_eq(s, id)) {
@@ -749,19 +823,21 @@ static int get_node_field_id(lua_State * L, int n, int node)
} else if (luaS_ptr_eq(s, expansion_factor)) {
return 16;
}
- } else if (luaS_ptr_eq(s, prev)) {
+ } else if (luaS_ptr_eq(s, prev) && nodetype_has_prev(t)) {
return -1;
- } else if (luaS_ptr_eq(s, subtype)) {
+ } else if (luaS_ptr_eq(s, subtype) && nodetype_has_subtype(t)) {
return 2;
} else {
int j;
const char **fields = node_data[t].fields;
if (t == whatsit_node)
fields = whatsit_node_data[subtype(node)].fields;
- for (j = 0; fields[j] != NULL; j++) {
- if (strcmp(s, fields[j]) == 0) {
- return j + 3;
- }
+ if (fields != NULL) {
+ for (j = 0; fields[j] != NULL; j++) {
+ if (strcmp(s, fields[j]) == 0) {
+ return j + 3;
+ }
+ }
}
}
return -2;
@@ -819,6 +895,7 @@ static int lua_nodelib_whatsits(lua_State * L)
static int lua_nodelib_fields(lua_State * L)
{
int i = -1;
+ int offset = 3;
const char **fields;
int t = get_valid_node_type_id(L, 1);
if (t == whatsit_node) {
@@ -833,14 +910,19 @@ static int lua_nodelib_fields(lua_State * L)
lua_rawseti(L, -2, 0);
lua_pushstring(L, "id");
lua_rawseti(L, -2, 1);
- lua_pushstring(L, "subtype");
- lua_rawseti(L, -2, 2);
+ if (nodetype_has_subtype(t)) {
+ lua_pushstring(L, "subtype");
+ lua_rawseti(L, -2, 2);
+ offset--;
+ }
if (fields != NULL) {
- lua_pushstring(L, "prev");
- lua_rawseti(L, -2, -1);
+ if (nodetype_has_prev(t)) {
+ lua_pushstring(L, "prev");
+ lua_rawseti(L, -2, -1);
+ }
for (i = 0; fields[i] != NULL; i++) {
lua_pushstring(L, fields[i]);
- lua_rawseti(L, -2, (i + 3));
+ lua_rawseti(L, -2, (i + offset));
}
}
return 1;
@@ -858,7 +940,7 @@ static int lua_nodelib_tail(lua_State * L)
t = *n;
if (t == null)
return 1; /* the old userdata */
- alink(t) = null;
+ /* alink(t) = null; */ /* don't do this, |t|'s |alink| may be a valid pointer */
while (vlink(t) != null) {
alink(vlink(t)) = t;
t = vlink(t);
@@ -1374,15 +1456,20 @@ static void lua_nodelib_getfield_whatsit(lua_State * L, int n, int field)
break;
case late_lua_node:
switch (field) {
- case 4:
+ case 4: /* regid (obsolete?)*/
lua_pushnumber(L, late_lua_reg(n));
break;
- case 5:
- tokenlist_to_luastring(L, late_lua_data(n));
- break;
- case 6:
+ case 6: /* name */
tokenlist_to_luastring(L, late_lua_name(n));
break;
+ case 5: /* data */
+ case 7: /* string */
+ if (late_lua_type(n) == lua_refid_literal) {
+ lua_rawgeti(Luas, LUA_REGISTRYINDEX, late_lua_data(n));
+ } else {
+ tokenlist_to_luastring(L, late_lua_data(n));
+ }
+ break;
default:
lua_pushnil(L);
}
@@ -1520,6 +1607,9 @@ static int lua_nodelib_getfield(lua_State * L)
lua_pushnumber(L, (double) glue_set(n));
break;
case 12:
+ if (list_ptr(n)) {
+ alink(list_ptr(n)) = null;
+ }
nodelib_pushlist(L, list_ptr(n));
break;
default:
@@ -1559,6 +1649,9 @@ static int lua_nodelib_getfield(lua_State * L)
lua_pushnumber(L, span_count(n));
break;
case 13:
+ if (list_ptr(n)) {
+ alink(list_ptr(n)) = null;
+ }
nodelib_pushlist(L, list_ptr(n));
break;
default:
@@ -1604,6 +1697,9 @@ static int lua_nodelib_getfield(lua_State * L)
nodelib_pushspec(L, split_top_ptr(n));
break;
case 8:
+ if (ins_ptr(n)) {
+ alink(ins_ptr(n)) = null;
+ }
nodelib_pushlist(L, ins_ptr(n));
break;
default:
@@ -1631,6 +1727,9 @@ static int lua_nodelib_getfield(lua_State * L)
lua_pushnumber(L, subtype(n));
break;
case 4:
+ if (adjust_ptr(n)) {
+ alink(adjust_ptr(n)) = null;
+ }
nodelib_pushlist(L, adjust_ptr(n));
break;
default:
@@ -1944,6 +2043,9 @@ static int lua_nodelib_getfield(lua_State * L)
lua_pushnumber(L, subtype(n));
break;
case 4:
+ if (math_list(n)) {
+ alink(math_list(n)) = null;
+ }
nodelib_pushlist(L, math_list(n));
break;
default:
@@ -2458,12 +2560,23 @@ static int lua_nodelib_setfield_whatsit(lua_State * L, int n, int field)
case 4:
late_lua_reg(n) = (halfword) lua_tointeger(L, 3);
break;
- case 5:
+ case 5: /* data */
late_lua_data(n) = nodelib_gettoks(L, 3);
+ late_lua_type(n) = normal;
break;
case 6:
late_lua_name(n) = nodelib_gettoks(L, 3);
break;
+ case 7: /* string */
+ if (ini_version) {
+ late_lua_data(n) = nodelib_gettoks(L, 3);
+ late_lua_type(n) = normal;
+ } else {
+ lua_pushvalue(L, 3);
+ late_lua_data(n) = luaL_ref(L, LUA_REGISTRYINDEX);
+ late_lua_type(n) = lua_refid_literal;
+ }
+ break;
default:
return nodelib_cantset(L, field, n);
}
@@ -2561,9 +2674,17 @@ static int lua_nodelib_setfield(lua_State * L)
/* return implied */
}
if (field == 0) {
- vlink(n) = nodelib_getlist(L, 3);
+ halfword x = nodelib_getlist(L, 3);
+ if (x>0 && type(x) == glue_spec_node) {
+ return luaL_error(L, "You can't assign a %s node to a next field\n", node_data[type(x)].name);
+ }
+ vlink(n) = x;
} else if (field == -1) {
- alink(n) = nodelib_getlist(L, 3);
+ halfword x = nodelib_getlist(L, 3);
+ if (x>0 && type(x) == glue_spec_node) {
+ return luaL_error(L, "You can't assign a %s node to a prev field\n", node_data[type(x)].name);
+ }
+ alink(n) = x;
} else if (field == 3 && nodetype_has_attributes(type(n))) {
nodelib_setattr(L, 3, n);
} else if (type(n) == glyph_node) {
@@ -3278,8 +3399,7 @@ static int lua_nodelib_unprotect_glyphs(lua_State * L)
return 2;
}
-
-static int lua_nodelib_first_character(lua_State * L)
+static int lua_nodelib_first_glyph(lua_State * L)
{
/* on the stack are two nodes and a direction */
halfword h, savetail = null, t = null;
@@ -3294,7 +3414,7 @@ static int lua_nodelib_first_character(lua_State * L)
savetail = vlink(t);
vlink(t) = null;
}
- while (h != null && !is_simple_character(h)) {
+ while (h != null && (type(h) != glyph_node || !is_simple_character(h))) {
h = vlink(h);
}
if (savetail != null) {
@@ -3306,6 +3426,13 @@ static int lua_nodelib_first_character(lua_State * L)
return 2;
}
+static int lua_nodelib_first_character(lua_State * L)
+{
+ pdftex_warn("node.first_character() is deprecated, please update to node.first_glyph()");
+ return lua_nodelib_first_glyph(L);
+}
+
+
/* this is too simplistic, but it helps Hans to get going */
@@ -3356,47 +3483,79 @@ static int lua_nodelib_cp_skipable(lua_State * L)
return 1;
}
+static int lua_nodelib_currentattr(lua_State * L)
+{
+ int n = lua_gettop(L);
+ if (n == 0) {
+ /* query */
+ if (max_used_attr >= 0) {
+ if (attr_list_cache == cache_disabled) {
+ update_attribute_cache();
+ if (attr_list_cache == null) {
+ lua_pushnil (L);
+ return 1;
+ }
+ }
+ attr_list_ref(attr_list_cache)++;
+ lua_pushnumber(L, attr_list_cache);
+ lua_nodelib_push(L);
+ } else {
+ lua_pushnil (L);
+ }
+ return 1;
+ } else {
+ /* assign */
+ pdftex_warn("Assignment via node.current_attr(<list>) is not supported (yet)");
+ return 0;
+ }
+}
+
+
static const struct luaL_reg nodelib_f[] = {
- {"id", lua_nodelib_id},
- {"subtype", lua_nodelib_subtype},
- {"type", lua_nodelib_type},
- {"new", lua_nodelib_new},
- {"length", lua_nodelib_length},
+ {"copy", lua_nodelib_copy},
+ {"copy_list", lua_nodelib_copy_list},
{"count", lua_nodelib_count},
- {"traverse", lua_nodelib_traverse},
- {"traverse_id", lua_nodelib_traverse_filtered},
- {"tail", lua_nodelib_tail_only},
- {"slide", lua_nodelib_tail},
- {"types", lua_nodelib_types},
- {"whatsits", lua_nodelib_whatsits},
+ {"current_attr", lua_nodelib_currentattr},
+ {"dimensions", lua_nodelib_dimensions},
+ {"do_ligature_n", lua_nodelib_do_ligature_n},
+ {"family_font", lua_nodelib_mfont},
{"fields", lua_nodelib_fields},
- {"has_field", lua_nodelib_has_field},
- {"free", lua_nodelib_free},
+ {"first_character", lua_nodelib_first_character},
+ {"first_glyph", lua_nodelib_first_glyph},
{"flush_list", lua_nodelib_flush_list},
- {"remove", lua_nodelib_remove},
- {"insert_before", lua_nodelib_insert_before},
+ {"free", lua_nodelib_free},
+ {"has_attribute", lua_nodelib_has_attribute},
+ {"has_field", lua_nodelib_has_field},
+ {"hpack", lua_nodelib_hpack},
+ {"id", lua_nodelib_id},
{"insert_after", lua_nodelib_insert_after},
- {"write", lua_nodelib_append},
+ {"insert_before", lua_nodelib_insert_before},
+ {"is_node", lua_nodelib_isnode},
+ {"kerning", font_tex_kerning},
{"last_node", lua_nodelib_last_node},
- {"copy", lua_nodelib_copy},
- {"copy_list", lua_nodelib_copy_list},
- {"dimensions", lua_nodelib_dimensions},
- {"hpack", lua_nodelib_hpack},
- {"vpack", lua_nodelib_vpack},
+ {"length", lua_nodelib_length},
+ {"ligaturing", font_tex_ligaturing},
{"mlist_to_hlist", lua_nodelib_mlist_to_hlist},
- {"family_font", lua_nodelib_mfont},
- {"has_attribute", lua_nodelib_has_attribute},
+ {"new", lua_nodelib_new},
+ {"next", lua_nodelib_next},
+ {"prev", lua_nodelib_prev},
+ {"protect_glyphs", lua_nodelib_protect_glyphs},
+ {"protrusion_skippable", lua_nodelib_cp_skipable},
+ {"remove", lua_nodelib_remove},
{"set_attribute", lua_nodelib_set_attribute},
+ {"slide", lua_nodelib_tail},
+ {"subtype", lua_nodelib_subtype},
+ {"tail", lua_nodelib_tail_only},
+ {"traverse", lua_nodelib_traverse},
+ {"traverse_id", lua_nodelib_traverse_filtered},
+ {"type", lua_nodelib_type},
+ {"types", lua_nodelib_types},
+ {"unprotect_glyphs", lua_nodelib_unprotect_glyphs},
{"unset_attribute", lua_nodelib_unset_attribute},
- {"do_ligature_n", lua_nodelib_do_ligature_n},
- {"ligaturing", font_tex_ligaturing},
- {"kerning", font_tex_kerning},
- {"first_character", lua_nodelib_first_character},
{"usedlist", lua_nodelib_usedlist},
- {"protect_glyphs", lua_nodelib_protect_glyphs},
- {"unprotect_glyphs", lua_nodelib_unprotect_glyphs},
- {"protrusion_skipable", lua_nodelib_cp_skipable},
- {"protrusion_skippable", lua_nodelib_cp_skipable},
+ {"vpack", lua_nodelib_vpack},
+ {"whatsits", lua_nodelib_whatsits},
+ {"write", lua_nodelib_append},
{NULL, NULL} /* sentinel */
};
@@ -3432,5 +3591,5 @@ int nodelist_from_lua(lua_State * L)
if (lua_isnil(L, -1))
return null;
n = check_isnode(L, -1);
- return *n;
+ return (n ? *n : null);
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/loslibext.c b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
index 3efdd07d1e0..b0bf0d5abea 100644
--- a/Build/source/texk/web2c/luatexdir/lua/loslibext.c
+++ b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
@@ -25,7 +25,7 @@
#include <time.h>
static const char _svn_version[] =
- "$Id: loslibext.c 3648 2010-04-24 08:04:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.1/source/texk/web2c/luatexdir/lua/loslibext.c $";
+ "$Id: loslibext.c 3682 2010-05-11 08:07:11Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/loslibext.c $";
#if defined(_WIN32) || defined(__NT__)
# define MKDIR(a,b) mkdir(a)
diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
index e5f688400e9..c3d16111e6b 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
@@ -18,23 +18,15 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: lpdflib.c 3618 2010-04-15 05:54:45Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lpdflib.c $";
+ "$Id: lpdflib.c 3941 2010-11-01 23:31:27Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lpdflib.c $";
#include "lua/luatex-api.h"
#include "ptexlib.h"
-#define buf_to_pdfbuf_macro(p, s, l) \
-for (i = 0; i < (l); i++) { \
- if (i % 16 == 0) \
- pdf_room(p, 16); \
- pdf_quick_out(p, ((const unsigned char *) (s))[i]); \
-}
-
static int luapdfprint(lua_State * L)
{
int n;
- unsigned i;
const_lstring st, modestr;
ctm_transform_modes literal_mode;
st.s = modestr.s = NULL;
@@ -79,19 +71,19 @@ static int luapdfprint(lua_State * L)
assert(0);
}
st.s = lua_tolstring(L, n, &st.l);
- buf_to_pdfbuf_macro(static_pdf, st.s, st.l);
+ pdf_out_block(static_pdf, st.s, st.l);
return 0;
}
-static unsigned char *fread_to_buf(lua_State * L, const char *filename, size_t * len)
+static unsigned char *fread_to_buf(lua_State * L, const char *filename,
+ size_t * len)
{
- int i = 0;
int ilen = 0;
FILE *f;
unsigned char *buf = NULL;
if ((f = fopen(filename, "rb")) == NULL)
luaL_error(L, "pdf.immediateobj() cannot open input file");
- if ((i = readbinfile(f, &buf, &ilen)) == 0)
+ if (readbinfile(f, &buf, &ilen) == 0)
luaL_error(L, "pdf.immediateobj() cannot read input file");
fclose(f);
*len = (size_t) ilen;
@@ -101,23 +93,23 @@ static unsigned char *fread_to_buf(lua_State * L, const char *filename, size_t *
static int l_immediateobj(lua_State * L)
{
int n, first_arg = 1;
- unsigned i;
int k;
lstring buf;
const_lstring st1, st2, st3;
st1.s = st2.s = st3.s = NULL;
check_o_mode(static_pdf, "immediateobj()", 1 << OMODE_PDF, true);
+ if (global_shipping_mode != NOT_SHIPPING)
+ luaL_error(L, "pdf.immediateobj() can not be used with \\latelua");
n = lua_gettop(L);
if (n > 0 && lua_type(L, 1) == LUA_TNUMBER) {
first_arg++;
lua_number2int(k, lua_tonumber(L, 1));
- check_obj_exists(static_pdf, obj_type_obj, k);
+ check_obj_type(static_pdf, obj_type_obj, k);
if (is_obj_scheduled(static_pdf, k) || obj_data_ptr(static_pdf, k) != 0)
luaL_error(L, "pdf.immediateobj() object in use");
} else {
- incr(static_pdf->obj_count);
- pdf_create_obj(static_pdf, obj_type_obj, static_pdf->sys_obj_ptr + 1);
- k = static_pdf->sys_obj_ptr;
+ static_pdf->obj_count++;
+ k = pdf_create_obj(static_pdf, obj_type_obj, static_pdf->obj_ptr + 1);
}
pdf_last_obj = k;
switch (n - first_arg + 1) {
@@ -129,7 +121,7 @@ static int l_immediateobj(lua_State * L)
luaL_error(L, "pdf.immediateobj() 1st argument must be string");
pdf_begin_obj(static_pdf, k, 1);
st1.s = lua_tolstring(L, first_arg, &st1.l);
- buf_to_pdfbuf_macro(static_pdf, st1.s, st1.l);
+ pdf_out_block(static_pdf, st1.s, st1.l);
if (st1.s[st1.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
pdf_end_obj(static_pdf);
@@ -148,7 +140,7 @@ static int l_immediateobj(lua_State * L)
"pdf.immediateobj() 3rd argument forbidden in file mode");
pdf_begin_obj(static_pdf, k, 1);
buf.s = fread_to_buf(L, st2.s, &buf.l);
- buf_to_pdfbuf_macro(static_pdf, buf.s, buf.l);
+ pdf_out_block(static_pdf, (const char *) buf.s, buf.l);
if (buf.s[buf.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
xfree(buf.s);
@@ -160,18 +152,18 @@ static int l_immediateobj(lua_State * L)
luaL_error(L,
"pdf.immediateobj() 3rd argument must be string");
st3.s = lua_tolstring(L, first_arg + 2, &st3.l);
- buf_to_pdfbuf_macro(static_pdf, st3.s, st3.l);
+ pdf_out_block(static_pdf, st3.s, st3.l);
if (st3.s[st3.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
}
pdf_begin_stream(static_pdf);
if (st1.l == 6 && strncmp((const char *) st1.s, "stream", 6) == 0) {
- buf_to_pdfbuf_macro(static_pdf, st2.s, st2.l);
+ pdf_out_block(static_pdf, st2.s, st2.l);
} else if (st1.l == 10
&& strncmp((const char *) st1.s, "streamfile",
10) == 0) {
buf.s = fread_to_buf(L, st2.s, &buf.l);
- buf_to_pdfbuf_macro(static_pdf, buf.s, buf.l);
+ pdf_out_block(static_pdf, (const char *) buf.s, buf.l);
xfree(buf.s);
} else
luaL_error(L, "pdf.immediateobj() invalid argument");
@@ -193,9 +185,6 @@ typedef enum { P__ZERO,
P_H,
P_INFO,
P_NAMES,
- P_PAGEATTRIBUTES,
- P_PAGERESOURCES,
- P_PAGESATTRIBUTES,
P_PDFCATALOG,
P_PDFINFO,
P_PDFNAMES,
@@ -213,9 +202,6 @@ static const parm_struct pdf_parms[] = {
{"h", P_H},
{"info", P_INFO},
{"names", P_NAMES},
- {"pageattributes", P_PAGEATTRIBUTES},
- {"pageresources", P_PAGERESOURCES},
- {"pagesattributes", P_PAGESATTRIBUTES},
{"pdfcatalog", P_PDFCATALOG}, /* obsolescent */
{"pdfinfo", P_PDFINFO}, /* obsolescent */
{"pdfnames", P_PDFNAMES}, /* obsolescent */
@@ -237,7 +223,6 @@ static int table_obj(lua_State * L)
int saved_compress_level = static_pdf->compress_level;
const_lstring attr, st;
lstring buf;
- size_t i;
int immediate = 0; /* default: not immediate */
attr.s = st.s = NULL;
attr.l = 0;
@@ -285,13 +270,12 @@ static int table_obj(lua_State * L)
if (!lua_isnumber(L, -1)) /* !vi t */
luaL_error(L, "pdf.obj(): \"objnum\" must be integer");
k = (int) lua_tointeger(L, -1); /* vi t */
- check_obj_exists(static_pdf, obj_type_obj, k);
+ check_obj_type(static_pdf, obj_type_obj, k);
if (is_obj_scheduled(static_pdf, k) || obj_data_ptr(static_pdf, k) != 0)
luaL_error(L, "pdf.obj() object in use");
} else {
- incr(static_pdf->obj_count);
- pdf_create_obj(static_pdf, obj_type_obj, static_pdf->sys_obj_ptr + 1);
- k = static_pdf->sys_obj_ptr;
+ static_pdf->obj_count++;
+ k = pdf_create_obj(static_pdf, obj_type_obj, static_pdf->obj_ptr + 1);
}
pdf_last_obj = k;
if (immediate == 0) {
@@ -379,7 +363,7 @@ static int table_obj(lua_State * L)
"pdf.obj(): \"string\" must be string for raw object");
if (immediate == 1) {
st.s = lua_tolstring(L, -1, &st.l);
- buf_to_pdfbuf_macro(static_pdf, st.s, st.l);
+ pdf_out_block(static_pdf, st.s, st.l);
if (st.s[st.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
} else
@@ -392,7 +376,7 @@ static int table_obj(lua_State * L)
if (immediate == 1) {
st.s = lua_tolstring(L, -1, &st.l); /* file-s nil t */
buf.s = fread_to_buf(L, st.s, &buf.l);
- buf_to_pdfbuf_macro(static_pdf, buf.s, buf.l);
+ pdf_out_block(static_pdf, (const char *) buf.s, buf.l);
if (buf.s[buf.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
xfree(buf.s);
@@ -408,7 +392,7 @@ static int table_obj(lua_State * L)
if (immediate == 1) {
pdf_begin_dict(static_pdf, k, 0); /* 0 = not an object stream candidate! */
if (attr.s != NULL) {
- buf_to_pdfbuf_macro(static_pdf, attr.s, attr.l);
+ pdf_out_block(static_pdf, attr.s, attr.l);
if (attr.s[attr.l - 1] != '\n')
pdf_puts(static_pdf, "\n");
}
@@ -428,7 +412,7 @@ static int table_obj(lua_State * L)
"pdf.obj(): \"string\" must be string for stream object");
if (immediate == 1) {
st.s = lua_tolstring(L, -1, &st.l); /* string-s t */
- buf_to_pdfbuf_macro(static_pdf, st.s, st.l);
+ pdf_out_block(static_pdf, st.s, st.l);
} else
obj_obj_data(static_pdf, k) = luaL_ref(L, LUA_REGISTRYINDEX); /* t */
} else {
@@ -439,7 +423,7 @@ static int table_obj(lua_State * L)
if (immediate == 1) {
st.s = lua_tolstring(L, -1, &st.l); /* file-s nil t */
buf.s = fread_to_buf(L, st.s, &buf.l);
- buf_to_pdfbuf_macro(static_pdf, buf.s, buf.l);
+ pdf_out_block(static_pdf, (const char *) buf.s, buf.l);
xfree(buf.s);
} else {
set_obj_obj_is_file(static_pdf, k);
@@ -466,13 +450,12 @@ static int orig_obj(lua_State * L)
if (n > 0 && lua_type(L, 1) == LUA_TNUMBER) {
first_arg++;
lua_number2int(k, lua_tonumber(L, 1));
- check_obj_exists(static_pdf, obj_type_obj, k);
+ check_obj_type(static_pdf, obj_type_obj, k);
if (is_obj_scheduled(static_pdf, k) || obj_data_ptr(static_pdf, k) != 0)
luaL_error(L, "pdf.obj() object in use");
} else {
- incr(static_pdf->obj_count);
- pdf_create_obj(static_pdf, obj_type_obj, static_pdf->sys_obj_ptr + 1);
- k = static_pdf->sys_obj_ptr;
+ static_pdf->obj_count++;
+ k = pdf_create_obj(static_pdf, obj_type_obj, static_pdf->obj_ptr + 1);
}
pdf_last_obj = k;
obj_data_ptr(static_pdf, k) = pdf_get_mem(static_pdf, pdfmem_obj_size);
@@ -522,8 +505,7 @@ static int orig_obj(lua_State * L)
static int l_obj(lua_State * L)
{
- int n;
- int k;
+ int k, n;
ensure_output_state(static_pdf, ST_HEADER_WRITTEN);
n = lua_gettop(L);
if (n == 1 && lua_istable(L, 1))
@@ -534,6 +516,20 @@ static int l_obj(lua_State * L)
return 1;
}
+static int l_refobj(lua_State * L)
+{
+ int k, n;
+ n = lua_gettop(L);
+ if (n != 1)
+ luaL_error(L, "pdf.refobj() needs exactly 1 argument");
+ k = (int) luaL_checkinteger(L, 1);
+ if (global_shipping_mode == NOT_SHIPPING)
+ scan_refobj_lua(static_pdf, k);
+ else
+ pdf_ref_obj_lua(static_pdf, k);
+ return 0;
+}
+
static int l_reserveobj(lua_State * L)
{
int n;
@@ -542,17 +538,16 @@ static int l_reserveobj(lua_State * L)
n = lua_gettop(L);
switch (n) {
case 0:
- incr(static_pdf->obj_count);
- pdf_create_obj(static_pdf, obj_type_obj, static_pdf->sys_obj_ptr + 1);
- pdf_last_obj = static_pdf->sys_obj_ptr;
+ static_pdf->obj_count++;
+ pdf_last_obj =
+ pdf_create_obj(static_pdf, obj_type_obj, static_pdf->obj_ptr + 1);
break;
case 1:
if (!lua_isstring(L, -1))
luaL_error(L, "pdf.reserveobj() optional argument must be string");
st.s = lua_tolstring(L, 1, &st.l);
if (st.l == 5 && strncmp((const char *) st.s, "annot", 5) == 0) {
- pdf_create_obj(static_pdf, obj_type_annot, 0);
- pdf_last_annot = static_pdf->sys_obj_ptr;
+ pdf_last_annot = pdf_create_obj(static_pdf, obj_type_annot, 0);
} else {
luaL_error(L, "pdf.reserveobj() optional string must be \"annot\"");
}
@@ -571,7 +566,7 @@ static int l_registerannot(lua_State * L)
n = lua_gettop(L);
switch (n) {
case 1:
- if (!is_shipping_page)
+ if (global_shipping_mode == NOT_SHIPPING)
luaL_error(L, "pdf.registerannot() can only be used in late lua");
i = (int) luaL_checkinteger(L, 1);
if (i <= 0)
@@ -588,27 +583,14 @@ static int l_registerannot(lua_State * L)
static int getpdf(lua_State * L)
{
char *s;
- const char *st;
int i, l;
- if (lua_isstring(L, 2) && (st = lua_tostring(L, 2)) != NULL) {
+ if (lua_isstring(L, 2) && (lua_tostring(L, 2) != NULL)) {
lua_pushvalue(L, 2); /* st ... */
lua_gettable(L, LUA_ENVIRONINDEX); /* i? ... */
if (lua_isnumber(L, -1)) { /* i ... */
i = (int) lua_tointeger(L, -1); /* i ... */
lua_pop(L, 1); /* ... */
switch (i) {
- case P_PAGEATTRIBUTES:
- s = tokenlist_to_cstring(pdf_pageattributes_toks, true, &l);
- lua_pushlstring(L, s, (size_t) l);
- break;
- case P_PAGERESOURCES:
- s = tokenlist_to_cstring(pdf_pageresources_toks, true, &l);
- lua_pushlstring(L, s, (size_t) l);
- break;
- case P_PAGESATTRIBUTES:
- s = tokenlist_to_cstring(pdf_pagesattributes_toks, true, &l);
- lua_pushlstring(L, s, (size_t) l);
- break;
case P_PDFCATALOG:
case P_CATALOG:
s = tokenlist_to_cstring(pdf_catalog_toks, true, &l);
@@ -661,15 +643,6 @@ static int setpdf(lua_State * L)
i = (int) lua_tointeger(L, -1); /* i ... */
lua_pop(L, 1); /* ... */
switch (i) {
- case P_PAGEATTRIBUTES:
- pdf_pageattributes_toks = tokenlist_from_lua(L);
- break;
- case P_PAGERESOURCES:
- pdf_pageresources_toks = tokenlist_from_lua(L);
- break;
- case P_PAGESATTRIBUTES:
- pdf_pagesattributes_toks = tokenlist_from_lua(L);
- break;
case P_PDFCATALOG:
case P_CATALOG:
pdf_catalog_toks = tokenlist_from_lua(L);
@@ -699,6 +672,28 @@ static int setpdf(lua_State * L)
return 0;
}
+static int l_objtype(lua_State * L)
+{
+ int n = lua_gettop(L);
+ if (n != 1)
+ luaL_error(L, "pdf.objtype() needs exactly 1 argument");
+ n = (int) luaL_checkinteger(L, 1);
+ if (n < 0 || n > static_pdf->obj_ptr)
+ lua_pushnil(L);
+ else
+ lua_pushstring(L, pdf_obj_typenames[obj_type(static_pdf, n)]);
+ return 1;
+}
+
+static int l_maxobjnum(lua_State * L)
+{
+ int n = lua_gettop(L);
+ if (n != 0)
+ luaL_error(L, "pdf.maxobjnum() needs 0 arguments");
+ lua_pushinteger(L, static_pdf->obj_ptr);
+ return 1;
+}
+
static int l_mapfile(lua_State * L)
{
char *s;
@@ -735,14 +730,31 @@ static int l_pdfmapline(lua_State * L)
return 0;
}
+static int l_pageref(lua_State * L)
+{
+ int n = lua_gettop(L);
+ if (n != 1)
+ luaL_error(L, "pdf.pageref() needs exactly 1 argument");
+ n = (int) luaL_checkinteger(L, 1);
+ if (n <= 0)
+ luaL_error(L, "pdf.pageref() needs page number > 0");
+ n = get_obj(static_pdf, obj_type_page, n, false);
+ lua_pushnumber(L, n);
+ return 1;
+}
+
static const struct luaL_reg pdflib[] = {
{"immediateobj", l_immediateobj},
{"mapfile", l_mapfile},
{"mapline", l_mapline},
+ {"maxobjnum", l_maxobjnum},
{"obj", l_obj},
+ {"objtype", l_objtype},
+ {"pageref", l_pageref},
{"pdfmapfile", l_pdfmapfile}, /* obsolete */
{"pdfmapline", l_pdfmapline}, /* obsolete */
{"print", luapdfprint},
+ {"refobj", l_refobj},
{"registerannot", l_registerannot},
{"reserveobj", l_reserveobj},
{NULL, NULL} /* sentinel */
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
index 020fe6d616a..49a72210577 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c
@@ -19,7 +19,7 @@
static const char _svn_version[] =
"$Id: lstatslib.c 3477 2010-03-12 13:59:34Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lstatslib.c $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lstatslib.c $";
#include "lua/luatex-api.h"
#include "ptexlib.h"
diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c b/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c
index 63ab77d9f65..6acd371161c 100644
--- a/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c
@@ -21,7 +21,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: ltexiolib.c 3550 2010-03-26 14:37:09Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/ltexiolib.c $";
+ "$Id: ltexiolib.c 3550 2010-03-26 14:37:09Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/ltexiolib.c $";
typedef void (*texio_printer) (const char *);
diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
index 317dbbd9afd..f40e173a108 100644
--- a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
@@ -23,7 +23,7 @@
static const char _svn_version[] =
- "$Id: ltexlib.c 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/ltexlib.c $";
+ "$Id: ltexlib.c 4132 2011-04-11 14:04:10Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/ltexlib.c $";
#define attribute(A) eqtb[attribute_base+(A)].hh.rh
#define dimen(A) eqtb[scaled_base+(A)].hh.rh
@@ -574,6 +574,46 @@ static int tex_scaledimen(lua_State * L)
return 1;
}
+static int texerror (lua_State * L)
+{
+ int i, n, l;
+ const char **errhlp = NULL;
+ const char *error = luaL_checkstring(L,1);
+ n = lua_gettop(L);
+ if (n==2 && lua_type(L, n) == LUA_TTABLE) {
+ l = 1; /* |errhlp| is terminated by a NULL entry */
+ for (i = 1;; i++) {
+ lua_rawgeti(L, n, i);
+ if (lua_isstring(L, -1)) {
+ l++;
+ lua_pop(L, 1);
+ } else {
+ lua_pop(L, 1);
+ break;
+ }
+ }
+ if (l>1) {
+ errhlp = xmalloc(l * sizeof(char *));
+ memset(errhlp,0,l * sizeof(char *));
+ for (i = 1;; i++) {
+ lua_rawgeti(L, n, i);
+ if (lua_isstring(L, -1)) {
+ errhlp[(i-1)] = lua_tostring(L,-1);
+ lua_pop(L, 1);
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ deletions_allowed = false;
+ tex_error(error, errhlp);
+ if (errhlp)
+ xfree(errhlp);
+ deletions_allowed = true;
+ return 0;
+}
+
static int get_item_index(lua_State * L, int i, int base)
{
@@ -783,6 +823,8 @@ static int vsettoks(lua_State * L, int is_global)
int i, err;
int k;
lstring str;
+ char *s;
+ const char *ss;
int save_global_defs = int_par(global_defs_code);
if (is_global)
int_par(global_defs_code) = 1;
@@ -790,7 +832,10 @@ static int vsettoks(lua_State * L, int is_global)
if (!lua_isstring(L, i)) {
luaL_error(L, "unsupported value type");
}
- str.s = (unsigned char *) xstrdup(lua_tolstring(L, i, &str.l));
+ ss = lua_tolstring(L, i, &str.l);
+ s = xmalloc (str.l+1);
+ memcpy (s, ss, str.l+1);
+ str.s = (unsigned char *)s;
k = get_item_index(L, (i - 1), toks_base);
check_index_range(k, "settoks");
err = set_tex_toks_register(k, str);
@@ -903,114 +948,238 @@ static int setbox(lua_State * L)
return vsetbox(L, isglobal);
}
-static int getboxdim(lua_State * L, int whichdim)
+#define check_char_range(j,s,lim) \
+ if (j<0 || j >= lim) { \
+ luaL_error(L, "incorrect character value %d for tex.%s()", (int)j, s); }
+
+
+static int setcode (lua_State *L, void (*setone)(int,halfword,quarterword),
+ void (*settwo)(int,halfword,quarterword), const char *name, int lim)
{
- int i, j;
- i = lua_gettop(L);
- j = get_box_id(L, i);
- lua_settop(L, (i - 2)); /* table at -1 */
- if (j < 0 || j > 65535) {
- luaL_error(L, "incorrect index");
- }
- switch (whichdim) {
- case width_offset:
- lua_pushnumber(L, get_tex_box_width(j));
- break;
- case height_offset:
- lua_pushnumber(L, get_tex_box_height(j));
- break;
- case depth_offset:
- lua_pushnumber(L, get_tex_box_depth(j));
+ int ch;
+ halfword val, ucval;
+ int level = cur_level;
+ int n = lua_gettop(L);
+ int f = 1;
+ if (n>1 && lua_type(L,1) == LUA_TTABLE)
+ f++;
+ if (n>2 && lua_isstring(L, f)) {
+ const char *s = lua_tostring(L, f);
+ if (strcmp(s, "global") == 0) {
+ level = level_one;
+ f++;
+ }
+ }
+ ch = (int) luaL_checkinteger(L, f);
+ check_char_range(ch, name, 65536*17);
+ val = (halfword) luaL_checkinteger(L, f+1);
+ check_char_range(val, name, lim);
+ (setone)(ch, val, level);
+ if (settwo != NULL && n-f == 2) {
+ ucval = (halfword) luaL_checkinteger(L, f+2);
+ check_char_range(ucval, name, lim);
+ (settwo)(ch, ucval, level);
}
+ return 0;
+}
+
+static int setlccode(lua_State * L)
+{
+ return setcode(L, &set_lc_code, &set_uc_code, "setlccode", 65536*17);
+}
+
+static int getlccode(lua_State * L)
+{
+ int ch = (int) luaL_checkinteger(L, -1);
+ check_char_range(ch, "getlccode", 65536*17);
+ lua_pushnumber(L, get_lc_code(ch));
return 1;
}
-static int getboxwd(lua_State * L)
+static int setuccode(lua_State * L)
{
- return getboxdim(L, width_offset);
+ return setcode(L, &set_uc_code, &set_lc_code, "setuccode", 65536*17);
}
-static int getboxht(lua_State * L)
+static int getuccode(lua_State * L)
{
- return getboxdim(L, height_offset);
+ int ch = (int) luaL_checkinteger(L, -1);
+ check_char_range(ch, "getuccode", 65536*17);
+ lua_pushnumber(L, get_uc_code(ch));
+ return 1;
}
-static int getboxdp(lua_State * L)
+static int setsfcode(lua_State * L)
{
- return getboxdim(L, depth_offset);
+ return setcode(L, &set_sf_code, NULL, "setsfcode", 32768);
}
-static int vsetboxdim(lua_State * L, int whichdim, int is_global)
+static int getsfcode(lua_State * L)
{
- int i, j, k, err;
- int save_global_defs = int_par(global_defs_code);
- if (is_global)
- int_par(global_defs_code) = 1;
- i = lua_gettop(L);
- if (!lua_isnumber(L, i)) {
- j = dimen_to_number(L, lua_tostring(L, i));
- } else {
- lua_number2int(j, lua_tonumber(L, i));
- }
- k = get_box_id(L, (i - 1));
- lua_settop(L, (i - 3)); /* table at -2 */
- if (k < 0 || k > 65535) {
- luaL_error(L, "incorrect index");
- }
- err = 0;
- switch (whichdim) {
- case width_offset:
- err = set_tex_box_width(k, j);
- break;
- case height_offset:
- err = set_tex_box_height(k, j);
- break;
- case depth_offset:
- err = set_tex_box_depth(k, j);
+ int ch = (int) luaL_checkinteger(L, -1);
+ check_char_range(ch, "getsfcode", 65536*17);
+ lua_pushnumber(L, get_sf_code(ch));
+ return 1;
+}
+
+static int setcatcode(lua_State * L)
+{
+ int ch;
+ halfword val;
+ int level = cur_level;
+ int cattable = int_par(cat_code_table_code);
+ int n = lua_gettop(L);
+ int f = 1;
+ if (n>1 && lua_type(L,1) == LUA_TTABLE)
+ f++;
+ if (n>2 && lua_isstring(L, f)) {
+ const char *s = lua_tostring(L, f);
+ if (strcmp(s, "global") == 0) {
+ level = level_one;
+ f++;
+ }
}
- int_par(global_defs_code) = save_global_defs;
- if (err) {
- luaL_error(L, "not a box");
+ if (n-f == 2) {
+ cattable = (int) luaL_checkinteger(L, -3);
}
+ ch = (int) luaL_checkinteger(L, -2);
+ check_char_range(ch, "setcatcode", 65536*17);
+ val = (halfword) luaL_checkinteger(L, -1);
+ check_char_range(val, "setcatcode", 16);
+ set_cat_code(cattable, ch, val, level);
return 0;
}
-static int setboxwd(lua_State * L)
+static int getcatcode(lua_State * L)
{
- int isglobal = 0;
- int n = lua_gettop(L);
- if (n == 3 && lua_isstring(L, 1)) {
- const char *s = lua_tostring(L, 1);
- if (strcmp(s, "global") == 0)
- isglobal = 1;
+ int cattable = int_par(cat_code_table_code);
+ int ch = (int) luaL_checkinteger(L, -1);
+ if (lua_gettop(L)>=2 && lua_type(L,-2)==LUA_TNUMBER) {
+ cattable = luaL_checkinteger(L, -2);
}
- return vsetboxdim(L, width_offset, isglobal);
+ check_char_range(ch, "getcatcode", 65536*17);
+ lua_pushnumber(L, get_cat_code(cattable, ch));
+ return 1;
}
-static int setboxht(lua_State * L)
+
+static int setmathcode(lua_State * L)
{
- int isglobal = 0;
+ int ch;
+ halfword cval, fval, chval;
+ int level = cur_level;
int n = lua_gettop(L);
- if (n == 3 && lua_isstring(L, 1)) {
- const char *s = lua_tostring(L, 1);
- if (strcmp(s, "global") == 0)
- isglobal = 1;
+ int f = 1;
+ if (n>1 && lua_type(L,1) == LUA_TTABLE)
+ f++;
+ if (n>2 && lua_isstring(L, f)) {
+ const char *s = lua_tostring(L, f);
+ if (strcmp(s, "global") == 0) {
+ level = level_one;
+ f++;
+ }
+ }
+ if (n-f!=1 || lua_type(L,f+1) != LUA_TTABLE) {
+ luaL_error(L, "Bad arguments for tex.setmathcode()");
}
- return vsetboxdim(L, height_offset, isglobal);
+ ch = (int) luaL_checkinteger(L, -2);
+ check_char_range(ch, "setmathcode", 65536*17);
+
+ lua_rawgeti(L, -1, 1);
+ cval = (halfword) luaL_checkinteger(L, -1);
+ lua_rawgeti(L, -2, 2);
+ fval = (halfword) luaL_checkinteger(L, -1);
+ lua_rawgeti(L, -3, 3);
+ chval = (halfword) luaL_checkinteger(L, -1);
+ lua_pop(L,3);
+
+ check_char_range(cval, "setmathcode", 8);
+ check_char_range(fval, "setmathcode", 256);
+ check_char_range(chval, "setmathcode", 65536*17);
+ set_math_code(ch, xetex_mathcode, cval,fval, chval, (quarterword) (level));
+ return 0;
}
-static int setboxdp(lua_State * L)
+static int getmathcode(lua_State * L)
{
- int isglobal = 0;
+ mathcodeval mval = { 0, 0, 0, 0 };
+ int ch = (int) luaL_checkinteger(L, -1);
+ check_char_range(ch, "getmathcode", 65536*17);
+ mval = get_math_code(ch);
+ lua_newtable(L);
+ lua_pushnumber(L,mval.class_value);
+ lua_rawseti(L, -2, 1);
+ lua_pushnumber(L,mval.family_value);
+ lua_rawseti(L, -2, 2);
+ lua_pushnumber(L,mval.character_value);
+ lua_rawseti(L, -2, 3);
+ return 1;
+}
+
+
+
+static int setdelcode(lua_State * L)
+{
+ int ch;
+ halfword sfval, scval, lfval, lcval;
+ int level = cur_level;
int n = lua_gettop(L);
- if (n == 3 && lua_isstring(L, 1)) {
- const char *s = lua_tostring(L, 1);
- if (strcmp(s, "global") == 0)
- isglobal = 1;
+ int f = 1;
+ if (n>1 && lua_type(L,1) == LUA_TTABLE)
+ f++;
+ if (n>2 && lua_isstring(L, f)) {
+ const char *s = lua_tostring(L, f);
+ if (strcmp(s, "global") == 0) {
+ level = level_one;
+ f++;
+ }
}
- return vsetboxdim(L, depth_offset, isglobal);
+ if (n-f!=1 || lua_type(L,f+1) != LUA_TTABLE) {
+ luaL_error(L, "Bad arguments for tex.setdelcode()");
+ }
+ ch = (int) luaL_checkinteger(L, -2);
+ check_char_range(ch, "setdelcode", 65536*17);
+ lua_rawgeti(L, -1, 1);
+ sfval = (halfword) luaL_checkinteger(L, -1);
+ lua_rawgeti(L, -2, 2);
+ scval = (halfword) luaL_checkinteger(L, -1);
+ lua_rawgeti(L, -3, 3);
+ lfval = (halfword) luaL_checkinteger(L, -1);
+ lua_rawgeti(L, -4, 4);
+ lcval = (halfword) luaL_checkinteger(L, -1);
+ lua_pop(L,4);
+
+ check_char_range(sfval, "setdelcode", 256);
+ check_char_range(scval, "setdelcode", 65536*17);
+ check_char_range(lfval, "setdelcode", 256);
+ check_char_range(lcval, "setdelcode", 65536*17);
+ set_del_code(ch, xetex_mathcode, sfval, scval, lfval, lcval, (quarterword) (level));
+
+ return 0;
+}
+
+static int getdelcode(lua_State * L)
+{
+ delcodeval mval = { 0, 0, 0, 0, 0, 0 };
+ int ch = (int) luaL_checkinteger(L, -1);
+ check_char_range(ch, "getdelcode", 65536*17);
+ mval = get_del_code(ch);
+ /* lua_pushnumber(L, mval.class_value); */
+ /* lua_pushnumber(L, mval.origin_value); */
+ lua_newtable(L);
+ lua_pushnumber(L,mval.small_family_value);
+ lua_rawseti(L, -2, 1);
+ lua_pushnumber(L,mval.small_character_value);
+ lua_rawseti(L, -2, 2);
+ lua_pushnumber(L,mval.large_family_value);
+ lua_rawseti(L, -2, 3);
+ lua_pushnumber(L,mval.large_character_value);
+ lua_rawseti(L, -2, 4);
+ return 1;
}
+
+
static int settex(lua_State * L)
{
const char *st;
@@ -1052,6 +1221,11 @@ static int settex(lua_State * L)
lua_number2int(j, lua_tonumber(L, i));
}
assign_internal_value((isglobal ? 4 : 0), equiv(cur_cs), j);
+ } else if (is_glue_assign(cur_cmd)) {
+ halfword *j = check_isnode(L, i); /* the value */
+ { int a = isglobal;
+ define(equiv(cur_cs), assign_glue_cmd, *j);
+ }
} else if (is_toks_assign(cur_cmd)) {
if (lua_isstring(L, i)) {
j = tokenlist_from_lua(L); /* uses stack -1 */
@@ -1062,7 +1236,12 @@ static int settex(lua_State * L)
}
} else {
- luaL_error(L, "unsupported tex internal assignment");
+ /* people may want to add keys that are also primitives
+ (|tex.wd| for example) so creating an error is not
+ right here */
+ if (lua_istable(L, (i - 2)))
+ lua_rawset(L, (i - 2));
+ /* luaL_error(L, "unsupported tex internal assignment"); */
}
} else {
if (lua_istable(L, (i - 2)))
@@ -2018,10 +2197,10 @@ static int tex_run_linebreak(lua_State * L)
pdflastlinedepth, pdfignoreddimen, parshape;
int fewest_demerits = 0, actual_looseness = 0;
halfword clubpenalties, interlinepenalties, widowpenalties;
-
+ int save_vlink_tmp_head;
/* push a new nest level */
push_nest();
- /* save_vlink_cur_head = vlink(cur_list.head_field); */
+ save_vlink_tmp_head = vlink(temp_head);
j = check_isnode(L, 1); /* the value */
vlink(temp_head) = *j;
@@ -2139,6 +2318,7 @@ static int tex_run_linebreak(lua_State * L)
lua_settable(L, -3);
/* restore nest stack */
+ vlink(temp_head) = save_vlink_tmp_head;
pop_nest();
if (parshape != equiv(par_shape_loc))
flush_node(parshape);
@@ -2148,7 +2328,7 @@ static int tex_run_linebreak(lua_State * L)
static int tex_shipout(lua_State * L)
{
int boxnum = get_box_id(L, 1);
- ship_out(static_pdf, box(boxnum), true);
+ ship_out(static_pdf, box(boxnum), SHIPPING_PAGE);
box(boxnum) = null;
return 0;
}
@@ -2250,6 +2430,7 @@ static const struct luaL_reg texlib[] = {
{"write", luacwrite},
{"print", luacprint},
{"tprint", luactprint},
+ {"error", texerror},
{"sprint", luacsprint},
{"set", settex},
{"get", gettex},
@@ -2267,14 +2448,20 @@ static const struct luaL_reg texlib[] = {
{"getbox", getbox},
{"setlist", setlist},
{"getlist", getlist},
- {"setboxwd", setboxwd},
- {"getboxwd", getboxwd},
- {"setboxht", setboxht},
- {"getboxht", getboxht},
- {"setboxdp", setboxdp},
- {"getboxdp", getboxdp},
{"setnest", setnest},
{"getnest", getnest},
+ {"setcatcode", setcatcode},
+ {"getcatcode", getcatcode},
+ {"setdelcode", setdelcode},
+ {"getdelcode", getdelcode},
+ {"setlccode", setlccode},
+ {"getlccode", getlccode},
+ {"setmathcode", setmathcode},
+ {"getmathcode", getmathcode},
+ {"setsfcode", setsfcode},
+ {"getsfcode", getsfcode},
+ {"setuccode", setuccode},
+ {"getuccode", getuccode},
{"round", tex_roundnumber},
{"scale", tex_scaletable},
{"sp", tex_scaledimen},
@@ -2311,9 +2498,12 @@ int luaopen_tex(lua_State * L)
make_table(L, "count", "getcount", "setcount");
make_table(L, "toks", "gettoks", "settoks");
make_table(L, "box", "getbox", "setbox");
- make_table(L, "wd", "getboxwd", "setboxwd");
- make_table(L, "ht", "getboxht", "setboxht");
- make_table(L, "dp", "getboxdp", "setboxdp");
+ make_table(L, "sfcode", "getsfcode", "setsfcode");
+ make_table(L, "lccode", "getlccode", "setlccode");
+ make_table(L, "uccode", "getuccode", "setuccode");
+ make_table(L, "catcode", "getcatcode", "setcatcode");
+ make_table(L, "mathcode", "getmathcode", "setmathcode");
+ make_table(L, "delcode", "getdelcode", "setdelcode");
make_table(L, "lists", "getlist", "setlist");
make_table(L, "nest", "getnest", "setnest");
/* *INDENT-ON* */
diff --git a/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c b/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c
index 0f1c5332466..4f3913e0bc3 100644
--- a/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c
@@ -21,7 +21,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: ltokenlib.c 3404 2010-01-28 11:17:10Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/ltokenlib.c $";
+ "$Id: ltokenlib.c 3404 2010-01-28 11:17:10Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/ltokenlib.c $";
#define is_valid_token(L,i) (lua_istable(L,i) && lua_objlen(L,i)==3)
#define get_token_cmd(L,i) lua_rawgeti(L,i,1)
diff --git a/Build/source/texk/web2c/luatexdir/lua/luagen.w b/Build/source/texk/web2c/luatexdir/lua/luagen.w
index 69589ba04e0..f992a15b17e 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luagen.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luagen.w
@@ -20,7 +20,7 @@
@ @c
static const char _svn_version[] =
"$Id: luagen.w 3583 2010-04-02 17:40:44Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luagen.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luagen.w $";
#include "ptexlib.h"
#include "pdf/pdfpage.h"
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w
index 3efeb7a949c..aa63118624c 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w
@@ -28,7 +28,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: luainit.w 3621 2010-04-15 16:08:22Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luainit.w $";
+ "$Id: luainit.w 4114 2011-04-11 06:44:43Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luainit.w $";
@
TH: TODO
@@ -331,7 +331,7 @@ static void parse_options(int argc, char **argv)
"the terms of the GNU General Public License, version 2. For more\n"
"information about these matters, see the file named COPYING and\n"
"the LuaTeX source.\n\n"
- "Copyright 2009 Taco Hoekwater, the LuaTeX Team.\n");
+ "Copyright 2010 Taco Hoekwater, the LuaTeX Team.\n");
/* *INDENT-ON* */
uexit(0);
} else if (ARGUMENT_IS("credits")) {
@@ -350,7 +350,7 @@ static void parse_options(int argc, char **argv)
"lua by Roberto Ierusalimschy, Waldemar Celes,\n"
" Luiz Henrique de Figueiredo\n"
"metapost by John Hobby, Taco Hoekwater and friends.\n"
- "xpdf by Derek Noonburg (partial)\n"
+ "poppler by Derek Noonburg, Kristian Høgsberg (partial)\n"
"fontforge by George Williams (partial)\n\n"
"Some extensions to lua and additional lua libraries are used, as well as\n"
"libraries for graphic inclusion. More details can be found in the source.\n"
@@ -731,13 +731,13 @@ void lua_initialize(int ac, char **av)
argv = av;
if (luatex_svn < 0) {
- if (asprintf(&banner, "This is LuaTeX, Version %s-%d%s",
- luatex_version_string, luatex_date_info, WEB2CVERSION) < 0) {
+ if (asprintf(&banner, "This is LuaTeX, Version %s-%d",
+ luatex_version_string, luatex_date_info) < 0) {
exit(EXIT_FAILURE);
}
} else {
- if (asprintf(&banner, "This is LuaTeX, Version %s-%d%s (rev %d)",
- luatex_version_string, luatex_date_info, WEB2CVERSION, luatex_svn) < 0) {
+ if (asprintf(&banner, "This is LuaTeX, Version %s-%d (rev %d)",
+ luatex_version_string, luatex_date_info, luatex_svn) < 0) {
exit(EXIT_FAILURE);
}
}
@@ -816,7 +816,7 @@ void lua_initialize(int ac, char **av)
if (!dump_name) {
get_lua_string("texconfig", "formatname", &dump_name);
}
- if ((lua_only) || ((!input_name) && (!dump_name))) {
+ if (lua_only) {
if (given_file)
free(given_file);
/* this is not strictly needed but it pleases valgrind */
diff --git a/Build/source/texk/web2c/luatexdir/lua/luanode.w b/Build/source/texk/web2c/luatexdir/lua/luanode.w
index ce157f0767a..56f6cf734b2 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luanode.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luanode.w
@@ -23,8 +23,8 @@
static const char _svn_version[] =
- "$Id: luanode.w 3583 2010-04-02 17:40:44Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luanode.w $";
+ "$Id: luanode.w 4092 2011-03-16 14:53:39Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luanode.w $";
@ @c
static const char *group_code_names[] = {
@@ -60,10 +60,12 @@ const char *pack_type_name[] = { "exactly", "additional" };
void lua_node_filter_s(int filterid, const char *extrainfo)
{
lua_State *L = Luas;
- int s_top = lua_gettop(L);
int callback_id = callback_defined(filterid);
- if (callback_id <= 0)
+ int s_top = lua_gettop(L);
+ if (callback_id <= 0) {
+ lua_settop(L, s_top);
return;
+ }
if (!get_callback(L, callback_id)) {
lua_settop(L, s_top);
return;
@@ -87,19 +89,22 @@ lua_node_filter(int filterid, int xextrainfo, halfword head_node,
halfword ret;
int a;
lua_State *L = Luas;
+ int s_top = lua_gettop(L);
const char *extrainfo = group_code_names[xextrainfo];
int callback_id = callback_defined(filterid);
- if (head_node == null || vlink(head_node) == null || callback_id <= 0)
+ if (head_node == null || vlink(head_node) == null || callback_id <= 0) {
+ lua_settop(L, s_top);
return;
+ }
if (!get_callback(L, callback_id)) {
- lua_pop(L, 2);
+ lua_settop(L, s_top);
return;
}
nodelist_to_lua(L, vlink(head_node)); /* arg 1 */
lua_pushstring(L, extrainfo); /* arg 2 */
if (lua_pcall(L, 2, 1, 0) != 0) { /* no arg, 1 result */
fprintf(stdout, "error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
+ lua_settop(L, s_top);
error();
return;
}
@@ -110,7 +115,7 @@ lua_node_filter(int filterid, int xextrainfo, halfword head_node,
}
} else {
a = nodelist_from_lua(L);
- vlink(head_node) = a;
+ try_couple_nodes(head_node,a);
}
lua_pop(L, 2); /* result and callback container table */
if (fix_node_lists)
@@ -123,6 +128,7 @@ lua_node_filter(int filterid, int xextrainfo, halfword head_node,
} else {
*tail_node = head_node;
}
+ lua_settop(L, s_top);
return;
}
@@ -135,18 +141,21 @@ lua_linebreak_callback(int is_broken, halfword head_node, halfword * new_head)
register halfword *p;
int ret = 0; /* failure */
lua_State *L = Luas;
+ int s_top = lua_gettop(L);
int callback_id = callback_defined(linebreak_filter_callback);
- if (head_node == null || vlink(head_node) == null || callback_id <= 0)
+ if (head_node == null || vlink(head_node) == null || callback_id <= 0) {
+ lua_settop(L, s_top);
return ret;
+ }
if (!get_callback(L, callback_id)) {
- lua_pop(L, 2);
+ lua_settop(L, s_top);
return ret;
}
nodelist_to_lua(L, vlink(head_node)); /* arg 1 */
lua_pushboolean(L, is_broken); /* arg 2 */
if (lua_pcall(L, 2, 1, 0) != 0) { /* no arg, 1 result */
fprintf(stdout, "error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
+ lua_settop(L, s_top);
error();
return ret;
}
@@ -154,10 +163,10 @@ lua_linebreak_callback(int is_broken, halfword head_node, halfword * new_head)
p = lua_touserdata(L, -1);
if (p != NULL) {
a = nodelist_from_lua(L);
- vlink(*new_head) = a;
+ try_couple_nodes(*new_head,a);
ret = 1;
}
- lua_pop(L, 2); /* result and callback container table */
+ lua_settop(L, s_top);
return ret;
}
@@ -170,11 +179,14 @@ lua_hpack_filter(halfword head_node, scaled size, int pack_type, int extrainfo,
{
halfword ret;
lua_State *L = Luas;
+ int s_top = lua_gettop(L);
int callback_id = callback_defined(hpack_filter_callback);
- if (head_node == null || callback_id <= 0)
+ if (head_node == null || callback_id <= 0) {
+ lua_settop(L, s_top);
return head_node;
+ }
if (!get_callback(L, callback_id)) {
- lua_pop(L, 2);
+ lua_settop(L, s_top);
return head_node;
}
nodelist_to_lua(L, head_node);
@@ -187,7 +199,7 @@ lua_hpack_filter(halfword head_node, scaled size, int pack_type, int extrainfo,
lua_pushnil(L);
if (lua_pcall(L, 5, 1, 0) != 0) { /* no arg, 1 result */
fprintf(stdout, "error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
+ lua_settop(L, s_top);
error();
return head_node;
}
@@ -200,7 +212,7 @@ lua_hpack_filter(halfword head_node, scaled size, int pack_type, int extrainfo,
} else {
ret = nodelist_from_lua(L);
}
- lua_pop(L, 2); /* result and callback container table */
+ lua_settop(L, s_top);
#if 0
lua_gc(L,LUA_GCSTEP, LUA_GC_STEP_SIZE);
#endif
@@ -217,18 +229,22 @@ lua_vpack_filter(halfword head_node, scaled size, int pack_type, scaled maxd,
halfword ret;
int callback_id;
lua_State *L = Luas;
- if (head_node == null)
+ int s_top = lua_gettop(L);
+ if (head_node == null) {
+ lua_settop(L, s_top);
return head_node;
+ }
if (strcmp("output", group_code_names[extrainfo]) == 0) {
callback_id = callback_defined(pre_output_filter_callback);
} else {
callback_id = callback_defined(vpack_filter_callback);
}
if (callback_id <= 0) {
+ lua_settop(L, s_top);
return head_node;
}
if (!get_callback(L, callback_id)) {
- lua_pop(L, 2);
+ lua_settop(L, s_top);
return head_node;
}
nodelist_to_lua(L, head_node);
@@ -242,7 +258,7 @@ lua_vpack_filter(halfword head_node, scaled size, int pack_type, scaled maxd,
lua_pushnil(L);
if (lua_pcall(L, 6, 1, 0) != 0) { /* no arg, 1 result */
fprintf(stdout, "error: %s\n", lua_tostring(L, -1));
- lua_pop(L, 2);
+ lua_settop(L, s_top);
error();
return head_node;
}
@@ -255,7 +271,7 @@ lua_vpack_filter(halfword head_node, scaled size, int pack_type, scaled maxd,
} else {
ret = nodelist_from_lua(L);
}
- lua_pop(L, 2); /* result and callback container table */
+ lua_settop(L, s_top);
#if 0
lua_gc(L,LUA_GCSTEP, LUA_GC_STEP_SIZE);
#endif
@@ -297,13 +313,7 @@ void lua_pdf_literal(PDF pdf, int i)
size_t l = 0;
lua_rawgeti(Luas, LUA_REGISTRYINDEX, i);
s = lua_tolstring(Luas, -1, &l);
- if (l < max_single_pdf_print) {
- pdf_out_block(pdf, s, l);
- } else {
- while (l--) {
- pdf_out(pdf, *s++);
- }
- }
+ pdf_out_block(pdf, s, l);
pdf_out(pdf, 10); /* |pdf_print_nl| */
lua_pop(Luas, 1);
}
@@ -322,6 +332,20 @@ void copy_pdf_literal(pointer r, pointer p)
}
}
+void copy_late_lua(pointer r, pointer p)
+{
+ late_lua_type(r) = late_lua_type(p);
+ if (late_lua_name(p) > 0)
+ add_token_ref(late_lua_name(p));
+ if (late_lua_type(p) == normal) {
+ late_lua_data(r) = late_lua_data(p);
+ add_token_ref(late_lua_data(p));
+ } else {
+ lua_rawgeti(Luas, LUA_REGISTRYINDEX, late_lua_data(p));
+ late_lua_data(r) = luaL_ref(Luas, LUA_REGISTRYINDEX);
+ }
+}
+
@ @c
void free_pdf_literal(pointer p)
@@ -333,6 +357,17 @@ void free_pdf_literal(pointer p)
}
}
+void free_late_lua(pointer p)
+{
+ if (late_lua_name(p) > 0)
+ delete_token_ref(late_lua_name(p));
+ if (late_lua_type(p) == normal) {
+ delete_token_ref(late_lua_data(p));
+ } else {
+ luaL_unref(Luas, LUA_REGISTRYINDEX, late_lua_data(p));
+ }
+}
+
@ @c
void show_pdf_literal(pointer p)
{
@@ -354,7 +389,24 @@ void show_pdf_literal(pointer p)
print_mark(pdf_literal_data(p));
} else {
lua_rawgeti(Luas, LUA_REGISTRYINDEX, pdf_literal_data(p));
+ tprint("\"");
+ tprint(lua_tostring(Luas, -1));
+ tprint("\"");
+ lua_pop(Luas, 1);
+ }
+}
+
+void show_late_lua(pointer p)
+{
+ tprint_esc("latelua");
+ print_int(late_lua_reg(p));
+ if (late_lua_type(p) == normal) {
+ print_mark(late_lua_data(p));
+ } else {
+ lua_rawgeti(Luas, LUA_REGISTRYINDEX, late_lua_data(p));
+ tprint("\"");
tprint(lua_tostring(Luas, -1));
+ tprint("\"");
lua_pop(Luas, 1);
}
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/luastuff.w b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
index e8a3c5b9321..fdd38dbd798 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luastuff.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: luastuff.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luastuff.w $";
+ "$Id: luastuff.w 4001 2010-11-28 15:49:46Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luastuff.w $";
#include "lua/luatex-api.h"
#include "ptexlib.h"
@@ -189,6 +189,7 @@ void luainterpreter(void)
luatex_md5_lua_open(L);
open_oslibext(L, safer_option);
+ open_lfslibext(L);
/* luasockets */
/* socket and mime are a bit tricky to open because
@@ -344,24 +345,35 @@ int lua_traceback(lua_State * L)
}
@ @c
-static void luacall(int p, int nameptr)
+static void luacall(int p, int nameptr, boolean is_string)
{
LoadS ls;
- int i, l;
+ int i;
+ size_t ll = 0;
char *lua_id;
char *s = NULL;
if (Luas == NULL) {
luainterpreter();
}
- l = 0;
lua_active++;
- s = tokenlist_to_cstring(p, 1, &l);
+ if (is_string) {
+ const char *ss = NULL;
+ lua_rawgeti(Luas, LUA_REGISTRYINDEX, p);
+ ss = lua_tolstring(Luas, -1, &ll);
+ s = xmalloc(ll+1);
+ memcpy(s,ss,ll+1);
+ lua_pop(Luas,1);
+ } else {
+ int l = 0;
+ s = tokenlist_to_cstring(p, 1, &l);
+ ll = (size_t)l;
+ }
ls.s = s;
- ls.size = (size_t) l;
-
+ ls.size = ll;
if (ls.size > 0) {
if (nameptr > 0) {
+ int l = 0; /* not used */
lua_id = tokenlist_to_cstring(nameptr, 1, &l);
} else if (nameptr < 0) {
char *tmp = get_lua_name((nameptr + 65536));
@@ -390,6 +402,7 @@ static void luacall(int p, int nameptr)
}
}
xfree(lua_id);
+ xfree(ls.s);
}
lua_active--;
}
@@ -398,9 +411,13 @@ static void luacall(int p, int nameptr)
void late_lua(PDF pdf, halfword p)
{
(void) pdf;
- expand_macros_in_tokenlist(p); /* sets |def_ref| */
- luacall(def_ref, late_lua_name(p));
- flush_list(def_ref);
+ if (late_lua_type(p)==normal) {
+ expand_macros_in_tokenlist(p); /* sets |def_ref| */
+ luacall(def_ref, late_lua_name(p), false);
+ flush_list(def_ref);
+ } else {
+ luacall(late_lua_data(p), late_lua_name(p), true);
+ }
}
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/lua/luatex-api.h b/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
index e754a498d8d..e25f3ca8d40 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
+++ b/Build/source/texk/web2c/luatexdir/lua/luatex-api.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: luatex-api.h 3612 2010-04-13 09:29:42Z taco $ */
+/* $Id: luatex-api.h 4001 2010-11-28 15:49:46Z taco $ */
#ifndef LUATEX_API_H
# define LUATEX_API_H 1
@@ -30,7 +30,7 @@
# include "lua51/lualib.h"
typedef struct LoadS {
- const char *s;
+ char *s;
size_t size;
} LoadS;
@@ -75,6 +75,7 @@ extern int luaopen_epdf(lua_State * L);
extern int luaopen_mplib(lua_State * L);
extern void open_oslibext(lua_State * L, int safer_option);
+extern void open_lfslibext(lua_State * L);
extern void initfilecallbackids(int max);
extern void setinputfilecallbackid(int n, int i);
@@ -167,12 +168,10 @@ extern int program_name_set; /* in lkpselib.c */
extern char **argv;
extern int argc;
-
extern int loader_C_luatex(lua_State * L, const char *name,
const char *filename);
-extern int loader_Call_luatex (lua_State *L, const char *name,
- const char *filename);
-
+extern int loader_Call_luatex(lua_State * L, const char *name,
+ const char *filename);
extern void init_tex_table(lua_State * L);
@@ -198,6 +197,6 @@ extern char charsetstr[]; /* from mpdir/psout.w */
extern char **environ;
-extern int luac_main(int argc, char *argv[]); /* texluac.w */
+extern int luac_main(int argc, char *argv[]); /* texluac.w */
-#endif
+#endif /* LUATEX_API_H */
diff --git a/Build/source/texk/web2c/luatexdir/lua/luatoken.w b/Build/source/texk/web2c/luatexdir/lua/luatoken.w
index 7647eec5f9b..d41dd78db88 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luatoken.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luatoken.w
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: luatoken.w 3583 2010-04-02 17:40:44Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luatoken.w $";
+ "$Id: luatoken.w 3849 2010-09-01 09:10:48Z taco $ "
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luatoken.w $";
@ @c
command_item command_names[] = {
@@ -144,15 +144,6 @@ command_item command_names[] = {
{"set_interaction", set_interaction_cmd, NULL},
{"letterspace_font", letterspace_font_cmd, NULL},
{"pdf_copy_font", pdf_copy_font_cmd, NULL},
- {"set_ocp", set_ocp_cmd, NULL},
- {"def_ocp", def_ocp_cmd, NULL},
- {"set_ocp_list", set_ocp_list_cmd, NULL},
- {"def_ocp_list", def_ocp_list_cmd, NULL},
- {"clear_ocp_lists", clear_ocp_lists_cmd, NULL},
- {"push_ocp_list", push_ocp_list_cmd, NULL},
- {"pop_ocp_list", pop_ocp_list_cmd, NULL},
- {"ocp_list_op", ocp_list_op_cmd, NULL},
- {"ocp_trace_level", ocp_trace_level_cmd, NULL},
{"undefined_cs", undefined_cs_cmd, NULL},
{"expand_after", expand_after_cmd, NULL},
{"no_expand", no_expand_cmd, NULL},
diff --git a/Build/source/texk/web2c/luatexdir/lua/texluac.w b/Build/source/texk/web2c/luatexdir/lua/texluac.w
index 3bc7cc2069d..153ae7a8934 100644
--- a/Build/source/texk/web2c/luatexdir/lua/texluac.w
+++ b/Build/source/texk/web2c/luatexdir/lua/texluac.w
@@ -49,7 +49,7 @@
@ @c
static const char _svn_version[] =
- "$Id: texluac.w 3705 2010-05-28 07:19:20Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/texluac.w $";
+ "$Id: texluac.w 3707 2010-05-28 13:24:16Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/texluac.w $";
/* fix for non-gcc compilation: */
#if !defined(__GNUC__) || (__GNUC__ < 2)
diff --git a/Build/source/texk/web2c/luatexdir/lua51/lauxlib.c b/Build/source/texk/web2c/luatexdir/lua51/lauxlib.c
index 10f14e2c088..e294b407084 100644
--- a/Build/source/texk/web2c/luatexdir/lua51/lauxlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua51/lauxlib.c
@@ -562,6 +562,8 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
else {
lua_pushfstring(L, "@%s", filename);
lf.f = fopen(filename, "r");
+ if (lf.f != NULL)
+ recorder_record_input (filename);
if (lf.f == NULL) return errfile(L, "open", fnameindex);
}
c = getc(lf.f);
diff --git a/Build/source/texk/web2c/luatexdir/lua51/luaconf.h b/Build/source/texk/web2c/luatexdir/lua51/luaconf.h
index 413f12e23f3..fc89eae731e 100644
--- a/Build/source/texk/web2c/luatexdir/lua51/luaconf.h
+++ b/Build/source/texk/web2c/luatexdir/lua51/luaconf.h
@@ -11,7 +11,7 @@
#include <limits.h>
#include <stddef.h>
-#include <w2c/c-auto.h>
+#include <c-auto.h>
/*
** ==================================================================
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/Makefile b/Build/source/texk/web2c/luatexdir/luafilesystem/Makefile
index 10d9ca44c2c..6b54f2c779d 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/Makefile
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.34 2008/05/07 19:06:37 carregal Exp $
+# $Id: Makefile,v 1.36 2009/09/21 17:02:44 mascarenhas Exp $
T= lfs
@@ -12,7 +12,7 @@ OBJS= src/$T.o
lib: src/lfs.so
src/lfs.so: $(OBJS)
- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS)
+ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS)
install:
mkdir -p $(LUA_LIBDIR)
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/README b/Build/source/texk/web2c/luatexdir/luafilesystem/README
index 858ecb67bb0..0103efa6421 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/README
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/README
@@ -10,29 +10,57 @@ related to file systems offered by the standard Lua distribution.
LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.
LuaFileSystem is free software and uses the same license as Lua 5.1
-Version 1.4.1 [07/May/2008] changes:
+LuaRocks Installation
+---------------------
+luarocks install luafilesystem
+
+
+Documentation
+-------------
+Please check the documentation at doc/us/ for more information.
+
+History
+-------
+
+Version 1.5.0 [20/Oct/2009]
+ * added explicit next and close methods to second return value of lfs.dir (the directory object), for explicit iteration or explicit closing.
+ * added directory locking via lfs.lock_dir function (see the manual).
+
+Version 1.4.2 [03/Feb/2009]
+
+ * fixed bug [#13198] lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).
+ * fixed bug [#39794] Compile error on Solaris 10 (bug report and patch by Aaron B).
+ * fixed compilation problems with Borland C.
+
+Version 1.4.1 [07/May/2008]
+
* documentation review
* fixed Windows compilation issues
* fixed bug in the Windows tests (patch by Shmuel Zeigerman)
* fixed bug [#2185] lfs.attributes(filename, 'size') overflow on files > 2 Gb
-LuaRocks Installation
----------------------
-luarocks install luafilesystem
+Version 1.4.0 [13/Feb/2008]
-Unix Installation
------------------
-To install on Linux/OSX/BSD, please edit the config file and then call
+ * added function lfs.setmode (works only in Windows systems).
+ * lfs.attributes raises an error if attribute does not exist
-make
-make install
+Version 1.3.0 [26/Oct/2007]
-The last step may require root privileges.
+ * added function lfs.symlinkattributes (works only in non Windows systems).
-Windows Installation
---------------------
-To install on Windows, please copy lfs.dll to your package.cpath directory
+Version 1.2.1 [08/May/2007]
-Documentation
--------------
-Please check the documentation at /doc/us/ for more information.
+ * compatible only with Lua 5.1 (Lua 5.0 support was dropped)
+
+Version 1.2 [15/Mar/2006]
+
+ * added optional argument to lfs.attributes
+ * added function lfs.rmdir
+ * bug correction on lfs.dir
+
+Version 1.1 [30/May/2005]
+
+ * added function lfs.touch.
+
+Version 1.0 [21/Jan/2005]
+Version 1.0 Beta [10/Nov/2004]
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html
index 63b57915e9d..43edefc5a1b 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html
@@ -71,19 +71,32 @@ the underlying directory structure and file attributes.</p>
<h2><a name="status"></a>Status</h2>
-<p>Current version is 1.4.1. It was developed for Lua 5.1.</p>
+<p>Current version is 1.5.0. It was developed for Lua 5.1.</p>
<h2><a name="download"></a>Download</h2>
<p>LuaFileSystem source can be downloaded from its
-<a href="http://luaforge.net/projects/luafilesystem/files">Lua Forge</a>
-page. If you are using
-<a href="http://luabinaries.luaforge.net">LuaBinaries</a> 5.1.3 a Windows binary
-version of LuaFileSystem (compiled with Visual Studio 2005 Express) can be found at the same LuaForge page.</p>
+<a href="http://github.com/keplerproject/luafilesystem">Github</a>
+page.</p>
<h2><a name="history"></a>History</h2>
<dl class="history">
+ <dt><strong>Version 1.5.0</strong> [20/Oct/2009]</dt>
+ <li>Added explicit next and close methods to second return value of lfs.dir
+(the directory object), for explicit iteration or explicit closing.</li>
+ <li>Added directory locking via lfs.lock_dir function (see the <a href="manual.html">manual</a>).</li>
+ <dt><strong>Version 1.4.2</strong> [03/Feb/2009]</dt>
+ <dd>
+ <ul>
+ <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&amp;group_id=66&amp;aid=13198&amp;atid=356">#13198</a>]
+ lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).</li>
+ <li>fixed bug [<a href="http://luaforge.net/tracker/?group_id=66&amp;atid=356&amp;func=detail&amp;aid=39794">#39794</a>]
+ Compile error on Solaris 10 (bug report and patch by Aaron B).</li>
+ <li>fixed compilation problems with Borland C.</li>
+ </ul>
+ </dd>
+
<dt><strong>Version 1.4.1</strong> [07/May/2008]</dt>
<dd>
<ul>
@@ -153,7 +166,7 @@ version of LuaFileSystem (compiled with Visual Studio 2005 Express) can be found
<p>LuaFileSystem was designed by Roberto Ierusalimschy,
Andr&eacute; Carregal and Tom&aacute;s Guisasola as part of the
<a href="http://www.keplerproject.org">Kepler Project</a>,
-which holds its copyright.</p>
+which holds its copyright. LuaFileSystem is currently maintained by F&aacute;bio Mascarenhas.</p>
<h2><a name="contact"></a>Contact us</h2>
@@ -170,7 +183,7 @@ Comments are welcome!</p>
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: index.html,v 1.42 2008/05/07 19:06:37 carregal Exp $</small></p>
+ <p><small>$Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html
index efae2363359..1409c404b1a 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html
@@ -80,6 +80,9 @@ The file has some definitions like paths to the external libraries,
compiler options and the like.
</p>
+<p>On Windows, the C runtime used to compile LuaFileSystem must be the same
+runtime that Lua uses, or some LuaFileSystem functions will not work.</p>
+
<h2><a name="installation"></a>Installation</h2>
<p>The easiest way to install LuaFileSystem is to use LuaRocks:</p>
@@ -168,16 +171,27 @@ LuaFileSystem offers the following functions:
<code>path</code>.<br />
Returns <code>true</code> in case of success or <code>nil</code> plus an
error string.</dd>
+
+ <dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt>
+ <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not
+ exist and returns the lock. If the lock already exists checks it
+ it's stale, using the second parameter (default for the second
+ parameter is <code>INT_MAX</code>, which in practice means the lock will never
+ be stale. To free the the lock call <code>lock:free()</code>. <br/>
+ In case of any errors it returns nil and the error message. In
+ particular, if the lock exists and is not stale it returns the
+ "File exists" message.</dd>
<dt><a name="getcwd"></a><strong><code>lfs.currentdir ()</code></strong></dt>
<dd>Returns a string with the current working directory or <code>nil</code>
plus an error string.</dd>
- <dt><a name="dir"></a><strong><code>lfs.dir (path)</code></strong></dt>
+ <dt><a name="dir"></a><strong><code>iter, dir_obj = lfs.dir (path)</code></strong></dt>
<dd>
Lua iterator over the entries of a given directory.
- Each time the iterator is called it returns a directory entry's name as a string, or
- <code>nil</code> if there are no more entries.
+ Each time the iterator is called with <code>dir_obj</code> it returns a directory entry's name as a string, or
+ <code>nil</code> if there are no more entries. You can also iterate by calling <code>dir_obj:next()</code>, and
+ explicitly close the directory before the iteration finished with <code>dir_obj:close()</code>.
Raises an error if <code>path</code> is not a directory.
</dd>
@@ -248,7 +262,7 @@ LuaFileSystem offers the following functions:
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: manual.html,v 1.42 2008/03/24 18:17:59 carregal Exp $</small></p>
+ <p><small>$Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
index eed623dfad8..6e968b6d2e8 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
@@ -9,6 +9,7 @@
** lfs.currentdir ()
** lfs.dir (path)
** lfs.lock (fh, mode)
+** lfs.lock_dir (path)
** lfs.mkdir (path)
** lfs.rmdir (path)
** lfs.setmode (filepath, mode)
@@ -16,9 +17,17 @@
** lfs.touch (filepath [, atime [, mtime]])
** lfs.unlock (fh)
**
-** $Id: lfs.c,v 1.53 2008/05/07 19:06:37 carregal Exp $
+** $Id: lfs.c,v 1.61 2009/07/04 02:10:16 mascarenhas Exp $
*/
+#ifndef _WIN32
+#ifndef _AIX
+#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */
+#else
+#define _LARGE_FILES 1 /* AIX */
+#endif
+#endif
+
#define _LARGEFILE64_SOURCE
#include <errno.h>
@@ -30,11 +39,15 @@
#ifdef _WIN32
#include <direct.h>
+#include <windows.h>
#include <io.h>
#include <sys/locking.h>
-#include <sys/utime.h>
+#ifdef __BORLANDC__
+ #include <utime.h>
+#else
+ #include <sys/utime.h>
+#endif
#include <fcntl.h>
-#include <windows.h>
#else
#include <unistd.h>
#include <dirent.h>
@@ -73,24 +86,26 @@ typedef struct dir_data {
#endif
} dir_data;
+#define LOCK_METATABLE "lock metatable"
#ifdef _WIN32
-#define lfs_setmode(L,file,m) ((void)L, _setmode(_fileno(file), m))
-#define STAT_STRUCT struct _stati64
+ #ifdef __BORLANDC__
+ #define lfs_setmode(L,file,m) ((void)L, setmode(_fileno(file), m))
+ #define STAT_STRUCT struct stati64
+ #else
+ #define lfs_setmode(L,file,m) ((void)L, _setmode(_fileno(file), m))
+ #define STAT_STRUCT struct _stati64
+ #endif
#define STAT_FUNC _stati64
#else
+#define _O_TEXT 0
+#define _O_BINARY 0
#define lfs_setmode(L,file,m) ((void)((void)file,m), \
luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1)
-#ifdef HAVE_STAT64
-#define STAT_STRUCT struct stat64
-#define STAT_FUNC stat64
-#define LSTAT_FUNC lstat64
-#else
#define STAT_STRUCT struct stat
#define STAT_FUNC stat
#define LSTAT_FUNC lstat
#endif
-#endif
/*
** This function changes the working (current) directory
@@ -113,9 +128,13 @@ static int change_dir (lua_State *L) {
** If unable to get the current directory, it returns nil
** and a string describing the error
*/
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
static int get_dir (lua_State *L) {
- char path[500];
- if (getcwd((char *)path, 500) == NULL) {
+ char path[PATH_MAX];
+ if (getcwd((char *)path, PATH_MAX) == NULL) {
lua_pushnil(L);
lua_pushstring(L, getcwd_error);
return 2;
@@ -171,7 +190,11 @@ static int _file_lock (lua_State *L, FILE *fh, const char *mode, const long star
len = ftell (fh);
}
fseek (fh, start, SEEK_SET);
+#ifdef __BORLANDC__
+ code = locking (fileno(fh), lkmode, len);
+#else
code = _locking (fileno(fh), lkmode, len);
+#endif
#else
struct flock f;
switch (*mode) {
@@ -189,6 +212,79 @@ static int _file_lock (lua_State *L, FILE *fh, const char *mode, const long star
}
#ifdef _WIN32
+typedef struct lfs_Lock {
+ HANDLE fd;
+} lfs_Lock;
+static int lfs_lock_dir(lua_State *L) {
+ size_t pathl; HANDLE fd;
+ lfs_Lock *lock;
+ char *ln;
+ const char *lockfile = "/lockfile.lfs";
+ const char *path = luaL_checklstring(L, 1, &pathl);
+ ln = (char*)malloc(pathl + strlen(lockfile) + 1);
+ if(!ln) {
+ lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2;
+ }
+ strcpy(ln, path); strcat(ln, lockfile);
+ if((fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_NEW,
+ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL)) == INVALID_HANDLE_VALUE) {
+ int en = GetLastError();
+ free(ln); lua_pushnil(L);
+ if(en == ERROR_FILE_EXISTS || en == ERROR_SHARING_VIOLATION)
+ lua_pushstring(L, "File exists");
+ else
+ lua_pushstring(L, strerror(en));
+ return 2;
+ }
+ free(ln);
+ lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock));
+ lock->fd = fd;
+ luaL_getmetatable (L, LOCK_METATABLE);
+ lua_setmetatable (L, -2);
+ return 1;
+}
+static int lfs_unlock_dir(lua_State *L) {
+ lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE);
+ CloseHandle(lock->fd);
+ return 0;
+}
+#else
+typedef struct lfs_Lock {
+ char *ln;
+} lfs_Lock;
+static int lfs_lock_dir(lua_State *L) {
+ lfs_Lock *lock;
+ size_t pathl;
+ char *ln;
+ const char *lockfile = "/lockfile.lfs";
+ const char *path = luaL_checklstring(L, 1, &pathl);
+ lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock));
+ ln = (char*)malloc(pathl + strlen(lockfile) + 1);
+ if(!ln) {
+ lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2;
+ }
+ strcpy(ln, path); strcat(ln, lockfile);
+ if(symlink("lock", ln) == -1) {
+ free(ln); lua_pushnil(L);
+ lua_pushstring(L, strerror(errno)); return 2;
+ }
+ lock->ln = ln;
+ luaL_getmetatable (L, LOCK_METATABLE);
+ lua_setmetatable (L, -2);
+ return 1;
+}
+static int lfs_unlock_dir(lua_State *L) {
+ lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE);
+ if(lock->ln) {
+ unlink(lock->ln);
+ free(lock->ln);
+ lock->ln = NULL;
+ }
+ return 0;
+}
+#endif
+
+#ifdef _WIN32
static int lfs_g_setmode (lua_State *L, FILE *f, int arg) {
static const int mode[] = {_O_TEXT, _O_BINARY};
static const char *const modenames[] = {"text", "binary", NULL};
@@ -319,7 +415,7 @@ static int dir_iter (lua_State *L) {
#else
struct dirent *entry;
#endif
- dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1));
+ dir_data *d = (dir_data *)luaL_checkudata (L, 1, DIR_METATABLE);
luaL_argcheck (L, !d->closed, 1, "closed directory");
#ifdef _WIN32
if (d->hFile == 0L) { /* first entry */
@@ -381,7 +477,9 @@ static int dir_close (lua_State *L) {
*/
static int dir_iter_factory (lua_State *L) {
const char *path = luaL_checkstring (L, 1);
- dir_data *d = (dir_data *) lua_newuserdata (L, sizeof(dir_data));
+ dir_data *d;
+ lua_pushcfunction (L, dir_iter);
+ d = (dir_data *) lua_newuserdata (L, sizeof(dir_data));
d->closed = 0;
#ifdef _WIN32
d->hFile = 0L;
@@ -398,8 +496,7 @@ static int dir_iter_factory (lua_State *L) {
if (d->dir == NULL)
luaL_error (L, "cannot open %s: %s", path, strerror (errno));
#endif
- lua_pushcclosure (L, dir_iter, 1);
- return 1;
+ return 2;
}
@@ -409,10 +506,33 @@ static int dir_iter_factory (lua_State *L) {
static int dir_create_meta (lua_State *L) {
luaL_newmetatable (L, DIR_METATABLE);
/* set its __gc field */
+ lua_pushstring (L, "__index");
+ lua_newtable(L);
+ lua_pushstring (L, "next");
+ lua_pushcfunction (L, dir_iter);
+ lua_settable(L, -3);
+ lua_pushstring (L, "close");
+ lua_pushcfunction (L, dir_close);
+ lua_settable(L, -3);
+ lua_settable (L, -3);
lua_pushstring (L, "__gc");
lua_pushcfunction (L, dir_close);
lua_settable (L, -3);
+ return 1;
+}
+/*
+** Creates lock metatable.
+*/
+static int lock_create_meta (lua_State *L) {
+ luaL_newmetatable (L, LOCK_METATABLE);
+ /* set its __gc field */
+ lua_newtable(L);
+ lua_pushcfunction(L, lfs_unlock_dir);
+ lua_setfield(L, -2, "free");
+ lua_setfield(L, -2, "__index");
+ lua_pushcfunction(L, lfs_unlock_dir);
+ lua_setfield(L, -2, "__gc");
return 1;
}
@@ -466,36 +586,6 @@ static const char *mode2string (mode_t mode) {
return "other";
}
- /*
-** Convert the inode protection mode to a permission list.
-*/
-
-#ifdef _WIN32
-static const char *perm2string (unsigned short mode) {
- static char perms[10] = "---------\0";
- if (mode & _S_IREAD)
- { perms[0] = 'r'; perms[3] = 'r'; perms[6] = 'r'; }
- if (mode & _S_IWRITE)
- { perms[1] = 'w'; perms[4] = 'w'; perms[7] = 'w'; }
- if (mode & _S_IEXEC)
- { perms[2] = 'x'; perms[5] = 'x'; perms[8] = 'x'; }
- return perms;
-}
-#else
-static const char *perm2string (mode_t mode) {
- static char perms[10] = "---------\0";
- if (mode & S_IRUSR) perms[0] = 'r';
- if (mode & S_IWUSR) perms[1] = 'w';
- if (mode & S_IXUSR) perms[2] = 'x';
- if (mode & S_IRGRP) perms[3] = 'r';
- if (mode & S_IWGRP) perms[4] = 'w';
- if (mode & S_IXGRP) perms[5] = 'x';
- if (mode & S_IROTH) perms[6] = 'r';
- if (mode & S_IWOTH) perms[7] = 'w';
- if (mode & S_IXOTH) perms[8] = 'x';
- return perms;
-}
-#endif
/*
** Set access time and modification values for file
@@ -565,10 +655,6 @@ static void push_st_ctime (lua_State *L, STAT_STRUCT *info) {
static void push_st_size (lua_State *L, STAT_STRUCT *info) {
lua_pushnumber (L, (lua_Number)info->st_size);
}
-/* permssions string */
-static void push_st_perm (lua_State *L, STAT_STRUCT *info) {
- lua_pushstring (L, perm2string (info->st_mode));
-}
#ifndef _WIN32
/* blocks allocated for file */
static void push_st_blocks (lua_State *L, STAT_STRUCT *info) {
@@ -586,6 +672,46 @@ static void push_invalid (lua_State *L, STAT_STRUCT *info) {
#endif
}
+ /*
+** Convert the inode protection mode to a permission list.
+*/
+
+#ifdef _WIN32
+static const char *perm2string (unsigned short mode) {
+ static char perms[10] = "---------\0";
+ int i;
+ for (i=0;i<9;i++) perms[i]='-';
+ if (mode & _S_IREAD)
+ { perms[0] = 'r'; perms[3] = 'r'; perms[6] = 'r'; }
+ if (mode & _S_IWRITE)
+ { perms[1] = 'w'; perms[4] = 'w'; perms[7] = 'w'; }
+ if (mode & _S_IEXEC)
+ { perms[2] = 'x'; perms[5] = 'x'; perms[8] = 'x'; }
+ return perms;
+}
+#else
+static const char *perm2string (mode_t mode) {
+ static char perms[10] = "---------\0";
+ int i;
+ for (i=0;i<9;i++) perms[i]='-';
+ if (mode & S_IRUSR) perms[0] = 'r';
+ if (mode & S_IWUSR) perms[1] = 'w';
+ if (mode & S_IXUSR) perms[2] = 'x';
+ if (mode & S_IRGRP) perms[3] = 'r';
+ if (mode & S_IWGRP) perms[4] = 'w';
+ if (mode & S_IXGRP) perms[5] = 'x';
+ if (mode & S_IROTH) perms[6] = 'r';
+ if (mode & S_IWOTH) perms[7] = 'w';
+ if (mode & S_IXOTH) perms[8] = 'x';
+ return perms;
+}
+#endif
+
+/* permssions string */
+static void push_st_perm (lua_State *L, STAT_STRUCT *info) {
+ lua_pushstring (L, perm2string (info->st_mode));
+}
+
typedef void (*_push_function) (lua_State *L, STAT_STRUCT *info);
struct _stat_members {
@@ -595,7 +721,6 @@ struct _stat_members {
struct _stat_members members[] = {
{ "mode", push_st_mode },
- { "permissions", push_st_perm },
{ "dev", push_st_dev },
{ "ino", push_st_ino },
{ "nlink", push_st_nlink },
@@ -606,6 +731,7 @@ struct _stat_members members[] = {
{ "modification", push_st_mtime },
{ "change", push_st_ctime },
{ "size", push_st_size },
+ { "permissions", push_st_perm },
#ifndef _WIN32
{ "blocks", push_st_blocks },
{ "blksize", push_st_blksize },
@@ -653,28 +779,6 @@ static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) {
return 1;
}
-#ifndef WIN32
-static int pusherror(lua_State *L, const char *info)
-{
- lua_pushnil(L);
- if (info==NULL)
- lua_pushstring(L, strerror(errno));
- else
- lua_pushfstring(L, "%s: %s", info, strerror(errno));
- lua_pushinteger(L, errno);
- return 3;
-}
-
-static int Preadlink(lua_State *L) /** readlink(path) */
-{
- char b[PATH_MAX];
- const char *path = luaL_checkstring(L, 1);
- int n = readlink(path, b, sizeof(b));
- if (n==-1) return pusherror(L, path);
- lua_pushlstring(L, b, n);
- return 1;
-}
-#endif
/*
** Get file information using stat.
@@ -683,6 +787,7 @@ static int file_info (lua_State *L) {
return _file_info_ (L, STAT_FUNC);
}
+
/*
** Get symbolic link information using lstat.
*/
@@ -690,106 +795,33 @@ static int file_info (lua_State *L) {
static int link_info (lua_State *L) {
return _file_info_ (L, LSTAT_FUNC);
}
-static int read_link (lua_State *L) {
- return Preadlink (L);
-}
-static int get_short_name (lua_State *L) {
- /* simply do nothing */
- return 1;
-}
#else
static int link_info (lua_State *L) {
lua_pushboolean(L, 0);
lua_pushliteral(L, "symlinkattributes not supported on this platform");
return 2;
}
-static int read_link (lua_State *L) {
- lua_pushboolean(L, 0);
- lua_pushliteral(L, "readlink not supported on this platform");
- return 2;
-}
-static int get_short_name (lua_State *L) {
- long length = 0;
- TCHAR* buffer = NULL;
- const char *lpszPath = luaL_checkstring (L, 1);
- length = GetShortPathName(lpszPath, NULL, 0);
- if (length == 0) {
- lua_pushnil(L);
- lua_pushfstring(L, "operating system error: %d", (int)GetLastError());
- return 2;
- }
- buffer = (TCHAR *)xmalloc(length * sizeof(TCHAR));
- length = GetShortPathName(lpszPath, buffer, length);
- if (length == 0) {
- lua_pushnil(L);
- lua_pushfstring(L, "operating system error: %d", (int)GetLastError());
- return 2;
- }
- lua_pushlstring(L, (const char *)buffer, (size_t)length);
- return 1;
-}
#endif
-
-/*
-** Get file information
-*/
-static int file_is_directory (lua_State *L) {
- struct stat info;
- const char *file = luaL_checkstring (L, 1);
-
- if (stat(file, &info)) {
- lua_pushnil (L);
- lua_pushfstring (L, "cannot obtain information from file `%s'", file);
- return 2;
- }
- if ( S_ISDIR(info.st_mode) )
- lua_pushboolean (L, 1);
- else
- lua_pushboolean (L, 0);
-
- return 1;
-}
-
-static int file_is_file (lua_State *L) {
- struct stat info;
- const char *file = luaL_checkstring (L, 1);
-
- if (stat(file, &info)) {
- lua_pushnil (L);
- lua_pushfstring (L, "cannot obtain information from file `%s'", file);
- return 2;
- }
- if ( S_ISREG(info.st_mode) )
- lua_pushboolean (L, 1);
- else
- lua_pushboolean (L, 0);
-
- return 1;
-}
-
-
/*
** Assumes the table is on top of the stack.
*/
static void set_info (lua_State *L) {
lua_pushliteral (L, "_COPYRIGHT");
- lua_pushliteral (L, "Copyright (C) 2003 Kepler Project");
+ lua_pushliteral (L, "Copyright (C) 2003-2009 Kepler Project");
lua_settable (L, -3);
lua_pushliteral (L, "_DESCRIPTION");
lua_pushliteral (L, "LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution");
lua_settable (L, -3);
lua_pushliteral (L, "_VERSION");
- lua_pushliteral (L, "LuaFileSystem 1.4.1");
+ lua_pushliteral (L, "LuaFileSystem 1.5.0");
lua_settable (L, -3);
}
static const struct luaL_reg fslib[] = {
{"attributes", file_info},
- {"isdir", file_is_directory },
- {"isfile", file_is_file },
{"chdir", change_dir},
{"currentdir", get_dir},
{"dir", dir_iter_factory},
@@ -797,16 +829,16 @@ static const struct luaL_reg fslib[] = {
{"mkdir", make_dir},
{"rmdir", remove_dir},
{"symlinkattributes", link_info},
- {"readlink", read_link},
- {"shortname", get_short_name},
{"setmode", lfs_f_setmode},
{"touch", file_utime},
{"unlock", file_unlock},
+ {"lock_dir", lfs_lock_dir},
{NULL, NULL},
};
int luaopen_lfs (lua_State *L) {
dir_create_meta (L);
+ lock_create_meta (L);
luaL_register (L, "lfs", fslib);
set_info (L);
return 1;
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.def b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.def
index 978ee6e60f9..f79cd298b31 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.def
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.def
@@ -1,5 +1,5 @@
LIBRARY lfs.dll
DESCRIPTION "LuaFileSystem"
-VERSION 1.4.1
+VERSION 1.4.2
EXPORTS
luaopen_lfs
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/tests/test.lua b/Build/source/texk/web2c/luatexdir/luafilesystem/tests/test.lua
index 1fd6157a7b9..71110749c06 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/tests/test.lua
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/tests/test.lua
@@ -110,4 +110,21 @@ for i = 1, 4000 do
count = count + 1
end
end
+
+-- Stressing directory iterator, explicit version
+count = 0
+for i = 1, 4000 do
+ local iter, dir = lfs.dir(tmp)
+ local file = dir:next()
+ while file do
+ count = count + 1
+ file = dir:next()
+ end
+ assert(not pcall(dir.next, dir))
+end
+
+-- directory explicit close
+local iter, dir = lfs.dir(tmp)
+dir:close()
+assert(not pcall(dir.next, dir))
print"Ok!"
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/nouiutil.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/nouiutil.c
index 3eb886c352f..c2298dcf43f 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/nouiutil.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/nouiutil.c
@@ -46,7 +46,7 @@ static void NOUI__LogError(const char *format,va_list ap) {
fprintf(stderr,"%s",str);
if ( str[strlen(str)-1]!='\n' )
putc('\n',stderr);
- free(str);
+/* free(str);*/
}
static void NOUI_LogError(const char *format,...) {
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
index dc51b328e3d..7b82ce775fc 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
@@ -5005,7 +5005,7 @@ return;
} else {
if ( dounicode )
info->chars[startglyph+i-start]->unicodeenc = i;
- if ( map!=NULL && i < map->enccount )
+ if ( map!=NULL && i < map->enccount && i>=0)
map->map[i] = startglyph+i-start;
}
}
@@ -5263,7 +5263,7 @@ static void readttfpostnames(FILE *ttf,struct ttfinfo *info) {
free(info->chars[i]->name); /* If it's a null string get rid of it */
if ( i==0 )
name = ".notdef";
- else if ( info->chars[i]->unicodeenc==-1 ) {
+ else if ( info->chars[i]->unicodeenc<0 ) {
/* Do this later */;
name = NULL;
} else {
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
index 1c01d821d8c..ce91a44571e 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettfatt.c
@@ -4954,13 +4954,14 @@ static void ttf_math_read_icta(FILE *ttf,struct ttfinfo *info, uint32 start, int
if ( glyphs==NULL )
return;
fseek(ttf,start+4,SEEK_SET);
- for ( i=0; i<cnt; ++i ) if ( glyphs[i]<info->glyph_cnt && info->chars[ glyphs[i]]!=NULL ) {
- val = (int16) getushort(ttf);
+ for ( i=0; i<cnt; ++i ) {
+ val = (int16) getushort(ttf);
+ offset = getushort(ttf);
+ if ( glyphs[i]<info->glyph_cnt && info->chars[ glyphs[i]]!=NULL ) {
if ( is_ic )
info->chars[ glyphs[i] ]->italic_correction = val;
else
info->chars[ glyphs[i] ]->top_accent_horiz = val;
- offset = getushort(ttf);
#ifdef FONTFORGE_CONFIG_DEVICETABLES
if ( offset!=0 ) {
DeviceTable *dv = chunkalloc(sizeof(DeviceTable));
@@ -4971,6 +4972,7 @@ return;
info->chars[ glyphs[i] ]->top_accent_adjusts = dv;
}
#endif
+ }
}
free(glyphs);
}
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c b/Build/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c
index ffce23e0958..1a1e499bf1b 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c
@@ -28,14 +28,14 @@
#include <ustring.h>
static const char _svn_version[] =
- "$Id: ffdummies.c 3706 2010-05-28 07:21:15Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c $";
+ "$Id: ffdummies.c 3738 2010-07-13 10:28:24Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luafontloader/src/ffdummies.c $";
/* fix for non-gcc compilation: */
#if !defined(__GNUC__) || (__GNUC__ < 2)
-# define __attribute__(x)
-#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
+# define __attribute__(x)
+#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
char **gww_errors = NULL;
int gww_error_count = 0;
@@ -62,7 +62,7 @@ static void LUAUI_IError(const char *format, ...)
l = strlen("Internal Error: ");
snprintf(buffer, sizeof(buffer), "Internal Error: ");
va_start(ap, format);
- vsnprintf(buffer+l, sizeof(buffer)-l, format, ap);
+ vsnprintf(buffer + l, sizeof(buffer) - l, format, ap);
va_end(ap);
str = xstrdup((char *) buffer);
gww_errors = realloc(gww_errors, (gww_error_count + 2) * sizeof(char *));
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
index 726fb0d5659..a3b9d1748c7 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
@@ -1,6 +1,6 @@
/* luafflib.c
- Copyright 2007-2009 Taco Hoekwater <taco@luatex.org>
+ Copyright 2007-2010 Taco Hoekwater <taco@luatex.org>
This file is part of LuaTeX.
@@ -30,10 +30,11 @@
#include "pfaedit.h"
#include "ustring.h"
+#include "lib/lib.h" /* web2c's lib, for recorder_record_input */
static const char _svn_version[] =
- "$Id: luafflib.c 3736 2010-07-12 15:42:56Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c $";
+ "$Id: luafflib.c 4094 2011-03-28 12:24:59Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c $";
extern char **gww_errors;
extern int gww_error_count;
@@ -43,6 +44,9 @@ extern struct ui_interface luaui_interface;
extern int readbinfile(FILE * f, unsigned char **b, int *s);
#define FONT_METATABLE "fontloader.splinefont"
+#define FONT_SUBFONT_METATABLE "fontloader.splinefont.subfont"
+#define FONT_GLYPHS_METATABLE "fontloader.splinefont.glyphs"
+#define FONT_GLYPH_METATABLE "fontloader.splinefont.glyph"
#define LUA_OTF_VERSION "0.3"
@@ -140,6 +144,7 @@ static char *uni_interp_enum[9] = {
};
#define check_isfont(L,b) (SplineFont **)luaL_checkudata(L,b,FONT_METATABLE)
+#define check_isglyph(L,b) (struct splinechar **)luaL_checkudata(L,b,FONT_GLYPH_METATABLE)
void handle_generic_pst(lua_State * L, struct generic_pst *pst); /* forward */
void handle_generic_fpst(lua_State * L, struct generic_fpst *fpst); /* forward */
@@ -147,6 +152,28 @@ void handle_generic_asm(lua_State * L, struct generic_asm *sm);
void handle_kernclass(lua_State * L, struct kernclass *kerns);
void handle_anchorclass(lua_State * L, struct anchorclass *anchor);
void handle_splinefont(lua_State * L, struct splinefont *sf);
+void handle_kernpair(lua_State * L, struct kernpair *kp);
+void handle_splinecharlist(lua_State * L, struct splinecharlist *scl);
+void handle_liglist(lua_State * L, struct liglist *ligofme);
+void handle_anchorpoint(lua_State * L, struct anchorpoint *anchor);
+void handle_glyphvariants(lua_State * L, struct glyphvariants *vars);
+void handle_mathkern(lua_State * L, struct mathkern *mk);
+int handle_altuni(lua_State * L, struct altuni *au);
+
+int is_userdata(lua_State *L, int b, char *utype)
+{
+ if (lua_type(L,b) == LUA_TUSERDATA) {
+ lua_getmetatable(L, b);
+ luaL_getmetatable(L, utype);
+ if (lua_equal(L, -2, -1)) {
+ lua_pop(L,2);
+ return 1;
+ }
+ lua_pop(L,2);
+ }
+ return 0;
+}
+
void lua_ff_pushfont(lua_State * L, SplineFont * sf)
@@ -163,6 +190,34 @@ void lua_ff_pushfont(lua_State * L, SplineFont * sf)
return;
}
+void lua_ff_pushsubfont(lua_State * L, SplineFont * sf)
+{
+ SplineFont **a;
+ if (sf == NULL) {
+ lua_pushnil(L);
+ } else {
+ a = lua_newuserdata(L, sizeof(SplineFont *));
+ *a = sf;
+ luaL_getmetatable(L, FONT_SUBFONT_METATABLE);
+ lua_setmetatable(L, -2);
+ }
+ return;
+}
+
+void lua_ff_pushglyph(lua_State * L, struct splinechar *sc)
+{
+ struct splinechar **a;
+ if (sc == NULL) {
+ lua_pushnil(L);
+ } else {
+ a = lua_newuserdata(L, sizeof(struct splinechar *));
+ *a = sc;
+ luaL_getmetatable(L, FONT_GLYPH_METATABLE);
+ lua_setmetatable(L, -2);
+ }
+ return;
+}
+
static int ff_open(lua_State * L)
{
@@ -172,10 +227,11 @@ static int ff_open(lua_State * L)
char s[511];
size_t len;
int args, i;
- int openflags = 1;
+ int openflags = 1 + 4;
fontname = luaL_checkstring(L, 1);
/* test fontname for existance */
if ((l = fopen(fontname, "r"))) {
+ recorder_record_input(fontname);
fclose(l);
} else {
lua_pushnil(L);
@@ -237,7 +293,7 @@ static int ff_close(lua_State * L)
/*fputs("ff_close called",stderr); */
sf = check_isfont(L, 1);
if (*sf != NULL) {
- if ((*sf)->fv) { // condition might be improved
+ if ((*sf)->fv) { // condition might be improved
FontViewClose((*sf)->fv);
} else {
EncMapFree((*sf)->map);
@@ -248,6 +304,22 @@ static int ff_close(lua_State * L)
return 0;
}
+static int notdef_loc(SplineFont * sf)
+{
+ int k;
+ int l = -1;
+ for (k = 0; k < sf->glyphcnt; k++) {
+ if (sf->glyphs[k]) {
+ if (strcmp(sf->glyphs[k]->name, ".notdef") == 0) {
+ l = k;
+ }
+ }
+ }
+ if (l == -1)
+ l = sf->glyphcnt;
+ return l;
+}
+
static int ff_apply_featurefile(lua_State * L)
{
SplineFont **sf;
@@ -255,7 +327,18 @@ static int ff_apply_featurefile(lua_State * L)
sf = check_isfont(L, 1);
fname = (char *) luaL_checkstring(L, 2);
SFApplyFeatureFilename(*sf, fname);
- return 0;
+ if (gww_error_count > 0) {
+ int i;
+ lua_newtable(L);
+ for (i = 0; i < gww_error_count; i++) {
+ lua_pushstring(L, gww_errors[i]);
+ lua_rawseti(L, -2, (i + 1));
+ }
+ gwwv_errors_free();
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
}
static int ff_apply_afmfile(lua_State * L)
@@ -265,8 +348,18 @@ static int ff_apply_afmfile(lua_State * L)
sf = check_isfont(L, 1);
fname = (char *) luaL_checkstring(L, 2);
CheckAfmOfPostscript(*sf, fname, (*sf)->map);
-
- return 0;
+ if (gww_error_count > 0) {
+ int i;
+ lua_newtable(L);
+ for (i = 0; i < gww_error_count; i++) {
+ lua_pushstring(L, gww_errors[i]);
+ lua_rawseti(L, -2, (i + 1));
+ }
+ gwwv_errors_free();
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
}
@@ -279,6 +372,14 @@ static void dump_intfield(lua_State * L, char *name, long int field)
lua_rawset(L, -3);
}
+static void dump_uintfield(lua_State * L, char *name, unsigned int field)
+{
+ lua_checkstack(L, 2);
+ lua_pushstring(L, name);
+ lua_pushnumber(L, field);
+ lua_rawset(L, -3);
+}
+
static void dump_realfield(lua_State * L, char *name, real field)
{
lua_checkstack(L, 2);
@@ -629,20 +730,25 @@ void handle_splinecharlist(lua_State * L, struct splinecharlist *scl)
/* variant shape. The specifics depend on the selector and script */
/* fid is currently unused, but may, someday, be used to do ttcs */
/* NOTE: GlyphInfo displays vs==-1 as vs==0, and fixes things up */
-void handle_altuni(lua_State * L, struct altuni *au)
+int handle_altuni(lua_State * L, struct altuni *au)
{
struct altuni *next = au;
+ int i = 0;
int k = 1;
lua_checkstack(L, 3);
while (next != NULL) {
- lua_newtable(L);
- dump_intfield(L, "unicode", next->unienc);
- if (next->vs != -1)
- dump_intfield(L, "variant", next->vs);
- /* dump_intfield(L, "fid", next->fid); */
- lua_rawseti(L, -2, k++);
+ if (next->unienc<0x10FFF) {
+ lua_newtable(L);
+ dump_intfield(L, "unicode", next->unienc);
+ i++;
+ if (next->vs != -1)
+ dump_intfield(L, "variant", next->vs);
+ /* dump_intfield(L, "fid", next->fid); */
+ lua_rawseti(L, -2, k++);
+ }
next = next->next;
}
+ return i;
}
@@ -770,6 +876,7 @@ void do_handle_liglist(lua_State * L, struct liglist *ligofme)
dump_intfield(L, "ccnt", ligofme->ccnt);
}
+
void handle_liglist(lua_State * L, struct liglist *ligofme)
{
struct liglist *next;
@@ -835,6 +942,7 @@ void do_handle_anchorpoint(lua_State * L, struct anchorpoint *anchor)
lua_pop(L, 1);
}
+
void handle_anchorpoint(lua_State * L, struct anchorpoint *anchor)
{
struct anchorpoint *next;
@@ -1015,9 +1123,14 @@ void handle_splinechar(lua_State * L, struct splinechar *glyph, int hasvmetrics)
}
if (glyph->altuni != NULL) {
+ int i;
lua_newtable(L);
- handle_altuni(L, glyph->altuni);
- lua_setfield(L, -2, "altuni");
+ i = handle_altuni(L, glyph->altuni);
+ if (i>0) {
+ lua_setfield(L, -2, "altuni");
+ } else {
+ lua_pop(L,1);
+ }
}
if (glyph->tex_height != TEX_UNDEF)
@@ -1148,16 +1261,31 @@ void handle_pfminfo(lua_State * L, struct pfminfo pfm)
dump_intfield(L, "firstchar", pfm.firstchar);
dump_intfield(L, "lastchar", pfm.lastchar);
lua_createtable(L, 0, 10);
- dump_enumfield(L, "familytype", fix_range(panose_values_0_max, pfm.panose[0]), panose_values_0);
- dump_enumfield(L, "serifstyle", fix_range(panose_values_1_max, pfm.panose[1]), panose_values_1);
- dump_enumfield(L, "weight", fix_range(panose_values_2_max, pfm.panose[2]), panose_values_2);
- dump_enumfield(L, "proportion", fix_range(panose_values_3_max, pfm.panose[3]), panose_values_3);
- dump_enumfield(L, "contrast", fix_range(panose_values_4_max, pfm.panose[4]), panose_values_4);
- dump_enumfield(L, "strokevariation", fix_range(panose_values_5_max, pfm.panose[5]), panose_values_5);
- dump_enumfield(L, "armstyle", fix_range(panose_values_6_max, pfm.panose[6]), panose_values_6);
- dump_enumfield(L, "letterform", fix_range(panose_values_7_max, pfm.panose[7]), panose_values_7);
- dump_enumfield(L, "midline", fix_range(panose_values_8_max, pfm.panose[8]), panose_values_8);
- dump_enumfield(L, "xheight", fix_range(panose_values_9_max, pfm.panose[9]), panose_values_9);
+ dump_enumfield(L, "familytype",
+ fix_range(panose_values_0_max, pfm.panose[0]),
+ panose_values_0);
+ dump_enumfield(L, "serifstyle",
+ fix_range(panose_values_1_max, pfm.panose[1]),
+ panose_values_1);
+ dump_enumfield(L, "weight", fix_range(panose_values_2_max, pfm.panose[2]),
+ panose_values_2);
+ dump_enumfield(L, "proportion",
+ fix_range(panose_values_3_max, pfm.panose[3]),
+ panose_values_3);
+ dump_enumfield(L, "contrast", fix_range(panose_values_4_max, pfm.panose[4]),
+ panose_values_4);
+ dump_enumfield(L, "strokevariation",
+ fix_range(panose_values_5_max, pfm.panose[5]),
+ panose_values_5);
+ dump_enumfield(L, "armstyle", fix_range(panose_values_6_max, pfm.panose[6]),
+ panose_values_6);
+ dump_enumfield(L, "letterform",
+ fix_range(panose_values_7_max, pfm.panose[7]),
+ panose_values_7);
+ dump_enumfield(L, "midline", fix_range(panose_values_8_max, pfm.panose[8]),
+ panose_values_8);
+ dump_enumfield(L, "xheight", fix_range(panose_values_9_max, pfm.panose[9]),
+ panose_values_9);
lua_setfield(L, -2, "panose");
dump_intfield(L, "fstype", pfm.fstype);
@@ -1210,10 +1338,10 @@ void handle_pfminfo(lua_State * L, struct pfminfo pfm)
}
-void do_handle_enc(lua_State * L, struct enc *enc)
+char *do_handle_enc(lua_State * L, struct enc *enc)
{
int i;
-
+ char *ret = enc->enc_name;
dump_stringfield(L, "enc_name", enc->enc_name);
dump_intfield(L, "char_cnt", enc->char_cnt);
@@ -1262,6 +1390,7 @@ void do_handle_enc(lua_State * L, struct enc *enc)
dump_stringfield(L, "iconv_name", enc->iconv_name);
dump_intfield(L, "char_max", enc->char_max);
+ return ret;
}
void handle_enc(lua_State * L, struct enc *enc)
@@ -1320,9 +1449,12 @@ void handle_encmap(lua_State * L, struct encmap *map, int notdef_loc)
}
if (map->enc != NULL) {
+ char *encname;
lua_newtable(L);
- handle_enc(L, map->enc);
+ encname = do_handle_enc(L, map->enc);
lua_setfield(L, -2, "enc");
+ lua_pushstring(L, encname);
+ lua_setfield(L, -2, "enc_name");
}
}
@@ -2062,7 +2194,9 @@ void handle_splinefont(lua_State * L, struct splinefont *sf)
dump_floatfield(L, "uwidth", sf->uwidth);
dump_intfield(L, "ascent", sf->ascent);
dump_intfield(L, "descent", sf->descent);
- dump_intfield(L, "uniqueid", sf->uniqueid);
+ if (sf->uniqueid!=0) {
+ dump_intfield(L, "uniqueid", sf->uniqueid);
+ }
dump_intfield(L, "glyphcnt", sf->glyphcnt);
dump_intfield(L, "glyphmax", sf->glyphmax);
dump_intfield(L, "units_per_em", sf->units_per_em);
@@ -2267,7 +2401,9 @@ void handle_splinefont(lua_State * L, struct splinefont *sf)
}
dump_stringfield(L, "chosenname", sf->chosenname);
- dump_intfield(L, "macstyle", sf->macstyle);
+ if (sf->macstyle!=-1) {
+ dump_intfield(L, "macstyle", sf->macstyle);
+ }
dump_stringfield(L, "fondname", sf->fondname);
dump_intfield(L, "design_size", sf->design_size);
@@ -2295,8 +2431,8 @@ void handle_splinefont(lua_State * L, struct splinefont *sf)
lua_setfield(L, -2, "mark_classes");
}
- dump_intfield(L, "creationtime", sf->creationtime);
- dump_intfield(L, "modificationtime", sf->modificationtime);
+ dump_uintfield(L, "creationtime", sf->creationtime);
+ dump_uintfield(L, "modificationtime", sf->modificationtime);
dump_intfield(L, "os2_version", sf->os2_version);
dump_intfield(L, "sfd_version", sf->sfd_version);
@@ -2393,6 +2529,902 @@ void do_ff_info(lua_State * L, SplineFont * sf)
}
+typedef enum {
+ FK_table_version = 0,
+ FK_fontname,
+ FK_fullname,
+ FK_familyname,
+ FK_weight,
+ FK_copyright,
+ FK_filename,
+ FK_version,
+ FK_italicangle,
+ FK_upos,
+ FK_uwidth,
+ FK_ascent,
+ FK_descent,
+ FK_uniqueid,
+ FK_glyphcnt,
+ FK_glyphmax,
+ FK_units_per_em,
+ FK_lookups,
+ FK_glyphs,
+ FK_hasvmetrics,
+ FK_onlybitmaps,
+ FK_serifcheck,
+ FK_isserif,
+ FK_issans,
+ FK_encodingchanged,
+ FK_strokedfont,
+ FK_use_typo_metrics,
+ FK_weight_width_slope_only,
+ FK_head_optimized_for_cleartype,
+ FK_uni_interp,
+ FK_map,
+ FK_origname,
+ FK_private,
+ FK_xuid,
+ FK_pfminfo,
+ FK_names,
+ FK_cidinfo,
+ FK_subfonts,
+ FK_comments,
+ FK_fontlog,
+ FK_cvt_names,
+ FK_ttf_tables,
+ FK_ttf_tab_saved,
+ FK_texdata,
+ FK_anchor_classes,
+ FK_kerns,
+ FK_vkerns,
+ FK_gsub,
+ FK_gpos,
+ FK_sm,
+ FK_features,
+ FK_mm,
+ FK_chosenname,
+ FK_macstyle,
+ FK_fondname,
+ FK_design_size,
+ FK_fontstyle_id,
+ FK_fontstyle_name,
+ FK_design_range_bottom,
+ FK_design_range_top,
+ FK_strokewidth,
+ FK_mark_classes,
+ FK_creationtime,
+ FK_modificationtime,
+ FK_os2_version,
+ FK_sfd_version,
+ FK_math,
+ FK_validation_state,
+ FK_horiz_base,
+ FK_vert_base,
+ FK_extrema_bound,
+} font_key_values;
+
+const char *font_keys[] = {
+ "table_version",
+ "fontname",
+ "fullname",
+ "familyname",
+ "weight",
+ "copyright",
+ "filename",
+ "version",
+ "italicangle",
+ "upos",
+ "uwidth",
+ "ascent",
+ "descent",
+ "uniqueid",
+ "glyphcnt",
+ "glyphmax",
+ "units_per_em",
+ "lookups",
+ "glyphs",
+ "hasvmetrics",
+ "onlybitmaps",
+ "serifcheck",
+ "isserif",
+ "issans",
+ "encodingchanged",
+ "strokedfont",
+ "use_typo_metrics",
+ "weight_width_slope_only",
+ "head_optimized_for_cleartype",
+ "uni_interp",
+ "map",
+ "origname",
+ "private",
+ "xuid",
+ "pfminfo",
+ "names",
+ "cidinfo",
+ "subfonts",
+ "comments",
+ "fontlog",
+ "cvt_names",
+ "ttf_tables",
+ "ttf_tab_saved",
+ "texdata",
+ "anchor_classes",
+ "kerns",
+ "vkerns",
+ "gsub",
+ "gpos",
+ "sm",
+ "features",
+ "mm",
+ "chosenname",
+ "macstyle",
+ "fondname",
+ "design_size",
+ "fontstyle_id",
+ "fontstyle_name",
+ "design_range_bottom",
+ "design_range_top",
+ "strokewidth",
+ "mark_classes",
+ "creationtime",
+ "modificationtime",
+ "os2_version",
+ "sfd_version",
+ "math",
+ "validation_state",
+ "horiz_base",
+ "vert_base",
+ "extrema_bound",
+ NULL
+};
+
+
+typedef enum {
+ GK_name = 0,
+ GK_unicode,
+ GK_boundingbox,
+ GK_vwidth,
+ GK_width,
+ GK_lsidebearing,
+ GK_class,
+ GK_kerns,
+ GK_vkerns,
+ GK_dependents,
+ GK_lookups,
+ GK_ligatures,
+ GK_comment,
+ GK_anchors,
+ GK_altuni,
+ GK_tex_height,
+ GK_tex_depth,
+ GK_is_extended_shape,
+ GK_italic_correction,
+ GK_top_accent,
+ GK_vert_variants,
+ GK_horiz_variants,
+ GK_mathkern,
+} font_glyph_key_values;
+
+const char *font_glyph_keys[] = {
+ "name",
+ "unicode",
+ "boundingbox",
+ "vwidth",
+ "width",
+ "lsidebearing",
+ "class",
+ "kerns",
+ "vkerns",
+ "dependents",
+ "lookups",
+ "ligatures",
+ "comment",
+ "anchors",
+ "altuni",
+ "tex_height",
+ "tex_depth",
+ "is_extended_shape",
+ "italic_correction",
+ "top_accent",
+ "vert_variants",
+ "horiz_variants",
+ "mathkern",
+ NULL
+};
+
+
+static int ff_fields(lua_State * L)
+{
+ int i;
+ const char **fields = NULL;
+ if (is_userdata(L, 1, FONT_METATABLE) ||
+ is_userdata(L, 1, FONT_SUBFONT_METATABLE)) {
+ fields = font_keys;
+ } else if (is_userdata(L, 1, FONT_GLYPH_METATABLE)) {
+ fields = font_glyph_keys;
+ }
+ if (fields != NULL) {
+ lua_newtable(L);
+ for (i = 0; fields[i] != NULL; i++) {
+ lua_pushstring(L, fields[i]);
+ lua_rawseti(L, -2, (i + 1));
+ }
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
+}
+
+
+
+static int ff_glyphs_index(lua_State * L)
+{
+
+ SplineFont *sf;
+ int gid = 0;
+ int l = -1;
+ int fix_notdef = 0;
+ lua_pushstring(L, "__sf");
+ lua_rawget(L, 1);
+ /* sf = *check_isfont(L, -1); */
+ if (!(is_userdata(L, -1, FONT_METATABLE) ||
+ is_userdata(L, -1, FONT_SUBFONT_METATABLE))) {
+ return luaL_error(L,
+ "fontloader.__index: expected a (sub)font userdata object\n");
+ }
+ sf = *((SplineFont **)lua_touserdata(L, -1));
+
+ lua_pop(L, 1);
+ gid = luaL_checkinteger(L, 2);
+ if (gid < 0 || gid >= sf->glyphmax) {
+ return luaL_error(L, "fontloader.glyphs.__index: index is invalid\n");
+ }
+ /* This after-the-fact type discovery is not brilliant,
+ I should really add a 'format' key in the structure */
+ if ((sf->origname != NULL) &&
+ (strmatch(sf->origname + strlen(sf->origname) - 4, ".pfa") == 0 ||
+ strmatch(sf->origname + strlen(sf->origname) - 4, ".pfb") == 0)) {
+ fix_notdef = 1;
+ }
+ /* some code to ensure that the .notdef ends up in slot 0
+ (this will actually be enforced by the CFF writer) */
+ if (fix_notdef) {
+ l = notdef_loc(sf);
+ /* now l is the .notdef location, adjust gid if needed */
+ if (l == sf->glyphcnt) { /* no .notdef at all, will be created at zero */
+ if (gid == 0) {
+ gid = l; /* .notdef was added at end */
+ } else {
+ gid--; /* f.glyphs[gid] == sf->glyphs[gid-1] */
+ }
+ } else if (l != 0) {
+ if (gid == 0) {
+ gid = l;
+ } else if (gid < l) {
+ gid--;
+ }
+ }
+ }
+ /* push the glyph */
+ if (sf->glyphs[gid] && sf->glyphs[gid] != (struct splinechar *)-1) {
+ lua_ff_pushglyph(L, sf->glyphs[gid]);
+ } else {
+ lua_pushnil(L);
+ }
+ return 1;
+}
+
+static int ff_glyph_index(lua_State * L)
+{
+ struct splinechar *glyph;
+ int key;
+ glyph = *check_isglyph(L, 1);
+ if (glyph == NULL) {
+ return luaL_error(L,
+ "fontloader.glyph.__index: glyph is nonexistent\n");
+ }
+ if (!lua_isstring(L, 2)) { /* 1 == 'font' */
+ return luaL_error(L,
+ "fontloader.glyph.__index: can only be indexed by string\n");
+ }
+ key = luaL_checkoption(L, 2, NULL, font_glyph_keys);
+ switch (key) {
+ case GK_name:
+ lua_pushstring(L, glyph->name);
+ break;
+ case GK_unicode:
+ lua_pushnumber(L, glyph->unicodeenc);
+ break;
+ case GK_boundingbox:
+ if (glyph->xmax == 0 && glyph->ymax == 0 && glyph->xmin == 0
+ && glyph->ymin == 0) {
+ DBounds bb;
+ SplineCharFindBounds(glyph, &bb);
+ glyph->xmin = bb.minx;
+ glyph->ymin = bb.miny;
+ glyph->xmax = bb.maxx;
+ glyph->ymax = bb.maxy;
+ }
+ lua_createtable(L, 4, 0);
+ lua_pushnumber(L, 1);
+ lua_pushnumber(L, glyph->xmin);
+ lua_rawset(L, -3);
+ lua_pushnumber(L, 2);
+ lua_pushnumber(L, glyph->ymin);
+ lua_rawset(L, -3);
+ lua_pushnumber(L, 3);
+ lua_pushnumber(L, glyph->xmax);
+ lua_rawset(L, -3);
+ lua_pushnumber(L, 4);
+ lua_pushnumber(L, glyph->ymax);
+ lua_rawset(L, -3);
+ break;
+ case GK_vwidth:
+ lua_pushnumber(L, glyph->vwidth);
+ break;
+ case GK_width:
+ lua_pushnumber(L, glyph->width);
+ break;
+ case GK_lsidebearing:
+ lua_pushnumber(L, glyph->lsidebearing);
+ break;
+ case GK_class:
+ if (glyph->glyph_class > 0) {
+ lua_pushstring(L, glyph_class_enum[glyph->glyph_class]);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_kerns:
+ if (glyph->kerns != NULL) {
+ lua_newtable(L);
+ handle_kernpair(L, glyph->kerns);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_vkerns:
+ if (glyph->vkerns != NULL) {
+ lua_newtable(L);
+ handle_kernpair(L, glyph->vkerns);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_dependents:
+ if (glyph->dependents != NULL) {
+ lua_newtable(L);
+ handle_splinecharlist(L, glyph->dependents);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_lookups:
+ if (glyph->possub != NULL) {
+ lua_newtable(L);
+ handle_generic_pst(L, glyph->possub);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_ligatures:
+ if (glyph->ligofme != NULL) {
+ lua_newtable(L);
+ handle_liglist(L, glyph->ligofme);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_comment:
+ lua_pushstring(L, glyph->comment);
+ break;
+ case GK_anchors:
+ if (glyph->anchor != NULL) {
+ lua_newtable(L);
+ handle_anchorpoint(L, glyph->anchor);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_altuni:
+ if (glyph->altuni != NULL) {
+ lua_newtable(L);
+ handle_altuni(L, glyph->altuni);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_tex_height:
+ if (glyph->tex_height != TEX_UNDEF) {
+ lua_pushnumber(L, glyph->tex_height);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_tex_depth:
+ if (glyph->tex_height != TEX_UNDEF) {
+ lua_pushnumber(L, glyph->tex_depth);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_is_extended_shape:
+ lua_pushnumber(L, glyph->is_extended_shape);
+ break;
+ case GK_italic_correction:
+ if (glyph->italic_correction != TEX_UNDEF) {
+ lua_pushnumber(L, glyph->italic_correction);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_top_accent:
+ if (glyph->top_accent_horiz != TEX_UNDEF) {
+ lua_pushnumber(L, glyph->top_accent_horiz);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_vert_variants:
+ if (glyph->vert_variants != NULL) {
+ lua_newtable(L);
+ handle_glyphvariants(L, glyph->vert_variants);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_horiz_variants:
+ if (glyph->horiz_variants != NULL) {
+ lua_newtable(L);
+ handle_glyphvariants(L, glyph->horiz_variants);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case GK_mathkern:
+ if (glyph->mathkern != NULL) {
+ lua_newtable(L);
+ handle_mathkern(L, glyph->mathkern);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ default:
+ lua_pushnil(L);
+ }
+ return 1;
+}
+
+
+static int ff_index(lua_State * L)
+{
+ SplineFont *sf;
+ int k, key;
+ /* sf = *check_isfont(L, 1); */
+ if (!(is_userdata(L, 1, FONT_METATABLE) ||
+ is_userdata(L, 1, FONT_SUBFONT_METATABLE))) {
+ return luaL_error(L,
+ "fontloader.__index: expected a (sub)font userdata object\n");
+ }
+ sf = *((SplineFont **)lua_touserdata(L, 1));
+
+ if (sf == NULL) {
+ return luaL_error(L,
+ "fontloader.__index: font is nonexistent or freed already\n");
+ }
+ if (!lua_isstring(L, 2)) { /* 1 == 'font' */
+ return luaL_error(L,
+ "fontloader.__index: can only be indexed by string\n");
+ }
+ key = luaL_checkoption(L, 2, NULL, font_keys);
+ switch (key) {
+ case FK_table_version:
+ lua_pushstring(L, LUA_OTF_VERSION);
+ break;
+ case FK_fontname:
+ lua_pushstring(L, sf->fontname);
+ break;
+ case FK_fullname:
+ lua_pushstring(L, sf->fullname);
+ break;
+ case FK_familyname:
+ lua_pushstring(L, sf->familyname);
+ break;
+ case FK_weight:
+ lua_pushstring(L, sf->weight);
+ break;
+ case FK_copyright:
+ lua_pushstring(L, sf->copyright);
+ break;
+ case FK_filename:
+ lua_pushstring(L, sf->filename);
+ break;
+ case FK_version:
+ lua_pushstring(L, sf->version);
+ break;
+ case FK_italicangle:
+ lua_pushnumber(L, sf->italicangle);
+ break;
+ case FK_upos:
+ lua_pushnumber(L, sf->upos);
+ break;
+ case FK_uwidth:
+ lua_pushnumber(L, sf->uwidth);
+ break;
+ case FK_ascent:
+ lua_pushnumber(L, sf->ascent);
+ break;
+ case FK_descent:
+ lua_pushnumber(L, sf->descent);
+ break;
+ case FK_uniqueid:
+ lua_pushnumber(L, sf->uniqueid);
+ break;
+ case FK_glyphcnt:
+ lua_pushnumber(L, sf->glyphcnt);
+ break;
+ case FK_glyphmax:
+ lua_pushnumber(L, sf->glyphmax);
+ break;
+ case FK_units_per_em:
+ lua_pushnumber(L, sf->units_per_em);
+ break;
+ case FK_lookups:
+ if (sf->possub != NULL) {
+ lua_newtable(L);
+ handle_generic_fpst(L, sf->possub);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_glyphs:
+ lua_newtable(L); /* the virtual glyph table */
+ lua_pushstring(L, "__sf");
+ lua_pushvalue(L, 1); /* that is our font */
+ lua_rawset(L, -3);
+ luaL_getmetatable(L, FONT_GLYPHS_METATABLE);
+ lua_setmetatable(L, -2); /* assign the metatable */
+ break;
+ case FK_hasvmetrics:
+ lua_pushnumber(L, sf->hasvmetrics);
+ break;
+ case FK_onlybitmaps:
+ lua_pushnumber(L, sf->onlybitmaps);
+ break;
+ case FK_serifcheck:
+ lua_pushnumber(L, sf->serifcheck);
+ break;
+ case FK_isserif:
+ lua_pushnumber(L, sf->isserif);
+ break;
+ case FK_issans:
+ lua_pushnumber(L, sf->issans);
+ break;
+ case FK_encodingchanged:
+ lua_pushnumber(L, sf->encodingchanged);
+ break;
+ case FK_strokedfont:
+ lua_pushnumber(L, sf->strokedfont);
+ break;
+ case FK_use_typo_metrics:
+ lua_pushnumber(L, sf->use_typo_metrics);
+ break;
+ case FK_weight_width_slope_only:
+ lua_pushnumber(L, sf->weight_width_slope_only);
+ break;
+ case FK_head_optimized_for_cleartype:
+ lua_pushnumber(L, sf->head_optimized_for_cleartype);
+ break;
+ case FK_uni_interp:
+ lua_pushstring(L, uni_interp_enum[(sf->uni_interp + 1)]);
+ break;
+ case FK_map:
+ if (sf->map != NULL) {
+ lua_newtable(L);
+ handle_encmap(L, sf->map, notdef_loc(sf));
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_origname:
+ lua_pushstring(L, sf->origname);
+ break;
+ case FK_private:
+ if (sf->private != NULL) {
+ lua_newtable(L);
+ handle_psdict(L, sf->private);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_xuid:
+ lua_pushstring(L, sf->xuid);
+ break;
+ case FK_pfminfo:
+ lua_createtable(L, 0, 40);
+ handle_pfminfo(L, sf->pfminfo);
+ break;
+ case FK_names:
+ if (sf->names != NULL) {
+ lua_newtable(L);
+ handle_ttflangname(L, sf->names);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_cidinfo:
+ lua_createtable(L, 0, 4);
+ dump_stringfield(L, "registry", sf->cidregistry);
+ dump_stringfield(L, "ordering", sf->ordering);
+ dump_intfield(L, "version", sf->cidversion);
+ dump_intfield(L, "supplement", sf->supplement);
+ break;
+ case FK_subfonts:
+ if (sf->subfontcnt > 0) {
+ lua_createtable(L, sf->subfontcnt, 0);
+ for (k = 0; k < sf->subfontcnt; k++) {
+ lua_ff_pushsubfont(L, sf->subfonts[k]);
+ lua_rawseti(L, -2, (k + 1));
+ }
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_comments:
+ lua_pushstring(L, sf->comments);
+ break;
+ case FK_fontlog:
+ lua_pushstring(L, sf->fontlog);
+ break;
+ case FK_cvt_names:
+ if (sf->cvt_names != NULL) {
+ lua_newtable(L);
+ for (k = 0; sf->cvt_names[k] != END_CVT_NAMES; ++k) {
+ lua_pushstring(L, sf->cvt_names[k]);
+ lua_rawseti(L, -2, (k + 1));
+ }
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_ttf_tables:
+ if (sf->ttf_tables != NULL) {
+ lua_newtable(L);
+ handle_ttf_table(L, sf->ttf_tables);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_ttf_tab_saved:
+ if (sf->ttf_tab_saved != NULL) {
+ lua_newtable(L);
+ handle_ttf_table(L, sf->ttf_tab_saved);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_texdata:
+ if (sf->texdata.type != tex_unset) {
+ lua_newtable(L);
+ dump_enumfield(L, "type", sf->texdata.type, tex_type_enum);
+ lua_newtable(L);
+ for (k = 0; k < 22; k++) {
+ lua_pushnumber(L, k);
+ lua_pushnumber(L, sf->texdata.params[k]);
+ lua_rawset(L, -3);
+ }
+ lua_setfield(L, -2, "params");
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_anchor_classes:
+ if (sf->anchor != NULL) {
+ lua_newtable(L);
+ handle_anchorclass(L, sf->anchor);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_kerns:
+ if (sf->kerns != NULL) {
+ lua_newtable(L);
+ handle_kernclass(L, sf->kerns);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_vkerns:
+ if (sf->vkerns != NULL) {
+ lua_newtable(L);
+ handle_kernclass(L, sf->vkerns);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_gsub:
+ if (sf->gsub_lookups != NULL) {
+ lua_newtable(L);
+ handle_lookup(L, sf->gsub_lookups, sf);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_gpos:
+ if (sf->gpos_lookups != NULL) {
+ lua_newtable(L);
+ handle_lookup(L, sf->gpos_lookups, sf);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_sm:
+ if (sf->sm != NULL) {
+ lua_newtable(L);
+ handle_generic_asm(L, sf->sm);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_features:
+ if (sf->features != NULL) {
+ lua_newtable(L);
+ handle_macfeat(L, sf->features);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_mm:
+ if (sf->mm != NULL) {
+ lua_newtable(L);
+ handle_mmset(L, sf->mm);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_chosenname:
+ lua_pushstring(L, sf->chosenname);
+ break;
+ case FK_macstyle:
+ lua_pushnumber(L, sf->macstyle);
+ break;
+ case FK_fondname:
+ lua_pushstring(L, sf->fondname);
+ break;
+ case FK_design_size:
+ lua_pushnumber(L, sf->design_size);
+ break;
+ case FK_fontstyle_id:
+ lua_pushnumber(L, sf->fontstyle_id);
+ break;
+ case FK_fontstyle_name:
+ if (sf->fontstyle_name != NULL) {
+ lua_newtable(L);
+ handle_otfname(L, sf->fontstyle_name);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_design_range_bottom:
+ lua_pushnumber(L, sf->design_range_bottom);
+ break;
+ case FK_design_range_top:
+ lua_pushnumber(L, sf->design_range_top);
+ break;
+ case FK_strokewidth:
+ lua_pushnumber(L, sf->strokewidth);
+ break;
+ case FK_mark_classes:
+ if (sf->mark_class_cnt > 0) {
+ lua_newtable(L);
+ for (k = 0; k < sf->mark_class_cnt; k++) {
+ if (sf->mark_class_names[k] != NULL) {
+ lua_pushstring(L, sf->mark_class_names[k]);
+ lua_pushstring(L, sf->mark_classes[k]);
+ lua_rawset(L, -3);
+ }
+ }
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_creationtime:
+ lua_pushnumber(L, sf->creationtime);
+ break;
+ case FK_modificationtime:
+ lua_pushnumber(L, sf->modificationtime);
+ break;
+ case FK_os2_version:
+ lua_pushnumber(L, sf->os2_version);
+ break;
+ case FK_sfd_version:
+ lua_pushnumber(L, sf->sfd_version);
+ break;
+ case FK_math:
+ if (sf->MATH != NULL) {
+ lua_newtable(L);
+ handle_MATH(L, sf->MATH);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_validation_state:
+ if (sf->loadvalidation_state != 0) {
+ int val, st;
+ lua_newtable(L);
+ val = 1;
+ st = sf->loadvalidation_state;
+ if (st & lvs_bad_ps_fontname) {
+ lua_pushliteral(L, "bad_ps_fontname");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_glyph_table) {
+ lua_pushliteral(L, "bad_glyph_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_cff_table) {
+ lua_pushliteral(L, "bad_cff_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_metrics_table) {
+ lua_pushliteral(L, "bad_metrics_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_cmap_table) {
+ lua_pushliteral(L, "bad_cmap_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_bitmaps_table) {
+ lua_pushliteral(L, "bad_bitmaps_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_gx_table) {
+ lua_pushliteral(L, "bad_gx_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_ot_table) {
+ lua_pushliteral(L, "bad_ot_table");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_os2_version) {
+ lua_pushliteral(L, "bad_os2_version");
+ lua_rawseti(L, -2, val++);
+ }
+ if (st & lvs_bad_sfnt_header) {
+ lua_pushliteral(L, "bad_sfnt_header");
+ lua_rawseti(L, -2, val++);
+ }
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_horiz_base:
+ if (sf->horiz_base != NULL) {
+ lua_newtable(L);
+ handle_base(L, sf->horiz_base);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_vert_base:
+ if (sf->vert_base != NULL) {
+ lua_newtable(L);
+ handle_base(L, sf->vert_base);
+ } else {
+ lua_pushnil(L);
+ }
+ break;
+ case FK_extrema_bound:
+ lua_pushnumber(L, sf->extrema_bound);
+ break;
+ default: /* can't actually happen, |luaL_checkoption| raises an error instead */
+ lua_pushnil(L);
+ break;
+ }
+ return 1;
+}
+
+
static int ff_info(lua_State * L)
{
SplineFont *sf;
@@ -2409,6 +3441,7 @@ static int ff_info(lua_State * L)
}
/* test fontname for existance */
if ((l = fopen(fontname, "r"))) {
+ recorder_record_input(fontname);
fclose(l);
} else {
lua_pushnil(L);
@@ -2458,6 +3491,7 @@ static void ff_do_cff(SplineFont * sf, char *filename, unsigned char **buf,
(filename, sf, ff_cff, bsizes, bf_none, flags, map, ly_fore)) {
/* success */
f = fopen(filename, "rb");
+ recorder_record_input(filename);
readbinfile(f, buf, bufsiz);
/*fprintf(stdout,"\n%s => CFF, size: %d\n", sf->filename, *bufsiz); */
fclose(f);
@@ -2509,50 +3543,20 @@ int ff_get_ttc_index(char *ffname, char *psname)
while (sf != NULL) {
if (strcmp(sf->fontname, psname) == 0) {
index = i;
- break;
}
i++;
sf = sf->next;
}
- return index;
-}
-
-static int warning_given = 0;
-
-static int ffold_info(lua_State * L)
-{
- if (warning_given < 5) {
- fprintf(stderr,
- "Warning: The 'fontforge' table has been renamed to 'fontloader'.\n");
- fprintf(stderr, " Please update your source file(s) accordingly.\n");
- warning_given++;
- }
- return ff_info(L);
+ if (index>=0)
+ return (i-index-1);
+ return -1;
}
-static int ffold_open(lua_State * L)
-{
- fprintf(stderr,
- "Warning: The 'fontforge' table has been renamed to 'fontloader'.\n");
- fprintf(stderr, " Please update your source file(s) accordingly.\n");
- return ff_open(L);
-}
-
-
-static struct luaL_reg fflib[] = {
- {"open", ffold_open},
- {"info", ffold_info},
- {"close", ff_close},
- {"apply_afmfile", ff_apply_afmfile},
- {"apply_featurefile", ff_apply_featurefile},
- {"to_table", ff_make_table},
- {NULL, NULL}
-};
-
static struct luaL_reg fllib[] = {
{"open", ff_open},
{"info", ff_info},
{"close", ff_close},
+ {"fields", ff_fields},
{"apply_afmfile", ff_apply_afmfile},
{"apply_featurefile", ff_apply_featurefile},
{"to_table", ff_make_table},
@@ -2561,6 +3565,7 @@ static struct luaL_reg fllib[] = {
static const struct luaL_reg fflib_m[] = {
{"__gc", ff_close}, /* doesnt work yet! */
+ {"__index", ff_index},
{NULL, NULL} /* sentinel */
};
@@ -2577,7 +3582,28 @@ int luaopen_ff(lua_State * L)
SaveTablesPref = "VORG,JSTF,acnt,bsln,fdsc,fmtx,hsty,just,trak,Zapf,LINO";
luaL_newmetatable(L, FONT_METATABLE);
luaL_register(L, NULL, fflib_m);
- luaL_openlib(L, "fontforge", fflib, 0);
+
+ /* virtual subfont table */
+ luaL_newmetatable(L, FONT_SUBFONT_METATABLE);
+ lua_pushstring(L, "__index");
+ lua_pushcfunction(L, ff_index);
+ lua_rawset(L, -3);
+ lua_pop(L, 1);
+ /* virtual glyphs table */
+ luaL_newmetatable(L, FONT_GLYPHS_METATABLE);
+ lua_pushstring(L, "__index");
+ lua_pushcfunction(L, ff_glyphs_index);
+ lua_rawset(L, -3);
+ lua_pop(L, 1);
+ /* virtual glyph table */
+ luaL_newmetatable(L, FONT_GLYPH_METATABLE);
+ lua_pushstring(L, "__index");
+ lua_pushcfunction(L, ff_glyph_index);
+ lua_rawset(L, -3);
+ lua_pop(L, 1);
+
+
luaL_openlib(L, "fontloader", fllib, 0);
+
return 1;
}
diff --git a/Build/source/texk/web2c/luatexdir/luapeg/lpeg.c b/Build/source/texk/web2c/luatexdir/luapeg/lpeg.c
index 07cbf341d59..c86dc7a0ee9 100644
--- a/Build/source/texk/web2c/luatexdir/luapeg/lpeg.c
+++ b/Build/source/texk/web2c/luatexdir/luapeg/lpeg.c
@@ -478,6 +478,7 @@ static const char *match (lua_State *L,
case IBackCommit: {
assert(stack > stackbase && (stack - 1)->s != NULL);
s = (--stack)->s;
+ captop = stack->caplevel; /* patch from RI, 20101101 */
p += p->i.offset;
continue;
}
@@ -693,7 +694,7 @@ static void checkrule (lua_State *L, Instruction *op, int from, int to,
for (i = from; i < to; i += sizei(op + i)) {
if (op[i].i.code == IPartialCommit && op[i].i.offset < 0) { /* loop? */
int start = dest(op, i);
- assert(op[start - 1].i.code == IChoice && dest(op, start - 1) == i + 1);
+ /* assert(op[start - 1].i.code == IChoice && dest(op, start - 1) == i + 1); */
if (start <= lastopen) { /* loop does contain an open call? */
if (!verify(L, op, op + start, op + i, postable, rule)) /* check body */
luaL_error(L, "possible infinite loop in %s", val2str(L, rule));
diff --git a/Build/source/texk/web2c/luatexdir/luascripts/pdflua.h b/Build/source/texk/web2c/luatexdir/luascripts/pdflua.h
new file mode 100644
index 00000000000..d835843e523
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luascripts/pdflua.h
@@ -0,0 +1,34 @@
+/* pdflua.h
+
+ Copyright 2010 Taco Hoekwater <taco@luatex.org>
+ Copyright 2010 Hartmut Henkel <hartmut@luatex.org>
+
+ This file is part of LuaTeX.
+
+ LuaTeX is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
+
+/* $Id: pdflua.h 3937 2010-11-01 21:58:54Z hhenkel $ */
+
+#ifndef PDFLUA_H
+# define PDFLUA_H
+
+typedef struct _zlib_struct {
+ uLong uncomprLen;
+ uLong comprLen;
+ const Byte *compr;
+} zlib_struct;
+
+extern const zlib_struct *pdflua_zlib_struct_ptr;
+
+#endif /* PDFLUA_H */
diff --git a/Build/source/texk/web2c/luatexdir/luascripts/pdflua.lua b/Build/source/texk/web2c/luatexdir/luascripts/pdflua.lua
new file mode 100644
index 00000000000..2009b162d92
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luascripts/pdflua.lua
@@ -0,0 +1,25 @@
+-- $Id: pdflua.lua 3949 2010-11-07 00:09:19Z hhenkel $
+-- $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luascripts/pdflua.lua $
+
+-- this is early work in progress...
+
+------------------------------------------------------------------------
+
+beginpage = function(a)
+end
+
+endpage = function(a)
+end
+
+outputpagestree = function()
+end
+
+------------------------------------------------------------------------
+
+local pdflua = {
+ beginpage = beginpage,
+ endpage = endpage,
+ outputpagestree = outputpagestree,
+}
+
+return pdflua
diff --git a/Build/source/texk/web2c/luatexdir/luascripts/txt2zlib.w b/Build/source/texk/web2c/luatexdir/luascripts/txt2zlib.w
new file mode 100644
index 00000000000..ccf5d56cb88
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luascripts/txt2zlib.w
@@ -0,0 +1,145 @@
+% txt2zlib.w
+
+% Copyright 2010 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2010 Hartmut Henkel <hartmut@@luatex.org>
+
+% This file is part of LuaTeX.
+
+% LuaTeX is free software; you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation; either version 2 of the License, or (at your
+% option) any later version.
+
+% LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+% License for more details.
+
+% You should have received a copy of the GNU General Public License along
+% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
+
+% $Id: txt2zlib.w 3937 2010-11-01 21:58:54Z hhenkel $
+% $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luascripts/txt2zlib.w $
+
+@
+@c
+
+#include<stdlib.h>
+#include<stdio.h>
+#include<string.h>
+#include<zlib.h>
+
+#define INBUFINITLEN 10
+#define LINELEN 16
+
+char header[] =
+ " Copyright 2010 Taco Hoekwater <taco@@luatex.org>\n"
+ " Copyright 2010 Hartmut Henkel <hartmut@@luatex.org>\n"
+ "\n"
+ " This file is part of LuaTeX.\n"
+ "\n"
+ " LuaTeX is free software; you can redistribute it and/or modify it under\n"
+ " the terms of the GNU General Public License as published by the Free\n"
+ " Software Foundation; either version 2 of the License, or (at your\n"
+ " option) any later version.\n"
+ "\n"
+ " LuaTeX is distributed in the hope that it will be useful, but WITHOUT\n"
+ " ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
+ " FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public\n"
+ " License for more details.\n"
+ "\n"
+ " You should have received a copy of the GNU General Public License along\n"
+ " with LuaTeX; if not, see <http://www.gnu.org/licenses/>.";
+
+#define NAMELEN 100
+
+int main(int argc, char *argv[])
+{
+ int i, j, c, err;
+ Byte *inbuf = NULL, *outbuf;
+ FILE *fin, *fout;
+ char ptrname[NAMELEN];
+ uLong inbuflen, uncomprLen = 0, outbuflen, comprLen;
+
+ if (argc != 3) {
+ fprintf(stderr,
+ "%s: need exactly two arguments (input file name, output file name).\n",
+ argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ fin = fopen(argv[1], "r");
+ if (fin == NULL) {
+ fprintf(stderr, "%s: can't open %s for reading.\n", argv[0], argv[1]);
+ exit(EXIT_FAILURE);
+ }
+ fout = fopen(argv[2], "w");
+ if (fout == NULL) {
+ fprintf(stderr, "%s: can't open %s for writing.\n", argv[0], argv[2]);
+ exit(EXIT_FAILURE);
+ }
+ if ((inbuf = malloc(INBUFINITLEN * sizeof(Byte))) == NULL)
+ exit(EXIT_FAILURE);
+ inbuflen = INBUFINITLEN;
+ while ((c = fgetc(fin)) != EOF) {
+ if (uncomprLen == inbuflen - 1) {
+ inbuflen = (uLong) ((double) inbuflen * 1.5 + 1);
+ if ((inbuf = realloc(inbuf, inbuflen)) == NULL)
+ exit(EXIT_FAILURE);
+ }
+ inbuf[uncomprLen] = (Byte) c;
+ uncomprLen++;
+ }
+
+ outbuflen = comprLen = (uLong) ((double) uncomprLen * 1.1 + 50);
+ if ((outbuf = malloc(outbuflen * sizeof(Byte))) == NULL)
+ exit(EXIT_FAILURE);
+
+ err = compress(outbuf, &comprLen, inbuf, uncomprLen);
+
+ if (err != Z_OK) {
+ fprintf(stderr, "compress error: %d\n", err);
+ exit(EXIT_FAILURE);
+ }
+
+ fprintf(fout, "/* %s\n\n", argv[2]);
+ fprintf(fout, "%s */\n\n", header);
+ fprintf(fout, "#include \"ptexlib.h\"\n\n");
+
+ fprintf(fout, "static const Byte compr[%ld] = {\n", comprLen);
+ for (i = 0, j = 0; (uLong) i < comprLen; i++) {
+ if (j == 0)
+ fprintf(fout, " ");
+ fprintf(fout, "0x%02x", outbuf[i]);
+ if ((uLong) i < comprLen - 1) {
+ fprintf(fout, ",");
+ if (j == LINELEN - 1) {
+ fprintf(fout, "\n");
+ j = 0;
+ } else {
+ fprintf(fout, " ");
+ j++;
+ }
+ }
+ }
+ fprintf(fout, "\n};\n\n");
+
+ strncpy(ptrname, argv[2], NAMELEN - 20);
+ for (i = (int) strlen(ptrname) - 1; i > 0; i--) {
+ if (ptrname[i] == '.') {
+ ptrname[i] = '\0';
+ break;
+ }
+ }
+
+ strcat(ptrname, "_zlib_struct_ptr");
+
+ fprintf(fout,
+ "static const zlib_struct compr_struct = { %ld, %ld, compr };\n\n",
+ uncomprLen, comprLen);
+
+ fprintf(fout, "const zlib_struct *%s = &compr_struct;\n", ptrname);
+
+ fclose(fin);
+ fclose(fout);
+ return EXIT_SUCCESS;
+}
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c
index bb3eb1a10ff..06ec012cc93 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.c
+++ b/Build/source/texk/web2c/luatexdir/luatex.c
@@ -15,16 +15,16 @@
#include "luatex_svnversion.h"
static const char _svn_version[] =
- "$Id: luatex.c 3730 2010-07-01 07:12:12Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/luatex.c $";
+ "$Id: luatex.c 4117 2011-04-11 07:58:32Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luatex.c $";
#define TeX
int luatex_svn = luatex_svn_revision;
-int luatex_version = 60; /* \.{\\luatexversion} */
-int luatex_revision = '2'; /* \.{\\luatexrevision} */
+int luatex_version = 66; /* \.{\\luatexversion} */
+int luatex_revision = '0'; /* \.{\\luatexrevision} */
int luatex_date_info = -extra_version_info; /* the compile date is negated */
-const char *luatex_version_string = "beta-0.60.2";
+const char *luatex_version_string = "beta-0.66.0";
const char *engine_name = "luatex"; /* the name of this engine */
#include <kpathsea/c-ctype.h>
@@ -879,99 +879,6 @@ boolean input_line(FILE * f)
}
-/* This string specifies what the `e' option does in response to an
- error message. */
-#if 0
-static const_string edit_value = EDITOR;
-#endif
-
-/* This procedure originally due to sjc@s1-c. TeX & Metafont call it when
- the user types `e' in response to an error, invoking a text editor on
- the erroneous source file. FNSTART is how far into FILENAME the
- actual filename starts; FNLENGTH is how long the filename is. */
-
-#if 0
-void
-calledit(packedASCIIcode * filename,
- poolpointer fnstart, int fnlength, int linenumber)
-{
- char *temp, *command;
- char c;
- int sdone, ddone, i;
-
- sdone = ddone = 0;
- filename += fnstart;
-
- /* Close any open input files, since we're going to kill the job. */
- for (i = 1; i <= in_open; i++)
- xfclose(input_file[i], "inputfile");
-
- /* Replace the default with the value of the appropriate environment
- variable or config file value, if it's set. */
- temp = kpse_var_value(edit_var);
- if (temp != NULL)
- edit_value = temp;
-
- /* Construct the command string. The `11' is the maximum length an
- integer might be. */
- command =
- (string) xmalloc((unsigned) strlen(edit_value) + (unsigned) fnlength +
- 11);
-
- /* So we can construct it as we go. */
- temp = command;
-
- while ((c = *edit_value++) != 0) {
- if (c == '%') {
- switch (c = *edit_value++) {
- case 'd':
- if (ddone)
- FATAL("call_edit: `%%d' appears twice in editor command");
- sprintf(temp, "%ld", (long int) linenumber);
- while (*temp != '\0')
- temp++;
- ddone = 1;
- break;
-
- case 's':
- if (sdone)
- FATAL("call_edit: `%%s' appears twice in editor command");
- for (i = 0; i < fnlength; i++)
- *temp++ = (char) Xchr(filename[i]);
- sdone = 1;
- break;
-
- case '\0':
- *temp++ = '%';
- /* Back up to the null to force termination. */
- edit_value--;
- break;
-
- default:
- *temp++ = '%';
- *temp++ = c;
- break;
- }
- } else
- *temp++ = c;
- }
-
- *temp = 0;
-
- /* Execute the command. */
-#ifdef __MINGW32__
- /* Win32 reimplementation of the system() command
- provides opportunity to call it asynchronously */
- if (win32_system(command, true) != 0)
-#else
- if (system(command) != 0)
-#endif
- fprintf(stderr, "! Trouble executing `%s'.\n", command);
-
- /* Quit, since we found an error. */
- uexit(1);
-}
-#endif
/* Read and write dump files. As distributed, these files are
architecture dependent; specifically, BigEndian and LittleEndian
@@ -995,7 +902,7 @@ calledit(packedASCIIcode * filename,
void swap_items(char *pp, int nitems, int size)
{
char temp;
- unsigned total = nitems*size;
+ unsigned total = (unsigned) (nitems * size);
char *q = xmalloc(total);
char *p = q;
memcpy(p,pp,total);
@@ -1067,48 +974,6 @@ void swap_items(char *pp, int nitems, int size)
}
#endif /* not WORDS_BIGENDIAN and not NO_DUMP_SHARE */
-
-#if 0
-/* Here we write NITEMS items, each item being ITEM_SIZE bytes long.
- The pointer to the stuff to write is P, and we write to the file
- OUT_FILE. */
-
-void do_dump(char *p, int item_size, int nitems, FILE * out_file)
-{
-#if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE)
- swap_items(p, nitems, item_size);
-#endif
-
- if (fwrite(p, (size_t) item_size, (size_t) nitems, out_file) !=
- (unsigned) nitems) {
- fprintf(stderr, "! Could not write %d %d-byte item(s).\n", nitems,
- item_size);
- uexit(1);
- }
-
- /* Have to restore the old contents of memory, since some of it might
- get used again. */
-#if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE)
- swap_items(p, nitems, item_size);
-#endif
-}
-#endif
-
-
-
-/* Here is the dual of the writing routine. */
-#if 0
-void do_undump(char *p, int item_size, int nitems, FILE * in_file)
-{
- if (fread(p, (size_t) item_size, (size_t) nitems, in_file) !=
- (size_t) nitems)
- FATAL2("Could not undump %d %d-byte item(s)", nitems, item_size);
-
-#if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE)
- swap_items(p, nitems, item_size);
-#endif
-}
-#endif
/* Get the job name to be used, which may have been set from the
diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
index 1a9f3e62096..f74ca715caa 100644
--- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
+++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
@@ -1 +1 @@
-#define luatex_svn_revision 3736
+#define luatex_svn_revision 4141
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pagetree.w b/Build/source/texk/web2c/luatexdir/pdf/pagetree.w
index 8063d6a103b..b126d8a7a25 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pagetree.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pagetree.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: pagetree.w 3573 2010-04-02 14:10:54Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pagetree.w $";
+ "$Id: pagetree.w 3887 2010-09-14 21:32:23Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pagetree.w $";
@* Page diversions.
@@ -71,8 +71,7 @@ static pages_entry *new_pages_entry(PDF pdf)
for (i = 0; i < PAGES_TREE_KIDSMAX; i++)
p->kids[i] = 0;
p->next = NULL;
- pdf_create_obj(pdf, obj_type_pages, 0);
- p->objnum = pdf->obj_ptr;
+ p->objnum = pdf_create_obj(pdf, obj_type_pages, 0);
return p;
}
@@ -223,8 +222,7 @@ static void write_pages(PDF pdf, pages_entry * p, int parent)
if (parent == 0) { /* it's root */
if (pdf_pages_attr != null)
pdf_print_toks_ln(pdf, pdf_pages_attr);
- if (pdf_pagesattributes_toks != null) /* from Lua */
- pdf_print_toks_ln(pdf, pdf_pagesattributes_toks);
+ print_pdf_table_string(pdf, "pagesattributes");
} else
pdf_printf(pdf, "/Parent %d 0 R\n", parent);
pdf_printf(pdf, "/Count %d\n/Kids [", (int) p->number_of_pages);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfaction.h b/Build/source/texk/web2c/luatexdir/pdf/pdfaction.h
index 77944dd3f5b..2ea3a175403 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfaction.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfaction.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfaction.h 2801 2009-07-10 13:12:59Z taco $ */
+/* $Id: pdfaction.h 3891 2010-09-14 23:02:24Z hhenkel $ */
#ifndef PDFACTION_H
# define PDFACTION_H
@@ -59,7 +59,7 @@ typedef enum {
if (pdf_action_refcount(a) == null) { \
delete_action_node(a); \
} else { \
- decr(pdf_action_refcount(a)); \
+ pdf_action_refcount(a)--; \
} \
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfaction.w b/Build/source/texk/web2c/luatexdir/pdf/pdfaction.w
index 46992866f21..4bef7c1d087 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfaction.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfaction.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: pdfaction.w 3612 2010-04-13 09:29:42Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfaction.w $";
+ "$Id: pdfaction.w 3615 2010-04-13 21:59:59Z oneiros $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfaction.w $";
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfannot.w b/Build/source/texk/web2c/luatexdir/pdf/pdfannot.w
index a33de9e1905..b112c1a5447 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfannot.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfannot.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfannot.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfannot.w $";
+ "$Id: pdfannot.w 3908 2010-10-13 19:22:02Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfannot.w $";
#include "ptexlib.h"
@@ -30,14 +30,15 @@ static const char _svn_version[] =
void do_annot(PDF pdf, halfword p, halfword parent_box, scaledpos cur)
{
scaled_whd alt_rule;
- if (!is_shipping_page)
+ int k;
+ if (global_shipping_mode == SHIPPING_FORM)
pdf_error("ext4", "annotations cannot be inside an XForm");
if (doing_leaders)
return;
if (is_obj_scheduled(pdf, pdf_annot_objnum(p))) {
- pdf_create_obj(pdf, obj_type_annot, pdf->sys_obj_ptr + 1);
+ k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1);
obj_annot_ptr(pdf, pdf_annot_objnum(p)) = p;
- pdf_annot_objnum(p) = pdf->sys_obj_ptr;
+ pdf_annot_objnum(p) = k;
}
alt_rule.wd = width(p);
alt_rule.ht = height(p);
@@ -72,8 +73,7 @@ void scan_annot(PDF pdf)
{
int k;
if (scan_keyword("reserveobjnum")) {
- pdf_create_obj(pdf, obj_type_annot, pdf->sys_obj_ptr + 1);
- k = pdf->sys_obj_ptr;
+ k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1);
/* Scan an optional space */
get_x_token();
if (cur_cmd != spacer_cmd)
@@ -82,12 +82,11 @@ void scan_annot(PDF pdf)
if (scan_keyword("useobjnum")) {
scan_int();
k = cur_val;
- check_obj_exists(pdf, obj_type_annot, k);
+ check_obj_type(pdf, obj_type_annot, k);
if (obj_annot_ptr(pdf, k) != 0)
pdf_error("ext1", "annot object in use");
} else {
- pdf_create_obj(pdf, obj_type_annot, pdf->sys_obj_ptr + 1);
- k = pdf->sys_obj_ptr;
+ k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1);
}
new_annot_whatsit(pdf_annot_node);
obj_annot_ptr(pdf, k) = tail;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.h b/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.h
index 20d8e436146..3d8a396aa94 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfcolorstack.h 3261 2009-12-18 11:38:21Z taco $ */
+/* $Id: pdfcolorstack.h 3676 2010-05-02 20:04:49Z hhenkel $ */
#ifndef PDFCOLORSTACK_H
# define PDFCOLORSTACK_H
@@ -26,9 +26,6 @@
# define set_pdf_colorstack_cmd(A,B) pdf_colorstack_cmd(A)=B
# define set_pdf_colorstack_data(A,B) pdf_colorstack_data(A)=B
-/* remember shipout mode: page/form */
-extern boolean page_mode;
-
# define STACK_INCREMENT 8
int newcolorstack(int s, int literal_mode, boolean pagestart);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w b/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w
index 4d31e99e76a..3ed72e0eb87 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: pdfcolorstack.w 3612 2010-04-13 09:29:42Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w $";
+ "$Id: pdfcolorstack.w 3891 2010-09-14 23:02:24Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfcolorstack.w $";
@* Color Stack and Matrix Transformation Support.
@@ -54,9 +54,6 @@ They have the following properties:
#define DIRECT_PAGE 1
#define DIRECT_ALWAYS 2
-/* remember shipout mode: page/form */
-boolean page_mode;
-
typedef struct {
char **page_stack;
char **form_stack;
@@ -176,7 +173,7 @@ static int colorstackset(int colstack_no, str_number s)
{
colstack_type *colstack = get_colstack(colstack_no);
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
xfree(colstack->page_current);
colstack->page_current = makecstring(s);
} else {
@@ -191,7 +188,7 @@ int colorstackcurrent(int colstack_no)
{
colstack_type *colstack = get_colstack(colstack_no);
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
put_cstring_on_str_pool(colstack->page_current);
} else {
put_cstring_on_str_pool(colstack->form_current);
@@ -204,7 +201,7 @@ static int colorstackpush(int colstack_no, str_number s)
{
colstack_type *colstack = get_colstack(colstack_no);
char *str;
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
if (colstack->page_used == colstack->page_size) {
colstack->page_size += STACK_INCREMENT;
colstack->page_stack = xretalloc(colstack->page_stack,
@@ -243,7 +240,7 @@ int colorstackpop(int colstack_no)
{
colstack_type *colstack = get_colstack(colstack_no);
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
if (colstack->page_used == 0) {
pdftex_warn("pop empty color page stack %u",
(unsigned int) colstack_no);
@@ -271,7 +268,7 @@ void colorstackpagestart(void)
int i, j;
colstack_type *colstack;
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
/* see procedure |pdf_out_colorstack_startpage| */
return;
}
@@ -381,6 +378,6 @@ void pdf_out_colorstack_startpage(PDF pdf)
flush_str(s);
}
}
- incr(i);
+ i++;
}
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfdest.w b/Build/source/texk/web2c/luatexdir/pdf/pdfdest.w
index f97ea95e2ac..6081369e8b8 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfdest.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfdest.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfdest.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfdest.w $";
+ "$Id: pdfdest.w 3889 2010-09-14 22:21:57Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfdest.w $";
#include "ptexlib.h"
@@ -88,7 +88,7 @@ void do_dest(PDF pdf, halfword p, halfword parent_box, scaledpos cur)
scaledpos pos = pdf->posstruct->pos;
scaled_whd alt_rule;
int k;
- if (!is_shipping_page)
+ if (global_shipping_mode == SHIPPING_FORM)
pdf_error("ext4", "destinations cannot be inside an XForm");
if (doing_leaders)
return;
@@ -321,6 +321,7 @@ int output_name_tree(PDF pdf)
int k = 0; /* index of current child of |l|; if |k < pdf_dest_names_ptr|
then this is pointer to |dest_names| array;
otherwise it is the pointer to |obj_tab| (object number) */
+ int m;
int dests = 0;
int names_head = 0, names_tail = 0;
if (pdf->dest_names_ptr == 0) {
@@ -329,10 +330,8 @@ int output_name_tree(PDF pdf)
sort_dest_names(pdf);
while (true) {
-
do {
- pdf_create_obj(pdf, obj_type_others, 0); /* create a new node */
- l = pdf->obj_ptr;
+ l = pdf_create_obj(pdf, obj_type_others, 0); /* create a new node */
if (b == 0)
b = l; /* first in this level */
if (names_head == 0) {
@@ -401,7 +400,7 @@ int output_name_tree(PDF pdf)
DONE:
if ((dests != 0) || (pdf_names_toks != null)) {
- pdf_new_dict(pdf, obj_type_others, 0, 1);
+ m = pdf_new_dict(pdf, obj_type_others, 0, 1);
if (dests != 0)
pdf_indirect_ln(pdf, "Dests", dests);
if (pdf_names_toks != null) {
@@ -410,7 +409,7 @@ int output_name_tree(PDF pdf)
pdf_names_toks = null;
}
pdf_end_dict(pdf);
- return pdf->obj_ptr;
+ return m;
} else {
return 0;
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdffont.w b/Build/source/texk/web2c/luatexdir/pdf/pdffont.w
index 94dbc0c1e0a..0a33057f368 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdffont.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdffont.w
@@ -21,8 +21,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdffont.w 3638 2010-04-20 14:00:47Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.1/source/texk/web2c/luatexdir/pdf/pdffont.w $";
+ "$Id: pdffont.w 4098 2011-04-07 21:01:11Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdffont.w $";
#include "ptexlib.h"
@@ -64,7 +64,6 @@ void output_one_char(PDF pdf, internal_font_number ffi, int c)
break;
}
if (has_packet(ffi, c)) {
- assert(pdf->o_mode == OMODE_PDF);
do_vf_packet(pdf, ffi, c);
} else
backend_out[glyph_node] (pdf, ffi, c); /* |pdf_place_glyph(pdf, ffi, c);| */
@@ -91,7 +90,7 @@ indicates that the corresponding font shares the font resource with the font
static boolean font_shareable(internal_font_number f, internal_font_number k)
{
int ret = 0;
- internal_font_number b;
+ internal_font_number b; /* possible base font */
/* For some lua-loaded (for instance AFM) fonts, it is normal to have
a zero cidregistry, and such fonts do not have a fontmap entry yet
at this point, so the test should use the other branch */
@@ -101,7 +100,7 @@ static boolean font_shareable(internal_font_number f, internal_font_number k)
font_map(f) != NULL &&
(same(font_name, k, f) ||
(font_auto_expand(f) &&
- (b = pdf_font_blink(f)) != 0 && same(font_name, k, b)))) {
+ (b = pdf_font_blink(k)) != null_font && same(font_name, k, b)))) {
ret = 1;
}
#ifdef DEBUG
@@ -111,7 +110,8 @@ static boolean font_shareable(internal_font_number f, internal_font_number k)
} else {
if ((same(font_filename, k, f) && same(font_fullname, k, f))
|| (font_auto_expand(f)
- && (b = pdf_font_blink(f)) != 0 && same(font_name, k, b))) {
+ && (b = pdf_font_blink(k)) != null_font
+ && same(font_name, k, b))) {
ret = 1;
}
#ifdef DEBUG
@@ -129,12 +129,12 @@ void pdf_init_font(PDF pdf, internal_font_number f)
{
internal_font_number k, b;
fm_entry *fm;
- int i;
+ int i, l;
assert(!font_used(f));
/* if |f| is auto expanded then ensure the base font is initialized */
- if (font_auto_expand(f) && ((b = pdf_font_blink(f)) != 0)) {
+ if (font_auto_expand(f) && ((b = pdf_font_blink(f)) != null_font)) {
if (!font_used(b))
pdf_init_font(pdf, b);
set_font_map(f, font_map(b));
@@ -173,8 +173,8 @@ void pdf_init_font(PDF pdf, internal_font_number f)
i = obj_link(pdf, i);
}
/* create a new font object for |f| */
- pdf_create_obj(pdf, obj_type_font, f);
- pdf_use_font(f, pdf->obj_ptr);
+ l = pdf_create_obj(pdf, obj_type_font, f);
+ pdf_use_font(f, l);
}
@ set the actual font on PDF page
@@ -418,6 +418,7 @@ void new_letterspaced_font(small_number a)
pointer u; /* user's font identifier */
str_number t; /* name for the frozen font identifier */
internal_font_number f, k;
+ boolean nolig = false;
get_r_token();
u = cur_cs;
if (u >= hash_base)
@@ -429,7 +430,9 @@ void new_letterspaced_font(small_number a)
scan_font_ident();
k = cur_val;
scan_int();
- f = letter_space_font(u, k, fix_int(cur_val, -1000, 1000));
+ if (scan_keyword("nolig"))
+ nolig=true;
+ f = letter_space_font(k, fix_int(cur_val, -1000, 1000), nolig);
equiv(u) = f;
eqtb[font_id_base + f] = eqtb[u];
font_id_text(f) = t;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h
index f5840e715db..0bc83c7e04d 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfgen.h 3573 2010-04-02 14:10:54Z hhenkel $ */
+/* $Id: pdfgen.h 3940 2010-11-01 22:46:24Z hhenkel $ */
#ifndef PDFGEN_H
# define PDFGEN_H
@@ -76,6 +76,8 @@ typedef enum {
zip_finish = 2 /* finish \.{ZIP} compression */
} zip_write_states;
+typedef enum { NOT_SHIPPING, SHIPPING_PAGE, SHIPPING_FORM } shipping_mode_e;
+
extern int pdf_output_option;
extern int pdf_output_value;
extern int pdf_draftmode_option;
@@ -99,11 +101,14 @@ extern void fix_pdf_minorversion(PDF);
/* do the same as |pdf_quick_out| and flush the PDF buffer if necessary */
# define pdf_out(pdf,A) do { pdf_room(pdf,1); pdf_quick_out(pdf,A); } while (0)
-# define pdf_out_block(pdf,A,n) do { \
+# if 0
+/* see function pdf_out_block() */
+# define pdf_out_block_macro(pdf,A,n) do { \
pdf_room(pdf,(int)(n)); \
(void)memcpy((pdf->buf+pdf->ptr),(A),(size_t)(n)); \
pdf->ptr+=(int)(n); \
} while (0)
+# endif
/*
Basic printing procedures for PDF output are very similiar to \TeX\ basic
@@ -111,10 +116,10 @@ printing ones but the output is going to PDF buffer. Subroutines with
suffix |_ln| append a new-line character to the PDF output.
*/
-# define pdf_new_line_char 10 /* new-line character for UNIX platforms */
+# define pdf_newline_char 10 /* new-line character '\n' for UNIX platforms */
/* output a new-line character to PDF buffer */
-# define pdf_print_nl(pdf) pdf_out(pdf,pdf_new_line_char)
+# define pdf_print_nl(pdf) pdf_out(pdf,pdf_newline_char)
/* print out a string to PDF buffer followed by a new-line character */
# define pdf_print_ln(pdf,A) do { \
@@ -128,7 +133,6 @@ suffix |_ln| append a new-line character to the PDF output.
pdf_print_nl(pdf); \
} while (0)
-extern void pdf_puts(PDF, const char *);
extern __attribute__ ((format(printf, 2, 3)))
void pdf_printf(PDF, const char *, ...);
@@ -151,13 +155,15 @@ extern void pdf_print_mag_bp(PDF, scaled);
extern void addto_page_resources(PDF pdf, pdf_obj_type t, int k);
extern pdf_object_list *get_page_resources_list(PDF pdf, pdf_obj_type t);
+extern void pdf_out_block(PDF pdf, const char *s, size_t n);
+
+# define pdf_puts(pdf, s) pdf_out_block((pdf), (s), strlen(s))
+
# define pdf_print_resname_prefix(pdf) do { \
if (pdf->resname_prefix != NULL) \
- pdf_puts(pdf,pdf->resname_prefix); \
+ pdf_puts(pdf, pdf->resname_prefix); \
} while (0)
-extern void pdf_print_fw_int(PDF, longinteger, int);
-extern void pdf_out_bytes(PDF, longinteger, int);
extern void pdf_int_entry(PDF, const char *, int);
extern void pdf_int_entry_ln(PDF, const char *, int);
extern void pdf_indirect(PDF, const char *, int);
@@ -173,23 +179,13 @@ extern void pdf_print_rect_spec(PDF, halfword);
extern void pdf_rectangle(PDF, halfword);
extern void pdf_begin_obj(PDF, int, int);
-extern void pdf_new_obj(PDF, int, int, int);
+extern int pdf_new_obj(PDF, int, int, int);
extern void pdf_end_obj(PDF);
extern void pdf_begin_dict(PDF, int, int);
-extern void pdf_new_dict(PDF, int, int, int);
+extern int pdf_new_dict(PDF, int, int, int);
extern void pdf_end_dict(PDF);
-extern void pdf_os_switch(PDF pdf, boolean pdf_os);
-extern void pdf_os_prepare_obj(PDF pdf, int i, int pdf_os_level);
-extern void pdf_os_write_objstream(PDF);
-
-extern void write_stream_length(PDF, int, longinteger);
-
-extern void print_creation_date(PDF);
-extern void print_mod_date(PDF);
-extern void print_ID(PDF, const char *);
-
extern void remove_pdffile(PDF);
extern int fb_offset(PDF);
@@ -198,12 +194,11 @@ extern void fb_putchar(PDF, eight_bits);
extern void fb_seek(PDF, int);
extern void fb_free(PDF);
-extern void write_zip(PDF, boolean);
extern void zip_free(PDF);
/* functions that do not output stuff */
-extern scaled round_xn_over_d(scaled x, int n, int d);
+extern scaled round_xn_over_d(scaled x, int n, unsigned int d);
extern char *convertStringToPDFString(const char *in, int len);
extern void init_start_time(PDF);
@@ -215,8 +210,9 @@ extern void check_o_mode(PDF pdf, const char *s, int o_mode, boolean errorflag);
extern void set_job_id(PDF, int, int, int, int);
extern char *get_resname_prefix(PDF);
-extern void pdf_begin_page(PDF pdf, boolean shipping_page);
-extern void pdf_end_page(PDF pdf, boolean shipping_page);
+extern void pdf_begin_page(PDF pdf);
+extern void pdf_end_page(PDF pdf);
+extern void print_pdf_table_string(PDF pdf, const char *s);
extern void fix_o_mode(PDF pdf);
extern void ensure_output_state(PDF pdf, output_state s);
@@ -227,13 +223,10 @@ extern halfword pdf_catalog_toks; /* additional keys of Catalog dictionary
extern halfword pdf_catalog_openaction;
extern halfword pdf_names_toks; /* additional keys of Names dictionary */
extern halfword pdf_trailer_toks; /* additional keys of Trailer dictionary */
-extern halfword pdf_pageattributes_toks; /* additional keys of Page dictionary */
-extern halfword pdf_pageresources_toks; /* additional keys of Resources dictionary */
-extern halfword pdf_pagesattributes_toks; /* additional keys of Pages dictionary */
extern void scan_pdfcatalog(PDF pdf);
extern void finish_pdf_file(PDF pdf, int luatex_version,
str_number luatex_revision);
-extern boolean is_shipping_page;
+extern shipping_mode_e global_shipping_mode;
#endif /* PDFGEN_H */
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index 98d318c9ea8..fc25df199e7 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -19,14 +19,15 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfgen.w 3638 2010-04-20 14:00:47Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.1/source/texk/web2c/luatexdir/pdf/pdfgen.w $";
+ "$Id: pdfgen.w 4126 2011-04-11 09:34:50Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfgen.w $";
#include "ptexlib.h"
@ @c
#include <kpathsea/c-dir.h>
#include <kpathsea/c-ctype.h>
+#include "lua/luatex-api.h"
#include "md5.h"
#define is_hex_char isxdigit
@@ -51,10 +52,7 @@ halfword pdf_catalog_toks; /* additional keys of Catalog dictionary */
halfword pdf_catalog_openaction;
halfword pdf_names_toks; /* additional keys of Names dictionary */
halfword pdf_trailer_toks; /* additional keys of Trailer dictionary */
-halfword pdf_pageattributes_toks; /* additional keys of Page dictionary */
-halfword pdf_pageresources_toks; /* additional keys of Resources dictionary */
-halfword pdf_pagesattributes_toks; /* additional keys of Pages dictionary */
-boolean is_shipping_page; /* set to |shipping_page| when |ship_out| starts */
+shipping_mode_e global_shipping_mode = NOT_SHIPPING; /* set to |shipping_mode| when |ship_out| starts */
@ |init_pdf_struct()| is called early, only once, from maincontrol.w
@@ -62,17 +60,17 @@ boolean is_shipping_page; /* set to |shipping_page| when |ship_out| starts
PDF init_pdf_struct(PDF pdf)
{
assert(pdf == NULL);
- pdf = xmalloc(sizeof(pdf_output_file));
+ pdf = xtalloc(1, pdf_output_file);
memset(pdf, 0, sizeof(pdf_output_file));
pdf->o_mode = OMODE_NONE; /* will be set by |fix_o_mode()| */
pdf->o_state = ST_INITIAL;
- pdf->os_obj = xmalloc(pdf_os_max_objs * sizeof(os_obj_data));
+ pdf->os_obj = xtalloc(pdf_os_max_objs, os_obj_data);
pdf->os_buf_size = inf_pdf_os_buf_size;
- pdf->os_buf = xmalloc((unsigned) pdf->os_buf_size * sizeof(unsigned char));
+ pdf->os_buf = xtalloc(pdf->os_buf_size, unsigned char);
pdf->op_buf_size = inf_pdf_op_buf_size;
- pdf->op_buf = xmalloc((unsigned) pdf->op_buf_size * sizeof(unsigned char));
+ pdf->op_buf = xtalloc(pdf->op_buf_size, unsigned char);
pdf->buf_size = pdf->op_buf_size;
pdf->buf = pdf->op_buf;
@@ -80,20 +78,18 @@ PDF init_pdf_struct(PDF pdf)
/* Sometimes it is neccesary to allocate memory for PDF output that cannot
be deallocated then, so we use |mem| for this purpose. */
pdf->mem_size = inf_pdf_mem_size; /* allocated size of |mem| array */
- pdf->mem = xmalloc((unsigned) ((unsigned) pdf->mem_size * sizeof(int)));
+ pdf->mem = xtalloc(pdf->mem_size, int);
pdf->mem_ptr = 1; /* the first word is not used so we can use zero as a value for testing
whether a pointer to |mem| is valid */
pdf->pstruct = NULL;
- pdf->posstruct = xmalloc(sizeof(posstructure));
+ pdf->posstruct = xtalloc(1, posstructure);
pdf->posstruct->pos.h = 0;
pdf->posstruct->pos.v = 0;
pdf->posstruct->dir = dir_TLT;
pdf->obj_tab_size = (unsigned) inf_obj_tab_size; /* allocated size of |obj_tab| array */
- pdf->obj_tab = xmalloc((unsigned)
- ((unsigned) (pdf->obj_tab_size + 1) *
- sizeof(obj_entry)));
+ pdf->obj_tab = xtalloc(pdf->obj_tab_size + 1, obj_entry);
memset(pdf->obj_tab, 0, sizeof(obj_entry));
pdf->minor_version = -1; /* unset */
@@ -114,27 +110,27 @@ PDF init_pdf_struct(PDF pdf)
pdf->page_resources = NULL;
init_pdf_pagecalculations(pdf);
+ pdf->pdflua_ref = new_pdflua();
return pdf;
}
@ @c
-static void pdf_shipout_begin(boolean shipping_page)
+static void pdf_shipout_begin()
{
pos_stack_used = 0; /* start with empty stack */
- page_mode = shipping_page;
- if (shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
colorstackpagestart();
}
}
-static void pdf_shipout_end(boolean shipping_page)
+static void pdf_shipout_end()
{
if (pos_stack_used > 0) {
pdftex_fail("%u unmatched \\pdfsave after %s shipout",
(unsigned int) pos_stack_used,
- ((shipping_page) ? "page" : "form"));
+ ((global_shipping_mode == SHIPPING_PAGE) ? "page" : "form"));
}
}
@@ -163,33 +159,36 @@ int pdf_get_mem(PDF pdf, int s)
return ret;
}
+@ |get_o_mode| translates from |pdf_output| to |o_mode|.
+
+@c
+static output_mode get_o_mode()
+{
+ output_mode o_mode;
+ if (pdf_output > 0) {
+ if (pdf_output == 2009)
+ o_mode = OMODE_LUA;
+ else
+ o_mode = OMODE_PDF;
+ } else
+ o_mode = OMODE_DVI;
+ return o_mode;
+}
@ |fix_o_mode| freezes |pdf->o_mode| as soon as anything goes through
the backend, be it \.{PDF}, \.{DVI}, or \.{Lua}.
@c
-#define pdf_output int_par(pdf_output_code)
-
void fix_o_mode(PDF pdf)
{
- static int fixed_pdf_output = 0;
- if (pdf->o_mode == OMODE_NONE) {
- if (pdf_output > 0) {
- if (pdf_output == 2009)
- pdf->o_mode = OMODE_LUA;
- else
- pdf->o_mode = OMODE_PDF;
- } else
- pdf->o_mode = OMODE_DVI;
- fixed_pdf_output = pdf_output;
- pdf_output_value = pdf_output;
- } else if (pdf_output != fixed_pdf_output) {
+ output_mode o_mode = get_o_mode();
+ if (pdf->o_mode == OMODE_NONE)
+ pdf->o_mode = o_mode;
+ else if (pdf->o_mode != o_mode)
pdf_error("setup",
"\\pdfoutput can only be changed before anything is written to the output");
- }
}
-
@ This ensures that |pdfminorversion| is set only before any bytes have
been written to the generated \.{PDF} file. Here also all variables for
\.{PDF} output are initialized, the \.{PDF} file is opened by |ensure_pdf_open|,
@@ -214,10 +213,10 @@ void fix_pdf_minorversion(PDF pdf)
pdf->minor_version = pdf_minor_version;
} else {
/* Check that variables for \.{PDF} output are unchanged */
- if (pdf->minor_version != int_par(pdf_minor_version_code))
+ if (pdf->minor_version != pdf_minor_version)
pdf_error("setup",
"\\pdfminorversion cannot be changed after data is written to the PDF file");
- if (pdf->draftmode != int_par(pdf_draftmode_code))
+ if (pdf->draftmode != pdf_draftmode)
pdf_error("setup",
"\\pdfdraftmode cannot be changed after data is written to the PDF file");
}
@@ -227,19 +226,91 @@ void fix_pdf_minorversion(PDF pdf)
}
}
+@ @c
+#define ZIP_BUF_SIZE 32768
+
+#define check_err(f, fn) \
+ if (f != Z_OK) \
+ pdftex_fail("zlib: %s() failed (error code %d)", fn, f)
+
+@ @c
+static void write_zip(PDF pdf)
+{
+ int flush, err = Z_OK;
+ uInt zip_len;
+ z_stream *s = pdf->c_stream;
+ boolean finish = pdf->zip_write_state == zip_finish;
+ assert(pdf->compress_level > 0);
+ /* This was just to suppress the filename report in |pdftex_fail|
+ but zlib errors are rare enough (especially now that the
+ compress level is fixed) that I don't care about the slightly
+ ugly error message that could result.
+ */
+#if 0
+ cur_file_name = NULL;
+#endif
+ if (pdf->stream_length == 0) {
+ if (s == NULL) {
+ s = pdf->c_stream = xtalloc(1, z_stream);
+ s->zalloc = (alloc_func) 0;
+ s->zfree = (free_func) 0;
+ s->opaque = (voidpf) 0;
+ check_err(deflateInit(s, pdf->compress_level), "deflateInit");
+ assert(pdf->zipbuf == NULL);
+ pdf->zipbuf = xtalloc(ZIP_BUF_SIZE, char);
+ } else
+ check_err(deflateReset(s), "deflateReset");
+ s->next_out = (Bytef *) pdf->zipbuf;
+ s->avail_out = ZIP_BUF_SIZE;
+ }
+ assert(s != NULL);
+ assert(pdf->zipbuf != NULL);
+ s->next_in = pdf->buf;
+ s->avail_in = (uInt) pdf->ptr;
+ while (true) {
+ if (s->avail_out == 0 || (finish && s->avail_out < ZIP_BUF_SIZE)) {
+ zip_len = ZIP_BUF_SIZE - s->avail_out;
+ pdf->gone += (off_t) xfwrite(pdf->zipbuf, 1, zip_len, pdf->file);
+ pdf->last_byte = pdf->zipbuf[zip_len - 1];
+ s->next_out = (Bytef *) pdf->zipbuf;
+ s->avail_out = ZIP_BUF_SIZE;
+ }
+ if (finish) {
+ if (err == Z_STREAM_END) {
+ assert(s->avail_in == 0);
+ assert(s->avail_out == ZIP_BUF_SIZE);
+ xfflush(pdf->file);
+ break;
+ }
+ flush = Z_FINISH;
+ } else {
+ if (s->avail_in == 0)
+ break;
+ flush = Z_NO_FLUSH;
+ }
+ err = deflate(s, flush);
+ if (err != Z_OK && err != Z_STREAM_END)
+ pdftex_fail("zlib: deflate() failed (error code %d)", err);
+ }
+ pdf->stream_length = (off_t) s->total_out;
+}
+
+@ @c
+void zip_free(PDF pdf)
+{
+ if (pdf->zipbuf != NULL) {
+ check_err(deflateEnd(pdf->c_stream), "deflateEnd");
+ xfree(pdf->zipbuf);
+ }
+ xfree(pdf->c_stream);
+}
+
@ The PDF buffer is flushed by calling |pdf_flush|, which checks the
variable |zip_write_state| and will compress the buffer before flushing if
neccesary. We call |pdf_begin_stream| to begin a stream and |pdf_end_stream|
to finish it. The stream contents will be compressed if compression is turn on.
@c
-static void write_pdf(PDF pdf, int a, int b)
-{
- (void) fwrite((char *) &pdf->buf[a], sizeof(pdf->buf[a]),
- (size_t) ((b) - (a) + 1), pdf->file);
-}
-
-@ @c
void pdf_flush(PDF pdf)
{ /* flush out the |pdf_buf| */
@@ -250,18 +321,19 @@ void pdf_flush(PDF pdf)
case no_zip:
if (pdf->ptr > 0) {
if (pdf->draftmode == 0)
- write_pdf(pdf, 0, pdf->ptr - 1);
+ (void) xfwrite((char *) pdf->buf, sizeof(char),
+ (size_t) pdf->ptr, pdf->file);
pdf->gone += pdf->ptr;
pdf->last_byte = pdf->buf[pdf->ptr - 1];
}
break;
case zip_writing:
if (pdf->draftmode == 0)
- write_zip(pdf, false);
+ write_zip(pdf);
break;
case zip_finish:
if (pdf->draftmode == 0)
- write_zip(pdf, true);
+ write_zip(pdf);
pdf->zip_write_state = no_zip;
break;
}
@@ -275,7 +347,7 @@ void pdf_flush(PDF pdf)
@ switch between PDF stream and object stream mode
@c
-void pdf_os_switch(PDF pdf, boolean pdf_os)
+static void pdf_os_switch(PDF pdf, boolean pdf_os)
{
if (pdf_os && pdf->os_enable) {
if (!pdf->os_mode) { /* back up PDF stream variables */
@@ -299,15 +371,14 @@ void pdf_os_switch(PDF pdf, boolean pdf_os)
@ create new \.{/ObjStm} object if required, and set up cross reference info
@c
-void pdf_os_prepare_obj(PDF pdf, int i, int pdf_os_level)
+static void pdf_os_prepare_obj(PDF pdf, int i, int pdf_os_level)
{
pdf_os_switch(pdf, ((pdf_os_level > 0)
&& (pdf->objcompresslevel >= pdf_os_level)));
if (pdf->os_mode) {
if (pdf->os_cur_objnum == 0) {
- pdf_create_obj(pdf, obj_type_objstm, pdf->sys_obj_ptr + 1);
- pdf->os_cur_objnum = pdf->sys_obj_ptr;
- pdf->obj_ptr--; /* object stream is not accessible to user */
+ pdf->os_cur_objnum =
+ pdf_create_obj(pdf, obj_type_objstm, pdf->obj_ptr + 1);
pdf->os_cntr++; /* only for statistics */
pdf->os_idx = 0;
pdf->ptr = 0; /* start fresh object stream */
@@ -385,30 +456,27 @@ void pdf_print_char(PDF pdf, int c)
pdf_print_escaped(c);
}
-void pdf_print_wide_char(PDF pdf, int c)
+@ @c
+void pdf_out_block(PDF pdf, const char *s, size_t n)
{
- char hex[5];
- snprintf(hex, 5, "%04X", c);
- pdf_room(pdf, 4);
- pdf_quick_out(pdf, (unsigned char) hex[0]);
- pdf_quick_out(pdf, (unsigned char) hex[1]);
- pdf_quick_out(pdf, (unsigned char) hex[2]);
- pdf_quick_out(pdf, (unsigned char) hex[3]);
+ size_t l;
+ do {
+ l = n;
+ if ((int) l > pdf->buf_size)
+ l = (size_t) pdf->buf_size;
+ pdf_room(pdf, (int) l);
+ (void) memcpy(pdf->buf + pdf->ptr, s, l);
+ pdf->ptr += (int) l;
+ s += l;
+ n -= l;
+ } while (n > 0);
}
-@ @c
-void pdf_puts(PDF pdf, const char *s)
+void pdf_print_wide_char(PDF pdf, int c)
{
-
- size_t l = strlen(s);
- if (l < (size_t) pdf->buf_size) {
- pdf_room(pdf, (int) l);
- while (*s != '\0')
- pdf_quick_out(pdf, *s++);
- } else {
- while (*s != '\0')
- pdf_out(pdf, *s++);
- }
+ char hex[5];
+ snprintf(hex, 5, "%04X", c);
+ pdf_out_block(pdf, (const char *) hex, 4);
}
@ @c
@@ -429,15 +497,15 @@ void pdf_printf(PDF pdf, const char *fmt, ...)
@c
void pdf_print(PDF pdf, str_number s)
{
- if (s < number_chars) {
+ const char *ss;
+ size_t l;
+ if (s >= STRING_OFFSET) {
+ ss = (const char *) str_string(s);
+ l = str_length(s);
+ pdf_out_block(pdf, ss, l);
+ } else {
assert(s < 256);
pdf_out(pdf, s);
- } else {
- unsigned char *k, *j;
- j = str_string(s) + str_length(s);
- for (k = str_string(s); k < j; k++) {
- pdf_out(pdf, *k);
- }
}
}
@@ -467,7 +535,7 @@ void pdf_print_int(PDF pdf, longinteger n)
}
do {
dig[k++] = (int) (n % 10);
- n = n / 10;
+ n /= 10;
} while (n != 0);
pdf_room(pdf, k);
while (k-- > 0) {
@@ -493,7 +561,7 @@ void pdf_print_real(PDF pdf, int m, int d)
d--;
}
while (m % 10 == 0)
- m = m / 10;
+ m /= 10;
pdf_print_int(pdf, m);
}
}
@@ -554,6 +622,18 @@ void pdf_begin_stream(PDF pdf)
}
}
+@ @c
+static void write_stream_length(PDF pdf, int length, longinteger offset)
+{
+ if (jobname_cstr == NULL)
+ jobname_cstr = makecstring(job_name);
+ if (pdf->draftmode == 0) {
+ xfseeko(pdf->file, (off_t) offset, SEEK_SET, jobname_cstr);
+ fprintf(pdf->file, "%li", (long int) length);
+ xfseeko(pdf->file, pdf_offset(pdf), SEEK_SET, jobname_cstr);
+ }
+}
+
@ end a stream
@c
void pdf_end_stream(PDF pdf)
@@ -567,8 +647,8 @@ void pdf_end_stream(PDF pdf)
write_stream_length(pdf, (int) pdf->stream_length,
pdf->stream_length_offset);
pdf->seek_write_length = false;
- if (pdf->last_byte != pdf_new_line_char)
- pdf_out(pdf, pdf_new_line_char);
+ if (pdf->last_byte != pdf_newline_char)
+ pdf_out(pdf, pdf_newline_char);
pdf_puts(pdf, "endstream\n");
pdf_end_obj(pdf);
}
@@ -579,7 +659,6 @@ void pdf_remove_last_space(PDF pdf)
pdf->ptr--;
}
-
@ To print |scaled| value to PDF output we need some subroutines to ensure
accurary.
@@ -592,14 +671,16 @@ scaled one_hundred_inch = 7227 * 65536;
/* scaled value corresponds to 1in (rounded to 4736287) */
scaled one_inch = (7227 * 65536 + 50) / 100;
- /* scaled value corresponds to 1truein (rounded!) */
+/* scaled value corresponds to 1truein (rounded!) */
scaled one_true_inch = (7227 * 65536 + 50) / 100;
/* scaled value corresponds to 100bp */
scaled one_hundred_bp = (7227 * 65536) / 72;
/* scaled value corresponds to 1bp (rounded to 65782) */
-scaled one_bp = ((7227 * 65536) / 72 + 50) / 100;
+/* changed on 20110411 to be exactly 65781, as in tex itself,
+ because this value is also used for \pdfpxdimen */
+scaled one_bp = 65781;
/* $10^0..10^9$ */
int ten_pow[10] = {
@@ -612,7 +693,7 @@ digits of precision. It is defined in C because it is a good candidate
for optimizations that are not possible in pascal.
@c
-scaled round_xn_over_d(scaled x, int n, int d)
+scaled round_xn_over_d(scaled x, int n, unsigned int d)
{
boolean positive; /* was |x>=0|? */
unsigned t, u, v; /* intermediate quantities */
@@ -630,7 +711,7 @@ scaled round_xn_over_d(scaled x, int n, int d)
else
u = 0100000 * (u / d) + (v / d);
v = v % d;
- if (2 * v >= (unsigned) d)
+ if (2 * v >= d)
u++;
if (positive)
return (scaled) u;
@@ -703,7 +784,6 @@ void addto_page_resources(PDF pdf, pdf_obj_type t, int k)
void **pp;
pdf_object_list *p, *item = NULL;
assert(pdf != NULL);
- /* assert(obj_type(pdf, k) == t); *//* TODO, not yet strictly true */
re = pdf->page_resources;
assert(re != NULL);
assert(t <= PDF_OBJ_TYPE_MAX);
@@ -726,19 +806,21 @@ void addto_page_resources(PDF pdf, pdf_obj_type t, int k)
("addto_page_resources(): avl_probe() out of memory in insertion");
}
if (pr->list == NULL) {
- item = xmalloc(sizeof(pdf_object_list));
+ item = xtalloc(1, pdf_object_list);
item->link = NULL;
item->info = k;
pr->list = item;
- set_obj_scheduled(pdf, k); /* k is an object number */
+ if (obj_type(pdf, k) == (int)t)
+ set_obj_scheduled(pdf, k); /* k is an object number */
} else {
for (p = pr->list; p->info != k && p->link != NULL; p = p->link);
if (p->info != k) {
- item = xmalloc(sizeof(pdf_object_list));
+ item = xtalloc(1, pdf_object_list);
item->link = NULL;
item->info = k;
p->link = item;
- set_obj_scheduled(pdf, k);
+ if (obj_type(pdf, k) == (int)t)
+ set_obj_scheduled(pdf, k);
}
}
}
@@ -797,38 +879,34 @@ static void destroy_page_resources_tree(PDF pdf)
@* Subroutines to print out various PDF objects.
-@ print out an integer with fixed width; used for outputting cross-reference table
+@ print out an integer |n| with fixed width |w|; used for outputting cross-reference table
@c
-void pdf_print_fw_int(PDF pdf, longinteger n, int w)
+static void pdf_print_fw_int(PDF pdf, longinteger n, size_t w)
{
int k; /* $0\le k\le23$ */
- int dig[24];
- k = 0;
+ unsigned char digits[24];
+ k = (int) w;
do {
- dig[k] = (int) (n % 10);
- n = n / 10;
- k++;
- } while (k != w);
- pdf_room(pdf, k);
- while (k-- > 0)
- pdf_quick_out(pdf, (unsigned char) ('0' + dig[k]));
+ k--;
+ digits[k] = (unsigned char) ('0' + (n % 10));
+ n /= 10;
+ } while (k != 0);
+ pdf_out_block(pdf, (const char *) digits, w);
}
-@ print out an integer as a number of bytes; used for outputting \.{/XRef} cross-reference stream
+@ print out an integer |n| as a fixed number |w| of bytes; used for outputting \.{/XRef} cross-reference stream
@c
-void pdf_out_bytes(PDF pdf, longinteger n, int w)
+static void pdf_out_bytes(PDF pdf, longinteger n, size_t w)
{
int k;
- int bytes[8]; /* digits in a number being output */
- k = 0;
+ unsigned char bytes[8]; /* digits in a number being output */
+ k = (int) w;
do {
- bytes[k] = (int) (n % 256);
- n = n / 256;
- k++;
- } while (k != w);
- pdf_room(pdf, k);
- while (k-- > 0)
- pdf_quick_out(pdf, bytes[k]);
+ k--;
+ bytes[k] = (unsigned char) (n % 256);
+ n /= 256;
+ } while (k != 0);
+ pdf_out_block(pdf, (const char *) bytes, w);
}
@ print out an entry in dictionary with integer value to PDF buffer
@@ -1062,42 +1140,6 @@ void ensure_output_state(PDF pdf, output_state s)
}
}
-@ begin a PDF dictionary object
-@c
-void pdf_begin_dict(PDF pdf, int i, int pdf_os_level)
-{
- ensure_output_state(pdf, ST_HEADER_WRITTEN);
- pdf_os_prepare_obj(pdf, i, pdf_os_level);
- if (!pdf->os_mode) {
- pdf_printf(pdf, "%d 0 obj <<\n", (int) i);
- } else {
- if (pdf->compress_level == 0)
- pdf_printf(pdf, "%% %d 0 obj\n", (int) i); /* debugging help */
- pdf_puts(pdf, "<<\n");
- }
-}
-
-@ begin a new PDF dictionary object
-@c
-void pdf_new_dict(PDF pdf, int t, int i, int pdf_os)
-{
- pdf_create_obj(pdf, t, i);
- pdf_begin_dict(pdf, pdf->obj_ptr, pdf_os);
-}
-
-@ end a PDF dictionary object
-@c
-void pdf_end_dict(PDF pdf)
-{
- if (pdf->os_mode) {
- pdf_puts(pdf, ">>\n");
- if (pdf->os_idx == pdf_os_max_objs - 1)
- pdf_os_write_objstream(pdf);
- } else {
- pdf_puts(pdf, ">> endobj\n");
- }
-}
-
@ Write out an accumulated object stream.
First the object number and byte offset pairs are generated
@@ -1108,7 +1150,7 @@ copied to the PDF output buffer, where also compression is done.
When calling this procedure, |pdf_os_mode| must be |true|.
@c
-void pdf_os_write_objstream(PDF pdf)
+static void pdf_os_write_objstream(PDF pdf)
{
halfword i, j, p, q;
if (pdf->os_cur_objnum == 0) /* no object stream started */
@@ -1120,7 +1162,7 @@ void pdf_os_write_objstream(PDF pdf)
pdf_printf(pdf, "%d %d", (int) pdf->os_obj[i].num,
(int) pdf->os_obj[i].off);
if (j == 9) { /* print out in groups of ten for better readability */
- pdf_out(pdf, pdf_new_line_char);
+ pdf_out(pdf, pdf_newline_char);
j = 0;
} else {
pdf_out(pdf, ' ');
@@ -1128,19 +1170,16 @@ void pdf_os_write_objstream(PDF pdf)
}
i++;
}
- pdf->buf[pdf->ptr - 1] = pdf_new_line_char; /* no risk of flush, as we are in |pdf_os_mode| */
+ pdf->buf[pdf->ptr - 1] = pdf_newline_char; /* no risk of flush, as we are in |pdf_os_mode| */
q = pdf->ptr;
pdf_begin_dict(pdf, pdf->os_cur_objnum, 0); /* switch to PDF stream writing */
pdf_puts(pdf, "/Type /ObjStm\n");
pdf_printf(pdf, "/N %d\n", (int) (pdf->os_idx + 1));
pdf_printf(pdf, "/First %d\n", (int) (q - p));
pdf_begin_stream(pdf);
- pdf_room(pdf, q - p); /* should always fit into the PDF output buffer */
- i = p;
- while (i < q) { /* write object number and byte offset pairs */
- pdf_quick_out(pdf, pdf->os_buf[i]);
- i++;
- }
+ /* write object number and byte offset pairs;
+ |q - p| should always fit into the PDF output buffer */
+ pdf_out_block(pdf, (const char *) (pdf->os_buf + p), (size_t) (q - p));
i = 0;
while (i < p) {
q = i + pdf->buf_size;
@@ -1156,6 +1195,43 @@ void pdf_os_write_objstream(PDF pdf)
pdf->os_cur_objnum = 0; /* to force object stream generation next time */
}
+@ begin a PDF dictionary object
+@c
+void pdf_begin_dict(PDF pdf, int i, int pdf_os_level)
+{
+ ensure_output_state(pdf, ST_HEADER_WRITTEN);
+ pdf_os_prepare_obj(pdf, i, pdf_os_level);
+ if (!pdf->os_mode) {
+ pdf_printf(pdf, "%d 0 obj\n<<\n", (int) i);
+ } else {
+ if (pdf->compress_level == 0)
+ pdf_printf(pdf, "%% %d 0 obj\n", (int) i); /* debugging help */
+ pdf_puts(pdf, "<<\n");
+ }
+}
+
+@ begin a new PDF dictionary object
+@c
+int pdf_new_dict(PDF pdf, int t, int i, int pdf_os_level)
+{
+ int k = pdf_create_obj(pdf, t, i);
+ pdf_begin_dict(pdf, k, pdf_os_level);
+ return k;
+}
+
+@ end a PDF dictionary object
+@c
+void pdf_end_dict(PDF pdf)
+{
+ if (pdf->os_mode) {
+ pdf_puts(pdf, ">>\n");
+ if (pdf->os_idx == pdf_os_max_objs - 1)
+ pdf_os_write_objstream(pdf);
+ } else {
+ pdf_puts(pdf, ">>\nendobj\n");
+ }
+}
+
@ begin a PDF object
@c
void pdf_begin_obj(PDF pdf, int i, int pdf_os_level)
@@ -1171,10 +1247,11 @@ void pdf_begin_obj(PDF pdf, int i, int pdf_os_level)
@ begin a new PDF object
@c
-void pdf_new_obj(PDF pdf, int t, int i, int pdf_os)
+int pdf_new_obj(PDF pdf, int t, int i, int pdf_os_level)
{
- pdf_create_obj(pdf, t, i);
- pdf_begin_obj(pdf, pdf->obj_ptr, pdf_os);
+ int k = pdf_create_obj(pdf, t, i);
+ pdf_begin_obj(pdf, k, pdf_os_level);
+ return k;
}
@ end a PDF object
@@ -1189,18 +1266,6 @@ void pdf_end_obj(PDF pdf)
}
}
-@ @c
-void write_stream_length(PDF pdf, int length, longinteger offset)
-{
- if (jobname_cstr == NULL)
- jobname_cstr = makecstring(job_name);
- if (pdf->draftmode == 0) {
- xfseeko(pdf->file, (off_t) offset, SEEK_SET, jobname_cstr);
- fprintf(pdf->file, "%li", (long int) length);
- xfseeko(pdf->file, pdf_offset(pdf), SEEK_SET, jobname_cstr);
- }
-}
-
@ Converts any string given in in in an allowed PDF string which can be
handled by printf et.al.: \.{\\} is escaped to \.{\\\\}, parenthesis are escaped and
control characters are octal encoded.
@@ -1297,7 +1362,7 @@ static void convertStringToHexString(const char *in, char *out, int lin)
implementation using just the first two items.
@c
-void print_ID(PDF pdf, const char *file_name)
+static void print_ID(PDF pdf, const char *file_name)
{
time_t t;
size_t size;
@@ -1440,14 +1505,14 @@ void init_start_time(PDF pdf)
}
@ @c
-void print_creation_date(PDF pdf)
+static void print_creation_date(PDF pdf)
{
init_start_time(pdf);
pdf_printf(pdf, "/CreationDate (%s)\n", pdf->start_time_str);
}
@ @c
-void print_mod_date(PDF pdf)
+static void print_mod_date(PDF pdf)
{
init_start_time(pdf);
pdf_printf(pdf, "/ModDate (%s)\n", pdf->start_time_str);
@@ -1534,82 +1599,6 @@ void fb_free(PDF pdf)
}
@ @c
-#define ZIP_BUF_SIZE 32768
-
-#define check_err(f, fn) \
- if (f != Z_OK) \
- pdftex_fail("zlib: %s() failed (error code %d)", fn, f)
-
-@ @c
-void write_zip(PDF pdf, boolean finish)
-{
- int err;
- int level = pdf->compress_level;
- assert(level > 0);
- /* This was just to suppress the filename report in |pdftex_fail|
- but zlib errors are rare enough (especially now that the
- compress level is fixed) that I don't care about the slightly
- ugly error message that could result.
- */
-#if 0
- cur_file_name = NULL;
-#endif
- if (pdf->stream_length == 0) {
- if (pdf->zipbuf == NULL) {
- pdf->zipbuf = xtalloc(ZIP_BUF_SIZE, char);
- pdf->c_stream.zalloc = (alloc_func) 0;
- pdf->c_stream.zfree = (free_func) 0;
- pdf->c_stream.opaque = (voidpf) 0;
- check_err(deflateInit(&pdf->c_stream, level), "deflateInit");
- } else {
- check_err(deflateReset(&pdf->c_stream), "deflateReset");
- }
- pdf->c_stream.next_out = (Bytef *) pdf->zipbuf;
- pdf->c_stream.avail_out = ZIP_BUF_SIZE;
- }
- assert(pdf->zipbuf != NULL);
- pdf->c_stream.next_in = pdf->buf;
- pdf->c_stream.avail_in = (uInt) pdf->ptr;
- for (;;) {
- if (pdf->c_stream.avail_out == 0) {
- pdf->gone =
- pdf->gone + (off_t) xfwrite(pdf->zipbuf, 1, ZIP_BUF_SIZE,
- pdf->file);
- pdf->last_byte = pdf->zipbuf[ZIP_BUF_SIZE - 1]; /* not needed */
- pdf->c_stream.next_out = (Bytef *) pdf->zipbuf;
- pdf->c_stream.avail_out = ZIP_BUF_SIZE;
- }
- err = deflate(&pdf->c_stream, finish ? Z_FINISH : Z_NO_FLUSH);
- if (finish && err == Z_STREAM_END)
- break;
- check_err(err, "deflate");
- if (!finish && pdf->c_stream.avail_in == 0)
- break;
- }
- if (finish) {
- if (pdf->c_stream.avail_out < ZIP_BUF_SIZE) { /* at least one byte has been output */
- pdf->gone = pdf->gone +
- (off_t) xfwrite(pdf->zipbuf, 1,
- (size_t) (ZIP_BUF_SIZE -
- pdf->c_stream.avail_out), pdf->file);
- pdf->last_byte =
- pdf->zipbuf[ZIP_BUF_SIZE - pdf->c_stream.avail_out - 1];
- }
- xfflush(pdf->file);
- }
- pdf->stream_length = (off_t) pdf->c_stream.total_out;
-}
-
-@ @c
-void zip_free(PDF pdf)
-{
- if (pdf->zipbuf != NULL) {
- check_err(deflateEnd(&pdf->c_stream), "deflateEnd");
- free(pdf->zipbuf);
- }
-}
-
-@ @c
void pdf_error(const char *t, const char *p)
{
normalize_selector();
@@ -1661,15 +1650,9 @@ void check_o_mode(PDF pdf, const char *s, int o_mode_bitpattern, boolean strict)
in possibly wrong state until real output, ok.
*/
- if (pdf->o_mode == OMODE_NONE) {
- if (pdf_output > 0) {
- if (pdf_output == 2009)
- o_mode = OMODE_LUA;
- else
- o_mode = OMODE_PDF;
- } else
- o_mode = OMODE_DVI;
- } else
+ if (pdf->o_mode == OMODE_NONE)
+ o_mode = get_o_mode();
+ else
o_mode = pdf->o_mode;
if (!((1 << o_mode) & o_mode_bitpattern)) { /* warning or error */
switch (o_mode) {
@@ -1750,26 +1733,27 @@ char *get_resname_prefix(PDF pdf)
#define pdf_xform_attr equiv(pdf_xform_attr_loc)
#define pdf_xform_resources equiv(pdf_xform_resources_loc)
-void pdf_begin_page(PDF pdf, boolean shipping_page)
+void pdf_begin_page(PDF pdf)
{
- scaled form_margin = one_bp;
+ scaled form_margin = 0; /* was one_bp until SVN4066 */
ensure_output_state(pdf, ST_HEADER_WRITTEN);
init_pdf_pagecalculations(pdf);
if (pdf->page_resources == NULL) {
- pdf->page_resources = xmalloc(sizeof(pdf_resource_struct));
+ pdf->page_resources = xtalloc(1, pdf_resource_struct);
pdf->page_resources->resources_tree = NULL;
}
pdf->page_resources->last_resources = pdf_new_objnum(pdf);
reset_page_resources(pdf);
- if (shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
pdf->last_page = get_obj(pdf, obj_type_page, total_pages + 1, 0);
set_obj_aux(pdf, pdf->last_page, 1); /* mark that this page has been created */
- pdf_new_dict(pdf, obj_type_pagestream, 0, 0);
- pdf->last_stream = pdf->obj_ptr;
+ pdf->last_stream = pdf_new_dict(pdf, obj_type_pagestream, 0, 0);
pdf->last_thread = null;
+ pdflua_begin_page(pdf);
} else {
+ assert(global_shipping_mode == SHIPPING_FORM);
pdf_begin_dict(pdf, pdf_cur_form, 0);
pdf->last_stream = pdf_cur_form;
@@ -1798,7 +1782,7 @@ void pdf_begin_page(PDF pdf, boolean shipping_page)
}
/* Start stream of page/form contents */
pdf_begin_stream(pdf);
- if (shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
/* Adjust transformation matrix for the magnification ratio */
if (mag != 1000) {
pdf_print_real(pdf, mag, 3);
@@ -1807,35 +1791,52 @@ void pdf_begin_page(PDF pdf, boolean shipping_page)
pdf_puts(pdf, " 0 0 cm\n");
}
}
- pdf_shipout_begin(shipping_page);
+ pdf_shipout_begin();
- if (shipping_page)
+ if (global_shipping_mode == SHIPPING_PAGE)
pdf_out_colorstack_startpage(pdf);
}
@ @c
+void print_pdf_table_string(PDF pdf, const char *s)
+{
+ size_t len;
+ const char *ls;
+ lua_getglobal(Luas, "pdf"); /* t ... */
+ lua_pushstring(Luas, s); /* s t ... */
+ lua_gettable(Luas, -2); /* s? t ... */
+ if (lua_isstring(Luas, -1)) { /* s t ... */
+ ls = lua_tolstring(Luas, -1, &len);
+ pdf_out_block(pdf, ls, len);
+ pdf_out(pdf, '\n');
+ }
+ lua_pop(Luas, 2); /* ... */
+}
+
+@ @c
#define pdf_page_attr equiv(pdf_page_attr_loc)
#define pdf_page_resources equiv(pdf_page_resources_loc)
-void pdf_end_page(PDF pdf, boolean shipping_page)
+void pdf_end_page(PDF pdf)
{
- int j;
+ int j, annots = 0, beads = 0;
pdf_resource_struct *res_p = pdf->page_resources;
pdf_resource_struct local_page_resources;
- pdf_object_list *ol, *ol1;
+ pdf_object_list *annot_list, *bead_list, *link_list, *ol, *ol1;
scaledpos save_cur_page_size; /* to save |cur_page_size| during flushing pending forms */
+ shipping_mode_e save_shipping_mode;
int procset = PROCSET_PDF;
/* Finish stream of page/form contents */
pdf_goto_pagemode(pdf);
- pdf_shipout_end(shipping_page);
+ pdf_shipout_end();
pdf_end_stream(pdf);
- if (shipping_page) {
- /* Write out page object */
+ if (global_shipping_mode == SHIPPING_PAGE) {
+ pdf->last_pages = pdf_do_page_divert(pdf, pdf->last_page, 0);
+ /* Write out /Page object */
pdf_begin_dict(pdf, pdf->last_page, 1);
- pdf->last_pages = pdf_do_page_divert(pdf, pdf->last_page, 0);
pdf_puts(pdf, "/Type /Page\n");
pdf_indirect_ln(pdf, "Contents", pdf->last_stream);
pdf_indirect_ln(pdf, "Resources", res_p->last_resources);
@@ -1846,33 +1847,57 @@ void pdf_end_page(PDF pdf, boolean shipping_page)
pdf_puts(pdf, "]\n");
if (pdf_page_attr != null)
pdf_print_toks_ln(pdf, pdf_page_attr);
- if (pdf_pageattributes_toks != null) /* from Lua */
- pdf_print_toks_ln(pdf, pdf_pageattributes_toks);
+ print_pdf_table_string(pdf, "pageattributes");
pdf_indirect_ln(pdf, "Parent", pdf->last_pages);
- if (pdf->img_page_group_val > 0) {
+ if (pdf->img_page_group_val != 0) {
+ assert(pdf->img_page_group_val > 0);
pdf_printf(pdf, "/Group %d 0 R\n", pdf->img_page_group_val);
- pdf->img_page_group_val = 0;
}
+ annot_list = get_page_resources_list(pdf, obj_type_annot);
+ link_list = get_page_resources_list(pdf, obj_type_link);
+ if (annot_list != NULL || link_list != NULL) {
+ annots = pdf_create_obj(pdf, obj_type_annots, 0);
+ pdf_indirect_ln(pdf, "Annots", annots);
+ }
+ bead_list = get_page_resources_list(pdf, obj_type_bead);
+ if (bead_list != NULL) {
+ beads = pdf_create_obj(pdf, obj_type_beads, 0);
+ pdf_indirect_ln(pdf, "B", beads);
+ }
+ pdf_end_dict(pdf);
+ pdflua_end_page(pdf, annots, beads);
+
+ pdf->img_page_group_val = 0;
+
/* Generate array of annotations or beads in page */
- ol = get_page_resources_list(pdf, obj_type_annot);
- ol1 = get_page_resources_list(pdf, obj_type_link);
- if (ol != NULL || ol1 != NULL) {
- pdf_puts(pdf, "/Annots [ ");
- while (ol != NULL) {
- assert(ol->info > 0);
- pdf_print_int(pdf, ol->info);
+ if (annot_list != NULL || link_list != NULL) {
+ pdf_begin_obj(pdf, annots, 1);
+ pdf_puts(pdf, "[");
+ while (annot_list != NULL) {
+ assert(annot_list->info > 0);
+ pdf_print_int(pdf, annot_list->info);
pdf_puts(pdf, " 0 R ");
- ol = ol->link;
+ annot_list = annot_list->link;
}
- while (ol1 != NULL) {
- pdf_print_int(pdf, ol1->info);
+ while (link_list != NULL) {
+ pdf_print_int(pdf, link_list->info);
pdf_puts(pdf, " 0 R ");
- ol1 = ol1->link;
+ link_list = link_list->link;
}
pdf_puts(pdf, "]\n");
+ pdf_end_obj(pdf);
+ }
+ if (bead_list != NULL) {
+ pdf_begin_dict(pdf, beads, 1);
+ pdf_puts(pdf, "[");
+ while (bead_list != NULL) {
+ pdf_print_int(pdf, bead_list->info);
+ pdf_printf(pdf, " 0 R ");
+ bead_list = bead_list->link;
+ }
+ pdf_printf(pdf, "]\n");
+ pdf_end_dict(pdf);
}
- print_beads_list(pdf);
- pdf_end_dict(pdf);
}
/* Write out resource lists */
@@ -1894,11 +1919,13 @@ void pdf_end_page(PDF pdf, boolean shipping_page)
if (!is_obj_written(pdf, ol->info)) {
pdf_cur_form = ol->info;
save_cur_page_size = cur_page_size;
+ save_shipping_mode = global_shipping_mode;
pdf->page_resources = &local_page_resources;
local_page_resources.resources_tree = NULL;
- ship_out(pdf, obj_xform_box(pdf, pdf_cur_form), false);
+ ship_out(pdf, obj_xform_box(pdf, pdf_cur_form), SHIPPING_FORM);
/* Restore page size and page resources */
cur_page_size = save_cur_page_size;
+ global_shipping_mode = save_shipping_mode;
destroy_page_resources_tree(pdf);
pdf->page_resources = res_p;
}
@@ -1913,12 +1940,12 @@ void pdf_end_page(PDF pdf, boolean shipping_page)
ol = ol->link;
}
- if (shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
/* Write out pending PDF marks */
/* Write out PDF annotations */
ol = get_page_resources_list(pdf, obj_type_annot);
while (ol != NULL) {
- if (ol->info > 0) {
+ if (ol->info > 0 && obj_type(pdf, ol->info) == obj_type_annot) {
j = obj_annot_ptr(pdf, ol->info); /* |j| points to |pdf_annot_node| */
pdf_begin_dict(pdf, ol->info, 1);
pdf_puts(pdf, "/Type /Annot\n");
@@ -1967,11 +1994,10 @@ void pdf_end_page(PDF pdf, boolean shipping_page)
/* Write out resources dictionary */
pdf_begin_dict(pdf, res_p->last_resources, 1);
/* Print additional resources */
- if (shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
if (pdf_page_resources != null)
pdf_print_toks_ln(pdf, pdf_page_resources);
- if (pdf_pageresources_toks != null) /* from Lua */
- pdf_print_toks_ln(pdf, pdf_pageresources_toks);
+ print_pdf_table_string(pdf, "pageresources");
} else {
if (pdf_xform_resources != null)
pdf_print_toks_ln(pdf, pdf_xform_resources);
@@ -2045,9 +2071,6 @@ void pdf_end_page(PDF pdf, boolean shipping_page)
@* Finishing the PDF output file.
-@ @c
-#define pdf_gen_tounicode int_par(pdf_gen_tounicode_code)
-
@ Destinations that have been referenced but don't exists have
|obj_dest_ptr=null|. Leaving them undefined might cause troubles for
PDF browsers, so we need to fix them; they point to the last page.
@@ -2111,13 +2134,14 @@ static boolean substr_of_str(const char *s, const char *t)
return true;
}
-static void pdf_print_info(PDF pdf, int luatex_version, str_number luatex_revision)
+static int pdf_print_info(PDF pdf, int luatex_version,
+ str_number luatex_revision)
{ /* print info object */
boolean creator_given, producer_given, creationdate_given, moddate_given,
trapped_given;
char *s = NULL;
- int len = 0;
- pdf_new_dict(pdf, obj_type_others, 0, 3); /* keep Info readable unless explicitely forced */
+ int k, len = 0;
+ k = pdf_new_dict(pdf, obj_type_info, 0, 3); /* keep Info readable unless explicitely forced */
creator_given = false;
producer_given = false;
creationdate_given = false;
@@ -2140,7 +2164,6 @@ static void pdf_print_info(PDF pdf, int luatex_version, str_number luatex_revisi
pdf_out(pdf, '.');
pdf_print(pdf, luatex_revision);
pdf_puts(pdf, ")\n");
-
}
if (pdf_info_toks != null) {
if (len > 0) {
@@ -2164,6 +2187,7 @@ static void pdf_print_info(PDF pdf, int luatex_version, str_number luatex_revisi
}
pdf_str_entry_ln(pdf, "PTEX.Fullbanner", pdftex_banner);
pdf_end_dict(pdf);
+ return k;
}
static void build_free_object_list(PDF pdf)
@@ -2171,7 +2195,7 @@ static void build_free_object_list(PDF pdf)
int k, l;
l = 0;
set_obj_fresh(pdf, l); /* null object at begin of list of free objects */
- for (k = 1; k <= pdf->sys_obj_ptr; k++) {
+ for (k = 1; k <= pdf->obj_ptr; k++) {
if (!is_obj_written(pdf, k)) {
set_obj_link(pdf, l, k);
l = k;
@@ -2188,9 +2212,10 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
{
boolean res;
int i, j, k;
- int root, outlines, threads, names_tree;
- int xref_offset_width;
+ int root, info, xref_stm = 0, outlines, threads, names_tree;
+ size_t xref_offset_width;
int callback_id = callback_defined(stop_run_callback);
+ int callback_id1 = callback_defined(finish_pdffile_callback);
if (total_pages == 0) {
if (callback_id == 0) {
@@ -2204,6 +2229,8 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
if (pdf->draftmode == 0) {
pdf_flush(pdf); /* to make sure that the output file name has been already created */
flush_jbig2_page0_objects(pdf); /* flush page 0 objects from JBIG2 images, if any */
+ if (callback_id1 > 0)
+ res = run_callback(callback_id1, "->");
check_nonexisting_pages(pdf);
check_nonexisting_destinations(pdf);
@@ -2250,6 +2277,7 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
write_fontstuff(pdf);
pdf->last_pages = output_pages_tree(pdf);
+ pdflua_output_pages_tree(pdf);
/* Output outlines */
outlines = print_outlines(pdf);
@@ -2265,8 +2293,7 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
/* Output article threads */
if (pdf->head_tab[obj_type_thread] != 0) {
- pdf_new_obj(pdf, obj_type_others, 0, 1);
- threads = pdf->obj_ptr;
+ threads = pdf_new_obj(pdf, obj_type_others, 0, 1);
pdf_out(pdf, '[');
k = pdf->head_tab[obj_type_thread];
while (k != 0) {
@@ -2286,9 +2313,8 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
threads = 0;
}
- /* Output the catalog object */
- pdf_new_dict(pdf, obj_type_others, 0, 1);
- root = pdf->obj_ptr;
+ /* Output the /Catalog object */
+ root = pdf_new_dict(pdf, obj_type_catalog, 0, 1);
pdf_puts(pdf, "/Type /Catalog\n");
pdf_indirect_ln(pdf, "Pages", pdf->last_pages);
if (threads != 0)
@@ -2306,7 +2332,8 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
pdf_indirect_ln(pdf, "OpenAction", pdf_catalog_openaction);
pdf_end_dict(pdf);
- pdf_print_info(pdf, luatex_version, luatex_revision); /* last candidate for object stream */
+ /* last candidate for object stream */
+ info = pdf_print_info(pdf, luatex_version, luatex_revision); /* final object for pdf->os_enable == false */
if (pdf->os_enable) {
pdf_os_switch(pdf, true);
@@ -2314,12 +2341,12 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
pdf_flush(pdf);
pdf_os_switch(pdf, false);
/* Output the cross-reference stream dictionary */
- pdf_new_dict(pdf, obj_type_others, 0, 0);
- if ((obj_offset(pdf, pdf->sys_obj_ptr) / 256) > 16777215)
+ xref_stm = pdf_new_dict(pdf, obj_type_others, 0, 0); /* final object for pdf->os_enable == true */
+ if ((obj_offset(pdf, pdf->obj_ptr) / 256) > 16777215)
xref_offset_width = 5;
- else if (obj_offset(pdf, pdf->sys_obj_ptr) > 16777215)
+ else if (obj_offset(pdf, pdf->obj_ptr) > 16777215)
xref_offset_width = 4;
- else if (obj_offset(pdf, pdf->sys_obj_ptr) > 65535)
+ else if (obj_offset(pdf, pdf->obj_ptr) > 65535)
xref_offset_width = 3;
else
xref_offset_width = 2;
@@ -2331,10 +2358,10 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
pdf_puts(pdf, "]\n");
pdf_int_entry_ln(pdf, "Size", pdf->obj_ptr + 1);
pdf_puts(pdf, "/W [1 ");
- pdf_print_int(pdf, xref_offset_width);
+ pdf_print_int(pdf, (int) xref_offset_width);
pdf_puts(pdf, " 1]\n");
pdf_indirect_ln(pdf, "Root", root);
- pdf_indirect_ln(pdf, "Info", pdf->obj_ptr - 1);
+ pdf_indirect_ln(pdf, "Info", info);
if (pdf_trailer_toks != null) {
pdf_print_toks_ln(pdf, pdf_trailer_toks);
delete_token_ref(pdf_trailer_toks);
@@ -2343,7 +2370,7 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
print_ID(pdf, pdf->file_name);
pdf_print_nl(pdf);
pdf_begin_stream(pdf);
- for (k = 0; k <= pdf->sys_obj_ptr; k++) {
+ for (k = 0; k <= pdf->obj_ptr; k++) {
if (!is_obj_written(pdf, k)) { /* a free object */
pdf_out(pdf, 0);
pdf_out_bytes(pdf, obj_link(pdf, k), xref_offset_width);
@@ -2391,9 +2418,9 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
if (!pdf->os_enable) {
pdf_puts(pdf, "trailer\n");
pdf_puts(pdf, "<< ");
- pdf_int_entry_ln(pdf, "Size", pdf->sys_obj_ptr + 1);
+ pdf_int_entry_ln(pdf, "Size", pdf->obj_ptr + 1);
pdf_indirect_ln(pdf, "Root", root);
- pdf_indirect_ln(pdf, "Info", pdf->sys_obj_ptr);
+ pdf_indirect_ln(pdf, "Info", info);
if (pdf_trailer_toks != null) {
pdf_print_toks_ln(pdf, pdf_trailer_toks);
delete_token_ref(pdf_trailer_toks);
@@ -2404,7 +2431,7 @@ void finish_pdf_file(PDF pdf, int luatex_version, str_number luatex_revision)
}
pdf_puts(pdf, "startxref\n");
if (pdf->os_enable)
- pdf_print_int_ln(pdf, obj_offset(pdf, pdf->sys_obj_ptr));
+ pdf_print_int_ln(pdf, obj_offset(pdf, xref_stm));
else
pdf_print_int_ln(pdf, pdf_saved_offset(pdf));
pdf_puts(pdf, "%%EOF\n");
@@ -2470,8 +2497,7 @@ void scan_pdfcatalog(PDF pdf)
} else {
check_o_mode(pdf, "\\pdfcatalog", 1 << OMODE_PDF, true);
p = scan_action(pdf);
- pdf_new_obj(pdf, obj_type_others, 0, 1);
- pdf_catalog_openaction = pdf->obj_ptr;
+ pdf_catalog_openaction = pdf_new_obj(pdf, obj_type_others, 0, 1);
write_action(pdf, p);
pdf_end_obj(pdf);
delete_action_ref(p);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w b/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w
index 6eb6d9fc5b2..6e6c4b26dca 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfglyph.w 3703 2010-05-27 07:58:34Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/pdf/pdfglyph.w $";
+ "$Id: pdfglyph.w 4131 2011-04-11 13:41:26Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfglyph.w $";
#include "ptexlib.h"
@@ -107,16 +107,17 @@ static void print_tm(PDF pdf, pdffloat * tm)
}
@ @c
-static void set_textmatrix(PDF pdf, scaledpos pos, boolean force)
+static void set_textmatrix(PDF pdf, scaledpos pos)
{
boolean move;
pdfstructure *p = pdf->pstruct;
assert(is_textmode(p));
move = calc_pdfpos(p, pos);
- if (force || move) {
+ if (p->need_tm == 1 || move) {
print_tm(pdf, p->tm);
p->pdf.h.m = p->pdf_bt_pos.h.m + p->tm[4].m; /* Tm replaces */
p->pdf.v.m = p->pdf_bt_pos.v.m + p->tm[5].m;
+ p->need_tm = 0;
}
}
@@ -183,9 +184,9 @@ void pdf_place_glyph(PDF pdf, internal_font_number f, int c)
setup_fontparameters(pdf, f);
if (p->f_pdf != p->f_pdf_cur || p->fs.m != p->fs_cur.m) {
set_font(pdf);
- set_textmatrix(pdf, pos, true); /* force Tm setting */
- } else
- set_textmatrix(pdf, pos, false);
+ p->need_tm = 1; /* force Tm setting */
+ }
+ set_textmatrix(pdf, pos);
begin_chararray(pdf);
}
assert(is_charmode(p) || is_chararraymode(p));
@@ -197,7 +198,7 @@ void pdf_place_glyph(PDF pdf, internal_font_number f, int c)
&& (p->pdf_bt_pos.h.m + p->tm[4].m) != p->pdf.h.m)
|| abs(p->tj_delta.m) >= 1000000) {
pdf_goto_textmode(pdf);
- set_textmatrix(pdf, pos, false);
+ set_textmatrix(pdf, pos);
begin_chararray(pdf);
move = calc_pdfpos(p, pos);
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfimage.w b/Build/source/texk/web2c/luatexdir/pdf/pdfimage.w
index 5fbdc037912..cc1e20c1870 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfimage.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfimage.w
@@ -20,7 +20,7 @@
@ @c
static const char _svn_version[] =
"$Id: pdfimage.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfimage.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfimage.w $";
#include "ptexlib.h"
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdflink.w b/Build/source/texk/web2c/luatexdir/pdf/pdflink.w
index 517f0079a01..4cdfa711ed6 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdflink.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdflink.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdflink.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdflink.w $";
+ "$Id: pdflink.w 3891 2010-09-14 23:02:24Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdflink.w $";
#include "ptexlib.h"
@@ -37,7 +37,7 @@ void push_link_level(PDF pdf, halfword p)
if (pdf->link_stack_ptr >= pdf_max_link_level)
overflow("pdf link stack size", pdf_max_link_level);
assert(((type(p) == whatsit_node) && (subtype(p) == pdf_start_link_node)));
- incr(pdf->link_stack_ptr);
+ pdf->link_stack_ptr++;
pdf->link_stack[pdf->link_stack_ptr].nesting_level = cur_s;
pdf->link_stack[pdf->link_stack_ptr].link_node = copy_node_list(p);
pdf->link_stack[pdf->link_stack_ptr].ref_link_node = p;
@@ -48,7 +48,7 @@ void pop_link_level(PDF pdf)
{
assert(pdf->link_stack_ptr > 0);
flush_node_list(pdf->link_stack[pdf->link_stack_ptr].link_node);
- decr(pdf->link_stack_ptr);
+ pdf->link_stack_ptr--;
}
@ @c
@@ -57,7 +57,7 @@ void do_link(PDF pdf, halfword p, halfword parent_box, scaledpos cur)
scaled_whd alt_rule;
if (type(p) == vlist_node)
pdf_error("ext4", "\\pdfstartlink ended up in vlist");
- if (!is_shipping_page)
+ if (global_shipping_mode == SHIPPING_FORM)
pdf_error("ext4", "link annotations cannot be inside an XForm");
assert(type(parent_box) == hlist_node);
if (is_obj_scheduled(pdf, pdf_link_objnum(p)))
@@ -90,7 +90,7 @@ void end_link(PDF pdf, halfword p)
if (is_running(width(pdf->link_stack[pdf->link_stack_ptr].link_node))) {
q = pdf->link_stack[pdf->link_stack_ptr].ref_link_node;
- if (is_shipping_page && matrixused()) {
+ if (global_shipping_mode == SHIPPING_PAGE && matrixused()) {
matrixrecalculate(pos.h + pdf_link_margin);
pdf_ann_left(q) = getllx() - pdf_link_margin;
pdf_ann_top(q) = cur_page_size.v - getury() - pdf_link_margin;
@@ -128,6 +128,7 @@ node, in order to use |flush_node_list| to do the job.
void append_link(PDF pdf, halfword parent_box, scaledpos cur, small_number i)
{
halfword p;
+ int k;
scaled_whd alt_rule;
assert(type(parent_box) == hlist_node);
p = copy_node(pdf->link_stack[(int) i].link_node);
@@ -137,9 +138,9 @@ void append_link(PDF pdf, halfword parent_box, scaledpos cur, small_number i)
alt_rule.ht = height(p);
alt_rule.dp = depth(p);
set_rect_dimens(pdf, p, parent_box, cur, alt_rule, pdf_link_margin);
- pdf_create_obj(pdf, obj_type_others, 0);
- obj_annot_ptr(pdf, pdf->obj_ptr) = p;
- addto_page_resources(pdf, obj_type_link, pdf->obj_ptr);
+ k = pdf_create_obj(pdf, obj_type_others, 0);
+ obj_annot_ptr(pdf, k) = p;
+ addto_page_resources(pdf, obj_type_link, k);
}
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w b/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w
index 67be319082e..397c09902c7 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w
@@ -21,8 +21,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdflistout.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdflistout.w $";
+ "$Id: pdflistout.w 3891 2010-09-14 23:02:24Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdflistout.w $";
#include "ptexlib.h"
@@ -221,9 +221,9 @@ static halfword calculate_width_to_enddir(halfword p, real cur_glue,
case whatsit_node:
if (subtype(q) == dir_node) {
if (dir_dir(q) >= 0)
- incr(dir_nest);
+ dir_nest++;
else
- decr(dir_nest);
+ dir_nest--;
if (dir_nest == 0) {
enddir_ptr = q;
dir_cur_h(enddir_ptr) = w;
@@ -347,7 +347,7 @@ void hlist_out(PDF pdf, halfword this_box)
localpos.pos = refpos->pos;
localpos.dir = box_dir(this_box);
- incr(cur_s);
+ cur_s++;
if (cur_s > max_push)
max_push = cur_s;
@@ -782,7 +782,7 @@ void hlist_out(PDF pdf, halfword this_box)
dvi = save_dvi; /* DVI! */
}
}
- decr(cur_s);
+ cur_s--;
pdf->posstruct = refpos;
}
@@ -825,7 +825,7 @@ void vlist_out(PDF pdf, halfword this_box)
localpos.dir = box_dir(this_box);
synch_pos_with_cur(pdf->posstruct, refpos, cur);
- incr(cur_s);
+ cur_s++;
if (cur_s > max_push)
max_push = cur_s;
@@ -1134,6 +1134,6 @@ void vlist_out(PDF pdf, halfword this_box)
dvi = save_dvi; /* DVI! */
}
}
- decr(cur_s);
+ cur_s--;
pdf->posstruct = refpos;
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfliteral.w b/Build/source/texk/web2c/luatexdir/pdf/pdfliteral.w
index 36b90dfca1f..798036f80bd 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfliteral.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfliteral.w
@@ -1,5 +1,5 @@
% pdfliteral.w
-%
+%
% Copyright 2009-2010 Taco Hoekwater <taco@@luatex.org>
% This file is part of LuaTeX.
@@ -15,14 +15,14 @@
% License for more details.
% You should have received a copy of the GNU General Public License along
-% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
+% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
@ @c
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: pdfliteral.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfliteral.w $";
+ "$Id: pdfliteral.w 3733 2010-07-06 22:14:07Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfliteral.w $";
@ @c
void pdf_special(PDF pdf, halfword p)
@@ -49,6 +49,7 @@ void pdf_out_literal(PDF pdf, halfword p)
{
int old_setting; /* holds print |selector| */
str_number s;
+ pdfstructure *ps = pdf->pstruct;
if (pdf_literal_type(p) == normal) {
old_setting = selector;
selector = new_string;
@@ -69,6 +70,7 @@ void pdf_out_literal(PDF pdf, halfword p)
break;
case direct_always:
pdf_end_string_nl(pdf);
+ ps->need_tm = 1;
break;
default:
confusion("literal1");
@@ -78,7 +80,7 @@ void pdf_out_literal(PDF pdf, halfword p)
}
}
-@ test equality of start of strings
+@ test equality of start of strings
@c
static boolean str_in_cstr(str_number s, const char *r, unsigned i)
{
@@ -97,7 +99,10 @@ static boolean str_in_cstr(str_number s, const char *r, unsigned i)
@ @c
void pdf_literal(PDF pdf, str_number s, int literal_mode, boolean warn)
{
+ unsigned char *ss;
+ size_t l;
pool_pointer j = 0; /* current character code position, initialized to make the compiler happy */
+ pdfstructure *p = pdf->pstruct;
if (s >= STRING_OFFSET) { /* needed for |out_save| */
j = 0;
if (literal_mode == scan_special) {
@@ -131,21 +136,16 @@ void pdf_literal(PDF pdf, str_number s, int literal_mode, boolean warn)
break;
case direct_always:
pdf_end_string_nl(pdf);
+ p->need_tm = 1;
break;
default:
confusion("literal1");
break;
}
if (s >= STRING_OFFSET) {
- unsigned char *ss = str_string(s);
- size_t l = str_length(s) - (size_t) j;
- if (l < max_single_pdf_print) {
- pdf_out_block(pdf, (ss + j), l);
- } else {
-
- while (l--)
- pdf_out(pdf, *(ss + j++));
- }
+ ss = str_string(s);
+ l = str_length(s) - (size_t) j;
+ pdf_out_block(pdf, (const char *) (ss + j), l);
} else {
assert(s < 256);
pdf_out(pdf, s);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.h b/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.h
new file mode 100644
index 00000000000..69ddf3406ca
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.h
@@ -0,0 +1,30 @@
+/* pdfluaapi.h
+
+ Copyright 2009 Taco Hoekwater <taco@luatex.org>
+
+ This file is part of LuaTeX.
+
+ LuaTeX is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
+
+/* $Id: pdfluaapi.h 3949 2010-11-07 00:09:19Z hhenkel $ */
+
+#ifndef PDFLUAAPI_H
+# define PDFLUAAPI_H
+
+extern int new_pdflua(void);
+extern void pdflua_begin_page(PDF pdf);
+extern void pdflua_end_page(PDF pdf, int annots, int beads);
+extern void pdflua_output_pages_tree(PDF pdf);
+
+#endif /* PDFLUAAPI_H */
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.w b/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.w
new file mode 100644
index 00000000000..c434241f3de
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfluaapi.w
@@ -0,0 +1,115 @@
+% pdfluaapi.w
+%
+% Copyright 2010 Taco Hoekwater <taco@@luatex.org>
+
+% This file is part of LuaTeX.
+
+% LuaTeX is free software; you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation; either version 2 of the License, or (at your
+% option) any later version.
+
+% LuaTeX is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+% License for more details.
+
+% You should have received a copy of the GNU General Public License along
+% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
+
+@ @c
+static const char _svn_version[] =
+ "$Id: pdfluaapi.w 4066 2011-01-18 20:19:50Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfluaapi.w $";
+
+#include "ptexlib.h"
+
+@ @c
+int new_pdflua(void)
+{
+ int i, err;
+ Byte *uncompr;
+ zlib_struct *zp = (zlib_struct *) pdflua_zlib_struct_ptr;
+ uLong uncomprLen = zp->uncomprLen;
+ if ((uncompr = xtalloc(zp->uncomprLen, Byte)) == NULL)
+ pdftex_fail("new_pdflua(): xtalloc()");
+ err = uncompress(uncompr, &uncomprLen, zp->compr, zp->comprLen);
+ if (err != Z_OK)
+ pdftex_fail("new_pdflua(): uncompress()");
+ assert(uncomprLen == zp->uncomprLen);
+ if (luaL_loadbuffer(Luas, (const char *) uncompr, uncomprLen, "pdflua")
+ || lua_pcall(Luas, 0, 1, 0))
+ pdftex_fail("new_pdflua(): lua_pcall()");
+ luaL_checktype(Luas, -1, LUA_TTABLE); /* t */
+ i = luaL_ref(Luas, LUA_GLOBALSINDEX); /* - */
+ xfree(uncompr);
+ return i;
+}
+
+@ @c
+void pdflua_begin_page(PDF pdf)
+{
+ int err; /* ... */
+ lua_rawgeti(Luas, LUA_GLOBALSINDEX, pdf->pdflua_ref); /* t ... */
+ lua_pushstring(Luas, "beginpage"); /* s t ... */
+ lua_gettable(Luas, -2); /* f t ... */
+ lua_newtable(Luas); /* t f t ... */
+ lua_pushnumber(Luas, total_pages + 1); /* i t f t ... */
+ lua_setfield(Luas, -2, "pagenum"); /* t f t ... */
+ lua_pushnumber(Luas, pdf->last_page); /* i t f t ... */
+ lua_setfield(Luas, -2, "page_objnum"); /* t f t ... */
+ lua_pushnumber(Luas, pdf->last_stream); /* i t f t ... */
+ lua_setfield(Luas, -2, "stream_objnum"); /* t f t ... */
+ lua_pushnumber(Luas, pdf->page_resources->last_resources); /* i t f t ... */
+ lua_setfield(Luas, -2, "resources_objnum"); /* t f t ... */
+ err = lua_pcall(Luas, 1, 0, 0); /* (e) t ... */
+ if (err != 0)
+ pdftex_fail("pdflua.lua: beginpage()");
+ /* t ... */
+ lua_pop(Luas, 1); /* ... */
+}
+
+@ @c
+void pdflua_end_page(PDF pdf, int annots, int beads)
+{
+ int err; /* ... */
+ lua_rawgeti(Luas, LUA_GLOBALSINDEX, pdf->pdflua_ref); /* t ... */
+ lua_pushstring(Luas, "endpage"); /* s t ... */
+ lua_gettable(Luas, -2); /* f t ... */
+ lua_newtable(Luas); /* t f t ... */
+ lua_pushnumber(Luas, total_pages); /* i t f t ... */
+ lua_setfield(Luas, -2, "pagenum"); /* t f t ... */
+ lua_pushnumber(Luas, cur_page_size.h); /* i t f t ... */
+ lua_setfield(Luas, -2, "hsize"); /* t f t ... */
+ lua_pushnumber(Luas, cur_page_size.v); /* i t f t ... */
+ lua_setfield(Luas, -2, "vsize"); /* t f t ... */
+ if (annots != 0) {
+ lua_pushnumber(Luas, annots); /* i t f t ... */
+ lua_setfield(Luas, -2, "annots"); /* t f t ... */
+ }
+ if (beads != 0) {
+ lua_pushnumber(Luas, beads); /* i t f t ... */
+ lua_setfield(Luas, -2, "beads"); /* t f t ... */
+ }
+ if (pdf->img_page_group_val != 0) {
+ lua_pushnumber(Luas, pdf->img_page_group_val); /* i t f t ... */
+ lua_setfield(Luas, -2, "imggroup"); /* t f t ... */
+ }
+ err = lua_pcall(Luas, 1, 0, 0); /* (e) t ... */
+ if (err != 0)
+ pdftex_fail("pdflua.lua: endpage()");
+ /* t ... */
+ lua_pop(Luas, 1); /* ... */
+}
+
+@ @c
+void pdflua_output_pages_tree(PDF pdf)
+{
+ int err;
+ lua_rawgeti(Luas, LUA_GLOBALSINDEX, pdf->pdflua_ref); /* t */
+ lua_pushstring(Luas, "outputpagestree"); /* s t */
+ lua_gettable(Luas, -2); /* f */
+ err = lua_pcall(Luas, 0, 0, 0); /* - */
+ if (err != 0)
+ pdftex_fail("pdflua.lua: outputpagestree()");
+}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfobj.h b/Build/source/texk/web2c/luatexdir/pdf/pdfobj.h
index 35325a1e8bb..6b6f628b8ec 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfobj.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfobj.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfobj.h 3261 2009-12-18 11:38:21Z taco $ */
+/* $Id: pdfobj.h 3874 2010-09-11 22:22:05Z hhenkel $ */
#ifndef PDFOBJ_H
# define PDFOBJ_H
@@ -61,6 +61,8 @@ extern void init_obj_obj(PDF pdf, int k);
extern void pdf_write_obj(PDF pdf, int n);
extern void scan_obj(PDF pdf);
extern void scan_refobj(PDF pdf);
+extern void scan_refobj_lua(PDF pdf, int k);
extern void pdf_ref_obj(PDF pdf, halfword p);
+extern void pdf_ref_obj_lua(PDF pdf, int k);
#endif
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfobj.w b/Build/source/texk/web2c/luatexdir/pdf/pdfobj.w
index 8ad6319274f..2d370ddc54f 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfobj.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfobj.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfobj.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfobj.w $";
+ "$Id: pdfobj.w 4093 2011-03-16 16:17:06Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfobj.w $";
#include "ptexlib.h"
@@ -36,7 +36,7 @@ void pdf_write_obj(PDF pdf, int k)
{
lstring data;
const_lstring st;
- size_t i, li; /* index into |data.s| */
+ size_t li; /* index into |data.s| */
int saved_compress_level = pdf->compress_level;
int os_level = 1; /* gives compressed objects for \.{\\pdfobjcompresslevel} $>$ 0 */
int l = 0; /* possibly a lua registry reference */
@@ -54,8 +54,7 @@ void pdf_write_obj(PDF pdf, int k)
assert(lua_isstring(Luas, -1));
st.s = lua_tolstring(Luas, -1, &li);
st.l = li;
- for (i = 0; i < st.l; i++)
- pdf_out(pdf, st.s[i]);
+ pdf_out_block(pdf, st.s, st.l);
if (st.s[st.l - 1] != '\n')
pdf_out(pdf, '\n');
luaL_unref(Luas, LUA_REGISTRYINDEX, l);
@@ -69,6 +68,7 @@ void pdf_write_obj(PDF pdf, int k)
assert(lua_isstring(Luas, -1));
st.s = lua_tolstring(Luas, -1, &li);
st.l = li;
+ lua_pop(Luas,1);
if (obj_obj_is_file(pdf, k)) {
boolean res = false; /* callback status value */
const char *fnam = NULL; /* callback found filename */
@@ -100,15 +100,13 @@ void pdf_write_obj(PDF pdf, int k)
pdf_error("ext5", "error reading file for embedding");
tprint("<<");
tprint(st.s);
- for (i = 0; i < data.l; i++)
- pdf_out(pdf, data.s[i]);
+ pdf_out_block(pdf, (const char *) data.s, data.l);
if (!obj_obj_is_stream(pdf, k) && data.s[data.l - 1] != '\n')
pdf_out(pdf, '\n');
xfree(data.s);
tprint(">>");
} else {
- for (i = 0; i < st.l; i++)
- pdf_out(pdf, st.s[i]);
+ pdf_out_block(pdf, st.s, st.l);
if (!obj_obj_is_stream(pdf, k) && st.s[st.l - 1] != '\n')
pdf_out(pdf, '\n');
}
@@ -149,20 +147,18 @@ void scan_obj(PDF pdf)
get_x_token();
if (cur_cmd != spacer_cmd)
back_input();
- incr(pdf->obj_count);
- pdf_create_obj(pdf, obj_type_obj, pdf->sys_obj_ptr + 1);
- k = pdf->sys_obj_ptr;
+ pdf->obj_count++;
+ k = pdf_create_obj(pdf, obj_type_obj, pdf->obj_ptr + 1);
} else {
if (scan_keyword("useobjnum")) {
scan_int();
k = cur_val;
- check_obj_exists(pdf, obj_type_obj, k);
+ check_obj_type(pdf, obj_type_obj, k);
if (is_obj_scheduled(pdf, k) || obj_data_ptr(pdf, k) != 0)
luaL_error(Luas, "object in use");
} else {
- incr(pdf->obj_count);
- pdf_create_obj(pdf, obj_type_obj, pdf->sys_obj_ptr + 1);
- k = pdf->sys_obj_ptr;
+ pdf->obj_count++;
+ k = pdf_create_obj(pdf, obj_type_obj, pdf->obj_ptr + 1);
}
obj_data_ptr(pdf, k) = pdf_get_mem(pdf, pdfmem_obj_size);
init_obj_obj(pdf, k);
@@ -201,14 +197,28 @@ void scan_obj(PDF pdf)
void scan_refobj(PDF pdf)
{
scan_int();
- check_obj_exists(pdf, obj_type_obj, cur_val);
+ check_obj_type(pdf, obj_type_obj, cur_val);
new_whatsit(pdf_refobj_node);
pdf_obj_objnum(tail) = cur_val;
}
+void scan_refobj_lua(PDF pdf, int k)
+{
+ check_obj_type(pdf, obj_type_obj, k);
+ new_whatsit(pdf_refobj_node);
+ pdf_obj_objnum(tail) = k;
+}
+
@ @c
void pdf_ref_obj(PDF pdf, halfword p)
{
if (!is_obj_scheduled(pdf, pdf_obj_objnum(p)))
addto_page_resources(pdf, obj_type_obj, pdf_obj_objnum(p));
}
+
+@ @c
+void pdf_ref_obj_lua(PDF pdf, int k)
+{
+ if (!is_obj_scheduled(pdf, k))
+ addto_page_resources(pdf, obj_type_obj, k);
+}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w b/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w
index 7efaa479bf6..dc97c290f30 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: pdfoutline.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfoutline.w $";
+ "$Id: pdfoutline.w 3891 2010-09-14 23:02:24Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfoutline.w $";
@ Data structure of outlines; it's not able to write out outline entries
before all outline entries are defined, so memory allocated for outline
@@ -64,7 +64,7 @@ static int open_subentries(PDF pdf, halfword p)
if (obj_outline_first(pdf, p) != 0) {
l = obj_outline_first(pdf, p);
do {
- incr(k);
+ k++;
c = open_subentries(pdf, l);
if (obj_outline_count(pdf, l) > 0)
k = k + c;
@@ -89,7 +89,7 @@ static int outline_list_count(PDF pdf, pointer p)
{
int k = 1;
while (obj_outline_prev(pdf, p) != 0) {
- incr(k);
+ k++;
p = obj_outline_prev(pdf, p);
}
return k;
@@ -99,7 +99,7 @@ static int outline_list_count(PDF pdf, pointer p)
void scan_pdfoutline(PDF pdf)
{
halfword p, q, r;
- int i, j, k;
+ int i, j, k, l;
if (scan_keyword("attr")) {
scan_pdf_ext_toks();
r = def_ref;
@@ -115,17 +115,15 @@ void scan_pdfoutline(PDF pdf)
}
scan_pdf_ext_toks();
q = def_ref;
- pdf_new_obj(pdf, obj_type_others, 0, 1);
- j = pdf->obj_ptr;
+ j = pdf_new_obj(pdf, obj_type_others, 0, 1);
write_action(pdf, p);
pdf_end_obj(pdf);
delete_action_ref(p);
- pdf_create_obj(pdf, obj_type_outline, 0);
- k = pdf->obj_ptr;
+ k = pdf_create_obj(pdf, obj_type_outline, 0);
set_obj_outline_ptr(pdf, k, pdf_get_mem(pdf, pdfmem_outline_size));
set_obj_outline_action_objnum(pdf, k, j);
set_obj_outline_count(pdf, k, i);
- pdf_new_obj(pdf, obj_type_others, 0, 1);
+ l = pdf_new_obj(pdf, obj_type_others, 0, 1);
{
char *s = tokenlist_to_cstring(q, true, NULL);
pdf_print_str_ln(pdf, s);
@@ -133,7 +131,7 @@ void scan_pdfoutline(PDF pdf)
}
delete_token_ref(q);
pdf_end_obj(pdf);
- set_obj_outline_title(pdf, k, pdf->obj_ptr);
+ set_obj_outline_title(pdf, k, l);
set_obj_outline_prev(pdf, k, 0);
set_obj_outline_next(pdf, k, 0);
set_obj_outline_first(pdf, k, 0);
@@ -182,12 +180,11 @@ int print_outlines(PDF pdf)
int k, l, a;
int outlines;
if (pdf->first_outline != 0) {
- pdf_new_dict(pdf, obj_type_others, 0, 1);
- outlines = pdf->obj_ptr;
+ outlines = pdf_new_dict(pdf, obj_type_others, 0, 1);
l = pdf->first_outline;
k = 0;
do {
- incr(k);
+ k++;
a = open_subentries(pdf, l);
if (obj_outline_count(pdf, l) > 0)
k = k + a;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
index 1cd00ac0537..15d90288ea9 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
@@ -19,16 +19,16 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfpage.w 3703 2010-05-27 07:58:34Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/pdf/pdfpage.w $";
+ "$Id: pdfpage.w 4131 2011-04-11 13:41:26Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfpage.w $";
+
+#include "ptexlib.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include "ptexlib.h"
-
#define lround(a) (long) floor((a) + 0.5)
@ eternal constants
@@ -68,6 +68,7 @@ void init_pdf_pagecalculations(PDF pdf)
p->wmode = WMODE_H;
p->mode = PMODE_PAGE;
p->ishex = 0;
+ p->need_tm = 0;
p->k1 = ten_pow[p->pdf.h.e] / one_bp;
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfrule.w b/Build/source/texk/web2c/luatexdir/pdf/pdfrule.w
index 80385154163..4b70e9cfa31 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfrule.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfrule.w
@@ -20,7 +20,7 @@
@ @c
static const char _svn_version[] =
"$Id: pdfrule.w 3584 2010-04-02 17:45:55Z hhenkel $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfrule.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfrule.w $";
#include "ptexlib.h"
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w b/Build/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w
index 3f44429c059..5a5f4fea22d 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfsaverestore.w 3571 2010-04-02 13:50:45Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w $";
+ "$Id: pdfsaverestore.w 3676 2010-05-02 20:04:49Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfsaverestore.w $";
#include "ptexlib.h"
@@ -44,7 +44,7 @@ static void checkpdfsave(scaledpos pos)
}
pos_stack[pos_stack_used].pos.h = pos.h;
pos_stack[pos_stack_used].pos.v = pos.v;
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
pos_stack[pos_stack_used].matrix_stack = matrix_stack_used;
}
pos_stack_used++;
@@ -65,7 +65,7 @@ static void checkpdfrestore(scaledpos pos)
pdftex_warn("Misplaced \\pdfrestore by (%dsp, %dsp)", (int) diff.h,
(int) diff.v);
}
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
matrix_stack_used = pos_stack[pos_stack_used].matrix_stack;
}
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w b/Build/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w
index c597c51ee5d..0dbb8be7cc6 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfsetmatrix.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w $";
+ "$Id: pdfsetmatrix.w 3676 2010-05-02 20:04:49Z hhenkel $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfsetmatrix.w $";
#include "ptexlib.h"
@@ -91,7 +91,7 @@ static void pdfsetmatrix(const char *in, scaledpos pos)
matrix_entry x, *y, *z;
- if (page_mode) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
if (sscanf((const char *) in, " %lf %lf %lf %lf ",
&x.a, &x.b, &x.c, &x.d) != 4) {
pdftex_warn("Unrecognized format of \\pdfsetmatrix{%s}", in);
@@ -184,7 +184,7 @@ void matrixtransformrect(scaled llx, scaled lly, scaled urx, scaled ury)
{
scaled x1, x2, x3, x4, y1, y2, y3, y4;
- if (page_mode && matrix_stack_used > 0) {
+ if (global_shipping_mode == SHIPPING_PAGE && matrix_stack_used > 0) {
last_llx = llx;
last_lly = lly;
last_urx = urx;
@@ -207,7 +207,7 @@ void matrixtransformrect(scaled llx, scaled lly, scaled urx, scaled ury)
void matrixtransformpoint(scaled x, scaled y)
{
- if (page_mode && matrix_stack_used > 0) {
+ if (global_shipping_mode == SHIPPING_PAGE && matrix_stack_used > 0) {
do_matrixtransform(x, y, &ret_llx, &ret_lly);
} else {
ret_llx = x;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.h b/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.h
index 1070996a5ba..37e49a3b0d4 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.h
@@ -17,14 +17,14 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfshipout.h 2977 2009-08-08 12:49:35Z hhenkel $ */
+/* $Id: pdfshipout.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef PDFSHIPOUT_H
# define PDFSHIPOUT_H
-extern boolean is_shipping_page; /* set to |shipping_page| when |ship_out| starts */
+extern shipping_mode_e global_shipping_mode; /* set to |shipping_mode| when |ship_out| starts */
extern scaledpos shipbox_refpos; /* for \gleaders */
-extern void ship_out(PDF pdf, halfword p, boolean shipping_page);
+extern void ship_out(PDF pdf, halfword p, shipping_mode_e shipping_mode);
#endif
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.w b/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.w
index cb0a36ae256..f00ac0b2722 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfshipout.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfshipout.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfshipout.w $";
+ "$Id: pdfshipout.w 3891 2010-09-14 23:02:24Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfshipout.w $";
#include "ptexlib.h"
@@ -44,11 +44,11 @@ static const char _svn_version[] =
scaledpos shipbox_refpos;
@ |ship_out| is used to shipout a box to PDF or DVI mode.
-If |shipping_page| is not set then the output will be a Form object
-(only PDF), otherwise it will be a Page object.
+If |shipping_mode| is set to |SHIPPING_FORM| then the output will be a Form object
+(only PDF), and if it is set to |SHIPPING_PAGE| it will be a Page object.
@c
-void ship_out(PDF pdf, halfword p, boolean shipping_page)
+void ship_out(PDF pdf, halfword p, shipping_mode_e shipping_mode)
{
/* output the box |p| */
int j, k; /* indices to first ten count registers */
@@ -77,8 +77,8 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
print_ln();
tprint("Completed box being shipped out");
}
- is_shipping_page = shipping_page;
- if (shipping_page) {
+ global_shipping_mode = shipping_mode;
+ if (shipping_mode == SHIPPING_PAGE) {
if (pre_callback_id > 0)
(void) run_callback(pre_callback_id, "->");
else if (pre_callback_id == 0) {
@@ -89,7 +89,7 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
print_char('[');
j = 9;
while ((count(j) == 0) && (j > 0))
- decr(j);
+ j--;
for (k = 0; k <= j; k++) {
print_int(count(k));
if (k < j)
@@ -97,7 +97,7 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
}
}
}
- if ((tracing_output > 0) && shipping_page) {
+ if ((tracing_output > 0) && shipping_mode == SHIPPING_PAGE) {
print_char(']');
update_terminal();
begin_diagnostic();
@@ -106,7 +106,7 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
}
/* Ship box |p| out */
- if (shipping_page && box_dir(p) != page_direction)
+ if (shipping_mode == SHIPPING_PAGE && box_dir(p) != page_direction)
pdf_warning("\\shipout",
"\\pagedir != \\bodydir; "
"\\box\\outputbox may be placed wrongly on the page.", true,
@@ -139,7 +139,7 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
max_h = width(p) + h_offset;
/* Calculate page dimensions and margins */
- if (is_shipping_page) {
+ if (global_shipping_mode == SHIPPING_PAGE) {
if (page_width > 0)
cur_page_size.h = page_width;
else {
@@ -256,14 +256,14 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
switch (pdf->o_mode) {
case OMODE_DVI:
- assert(shipping_page);
+ assert(shipping_mode == SHIPPING_PAGE);
dvi_begin_page(pdf);
break;
case OMODE_PDF:
- pdf_begin_page(pdf, shipping_page);
+ pdf_begin_page(pdf);
break;
case OMODE_LUA:
- assert(shipping_page);
+ assert(shipping_mode == SHIPPING_PAGE);
lua_begin_page(pdf);
break;
default:
@@ -281,8 +281,8 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
assert(0);
}
- if (shipping_page)
- incr(total_pages);
+ if (shipping_mode == SHIPPING_PAGE)
+ total_pages++;
cur_s = -1;
/* Finish shipping */
@@ -292,7 +292,7 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
dvi_end_page(pdf);
break;
case OMODE_PDF:
- pdf_end_page(pdf, shipping_page);
+ pdf_end_page(pdf);
break;
case OMODE_LUA:
lua_end_page(pdf);
@@ -302,7 +302,8 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
}
DONE:
- if ((tracing_output <= 0) && (post_callback_id == 0) && shipping_page) {
+ if ((tracing_output <= 0) && (post_callback_id == 0)
+ && shipping_mode == SHIPPING_PAGE) {
print_char(']');
update_terminal();
}
@@ -323,10 +324,12 @@ void ship_out(PDF pdf, halfword p, boolean shipping_page)
print_int(dyn_used);
print_ln();
}
- if (shipping_page && (post_callback_id > 0))
+ if (shipping_mode == SHIPPING_PAGE && (post_callback_id > 0))
(void) run_callback(post_callback_id, "->");
/* Finish sheet {\sl Sync\TeX} information record */
if (int_par(synctex_code))
synctexteehs();
+
+ global_shipping_mode = NOT_SHIPPING;
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h
index f44c6b2a7c6..b5ee6b55266 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h
@@ -17,11 +17,13 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdftables.h 3261 2009-12-18 11:38:21Z taco $ */
+/* $Id: pdftables.h 4062 2011-01-11 20:47:28Z hhenkel $ */
#ifndef PDFTABLES_H
# define PDFTABLES_H
+const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1];
+
typedef enum {
union_type_int,
union_type_cstring,
@@ -68,7 +70,7 @@ well.
# define obj_info(pdf,A) pdf->obj_tab[(A)].u.int0 /* information representing identifier of this object */
# define obj_start(pdf,A) pdf->obj_tab[(A)].u.str0
# define obj_link(pdf,A) pdf->obj_tab[(A)].int1 /* link to the next entry in linked list */
-# define obj_offset(pdf,A) pdf->obj_tab[(A)].int2 /* negative (flags), or byte offset for this object in PDF
+# define obj_offset(pdf,A) pdf->obj_tab[(A)].int2 /* negative (flags), or byte offset for this object in PDF
output file, or object stream number for this object */
# define obj_os_idx(pdf,A) pdf->obj_tab[(A)].int3 /* index of this object in object stream */
# define obj_aux(pdf,A) pdf->obj_tab[(A)].v.int4 /* auxiliary pointer */
@@ -90,7 +92,7 @@ well.
# define is_obj_scheduled(pdf,A) (intcast(obj_offset(pdf,A))>-2)
# define is_obj_written(pdf,A) (intcast(obj_offset(pdf,A))>-1)
-/* NOTE: The data structure definitions for the nodes on the typesetting side are
+/* NOTE: The data structure definitions for the nodes on the typesetting side are
inside |nodes.h| */
/* Some constants */
@@ -98,9 +100,10 @@ well.
# define sup_pk_dpi 8000 /* max PK pixel density value from \.{texmf.cnf} */
extern int find_obj(PDF pdf, int t, int i, boolean byname);
-extern void check_obj_exists(PDF pdf, int t, int n);
+extern void check_obj_exists(PDF pdf, int objnum);
+extern void check_obj_type(PDF pdf, int t, int objnum);
extern int get_obj(PDF pdf, int t, int i, boolean byname);
-extern void pdf_create_obj(PDF pdf, int t, int i);
+extern int pdf_create_obj(PDF pdf, int t, int i);
extern int pdf_new_objnum(PDF pdf);
extern void set_rect_dimens(PDF pdf, halfword p, halfword parent_box,
@@ -116,21 +119,23 @@ extern void undump_pdftex_data(PDF pdf);
# define set_depth(A, B) depth(A) = (B)
/* interface definitions for eqtb locations */
-# define pdf_minor_version int_par(pdf_minor_version_code)
+# define pdf_compress_level int_par(pdf_compress_level_code)
# define pdf_decimal_digits int_par(pdf_decimal_digits_code)
+# define pdf_draftmode int_par(pdf_draftmode_code)
# define pdf_gamma int_par(pdf_gamma_code)
+# define pdf_gen_tounicode int_par(pdf_gen_tounicode_code)
+# define pdf_image_apply_gamma int_par(pdf_image_apply_gamma_code)
# define pdf_image_gamma int_par(pdf_image_gamma_code)
# define pdf_image_hicolor int_par(pdf_image_hicolor_code)
-# define pdf_image_apply_gamma int_par(pdf_image_apply_gamma_code)
-# define pdf_objcompresslevel int_par(pdf_objcompresslevel_code)
-# define pdf_draftmode int_par(pdf_draftmode_code)
# define pdf_inclusion_copy_font int_par(pdf_inclusion_copy_font_code)
# define pdf_inclusion_errorlevel int_par(pdf_inclusion_errorlevel_code)
-# define pdf_replace_font int_par(pdf_replace_font_code)
-# define pdf_pk_resolution int_par(pdf_pk_resolution_code)
+# define pdf_minor_version int_par(pdf_minor_version_code)
+# define pdf_move_chars int_par(pdf_move_chars_code)
+# define pdf_objcompresslevel int_par(pdf_objcompresslevel_code)
+# define pdf_output int_par(pdf_output_code)
# define pdf_pk_mode equiv(pdf_pk_mode_loc)
+# define pdf_pk_resolution int_par(pdf_pk_resolution_code)
+# define pdf_replace_font int_par(pdf_replace_font_code)
# define pdf_unique_resname int_par(pdf_unique_resname_code)
-# define pdf_compress_level int_par(pdf_compress_level_code)
-# define pdf_move_chars int_par(pdf_move_chars_code)
-#endif
+#endif /* PDFTABLES_H */
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftables.w b/Build/source/texk/web2c/luatexdir/pdf/pdftables.w
index 5db049c758e..b7f7869d3b4 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdftables.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdftables.w
@@ -19,33 +19,16 @@
@ @c
static const char _svn_version[] =
- "$Id: pdftables.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdftables.w $";
+ "$Id: pdftables.w 3908 2010-10-13 19:22:02Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdftables.w $";
#include "ptexlib.h"
-@ One AVL tree each for a few |obj_type| out of |0...PDF_OBJ_TYPE_MAX|
-
-@c
-/* mark which objects should be searchable through AVL tree */
-
-static int obj_in_tree[PDF_OBJ_TYPE_MAX + 1] = {
- 0, /* |obj_type_font = 0|, */
- 0, /* |obj_type_outline = 1|, */
- 1, /* |obj_type_dest = 2|, */
- 0, /* |obj_type_obj = 3|, */
- 0, /* |obj_type_xform = 4|, */
- 0, /* |obj_type_ximage = 5|, */
- 1, /* |obj_type_thread = 6|, */
- /* the ones below don't go into a linked list */
- 0, /* |obj_type_pagestream = 7|, */
- 1, /* |obj_type_page = 8|, */
- 0, /* |obj_type_pages = 9|, */
- 0, /* |obj_type_link = 10|, */
- 0, /* |obj_type_bead = 11|, */
- 0, /* |obj_type_annot = 12|, */
- 0, /* |obj_type_objstm = 13|, */
- 0 /* |obj_type_others = 14| */
+@ @c
+const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1] =
+ { "font", "outline", "dest", "obj", "xform", "ximage", "thread",
+ "pagestream", "page", "pages", "catalog", "info", "link", "annot", "annots",
+ "bead", "beads", "objstm", "others"
};
@ AVL sort oentry into |avl_table[]|
@@ -71,7 +54,7 @@ static int compare_info(const void *pa, const void *pb, void *param)
static void avl_put_obj(PDF pdf, int t, oentry * oe)
{
void **pp;
- assert(t >= 0 || t <= PDF_OBJ_TYPE_MAX || obj_in_tree[t] == 1);
+ assert(t >= 0 && t <= PDF_OBJ_TYPE_MAX);
if (pdf->obj_tree[t] == NULL) {
pdf->obj_tree[t] = avl_create(compare_info, NULL, &avl_xallocator);
if (pdf->obj_tree[t] == NULL)
@@ -106,7 +89,7 @@ static int avl_find_int_obj(PDF pdf, int t, int i)
{
oentry *p;
oentry tmp;
- assert(t >= 0 || t <= PDF_OBJ_TYPE_MAX || obj_in_tree[t] == 1);
+ assert(t >= 0 && t <= PDF_OBJ_TYPE_MAX);
tmp.u.int0 = i;
tmp.u_type = union_type_int;
if (pdf->obj_tree[t] == NULL)
@@ -121,7 +104,7 @@ static int avl_find_str_obj(PDF pdf, int t, char *s)
{
oentry *p;
oentry tmp;
- assert(t >= 0 || t <= PDF_OBJ_TYPE_MAX || obj_in_tree[t] == 1);
+ assert(t >= 0 && t <= PDF_OBJ_TYPE_MAX);
tmp.u.str0 = s;
tmp.u_type = union_type_cstring;
if (pdf->obj_tree[t] == NULL)
@@ -135,13 +118,13 @@ static int avl_find_str_obj(PDF pdf, int t, char *s)
@ Create an object with type |t| and identifier |i|
@c
-void pdf_create_obj(PDF pdf, int t, int i)
+int pdf_create_obj(PDF pdf, int t, int i)
{
int a;
char *ss = NULL;
- if (pdf->sys_obj_ptr == sup_obj_tab_size)
+ if (pdf->obj_ptr == sup_obj_tab_size)
overflow("indirect objects table size", (unsigned) pdf->obj_tab_size);
- if (pdf->sys_obj_ptr == pdf->obj_tab_size) {
+ if (pdf->obj_ptr == pdf->obj_tab_size) {
a = pdf->obj_tab_size / 5;
if (pdf->obj_tab_size < sup_obj_tab_size - a)
pdf->obj_tab_size = pdf->obj_tab_size + a;
@@ -151,8 +134,7 @@ void pdf_create_obj(PDF pdf, int t, int i)
xreallocarray(pdf->obj_tab, obj_entry,
(unsigned) pdf->obj_tab_size);
}
- incr(pdf->sys_obj_ptr);
- pdf->obj_ptr = pdf->sys_obj_ptr;
+ pdf->obj_ptr++;
obj_info(pdf, pdf->obj_ptr) = i;
obj_type(pdf, pdf->obj_ptr) = t;
set_obj_fresh(pdf, pdf->obj_ptr);
@@ -169,7 +151,9 @@ void pdf_create_obj(PDF pdf, int t, int i)
append_dest_name(pdf, makecstring(-obj_info(pdf, pdf->obj_ptr)),
pdf->obj_ptr);
}
+ return pdf->obj_ptr;
}
+
@ @c
int find_obj(PDF pdf, int t, int i, boolean byname)
{
@@ -209,12 +193,11 @@ int get_obj(PDF pdf, int t, int i, boolean byname)
}
if (r == 0) {
if (byname > 0) {
- pdf_create_obj(pdf, t, -s);
+ r = pdf_create_obj(pdf, t, -s);
s = 0;
} else {
- pdf_create_obj(pdf, t, i);
+ r = pdf_create_obj(pdf, t, i);
}
- r = pdf->obj_ptr;
if (t == obj_type_dest)
set_obj_dest_ptr(pdf, r, null);
}
@@ -228,16 +211,30 @@ int get_obj(PDF pdf, int t, int i, boolean byname)
@c
int pdf_new_objnum(PDF pdf)
{
- pdf_create_obj(pdf, obj_type_others, 0);
- return pdf->obj_ptr;
+ int k = pdf_create_obj(pdf, obj_type_others, 0);
+ return k;
}
-void check_obj_exists(PDF pdf, int t, int objnum)
+void check_obj_exists(PDF pdf, int objnum)
{
if (objnum < 0 || objnum > pdf->obj_ptr)
pdf_error("ext1", "cannot find referenced object");
- if (t != obj_type(pdf, objnum))
- pdf_error("ext1", "referenced object has wrong type");
+}
+
+void check_obj_type(PDF pdf, int t, int objnum)
+{
+ int u;
+ char *s;
+ check_obj_exists(pdf, objnum);
+ u = obj_type(pdf, objnum);
+ if (t != u) {
+ assert(t >= 0 && t <= PDF_OBJ_TYPE_MAX);
+ assert(u >= 0 && u <= PDF_OBJ_TYPE_MAX);
+ s = (char *) xtalloc(128, char);
+ snprintf(s, 127, "referenced object has wrong type %s; should be %s",
+ pdf_obj_typenames[u], pdf_obj_typenames[t]);
+ pdf_error("ext1", s);
+ }
}
@ @c
@@ -277,7 +274,7 @@ void set_rect_dimens(PDF pdf, halfword p, halfword parent_box, scaledpos cur,
pos_ll.v = pos_ur.v;
pos_ur.v = tmp.v;
}
- if (is_shipping_page && matrixused()) {
+ if (global_shipping_mode == SHIPPING_PAGE && matrixused()) {
matrixtransformrect(pos_ll.h, pos_ll.v, pos_ur.h, pos_ur.v);
pos_ll.h = getllx();
pos_ll.v = getlly();
@@ -333,9 +330,7 @@ void dump_pdftex_data(PDF pdf)
dump_int(x);
x = pdf->obj_ptr;
dump_int(x);
- x = pdf->sys_obj_ptr;
- dump_int(x);
- for (k = 1; k <= pdf->sys_obj_ptr; k++) {
+ for (k = 1; k <= pdf->obj_ptr; k++) {
x = obj_info(pdf, k);
dump_int(x);
x = obj_link(pdf, k);
@@ -348,7 +343,7 @@ void dump_pdftex_data(PDF pdf)
dump_int(x);
}
print_ln();
- print_int(pdf->sys_obj_ptr);
+ print_int(pdf->obj_ptr);
tprint(" indirect objects");
dump_int(pdf->obj_count);
dump_int(pdf->xform_count);
@@ -405,9 +400,7 @@ void undump_pdftex_data(PDF pdf)
pdf->obj_tab_size = x;
undump_int(x);
pdf->obj_ptr = x;
- undump_int(x);
- pdf->sys_obj_ptr = x;
- for (k = 1; k <= pdf->sys_obj_ptr; k++) {
+ for (k = 1; k <= pdf->obj_ptr; k++) {
undump_int(x);
obj_info(pdf, k) = x;
undump_int(x);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfthread.h b/Build/source/texk/web2c/luatexdir/pdf/pdfthread.h
index 45d50a4551f..c1671f4f0aa 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfthread.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfthread.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdfthread.h 3261 2009-12-18 11:38:21Z taco $ */
+/* $Id: pdfthread.h 3905 2010-10-02 20:29:20Z hhenkel $ */
#ifndef PDFTHREAD_H
# define PDFTHREADH
@@ -64,7 +64,6 @@ extern void pdf_fix_thread(PDF pdf, int t);
extern void out_thread(PDF pdf, int t);
extern void check_running_thread(PDF pdf, halfword this_box, scaledpos cur);
-extern void print_beads_list(PDF pdf);
extern void print_bead_rectangles(PDF pdf);
extern void flush_beads_list(void);
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfthread.w b/Build/source/texk/web2c/luatexdir/pdf/pdfthread.w
index f5baf228d25..72ba892fa50 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfthread.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfthread.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfthread.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfthread.w $";
+ "$Id: pdfthread.w 3905 2010-10-02 20:29:20Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfthread.w $";
#include "ptexlib.h"
@@ -34,7 +34,7 @@ static const char _svn_version[] =
void append_bead(PDF pdf, halfword p)
{
int a, b, c, t;
- if (!is_shipping_page)
+ if (global_shipping_mode == SHIPPING_FORM)
pdf_error("ext4", "threads cannot be inside an XForm");
t = get_obj(pdf, obj_type_thread, pdf_thread_id(p), pdf_thread_named_id(p));
b = pdf_new_objnum(pdf);
@@ -166,8 +166,7 @@ void pdf_fix_thread(PDF pdf, int t)
tprint(" has been referenced but does not exist, replaced by a fixed one");
print_ln();
print_ln();
- pdf_new_dict(pdf, obj_type_others, 0, 0);
- a = pdf->obj_ptr;
+ a = pdf_new_dict(pdf, obj_type_others, 0, 0);
pdf_indirect_ln(pdf, "T", t);
pdf_indirect_ln(pdf, "V", a);
pdf_indirect_ln(pdf, "N", a);
@@ -254,35 +253,21 @@ void check_running_thread(PDF pdf, halfword this_box, scaledpos cur)
}
@ @c
-void print_beads_list(PDF pdf)
-{
- pdf_object_list *k;
- if ((k = get_page_resources_list(pdf, obj_type_bead)) != NULL) {
- pdf_printf(pdf, "/B [ ");
- while (k != NULL) {
- pdf_print_int(pdf, k->info);
- pdf_printf(pdf, " 0 R ");
- k = k->link;
- }
- pdf_printf(pdf, "]\n");
- }
-}
-
-@ @c
void print_bead_rectangles(PDF pdf)
{
halfword i;
pdf_object_list *k;
+ int l;
if ((k = get_page_resources_list(pdf, obj_type_bead)) != NULL) {
while (k != NULL) {
- pdf_new_obj(pdf, obj_type_others, 0, 1);
+ l = pdf_new_obj(pdf, obj_type_others, 0, 1);
pdf_out(pdf, '[');
i = obj_bead_data(pdf, k->info); /* pointer to a whatsit or whatsit-like node */
pdf_print_rect_spec(pdf, i);
if (subtype(i) == pdf_thread_data_node) /* thanh says it mis be destroyed here */
flush_node(i);
pdf_printf(pdf, "]\n");
- set_obj_bead_rect(pdf, k->info, pdf->obj_ptr); /* rewrite |obj_bead_data| */
+ set_obj_bead_rect(pdf, k->info, l); /* rewrite |obj_bead_data| */
pdf_end_obj(pdf);
k = k->link;
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h
index 83b3c89a97e..255a156ef61 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h
@@ -17,12 +17,13 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: pdftypes.h 3341 2010-01-08 19:52:54Z hhenkel $ */
+/* $Id: pdftypes.h 3949 2010-11-07 00:09:19Z hhenkel $ */
#ifndef PDFTYPES_H
# define PDFTYPES_H
# include <zlib.h>
+# include "lua/luatex-api.h"
/* This stucture holds everything that is needed for the actual pdf generation.
@@ -109,6 +110,7 @@ typedef struct {
writing_mode wmode; /* PDF writing mode WMode (horizontal/vertical) */
pos_mode mode; /* current positioning mode */
int ishex; /* Whether the current char string is <> or () */
+ int need_tm; /* flag whether Tm needs to be set */
} pdfstructure;
typedef struct obj_entry_ {
@@ -131,7 +133,7 @@ typedef struct dest_name_entry_ {
int objnum; /* destination object number */
} dest_name_entry;
-# define pdf_max_link_level 10 /* maximum depth of link nesting */
+# define pdf_max_link_level 10/* maximum depth of link nesting */
typedef struct pdf_link_stack_record {
int nesting_level;
@@ -153,17 +155,21 @@ typedef enum {
/* |obj_type_thread| is the highest entry in |head_tab|, but there are a few
more linked lists that are handy: */
obj_type_pagestream = 7, /* Page stream objects */
- obj_type_page = 8, /* Page objects */
- obj_type_pages = 9, /* Pages objects */
- obj_type_link = 10, /* link objects */
- obj_type_bead = 11, /* thread bead objects */
- obj_type_annot = 12, /* annotation objects */
- obj_type_objstm = 13, /* /ObjStm objects */
- obj_type_others = 14 /* any other objects (also not linked in any list) */
+ obj_type_page = 8, /* /Page objects */
+ obj_type_pages = 9, /* /Pages objects */
+ obj_type_catalog = 10, /* /Catalog object */
+ obj_type_info = 11, /* /Info object */
+ obj_type_link = 12, /* link objects */
+ obj_type_annot = 13, /* annotation objects */
+ obj_type_annots = 14, /* /Annots objects */
+ obj_type_bead = 15, /* thread bead objects */
+ obj_type_beads = 16, /* /B objects (array of bead objects) */
+ obj_type_objstm = 17, /* /ObjStm objects */
+ obj_type_others = 18 /* any other objects (also not linked in any list) */
} pdf_obj_type;
# define HEAD_TAB_MAX 6 /* obj_type_thread */
-# define PDF_OBJ_TYPE_MAX 14 /* obj_type_others */
+# define PDF_OBJ_TYPE_MAX 18 /* obj_type_others */
typedef struct pdf_resource_struct_ {
struct avl_table *resources_tree;
@@ -223,7 +229,7 @@ typedef struct pdf_output_file_ {
size_t fb_limit;
char *zipbuf;
- z_stream c_stream; /* compression stream */
+ z_stream *c_stream; /* compression stream pointer */
int zip_write_state; /* which state of compression we are in */
int pk_scale_factor; /* this is just a preprocessed value that depends on
@@ -245,8 +251,7 @@ typedef struct pdf_output_file_ {
struct avl_table *obj_tree[PDF_OBJ_TYPE_MAX + 1]; /* this is useful for finding the objects back */
int pages_tail;
- int obj_ptr; /* user objects counter */
- int sys_obj_ptr; /* system objects counter, including object streams */
+ int obj_ptr; /* objects counter */
int last_pages; /* pointer to most recently generated pages object */
int last_page; /* pointer to most recently generated page object */
int last_stream; /* pointer to most recently generated stream */
@@ -284,6 +289,7 @@ typedef struct pdf_output_file_ {
int thread_level; /* depth of nesting of box containing the last thread */
int f_cur; /* TeX font number */
+ int pdflua_ref;
} pdf_output_file;
typedef pdf_output_file *PDF;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfxform.w b/Build/source/texk/web2c/luatexdir/pdf/pdfxform.w
index ab62fc465a1..724755f4ebc 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfxform.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfxform.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: pdfxform.w 3571 2010-04-02 13:50:45Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/pdf/pdfxform.w $";
+ "$Id: pdfxform.w 3908 2010-10-13 19:22:02Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfxform.w $";
#include "ptexlib.h"
@@ -72,9 +72,8 @@ void scan_pdfxform(PDF pdf)
{
int k;
halfword p;
- incr(pdf->xform_count);
- pdf_create_obj(pdf, obj_type_xform, pdf->xform_count);
- k = pdf->obj_ptr;
+ pdf->xform_count++;
+ k = pdf_create_obj(pdf, obj_type_xform, pdf->xform_count);
set_obj_data_ptr(pdf, k, pdf_get_mem(pdf, pdfmem_xform_size));
if (scan_keyword("attr")) {
scan_pdf_ext_toks();
@@ -109,7 +108,7 @@ void scan_pdfrefxform(PDF pdf)
scaled_whd alt_rule, dim, nat;
alt_rule = scan_alt_rule(); /* scans |<rule spec>| to |alt_rule| */
scan_int();
- check_obj_exists(pdf, obj_type_xform, cur_val);
+ check_obj_type(pdf, obj_type_xform, cur_val);
new_whatsit(pdf_refxform_node);
nat.wd = obj_xform_width(pdf, cur_val);
nat.ht = obj_xform_height(pdf, cur_val);
diff --git a/Build/source/texk/web2c/luatexdir/ptexlib.h b/Build/source/texk/web2c/luatexdir/ptexlib.h
index e26b84d7980..236b270cd5e 100644
--- a/Build/source/texk/web2c/luatexdir/ptexlib.h
+++ b/Build/source/texk/web2c/luatexdir/ptexlib.h
@@ -27,14 +27,14 @@
# define EXTERN extern
# include "luatex.h"
-# include "lib/lib.h"
+# include "lib/lib.h"
# ifdef MSVC
extern double rint(double x);
# endif
# if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
-extern char **suffixlist; /* in luainit.w */
+extern char **suffixlist; /* in luainit.w */
# endif
@@ -189,6 +189,7 @@ size_t T##_limit
# include "pdf/pdflink.h"
# include "pdf/pdflistout.h"
# include "pdf/pdfliteral.h"
+# include "pdf/pdfluaapi.h"
# include "pdf/pdfobj.h"
# include "pdf/pdfoutline.h"
# include "pdf/pdfrule.h"
@@ -200,17 +201,14 @@ size_t T##_limit
# include "lua/luagen.h"
+# include "luascripts/pdflua.h"
+
# include "font/luatexfont.h"
# include "font/mapfile.h"
# include "utils/utils.h"
# include "image/writejbig2.h"
# include "image/pdftoepdf.h"
-# include "ocp/ocp.h"
-# include "ocp/ocplist.h"
-# include "ocp/runocp.h"
-# include "ocp/readocp.h"
-
# include "lang/texlang.h"
# include "tex/textcodes.h"
@@ -271,6 +269,10 @@ void copy_pdf_literal(pointer r, pointer p);
void free_pdf_literal(pointer p);
void show_pdf_literal(pointer p);
+void copy_late_lua(pointer r, pointer p);
+void free_late_lua(pointer p);
+void show_late_lua(pointer p);
+
void load_tex_patterns(int curlang, halfword head);
void load_tex_hyphenation(int curlang, halfword head);
@@ -319,7 +321,6 @@ typedef enum {
find_image_file_callback,
find_format_file_callback,
find_read_file_callback, open_read_file_callback,
- find_ocp_file_callback, read_ocp_file_callback,
find_vf_file_callback, read_vf_file_callback,
find_data_file_callback, read_data_file_callback,
find_font_file_callback, read_font_file_callback,
@@ -347,6 +348,8 @@ typedef enum {
linebreak_filter_callback,
post_linebreak_filter_callback,
mlist_to_hlist_callback,
+ finish_pdffile_callback,
+ pre_dump_callback,
total_callbacks
} callback_callback_types;
@@ -354,6 +357,9 @@ extern int callback_set[];
extern int lua_active;
# define callback_defined(a) callback_set[a]
+/* # define callback_defined(a) debug_callback_defined(a) */
+
+extern int debug_callback_defined(int i);
extern int run_callback(int i, const char *values, ...);
extern int run_saved_callback(int i, const char *name, const char *values, ...);
@@ -414,8 +420,7 @@ extern void topenin(void);
extern str_number getjobname(str_number);
extern str_number makefullnamestring(void);
-
-extern KPSEDLL string kpathsea_version_string; /* from kpathsea/version.c */
+#include <kpathsea/version.h>
extern PDF static_pdf;
diff --git a/Build/source/texk/web2c/luatexdir/tex/align.w b/Build/source/texk/web2c/luatexdir/tex/align.w
index 8e21f7ed86a..827e2bc07ae 100644
--- a/Build/source/texk/web2c/luatexdir/tex/align.w
+++ b/Build/source/texk/web2c/luatexdir/tex/align.w
@@ -23,8 +23,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: align.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/align.w $";
+ "$Id: align.w 4044 2010-12-18 09:23:06Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/align.w $";
@ @c
void fin_align(void);
@@ -239,12 +239,14 @@ static void push_alignment(void)
vlink(p + 5) = cur_pre_tail;
align_ptr = p;
cur_head = new_node(temp_node, 0);
+ cur_pre_head = new_node(temp_node, 0);
}
static void pop_alignment(void)
{
pointer p; /* the top alignment stack node */
flush_node(cur_head);
+ flush_node(cur_pre_head);
p = align_ptr;
cur_pre_tail = vlink(p + 5);
cur_pre_head = vinfo(p + 5);
@@ -953,11 +955,11 @@ value is changed to zero and so is the next tabskip.
if (cur_list.mode_field == -vmode) {
type(q) = hlist_node;
- subtype(q) = 0;
+ subtype(q) = HLIST_SUBTYPE_ALIGNROW;
width(q) = width(p);
} else {
type(q) = vlist_node;
- subtype(q) = 0;
+ subtype(q) = HLIST_SUBTYPE_ALIGNROW;
height(q) = height(p);
}
glue_order(q) = glue_order(p);
@@ -1004,6 +1006,7 @@ value is changed to zero and so is the next tabskip.
vlink(u) = rr;
u = vlink(u);
t = t + width(s);
+ subtype(u) = HLIST_SUBTYPE_ALIGNCELL;
if (cur_list.mode_field == -vmode) {
width(u) = width(s);
} else {
@@ -1045,6 +1048,7 @@ value is changed to zero and so is the next tabskip.
}
width(r) = w;
type(r) = hlist_node;
+ subtype(r) = HLIST_SUBTYPE_ALIGNCELL;
} else {
/* Make the unset node |r| into a |vlist_node| of height |w|,
@@ -1076,9 +1080,10 @@ value is changed to zero and so is the next tabskip.
}
height(r) = w;
type(r) = vlist_node;
+ subtype(r) = HLIST_SUBTYPE_ALIGNCELL;
}
- subtype(r) = 0;
+ /* subtype(r) = 0; */
shift_amount(r) = 0;
if (u != hold_head) { /* append blank boxes to account for spanned nodes */
vlink(u) = vlink(r);
@@ -1104,6 +1109,7 @@ value is changed to zero and so is the next tabskip.
vlink(q) = null;
q = hpack(q, 0, additional, -1);
shift_amount(q) = o;
+ subtype(q) = HLIST_SUBTYPE_ALIGNCELL;
vlink(q) = r;
vlink(s) = q;
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/arithmetic.h b/Build/source/texk/web2c/luatexdir/tex/arithmetic.h
index 89dce4e4f74..6e809372ab6 100644
--- a/Build/source/texk/web2c/luatexdir/tex/arithmetic.h
+++ b/Build/source/texk/web2c/luatexdir/tex/arithmetic.h
@@ -17,15 +17,15 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: arithmetic.h 3477 2010-03-12 13:59:34Z taco $ */
+/* $Id: arithmetic.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef ARITHMETIC_H
# define ARITHMETIC_H
/* |incr| and |decr| are in texmfmp.h */
- /* #define incr(A) (A)++ *//* increase a variable by unity */
- /* #define decr(A) (A)-- *//* decrease a variable by unity */
+ /* #define incr(A) (A)++ *//* increase a variable by unity */
+ /* #define decr(A) (A)-- *//* decrease a variable by unity */
# define negate(A) (A)=-(A) /* change the sign of a variable */
diff --git a/Build/source/texk/web2c/luatexdir/tex/arithmetic.w b/Build/source/texk/web2c/luatexdir/tex/arithmetic.w
index 76ccbbf419e..f0f0adb5abd 100644
--- a/Build/source/texk/web2c/luatexdir/tex/arithmetic.w
+++ b/Build/source/texk/web2c/luatexdir/tex/arithmetic.w
@@ -24,7 +24,7 @@
static const char _svn_version[] =
"$Id: arithmetic.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/arithmetic.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/arithmetic.w $";
@ The principal computations performed by \TeX\ are done entirely in terms of
diff --git a/Build/source/texk/web2c/luatexdir/tex/buildpage.w b/Build/source/texk/web2c/luatexdir/tex/buildpage.w
index 2c2c8460464..bc6f61a15dc 100644
--- a/Build/source/texk/web2c/luatexdir/tex/buildpage.w
+++ b/Build/source/texk/web2c/luatexdir/tex/buildpage.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: buildpage.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/buildpage.w $";
+ "$Id: buildpage.w 4132 2011-04-11 14:04:10Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/buildpage.w $";
#include "ptexlib.h"
@@ -387,8 +387,8 @@ void build_page(void)
else
width(temp_ptr) = 0;
}
- vlink(q) = p;
- vlink(contrib_head) = q;
+ couple_nodes(q, p);
+ couple_nodes(contrib_head, q);
goto CONTINUE;
} else {
@@ -462,8 +462,8 @@ void build_page(void)
or extremely lucky, or both. */
q = new_node(inserting_node, n);
- vlink(q) = vlink(r);
- vlink(r) = q;
+ try_couple_nodes(q, vlink(r));
+ couple_nodes(r, q);
r = q;
ensure_vbox(n);
if (box(n) == null)
@@ -569,6 +569,7 @@ void build_page(void)
break;
default:
+ fprintf(stderr, "type(p)=%d\n", type(p));
confusion("page");
break;
}
@@ -691,20 +692,21 @@ void build_page(void)
}
/* Link node |p| into the current page and |goto done| */
- vlink(page_tail) = p;
+ couple_nodes(page_tail, p);
page_tail = p;
- vlink(contrib_head) = vlink(p);
+ try_couple_nodes(contrib_head,vlink(p));
vlink(p) = null;
goto DONE;
DONE1:
/* Recycle node |p| */
- vlink(contrib_head) = vlink(p);
+ try_couple_nodes(contrib_head,vlink(p));
vlink(p) = null;
if (int_par(saving_vdiscards_code) > 0) {
- if (page_disc == null)
+ if (page_disc == null) {
page_disc = p;
- else
- vlink(tail_page_disc) = p;
+ } else {
+ couple_nodes(tail_page_disc, p);
+ }
tail_page_disc = p;
} else {
flush_node_list(p);
@@ -871,10 +873,10 @@ void fire_up(halfword c)
}
/* Either append the insertion node |p| after node |q|, and remove it
from the current page, or delete |node(p)| */
- vlink(prev_p) = vlink(p);
+ try_couple_nodes(prev_p, vlink(p));
vlink(p) = null;
if (wait) {
- vlink(q) = p;
+ couple_nodes(q, p);
q = p;
incr(insert_penalties);
} else {
@@ -917,8 +919,8 @@ void fire_up(halfword c)
if (vlink(contrib_head) == null) {
contrib_tail = page_tail;
}
- vlink(page_tail) = vlink(contrib_head);
- vlink(contrib_head) = p;
+ couple_nodes(page_tail,vlink(contrib_head));
+ couple_nodes(contrib_head, p);
vlink(prev_p) = null;
}
save_vbadness = vbadness;
@@ -997,7 +999,7 @@ void fire_up(halfword c)
}
flush_node_list(page_disc);
page_disc = null;
- ship_out(static_pdf, box(output_box), true);
+ ship_out(static_pdf, box(output_box), SHIPPING_PAGE);
box(output_box) = null;
}
@@ -1037,14 +1039,14 @@ void resume_after_output(void)
}
if (tail != head) { /* current list goes after heldover insertions */
- vlink(page_tail) = vlink(head);
+ try_couple_nodes(page_tail, vlink(head));
page_tail = tail;
}
if (vlink(page_head) != null) { /* and both go before heldover contributions */
if (vlink(contrib_head) == null)
contrib_tail = page_tail;
- vlink(page_tail) = vlink(contrib_head);
- vlink(contrib_head) = vlink(page_head);
+ try_couple_nodes(page_tail, vlink(contrib_head));
+ try_couple_nodes(contrib_head, vlink(page_head));
vlink(page_head) = null;
page_tail = page_head;
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/commands.h b/Build/source/texk/web2c/luatexdir/tex/commands.h
index 88d012aaa5c..6c8ceec4570 100644
--- a/Build/source/texk/web2c/luatexdir/tex/commands.h
+++ b/Build/source/texk/web2c/luatexdir/tex/commands.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: commands.h 2899 2009-07-21 23:03:53Z oneiros $ */
+/* $Id: commands.h 4000 2010-11-28 13:58:35Z taco $ */
#ifndef COMMANDS_H
# define COMMANDS_H
@@ -143,14 +143,14 @@ typedef enum {
super_sub_script_cmd, /* explicit super- or subscript */
math_shift_cs_cmd, /* start- and endmath */
end_cs_name_cmd, /* end control sequence ( \.{\\endcsname} ) */
- char_ghost_cmd, /* \.{\\ghostleft}, \.{\\ghostright} character for kerning */
+ char_ghost_cmd, /* \.{\\leftghost}, \.{\\rightghost} character for kerning */
assign_local_box_cmd, /* box for guillemets \.{\\localleftbox} or \.{\\localrightbox} */
char_given_cmd, /* character code defined by \.{\\chardef} */
# define min_internal_cmd char_given_cmd
/* the smallest code that can follow \.{\\the} */
math_given_cmd, /* math code defined by \.{\\mathchardef} */
omath_given_cmd, /* math code defined by \.{\\omathchardef} */
- xmath_given_cmd, /* math code defined by \.{\\LuaTeXmathchardef} */
+ xmath_given_cmd, /* math code defined by \.{\\Umathchardef} */
last_item_cmd, /* most recent item ( \.{\\lastpenalty}, \.{\\lastkern}, \.{\\lastskip} ) */
# define max_non_prefixed_command_cmd last_item_cmd /* largest command code that can't be \.{\\global} */
toks_register_cmd, /* token list register ( \.{\\toks} ) */
@@ -195,15 +195,6 @@ typedef enum {
set_interaction_cmd, /* define level of interaction ( \.{\\batchmode}, etc.~) */
letterspace_font_cmd, /* letterspace a font ( \.{\\letterspacefont} ) */
pdf_copy_font_cmd, /* create a new font instance ( \.{\\pdfcopyfont} ) */
- set_ocp_cmd, /* Place a translation process in the stream */
- def_ocp_cmd, /* Define and load a translation process */
- set_ocp_list_cmd, /* Place a list of OCPs in the stream */
- def_ocp_list_cmd, /* Define a list of OCPs */
- clear_ocp_lists_cmd, /* Remove all active OCP lists */
- push_ocp_list_cmd, /* Add to the sequence of active OCP lists */
- pop_ocp_list_cmd, /* Remove from the sequence of active OCP lists */
- ocp_list_op_cmd, /* Operations for building a list of OCPs */
- ocp_trace_level_cmd, /* Tracing of active OCPs, either 0 or 1 */
undefined_cs_cmd, /* initial state of most |eq_type| fields */
expand_after_cmd, /* special expansion ( \.{\\expandafter} ) */
no_expand_cmd, /* special nonexpansion ( \.{\\noexpand} ) */
@@ -227,7 +218,7 @@ typedef enum {
data_cmd, /* the equivalent is simply a halfword number */
} tex_command_code;
-# define max_command_cmd ocp_trace_level_cmd /* the largest command code seen at |big_switch| */
+# define max_command_cmd pdf_copy_font_cmd /* the largest command code seen at |big_switch| */
# define last_cmd data_cmd
# define max_non_prefixed_command last_item_cmd
diff --git a/Build/source/texk/web2c/luatexdir/tex/commands.w b/Build/source/texk/web2c/luatexdir/tex/commands.w
index 83e81602840..db5a7672317 100644
--- a/Build/source/texk/web2c/luatexdir/tex/commands.w
+++ b/Build/source/texk/web2c/luatexdir/tex/commands.w
@@ -23,8 +23,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: commands.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/commands.w $";
+ "$Id: commands.w 3849 2010-09-01 09:10:48Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/commands.w $";
@ The symbolic names for glue parameters are put into \TeX's hash table
by using the routine called |primitive|, defined below. Let us enter them
@@ -537,18 +537,6 @@ void initialize_commands(void)
primitive_tex("nullfont", set_font_cmd, null_font, 0);
cs_text(frozen_null_font) = maketexstring("nullfont");
eqtb[frozen_null_font] = eqtb[cur_val];
- /* $\Omega$ always knows at least one ocp, namely the null ocp.
- It does nothing. */
- primitive_omega("nullocp", set_ocp_cmd, null_ocp, 0);
- cs_text(frozen_null_ocp) = maketexstring("nullocp");
- eqtb[frozen_null_ocp] = eqtb[cur_val];
- geq_define(ocp_active_number_base, data_cmd, 0);
- geq_define(ocp_active_min_ptr_base, data_cmd, 0);
- geq_define(ocp_active_max_ptr_base, data_cmd, 0);
- /* $\Omega$ always knows at least one ocp list, namely the null ocp list. */
- primitive_omega("nullocplist", set_ocp_list_cmd, null_ocp_list, 0);
- cs_text(frozen_null_ocp_list) = maketexstring("nullocplist");
- eqtb[frozen_null_ocp_list] = eqtb[cur_val];
primitive_tex("span", tab_mark_cmd, span_code, tab_mark_cmd_code);
primitive_luatex("aligntab", tab_mark_cmd, tab_mark_cmd_code,
@@ -1037,20 +1025,6 @@ void initialize_commands(void)
primitive_pdftex("pdfglyphtounicode", extension_cmd,
pdf_glyph_to_unicode_code, 0);
- primitive_omega("ocp", def_ocp_cmd, 0, 0);
- primitive_omega("externalocp", def_ocp_cmd, 1, 0);
- primitive_omega("ocplist", def_ocp_list_cmd, 0, 0);
- primitive_omega("pushocplist", push_ocp_list_cmd, 0, 0);
- primitive_omega("popocplist", pop_ocp_list_cmd, 0, 0);
- primitive_omega("clearocplists", clear_ocp_lists_cmd, 0, 0);
- primitive_omega("addbeforeocplist", ocp_list_op_cmd, add_before_op, 0);
- primitive_omega("addafterocplist", ocp_list_op_cmd, add_after_op, 0);
- primitive_omega("removebeforeocplist", ocp_list_op_cmd, remove_before_op,
- 0);
- primitive_omega("removeafterocplist", ocp_list_op_cmd, remove_after_op, 0);
- primitive_omega("ocptracelevel", ocp_trace_level_cmd, 0, 0);
- set_equiv(ocp_trace_level_base, 0);
-
/* some of the internal integer parameters are not associated with actual
primitives at all. */
diff --git a/Build/source/texk/web2c/luatexdir/tex/conditional.w b/Build/source/texk/web2c/luatexdir/tex/conditional.w
index a0df81779d7..a4a327568ab 100644
--- a/Build/source/texk/web2c/luatexdir/tex/conditional.w
+++ b/Build/source/texk/web2c/luatexdir/tex/conditional.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: conditional.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/conditional.w $";
+ "$Id: conditional.w 3955 2010-11-12 13:28:03Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/conditional.w $";
@ @c
#define box(A) eqtb[box_base+(A)].hh.rh
@@ -187,7 +187,7 @@ static boolean test_for_cs(void)
while (p != null) {
if (m >= max_buf_stack) {
max_buf_stack = m + 4;
- if (max_buf_stack == buf_size)
+ if (max_buf_stack >= buf_size)
check_buffer_overflow(max_buf_stack);
}
s = token_chr(token_info(p));
diff --git a/Build/source/texk/web2c/luatexdir/tex/directions.h b/Build/source/texk/web2c/luatexdir/tex/directions.h
index bea50879b64..f7b3e784d07 100644
--- a/Build/source/texk/web2c/luatexdir/tex/directions.h
+++ b/Build/source/texk/web2c/luatexdir/tex/directions.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: directions.h 3523 2010-03-19 13:28:08Z taco $ */
+/* $Id: directions.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef DIRECTIONS_H
# define DIRECTIONS_H
@@ -33,7 +33,7 @@
# define dir_RTT 24
-/* # define dir_array_size 25 */ /* |dir_RTT + 1| */
+ /* # define dir_array_size 25 *//* |dir_RTT + 1| */
/* inv(primary) == tertiary */
/*
@@ -44,7 +44,7 @@ _is_mirrored[dir_LTL] = 0;
_is_mirrored[dir_RTT] = 0;
*/
-#define is_mirrored(a) 0
+# define is_mirrored(a) 0
/* secondary == tertiary */
/*
@@ -55,7 +55,7 @@ _is_rotated[dir_LTL] = 0;
_is_rotated[dir_RTT] = 1;
*/
-#define is_rotated(a) (a == dir_RTT)
+# define is_rotated(a) (a == dir_RTT)
/* secondary == secondary */
/*
@@ -78,7 +78,7 @@ _textdir_parallel[dir_RTT][dir_LTL] = 1;
_textdir_parallel[dir_RTT][dir_RTT] = 1;
*/
-#define textdir_parallel(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT)) || \
+# define textdir_parallel(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT)) || \
((a == dir_LTL || a == dir_RTT)&&(b == dir_LTL || b == dir_RTT)))
@@ -104,7 +104,7 @@ _pardir_parallel[dir_RTT][dir_RTT] = 1;
*/
-#define pardir_parallel(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT)) || \
+# define pardir_parallel(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT)) || \
((a == dir_LTL || a == dir_RTT)&&(b == dir_LTL || b == dir_RTT)))
@@ -129,7 +129,7 @@ _pardir_opposite[dir_RTT][dir_LTL] = 1;
_pardir_opposite[dir_RTT][dir_RTT] = 0;
*/
-#define pardir_opposite(a,b) ((a == dir_LTL && b == dir_RTT)||(a == dir_RTT && b == dir_LTL))
+# define pardir_opposite(a,b) ((a == dir_LTL && b == dir_RTT)||(a == dir_RTT && b == dir_LTL))
/* inv(secondary) == secondary */
@@ -153,7 +153,7 @@ _textdir_opposite[dir_RTT][dir_LTL] = 0;
_textdir_opposite[dir_RTT][dir_RTT] = 0;
*/
-#define textdir_opposite(a,b) ((a == dir_TLT && b == dir_TRT)||(a == dir_TRT && b == dir_TLT))
+# define textdir_opposite(a,b) ((a == dir_TLT && b == dir_TRT)||(a == dir_TRT && b == dir_TLT))
/* inv(tertiary) == tertiary */
@@ -177,7 +177,7 @@ _glyphdir_opposite[dir_RTT][dir_LTL] = 0;
_glyphdir_opposite[dir_RTT][dir_RTT] = 0;
*/
-#define glyphdir_opposite(a,b) 0
+# define glyphdir_opposite(a,b) 0
/* primary == primary */
@@ -201,7 +201,7 @@ _pardir_eq[dir_RTT][dir_LTL] = 0;
_pardir_eq[dir_RTT][dir_RTT] = 1;
*/
-#define pardir_eq(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT))|| \
+# define pardir_eq(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_TLT || b == dir_TRT))|| \
(a == dir_LTL && b == dir_LTL) || \
(a == dir_RTT && b == dir_RTT))
@@ -226,7 +226,7 @@ _textdir_eq[dir_RTT][dir_LTL] = 1;
_textdir_eq[dir_RTT][dir_RTT] = 1;
*/
-#define textdir_eq(a,b) ((a == dir_TLT && b == dir_TLT) || \
+# define textdir_eq(a,b) ((a == dir_TLT && b == dir_TLT) || \
(a == dir_TRT && b == dir_TRT) || \
(a == dir_LTL && (b == dir_LTL || b == dir_RTT)) || \
(a == dir_RTT && (b == dir_LTL || b == dir_RTT))
@@ -253,9 +253,9 @@ _glyphdir_eq[dir_RTT][dir_LTL] = 0;
_glyphdir_eq[dir_RTT][dir_RTT] = 1;
*/
-#define glyphdir_eq(a,b) ((a != dir_LTL && b != dir_LTL) || \
+# define glyphdir_eq(a,b) ((a != dir_LTL && b != dir_LTL) || \
(a == dir_LTL && b == dir_LTL))
-
+
/* primary == secondary */
/*
@@ -278,7 +278,7 @@ _partextdir_eq[dir_RTT][dir_LTL] = 0;
_partextdir_eq[dir_RTT][dir_RTT] = 0;
*/
-#define partextdir_eq(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_LTL || b == dir_RTT)) || \
+# define partextdir_eq(a,b) (((a == dir_TLT || a == dir_TRT)&&(b == dir_LTL || b == dir_RTT)) || \
(a == dir_LTL && b == dir_TLT) || \
(a == dir_RTT && b == dir_TRT))
@@ -292,7 +292,7 @@ _textglyphdir_orthogonal[dir_LTL] = 1;
_textglyphdir_orthogonal[dir_RTT] = 0;
*/
-#define textglyphdir_orthogonal(a) (a != dir_RTT)
+# define textglyphdir_orthogonal(a) (a != dir_RTT)
/* secondary == L */
/*
diff --git a/Build/source/texk/web2c/luatexdir/tex/directions.w b/Build/source/texk/web2c/luatexdir/tex/directions.w
index d89c407c7a9..15f03049bf4 100644
--- a/Build/source/texk/web2c/luatexdir/tex/directions.w
+++ b/Build/source/texk/web2c/luatexdir/tex/directions.w
@@ -22,7 +22,7 @@
static const char _svn_version[] =
"$Id: directions.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/directions.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/directions.w $";
@ @c
void scan_direction(void)
diff --git a/Build/source/texk/web2c/luatexdir/tex/dumpdata.h b/Build/source/texk/web2c/luatexdir/tex/dumpdata.h
index 44f7fabe96d..3b29ca6372d 100644
--- a/Build/source/texk/web2c/luatexdir/tex/dumpdata.h
+++ b/Build/source/texk/web2c/luatexdir/tex/dumpdata.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: dumpdata.h 3612 2010-04-13 09:29:42Z taco $ */
+/* $Id: dumpdata.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef DUMPDATA_H
# define DUMPDATA_H
@@ -38,9 +38,9 @@ extern boolean load_fmt_file(const char *);
extern void do_zdump(char *, int, int, FILE *);
extern void do_zundump(char *, int, int, FILE *);
-#if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE) /* this fn */
-extern void swap_items(char *p, int nitems, int size); /* in luatex.c */
-#endif
+# if !defined (WORDS_BIGENDIAN) && !defined (NO_DUMP_SHARE) /* this fn */
+extern void swap_items(char *p, int nitems, int size); /* in luatex.c */
+# endif
/* Like do_undump, but check each value against LOW and HIGH. The
slowdown isn't significant, and this improves the chances of
diff --git a/Build/source/texk/web2c/luatexdir/tex/dumpdata.w b/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
index 975fbb24c5f..8a58fa94144 100644
--- a/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
+++ b/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: dumpdata.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/dumpdata.w $";
+ "$Id: dumpdata.w 3849 2010-09-01 09:10:48Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/dumpdata.w $";
#define font_id_text(A) cs_text(font_id_base+(A))
#define prev_depth cur_list.prev_depth_field
@@ -62,6 +62,7 @@ void store_fmt_file(void)
halfword p; /* all-purpose pointer */
int x; /* something to dump */
char *format_engine;
+ int callback_id; /* |pre_dump| callback */
char *fmtname = NULL;
/* If dumping is not allowed, abort */
/* The user is not allowed to dump a format file unless |save_ptr=0|.
@@ -75,6 +76,10 @@ void store_fmt_file(void)
/* Create the |format_ident|, open the format file, and inform the user
that dumping has begun */
+ callback_id = callback_defined(pre_dump_callback);
+ if (callback_id > 0) {
+ (void) run_callback(callback_id, "->");
+ }
selector = new_string;
tprint(" (format=");
print(job_name);
@@ -284,11 +289,6 @@ void store_fmt_file(void)
print_char('s');
dump_math_data();
- /* Dump the ocp information */
- dump_active_ocp_info();
- dump_ocp_info();
- dump_ocplist_info();
-
/* Dump the hyphenation tables */
dump_language_data();
@@ -493,11 +493,6 @@ boolean load_fmt_file(const char *fmtname)
undump_math_data();
make_pdftex_banner();
- /* Undump the ocp information */
- undump_active_ocp_info();
- undump_ocp_info();
- undump_ocplist_info();
-
/* Undump the hyphenation tables */
undump_language_data();
diff --git a/Build/source/texk/web2c/luatexdir/tex/equivalents.h b/Build/source/texk/web2c/luatexdir/tex/equivalents.h
index 99894d4226a..c0616d91ad5 100644
--- a/Build/source/texk/web2c/luatexdir/tex/equivalents.h
+++ b/Build/source/texk/web2c/luatexdir/tex/equivalents.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: equivalents.h 3385 2010-01-26 05:45:55Z taco $ */
+/* $Id: equivalents.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef EQUIVALENTS_H
# define EQUIVALENTS_H
@@ -36,11 +36,6 @@ emphasize this distinction.
*/
# define font_base 0 /* smallest internal font number; must not be less than |min_quarterword| */
-# define ocp_base 0
-# define number_ocps 32768
-# define ocp_list_base 0
-# define number_ocp_lists 32768
-# define max_active_ocp_lists 32768
# define biggest_reg 65535 /* the largest allowed register number; must be |< max_quarterword| */
# define number_regs 65536 /* |biggest_reg+1| */
# define number_attrs 65536 /* total numbeer of attributes */
@@ -145,12 +140,7 @@ here, and the |number_regs| \.{\\dimen} registers.
# define frozen_special (frozen_control_sequence+12 ) /* permanent `\.{\\special}' */
# define frozen_null_font (frozen_control_sequence+13 ) /* permanent `\.{\\nullfont}' */
# define font_id_base (frozen_null_font-font_base ) /* begins table of |number_fonts| permanent font identifiers */
-# define frozen_null_ocp (frozen_null_font+number_fonts ) /* permanent `\.{\\nullocp}' */
-# define ocp_id_base (frozen_null_ocp-ocp_base )
- /* begins table of |number_ocps| permanent ocp identifiers */
-# define frozen_null_ocp_list (frozen_null_ocp+number_ocps ) /* permanent `\.{\\nullocplist}' */
-# define ocp_list_id_base (frozen_null_ocp_list-ocp_list_base ) /* begins table of |number_ocp_lists| permanent ocp list identifiers */
-# define undefined_control_sequence (frozen_null_ocp_list+number_ocp_lists)
+# define undefined_control_sequence (frozen_null_font+number_fonts)
# define glue_base (undefined_control_sequence+1) /* beginning of region 3 */
# define line_skip_code 0 /* interline glue if |baseline_skip| is infeasible */
@@ -200,12 +190,7 @@ here, and the |number_regs| \.{\\dimen} registers.
# define pdf_xform_resources_loc (pdftex_first_loc + 4) /* points to token list for \.{\\pdfxformresources} */
# define pdf_pk_mode_loc (pdftex_first_loc + 5) /* points to token list for \.{\\pdfpkmode} */
# define pdf_toks (pdftex_first_loc+6) /* end of \pdfTeX's token list parameters */
-# define ocp_trace_level_base (pdf_toks)
-# define ocp_active_number_base (ocp_trace_level_base+1)
-# define ocp_active_min_ptr_base (ocp_active_number_base+1)
-# define ocp_active_max_ptr_base (ocp_active_min_ptr_base+1)
-# define ocp_active_base (ocp_active_max_ptr_base+1)
-# define toks_base (ocp_active_base+max_active_ocp_lists) /* table of |number_regs| token list registers */
+# define toks_base (pdf_toks) /* table of |number_regs| token list registers */
# define etex_pen_base (toks_base+number_regs) /* start of table of \eTeX's penalties */
# define inter_line_penalties_loc (etex_pen_base) /* additional penalties between lines */
# define club_penalties_loc (etex_pen_base+1) /* penalties for creating club lines */
diff --git a/Build/source/texk/web2c/luatexdir/tex/equivalents.w b/Build/source/texk/web2c/luatexdir/tex/equivalents.w
index a7a425376c4..a3639112620 100644
--- a/Build/source/texk/web2c/luatexdir/tex/equivalents.w
+++ b/Build/source/texk/web2c/luatexdir/tex/equivalents.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: equivalents.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/equivalents.w $";
+ "$Id: equivalents.w 3849 2010-09-01 09:10:48Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/equivalents.w $";
@ @c
#define par_shape_ptr equiv(par_shape_loc)
@@ -1017,7 +1017,6 @@ void show_eqtb(halfword n)
print_int(vinfo(par_shape_ptr + 1));
}
} else if (n < toks_base) {
- /* TODO make extra cases for ocps here! */
print_cmd_chr(assign_toks_cmd, n);
print_char('=');
if (equiv(n) != null)
@@ -1130,7 +1129,6 @@ void show_eqtb_meaning(halfword n)
else
print_cmd_chr(set_etex_shape_cmd, n);
} else if (n < toks_base) {
- /* TODO make extra cases for ocps here! */
print_cmd_chr(assign_toks_cmd, n);
} else if (n < box_base) {
tprint_esc("toks");
diff --git a/Build/source/texk/web2c/luatexdir/tex/errors.w b/Build/source/texk/web2c/luatexdir/tex/errors.w
index 1a6ec9a46e0..3a5bb4c8647 100644
--- a/Build/source/texk/web2c/luatexdir/tex/errors.w
+++ b/Build/source/texk/web2c/luatexdir/tex/errors.w
@@ -22,7 +22,7 @@
static const char _svn_version[] =
"$Id: errors.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/errors.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/errors.w $";
@ @c
#define new_line_char int_par(new_line_char_code)
diff --git a/Build/source/texk/web2c/luatexdir/tex/expand.w b/Build/source/texk/web2c/luatexdir/tex/expand.w
index 4f92a2fdd95..1a203d0c0e2 100644
--- a/Build/source/texk/web2c/luatexdir/tex/expand.w
+++ b/Build/source/texk/web2c/luatexdir/tex/expand.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: expand.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/expand.w $";
+ "$Id: expand.w 3802 2010-08-07 12:03:08Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/expand.w $";
@ Only a dozen or so command codes |>max_command| can possibly be returned by
@@ -344,7 +344,7 @@ void manufacture_csname(void)
} else {
cur_cs = null_cs; /* the list is empty */
}
- xfree(ss->s);
+ free_lstring(ss);
flush_list(r);
if (eq_type(cur_cs) == undefined_cs_cmd) {
eq_define(cur_cs, relax_cmd, too_big_char); /* N.B.: The |save_stack| might change */
diff --git a/Build/source/texk/web2c/luatexdir/tex/extensions.w b/Build/source/texk/web2c/luatexdir/tex/extensions.w
index 62c9e65fa8a..38e91d0a94e 100644
--- a/Build/source/texk/web2c/luatexdir/tex/extensions.w
+++ b/Build/source/texk/web2c/luatexdir/tex/extensions.w
@@ -22,8 +22,8 @@
@ @c
static const char _svn_version[] =
- "$Id: extensions.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/extensions.w $";
+ "$Id: extensions.w 3851 2010-09-03 11:55:16Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/extensions.w $";
#include "ptexlib.h"
@@ -208,7 +208,7 @@ void do_extension(PDF pdf)
true);
do_extension(pdf); /* scan form and set |pdf_last_xform| */
pdf_cur_form = pdf_last_xform;
- ship_out(pdf, obj_xform_box(pdf, pdf_last_xform), false);
+ ship_out(pdf, obj_xform_box(pdf, pdf_last_xform), SHIPPING_FORM);
break;
case pdf_ximage_code:
check_o_mode(pdf, "\\immediate\\pdfximage", 1 << OMODE_PDF,
@@ -500,7 +500,7 @@ void do_extension(PDF pdf)
break;
case late_lua_node:
/* Implement \.{\\latelua} */
- new_whatsit(late_lua_node);
+ new_whatsit(late_lua_node); /* type == normal */
late_lua_name(tail) = scan_lua_state();
(void) scan_toks(false, false);
late_lua_data(tail) = def_ref;
diff --git a/Build/source/texk/web2c/luatexdir/tex/filename.w b/Build/source/texk/web2c/luatexdir/tex/filename.w
index 4757bfc19cd..77776a50087 100644
--- a/Build/source/texk/web2c/luatexdir/tex/filename.w
+++ b/Build/source/texk/web2c/luatexdir/tex/filename.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: filename.w 3587 2010-04-03 14:32:25Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/filename.w $";
+ "$Id: filename.w 3802 2010-08-07 12:03:08Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/filename.w $";
@ In order to isolate the system-dependent aspects of file names, the
@@ -107,6 +107,7 @@ static void end_name(void)
cur_string[area_delimiter] = '\0';
cur_length = (unsigned) strlen((char *) cur_string);
cur_area = make_string();
+ xfree(cur_string);
cur_length = (unsigned) strlen((char *) s);
cur_string = s;
}
@@ -119,6 +120,7 @@ static void end_name(void)
cur_string[l] = '\0';
cur_length = (unsigned) strlen((char *) cur_string);
cur_name = make_string();
+ xfree(cur_string);
cur_length = (unsigned) strlen((char *) s);
cur_string = s;
cur_ext = make_string();
diff --git a/Build/source/texk/web2c/luatexdir/tex/inputstack.h b/Build/source/texk/web2c/luatexdir/tex/inputstack.h
index 428bd9d2adb..246bc93e9e2 100644
--- a/Build/source/texk/web2c/luatexdir/tex/inputstack.h
+++ b/Build/source/texk/web2c/luatexdir/tex/inputstack.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: inputstack.h 3720 2010-06-13 08:04:27Z taco $ */
+/* $Id: inputstack.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef INPUTSTACK_H
# define INPUTSTACK_H 1
@@ -33,10 +33,8 @@ typedef struct in_state_record {
halfword loc_field;
halfword limit_field;
halfword name_field;
- halfword ocp_lstack_field; /* used for omega translation processes */
int synctex_tag_field; /* stack the tag of the current file */
- signed int ocp_no_field:16; /* used for omega translation processes */
- signed int cattable_field:16; /* category table used by the current line (see textoken.c) */
+ signed int cattable_field:16; /* category table used by the current line (see textoken.c) */
quarterword state_field:8;
quarterword index_field:8;
boolean partial_field:8; /* is the current line partial? (see textoken.c) */
@@ -56,8 +54,6 @@ extern in_state_record cur_input; /* the ``top'' input state */
# define iname cur_input.name_field /* name of the current file */
# define nofilter cur_input.nofilter_field /* is token filtering explicitly disallowed? */
# define synctex_tag cur_input.synctex_tag_field /* tag of the current file */
-# define current_ocp_lstack cur_input.ocp_lstack_field /* name of the current ocp */
-# define current_ocp_no cur_input.ocp_no_field /* name of the current ocp */
# define line_catcode_table cur_input.cattable_field
# define line_partial cur_input.partial_field
diff --git a/Build/source/texk/web2c/luatexdir/tex/inputstack.w b/Build/source/texk/web2c/luatexdir/tex/inputstack.w
index 3e1c33bd9b8..857f86dfe6e 100644
--- a/Build/source/texk/web2c/luatexdir/tex/inputstack.w
+++ b/Build/source/texk/web2c/luatexdir/tex/inputstack.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: inputstack.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/inputstack.w $";
+ "$Id: inputstack.w 3849 2010-09-01 09:10:48Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/inputstack.w $";
@ @c
#define end_line_char int_par(end_line_char_code)
@@ -286,14 +286,7 @@ void show_context(void)
/* we omit backed-up token lists that have already been read */
tally = 0; /* get ready to count characters */
old_setting = selector;
- if (current_ocp_lstack > 0) {
- tprint_nl("OCP stack ");
- print_scaled(current_ocp_lstack);
- tprint(" entry ");
- print_int(current_ocp_no);
- tprint(":");
- PSEUDO_PRINT_THE_LINE();
- } else if (istate != token_list) {
+ if (istate != token_list) {
/* Print location of current line */
/*
This routine should be changed, if necessary, to give the best possible
@@ -623,8 +616,6 @@ void initialize_inputstack(void)
iindex = 0;
line = 0;
iname = 0;
- current_ocp_lstack = 0;
- current_ocp_no = 0;
nofilter = false;
force_eof = false;
luacstrings = 0;
diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.h b/Build/source/texk/web2c/luatexdir/tex/linebreak.h
index 791a5f0de7c..e91b3f2fa27 100644
--- a/Build/source/texk/web2c/luatexdir/tex/linebreak.h
+++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: linebreak.h 3526 2010-03-19 20:56:38Z taco $ */
+/* $Id: linebreak.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef LINEBREAK_H
# define LINEBREAK_H
@@ -68,13 +68,13 @@ extern void ext_do_line_break(int paragraph_dir,
int broken_penalty, halfword final_par_glue,
halfword pdf_ignored_dimen);
-extern void get_linebreak_info (int *, int *) ;
+extern void get_linebreak_info(int *, int *);
extern halfword find_protchar_left(halfword l, boolean d);
extern halfword find_protchar_right(halfword l, halfword r);
/* skipable nodes at the margins during character protrusion */
-#define cp_skipable(a) ((! is_char_node((a))) && \
+# define cp_skipable(a) ((! is_char_node((a))) && \
((type((a)) == ins_node) \
|| (type((a)) == mark_node) \
|| (type((a)) == adjust_node) \
diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.w b/Build/source/texk/web2c/luatexdir/tex/linebreak.w
index f5b958eb9bd..1478839f8d6 100644
--- a/Build/source/texk/web2c/luatexdir/tex/linebreak.w
+++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: linebreak.w 3587 2010-04-03 14:32:25Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/linebreak.w $";
+ "$Id: linebreak.w 3995 2010-11-28 09:49:37Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/linebreak.w $";
@ We come now to what is probably the most interesting algorithm of \TeX:
the mechanism for choosing the ``best possible'' breakpoints that yield
@@ -139,14 +139,21 @@ void line_break(boolean d, int line_break_context)
lua_linebreak_callback(d, temp_head,
addressof(cur_list.tail_field));
if (callback_id > 0) {
- just_box = cur_list.tail_field;
- if (just_box != null)
- while (vlink(just_box) != null)
- just_box = vlink(just_box);
- if ((just_box == null) || (type(just_box) != hlist_node)) {
+ /* find the correct value for the |just_box| */
+ halfword box_search = cur_list.tail_field;
+ just_box = null;
+ if (box_search != null) {
+ do {
+ if (type(box_search) == hlist_node) {
+ just_box = box_search;
+ }
+ box_search = vlink(box_search);
+ } while (box_search != null);
+ }
+ if (just_box == null) {
help3
("A linebreaking routine should return a non-empty list of nodes",
- "and the last one of those has to be a \\hbox.",
+ "and at least one of those has to be a \\hbox.",
"Sorry, I cannot recover from this.");
print_err("Invalid linebreak_filter");
succumb();
@@ -898,8 +905,6 @@ compute_break_width(int break_type, int line_break_dir, int pdf_adjust_spacing,
} else {
s = null;
}
- } else {
- s = p; /* unhyphenated: we need to 'skip' any 'whitespace' following */
}
while (s != null) {
switch (type(s)) {
@@ -1781,7 +1786,7 @@ ext_do_line_break(int paragraph_dir,
/* LOCAL: Initialize with first |local_paragraph| node */
if ((cur_p != null) && (type(cur_p) == whatsit_node)
&& (subtype(cur_p) == local_par_node)) {
- assert(alink(cur_p) == temp_head);
+ alink(cur_p) = temp_head; /* this used to be an assert, but may as well force it */
internal_pen_inter = local_pen_inter(cur_p);
internal_pen_broken = local_pen_broken(cur_p);
init_internal_left_box = local_box_left(cur_p);
diff --git a/Build/source/texk/web2c/luatexdir/tex/mainbody.h b/Build/source/texk/web2c/luatexdir/tex/mainbody.h
index 93794932cc9..98434521776 100644
--- a/Build/source/texk/web2c/luatexdir/tex/mainbody.h
+++ b/Build/source/texk/web2c/luatexdir/tex/mainbody.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: mainbody.h 3612 2010-04-13 09:29:42Z taco $ */
+/* $Id: mainbody.h 3911 2010-10-16 07:28:11Z taco $ */
#ifndef MAINBODY_H
# define MAINBODY_H
@@ -37,7 +37,7 @@ in production versions of \TeX.
@^system dependencies@>
*/
-# define ssup_max_strings 262143
+# define ssup_max_strings 2097151
# define inf_max_strings 100000
# define sup_max_strings ssup_max_strings
@@ -54,7 +54,7 @@ in production versions of \TeX.
# define sup_max_in_open 127
# define inf_param_size 60
-# define sup_param_size 6000
+# define sup_param_size 32767
# define inf_save_size 600
# define sup_save_size 80000
@@ -68,15 +68,8 @@ in production versions of \TeX.
# define sup_hash_extra sup_max_strings
# define inf_hash_extra 0
-# define sup_ocp_list_size 1000000
-# define inf_ocp_list_size 1000
-# define sup_ocp_buf_size 100000000
-# define inf_ocp_buf_size 1000
-# define sup_ocp_stack_size 1000000
-# define inf_ocp_stack_size 1000
-
# define inf_expand_depth 100
-# define sup_expand_depth 1000000
+# define sup_expand_depth 10000000
# include <stdio.h>
@@ -136,9 +129,6 @@ extern char *bound_name;
extern int error_line;
extern int half_error_line;
extern int max_print_line;
-extern int ocp_list_size;
-extern int ocp_buf_size;
-extern int ocp_stack_size;
extern int max_strings;
extern int strings_free;
extern int font_k;
diff --git a/Build/source/texk/web2c/luatexdir/tex/mainbody.w b/Build/source/texk/web2c/luatexdir/tex/mainbody.w
index fea85fa31be..93ea9018d13 100644
--- a/Build/source/texk/web2c/luatexdir/tex/mainbody.w
+++ b/Build/source/texk/web2c/luatexdir/tex/mainbody.w
@@ -25,8 +25,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: mainbody.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/mainbody.w $";
+ "$Id: mainbody.w 4061 2011-01-11 19:31:03Z hhenkel $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/mainbody.w $";
@
pdfTeX is copyright (C) 1996-2006 Han The Thanh, <thanh@@pdftex.org>.
@@ -206,9 +206,6 @@ int error_line; /* width of context lines on terminal error mess
int half_error_line; /* width of first lines of contexts in terminal
error messages; should be between 30 and |error_line-15| */
int max_print_line; /* width of longest text lines output; should be at least 60 */
-int ocp_list_size;
-int ocp_buf_size;
-int ocp_stack_size;
int max_strings; /* maximum number of strings; must not exceed |max_halfword| */
int strings_free; /* strings available after format loaded */
int font_k; /* loop variable for initialization */
@@ -301,9 +298,6 @@ int main_initialize(void)
setup_bound_var(79, "error_line", error_line);
setup_bound_var(50, "half_error_line", half_error_line);
setup_bound_var(79, "max_print_line", max_print_line);
- setup_bound_var(1000, "ocp_list_size", ocp_list_size);
- setup_bound_var(1000, "ocp_buf_size", ocp_buf_size);
- setup_bound_var(1000, "ocp_stack_size", ocp_stack_size);
setup_bound_var(0, "hash_extra", hash_extra);
setup_bound_var(72, "pk_dpi", pk_dpi);
setup_bound_var(10000, "expand_depth", expand_depth);
@@ -338,8 +332,6 @@ int main_initialize(void)
full_source_filename_stack = xmallocarray(char *, (unsigned) max_in_open);
param_stack = xmallocarray(halfword, (unsigned) param_size);
dvi_buf = xmallocarray(eight_bits, (unsigned) dvi_buf_size);
- initialize_ocplist_arrays(ocp_list_size);
- initialize_ocp_buffers(ocp_buf_size, ocp_stack_size);
if (ini_version) {
fixmem = xmallocarray(smemory_word, fix_mem_init + 1);
@@ -451,7 +443,7 @@ void main_body(void)
if (pdf_output_option != 0)
int_par(pdf_output_code) = pdf_output_value;
if (pdf_draftmode_option != 0)
- int_par(pdf_draftmode_code) = pdf_draftmode_value;
+ pdf_draftmode = static_pdf->draftmode = pdf_draftmode_value;
pdf_init_map_file((char *) pdftex_map);
if (end_line_char_inactive())
decr(ilimit);
diff --git a/Build/source/texk/web2c/luatexdir/tex/maincontrol.h b/Build/source/texk/web2c/luatexdir/tex/maincontrol.h
index e07f1e23cd9..daa2527a0a0 100644
--- a/Build/source/texk/web2c/luatexdir/tex/maincontrol.h
+++ b/Build/source/texk/web2c/luatexdir/tex/maincontrol.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: maincontrol.h 3354 2010-01-11 08:49:33Z taco $ */
+/* $Id: maincontrol.h 3752 2010-07-27 10:18:24Z taco $ */
#ifndef MAINCONTROL_H
# define MAINCONTROL_H
@@ -157,6 +157,7 @@ extern void fixup_directions(void);
# define is_int_assign(cmd) (cmd==assign_int_cmd)
# define is_dim_assign(cmd) (cmd==assign_dimen_cmd)
+# define is_glue_assign(cmd) (cmd==assign_glue_cmd)
# define is_toks_assign(cmd) (cmd==assign_toks_cmd)
# define show_code 0 /* \.{\\show} */
diff --git a/Build/source/texk/web2c/luatexdir/tex/maincontrol.w b/Build/source/texk/web2c/luatexdir/tex/maincontrol.w
index 38b508f31d3..6b17a5bdb8d 100644
--- a/Build/source/texk/web2c/luatexdir/tex/maincontrol.w
+++ b/Build/source/texk/web2c/luatexdir/tex/maincontrol.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: maincontrol.w 3659 2010-04-28 15:10:32Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/maincontrol.w $";
+ "$Id: maincontrol.w 4023 2010-12-05 15:10:06Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/maincontrol.w $";
#include "ptexlib.h"
@@ -178,716 +178,737 @@ is very welcome, which is why I need to have the next two globals:
internal_font_number space_spec_font;
halfword space_spec_cache;
-@ for mode-independent commands, the following macros is useful:
+@ To handle the execution state of |main_control|'s eternal loop,
+an extra global variable is used, along with a macro to define
+its values.
@c
-#define any_mode(A) vmode+(A): case hmode+(A): case mmode+(A)
+#define goto_next 0
+#define goto_skip_token 1
+#define goto_return 2
+static int main_control_state;
-@ There is a list of cases where the user has probably gotten into or out of math
-mode by mistake. \TeX\ will insert a dollar sign and rescan the current token.
+@* Main control helpers.
+
+Here are all the functions that are called from |main_control| that
+are not already defined elsewhere. For the moment, this list simply
+in the order that the appear in |init_main_control|, below.
+
+@
@c
-#define non_math(A) vmode+(A): case hmode+(A)
+static void run_char_num (void) {
+ scan_char_num();
+ cur_chr = cur_val;
+ adjust_space_factor();
+ tail_append(new_char(cur_font, cur_chr));
+}
+
+static void run_char (void) {
+ adjust_space_factor();
+ tail_append(new_char(cur_font, cur_chr));
+}
-@ @c
-void main_control(void)
-{ /* governs \TeX's activities */
- int t; /* general-purpose temporary variable */
- halfword p; /* for whatsit nodes and testing whether an auto kern should be inserted */
- int chr_stack; /* to temporarily save an |cur_chr| to be appended */
- mathcodeval mval; /* to build up an argument to |set_math_char| */
- t = 0; /* for -Wall */
- chr_stack = -1;
- if (equiv(every_job_loc) != null)
- begin_token_list(equiv(every_job_loc), every_job_text);
+@
+The occurrence of blank spaces is almost part of \TeX's inner loop,
+since we usually encounter about one space for every five non-blank characters.
+Therefore |main_control| gives second-highest priority to ordinary spaces.
- BIG_SWITCH:
- get_x_token();
+When a glue parameter like \.{\\spaceskip} is set to `\.{0pt}', we will
+see to it later that the corresponding glue specification is precisely
+|zero_glue|, not merely a pointer to some specification that happens
+to be full of zeroes. Therefore it is simple to test whether a glue parameter
+is zero or~not.
- RESWITCH:
- /* Give diagnostic information, if requested */
- /* When a new token has just been fetched at |big_switch|, we have an
- ideal place to monitor \TeX's activity. */
- if (interrupt != 0) {
- if (OK_to_interrupt) {
- back_input();
- check_interrupt();
- goto BIG_SWITCH;
- }
- }
- if (int_par(tracing_commands_code) > 0)
- show_cur_cmd_chr();
- switch (abs(mode) + cur_cmd) {
- case hmode + letter_cmd:
- case hmode + other_char_cmd:
- case hmode + char_given_cmd:
- case hmode + char_num_cmd:
- if (abs(mode) + cur_cmd == hmode + char_num_cmd) {
- scan_char_num();
- cur_chr = cur_val;
- }
- if (is_last_ocp(current_ocp_lstack, current_ocp_no)) {
- /* Append character |cur_chr| and the following characters (if~any)
- to the current hlist in the current font; |goto reswitch| when
- a non-character has been fetched */
- CONTINUE:
- adjust_space_factor();
- chr_stack = cur_chr;
- tail_append(new_char(cur_font, chr_stack));
- get_x_token();
- if ((cur_cmd == letter_cmd) || (cur_cmd == other_char_cmd) ||
- (cur_cmd == char_given_cmd) || (cur_cmd == char_num_cmd)) {
- if (cur_cmd == char_num_cmd) {
- scan_char_num();
- cur_chr = cur_val;
- }
- if ((chr_stack == ex_hyphen_char) && (cur_chr != ex_hyphen_char)
- && (mode > 0)) {
- tail = compound_word_break(tail, cur_lang);
- subtype(tail) = automatic_disc;
- }
- goto CONTINUE;
- } else {
- if ((chr_stack == ex_hyphen_char) && (mode > 0)) {
- tail = compound_word_break(tail, cur_lang);
- subtype(tail) = automatic_disc;
- }
- chr_stack = -1;
- goto RESWITCH;
+@c
+static void run_app_space (void) {
+ if ((abs(mode) + cur_cmd == hmode + spacer_cmd)
+ && (!(space_factor == 1000))) {
+ app_space();
+ } else {
+ /* Append a normal inter-word space to the current list */
+ if (space_skip == zero_glue) {
+ /* Find the glue specification, |main_p|, for
+ text spaces in the current font */
+ if (cur_font != space_spec_font) {
+ if (space_spec_cache != zero_glue)
+ delete_glue_ref(space_spec_cache);
+ space_spec_cache = new_spec(zero_glue);
+ width(space_spec_cache) = space(cur_font);
+ stretch(space_spec_cache) = space_stretch(cur_font);
+ shrink(space_spec_cache) = space_shrink(cur_font);
+ space_spec_font = cur_font;
}
+ main_p = space_spec_cache;
+ temp_ptr = new_glue(main_p);
} else {
- /* Create a buffer with character |cur_chr| and the following
- characters (if~any) and then apply the current active OCP filter
- to this buffer */
- run_ocp();
- goto BIG_SWITCH;
-
+ temp_ptr = new_param_glue(space_skip_code);
}
- break;
- case hmode + spacer_cmd:
- case hmode + ex_space_cmd:
- case mmode + ex_space_cmd:
- if ((abs(mode) + cur_cmd == hmode + spacer_cmd)
- && (!(space_factor == 1000))) {
- app_space();
- } else {
- /* Append a normal inter-word space to the current list */
- /* The occurrence of blank spaces is almost part of \TeX's inner loop,
- since we usually encounter about one space for every five non-blank characters.
- Therefore |main_control| gives second-highest priority to ordinary spaces.
-
- When a glue parameter like \.{\\spaceskip} is set to `\.{0pt}', we will
- see to it later that the corresponding glue specification is precisely
- |zero_glue|, not merely a pointer to some specification that happens
- to be full of zeroes. Therefore it is simple to test whether a glue parameter
- is zero or~not.
- */
- if (space_skip == zero_glue) {
- /* Find the glue specification, |main_p|, for
- text spaces in the current font */
- if (cur_font != space_spec_font) {
- if (space_spec_cache != zero_glue)
- delete_glue_ref(space_spec_cache);
- space_spec_cache = new_spec(zero_glue);
- width(space_spec_cache) = space(cur_font);
- stretch(space_spec_cache) = space_stretch(cur_font);
- shrink(space_spec_cache) = space_shrink(cur_font);
- space_spec_font = cur_font;
- }
- main_p = space_spec_cache;
+ couple_nodes(tail,temp_ptr);
+ tail = temp_ptr;
- temp_ptr = new_glue(main_p);
- } else {
- temp_ptr = new_param_glue(space_skip_code);
- }
- vlink(tail) = temp_ptr;
- tail = temp_ptr;
-
- }
- break;
+ }
+}
- case hmode + no_boundary_cmd:
- /* Append a |cancel_boundary_node| */
- new_whatsit(cancel_boundary_node);
- break;
- case hmode + char_ghost_cmd:
- t = cur_chr;
- get_x_token();
- if ((cur_cmd == letter_cmd) || (cur_cmd == other_char_cmd)
- || (cur_cmd == char_given_cmd) || (cur_cmd == char_num_cmd)) {
- p = new_glyph(get_cur_font(), cur_chr);
- if (t == 0) {
- set_is_leftghost(p);
- } else {
- set_is_rightghost(p);
- }
- tail_append(p);
- }
- break;
- /* Cases of |main_control| that are not part of the inner loop */
- case any_mode(relax_cmd):
- case vmode + spacer_cmd:
- case mmode + spacer_cmd:
- case mmode + no_boundary_cmd:
- break;
- case any_mode(ignore_spaces_cmd):
- if (cur_chr == 0) {
- /* Get the next non-blank non-call... */
- do {
- get_x_token();
- } while (cur_cmd == spacer_cmd);
+@ Append a |cancel_boundary_node|
+@c
+static void run_no_boundary (void) {
+ new_whatsit(cancel_boundary_node);
+}
- goto RESWITCH;
+@ @c
+static void run_char_ghost (void) {
+ int t;
+ t = cur_chr;
+ get_x_token();
+ if ((cur_cmd == letter_cmd) || (cur_cmd == other_char_cmd)
+ || (cur_cmd == char_given_cmd) || (cur_cmd == char_num_cmd)) {
+ halfword p = new_glyph(get_cur_font(), cur_chr);
+ if (t == 0) {
+ set_is_leftghost(p);
} else {
- t = scanner_status;
- scanner_status = normal;
- get_token_lua();
- scanner_status = t;
- cur_cs = prim_lookup(cs_text(cur_cs));
- if (cur_cs != undefined_primitive) {
- cur_cmd = get_prim_eq_type(cur_cs);
- cur_chr = get_prim_equiv(cur_cs);
- cur_tok = (cur_cmd * STRING_OFFSET) + cur_chr;
- goto RESWITCH;
- }
+ set_is_rightghost(p);
}
- break;
- case vmode + stop_cmd:
- if (its_all_over())
- return; /* this is the only way out */
- break;
- /* Math cases in non-math modes */
- case vmode + math_char_num_cmd:
- case vmode + math_given_cmd:
- case vmode + omath_given_cmd:
- case vmode + xmath_given_cmd:
- back_input();
- new_graf(true);
- break;
- case hmode + math_char_num_cmd:
- if (cur_chr == 0)
- mval = scan_mathchar(tex_mathcode);
- else if (cur_chr == 1)
- mval = scan_mathchar(aleph_mathcode);
- else if (cur_chr == 2)
- mval = scan_mathchar(xetex_mathcode);
- else
- mval = scan_mathchar(xetexnum_mathcode);
- math_char_in_text(mval);
- break;
- case hmode + math_given_cmd:
- mval = mathchar_from_integer(cur_chr, tex_mathcode);
- math_char_in_text(mval);
- break;
- case hmode + omath_given_cmd:
- mval = mathchar_from_integer(cur_chr, aleph_mathcode);
- math_char_in_text(mval);
- break;
- case hmode + xmath_given_cmd:
- mval = mathchar_from_integer(cur_chr, xetex_mathcode);
- math_char_in_text(mval);
- break;
-
- /* Forbidden cases detected in |main_control| */
- case vmode + vmove_cmd:
- case hmode + hmove_cmd:
- case mmode + hmove_cmd:
- case any_mode(last_item_cmd):
- case vmode + vadjust_cmd:
- case vmode + ital_corr_cmd:
- case non_math(eq_no_cmd):
- case any_mode(mac_param_cmd):
- /* When erroneous situations arise, \TeX\ usually issues an error message
- specific to the particular error. For example, `\.{\\noalign}' should
- not appear in any mode, since it is recognized by the |align_peek| routine
- in all of its legitimate appearances; a special error message is given
- when `\.{\\noalign}' occurs elsewhere. But sometimes the most appropriate
- error message is simply that the user is not allowed to do what he or she
- has attempted. For example, `\.{\\moveleft}' is allowed only in vertical mode,
- and `\.{\\lower}' only in non-vertical modes. Such cases are enumerated
- here and in the other sections referred to under `See also \dots.'
- */
- report_illegal_case();
- break;
+ tail_append(p);
+ }
+}
- /* Math-only cases in non-math modes, or vice versa */
- case non_math(sup_mark_cmd):
- case non_math(sub_mark_cmd):
- case non_math(super_sub_script_cmd):
- case non_math(math_comp_cmd):
- case non_math(delim_num_cmd):
- case non_math(left_right_cmd):
- case non_math(above_cmd):
- case non_math(radical_cmd):
- case non_math(math_style_cmd):
- case non_math(math_choice_cmd):
- case non_math(vcenter_cmd):
- case non_math(non_script_cmd):
- case non_math(mkern_cmd):
- case non_math(limit_switch_cmd):
- case non_math(mskip_cmd):
- case non_math(math_accent_cmd):
- case mmode + endv_cmd:
- case mmode + par_end_cmd:
- case mmode + stop_cmd:
- case mmode + vskip_cmd:
- case mmode + un_vbox_cmd:
- case mmode + valign_cmd:
- case mmode + hrule_cmd:
- insert_dollar_sign();
- break;
- /* Cases of |main_control| that build boxes and lists */
- case vmode + hrule_cmd:
- case hmode + vrule_cmd:
- case mmode + vrule_cmd:
- /* The most important parts of |main_control| are concerned with \TeX's
- chief mission of box-making. We need to control the activities that put
- entries on vlists and hlists, as well as the activities that convert
- those lists into boxes. All of the necessary machinery has already been
- developed; it remains for us to ``push the buttons'' at the right times.
-
- As an introduction to these routines, let's consider one of the simplest
- cases: What happens when `\.{\\hrule}' occurs in vertical mode, or
- `\.{\\vrule}' in horizontal mode or math mode? The code in |main_control|
- is short, since the |scan_rule_spec| routine already does most of what is
- required; thus, there is no need for a special action procedure.
-
- Note that baselineskip calculations are disabled after a rule in vertical
- mode, by setting |prev_depth:=pdf_ignored_dimen|.
- */
- tail_append(scan_rule_spec());
- if (abs(mode) == vmode)
- prev_depth = pdf_ignored_dimen;
- else if (abs(mode) == hmode)
- space_factor = 1000;
- break;
+@ @c
+static void run_relax (void) {
+ return;
+}
- case vmode + vskip_cmd:
- case hmode + hskip_cmd:
- case mmode + hskip_cmd:
- case mmode + mskip_cmd:
- /* The processing of things like \.{\\hskip} and \.{\\vskip} is slightly
- more complicated. But the code in |main_control| is very short, since
- it simply calls on the action routine |append_glue|. Similarly, \.{\\kern}
- activates |append_kern|. */
- append_glue();
- break;
- case any_mode(kern_cmd):
- case mmode + mkern_cmd:
- append_kern();
- break;
-
- case non_math(left_brace_cmd):
- /* Many of the actions related to box-making are triggered by the appearance
- of braces in the input. For example, when the user says `\.{\\hbox}
- \.{to} \.{100pt\{$\langle\,\hbox{hlist}\,\rangle$\}}' in vertical mode,
- the information about the box size (100pt, |exactly|) is put onto |save_stack|
- with a level boundary word just above it, and |cur_group:=adjusted_hbox_group|;
- \TeX\ enters restricted horizontal mode to process the hlist. The right
- brace eventually causes |save_stack| to be restored to its former state,
- at which time the information about the box size (100pt, |exactly|) is
- available once again; a box is packaged and we leave restricted horizontal
- mode, appending the new box to the current list of the enclosing mode
- (in this case to the current list of vertical mode), followed by any
- vertical adjustments that were removed from the box by |hpack|.
-
- The next few sections of the program are therefore concerned with the
- treatment of left and right curly braces.
-
- If a left brace occurs in the middle of a page or paragraph, it simply
- introduces a new level of grouping, and the matching right brace will not have
- such a drastic effect. Such grouping affects neither the mode nor the
- current list. */
- new_save_level(simple_group);
- eq_word_define(int_base + no_local_whatsits_code, 0);
- eq_word_define(int_base + no_local_dirs_code, 0);
- break;
- case any_mode(begin_group_cmd):
- new_save_level(semi_simple_group);
- eq_word_define(int_base + no_local_whatsits_code, 0);
- eq_word_define(int_base + no_local_dirs_code, 0);
- break;
- case any_mode(end_group_cmd):
- if (cur_group == semi_simple_group) {
- fixup_directions();
- } else {
- off_save();
+@ |ignore_spaces| is a special case: after it has acted, |get_x_token| has already
+fetched the next token from the input, so that operation in |main_control|
+should be skipped.
+
+@c
+static void run_ignore_spaces (void) {
+ if (cur_chr == 0) {
+ /* Get the next non-blank non-call... */
+ do {
+ get_x_token();
+ } while (cur_cmd == spacer_cmd);
+
+ main_control_state = goto_skip_token;
+ } else {
+ int t = scanner_status;
+ scanner_status = normal;
+ get_token_lua();
+ scanner_status = t;
+ cur_cs = prim_lookup(cs_text(cur_cs));
+ if (cur_cs != undefined_primitive) {
+ cur_cmd = get_prim_eq_type(cur_cs);
+ cur_chr = get_prim_equiv(cur_cs);
+ cur_tok = (cur_cmd * STRING_OFFSET) + cur_chr;
+ main_control_state = goto_skip_token;
}
- break;
- case any_mode(right_brace_cmd):
- handle_right_brace();
- break;
+ }
+}
- case vmode + hmove_cmd:
- case hmode + vmove_cmd:
- case mmode + vmove_cmd:
- /* Constructions that require a box are started by calling |scan_box| with
- a specified context code. The |scan_box| routine verifies
- that a |make_box| command comes next and then it calls |begin_box|.
- */
- t = cur_chr;
- scan_normal_dimen();
- if (t == 0)
- scan_box(cur_val);
- else
- scan_box(-cur_val);
- break;
- case any_mode(leader_ship_cmd):
- scan_box(leader_flag - a_leaders + cur_chr);
- break;
- case any_mode(make_box_cmd):
- begin_box(0);
- break;
- case any_mode(assign_box_dir_cmd):
- scan_register_num();
- cur_box = box(cur_val);
- scan_optional_equals();
- scan_direction();
- if (cur_box != null)
- box_dir(cur_box) = cur_val;
- break;
+@ |stop| is the second special case. We want |main_control| to return to its caller
+if there is nothing left to do.
- case vmode + start_par_cmd:
- /* There is a really small patch to add a new primitive called
- \.{\\quitvmode}. In vertical modes, it is identical to \.{\\indent},
- but in horizontal and math modes it is really a no-op (as opposed to
- \.{\\indent}, which executes the |indent_in_hmode| procedure).
- */
- /* A paragraph begins when horizontal-mode material occurs in vertical mode,
- or when the paragraph is explicitly started by `\.{\\quitvmode}',
- `\.{\\indent}' or `\.{\\noindent}'.
- */
- new_graf((cur_chr > 0));
- break;
- case hmode + start_par_cmd:
- case mmode + start_par_cmd:
- if (cur_chr != 2)
- indent_in_hmode();
- break;
- case vmode + letter_cmd:
- case vmode + other_char_cmd:
- case vmode + char_num_cmd:
- case vmode + char_given_cmd:
- case vmode + char_ghost_cmd:
- case vmode + math_shift_cmd:
- case vmode + math_shift_cs_cmd:
- case vmode + un_hbox_cmd:
- case vmode + vrule_cmd:
- case vmode + accent_cmd:
- case vmode + discretionary_cmd:
- case vmode + hskip_cmd:
- case vmode + valign_cmd:
- case vmode + ex_space_cmd:
- case vmode + no_boundary_cmd:
- back_input();
- new_graf(true);
- break;
+@c
+static void run_stop (void) {
+ if (its_all_over())
+ main_control_state= goto_return; /* this is the only way out */
+}
- case vmode + par_end_cmd:
- /* A paragraph ends when a |par_end| command is sensed, or when we are in
- horizontal mode when reaching the right brace of vertical-mode routines
- like \.{\\vbox}, \.{\\insert}, or \.{\\output}. */
- normal_paragraph();
- if (mode > 0) {
- check_filter("vmode_par");
- build_page();
- }
- break;
- case hmode + par_end_cmd:
- if (align_state < 0)
- off_save(); /* this tries to recover from an alignment that didn't end properly */
- end_graf(bottom_level); /* this takes us to the enclosing mode, if |mode>0| */
- if (mode == vmode) {
- check_filter("hmode_par");
- build_page();
- }
- break;
- case hmode + stop_cmd:
- case hmode + vskip_cmd:
- case hmode + hrule_cmd:
- case hmode + un_vbox_cmd:
- case hmode + halign_cmd:
- head_for_vmode();
- break;
- case any_mode(insert_cmd):
- case hmode + vadjust_cmd:
- case mmode + vadjust_cmd:
- /* Insertion and adjustment and mark nodes are constructed by the following
- pieces of the program. */
- begin_insert_or_adjust();
- break;
- case any_mode(mark_cmd):
- handle_mark();
- break;
- case any_mode(break_penalty_cmd):
- /* Penalty nodes get into a list via the |break_penalty| command. */
- append_penalty();
- break;
- case any_mode(remove_item_cmd):
- /* The |remove_item| command removes a penalty, kern, or glue node if it
- appears at the tail of the current list, using a brute-force linear scan.
- Like \.{\\lastbox}, this command is not allowed in vertical mode (except
- internal vertical mode), since the current list in vertical mode is sent
- to the page builder. But if we happen to be able to implement it in
- vertical mode, we do. */
- delete_last();
- break;
- case vmode + un_vbox_cmd:
- case hmode + un_hbox_cmd:
- case mmode + un_hbox_cmd:
- /* The |un_hbox| and |un_vbox| commands unwrap one of the |number_regs|
- current boxes. */
- unpackage();
- break;
- case hmode + ital_corr_cmd:
- /* Italic corrections are converted to kern nodes when the |ital_corr| command
- follows a character. In math mode the same effect is achieved by appending
- a kern of zero here, since italic corrections are supplied later. */
- append_italic_correction();
- break;
- case mmode + ital_corr_cmd:
- tail_append(new_kern(0));
- break;
- case hmode + discretionary_cmd:
- case mmode + discretionary_cmd:
- append_discretionary();
- break;
- case any_mode(assign_local_box_cmd):
- append_local_box(cur_chr);
- break;
- case hmode + accent_cmd:
- /* We need only one more thing to complete the horizontal mode routines, namely
- the \.{\\accent} primitive. */
- make_accent();
- break;
- case any_mode(car_ret_cmd):
- case any_mode(tab_mark_cmd):
- align_error();
- break;
- case any_mode(no_align_cmd):
- no_align_error();
- break;
- case any_mode(omit_cmd):
- omit_error();
- break;
- case vmode + halign_cmd:
- case hmode + valign_cmd:
- init_align();
- break;
- case mmode + halign_cmd:
- if (privileged()) {
- if (cur_group == math_shift_group)
- init_align();
- else
- off_save();
- }
- break;
- case vmode + endv_cmd:
- case hmode + endv_cmd:
- do_endv();
- break;
- case any_mode(end_cs_name_cmd):
- cs_error();
- break;
- case hmode + math_shift_cmd:
- case hmode + math_shift_cs_cmd:
- init_math();
- break;
- case mmode + eq_no_cmd:
- if (privileged()) {
- if (cur_group == math_shift_group)
- start_eq_no();
- else
- off_save();
- }
- break;
- case mmode + left_brace_cmd:
- math_left_brace();
- break;
- case mmode + letter_cmd:
- case mmode + other_char_cmd:
- case mmode + char_given_cmd:
- set_math_char(get_math_code(cur_chr));
- break;
- case mmode + char_num_cmd:
- scan_char_num();
- cur_chr = cur_val;
- set_math_char(get_math_code(cur_chr));
- break;
- case mmode + math_char_num_cmd:
- if (cur_chr == 0)
- mval = scan_mathchar(tex_mathcode);
- else if (cur_chr == 1)
- mval = scan_mathchar(aleph_mathcode);
- else if (cur_chr == 2)
- mval = scan_mathchar(xetex_mathcode);
- else
- mval = scan_mathchar(xetexnum_mathcode);
- set_math_char(mval);
- break;
- case mmode + math_given_cmd:
- mval = mathchar_from_integer(cur_chr, tex_mathcode);
- set_math_char(mval);
- break;
- case mmode + omath_given_cmd:
- mval = mathchar_from_integer(cur_chr, aleph_mathcode);
- set_math_char(mval);
- break;
- case mmode + xmath_given_cmd:
- mval = mathchar_from_integer(cur_chr, xetex_mathcode);
- set_math_char(mval);
- break;
- case mmode + delim_num_cmd:
- if (cur_chr == 0)
- mval = scan_delimiter_as_mathchar(tex_mathcode);
- else if (cur_chr == 1)
- mval = scan_delimiter_as_mathchar(aleph_mathcode);
- else
- mval = scan_delimiter_as_mathchar(xetex_mathcode);
- set_math_char(mval);
- break;
- case mmode + math_comp_cmd:
- math_math_comp();
- break;
- case mmode + limit_switch_cmd:
- math_limit_switch();
- break;
- case mmode + radical_cmd:
- math_radical();
- break;
- case mmode + accent_cmd:
- case mmode + math_accent_cmd:
- math_ac();
- break;
- case mmode + vcenter_cmd:
- scan_spec(vcenter_group);
- normal_paragraph();
- push_nest();
- mode = -vmode;
+@ @c
+static void run_non_math_math (void) {
+ back_input();
+ new_graf(true);
+}
+
+@ @c
+static void run_math_char_num (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ if (cur_chr == 0)
+ mval = scan_mathchar(tex_mathcode);
+ else if (cur_chr == 1)
+ mval = scan_mathchar(aleph_mathcode);
+ else if (cur_chr == 2)
+ mval = scan_mathchar(xetex_mathcode);
+ else
+ mval = scan_mathchar(xetexnum_mathcode);
+ math_char_in_text(mval);
+}
+
+@ @c
+static void run_math_given (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, tex_mathcode);
+ math_char_in_text(mval);
+}
+
+static void run_omath_given (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, aleph_mathcode);
+ math_char_in_text(mval);
+}
+
+static void run_xmath_given (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, xetex_mathcode);
+ math_char_in_text(mval);
+}
+
+@ The most important parts of |main_control| are concerned with \TeX's
+chief mission of box-making. We need to control the activities that put
+entries on vlists and hlists, as well as the activities that convert
+those lists into boxes. All of the necessary machinery has already been
+developed; it remains for us to ``push the buttons'' at the right times.
+
+As an introduction to these routines, let's consider one of the simplest
+cases: What happens when `\.{\\hrule}' occurs in vertical mode, or
+`\.{\\vrule}' in horizontal mode or math mode? The code in |main_control|
+is short, since the |scan_rule_spec| routine already does most of what is
+required; thus, there is no need for a special action procedure.
+
+Note that baselineskip calculations are disabled after a rule in vertical
+mode, by setting |prev_depth:=pdf_ignored_dimen|.
+
+@c
+static void run_rule (void) {
+ tail_append(scan_rule_spec());
+ if (abs(mode) == vmode)
prev_depth = pdf_ignored_dimen;
- if (every_vbox != null)
- begin_token_list(every_vbox, every_vbox_text);
- break;
- case mmode + math_style_cmd:
- tail_append(new_style((small_number) cur_chr));
- break;
- case mmode + non_script_cmd:
- tail_append(new_glue(zero_glue));
- subtype(tail) = cond_math_glue;
- break;
- case mmode + math_choice_cmd:
- if (cur_chr == 0)
- append_choices();
+ else if (abs(mode) == hmode)
+ space_factor = 1000;
+}
+
+@
+Many of the actions related to box-making are triggered by the appearance
+of braces in the input. For example, when the user says `\.{\\hbox}
+\.{to} \.{100pt\{$\langle\,\hbox{hlist}\,\rangle$\}}' in vertical mode,
+the information about the box size (100pt, |exactly|) is put onto |save_stack|
+with a level boundary word just above it, and |cur_group:=adjusted_hbox_group|;
+\TeX\ enters restricted horizontal mode to process the hlist. The right
+brace eventually causes |save_stack| to be restored to its former state,
+at which time the information about the box size (100pt, |exactly|) is
+available once again; a box is packaged and we leave restricted horizontal
+mode, appending the new box to the current list of the enclosing mode
+(in this case to the current list of vertical mode), followed by any
+vertical adjustments that were removed from the box by |hpack|.
+
+The next few sections of the program are therefore concerned with the
+treatment of left and right curly braces.
+
+If a left brace occurs in the middle of a page or paragraph, it simply
+introduces a new level of grouping, and the matching right brace will not have
+such a drastic effect. Such grouping affects neither the mode nor the
+current list.
+
+@c
+static void run_left_brace (void) {
+ new_save_level(simple_group);
+ eq_word_define(int_base + no_local_whatsits_code, 0);
+ eq_word_define(int_base + no_local_dirs_code, 0);
+}
+
+static void run_begin_group (void) {
+ new_save_level(semi_simple_group);
+ eq_word_define(int_base + no_local_whatsits_code, 0);
+ eq_word_define(int_base + no_local_dirs_code, 0);
+}
+
+static void run_end_group (void) {
+ if (cur_group == semi_simple_group) {
+ fixup_directions();
+ } else {
+ off_save();
+ }
+}
+
+@ Constructions that require a box are started by calling |scan_box| with
+a specified context code. The |scan_box| routine verifies
+that a |make_box| command comes next and then it calls |begin_box|.
+
+@c
+static void run_move (void) {
+ int t = cur_chr;
+ scan_normal_dimen();
+ if (t == 0)
+ scan_box(cur_val);
+ else
+ scan_box(-cur_val);
+}
+
+@ @c
+static void run_leader_ship (void) {
+ scan_box(leader_flag - a_leaders + cur_chr);
+}
+
+@ @c
+static void run_make_box (void) {
+ begin_box(0);
+}
+
+@ @c
+static void run_box_dir (void) {
+ scan_register_num();
+ cur_box = box(cur_val);
+ scan_optional_equals();
+ scan_direction();
+ if (cur_box != null)
+ box_dir(cur_box) = cur_val;
+}
+
+@ There is a really small patch to add a new primitive called
+\.{\\quitvmode}. In vertical modes, it is identical to \.{\\indent},
+but in horizontal and math modes it is really a no-op (as opposed to
+\.{\\indent}, which executes the |indent_in_hmode| procedure).
+
+A paragraph begins when horizontal-mode material occurs in vertical mode,
+or when the paragraph is explicitly started by `\.{\\quitvmode}',
+`\.{\\indent}' or `\.{\\noindent}'.
+
+@c
+static void run_start_par_vmode (void) {
+ new_graf((cur_chr > 0));
+}
+
+@ @c
+static void run_start_par (void) {
+ if (cur_chr != 2)
+ indent_in_hmode();
+}
+
+@ @c
+static void run_new_graf (void) {
+ back_input();
+ new_graf(true);
+}
+
+@ A paragraph ends when a |par_end| command is sensed, or when we are in
+horizontal mode when reaching the right brace of vertical-mode routines
+like \.{\\vbox}, \.{\\insert}, or \.{\\output}.
+
+@c
+static void run_par_end_vmode (void) {
+ normal_paragraph();
+ if (mode > 0) {
+ check_filter("vmode_par");
+ build_page();
+ }
+}
+
+@ @c
+static void run_par_end_hmode (void) {
+ if (align_state < 0)
+ off_save(); /* this tries to recover from an alignment that didn't end properly */
+ end_graf(bottom_level); /* this takes us to the enclosing mode, if |mode>0| */
+ if (mode == vmode) {
+ check_filter("hmode_par");
+ build_page();
+ }
+}
+
+@ @c
+static void append_italic_correction_mmode (void) {
+ tail_append(new_kern(0));
+}
+
+@ @c
+static void run_local_box (void) {
+ append_local_box(cur_chr);
+}
+
+@ @c
+static void run_halign_mmode (void) {
+ if (privileged()) {
+ if (cur_group == math_shift_group)
+ init_align();
else
- setup_math_style();
- break;
- case mmode + above_cmd:
- math_fraction();
- break;
- case mmode + sub_mark_cmd:
- case mmode + sup_mark_cmd:
- case mmode + super_sub_script_cmd:
- sub_sup();
- break;
- case mmode + left_right_cmd:
- math_left_right();
- break;
- case mmode + math_shift_cmd:
- case mmode + math_shift_cs_cmd:
+ off_save();
+ }
+}
+
+@ @c
+static void run_eq_no (void) {
+ if (privileged()) {
if (cur_group == math_shift_group)
- after_math();
+ start_eq_no();
else
off_save();
- break;
+ }
+}
- /* Cases of |main_control| that do not depend on |mode| */
- /*
- The long |main_control| procedure has now been fully specified, except for
- certain activities that are independent of the current mode. These activities
- do not change the current vlist or hlist or mlist; if they change anything,
- it is the value of a parameter or the meaning of a control sequence.
- */
- case any_mode(toks_register_cmd):
- case any_mode(assign_toks_cmd):
- case any_mode(assign_int_cmd):
- case any_mode(assign_attr_cmd):
- case any_mode(assign_dir_cmd):
- case any_mode(assign_dimen_cmd):
- case any_mode(assign_glue_cmd):
- case any_mode(assign_mu_glue_cmd):
- case any_mode(assign_font_dimen_cmd):
- case any_mode(assign_font_int_cmd):
- case any_mode(set_aux_cmd):
- case any_mode(set_prev_graf_cmd):
- case any_mode(set_page_dimen_cmd):
- case any_mode(set_page_int_cmd):
- case any_mode(set_box_dimen_cmd):
- case any_mode(set_tex_shape_cmd):
- case any_mode(set_etex_shape_cmd):
- case any_mode(def_char_code_cmd):
- case any_mode(def_del_code_cmd):
- case any_mode(extdef_math_code_cmd):
- case any_mode(extdef_del_code_cmd):
- case any_mode(def_family_cmd):
- case any_mode(set_math_param_cmd):
- case any_mode(set_font_cmd):
- case any_mode(def_font_cmd):
- case any_mode(letterspace_font_cmd):
- case any_mode(pdf_copy_font_cmd):
- case any_mode(register_cmd):
- case any_mode(advance_cmd):
- case any_mode(multiply_cmd):
- case any_mode(divide_cmd):
- case any_mode(prefix_cmd):
- case any_mode(let_cmd):
- case any_mode(shorthand_def_cmd):
- case any_mode(read_to_cs_cmd):
- case any_mode(def_cmd):
- case any_mode(set_box_cmd):
- case any_mode(hyph_data_cmd):
- case any_mode(set_interaction_cmd):
- case any_mode(set_ocp_cmd):
- case any_mode(def_ocp_cmd):
- case any_mode(set_ocp_list_cmd):
- case any_mode(def_ocp_list_cmd):
- case any_mode(clear_ocp_lists_cmd):
- case any_mode(push_ocp_list_cmd):
- case any_mode(pop_ocp_list_cmd):
- case any_mode(ocp_list_op_cmd):
- case any_mode(ocp_trace_level_cmd):
- prefixed_command();
- break;
- case any_mode(after_assignment_cmd):
- get_token();
- after_token = cur_tok;
- break;
- case any_mode(after_group_cmd):
- get_token();
- save_for_after(cur_tok);
- break;
- case any_mode(in_stream_cmd):
- open_or_close_in();
- break;
- case any_mode(message_cmd):
- issue_message();
- break;
- case any_mode(case_shift_cmd):
- shift_case();
- break;
- case any_mode(xray_cmd):
- show_whatever();
- break;
+@ @c
+static void run_letter_mmode (void) {
+ set_math_char(get_math_code(cur_chr));
+}
- /* Cases of |main_control| that are for extensions to \TeX */
- case any_mode(extension_cmd):
- do_extension(static_pdf);
- break;
- } /* end of the big |switch| statement */
+@ @c
+static void run_char_num_mmode (void) {
+ scan_char_num();
+ cur_chr = cur_val;
+ set_math_char(get_math_code(cur_chr));
+}
+
+@ @c
+static void run_math_char_num_mmode (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ if (cur_chr == 0)
+ mval = scan_mathchar(tex_mathcode);
+ else if (cur_chr == 1)
+ mval = scan_mathchar(aleph_mathcode);
+ else if (cur_chr == 2)
+ mval = scan_mathchar(xetex_mathcode);
+ else
+ mval = scan_mathchar(xetexnum_mathcode);
+ set_math_char(mval);
+}
+
+@ @c
+static void run_math_given_mmode (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, tex_mathcode);
+ set_math_char(mval);
+}
+
+static void run_omath_given_mmode (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, aleph_mathcode);
+ set_math_char(mval);
+}
+
+static void run_xmath_given_mmode (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ mval = mathchar_from_integer(cur_chr, xetex_mathcode);
+ set_math_char(mval);
+}
+
+@ @c
+static void run_delim_num (void) {
+ mathcodeval mval; /* to build up an argument to |set_math_char| */
+ if (cur_chr == 0)
+ mval = scan_delimiter_as_mathchar(tex_mathcode);
+ else if (cur_chr == 1)
+ mval = scan_delimiter_as_mathchar(aleph_mathcode);
+ else
+ mval = scan_delimiter_as_mathchar(xetex_mathcode);
+ set_math_char(mval);
+
+}
+
+@ @c
+static void run_vcenter (void) {
+ scan_spec(vcenter_group);
+ normal_paragraph();
+ push_nest();
+ mode = -vmode;
+ prev_depth = pdf_ignored_dimen;
+ if (every_vbox != null)
+ begin_token_list(every_vbox, every_vbox_text);
+}
+
+@ @c
+static void run_math_style (void) {
+ tail_append(new_style((small_number) cur_chr));
+}
+
+@ @c
+static void run_non_script (void) {
+ tail_append(new_glue(zero_glue));
+ subtype(tail) = cond_math_glue;
+}
+
+@ @c
+static void run_math_choice (void) {
+ if (cur_chr == 0)
+ append_choices();
+ else
+ setup_math_style();
+}
+
+@ @c
+static void run_math_shift (void) {
+ if (cur_group == math_shift_group)
+ after_math();
+ else
+ off_save();
+}
+
+@ @c
+static void run_after_assignment (void) {
+ get_token();
+ after_token = cur_tok;
+}
+
+@ @c
+static void run_after_group (void) {
+ get_token();
+ save_for_after(cur_tok);
+}
+
+@ @c
+static void run_extension (void) {
+ do_extension(static_pdf);
+}
+
+
+@ For mode-independent commands, the following macro is useful.
+
+Also, there is a list of cases where the user has probably gotten into or out of math
+mode by mistake. \TeX\ will insert a dollar sign and rescan the current token, and
+it makes sense ot have a macro for that as well.
- goto BIG_SWITCH; /* restart */
+@c
+#define any_mode(A,B) jump_table[vmode+(A)]=B; jump_table[hmode+(A)]=B; jump_table[mmode+(A)]=B
+#define non_math(A,B) jump_table[vmode+(A)]=B; jump_table[hmode+(A)]=B;
+
+
+@ The |main_control| uses a jump table, and |init_main_control| sets that table up.
+@c
+typedef void (*main_control_function) (void);
+main_control_function *jump_table;
+
+static void init_main_control (void) {
+ jump_table = xmalloc((mmode+max_command_cmd+1) * sizeof(main_control_function)) ;
+
+ jump_table[hmode + char_num_cmd] = run_char_num;
+ jump_table[hmode + letter_cmd] = run_char;
+ jump_table[hmode + other_char_cmd] = run_char;
+ jump_table[hmode + char_given_cmd] = run_char;
+ jump_table[hmode + spacer_cmd] = run_app_space;
+ jump_table[hmode + ex_space_cmd] = run_app_space;
+ jump_table[mmode + ex_space_cmd] = run_app_space;
+ jump_table[hmode + no_boundary_cmd] = run_no_boundary;
+ jump_table[hmode + char_ghost_cmd] = run_char_ghost;
+ jump_table[mmode + char_ghost_cmd] = run_char_ghost;
+ any_mode(relax_cmd, run_relax);
+ jump_table[vmode + spacer_cmd] = run_relax;
+ jump_table[mmode + spacer_cmd] = run_relax;
+ jump_table[mmode + no_boundary_cmd] = run_relax;
+ any_mode(ignore_spaces_cmd,run_ignore_spaces);
+ jump_table[vmode + stop_cmd] = run_stop;
+ jump_table[vmode + math_char_num_cmd] = run_non_math_math;
+ jump_table[vmode + math_given_cmd] = run_non_math_math;
+ jump_table[vmode + omath_given_cmd] = run_non_math_math;
+ jump_table[vmode + xmath_given_cmd] = run_non_math_math;
+ jump_table[hmode + math_char_num_cmd] = run_math_char_num;
+ jump_table[hmode + math_given_cmd] = run_math_given;
+ jump_table[hmode + omath_given_cmd] = run_omath_given;
+ jump_table[hmode + xmath_given_cmd] = run_xmath_given;
+
+ jump_table[vmode + vmove_cmd] = report_illegal_case;
+ jump_table[hmode + hmove_cmd] = report_illegal_case;
+ jump_table[mmode + hmove_cmd] = report_illegal_case;
+ any_mode(last_item_cmd, report_illegal_case);
+ jump_table[vmode + vadjust_cmd] = report_illegal_case;
+ jump_table[vmode + ital_corr_cmd] = report_illegal_case;
+ non_math(eq_no_cmd,report_illegal_case);
+ any_mode(mac_param_cmd,report_illegal_case);
+
+ non_math(sup_mark_cmd, insert_dollar_sign);
+ non_math(sub_mark_cmd, insert_dollar_sign);
+ non_math(super_sub_script_cmd, insert_dollar_sign);
+ non_math(math_comp_cmd, insert_dollar_sign);
+ non_math(delim_num_cmd, insert_dollar_sign);
+ non_math(left_right_cmd, insert_dollar_sign);
+ non_math(above_cmd, insert_dollar_sign);
+ non_math(radical_cmd, insert_dollar_sign);
+ non_math(math_style_cmd, insert_dollar_sign);
+ non_math(math_choice_cmd, insert_dollar_sign);
+ non_math(vcenter_cmd, insert_dollar_sign);
+ non_math(non_script_cmd, insert_dollar_sign);
+ non_math(mkern_cmd, insert_dollar_sign);
+ non_math(limit_switch_cmd, insert_dollar_sign);
+ non_math(mskip_cmd, insert_dollar_sign);
+ non_math(math_accent_cmd, insert_dollar_sign);
+ jump_table[mmode + endv_cmd] = insert_dollar_sign;
+ jump_table[mmode + par_end_cmd] = insert_dollar_sign;
+ jump_table[mmode + stop_cmd] = insert_dollar_sign;
+ jump_table[mmode + vskip_cmd] = insert_dollar_sign;
+ jump_table[mmode + un_vbox_cmd] = insert_dollar_sign;
+ jump_table[mmode + valign_cmd] = insert_dollar_sign;
+ jump_table[mmode + hrule_cmd] = insert_dollar_sign;
+ jump_table[vmode + hrule_cmd] = run_rule;
+ jump_table[hmode + vrule_cmd] = run_rule;
+ jump_table[mmode + vrule_cmd] = run_rule;
+ jump_table[vmode + vskip_cmd] = append_glue;
+ jump_table[hmode + hskip_cmd] = append_glue;
+ jump_table[mmode + hskip_cmd] = append_glue;
+ jump_table[mmode + mskip_cmd] = append_glue;
+ any_mode(kern_cmd, append_kern);
+ jump_table[mmode + mkern_cmd] = append_kern;
+ non_math(left_brace_cmd, run_left_brace);
+ any_mode(begin_group_cmd,run_begin_group);
+ any_mode(end_group_cmd, run_end_group);
+ any_mode(right_brace_cmd, handle_right_brace);
+ jump_table[vmode + hmove_cmd] = run_move;
+ jump_table[hmode + vmove_cmd] = run_move;
+ jump_table[mmode + vmove_cmd] = run_move;
+ any_mode(leader_ship_cmd, run_leader_ship);
+ any_mode(make_box_cmd, run_make_box);
+ any_mode(assign_box_dir_cmd, run_box_dir);
+ jump_table[vmode + start_par_cmd] = run_start_par_vmode;
+ jump_table[hmode + start_par_cmd] = run_start_par;
+ jump_table[mmode + start_par_cmd] = run_start_par;
+ jump_table[vmode + letter_cmd] = run_new_graf;
+ jump_table[vmode + other_char_cmd] = run_new_graf;
+ jump_table[vmode + char_num_cmd] = run_new_graf;
+ jump_table[vmode + char_given_cmd] = run_new_graf;
+ jump_table[vmode + char_ghost_cmd] = run_new_graf;
+ jump_table[vmode + math_shift_cmd] = run_new_graf;
+ jump_table[vmode + math_shift_cs_cmd] = run_new_graf;
+ jump_table[vmode + un_hbox_cmd] = run_new_graf;
+ jump_table[vmode + vrule_cmd] = run_new_graf;
+ jump_table[vmode + accent_cmd] = run_new_graf;
+ jump_table[vmode + discretionary_cmd] = run_new_graf;
+ jump_table[vmode + hskip_cmd] = run_new_graf;
+ jump_table[vmode + valign_cmd] = run_new_graf;
+ jump_table[vmode + ex_space_cmd] = run_new_graf;
+ jump_table[vmode + no_boundary_cmd] = run_new_graf;
+ jump_table[vmode + par_end_cmd] = run_par_end_vmode;
+ jump_table[hmode + par_end_cmd] = run_par_end_hmode;
+ jump_table[hmode + stop_cmd] = head_for_vmode;
+ jump_table[hmode + vskip_cmd] = head_for_vmode;
+ jump_table[hmode + hrule_cmd] = head_for_vmode;
+ jump_table[hmode + un_vbox_cmd] = head_for_vmode;
+ jump_table[hmode + halign_cmd] = head_for_vmode;
+ any_mode(insert_cmd,begin_insert_or_adjust);
+ jump_table[hmode + vadjust_cmd] = begin_insert_or_adjust;
+ jump_table[mmode + vadjust_cmd] = begin_insert_or_adjust;
+ any_mode(mark_cmd, handle_mark);
+ any_mode(break_penalty_cmd, append_penalty);
+ any_mode(remove_item_cmd, delete_last);
+ jump_table[vmode + un_vbox_cmd] = unpackage;
+ jump_table[hmode + un_hbox_cmd] = unpackage;
+ jump_table[mmode + un_hbox_cmd] = unpackage;
+ jump_table[hmode + ital_corr_cmd] = append_italic_correction;
+ jump_table[mmode + ital_corr_cmd] = append_italic_correction_mmode;
+ jump_table[hmode + discretionary_cmd] = append_discretionary;
+ jump_table[mmode + discretionary_cmd] = append_discretionary;
+ any_mode(assign_local_box_cmd, run_local_box);
+ jump_table[hmode + accent_cmd] = make_accent;
+ any_mode(car_ret_cmd,align_error);
+ any_mode(tab_mark_cmd,align_error);
+ any_mode(no_align_cmd,no_align_error);
+ any_mode(omit_cmd, omit_error);
+ jump_table[vmode + halign_cmd] = init_align;
+ jump_table[hmode + valign_cmd] = init_align;
+ jump_table[mmode + halign_cmd] = run_halign_mmode;
+ jump_table[vmode + endv_cmd] = do_endv;
+ jump_table[hmode + endv_cmd] = do_endv;
+ any_mode(end_cs_name_cmd, cs_error);
+ jump_table[hmode + math_shift_cmd] = init_math;
+ jump_table[hmode + math_shift_cs_cmd] = init_math;
+ jump_table[mmode + eq_no_cmd] = run_eq_no;
+ jump_table[mmode + left_brace_cmd] = math_left_brace;
+ jump_table[mmode + letter_cmd] = run_letter_mmode;
+ jump_table[mmode + other_char_cmd] = run_letter_mmode;
+ jump_table[mmode + char_given_cmd] = run_letter_mmode;
+ jump_table[mmode + char_num_cmd] = run_char_num_mmode;
+ jump_table[mmode + math_char_num_cmd] = run_math_char_num_mmode;
+ jump_table[mmode + math_given_cmd] = run_math_given_mmode;
+ jump_table[mmode + omath_given_cmd] = run_omath_given_mmode;
+ jump_table[mmode + xmath_given_cmd] = run_xmath_given_mmode;
+ jump_table[mmode + delim_num_cmd] = run_delim_num;
+ jump_table[mmode + math_comp_cmd] = math_math_comp;
+ jump_table[mmode + limit_switch_cmd] = math_limit_switch;
+ jump_table[mmode + radical_cmd] = math_radical;
+ jump_table[mmode + accent_cmd] = math_ac;
+ jump_table[mmode + math_accent_cmd] = math_ac;
+ jump_table[mmode + vcenter_cmd] = run_vcenter;
+ jump_table[mmode + math_style_cmd] = run_math_style;
+ jump_table[mmode + non_script_cmd] = run_non_script;
+ jump_table[mmode + math_choice_cmd] = run_math_choice;
+ jump_table[mmode + above_cmd] = math_fraction;
+ jump_table[mmode + sub_mark_cmd] = sub_sup;
+ jump_table[mmode + sup_mark_cmd] = sub_sup;
+ jump_table[mmode + super_sub_script_cmd] = sub_sup;
+ jump_table[mmode + left_right_cmd] = math_left_right;
+ jump_table[mmode + math_shift_cmd] = run_math_shift;
+ jump_table[mmode + math_shift_cs_cmd] = run_math_shift;
+ any_mode(toks_register_cmd, prefixed_command);
+ any_mode(assign_toks_cmd, prefixed_command);
+ any_mode(assign_int_cmd, prefixed_command);
+ any_mode(assign_attr_cmd, prefixed_command);
+ any_mode(assign_dir_cmd, prefixed_command);
+ any_mode(assign_dimen_cmd, prefixed_command);
+ any_mode(assign_glue_cmd, prefixed_command);
+ any_mode(assign_mu_glue_cmd, prefixed_command);
+ any_mode(assign_font_dimen_cmd, prefixed_command);
+ any_mode(assign_font_int_cmd, prefixed_command);
+ any_mode(set_aux_cmd, prefixed_command);
+ any_mode(set_prev_graf_cmd, prefixed_command);
+ any_mode(set_page_dimen_cmd, prefixed_command);
+ any_mode(set_page_int_cmd, prefixed_command);
+ any_mode(set_box_dimen_cmd, prefixed_command);
+ any_mode(set_tex_shape_cmd, prefixed_command);
+ any_mode(set_etex_shape_cmd, prefixed_command);
+ any_mode(def_char_code_cmd, prefixed_command);
+ any_mode(def_del_code_cmd, prefixed_command);
+ any_mode(extdef_math_code_cmd, prefixed_command);
+ any_mode(extdef_del_code_cmd, prefixed_command);
+ any_mode(def_family_cmd, prefixed_command);
+ any_mode(set_math_param_cmd, prefixed_command);
+ any_mode(set_font_cmd, prefixed_command);
+ any_mode(def_font_cmd, prefixed_command);
+ any_mode(letterspace_font_cmd, prefixed_command);
+ any_mode(pdf_copy_font_cmd, prefixed_command);
+ any_mode(register_cmd, prefixed_command);
+ any_mode(advance_cmd, prefixed_command);
+ any_mode(multiply_cmd, prefixed_command);
+ any_mode(divide_cmd, prefixed_command);
+ any_mode(prefix_cmd, prefixed_command);
+ any_mode(let_cmd, prefixed_command);
+ any_mode(shorthand_def_cmd, prefixed_command);
+ any_mode(read_to_cs_cmd, prefixed_command);
+ any_mode(def_cmd, prefixed_command);
+ any_mode(set_box_cmd, prefixed_command);
+ any_mode(hyph_data_cmd, prefixed_command);
+ any_mode(set_interaction_cmd, prefixed_command);
+ any_mode(after_assignment_cmd,run_after_assignment);
+ any_mode(after_group_cmd,run_after_group);
+ any_mode(in_stream_cmd,open_or_close_in);
+ any_mode(message_cmd,issue_message);
+ any_mode(case_shift_cmd, shift_case);
+ any_mode(xray_cmd, show_whatever);
+ any_mode(extension_cmd, run_extension);
+}
+
+@ And here is |main_control| itself. It is quite short nowadays.
+
+@c
+void main_control(void)
+{
+ main_control_state = goto_next;
+ init_main_control () ;
+
+ if (equiv(every_job_loc) != null)
+ begin_token_list(equiv(every_job_loc), every_job_text);
+
+ while (1) {
+ if (main_control_state == goto_skip_token)
+ main_control_state = goto_next; /* reset */
+ else
+ get_x_token();
+
+ /* Give diagnostic information, if requested */
+ /* When a new token has just been fetched at |big_switch|, we have an
+ ideal place to monitor \TeX's activity. */
+ if (interrupt != 0 && OK_to_interrupt) {
+ back_input();
+ check_interrupt();
+ continue;
+ }
+ if (int_par(tracing_commands_code) > 0)
+ show_cur_cmd_chr();
+
+ (jump_table[(abs(mode) + cur_cmd)])(); /* run the command */
+
+ if (main_control_state == goto_return) {
+ return;
+ }
+ }
+ return; /* not reached */
}
@ @c
@@ -941,6 +962,18 @@ void you_cant(void)
print_in_mode(mode);
}
+@
+When erroneous situations arise, \TeX\ usually issues an error message
+specific to the particular error. For example, `\.{\\noalign}' should
+not appear in any mode, since it is recognized by the |align_peek| routine
+in all of its legitimate appearances; a special error message is given
+when `\.{\\noalign}' occurs elsewhere. But sometimes the most appropriate
+error message is simply that the user is not allowed to do what he or she
+has attempted. For example, `\.{\\moveleft}' is allowed only in vertical mode,
+and `\.{\\lower}' only in non-vertical modes. Such cases are enumerated
+here and in the other sections referred to under `See also \dots.'
+
+@c
void report_illegal_case(void)
{
you_cant();
@@ -1324,7 +1357,7 @@ void box_end(int box_context)
space_factor = 1000;
else
cur_box = new_sub_box(cur_box);
- vlink(tail) = cur_box;
+ couple_nodes(tail, cur_box);
tail = cur_box;
}
}
@@ -1362,7 +1395,7 @@ void box_end(int box_context)
}
} else
- ship_out(static_pdf, cur_box, true);
+ ship_out(static_pdf, cur_box, SHIPPING_PAGE);
}
}
@@ -1410,6 +1443,7 @@ void new_graf(boolean indented)
p = new_null_box();
box_dir(p) = par_direction;
width(p) = par_indent;
+ subtype(p) = HLIST_SUBTYPE_INDENT;
q = tail;
tail_append(p);
} else {
@@ -1419,8 +1453,8 @@ void new_graf(boolean indented)
while (dir_rover != null) {
if ((vlink(dir_rover) != null) || (dir_dir(dir_rover) != par_direction)) {
dir_graf_tmp = new_dir(dir_dir(dir_rover));
- vlink(dir_graf_tmp) = vlink(q);
- vlink(q) = dir_graf_tmp;
+ try_couple_nodes(dir_graf_tmp,vlink(q));
+ couple_nodes(q,dir_graf_tmp);
}
dir_rover = vlink(dir_rover);
}
@@ -1578,6 +1612,13 @@ void append_penalty(void)
@ When |delete_last| is called, |cur_chr| is the |type| of node that
will be deleted, if present.
+The |remove_item| command removes a penalty, kern, or glue node if it
+appears at the tail of the current list, using a brute-force linear scan.
+Like \.{\\lastbox}, this command is not allowed in vertical mode (except
+internal vertical mode), since the current list in vertical mode is sent
+to the page builder. But if we happen to be able to implement it in
+vertical mode, we do.
+
@c
void delete_last(void)
{
@@ -1635,7 +1676,7 @@ void unpackage(void)
halfword s; /* for varmem assignment */
if (cur_chr > copy_code) {
/* Handle saved items and |goto done| */
- vlink(tail) = disc_ptr[cur_chr];
+ try_couple_nodes(tail, disc_ptr[cur_chr]);
disc_ptr[cur_chr] = null;
goto DONE;
}
@@ -1656,9 +1697,9 @@ void unpackage(void)
}
if (c == copy_code) {
s = copy_node_list(list_ptr(p));
- vlink(tail) = s;
+ try_couple_nodes(tail,s);
} else {
- vlink(tail) = list_ptr(p);
+ try_couple_nodes(tail,list_ptr(p));
box(cur_val) = null;
list_ptr(p) = null;
flush_node(p);
@@ -1667,14 +1708,19 @@ void unpackage(void)
while (vlink(tail) != null) {
r = vlink(tail);
if (!is_char_node(r) && (type(r) == margin_kern_node)) {
- vlink(tail) = vlink(r);
+ try_couple_nodes(tail,vlink(r));
flush_node(r);
}
tail = vlink(tail);
}
}
-@ @c
+@
+Italic corrections are converted to kern nodes when the |ital_corr| command
+follows a character. In math mode the same effect is achieved by appending
+a kern of zero here, since italic corrections are supplied later.
+
+@c
void append_italic_correction(void)
{
halfword p; /* |char_node| at the tail of the current list */
@@ -2662,40 +2708,6 @@ void prefixed_command(void)
case set_interaction_cmd:
new_interaction();
break;
- case set_ocp_cmd:
- print_err("To use ocps, use the \\pushocplist primitive");
- print_ln();
- break;
- case def_ocp_cmd:
- new_ocp((small_number) a);
- break;
- case set_ocp_list_cmd:
- print_err("To use ocp lists, use the \\pushocplist primitive");
- print_ln();
- break;
- case def_ocp_list_cmd:
- new_ocp_list((small_number) a);
- break;
- case push_ocp_list_cmd:
- do_push_ocp_list((small_number) a);
- break;
- case pop_ocp_list_cmd:
- do_pop_ocp_list((small_number) a);
- break;
- case clear_ocp_lists_cmd:
- do_clear_ocp_lists((small_number) a);
- break;
- case ocp_list_op_cmd:
- print_err("To build ocp lists, use the \\ocplist primitive");
- print_ln();
- break;
- case ocp_trace_level_cmd:
- scan_optional_equals();
- scan_int();
- if (cur_val != 0)
- cur_val = 1;
- define(ocp_trace_level_base, data_cmd, cur_val);
- break;
default:
confusion("prefix");
break;
@@ -2854,7 +2866,7 @@ void assign_internal_value(int a, halfword p, int cur_val)
no_local_whatsits + 1);
}
- } else if ((p >= dimen_base) && (p < eqtb_size)) {
+ } else if ((p >= dimen_base) && (p <= eqtb_size)) {
if (p == (dimen_base + page_left_offset_code)) {
n = cur_val - one_true_inch;
word_define(dimen_base + h_offset_code, n);
@@ -3582,8 +3594,6 @@ void initialize(void)
cs_text(frozen_primitive) = maketexstring("primitive");
create_null_font();
font_bytes = 0;
- init_null_ocp(get_nullstr(), maketexstring("nullocp"));
- initialize_init_ocplists();
pdf_h_origin = one_inch;
pdf_v_origin = one_inch;
pdf_compress_level = 9;
diff --git a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
index 0850cbe2776..8b9ff0d8a11 100644
--- a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
+++ b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: mathcodes.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/mathcodes.w $";
+ "$Id: mathcodes.w 3992 2010-11-28 08:24:21Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/mathcodes.w $";
@ math codes
@c
@@ -97,9 +97,18 @@ void show_mathcode_value(mathcodeval c)
print_int(m);
} else {
print_char('"');
- print_hex_digit(c.class_value);
- print_hex_digit(c.family_value);
- two_hex(c.character_value);
+ if (c.class_value) {
+ print_hex_digit(c.class_value);
+ print_hex_digit(c.family_value);
+ two_hex(c.character_value);
+ } else if (c.family_value) {
+ print_hex_digit(c.family_value);
+ two_hex(c.character_value);
+ } else if (c.character_value >= 16) {
+ two_hex(c.character_value);
+ } else {
+ print_hex_digit(c.character_value);
+ }
}
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/memoryword.w b/Build/source/texk/web2c/luatexdir/tex/memoryword.w
index 5c86ea12e6b..7338743ae79 100644
--- a/Build/source/texk/web2c/luatexdir/tex/memoryword.w
+++ b/Build/source/texk/web2c/luatexdir/tex/memoryword.w
@@ -22,7 +22,7 @@
static const char _svn_version[] =
"$Id: memoryword.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/memoryword.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/memoryword.w $";
@ When debugging, we may want to print a |memory_word| without knowing
diff --git a/Build/source/texk/web2c/luatexdir/tex/mlist.w b/Build/source/texk/web2c/luatexdir/tex/mlist.w
index c41c17392ea..5efcfac96b6 100644
--- a/Build/source/texk/web2c/luatexdir/tex/mlist.w
+++ b/Build/source/texk/web2c/luatexdir/tex/mlist.w
@@ -25,8 +25,8 @@
#include "lua/luatex-api.h"
static const char _svn_version[] =
- "$Id: mlist.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/mlist.w $";
+ "$Id: mlist.w 3985 2010-11-26 15:08:32Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/mlist.w $";
@ @c
#define delimiter_factor int_par(delimiter_factor_code)
@@ -1237,7 +1237,12 @@ static pointer get_delim_box(extinfo * ext, internal_font_number f, scaled v,
|(num_extenders*with_extenders)+num_normal|
*/
/* create an array of maximum shrinks and fill it */
- num_total = ((num_extenders * with_extenders) + num_normal);
+ if (with_extenders) {
+ num_total = ((num_extenders * with_extenders) + num_normal);
+ } else {
+ /* make sure we take at least the extenders that are needed to complete the built-up glyph */
+ num_total = (num_extenders + num_normal);
+ }
if (num_total == 1) {
/* weird, but could happen */
cc = ext->glyph;
@@ -1451,11 +1456,13 @@ static pointer do_var_delimiter(pointer d, int s, scaled v, scaled * ic,
int z; /* runs through font family members */
boolean large_attempt; /* are we trying the ``large'' variant? */
pointer att; /* to save the current attribute list */
+ boolean do_parts;
extinfo *ext;
att = null;
f = null_font;
c = 0;
w = 0;
+ do_parts = false;
large_attempt = false;
if (d == null)
goto FOUND;
@@ -1473,11 +1480,6 @@ static pointer do_var_delimiter(pointer d, int s, scaled v, scaled * ic,
CONTINUE:
i++;
if (char_exists(g, y)) {
- if (char_tag(g, y) == ext_tag) {
- f = g;
- c = y;
- goto FOUND;
- }
if (flat)
u = char_width(g, y);
else
@@ -1489,6 +1491,12 @@ static pointer do_var_delimiter(pointer d, int s, scaled v, scaled * ic,
if (u >= v)
goto FOUND;
}
+ if (char_tag(g, y) == ext_tag) {
+ f = g;
+ c = y;
+ do_parts = true;
+ goto FOUND;
+ }
if (i > 10000) {
/* endless loop */
endless_loop_error(g, y);
@@ -1514,11 +1522,11 @@ static pointer do_var_delimiter(pointer d, int s, scaled v, scaled * ic,
flush_node(d);
}
if (f != null_font) {
- /* When the following code is executed, |char_tag(q)| will be equal to
- |ext_tag| if and only if a built-up symbol is supposed to be returned.
+ /* When the following code is executed, |do_parts| will be true
+ if a built-up symbol is supposed to be returned.
*/
ext = NULL;
- if ((char_tag(f, c) == ext_tag) &&
+ if ((do_parts) &&
((!flat
&& (ext = get_charinfo_vert_variants(char_info(f, c))) != NULL)
|| (flat
@@ -2123,9 +2131,11 @@ respect to the size of the final box.
@c
#define TOP_CODE 1
#define BOT_CODE 2
+#define TOP_OR_BOT_MASK ((TOP_CODE) | (BOT_CODE))
+#define STRETCH_ACCENT_CODE 4
static void do_make_math_accent(pointer q, internal_font_number f, int c,
- int top_or_bot, int cur_style)
+ int flags, int cur_style)
{
pointer p, r, x, y; /* temporary registers for box construction */
scaled s; /* amount to skew the accent to the right */
@@ -2135,6 +2145,8 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c,
boolean s_is_absolute; /* will be true if a top-accent is placed in |s| */
extinfo *ext;
pointer attr_p;
+ const int compat_mode = radical_rule(cur_style) == undefined_math_parameter;
+ const int top_or_bot = flags & TOP_OR_BOT_MASK;
attr_p = (top_or_bot == TOP_CODE ? accent_chr(q) : bot_accent_chr(q));
s_is_absolute = false;
c = cur_c;
@@ -2143,29 +2155,40 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c,
s = 0;
if (type(nucleus(q)) == math_char_node) {
fetch(nucleus(q));
+ if (compat_mode) {
+ if (top_or_bot == TOP_CODE) {
+ s = get_kern(cur_f, cur_c, skew_char(cur_f));
+ } else {
+ s = 0;
+ }
+ } else {
if (top_or_bot == TOP_CODE) {
s = char_top_accent(cur_f, cur_c);
- if (s != 0) {
+ if (s != INT_MIN) {
s_is_absolute = true;
- } else {
- s = get_kern(cur_f, cur_c, skew_char(cur_f));
}
} else { /* new skewchar madness for bot accents */
s = char_bot_accent(cur_f, cur_c);
- if (s == 0) { /* better than nothing: */
+ if (s == INT_MIN) { /* better than nothing: */
s = char_top_accent(cur_f, cur_c);
}
- if (s != 0) {
+ if (s != INT_MIN) {
s_is_absolute = true;
}
}
+ }
}
x = clean_box(nucleus(q), cramped_style(cur_style), cur_style);
w = width(x);
h = height(x);
+ if (!compat_mode && !s_is_absolute && type(nucleus(q)) == math_char_node) {
+ s = half(w);
+ s_is_absolute = true;
+ }
/* Switch to a larger accent if available and appropriate */
y = null;
- while (1) {
+ if (flags & STRETCH_ACCENT_CODE) {
+ while (1) {
ext = NULL;
if ((char_tag(f, c) == ext_tag) &&
((ext = get_charinfo_hor_variants(char_info(f, c))) != NULL)) {
@@ -2184,6 +2207,7 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c,
break;
c = yy;
}
+ }
}
if (y == null) {
y = char_box(f, c, node_attr(attr_p));
@@ -2220,12 +2244,16 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c,
sa = char_top_accent(f, c);
else
sa = char_bot_accent(f, c);
- if (sa == 0) {
+ if (sa == INT_MIN) {
sa = half(width(y)); /* just take the center */
}
shift_amount(y) = s - sa;
} else {
- shift_amount(y) = s + half(w - width(y));
+ if (width(y)== 0) {
+ shift_amount(y) = s + w;
+ } else {
+ shift_amount(y) = s + half(w - width(y));
+ }
}
width(y) = 0;
if (top_or_bot == TOP_CODE) {
@@ -2264,10 +2292,13 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c,
static void make_math_accent(pointer q, int cur_style)
{
+ int topstretch = !(subtype(q) % 2);
+ int botstretch = !(subtype(q) / 2);
+
if (accent_chr(q) != null) {
fetch(accent_chr(q));
if (char_exists(cur_f, cur_c)) {
- do_make_math_accent(q, cur_f, cur_c, TOP_CODE, cur_style);
+ do_make_math_accent(q, cur_f, cur_c, TOP_CODE | (topstretch ? STRETCH_ACCENT_CODE : 0), cur_style);
}
flush_node(accent_chr(q));
accent_chr(q) = null;
@@ -2275,7 +2306,7 @@ static void make_math_accent(pointer q, int cur_style)
if (bot_accent_chr(q) != null) {
fetch(bot_accent_chr(q));
if (char_exists(cur_f, cur_c)) {
- do_make_math_accent(q, cur_f, cur_c, BOT_CODE, cur_style);
+ do_make_math_accent(q, cur_f, cur_c, BOT_CODE | (botstretch ? STRETCH_ACCENT_CODE : 0), cur_style);
}
flush_node(bot_accent_chr(q));
bot_accent_chr(q) = null;
@@ -2432,6 +2463,7 @@ static scaled make_op(pointer q, int cur_style)
x = clean_box(nucleus(q), cur_style, cur_style);
if ((subscr(q) != null) && (subtype(q) != op_noad_type_limits))
width(x) = width(x) - delta; /* remove italic correction */
+
shift_amount(x) =
half(height(x) - depth(x)) - math_axis(cur_size);
/* center vertically */
@@ -2444,6 +2476,19 @@ static scaled make_op(pointer q, int cur_style)
x = clean_box(nucleus(q), cur_style, cur_style);
if ((subscr(q) != null) && (subtype(q) != op_noad_type_limits))
width(x) = width(x) - delta; /* remove italic correction */
+
+ /* For an OT MATH font, we may have to get rid of yet another italic
+ correction because |make_scripts()| will add one.
+ This test is somewhat more complicated because |x| can be a null
+ delimiter */
+ if ((subscr(q) != null || supscr(q) != null)
+ && (subtype(q) != op_noad_type_limits)
+ && ((list_ptr(x) != null)
+ && (type(list_ptr(x)) == glyph_node)
+ && is_new_mathfont(font(list_ptr(x))))) {
+ width(x) -= delta; /* remove another italic correction */
+ }
+
shift_amount(x) = half(height(x) - depth(x)) - math_axis(cur_size);
/* center vertically */
type(nucleus(q)) = sub_box_node;
@@ -3400,7 +3445,7 @@ static void mlist_to_hlist(pointer mlist, boolean penalties, int cur_style)
make_radical(q, cur_style);
break;
case accent_noad:
- make_math_accent(q, cur_style);
+ make_math_accent(q, cur_style);
break;
case style_node:
cur_style = subtype(q);
diff --git a/Build/source/texk/web2c/luatexdir/tex/nesting.w b/Build/source/texk/web2c/luatexdir/tex/nesting.w
index 332058a9451..8e9577b84e3 100644
--- a/Build/source/texk/web2c/luatexdir/tex/nesting.w
+++ b/Build/source/texk/web2c/luatexdir/tex/nesting.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: nesting.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/nesting.w $";
+ "$Id: nesting.w 3615 2010-04-13 21:59:59Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/nesting.w $";
@ these are for |show_activities|
diff --git a/Build/source/texk/web2c/luatexdir/tex/packaging.h b/Build/source/texk/web2c/luatexdir/tex/packaging.h
index af1f18a265f..c10a715695a 100644
--- a/Build/source/texk/web2c/luatexdir/tex/packaging.h
+++ b/Build/source/texk/web2c/luatexdir/tex/packaging.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: packaging.h 3261 2009-12-18 11:38:21Z taco $ */
+/* $Id: packaging.h 4044 2010-12-18 09:23:06Z taco $ */
#ifndef PACKAGING_H
# define PACKAGING_H
@@ -57,10 +57,12 @@ extern void do_subst_font(halfword p, int ex_ratio);
extern scaled char_pw(halfword p, int side);
extern halfword new_margin_kern(scaled w, halfword p, int side);
-# define update_adjust_list(A) do { \
- vlink(A) = adjust_ptr(p); \
- while (vlink(A) != null) \
- A = vlink(A); \
+# define update_adjust_list(A) do { \
+ if (A == null) \
+ pdf_error("pre vadjust", "adjust_tail or pre_adjust_tail is null"); \
+ vlink(A) = adjust_ptr(p); \
+ while (vlink(A) != null) \
+ A = vlink(A); \
} while (0)
extern halfword hpack(halfword p, scaled w, int m, int d);
diff --git a/Build/source/texk/web2c/luatexdir/tex/packaging.w b/Build/source/texk/web2c/luatexdir/tex/packaging.w
index 6813d61e85f..2de2d13f99d 100644
--- a/Build/source/texk/web2c/luatexdir/tex/packaging.w
+++ b/Build/source/texk/web2c/luatexdir/tex/packaging.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: packaging.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/packaging.w $";
+ "$Id: packaging.w 4044 2010-12-18 09:23:06Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/packaging.w $";
@ @c
#define scan_normal_dimen() scan_dimen(false,false,false)
@@ -115,7 +115,6 @@ void scan_full_spec(group_code c, int spec_direction)
int v;
int spec_code;
halfword attr_list;
- s = 0;
if (attr_list_cache == cache_disabled)
update_attribute_cache();
attr_list = attr_list_cache;
@@ -423,7 +422,6 @@ halfword hpack(halfword p, scaled w, int m, int pack_direction)
scaled s; /* shift amount */
halfword g; /* points to a glue specification */
int o; /* order of infinity */
- internal_font_number f; /* the font in a |char_node| */
halfword dir_ptr; /* for managing the direction stack */
/* BEWARE: this shadows a global |dir_ptr| */
int hpack_dir; /* the current direction */
@@ -438,7 +436,6 @@ halfword hpack(halfword p, scaled w, int m, int pack_direction)
box_dir(r) = text_direction;
} else {
box_dir(r) = pack_direction;
- pack_direction = -1;
}
hpack_dir = box_dir(r);
dir_ptr = null;
@@ -493,7 +490,6 @@ halfword hpack(halfword p, scaled w, int m, int pack_direction)
do_subst_font(p, font_expand_ratio);
}
}
- f = font(p);
whd = pack_width_height_depth(hpack_dir, dir_TRT, p, true);
x += whd.wd;
if (whd.ht > h)
@@ -533,7 +529,7 @@ halfword hpack(halfword p, scaled w, int m, int pack_direction)
case ins_node:
case mark_node:
case adjust_node:
- if (adjust_tail != null) {
+ if (adjust_tail != null || pre_adjust_tail != null) {
/* Transfer node |p| to the adjustment list */
/*
Although node |q| is not necessarily the immediate predecessor of node |p|,
@@ -852,7 +848,6 @@ scaled_whd natural_sizes(halfword p, halfword pp, glue_ratio g_mult,
{
scaled s; /* shift amount */
halfword g; /* points to a glue specification */
- internal_font_number f; /* the font in a |char_node| */
int hpack_dir;
scaled_whd xx; /* for recursion */
scaled_whd whd, siz = { 0, 0, 0 };
@@ -863,7 +858,6 @@ scaled_whd natural_sizes(halfword p, halfword pp, glue_ratio g_mult,
}
while (p != pp && p != null) {
while (is_char_node(p) && p != pp) {
- f = font(p);
whd = pack_width_height_depth(hpack_dir, dir_TRT, p, true);
siz.wd += whd.wd;
if (whd.ht > siz.ht)
diff --git a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w
index e9a80961457..f96fd1cf861 100644
--- a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w
+++ b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: postlinebreak.w 3587 2010-04-03 14:32:25Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/postlinebreak.w $";
+ "$Id: postlinebreak.w 3904 2010-10-01 07:42:12Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/postlinebreak.w $";
@ So far we have gotten a little way into the |line_break| routine, having
covered its important |try_break| subroutine. Now let's consider the
@@ -323,8 +323,8 @@ void ext_post_line_break(int paragraph_dir,
delete_attribute_ref(node_attr(k));
node_attr(k) = node_attr(p);
add_node_attr_ref(node_attr(k));
- vlink(k) = vlink(ptmp);
- vlink(ptmp) = k;
+ try_couple_nodes(k, vlink(ptmp));
+ couple_nodes(ptmp,k);
if (ptmp == q)
q = vlink(q);
}
@@ -335,13 +335,12 @@ void ext_post_line_break(int paragraph_dir,
/* Put the \.{\\rightskip} glue after node |q|; */
halfword r = new_glue((right_skip == null ? null : copy_node(right_skip)));
glue_ref_count(glue_ptr(r)) = null;
- subtype(r) = right_skip_code;
- vlink(r) = vlink(q);
+ subtype(r) = right_skip_code+1;
+ try_couple_nodes(r,vlink(q));
delete_attribute_ref(node_attr(r));
node_attr(r) = node_attr(q);
add_node_attr_ref(node_attr(r));
- vlink(q) = r;
- alink(r) = q;
+ couple_nodes(q,r);
q = r;
}
@@ -361,14 +360,14 @@ void ext_post_line_break(int paragraph_dir,
/* omega bits: */
r = copy_node_list(passive_left_box(cur_p));
s = vlink(q);
- vlink(r) = q;
+ couple_nodes(r,q);
q = r;
if ((cur_line == cur_list.pg_field + 1) && (s != null)) {
if (type(s) == hlist_node) {
if (list_ptr(s) == null) {
q = vlink(q);
- vlink(r) = vlink(s);
- vlink(s) = r;
+ try_couple_nodes(r,vlink(s));
+ try_couple_nodes(s, r);
}
}
}
@@ -383,19 +382,18 @@ void ext_post_line_break(int paragraph_dir,
delete_attribute_ref(node_attr(k));
node_attr(k) = node_attr(q);
add_node_attr_ref(node_attr(k));
- vlink(k) = q;
+ couple_nodes(k,q);
q = k;
}
- };
+ }
if (left_skip != zero_glue) {
r = new_glue(copy_node(left_skip));
glue_ref_count(glue_ptr(r)) = null;
- subtype(r) = left_skip_code;
+ subtype(r) = left_skip_code+1;
delete_attribute_ref(node_attr(r));
node_attr(r) = node_attr(q);
add_node_attr_ref(node_attr(r));
- vlink(r) = q;
- alink(q) = r;
+ couple_nodes(r,q);
q = r;
}
/* /Put the \.{\\leftskip} glue at the left and detach this line; */
@@ -541,7 +539,7 @@ void ext_post_line_break(int paragraph_dir,
break;
}
r = q;
- };
+ }
if (r != temp_head) {
vlink(r) = null;
flush_node_list(vlink(temp_head));
diff --git a/Build/source/texk/web2c/luatexdir/tex/primitive.w b/Build/source/texk/web2c/luatexdir/tex/primitive.w
index e40090dada0..3fd3f4ff9fa 100644
--- a/Build/source/texk/web2c/luatexdir/tex/primitive.w
+++ b/Build/source/texk/web2c/luatexdir/tex/primitive.w
@@ -22,8 +22,8 @@
static const char _svn_version[] =
- "$Id: primitive.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/primitive.w $";
+ "$Id: primitive.w 4130 2011-04-11 13:27:56Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/primitive.w $";
@ Control sequences are stored and retrieved by means of a fairly standard hash
@@ -127,9 +127,9 @@ void ini_init_primitives(void)
static halfword compute_hash(const char *j, unsigned int l,
halfword prime_number)
{
- unsigned int k;
+ int k;
halfword h = (unsigned char) *j;
- for (k = 1; k <= l - 1; k++) {
+ for (k = 1; k <= (int)(l - 1); k++) {
h = h + h + (unsigned char) *(j + k);
while (h >= prime_number)
h = h - prime_number;
@@ -389,6 +389,7 @@ static halfword insert_id(halfword p, const unsigned char *j, unsigned int l)
append_char(*k);
cs_text(p) = make_string();
cur_length = saved_cur_length;
+ xfree(cur_string);
cur_string = saved_cur_string;
cur_string_size = saved_cur_string_size;
incr(cs_count);
@@ -491,7 +492,7 @@ static void prim_cmd_chr(quarterword cmd, halfword chr_code)
if (cmd <= last_cmd &&
idx >= 0 && idx < prim_data[cmd].subids &&
prim_data[cmd].names != NULL && prim_data[cmd].names[idx] != 0) {
- tprint("\\");
+ tprint_esc("");
print(prim_data[cmd].names[idx]);
} else {
/* TEX82 didn't print the |cmd,idx| information, but it may be useful */
@@ -609,13 +610,6 @@ void print_cmd_chr(quarterword cmd, halfword chr_code)
}
break;
- case set_ocp_cmd:
- tprint("select ocp ");
- slow_print(ocp_name(chr_code));
- break;
- case set_ocp_list_cmd:
- tprint("select ocp list ");
- break;
case assign_glue_cmd:
case assign_mu_glue_cmd:
if (chr_code < skip_base) {
diff --git a/Build/source/texk/web2c/luatexdir/tex/printing.w b/Build/source/texk/web2c/luatexdir/tex/printing.w
index 278b8a70e71..9ea3fd98014 100644
--- a/Build/source/texk/web2c/luatexdir/tex/printing.w
+++ b/Build/source/texk/web2c/luatexdir/tex/printing.w
@@ -22,8 +22,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: printing.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/printing.w $";
+ "$Id: printing.w 3885 2010-09-14 19:24:08Z oneiros $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/printing.w $";
@ @c
#define font_id_text(A) cs_text(font_id_base+(A))
@@ -361,10 +361,10 @@ void print_banner(const char *v, int e, int ver)
callback_id = callback_defined(start_run_callback);
if (callback_id == 0) {
if (ver < 0)
- fprintf(term_out, "This is LuaTeX, Version %s-%d%s ", v, e, WEB2CVERSION);
+ fprintf(term_out, "This is LuaTeX, Version %s-%d ", v, e);
else
- fprintf(term_out, "This is LuaTeX, Version %s-%d%s (rev %d) ", v, e,
- WEB2CVERSION, ver);
+ fprintf(term_out, "This is LuaTeX, Version %s-%d (rev %d) ", v, e,
+ ver);
if (format_ident > 0)
slow_print(format_ident);
print_ln();
@@ -390,9 +390,9 @@ void log_banner(const char *v, int e, int ver)
if (month > 12)
month = 0;
if (ver < 0)
- fprintf(log_file, "This is LuaTeX, Version %s-%d%s ", v, e, WEB2CVERSION);
+ fprintf(log_file, "This is LuaTeX, Version %s-%d ", v, e);
else
- fprintf(log_file, "This is LuaTeX, Version %s-%d%s (rev %d) ", v, e, WEB2CVERSION, ver);
+ fprintf(log_file, "This is LuaTeX, Version %s-%d (rev %d) ", v, e, ver);
slow_print(format_ident);
print_char(' ');
print_char(' ');
@@ -543,14 +543,14 @@ works; therefore no explanation will be given. Notice that 1990 yields
void print_roman_int(int n)
{
char *j, *k; /* mysterious indices */
- nonnegative_integer u, v; /* mysterious numbers */
+ int u, v; /* mysterious numbers */
char mystery[] = "m2d5c2l5x2v5i";
j = (char *) mystery;
v = 1000;
while (1) {
- while (n >= (int) v) {
+ while (n >= v) {
print_char(*j);
- n = n - (int) v;
+ n = n - v;
}
if (n <= 0)
return; /* nonpositive input produces no output */
@@ -560,9 +560,9 @@ void print_roman_int(int n)
k = k + 2;
u = u / (*(k - 1) - '0');
}
- if (n + (int) u >= (int) v) {
+ if (n + u >= v) {
print_char(*k);
- n = n + (int) u;
+ n = n + u;
} else {
j = j + 2;
v = v / (*(j - 1) - '0');
diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.h b/Build/source/texk/web2c/luatexdir/tex/scanning.h
index 853a22a9a46..8c263404173 100644
--- a/Build/source/texk/web2c/luatexdir/tex/scanning.h
+++ b/Build/source/texk/web2c/luatexdir/tex/scanning.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: scanning.h 3376 2010-01-25 16:50:23Z taco $ */
+/* $Id: scanning.h 4085 2011-02-10 09:21:57Z taco $ */
#ifndef SCANNING_H
# define SCANNING_H
@@ -50,7 +50,7 @@ extern void scan_limited_int(int max, const char *name);
# define scan_mark_num() scan_limited_int(65535,"marks code")
# define scan_char_num() scan_limited_int(biggest_char,"character code")
# define scan_four_bit_int() scan_limited_int(15,NULL)
-# define scan_math_family_int() scan_limited_int(265,"math family")
+# define scan_math_family_int() scan_limited_int(255,"math family")
# define scan_real_fifteen_bit_int() scan_limited_int(32767,"mathchar")
# define scan_big_fifteen_bit_int() scan_limited_int(0x7FFFFFF,"extended mathchar")
# define scan_twenty_seven_bit_int() scan_limited_int(0777777777,"delimiter code")
diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.w b/Build/source/texk/web2c/luatexdir/tex/scanning.w
index a968dae4a4b..86a2c01cee3 100644
--- a/Build/source/texk/web2c/luatexdir/tex/scanning.w
+++ b/Build/source/texk/web2c/luatexdir/tex/scanning.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: scanning.w 3596 2010-04-05 10:12:46Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/scanning.w $";
+ "$Id: scanning.w 3713 2010-06-04 10:47:19Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/scanning.w $";
@ @c
@@ -1556,7 +1556,6 @@ void scan_scaled(void)
arith_error = false;
negative = false;
/* Get the next non-blank non-sign... */
- negative = false;
do {
/* Get the next non-blank non-call token */
do {
diff --git a/Build/source/texk/web2c/luatexdir/tex/stringpool.h b/Build/source/texk/web2c/luatexdir/tex/stringpool.h
index 51eb4fd7195..21e031acc86 100644
--- a/Build/source/texk/web2c/luatexdir/tex/stringpool.h
+++ b/Build/source/texk/web2c/luatexdir/tex/stringpool.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: stringpool.h 3395 2010-01-27 11:40:08Z taco $ */
+/* $Id: stringpool.h 3802 2010-08-07 12:03:08Z taco $ */
#ifndef STRINGPOOL_H
# define STRINGPOOL_H
@@ -115,6 +115,7 @@ extern void reset_cur_string(void);
# define restore_cur_string(u) if (u!=0) { \
unsigned l = (unsigned)str_length(u); \
+ xfree(cur_string); \
reset_cur_string(); \
str_room(l); \
memcpy(cur_string, str_string(u),l); \
diff --git a/Build/source/texk/web2c/luatexdir/tex/stringpool.w b/Build/source/texk/web2c/luatexdir/tex/stringpool.w
index d41276c819d..330ad02dee9 100644
--- a/Build/source/texk/web2c/luatexdir/tex/stringpool.w
+++ b/Build/source/texk/web2c/luatexdir/tex/stringpool.w
@@ -22,7 +22,7 @@
static const char _svn_version[] =
"$Id: stringpool.w 3587 2010-04-03 14:32:25Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/stringpool.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/stringpool.w $";
@ Control sequence names and diagnostic messages are variable-length strings
of eight-bit characters. Since PASCAL did not have a well-developed string
diff --git a/Build/source/texk/web2c/luatexdir/tex/texdeffont.w b/Build/source/texk/web2c/luatexdir/tex/texdeffont.w
index 993280def9c..10f88040be6 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texdeffont.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texdeffont.w
@@ -21,7 +21,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: texdeffont.w 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/texdeffont.w $";
+ "$Id: texdeffont.w 3615 2010-04-13 21:59:59Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texdeffont.w $";
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.h b/Build/source/texk/web2c/luatexdir/tex/texfileio.h
index 77b7a6dd5b5..0ec6605b18c 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texfileio.h
+++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: texfileio.h 3395 2010-01-27 11:40:08Z taco $ */
+/* $Id: texfileio.h 4005 2010-11-29 11:52:43Z taco $ */
#ifndef TEXFILEIO_H
# define TEXFILEIO_H
@@ -116,6 +116,7 @@ extern boolean log_opened; /* has the transcript file been opened? */
extern unsigned char *texmf_log_name; /* full name of the log file */
extern void open_log_file(void);
+extern char *get_full_log_name (void);
extern void start_input(void);
extern int open_outfile(FILE ** f, const char *name, const char *mode);
@@ -129,7 +130,6 @@ extern int readbinfile(FILE * f, unsigned char **b, int *s);
# define read_tfm_file readbinfile
# define read_vf_file readbinfile
-# define read_ocp_file readbinfile
# define read_data_file readbinfile
extern boolean openinnameok(const_string);
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
index ccae2f15433..652265d0119 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
@@ -23,12 +23,13 @@
#include <kpathsea/absolute.h>
static const char _svn_version[] =
- "$Id: texfileio.w 3719 2010-06-10 16:58:16Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/texfileio.w $";
+ "$Id: texfileio.w 4128 2011-04-11 12:37:47Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texfileio.w $";
@ @c
#define end_line_char int_par(end_line_char_code)
+
@ The bane of portability is the fact that different operating systems treat
input and output quite differently, perhaps because computer scientists
have not given sufficient attention to this problem. People have felt somehow
@@ -163,9 +164,6 @@ char *luatex_find_file(const char *s, int callback_index)
if (ftemp == NULL)
ftemp = kpse_find_file(s, kpse_truetype_format, 0);
break;
- case find_ocp_file_callback:
- ftemp = kpse_find_file(s, kpse_ocp_format, 0);
- break;
case find_data_file_callback:
ftemp = find_in_output_directory(s);
if (!ftemp)
@@ -192,6 +190,18 @@ char *luatex_find_file(const char *s, int callback_index)
}
+@ LuaTeX used to have private functions for these that did not use kpathsea,
+but since the file paranoia tests have to come from kpathsea anyway, that is no
+longer useful. The only downside to using luatex is that if one wants to disable
+kpathsea via the Lua startup script, it is now an absolute requirement that all
+file discovery callbacks are specified. Just using the find_read_file, but not
+setting open_read_file, for example, does not work any more if kpathsea is not
+to be used at all.
+
+@c
+#define openoutnameok(A) kpse_out_name_ok (A)
+#define openinnameok(A) kpse_in_name_ok (A)
+
@ Open an input file F, using the kpathsea format FILEFMT and passing
|FOPEN_MODE| to fopen. The filename is in `fn'. We return whether or
not the open succeeded.
@@ -830,6 +840,22 @@ void open_log_file(void)
selector = old_setting + 2; /* |log_only| or |term_and_log| */
}
+@ This function is needed by synctex to make its log appear in the right
+spot when |output_directory| is set.
+
+@c
+char *get_full_log_name (void)
+{
+ if (output_directory) {
+ char *ret = xmalloc(strlen((char *)texmf_log_name)+2+strlen(output_directory));
+ ret = strcpy(ret, output_directory);
+ strcat(ret, "/");
+ strcat(ret, (char *)texmf_log_name);
+ return ret;
+ } else {
+ return xstrdup((const char*)texmf_log_name);
+ }
+}
@ Let's turn now to the procedure that is used to initiate file reading
when an `\.{\\input}' command is being processed.
@@ -858,6 +884,36 @@ void start_input(void)
fn = prompt_file_name("input file name", "");
}
iname = maketexstring(fullnameoffile);
+ /* Now that we have |fullnameoffile|, it is time to post-adjust
+ |cur_name| and |cur_ext| for trailing |.tex| */
+ {
+ char *n, *p;
+ n = p = fullnameoffile + strlen(fullnameoffile);
+ while (p>fullnameoffile) {
+ p--;
+ if (IS_DIR_SEP(*p)) {
+ break;
+ }
+ }
+ if (IS_DIR_SEP(*p)) {
+ p++;
+ }
+ while (n>fullnameoffile) {
+ n--;
+ if (*n == '.') {
+ break;
+ }
+ }
+ if (n>p) {
+ int q = *n;
+ cur_ext = maketexstring(n);
+ *n = 0;
+ cur_name = maketexstring(p);
+ *n = q;
+ }
+ }
+
+
source_filename_stack[in_open] = iname;
full_source_filename_stack[in_open] = xstrdup(fullnameoffile);
/* we can try to conserve string pool space now */
@@ -1086,187 +1142,6 @@ static FILE *runpopen(char *cmd, const char *mode)
return f;
}
-@ Return true if FNAME is acceptable as a name for \.{\\openout}, \.{\\openin}, or
- \.{\\input}.
-
-@c
-typedef enum ok_type {
- ok_reading,
- ok_writing
-} ok_type;
-
-static const_string ok_type_name[] = {
- "reading",
- "writing"
-};
-
-static boolean
-opennameok(const_string fname, const_string check_var,
- const_string default_choice, ok_type action)
-{
- /* We distinguish three cases:
- 'a' (any) allows any file to be opened.
- 'r' (restricted) means disallowing special file names.
- 'p' (paranoid) means being really paranoid: disallowing special file
- names and restricting output files to be in or below
- the working directory or $TEXMFOUTPUT, while input files
- must be below the current directory, $TEXMFOUTPUT, or
- (implicitly) in the system areas.
- We default to "paranoid". The error messages from TeX will be somewhat
- puzzling...
- This function contains several return statements... */
-
- const_string open_choice = kpse_var_value(check_var);
-
- if (!open_choice)
- open_choice = default_choice;
-
- if (*open_choice == 'a' || *open_choice == 'y' || *open_choice == '1')
- return true;
-
-#if defined (unix) && !defined (MSDOS)
- {
- const_string base = xbasename(fname);
- /* Disallow .rhosts, .login, etc. Allow .tex (for LaTeX). */
- if (base[0] == 0 ||
- (base[0] == '.' && !IS_DIR_SEP(base[1]) && !STREQ(base, ".tex"))) {
- fprintf(stderr, "%s: Not %s to %s (%s = %s).\n",
- kpse_invocation_name, ok_type_name[action], fname,
- check_var, open_choice);
- return false;
- }
- }
-#else
- /* Other OSs don't have special names? */
-#endif
-
- if (*open_choice == 'r' || *open_choice == 'n' || *open_choice == '0')
- return true;
-
- /* Paranoia supplied by Charles Karney... */
- if (kpse_absolute_p(fname, false)) {
- const_string texmfoutput = kpse_var_value("TEXMFOUTPUT");
- /* Absolute pathname is only OK if TEXMFOUTPUT is set, it's not empty,
- fname begins the TEXMFOUTPUT, and is followed by / */
- if (!texmfoutput || *texmfoutput == '\0'
- || fname != strstr(fname, texmfoutput)
- || !IS_DIR_SEP(fname[strlen(texmfoutput)])) {
- fprintf(stderr, "%s: Not %s to %s (%s = %s).\n",
- kpse_invocation_name, ok_type_name[action], fname,
- check_var, open_choice);
- return false;
- }
- }
- /* For all pathnames, we disallow "../" at the beginning or "/../"
- anywhere. */
- if (fname[0] == '.' && fname[1] == '.' && IS_DIR_SEP(fname[2])) {
- fprintf(stderr, "%s: Not %s to %s (%s = %s).\n",
- kpse_invocation_name, ok_type_name[action], fname,
- check_var, open_choice);
- return false;
- } else {
- /* Check for "/../". Since more than one characted can be matched
- by |IS_DIR_SEP|, we cannot use "/../" itself. */
- const_string dotpair = strstr(fname, "..");
- while (dotpair) {
- /* If dotpair[2] == |DIR_SEP|, then dotpair[-1] is well-defined,
- because the "../" case was handled above. */
- if (IS_DIR_SEP(dotpair[2]) && IS_DIR_SEP(dotpair[-1])) {
- fprintf(stderr, "%s: Not %s to %s (%s = %s).\n",
- kpse_invocation_name, ok_type_name[action], fname,
- check_var, open_choice);
- return false;
- }
- /* Continue after the dotpair. */
- dotpair = strstr(dotpair + 2, "..");
- }
- }
-
- /* We passed all tests. */
- return true;
-}
-
-boolean openinnameok(const_string fname)
-{
- /* For input default to all. */
- return opennameok(fname, "openin_any", "a", ok_reading);
-}
-
-#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
-
-static int Isspace(char c)
-{
- return (c == ' ' || c == '\t');
-}
-
-static boolean executable_filep(const_string fname)
-{
- string p, q, base;
- string *pp;
-
- /* check |openout_any| */
- p = kpse_var_value("openout_any");
- if (p && *p == 'p') {
- free(p);
-/* get base name
- we cannot use xbasename() for abnormal names.
-*/
- base = xstrdup(fname);
- p = strrchr(fname, '/');
- if (p) {
- p++;
- strcpy(base, p);
- }
- p = strrchr(base, '\\');
- if (p) {
- p++;
- strcpy(base, p);
- }
-# if defined(__CYGWIN__)
- for (p = base; *p; p++)
- *p = tolower(*p);
- p = base;
-# else
- p = (char *) strlwr(base);
-# endif
- for (q = p + strlen(p) - 1;
- (q >= p) && ((*q == '.') || (Isspace(*q))); q--) {
- *q = '\0'; /* remove trailing '.' , ' ' and '\t' */
- }
- q = strrchr(p, '.'); /* get extension part */
- pp = suffixlist;
- if (pp && q) {
- while (*pp) {
- if (strchr(fname, ':') || !strcmp(q, *pp)) {
- fprintf(stderr,
- "\nThe name %s is forbidden to open for writing.\n",
- fname);
- free(base);
- return true;
- }
- pp++;
- }
- }
- free(base);
- } else if (p) {
- free(p);
- }
- return false;
-}
-#endif
-
-boolean openoutnameok(const_string fname)
-{
-#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
- /* Output of an executable file is restricted on Windows */
- if (executable_filep(fname))
- return false;
-#endif
- /* For output, default to paranoid. */
- return opennameok(fname, "openout_any", "p", ok_writing);
-}
-
-
@ piped I/O
diff --git a/Build/source/texk/web2c/luatexdir/tex/texmath.w b/Build/source/texk/web2c/luatexdir/tex/texmath.w
index f435ddb312f..47ed05d2651 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texmath.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texmath.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: texmath.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/texmath.w $";
+ "$Id: texmath.w 3981 2010-11-26 12:26:44Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texmath.w $";
@ @c
#define mode cur_list.mode_field
@@ -715,20 +715,62 @@ void display_normal_noad(pointer p)
}
break;
case accent_noad:
+ if (accent_chr(p) != null) {
+ if (bot_accent_chr(p) != null) {
+ tprint_esc("Umathaccent both");
+ } else {
+ tprint_esc("Umathaccent");
+ }
+ } else {
+ tprint_esc("Umathaccent bottom");
+ }
+ switch (subtype(p)) {
+ case 0:
if (accent_chr(p) != null) {
if (bot_accent_chr(p) != null) {
- tprint_esc("Umathaccents");
print_fam_and_char(accent_chr(p));
print_fam_and_char(bot_accent_chr(p));
} else {
- tprint_esc("accent");
print_fam_and_char(accent_chr(p));
}
} else {
- tprint_esc("Umathbotaccent");
print_fam_and_char(bot_accent_chr(p));
}
break;
+ case 1:
+ if (accent_chr(p) != null) {
+ tprint(" fixed ");
+ print_fam_and_char(accent_chr(p));
+ if (bot_accent_chr(p) != null) {
+ print_fam_and_char(bot_accent_chr(p));
+ }
+ } else {
+ confusion("display_accent_noad");
+ }
+ break;
+ case 2:
+ if (bot_accent_chr(p) != null) {
+ if (accent_chr(p) != null) {
+ print_fam_and_char(accent_chr(p));
+ }
+ tprint(" fixed ");
+ print_fam_and_char(bot_accent_chr(p));
+ } else{
+ confusion("display_accent_noad");
+ }
+ break;
+ case 3:
+ if (accent_chr(p) != null && bot_accent_chr(p) != null) {
+ tprint(" fixed ");
+ print_fam_and_char(accent_chr(p));
+ tprint(" fixed ");
+ print_fam_and_char(bot_accent_chr(p));
+ } else {
+ confusion("display_accent_noad");
+ }
+ break;
+ }
+ break;
}
print_subsidiary_data(nucleus(p), '.');
print_subsidiary_data(supscr(p), '^');
@@ -1556,10 +1598,31 @@ void math_ac(void)
} else if (cur_chr == 1) { /* \.{\\omathaccent} */
t = scan_mathchar(aleph_mathcode);
} else if (cur_chr == 2) { /* \.{\\Umathaccent} */
- t = scan_mathchar(xetex_mathcode);
- } else if (cur_chr == 3) { /* \.{\\Umathbotaccent} */
+ if (scan_keyword("fixed")) {
+ subtype(tail) = 1;
+ t = scan_mathchar(xetex_mathcode);
+ } else if (scan_keyword("both")) {
+ if (scan_keyword("fixed")) {
+ subtype(tail) = 1;
+ }
+ t = scan_mathchar(xetex_mathcode);
+ if (scan_keyword("fixed")) {
+ subtype(tail) += 2;
+ }
+ b = scan_mathchar(xetex_mathcode);
+ } else if (scan_keyword("bottom")) {
+ if (scan_keyword("fixed")) {
+ subtype(tail) = 2;
+ }
+ b = scan_mathchar(xetex_mathcode);
+ } else {
+ t = scan_mathchar(xetex_mathcode);
+ }
+ } else if (cur_chr == 3) { /* deprecated: \.{\\Umathbotaccent} */
+ pdftex_warn("\\Umathbotaccent is deprecated, please update to \\Umathaccent bottom");
b = scan_mathchar(xetex_mathcode);
- } else if (cur_chr == 4) { /* \.{\\Umathaccents} */
+ } else if (cur_chr == 4) { /* deprecated: \.{\\Umathaccents} */
+ pdftex_warn("\\Umathaccents is deprecated, please update to \\Umathaccent both");
t = scan_mathchar(xetex_mathcode);
b = scan_mathchar(xetex_mathcode);
} else {
@@ -2209,15 +2272,10 @@ resulting list, and with |aux_save| holding the |prev_depth| value.
void finish_display_alignment(pointer p, pointer q, halfword saved_prevdepth)
{
do_assignments();
- if (cur_cmd != math_shift_cmd) {
- const char *hlp[] = {
- "Displays can use special alignments (like \\eqalignno)",
- "only if nothing but the alignment itself is between $$'s.",
- NULL
- };
- back_error("Missing $$ inserted", hlp);
- } else {
+ if (cur_cmd == math_shift_cmd) {
check_second_math_shift();
+ } else {
+ check_display_math_end();
}
pop_nest();
tail_append(new_penalty(int_par(pre_display_penalty_code)));
diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.h b/Build/source/texk/web2c/luatexdir/tex/texnodes.h
index 556f8fb2c72..45c84032fd8 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texnodes.h
+++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: texnodes.h 3552 2010-03-26 15:30:08Z taco $ */
+/* $Id: texnodes.h 4090 2011-02-28 08:51:20Z taco $ */
#include <stdarg.h>
@@ -183,13 +183,16 @@ typedef enum {
# define acc_kern 2 /*|subtype| of kern nodes from accents */
# define synctex_tag_kern(a) vinfo((a)+3)
# define synctex_line_kern(a) vlink((a)+3)
-# define ex_kern(a) vinfo((a)+4) /* expansion factor (hz) */
+# define ex_kern(a) vinfo((a)+4) /* expansion factor (hz) */
# define box_node_size 9
# define HLIST_SUBTYPE_UNKNOWN 0
-# define HLIST_SUBTYPE_LINE 1
-# define HLIST_SUBTYPE_HBOX 2
+# define HLIST_SUBTYPE_LINE 1 /* paragraph lines */
+# define HLIST_SUBTYPE_HBOX 2 /* \.{\\hbox} */
+# define HLIST_SUBTYPE_INDENT 3 /* indentation box */
+# define HLIST_SUBTYPE_ALIGNROW 4 /* row from a \.{\\halign} or \.{\\valign} */
+# define HLIST_SUBTYPE_ALIGNCELL 5 /* cell from a \.{\\halign} or \.{\\valign} */
# define width(a) varmem[(a)+2].cint
# define depth(a) varmem[(a)+3].cint
@@ -353,6 +356,9 @@ typedef enum {
# define nodetype_has_attributes(t) (((t)<=glyph_node) && ((t)!=unset_node))
+# define nodetype_has_subtype(t) ((t)!=action_node && (t)!=attribute_list_node && (t)!=attribute_node && (t)!=glue_spec_node)
+# define nodetype_has_prev(t) nodetype_has_subtype((t))
+
/* style and choice nodes */
/* style nodes can be smaller, the information is encoded in |subtype|,
but choice nodes are on-the-spot converted to style nodes */
@@ -538,6 +544,7 @@ typedef enum {
# define late_lua_data(a) vlink((a)+2)
# define late_lua_reg(a) vinfo((a)+2)
# define late_lua_name(a) vlink((a)+3)
+# define late_lua_type(a) subtype((a)+3)
# define local_par_size 6
@@ -687,7 +694,8 @@ extern pointer actual_box_width(pointer r, scaled base_width);
/* TH: these two defines still need checking. The node ordering in luatex is not
quite the same as in tex82 */
-# define precedes_break(a) (type((a))<math_node && (type(a)!=whatsit_node || subtype(a)!=dir_node))
+# define precedes_break(a) (type((a))<math_node && \
+ (type(a)!=whatsit_node || (subtype(a)!=dir_node && subtype(a)!=local_par_node)))
# define non_discardable(a) (type((a))<math_node)
/* from luanode.c */
diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.w b/Build/source/texk/web2c/luatexdir/tex/texnodes.w
index 74ee9c9bc59..3e971013d21 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texnodes.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: texnodes.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/texnodes.w $";
+ "$Id: texnodes.w 4139 2011-04-12 08:37:27Z taco $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texnodes.w $";
#include "ptexlib.h"
#include "lua/luatex-api.h"
@@ -72,14 +72,14 @@ int copy_error(halfword p); /* define below */
const char *node_fields_list[] =
{ "attr", "width", "depth", "height", "dir", "shift",
- "glue_order", "glue_sign", "glue_set", "list", NULL
+ "glue_order", "glue_sign", "glue_set", "head", NULL
};
const char *node_fields_rule[] =
{ "attr", "width", "depth", "height", "dir", NULL };
const char *node_fields_insert[] =
- { "attr", "cost", "depth", "height", "spec", "list", NULL };
+ { "attr", "cost", "depth", "height", "spec", "head", NULL };
const char *node_fields_mark[] = { "attr", "class", "mark", NULL };
-const char *node_fields_adjust[] = { "attr", "list", NULL };
+const char *node_fields_adjust[] = { "attr", "head", NULL };
const char *node_fields_disc[] = { "attr", "pre", "post", "replace", NULL };
const char *node_fields_math[] = { "attr", "surround", NULL };
const char *node_fields_glue[] = { "attr", "spec", "leader", NULL };
@@ -88,7 +88,7 @@ const char *node_fields_penalty[] = { "attr", "penalty", NULL };
const char *node_fields_unset[] =
{ "attr", "width", "depth", "height", "dir", "shrink",
- "glue_order", "glue_sign", "stretch", "span", "list", NULL
+ "glue_order", "glue_sign", "stretch", "span", "head", NULL
};
const char *node_fields_margin_kern[] = { "attr", "width", "glyph", NULL };
@@ -118,8 +118,8 @@ const char *node_fields_accent[] =
{ "attr", "nucleus", "sub", "sup", "accent", "bot_accent", NULL };
const char *node_fields_fence[] = { "attr", "delim", NULL };
const char *node_fields_math_char[] = { "attr", "fam", "char", NULL };
-const char *node_fields_sub_box[] = { "attr", "list", NULL };
-const char *node_fields_sub_mlist[] = { "attr", "list", NULL };
+const char *node_fields_sub_box[] = { "attr", "head", NULL };
+const char *node_fields_sub_mlist[] = { "attr", "head", NULL };
const char *node_fields_math_text_char[] = { "attr", "fam", "char", NULL };
const char *node_fields_delim[] =
{ "attr", "small_fam", "small_char", "large_fam", "large_char", NULL };
@@ -186,7 +186,7 @@ const char *node_fields_whatsit_pdf_start_thread[] =
const char *node_fields_whatsit_pdf_end_thread[] = { "attr", NULL };
const char *node_fields_whatsit_pdf_save_pos[] = { "attr", NULL };
const char *node_fields_whatsit_late_lua[] =
- { "attr", "reg", "data", "name", NULL };
+ { "attr", "reg", "data", "name", "string", NULL };
const char *node_fields_whatsit_close_lua[] = { "attr", "reg", NULL };
const char *node_fields_whatsit_pdf_colorstack[] =
{ "attr", "stack", "cmd", "data", NULL };
@@ -232,11 +232,9 @@ node_info node_data[] = {
{math_char_node, math_kernel_node_size, node_fields_math_char, "math_char"},
{sub_box_node, math_kernel_node_size, node_fields_sub_box, "sub_box"},
{sub_mlist_node, math_kernel_node_size, node_fields_sub_mlist, "sub_mlist"},
- {math_text_char_node, math_kernel_node_size, node_fields_math_text_char,
- "math_text_char"},
+ {math_text_char_node, math_kernel_node_size, node_fields_math_text_char, "math_text_char"},
{delim_node, math_shield_node_size, node_fields_delim, "delim"},
- {margin_kern_node, margin_kern_node_size, node_fields_margin_kern,
- "margin_kern"},
+ {margin_kern_node, margin_kern_node_size, node_fields_margin_kern, "margin_kern"},
{glyph_node, glyph_node_size, node_fields_glyph, "glyph"},
{align_record_node, box_node_size, NULL, "align_record"},
{pseudo_file_node, pseudo_file_node_size, NULL, "pseudo_file"},
@@ -248,8 +246,7 @@ node_info node_data[] = {
{span_node, span_node_size, NULL, "span"},
{attribute_node, attribute_node_size, node_fields_attribute, "attribute"},
{glue_spec_node, glue_spec_size, node_fields_glue_spec, "glue_spec"},
- {attribute_list_node, attribute_node_size, node_fields_attribute_list,
- "attribute_list"},
+ {attribute_list_node, attribute_node_size, node_fields_attribute_list, "attribute_list"},
{action_node, pdf_action_size, node_fields_action, "action"},
{temp_node, temp_node_size, NULL, "temp"},
{align_stack_node, align_stack_node_size, NULL, "align_stack"},
@@ -390,10 +387,12 @@ halfword new_node(int i, int j)
but the overall allocation faster then an explicit test
at the top of |new_node()|.
*/
- free_node(n, variable_node_size);
- n = slow_get_node(j);
- (void) memset((void *) (varmem + n + 1), 0,
+ if (j>0) {
+ free_node(n, variable_node_size);
+ n = slow_get_node(j);
+ (void) memset((void *) (varmem + n + 1), 0,
(sizeof(memory_word) * ((unsigned) j - 1)));
+ }
break;
default:
break;
@@ -660,9 +659,7 @@ halfword copy_node(const halfword p)
add_token_ref(pdf_setmatrix_data(p));
break;
case late_lua_node:
- if (late_lua_name(p) > 0)
- add_token_ref(late_lua_name(p));
- add_token_ref(late_lua_data(p));
+ copy_late_lua(r, p);
break;
case pdf_annot_node:
add_token_ref(pdf_annot_data(p));
@@ -957,9 +954,7 @@ void flush_node(halfword p)
delete_token_ref(pdf_setmatrix_data(p));
break;
case late_lua_node:
- if (late_lua_name(p) > 0)
- delete_token_ref(late_lua_name(p));
- delete_token_ref(late_lua_data(p));
+ free_late_lua(p);
break;
case pdf_annot_node:
delete_token_ref(pdf_annot_data(p));
@@ -1194,7 +1189,8 @@ void check_node(halfword p)
case late_lua_node:
if (late_lua_name(p) > 0)
check_token_ref(late_lua_name(p));
- check_token_ref(late_lua_data(p));
+ if (late_lua_type(p) == normal)
+ check_token_ref(late_lua_data(p));
break;
case pdf_annot_node:
check_token_ref(pdf_annot_data(p));
@@ -1575,33 +1571,43 @@ void init_node_mem(int t)
shrink_order(fil_neg_glue) = normal;
/* initialize node list heads */
vinfo(page_ins_head) = 0;
+ type(page_ins_head) = temp_node;
vlink(page_ins_head) = null;
alink(page_ins_head) = null;
vinfo(contrib_head) = 0;
+ type(contrib_head) = temp_node;
vlink(contrib_head) = null;
alink(contrib_head) = null;
vinfo(page_head) = 0;
+ type(page_head) = temp_node;
vlink(page_head) = null;
alink(page_head) = null;
vinfo(temp_head) = 0;
+ type(temp_head) = temp_node;
vlink(temp_head) = null;
alink(temp_head) = null;
vinfo(hold_head) = 0;
+ type(hold_head) = temp_node;
vlink(hold_head) = null;
alink(hold_head) = null;
vinfo(adjust_head) = 0;
+ type(adjust_head) = temp_node;
vlink(adjust_head) = null;
alink(adjust_head) = null;
vinfo(pre_adjust_head) = 0;
+ type(pre_adjust_head) = temp_node;
vlink(pre_adjust_head) = null;
alink(pre_adjust_head) = null;
vinfo(active) = 0;
+ type(active) = unhyphenated_node;
vlink(active) = null;
alink(active) = null;
vinfo(align_head) = 0;
+ type(align_head) = temp_node;
vlink(align_head) = null;
alink(align_head) = null;
vinfo(end_span) = 0;
+ type(end_span) = span_node;
vlink(end_span) = null;
alink(end_span) = null;
type(begin_point) = glyph_node;
@@ -2334,9 +2340,7 @@ static void show_whatsit_node(int p)
tprint_esc("noboundary");
break;
case late_lua_node:
- tprint_esc("latelua");
- print_int(late_lua_reg(p));
- print_mark(late_lua_data(p));
+ show_late_lua(p);
break;
case close_lua_node:
tprint_esc("closelua");
@@ -2812,6 +2816,11 @@ void show_node_list(int p)
tprint(" pre ");
node_list_display(adjust_ptr(p)); /* recursive call */
break;
+ case glue_spec_node:
+ tprint("<glue_spec ");
+ print_spec(p, NULL);
+ tprint(">");
+ break;
default:
show_math_node(p);
break;
diff --git a/Build/source/texk/web2c/luatexdir/tex/textcodes.w b/Build/source/texk/web2c/luatexdir/tex/textcodes.w
index 5f237c58481..fae9ba9ce87 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textcodes.w
+++ b/Build/source/texk/web2c/luatexdir/tex/textcodes.w
@@ -21,8 +21,8 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: textcodes.w 3612 2010-04-13 09:29:42Z taco $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/textcodes.w $";
+ "$Id: textcodes.w 3615 2010-04-13 21:59:59Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/textcodes.w $";
@ @c
#define LCCODESTACK 8
diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.h b/Build/source/texk/web2c/luatexdir/tex/textoken.h
index 7af0bf4ee51..b57c42282ea 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textoken.h
+++ b/Build/source/texk/web2c/luatexdir/tex/textoken.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: textoken.h 3723 2010-06-18 09:19:27Z taco $ */
+/* $Id: textoken.h 3853 2010-09-03 18:05:14Z oneiros $ */
#ifndef TEXTOKEN_H
# define TEXTOKEN_H
@@ -48,10 +48,10 @@ typedef struct smemory_word_ {
# ifdef WORDS_BIGENDIAN
halfword hhrh;
halfword hhlh;
-#else
+# else
halfword hhlh;
halfword hhrh;
-#endif
+# endif
} smemory_word;
# define fix_mem_init 10000
diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.w b/Build/source/texk/web2c/luatexdir/tex/textoken.w
index 501371bc3e1..2a57eff17c5 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textoken.w
+++ b/Build/source/texk/web2c/luatexdir/tex/textoken.w
@@ -19,8 +19,8 @@
@ @c
static const char _svn_version[] =
- "$Id: textoken.w 3612 2010-04-13 09:29:42Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/tex/textoken.w $";
+ "$Id: textoken.w 4032 2010-12-11 09:38:19Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/textoken.w $";
#include "ptexlib.h"
@@ -480,45 +480,37 @@ boolean scan_keyword(const char *s)
halfword q; /* new node being added to the token list via |store_new_token| */
const char *k; /* index into |str_pool| */
halfword save_cur_cs = cur_cs;
- if (strlen(s) == 1) {
- /* Get the next non-blank non-call token; */
- do {
- get_x_token();
- } while ((cur_cmd == spacer_cmd) || (cur_cmd == relax_cmd));
- if ((cur_cs == 0) && ((cur_chr == *s) || (cur_chr == *s - 'a' + 'A'))) {
- return true;
- } else {
+ int saved_align_state = align_state;
+ assert (strlen(s) > 1);
+ p = backup_head;
+ token_link(p) = null;
+ k = s;
+ while (*k) {
+ get_x_token(); /* recursion is possible here */
+ if ((cur_cs == 0) &&
+ ((cur_chr == *k) || (cur_chr == *k - 'a' + 'A'))) {
+ store_new_token(cur_tok);
+ k++;
+ } else if ((cur_cmd != spacer_cmd) || (p != backup_head)) {
+ if (p != backup_head) {
+ q = get_avail();
+ token_info(q) = cur_tok;
+ token_link(q) = null;
+ token_link(p) = q;
+ begin_token_list(token_link(backup_head), backed_up);
+ if (cur_cmd != endv_cmd)
+ align_state = saved_align_state;
+ } else {
+ back_input();
+ }
cur_cs = save_cur_cs;
- back_input();
return false;
}
- } else {
- p = backup_head;
- token_link(p) = null;
- k = s;
- while (*k) {
- get_x_token(); /* recursion is possible here */
- if ((cur_cs == 0) &&
- ((cur_chr == *k) || (cur_chr == *k - 'a' + 'A'))) {
- store_new_token(cur_tok);
- k++;
- } else if ((cur_cmd != spacer_cmd) || (p != backup_head)) {
- if (p != backup_head) {
- q = get_avail();
- token_info(q) = cur_tok;
- token_link(q) = null;
- token_link(p) = q;
- begin_token_list(token_link(backup_head), backed_up);
- } else {
- back_input();
- }
- cur_cs = save_cur_cs;
- return false;
- }
- }
- flush_list(token_link(backup_head));
}
+ flush_list(token_link(backup_head));
cur_cs = save_cur_cs;
+ if (cur_cmd != endv_cmd)
+ align_state = saved_align_state;
return true;
}
@@ -949,10 +941,6 @@ static boolean get_next_file(void)
break;
}
} else {
- if (current_ocp_lstack > 0) {
- pop_input();
- return false;
- }
if (iname != 21)
istate = new_line;
@@ -1812,7 +1800,7 @@ void conv_toks(void)
break;
case pdf_xform_name_code:
scan_int();
- check_obj_exists(static_pdf, obj_type_xform, cur_val);
+ check_obj_type(static_pdf, obj_type_xform, cur_val);
break;
case pdf_creation_date_code:
ins_list(string_to_toks(getcreationdate(static_pdf)));
@@ -1920,7 +1908,7 @@ void conv_toks(void)
break;
case pdf_ximage_bbox_code:
scan_int();
- check_obj_exists(static_pdf, obj_type_ximage, cur_val);
+ check_obj_type(static_pdf, obj_type_ximage, cur_val);
i = obj_data_ptr(static_pdf, cur_val);
scan_int();
j = cur_val;
diff --git a/Build/source/texk/web2c/luatexdir/utils/avlstuff.w b/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
index d46c5cabe77..81b0bd92028 100644
--- a/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
+++ b/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
@@ -26,7 +26,7 @@
static const char _svn_version[] =
"$Id: avlstuff.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/avlstuff.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/avlstuff.w $";
@ memory management functions for AVL
@c
diff --git a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
index 5c02f13d76d..a9cd131d64a 100644
--- a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
+++ b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
@@ -24,7 +24,7 @@
static const char _svn_version[] =
"$Id: managed-sa.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/managed-sa.w $";
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/managed-sa.w $";
@ @c
static void store_sa_stack(sa_tree a, int n, sa_tree_item v, int gl)
diff --git a/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h b/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
index 9a8dba6825b..53988694299 100644
--- a/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
+++ b/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
@@ -34,7 +34,7 @@ authorization from the copyright holder.
*/
-/* $Id: synctex-luatex.h 3685 2010-05-13 07:37:47Z taco $ */
+/* $Id: synctex-luatex.h 4064 2011-01-12 22:12:22Z hhenkel $ */
#undef synchronization_field_size
#define synchronization_field_size 1
@@ -85,7 +85,7 @@ authorization from the copyright holder.
#define SYNCTEX_CURH static_pdf->posstruct->pos.h
#define SYNCTEX_GET_JOB_NAME() makecstring(job_name)
-#define SYNCTEX_GET_LOG_NAME() (char *)xstrdup((const char*)texmf_log_name)
+#define SYNCTEX_GET_LOG_NAME() get_full_log_name()
#define SYNCTEX_RULE_WD width(p)
#define SYNCTEX_RULE_HT height(p)
@@ -97,14 +97,13 @@ authorization from the copyright holder.
#include "ptexlib.h"
-/* We observe pdfoutputvalue in order to determine whether output mode is
+/* We observe static_pdf->o_mode in order to determine whether output mode is
* pdf or dvi.
- * We will assume that pdf_output_value equals pdf_output before entering
+ * We will assume that pdf->o_mode is set before entering
* the synctex_sheet function below. */
#undef SYNCTEX_OFFSET_IS_PDF
-#define SYNCTEX_OFFSET_IS_PDF (pdf_output_value>0)
+#define SYNCTEX_OFFSET_IS_PDF (static_pdf->o_mode==OMODE_PDF)
#undef SYNCTEX_OUTPUT
-#define SYNCTEX_OUTPUT ((pdf_output_value>0)?"pdf":"dvi")
+#define SYNCTEX_OUTPUT ((static_pdf->o_mode==OMODE_PDF)?"pdf":"dvi")
#define __SyncTeX__ 1
-
diff --git a/Build/source/texk/web2c/luatexdir/utils/synctex.c b/Build/source/texk/web2c/luatexdir/utils/synctex.c
index 557c0bdae23..3b643ee064f 100644
--- a/Build/source/texk/web2c/luatexdir/utils/synctex.c
+++ b/Build/source/texk/web2c/luatexdir/utils/synctex.c
@@ -998,6 +998,12 @@ static inline void synctex_record_rule(halfword p);
# define SYNCTEX_IGNORE_RULE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
|| (0 >= SYNCTEX_TAG_MODEL(NODE,rule_node_size)) \
|| (0 >= SYNCTEX_LINE_MODEL(NODE,rule_node_size))
+# define SYNCTEX_IGNORE_GLUE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+ || (0 >= SYNCTEX_TAG_MODEL(NODE,glue_node_size)) \
+ || (0 >= SYNCTEX_LINE_MODEL(NODE,glue_node_size))
+# define SYNCTEX_IGNORE_KERN(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+ || (0 >= SYNCTEX_TAG_MODEL(NODE,kern_node_size)) \
+ || (0 >= SYNCTEX_LINE_MODEL(NODE,kern_node_size))
void synctexhorizontalruleorglue(halfword p, halfword this_box
__attribute__ ((unused)))
{
@@ -1009,8 +1015,12 @@ void synctexhorizontalruleorglue(halfword p, halfword this_box
if (SYNCTEX_IGNORE_RULE(p)) {
return;
}
- } else {
- if (SYNCTEX_IGNORE(p)) {
+ } else if (SYNCTEX_TYPE(p) == glue_node) {
+ if (SYNCTEX_IGNORE_GLUE(p)) {
+ return;
+ }
+ } else if (SYNCTEX_TYPE(p) == kern_node) {
+ if (SYNCTEX_IGNORE_KERN(p)) {
return;
}
}
@@ -1025,13 +1035,13 @@ void synctexhorizontalruleorglue(halfword p, halfword this_box
synctex_record_rule(p); /* always record synchronously: maybe some text is outside the box */
break;
case glue_node:
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, glue_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, glue_node_size);
synctex_record_glue(p); /* always record synchronously: maybe some text is outside the box */
break;
case kern_node:
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_record_kern(p); /* always record synchronously: maybe some text is outside the box */
break;
default:
@@ -1049,7 +1059,7 @@ void synctexkern(halfword p, halfword this_box)
# if SYNCTEX_DEBUG
printf("\nSynchronize DEBUG: synctexkern\n");
# endif
- if (SYNCTEX_IGNORE(p)) {
+ if (SYNCTEX_IGNORE_KERN(p)) {
return;
}
if (SYNCTEX_CONTEXT_DID_CHANGE(p)) {
@@ -1061,13 +1071,13 @@ void synctexkern(halfword p, halfword this_box)
if (synctex_ctxt.node == this_box) {
/* first node in the list */
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = &synctex_kern_recorder;
} else {
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = NULL;
/* always record when the context has just changed
* and when not the first node */
@@ -1076,8 +1086,8 @@ void synctexkern(halfword p, halfword this_box)
} else {
/* just update the geometry and type (for future improvements) */
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = &synctex_kern_recorder;
}
}
@@ -1455,8 +1465,8 @@ static inline void synctex_record_glue(halfword p)
printf("\nSynchronize DEBUG: synctex_glue_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "g%i,%i:%i,%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, glue_node_size),
+ SYNCTEX_LINE_MODEL(p, glue_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT);
if (len > 0) {
synctex_ctxt.total_length += len;
@@ -1475,8 +1485,8 @@ static inline void synctex_record_kern(halfword p)
printf("\nSynchronize DEBUG: synctex_kern_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, kern_node_size),
+ SYNCTEX_LINE_MODEL(p, kern_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT,
SYNCTEX_WIDTH(p) UNIT);
if (len > 0) {
@@ -1517,8 +1527,8 @@ void synctex_math_recorder(halfword p)
printf("\nSynchronize DEBUG: synctex_math_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "$%i,%i:%i,%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, math_node_size),
+ SYNCTEX_LINE_MODEL(p, math_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT);
if (len > 0) {
synctex_ctxt.total_length += len;
@@ -1537,8 +1547,8 @@ void synctex_kern_recorder(halfword p)
printf("\nSynchronize DEBUG: synctex_kern_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, kern_node_size),
+ SYNCTEX_LINE_MODEL(p, kern_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT,
SYNCTEX_WIDTH(p) UNIT);
if (len > 0) {
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w
index 05eca81cbc6..e3dc26bc6bf 100644
--- a/Build/source/texk/web2c/luatexdir/utils/utils.w
+++ b/Build/source/texk/web2c/luatexdir/utils/utils.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: utils.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/utils.w $";
+ "$Id: utils.w 3779 2010-07-31 11:29:22Z oneiros $ "
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/utils.w $";
@ @c
#include "openbsd-compat.h"
@@ -49,13 +49,11 @@ static const char _svn_version[] =
#include "lua/luatex-api.h" /* for ptexbanner */
#include "png.h"
-#ifdef POPPLER_VERSION
-# define xpdfString "poppler"
-# include "poppler-config.h"
-# define xpdfVersion POPPLER_VERSION
-#else
-# define xpdfString "xpdf"
-# include "xpdf/config.h" /* just to get the xpdf version */
+
+#include "poppler-config.h"
+#ifndef POPPLER_VERSION
+# include "aconf.h"
+# define POPPLER_VERSION POPPLER_PACKAGE_VERSION
#endif
@ @c
@@ -354,9 +352,9 @@ void initversionstring(char **versions)
(void) asprintf(versions,
"Compiled with libpng %s; using libpng %s\n"
"Compiled with zlib %s; using zlib %s\n"
- "Compiled with %s version %s\n",
+ "Compiled with poppler version %s\n",
PNG_LIBPNG_VER_STRING, png_libpng_ver,
- ZLIB_VERSION, zlib_version, xpdfString, xpdfVersion);
+ ZLIB_VERSION, zlib_version, POPPLER_VERSION);
}
@ @c
@@ -407,7 +405,6 @@ scaled divide_scaled(scaled s, scaled m, int dd)
/* rounding */
if (2 * r >= m) {
q++;
- r -= m;
}
return sign * q;
}
diff --git a/Build/source/texk/web2c/man/ChangeLog b/Build/source/texk/web2c/man/ChangeLog
index c854bf868bf..9893f36b5a3 100644
--- a/Build/source/texk/web2c/man/ChangeLog
+++ b/Build/source/texk/web2c/man/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-12 Taco Hoekwater <taco@metapost.org>
+
+ * luatex.man: update to version 0.70
+
2011-04-05 Taco Hoekwater <taco@metapost.org>
* mpost.man: update to version 1.504
diff --git a/Build/source/texk/web2c/man/Makefile.in b/Build/source/texk/web2c/man/Makefile.in
index e68e7d7e210..06178ab778f 100644
--- a/Build/source/texk/web2c/man/Makefile.in
+++ b/Build/source/texk/web2c/man/Makefile.in
@@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -213,6 +214,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -227,6 +231,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/web2c/man/luatex.man b/Build/source/texk/web2c/man/luatex.man
index 225b4e0ae05..f11a9b8b6f2 100644
--- a/Build/source/texk/web2c/man/luatex.man
+++ b/Build/source/texk/web2c/man/luatex.man
@@ -1,4 +1,4 @@
-.TH LUATEX 1 "1 March 2011" "luatex 0.40" "Web2C @VERSION@"
+.TH LUATEX 1 "12 April 2011" "luatex 0.70" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF M\s-2ETAFONT\s0
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in
index 7e5f6f5f3a0..4035224d649 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.in
+++ b/Build/source/texk/web2c/omegafonts/Makefile.in
@@ -58,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -221,6 +222,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -235,6 +239,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/web2c/otps/Makefile.in b/Build/source/texk/web2c/otps/Makefile.in
index 733109e7313..cf5fc7f5cc3 100644
--- a/Build/source/texk/web2c/otps/Makefile.in
+++ b/Build/source/texk/web2c/otps/Makefile.in
@@ -58,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -242,6 +243,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -256,6 +260,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/web2c/window/Makefile.in b/Build/source/texk/web2c/window/Makefile.in
index aa0a1983cc4..38985bafd39 100644
--- a/Build/source/texk/web2c/window/Makefile.in
+++ b/Build/source/texk/web2c/window/Makefile.in
@@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
$(top_srcdir)/../../m4/kpse-obsdcompat-flags.m4 \
+ $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../../m4/kpse-socket-libs.m4 \
$(top_srcdir)/../../m4/kpse-teckit-flags.m4 \
@@ -203,6 +204,9 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POPPLER_DEPEND = @POPPLER_DEPEND@
+POPPLER_INCLUDES = @POPPLER_INCLUDES@
+POPPLER_LIBS = @POPPLER_LIBS@
PTEXENC_DEPEND = @PTEXENC_DEPEND@
PTEXENC_INCLUDES = @PTEXENC_INCLUDES@
PTEXENC_LIBS = @PTEXENC_LIBS@
@@ -217,6 +221,7 @@ TECKIT_DEPEND = @TECKIT_DEPEND@
TECKIT_INCLUDES = @TECKIT_INCLUDES@
TECKIT_LIBS = @TECKIT_LIBS@
TIE = @TIE@
+TXTTOZLIB = @TXTTOZLIB@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
diff --git a/Build/source/texk/xdv2pdf/configure b/Build/source/texk/xdv2pdf/configure
index 4a9ebf3697b..25768862198 100755
--- a/Build/source/texk/xdv2pdf/configure
+++ b/Build/source/texk/xdv2pdf/configure
@@ -763,7 +763,6 @@ with_sysroot
enable_libtool_lock
enable_largefile
enable_compiler_warnings
-with_gnu_ld
with_system_kpathsea
with_kpathsea_includes
with_kpathsea_libdir
@@ -777,19 +776,12 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
CXX
CXXFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
CCC
CXXCPP
OBJC
-OBJCFLAGS
-LDFLAGS
-LIBS
-OBJC'
+OBJCFLAGS'
# Initialize some variables set by options.
@@ -19527,9 +19519,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/xdvik/configure b/Build/source/texk/xdvik/configure
index 524c3eb6608..88f39ca75e7 100755
--- a/Build/source/texk/xdvik/configure
+++ b/Build/source/texk/xdvik/configure
@@ -800,7 +800,6 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
XMKMF'
ac_subdirs_all='squeeze'
@@ -18530,9 +18529,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/xdvik/squeeze/configure b/Build/source/texk/xdvik/squeeze/configure
index 4caeeeb83dc..653642c82e1 100755
--- a/Build/source/texk/xdvik/squeeze/configure
+++ b/Build/source/texk/xdvik/squeeze/configure
@@ -3948,8 +3948,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/texk/xdvipdfmx/configure b/Build/source/texk/xdvipdfmx/configure
index 64b29a61c28..e6a1a76169a 100755
--- a/Build/source/texk/xdvipdfmx/configure
+++ b/Build/source/texk/xdvipdfmx/configure
@@ -787,8 +787,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -16325,9 +16324,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in
index 6070e25731f..9addb04ab38 100644
--- a/Build/source/utils/Makefile.in
+++ b/Build/source/utils/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../m4/kpse-lt-hack.m4 \
$(top_srcdir)/../m4/kpse-options.m4 \
$(top_srcdir)/../m4/kpse-pkgs.m4 \
+ $(top_srcdir)/../m4/kpse-poppler-flags.m4 \
$(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \
$(top_srcdir)/../m4/kpse-setup.m4 \
$(top_srcdir)/../m4/kpse-t1lib-flags.m4 \
@@ -122,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \
$(top_srcdir)/../libs/graphite/ac/withenable.ac \
$(top_srcdir)/../libs/zziplib/ac/withenable.ac \
$(top_srcdir)/../libs/xpdf/ac/withenable.ac \
+ $(top_srcdir)/../libs/poppler/ac/withenable.ac \
$(top_srcdir)/../libs/gd/ac/withenable.ac \
$(top_srcdir)/../libs/freetype2/ac/withenable.ac \
$(top_srcdir)/../libs/freetype/ac/withenable.ac \
diff --git a/Build/source/utils/aclocal.m4 b/Build/source/utils/aclocal.m4
index 9eb7b6d1a8d..86d2a2ce443 100644
--- a/Build/source/utils/aclocal.m4
+++ b/Build/source/utils/aclocal.m4
@@ -1001,6 +1001,7 @@ m4_include([../m4/kpse-libpng-flags.m4])
m4_include([../m4/kpse-lt-hack.m4])
m4_include([../m4/kpse-options.m4])
m4_include([../m4/kpse-pkgs.m4])
+m4_include([../m4/kpse-poppler-flags.m4])
m4_include([../m4/kpse-ptexenc-flags.m4])
m4_include([../m4/kpse-setup.m4])
m4_include([../m4/kpse-t1lib-flags.m4])
diff --git a/Build/source/utils/biber/configure b/Build/source/utils/biber/configure
index c3b56e3d6f7..31780e61931 100755
--- a/Build/source/utils/biber/configure
+++ b/Build/source/utils/biber/configure
@@ -4148,8 +4148,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/chktex/configure b/Build/source/utils/chktex/configure
index 70ddba111b2..949b996bad5 100755
--- a/Build/source/utils/chktex/configure
+++ b/Build/source/utils/chktex/configure
@@ -5251,9 +5251,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/configure b/Build/source/utils/configure
index 24f4072a3b1..82b3a8e8784 100755
--- a/Build/source/utils/configure
+++ b/Build/source/utils/configure
@@ -771,6 +771,7 @@ with_graphite
with_system_graphite
with_system_zziplib
with_system_xpdf
+with_system_poppler
with_system_gd
with_gd_includes
with_gd_libdir
@@ -1587,6 +1588,8 @@ Optional Packages:
pkg-config)
--with-system-xpdf use installed poppler headers and library instead of
xpdf (requires pkg-config)
+ --with-system-poppler use installed poppler headers and library instead of
+ poppler (requires pkg-config)
--with-system-gd use installed gd headers and library
--with-gd-includes=DIR gd headers installed in DIR
--with-gd-libdir=DIR gd library installed in DIR
@@ -3546,7 +3549,7 @@ case $enable_luatex in #(
esac
test "x$enable_web2c:$enable_luatex" = xyes:yes && {
- need_xpdf=yes
+ need_poppler=yes
need_libpng=yes
need_obsdcompat=yes
need_zziplib=yes
@@ -4636,6 +4639,27 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;}
fi
+## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/
+## configure options and TL libraries required for poppler
+
+# Check whether --with-system-poppler was given.
+if test "${with_system_poppler+set}" = set; then :
+ withval=$with_system_poppler;
+fi
+if test "x$with_system_poppler" = x; then
+ if test -f $srcdir/../libs/poppler/configure; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5
+$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;}
+ with_system_poppler=no
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5
+$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;}
+ with_system_poppler=yes
+ fi
+ ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'"
+fi
+
+
## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/
## configure options and TL libraries required for gd
@@ -6415,8 +6439,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/dialog/configure b/Build/source/utils/dialog/configure
index 5a03ed8c047..0a5263d268c 100755
--- a/Build/source/utils/dialog/configure
+++ b/Build/source/utils/dialog/configure
@@ -3928,8 +3928,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/ps2eps/configure b/Build/source/utils/ps2eps/configure
index ecbd01046bb..3a53ca47d5c 100755
--- a/Build/source/utils/ps2eps/configure
+++ b/Build/source/utils/ps2eps/configure
@@ -4073,8 +4073,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/psutils/configure b/Build/source/utils/psutils/configure
index 9f139e1d48c..9f3f55fe5e3 100755
--- a/Build/source/utils/psutils/configure
+++ b/Build/source/utils/psutils/configure
@@ -4073,8 +4073,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/t1utils/aclocal.m4 b/Build/source/utils/t1utils/aclocal.m4
index 8cd538d37dc..f004a0e2d53 100644
--- a/Build/source/utils/t1utils/aclocal.m4
+++ b/Build/source/utils/t1utils/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/utils/t1utils/configure b/Build/source/utils/t1utils/configure
index 9b40b4a91c1..3fd6f706f61 100755
--- a/Build/source/utils/t1utils/configure
+++ b/Build/source/utils/t1utils/configure
@@ -706,8 +706,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -5229,9 +5228,9 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_headers="`echo $ac_config_headers`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/tpic2pdftex/configure b/Build/source/utils/tpic2pdftex/configure
index b70f9e2786a..6e3d366110e 100755
--- a/Build/source/utils/tpic2pdftex/configure
+++ b/Build/source/utils/tpic2pdftex/configure
@@ -3938,8 +3938,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/vlna/aclocal.m4 b/Build/source/utils/vlna/aclocal.m4
index 8cd538d37dc..f004a0e2d53 100644
--- a/Build/source/utils/vlna/aclocal.m4
+++ b/Build/source/utils/vlna/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/utils/vlna/configure b/Build/source/utils/vlna/configure
index 483302afb37..b734e9e7d4b 100755
--- a/Build/source/utils/vlna/configure
+++ b/Build/source/utils/vlna/configure
@@ -4100,8 +4100,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/xindy/configure b/Build/source/utils/xindy/configure
index 998ca2ed658..13c1221bb0a 100755
--- a/Build/source/utils/xindy/configure
+++ b/Build/source/utils/xindy/configure
@@ -4824,8 +4824,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Build/source/utils/xpdfopen/aclocal.m4 b/Build/source/utils/xpdfopen/aclocal.m4
index 8cd538d37dc..f004a0e2d53 100644
--- a/Build/source/utils/xpdfopen/aclocal.m4
+++ b/Build/source/utils/xpdfopen/aclocal.m4
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/Build/source/utils/xpdfopen/configure b/Build/source/utils/xpdfopen/configure
index 05821a2f6c2..0934b265f0e 100755
--- a/Build/source/utils/xpdfopen/configure
+++ b/Build/source/utils/xpdfopen/configure
@@ -673,8 +673,7 @@ LDFLAGS
LIBS
CPPFLAGS
XMKMF
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -4943,8 +4942,8 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+config_files="`echo $ac_config_files`"
+config_commands="`echo $ac_config_commands`"
_ACEOF
diff --git a/Master/texmf-dist/doc/luatex/base/fdata.lua b/Master/texmf-dist/doc/luatex/base/fdata.lua
new file mode 100644
index 00000000000..7da05df3a2e
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/fdata.lua
@@ -0,0 +1,4554 @@
+-- $Id: fdata.lua 4106 2011-04-10 12:51:54Z hhenkel $
+
+local fdata = {
+ ["callback"]={
+ ["functions"]={
+ ["buildpage_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="info",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Process objects as they are added to the main vertical list. The string argument gives some context.",
+ ["type"]="callback",
+ },
+ ["close"]={
+ ["arguments"]={
+ {
+ ["name"]="env",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Close a file opened with the \\afunction{open_read_file} callback. The argument is the return value from the \\afunction{open_read_file}",
+ ["type"]="callback",
+ },
+ ["define_font"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="font",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["shortdesc"]="Define a font from within lua code. The arguments are the user-supplied information, with negative numbers indicating \\type{scaled}, positive numbers \\type{at}",
+ ["type"]="callback",
+ },
+ ["find"]={
+ ["arguments"]={
+ {
+ ["name"]="callback_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="function",
+ },
+ },
+ ["shortdesc"]="Returns the function currently associated with a callback, or \\type{nil}",
+ ["type"]="function",
+ },
+ ["find_data_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find an input data file for PDF attachment.",
+ ["type"]="callback",
+ },
+ ["find_enc_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a font encoding file.",
+ ["type"]="callback",
+ },
+ ["find_font_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a font metrics file.",
+ ["type"]="callback",
+ },
+ ["find_format_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find the format file.",
+ ["type"]="callback",
+ },
+ ["find_image_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find an image file for inclusion.",
+ ["type"]="callback",
+ },
+ ["find_map_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a font map file.",
+ ["type"]="callback",
+ },
+ ["find_opentype_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find an OpenType font file.",
+ ["type"]="callback",
+ },
+ ["find_output_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find the output (PDF or DVI) file.",
+ ["type"]="callback",
+ },
+ ["find_pk_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a PK font bitmap file.",
+ ["type"]="callback",
+ },
+ ["find_read_file"]={
+ ["arguments"]={
+ {
+ ["name"]="id_number",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a file for \\tex{input} (0) or \\tex{openin} (higher integers).",
+ ["type"]="callback",
+ },
+ ["find_subfont_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a subfont definition file.",
+ ["type"]="callback",
+ },
+ ["find_truetype_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find an TrueType font file.",
+ ["type"]="callback",
+ },
+ ["find_type1_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find an Type1 (PostScript) font file.",
+ ["type"]="callback",
+ },
+ ["find_vf_file"]={
+ ["arguments"]={
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a VF file.",
+ ["type"]="callback",
+ },
+ ["find_write_file"]={
+ ["arguments"]={
+ {
+ ["name"]="id_number",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="asked_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="actual_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a file for writing to the log file (0) or with \\tex{write} (higher integers).",
+ ["type"]="callback",
+ },
+ ["finish_pdffile"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions just before the PDF closing takes place.",
+ ["type"]="callback",
+ },
+ ["hpack_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="groupcode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="packtype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="direction",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Alter a node list before horizontal packing takes place. The first string gives some context,\
+ the number is the desired size, the second string is either \\aliteral{exact} or \\aliteral{additional} (modifies the first string),\
+ the third string is the desired direction",
+ ["type"]="callback",
+ },
+ ["hyphenate"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="tail",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Apply hyphenation to a node list.",
+ ["type"]="callback",
+ },
+ ["kerning"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="tail",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Apply kerning to a node list.",
+ ["type"]="callback",
+ },
+ ["ligaturing"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="tail",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Apply ligaturing to a node list.",
+ ["type"]="callback",
+ },
+ ["linebreak_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="is_display",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Override the linebreaking algorithm. The boolean is \\type{true} if this is a pre-display break.",
+ ["type"]="callback",
+ },
+ ["list"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="info",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Produce a list of all known callback names.",
+ ["type"]="function",
+ },
+ ["mlist_to_hlist"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="displaytype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="need_penalties",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Convert a math node list into a horizontal node list.",
+ ["type"]="callback",
+ },
+ ["open_read_file"]={
+ ["arguments"]={
+ {
+ ["name"]="file_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="env",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Open a file for reading. The returned table should define key functions for \\aliteral{reader} and \\aliteral{close}.",
+ ["type"]="callback",
+ },
+ ["post_linebreak_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="groupcode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Alter a node list afer linebreaking has taken place. The string argument gives some context.",
+ ["type"]="callback",
+ },
+ ["pre_dump"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions just before format dumping takes place.",
+ ["type"]="callback",
+ },
+ ["pre_linebreak_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="groupcode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Alter a node list before linebreaking takes place. The string argument gives some context.",
+ ["type"]="callback",
+ },
+ ["pre_output_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="groupcode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="packtype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="maxdepth",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="direction",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Alter a node list before boxing to \\tex{outputbox} takes place. See \\afunction{vpack_filter} for the arguments.",
+ ["type"]="callback",
+ },
+ ["process_input_buffer"]={
+ ["arguments"]={
+ {
+ ["name"]="buffer",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="adjusted_buffer",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Modify the encoding of the input buffer.",
+ ["type"]="callback",
+ },
+ ["process_output_buffer"]={
+ ["arguments"]={
+ {
+ ["name"]="buffer",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="adjusted_buffer",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Modify the encoding of the output buffer.",
+ ["type"]="callback",
+ },
+ ["read_data_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a data file.",
+ ["type"]="callback",
+ },
+ ["read_enc_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a font encoding file.",
+ ["type"]="callback",
+ },
+ ["read_font_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a TFM metrics file. Return \\type{true}, the data, and the data length for success, \\type{false} otherwise",
+ ["type"]="callback",
+ },
+ ["read_map_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a font map file.",
+ ["type"]="callback",
+ },
+ ["read_opentype_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read an OpenType font.",
+ ["type"]="callback",
+ },
+ ["read_pk_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a font bitmap PK file.",
+ ["type"]="callback",
+ },
+ ["read_sfd_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a subfont definition file.",
+ ["type"]="callback",
+ },
+ ["read_truetype_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a TrueType font.",
+ ["type"]="callback",
+ },
+ ["read_type1_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a Type1 font.",
+ ["type"]="callback",
+ },
+ ["read_vf_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="data_size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Read a VF metrics file.",
+ ["type"]="callback",
+ },
+ ["reader"]={
+ ["arguments"]={
+ {
+ ["name"]="env",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="line",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Read a line from a file opened with the \\afunction{open_read_file} callback. The argument is the return value from \\afunction{open_read_file}",
+ ["type"]="callback",
+ },
+ ["register"]={
+ ["arguments"]={
+ {
+ ["name"]="callback_name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="callback_func",
+ ["optional"]=false,
+ ["type"]="function",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="error",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Register a callback. Passing \\type{nil} removes an existing callback. Returns \\type{nil}, \\type{error} on failure.",
+ ["type"]="function",
+ },
+ ["show_error_hook"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run action at error reporting time.",
+ ["type"]="callback",
+ },
+ ["start_page_number"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions at the start of typeset page number message reporting.",
+ ["type"]="callback",
+ },
+ ["start_run"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions at the start of the typesetting run.",
+ ["type"]="callback",
+ },
+ ["stop_page_number"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions at the end of typeset page number message reporting.",
+ ["type"]="callback",
+ },
+ ["stop_run"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Run actions just before the end of the typesetting run.",
+ ["type"]="callback",
+ },
+ ["token_filter"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="token",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Override the tokenization process. Return value is a \\type{token} or an array of tokens",
+ ["type"]="callback",
+ },
+ ["vpack_filter"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="groupcode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="size",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="packtype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="maxdepth",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="direction",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="newhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Alter a node list before vertical packing takes place. The second number is the desired max depth. See \\afunction{hpack_filter} for the arguments.",
+ ["type"]="callback",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["epdf"] = require "fdata_epdf",
+ ["font"]={
+ ["functions"]={
+ ["current"]={
+ ["arguments"]={
+ {
+ ["name"]="i",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get or set the currently active font",
+ ["type"]="function",
+ },
+ ["define"]={
+ ["arguments"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Process a font metrics table and stores it in the internal font table, returning its internal id.",
+ ["type"]="function",
+ },
+ ["each"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["shortdesc"]="Iterate over all the defined fonts.",
+ ["type"]="function",
+ },
+ ["frozen"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="True if the font is frozen and can no longer be altered.",
+ ["type"]="function",
+ },
+ ["getfont"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["shortdesc"]="Fetch an internal font id as a lua table.",
+ ["type"]="function",
+ },
+ ["id"]={
+ ["arguments"]={
+ {
+ ["name"]="csname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the font id of the font accessed by the csname given.",
+ ["type"]="function",
+ },
+ ["max"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the highest used font id at this moment.",
+ ["type"]="function",
+ },
+ ["nextid"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the next free font id number.",
+ ["type"]="function",
+ },
+ ["read_tfm"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="fnt",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["shortdesc"]="Parse a font metrics file, at the size indicated by the number.",
+ ["type"]="function",
+ },
+ ["read_vf"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="vf_fnt",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["shortdesc"]="Parse a virtual font metrics file, at the size indicated by the number.",
+ ["type"]="function",
+ },
+ ["setfont"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="metrics",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an internal font id from a lua table.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["fontloader"]={
+ ["functions"]={
+ ["apply_afmfile"]={
+ ["arguments"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="luafont",
+ },
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Apply an AFM file to a fontloader table.",
+ ["type"]="function",
+ },
+ ["apply_featurefile"]={
+ ["arguments"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="luafont",
+ },
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Apply a feature file to a fontloader table.",
+ ["type"]="function",
+ },
+ ["info"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="info",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Get various information fields from an font file.",
+ ["type"]="function",
+ },
+ ["open"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="fontname",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="luafont",
+ },
+ {
+ ["name"]="w",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Parse a font file and return a table representing its contents. The optional argument\
+ is the name of the desired font in case of font collection files. The optional return\
+ value contains any parser error strings.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["img"] = require "fdata_img",
+ ["kpse"]={
+ ["functions"]={
+ ["expand_braces"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Expand the braces in a variable.",
+ ["type"]="function",
+ },
+ ["expand_path"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Expand a path.",
+ ["type"]="function",
+ },
+ ["expand_var"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Expand a variable.",
+ ["type"]="function",
+ },
+ ["find_file"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="ftype",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="mustexist",
+ ["optional"]=true,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="dpi",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a file. The optional string is the file type as supported by the\
+ standalone \\type{kpsewhich} program (default is \\aliteral{{tex}}, no autodiscovery takes place).\
+ The optional boolean indicates wether the file must exist.\
+ The optional number is the dpi value for PK files.\
+ ",
+ ["type"]="function",
+ },
+ ["init_prog"]={
+ ["arguments"]={
+ {
+ ["name"]="prefix",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="base_dpi",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="mfmode",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="fallback",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Initialize a PK generation program. The optional string is the metafont mode fallback name",
+ ["type"]="function",
+ },
+ ["lookup"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="options",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Find a file (extended interface).",
+ ["type"]="function",
+ },
+ ["new"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="progname",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="kpathsea",
+ ["optional"]=false,
+ ["type"]="kpathsea",
+ },
+ },
+ ["shortdesc"]="Create a new kpathsea library instance. The optional string allows explicit \\type{progname} setting.",
+ ["type"]="function",
+ },
+ ["readable_file"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Returns true if a file exists and is readable.",
+ ["type"]="function",
+ },
+ ["set_program_name"]={
+ ["arguments"]={
+ {
+ ["name"]="name",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="progname",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Initialize the kpathsea library by setting the program name. The optional string allows explicit \\type{progname} setting.",
+ ["type"]="function",
+ },
+ ["show_path"]={
+ ["arguments"]={
+ {
+ ["name"]="ftype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="List the search path for a specific file type.",
+ ["type"]="function",
+ },
+ ["var_value"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the value of a variable.",
+ ["type"]="function",
+ },
+ ["version"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="r",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the kpathsea version.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+},
+ ["lang"]={
+ ["functions"]={
+ ["clean"]={
+ ["arguments"]={
+ {
+ ["name"]="o",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Creates a hyphenation key from the supplied hyphenation exception.",
+ ["type"]="function",
+ },
+ ["clear_hyphenation"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Clear the set of hyphenation exceptions.",
+ ["type"]="function",
+ },
+ ["clear_patterns"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Clear the set of hyphenation patterns.",
+ ["type"]="function",
+ },
+ ["hyphenate"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="tail",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Hyphenate a node list.",
+ ["type"]="function",
+ },
+ ["hyphenation"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Get or set hyphenation exceptions.",
+ ["type"]="function",
+ },
+ ["id"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Returns the current internal \\tex{language} id number.",
+ ["type"]="function",
+ },
+ ["new"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ },
+ ["shortdesc"]="Create a new language object, with an optional fixed id number.",
+ ["type"]="function",
+ },
+ ["patterns"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Get or set hyphenation patterns.",
+ ["type"]="function",
+ },
+ ["postexhyphenchar"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Set the post-hyphenchar for explicit hyphenation.",
+ ["type"]="function",
+ },
+ ["posthyphenchar"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Set the post-hyphenchar for implicit hyphenation.",
+ ["type"]="function",
+ },
+ ["preexhyphenchar"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Set the pre-hyphenchar for explicit hyphenation.",
+ ["type"]="function",
+ },
+ ["prehyphenchar"]={
+ ["arguments"]={
+ {
+ ["name"]="l",
+ ["optional"]=false,
+ ["type"]="language",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Set the pre-hyphenchar for implicit hyphenation.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+},
+ ["lfs"]={
+ ["functions"]={
+ ["isdir"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Return true if the string is a directory.",
+ ["type"]="function",
+ },
+ ["isfile"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Return true if the string is a file.",
+ ["type"]="function",
+ },
+ ["readlink"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the contents of a symlink (Unix only).",
+ ["type"]="function",
+ },
+ ["shortname"]={
+ ["arguments"]={
+ {
+ ["name"]="filename",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="fat",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the FAT name of a file (Windows only).",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["lua"]={
+ ["functions"]={
+ ["getbytecode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="function",
+ },
+ },
+ ["shortdesc"]="Return a previously stored function from a bytecode register.",
+ ["type"]="function",
+ },
+ ["setbytecode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="function",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Save a function in a bytecode register.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+},
+ ["mp"]={
+ ["functions"]={
+ ["char_depth"]={
+ ["arguments"]={
+ {
+ ["name"]="fontname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="char",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="w",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Report a character's depth.",
+ ["type"]="method",
+ },
+ ["char_height"]={
+ ["arguments"]={
+ {
+ ["name"]="fontname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="char",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="w",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Report a character's height.",
+ ["type"]="method",
+ },
+ ["char_width"]={
+ ["arguments"]={
+ {
+ ["name"]="fontname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="char",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="w",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Report a character's width.",
+ ["type"]="method",
+ },
+ ["execute"]={
+ ["arguments"]={
+ {
+ ["name"]="chunk",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="rettable",
+ ["optional"]=false,
+ ["type"]="mpdata",
+ },
+ },
+ ["shortdesc"]="Execute metapost code in the instance.",
+ ["type"]="method",
+ },
+ ["finish"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="rettable",
+ ["optional"]=false,
+ ["type"]="mpdata",
+ },
+ },
+ ["shortdesc"]="Finish a metapost instance.",
+ ["type"]="method",
+ },
+ ["statistics"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="stats",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Returns some statistics for this metapost instance.",
+ ["type"]="method",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["mplib"]={
+ ["functions"]={
+ ["new"]={
+ ["arguments"]={
+ {
+ ["name"]="options",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="mp",
+ ["optional"]=false,
+ ["type"]="mpinstance",
+ },
+ },
+ ["shortdesc"]="Create a new metapost instance.",
+ ["type"]="function",
+ },
+ ["version"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Returns the mplib version.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["node"]={
+ ["functions"]={
+ ["copy"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Copy a node.",
+ ["type"]="function",
+ },
+ ["copy_list"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Copy a node list.",
+ ["type"]="function",
+ },
+ ["count"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the count of nodes with a specific id in a node list. Processing stops just before the optional node.",
+ ["type"]="function",
+ },
+ ["dimensions"]={
+ ["arguments"]={
+ {
+ ["name"]="glue_set",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="glue_sign",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="glue_order",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="w",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="d",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the natural dimensions of a (horizontal) node list. The 3 optional numbers represent \
+ glue_set, glue_sign, and glue_order. The calculation stops just before the optional node (default end of list)",
+ ["type"]="function",
+ },
+ ["fields"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="subid",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Report the fields a node type understands. The optional argument is needed for whatsits.",
+ ["type"]="function",
+ },
+ ["first_glyph"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Return the first character node in a list. Processing stops just before the optional node.",
+ ["type"]="function",
+ },
+ ["flush_list"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Release a list of nodes.",
+ ["type"]="function",
+ },
+ ["free"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Release a node.",
+ ["type"]="function",
+ },
+ ["has_attribute"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="val",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return an attribute value for a node, if it has one. The optional number tests for a specific value",
+ ["type"]="function",
+ },
+ ["has_field"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="field",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Return true if the node understands the named field.",
+ ["type"]="function",
+ },
+ ["hpack"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="w",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="info",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="dir",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="b",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Pack a node list into a horizontal list. The number is the desired size, the first string is either \\aliteral{exact} or \\aliteral{additional} (modifies the first string),\
+ the second string is the desired direction",
+ ["type"]="function",
+ },
+ ["id"]={
+ ["arguments"]={
+ {
+ ["name"]="type",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Convert a node type string into a node id number.",
+ ["type"]="function",
+ },
+ ["insert_after"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="current",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="new",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="new",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Insert the third node just after the second node in the list that starts at the first node.",
+ ["type"]="function",
+ },
+ ["insert_before"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="current",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="new",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="new",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Insert the third node just before the second node in the list that starts at the first node.",
+ ["type"]="function",
+ },
+ ["is_node"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="any",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="yes",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Return true if the object is a <node>.",
+ ["type"]="function",
+ },
+ ["kerning"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Apply the internal kerning routine to a node list. Processing stops just before the optional node.",
+ ["type"]="function",
+ },
+ ["last_node"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Pops and returns the last node on the current output list.",
+ ["type"]="function",
+ },
+ ["length"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the length of a node list. Processing stops just before the optional node.",
+ ["type"]="function",
+ },
+ ["ligaturing"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=true,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="success",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Apply the internal ligaturing routine to a node list. Processing stops just before the optional node.",
+ ["type"]="function",
+ },
+ ["mlist_to_hlist"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="displaytype",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="penalties",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Recursively convert a math list into a horizontal list. The string differentiates display and inline, the boolean\
+ whether penalties are inserted",
+ ["type"]="function",
+ },
+ ["new"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="subid",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Create a new node with id and (optional) subtype.",
+ ["type"]="function",
+ },
+ ["protect_glyphs"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Mark all processed glyphs in a node list as being characters.",
+ ["type"]="function",
+ },
+ ["protrusion_skippable"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="yes",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Return true if the node could be skipped for protrusion purposes.",
+ ["type"]="function",
+ },
+ ["remove"]={
+ ["arguments"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="current",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="head",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="current",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Extract and remove a second node from the list that starts in the first node.",
+ ["type"]="function",
+ },
+ ["set_attribute"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="val",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an attribute value for a node.",
+ ["type"]="function",
+ },
+ ["slide"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Move to the last node of a list while fixing next and prev pointers.",
+ ["type"]="function",
+ },
+ ["next"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Returns the next node.",
+ ["type"]="function",
+ },
+ ["prev"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Returns the previous node.",
+ ["type"]="function",
+ },
+ ["subtype"]={
+ ["arguments"]={
+ {
+ ["name"]="type",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="subtype",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Convert a whatsit type string into a node subtype number.",
+ ["type"]="function",
+ },
+ ["tail"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Return the last node in a list.",
+ ["type"]="function",
+ },
+ ["traverse"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Iterate over a node list.",
+ ["type"]="function",
+ },
+ ["traverse_id"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Iterate over nodes with id matching the number in a node list.",
+ ["type"]="function",
+ },
+ ["type"]={
+ ["arguments"]={
+ {
+ ["name"]="id",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="type",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="convert a node id number into a node type string.",
+ ["type"]="function",
+ },
+ ["types"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Return the list of node types.",
+ ["type"]="function",
+ },
+ ["unprotect_glyphs"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Mark all characters in a node list as being processed glyphs.",
+ ["type"]="function",
+ },
+ ["unset_attribute"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="val",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Unset an attribute value for a node. The optional number tests for a specific value",
+ ["type"]="function",
+ },
+ ["vpack"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="w",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="info",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="dir",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="h",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="b",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Pack a node list into a vertical list. Arguments as for node.hpack",
+ ["type"]="function",
+ },
+ ["whatsits"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Return the list of whatsit types.",
+ ["type"]="function",
+ },
+ ["write"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Appends a node to the current output list.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["os"]={
+ ["functions"]={
+ ["exec"]={
+ ["arguments"]={
+ {
+ ["name"]="command",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]=" Run an external command and exit. The table is an array of arguments, with an optional \\type{argv[0]} in index 0.",
+ ["type"]="function",
+ },
+ ["gettimeofday"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="time",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get the time as a floating point number (Unix only).",
+ ["type"]="function",
+ },
+ ["setenv"]={
+ ["arguments"]={
+ {
+ ["name"]="key",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="value",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an environment variable.",
+ ["type"]="function",
+ },
+ ["spawn"]={
+ ["arguments"]={
+ {
+ ["name"]="command",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="succ",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="Run an external command and return its exit code. The table is an array of arguments, with an optional \\type{argv[0]} in index 0.",
+ ["type"]="function",
+ },
+ ["times"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="times",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Return process times.",
+ ["type"]="function",
+ },
+ ["tmpdir"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="d",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Create a temporary directory inside the current directory.",
+ ["type"]="function",
+ },
+ ["selfdir"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="d",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the directory path of argv[0].",
+ ["type"]="function",
+ },
+ ["uname"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="data",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Return various information strings about the computer.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["pdf"]={
+ ["functions"]={
+ ["immediateobj"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="type",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="objtext",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="extradata",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Write an object to the PDF file immediately. The optional number is an object id,\
+ the first optional string is \\aliteral{{file}}, \\aliteral{{stream}}, or \\aliteral{{filestream}}.\
+ the second optional string contains stream attributes for the latter two cases.\
+ ",
+ ["type"]="function",
+ },
+ ["obj"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="type",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="objtext",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="extradata",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Write an object to the PDF file. See \\aliteral{pdf.immediateobj} for arguments.",
+ ["type"]="function",
+ },
+ ["refobj"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ }
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Reference an object, so that it will be written out.",
+ ["type"]="function",
+ },
+ ["print"]={
+ ["arguments"]={
+ {
+ ["name"]="type",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Write directly to the PDF file (use in \\tex{latelua}). The optional string is\
+ one of \\aliteral{{direct}} or \\aliteral{{page}}",
+ ["type"]="function",
+ },
+ ["registerannot"]={
+ ["arguments"]={
+ {
+ ["name"]="objnum",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Register an annotation in the PDF backend.",
+ ["type"]="function",
+ },
+ ["pageref"]={
+ ["arguments"]={
+ {
+ ["name"]="objnum",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="page",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the pageref object number.",
+ ["type"]="function",
+ },
+
+ ["mapfile"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Register a font map file.",
+ ["type"]="function",
+ },
+
+ ["mapline"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Register a font map line.",
+ ["type"]="function",
+ },
+
+ ["reserveobj"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Reserve an object number in the PDF backend.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["status"]={
+ ["functions"]={
+ ["list"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="info",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Returns a table with various status items.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["string"]={
+ ["functions"]={
+ ["bytepairs"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="m",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Iterator that returns two values representing two single 8-byte tokens.",
+ ["type"]="function",
+ },
+ ["bytes"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Iterator that returns a value representing a single 8-byte token.",
+ ["type"]="function",
+ },
+ ["characterpairs"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Iterator that returns two strings representing two single \\UTF-8 tokens.",
+ ["type"]="function",
+ },
+ ["characters"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Iterator that returns a string representing a single 8-byte token.",
+ ["type"]="function",
+ },
+ ["explode"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="sep",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Break a string into pieces. The optional argument is a character possibly followed by a plus sign (default \\aliteral{{ +}})",
+ ["type"]="function",
+ },
+ ["utfcharacters"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Iterator that returns a string representing a single \\UTF-8 token.",
+ ["type"]="function",
+ },
+ ["utfvalues"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Iterator that returns a value representing a single \\UTF-8 token.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["tex"]={
+ ["functions"]={
+ ["badness"]={
+ ["arguments"]={
+ {
+ ["name"]="f",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="b",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Compute a badness value.",
+ ["type"]="function",
+ },
+ ["definefont"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="boolean",
+ },
+ {
+ ["name"]="csname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="fontid",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Define a font csname. The optional boolean indicates for global definition, the string is the csname, the number is a font id.",
+ ["type"]="function",
+ },
+ ["enableprimitives"]={
+ ["arguments"]={
+ {
+ ["name"]="prefix",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="names",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Enable the all primitives in the array using the string as prefix.",
+ ["type"]="function",
+ },
+ ["error"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="helptext",
+ ["optional"]=true,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Create an error that is presented to the user. The optional table is an array of help message strings.",
+ ["type"]="function",
+ },
+ ["extraprimitives"]={
+ ["arguments"]={
+ {
+ ["name"]="s1",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s2",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Return all primitives in a (set of) extension identifiers. Valid identifiers are: \
+ \\aliteral{tex}, \\aliteral{core}, \\aliteral{etex}, \\aliteral{pdftex}, \\aliteral{omega}, \\aliteral{aleph}, and \\aliteral{luatex}.",
+ ["type"]="function",
+ },
+ ["get"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="value",
+ },
+ },
+ ["shortdesc"]="Get a named internal register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["getattribute"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get an attribute register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["getbox"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Get a box register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["getcount"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get a count register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["getdimen"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get a dimen register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["getmath"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get an internal math parameter. The first string is like the csname but without the \\type{Umath} prefix, the second string is a style name minus the \\type{style} suffix.",
+ ["type"]="function",
+ },
+ ["getskip"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["shortdesc"]="Get a skip register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["gettoks"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Get a toks register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+
+
+ ["getlccode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get a lowercase code.",
+ ["type"]="function",
+ },
+
+ ["setlccode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="lc",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="uc",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a lowercase code.",
+ ["type"]="function",
+ },
+
+ ["getuccode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get an uppercase code.",
+ ["type"]="function",
+ },
+ ["setuccode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="uc",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="lc",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an uppercase code.",
+ ["type"]="function",
+ },
+ ["getsfcode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get a space factor.",
+ ["type"]="function",
+ },
+ ["setsfcode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="sf",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a space factor.",
+ ["type"]="function",
+ },
+
+ ["getcatcode"]={
+ ["arguments"]={
+ {
+ ["name"]="cattable",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="c",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Get a category code.",
+ ["type"]="function",
+ },
+
+ ["setcatcode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="cattable",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="c",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a category code.",
+ ["type"]="function",
+ },
+
+ ["getmathcode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Get a math code.",
+ ["type"]="function",
+ },
+
+ ["setmathcode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="mval",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a math code.",
+ ["type"]="function",
+ },
+
+ ["getdelcode"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Get a delimiter code.",
+ ["type"]="function",
+ },
+
+ ["setdelcode"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="mval",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a delimiter code.",
+ ["type"]="function",
+ },
+
+
+
+ ["linebreak"]={
+ ["arguments"]={
+ {
+ ["name"]="listhead",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ {
+ ["name"]="parameters",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Run the line breaker on a node list. The table lists settings.",
+ ["type"]="function",
+ },
+ ["primitives"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ },
+ ["shortdesc"]="Returns a table of all currently active primitives, with their meaning.",
+ ["type"]="function",
+ },
+ ["print"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s1",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s2",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]=" Print a sequence of strings (not just two) as lines. The optional argument is a catcode table id.",
+ ["type"]="function",
+ },
+ ["round"]={
+ ["arguments"]={
+ {
+ ["name"]="o",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Round a number.",
+ ["type"]="function",
+ },
+ ["scale"]={
+ ["arguments"]={
+ {
+ ["name"]="o",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="delta",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Multiplies the first number (or all fields in a table) with the second argument (if the first argument is a table, so is the return value).",
+ ["type"]="function",
+ },
+ ["set"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="v",
+ ["optional"]=false,
+ ["type"]="value",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a named internal register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["setattribute"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an attribute register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["setbox"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a box register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["setcount"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a count register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["setdimen"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a dimen register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["setmath"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set an internal math parameter. The first string is like the csname but without the \\type{Umath} prefix, the second string is a style name minus the \\type{style} suffix.",
+ ["type"]="function",
+ },
+ ["setskip"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="node",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a skip register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["settoks"]={
+ ["arguments"]={
+ {
+ ["name"]="global",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Set a toks register. Also accepts a predefined csname string.",
+ ["type"]="function",
+ },
+ ["shipout"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Ships the box to the output file and clears the box.",
+ ["type"]="function",
+ },
+ ["sp"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="n",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Convert a dimension string to scaled points.",
+ ["type"]="function",
+ },
+ ["sprint"]={
+ ["arguments"]={
+ {
+ ["name"]="n",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ {
+ ["name"]="s1",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s2",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]=" Print a sequence of strings (not just two) as partial lines. The optional argument is a catcode table id.",
+ ["type"]="function",
+ },
+ ["tprint"]={
+ ["arguments"]={
+ {
+ ["name"]="a1",
+ ["optional"]=false,
+ ["type"]="table",
+ },
+ {
+ ["name"]="a2",
+ ["optional"]=true,
+ ["type"]="table",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Combine any number of \\type{tex.sprint}'s into a single function call.",
+ ["type"]="function",
+ },
+ ["write"]={
+ ["arguments"]={
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]=" Print a sequence of strings (not just two) as detokenized data.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["texio"]={
+ ["functions"]={
+ ["write"]={
+ ["arguments"]={
+ {
+ ["name"]="target",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Write a string to the log and/or terminal. The optional argument is\
+ \\aliteral{{term}}, \\aliteral{{term and log}}, or \\aliteral{{log}}.",
+ ["type"]="function",
+ },
+ ["write_nl"]={
+ ["arguments"]={
+ {
+ ["name"]="target",
+ ["optional"]=true,
+ ["type"]="string",
+ },
+ {
+ ["name"]="s",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={},
+ ["shortdesc"]="Write a string to the log and/or terminal, starting on a new line. \
+ The optional argument is \
+ \\aliteral{{term}}, \\aliteral{{term and log}}, or \\aliteral{{log}}.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+ ["token"]={
+ ["functions"]={
+ ["command_id"]={
+ ["arguments"]={
+ {
+ ["name"]="commandname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Return the internal number representing a command code.",
+ ["type"]="function",
+ },
+ ["command_name"]={
+ ["arguments"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="commandname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the internal string representing a command code.",
+ ["type"]="function",
+ },
+ ["create"]={
+ ["arguments"]={
+ {
+ ["name"]="char",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ {
+ ["name"]="catcode",
+ ["optional"]=true,
+ ["type"]="number",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["shortdesc"]="Create a token from scratch, the optional argument is a category code. Also accepts strings, in which case a token matching that csname is created.",
+ ["type"]="function",
+ },
+ ["csname_id"]={
+ ["arguments"]={
+ {
+ ["name"]="csname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="i",
+ ["optional"]=false,
+ ["type"]="number",
+ },
+ },
+ ["shortdesc"]="Returns the value for a csname string.",
+ ["type"]="function",
+ },
+ ["csname_name"]={
+ ["arguments"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="csname",
+ ["optional"]=false,
+ ["type"]="string",
+ },
+ },
+ ["shortdesc"]="Return the csname associated with a token.",
+ ["type"]="function",
+ },
+ ["expand"]={
+ ["arguments"]={},
+ ["returnvalues"]={},
+ ["shortdesc"]="Expand a token the tokenb waiting in the input stream.",
+ ["type"]="function",
+ },
+ ["get_next"]={
+ ["arguments"]={},
+ ["returnvalues"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["shortdesc"]="Fetch the next token from the input stream.",
+ ["type"]="function",
+ },
+ ["is_activechar"]={
+ ["arguments"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="b",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="True if the token represents and active character.",
+ ["type"]="function",
+ },
+ ["is_expandable"]={
+ ["arguments"]={
+ {
+ ["name"]="t",
+ ["optional"]=false,
+ ["type"]="token",
+ },
+ },
+ ["returnvalues"]={
+ {
+ ["name"]="b",
+ ["optional"]=false,
+ ["type"]="boolean",
+ },
+ },
+ ["shortdesc"]="True if the token is expandable.",
+ ["type"]="function",
+ },
+ },
+ ["methods"]={
+ },
+ },
+}
+
+return fdata;
diff --git a/Master/texmf-dist/doc/luatex/base/fdata_epdf.lua b/Master/texmf-dist/doc/luatex/base/fdata_epdf.lua
new file mode 100644
index 00000000000..7e13519d2da
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/fdata_epdf.lua
@@ -0,0 +1,2276 @@
+-- $Id: fdata_epdf.lua 4135 2011-04-11 21:07:37Z hhenkel $
+
+local fdata_epdf = {
+ functions = {
+ open = {
+ type = "function",
+ shortdesc = "Construct a PDFDoc object by opening a PDF document.",
+ arguments = {
+ {type = "string", name = "filename", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFDoc", name = "var", optional = false, },
+ },
+ },
+ Annot = {
+ type = "function",
+ shortdesc = "Construct an Annot object.",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "Ref", name = "ref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Annot", name = "var", optional = false, },
+ },
+ },
+ Annots = {
+ type = "function",
+ shortdesc = "Construct an Annots object.",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Annots", name = "var", optional = false, },
+ },
+ },
+ Array = {
+ type = "function",
+ shortdesc = "Construct an Array object.",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Array", name = "var", optional = false, },
+ },
+ },
+ Dict = {
+ type = "function",
+ shortdesc = "Construct a Dict object.",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ Object = {
+ type = "function",
+ shortdesc = "Construct an Object object.",
+ arguments = {
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ PDFRectangle = {
+ type = "function",
+ shortdesc = "Construct a PDFRectangle object.",
+ arguments = {
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ },
+ methods = {
+------------------------------------------------------------------------
+ Annot = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if Annot object is ok.",
+ arguments = {
+ {type = "Annot", name = "annot", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getAppearance = {
+ type = "function",
+ shortdesc = "Get Appearance object.",
+ arguments = {
+ {type = "Annot", name = "annot", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getBorder = {
+ type = "function",
+ shortdesc = "Get AnnotBorder object.",
+ arguments = {
+ {type = "Annot", name = "annot", optional = false, },
+ },
+ returnvalues = {
+ {type = "AnnotBorder", name = "var", optional = false, },
+ },
+ },
+ match = {
+ type = "function",
+ shortdesc = "Check if object number and generation matches Ref.",
+ arguments = {
+ {type = "Annot", name = "annot", optional = false, },
+ {type = "Ref", name = "ref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ AnnotBorderStyle = {
+ getWidth = {
+ type = "function",
+ shortdesc = "Get border width.",
+ arguments = {
+ {type = "AnnotBorderStyle", name = "annotborderstyle", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Annots = {
+ getNumAnnots = {
+ type = "function",
+ shortdesc = "Get number of Annots objects.",
+ arguments = {
+ {type = "Annots", name = "annots", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getAnnot = {
+ type = "function",
+ shortdesc = "Get Annot object.",
+ arguments = {
+ {type = "Annots", name = "annots", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Annot", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Array = {
+ incRef = {
+ type = "function",
+ shortdesc = "Increment reference count to Array.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ decRef = {
+ type = "function",
+ shortdesc = "Decrement reference count to Array.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ getLength = {
+ type = "function",
+ shortdesc = "Get Array length.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ add = {
+ type = "function",
+ shortdesc = "Add Object to Array.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ get = {
+ type = "function",
+ shortdesc = "Get Object from Array.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getNF = {
+ type = "function",
+ shortdesc = "Get Object from Array, not resolving indirection.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getString = {
+ type = "function",
+ shortdesc = "Get String from Array.",
+ arguments = {
+ {type = "Array", name = "array", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Catalog = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if Catalog object is ok.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getNumPages = {
+ type = "function",
+ shortdesc = "Get total number of pages.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getPage = {
+ type = "function",
+ shortdesc = "Get Page.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Page", name = "var", optional = false, },
+ },
+ },
+ getPageRef = {
+ type = "function",
+ shortdesc = "Get the reference to a Page object.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Ref", name = "var", optional = false, },
+ },
+ },
+ getBaseURI = {
+ type = "function",
+ shortdesc = "Get base URI, if any.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ readMetadata = {
+ type = "function",
+ shortdesc = "Get the contents of the Metadata stream.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getStructTreeRoot = {
+ type = "function",
+ shortdesc = "Get the structure tree root object.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ findPage = {
+ type = "function",
+ shortdesc = "Get a Page number by object number and generation.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "integer", name = "object number", optional = false, },
+ {type = "integer", name = "object generation", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ findDest = {
+ type = "function",
+ shortdesc = "Find a named destination.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "LinkDest", name = "var", optional = false, },
+ },
+ },
+ getDests = {
+ type = "function",
+ shortdesc = "Get destinations object.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ numEmbeddedFiles = {
+ type = "function",
+ shortdesc = "Get number of embedded files.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ embeddedFile = {
+ type = "function",
+ shortdesc = "Get embedded file.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "EmbFile", name = "var", optional = false, },
+ },
+ },
+ numJS = {
+ type = "function",
+ shortdesc = "Get number of javascript scripts.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getJS = {
+ type = "function",
+ shortdesc = "Get javascript script.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getOutline = {
+ type = "function",
+ shortdesc = "Get Outline object.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getAcroForm = {
+ type = "function",
+ shortdesc = "Get AcroForm object.",
+ arguments = {
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ EmbFile = {
+ name = {
+ type = "function",
+ shortdesc = "Get name of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ description = {
+ type = "function",
+ shortdesc = "Get description of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ size = {
+ type = "function",
+ shortdesc = "Get size of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ modDate = {
+ type = "function",
+ shortdesc = "Get modification date of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ createDate = {
+ type = "function",
+ shortdesc = "Get creation date of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ checksum = {
+ type = "function",
+ shortdesc = "Get checksum of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ mimeType = {
+ type = "function",
+ shortdesc = "Get mime type of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ streamObject = {
+ type = "function",
+ shortdesc = "Get stream object of embedded file.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ isOk = {
+ type = "function",
+ shortdesc = "Check if embedded file is ok.",
+ arguments = {
+ {type = "EmbFile", name = "embfile", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Dict = {
+ incRef = {
+ type = "function",
+ shortdesc = "Increment reference count to Dict.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ decRef = {
+ type = "function",
+ shortdesc = "Decrement reference count to Dict.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ getLength = {
+ type = "function",
+ shortdesc = "Get Dict length.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ add = {
+ type = "function",
+ shortdesc = "Add Object to Dict.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ set = {
+ type = "function",
+ shortdesc = "Set Object in Dict.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ remove = {
+ type = "function",
+ shortdesc = "Remove entry from Dict.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ is = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ lookup = {
+ type = "function",
+ shortdesc = "Look up Dict entry.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ lookupNF = {
+ type = "function",
+ shortdesc = "Look up Dict entry, not resolving indirection.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ lookupInt = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getKey = {
+ type = "function",
+ shortdesc = "Get key from Dict by number.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getVal = {
+ type = "function",
+ shortdesc = "Get value from Dict by number.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getValNF = {
+ type = "function",
+ shortdesc = "Get value from Dict by number, not resolving indirection.",
+ arguments = {
+ {type = "Dict", name = "dict", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ LinkDest = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if LinkDest object is ok.",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getKind = {
+ type = "function",
+ shortdesc = "Get number of LinkDest kind.",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getKindName = {
+ type = "function",
+ shortdesc = "Get name of LinkDest kind.",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ isPageRef = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getPageNum = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getPageRef = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "Ref", name = "var", optional = false, },
+ },
+ },
+ getLeft = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getBottom = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getRight = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getTop = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getZoom = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getChangeLeft = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getChangeTop = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getChangeZoom = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "LinkDest", name = "linkdest", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Object = {
+ initBool = {
+ type = "function",
+ shortdesc = "Initialize a Bool-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "boolean", name = "boolean", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initInt = {
+ type = "function",
+ shortdesc = "Initialize an Int-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initReal = {
+ type = "function",
+ shortdesc = "Initialize a Real-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "number", name = "number", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initString = {
+ type = "function",
+ shortdesc = "Initialize a String-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initName = {
+ type = "function",
+ shortdesc = "Initialize a Name-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initNull = {
+ type = "function",
+ shortdesc = "Initialize a Null-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initArray = {
+ type = "function",
+ shortdesc = "Initialize an Array-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initDict = {
+ type = "function",
+ shortdesc = "Initialize a Dict-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initStream = {
+ type = "function",
+ shortdesc = "Initialize a Stream-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initRef = {
+ type = "function",
+ shortdesc = "Initialize a Ref-type object by object number and generation.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "object number", optional = false, },
+ {type = "integer", name = "object generation", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initCmd = {
+ type = "function",
+ shortdesc = "Initialize a Cmd-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initError = {
+ type = "function",
+ shortdesc = "Initialize an Error-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ initEOF = {
+ type = "function",
+ shortdesc = "Initialize an EOF-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ fetch = {
+ type = "function",
+ shortdesc = "If object is of type Ref, fetch and return the referenced object. Otherwise, return a copy of the object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getType = {
+ type = "function",
+ shortdesc = "Get object type as a number (enum ObjType).",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getTypeName = {
+ type = "function",
+ shortdesc = "Get object type name.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ isBool = {
+ type = "function",
+ shortdesc = "Check if object is of type Bool.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isInt = {
+ type = "function",
+ shortdesc = "Check if object is of type Int.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isReal = {
+ type = "function",
+ shortdesc = "Check if object is of type Real.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isNum = {
+ type = "function",
+ shortdesc = "Check if object is of type Num.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isString = {
+ type = "function",
+ shortdesc = "Check if object is of type String.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isName = {
+ type = "function",
+ shortdesc = "Check if object is of type Name.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isNull = {
+ type = "function",
+ shortdesc = "Check if object is of type Null.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isArray = {
+ type = "function",
+ shortdesc = "Check if object is of type Array.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isDict = {
+ type = "function",
+ shortdesc = "Check if object is of type Dict.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isStream = {
+ type = "function",
+ shortdesc = "Check if object is of type Stream.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isRef = {
+ type = "function",
+ shortdesc = "Check if object is of type Ref.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isCmd = {
+ type = "function",
+ shortdesc = "Check if object is of type Cmd.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isError = {
+ type = "function",
+ shortdesc = "Check if object is of type Error.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isEOF = {
+ type = "function",
+ shortdesc = "Check if object is of type EOF.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isNone = {
+ type = "function",
+ shortdesc = "Check if object is of type None.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getBool = {
+ type = "function",
+ shortdesc = "Get boolean from Bool-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getInt = {
+ type = "function",
+ shortdesc = "Get integer from Int-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getReal = {
+ type = "function",
+ shortdesc = "Get number from Real-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getNum = {
+ type = "function",
+ shortdesc = "Get number from Num-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getString = {
+ type = "function",
+ shortdesc = "Get string from String-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getName = {
+ type = "function",
+ shortdesc = "Get name from Name-type object as a string.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getArray = {
+ type = "function",
+ shortdesc = "Get Array from Array-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Array", name = "var", optional = false, },
+ },
+ },
+ getDict = {
+ type = "function",
+ shortdesc = "Get Dict from Dict-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getStream = {
+ type = "function",
+ shortdesc = "Get Stream from Stream-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Stream", name = "var", optional = false, },
+ },
+ },
+ getRef = {
+ type = "function",
+ shortdesc = "Get Ref from Ref-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Ref", name = "var", optional = false, },
+ },
+ },
+ getRefNum = {
+ type = "function",
+ shortdesc = "Get object number from Ref-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getRefGen = {
+ type = "function",
+ shortdesc = "Get object generation from Ref-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getCmd = {
+ shortdesc = "Get command from Cmd-type object as a string.",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ arrayGetLength = {
+ type = "function",
+ shortdesc = "Get array length from Array-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ arrayAdd = {
+ type = "function",
+ shortdesc = "Add Object to Array-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ arrayGet = {
+ type = "function",
+ shortdesc = "Get Object from Array-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ arrayGetNF = {
+ type = "function",
+ shortdesc = "Get Object from Array-type object, not resolving indirection.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ dictGetLength = {
+ type = "function",
+ shortdesc = "Get dictionary length from Dict-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ dictAdd = {
+ type = "function",
+ shortdesc = "Add Object to Dict-type object.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ dictSet = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ dictLookup = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ dictLookupNF = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ dictGetKey = {
+ type = "function",
+ shortdesc = "Get Dict key of Dict-type object by number.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ dictGetVal = {
+ type = "function",
+ shortdesc = "Get Dict value of Dict-type object by number.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ dictGetValNF = {
+ type = "function",
+ shortdesc = "Get Dict value of Dict-type object by number, not resolving indirection.",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ streamIs = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ streamReset = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ streamGetChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ streamLookChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ streamGetPos = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ streamSetPos = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ streamGetDict = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Object", name = "object", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Page = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if Page object is ok.",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getNum = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getMediaBox = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ getCropBox = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ isCropped = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getMediaWidth = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getMediaHeight = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getCropWidth = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getCropHeight = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getBleedBox = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ getTrimBox = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ getArtBox = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "PDFRectangle", name = "var", optional = false, },
+ },
+ },
+ getRotate = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getLastModified = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getBoxColorInfo = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getGroup = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getMetadata = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Stream", name = "var", optional = false, },
+ },
+ },
+ getPieceInfo = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getSeparationInfo = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getResourceDict = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ getAnnots = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getLinks = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ {type = "Catalog", name = "catalog", optional = false, },
+ },
+ returnvalues = {
+ {type = "Links", name = "var", optional = false, },
+ },
+ },
+ getContents = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Page", name = "page", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ PDFDoc = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if PDFDoc object is ok.",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getErrorCode = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getErrorCodeName = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getFileName = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getXRef = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "XRef", name = "var", optional = false, },
+ },
+ },
+ getCatalog = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "Catalog", name = "var", optional = false, },
+ },
+ },
+ getPageMediaWidth = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getPageMediaHeight = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getPageCropWidth = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getPageCropHeight = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "number", name = "var", optional = false, },
+ },
+ },
+ getNumPages = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ readMetadata = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ getStructTreeRoot = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ findPage = {
+ type = "function",
+ shortdesc = "Get a Page number by object number and generation.",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ {type = "integer", name = "object number", optional = false, },
+ {type = "integer", name = "object generation", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getLinks = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Links", name = "var", optional = false, },
+ },
+ },
+ findDest = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ {type = "string", name = "string", optional = false, },
+ },
+ returnvalues = {
+ {type = "LinkDest", name = "var", optional = false, },
+ },
+ },
+ isEncrypted = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToPrint = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToChange = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToCopy = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToAddNotes = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ isLinearized = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getDocInfo = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getDocInfoNF = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getPDFMajorVersion = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getPDFMinorVersion = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFDoc", name = "pdfdoc", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ PDFRectangle = {
+ isValid = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "PDFRectangle", name = "pdfrectangle", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ Stream = {
+ getKind = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getKindName = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "string", name = "var", optional = false, },
+ },
+ },
+ reset = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ close = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ getChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ lookChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getRawChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getUnfilteredChar = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ unfilteredReset = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ },
+ },
+ getPos = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ isBinary = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getUndecodedStream = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "Stream", name = "var", optional = false, },
+ },
+ },
+ getDict = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "Stream", name = "stream", optional = false, },
+ },
+ returnvalues = {
+ {type = "Dict", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ XRef = {
+ isOK = {
+ type = "function",
+ shortdesc = "Check if XRef object is ok.",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getErrorCode = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ isEncrypted = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToPrint = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToPrintHighRes = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToChange = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToCopy = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToAddNotes = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToFillForm = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToAccessibility = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ okToAssemble = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "boolean", name = "var", optional = false, },
+ },
+ },
+ getCatalog = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ fetch = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ {type = "integer", name = "integer", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getDocInfo = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getDocInfoNF = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ getNumObjects = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getRootNum = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getRootGen = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getSize = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "integer", name = "var", optional = false, },
+ },
+ },
+ getTrailerDict = {
+ type = "function",
+ shortdesc = "TODO",
+ arguments = {
+ {type = "XRef", name = "xref", optional = false, },
+ },
+ returnvalues = {
+ {type = "Object", name = "var", optional = false, },
+ },
+ },
+ },
+------------------------------------------------------------------------
+ }
+}
+
+return fdata_epdf
diff --git a/Master/texmf-dist/doc/luatex/base/fdata_img.lua b/Master/texmf-dist/doc/luatex/base/fdata_img.lua
new file mode 100644
index 00000000000..03b8259ea96
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/fdata_img.lua
@@ -0,0 +1,156 @@
+-- $Id: fdata_img.lua 4106 2011-04-10 12:51:54Z hhenkel $
+
+local fdata_img = {
+ ["functions"] = {
+ ["boxes"] = {
+ ["arguments"] = {},
+ ["returnvalues"] = {
+ {
+ ["name"] = "boxes",
+ ["optional"] = false,
+ ["type"] = "table",
+ },
+ },
+ ["shortdesc"] = "Returns a list of supported image bounding box names.",
+ ["type"] = "function",
+ },
+ ["copy"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["shortdesc"] = "Copy an image.",
+ ["type"] = "function",
+ },
+ ["immediatewrite"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["shortdesc"] = "Write the image to the PDF file immediately.",
+ ["type"] = "function",
+ },
+ ["keys"] = {
+ ["arguments"] = {},
+ ["returnvalues"] = {
+ {
+ ["name"] = "keys",
+ ["optional"] = false,
+ ["type"] = "table",
+ },
+ },
+ ["shortdesc"] = "Returns a table with possible image table keys, including retrieved information.",
+ ["type"] = "function",
+ },
+ ["new"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = true,
+ ["type"] = "table",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["shortdesc"] = "This function creates an \\quote {image} object. Allowed fields\
+ in the table: \\aliteral{filename} (required), \\aliteral{width},\
+ \\aliteral{depth}, \\aliteral{height}, \\aliteral{attr}, \\aliteral{page}, \\aliteral{pagebox}, \\aliteral{colorspace}).",
+ ["type"] = "function",
+ },
+ ["node"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "n",
+ ["optional"] = false,
+ ["type"] = "node",
+ },
+ },
+ ["shortdesc"] = "Returns the node associated with an image.",
+ ["type"] = "function",
+ },
+ ["scan"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["shortdesc"] = "Processes an image file and stores the retrieved information in the image object.",
+ ["type"] = "function",
+ },
+ ["types"] = {
+ ["arguments"] = {},
+ ["returnvalues"] = {
+ {
+ ["name"] = "types",
+ ["optional"] = false,
+ ["type"] = "table",
+ },
+ },
+ ["shortdesc"] = "Returns a list of supported image types.",
+ ["type"] = "function",
+ },
+ ["write"] = {
+ ["arguments"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["returnvalues"] = {
+ {
+ ["name"] = "var",
+ ["optional"] = false,
+ ["type"] = "image",
+ },
+ },
+ ["shortdesc"] = "Write the image to the PDF file.",
+ ["type"] = "function",
+ },
+ },
+ ["methods"] = {
+ },
+}
+
+return fdata_img
diff --git a/Master/texmf-dist/doc/luatex/base/functionref.pdf b/Master/texmf-dist/doc/luatex/base/functionref.pdf
new file mode 100644
index 00000000000..a67306f1033
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/functionref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/base/functionref.tex b/Master/texmf-dist/doc/luatex/base/functionref.tex
new file mode 100644
index 00000000000..a2f3dd08444
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/functionref.tex
@@ -0,0 +1,1088 @@
+% $Id$
+
+\nonknuthmode
+\catcode`\|=12
+
+\setuplayout[backspace=1cm,edge=0pt,topspace=1cm,
+ margin=0pt,location=middle,height=fit,footer=0pt,width=middle,
+ header=24pt]
+
+\setuptabulate[before=]
+\setuppagenumbering[location=,alternative=doublesided]
+\setupheadertexts[Luatex 0.66 short reference][pagenumber]
+\setupheader[style=\ssbf]
+
+\setupalign[flushleft]
+
+\setuphead[section][number=no,style=\ssbfb,after=,before=\blank]
+\setuphead[subsection][number=no,after=,style=\ssbf]
+
+\switchtobodyfont[times,9pt]
+\usemodule[abr-01]
+\def\DPI{DPI}
+
+\setuptype[style=\ss]
+\setuptyping[style=\ss]
+
+\def\afunction#1{{\ss\bf #1}}
+\def\aliteral#1{{\ss "#1"}}
+
+\def\showitemnoret#1#2#3#4#5#6%
+ {\hangafter=1\hangindent=12pt
+ \noindent {\ss \afunction{#1#6#2}#3}%
+ \hskip 12pt plus .5\hsize\penalty0 \hskip 0pt plus -.5\hsize
+ #5\par}
+
+\def\showitemret#1#2#3#4#5#6%
+ {\hangafter=1\hangindent=12pt
+ \noindent {\ss #4 = \afunction{#1#6#2}#3}%
+ \hskip 12pt plus .5\hsize\penalty0\hskip 0pt plus -.5\hsize
+ #5\par}
+
+\def\luafunction#1#2#3#4#5%
+ {\doifemptyelse{#4}
+ {\showitemnoret{#1}{#2}{#3}{#4}{#5}{.}}
+ {\showitemret{#1}{#2}{#3}{#4}{#5}{.}}\par}
+
+\def\luamethod#1#2#3#4#5%
+ {\doifemptyelse{#4}
+ {\showitemnoret{#1}{#2}{#3}{#4}{#5}{:}}
+ {\showitemret{#1}{#2}{#3}{#4}{#5}{:}}\par}
+
+\def\luacallback#1#2#3#4#5%
+ {\doifemptyelse{#4}
+ {\showitemnoret{}{#2}{#3}{#4}{#5}{}}
+ {\showitemret{}{#2}{#3}{#4}{#5}{}}\par}
+
+\startluacode
+local fdata = dofile('fdata.lua')
+function showfunction (t,o,f)
+ local val
+ local method
+ if o == nil then
+ val = fdata[t]["functions"][f]
+ method = false
+ else
+ val = fdata[t]["methods"][o][f]
+ method = true
+ end
+ local r = {}
+ local a = {}
+ if #val.returnvalues > 0 then
+ for i,v in ipairs (val.returnvalues) do
+ if v.optional then
+ r[#r+1] = '[' .. v.type .. ']'
+ else
+ r[#r+1] = v.type
+ end
+ end
+ end
+ if #val.arguments > 0 then
+ for i,v in ipairs (val.arguments) do
+ if (method == false) or (i > 1) then
+ if v.optional then
+ a[#a+1] = '[' .. v.type .. ']'
+ else
+ a[#a+1] = v.type
+ end
+ end
+ end
+ end
+ if method == false then
+ tex.sprint(string.format('\\lua%s{%s}{%s}{(%s)}{%s}{%s}', val.type, t, f,
+ table.concat(a,', '),table.concat(r,', '), val.shortdesc))
+ else
+ tex.sprint(string.format('\\lua%s{%s}{%s}{(%s)}{%s}{%s}', "method", o, f,
+ table.concat(a,', '),table.concat(r,', '), val.shortdesc))
+ end
+end
+
+\stopluacode
+
+\def\presentfunction#1#2{\directlua{showfunction("#1",nil,"#2")}}
+\def\presentmethod#1#2#3{\directlua{showfunction("#1","#2","#3")}}
+
+\starttext
+
+
+\startcolumns
+
+\section{Getting started}
+
+\type{luatex} is a typesetter; \type{texlua} and \type{luatex --luaonly} are lua interpreters.
+In lua interpreter mode, the lua tables \type{tex}, \type{token}, \type{node}, and \type{pdf}
+are unavailable.
+
+\blank
+
+\tex{directlua}\type{} expands immediately, \tex{latelua}\type{}
+is processed during \tex{shipout}.
+
+\blank
+
+\starttabulate[|l|p|]
+\NC \tex{luatexversion}: \NC {\bf\the\luatexversion} \NC\NR
+\NC \tex{luatexrevision}: \NC {\bf\luatexrevision} \NC\NR
+\NC \tex{luatexdatestamp}: \NC {\bf\luatexdatestamp} \NC\NR
+\stoptabulate
+
+\subsection{Attributes}
+
+There are 65536 attribute registers, each of which obeys grouping
+and can have any integer value other than the most negative number
+(which indicates the value is unset).
+
+\subsection{Catcode tables}
+
+There are 65536 category code tables, each of which can hold the full range
+of Unicode. Category table manipulation:
+
+\starttabulate[|l|p|]
+\NC \tex{initcatcodetable} $N$ \NC initialize an \quote{initex} table in $N$ \NC\NR
+\NC \tex{savecatcodetable} $N$\NC save the current category codes to table $N$ globally\NC\NR
+\NC \tex{catcodetable} $N$ \NC switch to predefined table $N$\NC\NR
+\stoptabulate
+
+\subsection{Filenames}
+
+\tex{input}, \tex{openin}, and \tex{font} accept braced file names to allow embedded spaces.
+
+\subsection{Images and forms}
+
+\type{\pdfrefximage} and \type{\pdfrefxform} accept optional dimension parameters
+in the same format as \type{\pdfximage}.
+
+\section{Preloaded lua modules}
+
+\starttabulate[|l|l|]
+\NC\type{slnunicode}\NC\hyphenatedurl{http://luaforge.net/projects/sln}\NC\NR
+\NC\type{luazip} \NC\hyphenatedurl{http://www.keplerproject.org/luazip/}\NC\NR
+\NC\type{luafilesystem} \NC\hyphenatedurl{http://www.keplerproject.org/luafilesystem/}\NC\NR
+\NC\type{lpeg} \NC\hyphenatedurl{http://www.inf.puc-rio.br/~roberto/lpeg.html}\NC\NR
+\NC\type{lzlib} \NC\hyphenatedurl{http://luaforge.net/projects/lzlib/}\NC\NR
+\NC\type{md5} \NC\hyphenatedurl{http://www.inf.puc-rio.br/~roberto/md5/md5-5/md5.html}\NC\NR
+\NC\type{luasocket} \NC \kern -12pt\hyphenatedurl{http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/}\NC\NR
+\stoptabulate
+
+\section{String extensions}
+
+\presentfunction{string}{explode}
+\presentfunction{string}{utfvalues}
+\presentfunction{string}{utfcharacters}
+\presentfunction{string}{characters}
+\presentfunction{string}{characterpairs}
+\presentfunction{string}{bytes}
+\presentfunction{string}{bytepairs}
+
+\section{Operating system extensions}
+
+\presentfunction{os}{exec}
+\presentfunction{os}{spawn}
+\presentfunction{os}{setenv}
+\presentfunction{os}{gettimeofday}
+\presentfunction{os}{times}
+\presentfunction{os}{tmpdir}
+\presentfunction{os}{uname}
+\presentfunction{os}{selfdir}
+
+\section{Lua file system extensions}
+
+\presentfunction{lfs}{isdir}
+\presentfunction{lfs}{isfile}
+\presentfunction{lfs}{shortname}
+\presentfunction{lfs}{readlink}
+
+\section{Callback table}
+\presentfunction{callback}{register}
+\presentfunction{callback}{list}
+\presentfunction{callback}{find}
+
+\subsection{File discovery callbacks}
+
+\presentfunction{callback}{find_read_file}
+\presentfunction{callback}{find_write_file}
+\presentfunction{callback}{find_font_file}
+\presentfunction{callback}{find_output_file}
+\presentfunction{callback}{find_format_file}
+\presentfunction{callback}{find_vf_file}
+\presentfunction{callback}{find_map_file}
+\presentfunction{callback}{find_enc_file}
+\presentfunction{callback}{find_subfont_file}
+\presentfunction{callback}{find_pk_file}
+\presentfunction{callback}{find_data_file}
+\presentfunction{callback}{find_opentype_file}
+\presentfunction{callback}{find_truetype_file}
+\presentfunction{callback}{find_type1_file}
+\presentfunction{callback}{find_image_file}
+
+\subsection{File reading callbacks}
+
+\presentfunction{callback}{open_read_file}
+\presentfunction{callback}{reader}
+\presentfunction{callback}{close}
+
+\blank
+
+\presentfunction{callback}{read_font_file}
+\presentfunction{callback}{read_vf_file}
+\presentfunction{callback}{read_map_file}
+\presentfunction{callback}{read_enc_file}
+\presentfunction{callback}{read_sfd_file}
+\presentfunction{callback}{read_pk_file}
+\presentfunction{callback}{read_data_file}
+\presentfunction{callback}{read_truetype_file}
+\presentfunction{callback}{read_type1_file}
+\presentfunction{callback}{read_opentype_file}
+
+\subsection{Tokenisation changes callbacks}
+
+\presentfunction{callback}{process_input_buffer}
+\presentfunction{callback}{process_output_buffer}
+\presentfunction{callback}{token_filter}
+
+\subsection{Node list callbacks}
+
+\presentfunction{callback}{buildpage_filter}
+
+\afunction{buildpage_filter} context information:
+\starttabulate[|lf\ss|p|]
+\NC \ssbf value \NC \bf explanation \NC\NR
+\NC alignment \NC a (partial) alignment is being added \NC\NR
+\NC after_output \NC an output routine has just finished \NC\NR
+\NC box \NC a typeset box is being added \NC\NR
+\NC new_graf \NC the beginning of a new paragraph \NC\NR
+\NC vmode_par \NC \tex{par} was found in vertical mode \NC\NR
+\NC hmode_par \NC \tex{par} was found in horizontal mode \NC\NR
+\NC insert \NC an insert is added \NC\NR
+\NC penalty \NC a penalty (in vertical mode) \NC\NR
+\NC before_display \NC immediately before a display starts \NC\NR
+\NC after_display \NC a display is finished \NC\NR
+\NC end \NC \LUATEX\ is terminating (it's all over)\NC\NR
+\stoptabulate
+
+\presentfunction{callback}{pre_linebreak_filter}
+
+\afunction{pre_linebreak_filter} context information:
+\starttabulate[|lf\ss|p|]
+\NC \ssbf value \NC \bf explanation \NC\NR
+\NC <empty> \NC main vertical list \NC\NR
+\NC hbox \NC \tex{hbox} in horizontal mode \NC\NR
+\NC adjusted_hbox\NC \tex{hbox} in vertical mode \NC\NR
+\NC vbox \NC \tex{vbox} \NC\NR
+\NC vtop \NC \tex{vtop} \NC\NR
+\NC align \NC \tex{halign} or \tex{valign} \NC\NR
+\NC disc \NC discretionaries \NC\NR
+\NC insert \NC packaging an insert \NC\NR
+\NC vcenter \NC \tex{vcenter} \NC\NR
+\NC local_box \NC \tex{localleftbox} or \tex{localrightbox} \NC\NR
+\NC split_off \NC top of a \tex{vsplit} \NC\NR
+\NC split_keep \NC remainder of a \tex{vsplit} \NC\NR
+\NC align_set \NC alignment cell \NC\NR
+\NC fin_row \NC alignment row \NC\NR
+\stoptabulate
+
+\presentfunction{callback}{linebreak_filter}
+\presentfunction{callback}{post_linebreak_filter}
+\presentfunction{callback}{hpack_filter}
+\presentfunction{callback}{vpack_filter}
+\presentfunction{callback}{pre_output_filter}
+\presentfunction{callback}{hyphenate}
+\presentfunction{callback}{ligaturing}
+\presentfunction{callback}{kerning}
+\presentfunction{callback}{mlist_to_hlist}
+
+\subsection{Font definition callback}
+\presentfunction{callback}{define_font}
+
+\subsection{Event callbacks}
+
+\presentfunction{callback}{pre_dump}
+\presentfunction{callback}{stop_run}
+\presentfunction{callback}{start_run}
+\presentfunction{callback}{start_page_number}
+\presentfunction{callback}{stop_page_number}
+\presentfunction{callback}{show_error_hook}
+\presentfunction{callback}{finish_pdffile}
+
+%***********************************************************************
+
+\section{Epdf table}
+
+--- All constructors:
+
+\presentfunction{epdf}{open}
+\presentfunction{epdf}{Annot}
+\presentfunction{epdf}{Annots}
+\presentfunction{epdf}{Array}
+\presentfunction{epdf}{Dict}
+\presentfunction{epdf}{Object}
+\presentfunction{epdf}{PDFRectangle}
+
+--- Annot methods:
+
+\presentmethod{epdf}{Annot}{isOK}
+\presentmethod{epdf}{Annot}{getAppearance}
+\presentmethod{epdf}{Annot}{getBorder}
+\presentmethod{epdf}{Annot}{match}
+
+--- AnnotBorderStyle methods:
+
+\presentmethod{epdf}{AnnotBorderStyle}{getWidth}
+
+--- Annots methods:
+
+\presentmethod{epdf}{Annots}{getNumAnnots}
+\presentmethod{epdf}{Annots}{getAnnot}
+
+--- Array methods:
+
+\presentmethod{epdf}{Array}{incRef}
+\presentmethod{epdf}{Array}{decRef}
+\presentmethod{epdf}{Array}{getLength}
+\presentmethod{epdf}{Array}{add}
+\presentmethod{epdf}{Array}{get}
+\presentmethod{epdf}{Array}{getNF}
+\presentmethod{epdf}{Array}{getString}
+
+--- Catalog methods:
+
+\presentmethod{epdf}{Catalog}{isOK}
+\presentmethod{epdf}{Catalog}{getNumPages}
+\presentmethod{epdf}{Catalog}{getPage}
+\presentmethod{epdf}{Catalog}{getPageRef}
+\presentmethod{epdf}{Catalog}{getBaseURI}
+\presentmethod{epdf}{Catalog}{readMetadata}
+\presentmethod{epdf}{Catalog}{getStructTreeRoot}
+\presentmethod{epdf}{Catalog}{findPage}
+\presentmethod{epdf}{Catalog}{findDest}
+\presentmethod{epdf}{Catalog}{getDests}
+\presentmethod{epdf}{Catalog}{numEmbeddedFiles}
+\presentmethod{epdf}{Catalog}{embeddedFile}
+\presentmethod{epdf}{Catalog}{numJS}
+\presentmethod{epdf}{Catalog}{getJS}
+\presentmethod{epdf}{Catalog}{getOutline}
+\presentmethod{epdf}{Catalog}{getAcroForm}
+
+--- EmbFile methods:
+
+\presentmethod{epdf}{EmbFile}{name}
+\presentmethod{epdf}{EmbFile}{description}
+\presentmethod{epdf}{EmbFile}{size}
+\presentmethod{epdf}{EmbFile}{modDate}
+\presentmethod{epdf}{EmbFile}{createDate}
+\presentmethod{epdf}{EmbFile}{checksum}
+\presentmethod{epdf}{EmbFile}{mimeType}
+\presentmethod{epdf}{EmbFile}{streamObject}
+\presentmethod{epdf}{EmbFile}{isOk}
+
+--- Dict methods:
+
+\presentmethod{epdf}{Dict}{incRef}
+\presentmethod{epdf}{Dict}{decRef}
+\presentmethod{epdf}{Dict}{getLength}
+\presentmethod{epdf}{Dict}{add}
+\presentmethod{epdf}{Dict}{set}
+\presentmethod{epdf}{Dict}{remove}
+\presentmethod{epdf}{Dict}{is}
+\presentmethod{epdf}{Dict}{lookup}
+\presentmethod{epdf}{Dict}{lookupNF}
+\presentmethod{epdf}{Dict}{lookupInt}
+\presentmethod{epdf}{Dict}{getKey}
+\presentmethod{epdf}{Dict}{getVal}
+\presentmethod{epdf}{Dict}{getValNF}
+
+--- LinkDest methods:
+
+\presentmethod{epdf}{LinkDest}{isOK}
+\presentmethod{epdf}{LinkDest}{getKind}
+\presentmethod{epdf}{LinkDest}{getKindName}
+\presentmethod{epdf}{LinkDest}{isPageRef}
+\presentmethod{epdf}{LinkDest}{getPageNum}
+\presentmethod{epdf}{LinkDest}{getPageRef}
+\presentmethod{epdf}{LinkDest}{getLeft}
+\presentmethod{epdf}{LinkDest}{getBottom}
+\presentmethod{epdf}{LinkDest}{getRight}
+\presentmethod{epdf}{LinkDest}{getTop}
+\presentmethod{epdf}{LinkDest}{getZoom}
+\presentmethod{epdf}{LinkDest}{getChangeLeft}
+\presentmethod{epdf}{LinkDest}{getChangeTop}
+\presentmethod{epdf}{LinkDest}{getChangeZoom}
+
+--- Object methods:
+
+\presentmethod{epdf}{Object}{initBool}
+\presentmethod{epdf}{Object}{initInt}
+\presentmethod{epdf}{Object}{initReal}
+\presentmethod{epdf}{Object}{initString}
+\presentmethod{epdf}{Object}{initName}
+\presentmethod{epdf}{Object}{initNull}
+\presentmethod{epdf}{Object}{initArray}
+\presentmethod{epdf}{Object}{initDict}
+\presentmethod{epdf}{Object}{initStream}
+\presentmethod{epdf}{Object}{initRef}
+\presentmethod{epdf}{Object}{initCmd}
+\presentmethod{epdf}{Object}{initError}
+\presentmethod{epdf}{Object}{initEOF}
+\presentmethod{epdf}{Object}{fetch}
+\presentmethod{epdf}{Object}{getType}
+\presentmethod{epdf}{Object}{getTypeName}
+\presentmethod{epdf}{Object}{isBool}
+\presentmethod{epdf}{Object}{isInt}
+\presentmethod{epdf}{Object}{isReal}
+\presentmethod{epdf}{Object}{isNum}
+\presentmethod{epdf}{Object}{isString}
+\presentmethod{epdf}{Object}{isName}
+\presentmethod{epdf}{Object}{isNull}
+\presentmethod{epdf}{Object}{isArray}
+\presentmethod{epdf}{Object}{isDict}
+\presentmethod{epdf}{Object}{isStream}
+\presentmethod{epdf}{Object}{isRef}
+\presentmethod{epdf}{Object}{isCmd}
+\presentmethod{epdf}{Object}{isError}
+\presentmethod{epdf}{Object}{isEOF}
+\presentmethod{epdf}{Object}{isNone}
+\presentmethod{epdf}{Object}{getBool}
+\presentmethod{epdf}{Object}{getInt}
+\presentmethod{epdf}{Object}{getReal}
+\presentmethod{epdf}{Object}{getNum}
+\presentmethod{epdf}{Object}{getString}
+\presentmethod{epdf}{Object}{getName}
+\presentmethod{epdf}{Object}{getArray}
+\presentmethod{epdf}{Object}{getDict}
+\presentmethod{epdf}{Object}{getStream}
+\presentmethod{epdf}{Object}{getRef}
+\presentmethod{epdf}{Object}{getRefNum}
+\presentmethod{epdf}{Object}{getRefGen}
+\presentmethod{epdf}{Object}{getCmd}
+\presentmethod{epdf}{Object}{arrayGetLength}
+\presentmethod{epdf}{Object}{arrayAdd}
+\presentmethod{epdf}{Object}{arrayGet}
+\presentmethod{epdf}{Object}{arrayGetNF}
+\presentmethod{epdf}{Object}{dictGetLength}
+\presentmethod{epdf}{Object}{dictAdd}
+\presentmethod{epdf}{Object}{dictSet}
+\presentmethod{epdf}{Object}{dictLookup}
+\presentmethod{epdf}{Object}{dictLookupNF}
+\presentmethod{epdf}{Object}{dictGetKey}
+\presentmethod{epdf}{Object}{dictGetVal}
+\presentmethod{epdf}{Object}{dictGetValNF}
+\presentmethod{epdf}{Object}{streamIs}
+\presentmethod{epdf}{Object}{streamReset}
+\presentmethod{epdf}{Object}{streamGetChar}
+\presentmethod{epdf}{Object}{streamLookChar}
+\presentmethod{epdf}{Object}{streamGetPos}
+\presentmethod{epdf}{Object}{streamSetPos}
+\presentmethod{epdf}{Object}{streamGetDict}
+
+--- Page methods:
+
+\presentmethod{epdf}{Page}{isOK}
+\presentmethod{epdf}{Page}{getNum}
+\presentmethod{epdf}{Page}{getMediaBox}
+\presentmethod{epdf}{Page}{getCropBox}
+\presentmethod{epdf}{Page}{isCropped}
+\presentmethod{epdf}{Page}{getMediaWidth}
+\presentmethod{epdf}{Page}{getMediaHeight}
+\presentmethod{epdf}{Page}{getCropWidth}
+\presentmethod{epdf}{Page}{getCropHeight}
+\presentmethod{epdf}{Page}{getBleedBox}
+\presentmethod{epdf}{Page}{getTrimBox}
+\presentmethod{epdf}{Page}{getArtBox}
+\presentmethod{epdf}{Page}{getRotate}
+\presentmethod{epdf}{Page}{getLastModified}
+\presentmethod{epdf}{Page}{getBoxColorInfo}
+\presentmethod{epdf}{Page}{getGroup}
+\presentmethod{epdf}{Page}{getMetadata}
+\presentmethod{epdf}{Page}{getPieceInfo}
+\presentmethod{epdf}{Page}{getSeparationInfo}
+\presentmethod{epdf}{Page}{getResourceDict}
+\presentmethod{epdf}{Page}{getAnnots}
+\presentmethod{epdf}{Page}{getLinks}
+\presentmethod{epdf}{Page}{getContents}
+
+--- PDFDoc methods:
+
+\presentmethod{epdf}{PDFDoc}{isOK}
+\presentmethod{epdf}{PDFDoc}{getErrorCode}
+\presentmethod{epdf}{PDFDoc}{getErrorCodeName}
+\presentmethod{epdf}{PDFDoc}{getFileName}
+\presentmethod{epdf}{PDFDoc}{getXRef}
+\presentmethod{epdf}{PDFDoc}{getCatalog}
+\presentmethod{epdf}{PDFDoc}{getPageMediaWidth}
+\presentmethod{epdf}{PDFDoc}{getPageMediaHeight}
+\presentmethod{epdf}{PDFDoc}{getPageCropWidth}
+\presentmethod{epdf}{PDFDoc}{getPageCropHeight}
+\presentmethod{epdf}{PDFDoc}{getNumPages}
+\presentmethod{epdf}{PDFDoc}{readMetadata}
+\presentmethod{epdf}{PDFDoc}{getStructTreeRoot}
+\presentmethod{epdf}{PDFDoc}{findPage}
+\presentmethod{epdf}{PDFDoc}{getLinks}
+\presentmethod{epdf}{PDFDoc}{findDest}
+\presentmethod{epdf}{PDFDoc}{isEncrypted}
+\presentmethod{epdf}{PDFDoc}{okToPrint}
+\presentmethod{epdf}{PDFDoc}{okToChange}
+\presentmethod{epdf}{PDFDoc}{okToCopy}
+\presentmethod{epdf}{PDFDoc}{okToAddNotes}
+\presentmethod{epdf}{PDFDoc}{isLinearized}
+\presentmethod{epdf}{PDFDoc}{getDocInfo}
+\presentmethod{epdf}{PDFDoc}{getDocInfoNF}
+\presentmethod{epdf}{PDFDoc}{getPDFMajorVersion}
+\presentmethod{epdf}{PDFDoc}{getPDFMinorVersion}
+
+--- PDFRectangle methods:
+
+\presentmethod{epdf}{PDFRectangle}{isValid}
+
+--- Stream methods:
+
+\presentmethod{epdf}{Stream}{getKind}
+\presentmethod{epdf}{Stream}{getKindName}
+\presentmethod{epdf}{Stream}{reset}
+\presentmethod{epdf}{Stream}{close}
+\presentmethod{epdf}{Stream}{getChar}
+\presentmethod{epdf}{Stream}{lookChar}
+\presentmethod{epdf}{Stream}{getRawChar}
+\presentmethod{epdf}{Stream}{getUnfilteredChar}
+\presentmethod{epdf}{Stream}{unfilteredReset}
+\presentmethod{epdf}{Stream}{getPos}
+\presentmethod{epdf}{Stream}{isBinary}
+\presentmethod{epdf}{Stream}{getUndecodedStream}
+\presentmethod{epdf}{Stream}{getDict}
+
+--- XRef methods:
+
+\presentmethod{epdf}{XRef}{isOK}
+\presentmethod{epdf}{XRef}{getErrorCode}
+\presentmethod{epdf}{XRef}{isEncrypted}
+\presentmethod{epdf}{XRef}{okToPrint}
+\presentmethod{epdf}{XRef}{okToPrintHighRes}
+\presentmethod{epdf}{XRef}{okToChange}
+\presentmethod{epdf}{XRef}{okToCopy}
+\presentmethod{epdf}{XRef}{okToAddNotes}
+\presentmethod{epdf}{XRef}{okToFillForm}
+\presentmethod{epdf}{XRef}{okToAccessibility}
+\presentmethod{epdf}{XRef}{okToAssemble}
+\presentmethod{epdf}{XRef}{getCatalog}
+\presentmethod{epdf}{XRef}{fetch}
+\presentmethod{epdf}{XRef}{getDocInfo}
+\presentmethod{epdf}{XRef}{getDocInfoNF}
+\presentmethod{epdf}{XRef}{getNumObjects}
+\presentmethod{epdf}{XRef}{getRootNum}
+\presentmethod{epdf}{XRef}{getRootGen}
+\presentmethod{epdf}{XRef}{getSize}
+\presentmethod{epdf}{XRef}{getTrailerDict}
+
+%***********************************************************************
+
+\section{Font table}
+
+\presentfunction{font}{read_tfm}
+\presentfunction{font}{read_vf}
+\presentfunction{font}{getfont}
+\presentfunction{font}{setfont}
+\presentfunction{font}{frozen}
+\presentfunction{font}{define}
+\presentfunction{font}{nextid}
+\presentfunction{font}{id}
+\presentfunction{font}{current}
+\presentfunction{font}{max}
+\presentfunction{font}{each}
+
+\section{Font loader table}
+
+\presentfunction{fontloader}{info}
+
+\afunction{fontloader.info} returned information:
+\starttabulate[|lf\ss|lf\ss|p|]
+\NC \ssbf key \NC \bf type \NC \bf explanation \NC\NR
+\NC fontname \NC string \NC the \POSTSCRIPT\ name of the font\NC\NR
+\NC fullname \NC string \NC the formal name of the font\NC\NR
+\NC familyname \NC string \NC the family name this font belongs to\NC\NR
+\NC weight \NC string \NC a string indicating the color value of the font\NC\NR
+\NC version \NC string \NC the internal font version\NC\NR
+\NC italicangle \NC float \NC the slant angle\NC\NR
+\stoptabulate
+
+\presentfunction{fontloader}{open}
+
+Listing all of the substructure returned from
+\afunction{fontloader.open} would take too much room, see the big
+reference manual.
+
+\presentfunction{fontloader}{apply_featurefile}
+\presentfunction{fontloader}{apply_afmfile}
+
+
+\section{Image table}
+
+Full list of \type{<image>} object fields:
+\starttabulate[|lf\ss|lf\ss|p|]
+\NC \bf field name\NC \bf type \NC description \NC \NR
+\NC depth \NC number \NC the image depth for \LUATEX\ (in scaled points)\NC \NR
+\NC height \NC number \NC the image height for \LUATEX\ (in scaled points)\NC \NR
+\NC width \NC number \NC the image width for \LUATEX\ (in scaled points)\NC \NR
+\NC transform \NC number \NC the image transform, integer number 0..7\NC \NR
+\NC attr \NC string \NC the image attributes for \LUATEX \NC \NR
+\NC filename \NC string \NC the image file name \NC \NR
+\NC stream \NC string \NC the raw stream data for an \type{/Xobject} \type{/Form} object\NC \NR
+\NC page \NC ?? \NC the identifier for the requested image
+ page (type is number or string,
+ default is the number 1)\NC \NR
+\NC pagebox \NC string \NC the requested bounding box,
+ one of \type {none}, \type {media}, \type {crop}, \type {bleed}, \type {trim}, \type {art} \NC \NR
+\NC bbox \NC table \NC table with 4 boundingbox dimensions \type{llx}, \type{lly},
+ \type{urx}, and \type{ury} overruling the \type{pagebox} entry\NC \NR
+\NC filepath \NC string \NC the full (expanded) file name of the image \NC \NR
+\NC colordepth \NC number \NC the number of bits used by the color space \NC \NR
+\NC colorspace \NC number \NC the color space object number \NC \NR
+\NC imagetype \NC string \NC one of \type {pdf}, \type {png}, \type {jpg}, \type {jbig2}, or \type{nil} \NC \NR
+\NC objnum \NC number \NC the \PDF\ image object number \NC \NR
+\NC index \NC number \NC the \PDF\ image name suffix \NC \NR
+\NC pages \NC number \NC the total number of available pages \NC \NR
+\NC xsize \NC number \NC the natural image width \NC \NR
+\NC ysize \NC number \NC the natural image height \NC \NR
+\NC xres \NC number \NC the horizontal natural image resolution (in \DPI) \NC \NR
+\NC yres \NC number \NC the vertical natural image resolution (in \DPI) \NC \NR
+\stoptabulate
+
+\presentfunction{img}{new}
+\presentfunction{img}{keys}
+\presentfunction{img}{scan}
+\presentfunction{img}{copy}
+\presentfunction{img}{write}
+\presentfunction{img}{immediatewrite}
+\presentfunction{img}{node}
+\presentfunction{img}{types}
+\presentfunction{img}{boxes}
+
+\section{Kpathsea table}
+
+\presentfunction{kpse}{set_program_name}
+\presentfunction{kpse}{new}
+\presentfunction{kpse}{find_file}
+\presentfunction{kpse}{lookup}
+
+The \afunction{kpse.lookup} options match commandline arguments from
+\type{kpsewhich}:
+
+\starttabulate[|lf\ss|lf\ss|p|]
+\NC \ssbf key \NC \ssbf type \NC \ssbf description \NC \NR
+\NC debug \NC number \NC set debugging flags for this lookup\NC \NR
+\NC format \NC string \NC use specific file type (see list above)\NC \NR
+\NC dpi \NC number \NC use this resolution for this lookup; default 600\NC \NR
+\NC path \NC string \NC search in the given path\NC \NR
+\NC all \NC boolean \NC output all matches, not just the first\NC \NR
+\NC must-exist\NC boolean \NC search the disk as well as ls-R if necessary\NC \NR
+\NC mktexpk \NC boolean \NC disable/enable mktexpk generation for this lookup\NC \NR
+\NC mktextex \NC boolean \NC disable/enable mktextex generation for this lookup\NC \NR
+\NC mktexmf \NC boolean \NC disable/enable mktexmf generation for this lookup\NC \NR
+\NC mktextfm \NC boolean \NC disable/enable mktextfm generation for this lookup\NC \NR
+\NC subdir \NC string
+ or table \NC only output matches whose directory part
+ ends with the given string(s) \NC \NR
+\stoptabulate
+
+\presentfunction{kpse}{init_prog}
+\presentfunction{kpse}{readable_file}
+\presentfunction{kpse}{expand_path}
+\presentfunction{kpse}{expand_var}
+\presentfunction{kpse}{expand_braces}
+\presentfunction{kpse}{show_path}
+\presentfunction{kpse}{var_value}
+\presentfunction{kpse}{version}
+
+\section{Language table}
+\presentfunction{lang}{new}
+\presentfunction{lang}{id}
+\presentfunction{lang}{hyphenation}
+\presentfunction{lang}{clear_hyphenation}
+\presentfunction{lang}{clean}
+\presentfunction{lang}{patterns}
+\presentfunction{lang}{clear_patterns}
+\presentfunction{lang}{prehyphenchar}
+\presentfunction{lang}{posthyphenchar}
+\presentfunction{lang}{preexhyphenchar}
+\presentfunction{lang}{postexhyphenchar}
+\presentfunction{lang}{hyphenate}
+
+\section{Lua table}
+
+There are 65536 bytecode registers, that are saved in the format file.
+Assignments are always global.
+
+\presentfunction{lua}{getbytecode}
+\presentfunction{lua}{setbytecode}
+
+They also be accessed via the virtual array \type{lua.bytecode[]}.
+
+The virtual array \type{lua.name[]} can be used to give names to lua
+chunks. To use \type{lua.name[1]}, set \type{lua.name[1] = 'testname'} and \type{\directlua1{rubbish}}.
+
+\section{Metapost table}
+
+\presentfunction{mplib}{version}
+
+\presentfunction{mplib}{new}
+\presentfunction{mp}{execute}
+\presentfunction{mp}{finish}
+
+The return value of \type{mp:execute} and \type{mp:finish} is a table
+with a few possible keys (only \type {status} is always guaranteed to be present).
+
+\starttabulate[|lf\ss|lf\ss|p|]
+\NC log \NC string \NC output to the \quote {log} stream \NC \NR
+\NC term \NC string \NC output to the \quote {term} stream \NC \NR
+\NC error \NC string \NC output to the \quote {error} stream (only used for \quote {out of memory})\NC \NR
+\NC status \NC number \NC the return value: 0=good, 1=warning, 2=errors, 3=fatal error \NC \NR
+\NC fig \NC table \NC an array of generated figures (if any)\NC \NR
+\stoptabulate
+
+Handling of \type{fig} objects would take too much room here, please
+see the big reference manual.
+
+\presentfunction{mp}{statistics}
+\presentfunction{mp}{char_width}
+\presentfunction{mp}{char_height}
+\presentfunction{mp}{char_depth}
+
+\section{Node table}
+
+\presentfunction{node}{types}
+\presentfunction{node}{whatsits}
+\presentfunction{node}{is_node}
+\presentfunction{node}{id}
+\presentfunction{node}{subtype}
+\presentfunction{node}{type}
+\presentfunction{node}{fields}
+\presentfunction{node}{has_field}
+\presentfunction{node}{new}
+\presentfunction{node}{free}
+\presentfunction{node}{flush_list}
+\presentfunction{node}{copy}
+\presentfunction{node}{copy_list}
+\presentfunction{node}{hpack}
+\presentfunction{node}{vpack}
+\presentfunction{node}{dimensions}
+\presentfunction{node}{mlist_to_hlist}
+\presentfunction{node}{slide}
+\presentfunction{node}{tail}
+\presentfunction{node}{length}
+\presentfunction{node}{count}
+\presentfunction{node}{traverse}
+\presentfunction{node}{traverse_id}
+\presentfunction{node}{remove}
+\presentfunction{node}{insert_before}
+\presentfunction{node}{insert_after}
+\presentfunction{node}{first_glyph}
+\presentfunction{node}{ligaturing}
+\presentfunction{node}{kerning}
+\presentfunction{node}{unprotect_glyphs}
+\presentfunction{node}{protect_glyphs}
+\presentfunction{node}{last_node}
+\presentfunction{node}{write}
+\presentfunction{node}{protrusion_skippable}
+\presentfunction{node}{next}
+\presentfunction{node}{prev}
+
+\presentfunction{node}{has_attribute}
+\presentfunction{node}{set_attribute}
+\presentfunction{node}{unset_attribute}
+
+\section{Pdf table}
+\presentfunction{pdf}{immediateobj}
+\presentfunction{pdf}{mapfile}
+\presentfunction{pdf}{mapline}
+\presentfunction{pdf}{obj}
+\presentfunction{pdf}{refobj}
+\presentfunction{pdf}{pageref}
+\presentfunction{pdf}{print}
+\presentfunction{pdf}{reserveobj}
+\presentfunction{pdf}{registerannot}
+
+\section{Status table}
+\presentfunction{status}{list}
+
+The current list is:
+\starttabulate[|lf\ss|p|]
+\NC \ssbf key \NC \bf explanation \NC\NR
+\NC pdf_gone\NC written \PDF\ bytes \NC \NR
+\NC pdf_ptr\NC not yet written \PDF\ bytes \NC \NR
+\NC dvi_gone\NC written \DVI\ bytes \NC \NR
+\NC dvi_ptr\NC not yet written \DVI\ bytes \NC \NR
+\NC total_pages\NC number of written pages \NC \NR
+\NC output_file_name\NC name of the \PDF\ or \DVI\ file \NC \NR
+\NC log_name\NC name of the log file \NC \NR
+\NC banner\NC terminal display banner \NC \NR
+\NC var_used\NC variable (one|-|word) memory in use \NC \NR
+\NC dyn_used\NC token (multi|-|word) memory in use \NC \NR
+\NC str_ptr\NC number of strings \NC \NR
+\NC init_str_ptr\NC number of \INITEX\ strings \NC \NR
+\NC max_strings\NC maximum allowed strings \NC \NR
+\NC pool_ptr\NC string pool index \NC \NR
+\NC init_pool_ptr\NC \INITEX\ string pool index \NC \NR
+\NC pool_size\NC current size allocated for string characters \NC \NR
+\NC node_mem_usage\NC a string giving insight into currently used nodes\NC\NR
+\NC var_mem_max\NC number of allocated words for nodes\NC \NR
+\NC fix_mem_max\NC number of allocated words for tokens\NC \NR
+\NC fix_mem_end\NC maximum number of used tokens\NC \NR
+\NC cs_count\NC number of control sequences \NC \NR
+\NC hash_size\NC size of hash \NC \NR
+\NC hash_extra\NC extra allowed hash \NC \NR
+\NC font_ptr\NC number of active fonts \NC \NR
+\NC max_in_stack\NC max used input stack entries \NC \NR
+\NC max_nest_stack\NC max used nesting stack entries \NC \NR
+\NC max_param_stack\NC max used parameter stack entries \NC \NR
+\NC max_buf_stack\NC max used buffer position \NC \NR
+\NC max_save_stack\NC max used save stack entries \NC \NR
+\NC stack_size\NC input stack size \NC \NR
+\NC nest_size\NC nesting stack size \NC \NR
+\NC param_size\NC parameter stack size \NC \NR
+\NC buf_size\NC current allocated size of the line buffer \NC \NR
+\NC save_size\NC save stack size \NC \NR
+\NC obj_ptr\NC max \PDF\ object pointer \NC \NR
+\NC obj_tab_size\NC \PDF\ object table size \NC \NR
+\NC pdf_os_cntr\NC max \PDF\ object stream pointer \NC \NR
+\NC pdf_os_objidx\NC \PDF\ object stream index \NC \NR
+\NC pdf_dest_names_ptr\NC max \PDF\ destination pointer \NC \NR
+\NC dest_names_size\NC \PDF\ destination table size \NC \NR
+\NC pdf_mem_ptr\NC max \PDF\ memory used \NC \NR
+\NC pdf_mem_size\NC \PDF\ memory size \NC \NR
+\NC largest_used_mark\NC max referenced marks class \NC \NR
+\NC filename\NC name of the current input file \NC \NR
+\NC inputid\NC numeric id of the current input \NC \NR
+\NC linenumber\NC location in the current input file\NC \NR
+\NC lasterrorstring\NC last error string\NC \NR
+\NC luabytecodes\NC number of active \LUA\ bytecode registers\NC \NR
+\NC luabytecode_bytes\NC number of bytes in \LUA\ bytecode registers\NC \NR
+\NC luastate_bytes\NC number of bytes in use by \LUA\ interpreters\NC \NR
+\NC output_active\NC \type{true} if the \tex{output} routine is active\NC \NR
+\NC callbacks\NC total number of executed callbacks so far\NC \NR
+\NC indirect_callbacks\NC number of those that were themselves
+ a result of other callbacks (e.g. file readers)\NC \NR
+\NC luatex_svn\NC the luatex repository id (added in 0.51)\NC\NR
+\NC luatex_version\NC the luatex version number (added in 0.38)\NC\NR
+\NC luatex_revision\NC the luatex revision string (added in 0.38)\NC\NR
+\NC ini_version\NC \type{true} if this is an \INITEX\ run (added in 0.38)\NC\NR
+\stoptabulate
+
+\section{Typesetting table}
+
+\presentfunction{tex}{set}
+\presentfunction{tex}{get}
+
+Many of \LUATEX's internal parameters can be queried and set this way,
+but not nearly all. The big reference manual has an extensive list.
+
+\blank
+\presentfunction{tex}{setattribute}
+\presentfunction{tex}{getattribute}
+\presentfunction{tex}{setbox}
+\presentfunction{tex}{getbox}
+\presentfunction{tex}{setcount}
+\presentfunction{tex}{getcount}
+\presentfunction{tex}{setdimen}
+\presentfunction{tex}{getdimen}
+\presentfunction{tex}{setskip}
+\presentfunction{tex}{getskip}
+\presentfunction{tex}{settoks}
+\presentfunction{tex}{gettoks}
+\presentfunction{tex}{setcatcode}
+\presentfunction{tex}{getcatcode}
+\presentfunction{tex}{setlccode}
+\presentfunction{tex}{getlccode}
+\presentfunction{tex}{setsfcode}
+\presentfunction{tex}{getsfcode}
+\presentfunction{tex}{setuccode}
+\presentfunction{tex}{getuccode}
+\presentfunction{tex}{setmathcode}
+\presentfunction{tex}{getmathcode}
+\presentfunction{tex}{setdelcode}
+\presentfunction{tex}{getdelcode}
+
+In all the \afunction{tex.set...} functions above, the optional string is
+the literal \aliteral{global}. The items can also be accessed directly via virtual arrays:
+\type{tex.attributes[]}, \type{tex.box[]}, \type{tex.count[]}, \type{tex.dimen[]},
+\type{tex.skip[]}, \type{tex.toks[]}; \type{tex.catcode[]}, \type{tex.lccode[]},
+\type{tex.sfcode[]}, \type{tex.uccode[]}, \type{tex.mathcode[]}, \type{tex.delcode[]}.
+
+\blank
+
+\presentfunction{tex}{setmath}
+\presentfunction{tex}{getmath}
+
+\presentfunction{tex}{print}
+\presentfunction{tex}{sprint}
+\presentfunction{tex}{tprint}
+\presentfunction{tex}{write}
+\presentfunction{tex}{round}
+\presentfunction{tex}{scale}
+\presentfunction{tex}{sp}
+\presentfunction{tex}{definefont}
+\presentfunction{tex}{error}
+\presentfunction{tex}{enableprimitives}
+\presentfunction{tex}{extraprimitives}
+\presentfunction{tex}{primitives}
+\presentfunction{tex}{badness}
+\presentfunction{tex}{linebreak}
+
+The \afunction{tex.linebreak} parameters:
+
+\starttabulate[|lf\ss|lf\ss|p|]
+\NC \bf name \NC \bf type \NC \bf description \NC \NR
+\NC pardir \NC string \NC \NC \NR
+\NC pretolerance \NC number \NC \NC \NR
+\NC tracingparagraphs \NC number \NC \NC \NR
+\NC tolerance \NC number \NC \NC \NR
+\NC looseness \NC number \NC \NC \NR
+\NC hyphenpenalty \NC number \NC \NC \NR
+\NC exhyphenpenalty \NC number \NC \NC \NR
+\NC pdfadjustspacing \NC number \NC \NC \NR
+\NC adjdemerits \NC number \NC \NC \NR
+\NC pdfprotrudechars \NC number \NC \NC \NR
+\NC linepenalty \NC number \NC \NC \NR
+\NC lastlinefit \NC number \NC \NC \NR
+\NC doublehyphendemerits \NC number \NC \NC \NR
+\NC finalhyphendemerits \NC number \NC \NC \NR
+\NC hangafter \NC number \NC \NC \NR
+\NC interlinepenalty \NC number or table \NC if a table, then it is an array like \type{\interlinepenalties}\NC \NR
+\NC clubpenalty \NC number or table \NC if a table, then it is an array like \type{\clubpenalties}\NC \NR
+\NC widowpenalty \NC number or table \NC if a table, then it is an array like \type{\widowpenalties}\NC \NR
+\NC brokenpenalty \NC number \NC \NC \NR
+\NC emergencystretch \NC number \NC in scaled points \NC \NR
+\NC hangindent \NC number \NC in scaled points \NC \NR
+\NC hsize \NC number \NC in scaled points \NC \NR
+\NC leftskip \NC glue_spec node \NC \NC \NR
+\NC rightskip \NC glue_spec node \NC \NC \NR
+\NC pdfeachlineheight \NC number \NC in scaled points \NC \NR
+\NC pdfeachlinedepth \NC number \NC in scaled points \NC \NR
+\NC pdffirstlineheight \NC number \NC in scaled points \NC \NR
+\NC pdflastlinedepth \NC number \NC in scaled points \NC \NR
+\NC pdfignoreddimen \NC number \NC in scaled points \NC \NR
+\NC parshape \NC table \NC \NC \NR
+\stoptabulate
+
+
+The \afunction{tex.linebreak} returned table data:
+
+\starttabulate[|lf\ss|p|]
+\NC prevdepth \NC depth of the last line in the broken paragraph \NC \NR
+\NC prevgraf \NC number of lines in the broken paragraph \NC \NR
+\NC looseness \NC the actual looseness value in the broken paragraph \NC \NR
+\NC demerits \NC the total demerits of the chosen solution \NC \NR
+\stoptabulate
+
+\presentfunction{tex}{shipout}
+
+\blank
+The virtual table \type{tex.lists} contains the set of internal
+registers that keep track of building page lists.
+
+\starttabulate[|lf\ss|p|]
+\NC \bf field \NC \bf description \NC \NR
+\NC page_ins_head \NC circular list of pending insertions \NC \NR
+\NC contrib_head \NC the recent contributions \NC \NR
+\NC page_head \NC the page-so-far \NC \NR
+\NC hold_head \NC used for held-over items for next page\NC \NR
+\NC adjust_head \NC head of the current \tex{adjust} list \NC \NR
+\NC pre_adjust_head \NC head of the current \tex{adjust pre} list\NC \NR
+\stoptabulate
+
+\blank
+The virtual table \type{tex.nest} contains the currently active
+semantic nesting state. It has two main parts: an zero-based array of
+userdata for the semantic nest itself, and the numerical value
+\type{tex.nest.ptr}. Known fields:
+
+\starttabulate[|lf\ss|lf\ss|l|p|]
+\NC \ssbf key \NC \bf type \NC \bf modes \NC \bf explanation \NC\NR
+\NC mode \NC number \NC all \NC The current mode.
+ 0 = no mode,
+ 1 = vertical,
+ 127 = horizontal,
+ 253 = display math.
+ $-1$ = internal vertical,
+ $-127$ = restricted horizontal,
+ $-253$ = inline math.\NC\NR
+\NC modeline \NC number \NC all \NC source input line where this mode was entered in,
+ negative inside the output routine.\NC\NR
+\NC head \NC node \NC all \NC the head of the current list\NC\NR
+\NC tail \NC node \NC all \NC the tail of the current list\NC\NR
+\NC prevgraf \NC number \NC vmode \NC number of lines in the previous paragraph\NC\NR
+\NC prevdepth \NC number \NC vmode \NC depth of the previous paragraph\NC\NR
+\NC spacefactor \NC number \NC hmode \NC the current space factor\NC\NR
+\NC dirs \NC node \NC hmode \NC internal use only\NC\NR
+\NC noad \NC node \NC mmode \NC internal use only\NC\NR
+\NC delimptr \NC node \NC mmode \NC internal use only\NC\NR
+\NC mathdir \NC boolean \NC mmode \NC true when during math processing the \type{\mathdir} is not
+ the same as the surrounding \type{\textdir}\NC\NR
+\NC mathstyle \NC number \NC mmode \NC the current \type{\mathstyle} \NC\NR
+\stoptabulate
+
+
+\section{Texconfig table}
+
+This is a table that is created empty. A startup \LUA\ script could
+fill this table with a number of settings that are read out by
+the executable after loading and executing the startup file.
+
+\starttabulate[|lf\ss|lf\ss|l|p|]
+\NC \ssbf key \NC \bf type \NC \bf default \NC \bf explanation \NC\NR
+\NC kpse_init \NC boolean \NC true \NC \type{false} totally disables \KPATHSEA\ initialisation\NC \NR
+\NC shell_escape \NC string\NC \NC cf.\ web2c docs \NC\NR
+\NC shell_escape_commands \NC string\NC \NC cf.\ web2c docs \NC\NR
+\NC string_vacancies \NC number\NC 75000\NC cf.\ web2c docs \NC \NR
+\NC pool_free \NC number\NC 5000\NC cf.\ web2c docs \NC \NR
+\NC max_strings \NC number\NC 15000\NC cf.\ web2c docs \NC \NR
+\NC strings_free \NC number\NC 100\NC cf.\ web2c docs \NC \NR
+\NC nest_size \NC number\NC 50\NC cf.\ web2c docs \NC \NR
+\NC max_in_open \NC number\NC 15\NC cf.\ web2c docs \NC \NR
+\NC param_size \NC number\NC 60\NC cf.\ web2c docs \NC \NR
+\NC save_size \NC number\NC 4000\NC cf.\ web2c docs \NC \NR
+\NC stack_size \NC number\NC 300\NC cf.\ web2c docs \NC \NR
+\NC dvi_buf_size \NC number\NC 16384\NC cf.\ web2c docs \NC \NR
+\NC error_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
+\NC half_error_line \NC number\NC 50\NC cf.\ web2c docs \NC \NR
+\NC max_print_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
+\NC hash_extra \NC number\NC 0\NC cf.\ web2c docs \NC \NR
+\NC pk_dpi \NC number\NC 72\NC cf.\ web2c docs \NC \NR
+\NC trace_file_names \NC boolean \NC true \NC \type{false} disables \TEX's normal file feedback\NC \NR
+\NC file_line_error \NC boolean \NC false \NC \type{file:line} style error messages\NC \NR
+\NC halt_on_error \NC boolean \NC false \NC abort run on the first encountered error\NC \NR
+\NC formatname \NC string \NC \NC if no format name was given
+ on the commandline, this will be used\NC \NR
+\NC jobname \NC string \NC \NC as \type{formatname}.\NC \NR
+\stoptabulate
+
+
+\section{IO table}
+\presentfunction{texio}{write}
+\presentfunction{texio}{write_nl}
+
+\section{Token table}
+
+A token is represented in \LUA\ as a small table. For the moment, this
+table consists of three numeric entries:
+
+\starttabulate[|l|l|p|]
+\NC \bf index\NC \bf meaning \NC \bf description \NC \NR
+\NC 1 \NC command code \NC this is a value between~$0$ and~$130$\NC \NR
+\NC 2 \NC command modifier \NC this is a value between~$0$ and~$2^{21}$ \NC \NR
+\NC 3 \NC control sequence id \NC for commands that are not the result of control
+ sequences, like letters and characters, it is zero,
+ otherwise, it is a number pointing into the \quote
+ {equivalence table} \NC \NR
+\stoptabulate
+
+\presentfunction{token}{get_next}
+\presentfunction{token}{is_expandable}
+\presentfunction{token}{expand}
+\presentfunction{token}{is_activechar}
+\presentfunction{token}{create}
+\presentfunction{token}{command_name}
+\presentfunction{token}{command_id}
+\presentfunction{token}{csname_name}
+\presentfunction{token}{csname_id}
+
+
+\stopcolumns
+\stoptext
diff --git a/Master/texmf-dist/doc/luatex/base/luatex.man b/Master/texmf-dist/doc/luatex/base/luatex.man
new file mode 100644
index 00000000000..553cbc518c1
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/base/luatex.man
@@ -0,0 +1,266 @@
+.TH LUATEX 1 "2009.04.22" "luatex 0.40" "Web2C @VERSION@"
+.\"=====================================================================
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.if n .ds WB Web
+.if t .ds WB W\s-2EB\s0
+.\"=====================================================================
+.SH NAME
+luatex, texlua, texluac \- An extended version of pdfTeX using Lua as
+an embedded scripting language
+.\"=====================================================================
+.SH SYNOPSIS
+.B luatex
+[\-\-lua=\fIFILE\fR] [\fIOPTION\fR]... [\fITEXNAME\fR[.tex]] [\fICOMMANDS\fR]
+
+.B luatex
+[\-\-lua=\fIFILE\fR] [\fIOPTION\fR]... \fI\eFIRST\-LINE\fR
+
+.B luatex
+[\-\-lua=\fIFILE\fR] [\fIOPTION\fR]... \fB&\fIFMT ARGS\fR
+.\"=====================================================================
+.SH DESCRIPTION
+Run the lua\*(TX typesetter on \fITEXNAME\fR, usually creating
+TEXNAME.pdf. Any
+remaining \fICOMMANDS\fR are processed as lua\*(TX input, after TEXNAME
+is read.
+
+Alternatively, if the first non\-option argument begins with a backslash,
+interpret all non\-option arguments as a line of lua\*(TX input.
+
+Alternatively, if the first non\-option argument begins with a \fB&\fR,
+the
+next word is taken as the \fIFMT\fR to read, overriding all else. Any
+remaining arguments are processed as above.
+
+If no arguments or options are specified, prompt for input.
+
+If called as \fBtexlua\fR it acts as lua interpreter.
+If called as \fBtexluac\fR it acts as lua bytecode compiler.
+
+Lua\*(TX is an extended version of pdf\*(TX with Unicode and OpenType
+font support, embeded \fBLua\fR scripting language, the \fBe-\*(TX\fR
+and \fBOmega\fR extensions, as well as integrated MetaPost engine, that
+can create \fIPDF\fR files as well as \fIDVI\fR files.
+For more information about luatex, see http://www.luatex.org, you can
+read Lua\*(TX manual using texdoc utility (\fBtexdoc luatex\fR).
+
+All Lua\*(TX text input and output is considered to be Unicode text.
+
+In \fIDVI\fR mode, lua\*(TX can be used as a complete replacement for
+the \*(TX engine.
+
+In \fIPDF\fR mode, lua\*(TX can natively handle the \fIPDF\fR, \fIJPG\fR,
+\fIJBIG2\fR, and \fIPNG\fR graphics formats. lua\*(TX cannot include
+PostScript or Encapsulated PostScript (EPS) graphics files; first convert
+them to PDF using \fBepstopdf\fR (1).
+
+.\"=====================================================================
+.SH "OPTIONS"
+When the Lua\*(TX executable starts, it looks for the \fB\-\-lua\fR
+commandline option.
+If there is no \fB\-\-lua\fR option, the commandline is interpreted in a
+similar fashion as in traditional pdf\*(TX and Aleph. But if the option
+is present, Lua\*(TX will enter an alternative mode of commandline parsing
+in comparison to the standard web2c programs. The presence of \fB--lua\fR
+makes most of other options unreliable, because the lua initialization
+file can disable kpathsea and/or hook functions into various callbacks.
+.ig
+Here is the list of possibly affected switches/functionality, and why:
+..
+.TP
+.BI "\-\-lua=" FILE
+.rb
+The lua initialization file.
+.PP
+The following two options alter the executable behaviour:
+.TP
+.B \-\-luaonly
+.rb
+Start Lua\*(TX as a Lua interpreter. In this mode, it will set Lua's
+\fIarg[0]\fR to the found script name, pushing preceding options in
+negative values and the rest of the commandline in the positive values,
+just like the Lua interpreter. Lua\*(TX will exit immediately after
+executing the specified Lua script.
+.TP
+.BI \-\-luaconly
+.rb
+Start Lua\*(TX as a Lua byte compiler. In this mode, Lua\*(TX is exactly
+like \fBluac\fR from the standalone Lua distribution, except that it
+does not have the \fB\-l\fR switch, and that it accepts (but ignores)
+the \fB\-\-luaconly\fR switch.
+.PP
+Then the regular web2c options:
+.TP
+.B \-\-debug\-format
+.br
+Debug format loading.
+.TP
+.B \-\-draftmode
+.rb
+Sets \epdfdraftmode so lua\*(TX doesn't write a PDF and doesn't read
+any included images, thus speeding up execution.
+.TP
+.B \-\-enable\-write18
+.br
+Synonym for \fB\-\-shell\-escape\fR.
+.TP
+.B \-\-disable\-write18
+.br
+Synonym for \fB\-\-no\-shell\-escape\fR.
+.TP
+.B \-\-shell\-escape
+.br
+Enable the
+.BI \ewrite18{ command }
+construct, and Lua functions \fBos.execute()\fR, \fBos.exec()\fR,
+\fBos.spawn()\fR, and \fBio.popen()\fR. The \fIcommand\fR can be any
+shell command. This construct is normally disallowed for security
+reasons.
+.TP
+.B \-\-no\-shell-escape
+.br
+Disable the
+.BI \ewrite18{ command }
+construct and the other Lua functions, even if it is enabled in the
+\fItexmf.cnf\fR file.
+.TP
+.B \-\-shell-restricted
+.rb
+Enable restricted version of \fB\ewrite18\fR, \fBos.execute()\fR,
+\fBos.exec()\fR, \fBos.spawn()\fR, and \fBio.popen()\fR, only commands
+listed in \fItexmf.cnf\fR file are allowed.
+.TP
+.B \-\-file\-line\-error
+.rb
+Print error messages in the form \fIfile:line:error\fR which is similar
+to the way many compilers format them.
+.TP
+.B \-\-no\-file\-line\-error
+.rb
+Disable printing error messages in the \fIfile:line:error\fR style.
+.TP
+.BI "\-\-fmt=" FORMAT
+.rb
+Use \fIFORMAT\fR as the name of the format to be used, instead of the
+name by which lua\*(TX was called or a \fI%&\fR line.
+.TP
+.B \-\-help
+.rb
+Print help message and exit.
+.TP
+.B \-\-ini
+.rb
+Start in \fIINI\fR mode, which is used to dump formats. The \fIINI\fR
+mode can be used for typesetting, but no format is preloaded, and basic
+initializations like setting catcodes may be required.
+.TP
+.BI "\-\-interaction=" MODE
+.rb
+Sets the interaction mode. The \fIMODE\fR can be either
+.IR batchmode ,
+.IR nonstopmode ,
+.IR scrollmode ,
+and
+.IR errorstopmode .
+The meaning of these modes is the same as that of the corresponding
+\ecommands.
+.TP
+.BI "\-\-jobname=" NAME
+.rb
+Use \fINAME\fR for the job name, instead of deriving it from the name
+of the input file.
+.TP
+.BI "\-\-kpathsea-debug=" BITMASK
+.rb
+Sets path searching debugging flags according to the \fIBITMASK\fR.
+See the \fIKpathsea\fR manual for details.
+.TP
+.BI "\-\-mktex=" FMT
+.rb
+Enable mktex\fIFMT\fR generation, where \fIFMT\fR must be either \fItex\fR
+or \fItfm\fR.
+.TP
+.B \-\-nosocket
+.rb
+Disable the luasocket (network) library.
+.TP
+.TP
+.BI "\-\-output\-comment=" STRING
+.rb
+In \fIDVI\fR mode, use \fISTRING\fR for the \fIDVI\fR file comment
+instead of the date. This option is ignored in\fIPDF\fR mode.
+.TP
+.BI "\-\-output\-directory=" DIRECTORY
+.rb
+Write output files in \fIDIRECTORY\fR instead of the current directory.
+Look up input files in \fIDIRECTORY\fR first, then along the normal
+search path.
+.TP
+.BI "\-\-output\-format=" FORMAT
+.rb
+Set the output format mode, where \fIFORMAT\fR must be either \fIpdf\fR
+or \fIdvi\fR.
+This also influences the set of graphics formats understood by lua\*(TX.
+.TP
+.BI "\-\-progname=" NAME
+.rb
+Pretend to be program \fINAME\fR (only for kpathsea).
+.TP
+.B \-\-recorder
+.rb
+Enable the filename recorder.
+This leaves a trace of the files opened for input and output
+in a file with extension \fI.fls\fR.
+.TP
+.B \-\-safer
+.rb
+Disable some Lua commands that can easily be abused by a malicious
+document.
+.TP
+.BI "\-\-synctex=" NUMBER
+.rb
+Enable/disable Sync\*(TX extension.
+.TP
+.B \-\-version
+.rb
+Print version information and exit.
+.TP
+.B \-\-credits
+.rb
+Print credits and version details.
+.TP
+The following options are ignored:
+.TP
+.BR "\-\-8bit" ,\ "\-\-etex" ,\ "\-\-parse\-first\-line" ,\
+"\-\-no\-parse\-first\-line"
+.rb
+These are always on.
+.TP
+.BI "\-\-default\-translate\-file=" TCXNAME , \ "\-\-translate\-file="
+TCXNAME
+.rb
+These are always off.
+
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR pdftex (1),
+.BR etex (1),
+.BR aleph (1),
+.BR omega (1),
+.BR lua (1).
+.\"=====================================================================
+.SH "AUTHORS"
+The primary authors of Lua\*(TX are Hartmut Henkel, Taco Hoekwater,
+and Hans Hagen, with help from Martin Schr\[:o]der, Karel Skoupy, and
+Han The Thanh.
+.PP
+\*(TX was designed by Donald E. Knuth, who implemented it using his
+\*(WB system for Pascal programs.
+It was ported to Unix at Stanford by Howard Trickey, and at Cornell by
+Pavel Curtis.
+The version now offered with the Unix \*(TX distribution is that generated
+by the \*(WB to C system (\fBweb2c\fR), originally written by Tomas
+Rokicki and Tim Morgan.
diff --git a/Master/texmf-dist/doc/luatex/base/luatexref-env.tex b/Master/texmf-dist/doc/luatex/base/luatexref-env.tex
index 7917b9b1976..fe5256f9b9b 100644
--- a/Master/texmf-dist/doc/luatex/base/luatexref-env.tex
+++ b/Master/texmf-dist/doc/luatex/base/luatexref-env.tex
@@ -58,6 +58,17 @@
}%
}
+\def\showid#1{\ctxlua
+ { do
+ local t = string.split('#1',',')
+ tex.sprint('\\type{'.. node.id(t[1]) .. '}')
+ if t[2] then
+ tex.sprint(', \\type{'.. node.subtype(t[2]) .. '}')
+ end
+ end
+ }%
+}
+
\def\todo#1%
{\dontleavehmode{\bf\red <TODO: #1>}}
@@ -152,10 +163,20 @@
StopPage ;
\stopuseMPgraphic
+\def\luaextraangle{\directlua{
+ if \lastpage == 0 then
+ luaextraangle = 0;
+ else
+ luaextraangle = \realfolio*360/\lastpage;
+ end
+ tex.print(luaextraangle)
+}}
+
\startuseMPgraphic{luanumber}
\includeMPgraphic{lualogo}
-% luaextraangle := \realfolio*360/\lastpage ;
- luaextraangle := 10 * ( (\realfolio-2)*36/(\lastpage-2) ) ;
+ % luaextraangle := \realfolio*360/\lastpage ;
+ % luaextraangle := 10 * ( (\realfolio-2)/(\lastpage-2)*36 ) ;
+ luaextraangle := \luaextraangle;
picture p ; p := lualogo ;
setbounds p to boundingbox fullcircle ;
draw p ysized 1cm ;
diff --git a/Master/texmf-dist/doc/luatex/base/luatexref-t.pdf b/Master/texmf-dist/doc/luatex/base/luatexref-t.pdf
index e79939832de..97d9ae36f7d 100644
--- a/Master/texmf-dist/doc/luatex/base/luatexref-t.pdf
+++ b/Master/texmf-dist/doc/luatex/base/luatexref-t.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/base/luatexref-t.tex b/Master/texmf-dist/doc/luatex/base/luatexref-t.tex
index f15aa8de09b..38bcdf34463 100644
--- a/Master/texmf-dist/doc/luatex/base/luatexref-t.tex
+++ b/Master/texmf-dist/doc/luatex/base/luatexref-t.tex
@@ -1,4 +1,5 @@
% engine=luatex language=uk
+% $Id$
% TODO: fix layout of function legend descriptions
% check numbers
@@ -22,7 +23,7 @@
\setvariables
[document]
- [beta=0.60.2]
+ [beta=0.66.0]
\starttext
@@ -39,7 +40,7 @@
\startframedtext[framecolor=red,foregroundcolor=red,width=\hsize,style=\tfa]
This book will eventually become the reference manual of \LUATEX.
-At the moment, it simply reports the behaviour of the executable
+At the moment, it simply reports the behavior of the executable
matching the snapshot or beta release date in the title page.
\blank
@@ -53,8 +54,7 @@ functionality staying the same.
Nothing is considered stable just yet. This manual therefore
simply reflects the current state of the executable. {\bs
Absolutely nothing\/} on the following pages is set in stone. When
-the need arises, anything can (and will) be changed without prior
-notice.
+the need arises, anything can (and will) be changed.
\blank
@@ -71,8 +71,8 @@ TODO list is still large.}
distinguishable parts:
\startitemize[packed]
-\item \PDFTEX\ version 1.40.9, converted to C.
-\item \ALEPH\ RC4 converted to C.
+\item \PDFTEX\ version 1.40.9, converted to C (with patches from later releases).
+\item The direction model and some other bits from \ALEPH\ RC4 converted to C.
\item \LUA\ 5.1.4 ($+$ coco 1.1.5 $+$ portable bytecode)
\item dedicated \LUA\ libraries
\item various \TEX\ extensions
@@ -83,9 +83,9 @@ distinguishable parts:
Neither \ALEPH's I/O translation processes, nor tcx files, nor
\ENCTEX\ can be used, these encoding|-|related functions are
-superseded by a \LUA|-|based solution (reader callbacks). Also,
-some experimental \PDFTEX\ features are removed. These can be
-implemented in \LUA\ instead.
+superseded by a \LUA|-|based solution (reader callbacks). Also, some
+experimental \PDFTEX\ features are removed. These can be implemented
+in \LUA\ instead.
\chapter{Basic \TEX\ enhancements}
@@ -111,7 +111,7 @@ format generation file:
\directlua { tex.enableprimitives('',tex.extraprimitives()) }
\stoptyping
-But be aware, that the curly braces may not have the proper \type{\catcode}
+But be aware that the curly braces may not have the proper \type{\catcode}
assigned to them at this early time (giving a 'Missing number' error),
so it may be needed to put these assignments
@@ -121,8 +121,8 @@ so it may be needed to put these assignments
\stoptyping
before the above line.
-More fine-grained primitives control is possible, you can look the details in
-\in{section}[luaprimitives]. For simplicity's sake, this manual assumes
+More fine-grained primitives control is possible, you can look up the details in
+\in{section}[luaprimitives]. For simplicity's sake, this manual assumes
that you have executed the \type{\directlua} command as given above.
The startup behavior documented above is considered stable in the sense
@@ -145,7 +145,7 @@ There are three new primitives to test the version of \LUATEX:
document is {\bf\luatexdatestamp}. \NC\NR
\stoptabulate
-The official \LUATEX\ version is defined follows:
+The official \LUATEX\ version is defined as follows:
\startitemize
\item The major version is the integer result of \tex{luatexversion} divided by 100.
@@ -172,7 +172,7 @@ input characters can use the full range of \UNICODE\ ($2^{20}+2^{16}-1
= \hbox{0x10FFFF}$).
Later chapters will talk of characters and glyphs. Although these
-are not the interchangeable, they are closely related. During
+are not interchangeable, they are closely related. During
typesetting, a character is always converted to a suitable graphic
representation of that character in a specific font. However,
while processing a list of to|-|be|-|typeset nodes, its contents
@@ -190,7 +190,7 @@ generated an error when processed by older \TEX|-|based engines. The
affected commands with an altered initial (left of the equals sign) or
secondary (right of the equals sign) value are: \tex{char},
\tex{lccode},\tex{uccode}, \tex{catcode}, \tex{sfcode}, \tex{efcode},
-\tex{lpcode}, \tex{rpcode}, \tex{chardef}
+\tex{lpcode}, \tex{rpcode}, \tex{chardef}.
As far as the core engine is concerned, all input and output to
text files is \UTF-8 encoded. Input files can be pre|-|processed
@@ -199,7 +199,7 @@ later chapter.
Output in byte|-|sized chunks can be achieved by using characters
just outside of the valid \UNICODE\ range, starting at the value
-$1{,}114{,}112$ (0x110000). When the times comes to print a character
+$1{,}114{,}112$ (0x110000). When the time comes to print a character
$c>=1{,}114{,}112$, \LUATEX\ will actually print the single byte
corresponding to $c$ minus 1{,}114{,}112.
@@ -213,7 +213,7 @@ during callback processing (this will be explained in \in{section}[iocallback]).
\section{Extended tables}
-All traditional \TEX\ and \ETEX\ registers can be 16~bit numbers as in
+All traditional \TEX\ and \ETEX\ registers can be 16-bit numbers as in
\ALEPH. The affected commands are:
\startcolumns[n=4]
@@ -245,7 +245,7 @@ All traditional \TEX\ and \ETEX\ registers can be 16~bit numbers as in
The glyph properties (like \type {\efcode}) introduced in \PDFTEX\
that deal with font expansion (hz) and character protruding are
-also 16~bit. Because font memory management has been rewritten,
+also 16-bit. Because font memory management has been rewritten,
these character properties are no longer shared among fonts
instances that originate from the same metric file.
@@ -261,7 +261,7 @@ and can be used after \tex{the} etc.\ just like the normal
\tex{count} registers.
\startsyntax
-\attribute <16-bit number> <optional equals> <31-bit number>!crlf
+\attribute <16-bit number> <optional equals> <32-bit number>!crlf
\attributedef <csname> <optional equals> <16-bit number>
\stopsyntax
@@ -272,7 +272,7 @@ indicate that they are unset, that value is the lowest legal value:
It follows that the value \type{-"7FFFFFFF} cannot be used as
a legal attribute value, but you {\it can\/} assign \type{-"7FFFFFFF} to
\quote{unset} an attribute. All attributes start out in this
-\quote{unset} state in \INITEX (prior to 0.37, there could not be
+\quote{unset} state in \INITEX\ (prior to 0.37, there could not be
valid negative attribute values, and the \quote{unset} value was $-1$).
Attributes can be used as extra counter values, but their usefulness
@@ -298,7 +298,7 @@ effect in, say, the first or third line of the paragraph.
Similar situations happen in \LUATEX\ regularly. A few of the more
obvious problematic cases are dealt with: the attributes for nodes
-that are created during hyphenation and ligaturing borrow their
+that are created during hyphenation, kerning and ligaturing borrow their
attributes from their surrounding glyphs, and it is possible to
influence box attributes directly.
@@ -307,19 +307,13 @@ contained in the box are unchanged when such a box is placed,
unboxed, or copied. In this respect attributes act the same as
characters that have been converted to references to glyphs in
fonts. For instance, when you use attributes to implement color
-support, each node carries information about its color. In that
+support, each node carries information about its eventual color. In that
case, unless you implement mechanisms that deal with it, applying
a color to already boxed material will have no effect. Keep in
-mind that this incompatibility is mostly due to the fact that
+mind that this incompatibility is mostly due to the fact that separate
specials and literals are a more unnatural approach to colors than
attributes.
-Many other inserted nodes, like the nodes resulting from math mode
-and alignments, are processed \quote {out of order}, and will have the
-attributes that are in effect at the precise moment of creation (which
-is often later than expected). This area needs studying, and is in
-fact one of the reasons for a beta at this moment.
-
It is possible to fine-tune the list of attributes that are applied
to a \type{hbox}, \type{vbox} or \type{vtop} by the use of the
keyword \type{attr}. An example:
@@ -327,12 +321,12 @@ keyword \type{attr}. An example:
\starttyping
\attribute2=5
\setbox0=\hbox {Hello}
-\setbox2=\hbox attr1=12 attr2=-1{Hello}
+\setbox2=\hbox attr1=12 attr2=-"7FFFFFFF{Hello}
\stoptyping
This will set the attribute list of box~2 to $1=12$, and the
-attributes of box~0 will be $2=5$. As you can see, assigning a
-negative value causes an attribute to be ignored.
+attributes of box~0 will be $2=5$. As you can see, assigning
+the maximum negative value causes an attribute to be ignored.
The \type{attr} keyword(s) should come before a \type{to} or
\type{spread}, if that is also specified.
@@ -364,7 +358,7 @@ from interfering with those used by the macro package.
The conversion to and from a token list means that you normally can
not use \LUA\ line comments (starting with \type{--}) within the
-argument. As there typically will be only one \quote{line} the first
+argument. As there typically will be only one \quote{line} the first
line comment will run on until the end of the input. You will either need to
use \TEX-style line comments (starting with \%), or change the \TEX\
category codes locally. Another possibility is to say:
@@ -431,7 +425,7 @@ more.
\subsection{\tex{latelua}}
\tex{latelua} stores \LUA\ code in a whatsit that will be processed
-inside the output routine. Its intended use is a cross between
+at the time of shipping out. Its intended use is a cross between
\tex{pdfliteral} and \tex{write}.
Within the \LUA\ code you can print \PDF\
statements directly to the \PDF\ file via \type{pdf.print},
@@ -479,7 +473,7 @@ is easier to keep the code in a separate file and load it using \LUA's
\subsection{\tex{clearmarks}}
-This primitive clears a marks class completely, resetting all three
+This primitive clears a mark class completely, resetting all three
connected mark texts to empty.
\startsyntax
@@ -535,9 +529,9 @@ differences are:
\starttabulate[|l|l|l|l|]
\NC \bf primitive \NC \bf explanation \NC\NR
-\NC \tex{alignmark} \NC Duplicates the functionality of \char`\#~
+\NC \tex{alignmark} \NC Duplicates the functionality of \char`\#~%
inside alignment preambles\NC\NR
-\NC \tex{aligntab} \NC Duplicates the functionality of \char`\&~
+\NC \tex{aligntab} \NC Duplicates the functionality of \char`\&~%
inside alignments (and preambles)\NC\NR
\stoptabulate
@@ -562,7 +556,7 @@ format file.
\catcodetable <16-bit number>
\stopsyntax
-The \tex{catcodetable} switches to a different catcode table.
+The primitive \tex{catcodetable} switches to a different catcode table.
Such a table has to be previously created using one of the two
primitives below, or it has to be zero. Table zero is initialized by
\INITEX.
@@ -573,19 +567,19 @@ primitives below, or it has to be zero. Table zero is initialized by
\initcatcodetable <16-bit number>
\stopsyntax
-The \tex{initcatcodetable} creates a new table with catcodes
+The primitive \tex{initcatcodetable} creates a new table with catcodes
identical to those defined by \INITEX:
\starttabulate[|l|l|l|l|l|]
-\NC~0\NC \type{_} \NC \NC \tt escape \NC\NR
-\NC~5\NC \tt\letterhat\letterhat M \NC return \NC \tt car\_ret \NC (this name may change) \NC\NR
+\NC~0\NC \tt\letterbackslash \NC \NC \tt escape \NC\NR
+\NC~5\NC \tt\letterhat\letterhat M \NC return \NC \tt car{\_}ret \NC (this name may change) \NC\NR
\NC~9\NC \tt\letterhat\letterhat @ \NC null \NC \tt ignore \NC\NR
\NC10\NC \tt <space> \NC space \NC \tt spacer \NC\NR
\NC11\NC {\tt a} -- {\tt z} \NC \NC \tt letter \NC\NR
\NC11\NC {\tt A} -- {\tt Z} \NC \NC \tt letter \NC\NR
\NC12\NC everything else \NC \NC \tt other \NC\NR
\NC14\NC \tt\letterpercent \NC \NC \tt comment \NC\NR
-\NC15\NC \tt\letterhat\letterhat ? \NC delete \NC \tt invalid\_char \NC\NR
+\NC15\NC \tt\letterhat\letterhat ? \NC delete \NC \tt invalid{\_}char \NC\NR
\stoptabulate
The new catcode table is allocated globally: it will not go away after
@@ -656,7 +650,7 @@ that is normally prohibited.
The addition of this command coincides with a change in the
\LUATEX\ engine: ever since the snapshot of 20060915, \type{\outer}
-was simply ignored. That behaviour has now reverted back to be
+was simply ignored. That behavior has now reverted back to be
\TEX82-compatible by default.
@@ -667,7 +661,7 @@ was simply ignored. That behaviour has now reverted back to be
\stopsyntax
This new integer parameter allows you to alter the number of the box
-that will be used to store the page to be shipped out in. Its default
+that will be used to store the page sent to the output routine. Its default
value is 255, and the acceptable range is from 0 to 65535.
@@ -721,7 +715,7 @@ There is a new experimental primitive: \type{\gleaders} (a \LUATEX\
extension, added in 0.43). This type of leaders is anchored to the
origin of the box to be shipped out. So they are like normal
\type{\leaders} in that they align nicely, except that the alignment
-is based on the {\it largest\/} enclosing box instead of the
+is based on the {\it largest\/} enclosing box instead of the
{\it smallest\/}.
\chapter {\LUA\ general}
@@ -768,13 +762,13 @@ and that it accepts (but ignores) the \type{--luaconly} switch.
When the \LUATEX\ executable starts, it looks for the \type{--lua}
commandline option. If there is no \type{--lua} option, the
commandline is interpreted in a similar fashion as in traditional
-\PDFTEX\ and \ALEPH.
+\PDFTEX\ and \ALEPH.
The following command-line switches are understood.
\starttabulate[|lT|p|]
\NC --fmt=FORMAT \NC load the format file FORMAT \NC\NR
-\NC --lua=s \NC load and execute a \LUA\ initialization script\NC\NR
+\NC --lua=FILE \NC load and execute a \LUA\ initialization script\NC\NR
\NC --safer \NC disable easily exploitable \LUA\ commands \NC\NR
\NC --nosocket \NC disable the \LUA\ socket library \NC\NR
\NC --help \NC display help and exit \NC\NR
@@ -797,7 +791,7 @@ The following command-line switches are understood.
\NC --[no-]shell-escape \NC disable/enable \type{\write18{SHELL COMMAND}} \NC \NR
\NC --enable-write18 \NC enable \type{\write18{SHELL COMMAND}} \NC \NR
\NC --disable-write18 \NC disable \type{\write18{SHELL COMMAND}} \NC \NR
-\NC --shell-restricted \NC restrict \type{\write18} to a list of commands
+\NC --shell-restricted \NC restrict \type{\write18} to a list of commands
given in texmf.cnf \NC \NR
\NC --debug-format \NC enable format debugging \NC \NR
\NC --[no-]file-line-error \NC disable/enable file:line:error style messages \NC \NR
@@ -812,20 +806,50 @@ The following command-line switches are understood.
\NC --synctex=NUMBER \NC enable synctex \NC \NR
\stoptabulate
-But if the option is present, \LUATEX\ will enter an alternative mode
+A note on the creation of the various temporary files and the \type{\jobname}.
+The value to use for \type{\jobname} is decided as follows:
+
+\startitemize
+\item If \type{--jobname} is given on the command line, its argument
+ will be the value for \tex{jobname}, without any changes. The
+ argument will not be used for actual input so it need not exist.
+ The \type{--jobname} switch only controls the \tex{jobname} setting.
+\item Otherwise, \tex{jobname} will be the name of the first file that
+ is read from the file system, with any path components and the last
+ extension (the part following the last \type{.}) stripped off.
+\item An exception to the previous point: if the command
+ line goes into interactive mode (by starting with a command) and
+ there are no files input via \type{\everyjob} either, then the
+ \tex{jobname} is set to \type{texput} as a last resort.
+\stopitemize
+
+The file names for output files that are generated automatically are
+created by attaching the proper extension (\type{.log}, \type{.pdf},
+etc.) to the found \tex{jobname}. These files are created in the
+directory pointed to by \type{--output-directory}, or in the current
+directory, if that switch is not present.
+
+\blank
+
+Without the \type{--lua} option, command line processing works like it does in
+any other web2c-based typesetting engine, except that \LUATEX\ has a few extra
+switches.
+
+
+If the \type{--lua} option is present, \LUATEX\ will enter an alternative mode
of commandline processing in comparison to the standard web2c
programs.
In this mode, a small series of actions is taken in order. First,
-it will parse the commandline as usual, but it will only interpret
-a small subset of the options immediately: \type{--safer}, \type{--nosocket},
+it will parse the commandline as usual, but it will only interpret
+a small subset of the options immediately: \type{--safer}, \type{--nosocket},
\type{--[no-]shell-escape}, \type{--enable-write18}, \type{--disable-write18},
\type{--shell-restricted}, \type{--help}, \type{--version}, and \type{--credits}.
Now it searches for the requested \LUA\ initialization script. If it
-can not be found using the actual name given on the commandline, a
+cannot be found using the actual name given on the commandline, a
second attempt is made by prepending the value of the environment
-variable \type{LUATEXDIR}, if that variable is defined.
+variable \type{LUATEXDIR}, if that variable is defined in the environment.
Then it checks the various safety switches. You can use those to disable
some \LUA\ commands that can easily be abused by a malicious document. At
@@ -878,38 +902,38 @@ four global names, as they will be overwritten completely.
We recommend you use the startup file only for your own
\TEX|-|independent initializations (if you need any), to parse the
commandline, set values in the \luatex{texconfig} table, and register
-the callbacks you need.
+the callbacks you need.
-\LUATEX\ allows some of the commandline opiotns to be overridden
+\LUATEX\ allows some of the commandline options to be overridden
by reading values from the \luatex{texconfig} table at the end of
script execution (see the description of the \luatex{texconfig} table
later on in this document for more details on which ones exactly).
Unless the \luatex{texconfig} table tells \LUATEX\ not to initialize
\KPATHSEA\ at all (set \luatex{texconfig.kpse_init} to \type{false} for that),
-\LUATEX\ acts on three more commandline options after the
+\LUATEX\ acts on some more commandline options after the
initialization script is finished:
-
in order to initialize the built|-|in \KPATHSEA\ library properly,
\LUATEX\ needs to know the correct program name to use, and for that it
needs to check \type{--progname}, or \type{--ini} and \type{--fmt}, if
\type{--progname} is missing.
+
\section{\LUA\ changes}
-The C coroutine (\COCO) patches from luajit are applied to the \LUA\
-core, the used version is 1.1.5. See \hyphenatedurl{http://luajit.org/coco.html}
+The C coroutine (\COCO) patches from LuaJIT are applied to the \LUA\
+core, the used version is 1.1.5. See \hyphenatedurl{http://coco.luajit.org/}
for details. This functionality currently (0.45) does not work on
non-intel OpenBSD platforms nor on powerpc Linux-es. Additional note:
-\type{coroutines.wrap()} under Windows does not inherit the state
+\type{coroutines.wrap()} under Windows does not inherit the state
of the random generator, it always has an implicit
\type{math.randomseed(1)} that is added by the Windows kernel.
Starting from version 0.45, \LUATEX\ is able to use the kpathsea
library to find \type{require()}d modules. For this purpose,
\type{package.loaders[2]} is replaced by a different loader function,
-that decides at runtime whether to use kpathsea or the build-in core
-lua function. It uses \KPATHSEA\ when that is already initialized at
+that decides at runtime whether to use kpathsea or the built-in core
+lua function. It uses \KPATHSEA\ when that is already initialized at
that point in time, otherwise it reverts to using the normal
\type{package.path} loader.
@@ -921,7 +945,7 @@ Initialization of \KPATHSEA\ can happen either implicitly (when
Starting from version 0.46.0 (as an {\bf experimental} feature!) \LUATEX\ is
also able to use dynamically loadable \LUA\ libraries, unless
-\type{--safer} was given as an option on the command line.
+\type{--safer} was given as an option on the command line.
For this purpose, \type{package.loaders[3]} is replaced by a different
loader function, that decides at runtime whether to use kpathsea or
@@ -934,7 +958,7 @@ This functionality required an extension to kpathsea:
\startnarrower
There is a new kpathsea file format: \type{kpse_clua_format} that
searches for files with extension \type{.dll} and \type{.so}. The
-\type{texmf.cnf} setting for this variable \type{is CLUAINPUTS}, and
+\type{texmf.cnf} setting for this variable is \type{CLUAINPUTS}, and
by default it has this value:
\starttyping
@@ -943,11 +967,11 @@ CLUAINPUTS=.:$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
This path is imperfect (it requires a TDS subtree below the binaries
directory), but the architecture has to be in the path somewhere, and
-the currently simplest way to do that is to search below the binary
-directory only.
+the currently simplest way to do that is to search below the binaries
+directory only.
One level up (a \type{lib} directory parallel to \type{bin}) would
-have been nicer, but that is not doable because texlive uses a
+have been nicer, but that is not doable because \TEXLIVE\ uses a
\type{bin/<arch>} structure.
\stopnarrower
@@ -985,7 +1009,7 @@ argument. The file name is not tested for existence. Finally, for
non-WIN32 platforms only, there is the new function
\type{lfs.readlink()} (added in 0.51) that takes an existing symbolic
link as argument and returns its content. It returns an error on
-WIN32.
+WIN32.
The \lua{string} library has an extra function:
\luatex{string.explode(s[,m])}. This function returns an array containing
@@ -995,7 +1019,7 @@ is either empty (this splits the string into characters), a single
character (this splits on each occurrence of that character, possibly
introducing empty strings), or a single character followed by the plus
sign \type{+} (this special version does not create empty
-sub-strings). The default value for \type{m} is \type{ +} (multiple
+sub-strings). The default value for \type{m} is \quote{\type{ +}} (multiple
spaces).
Note: \type{m} is not hidden by surrounding braces (as it would be if
@@ -1011,7 +1035,7 @@ piecemeal:
\UTF-8 token in it)
\item \luatex{string.characters(s)} (a string containing one byte)
\item \luatex{string.characterpairs(s)} (two strings each containing one byte) will
-produce an empty second string in the string length was odd.
+produce an empty second string if the string length was odd.
\item \luatex{string.bytes(s)} (a single byte value)
\item \luatex{string.bytepairs(s)} (two byte values) Will produce nil instead of a
number as its second return value if the string length was odd.
@@ -1029,19 +1053,19 @@ exceptions are \luatex{unicode.utf8.find}, that always returns byte
positions in a string, and \luatex{unicode.utf8.match} and
\luatex{unicode.utf8.gmatch}. While the latter two functions in general
{\it are} \UNICODE|-|aware, they fall-back to non|-|\UNICODE|-|aware
-behaviour when using the empty capture \lua{()} (other captures work as
+behavior when using the empty capture \lua{()} (other captures work as
expected). For the interpretation of character classes in
\luatex{unicode.utf8} functions refer to the library sources at
\hyphenatedurl{http://luaforge.net/projects/sln}. The \lua{slnunicode}
library will be replaced by an internal \UNICODE\ library in a future
-\LUATEX\ version.
+\LUATEX\ version.
\blank
The \lua{os} library has a few extra functions and variables:
\startitemize
\item \luatex{os.selfdir} is a variable that holds the directory path
-of \type{argv[0]}. For example: {\tt \directlua{tex.sprint(os.selfdir)}}
+of the actual executable. For example: {\tt \directlua{tex.sprint(os.selfdir)}}
(present since 0.27.0).
\item \luatex{os.exec(commandline)} is a variation on \lua{os.execute}.
@@ -1055,7 +1079,7 @@ of \type{argv[0]}. For example: {\tt \directlua{tex.sprint(os.selfdir)}}
The set of consecutive values starting at integer 1 in the table are
the arguments that are passed on to the command (the value at index 1
- becomes \type{argv[0]}). The command is searched for in the execution path,
+ becomes \type{arg[0]}). The command is searched for in the execution path,
so there is normally no need to pass on a fully qualified pathname.
If the argument is a string, then it is automatically converted into
@@ -1072,7 +1096,7 @@ of \type{argv[0]}. For example: {\tt \directlua{tex.sprint(os.selfdir)}}
command will replace the current process. However, it will return the two values
\type{nil} and \type {'error'} if there was a problem while attempting to execute the command.
- On windows, the current process is actually kept in memory until after the
+ On Windows, the current process is actually kept in memory until after the
execution of the command has finished. This prevents crashes in situations
where \TEXLUA\ scripts are run inside integrated \TEX\ environments.
@@ -1101,9 +1125,10 @@ not available on the \SUNOS\ platforms, so do not use this function
for portable documents.
\item \luatex{os.times()}
-Returns the current process times cf.\ the \UNIX\ C library \quote {times}
-call in seconds. This function is not available on the \MSWINDOWS\ and \SUNOS\
-platforms, so do not use this function for portable documents.
+Returns the current process times according to \ the \UNIX\ C library function
+\quote {times}. This function is not available on the \MSWINDOWS\
+and \SUNOS\ platforms, so do not use this function for portable
+documents.
\item \luatex{os.tmpdir()} This will create a directory in the \quote {current
directory} with the name \type{luatex.XXXXXX} where the \type {X}-es are
@@ -1160,13 +1185,13 @@ in with \LUATEX, because they offer useful functionality:
This library has been slightly extended so that the \type{unicode.utf8.*}
functions also accept the first 256 values of plane~18. This is the range \LUATEX\
-uses for raw binary output, as explained above,
+uses for raw binary output, as explained above.
\item \lua{luazip}, from the kepler project, \hyphenatedurl{http://www.keplerproject.org/luazip/}.
(version 1.2.1, but patched for compilation with \LUA\ 5.1)
\item \lua{luafilesystem}, also from the kepler project, \hyphenatedurl{http://www.keplerproject.org/luafilesystem/}.
- (version 1.4.1)
-\item \lua{lpeg}, by Roberto Ierusalimschy, \hyphenatedurl{http://www.inf.puc-rio.br/~roberto/lpeg.html}. (version 0.9.0)
+ (version 1.5.0)
+\item \lua{lpeg}, by Roberto Ierusalimschy, \hyphenatedurl{http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html}. (version 0.9.0)
Note: \lua{lpeg} is not \UNICODE|-|aware, but interprets strings on a
byte|-|per|-|byte basis. This mainly means that \luatex{lpeg.S} cannot be
@@ -1180,11 +1205,11 @@ an error message if used with characters above code point 127: I.\,e.\
'R' (range must have two characters)}, since to \lua{lpeg}, \type{ä}
is two 'characters' (bytes), so \type{aä} totals three.
-\item \lua{lzlib}, by Tiago Dionizio, \hyphenatedurl{http://mega.ist.utl.pt/~tngd/lua/}. (version 0.2)
+\item \lua{lzlib}, by Tiago Dionizio, \hyphenatedurl{http://luaforge.net/projects/lzlib/}. (version 0.2)
\item \lua{md5}, by Roberto Ierusalimschy \hyphenatedurl{http://www.inf.puc-rio.br/~roberto/md5/md5-5/md5.html}.
\item \lua{luasocket}, by Diego Nehab
-\hyphenatedurl{http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/}
+\hyphenatedurl{http://w3.impa.br/~diego/software/luasocket/}
(version 2.0.2).
Note: the \type{.lua} support modules from \type{luasocket} are also
@@ -1198,7 +1223,7 @@ The interfacing between \TEX\ and \LUA\ is facilitated by a set of
library modules. The \LUA\ libraries in this chapter are all defined and
initialized by the \LUATEX\ executable. Together, they allow \LUA\
scripts to query and change a number of \TEX's internal variables, run
-various internal functions \TEX, and set up \LUATEX's hooks to execute
+various internal \TEX\ functions, and set up \LUATEX's hooks to execute
\LUA\ code.
The following sections are in alphabetical order.
@@ -1207,10 +1232,26 @@ The following sections are in alphabetical order.
This library has functions that register, find and list callbacks.
+A quick note on what callbacks are (thanks, Paul!):
+
+Callbacks are entry points to \LUATEX's internal operations, which can be
+interspersed with additional \LUA\ code, and even replaced altogether.
+In the first case, \TEX\ is simply augmented with new operations
+(for instance, a manipulation of the nodes resulting from the paragraph
+builder); in the second case, its hard-coded behavior (for instance, the
+paragraph builder itself) is ignored and processing relies on user code only.
+
+More precisely, the code to be inserted at a given callback is a function
+(an anonymous function or the name of a function variable); % Is this line useful?
+it will receive the arguments associated with the callback, if any, and must
+frequently return some other arguments for \TEX\ to resume its operations.
+
+The first task is registering a callback:
+
\startfunctioncall
-id, error = callback.register(<string> callback_name,function callback_func)
-id, error = callback.register(<string> callback_name,nil)
-id, error = callback.register(<string> callback_name,false)
+id, error = callback.register (<string> callback_name, <function> func)
+id, error = callback.register (<string> callback_name, nil)
+id, error = callback.register (<string> callback_name, false)
\stopfunctioncall
where the \syntax{callback_name} is a predefined callback name, see
@@ -1235,7 +1276,7 @@ is present since version 0.38.
Currently, callbacks are not dumped into the format file.
\startfunctioncall
-table info = callback.list()
+<table> info = callback.list()
\stopfunctioncall
The keys in the table are the known callback names, the value is a
@@ -1243,7 +1284,7 @@ boolean where \type{true} means that the callback is currently set
(active).
\startfunctioncall
-function f = callback.find(callback_name)
+<function> f = callback.find (callback_name)
\stopfunctioncall
If the callback is not set, \luatex{callback.find} returns \type{nil}.
@@ -1258,7 +1299,7 @@ sense that there will not be backward-incompatible changes any more.
Your callback function should have the following conventions:
\startfunctioncall
-<string> actual_name = function (number id_number, <string> asked_name)
+<string> actual_name = function (<number> id_number, <string> asked_name)
\stopfunctioncall
Arguments:
@@ -1333,10 +1374,6 @@ for writing is always opened in the current directory).
Like \luatex{find_font_file}, but for virtual fonts. This applies to
both \ALEPH's \OVF\ files and traditional Knuthian \VF\ files.
-\subsubsection{\luatex{find_ocp_file}}
-
-Like \luatex{find_font_file}, but for ocp files.
-
\subsubsection{\luatex{find_map_file}}
Like \luatex{find_font_file}, but for map files.
@@ -1352,7 +1389,7 @@ Like \luatex{find_font_file}, but for subfont definition files.
\subsubsection{\luatex{find_pk_file}}
Like \luatex{find_font_file}, but for pk bitmap files. The argument
-\type{name} is a bit special in this case. Its form is
+\type{asked_name} is a bit special in this case. Its form is
\starttyping
<base res>dpi/<fontname>.<actual res>pk
@@ -1460,7 +1497,6 @@ the optional \luatex{close} function next.
\startfunctioncall
function(<table> env)
- return
end
\stopfunctioncall
@@ -1485,7 +1521,7 @@ either one of the file discovery callbacks or the internal version of
\sym{success}
-Return false when a fatal error occurred (e.\,g.\ when the file cannot be
+Return \type{false} when a fatal error occurred (e.\,g.\ when the file cannot be
found, after all).
\sym{data}
@@ -1506,7 +1542,6 @@ The list of functions is as follows:
\starttabulate[|l|p|]
\NC \luatex{read_font_file} \NC ofm or tfm files \NC\NR
\NC \luatex{read_vf_file} \NC virtual fonts \NC\NR
-\NC \luatex{read_ocp_file} \NC ocp files \NC\NR
\NC \luatex{read_map_file} \NC map files \NC\NR
\NC \luatex{read_enc_file} \NC encoding files \NC\NR
\NC \luatex{read_sfd_file} \NC subfont definition files \NC\NR
@@ -1571,7 +1606,7 @@ end
The calling convention for this callback is a bit more complicated than
for most other callbacks. The function should either return a \LUA\
table representing a valid to|-|be|-|processed token or tokenlist, or
-something else like nil or an empty table.
+something else like \type{nil} or an empty table.
If your \LUA\ function does not return a table representing a valid
token, it will be immediately called again, until it eventually does
@@ -1614,6 +1649,8 @@ values are:
\NC alignment \NC a (partial) alignment is being added \NC\NR
\NC after_output \NC an output routine has just finished \NC\NR
\NC box \NC a typeset box is being added \NC\NR
+%\NC pre_box \NC interline material is being added \NC\NR
+%\NC adjust \NC \tex{vadjust} material is being added \NC\NR
\NC new_graf \NC the beginning of a new paragraph \NC\NR
\NC vmode_par \NC \tex{par} was found in vertical mode \NC\NR
\NC hmode_par \NC \tex{par} was found in horizontal mode \NC\NR
@@ -1630,9 +1667,8 @@ This callback does not replace any internal code.
\subsubsection{\luatex{pre_linebreak_filter}}
This callback is called just before \LUATEX\ starts converting a list
-of nodes into a stack of \tex{hbox}es. The removal of a possible final skip
-and the subsequent insertion of \tex{parfillskip} has not happened
-yet at that moment.
+of nodes into a stack of \tex{hbox}es, after the addition of
+\type{\parfillskip}.
\startfunctioncall
function(<node> head, <string> groupcode)
@@ -1665,6 +1701,16 @@ will be explained in the next two paragraphs.
\NC fin_row \NC alignment row \NC\NR
\stoptabulate
+As for all the callbacks that deal with nodes, the return value can be one of three things:
+
+\startitemize
+\item boolean \type{true} signals succesful processing
+\item \type{<node>} signals that the \quote{head} node should be replaced by the returned node
+\item boolean \type{false} signals that the \quote{head} node list should be ignored and
+flushed from memory
+\stopitemize
+
+
This callback does not replace any internal code.
@@ -1680,13 +1726,13 @@ end
The returned node is the head of the list that will be added to the
main vertical list, the boolean argument is true if this paragraph is
-interrupted by a following math display.
+interrupted by a following math display.
If you return something that is not a \type{<node>}, \LUATEX\ will
apply the internal linebreak algorithm on the list that starts at
-\type{<head>}. Otherwise, the \type{<node>} you return is supposed
+\type{<head>}. Otherwise, the \type{<node>} you return is supposed
to be the head of a list of nodes that are all allowed in vertical
-mode, and the last of those has to represent a hbox. Failure to do
+mode, and at least one of those has to represent a hbox. Failure to do
so will result in a fatal error.
Setting this callback to \type{false} is possible, but dangerous,
@@ -1713,7 +1759,7 @@ horizontal mode material. Math items and line boxes are ignored
at the moment.
\startfunctioncall
-function(<node> head, <string> groupcode, <number> size,
+function(<node> head, <string> groupcode, <number> size,
<string> packtype [, <string> direction])
return true | false | <node> newhead
end
@@ -1725,7 +1771,7 @@ argument. If \type{exactly}, then the \type{size} is a \tex{hbox to ...}.
In both cases, the number is in scaled points.
The \type{direction} is either one of the three-letter direction specifier
-strings, or nil (added in 0.45).
+strings, or \type{nil} (added in 0.45).
This callback does not replace any internal code.
@@ -1754,7 +1800,7 @@ This callback is called when \TEX\ is ready to start boxing the
box 255 for \tex{output}.
\startfunctioncall
-function(<node> head, <string> groupcode, <number> size, <string> packtype,
+function(<node> head, <string> groupcode, <number> size, <string> packtype,
<number> maxdepth [, <string> direction])
return true | false | <node> newhead
end
@@ -1794,7 +1840,7 @@ will be recalculated.
The \type{next} of \type{head} is guaranteed to be non-nil.
-The \type{next} of \type{tail} is guaranteed be nil, and therefore the
+The \type{next} of \type{tail} is guaranteed to be nil, and therefore the
second callback argument can often be ignored. It is provided for
orthogonality, and because it can sometimes be handy when special
processing has to take place.
@@ -1805,7 +1851,8 @@ ligature creation pass.
\subsubsection{\luatex{kerning}}
\startfunctioncall
-function(<node> head, <node> tail) end
+function(<node> head, <node> tail)
+end
\stopfunctioncall
No return values. This callback has to apply kerning between the nodes
@@ -1820,7 +1867,7 @@ kern insertion pass.
This callback replaces \LUATEX's math list to node list conversion algorithm.
\startfunctioncall
-function(<node> head, <string> displaytype, <boolean> need_penalties)
+function(<node> head, <string> display_type, <boolean> need_penalties)
return <node> newhead
end
\stopfunctioncall
@@ -1835,20 +1882,32 @@ certainly result in an endless loop.
\subsection{Information reporting callbacks}
+\subsubsection{\luatex{pre_dump} (0.61)}
+
+\startfunctioncall
+function()
+end
+\stopfunctioncall
+
+This function is called just before dumping to a format file starts.
+It does not replace any code and there are neither arguments nor return values.
+
\subsubsection{\luatex{start_run}}
\startfunctioncall
function()
+end
\stopfunctioncall
This callback replaces the code that prints \LUATEX's banner. Note that for
-successful use, this callback has to be set in the lua initialization file,
+successful use, this callback has to be set in the lua initialization script,
otherwise it will be seen only after the run has already started.
\subsubsection{\luatex{stop_run}}
\startfunctioncall
function()
+end
\stopfunctioncall
This callback replaces the code that prints \LUATEX's statistics and \quote{output written
@@ -1858,6 +1917,7 @@ to} messages.
\startfunctioncall
function()
+end
\stopfunctioncall
Replaces the code that prints the \type{[} and the page number at the
@@ -1869,6 +1929,7 @@ printing of box information that normally takes place when
\startfunctioncall
function()
+end
\stopfunctioncall
Replaces the code that prints the \type{]} at the end of \tex{shipout}.
@@ -1877,7 +1938,6 @@ Replaces the code that prints the \type{]} at the end of \tex{shipout}.
\startfunctioncall
function()
- return
end
\stopfunctioncall
@@ -1888,6 +1948,7 @@ the values in the \luatex{status} table useful.
This callback does not replace any internal code.
+\iffalse % this has been retracted for the moment
\startitemize
\sym{message}
@@ -1911,13 +1972,31 @@ The final goal is the total replacement of \TEX's error handling
routines, but that needs lots of adjustments in the web source because
\TEX\ deals with errors in a somewhat haphazard fashion. This is why the
exact definition of \type{indicator} is not given here.
+\fi
+
+\subsection{PDF-related callbacks}
+
+\subsubsection{\luatex{finish_pdffile}}
+
+\startfunctioncall
+function()
+end
+\stopfunctioncall
+
+This callback is called when all document pages are already written to the \PDF\
+file and \LUATEX\ is about to finalize the output document structure. Its intended
+use is final update of \PDF\ dictionaries such as \type{/Catalog} or
+\type{/Info}. The callback does not replace any code. There are neither
+arguments nor return values.
\subsection{Font-related callbacks}
\subsubsection{\luatex{define_font}}
\startfunctioncall
-function(<string> name, <number> size, <number> id) return <table> font end
+function(<string> name, <number> size, <number> id)
+ return <table> font
+end
\stopfunctioncall
The string \type{name} is the filename part of the font
@@ -1931,6 +2010,8 @@ The number \type{size} is a bit special:
setting relative to the designsize of the font.
\stopitemize
+The \type{id} is the internal number assigned to the font.
+
The internal structure of the \type{font} table that is to be
returned is explained in \in{chapter}[fonts]. That table is saved
internally, so you can put extra fields in the table for your
@@ -1939,6 +2020,392 @@ later \LUA\ code to use.
Setting this callback to \type{false} is pointless as it will prevent
font loading completely but will nevertheless generate errors.
+\section{The \luatex{epdf} library}
+
+The \type{epdf} library provides Lua bindings to many \PDF\ access functions
+that are defined by the poppler pdf viewer library (written in C$+{}+$
+by Kristian H\o gsberg, based on xpdf by Derek Noonburg).
+Within \LUATEX\ (and \PDFTEX),
+xpdf functionality is being used since long time to embed \PDF\ files.
+The \type{epdf} library shall allow to scrutinize an external \PDF\ file.
+It gives access to its document structure,
+e.\,g., catalog, cross-reference table, individual pages, objects,
+annotations, info, and metadata.
+
+The \type{epdf} library is still in alpha state:
+\PDF\ access is currently read|-|only
+(it's not yet possible to alter a \PDF\ file or to assemble it from scratch),
+and many function bindings are still missing.
+
+For a start,
+a \PDF\ file is opened by \type{epdf.open()} with file name, e.\,g.:
+
+\starttyping
+doc = epdf.open("foo.pdf")
+\stoptyping
+
+This normally returns a \type{PDFDoc} userdata variable;
+but if the file could not be opened successfully,
+instead of a fatal error just the value \type{nil} is returned.
+
+All Lua functions in the \type{epdf} library are named after the
+poppler functions listed in the poppler header files for the various classes,
+e.\,g., files \type{PDFDoc.h}, \type{Dict.h}, and \type{Array.h}.
+These files can be found in the poppler subdirectory within the \LUATEX\ sources.
+Which functions are already implemented in the \type{epdf} library
+can be found in the \LUATEX\ source file \type{lepdflib.cc}.
+For using the \type{epdf} library,
+knowledge of the \PDF\ file architecture is indispensable.
+
+There are many different userdata types defined
+by the \type{epdf} library, currently these are
+\type{Annot},
+\type{AnnotBorder},
+\type{AnnotBorderStyle},
+\type{Annots},
+\type{Array},
+\type{Catalog},
+\type{EmbFile},
+\type{Dict},
+\type{GString},
+\type{LinkDest},
+\type{Object},
+\type{ObjectStream},
+\type{Page},
+\type{PDFDoc},
+\type{PDFRectangle},
+\type{Ref},
+\type{Stream},
+\type{XRef}, and
+\type{XRefEntry}.
+
+All these userdata names and the Lua access functions closely resemble
+the classes naming from the poppler header files,
+including the choice of mixed upper and lower case letters.
+The Lua function calls use object-oriented syntax, e.\,g.,
+the following calls return the \type{Page} object for page~1:
+
+\starttyping
+pageref = doc:getCatalog():getPageRef(1)
+pageobj = doc:getXRef():fetch(pageref.num, pageref.gen)
+\stoptyping
+
+But writing such chained calls is risky,
+as an intermediate function may return \type{nil} on error;
+therefore between function calls there should be Lua type checks
+(e.\,g., against \type{nil}) done.
+If a non-object item is requested
+(e.\,g., a \type{Dict} item by calling \type{page:getPieceInfo()},
+cf.~\type{Page.h}) but not available,
+the Lua functions return \type{nil} (without error).
+If a function should return an \type{Object}, but it's not existing,
+a \type{Null} object is returned instead
+(also without error; this is in|-|line with poppler behavior).
+
+All library objects have a \type{__gc} metamethod for garbage collection.
+The \type{__tostring} metamethod gives the type name for each object.
+
+All object constructors:
+
+\startfunctioncall
+<PDFDoc> = epdf.open(<string> PDF filename)
+<Annot> = epdf.Annot(<XRef>, <Dict>, <Catalog>, <Ref>)
+<Annots> = epdf.Annots(<XRef>, <Catalog>, <Object>)
+<Array> = epdf.Array(<XRef>)
+<Dict> = epdf.Dict(<XRef>)
+<Object> = epdf.Object()
+<PDFRectangle> = epdf.PDFRectangle()
+\stopfunctioncall
+
+\type{Annot} methods:
+
+\startfunctioncall
+<boolean> = <Annot>:isOK()
+<Object> = <Annot>:getAppearance()
+<AnnotBorder> = <Annot>:getBorder()
+<boolean> = <Annot>:match(<Ref>)
+\stopfunctioncall
+
+\type{AnnotBorderStyle} methods:
+
+\startfunctioncall
+<number> = <AnnotBorderStyle>:getWidth()
+\stopfunctioncall
+
+\type{Annots} methods:
+
+\startfunctioncall
+<integer> = <Annots>:getNumAnnots()
+<Annot> = <Annots>:getAnnot(<integer>)
+\stopfunctioncall
+
+\type{Array} methods:
+
+\startfunctioncall
+ <Array>:incRef()
+ <Array>:decRef()
+<integer> = <Array>:getLength()
+ <Array>:add(<Object>)
+<Object> = <Array>:get(<integer>)
+<Object> = <Array>:getNF(<integer>)
+<string> = <Array>:getString(<integer>)
+\stopfunctioncall
+
+\type{Catalog} methods:
+
+\startfunctioncall
+<boolean> = <Catalog>:isOK()
+<integer> = <Catalog>:getNumPages()
+<Page> = <Catalog>:getPage(<integer>)
+<Ref> = <Catalog>:getPageRef(<integer>)
+<string> = <Catalog>:getBaseURI()
+<string> = <Catalog>:readMetadata()
+<Object> = <Catalog>:getStructTreeRoot()
+<integer> = <Catalog>:findPage(<integer> object number, <integer> object generation)
+<LinkDest> = <Catalog>:findDest(<string> name)
+<Object> = <Catalog>:getDests()
+<integer> = <Catalog>:numEmbeddedFiles()
+<EmbFile> = <Catalog>:embeddedFile(<integer>)
+<integer> = <Catalog>:numJS()
+<string> = <Catalog>:getJS(<integer>)
+<Object> = <Catalog>:getOutline()
+<Object> = <Catalog>:getAcroForm()
+\stopfunctioncall
+
+\type{EmbFile} methods:
+
+\startfunctioncall
+<string> = <EmbFile>:name()
+<string> = <EmbFile>:description()
+<integer> = <EmbFile>:size()
+<string> = <EmbFile>:modDate()
+<string> = <EmbFile>:createDate()
+<string> = <EmbFile>:checksum()
+<string> = <EmbFile>:mimeType()
+<Object> = <EmbFile>:streamObject()
+<boolean> = <EmbFile>:isOk()
+\stopfunctioncall
+
+\type{Dict} methods:
+
+\startfunctioncall
+ <Dict>:incRef()
+ <Dict>:decRef()
+<integer> = <Dict>:getLength()
+ <Dict>:add(<string>, <Object>)
+ <Dict>:set(<string>, <Object>)
+ <Dict>:remove(<string>)
+<boolean> = <Dict>:is(<string>)
+<Object> = <Dict>:lookup(<string>)
+<Object> = <Dict>:lookupNF(<string>)
+<integer> = <Dict>:lookupInt(<string>, <string>)
+<string> = <Dict>:getKey(<integer>)
+<Object> = <Dict>:getVal(<integer>)
+<Object> = <Dict>:getValNF(<integer>)
+\stopfunctioncall
+
+\type{LinkDest} methods:
+
+\startfunctioncall
+<boolean> = <LinkDest>:isOK()
+<integer> = <LinkDest>:getKind()
+<string> = <LinkDest>:getKindName()
+<boolean> = <LinkDest>:isPageRef()
+<integer> = <LinkDest>:getPageNum()
+<Ref> = <LinkDest>:getPageRef()
+<number> = <LinkDest>:getLeft()
+<number> = <LinkDest>:getBottom()
+<number> = <LinkDest>:getRight()
+<number> = <LinkDest>:getTop()
+<number> = <LinkDest>:getZoom()
+<boolean> = <LinkDest>:getChangeLeft()
+<boolean> = <LinkDest>:getChangeTop()
+<boolean> = <LinkDest>:getChangeZoom()
+\stopfunctioncall
+
+\type{Object} methods:
+
+\startfunctioncall
+ <Object>:initBool(<boolean>)
+ <Object>:initInt(<integer>)
+ <Object>:initReal(<number>)
+ <Object>:initString(<string>)
+ <Object>:initName(<string>)
+ <Object>:initNull()
+ <Object>:initArray(<XRef>)
+ <Object>:initDict(<XRef>)
+ <Object>:initStream(<Stream>)
+ <Object>:initRef(<integer> object number, <integer> object generation)
+ <Object>:initCmd(<string>)
+ <Object>:initError()
+ <Object>:initEOF()
+<Object> = <Object>:fetch(<XRef>)
+<integer> = <Object>:getType()
+<string> = <Object>:getTypeName()
+<boolean> = <Object>:isBool()
+<boolean> = <Object>:isInt()
+<boolean> = <Object>:isReal()
+<boolean> = <Object>:isNum()
+<boolean> = <Object>:isString()
+<boolean> = <Object>:isName()
+<boolean> = <Object>:isNull()
+<boolean> = <Object>:isArray()
+<boolean> = <Object>:isDict()
+<boolean> = <Object>:isStream()
+<boolean> = <Object>:isRef()
+<boolean> = <Object>:isCmd()
+<boolean> = <Object>:isError()
+<boolean> = <Object>:isEOF()
+<boolean> = <Object>:isNone()
+<boolean> = <Object>:getBool()
+<integer> = <Object>:getInt()
+<number> = <Object>:getReal()
+<number> = <Object>:getNum()
+<string> = <Object>:getString()
+<string> = <Object>:getName()
+<Array> = <Object>:getArray()
+<Dict> = <Object>:getDict()
+<Stream> = <Object>:getStream()
+<Ref> = <Object>:getRef()
+<integer> = <Object>:getRefNum()
+<integer> = <Object>:getRefGen()
+<string> = <Object>:getCmd()
+<integer> = <Object>:arrayGetLength()
+ = <Object>:arrayAdd(<Object>)
+<Object> = <Object>:arrayGet(<integer>)
+<Object> = <Object>:arrayGetNF(<integer>)
+<integer> = <Object>:dictGetLength(<integer>)
+ = <Object>:dictAdd(<string>, <Object>)
+ = <Object>:dictSet(<string>, <Object>)
+<Object> = <Object>:dictLookup(<string>)
+<Object> = <Object>:dictLookupNF(<string>)
+<string> = <Object>:dictgetKey(<integer>)
+<Object> = <Object>:dictgetVal(<integer>)
+<Object> = <Object>:dictgetValNF(<integer>)
+<boolean> = <Object>:streamIs()
+ = <Object>:streamReset()
+<integer> = <Object>:streamGetChar()
+<integer> = <Object>:streamLookChar()
+<integer> = <Object>:streamGetPos()
+ = <Object>:streamSetPos(<integer>)
+<Dict> = <Object>:streamGetDict()
+\stopfunctioncall
+
+\type{Page} methods:
+
+\startfunctioncall
+<boolean> = <Page>:isOk()
+<integer> = <Page>:getNum()
+<PDFRectangle> = <Page>:getMediaBox()
+<PDFRectangle> = <Page>:getCropBox()
+<boolean> = <Page>:isCropped()
+<number> = <Page>:getMediaWidth()
+<number> = <Page>:getMediaHeight()
+<number> = <Page>:getCropWidth()
+<number> = <Page>:getCropHeight()
+<PDFRectangle> = <Page>:getBleedBox()
+<PDFRectangle> = <Page>:getTrimBox()
+<PDFRectangle> = <Page>:getArtBox()
+<integer> = <Page>:getRotate()
+<string> = <Page>:getLastModified()
+<Dict> = <Page>:getBoxColorInfo()
+<Dict> = <Page>:getGroup()
+<Stream> = <Page>:getMetadata()
+<Dict> = <Page>:getPieceInfo()
+<Dict> = <Page>:getSeparationInfo()
+<Dict> = <Page>:getResourceDict()
+<Object> = <Page>:getAnnots()
+<Links> = <Page>:getLinks(<Catalog>)
+<Object> = <Page>:getContents()
+\stopfunctioncall
+
+\type{PDFDoc} methods:
+
+\startfunctioncall
+<boolean> = <PDFDoc>:isOk()
+<integer> = <PDFDoc>:getErrorCode()
+<string> = <PDFDoc>:getErrorCodeName()
+<string> = <PDFDoc>:getFileName()
+<XRef> = <PDFDoc>:getXRef()
+<Catalog> = <PDFDoc>:getCatalog()
+<number> = <PDFDoc>:getPageMediaWidth()
+<number> = <PDFDoc>:getPageMediaHeight()
+<number> = <PDFDoc>:getPageCropWidth()
+<number> = <PDFDoc>:getPageCropHeight()
+<integer> = <PDFDoc>:getNumPages()
+<string> = <PDFDoc>:readMetadata()
+<Object> = <PDFDoc>:getStructTreeRoot()
+<integer> = <PDFDoc>:findPage(<integer> object number, <integer> object generation)
+<Links> = <PDFDoc>:getLinks(<integer>)
+<LinkDest> = <PDFDoc>:findDest(<string>)
+<boolean> = <PDFDoc>:isEncrypted()
+<boolean> = <PDFDoc>:okToPrint()
+<boolean> = <PDFDoc>:okToChange()
+<boolean> = <PDFDoc>:okToCopy()
+<boolean> = <PDFDoc>:okToAddNotes()
+<boolean> = <PDFDoc>:isLinearized()
+<Object> = <PDFDoc>:getDocInfo()
+<Object> = <PDFDoc>:getDocInfoNF()
+<integer> = <PDFDoc>:getPDFMajorVersion()
+<integer> = <PDFDoc>:getPDFMinorVersion()
+\stopfunctioncall
+
+\type{PDFRectangle} methods:
+
+\startfunctioncall
+<boolean> = <PDFRectangle>:isValid()
+\stopfunctioncall
+
+%\type{Ref} methods:
+%
+%\startfunctioncall
+%\stopfunctioncall
+
+\type{Stream} methods:
+
+\startfunctioncall
+<integer> = <Stream>:getKind()
+<string> = <Stream>:getKindName()
+ = <Stream>:reset()
+ = <Stream>:close()
+<integer> = <Stream>:getChar()
+<integer> = <Stream>:lookChar()
+<integer> = <Stream>:getRawChar()
+<integer> = <Stream>:getUnfilteredChar()
+ = <Stream>:unfilteredReset()
+<integer> = <Stream>:getPos()
+<boolean> = <Stream>:isBinary()
+<Stream> = <Stream>:getUndecodedStream()
+<Dict> = <Stream>:getDict()
+\stopfunctioncall
+
+\type{XRef} methods:
+
+\startfunctioncall
+<boolean> = <XRef>:isOk()
+<integer> = <XRef>:getErrorCode()
+<boolean> = <XRef>:isEncrypted()
+<boolean> = <XRef>:okToPrint()
+<boolean> = <XRef>:okToPrintHighRes()
+<boolean> = <XRef>:okToChange()
+<boolean> = <XRef>:okToCopy()
+<boolean> = <XRef>:okToAddNotes()
+<boolean> = <XRef>:okToFillForm()
+<boolean> = <XRef>:okToAccessibility()
+<boolean> = <XRef>:okToAssemble()
+<Object> = <XRef>:getCatalog()
+<Object> = <XRef>:fetch(<integer> object number, <integer> object generation)
+<Object> = <XRef>:getDocInfo()
+<Object> = <XRef>:getDocInfoNF()
+<integer> = <XRef>:getNumObjects()
+<integer> = <XRef>:getRootNum()
+<integer> = <XRef>:getRootGen()
+<integer> = <XRef>:getSize()
+<Object> = <XRef>:getTrailerDict()
+\stopfunctioncall
+
+%***********************************************************************
+
\section{The \luatex{font} library}
The font library provides the interface into the internals of the font
@@ -1976,8 +2443,8 @@ sense that there will not be backward-incompatible changes any more.
<table> vf_fnt = font.read_vf(<string> name, <number> s)
\stopfunctioncall
-The meaning of the number \type{s}, and the format of the returned
-table is similar to the one returned by the \luatex{read_tfm()} function.
+The meaning of the number \type{s} and the format of the returned
+table are similar to the ones in the \luatex{read_tfm()} function.
\subsection{The fonts array}
@@ -1999,6 +2466,12 @@ The two metatable functions implementing the virtual array are:
font.setfont(<number> n, <table> f)
\stopfunctioncall
+Note that at the moment, each access to the \type{font.fonts} or call
+to \type{font.getfont} creates a lua table for the whole font. This
+process can be quite slow. In a later version of \LUATEX, this
+interface will change (it will start using userdata objects instead of
+actual tables).
+
Also note the following: assignments can only be made to fonts that
have already been defined in \TEX, but have not been accessed {\it at
all\/} since that definition. This limits the usability of the write
@@ -2013,8 +2486,8 @@ You can test for the status of a font by calling this function:
<boolean> f = font.frozen(<number> n)
\stopfunctioncall
-The return value is one of true (unassignable), false (can be changed)
-or nil (not a valid font at all).
+The return value is one of \type{true} (unassignable), \type{false} (can be changed)
+or \type{nil} (not a valid font at all).
\subsection{Defining a font directly}
@@ -2032,7 +2505,7 @@ raised. The table is a font structure, as explained in
\subsection{Projected next font id}
\startfunctioncall
-<number> i = font.nextid();
+<number> i = font.nextid()
\stopfunctioncall
This returns the font id number that would be returned by a
@@ -2043,17 +2516,17 @@ themselves.
\subsection{Font id (0.47)}
\startfunctioncall
-<number> i = font.id(<string> csname);
+<number> i = font.id(<string> csname)
\stopfunctioncall
This returns the font id associated with \type{csname} string, or $-1$
-if \type{csname} is not defined, new in 0.47.
+if \type{csname} is not defined; new in 0.47.
\subsection{Currently active font}
\startfunctioncall
-<number> i = font.current();
-font.current(<number> i);
+<number> i = font.current()
+font.current(<number> i)
\stopfunctioncall
This gets or sets the currently used font number.
@@ -2061,7 +2534,7 @@ This gets or sets the currently used font number.
\subsection{Maximum font id}
\startfunctioncall
-<number> i = font.max();
+<number> i = font.max()
\stopfunctioncall
This is the largest used index in \type{font.fonts}.
@@ -2082,14 +2555,10 @@ there can be holes in the sequence.
\section{The \luatex{fontloader} library (0.36)}
-{\bf This library used to be called \quote{fontforge}. The library
-is still available under that name for now, but that alias will be
-removed starting with beta \type{0.41.0}}
-
\subsection{Getting quick information on a font}
\startfunctioncall
-local info = fontloader.info('filename')
+<table> info = fontloader.info(<string> filename)
\stopfunctioncall
This function returns either \type{nil}, or a \type{table}, or an
@@ -2116,8 +2585,7 @@ directory contents.
If you want to use an \OPENTYPE\ font, you have to get the metric
information from somewhere. Using the \type{fontloader} library, the
-basic way to get that information is thus:
-
+simplest way to get that information is thus:
\starttyping
function load_font (filename)
@@ -2136,10 +2604,11 @@ myfont = load_font('/opt/tex/texmf/fonts/data/arial.ttf')
The main function call is
\startfunctioncall
-f, w = fontloader.open('filename')
+<userdata> f, <table> w = fontloader.open(<string> filename)
+<userdata> f, <table> w = fontloader.open(<string> filename, <string> fontname)
\stopfunctioncall
-The first return value is a table representation of the font. The
+The first return value is a userdata representation of the font. The
second return value is a table containing any warnings and errors
reported by fontloader while opening the font. In normal typesetting,
you would probably ignore the second argument, but it can be useful
@@ -2150,15 +2619,23 @@ collections, you have to use a second string argument to specify which
font you want from the collection. Use the \type{fontname}
strings that are returned by \type{fontloader.info} for that.
+To turn the font into a table, \type{fontloader.to_table} is used on
+the font returned by \type{fontloader.open}.
+
\startfunctioncall
-f, w = fontloader.open('filename','fontname')
+<table> f = fontloader.to_table(<userdata> font)
\stopfunctioncall
+This table cannot be used directly by \LUATEX\ and should be turned
+into another one as described in~\in{chapter}[fonts].
Do not forget to store the \type{fontname} value in the \type{psname}
field of the metrics table to be returned to \LUATEX, otherwise the
font inclusion backend will not be able to find the correct font in
the collection.
+See \in{section}[fontloadertables] for details on the userdata object
+returned by \type{fontloader.open()} and the layout of the
+\type{metrics} table returned by \type{fontloader.to_table()}.
The font file is parsed and partially interpreted by the font
loading routines from \FONTFORGE. The file format can be \OPENTYPE,
@@ -2185,32 +2662,43 @@ actual font file ourselves:
\stopitemize
+A loaded font is discarded with:
+
+\startfunctioncall
+fontloader.close(<userdata> font)
+\stopfunctioncall
+
\subsection{Applying a \quote{feature file}}
You can apply a \quote{feature file} to a loaded font:
\startfunctioncall
-fontloader.apply_featurefile(f,'filename')
+<table> errors = fontloader.apply_featurefile(<userdata> font, <string> filename)
\stopfunctioncall
A \quote{feature file} is a textual representation of the features in an
-\OPENTYPE\ font. See
-\hyphenatedurl {http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html}
-and
-\hyphenatedurl {http://fontforge.sourceforge.net/featurefile.html}
+\OPENTYPE\ font. See\crlf
+\hyphenatedurl {http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html}\crlf
+and\crlf
+\hyphenatedurl {http://fontforge.sourceforge.net/featurefile.html}\crlf
for a more detailed description of feature files.
+If the function fails, the return value is a table containing any
+errors reported by fontloader while applying the feature file. On
+success, \type{nil} is returned. (the return value is new in 0.65)
+
+
\subsection{Applying an \quote{\AFM\ file}}
You can apply an \quote{\AFM\ file} to a loaded font:
\startfunctioncall
-fontloader.apply_afmfile(f,'filename')
+<table> errors = fontloader.apply_afmfile(<userdata> font, <string> filename)
\stopfunctioncall
An \AFM\ file is a textual representation of (some of) the meta information
-in a \TYPEONE\ font. See \hyphenatedurl{http://www.adobe.com/devnet/font/pdfs/5004.AFM_Spec.pdf}
+in a \TYPEONE\ font. See \hyphenatedurl{ftp://ftp.math.utah.edu/u/ma/hohn/linux/postscript/5004.AFM_Spec.pdf}
for more information about afm files.
Note: If you \type{fontloader.open()} a \TYPEONE\ file named \type{font.pfb},
@@ -2218,8 +2706,83 @@ the library will automatically search for and apply \type{font.afm}
if it exists in the same directory as the file \type{font.pfb}. In that case,
there is no need for an explicit call to \type{apply_afmfile()}.
+If the function fails, the return value is a table containing any
+errors reported by fontloader while applying the AFM file. On
+success, \type{nil} is returned. (the return value is new in 0.65)
+
+\subsection[fontloadertables]{Fontloader font tables}
+
+As mentioned earlier, the return value of \type{fontloader.open()} is
+a userdata object. In \LUATEX\ versions before 0.63, the only way to
+have access to the actual metrics was to call
+\type{fontloader.to_table()} on this object, returning the table
+structure that is explained in the following subsections.
+
+However, it turns out that the result from
+\type{fontloader.to_table()} sometimes needs very large amounts of memory
+(depending on the font's complexity and size) so starting with \LUATEX\ 0.63,
+it is possible to access the userdata object directly.
+
+In the \LUATEX\ 0.63.0, the following is implemented:
+
+\startitemize
+\item all top-level keys that would be returned by \type{to_table()}
+ can also be accessed directly.
+\item the top-level key \quote{glyphs} returns a {\it virtual\/} array that
+ allows indices from \type{0} to ($\type{f.glyphmax}-1$).
+\item the items in that virtual array (the actual glyphs) are themselves also
+ userdata objects, and each has accessors for all of the keys
+ explained in the section \quote{Glyph items} below.
+\item the top-level key \quote{subfonts} returns an {\it actual} array of
+ userdata objects, one for each of the subfonts (or nil, if there are no subfonts).
+\stopitemize
+
+
+A short example may be helpful. This code generates a printout of all
+the glyph names in the font \type{PunkNova.kern.otf}:
+
+\starttyping
+local f = fontloader.open('PunkNova.kern.otf')
+print (f.fontname)
+local i = 0
+while (i < f.glyphmax) do
+ local g = f.glyphs[i]
+ if g then
+ print(g.name)
+ end
+ i = i + 1
+end
+fontloader.close(f)
+\stoptyping
+
+In this case, the \LUATEX\ memory requirement stays below 100MB on the
+test computer, while the internal stucture generated by
+\type{to_table()} needs more than 2GB of memory (the font itself is
+6.9MB in disk size).
+
+In \LUATEX\ 0.63 only the top-level font, the subfont table entries,
+and the glyphs are virtual objects, everything else still produces
+normal lua values and tables. In future versions, more return values
+may be replaced by userdata objects (as much as needed to keep the
+memory requirements in check).
+
+If you want to know the valid fields in a font or glyph
+structure, call the \type{fields} function on an object of a
+particular type (either glyph or font for now, more will be
+implemented later):
+
+\startfunctioncall
+<table> fields = fontloader.fields(<userdata> font)
+<table> fields = fontloader.fields(<userdata> font_glyph)
+\stopfunctioncall
+
+For instance:
+
+\startfunctioncall
+local fields = fontloader.fields(f)
+local fields = fontloader.fields(f.glyphs[0])
+\stopfunctioncall
-\subsection{Fontloader font tables}
\subsubsection{Table types}
@@ -2318,7 +2881,8 @@ information (quite a few of these are only present if nonzero).
\NC width \NC number \NC only for horizontal fonts\NC\NR
\NC vwidth \NC number \NC only for vertical fonts\NC\NR
\NC lsidebearing \NC number \NC only if nonzero and not equal to boundingbox[1]\NC\NR
-\NC class \NC string \NC one of "automatic", "none", "base", "ligature", "mark", "component" \NC\NR
+\NC class \NC string \NC one of "none", "base", "ligature", "mark", "component"
+ (if not present, the glyph class is \quote{automatic})\NC\NR
\NC kerns \NC array \NC only for horizontal fonts, if set\NC\NR
\NC vkerns \NC array \NC only for vertical fonts, if set\NC\NR
\NC dependents \NC array \NC linear array of glyph name strings, only if nonempty\NC\NR
@@ -2393,7 +2957,7 @@ The \type{ligatures} is a linear array of small hashes:
\starttabulate[|lT|l|p|]
\NC \ssbf key \NC \bf type \NC \bf explanation \NC\NR
-\NC lig \NC table \NC uses the same substructure as a single \type{possub} item\NC\NR
+\NC lig \NC table \NC uses the same substructure as a single item in the \type{lookups} table explained above\NC\NR
\NC char \NC string \NC \NC\NR
\NC components \NC array \NC linear array of named components\NC\NR
\NC ccnt \NC number \NC \NC\NR
@@ -2412,7 +2976,7 @@ anchor type, which is one of
\NC cexit \NC table \NC cursive exit point\NC\NR
\stoptabulate
-The content of these is an short array of defined anchors, with the
+The content of these is a short array of defined anchors, with the
entry keys being the anchor names. For all except \type{baselig}, the
value is a single table with this definition:
@@ -2669,7 +3233,7 @@ actually set:
\stoptabulate
-The features subtable of gpos has:
+The features subtable items of gpos have:
\starttabulate[|lT|l|p|]
\NC \ssbf key \NC \bf type \NC \bf explanation \NC\NR
@@ -2703,13 +3267,10 @@ The kernclass with subtables table has:
\starttabulate[|lT|l|p|]
\NC \ssbf key \NC \bf type \NC \bf explanation \NC\NR
-%\NC first_cnt \NC number \NC \NC\NR
-%\NC second_cnt \NC number \NC \NC\NR
\NC firsts \NC array of strings \NC \NC\NR
\NC seconds \NC array of strings \NC \NC\NR
-\NC lookup \NC string \NC associated lookup \NC \NR
+\NC lookup \NC string or array \NC associated lookup(s) \NC \NR
\NC offsets \NC array of numbers \NC \NC\NR
-%\NC kcid \NC number \NC ? \NC\NR
\stoptabulate
\subsubsubsection{gsub table}
@@ -3092,11 +3653,11 @@ commands like \tex{pdfximagebbox}.
Image objects can also be used within virtual fonts
via the \type{image} command listed in~\in{section}[virtualfonts].
-\subsubsubject{\luatex{img.new}}
+\subsection{\luatex{img.new}}
\startfunctioncall
<image> var = img.new()
-<image> var = img.new(image_spec)
+<image> var = img.new(<table> image_spec)
\stopfunctioncall
This function creates a userdata object of type \quote {image}. The
@@ -3107,20 +3668,20 @@ other keys can also be useful, these are explained below.
You can either say
\starttyping
-a=img.new()
+a = img.new()
\stoptyping
followed by
\starttyping
-a.filename="foo.png"
+a.filename = "foo.png"
\stoptyping
or you can put the file name (and some or all of the other keys)
into a table directly, like so:
\starttyping
-a=img.new{filename='foo.pdf',page=1}
+a = img.new({filename='foo.pdf', page=1})
\stoptyping
The generated \type{<image>} userdata object allows access to a set of
@@ -3141,10 +3702,11 @@ just creates the \type{<image>} userdata object and initializes some
memory structures. The \type{<image>} object and its internal
structures are automatically garbage collected.
-Once the image is scanned, all the values in the
-\type{<image>} become frozen, and you cannot change them any more.
+Once the image is scanned, all the values in the \type{<image>}
+except \type{width}, \type{height} and \type{depth}, become frozen,
+and you cannot change them any more.
-\subsubsubject{\luatex{img.keys}}
+\subsection{\luatex{img.keys}}
\startfunctioncall
<table> keys = img.keys()
@@ -3156,31 +3718,43 @@ keys, both user-supplied and automatic ones.
% hahe: i need to add r/w ro column...
\starttabulate[|l|l|p|]
\NC \bf field name\NC \bf type \NC description \NC \NR
-\NC depth \NC number \NC the image depth for \LUATEX\ (in scaled points)\NC \NR
-\NC height \NC number \NC the image height for \LUATEX\ (in scaled points)\NC \NR
-\NC width \NC number \NC the image width for \LUATEX\ (in scaled points)\NC \NR
-\NC transform \NC number \NC the image transform, integer number 0..7\NC \NR
\NC attr \NC string \NC the image attributes for \LUATEX \NC \NR
-\NC filename \NC string \NC the image file name \NC \NR
-\NC stream \NC string \NC the raw stream data for an \type{/Xobject} \type{/Form} object\NC \NR
-\NC page \NC ?? \NC the identifier for the requested image
- page (type is number or string,
- default is the number 1)\NC \NR
-\NC pagebox \NC string \NC the requested bounding box,
- one of \type {none}, \type {media}, \type {crop}, \type {bleed}, \type {trim}, \type {art} \NC \NR
-\NC bbox \NC table \NC table with 4 boundingbox dimensions \type{llx}, \type{lly},
- \type{urx}, and \type{ury} overruling the \type{pagebox} entry\NC \NR
-\NC filepath \NC string \NC the full (expanded) file name of the image \NC \NR
-\NC colordepth \NC number \NC the number of bits used by the color space \NC \NR
+\NC bbox \NC table \NC table with 4 boundingbox dimensions
+ \type{llx}, \type{lly}, \type{urx},
+ and \type{ury} overruling the \type{pagebox}
+ entry\NC \NR
+\NC colordepth \NC number \NC the number of bits used by the color space\NC \NR
\NC colorspace \NC number \NC the color space object number \NC \NR
-\NC imagetype \NC string \NC one of \type {pdf}, \type {png}, \type {jpg}, \type {jbig2}, or \type{nil} \NC \NR
-\NC objnum \NC number \NC the \PDF\ image object number \NC \NR
+\NC depth \NC number \NC the image depth for \LUATEX\
+ (in scaled points)\NC \NR
+\NC filename \NC string \NC the image file name \NC \NR
+\NC filepath \NC string \NC the full (expanded) file name of the image\NC \NR
+\NC height \NC number \NC the image height for \LUATEX\
+ (in scaled points)\NC \NR
+\NC imagetype \NC string \NC one of \type{pdf}, \type{png}, \type{jpg}, \type{jp2},
+ \type{jbig2}, or \type{nil} \NC \NR
\NC index \NC number \NC the \PDF\ image name suffix \NC \NR
+\NC objnum \NC number \NC the \PDF\ image object number \NC \NR
+\NC page \NC ?? \NC the identifier for the requested image page
+ (type is number or string,
+ default is the number 1)\NC \NR
+\NC pagebox \NC string \NC the requested bounding box, one of
+ \type {none}, \type {media}, \type {crop},
+ \type {bleed}, \type {trim}, \type {art} \NC \NR
\NC pages \NC number \NC the total number of available pages \NC \NR
+\NC rotation \NC number \NC the image rotation from included \PDF\ file,
+ in multiples of 90~deg. \NC \NR
+\NC stream \NC string \NC the raw stream data for an \type{/Xobject}
+ \type{/Form} object\NC \NR
+\NC transform \NC number \NC the image transform, integer number 0..7\NC \NR
+\NC width \NC number \NC the image width for \LUATEX\
+ (in scaled points)\NC \NR
+\NC xres \NC number \NC the horizontal natural image resolution
+ (in \DPI) \NC \NR
\NC xsize \NC number \NC the natural image width \NC \NR
+\NC yres \NC number \NC the vertical natural image resolution
+ (in \DPI) \NC \NR
\NC ysize \NC number \NC the natural image height \NC \NR
-\NC xres \NC number \NC the horizontal natural image resolution (in \DPI) \NC \NR
-\NC yres \NC number \NC the vertical natural image resolution (in \DPI) \NC \NR
\stoptabulate
A running (undefined) dimension in \type{width}, \type{height}, or \type{depth} is
@@ -3226,11 +3800,11 @@ If a \PDF\ file to be embedded already contains a \type{/Rotate} specification,
the rotation result is the combination of the \type{/Rotate} rotation
followed by the \type{transform} operation.
-\subsubsubject{\luatex{img.scan}}
+\subsection{\luatex{img.scan}}
\startfunctioncall
<image> var = img.scan(<image> var)
-<image> var = img.scan(image_spec)
+<image> var = img.scan(<table> image_spec)
\stopfunctioncall
When you say \type{img.scan(a)} for a new image, the file is scanned,
@@ -3245,7 +3819,7 @@ set up (if they have been changed by the user in the meantime).
For ease of use, you can do right-away a
\starttyping
-<image> a = img.scan { filename = "foo.png" }
+<image> a = img.scan ({ filename = "foo.png" })
\stoptyping
without a prior \type{img.new}.
@@ -3256,11 +3830,11 @@ throw away \type{a} again by saying \type{a=nil}. In that case no
image object will be reserved in the PDF, and the used memory will be
cleaned up automatically.
-\subsubsubject{\luatex{img.copy}}
+\subsection{\luatex{img.copy}}
\startfunctioncall
<image> var = img.copy(<image> var)
-<image> var = img.copy(image_spec)
+<image> var = img.copy(<table> image_spec)
\stopfunctioncall
If you say \type{a = b}, then both variables point to the same
@@ -3275,11 +3849,11 @@ from their initial values that were just copies from \type{a}.
% can, and what cannot be changed would be helpful.
% -- will think about it...
-\subsubsubject{\luatex{img.write}}
+\subsection{\luatex{img.write}}
\startfunctioncall
<image> var = img.write(<image> var)
-<image> var = img.write(image_spec)
+<image> var = img.write(<table> image_spec)
\stopfunctioncall
By \type{img.write(a)} a \PDF\ object number is allocated,
@@ -3292,17 +3866,17 @@ after the shipping of the current page is finished.
Again you can do a terse call like
\starttyping
-img.write { filename = "foo.png" }
+img.write ({ filename = "foo.png" })
\stoptyping
The \type{<image>} variable is returned in case you want it for later
processing.
-\subsubsubject{\luatex{img.immediatewrite}}
+\subsection{\luatex{img.immediatewrite}}
\startfunctioncall
<image> var = img.immediatewrite(<image> var)
-<image> var = img.immediatewrite(image_spec)
+<image> var = img.immediatewrite(<table> image_spec)
\stopfunctioncall
By \type{img.immediatewrite(a)} a \PDF\ object number is
@@ -3318,16 +3892,16 @@ you will have a dangling image object in the \PDF\ file.
Also here you can do a terse call like
\starttyping
-a = img.immediatewrite { filename = "foo.png" }
+a = img.immediatewrite ({ filename = "foo.png" })
\stoptyping
The \type{<image>} variable is returned and you will most likely need it.
-\subsubsubject{\luatex{img.node}}
+\subsection{\luatex{img.node}}
\startfunctioncall
<node> n = img.node(<image> var)
-<node> n = img.node(image_spec)
+<node> n = img.node(<table> image_spec)
\stopfunctioncall
This function allocates a \PDF\ object number and returns a
@@ -3336,7 +3910,7 @@ image parameters \type{width}, \type{height}, \type{depth}, and
\type{objnum}. Also here you can do a terse call like:
\starttyping
-n = img.node { filename = "foo.png" }
+n = img.node ({ filename = "foo.png" })
\stoptyping
This example outputs an image:
@@ -3345,16 +3919,17 @@ This example outputs an image:
node.write(img.node{filename="foo.png"})
\stoptyping
-\subsubsubject{\luatex{img.types}}
+\subsection{\luatex{img.types}}
\startfunctioncall
<table> types = img.types()
\stopfunctioncall
This function returns a list with the supported image file type names,
-currently these are \type {pdf}, \type {png}, \type {jpg}, and \type {jbig2}.
+currently these are \type{pdf}, \type{png}, \type{jpg}, \type{jp2} (JPEG~2000),
+and \type{jbig2}.
-\subsubsubject{\luatex{img.boxes}}
+\subsection{\luatex{img.boxes}}
\startfunctioncall
<table> boxes = img.boxes()
@@ -3364,6 +3939,7 @@ This function returns a list with the supported \PDF\ page box names,
currently these are \type {media}, \type {crop}, \type {bleed}, \type {trim}, and \type {art}
(all in lowercase letters).
+%***********************************************************************
\section{The \luatex{kpse} library}
@@ -3518,8 +4094,8 @@ This is used for the size argument of the formats \type{pk}, \type{gf}, and \typ
\subsection{\luatex{lookup}}
-A more powerful (but slower) generic method for finding files is also
-available (since 0.51).
+A more powerful (but slower) generic method for finding files is also
+available (since 0.51). It returns a string for each found file.
\startfunctioncall
<string> f, ... = kpse.lookup(<string> filename, <table> options)
@@ -3534,12 +4110,13 @@ The options match commandline arguments from \type{kpsewhich}:
\NC dpi \NC number \NC use this resolution for this lookup; default 600\NC \NR
\NC path \NC string \NC search in the given path\NC \NR
\NC all \NC boolean \NC output all matches, not just the first\NC \NR
-\NC must-exist\NC boolean \NC search the disk as well as ls-R if necessary\NC \NR
+\NC mustexist \NC boolean \NC (0.65 and higher) search the disk as well as ls-R if necessary\NC \NR
+\NC must-exist\NC boolean \NC (0.64 and lower) search the disk as well as ls-R if necessary\NC \NR
\NC mktexpk \NC boolean \NC disable/enable mktexpk generation for this lookup\NC \NR
\NC mktextex \NC boolean \NC disable/enable mktextex generation for this lookup\NC \NR
\NC mktexmf \NC boolean \NC disable/enable mktexmf generation for this lookup\NC \NR
\NC mktextfm \NC boolean \NC disable/enable mktextfm generation for this lookup\NC \NR
-\NC subdir \NC string
+\NC subdir \NC string
or table \NC only output matches whose directory part
ends with the given string(s) \NC \NR
\stoptabulate
@@ -3556,7 +4133,7 @@ kpse.init_prog(<string> prefix, <number> base_dpi, <string> mfmode, <string> fal
\subsection{\luatex{readable_file}}
-Test if an (absolute) file name is a readable file
+Test if an (absolute) file name is a readable file.
\startfunctioncall
<string> f = kpse.readable_file(<string> name)
@@ -3649,8 +4226,7 @@ lang.hyphenation(<language> l, <string> n)
\stopfunctioncall
Either returns the current hyphenation exceptions for this language,
-or adds new ones. The syntax of the string is explained in the next
-chapter,~\in{section}[patternsexceptions].
+or adds new ones. The syntax of the string is explained in~\in{section}[patternsexceptions].
\startfunctioncall
lang.clear_hyphenation(<language> l)
@@ -3663,7 +4239,7 @@ Clears the exception dictionary for this language.
\stopfunctioncall
Creates a hyphenation key from the supplied hyphenation value. The
-syntax of the argument string is explained~\in{section}[patternsexceptions].
+syntax of the argument string is explained in~\in{section}[patternsexceptions].
This function is useful if
you want to do something else based on the words in a dictionary file,
like spell-checking.
@@ -3743,17 +4319,17 @@ This library contains one read|-|only item:
\stoptyping
This returns the \LUA\ version identifier string. The value is
-currently \directlua {tex.print('lua.version')}.
+currently \directlua {tex.print(lua.version)}.
\subsection{\LUA\ bytecode registers}
\LUA\ registers can be used to communicate \LUA\ functions across \LUA\
chunks. The accepted values for assignments are functions and
-nil. Likewise, the retrieved value is either a function or \type{nil}.
+\type{nil}. Likewise, the retrieved value is either a function or \type{nil}.
\starttyping
-lua.bytecode[n] = function () .. end
-lua.bytecode[n]()
+lua.bytecode[<number> n] = <function> f
+lua.bytecode[<number> n]()
\stoptyping
The contents of the \luatex{lua.bytecode} array is stored inside the format
@@ -3767,7 +4343,7 @@ implementation and thus subject to change.
The associated function calls are
\startfunctioncall
-function f = lua.getbytecode(<number> n)
+<function> f = lua.getbytecode(<number> n)
lua.setbytecode(<number> n, <function> f)
\stopfunctioncall
@@ -3788,7 +4364,7 @@ lua.bytecode[n]()
Note that the path of the file is stored in the \LUA\ bytecode to be
used in stack backtraces and therefore dumped into the format file if
-above code is used in \INITEX. If it contains private information, i.e.
+the above code is used in \INITEX. If it contains private information, i.e.
the user name, this information is then contained in the format file as
well. This should be kept in mind when preloading files into a bytecode
register in \INITEX.
@@ -3800,7 +4376,7 @@ the \type{\directlua} and \type{\latelua} primitives.
\startfunctioncall
lua.name[<number> n] = <string> s
-<string> s = lua.name[<number n>]
+<string> s = lua.name[<number> n]
\stopfunctioncall
If you want to unset a lua name, you can assign \type{nil} to it.
@@ -3826,15 +4402,9 @@ different fields, as follows:
\NC \ssbf name \NC \bf type \NC \bf description \NC \bf default \NC\NR
\NC error_line \NC number \NC error line width \NC 79 \NC\NR
\NC print_line \NC number \NC line length in ps output \NC 100\NC\NR
-\NC main_memory \NC number \NC total memory size \NC 5000\NC\NR
-\NC hash_size \NC number \NC hash size \NC 16384 \NC\NR
-\NC param_size \NC number \NC max. active macro parameters\NC 150\NC\NR
-\NC max_in_open \NC number \NC max. input file nestings \NC 10\NC\NR
\NC random_seed \NC number \NC the initial random seed \NC variable\NC\NR
\NC interaction \NC string \NC the interaction mode, one of
\type {batch}, \type {nonstop}, \type {scroll}, \type {errorstop} \NC \type {errorstop}\NC\NR
-\NC ini_version \NC boolean \NC the --ini switch \NC true \NC\NR
-\NC mem_name \NC string \NC \type {--mem} \NC \type {plain} \NC\NR
\NC job_name \NC string \NC \type {--jobname} \NC \type {mpout} \NC\NR
\NC find_file \NC function \NC a function to find files \NC only local files\NC\NR
\stoptabulate
@@ -3850,12 +4420,17 @@ with:
\starttabulate[|lT|l|p|]
\NC \bf name \NC \bf the requested file \NC \NR
\NC mode \NC the file mode: \type {r} or \type {w} \NC \NR
-\NC type \NC the kind of file, one of: \type {mp}, \type {mem}, \type {tfm}, \type {map}, \type {pfb}, \type {enc} \NC \NR
+\NC type \NC the kind of file, one of: \type {mp}, \type {tfm}, \type {map}, \type {pfb}, \type {enc} \NC \NR
\stoptabulate
Return either the full pathname of the found file, or \type{nil} if
the file cannot be found.
+Note that the new version of \MPLIB\ no longer uses binary mem files,
+so the way to preload a set of macros is simply to start off with
+an \type{input} command in the first \type{mp:execute()} call.
+
+
\subsection{\luatex{mp:statistics}}
You can request statistics with:
@@ -3865,8 +4440,8 @@ You can request statistics with:
\stopfunctioncall
This function returns the vital statistics for an \MPLIB\ instance. There are four
-fields, giving the maximum number of used items in each of the four
-statically allocated object classes:
+fields, giving the maximum number of used items in each of four
+allocated object classes:
\starttabulate[|lT|l|p|]
\NC main_memory \NC number \NC memory size \NC\NR
@@ -3875,12 +4450,16 @@ statically allocated object classes:
\NC max_in_open \NC number \NC input file nesting levels\NC\NR
\stoptabulate
+Note that in the new version of \MPLIB, this is informational only. The
+objects are all allocated dynamically, so there is no chance of running
+out of space unless the available system memory is exhausted.
+
\subsection{\luatex{mp:execute}}
You can ask the \METAPOST\ interpreter to run a chunk of code by calling
\startfunctioncall
-local rettable = mp:execute('metapost language chunk')
+<table> rettable = mp:execute('metapost language chunk')
\stopfunctioncall
for various bits of \METAPOST\ language input. Be sure to check the
@@ -3898,7 +4477,7 @@ In contrast with the normal standalone \type{mpost} command, there is
\subsection{\luatex{mp:finish}}
\startfunctioncall
-local rettable = mp:finish()
+<table> rettable = mp:finish()
\stopfunctioncall
If for some reason you want to stop using an \MPLIB\ instance while
@@ -3929,12 +4508,12 @@ object methods you can call:
\starttabulate[|l|l|p|]
\NC boundingbox \NC function \NC returns the bounding box, as an array of 4 values\NC \NR
-\NC postscript \NC function \NC return a string that is the ps output of the \type{fig}.
- this function accepts two optional integer arguments for
+\NC postscript \NC function \NC returns a string that is the ps output of the \type{fig}.
+ this function accepts two optional integer arguments for
specifying the values of \type{prologues} (first argument)
and \type{procset} (second argument)\NC \NR
-\NC svg \NC function \NC return a string that is the svg output of the \type{fig}.
- this function accepts an optional integer arguments for
+\NC svg \NC function \NC returns a string that is the svg output of the \type{fig}.
+ This function accepts an optional integer argument for
specifying the value of \type{prologues}\NC \NR
\NC objects \NC function \NC returns the actual array of graphic objects in this \type{fig} \NC \NR
\NC copy_objects \NC function \NC returns a deep copy of the array of graphic objects in this \type{fig} \NC \NR
@@ -3952,19 +4531,19 @@ object methods you can call:
When the boundingbox represents a \quote {negated rectangle}, i.e.\ when the first set
of coordinates is larger than the second set, the picture is empty.
-Graphical objects come in various types that each have a different list of
+Graphical objects come in various types that each has a different list of
accessible values. The types are: \type{fill}, \type{outline}, \type{text},
\type{start_clip}, \type{stop_clip}, \type{start_bounds}, \type{stop_bounds}, \type{special}.
There is helper function (\type{mplib.fields(obj)}) to get the list of
accessible values for a particular object, but you can just as easily
-use the tables given below).
+use the tables given below.
All graphical objects have a field \type{type} that gives the object
-type as a string value, that not explicit mentioned in the tables. In
-the following, \type{number}s are \POSTSCRIPT\ points represented as
+type as a string value; it is not explicit mentioned in the following tables.
+In the following, \type{number}s are \POSTSCRIPT\ points represented as
a floating point number, unless stated otherwise. Field values that
-are of \type{table} are explained in the next section.
+are of type \type{table} are explained in the next section.
\subsubsection{fill}
@@ -3987,10 +4566,10 @@ a table containing a bunch of vital characteristics of the used pen
\starttabulate[|l|l|p|]
\NC width \NC number \NC width of the pen\NC \NR
-\NC rx \NC number \NC $x$ scale \NC \NR
-\NC sx \NC number \NC $xy$ multiplier \NC \NR
-\NC sy \NC number \NC $yx$ multiplier \NC \NR
-\NC ry \NC number \NC $y$ scale \NC \NR
+\NC sx \NC number \NC $x$ scale \NC \NR
+\NC rx \NC number \NC $xy$ multiplier \NC \NR
+\NC ry \NC number \NC $yx$ multiplier \NC \NR
+\NC sy \NC number \NC $y$ scale \NC \NR
\NC tx \NC number \NC $x$ offset \NC \NR
\NC ty \NC number \NC $y$ offset \NC \NR
\stoptabulate
@@ -4114,22 +4693,22 @@ These functions find the size of a glyph in a defined font. The
the \type{char} is a glyph id in the range 0 to 255; the returned
\type{w} is in AFM units.
-\subsubsection{\luatex{mp.char_width}}
+\subsubsection{\luatex{mp:char_width}}
\startfunctioncall
-<number> w = mp.char_width(<string> fontname, <number> char)
+<number> w = mp:char_width(<string> fontname, <number> char)
\stopfunctioncall
-\subsubsection{\luatex{mp.char_height}}
+\subsubsection{\luatex{mp:char_height}}
\startfunctioncall
-<number> w = mp.char_height(<string> fontname, <number> char)
+<number> w = mp:char_height(<string> fontname, <number> char)
\stopfunctioncall
-\subsubsection{\luatex{mp.char_depth}}
+\subsubsection{\luatex{mp:char_depth}}
\startfunctioncall
-<number> w = mp.char_depth(<string> fontname, <number> char)
+<number> w = mp:char_depth(<string> fontname, <number> char)
\stopfunctioncall
\section{The \luatex{node} library}
@@ -4150,7 +4729,7 @@ Each node has at least the three fields \type{next}, \type{id}, and
\item The \type{next} field returns the userdata
object for the next node in a linked list of nodes, or
-nil, if there is no next node.
+\type{nil}, if there is no next node.
\item The \type{id} indicates \TEX's \quote{node type}. The field \type{id}
has a numeric value for efficiency reasons, but some of the library
@@ -4190,10 +4769,19 @@ which can be handy for tracing.
\subsection{Node handling functions}
+\subsubsection{\luatex{node.is_node}}
+
+\startfunctioncall
+<boolean> t = node.is_node(<any> item)
+\stopfunctioncall
+
+This function returns true if the argument is a userdata object of
+type \type{<node>}.
+
\subsubsection{\luatex{node.types}}
\startfunctioncall
-table t = node.types()
+<table> t = node.types()
\stopfunctioncall
This function returns an array that maps node id numbers to node type
@@ -4203,11 +4791,11 @@ types.
\subsubsection{\luatex{node.whatsits}}
\startfunctioncall
-table t = node.whatsits()
+<table> t = node.whatsits()
\stopfunctioncall
\TEX's \quote{whatsits} all have the same \type{id}. The various subtypes
-are defined by their \type{subtype}. The function is much like
+are defined by their \type{subtype} fields. The function is much like
\luatex{node.types}, except that it provides an array of \type{subtype}
mappings.
@@ -4232,17 +4820,19 @@ representation (\type{subtype}).
\subsubsection{\luatex{node.type}}
\startfunctioncall
-<string> type = node.type(<number> id)
+<string> type = node.type(<any> n)
\stopfunctioncall
-This converts a internal numeric representation to an external string
-representation.
+In the argument is a number, then this function converts an internal
+numeric representation to an external string representation.
+Otherwise, it will return the string \type{node} if the object
+represents a node (this is new in 0.65), and \type{nil} otherwise.
\subsubsection{\luatex{node.fields}}
\startfunctioncall
-table t = node.fields(<number> id)
-table t = node.fields(<number> id, <number> subtype)
+<table> t = node.fields(<number> id)
+<table> t = node.fields(<number> id, <number> subtype)
\stopfunctioncall
This function returns an array of valid field names for a particular
@@ -4270,7 +4860,7 @@ actually a node, and it has the field.
\stopfunctioncall
Creates a new node. All of the new node's fields are initialized to
-either zero or nil except for \type{id} and \type{subtype} (if
+either zero or \type{nil} except for \type{id} and \type{subtype} (if
supplied). If you want to create a new whatsit, then the second
argument is required, otherwise it need not be present. As with all
node functions, this function creates a node on the \TEX\ level.
@@ -4321,6 +4911,46 @@ copied.
Creates a deep copy of the node list that starts at \type{n}. If
\type{m} is also given, the copy stops just before node \type{m}.
+Note that you cannot copy attribute lists this way, specialized functions for
+dealing with attribute lists will be provided later but are not there yet.
+However, there is normally no need to copy attribute lists as when you do
+assignments to the \type{attr} field or make changes to specific attributes, the
+needed copying and freeing takes place automatically.
+
+\subsubsection{\luatex{node.next} (0.65)}
+
+\startfunctioncall
+<node> m = node.next(<node> n)
+\stopfunctioncall
+
+Returns the node following this node, or \type{nil} if there is no
+such node.
+
+\subsubsection{\luatex{node.prev} (0.65)}
+
+\startfunctioncall
+<node> m = node.prev(<node> n)
+\stopfunctioncall
+
+Returns the node preceding this node, or \type{nil} if there is no
+such node.
+
+
+\subsubsection{\luatex{node.current_attr} (0.66)}
+
+\startfunctioncall
+<node> m = node.current_attr()
+\stopfunctioncall
+
+Returns the currently active list of attributes, if there is one.
+
+Note: this function is somewhat experimental, and it returns the {\it
+ actual} attribute list, not a copy thereof.
+Therefore, changing any of the attributes in the list will change
+these values for all nodes that have the current attribute list
+assigned to them.
+
+
\subsubsection{\luatex{node.hpack}}
\startfunctioncall
@@ -4359,7 +4989,7 @@ to \type{nil} beforehand. And in a similar way, calling
This function creates a new vlist by packaging the list that begins at node
\type{n} into a vertical box. With only a single argument, this box
-is created using the natural width of its components. In the three
+is created using the natural height of its components. In the three
argument form, \type{info} must be either \type{additional} or
\type{exactly}, and \type{w} is the additional (\tex{vbox spread}) or exact (\tex{vbox to}) height to be used.
@@ -4368,41 +4998,43 @@ Direction support added in \LUATEX\ 0.45.
The second return value is the badness of the generated box,
this extension was added in 0.51.
-See the description of \type{node.hpack()} for a few memory allocation
+See the description of \type{node.hpack()} for a few memory allocation
caveats.
\subsubsection{\luatex{node.dimensions} (0.43)}
\startfunctioncall
<number> w, <number> h, <number> d = node.dimensions(<node> n)
+<number> w, <number> h, <number> d = node.dimensions(<node> n, <string> dir)
<number> w, <number> h, <number> d = node.dimensions(<node> n, <node> t)
+<number> w, <number> h, <number> d = node.dimensions(<node> n, <node> t, <string> dir)
\stopfunctioncall
This function calculates the natural in-line dimensions of the node
list starting at node \type{n} and terminating just before node \type{t}
-(or nil, if there is no second argument). The return values are scaled
-points. An alternative format that starts with glue parameters as the
+(or the end of the list, if there is no second argument). The return values are scaled
+points. An alternative format that starts with glue parameters as the
first three arguments is also possible:
\startfunctioncall
-<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
+<number> w, <number> h, <number> d =
+ node.dimensions(<number> glue_set, <number> glue_sign,
<number> glue_order, <node> n)
-<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
+<number> w, <number> h, <number> d =
+ node.dimensions(<number> glue_set, <number> glue_sign,
<number> glue_order, <node> n, <string> dir)
-<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
+<number> w, <number> h, <number> d =
+ node.dimensions(<number> glue_set, <number> glue_sign,
<number> glue_order, <node> n, <node> t)
-<number> w, <number> h, <number> d =
- node.dimensions(<number> glue_set, <number> glue_sign,
+<number> w, <number> h, <number> d =
+ node.dimensions(<number> glue_set, <number> glue_sign,
<number> glue_order, <node> n, <node> t, <string> dir)
\stopfunctioncall
This calling method takes glue settings into account and is especially
useful for finding the actual width of a sublist of nodes that are
-already boxed, for example in code like this, which prints the
-width of the space inbetween the \type{a} and \type{b} as it would
+already boxed, for example in code like this, which prints the
+width of the space inbetween the \type{a} and \type{b} as it would
be if \type{\box0} was used as-is:
\starttyping
@@ -4411,8 +5043,8 @@ be if \type{\box0} was used as-is:
\directlua{print (node.dimensions(tex.box[0].glue_set,
tex.box[0].glue_sign,
tex.box[0].glue_order,
- tex.box[0].list.next,
- node.tail(tex.box[0].list))) }
+ tex.box[0].head.next,
+ node.tail(tex.box[0].head))) }
\stoptyping
Direction support added in \LUATEX\ 0.45.
@@ -4421,12 +5053,12 @@ Direction support added in \LUATEX\ 0.45.
\startfunctioncall
<node> h = node.mlist_to_hlist(<node> n,
- <string> displaytype, <boolean> penalties)
+ <string> display_type, <boolean> penalties)
\stopfunctioncall
This runs the internal mlist to hlist conversion, converting the math list in
\type{n} into the horizontal list \type{h}. The interface is exactly the same as
-for the callback \type{mlist_to_hlist}.)
+for the callback \type{mlist_to_hlist}.
\subsubsection{\luatex{node.slide}}
@@ -4444,7 +5076,7 @@ between nodes.
<node> m = node.tail(<node> n)
\stopfunctioncall
-Returns the last node of the node list that starts at \type{n}.
+Returns the last node of the node list that starts at \type{n}.
\subsubsection{\luatex{node.length}}
@@ -4466,7 +5098,7 @@ at the end of the list. The node \type{m} is not counted.
\stopfunctioncall
Returns the number of nodes contained in the node list that starts at
-\type{n} that have an matching \type{id} field.
+\type{n} that have a matching \type{id} field.
If \type{m} is also supplied, counting stops at \type{m} instead of at
the end of the list. The node \type{m} is not counted.
@@ -4498,11 +5130,11 @@ starts at \type{n} that have a matching \type{id} field.
This function removes the node \type{current} from the list following
\type{head}. It is your responsibility to make sure it is really part
of that list. The return values are the new \type{head} and
-\type{current} nodes. The returned \type{current} is the
-node in the calling argument, and is only passed back as a convenience
-(its \type{next} field will be cleared). The returned \type{head} is
-more important, because if the function is called with \type{current}
-equal to \type{head}, it will be changed.
+\type{current} nodes. The returned \type{current} is the node
+following the \type{current} in the calling argument, and is only
+passed back as a convenience (or \type{nil}, if there is no such node). The
+returned \type{head} is more important, because if the function is
+called with \type{current} equal to \type{head}, it will be changed.
\subsubsection{\luatex{node.insert_before}}
@@ -4513,7 +5145,7 @@ equal to \type{head}, it will be changed.
This function inserts the node \type{new} before \type{current} into
the list following \type{head}. It is your responsibility to make sure
that \type{current} is really part of that list. The return values are
-the (potentially mutated) \type{head} and the \type{new}, set up to
+the (potentially mutated) \type{head} and the node \type{new}, set up to
be part of the list (with correct \type{next} field). If \type{head}
is initially \type{nil}, it will become \type{new}.
@@ -4526,19 +5158,24 @@ is initially \type{nil}, it will become \type{new}.
This function inserts the node \type{new} after \type{current} into
the list following \type{head}. It is your responsibility to make sure
that \type{current} is really part of that list. The return values are
-the \type{head} and the \type{new}, set up to be part of the list
+the \type{head} and the node \type{new}, set up to be part of the list
(with correct \type{next} field). If \type{head} is initially
\type{nil}, it will become \type{new}.
-\subsubsection{\luatex{node.first_character}}
+\subsubsection{\luatex{node.first_glyph} (0.65)}
\startfunctioncall
-<node> n = node.first_character(<node> n)
-<node> n = node.first_character(<node> n, <node> m)
+<node> n = node.first_glyph(<node> n)
+<node> n = node.first_glyph(<node> n, <node> m)
\stopfunctioncall
-Returns the first node that is a glyph node with a subtype indicating
-it is a character, or \type{nil}.
+Returns the first node in the list starting at \type{n} that is a
+glyph node with a subtype indicating it is a glyph, or \type{nil}.
+If \type{m} is given, processing stops at (but including) that node,
+otherwise processing stops at the end of the list.
+
+Note: this function used to be called \type{first_character}. It has
+been renamed in \LUATEX\ 0.65, and the old name is deprecated now.
\subsubsection{\luatex{node.ligaturing}}
@@ -4606,16 +5243,11 @@ any more since version 0.38). There is no error checking yet!
\subsubsection{\luatex{node.protrusion_skippable} (0.60.1)}
\startfunctioncall
-boolean <yes> = node.protrusion_skippable(<node> n)
+<boolean> skippable = node.protrusion_skippable(<node> n)
\stopfunctioncall
-Returns \type{true} if this node can be skipped for glyph protrusion
-line boundary discovery.
-
-\subsubsection{\luatex{node.protrusion_skipable} (0.53)}
-
-Older version of \type{node.protrusion_skippable}, with typing error.
-This alias will go away soon, please use the version with two p's.
+Returns \type{true} if, for the purpose of line boundary discovery
+when character protrusion is active, this node can be skipped.
\subsection{Attribute handling}
@@ -4633,7 +5265,7 @@ dedicated functions associated with them.
Tests if a node has the attribute with number \type{id} set. If
\type{val} is also supplied, also tests if the value matches \type{val}.
-It returns the value, or, if no match is found, nil.
+It returns the value, or, if no match is found, \type{nil}.
\subsubsection{\luatex{node.set_attribute}}
@@ -4647,8 +5279,8 @@ Sets the attribute with number \type{id} to the value
\subsubsection{\luatex{node.unset_attribute}}
\startfunctioncall
-<number> v = node.unset_attribute(<node> n, <number> id, <number> val)
<number> v = node.unset_attribute(<node> n, <number> id)
+<number> v = node.unset_attribute(<node> n, <number> id, <number> val)
\stopfunctioncall
Unsets the attribute with number \type{id}. If \type{val} is also supplied,
@@ -4656,7 +5288,7 @@ it will only perform this operation if the value matches \type{val}.
Missing attributes or attribute|-|value pairs are ignored.
If the attribute was actually deleted, returns its old
-value. Otherwise, returns nil.
+value. Otherwise, returns \type{nil}.
\section{The \luatex{pdf} library}
@@ -4664,18 +5296,23 @@ This contains variables and functions that are related to the \PDF\ backend.
%***********************************************************************
-\subsubsubject{\luatex{pdf.mapfile()}, \luatex{pdf.mapline()} (new in 0.53.0)}
+\subsection{\luatex{pdf.mapfile}, \luatex{pdf.mapline} (new in 0.53.0)}
+
+\startfunctioncall
+pdf.mapfile(<string> map file)
+pdf.mapfile(<string> map line)
+\stopfunctioncall
These two functions can be used to replace primitives \type{\pdfmapfile}
and \type{\pdfmapline} from \PDFTEX. They expect a string as only parameter
and have no return value.
-The functions replace also the former variables
+The also functions replace the former variables
\luatex{pdf.pdfmapfile} and \luatex{pdf.pdfmapline}.
%***********************************************************************
-\subsubsubject{\luatex{pdf.catalog}, \luatex{pdf.info},
+\subsection{\luatex{pdf.catalog}, \luatex{pdf.info},
\luatex{pdf.names}, \luatex{pdf.trailer} (new in 0.53.0)}
These variables offer a read-write interface to the corresponding
@@ -4690,7 +5327,7 @@ Note: this interface will almost certainly change in the future.
%***********************************************************************
-\subsubsubject{\luatex{pdf.pageattributes}, \luatex{pdf.pageresources},
+\subsection{\luatex{pdf.pageattributes}, \luatex{pdf.pageresources},
\luatex{pdf.pagesattributes} (new in 0.53.0)}
These variables offer a read-write interface to related
@@ -4702,7 +5339,7 @@ the \PDFTEX\ token registers.
%***********************************************************************
-\subsubsubject{\luatex{pdf.h}, \luatex{pdf.v}}
+\subsection{\luatex{pdf.h}, \luatex{pdf.v}}
These are the \type{h} and \type{v} values
that define the current location on the output page,
@@ -4710,15 +5347,15 @@ measured from its lower left corner.
The values can be queried % and set
using scaled points as units.
-\starttyping
-pdf.h
-pdf.v
-\stoptyping
+%\starttyping
+%pdf.h
+%pdf.v
+%\stoptyping
Note: this interface will almost certainly change in the future.
% not implemented yet:
-% \subsubsubject{\luatex{pdf.seth()}, \luatex{pdf.setv()}}
+% \subsection{\luatex{pdf.seth()}, \luatex{pdf.setv()}}
%
% The function calls for position setting,
% associated with \type{pdf.h} and \type{pdf.v} are
@@ -4730,7 +5367,7 @@ Note: this interface will almost certainly change in the future.
% <number> n = pdf.v
% \stopfunctioncall
-\subsubsubject{\luatex{pdf.print()}}
+\subsection{\luatex{pdf.print}}
A print function to write stuff to the \PDF\ document
that can be used from within a \tex{latelua} argument.
@@ -4745,48 +5382,51 @@ pdf.print(<string> type, <string> s)
The optional parameter can be used to mimic the behavior of
\tex{pdfliteral}: the \type{type} is \type{direct} or \type{page}.
-\subsubsubject{\luatex{pdf.immediateobj()}}
+\subsection{\luatex{pdf.immediateobj}}
This function creates a \PDF\ object
-and immediately write it to the \PDF\ file.
+and immediately writes it to the \PDF\ file.
It is modelled after \PDFTEX's \tex{immediate}\tex{pdfobj} primitives.
All function variants return the object number
of the newly generated object.
\startfunctioncall
-n = pdf.immediateobj(<string> objtext)
-n = pdf.immediateobj("file", <string> filename)
-n = pdf.immediateobj("stream", <string> streamtext {, <string> attrtext})
-n = pdf.immediateobj("streamfile", <string> filename, {, <string> attrtext})
+<number> n = pdf.immediateobj(<string> objtext)
+<number> n = pdf.immediateobj("file", <string> filename)
+<number> n = pdf.immediateobj("stream", <string> streamtext, <string> attrtext)
+<number> n = pdf.immediateobj("streamfile", <string> filename, <string> attrtext)
\stopfunctioncall
-The 1st version puts the \type{objtext} raw into an object.
+The first version puts the \type{objtext} raw into an object.
Only the object wrapper is automatically generated,
but any internal structure (like \type{<< >>} dictionary markers)
needs to provided by the user.
-The 2nd version with keyword \type{"file"} as 1st argument
+The second version with keyword \type{"file"} as 1st argument
puts the contents of the file with name \type{filename} raw into the object.
-The 3rd version with keyword \type{"stream"} creates a stream object
+The third version with keyword \type{"stream"} creates a stream object
and puts the \type{streamtext} raw into the stream.
The stream length is automatically calculated.
The optional \type{attrtext} goes into the dictionary of that object.
-The 4th version with keyword \type{"streamfile"} does the same as the 3rd one,
+The fourth version with keyword \type{"streamfile"} does the same as the 3rd one,
it just reads the stream data raw from a file.
-An optional first argument can be given to make the function use a
+An optional first argument can be given to make the function use a
previously reserved \PDF\ object.
\startfunctioncall
-n = pdf.immediateobj(<integer n>, <string> objtext)
-n = pdf.immediateobj(<integer n>, "file", <string> filename)
-n = pdf.immediateobj(<integer n>, "stream", <string> streamtext {, <string> attrtext})
-n = pdf.immediateobj(<integer n>, "streamfile", <string> filename, {, <string> attrtext})
+<number> n = pdf.immediateobj(<integer> n, <string> objtext)
+<number> n = pdf.immediateobj(<integer> n, "file", <string> filename)
+<number> n = pdf.immediateobj(<integer> n, "stream", <string> streamtext, <string> attrtext)
+<number> n = pdf.immediateobj(<integer> n, "streamfile", <string> filename, <string> attrtext)
\stopfunctioncall
-\subsubsubject{\luatex{pdf.obj()}}
+%***********************************************************************
+
+\subsection{\luatex{pdf.obj}}
This function creates a \PDF\ object,
-which is written to the \PDF\ file only when referenced.
+which is written to the \PDF\ file only when referenced,
+e.\,g., by \luatex{pdf.refobj()}.
All function variants return the object number of the newly generated
object, and there are two separate calling modes.
@@ -4794,36 +5434,36 @@ object, and there are two separate calling modes.
The first mode is modelled after \PDFTEX's \tex{pdfobj} primitive.
\startfunctioncall
-n = pdf.obj(<string> objtext)
-n = pdf.obj("file", <string> filename)
-n = pdf.obj("stream", <string> streamtext {, <string> attrtext})
-n = pdf.obj("streamfile", <string> filename, {, <string> attrtext})
+<number> n = pdf.obj(<string> objtext)
+<number> n = pdf.obj("file", <string> filename)
+<number> n = pdf.obj("stream", <string> streamtext, <string> attrtext)
+<number> n = pdf.obj("streamfile", <string> filename, <string> attrtext)
\stopfunctioncall
-An optional first argument can be given to make the function use a
+An optional first argument can be given to make the function use a
previously reserved \PDF\ object.
\startfunctioncall
-n = pdf.obj(<integer> n, <string> objtext)
-n = pdf.obj(<integer> n, "file", <string> filename)
-n = pdf.obj(<integer> n, "stream", <string> streamtext {, <string> attrtext})
-n = pdf.obj(<integer> n, "streamfile", <string> filename, {, <string> attrtext})
+<number> n = pdf.obj(<integer> n, <string> objtext)
+<number> n = pdf.obj(<integer> n, "file", <string> filename)
+<number> n = pdf.obj(<integer> n, "stream", <string> streamtext, <string> attrtext)
+<number> n = pdf.obj(<integer> n, "streamfile", <string> filename, <string> attrtext)
\stopfunctioncall
The second mode accepts a single argument table with key--value pairs.
\startfunctioncall
-n = pdf.obj{ type = <string>,
- immmediate = <boolean>,
- objnum = <number>,
- attr = <string>,
- compresslevel = <number>,
- objcompression = <boolean>,
- file = <string>,
- string = <string>}
+<number> n = pdf.obj{ type = <string>,
+ immmediate = <boolean>,
+ objnum = <number>,
+ attr = <string>,
+ compresslevel = <number>,
+ objcompression = <boolean>,
+ file = <string>,
+ string = <string>}
\stopfunctioncall
-The \type{string} field can have the values \type{raw} and
+The \type{type} field can have the values \type{raw} and
\type{stream}, this field is required, the others are optional
(within constraints).
@@ -4832,16 +5472,40 @@ actually is: the constraints from the separate parameter version
still apply, so for example you can't have both \type{string} and
\type{file} at the same time.
-\subsubsubject{\luatex{pdf.reserveobj()}}
+%***********************************************************************
+
+\subsection{\luatex{pdf.refobj}}
+
+This function,
+the \LUA\ version of the \tex{pdfrefobj} primitive,
+references an object by its object number,
+so that the object will be written out.
+
+\startfunctioncall
+pdf.refobj(<integer> n)
+\stopfunctioncall
+
+This function works in both the \tex{directlua} and \tex{latelua} environment.
+Inside \tex{directlua} a new whatsit node
+\quote{pdf_refobj} is created, which will be marked for flushing during
+page output and the object is then written directly after the page,
+when also the resources objects are written out.
+Inside \tex{latelua} the object will be marked for flushing.
+
+This function has no return values.
+
+%***********************************************************************
+
+\subsection{\luatex{pdf.reserveobj}}
This function creates an empty \PDF\ object and returns its number.
\startfunctioncall
-n = pdf.reserveobj()
-n = pdf.reserveobj("annot")
+<number> n = pdf.reserveobj()
+<number> n = pdf.reserveobj("annot")
\stopfunctioncall
-\subsubsubject{\luatex{pdf.registerannot()} (new in 0.47.0)}
+\subsection{\luatex{pdf.registerannot} (new in 0.47.0)}
This function adds an object number to the \type{/Annots} array for the
current page without doing anything else. This function can only be
@@ -5172,7 +5836,7 @@ tex.textdir
\subsubsection{Glue parameters}
-All glue parameters are to be used read|-|only and return a userdata object that
+The glue parameters accept and return a userdata object that
represents a \type{glue_spec} node.
\startcolumns[n=3]
@@ -5378,24 +6042,87 @@ tex.setskip ('global',<string> s, <node> s)
In the function-based interface, it is possible to define values
globally by using the string \type{'global'} as the first function argument.
-\subsection{Box registers}
+\subsection{Character code registers (0.63)}
-The current dimensions of \tex{box} registers can be read and
-altered using three other virtual sub|-|tables :
+\TEX's character code tables (\tex{lccode}, \tex{uccode},
+\tex{sfcode}, \tex{catcode}, \tex{mathcode}, \tex{delcode}) can be
+accessed and written to using six virtual subtables of the \type{tex}
+table
+\startcolumns[n=3]
\starttyping
-tex.wd
-tex.ht
-tex.dp
+tex.lccode
+tex.uccode
+tex.sfcode
+tex.catcode
+tex.mathcode
+tex.delcode
\stoptyping
+\stopcolumns
-{\bf note: these three virtual tables are deprecated and will
-be removed in luatex 0.70. You should switch to using \type{tex.box[].width}
-etc. instead, see below.}
+The function call interfaces are roughly as above, but there are a few twists.
+\type{sfcode}s are the simple ones:
-\blank
+\startfunctioncall
+tex.setsfcode (<number> n, <number> s)
+tex.setsfcode ('global', <number> n, <number> s)
+<number> s = tex.getsfcode (<number> n)
+\stopfunctioncall
+
+The function call interface for \type{lccode} and \type{uccode} additionally allows you to set the associated sibling at the same time:
+
+\startfunctioncall
+tex.setlccode (['global'], <number> n, <number> lc)
+tex.setlccode (['global'], <number> n, <number> lc, <number> uc)
+<number> lc = tex.getlccode (<number> n)
+tex.setuccode (['global'], <number> n, <number> uc)
+tex.setuccode (['global'], <number> n, <number> uc, <number> lc)
+<number> uc = tex.getuccode (<number> n)
+\stopfunctioncall
+
+The function call interface for \type{catcode} also allows you to
+specify a category table to use on assignment or on query (default in
+both cases is the current one):
+
+\startfunctioncall
+tex.setcatcode (['global'], <number> n, <number> c)
+tex.setcatcode (['global'], <number> cattable, <number> n, <number> c)
+<number> lc = tex.getcatcode (<number> n)
+<number> lc = tex.getcatcode (<number> cattable, <number> n)
+\stopfunctioncall
-It is also possible to set and query actual boxes, using the node
+
+The interfaces for \type{delcode} and \type{mathcode} use small array tables to
+set and retrieve values:
+
+\startfunctioncall
+tex.setmathcode (['global'], <number> n, <table> mval )
+<table> mval = tex.getmathcode (<number> n)
+tex.setdelcode (['global'], <number> n, <table> dval )
+<table> dval = tex.getdelcode (<number> n)
+\stopfunctioncall
+
+Where the table for \type{mathcode} is an array of 3 numbers, like this:
+
+\starttyping
+{<number> mathclass, <number> family, <number> character}
+\stoptyping
+
+And the table for \type{delcode} is an array with 4 numbers, like this:
+
+\starttyping
+{<number> small_fam, <number> small_char, <number> large_fam, <number> large_char}
+\stoptyping
+
+Normally, the third and fourth values in a delimiter code assignment
+will be zero according to \tex{Udelcode} usage, but the returned table can have
+values there (if the delimiter code was set using \type{\delcode}, for
+example). Unset \type{delcode}'s can be recognized because
+\type{dval[1]} is $-1$.
+
+\subsection{Box registers}
+
+It is possible to set and query actual boxes, using the node
interface as defined in the \luatex{node} library:
\starttyping
@@ -5430,6 +6157,37 @@ assigning to a temporary variable:
tex.box[0] = node.copy_list(tex.box[2])
\stoptyping
+%{\bf note: In previous versions of \LUATEX\ there were also three
+%virtual tables called \type{tex.wd}, \type{tex.ht}, and \type{tex.dp}
+%along with an associated function call interface. These were
+%removed in version 0.63. You should switch to using \type{tex.box[].width}
+%etc. instead.}
+%
+%If for some reason you want the functionality of these tables back,
+%you can add \LUA\ code to do that for you, like this:
+%
+%\starttyping
+%local box = tex.box
+%
+%local wd = {
+% __index = function(t,k) local bk = box[k] return bk and bk.width or 0 end,
+% __newindex = function(t,k,v) local bk = box[k] if bk then bk.width = v end end,
+%}
+%local ht = {
+% __index = function(t,k) local bk = box[k] return bk and bk.height or 0 end,
+% __newindex = function(t,k,v) local bk = box[k] if bk then bk.height = v end end,
+%}
+%local dp = {
+% __index = function(t,k) local bk = box[k] return bk and bk.depth or 0 end,
+% __newindex = function(t,k,v) local bk = box[k] if bk then bk.depth = v end end,
+%}
+%
+%tex.wd = { } setmetatable(tex.wd,wd)
+%tex.ht = { } setmetatable(tex.ht,ht)
+%tex.dp = { } setmetatable(tex.dp,dp)
+%\stoptyping
+
+
\subsection{Math parameters}
It is possible to set and query the internal math parameters
@@ -5441,7 +6199,7 @@ tex.setmath('global', <string> n, <string> t, <number> n)
<number> n = tex.getmath(<string> n, <string> t)
\stopfunctioncall
-As before an optional first parameter of \type{'global'} indicates a
+As before an optional first parameter \type{'global'} indicates a
global assignment.
The first string is the parameter name minus the leading \quote{Umath},
@@ -5504,24 +6262,24 @@ registers that keep track of building page lists.
\NC \bf field \NC \bf description \NC \NR
\NC page_ins_head \NC circular list of pending insertions \NC \NR
\NC contrib_head \NC the recent contributions \NC \NR
-\NC page_head \NC the page-so-far \NC \NR
+\NC page_head \NC the current page content\NC \NR
%\NC temp_head \NC \NC \NR
\NC hold_head \NC used for held-over items for next page\NC \NR
-\NC adjust_head \NC head of the current \tex{adjust} list \NC \NR
-\NC pre_adjust_head \NC head of the current \tex{adjust pre} list\NC \NR
+\NC adjust_head \NC head of the current \tex{vadjust} list \NC \NR
+\NC pre_adjust_head \NC head of the current \tex{vadjust pre} list\NC \NR
% \NC align_head \NC \NC \NR
\stoptabulate
\subsection{Semantic nest levels (0.51)}
The virtual table \luatex{tex.nest} contains the currently active
-semantic nesting state. It has two main parts: an zero-based array of
+semantic nesting state. It has two main parts: a zero-based array of
userdata for the semantic nest itself, and the numerical value
\type{tex.nest.ptr}, which gives the highest available index. Neither
the array items in \type{tex.nest[]} nor \type{tex.nest.ptr} can be
assigned to (as this would confuse the typesetting engine beyond
-repair), but you can assing to the individual values inside the array
-items, e.g. \type{tex.nest[tex.nest.ptr].prevdepth}.
+repair), but you can assign to the individual values inside the array
+items, e.g. \type{tex.nest[tex.nest.ptr].prevdepth}.
\type{tex.nest[tex.nest.ptr]} is the current nest state, \type{tex.nest[0]}
the outermost (main vertical list) level.
@@ -5531,13 +6289,13 @@ The known fields are:
\starttabulate[|lT|l|l|p|]
\NC \ssbf key \NC \bf type \NC \bf modes \NC \bf explanation \NC\NR
\NC mode \NC number \NC all \NC The current mode. This is a number representing the
- main mode at this level:\crlf
+ main mode at this level:\crlf
0 == no mode (this happens during \type{\write})\crlf
- 1 == vertical,\crlf
- 127 = horizontal,\crlf
+ 1 == vertical,\crlf
+ 127 = horizontal,\crlf
253 = display math.\crlf
- $-1$ == internal vertical,\crlf
- $-127$ = restricted horizontal,\crlf
+ $-1$ == internal vertical,\crlf
+ $-127$ = restricted horizontal,\crlf
$-253$ = inline math.\NC\NR
\NC modeline \NC number \NC all \NC source input line where this mode was entered in,
negative inside the output routine.\NC\NR
@@ -5548,11 +6306,11 @@ The known fields are:
when it is to be ignored)\NC\NR
\NC spacefactor \NC number \NC hmode \NC the current space factor\NC\NR
\NC dirs \NC node \NC hmode \NC used for temporary storage by the line break algorithm\NC\NR
-\NC noad \NC node \NC mmode \NC used for temporary storage of a pending fraction numerator,
+\NC noad \NC node \NC mmode \NC used for temporary storage of a pending fraction numerator,
for \type{\over} etc.\NC\NR
-\NC delimptr \NC node \NC mmode \NC used for temporary storage of the previous math delimiter,
+\NC delimptr \NC node \NC mmode \NC used for temporary storage of the previous math delimiter,
for \type{\middle}.\NC\NR
-\NC mathdir \NC boolean \NC mmode \NC true when during math processing the \type{\mathdir} is not
+\NC mathdir \NC boolean \NC mmode \NC true when during math processing the \type{\mathdir} is not
the same as the surrounding \type{\textdir}\NC\NR
\NC mathstyle \NC number \NC mmode \NC the current \type{\mathstyle} \NC\NR
\stoptabulate
@@ -5588,11 +6346,10 @@ If there is a table argument instead of a list of strings, this has to
be a consecutive array of strings to print (the first non-string value
will stop the printing process). This syntax was added in 0.36.
-
The optional parameter can be used to print the strings using the
-catcode regime defined by \tex{catcodetable}~\type{n}. If \type{n} is
+catcode regime defined by \tex{catcodetable}~\type{n}. If \type{n} is
$-1$, the currently active catcode regime is used. If \type{n} is
-$-2$, the resulting catcodes are in the result of \type{\the}: all
+$-2$, the resulting catcodes are the result of \type{\the\toks}: all
category codes are 12 (other) except for the space character, that has
category code 10 (space). Otherwise, if \type{n} is not
a valid catcode table, then it is ignored, and the currently
@@ -5635,6 +6392,8 @@ If there is a table argument instead of a list of strings, this has to
be a consecutive array of strings to print (the first non-string value
will stop the printing process). This syntax was added in 0.36.
+The optional argument sets the catcode regime, as with \type{tex.print()}.
+
\subsubsection{\luatex{tex.tprint}}
\startfunctioncall
@@ -5653,7 +6412,7 @@ tex.write(<table> t)
\stopfunctioncall
Each string argument is treated by \TEX\ as a special kind of input
-line that makes is suitable for use as a quick way to dump
+line that makes it suitable for use as a quick way to dump
information:
\startitemize
@@ -5704,13 +6463,13 @@ added at a later date.
<number> n = tex.sp(<string> s)
\stopfunctioncall
-Converts the number \type{o} or a string \type{s} that represents
+Converts the number \type{o} or a string \type{s} that represents
an explicit dimension into an integer number of scaled points.
For parsing the string, the same scanning and conversion rules are used
-that \LUATEX\ would use if it was scanning a dimension specifier in
-its \TEX-like input language (this includes generating errors for bad
-values), expect for the following:
+that \LUATEX\ would use if it was scanning a dimension specifier in
+its \TEX-like input language (this includes generating errors for bad
+values), expect for the following:
\startitemize[n]
\item only explicit values are allowed, control sequences are not handled
@@ -5729,6 +6488,20 @@ Associates \type{csname} with the internal font number \type{fontid}.
The definition is global if (and only if) \type{global} is specified
and true (the setting of \type{globaldefs} is not taken into account).
+
+\subsubsection{\luatex{tex.error} (0.61)}
+
+\startfunctioncall
+tex.error(<string> s)
+tex.error(<string> s, <table> help)
+\stopfunctioncall
+
+This creates an error somewhat like the combination of \tex{errhelp}
+and \tex{errmessage} would. During this error, deletions are disabled.
+
+The array part of the \type{help} table has to contain strings,
+one for each line of error help.
+
\subsection[luaprimitives]{Functions for dealing with primitives }
\subsubsection{\luatex{tex.enableprimitives}}
@@ -5741,8 +6514,8 @@ This function accepts a prefix string and an array of primitive names.
For each combination of \quote{prefix} and \quote{name}, the
\type{tex.enableprimitives} first verifies that \quote{name} is
-and actual primitive (it must be returned by one of the
-\type{tex.extraprimitives()} calls explained above, or part of
+an actual primitive (it must be returned by one of the
+\type{tex.extraprimitives()} calls explained below, or part of
\TEX82, or \type{\directlua}). If it is not,
\type{tex.enableprimitives} does nothing and skips to the next pair.
@@ -5786,7 +6559,7 @@ So, if you want to have all the new functionality available using
their default names, as it is now, you will have to add
\starttyping
- \expandafter\ifx\csname directlua\endcsname \relax \else
+ \ifx\directlua\undefined \else
\directlua {tex.enableprimitives('',tex.extraprimitives ())}
\fi
\stoptyping
@@ -5797,7 +6570,7 @@ different prefixes for different subsets, as you see fit.
Calling some form of \type{tex.enableprimitives()} is highly important
though, because if you do not, you will end up with a \TEX82-lookalike
that can run lua code but not do much else. The defined csnames are
-(of course) saved in the format and will be available runtime.
+(of course) saved in the format and will be available at runtime.
\subsubsection{\luatex{tex.extraprimitives}}
@@ -5812,7 +6585,12 @@ possible values and their (current) return values are:
\startluacode
function out_prim (a)
- for _,n in pairs(tex.extraprimitives(a)) do
+ local v = tex.extraprimitives(a)
+ table.sort(v)
+ for _,n in pairs(v) do
+ if n == ' ' then
+ n = '\\normalcontrolspace'
+ end
tex.print(n .. '\\hskip 4pt plus 5em')
end
end
@@ -5858,8 +6636,8 @@ is always zero.
\stopfunctioncall
This helper function is useful
-during linebreak calculations. \type{f} and \type{s} are scaled values; the function
-returns the badness for when total \type{f} is supposed to be made from amounts
+during linebreak calculations. \type{f} and \type{s} are scaled values; the function
+returns the badness for when total \type{f} is supposed to be made from amounts
that sum to \type{s}. The returned number is a reasonable approximation of $100(t/s)^3$;
\subsubsection{\luatex{tex.linebreak} (0.53)}
@@ -5917,7 +6695,7 @@ It is your own job to make sure that \type{listhead} is a proper
paragraph list: this function does not add any nodes to it. To be
exact, if you want to replace the core line breaking, you may have to
do the following (when you are not actually working in the
-\type{pre_line_break} or \type{line_break} callback, or when the
+\type{pre_linebreak_filter} or \type{linebreak_filter} callbacks, or when the
original list starting at listhead was generated in horizontal mode):
\startitemize
@@ -5930,7 +6708,7 @@ original list starting at listhead was generated in horizontal mode):
\stopitemize
The result is a node list, it still needs to be vpacked if you
-want to assign it to a box.
+want to assign it to a \tex{vbox}.
The returned \type{info} table contains four values that are all numbers:
@@ -5990,9 +6768,6 @@ the executable after loading and executing the startup file.
\NC error_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
\NC half_error_line \NC number\NC 50\NC cf.\ web2c docs \NC \NR
\NC max_print_line \NC number\NC 79\NC cf.\ web2c docs \NC \NR
-\NC ocp_list_size \NC number\NC 1000\NC cf.\ web2c docs \NC \NR
-\NC ocp_buf_size \NC number\NC 1000\NC cf.\ web2c docs \NC \NR
-\NC ocp_stack_size \NC number\NC 1000\NC cf.\ web2c docs \NC \NR
\NC hash_extra \NC number\NC 0\NC cf.\ web2c docs \NC \NR
\NC pk_dpi \NC number\NC 72\NC cf.\ web2c docs \NC \NR
\NC trace_file_names \NC boolean \NC true \NC \type{false} disables \TEX's normal file open|-|close
@@ -6082,7 +6857,7 @@ without expansion.
\subsection{\luatex{token.is_expandable}}
\startfunctioncall
-<boolean> b = token.is_expandable(token t)
+<boolean> b = token.is_expandable(<token> t)
\stopfunctioncall
This tests if the token \type{t} could be expanded.
@@ -6090,7 +6865,7 @@ This tests if the token \type{t} could be expanded.
\subsection{\luatex{token.expand}}
\startfunctioncall
-token.expand()
+token.expand(<token> t)
\stopfunctioncall
If a token is expandable, this will expand one level of it, so that
@@ -6100,7 +6875,7 @@ by \luatex{token.get_next()}.
\subsection{\luatex{token.is_activechar}}
\startfunctioncall
-<boolean> b = token.is_activechar(token t)
+<boolean> b = token.is_activechar(<token> t)
\stopfunctioncall
This is a special test that is sometimes handy. Discovering whether
@@ -6141,7 +6916,7 @@ new control sequences using \luatex{token.create}!
This returns the name associated with the \quote{command} value of the token
in \LUATEX. There is not always a direct connection between these names and
primitives. For instance, all \tex{ifxxx} tests are grouped under
-\type {if_fest}, and the \quote{command modifier} defines which test is to be run.
+\type {if_test}, and the \quote{command modifier} defines which test is to be run.
\subsection{\luatex{token.command_id}}
@@ -6297,7 +7072,7 @@ New primitives that are compatible with \XETEX:
\NC \tex{Umathcode} \NC 0--10FFFF = 0+0+0--7+FF+10FFFF$^1$ \NC\NR
\NC \tex{Udelcode} \NC 0--10FFFF = 0+0--FF+10FFFF$^2$ \NC\NR
\NC \tex{Umathchar} \NC 0+0+0--7+FF+10FFFF \NC\NR
-\NC \tex{Umathaccent} \NC 0+0+0--7+FF+10FFFF$^2$ \NC\NR
+\NC \tex{Umathaccent} \NC 0+0+0--7+FF+10FFFF$^{2,4}$ \NC\NR
\NC \tex{Udelimiter} \NC 0+0+0--7+FF+10FFFF$^2$ \NC\NR
\NC \tex{Uradical} \NC 0+0--FF+10FFFF$^2$ \NC\NR
\NC \tex{Umathcharnum} \NC -80000000--7FFFFFFF$^3$ \NC\NR
@@ -6325,14 +7100,19 @@ two- and three-value commands, so unless you know exactly what you are
doing and absolutely require the speedup resulting from the faster input
scanning, it is better to use the verbose commands instead.
+Note 4: As of \LUATEX\ 0.65, \tex{Umathaccent} accepts optional
+keywords to control various details regarding math accents. See
+\in{section}[mathacc] below for details.
+
+
New primitives that exist in \LUATEX\ only (all of these will be explained
in following sections):
\starttabulate[|l|l|l|l|]
\NC \bf primitive \NC \bf value range (in hex) \NC\NR
-\NC \tex{Umathbotaccent} \NC 0+0+0--7+FF+10FFFF \NC\NR
-\NC \tex{Umathaccents} \NC 0+0+0+0+0+0--7+FF+10FFFF+7+FF+10FFFF \NC\NR
+%\NC \tex{Umathbotaccent} \NC 0+0+0--7+FF+10FFFF \NC\NR
+%\NC \tex{Umathaccents} \NC 0+0+0+0+0+0--7+FF+10FFFF+7+FF+10FFFF \NC\NR
\NC \tex{Uroot} \NC 0+0--FF+10FFFF$^2$ \NC\NR
\NC \tex{Uoverdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC\NR
\NC \tex{Uunderdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC\NR
@@ -6462,7 +7242,7 @@ font dimension parameter. For math fonts, this should be set to zero.
\NC \bf variable \NC \bf style \NC \bf default value opentype \NC \bf default value tfm \NC\NR
\NC \tex{Umathaxis} \NC -- \NC AxisHeight \NC axis_height \NC\NR
\NC \tex{Umathoperatorsize} \NC D, D' \NC DisplayOperatorMinHeight \NC $^6$ \NC\NR
-\NC \tex{Umathfractiondelsize} \NC D, D' \NC FractionDelimiterDisplaySize$^9$ \NC delim1 \NC\NR
+\NC \tex{Umathfractiondelsize} \NC D, D' \NC FractionDelimiterDisplayStyleSize$^9$ \NC delim1 \NC\NR
\NC " \NC T, T', S, S', SS, SS' \NC FractionDelimiterSize$^9$ \NC delim2 \NC\NR
\NC \tex{Umathfractiondenomdown}\NC D, D' \NC FractionDenominatorDisplayStyleShiftDown \NC denom1 \NC\NR
\NC " \NC T, T', S, S', SS, SS' \NC FractionDenominatorShiftDown \NC denom2 \NC\NR
@@ -6555,7 +7335,7 @@ expressed in a percentage instead of as a number of scaled points.
Note 8: \type{SubscriptShiftDownWithSuperscript} does not actually exist in the \quote{standard}
Opentype Math font Cambria, but it is useful enough to be added. New in version 0.38.
-Note 9: \type{FractionDelimiterDisplaySize} and \type{FractionDelimiterSize} do not actually exist in the \quote{standard}
+Note 9: \type{FractionDelimiterDisplayStyleSize} and \type{FractionDelimiterSize} do not actually exist in the \quote{standard}
Opentype Math font Cambria, but were useful enough to be added. New in version 0.47.
@@ -6569,6 +7349,22 @@ the whole list:
\startcolumns[n=2]
\starttyping
+\Umathordordspacing
+\Umathordopspacing
+\Umathordbinspacing
+\Umathordrelspacing
+\Umathordopenspacing
+\Umathordclosespacing
+\Umathordpunctspacing
+\Umathordinnerspacing
+\Umathopordspacing
+\Umathopopspacing
+\Umathopbinspacing
+\Umathoprelspacing
+\Umathopopenspacing
+\Umathopclosespacing
+\Umathoppunctspacing
+\Umathopinnerspacing
\Umathbinordspacing
\Umathbinopspacing
\Umathbinbinspacing
@@ -6641,11 +7437,31 @@ actually be used as those combinations of atoms cannot actually
happen, but it seemed better not to break orthogonality. They are initialized to zero.
-\section{Math accent handling}
+\section[mathacc]{Math accent handling}
+
+\LUATEX\ supports both top accents and bottom accents in math mode,
+and math accents stretch automatically (if this is supported by the
+font the accent comes from, of course). Bottom and combined accents as
+well as fixed-width math accents are controlled by optional keywords
+following \tex{Umathaccent}.
-\LUATEX\ supports both top accents and bottom accents in math mode. For bottom accents,
-there is the new primitive \tex{Umathbotaccent}. If you want to set both top and bottom
-accents on a single item, there is \tex{Umathaccents}.
+The keyword \type{bottom} after \tex{Umathaccent} signals that a bottom
+accent is needed, and the keyword \type{both} signals that both a top
+and a bottom accent are needed (in this case two accents need to be
+specified, of course).
+
+Then the set of three integers defining the accent is read. This set
+of integers can be prefixed by the \type{fixed} keyword to indicate
+that a non-stretching variant is requested (in case of both accents,
+this step is repeated).
+
+A simple example:
+\starttyping
+\Umathaccent both fixed 0 0 "20D7 fixed 0 0 "20D7 {example}
+\stoptyping
+
+The primitives \tex{Umathbotaccent} and \tex{Umathaccents} are deprecated since
+version 0.65, and will be removed eventually.
If a math top accent has to be placed and the accentee is a character and has a non-zero
\type{top_accent} value, then this value will be used to place the accent instead of
@@ -6667,9 +7483,6 @@ kern is ignored.
The vertical placement of a bottom accent is straight below the accentee, no correction
takes place.
-\LUATEX\ has horizontal extensibles, and when present, these will be used by the accent
-commands.
-
\section{Math root extension}
The new primitive \type{\Uroot} allows the construction of a radical
@@ -6949,11 +7762,15 @@ Incidentally, this is a global parameter instead of a
language-specific one because it may be useful to change the value
depending on the document structure instead of the text language.
+Note: as of \LUATEX\ 0.63.0, the insertion of discretionaries after
+a sequence of explicit hyphens happens at the same time as the other
+hyphenation processing, {\it not\/} inside the main control loop.
+
The only use \LUATEX\ has for \tex{hyphenchar} is at the check
whether a word should be considered for hyphenation at all. If the
\tex{hyphenchar} of the font attached to the first character node in a
word is negative, then hyphenation of that word is abandoned
-immediately. {\bf This behaviour is added for backward
+immediately. {\bf This behavior is added for backward
compatibility only, and the use of \type{\hyphenchar=-1} as a means of
preventing hyphenation should not be used in new \LUATEX\ documents.}
@@ -6988,11 +7805,11 @@ The hyphenation algorithm in \LUATEX\ is quite different from the one
in \TEX82, although it uses essentially the same user input.
After expansion, the argument for \tex{patterns} has to be proper
-UTF-8, no \tex{char} or \tex{chardef-ed} commands are allowed. (The
-current implementation is even more strict, and will reject all
-non|-|\UNICODE\ characters, but that will be changed in the future. For
-now, the generated errors are a valuable tool in discovering
-font-encoding specific pattern files)
+UTF-8 with individual patterns separated by spaces, no \tex{char} or
+\tex{chardef-ed} commands are allowed. (The current implementation is
+even more strict, and will reject all non|-|\UNICODE\ characters, but
+that will be changed in the future. For now, the generated errors are
+a valuable tool in discovering font-encoding specific pattern files)
Likewise, the expanded argument for \tex{hyphenation} also has to be
proper UTF-8, but here a tiny little bit of extra syntax is provided:
@@ -7002,13 +7819,11 @@ proper UTF-8, but here a tiny little bit of extra syntax is provided:
indicates a desired complex discretionary, with arguments
as in \tex{discretionary}'s command in normal document input.
\item \type{-} indicates a desired simple discretionary, cf. \tex{-} and
- \tex{discretionary{-}{}{}} in normal document input.
+ \type{\discretionary{-}{}{}} in normal document input.
\item Internal command names are ignored. This rule is provided
especially for \tex{discretionary}, but it also helps to deal with
\tex{relax} commands that may sneak in.
-\item \type{=} indicates a hyphen in the document input (but that
- is only useful in documents where \tex{exhyphenchar} is not equal to
- the hyphen).
+\item \type{=} indicates a (non-discretionary) hyphen in the document input.
\stopitemize
The expanded argument is first converted back to a space-separated
@@ -7037,6 +7852,16 @@ library. This loading method is quite a bit faster than going through
the \TEX\ language primitives, but some (most?) of that speed gain
would be lost if it had to interpret command sequences while doing so.
+Starting with \LUATEX\ 0.63.0, it is possible to specify extra hyphenation
+points in compound words by using \type{{-}{}{-}} for the explicit hyphen
+character (replace \type{-} by the actual explicit hyphen character if needed).
+For example, this matches the word \quote{multi-word-boundaries} and allows
+an extra break inbetweem \quote{boun} and \quote{daries}:
+
+\starttyping
+\hyphenation{multi{-}{}{-}word{-}{}{-}boun-daries}
+\stoptyping
+
The motivation behind the \ETEX\ extension \tex{savinghyphcodes} was
that hyphenation heavily depended on font encodings. This is no longer
true in \LUATEX, and the corresponding primitive is ignored pending
@@ -7108,7 +7933,7 @@ Words can be up to 256 characters long (up from 64 in \TEX82). Longer
words generate an error right now, but eventually either the
limitation will be removed or perhaps it will become possible to
silently ignore the excess characters (this is what happens in \TEX82,
-but there the behaviour cannot be controlled).
+but there the behavior cannot be controlled).
If you are using the \LUA\ function \type{lang.hyphenate}, you should be
aware that this function expects to receive a list of \quote{character}
@@ -7150,49 +7975,108 @@ are handled by our rewritten ligaturing engine. We are working hard to
make sure all of the possible inputs will become supported soon.
For example, take the word \type{office}, hyphenated \type{of-fice},
-using a \quote{normal} font with all the \type{f}-\type{i} ligatures:
+using a \quote{normal} font with all the \type{f}-\type{f} and
+\type{f}-\type{i} type ligatures:
+
\starttabulate[|l|l|]
-\NC Initial: \NC \type{{o}{f}{f}{i}{c}{e}} \NC\NR
+\NC Initial: \NC \type{{o}{f}{f}{i}{c}{e}}\NC\NR
\NC After hyphenation: \NC \type{{o}{f}{{-},{},{}}{f}{i}{c}{e}}\NC\NR
-\NC First ligature stage: \NC \type{{o}{{f}{-},{f},{ff}}{i}{c}{e}}\NC\NR
-\NC Final result: \NC \type{{o}{{f}{-},{fi},{ffi}}{c}{e}} \NC\NR
+\NC First ligature stage: \NC \type{{o}{{f-},{f},{<ff>}}{i}{c}{e}}\NC\NR
+\NC Final result: \NC \type{{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR
\stoptabulate
-That's bad enough, but if there was a hyphenation point between the
-\type{f} and the \type{i}: \type{of-f-ice}, the final result should be:
+That's bad enough, but let us assume that there is also a hyphenation
+point between the \type{f} and the \type{i}, to create
+\type{of-f-ice}. Then the final result should be:
\starttyping
-{o}{{f}{-},
- {{f}{-},
+{o}{{f-},
+ {{f-},
{i},
- {fi}},
- {{ff}{-},
+ {<fi>}},
+ {{<ff>-},
{i},
- {ffi}}}{c}{e}
+ {<ffi>}}}{c}{e}
\stoptyping
with discretionaries in the post-break text as well as in the
replacement text of the top-level discretionary that resulted from the
-first hyphenation point. And this is only a simple case.
+first hyphenation point.
+
+Here is that nested solution again, in a different representation:
+
+\starttabulate[|l|l|l|l|]
+\NC \NC pre \NC post \NC replace \NC \NR
+\NC topdisc \NC \type{f-}$^1$ \NC sub1 \NC sub2 \NC \NR
+\NC sub1 \NC \type{f-}$^2$ \NC \type{i}$^3$ \NC \type{<fi>}$^4$ \NC \NR
+\NC sub2 \NC \type{<ff>-}$^5$\NC \type{i}$^6$ \NC \type{<ffi>}$^7$\NC \NR
+\stoptabulate
+
+When line breaking is choosing its breakpoints, the following fields will eventually
+be selected:
-As of 0.39.0, the solution in \LUATEX\ is not as smart as all this. It
-essentially creates the following set of items for \type{of-f-ice}:
+\starttabulate[|l|l|l|]
+\NC \type{of-f-ice} \NC \type{f-}$^1$ \NC \NR
+\NC \NC \type{f-}$^2$ \NC \NR
+\NC \NC \type{i}$^3$ \NC \NR
+\NC \type{of-fice} \NC \type{f-}$^1$ \NC \NR
+\NC \NC \type{<fi>}$^4$ \NC \NR
+\NC \type{off-ice} \NC \type{<ff>-}$^5$ \NC \NR
+\NC \NC \type{i}$^6$ \NC \NR
+\NC \type{office} \NC \type{<ffi>}$^7$ \NC \NR
+\stoptabulate
+
+The current solution in \LUATEX\ is not able to handle nested
+discretionaries, but it is in fact smart enough to handle this
+fictional \type{of-f-ice} example. It does so by combining two
+sequential discretionary nodes as if they were a single object
+(where the second discretionary node is treated as an extension
+of the first node).
+
+One can observe that the \type{of-f-ice} and \type{off-ice} cases both end
+with the same actual post replacement list (\type{i}), and that this
+would be the case even if that \type{i} was the first item of a
+potential following ligature like \type{ic}. This allows \LUATEX\
+to do away with one of the fields, and thus make the whole stuff fit
+into just two discretionary nodes.
+
+The mapping of the seven list fields to the six fields in this
+discretionary node pair is as follows:
+
+\starttabulate[|l|p|]
+\NC \bf field \NC \bf description \NC \NR
+\NC \type{disc1.pre} \NC \type{f-}$^1$ \NC \NR
+\NC \type{disc1.post} \NC \type{<fi>}$^4$ \NC \NR
+\NC \type{disc1.replace} \NC \type{<ffi>}$^7$ \NC \NR
+\NC \type{disc2.pre} \NC \type{f-}$^2$ \NC \NR
+\NC \type{disc2.post} \NC \type{i}$^{3{,}6}$\NC \NR
+\NC \type{disc2.replace} \NC \type{<ff>-}$^5$\NC \NR
+\stoptabulate
+
+What is actually generated after ligaturing has been applied is
+therefore:
\starttyping
-{o}{{f}{-},
- {fi},
- {ffi}},
- {{f}{-},
+{o}{{f-},
+ {<fi>},
+ {<ffi>}}
+ {{f-},
{i},
- {fi}}{c}{e}
+ {<ff>-}}{c}{e}
\stoptyping
-This is not perfect (because the \type{off-ice} hyphenation will never
-be chosen), but luckily three-item ligatures with multiple embedded
-hyphenation points are extremely rare indeed: even this example was
-artificially created. A full, perfect solution is possible, but is
-low on the agenda now that at least \type{office} can be hyphenated
-properly again.
+The two discretionaries have different subtypes from a discretionary
+appearing on its own: the first has subtype 4, and the second has
+subtype 5. The need for these special subtypes stems from the fact
+that not all of the fields appear in their \quote{normal} location.
+The second discretionary especially looks odd, with things like the
+\type{<ff>-} appearing in \type{disc2.replace}. The fact that some of
+the fields have different meanings (and different processing code
+internally) is what makes it necessary to have different subtypes:
+this enables \LUATEX\ to distinguish this sequence of two joined
+discretionary nodes from the case of two standalone discretionaries
+appearing in a row.
+
\section{Breaking paragraphs into lines}
@@ -7277,8 +8161,8 @@ incoming font source, also used as fontname identifier in the \PDF\ output, new
reference, don't cache any lua data for this font.
\type{renew}: don't store the table reference, but
save a reference to the table that is created at the
- first access to one of its fields in font.fonts.
- (new in 0.40.0, before that caching was always \type{yes}).
+ first access to one of its fields in font.fonts.
+ (new in 0.40.0, before that caching was always \type{yes}).
Note: the saved reference is thread-local, so be careful when you are using coroutines: an error will be thrown if the table
has been cached in one thread, but you reference it from another thread ($\approx$ coroutine)\NC\NR
\NC nomath \NC no \NC no \NC yes \NC boolean\NC this key allows a minor speedup for text fonts. if it is
@@ -7387,22 +8271,6 @@ character \quote{f} (decimal 102) in the font cmr10 at 10 points:
}
\stoptyping
-Of course a more compact is also possible, but keep in mind that reserved
-words cannot be used compact and in \LUATEX\ we often have a \type {type} key.
-
-\starttyping
-[102] = {
- ...
- ligatures = {
- [102] = {
- char = 11,
- ['type'] = 0
- },
- ...
- }
-}
-\stoptyping
-
The following top|-|level keys can be present inside a character hash:
\starttabulate[|lT|c|c|c|l|p|]
@@ -7431,7 +8299,7 @@ The following top|-|level keys can be present inside a character hash:
\stoptabulate
The values of \type{top_accent}, \type{bot_accent} and \type{mathkern} are used only for math
-accent and superscript placement, see the \at[math]{math chapter} in this manual for details.
+accent and superscript placement, see the \at{math chapter}[math] in this manual for details.
The values of \type{left_protruding} and \type{right_protruding} are used only when
\tex{pdfprotrudechars} is non-zero.
@@ -7557,7 +8425,7 @@ explicitly. For \PK\ bitmap fonts, wide font encoding is not
supported at all.
If no special care is needed, \LUATEX\ currently falls back to the
-mapfile|-|based solution used by \PDFTEX\ and \DVIPS. This behaviour
+mapfile|-|based solution used by \PDFTEX\ and \DVIPS. This behavior
will be removed in the future, when the existing code becomes
integrated in the new subsystem.
@@ -7819,16 +8687,16 @@ accessible fields:
\NC stretch_order \NC number \NC \NC\NR
\NC shrink \NC number \NC \NC\NR
\NC shrink_order \NC number \NC \NC\NR
-\NC writable \NC boolean \NC If this is true, you can't assign to this \type{glue_spec}
+\NC writable \NC boolean \NC If this is true, you can't assign to this \type{glue_spec}
because it is one of the preallocated special cases. New in 0.52\NC\NR
\stoptabulate
These objects are reference counted, so there is actually an extra
field named \type {ref_count} as well. This item type will likely
disappear in the future, and the glue fields themselves will
-become part of the nodes referencing glue items.
+become part of the nodes referencing glue items.
-\subsubsection{attribute\_list and attribute items}
+\subsubsection{attribute{\_}list and attribute items}
The newly introduced attribute registers are non|-|trivial, because
the value that is attached to a node is essentially a sparse array of
@@ -7862,7 +8730,8 @@ Valid fields in \type{attribute} items:
\subsubsection{action item}
-Valid fields: \showfields{action}
+Valid fields: \showfields{action}\crlf
+Id: \showid{action}
These are a special kind of item that only appears inside
pdf start link objects.
@@ -7906,12 +8775,14 @@ fields to be a backwards pointer in the argument node list.
\subsubsection{hlist nodes}
-Valid fields: \showfields{hlist}
+Valid fields: \showfields{hlist}\crlf
+Id: \showid{hlist}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
\NC subtype \NC number \NC 0 = unknown origin, 1 = created by
-linebreaking, 2 = explict box command. (0.46.0)\NC\NR
+linebreaking, 2 = explicit box command. (0.46.0),
+3 = paragraph indentation box, 4 = alignment column or row, 5 = alignment cell (0.62.0)\NC\NR
\NC attr \NC \syntax{<node>} \NC The head of the associated attribute list \NC\NR
\NC width \NC number \NC \NC\NR
\NC height \NC number \NC \NC\NR
@@ -7922,23 +8793,28 @@ linebreaking, 2 = explict box command. (0.46.0)\NC\NR
the glue order\NC\NR
\NC glue_set \NC number \NC the calculated glue ratio\NC\NR
\NC glue_sign \NC number \NC \NC\NR
-\NC list \NC \syntax{<node>} \NC the body of this list\NC\NR
+\NC head \NC \syntax{<node>} \NC the first node of the body of this list\NC\NR
\NC dir \NC string \NC the direction of this box. see~\in{}[dirnodes]\NC\NR
\stoptabulate
-A warning: never assign a node list to the list field
+A warning: never assign a node list to the \type{head} field
unless you are sure its internal link structure is correct, otherwise
-an error may be result.
+an error may result.
+Note: the new field name \type{head} was introduced in 0.65 to replace
+the old name \type{list}. Use of the name \type{list} is now
+deprecated, but it will stay available until at least version 0.80.
\subsubsection{vlist nodes}
Valid fields: As for hlist, except that \quote{shift} is a displacement
-perpendicular to the line progression direction.
+perpendicular to the line progression direction, and \quote{subtype} only
+has subtypes 0, 4, and 5.
\subsubsection{rule nodes}
-Valid fields: \showfields{rule}
+Valid fields: \showfields{rule}\crlf
+Id: \showid{rule}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -7953,7 +8829,8 @@ Valid fields: \showfields{rule}
\subsubsection{ins nodes}
-Valid fields: \showfields{ins}
+Valid fields: \showfields{ins}\crlf
+Id: \showid{ins}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -7962,18 +8839,23 @@ Valid fields: \showfields{ins}
\NC cost \NC number \NC the penalty associated with this insert\NC\NR
\NC height \NC number \NC \NC\NR
\NC depth \NC number \NC \NC\NR
-\NC list \NC \syntax{<node>} \NC the body of this insert\NC\NR
+\NC head \NC \syntax{<node>} \NC the first node of the body of this insert\NC\NR
\NC spec \NC \syntax{<node>} \NC a pointer to the \tex{splittopskip} glue spec\NC\NR
\stoptabulate
-A warning: never assign a node list to the list field
+A warning: never assign a node list to the \type{head} field
unless you are sure its internal link structure is correct, otherwise
an error may be result.
+Note: the new field name \type{head} was introduced in 0.65 to replace
+the old name \type{list}. Use of the name \type{list} is now
+deprecated, but it will stay available until at least version 0.80.
+
\subsubsection{mark nodes}
-Valid fields: \showfields{mark}
+Valid fields: \showfields{mark}\crlf
+Id: \showid{mark}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -7985,24 +8867,29 @@ Valid fields: \showfields{mark}
\subsubsection{adjust nodes}
-Valid fields: \showfields{adjust}
+Valid fields: \showfields{adjust}\crlf
+Id: \showid{adjust}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
\NC subtype \NC number \NC 0 = normal, 1 = \quote{pre}\NC\NR
\NC attr \NC \syntax{<node>} \NC \NC\NR
-\NC list \NC \syntax{<node>} \NC adjusted material\NC\NR
+\NC head \NC \syntax{<node>} \NC adjusted material\NC\NR
\stoptabulate
-
-A warning: never assign a node list to the list field
+A warning: never assign a node list to the \type{head} field
unless you are sure its internal link structure is correct, otherwise
an error may be result.
+Note: the new field name \type{head} was introduced in 0.65 to replace
+the old name \type{list}. Use of the name \type{list} is now
+deprecated, but it will stay available until at least version 0.80.
+
\subsubsection{disc nodes}
-Valid fields: \showfields{disc}
+Valid fields: \showfields{disc}\crlf
+Id: \showid{disc}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8011,8 +8898,8 @@ Valid fields: \showfields{disc}
1 = the \tex{-} command,
2 = added automatically following a \type{-},
3 = added by the hyphenation algorithm (simple),
- 4 = added by the hyphenation algorithm (hard, first item),
- 5 = added by the hyphenation algorithm (hard, second item)\NC\NR
+ 4 = added by the hyphenation algorithm (hard, first item),
+ 5 = added by the hyphenation algorithm (hard, second item)\NC\NR
\NC attr \NC \syntax{<node>} \NC \NC\NR
\NC pre \NC \syntax{<node>} \NC pointer to the pre|-|break text\NC\NR
\NC post \NC \syntax{<node>} \NC pointer to the post|-|break text\NC\NR
@@ -8027,7 +8914,8 @@ an error may be result.
\subsubsection{math nodes}
-Valid fields: \showfields{math}
+Valid fields: \showfields{math}\crlf
+Id: \showid{math}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8038,7 +8926,8 @@ Valid fields: \showfields{math}
\subsubsection{glue nodes}
-Valid fields: \showfields{glue}
+Valid fields: \showfields{glue}\crlf
+Id: \showid{glue}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8046,40 +8935,41 @@ Valid fields: \showfields{glue}
1--18 = internal glue parameters,
100-103 = \quote{leader} subtypes \NC\NR
\NC attr \NC \syntax{<node>} \NC \NC\NR
-\NC spec \NC \syntax{<node>} \NC pointer to a glue\_spec item \NC\NR
+\NC spec \NC \syntax{<node>} \NC pointer to a glue{\_}spec item \NC\NR
\NC leader \NC \syntax{<node>} \NC pointer to a box or rule for leaders\NC\NR
\stoptabulate
The exact meanings of the subtypes are as follows:
\starttabulate[|rT|l|]
-\NC 1 \NC \tex{lineskip} \NC \NR
-\NC 2 \NC \tex{baselineskip} \NC \NR
-\NC 3 \NC \tex{parskip} \NC \NR
-\NC 4 \NC \tex{abovedisplayskip} \NC \NR
-\NC 5 \NC \tex{belowdisplayskip} \NC \NR
-\NC 6 \NC \tex{abovedisplayshortskip} \NC \NR
-\NC 7 \NC \tex{belowdisplayshortskip} \NC \NR
-\NC 8 \NC \tex{leftskip} \NC \NR
-\NC 9 \NC \tex{rightskip} \NC \NR
-\NC 10 \NC \tex{topskip} \NC \NR
-\NC 11 \NC \tex{splittopskip} \NC \NR
-\NC 12 \NC \tex{tabskip} \NC \NR
-\NC 13 \NC \tex{spaceskip} \NC \NR
-\NC 14 \NC \tex{xspaceskip} \NC \NR
-\NC 15 \NC \tex{parfillskip} \NC \NR
-\NC 16 \NC \tex{thinmuskip} \NC \NR
-\NC 17 \NC \tex{medmuskip} \NC \NR
-\NC 18 \NC \tex{thickmuskip} \NC \NR
-\NC 100 \NC \tex{leaders} \NC \NR
-\NC 101 \NC \tex{cleaders} \NC \NR
-\NC 102 \NC \tex{xleaders} \NC \NR
-\NC 103 \NC \tex{aleaders} \NC \NR
+\NC 1 \NC \tex{lineskip} \NC \NR
+\NC 2 \NC \tex{baselineskip} \NC \NR
+\NC 3 \NC \tex{parskip} \NC \NR
+\NC 4 \NC \tex{abovedisplayskip} \NC \NR
+\NC 5 \NC \tex{belowdisplayskip} \NC \NR
+\NC 6 \NC \tex{abovedisplayshortskip} \NC \NR
+\NC 7 \NC \tex{belowdisplayshortskip} \NC \NR
+\NC 8 \NC \tex{leftskip} \NC \NR
+\NC 9 \NC \tex{rightskip} \NC \NR
+\NC 10 \NC \tex{topskip} \NC \NR
+\NC 11 \NC \tex{splittopskip} \NC \NR
+\NC 12 \NC \tex{tabskip} \NC \NR
+\NC 13 \NC \tex{spaceskip} \NC \NR
+\NC 14 \NC \tex{xspaceskip} \NC \NR
+\NC 15 \NC \tex{parfillskip} \NC \NR
+\NC 16 \NC \tex{thinmuskip} \NC \NR
+\NC 17 \NC \tex{medmuskip} \NC \NR
+\NC 18 \NC \tex{thickmuskip} \NC \NR
+\NC 100 \NC \tex{leaders} \NC \NR
+\NC 101 \NC \tex{cleaders} \NC \NR
+\NC 102 \NC \tex{xleaders} \NC \NR
+\NC 103 \NC \tex{gleaders} \NC \NR
\stoptabulate
\subsubsection{kern nodes}
-Valid fields: \showfields{kern}
+Valid fields: \showfields{kern}\crlf
+Id: \showid{kern}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8093,7 +8983,8 @@ Valid fields: \showfields{kern}
\subsubsection{penalty nodes}
-Valid fields: \showfields{penalty}
+Valid fields: \showfields{penalty}\crlf
+Id: \showid{penalty}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8104,7 +8995,8 @@ Valid fields: \showfields{penalty}
\subsubsection[glyphnodes]{glyph nodes}
-Valid fields: \showfields{glyph}
+Valid fields: \showfields{glyph}\crlf
+Id: \showid{glyph}
\starttabulate[|lT|l|p|]
\NC \ssbf field\NC \ssbf type \NC \ssbf explanation \NC\NR
@@ -8145,9 +9037,10 @@ See \in{section}[charsandglyphs] for a detailed description of the
-\subsubsection{margin\_kern nodes}
+\subsubsection{margin{\_}kern nodes}
-Valid fields: \showfields{margin_kern}
+Valid fields: \showfields{margin_kern}\crlf
+Id: \showid{margin_kern}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8173,9 +9066,10 @@ descriptions these are indicated by the word \type{<kernel>}).
The \type{next} and \type{prev} fields for these subnodes are unused.
-\subsubsubsection{math\_char and math\_text\_char subnodes}
+\subsubsubsection{math{\_}char and math{\_}text{\_}char subnodes}
-Valid fields: \showfields{math_char}
+Valid fields: \showfields{math_char}\crlf
+Id: \showid{math_char}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8190,25 +9084,30 @@ the character and family for a single glyph object. The
normally encounter, it arises temporarily during math list conversion
(its sole function is to suppress a following italic correction).
-\subsubsubsection{sub\_box and sub\_mlist subnodes}
+\subsubsubsection{sub{\_}box and sub{\_}mlist subnodes}
-Valid fields: \showfields{sub_box}
+Valid fields: \showfields{sub_box}\crlf
+Id: \showid{sub_box}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
\NC attr \NC \syntax{<node>}\NC \NC\NR
-\NC list \NC \syntax{<node>}\NC \NC \NR
+\NC head \NC \syntax{<node>}\NC \NC \NR
\stoptabulate
These two subnode types are used for subsidiary list items. For
-\type{sub_box}, the \type{list} points to a \quote{normal} vbox or
-hbox. For \type{sub_mlist}, the \type{list} points to a math list
+\type{sub_box}, the \type{head} points to a \quote{normal} vbox or
+hbox. For \type{sub_mlist}, the \type{head} points to a math list
that is yet to be converted.
-A warning: never assign a node list to the components field
+A warning: never assign a node list to the \type{head} field
unless you are sure its internal link structure is correct, otherwise
an error may be result.
+Note: the new field name \type{head} was introduced in 0.65 to replace
+the old name \type{list}. Use of the name \type{list} is now
+deprecated, but it will stay available until at least version 0.80.
+
\subsubsection{Math delimiter subnode}
There is a fifth subnode type that is used exclusively for delimiter
@@ -8216,7 +9115,8 @@ fields. As before, the \type{next} and \type{prev} fields are unused.
\subsubsubsection{delim subnodes}
-Valid fields: \showfields{delim}
+Valid fields: \showfields{delim}\crlf
+Id: \showid{delim}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8241,7 +9141,8 @@ separate subtypes for differentiation.
\subsubsubsection{simple nodes}
-Valid fields: \showfields{noad}
+Valid fields: \showfields{noad}\crlf
+Id: \showid{noad}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8274,10 +9175,14 @@ Operators are a bit special because they occupy three subtypes.
\subsubsubsection{accent nodes}
-Valid fields: \showfields{accent}
+Valid fields: \showfields{accent}\crlf
+Id: \showid{accent}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
+\NC subtype \NC number \NC the first bit is used for a fixed top accent flag (if the \type{accent} field is present),
+ the second bit for a fixed bottom accent flag (if the \type{bot_accent} field is present).
+ Example: the actual value \type{3} means: do not stretch either accent\NC\NR
\NC attr \NC \syntax{<node>}\NC \NC\NR
\NC nucleus \NC \syntax{<kernel>}\NC \NC \NR
\NC sub \NC \syntax{<kernel>}\NC \NC\NR
@@ -8288,7 +9193,8 @@ Valid fields: \showfields{accent}
\subsubsubsection{style nodes}
-Valid fields: \showfields{style}
+Valid fields: \showfields{style}\crlf
+Id: \showid{style}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8302,7 +9208,8 @@ Each of these can have a trailing \type{'} to signify
\subsubsubsection{choice nodes}
-Valid fields: \showfields{choice}
+Valid fields: \showfields{choice}\crlf
+Id: \showid{choice}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8319,7 +9226,8 @@ correct, otherwise an error may be result.
\subsubsubsection{radical nodes}
-Valid fields: \showfields{radical}
+Valid fields: \showfields{radical}\crlf
+Id: \showid{radical}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8338,7 +9246,8 @@ an error may be result.
\subsubsubsection{fraction nodes}
-Valid fields: \showfields{fraction}
+Valid fields: \showfields{fraction}\crlf
+Id: \showid{fraction}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8356,7 +9265,8 @@ an error may be result.
\subsubsubsection{fence nodes}
-Valid fields: \showfields{fence}
+Valid fields: \showfields{fence}\crlf
+Id: \showid{fence}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8371,15 +9281,16 @@ Valid fields: \showfields{fence}
Whatsit nodes come in many subtypes that you can ask for by running
\luatex{node.whatsits()}:
-\ctxlua {for n,name in table.sortedpairs(node.whatsits()) do
- if (n<100) then
+\ctxlua {for n,name in table.sortedpairs(node.whatsits()) do
+ if (n<100) then
if (n>0) then tex.sprint (', ') end
- tex.sprint('\\type{' .. name .. '} (' .. n .. ')') end
+ tex.sprint('\\type{' .. name .. '} (' .. n .. ')') end
end }
\subsubsection{open nodes}
-Valid fields: \showfields{whatsit,open}
+Valid fields: \showfields{whatsit,open}\crlf
+Id: \showid{whatsit,open}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8392,7 +9303,8 @@ Valid fields: \showfields{whatsit,open}
\subsubsection{write nodes}
-Valid fields: \showfields{whatsit,write}
+Valid fields: \showfields{whatsit,write}\crlf
+Id: \showid{whatsit,write}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8403,7 +9315,8 @@ Valid fields: \showfields{whatsit,write}
\subsubsection{close nodes}
-Valid fields: \showfields{whatsit,close}
+Valid fields: \showfields{whatsit,close}\crlf
+Id: \showid{whatsit,close}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8413,7 +9326,8 @@ Valid fields: \showfields{whatsit,close}
\subsubsection{special nodes}
-Valid fields: \showfields{whatsit,special}
+Valid fields: \showfields{whatsit,special}\crlf
+Id: \showid{whatsit,special}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8431,13 +9345,14 @@ This whatsit subtype will be removed in the next release.
\subsubsection{local_par nodes}
-Valid fields: \showfields{whatsit,local_par}
+Valid fields: \showfields{whatsit,local_par}\crlf
+Id: \showid{whatsit,local_par}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
\NC attr \NC \syntax{<node>} \NC \NC\NR
-\NC pen_inter \NC number \NC interline penalty\NC\NR
-\NC pen_broken\NC number \NC broken penalty\NC\NR
+\NC pen_inter \NC number \NC local interline penalty (from \tex{localinterlinepenalty})\NC\NR
+\NC pen_broken\NC number \NC local broken penalty (from \tex{localbrokenpenalty})\NC\NR
\NC dir \NC string \NC the direction of this par. see~\in{}[dirnodes]\NC\NR
\NC box_left \NC \syntax{<node>} \NC the \tex{localleftbox}\NC\NR
\NC box_left_width\NC number\NC width of the \tex{localleftbox}\NC\NR
@@ -8454,7 +9369,8 @@ an error may be result.
\subsubsection[dirnodes]{dir nodes}
-Valid fields: \showfields{whatsit,dir}
+Valid fields: \showfields{whatsit,dir}\crlf
+Id: \showid{whatsit,dir}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8486,7 +9402,8 @@ stack.
\subsubsection{pdf_literal nodes}
-Valid fields: \showfields{whatsit,pdf_literal}
+Valid fields: \showfields{whatsit,pdf_literal}\crlf
+Id: \showid{whatsit,pdf_literal}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8495,9 +9412,19 @@ Valid fields: \showfields{whatsit,pdf_literal}
\NC data \NC string \NC the \tex{pdfliteral} information\NC\NR
\stoptabulate
+Mode values:
+
+\starttabulate[|lT|p|]
+\NC \ssbf value \NC \ssbf corresponding \tex{pdftex} keyword \NC \NR
+\NC 0 \NC setorigin \NC \NR
+\NC 0 \NC page \NC \NR
+\NC 0 \NC direct \NC \NR
+\stoptabulate
+
\subsubsection{pdf_refobj nodes}
-Valid fields: \showfields{whatsit,pdf_refobj}
+Valid fields: \showfields{whatsit,pdf_refobj}\crlf
+Id: \showid{whatsit,pdf_refobj}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8507,7 +9434,8 @@ Valid fields: \showfields{whatsit,pdf_refobj}
\subsubsection{pdf_refxform nodes}
-Valid fields: \showfields{whatsit,pdf_refxform}.
+Valid fields: \showfields{whatsit,pdf_refxform}\crlf
+Id: \showid{whatsit,pdf_refxform}.
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8522,7 +9450,8 @@ Be aware that \type{pdf_refxform} nodes have dimensions that are used by \LUATEX
\subsubsection{pdf_refximage nodes}
-Valid fields: \showfields{whatsit,pdf_refximage}
+Valid fields: \showfields{whatsit,pdf_refximage}\crlf
+Id: \showid{whatsit,pdf_refximage}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8537,7 +9466,8 @@ Be aware that \type{pdf_refximage} nodes have dimensions that are used by \LUATE
\subsubsection{pdf_annot nodes}
-Valid fields: \showfields{whatsit,pdf_annot}
+Valid fields: \showfields{whatsit,pdf_annot}\crlf
+Id: \showid{whatsit,pdf_annot}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8552,7 +9482,8 @@ Valid fields: \showfields{whatsit,pdf_annot}
\subsubsection{pdf_start_link nodes}
-Valid fields: \showfields{whatsit,pdf_start_link}
+Valid fields: \showfields{whatsit,pdf_start_link}\crlf
+Id: \showid{whatsit,pdf_start_link}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8567,7 +9498,8 @@ Valid fields: \showfields{whatsit,pdf_start_link}
\subsubsection{pdf_end_link nodes}
-Valid fields: \showfields{whatsit,pdf_end_link}
+Valid fields: \showfields{whatsit,pdf_end_link}\crlf
+Id: \showid{whatsit,pdf_end_link}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8576,7 +9508,8 @@ Valid fields: \showfields{whatsit,pdf_end_link}
\subsubsection{pdf_dest nodes}
-Valid fields: \showfields{whatsit,pdf_dest}
+Valid fields: \showfields{whatsit,pdf_dest}\crlf
+Id: \showid{whatsit,pdf_dest}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8593,7 +9526,8 @@ Valid fields: \showfields{whatsit,pdf_dest}
\subsubsection{pdf_thread nodes}
-Valid fields: \showfields{whatsit,pdf_thread}
+Valid fields: \showfields{whatsit,pdf_thread}\crlf
+Id: \showid{whatsit,pdf_thread}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8608,7 +9542,8 @@ Valid fields: \showfields{whatsit,pdf_thread}
\subsubsection{pdf_start_thread nodes}
-Valid fields: \showfields{whatsit,pdf_start_thread}
+Valid fields: \showfields{whatsit,pdf_start_thread}\crlf
+Id: \showid{whatsit,pdf_start_thread}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8623,7 +9558,8 @@ Valid fields: \showfields{whatsit,pdf_start_thread}
\subsubsection{pdf_end_thread nodes}
-Valid fields: \showfields{whatsit,pdf_end_thread}
+Valid fields: \showfields{whatsit,pdf_end_thread}\crlf
+Id: \showid{whatsit,pdf_end_thread}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8632,7 +9568,8 @@ Valid fields: \showfields{whatsit,pdf_end_thread}
\subsubsection{pdf_save_pos nodes}
-Valid fields: \showfields{whatsit,pdf_save_pos}
+Valid fields: \showfields{whatsit,pdf_save_pos}\crlf
+Id: \showid{whatsit,pdf_save_pos}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8641,18 +9578,25 @@ Valid fields: \showfields{whatsit,pdf_save_pos}
\subsubsection{late_lua nodes}
-Valid fields: \showfields{whatsit,late_lua}
+Valid fields: \showfields{whatsit,late_lua}\crlf
+Id: \showid{whatsit,late_lua}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
\NC attr \NC \syntax{<node>} \NC \NC\NR
\NC data \NC string \NC data to execute\NC\NR
+\NC string \NC string \NC data to execute (0.63)\NC\NR
\NC name \NC string \NC the name to use for lua error reporting\NC\NR
\stoptabulate
+The difference between \type{data} and \type{string} is that on
+assignment, the \type{data} field is converted to a token list, cf. use as
+\tex{latelua}. The \type{string} version is treated as a literal string.
+
\subsubsection{pdf_colorstack nodes}
-Valid fields: \showfields{whatsit,pdf_colorstack}
+Valid fields: \showfields{whatsit,pdf_colorstack}\crlf
+Id: \showid{whatsit,pdf_colorstack}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8664,7 +9608,8 @@ Valid fields: \showfields{whatsit,pdf_colorstack}
\subsubsection{pdf_setmatrix nodes}
-Valid fields: \showfields{whatsit,pdf_setmatrix}
+Valid fields: \showfields{whatsit,pdf_setmatrix}\crlf
+Id: \showid{whatsit,pdf_setmatrix}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8674,7 +9619,8 @@ Valid fields: \showfields{whatsit,pdf_setmatrix}
\subsubsection{pdf_save nodes}
-Valid fields: \showfields{whatsit,pdf_save}
+Valid fields: \showfields{whatsit,pdf_save}\crlf
+Id: \showid{whatsit,pdf_save}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8683,7 +9629,8 @@ Valid fields: \showfields{whatsit,pdf_save}
\subsubsection{pdf_restore nodes}
-Valid fields: \showfields{whatsit,pdf_restore}
+Valid fields: \showfields{whatsit,pdf_restore}\crlf
+Id: \showid{whatsit,pdf_restore}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8697,7 +9644,8 @@ code. In effect, they are an extension to the extension
mechanism. The \LUATEX\ engine will simply step over such whatsits
without ever looking at the contents.
-Valid fields: \showfields{whatsit,user_defined}
+Valid fields: \showfields{whatsit,user_defined}\crlf
+Id: \showid{whatsit,user_defined}
\starttabulate[|lT|l|p|]
\NC \ssbf field \NC \bf type \NC \bf explanation \NC\NR
@@ -8825,13 +9773,13 @@ as well as the five supporting primitives \tex{knbscode}, \tex{stbscode},
\stoptyping
\stopcolumns
-\item The four primitives that were already marked obsolete in \PDFTEX~1.40
+\item The four primitives that were already marked obsolete in \PDFTEX~1.40
have been removed since \LUATEX~0.42:
\startcolumns[n=2]
\starttyping
-\pdfoptionalwaysusepdfpagebox
-\pdfoptionpdfinclusionerrorlevel
+\pdfoptionalwaysusepdfpagebox
+\pdfoptionpdfinclusionerrorlevel
\pdfforcepagebox
\pdfmovechars
\stoptyping
@@ -8857,7 +9805,7 @@ have been removed since \LUATEX~0.42:
\item LFS (\PDF\ Files larger than 2GiB) support is not working yet.
-\item \LUATEX~0.45.0 introduces two extra token lists, \tex{pdfxformresources}
+\item \LUATEX~0.45.0 introduces two extra token lists, \tex{pdfxformresources}
and \tex{pdfxformattr}, as an alternative to \tex{pdfxform} keywords.
\item As of \LUATEX~0.50.0 is no longer possible for fonts from embedded pdf files
@@ -8872,8 +9820,25 @@ and \tex{pdfxformattr}, as an alternative to \tex{pdfxform} keywords.
\startitemize
-\item \LUATEX's OTP (\tex{ocp} and \tex{ocplist}) processing is
-deprecated, broken, and will be removed alltogether in the 0.70 beta.
+\item Starting with \LUATEX\ 0.63.0, OCP processing is no longer
+ supported at all. As a consequence, the following primitives have
+ been removed:
+
+\startcolumns[n=2]
+\starttyping
+\ocp
+\externalocp
+\ocplist
+\pushocplist
+\popocplist
+\clearocplists
+\addbeforeocplist
+\addafterocplist
+\removebeforeocplist
+\removeafterocplist
+\ocptracelevel
+\stoptyping
+\stopcolumns
\item \LUATEX\ only understands 4~of the 16~direction
specifiers of \ALEPH: \type{TLT} (latin), \type{TRT} (arabic),
@@ -8904,10 +9869,6 @@ specifiers generate an error (\LUATEX\ 0.45).
\stoptyping
\stopcolumns
-\item A small series of bounds checking fixes to \tex{ocp} and
- \tex{ocplist} has been added to prevent the system from crashing
- due to array indexes running out of bounds.
-
\item The \tex{hoffset} bug when \tex{pagedir TRT} is fixed,
removing the need for an explicit fix to \tex{hoffset}
@@ -8917,10 +9878,6 @@ removing the need for an explicit fix to \tex{hoffset}
\item A fair amount of other minor bugs are fixed as well, most of these
related to \tex{tracingcommands} output.
-\item The number of possible fonts, ocps and ocplists is
-smaller than their maximum \ALEPH\ value (around 5000 fonts and
-30000 ocps / ocplists).
-
\item The internal function \type{scan_dir()} has been renamed to
\type{scan_direction()} to prevent a naming clash, and it now allows
an optional space after the direction is completely parsed.
@@ -8931,9 +9888,6 @@ insert characters that do not fit in the BMP.
\item Glues {\it immediately after} direction change commands are not
legal breakpoints.
-\item The \tex{ocp} and \tex{ocplist} statistics at the end of a run
-are only printed if OCP's are actually used.
-
\stopitemize
\section{Changes from standard \WEBC}
@@ -8964,7 +9918,7 @@ in non|-|\LUA\ mode:
\type{openout} do not happen (however, it is easy for a \LUA\ script
to do this itself by overloading \lua{io.open}).
-\item The `E' option does not do anything useful.
+\item The \quote{E} option does not do anything useful.
\stopitemize
@@ -9027,8 +9981,8 @@ the \TEX\ \quote{equivalence table} and because each had 1.1 million
entries with a few memory words each, this makes a major difference
in memory usage.
-The \tex{catcode}, \tex{sfcode}, \tex{lccode} and \tex{uccode} assignments
-do not yet show up when using the etex tracing routines \tex{tracingassigns}
+The \tex{catcode}, \tex{sfcode}, \tex{lccode} and \tex{uccode} assignments
+do not yet show up when using the etex tracing routines \tex{tracingassigns}
and \tex{tracingrestores} (code simply not written yet).
A side|-|effect of the current implementation is that \tex{global} is
@@ -9051,7 +10005,7 @@ the length is one when it has to decide whether or not to add a
trailing space.
Active characters are internally implemented as a special type
-of multi-letter control sequences that uses a prefix that is
+of multi-letter control sequences that uses a prefix that is
otherwise impossible to obtain.
\section{Compressed format}
@@ -9077,4 +10031,4 @@ There used to be a lists of bugs and planned features below here, but that did n
work out too well. There are lists of open bugs and feature requests in the tracker at
\hyphenatedurl{http://tracker.luatex.org}.
-\stoptext
+\stoptext \ No newline at end of file