Mail Archives: djgpp/1994/06/21/05:44:29
In message <199406201650 DOT LAA17446 AT agassiz DOT cas DOT und DOT NoDak DOT edu>, Zach Heilig write
s:
>Olly Betts says:
>> The sequence \ CR LF doesn't join lines (or at least ANSI don't
>> say it has to [...]
>
>I guess that makes the solution for sources files to always terminate
>lines with '\n' only, since dos compilers don't seem to mind.
Some older DOS compilers apparently don't like it, but Borland C 3.1 and
MSC 7.0 (and DJGPP of course) seem quite happy. You also need to use a
DOS editor which copes with \n without converting it, which may not
include Your Favourite Editor.
>The only possible problem with that is people who port over to OS-9 or
>OS-9000 (maybe?) where lines end in '\r'.
Mac too I believe. My solution to this problem is the infozip unzip
program (which is bundled with the DJGPP release) and it's counterpart
zip are useful here. unzip has a -a option which treats the files
inside as ASCII and performs end of line translation. You can compile
it for UNIX (and many other systems).
Olly
- Raw text -