aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/FileInputSource.cc2
-rw-r--r--libqpdf/QPDF.cc6
-rw-r--r--libqpdf/QPDFTokenizer.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/libqpdf/FileInputSource.cc b/libqpdf/FileInputSource.cc
index cd8feda4..5ec6a170 100644
--- a/libqpdf/FileInputSource.cc
+++ b/libqpdf/FileInputSource.cc
@@ -80,7 +80,7 @@ FileInputSource::findAndSkipNextEOL()
}
else if (! ((ch == '\r') || (ch == '\n')))
{
- this->unreadCh(ch);
+ this->seek(-1, SEEK_CUR);
done = true;
}
}
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 5aa2d98c..2ebf88b0 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -632,7 +632,7 @@ QPDF::read_xref(qpdf_offset_t xref_offset)
}
else
{
- this->m->file->unreadCh(ch);
+ this->m->file->seek(-1, SEEK_CUR);
done = true;
}
}
@@ -1604,7 +1604,7 @@ QPDF::readObject(PointerHolder<InputSource> input,
// start reading stream data in spite
// of not having seen a newline.
QTC::TC("qpdf", "QPDF stream with CR only");
- input->unreadCh(ch);
+ input->seek(-1, SEEK_CUR);
warn(QPDFExc(
qpdf_e_damaged_pdf,
input->getName(),
@@ -1629,7 +1629,7 @@ QPDF::readObject(PointerHolder<InputSource> input,
else
{
QTC::TC("qpdf", "QPDF stream without newline");
- input->unreadCh(ch);
+ input->seek(-1, SEEK_CUR);
warn(QPDFExc(qpdf_e_damaged_pdf, input->getName(),
this->m->last_object_description,
input->tell(),
diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc
index 4217575c..4f2e2153 100644
--- a/libqpdf/QPDFTokenizer.cc
+++ b/libqpdf/QPDFTokenizer.cc
@@ -855,7 +855,7 @@ QPDFTokenizer::readToken(PointerHolder<InputSource> input,
if (unread_char)
{
- input->unreadCh(char_to_unread);
+ input->seek(-1, SEEK_CUR);
}
if (token.getType() != tt_eof)