[Coco] ANSI "C" for CoCo OS-9 Was: "C" Compiler C_PREP19 errors or mine?

Stephen H. Fischer SFischer1 at Mindspring.com
Sat May 21 21:56:54 EDT 2011


Hi,

I have it almost figured out, someone may post to say how close the
following is.

CC252, ANSIFront, C_PREP19 and perhaps C.Comp are parts of a work in
progress to build a ANSI "C" Compiler for CoCo OS-9 that is no longer being
worked on.

There was an attempt to allow the existing CoCo OS-9 "C" Compiler to be used
as before, but what I discovered with C_PREP19 was a misstep or two.

Source code appears to be available (Commented disassembly for C.Comp I
assume) for the parts except for ANSIFront which I have seen only the
binary.

The Syntax errors reported by C_PREP19 are warnings only, the code generated
for decimal string escapes is generated correctly by the two part compiler.

The cprep19.doc is correct for "__DATE__", "__TIME__" and "__FILE__". The
code was written but apparently not tested or the test failure was not acted
on.

I was able to transfer testcp19.c to my oldest laptop and after commenting
out a few lines the program compiled using Borland Turbo C++ and ran. (ANSI
Compiler)

The output included the file name (Full Path), date and time. What is wrong
is "__DATE__", "__TIME__" and "__FILE__" should include quotes when inserted
just like the next line in this post.

"testcp19.c", "May 21 1911" and "07:04:30". The project stopped before Y2K
thus the incorrect year.

--------------------------------------------------

As I have noted new persons have joined us lately, perhaps the project can 
be
continued. (Quick, find the source for ANSIFront).

SHF



----- Original Message ----- 
From: "Willard Goosey" <goosey at virgo.sdc.org>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Saturday, May 21, 2011 1:32 PM
Subject: Re: [Coco] "C" Compiler C_PREP19 errors or mine?


> On Sat, May 21, 2011 at 07:59:13AM -0700, Stephen H. Fischer wrote:
>> "fputs("\x1BM\x1Bl\d010\x1BQ\d090",fcb);" lines.
>>
>> This sends control codes to an Epson printer.
>>
>> Twenty years ago this was accepted just fine.
>
> cprep19 is fussier about string escapes than the old c.prep. There's a
> string
> constant in termcap.c that is #ifdef'ed out under OS-9, so the old
> c.prep ignores it, but cprep19 complains about syntax errors in the
> hex constants anyway.  I finally had to comment out the string so
> cprep would shut up about it.
>
> I don't really have a cure, other than re-write your strings. :-(
>
>> The second item is the suggested use of __DATE__, __TIME__ and __FILE__
>> taken right from the "cprep19.doc" file.
>
> I've never done anything with those, sorry.
>
> Willard




More information about the Coco mailing list