Windows ( Really porting between Mac, Amiga, and ST

Tim Smith tim at ISM780C.UUCP
Sat Dec 7 12:23:04 AEST 1985

Note: I am adding net.micro.{mac,amiga,atari} to this, because this article
is really about portability between the Mac, the ST, and the Amiga.

[I am >>]
In article <-13400 at brl-tgr.UUCP> jon at brl-tgr.UUCP writes:
>>> [compaint that Mac programmers are not writting portable code.
     Mentions that other machines have windows besides the Mac]
>> Are you saying my Mac programs should easily port to the Amiga, the Atari
>> 520ST, the Sun , V8 Unix ( if you have a BLIT ), System V ( if you have
>> a Teletype 5620 ), the IBM PC and Clones ( with GEM ), the AT&T PC7300,
>> and a few random Xerox machines?  They all have windows.
>    Are you saying you want to write different programs to accomplish the
>same thing on all these machines?

Of course not.  What I mean is that just because N machines all 
support windows, or similar user interfaces, that does not mean 
that they are alike in other details of the operating system.  

Portability depends a lot on what the program does.  For example, 
a V8 program that makes heavy use of streams probably take a bit 
of work to run on a non V8 Unix.  Or a BSD program that depends 
on the 4.2 behaviour of signals might have problems.  Or look at 
all the problems with tty drivers and time functions between 
various Unix implementation.  These Unixes are a lot closer to 
each other than the Macintosh and the Amiga and the ST are!  

Good implementations of stdio can do a lot to help.  An example 
is the MegaMax implementation on the Mac.  If you attempt to 
printf or putchar on stdout, and you have not initialized 
QuickDraw and the window manager yet, it will notice this, do it 
for you, and create a window called "stdout", which looks a lot 
like a TTY in cooked mode.  For example, echoing, ^S, ^Q, and 
backspace work, and there is a way to kill the program with a key 
sequence.  ^D generated EOF.  So most programs that just want to 
interact with a user, and do some computation will port just 
fine.  I believe that the other Mac C systems do similar things.  
I don't know anout the ST and the Amiga, but if they don't 
already, they can certainly be made to.  

But when I write a program on the Mac, I want to use menues, 
graphics, dialogs, etc.  In short, I want to use the Mac 
interface.  If I had an ST or an Amiga, I would want to use their 

It should be possible to develop a graphics library that is 
implementable on the Mac, Amiga, and ST, so that one could write 
portable programs that do graphics.  It would probably not fully 
utilize each machine, e.g., collision detection on the Amiga, but 
most programs would be able to use the library.  

I suppose one could also come up with menu libraries, window 
libraries, text libraries, etc, so that one could write portable 
programs that make use of the user interface available on the Mac 
and Amiga and ST.  

Until someone actually writes those libraries, I don't think one will
see a lot of portable code between these machines, except for programs
that use a simple command line user interface.

This specs for the above mentioned libraries could be a fun topic
to discuss ( certainly more interesting than curly braces and bouncing
balls! ).

Sounds like a job for an ANSI committee! :-)
Tim Smith       sdcrdcf!ism780c!tim || ima!ism780!tim || ihnp4!cithep!tim
			  ^-- Not ISM780C, ignore the header!

More information about the Comp.lang.c mailing list