diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-06-24 00:23:06 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-06-24 00:23:06 +0200 |
commit | 4f305488d85f9237c561f04a88570f9b0584cb0d (patch) | |
tree | 68198ee2942078b45ee9b6cef9b457ec87b5b848 /libqpdf/QPDF.cc | |
parent | 7f95ad5b92922167629919e2f3ef1f8b4b13a15f (diff) | |
download | qpdf-4f305488d85f9237c561f04a88570f9b0584cb0d.tar.zst |
Improve the FILE* version of QPDF::processFile
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r-- | libqpdf/QPDF.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 5f1ab48c..3ea2f1ff 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -114,12 +114,13 @@ QPDF::FileInputSource::setFilename(char const* filename) } void -QPDF::FileInputSource::setFile(FILE* f) +QPDF::FileInputSource::setFile( + char const* description, FILE* filep, bool close_file) { destroy(); - this->filename = "stdio FILE"; - this->close_file = false; - this->file = f; + this->filename = description; + this->close_file = close_file; + this->file = filep; this->seek(0, SEEK_SET); } @@ -347,11 +348,12 @@ QPDF::processFile(char const* filename, char const* password) } void -QPDF::processFile(FILE* filep, char const* password) +QPDF::processFile(char const* description, FILE* filep, + bool close_file, char const* password) { FileInputSource* fi = new FileInputSource(); this->file = fi; - fi->setFile(filep); + fi->setFile(description, filep, close_file); parse(password); } |