summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2012-12-18 14:01:06 +0000
committerdrochner <drochner@pkgsrc.org>2012-12-18 14:01:06 +0000
commit4746ddaac2d3f77cd996f547665719cfcacaadf7 (patch)
tree423c0c0984ff2ae8ebe99a2a07f7d20907529206
parent14912b91093a54b3227ba1b71c69803076a1eb30 (diff)
downloadpkgsrc-4746ddaac2d3f77cd996f547665719cfcacaadf7.tar.gz
update to 0.48.4
changes: -bugfixes -patches to allow build against newer png and poppler were included -security fix for "XXE" vulneralility: inkscape could be used to put contents of other files into SVG output
-rw-r--r--graphics/inkscape/Makefile5
-rw-r--r--graphics/inkscape/distinfo14
-rw-r--r--graphics/inkscape/patches/patch-ah28
-rw-r--r--graphics/inkscape/patches/patch-ak13
-rw-r--r--graphics/inkscape/patches/patch-al13
-rw-r--r--graphics/inkscape/patches/patch-am27
-rw-r--r--graphics/inkscape/patches/patch-ar538
7 files changed, 30 insertions, 608 deletions
diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile
index 7529728f42b..07e3c6344e5 100644
--- a/graphics/inkscape/Makefile
+++ b/graphics/inkscape/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.80 2012/10/08 23:01:45 adam Exp $
+# $NetBSD: Makefile,v 1.81 2012/12/18 14:01:06 drochner Exp $
-DISTNAME= inkscape-0.48.3.1
-PKGREVISION= 9
+DISTNAME= inkscape-0.48.4
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=inkscape/}
EXTRACT_SUFX= .tar.bz2
diff --git a/graphics/inkscape/distinfo b/graphics/inkscape/distinfo
index 1d135f0c421..5738e1a1844 100644
--- a/graphics/inkscape/distinfo
+++ b/graphics/inkscape/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.43 2012/11/18 15:40:55 adam Exp $
+$NetBSD: distinfo,v 1.44 2012/12/18 14:01:06 drochner Exp $
-SHA1 (inkscape-0.48.3.1.tar.bz2) = 23344555a1b5cc7909ad01d926cfaddb67bfbde9
-RMD160 (inkscape-0.48.3.1.tar.bz2) = 139720f01b987001b558226ec2de60b36fb1123c
-Size (inkscape-0.48.3.1.tar.bz2) = 19688778 bytes
+SHA1 (inkscape-0.48.4.tar.bz2) = 5f26f6ad191d1e7c2a9fb69a438722beb172224c
+RMD160 (inkscape-0.48.4.tar.bz2) = b089ced7694a9803fac8588d93e7e6239c71d3e8
+Size (inkscape-0.48.4.tar.bz2) = 19712522 bytes
SHA1 (patch-aa) = d946236902fc6cf0d2ddcbb9dd667b4d9c6f99d4
SHA1 (patch-ab) = b70ffa613c054c26185d4728da4133aed6d88e63
SHA1 (patch-ac) = 01caeac029e0ce7e4c4e2b6a9a80b76d9f9b495e
@@ -10,15 +10,11 @@ SHA1 (patch-ad) = 3136850b7d34370feb951fc8fdde8cda78d54d60
SHA1 (patch-ae) = 2b3f06a545d3cf27f59d41619528c59ac142c758
SHA1 (patch-af) = 5f9317fcb7a798afc569aada9683fb1c7f6ba4c7
SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b
-SHA1 (patch-ah) = ac8c6b1783b4982c3c65cb2bc5c0445a3af6fb44
+SHA1 (patch-ah) = 6da5e0651b583f925debed97faaf6800f88463da
SHA1 (patch-ai) = 1cd8e744848d6b52ffb4f07922e09689b5e43f61
SHA1 (patch-aj) = 8564ee2d4e884dc31e4ad4232267f6fad09f71ee
-SHA1 (patch-ak) = ec222b8d964b9b297d5284eef771411dd100f04e
-SHA1 (patch-al) = 1ab7727a232001e9962dd34f125b220cb0ea889c
-SHA1 (patch-am) = 2307f1ab4bb628d9babaeadb5783073f62eedaca
SHA1 (patch-ap) = cd29bd178dc2c6c9456bc09d6663d6a25acc7da1
SHA1 (patch-aq) = dd307f598741cd5f0ff35eb06dff7c685752a979
-SHA1 (patch-ar) = 424a0b143564e693ccafc1d4c29071f1061a29e6
SHA1 (patch-src_2geom_basic-intersection.cpp) = 743b13293191a74d4c0c22231e5ed7866219dfee
SHA1 (patch-src_2geom_solve-bezier-parametric.cpp) = 71cca994451b1e7d5aba625600089d1e4a47888e
SHA1 (patch-src_color-profile.cpp) = 14932b25ed333925518d5140b3691a29e155cd9a
diff --git a/graphics/inkscape/patches/patch-ah b/graphics/inkscape/patches/patch-ah
index c8ba1a5bb27..cc50688b02e 100644
--- a/graphics/inkscape/patches/patch-ah
+++ b/graphics/inkscape/patches/patch-ah
@@ -1,13 +1,31 @@
-$NetBSD: patch-ah,v 1.5 2011/02/05 07:57:15 adam Exp $
+$NetBSD: patch-ah,v 1.6 2012/12/18 14:01:06 drochner Exp $
---- packaging/macosx/Resources/bin/inkscape.orig 2009-11-16 18:29:06.000000000 +0100
+--- packaging/macosx/Resources/bin/inkscape.orig 2012-12-13 17:00:46.000000000 +0000
+++ packaging/macosx/Resources/bin/inkscape
-@@ -113,7 +113,7 @@ fi
+@@ -114,7 +114,7 @@ fi
# If the AppleCollationOrder preference doesn't exist, we fall back to using
# the AppleLocale preference.
LANGSTR=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null`
--if [ "x$LANGSTR" == "x" ]
-+if [ "x$LANGSTR" = "x" ]
+-if [ "x$LANGSTR" == "x" -o "x$LANGSTR" == "xroot" ]
++if [ "x$LANGSTR" = "x" -o "x$LANGSTR" = "xroot" ]
then
echo "Warning: AppleCollationOrder setting not found, using AppleLocale." 1>&2
LANGSTR=`defaults read .GlobalPreferences AppleLocale 2>/dev/null | \
+@@ -126,7 +126,7 @@ fi
+
+ # NOTE: Have to add ".UTF-8" to the LANG since omitting causes Inkscape
+ # to crash on startup in locale_from_utf8().
+-if [ "x$LANGSTR" == "x" ]
++if [ "x$LANGSTR" = "x" ]
+ then
+ # override broken script
+ echo "Overriding empty LANGSTR" 1>&2
+@@ -134,7 +134,7 @@ then
+ else
+ tmpLANG="`grep \"\`echo $LANGSTR\`_\" /usr/share/locale/locale.alias | \
+ tail -n1 | sed 's/\./ /' | awk '{print $2}'`"
+- if [ "x$tmpLANG" == "x" ]
++ if [ "x$tmpLANG" = "x" ]
+ then
+ # override broken script
+ echo "Overriding empty LANG from /usr/share/locale/locale.alias" 1>&2
diff --git a/graphics/inkscape/patches/patch-ak b/graphics/inkscape/patches/patch-ak
deleted file mode 100644
index f68f8355dd4..00000000000
--- a/graphics/inkscape/patches/patch-ak
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ak,v 1.5 2011/01/16 18:18:19 tnn Exp $
-
---- src/sp-image.cpp.orig 2010-07-13 03:48:40.000000000 +0000
-+++ src/sp-image.cpp
-@@ -388,7 +388,7 @@ static bool readPngAndHeaders( PushPull
- {
- char* name = 0;
- int compression_type = 0;
-- char* profile = 0;
-+ png_byte* profile = 0;
- png_uint_32 proflen = 0;
- if ( png_get_iCCP(pngPtr, infoPtr, &name, &compression_type, &profile, &proflen) ) {
- // g_message("Found an iCCP chunk named [%s] with %d bytes and comp %d", name, proflen, compression_type);
diff --git a/graphics/inkscape/patches/patch-al b/graphics/inkscape/patches/patch-al
deleted file mode 100644
index fc59a0af97e..00000000000
--- a/graphics/inkscape/patches/patch-al
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-al,v 1.3 2011/01/16 18:18:19 tnn Exp $
-
---- src/helper/png-write.cpp.orig 2010-07-13 03:48:40.000000000 +0000
-+++ src/helper/png-write.cpp
-@@ -165,7 +165,7 @@ sp_png_write_rgba_striped(SPDocument *do
- /* Set error handling. REQUIRED if you aren't supplying your own
- * error hadnling functions in the png_create_write_struct() call.
- */
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- /* If we get here, we had a problem reading the file */
- fclose(fp);
- png_destroy_write_struct(&png_ptr, &info_ptr);
diff --git a/graphics/inkscape/patches/patch-am b/graphics/inkscape/patches/patch-am
deleted file mode 100644
index b7146129550..00000000000
--- a/graphics/inkscape/patches/patch-am
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-am,v 1.6 2012/07/05 10:23:31 wiz Exp $
-
-First chunk: Fix build with poppler-0.20.
-Second chunk: Fix build with png-1.5.
-
---- src/extension/internal/pdfinput/svg-builder.cpp.orig 2011-07-08 18:25:09.000000000 +0000
-+++ src/extension/internal/pdfinput/svg-builder.cpp
-@@ -961,9 +961,7 @@ void SvgBuilder::updateFont(GfxState *st
- _font_style = sp_repr_css_attr_new();
- GfxFont *font = state->getFont();
- // Store original name
-- if (font->getOrigName()) {
-- _font_specification = font->getOrigName()->getCString();
-- } else if (font->getName()) {
-+ if (font->getName()) {
- _font_specification = font->getName()->getCString();
- } else {
- _font_specification = (char*) "Arial";
-@@ -1443,7 +1441,7 @@ Inkscape::XML::Node *SvgBuilder::_create
- return NULL;
- }
- // Set error handler
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- png_destroy_write_struct(&png_ptr, &info_ptr);
- return NULL;
- }
diff --git a/graphics/inkscape/patches/patch-ar b/graphics/inkscape/patches/patch-ar
deleted file mode 100644
index 4c614259c8b..00000000000
--- a/graphics/inkscape/patches/patch-ar
+++ /dev/null
@@ -1,538 +0,0 @@
-$NetBSD: patch-ar,v 1.3 2012/11/18 15:40:55 adam Exp $
-
-Fix build with poppler-0.20.
-
---- src/extension/internal/pdfinput/pdf-parser.cpp.orig 2011-07-08 18:25:09.000000000 +0000
-+++ src/extension/internal/pdfinput/pdf-parser.cpp
-@@ -11,6 +11,7 @@
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
-+#define POPPLER_NEW_COLOR_SPACE_API 1
-
- #ifdef HAVE_POPPLER
-
-@@ -36,20 +37,20 @@ extern "C" {
- #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 "poppler/GlobalParams.h"
-+#include "poppler/CharTypes.h"
-+#include "poppler/Object.h"
-+#include "poppler/Array.h"
-+#include "poppler/Dict.h"
-+#include "poppler/Stream.h"
-+#include "poppler/Lexer.h"
-+#include "poppler/Parser.h"
-+#include "poppler/GfxFont.h"
-+#include "poppler/GfxState.h"
-+#include "poppler/OutputDev.h"
-+#include "poppler/Page.h"
-+#include "poppler/Annot.h"
-+#include "poppler/Error.h"
-
- // the MSVC math.h doesn't define this
- #ifndef M_PI
-@@ -367,14 +368,14 @@ void PdfParser::parse(Object *obj, GBool
- for (i = 0; i < obj->arrayGetLength(); ++i) {
- obj->arrayGet(i, &obj2);
- if (!obj2.isStream()) {
-- error(-1, const_cast<char*>("Weird page contents"));
-+ error(errInternal, -1, const_cast<char*>("Weird page contents"));
- obj2.free();
- return;
- }
- obj2.free();
- }
- } else if (!obj->isStream()) {
-- error(-1, const_cast<char*>("Weird page contents"));
-+ error(errInternal, -1, const_cast<char*>("Weird page contents"));
- return;
- }
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
-@@ -419,7 +420,7 @@ void PdfParser::go(GBool topLevel) {
-
- // too many arguments - something is wrong
- } else {
-- error(getPos(), const_cast<char*>("Too many args in content stream"));
-+ error(errInternal, getPos(), const_cast<char*>("Too many args in content stream"));
- if (printCommands) {
- printf("throwing away arg: ");
- obj.print(stdout);
-@@ -436,7 +437,7 @@ void PdfParser::go(GBool topLevel) {
-
- // args at end with no command
- if (numArgs > 0) {
-- error(getPos(), const_cast<char*>("Leftover args in content stream"));
-+ error(errInternal, getPos(), const_cast<char*>("Leftover args in content stream"));
- if (printCommands) {
- printf("%d leftovers:", numArgs);
- for (i = 0; i < numArgs; ++i) {
-@@ -502,7 +503,7 @@ void PdfParser::execOp(Object *cmd, Obje
- name = cmd->getCmd();
- if (!(op = findOp(name))) {
- if (ignoreUndef == 0)
-- error(getPos(), const_cast<char*>("Unknown operator '%s'"), name);
-+ error(errInternal, getPos(), const_cast<char*>("Unknown operator '%s'"), name);
- return;
- }
-
-@@ -510,26 +511,26 @@ void PdfParser::execOp(Object *cmd, Obje
- argPtr = args;
- if (op->numArgs >= 0) {
- if (numArgs < op->numArgs) {
-- error(getPos(), const_cast<char*>("Too few (%d) args to '%s' operator"), numArgs, name);
-+ error(errInternal, getPos(), const_cast<char*>("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);
-+ error(errInternal, 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(), const_cast<char*>("Too many (%d) args to '%s' operator"),
-+ error(errInternal, getPos(), const_cast<char*>("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(), const_cast<char*>("Arg #%d to '%s' operator is wrong type (%s)"),
-+ error(errInternal, getPos(), const_cast<char*>("Arg #%d to '%s' operator is wrong type (%s)"),
- i, name, argPtr[i].getTypeName());
- return;
- }
-@@ -690,7 +691,7 @@ void PdfParser::opSetExtGState(Object ar
- return;
- }
- if (!obj1.isDict()) {
-- error(getPos(), const_cast<char*>("ExtGState '%s' is wrong type"), args[0].getName());
-+ error(errInternal, getPos(), const_cast<char*>("ExtGState '%s' is wrong type"), args[0].getName());
- obj1.free();
- return;
- }
-@@ -705,7 +706,7 @@ void PdfParser::opSetExtGState(Object ar
- if (state->parseBlendMode(&obj2, &mode)) {
- state->setBlendMode(mode);
- } else {
-- error(getPos(), const_cast<char*>("Invalid blend mode in ExtGState"));
-+ error(errInternal, getPos(), const_cast<char*>("Invalid blend mode in ExtGState"));
- }
- }
- obj2.free();
-@@ -764,7 +765,7 @@ void PdfParser::opSetExtGState(Object ar
- state->setTransfer(funcs);
- }
- } else if (!obj2.isNull()) {
-- error(getPos(), const_cast<char*>("Invalid transfer function in ExtGState"));
-+ error(errInternal, getPos(), const_cast<char*>("Invalid transfer function in ExtGState"));
- }
- obj2.free();
-
-@@ -784,7 +785,7 @@ void PdfParser::opSetExtGState(Object ar
- funcs[0] = Function::parse(&obj3);
- if (funcs[0]->getInputSize() != 1 ||
- funcs[0]->getOutputSize() != 1) {
-- error(getPos(),
-+ error(errInternal, getPos(),
- const_cast<char*>("Invalid transfer function in soft mask in ExtGState"));
- delete funcs[0];
- funcs[0] = NULL;
-@@ -840,15 +841,15 @@ void PdfParser::opSetExtGState(Object ar
- delete funcs[0];
- }
- } else {
-- error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
-+ error(errInternal, getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
- }
- obj4.free();
- } else {
-- error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
-+ error(errInternal, getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
- }
- obj3.free();
- } else if (!obj2.isNull()) {
-- error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState"));
-+ error(errInternal, getPos(), const_cast<char*>("Invalid soft mask in ExtGState"));
- }
- }
- obj2.free();
-@@ -876,7 +877,7 @@ void PdfParser::doSoftMask(Object *str,
- // check form type
- dict->lookup(const_cast<char*>("FormType"), &obj1);
- if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
-- error(getPos(), const_cast<char*>("Unknown form type"));
-+ error(errInternal, getPos(), const_cast<char*>("Unknown form type"));
- }
- obj1.free();
-
-@@ -884,7 +885,7 @@ void PdfParser::doSoftMask(Object *str,
- dict->lookup(const_cast<char*>("BBox"), &obj1);
- if (!obj1.isArray()) {
- obj1.free();
-- error(getPos(), const_cast<char*>("Bad form bounding box"));
-+ error(errInternal, getPos(), const_cast<char*>("Bad form bounding box"));
- return;
- }
- for (i = 0; i < 4; ++i) {
-@@ -1032,7 +1033,7 @@ void PdfParser::opSetFillColorSpace(Obje
- state->setFillColor(&color);
- builder->updateStyle(state);
- } else {
-- error(getPos(), const_cast<char*>("Bad color space (fill)"));
-+ error(errInternal, getPos(), const_cast<char*>("Bad color space (fill)"));
- }
- }
-
-@@ -1063,7 +1064,7 @@ void PdfParser::opSetStrokeColorSpace(Ob
- state->setStrokeColor(&color);
- builder->updateStyle(state);
- } else {
-- error(getPos(), const_cast<char*>("Bad color space (stroke)"));
-+ error(errInternal, getPos(), const_cast<char*>("Bad color space (stroke)"));
- }
- }
-
-@@ -1072,7 +1073,7 @@ void PdfParser::opSetFillColor(Object ar
- int i;
-
- if (numArgs != state->getFillColorSpace()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'sc' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'sc' command"));
- return;
- }
- state->setFillPattern(NULL);
-@@ -1088,7 +1089,7 @@ void PdfParser::opSetStrokeColor(Object
- int i;
-
- if (numArgs != state->getStrokeColorSpace()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SC' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'SC' command"));
- return;
- }
- state->setStrokePattern(NULL);
-@@ -1109,7 +1110,7 @@ void PdfParser::opSetFillColorN(Object a
- if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() ||
- numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace())
- ->getUnder()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
- return;
- }
- for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
-@@ -1136,7 +1137,7 @@ void PdfParser::opSetFillColorN(Object a
-
- } else {
- if (numArgs != state->getFillColorSpace()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
- return;
- }
- state->setFillPattern(NULL);
-@@ -1161,7 +1162,7 @@ void PdfParser::opSetStrokeColorN(Object
- ->getUnder() ||
- numArgs - 1 != ((GfxPatternColorSpace *)state->getStrokeColorSpace())
- ->getUnder()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
- return;
- }
- for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
-@@ -1188,7 +1189,7 @@ void PdfParser::opSetStrokeColorN(Object
-
- } else {
- if (numArgs != state->getStrokeColorSpace()->getNComps()) {
-- error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
-+ error(errInternal, getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
- return;
- }
- state->setStrokePattern(NULL);
-@@ -1212,7 +1213,7 @@ void PdfParser::opMoveTo(Object args[],
-
- void PdfParser::opLineTo(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- error(getPos(), const_cast<char*>("No current point in lineto"));
-+ error(errInternal, getPos(), const_cast<char*>("No current point in lineto"));
- return;
- }
- state->lineTo(args[0].getNum(), args[1].getNum());
-@@ -1222,7 +1223,7 @@ void PdfParser::opCurveTo(Object args[],
- double x1, y1, x2, y2, x3, y3;
-
- if (!state->isCurPt()) {
-- error(getPos(), const_cast<char*>("No current point in curveto"));
-+ error(errInternal, getPos(), const_cast<char*>("No current point in curveto"));
- return;
- }
- x1 = args[0].getNum();
-@@ -1238,7 +1239,7 @@ void PdfParser::opCurveTo1(Object args[]
- double x1, y1, x2, y2, x3, y3;
-
- if (!state->isCurPt()) {
-- error(getPos(), const_cast<char*>("No current point in curveto1"));
-+ error(errInternal, getPos(), const_cast<char*>("No current point in curveto1"));
- return;
- }
- x1 = state->getCurX();
-@@ -1254,7 +1255,7 @@ void PdfParser::opCurveTo2(Object args[]
- double x1, y1, x2, y2, x3, y3;
-
- if (!state->isCurPt()) {
-- error(getPos(), const_cast<char*>("No current point in curveto2"));
-+ error(errInternal, getPos(), const_cast<char*>("No current point in curveto2"));
- return;
- }
- x1 = args[0].getNum();
-@@ -1282,7 +1283,7 @@ void PdfParser::opRectangle(Object args[
-
- void PdfParser::opClosePath(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- error(getPos(), const_cast<char*>("No current point in closepath"));
-+ error(errInternal, getPos(), const_cast<char*>("No current point in closepath"));
- return;
- }
- state->closePath();
-@@ -1298,7 +1299,7 @@ void PdfParser::opEndPath(Object args[],
-
- void PdfParser::opStroke(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in stroke"));
- return;
- }
- if (state->isPath()) {
-@@ -1314,7 +1315,7 @@ void PdfParser::opStroke(Object args[],
-
- void PdfParser::opCloseStroke(Object * /*args[]*/, int /*numArgs*/) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in closepath/stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in closepath/stroke"));
- return;
- }
- state->closePath();
-@@ -1331,7 +1332,7 @@ void PdfParser::opCloseStroke(Object * /
-
- void PdfParser::opFill(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in fill"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in fill"));
- return;
- }
- if (state->isPath()) {
-@@ -1347,7 +1348,7 @@ void PdfParser::opFill(Object args[], in
-
- void PdfParser::opEOFill(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in eofill"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in eofill"));
- return;
- }
- if (state->isPath()) {
-@@ -1363,7 +1364,7 @@ void PdfParser::opEOFill(Object args[],
-
- void PdfParser::opFillStroke(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in fill/stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in fill/stroke"));
- return;
- }
- if (state->isPath()) {
-@@ -1376,7 +1377,7 @@ void PdfParser::opFillStroke(Object args
-
- void PdfParser::opCloseFillStroke(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in closepath/fill/stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in closepath/fill/stroke"));
- return;
- }
- if (state->isPath()) {
-@@ -1388,7 +1389,7 @@ void PdfParser::opCloseFillStroke(Object
-
- void PdfParser::opEOFillStroke(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in eofill/stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in eofill/stroke"));
- return;
- }
- if (state->isPath()) {
-@@ -1399,7 +1400,7 @@ void PdfParser::opEOFillStroke(Object ar
-
- void PdfParser::opCloseEOFillStroke(Object args[], int numArgs) {
- if (!state->isCurPt()) {
-- //error(getPos(), const_cast<char*>("No path in closepath/eofill/stroke"));
-+ //error(errInternal, getPos(), const_cast<char*>("No path in closepath/eofill/stroke"));
- return;
- }
- if (state->isPath()) {
-@@ -1440,7 +1441,7 @@ void PdfParser::doPatternFillFallback(GB
- doShadingPatternFillFallback((GfxShadingPattern *)pattern, gFalse, eoFill);
- break;
- default:
-- error(getPos(), const_cast<char*>("Unimplemented pattern type (%d) in fill"),
-+ error(errInternal, getPos(), const_cast<char*>("Unimplemented pattern type (%d) in fill"),
- pattern->getType());
- break;
- }
-@@ -1459,7 +1460,7 @@ void PdfParser::doPatternStrokeFallback(
- doShadingPatternFillFallback((GfxShadingPattern *)pattern, gTrue, gFalse);
- break;
- default:
-- error(getPos(), const_cast<char*>("Unimplemented pattern type (%d) in stroke"),
-+ error(errInternal, getPos(), const_cast<char*>("Unimplemented pattern type (%d) in stroke"),
- pattern->getType());
- break;
- }
-@@ -2156,7 +2157,7 @@ void PdfParser::opTextNextLine(Object ar
-
- void PdfParser::opShowText(Object args[], int numArgs) {
- if (!state->getFont()) {
-- error(getPos(), const_cast<char*>("No font in show"));
-+ error(errInternal, getPos(), const_cast<char*>("No font in show"));
- return;
- }
- if (fontChanged) {
-@@ -2170,7 +2171,7 @@ void PdfParser::opMoveShowText(Object ar
- double tx, ty;
-
- if (!state->getFont()) {
-- error(getPos(), const_cast<char*>("No font in move/show"));
-+ error(errInternal, getPos(), const_cast<char*>("No font in move/show"));
- return;
- }
- if (fontChanged) {
-@@ -2188,7 +2189,7 @@ void PdfParser::opMoveSetShowText(Object
- double tx, ty;
-
- if (!state->getFont()) {
-- error(getPos(), const_cast<char*>("No font in move/set/show"));
-+ error(errInternal, getPos(), const_cast<char*>("No font in move/set/show"));
- return;
- }
- if (fontChanged) {
-@@ -2211,7 +2212,7 @@ void PdfParser::opShowSpaceText(Object a
- int i;
-
- if (!state->getFont()) {
-- error(getPos(), const_cast<char*>("No font in show/space"));
-+ error(errInternal, getPos(), const_cast<char*>("No font in show/space"));
- return;
- }
- if (fontChanged) {
-@@ -2236,7 +2237,7 @@ void PdfParser::opShowSpaceText(Object a
- } else if (obj.isString()) {
- doShowText(obj.getString());
- } else {
-- error(getPos(), const_cast<char*>("Element of show/space array must be number or string"));
-+ error(errInternal, getPos(), const_cast<char*>("Element of show/space array must be number or string"));
- }
- obj.free();
- }
-@@ -2334,7 +2335,7 @@ void PdfParser::doShowText(GooString *s)
- if (charProc.isStream()) {
- //parse(&charProc, gFalse); // TODO: parse into SVG font
- } else {
-- error(getPos(), const_cast<char*>("Missing or bad Type3 CharProc entry"));
-+ error(errInternal, getPos(), const_cast<char*>("Missing or bad Type3 CharProc entry"));
- }
- //out->endType3Char(state);
- if (resDict) {
-@@ -2410,7 +2411,7 @@ void PdfParser::opXObject(Object args[],
- return;
- }
- if (!obj1.isStream()) {
-- error(getPos(), const_cast<char*>("XObject '%s' is wrong type"), name);
-+ error(errInternal, getPos(), const_cast<char*>("XObject '%s' is wrong type"), name);
- obj1.free();
- return;
- }
-@@ -2426,9 +2427,9 @@ void PdfParser::opXObject(Object args[],
- /* out->psXObject(obj1.getStream(),
- obj3.isStream() ? obj3.getStream() : (Stream *)NULL);*/
- } else if (obj2.isName()) {
-- error(getPos(), const_cast<char*>("Unknown XObject subtype '%s'"), obj2.getName());
-+ error(errInternal, getPos(), const_cast<char*>("Unknown XObject subtype '%s'"), obj2.getName());
- } else {
-- error(getPos(), const_cast<char*>("XObject subtype is missing or wrong type"));
-+ error(errInternal, getPos(), const_cast<char*>("XObject subtype is missing or wrong type"));
- }
- obj2.free();
- obj1.free();
-@@ -2758,7 +2759,7 @@ void PdfParser::doImage(Object *ref, Str
- err2:
- obj1.free();
- err1:
-- error(getPos(), const_cast<char*>("Bad image parameters"));
-+ error(errInternal, getPos(), const_cast<char*>("Bad image parameters"));
- }
-
- void PdfParser::doForm(Object *str) {
-@@ -2783,7 +2784,7 @@ void PdfParser::doForm(Object *str) {
- // check form type
- dict->lookup(const_cast<char*>("FormType"), &obj1);
- if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
-- error(getPos(), const_cast<char*>("Unknown form type"));
-+ error(errInternal, getPos(), const_cast<char*>("Unknown form type"));
- }
- obj1.free();
-
-@@ -2791,7 +2792,7 @@ void PdfParser::doForm(Object *str) {
- dict->lookup(const_cast<char*>("BBox"), &bboxObj);
- if (!bboxObj.isArray()) {
- bboxObj.free();
-- error(getPos(), const_cast<char*>("Bad form bounding box"));
-+ error(errInternal, getPos(), const_cast<char*>("Bad form bounding box"));
- return;
- }
- for (i = 0; i < 4; ++i) {
-@@ -2990,7 +2991,7 @@ Stream *PdfParser::buildImageStream() {
- parser->getObj(&obj);
- while (!obj.isCmd(const_cast<char*>("ID")) && !obj.isEOF()) {
- if (!obj.isName()) {
-- error(getPos(), const_cast<char*>("Inline image dictionary key must be a name object"));
-+ error(errInternal, getPos(), const_cast<char*>("Inline image dictionary key must be a name object"));
- obj.free();
- } else {
- key = copyString(obj.getName());
-@@ -3005,7 +3006,7 @@ Stream *PdfParser::buildImageStream() {
- parser->getObj(&obj);
- }
- if (obj.isEOF()) {
-- error(getPos(), const_cast<char*>("End of file in inline image"));
-+ error(errInternal, getPos(), const_cast<char*>("End of file in inline image"));
- obj.free();
- dict.free();
- return NULL;
-@@ -3020,11 +3021,11 @@ Stream *PdfParser::buildImageStream() {
- }
-
- void PdfParser::opImageData(Object args[], int numArgs) {
-- error(getPos(), const_cast<char*>("Internal: got 'ID' operator"));
-+ error(errInternal, getPos(), const_cast<char*>("Internal: got 'ID' operator"));
- }
-
- void PdfParser::opEndImage(Object args[], int numArgs) {
-- error(getPos(), const_cast<char*>("Internal: got 'EI' operator"));
-+ error(errInternal, getPos(), const_cast<char*>("Internal: got 'EI' operator"));
- }
-
- //------------------------------------------------------------------------