Re: fseek
In article <XPEsb.134993$m Z5.932687@attbi _s54>
Glen Herrmannsfeldt <gah@ugcs.calte ch.edu> writes:[color=blue]
>There could be systems that keep text and binary files completely
>separate, such that no operations are allowed on the wrong type.
>I don't know of any, though.[/color]
VMS does something arguably more useful than that. In VMS, files
have a great deal of structure, which is normally managed by RMS
(the "record management system" -- code that, as Ken Thompson wrote
so long ago, "fills a much-needed gap" :-) ). If you have a file
with (say) variable-length records, and open it as a fixed-length
record file, RMS will pad and (I presume) truncate records as
required to fit the data into the Procrustean bed. Similarly, if
you open a variable-length record file as text, RMS (or the C
runtime library -- pre-VMS-5.0 and Stream-LF files, I imagine it
was done outside RMS proper) can break up the records with
artificially-inserted newlines.
In any case, if one has ever actually used these operating systems
that fail to provide the much-needed gap -- i.e., the ones that
have a plethora of forcibly-imposed file formats -- one should
begin to understand the strong constraints put on the C programmer
by the C standards.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://67.40.109.61/torek/index.html (for the moment)
Reading email is like searching for food in the garbage, thanks to spammers.
In article <XPEsb.134993$m Z5.932687@attbi _s54>
Glen Herrmannsfeldt <gah@ugcs.calte ch.edu> writes:[color=blue]
>There could be systems that keep text and binary files completely
>separate, such that no operations are allowed on the wrong type.
>I don't know of any, though.[/color]
VMS does something arguably more useful than that. In VMS, files
have a great deal of structure, which is normally managed by RMS
(the "record management system" -- code that, as Ken Thompson wrote
so long ago, "fills a much-needed gap" :-) ). If you have a file
with (say) variable-length records, and open it as a fixed-length
record file, RMS will pad and (I presume) truncate records as
required to fit the data into the Procrustean bed. Similarly, if
you open a variable-length record file as text, RMS (or the C
runtime library -- pre-VMS-5.0 and Stream-LF files, I imagine it
was done outside RMS proper) can break up the records with
artificially-inserted newlines.
In any case, if one has ever actually used these operating systems
that fail to provide the much-needed gap -- i.e., the ones that
have a plethora of forcibly-imposed file formats -- one should
begin to understand the strong constraints put on the C programmer
by the C standards.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://67.40.109.61/torek/index.html (for the moment)
Reading email is like searching for food in the garbage, thanks to spammers.
Comment