Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!decvax!minow
From: minow@decvax.UUCP (Martin Minow)
Newsgroups: comp.sys.atari.st,comp.lang.c
Subject: Re: "C" on Atari looks pretty wierd
Message-ID: <120@decvax.UUCP>
Date: Tue, 23-Dec-86 18:08:43 EST
Article-I.D.: decvax.120
Posted: Tue Dec 23 18:08:43 1986
Date-Received: Wed, 24-Dec-86 00:07:10 EST
References: <1587@hoptoad.uucp>
Reply-To: minow@decvax.UUCP (Martin Minow)
Organization: Ultrix Eng. Group - Merrimack, NH
Lines: 31
Xref: mnetor comp.sys.atari.st:551 comp.lang.c:529

In article <1587@hoptoad.uucp> gnu@hoptoad.uucp (John Gilmore) saw
some wierd C in Atari C postings:
>strcat(dir, "\\*.*");   /* Start with 1st file          */
>//cpynchar(alert6 + 4L, dir, 20);
>//form_alert(1,alert6);

Not on my C compiler (Mark Williams).  form_alert puts a dialog box
on the screen with a simple message with a few (1-3) alternatives, such
as "[icon][Really Delete File][No|Yes]"  ([icon] is 0 for none, 1 for
a "note" icon, 2 for "wait", and 3 for "stop").  form_alert saves
a piece of the screen, displays the message, waits for a button press,
and returns the choice.

>Also, the library routines used are almost totally bonkers.  E.g.
>to open a file they use Fopen rather than fopen.  To read it's Fread.
>To scan a directory it's Fsfirst and Fsnext rather than opendir and
>readdir.  For malloc/free they even use Malloc/Mfree!  What was wrong
>with the old names, did they make software too easy to port?

the Fxxx routines are direct calls to the operating system -- equivalent
to Unix section II routines (open, close, sbrk, etc.)  The file routines
return small integers (channel numbers) The language support libraries
also support  routines.  The low-level routines are useful if you
want to save space.

I've had little trouble porting programs from VMS/Unix/DecusC to the Atari.
Given the price (monochrome 1040's are under $800 now, Mark Williams C
is a bit over $100), the Atari developers did a very good job.

Martin Minow
decvax!minow