diff src/c-file-ptr-stream.h @ 4888:4a796c5fc7a3

[project @ 2004-04-30 18:27:07 by jwe]
author jwe
date Fri, 30 Apr 2004 18:27:07 +0000
parents 19b8225bdaa2
children e35b034d3523
line wrap: on
line diff
--- a/src/c-file-ptr-stream.h
+++ b/src/c-file-ptr-stream.h
@@ -82,6 +82,8 @@
 
   long tell (void) { return f ? ftell (f) : -1; }
 
+  void clear (void) { if (f) clearerr (f); }
+
   static int fclose (FILE *f) { return ::fclose (f); }
 
 protected:
@@ -115,6 +117,8 @@
 
   long tell (void) { return buf ? buf->tell () : -1; }
 
+  void clear (void) { if (buf) buf->clear (); std::istream::clear (); }
+
 private:
 
   c_file_ptr_buf *buf;
@@ -140,6 +144,8 @@
 
   long tell (void) { return buf ? buf->tell () : -1; }
 
+  void clear (void) { if (buf) buf->clear (); std::ostream::clear (); }
+
 private:
 
   c_file_ptr_buf *buf;
@@ -165,6 +171,8 @@
 
   long tell (void) { return buf ? buf->tell () : -1; }
 
+  void clear (void) { if (buf) buf->clear (); std::iostream::clear (); }
+
 private:
 
   c_file_ptr_buf *buf;
@@ -177,4 +185,3 @@
 ;;; mode: C++ ***
 ;;; End: ***
 */
-