Mail Archives: djgpp/1994/06/19/13:22:24
In message <9406190725 DOT AA04424 AT is DOT elta DOT co DOT il>you write:
>> So why even bother? Everything works and you have fewer
>> portability problems if you treat everything as binary...
>
>The problem is, DOS text lines have a CR-LF pair of characters as the
>end-of-line marker. When you read such a file in BINARY mode, these character
>s
>are retained. But programs written under Unix environment expect each line
>to end with a single Newline (aka LF, aka \n) character, so they won't work.
>
My contention is I have never seen a problem treating everything as binary.
If you have code which explicitly tests for CR-LF, then you have trouble...
I just looked at my Aztec C manuals (I used Aztec on 6502, 8085 CP/M and
Ms/Dos). They don't know about or care about TEXT/BINARY mode...
I've shuffled hundreds of programs over the years this way between
MS-dog and Unix and I never saw anything bad happen...
marty
- Raw text -