ANSI C Standard, Query

RStallworthy at PCO-MULTICS.HBI.HONEYWELL.COM RStallworthy at PCO-MULTICS.HBI.HONEYWELL.COM
Sat Oct 15 06:43:00 AEST 1988


In looking at the section (4.9.2) on "streams", it refers to streams of
two types, "binary"  and "text".  Elsewhere it refers to binary files
and text files, as if there were two distinct file types, such that a
binary file could only be read / written as a binary stream and a text
file could only be read / written as a text file.  Now I am aware that
the standard does not require this to be the case, but is there anything
in the standard that would prevent it from being implemented in this
way.
Such an implementation would make it very difficult to write a program
like "od", because you would not be able to get at the internal
representation of a text file (on a non-UNIX system where the internal
representation of lines is not just new-line characters separating the
lines).

Similarly, it seems to me that all disk files should be readable as a
binary stream, however, again I am having trouble finding anything in
the standard that would require this of an implementation to be
conformant with the standard.



More information about the Comp.lang.c mailing list