git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed log output in case only t1lib is activated.
[swftools.git]
/
pdf2swf
/
xpdf
/
XRef.h
diff --git
a/pdf2swf/xpdf/XRef.h
b/pdf2swf/xpdf/XRef.h
index
7876fa6
..
bec487a
100644
(file)
--- a/
pdf2swf/xpdf/XRef.h
+++ b/
pdf2swf/xpdf/XRef.h
@@
-2,14
+2,16
@@
//
// XRef.h
//
//
// XRef.h
//
-// Copyright 1996-2002 Glyph & Cog, LLC
+// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
#ifndef XREF_H
#define XREF_H
//
//========================================================================
#ifndef XREF_H
#define XREF_H
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#pragma interface
#endif
@@
-18,15
+20,23
@@
class Dict;
class Stream;
class Dict;
class Stream;
+class Parser;
+class ObjectStream;
//------------------------------------------------------------------------
// XRef
//------------------------------------------------------------------------
//------------------------------------------------------------------------
// XRef
//------------------------------------------------------------------------
+enum XRefEntryType {
+ xrefEntryFree,
+ xrefEntryUncompressed,
+ xrefEntryCompressed
+};
+
struct XRefEntry {
Guint offset;
int gen;
struct XRefEntry {
Guint offset;
int gen;
- GBool used;
+ XRefEntryType type;
};
class XRef {
};
class XRef {
@@
-81,6
+91,11
@@
public:
// Returns false if unknown or file is not damaged.
GBool getStreamEnd(Guint streamStart, Guint *streamEnd);
// Returns false if unknown or file is not damaged.
GBool getStreamEnd(Guint streamStart, Guint *streamEnd);
+ // Direct access.
+ int getSize() { return size; }
+ XRefEntry *getEntry(int i) { return &entries[i]; }
+ Object *getTrailerDict() { return &trailerDict; }
+
private:
BaseStream *str; // input stream
private:
BaseStream *str; // input stream
@@
-96,6
+111,7
@@
private:
Guint *streamEnds; // 'endstream' positions - only used in
// damaged files
int streamEndsLen; // number of valid entries in streamEnds
Guint *streamEnds; // 'endstream' positions - only used in
// damaged files
int streamEndsLen; // number of valid entries in streamEnds
+ ObjectStream *objStr; // cached object stream
#ifndef NO_DECRYPTION
GBool encrypted; // true if file is encrypted
int encVersion; // encryption algorithm
#ifndef NO_DECRYPTION
GBool encrypted; // true if file is encrypted
int encVersion; // encryption algorithm
@@
-106,8
+122,11
@@
private:
GBool ownerPasswordOk; // true if owner password is correct
#endif
GBool ownerPasswordOk; // true if owner password is correct
#endif
- Guint readTrailer();
+ Guint getStartXref();
GBool readXRef(Guint *pos);
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();
GBool checkEncrypted(GString *ownerPassword, GString *userPassword);
Guint strToUnsigned(char *s);
GBool constructXRef();
GBool checkEncrypted(GString *ownerPassword, GString *userPassword);
Guint strToUnsigned(char *s);