Using LF in fileOut's

C. David Shaffer cdshaffer at acm.org
Wed Mar 10 16:25:56 UTC 2004


Vincent wrote:

>Hi,
>
>I work with MacOS X and Linux.  When I do fileOut on a class or method,
>I always need to convert eh CR line-endings with LF line-endings.  Is
>there a way to have fileOut use Character lf instead of cr?
>
>Cheers,
>Vince.
>
>  
>
Vince,

If you change FileStream>>concreteStream to return a CrLfFileStream then 
(I think) your fileouts will use LF's:

concreteStream
    "Who should we really direct class queries to? "
    ^ CrLfFileStream

This has the added bonus of making FileList show your LF-terminated 
files properly.  There are certain obvious ambiguities caused by this 
change and my recollection is that the Squeak community doesn't yet seem 
committed to making the above change the "default".  I don't recall ever 
having a problem with it but YMMV.  I'm sure there's a platform where 
the existing convensions work well...for the rest of us it's just one 
further annoyance.

David

-- 
C. David Shaffer
http://www.cs.westminster.edu/~shaffer
http://www.shaffer-consulting.com





More information about the Squeak-dev mailing list