[ont.micro.mac] some bugs in APPLE Mac Workshop

info-mac@utcsrgv.UUCP (info-mac) (06/26/84)

Date: Fri, 22 Jun 84 19:01:20 pdt
From: Bill Croft <uw-beaver!croft@safe>
To: info-mac@sumex
Subject: some bugs in APPLE Mac Workshop (and SUMACC)
Cc: croft@SUMEX-AIM.ARPA, sumacc@sumex

These bugs are in the Lisa Mac Workshop release of 3/30/84, so I hope
Apple Tech support is listening.  Here are the translations for SUMACC:

The OpenRF subroutine did not clear the IOPermssn and IOOwnBuf fields
of the IOQ Element on the stack, so depending on what was there before,
OpenRF would crash if IOOwnBuf pointed somewhere weird (instead of zero).
These additional lines were mirrored after FSOpen.

+ diff lib/io.s- lib/io.s 
719c719,721
<         .word	__openrf
---
>         clrb   a0@(iopermssn)           | open for read/write
>         clrl   a0@(ioownbuf)            | use system buffer
>         .word	__openrf		| open resource fork

This bug is in the Desk Manager and its documentation (pg 8, SystemEdit
function).  The editCmd numbers expected by SystemEdit are documented
and defined wrong.

+ diff h/toolintf.h- h/toolintf.h 
208,212c208,212
< #define	cutCmd       0 
< #define	copyCmd      1 
< #define	pasteCmd     2 
< #define	undoCmd      3 
< #define	clearCmd     4 
---
> #define	undoCmd      0 
> #define	cutCmd       2 
> #define	copyCmd      3 
> #define	pasteCmd     4 
> #define	clearCmd     5 

This also explains one of the problems with cut/paste and the grow
sample program (although it still doesnt work correctly with the
NotePad).

+ diff test/grow.c- test/grow.c 
219c219,223
< 		if (SystemEdit(theItem-1))	/* (why -1?) */
---
> 		/* 
> 		 * SystemEdit expects 0=undo, 1=----, 2=cut, 3=copy, etc.,
> 		 * since our menu starts with 1=cut, we add +1.
> 		 */
> 		if (SystemEdit(theItem+1))

Thanks again to Bill Schilit and Mike Schuster.