Where should the type information be 131
Some (one and a half). Certainly nowhere near all. What have I done to suggest I would be that stupid?
ALL of them? Do you have a life?
No you have the choice of implementing something based on the capabilities of the platform that meets the specs of the standard.
Those can be handled. It is ugly, but it can be done.
One of the clbuttic dysfunctions of would-be C platforms (to which the language unfortunately caters) is the issue of zero-length files. On some machines they cannot exist because the OS forbids them and deletes empty files (I think they do this to save space ;-)). Based on that hostile behavior the C standard would have all C programs avoid reliance upon the existence of zero-length files.
Now this is a particularly simple problem to solve. The implementation can simply force every file to have a minimum size by creating the necessary minimum size preamble and ignoring that initial part of the file when reading.
Seeking on IO streams is another problem in that pipes and interactive input don't typically support seeking. However, the implementation of C on such a platform has the capability to support seeking by T'ing the input stream to a backing file and performing re-reads from the file. Many pseudo filter programs such as sort do this as a matter of course. How hard could it be for an implementation to do so? see also isatty() which informs programs as to when seeks are not available.
Resetting hard IO errors is much more platform specific, but it is generally possible to implement it by closing and re-opening the file (IO channel).
Some of these things are difficult, especially on smaller platforms. But none of them are impossible. Unreasonable yes.
Where should the type information be 134
Nick Maclaren OK, under the clarified question the answer is yes, including unit record file systems supporting only fixed length records. So what? The definition of a file system (FS) line need not...
See also SFU (Servces For Unix) that Microsoft(R) now offers for free. not an endorsement -- I wouldn't waste my time -- but a possible proof of concept.
Where should the type information be 132
Trevor L. Jackson, III deletes that reliance If every file requires at least one datum...