[Coco] C compiler self-hosting on NitrOS9 again!

Jeff Teunissen deek at d2dc.net
Mon May 4 13:25:48 EDT 2020


The repository contains support for automatically translating all of
the text files within it to OS-9 format on "checkout", at least for
Unix-type systems, and it's fairly trivial to make a rule for
automatically translating the line endings on a Windows system as
well, provided you have a filter command that can do it.

You didn't have to go through all that pain, because the repository is
capable of translating itself to OS-9 text format. The README tells
you how to do it.

See the file 'gitsetup'. It has a "smudge" line that is a filter that
will transform LF to CR (on a Unix system) when a file is "checked
out" of the history. If you want CR files, then you have to get the
'tr' program, or change that line to a command for a filter (stdin to
stdout) that will transform LF to CR on _your_ system.

I do use CR line endings to edit the files, and have git automatically
transform them to linefeeds when committing -- because it's a Unix
tool, and Unix tools don't like carriage returns, so having carriage
returns all over the place makes it hard to track source code changes.

And for the people who aren't actually interested in the code running
on native OS9, that logic can simply not be enabled (by not adding the
contents of that file to .git/config) to make editing easy, without
breaking anything for the people who do need to build out of tree.

On Mon, May 4, 2020 at 1:07 PM Bill Pierce via Coco
<coco at maltedmedia.com> wrote:
>
> Jeff, you can do dsk releases separately as a "release".
> I've just spent 2 1/2 hours just making the files "OS-9 compatible" and am now moving them to my OS-9 system.
> Don't get me wrong, I'm am not trying to put your work down. You have done a fine job and I applaud your efforts. We need all the options we can get. I was just suggesting ways it could be easier on the end user. Most people would not go through what I just did LOL.
> I really have no need for an "ansi-compatible" compiler as I do most of my work in old "pre-ansi" K&R, but I see the need for being able to use C sources from other systems that do use ansi. I have run into this a few times and had do the conversion by hand which doesn't always work LOL.
>
> As for the OS-9 compatible file format, you can use Notepad++ and keep all you files compatible. NotePad++ is an open source editor and (I think) runs on all platforms. Just set "Edit/EOL Conversion/Macintosh" and your texts will be in the proper format for OS-9.
>
> Keep On Cocoing...
> Bill P.
>
>
>
> -----Original Message-----
> From: Jeff Teunissen <deek at d2dc.net>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Mon, May 4, 2020 12:08 pm
> Subject: Re: [Coco] C compiler self-hosting on NitrOS9 again!
>
> The reason I don't use disk images to maintain code is because there is no
> possibility of properly keeping source history that way, and that's vastly
> more important to the future than having the convenience of making it easy
> to distribute.
>
> It's certainly possible to generate an os9-format disk image from the
> contents of the repo, I have just not yet done it.
>
> The repository includes an ANSI-ish C preprocessor that seems to do a
> better job than c_prep 19a/b/c, though it includes the history of c_prep as
> well.
>
> On Mon, May 4, 2020, 10:00 AM Bill Pierce via Coco <coco at maltedmedia.com>
> wrote:
>
> > I assume this compiler runs under OS-9/NitrOS9. Why noy present it as OS-9
> > code on OS-9 formatted disk images ready to be copied to one's HD?
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list