[ENH] FileList use of CrLf conversion for text files

Tim Rowledge rowledge at interval.com
Wed Jul 21 01:09:32 UTC 1999


Both my Linux and Acorn machines use LF as a line-end, so the squeak FileList
makes hash of any non-ST code file. Currently FileList checks for a moderate
list of file suffix/types in order to allow the gif reading / flash loading /
etc, so I simply added 'c' & 'h' to the list needing special treatment and use
a CrLfFileStream.

A trivial and partial fix is enclosed, but I have this feeling that it would
probably be better to
a) assume that a file of any not-previously-known type is local line-end format
b) check for 'cs' as a file suffix in order to _not_ convert.

However, that seems a touch more contentious a change that ought to have more
discussion. Maybe 'image' and 'changes' would be worth marking for not-
converting, probably 'exe' (hey, maybe 'exe' ought to be loaded as hex by
default?) and so on.

tim

-- 
Why Dogs Hate WIn95:-  6)  SmellU-SmellMe still in beta test.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list