[M3devel] Target.EOL
Jay K
jay.krell at cornell.edu
Thu Mar 11 16:40:34 CET 2010
I strongly suspect that Target.EOL can go away and just use Wr.EOL instead.
Or even just \n.
Cross builds are fairly rare, esp. cross between NT and Posix, and very
many tools treat \n, \r\n, and perhaps \r the same, so even
crossing NT <=> Posix doesn't likely matter.
ie. it works, assuming you have a cross m3cg (ie: mingwin/cygwin hosted for NT hosts)
gcc, Visual C++ compiler, m3front, all treat \r and \r\n the same.
(witness all our *.h, *.c, *.i3, *.m3 files use \r\n)
I think we have some tools that don't understand \r\n, but in my opinion that is a bug.
All three formats should be treated the same.
I know notepad doesn't display \n well, and Sun cc might not like \r\n.
I know some compiler I used recently was picky, but "many" compilers are not.
cmd might be ok with \n.
Python calls it "universal newlines", treating all three formats the same.
C:\dev2\cm3.2\m3-sys\cm3\src\Utils.m3(190):PROCEDURE CopyText (old, new: TEXT) =
C:\dev2\cm3.2\m3-sys\m3middle\src\M3File.m3(61):PROCEDURE CopyText (src, dest: TEXT; eol: TEXT) RAISES {OSError.E} =
probably leave alone, except that they don't treat \r correctly if you consider the historical Apple behavior.
There are three formats, not two.
Anyway, it's not a big deal. I think my problem here is solved by the change to m3x86.m3 I already made.
I'll put Target.EOL back on my machine.
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100311/d333d7c5/attachment-0001.html>
More information about the M3devel
mailing list