aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-02-28 22:45:11 +0100
committerJay Berkenbilt <ejb@ql.org>2013-03-05 19:35:46 +0100
commitac4deac1873ca1bb570ffd479ed2cc1010762f89 (patch)
treee83f1d756f161b799483926676446241fc8ffeed /include
parent7ccc9bd9d5463d29f3fc19a7f7718842e3b68be8 (diff)
downloadqpdf-ac4deac1873ca1bb570ffd479ed2cc1010762f89.tar.zst
Call QUtil::safe_fopen in place of fopen
fopen was previuosly called wrapped by QUtil::fopen_wrapper, but QUtil::safe_fopen does this itself, which is less cumbersome.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QUtil.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 02d98876..8bad535d 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -54,6 +54,11 @@ namespace QUtil
QPDF_DLL
int os_wrapper(std::string const& description, int status);
+ // If the open fails, throws std::runtime_error. Otherwise, the
+ // FILE* is returned.
+ QPDF_DLL
+ FILE* safe_fopen(char const* filename, char const* mode);
+
// The FILE* argument is assumed to be the return of fopen. If
// null, throw std::runtime_error. Otherwise, return the FILE*
// argument.