[net.micro.mac] sumacc skeleton and utility routines posted

kdmoen@watcgl.UUCP (Doug Moen) (03/23/85)

"Example" is the skeleton of a generic Macintosh editor.
It's larger and more ambitious than the recently posted
"Skel" program (Example contains about 80 lines of Skel).
It has just been posted in 2 parts to net.sources.mac.

Sumacc users may be interested in some of the utility subroutines
included in the posting:

PGetItem() is an interface to the GetItem() rom routine which
returns the menu item name as a Pascal string rather than a C string.
It permits Sumacc programs to open desk accessories whose names
do not begin with a NUL.  This fixes a bug common to most Sumacc programs.
(See pGetItem.s and the AppleMenu() routine in menus.c)

MessageF() accepts printf arguments and displays debugging messages
in the menu bar, restoring the menu bar after you press space or click
the mouse.  This routine is for people who like to put fprintf(stderr,...)
in C programs under Unix for debugging purposes.

CheckHandle() displays an error message if its argument is not a valid
handle (it also tells you what's wrong with it).

Plus lots more.

-----
Doug Moen, watmath!watcgl!kdmoen
University of Waterloo Computer Graphics Lab