Squeak 2.1 for UNIX?

Lex Spoon lex at cc.gatech.edu
Tue Aug 18 00:12:03 UTC 1998


R. A. Harmon writes:
 > At 04:48 PM 8/13/98 -0700, you wrote:
 > >R. A. Harmon writes:
 > [snip]
 > >You should try CrLfFileStream.  It does exactly this for you, modulo
 > >any err unexpected features.
 > [snip]
 > 
 > I've tried it and it is very well done.  I believe it only fixes some of the
 > areas of difficulty with like termination.  Below are a couple of examples
 > of areas it missed:
 > 
 > Behavior>>#compile:notifying:
 >         . . .
 >         withPreamble: [:f |
 >                 f cr;                   <- oops
 >                 nextPut: $!;
 >                 nextChunkPut: 'Behavior method';
 >                 cr                      <- oops
 >         ].
 > 
 > ChangeSet>>#fileOutOn:
 >         . . .
 > 	stream cr.                     <- oops



Well #cr does a #nextPut:, and CrLfFileStream's nextPut: will
automatically change CR's to whatever the local system's convention
is.  So the only place in the system that knows any dirty work is
going on, is in the guts of CrLfFileStream, and the rest of the system
can just assume lines are CR delimitted.

By the way, CrLfFileStream was originally written by 'ar'.  That means
at least three people have had the same idea here--what a group!

Lex





More information about the Squeak-dev mailing list