Unix shell for Macintosh??

Anders Sundin sundinKC at dna.lth.se
Wed Apr 15 11:20:46 EST 1992


Dan Weeks writes:
> I would like
> these programs to run in the background under Multifinder
> so that I can continue to use my Macintosh while they
> are running.  I almost figured out how to do this with MPW,
> except that the programs couldn't run in the background.

You should use MPW. Include cursor (and backgound) handling for the MPW tool.
#include	<CursorCtl.h>
long counter = 0;

And then you throw in an occasional call from the MPW tool:
RotateCursor(counter++);

Thats all!

To get a really great interactivity when the MPW tool runs in the background
you have to call RotateCursor from ten to twenty times per second. Calling
it too often is a waste of time. An advantage of calling RotateCursor is
that you see that the tool is alive when MPW Shell is in the foreground.

Here is the official description of RotateCursor:

pascal void RotateCursor(long counter);
File {CIncludes}CursorCtl.h

RotateCursor is called to rotate the "I am active" "beach ball" cursor, or to
animate whatever sequence of cursors set up by InitCursorCtl. The next cursor
("frame") is used when Counter % 32 = 0 (Counter is some kind of incrementing
or decrementing index maintained by the caller). A positive counter sequences
forward through the cursors (e.g., it rotates the "beach ball" cursor
clockwise), and a negative cursor sequences through the cursors backwards
(e.g., it rotates the "beach ball" cursor counterclockwise).  Note,
RotateCursor just does a Mac SetCursor call for the proper cursor picture.
It is assumed the cursor is visible from a prior Show_Cursor call.
-- 
 Anders Sundin           e-mail: sundinKC at dna.lth.se
 Organic Chemistry 2             Anders.Sundin at orgk2.lth.se
 University of Lund              ok2aps at seldc52.bitnet
 P.O. Box 124            phone:  +46 46 108214
 S-22100 Lund, Sweden    fax:    +46 46 108209




More information about the Bio-soft mailing list