Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!cmcl2!seismo!ut-sally!ut-ngp!shell!graffiti!peter From: peter@graffiti.UUCP (Peter da Silva) Newsgroups: net.lang.c,net.micro.mac,net.micro.amiga,net.micro.atari Subject: Re: Portability of Mac Source Message-ID: <471@graffiti.UUCP> Date: Sun, 24-Nov-85 15:16:49 EST Article-I.D.: graffiti.471 Posted: Sun Nov 24 15:16:49 1985 Date-Received: Thu, 28-Nov-85 04:04:36 EST References: <6679@boring.UUCP> <25500120@ISM780B.UUCP> <452@graffiti.UUCP> <330@mmm.UUCP> Organization: The Power Elite, Houston, TX Lines: 54 Xref: watmath net.lang.c:7201 net.micro.mac:3607 net.micro.amiga:864 net.micro.atari:1773 > > > >Unportable, yes... by definition. Mac-specific? No longer. See net.micro.amiga > >and net.micro.atari for more info. It is no longer acceptable to assume that > >windows==macintosh (actually it never was, but you slobs got away with it). > >-- > >Name: Peter da Silva > > Slobs ... *moi*? Yeh, you... (rolls up sleeves and spits on hands) wanna step outside & make somethin' of it? > Sorry, but it's not just the fact that the system uses > windows - it's also the way they're used. There are over 400 (aren't there?) > toolbox routines that do all that stuff for you, so your code ends up looking > like a lot of calls to the toolbox with some (or whatever language) thrown > in. Ahh, then why not isolate the Mac-specific stuff in a seperate module. > Ahh, you say, then why not isolate the parts that are mac-specific and > provide a high level interface that mimics the mac? What are you, a telepath? No, that's not quite what I say. I say write the Macintosh software with the intention of porting it to other machines. You may lose some efficiency, but you'll gain at least one huge new market for your stuff. Maybe two. Pseudo-code. Let's use the UNIX model. main { signal(CLOSE_WINDOW_BUTTON, close_routine); signal(RESIZE_WINDOW_BUTTON, repaint_window_routine); signal(...other_stuff..., ...other_routines...); main_loop { do_some_stuff... #if !defined(MULTITASKING) && !defined(MOUSE_INTERRUPTS) poll_mouse(); /* this will call all the other signals */ #endif some_more_stuff... } } If the program is written in a manner that supports porting, then porting will be easy. This will require a certain amount of LCD coding (on 4.2UNIX, frex, CLOSE_WINDOW_BUTTON is INTERRUPT, and RESIZE_WINDOW_BUTTON is TSTOP), but the gain is portable code. -- Name: Peter da Silva Graphic: `-_-' UUCP: ...!shell!{graffiti,baylor}!peter IAEF: ...!kitty!baylor!peter