[comp.sys.mac] Mac Silliness Derided: Author Eats Crow

earleh@dartvax.UUCP (02/01/87)

     A recent posting of mine derided software for the Macintosh that

        (a) performs no detectable useful function and is not labelled 
            correctly as a "game" or "toy"
        (b) comes PackIt'ed together with a large MacWrite documentation
            file, making it harder to ascertain the program's worth
            before downloading it (possibly at 1200 or 300 baud)

     In this posting I made reference to a calendar desk accessory which,
although a useful and wholly laudable piece of software, produced system 
crashes whenever I attempted to use it.  I have since discovered (after
much correspondence with the author) that the problem was with the currently
running application and NOT the calendar desk accessory.  It turns out that
the Macintosh memory manager does not protect the stack from invasion by
the application heap unless the application specifically asks it to.
After this problem was corrected, in the program and NOT in the calendar
desk accessory, no more system crashes were observed.

     Although I continue to stand behind the points in my article, I 
have to admit that I was wrong about Calendar 1.6.  This is a perfectly
sound piece of software, and well worth the $5.00 shareware fee for those
who have need of a desk calendar for use with the Macintosh.

     The following piece of code, inserted just after "main() {" will
do much to prevent any future misunderstandings (programmers take
note).

        char **curstackbase;
        char *heaplimit;

        curstackbase = (char **)0x0908;
                /* 0x0908 contains the address of the current stack base */
        heaplimit = *curstackbase - (long)5480;
                /* whatever you think your stack requirements are here */
        setappllimit(heaplimit);

     To anyone using my version of microEMACS 3.7 that I ported to the 
Macintosh:   You can get a copy that is now free of this and some other
interesting bugs by emailing me a request.  If it has performed well
for you up to this point, you should probably wait until microEMACS
3.8 becomes available, since it is rumored to work on the Macintosh
as distributed.

     My sincerest apologies to the author of Calendar 1.6, David Oster.

Earle R. Horton