S
SM Ryan
#
#
# SM Ryan wrote:
#
# > #
# > #
# > # SM Ryan wrote:
# > #
# > # > # > # [...]
# > # > # > # > No, at the C source-code level, all files are just an un-differentiated
# > # > # > # > list of bytes. If the OS stores files as files of fixed record types
# > # > # > # > (such as VAX/VMS), then it is up to the implementation to "hide" these
# > # > # > # > messy details from the programmer.
# > # > # > #
# > # > # > # For purposes of C stdio, yes. In addition, the OS can (and does)
# > # > # > # provide system-specific interfaces that expose all the fixd record
# > # > # > # stuff to the programmer.
# > # > # >
# > # > # > I didn't realise fgetpos and ftell had been redefined so they no longer
# > # > # > can return a cookie that is system dependent, but now always return a
# > # > # > byte offset. I bet that really cheesed off the VMS people.
# > # > #
# > # > # The fpos_t value used by fgetpos and ftell may contain arbitrary
# > # > # system-specific information, but as far as I know it can't be used to
# > # > # get at VMS's record-oriented file interface.
# > # >
# > # > Why don't you and RCollins get together and come up with a consistent
# > # > answer.
# > # >
# > # > --
# > # > SM Ryan http://www.rawbw.com/~wyrmwif/
# > # > A bunch of savages in this town.
# > #
# > # <OT rambling about VAX/VMS>
# > # What was inconsistent? The C compiler hides the (very) ugly details
# > # of the VAX/VMS record system. Thank (deity of your choice) for that!
# > # </OT>
# >
# > So are you saying fgetpos and ftell always return a byte offset into the
# > file and never a system dependent cookie? Keith doesn't agree with you.
# > Who am I to believe?
# I haven't the foggiest idea what fgetpos returns in it's value.
# I don't care. I get a file position from fgetpos, and later I pass that
# value back to fsetpos to get back to the same place in the file. If
# there is system dependant data in there, then the compiler successfully
# hid it from me.
Okay. So the weird thing to me is that I started off saying that you can't
just fseek some byte offset on any operating system, but that what
you specify in fseek depends on the system, file organisation, etc. But
someone else pops and says, no, at the C source-code level, all files are
just an un-differentiated list of bytes. So are you saying I was correct
originally and the guy who popped off was just being a jackass. Or what?
#
# SM Ryan wrote:
#
# > #
# > #
# > # SM Ryan wrote:
# > #
# > # > # > # [...]
# > # > # > # > No, at the C source-code level, all files are just an un-differentiated
# > # > # > # > list of bytes. If the OS stores files as files of fixed record types
# > # > # > # > (such as VAX/VMS), then it is up to the implementation to "hide" these
# > # > # > # > messy details from the programmer.
# > # > # > #
# > # > # > # For purposes of C stdio, yes. In addition, the OS can (and does)
# > # > # > # provide system-specific interfaces that expose all the fixd record
# > # > # > # stuff to the programmer.
# > # > # >
# > # > # > I didn't realise fgetpos and ftell had been redefined so they no longer
# > # > # > can return a cookie that is system dependent, but now always return a
# > # > # > byte offset. I bet that really cheesed off the VMS people.
# > # > #
# > # > # The fpos_t value used by fgetpos and ftell may contain arbitrary
# > # > # system-specific information, but as far as I know it can't be used to
# > # > # get at VMS's record-oriented file interface.
# > # >
# > # > Why don't you and RCollins get together and come up with a consistent
# > # > answer.
# > # >
# > # > --
# > # > SM Ryan http://www.rawbw.com/~wyrmwif/
# > # > A bunch of savages in this town.
# > #
# > # <OT rambling about VAX/VMS>
# > # What was inconsistent? The C compiler hides the (very) ugly details
# > # of the VAX/VMS record system. Thank (deity of your choice) for that!
# > # </OT>
# >
# > So are you saying fgetpos and ftell always return a byte offset into the
# > file and never a system dependent cookie? Keith doesn't agree with you.
# > Who am I to believe?
# I haven't the foggiest idea what fgetpos returns in it's value.
# I don't care. I get a file position from fgetpos, and later I pass that
# value back to fsetpos to get back to the same place in the file. If
# there is system dependant data in there, then the compiler successfully
# hid it from me.
Okay. So the weird thing to me is that I started off saying that you can't
just fseek some byte offset on any operating system, but that what
you specify in fseek depends on the system, file organisation, etc. But
someone else pops and says, no, at the C source-code level, all files are
just an un-differentiated list of bytes. So are you saying I was correct
originally and the guy who popped off was just being a jackass. Or what?