Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!claris!peirce From: peirce@claris.com (Michael Peirce) Newsgroups: comp.sys.mac Subject: Re: Real Multifinder (was Re: Hey Apple Mac engineers...) Message-ID: <10520@claris.com> Date: 1 Sep 89 18:06:08 GMT References: <46100321@uxe.cso.uiuc.edu> <1989Aug15.001507.14552@sj.ate.slb.com> <24626@iuvax.cs.indiana.edu> <3997@internal.Apple.COM> <738@eplrx7.UUCP> Reply-To: peirce@claris.com (Michael Peirce) Distribution: usa Organization: Claris Corporation, Santa Clara CA Lines: 43 In article <738@eplrx7.UUCP> leipold@eplrx7.UUCP (Walt Leipold) writes: >In article <3997@internal.Apple.COM> Larry Rosenstein writes: >>It is possible to work under MultiFinder without writing any extra code, >>although by writing some MultiFinder-specific code you can make the system >>operate more smoothly. > >I've been watching this thread for a week or so, and have to disagree >(partially) with the above. The original question appeared to refer to >the amount of extra code you'd need to add to a Unix-style program >(which gets backgrounding for free) to get it running in the background >on the Mac. This is not just a matter of adding some Multifinder- >specific code. Instead, you have to add an entire event loop to the >program to allow Multifinder to timeslice it. And quite often, a >program's original (hopefully) clean structure (the case for most >Unix filters) is badly corrupted by contorting it to fit an event loop. > >-- >"As long as you've lit one candle, Walt Leipold >you're allowed to curse the darkness." (leipolw%esvax@dupont.com) >-- If you really wanted to port a Unix style filter program to the Mac the easiest way to do so is to make it into a MPW tool. These programs can use simple printf and getch style i/o without change. And to get these to work with MultiFinder is trivial. Simply sprinkly a few calls to SpinCursor in places where lots of processing is taking place and you're all set. This approach doesn't lead to "badly corrupted" code with event loops, just a few extra calls that can be #IFDEF'ed in. Porting Unix tools to the Finder environment is probably a waste of time, the two environments have too different a view on how the world looks. But porting Unix tools to the MPW environment can be quite easy and rewarding. Claris Corp. | Michael R. Peirce -------------+-------------------------------------- | 5201 Patrick Henry Drive MS-C4 | Box 58168 | Santa Clara, CA 95051-8168 | (408) 987-7319 | AppleLink: peirce1 | Internet: peirce@claris.com | uucp: {ames,decwrl,apple,sun}!claris!peirce