Feb 88 Letters
Volume Number: 4
Issue Number: 2
Column Tag: Letters
Readers Respond to Editorials 
By David E. Smith, Editor & Publisher, MacTutor
Making WriteNow MultiFinder Friendly
Mr. Sleazy Hacker
Boulder, Colorado
Here’s a very sleazy patch to get around WriteNow’s habit of blasting a ruler
across the entire screen (assuming a Mac II sized screen of width 640 pixels). The
patch was applied on a Mac II with B/W monitor, and version 1.0 of WriteNow.
Using Fedit or equivalent, search for:
A91B 2F0C 2055 3F28 FF92 5557 3F3C 002C
And replace with:
A91B 2F0C 3F3C 0258 4E71 4E71 3F3C 002C
There’s one occurrence of the pattern. What we are doing here is replacing:
movea.l (a5),a0
move.w ff92(a5),-(a7)
subq.w #2,(a7)
...
_SizeWindow
with:
move.w #$250,-(a7)
nop
nop
...
_SizeWindow
In other words, the code fragment that calculates the width of the ruler as
(screenBits.bounds.right -2) is replaced with one that supplies a constant value of
$258 (decimal 600). [Note to developers: they never should have used
screenBits.bounds for this calcuation. Since their ruler is in it’s own window, as David
Dunham points out below, it should have been defined as a fixed size window or better
still, growable. -Ed] The largest argument that subq will take in this form is 8, hence
the substitution with a constant. Of course, once you’ve done this screen-size
independence flies out the window, so don’t do it to an original...(You can find this peice
of code with TMON by putting a trap intercept on GetNewDialog, launching WriteNow
and waiting for the first intercept. GetNewDialog is immediatly followed by a
MoveWindow and the SizeWindow shown above.)
When the ruler is shortened by 40 Pixels in this fashion, there’s just enough
room for part of the top Finder icon to peek through.
Since this trick is so sleazy, I think I’ll request anonymity of you decide to
publish it! [Granted! -Ed]
By the way, there’s one MacWrite feature that I e specially miss under
MultiFinder when using the newer word processors - its ability to put formatted text
on the clipbord (the ‘MWRT’ scrap format). Microsoft Word, WriteNow (at least the
version I tested) don’t do this, so you’re cutting and pasting plain text. Since
PageMaker seems to understand this scrap format, that’s a pity. The ‘MWRT’ format
isn’t perfect -- you can’t pass leading values, specify baseline offsets or odd-ball
styles like strike-through, but it’s better than nothing. I’m hoping that there will be
some improvement in this area in 1988. [We agree! The whole point of developing a
new Text Edit was to support a new formatted text type for the clipboard, but no one is
using it yet! We encourage developers to standardize on support for the new formatted
text type in cutting and pasting across applications. How about an article to encourage
this someone? -Ed]
C String Library Corrections
Doug Beck
Los Altos, CA
I keyed in the “Pascal String Library for C” from the November, 1987 issue.
My Version (2.13) of Lightspeed C reports problems in some of the routines.
Specifically--
• Page 39, right column, line 6 reads -pos; [This should have been --pos; in
PStrCopy.c]
• Page 40, right column, line 23 reads While (*-sp != c && -n >=0);
[This should have been (*--sp != in PStrFindLC.c]
• Page 40, right column, line 42 reads -sp; [This should have been --sp; in
PStrFindLS.c]