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 @@ | |||
4 | // | 4 | // |
5 | // Copyright 1996 Derek B. Noonburg | 5 | // Copyright 1996-2002 Glyph & Cog, LLC |
6 | // | 6 | // |
@@ -26,3 +26,3 @@ class Stream; | |||
26 | struct XRefEntry { | 26 | struct XRefEntry { |
27 | int offset; | 27 | Guint offset; |
28 | int gen; | 28 | int gen; |
@@ -43,2 +43,5 @@ public: | |||
43 | 43 | ||
44 | // Get the error code (if isOk() returns false). | ||
45 | int getErrorCode() { return errCode; } | ||
46 | |||
44 | // Is the file encrypted? | 47 | // Is the file encrypted? |
@@ -70,3 +73,3 @@ public: | |||
70 | // Return the offset of the last xref table. | 73 | // Return the offset of the last xref table. |
71 | int getLastXRefPos() { return lastXRefPos; } | 74 | Guint getLastXRefPos() { return lastXRefPos; } |
72 | 75 | ||
@@ -77,4 +80,4 @@ public: | |||
77 | // Get end position for a stream in a damaged file. | 80 | // Get end position for a stream in a damaged file. |
78 | // Returns -1 if unknown or file is not damaged. | 81 | // Returns false if unknown or file is not damaged. |
79 | int getStreamEnd(int streamStart); | 82 | GBool getStreamEnd(Guint streamStart, Guint *streamEnd); |
80 | 83 | ||
@@ -83,3 +86,3 @@ private: | |||
83 | BaseStream *str; // input stream | 86 | BaseStream *str; // input stream |
84 | int start; // offset in file (to allow for garbage | 87 | Guint start; // offset in file (to allow for garbage |
85 | // at beginning of file) | 88 | // at beginning of file) |
@@ -89,5 +92,6 @@ private: | |||
89 | GBool ok; // true if xref table is valid | 92 | GBool ok; // true if xref table is valid |
93 | int errCode; // error code (if <ok> is false) | ||
90 | Object trailerDict; // trailer dictionary | 94 | Object trailerDict; // trailer dictionary |
91 | int lastXRefPos; // offset of last xref table | 95 | Guint lastXRefPos; // offset of last xref table |
92 | int *streamEnds; // 'endstream' positions - only used in | 96 | Guint *streamEnds; // 'endstream' positions - only used in |
93 | // damaged files | 97 | // damaged files |
@@ -104,6 +108,7 @@ private: | |||
104 | 108 | ||
105 | int readTrailer(); | 109 | Guint readTrailer(); |
106 | GBool readXRef(int *pos); | 110 | GBool readXRef(Guint *pos); |
107 | GBool constructXRef(); | 111 | GBool constructXRef(); |
108 | GBool checkEncrypted(GString *ownerPassword, GString *userPassword); | 112 | GBool checkEncrypted(GString *ownerPassword, GString *userPassword); |
113 | Guint strToUnsigned(char *s); | ||
109 | }; | 114 | }; |