4 Jan 2004 21:15
Re: file offsets used by fseek and ftell
Schloegl Alois <alois.schloegl <at> tugraz.at>
2004-01-04 20:15:50 GMT
2004-01-04 20:15:50 GMT
Zitat von "John W. Eaton" <jwe <at> bevo.che.wisc.edu>: > On 21-Nov-2003, JD Cole <listguy <at> transientresearch.com> wrote: > > | Could this be accomplished using a 64-bit (long long). If I'm > | not totally off base, that may be a better solution. > > With gcc 3.4, streamoff and streampos are classes that hold 64-bit > ints (either long long or int64_t). But they are not simple typedefs > for either of these types, so it is still not possible to write > something like > > streampos pos = ...; > > long long ftell_retval = (long long) pos; > > because there is no way to cast a streampos or streamoff type to an > integer. > > For portability, we can't assume that these types are any particular > integer value. Different systems are free to implement streamoff and > streampos (or fpos_t if you are using C) in any way they choose > (provided that they meet the rather limited constraints of the > respective standards). According to your suggestion in http://www.octave.org/mailing-lists/bug-octave/2003/474 , I'd like to continue the discussion. In summary the above statement says, it is not possible to check the position of(Continue reading)
RSS Feed