summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-10-12 11:49:00 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-10-12 11:49:00 +0000
commitb151324ce8df6fb72fde191a90ba892eba91254a (patch)
treea2669915972f247138ff4e3a7725f252c3f37174
parentd4f3fb5aa14cf5baf137774ff28f05285e3a159a (diff)
xpdf: Remove obsolete patch (no longer required for pdftosrc)
git-svn-id: svn://tug.org/texlive/trunk@24272 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/xpdf/xpdf-3.03-PATCHES/ChangeLog8
-rw-r--r--Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-40-objectStream-support-for-pdftosrc171
-rw-r--r--Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.cc37
-rw-r--r--Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.h41
4 files changed, 38 insertions, 219 deletions
diff --git a/Build/source/libs/xpdf/xpdf-3.03-PATCHES/ChangeLog b/Build/source/libs/xpdf/xpdf-3.03-PATCHES/ChangeLog
index ca3ebf75554..744ac518ad9 100644
--- a/Build/source/libs/xpdf/xpdf-3.03-PATCHES/ChangeLog
+++ b/Build/source/libs/xpdf/xpdf-3.03-PATCHES/ChangeLog
@@ -1,5 +1,10 @@
2011-08-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * patch-40-objectStream-support-for-pdftosrc: Removed, no longer
+ required with new logic for Object Streams in pdftosrc.cc.
+
+2011-08-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
Imported xpdf-3.03 source tree:
ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz
@@ -8,8 +13,7 @@
* patch-10-exclude-body-of-Page_getDefaultCTM, patch-12-mingw32,
patch-20-skip-reading-config-file,
patch-22-exclude-openTempFile,
- patch-40-objectStream-support-for-pdftosrc,
- patch-60-bug-fix: Adapted.
+ patch-40-objectStream-support-for-pdftosrc: Adapted.
2010-12-02 Karl Berry <karl@tug.org>
diff --git a/Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-40-objectStream-support-for-pdftosrc b/Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-40-objectStream-support-for-pdftosrc
deleted file mode 100644
index c8ff5422783..00000000000
--- a/Build/source/libs/xpdf/xpdf-3.03-PATCHES/patch-40-objectStream-support-for-pdftosrc
+++ /dev/null
@@ -1,171 +0,0 @@
- Patches for pdfTeX / luaTeX / XeTeX
-
- Object stream support for pdftosrc
-
- from:
- Han The Thanh <thanh@pdftex.org>
-
-diff -ur -N xpdf-3.03.orig/xpdf/XRef.cc xpdf-3.03/xpdf/XRef.cc
---- xpdf-3.03.orig/xpdf/XRef.cc 2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/XRef.cc 2011-08-22 14:38:50.000000000 +0200
-@@ -5,6 +5,9 @@
- // Copyright 1996-2003 Glyph & Cog, LLC
- //
- //========================================================================
-+// Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
-+// See top-level ChangeLog for a list of all modifications
-+//========================================================================
-
- #include <aconf.h>
-
-@@ -46,37 +49,9 @@
- // 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;
-
-@@ -84,6 +59,7 @@
- nObjects = 0;
- objs = NULL;
- objNums = NULL;
-+ offsets = NULL;
- ok = gFalse;
-
- if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
-@@ -105,6 +81,7 @@
- goto err1;
- }
- first = obj1.getInt();
-+ firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
- obj1.free();
- if (first < 0) {
- goto err1;
-@@ -133,7 +110,6 @@
- obj1.free();
- obj2.free();
- delete parser;
-- gfree(offsets);
- goto err1;
- }
- objNums[i] = obj1.getInt();
-@@ -143,7 +119,6 @@
- if (objNums[i] < 0 || offsets[i] < 0 ||
- (i > 0 && offsets[i] < offsets[i-1])) {
- delete parser;
-- gfree(offsets);
- goto err1;
- }
- }
-@@ -172,7 +147,6 @@
- delete parser;
- }
-
-- gfree(offsets);
- ok = gTrue;
-
- err1:
-@@ -189,6 +163,7 @@
- delete[] objs;
- }
- gfree(objNums);
-+ gfree(offsets);
- }
-
- Object *ObjectStream::getObject(int objIdx, int objNum, Object *obj) {
-diff -ur -N xpdf-3.03.orig/xpdf/XRef.h xpdf-3.03/xpdf/XRef.h
---- xpdf-3.03.orig/xpdf/XRef.h 2011-08-15 23:08:53.000000000 +0200
-+++ xpdf-3.03/xpdf/XRef.h 2011-08-22 14:33:29.000000000 +0200
-@@ -5,6 +5,9 @@
- // Copyright 1996-2003 Glyph & Cog, LLC
- //
- //========================================================================
-+// Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
-+// See top-level ChangeLog for a list of all modifications
-+//========================================================================
-
- #ifndef XREF_H
- #define XREF_H
-@@ -21,7 +24,42 @@
- class Dict;
- class Stream;
- class Parser;
--class ObjectStream;
-+
-+//------------------------------------------------------------------------
-+// 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);
-+
-+ int *getOffsets() { return offsets; }
-+ Guint getFirstOffset() { return firstOffset; }
-+
-+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)
-+ int *offsets; // the object offsets (length = nObjects)
-+ Guint firstOffset;
-+ GBool ok;
-+};
-
- //------------------------------------------------------------------------
- // XRef
-@@ -97,6 +135,7 @@
- int getSize() { return size; }
- XRefEntry *getEntry(int i) { return &entries[i]; }
- Object *getTrailerDict() { return &trailerDict; }
-+ ObjectStream *getObjStr() { return objStr; }
-
- private:
-
diff --git a/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.cc b/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.cc
index a5943432656..83322c3b4dc 100644
--- a/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.cc
+++ b/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.cc
@@ -5,9 +5,6 @@
// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
-// Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
-// See top-level ChangeLog for a list of all modifications
-//========================================================================
#include <aconf.h>
@@ -49,9 +46,37 @@
// 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;
@@ -59,7 +84,6 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
nObjects = 0;
objs = NULL;
objNums = NULL;
- offsets = NULL;
ok = gFalse;
if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
@@ -81,7 +105,6 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
goto err1;
}
first = obj1.getInt();
- firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
obj1.free();
if (first < 0) {
goto err1;
@@ -110,6 +133,7 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
obj1.free();
obj2.free();
delete parser;
+ gfree(offsets);
goto err1;
}
objNums[i] = obj1.getInt();
@@ -119,6 +143,7 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
if (objNums[i] < 0 || offsets[i] < 0 ||
(i > 0 && offsets[i] < offsets[i-1])) {
delete parser;
+ gfree(offsets);
goto err1;
}
}
@@ -147,6 +172,7 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
delete parser;
}
+ gfree(offsets);
ok = gTrue;
err1:
@@ -163,7 +189,6 @@ ObjectStream::~ObjectStream() {
delete[] objs;
}
gfree(objNums);
- gfree(offsets);
}
Object *ObjectStream::getObject(int objIdx, int objNum, Object *obj) {
diff --git a/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.h b/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.h
index f5a80fe409f..f2c4ac300a6 100644
--- a/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.h
+++ b/Build/source/libs/xpdf/xpdf-3.03/xpdf/XRef.h
@@ -5,9 +5,6 @@
// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
-// Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
-// See top-level ChangeLog for a list of all modifications
-//========================================================================
#ifndef XREF_H
#define XREF_H
@@ -24,42 +21,7 @@
class Dict;
class Stream;
class Parser;
-
-//------------------------------------------------------------------------
-// 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);
-
- int *getOffsets() { return offsets; }
- Guint getFirstOffset() { return firstOffset; }
-
-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)
- int *offsets; // the object offsets (length = nObjects)
- Guint firstOffset;
- GBool ok;
-};
+class ObjectStream;
//------------------------------------------------------------------------
// XRef
@@ -135,7 +97,6 @@ public:
int getSize() { return size; }
XRefEntry *getEntry(int i) { return &entries[i]; }
Object *getTrailerDict() { return &trailerDict; }
- ObjectStream *getObjStr() { return objStr; }
private: