image.cpp uses fseek64 which under vfe/unix/syspovconfig.h is #defined to be:
lseek64(fileno(file), ... )
Unfortunately, lseek64 returns the file offset that was seek'd (sought?) and not
zero as is the case with fseek64.
I change image.cpp to use m_File as an int and then did
open/close/lseek64/read/write instead of the f* versions of them.
This solved the problem of the exceptions being thrown in SetLine and GetLine
whenever they were called.
Being unfamiliar with the code I don't know how much GetLine gets called, but I
suspect that SetLine is used so much more that the use of buffered I/O is
actually slowing things down (just the extra step through the library) over
going straight to the write(2) call.
Post a reply to this message
|