[? Windows] CR instead of CR/LF (was: RE: update 1164)

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Tue May 4 06:07:52 UTC 1999


On Mon, 3 May 1999, Norton, Chris wrote:

> [... snip ...] 
> 
> 	Also -  I recently sent a change set to a friend at Squeak central
> who indicated that my code had the dreaded LF characters in it (using Squeak
> 2.3 + fixes).  If it hasn't been done already, shouldn't the file in / file
> out routines be "bullet proofed" to keep this from happening?  (wish I had
> the time to surf that code right now ;-)

This happens if you (like many of us non-Mac-Squeakers) hacked FileStream
class>>#concreteStream to answer CrLfFileStream. If you do this, every
file created from Squeak will have the "correct"  platform-dependend line
ending. The problem is CrLfFileStream's LineEndDefault that is "guessed"
at image startup.

We could do several things about this:
	a) Make CrLfFileStream always default to Cr.
	b) Change file-out routines to default to Cr. 
	c) Discard CrLfFileStream altogether.

I did a) in my image. I think b) makes sense, too. I wouldn't like c) 
because CrLfFileStream makes life a little bit easier and that's a Good
Thing - thanks, Andreas ;-) 

/bert

-- 
 Bert Freudenberg                                       Department of 
                                                        Simulation and
 mailto:bert at isg.cs.uni-magdeburg.de                    Computer Graphics
 http://isgwww.cs.uni-magdeburg.de/isg/bert.html        Univ. of Magdeburg





More information about the Squeak-dev mailing list