From 18b34a564906c7ef36daefab081b44ebfd9ee64b Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 16 Oct 2020 14:35:18 -0400 Subject: InputSource::unreadCh -- only unread most recently read character This is all that ever worked. The test suite was trying to do something different from ClosedFileInputSource. --- include/qpdf/InputSource.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/qpdf/InputSource.hh b/include/qpdf/InputSource.hh index 896a2559..8850828d 100644 --- a/include/qpdf/InputSource.hh +++ b/include/qpdf/InputSource.hh @@ -83,6 +83,9 @@ class QPDF_DLL_CLASS InputSource virtual void seek(qpdf_offset_t offset, int whence) = 0; virtual void rewind() = 0; virtual size_t read(char* buffer, size_t length) = 0; + + // Note: you can only unread the character you just read. The + // specific character is ignored by some implementations. virtual void unreadCh(char ch) = 0; protected: -- cgit v1.2.3-54-g00ecf