ANSI draft - seeking to eof

Helmut Golde golde at uw-beaver
Tue Dec 3 10:01:48 AEST 1985

One problem that I have noticed on non-UNIX machines (MS-DOS) is that of the
newline character.  Unlike UNIX, MS-DOS uses two characters CR and LF to
mark line boundries.  One common way of dealing with this is translating
CR-LF pairs into simple LF when reading and doing the reverse when writing.
One big drawback is that seeking no longer works as you expect -- seeking
over a line bound seeks two characters forward, instead of one in UNIX.  

Does the ANSI draft have any better solution to this problem, or is this
kludge the accepted way of dealing with the problem

More information about the Comp.lang.c mailing list