www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/21/05:44:29

To: Zach Heilig <heilig AT cs DOT und DOT nodak DOT edu>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: O_TEXT/O_BINARY grief
Date: Tue, 21 Jun 1994 10:01:21 +0100
From: Olly Betts <olly AT mantis DOT co DOT uk>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019