[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

GCC 3.2 replacement for streammarker?



Hi,

The geomview package needs the ability to seek backwards on
a file regardless of whether it is a pipe, socket, tty, etc.
Basically: fseek() that never fails.

A pure C-code solution would be best.  Any suggestions?


The current solution is to link in some C++ code that uses
a streammarker object, which does exactly what is needed:

    The GNU iostream library allows you to ask a streambuf to remember
    the current position. This allows you to go back to this position
    later, after reading further. You can back up arbitrary amounts,
    even on unbuffered files or multiple buffers' worth, as long as
    you tell the library in advance.

    http://sunland.gsfc.nasa.gov/info/iostream/Backing_Up.html


That worked fine with GCC 2.  However, this class has vanished
in GCC 3.  How to proceed?

Thanks,
-Steve



Reply to: