"C" on Atari looks pretty wierd

Martin Minow minow at decvax.UUCP
Wed Dec 24 09:08:43 AEST 1986


In article <1587 at hoptoad.uucp> gnu at 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 <stdio> 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



More information about the Comp.lang.c mailing list