summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-06-27 05:09:21 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-27 05:10:10 +0200
commit736bafbb9ca645fc8662d9d05f5a72a2e6185e75 (patch)
tree2933f3726d5840696fd076960a0b98670cfaa58e
parent0802ba275f589520988ea9af6c434af6b78add41 (diff)
downloadqpdf-736bafbb9ca645fc8662d9d05f5a72a2e6185e75.tar.zst
Rename seek functions in QUtil
-rw-r--r--include/qpdf/QUtil.hh4
-rw-r--r--libqpdf/QPDF.cc6
-rw-r--r--libqpdf/QUtil.cc4
-rw-r--r--qpdf/test_driver.cc2
4 files changed, 8 insertions, 8 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 8d2c09cf..3d8c863d 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -49,9 +49,9 @@ namespace QUtil
// Wrap around off_t versions of fseek and ftell if available
QPDF_DLL
- int fseek_off_t(FILE* stream, qpdf_offset_t offset, int whence);
+ int seek(FILE* stream, qpdf_offset_t offset, int whence);
QPDF_DLL
- qpdf_offset_t ftell_off_t(FILE* stream);
+ qpdf_offset_t tell(FILE* stream);
QPDF_DLL
char* copy_string(std::string const&);
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 4849ae9b..1faf1519 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -149,7 +149,7 @@ QPDF::FileInputSource::getName() const
qpdf_offset_t
QPDF::FileInputSource::tell()
{
- return QUtil::ftell_off_t(this->file);
+ return QUtil::tell(this->file);
}
void
@@ -158,7 +158,7 @@ QPDF::FileInputSource::seek(qpdf_offset_t offset, int whence)
QUtil::os_wrapper(std::string("seek to ") + this->filename + ", offset " +
QUtil::int_to_string(offset) + " (" +
QUtil::int_to_string(whence) + ")",
- QUtil::fseek_off_t(this->file, offset, whence));
+ QUtil::seek(this->file, offset, whence));
}
void
@@ -170,7 +170,7 @@ QPDF::FileInputSource::rewind()
size_t
QPDF::FileInputSource::read(char* buffer, size_t length)
{
- this->last_offset = QUtil::ftell_off_t(this->file);
+ this->last_offset = QUtil::tell(this->file);
size_t len = fread(buffer, 1, length, this->file);
if ((len == 0) && ferror(this->file))
{
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index 0db61eed..1c7e390f 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -122,7 +122,7 @@ QUtil::fopen_wrapper(std::string const& description, FILE* f)
}
int
-QUtil::fseek_off_t(FILE* stream, qpdf_offset_t offset, int whence)
+QUtil::seek(FILE* stream, qpdf_offset_t offset, int whence)
{
#if HAVE_FSEEKO
return fseeko(stream, (off_t)offset, whence);
@@ -138,7 +138,7 @@ QUtil::fseek_off_t(FILE* stream, qpdf_offset_t offset, int whence)
}
qpdf_offset_t
-QUtil::ftell_off_t(FILE* stream)
+QUtil::tell(FILE* stream)
{
#if HAVE_FSEEKO
return (qpdf_offset_t)ftello(stream);
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc
index 6fd4faec..6f5414e1 100644
--- a/qpdf/test_driver.cc
+++ b/qpdf/test_driver.cc
@@ -113,7 +113,7 @@ void runtest(int n, char const* filename)
FILE* f = QUtil::fopen_wrapper(std::string("open ") + filename,
fopen(filename, "rb"));
fseek(f, 0, SEEK_END);
- size_t size = (size_t) QUtil::ftell_off_t(f);
+ size_t size = (size_t) QUtil::tell(f);
fseek(f, 0, SEEK_SET);
file_buf = PointerHolder<char>(true, new char[size]);
char* buf_p = file_buf.getPointer();