[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Eliminating carriage returns

From: Greg Chicares
Subject: [lmi] Eliminating carriage returns
Date: Tue, 19 Dec 2006 19:58:59 +0000
User-agent: Thunderbird (Windows/20060516)

I've changed file-write modes to 'binary' throughout 'lmi', with
limited exceptions discussed below.

The reason for this change is that file-write modes had been
specified haphazardly--sometimes binary, and sometimes not--and
this inconsistency caused problems in a unit test I'm developing.
Removing the inconsistency globally increases portability across
platforms, too, removing a potential obstacle for people who use
GNU/Linux and may someday want to copy files created on a system
that distinguishes 'binary' from 'text'.

I'm not changing file-read modes--doing that could impair backward

This means that files written by the program itself on msw will
use "\n" instead of "\r\n" line delimiters: LF instead of CRLF.
In C, you can think of it as "wb" and "ab" replacing "w" and "a",
"r" being left alone (and we don't use "r+" or "w+" AFAICT).
Files written by an external program such as the xsl-fo processor
are unaffected. I may have missed files written by one of the
libraries we use, but if I did and it gets in our way, we can
look at changing that later.

The configurable-settings file and '.debug' files are affected on
msw. There is no need for those files to use the CRLF convention
that's common (though not standard or universal) on that platform.
If you had been using ms 'notepad', then use ms 'wordpad' instead,
for instance, and you won't notice any difference. Or use any tool
that displays our '.?pp' source files correctly, because they're
similarly LF-delimited.

I've specifically exempted the files we write in 'custom_io_0.cpp'
for use by one external party's msw system, because it may expect
CRLF delimiters.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]