Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site ISM780C.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!ISM780C!tim From: tim@ISM780C.UUCP (Tim Smith) Newsgroups: net.lang.c,net.micro.mac,net.micro.atari,net.micro.amiga Subject: Re: Windows ( Really porting between Mac, Amiga, and ST Message-ID: <116@ISM780C.UUCP> Date: Fri, 6-Dec-85 21:23:04 EST Article-I.D.: ISM780C.116 Posted: Fri Dec 6 21:23:04 1985 Date-Received: Sun, 8-Dec-85 07:05:08 EST References: <-13400@brl-tgr.UUCP> Reply-To: tim@ISM780C.UUCP (Tim Smith) Organization: Interactive Systems Corp., Santa Monica, CA Lines: 69 Xref: watmath net.lang.c:7341 net.micro.mac:3722 net.micro.atari:1911 net.micro.amiga:1019 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@brl-tgr.UUCP> jon@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 interfaces. 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!