Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/XRef.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/XRef.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/XRef.h b/noncore/unsupported/qpdf/xpdf/XRef.h index a44c495..7876fa6 100644 --- a/noncore/unsupported/qpdf/xpdf/XRef.h +++ b/noncore/unsupported/qpdf/xpdf/XRef.h @@ -4,3 +4,3 @@ // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2002 Glyph & Cog, LLC // @@ -26,3 +26,3 @@ class Stream; struct XRefEntry { - int offset; + Guint offset; int gen; @@ -43,2 +43,5 @@ public: + // Get the error code (if isOk() returns false). + int getErrorCode() { return errCode; } + // Is the file encrypted? @@ -70,3 +73,3 @@ public: // Return the offset of the last xref table. - int getLastXRefPos() { return lastXRefPos; } + Guint getLastXRefPos() { return lastXRefPos; } @@ -77,4 +80,4 @@ public: // Get end position for a stream in a damaged file. - // Returns -1 if unknown or file is not damaged. - int getStreamEnd(int streamStart); + // Returns false if unknown or file is not damaged. + GBool getStreamEnd(Guint streamStart, Guint *streamEnd); @@ -83,3 +86,3 @@ private: BaseStream *str; // input stream - int start; // offset in file (to allow for garbage + Guint start; // offset in file (to allow for garbage // at beginning of file) @@ -89,5 +92,6 @@ private: GBool ok; // true if xref table is valid + int errCode; // error code (if <ok> is false) Object trailerDict; // trailer dictionary - int lastXRefPos; // offset of last xref table - int *streamEnds; // 'endstream' positions - only used in + Guint lastXRefPos; // offset of last xref table + Guint *streamEnds; // 'endstream' positions - only used in // damaged files @@ -104,6 +108,7 @@ private: - int readTrailer(); - GBool readXRef(int *pos); + Guint readTrailer(); + GBool readXRef(Guint *pos); GBool constructXRef(); GBool checkEncrypted(GString *ownerPassword, GString *userPassword); + Guint strToUnsigned(char *s); }; |