Squeak 2.1 for UNIX?

R. A. Harmon harmonra at webname.com
Sun Aug 16 22:21:30 UTC 1998


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

I haven't taken the time to see if these methods are even used, or root out
all the places in all the source code where this occurs.  It see important
to me to do this because I'll write my methods using the CrLf (WinTel) but
may in my code call a method that assumes a Cr (Mac) which calls a method
that assumes a Lf (UNIX).  I'll cast the painful-boil-on-the-typing-finger
curse on the first programmer that decides to us the LfCr convention (hardly
a big threat since it will be task 3,694th on my list).


>For network data, I've been using methods #withSqueakLineEndings and
>#withInternetLineEndings to convert back and forth, and it seems to
>work pretty well.
[snip]
>!String methodsFor: 'internet' stamp: 'ls 7/27/1998 23:16'!
>withSqueakLineEndings
[snip]
>!String methodsFor: 'internet' stamp: 'ls 7/27/1998 23:17'!
>withInternetLineEndings
[snip]

Very good.  Thanks for sending the along.

--
Richard A. Harmon          "The only good zombie is a dead zombie"
harmonra at webname.com           E. G. McCarthy





More information about the Squeak-dev mailing list